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

Side by Side Diff: mojo/services/public/cpp/surfaces/tests/surface_unittest.cc

Issue 404563005: Make RenderPass::Id an isolated class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more case in mojo 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "cc/quads/render_pass.h" 5 #include "cc/quads/render_pass.h"
6 #include "cc/quads/solid_color_draw_quad.h" 6 #include "cc/quads/solid_color_draw_quad.h"
7 #include "cc/quads/surface_draw_quad.h" 7 #include "cc/quads/surface_draw_quad.h"
8 #include "cc/quads/texture_draw_quad.h" 8 #include "cc/quads/texture_draw_quad.h"
9 #include "gpu/command_buffer/common/mailbox.h" 9 #include "gpu/command_buffer/common/mailbox.h"
10 #include "gpu/command_buffer/common/mailbox_holder.h" 10 #include "gpu/command_buffer/common/mailbox_holder.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 EXPECT_EQ(Size::From(content_bounds), mojo_sqs->content_bounds); 196 EXPECT_EQ(Size::From(content_bounds), mojo_sqs->content_bounds);
197 EXPECT_EQ(Rect::From(visible_content_rect), mojo_sqs->visible_content_rect); 197 EXPECT_EQ(Rect::From(visible_content_rect), mojo_sqs->visible_content_rect);
198 EXPECT_EQ(Rect::From(clip_rect), mojo_sqs->clip_rect); 198 EXPECT_EQ(Rect::From(clip_rect), mojo_sqs->clip_rect);
199 EXPECT_EQ(is_clipped, mojo_sqs->is_clipped); 199 EXPECT_EQ(is_clipped, mojo_sqs->is_clipped);
200 EXPECT_EQ(opacity, mojo_sqs->opacity); 200 EXPECT_EQ(opacity, mojo_sqs->opacity);
201 EXPECT_EQ(sorting_context_id, mojo_sqs->sorting_context_id); 201 EXPECT_EQ(sorting_context_id, mojo_sqs->sorting_context_id);
202 } 202 }
203 203
204 TEST(SurfaceLibTest, RenderPass) { 204 TEST(SurfaceLibTest, RenderPass) {
205 scoped_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); 205 scoped_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
206 cc::RenderPass::Id pass_id(1, 6); 206 cc::RenderPassId pass_id(1, 6);
207 gfx::Rect output_rect(4, 9, 13, 71); 207 gfx::Rect output_rect(4, 9, 13, 71);
208 gfx::Rect damage_rect(9, 17, 41, 45); 208 gfx::Rect damage_rect(9, 17, 41, 45);
209 gfx::Transform transform_to_root_target; 209 gfx::Transform transform_to_root_target;
210 transform_to_root_target.SkewY(43.0); 210 transform_to_root_target.SkewY(43.0);
211 bool has_transparent_background = false; 211 bool has_transparent_background = false;
212 pass->SetAll(pass_id, 212 pass->SetAll(pass_id,
213 output_rect, 213 output_rect,
214 damage_rect, 214 damage_rect,
215 transform_to_root_target, 215 transform_to_root_target,
216 has_transparent_background); 216 has_transparent_background);
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 cc::ReturnedResource round_trip_resource = 449 cc::ReturnedResource round_trip_resource =
450 mojo_resource.To<cc::ReturnedResource>(); 450 mojo_resource.To<cc::ReturnedResource>();
451 EXPECT_EQ(id, round_trip_resource.id); 451 EXPECT_EQ(id, round_trip_resource.id);
452 EXPECT_EQ(sync_point, round_trip_resource.sync_point); 452 EXPECT_EQ(sync_point, round_trip_resource.sync_point);
453 EXPECT_EQ(count, round_trip_resource.count); 453 EXPECT_EQ(count, round_trip_resource.count);
454 EXPECT_EQ(lost, round_trip_resource.lost); 454 EXPECT_EQ(lost, round_trip_resource.lost);
455 } 455 }
456 456
457 } // namespace 457 } // namespace
458 } // namespace mojo 458 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/public/cpp/surfaces/lib/surfaces_type_converters.cc ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698