Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1075)

Side by Side Diff: content/common/cc_messages_unittest.cc

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed a signed vs. unsigned comparison in video_resource_updater.cc Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/cc_messages.h ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/cc_messages.h" 5 #include "content/common/cc_messages.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 GLbyte arbitrary_mailbox2[64] = { 503 GLbyte arbitrary_mailbox2[64] = {
504 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 504 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0,
505 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 505 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0,
506 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 506 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0,
507 0, 9, 8, 7 507 0, 9, 8, 7
508 }; 508 };
509 509
510 TransferableResource arbitrary_resource1; 510 TransferableResource arbitrary_resource1;
511 arbitrary_resource1.id = 2178312; 511 arbitrary_resource1.id = 2178312;
512 arbitrary_resource1.sync_point = arbitrary_uint1; 512 arbitrary_resource1.sync_point = arbitrary_uint1;
513 arbitrary_resource1.format = 7; 513 arbitrary_resource1.format = cc::RGBA_8888;
514 arbitrary_resource1.filter = 53; 514 arbitrary_resource1.filter = 53;
515 arbitrary_resource1.size = gfx::Size(37189, 123123); 515 arbitrary_resource1.size = gfx::Size(37189, 123123);
516 arbitrary_resource1.mailbox.SetName(arbitrary_mailbox1); 516 arbitrary_resource1.mailbox.SetName(arbitrary_mailbox1);
517 517
518 TransferableResource arbitrary_resource2; 518 TransferableResource arbitrary_resource2;
519 arbitrary_resource2.id = 789132; 519 arbitrary_resource2.id = 789132;
520 arbitrary_resource1.sync_point = arbitrary_uint2; 520 arbitrary_resource1.sync_point = arbitrary_uint2;
521 arbitrary_resource2.format = 30; 521 arbitrary_resource2.format = cc::RGBA_4444;
522 arbitrary_resource1.filter = 47; 522 arbitrary_resource1.filter = 47;
523 arbitrary_resource2.size = gfx::Size(89123, 23789); 523 arbitrary_resource2.size = gfx::Size(89123, 23789);
524 arbitrary_resource2.mailbox.SetName(arbitrary_mailbox2); 524 arbitrary_resource2.mailbox.SetName(arbitrary_mailbox2);
525 525
526 DelegatedFrameData frame_in; 526 DelegatedFrameData frame_in;
527 frame_in.resource_list.push_back(arbitrary_resource1); 527 frame_in.resource_list.push_back(arbitrary_resource1);
528 frame_in.resource_list.push_back(arbitrary_resource2); 528 frame_in.resource_list.push_back(arbitrary_resource2);
529 529
530 IPC::ParamTraits<DelegatedFrameData>::Write(&msg, frame_in); 530 IPC::ParamTraits<DelegatedFrameData>::Write(&msg, frame_in);
531 531
532 DelegatedFrameData frame_out; 532 DelegatedFrameData frame_out;
533 PickleIterator iter(msg); 533 PickleIterator iter(msg);
534 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, 534 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg,
535 &iter, &frame_out)); 535 &iter, &frame_out));
536 536
537 ASSERT_EQ(2u, frame_out.resource_list.size()); 537 ASSERT_EQ(2u, frame_out.resource_list.size());
538 Compare(arbitrary_resource1, frame_out.resource_list[0]); 538 Compare(arbitrary_resource1, frame_out.resource_list[0]);
539 Compare(arbitrary_resource2, frame_out.resource_list[1]); 539 Compare(arbitrary_resource2, frame_out.resource_list[1]);
540 } 540 }
541 541
542 } // namespace 542 } // namespace
543 } // namespace content 543 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cc_messages.h ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698