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

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

Issue 444823002: Plumb allow_overlay flag to parent compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 6 years, 4 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') | no next file » | 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 <algorithm> 9 #include <algorithm>
10 10
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 EXPECT_EQ(a.id, b.id); 208 EXPECT_EQ(a.id, b.id);
209 EXPECT_EQ(a.format, b.format); 209 EXPECT_EQ(a.format, b.format);
210 EXPECT_EQ(a.filter, b.filter); 210 EXPECT_EQ(a.filter, b.filter);
211 EXPECT_EQ(a.size.ToString(), b.size.ToString()); 211 EXPECT_EQ(a.size.ToString(), b.size.ToString());
212 for (size_t i = 0; i < arraysize(a.mailbox_holder.mailbox.name); ++i) { 212 for (size_t i = 0; i < arraysize(a.mailbox_holder.mailbox.name); ++i) {
213 EXPECT_EQ(a.mailbox_holder.mailbox.name[i], 213 EXPECT_EQ(a.mailbox_holder.mailbox.name[i],
214 b.mailbox_holder.mailbox.name[i]); 214 b.mailbox_holder.mailbox.name[i]);
215 } 215 }
216 EXPECT_EQ(a.mailbox_holder.texture_target, b.mailbox_holder.texture_target); 216 EXPECT_EQ(a.mailbox_holder.texture_target, b.mailbox_holder.texture_target);
217 EXPECT_EQ(a.mailbox_holder.sync_point, b.mailbox_holder.sync_point); 217 EXPECT_EQ(a.mailbox_holder.sync_point, b.mailbox_holder.sync_point);
218 EXPECT_EQ(a.allow_overlay, b.allow_overlay);
218 } 219 }
219 }; 220 };
220 221
221 TEST_F(CCMessagesTest, AllQuads) { 222 TEST_F(CCMessagesTest, AllQuads) {
222 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); 223 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
223 224
224 Transform arbitrary_matrix; 225 Transform arbitrary_matrix;
225 arbitrary_matrix.Scale(3, 3); 226 arbitrary_matrix.Scale(3, 3);
226 arbitrary_matrix.Translate(-5, 20); 227 arbitrary_matrix.Translate(-5, 20);
227 arbitrary_matrix.Rotate(15); 228 arbitrary_matrix.Rotate(15);
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7}; 649 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7};
649 650
650 TransferableResource arbitrary_resource1; 651 TransferableResource arbitrary_resource1;
651 arbitrary_resource1.id = 2178312; 652 arbitrary_resource1.id = 2178312;
652 arbitrary_resource1.format = cc::RGBA_8888; 653 arbitrary_resource1.format = cc::RGBA_8888;
653 arbitrary_resource1.filter = 53; 654 arbitrary_resource1.filter = 53;
654 arbitrary_resource1.size = gfx::Size(37189, 123123); 655 arbitrary_resource1.size = gfx::Size(37189, 123123);
655 arbitrary_resource1.mailbox_holder.mailbox.SetName(arbitrary_mailbox1); 656 arbitrary_resource1.mailbox_holder.mailbox.SetName(arbitrary_mailbox1);
656 arbitrary_resource1.mailbox_holder.texture_target = GL_TEXTURE_2D; 657 arbitrary_resource1.mailbox_holder.texture_target = GL_TEXTURE_2D;
657 arbitrary_resource1.mailbox_holder.sync_point = arbitrary_uint1; 658 arbitrary_resource1.mailbox_holder.sync_point = arbitrary_uint1;
659 arbitrary_resource1.allow_overlay = true;
658 660
659 TransferableResource arbitrary_resource2; 661 TransferableResource arbitrary_resource2;
660 arbitrary_resource2.id = 789132; 662 arbitrary_resource2.id = 789132;
661 arbitrary_resource2.format = cc::RGBA_4444; 663 arbitrary_resource2.format = cc::RGBA_4444;
662 arbitrary_resource2.filter = 47; 664 arbitrary_resource2.filter = 47;
663 arbitrary_resource2.size = gfx::Size(89123, 23789); 665 arbitrary_resource2.size = gfx::Size(89123, 23789);
664 arbitrary_resource2.mailbox_holder.mailbox.SetName(arbitrary_mailbox2); 666 arbitrary_resource2.mailbox_holder.mailbox.SetName(arbitrary_mailbox2);
665 arbitrary_resource2.mailbox_holder.texture_target = GL_TEXTURE_EXTERNAL_OES; 667 arbitrary_resource2.mailbox_holder.texture_target = GL_TEXTURE_EXTERNAL_OES;
666 arbitrary_resource2.mailbox_holder.sync_point = arbitrary_uint2; 668 arbitrary_resource2.mailbox_holder.sync_point = arbitrary_uint2;
669 arbitrary_resource2.allow_overlay = false;
667 670
668 scoped_ptr<RenderPass> renderpass_in = RenderPass::Create(); 671 scoped_ptr<RenderPass> renderpass_in = RenderPass::Create();
669 renderpass_in->SetNew( 672 renderpass_in->SetNew(
670 RenderPass::Id(1, 1), gfx::Rect(), gfx::Rect(), gfx::Transform()); 673 RenderPass::Id(1, 1), gfx::Rect(), gfx::Rect(), gfx::Transform());
671 674
672 DelegatedFrameData frame_in; 675 DelegatedFrameData frame_in;
673 frame_in.resource_list.push_back(arbitrary_resource1); 676 frame_in.resource_list.push_back(arbitrary_resource1);
674 frame_in.resource_list.push_back(arbitrary_resource2); 677 frame_in.resource_list.push_back(arbitrary_resource2);
675 frame_in.render_pass_list.push_back(renderpass_in.Pass()); 678 frame_in.render_pass_list.push_back(renderpass_in.Pass());
676 679
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 SoftwareFrameData frame_out; 801 SoftwareFrameData frame_out;
799 PickleIterator iter(msg); 802 PickleIterator iter(msg);
800 EXPECT_EQ( 803 EXPECT_EQ(
801 expect_read, 804 expect_read,
802 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out)); 805 IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out));
803 } 806 }
804 } 807 }
805 808
806 } // namespace 809 } // namespace
807 } // namespace content 810 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cc_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698