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

Side by Side Diff: cc/quads/render_pass_unittest.cc

Issue 448303002: Use custom ListContainer to allocate DrawQuads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@perftest
Patch Set: change header files to try fix compile error Created 6 years, 2 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 | « cc/quads/render_pass.cc ('k') | cc/surfaces/surface_aggregator.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/quads/render_pass.h" 5 #include "cc/quads/render_pass.h"
6 6
7 #include "cc/base/math_util.h" 7 #include "cc/base/math_util.h"
8 #include "cc/base/scoped_ptr_vector.h" 8 #include "cc/base/scoped_ptr_vector.h"
9 #include "cc/output/copy_output_request.h" 9 #include "cc/output/copy_output_request.h"
10 #include "cc/quads/checkerboard_draw_quad.h" 10 #include "cc/quads/checkerboard_draw_quad.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 EXPECT_EQ(expected->transform_to_root_target, 45 EXPECT_EQ(expected->transform_to_root_target,
46 actual->transform_to_root_target); 46 actual->transform_to_root_target);
47 EXPECT_RECT_EQ(expected->damage_rect, actual->damage_rect); 47 EXPECT_RECT_EQ(expected->damage_rect, actual->damage_rect);
48 EXPECT_EQ(expected->has_transparent_background, 48 EXPECT_EQ(expected->has_transparent_background,
49 actual->has_transparent_background); 49 actual->has_transparent_background);
50 50
51 EXPECT_EQ(expected->shared_quad_state_list.size(), 51 EXPECT_EQ(expected->shared_quad_state_list.size(),
52 actual->shared_quad_state_list.size()); 52 actual->shared_quad_state_list.size());
53 EXPECT_EQ(expected->quad_list.size(), actual->quad_list.size()); 53 EXPECT_EQ(expected->quad_list.size(), actual->quad_list.size());
54 54
55 for (size_t i = 0; i < expected->quad_list.size(); ++i) { 55 for (QuadList::Iterator exp_iter = expected->quad_list.begin(),
56 EXPECT_EQ(expected->quad_list[i]->rect.ToString(), 56 act_iter = actual->quad_list.begin();
57 actual->quad_list[i]->rect.ToString()); 57 exp_iter != expected->quad_list.end();
58 EXPECT_EQ( 58 ++exp_iter, ++act_iter) {
59 expected->quad_list[i]->shared_quad_state->content_bounds.ToString(), 59 EXPECT_EQ(exp_iter->rect.ToString(), act_iter->rect.ToString());
60 actual->quad_list[i]->shared_quad_state->content_bounds.ToString()); 60 EXPECT_EQ(exp_iter->shared_quad_state->content_bounds.ToString(),
61 act_iter->shared_quad_state->content_bounds.ToString());
61 } 62 }
62 } 63 }
63 } 64 }
64 65
65 TEST(RenderPassTest, CopyShouldBeIdenticalExceptIdAndQuads) { 66 TEST(RenderPassTest, CopyShouldBeIdenticalExceptIdAndQuads) {
66 RenderPassId id(3, 2); 67 RenderPassId id(3, 2);
67 gfx::Rect output_rect(45, 22, 120, 13); 68 gfx::Rect output_rect(45, 22, 120, 13);
68 gfx::Transform transform_to_root = 69 gfx::Transform transform_to_root =
69 gfx::Transform(1.0, 0.5, 0.5, -0.5, -1.0, 0.0); 70 gfx::Transform(1.0, 0.5, 0.5, -0.5, -1.0, 0.0);
70 gfx::Rect damage_rect(56, 123, 19, 43); 71 gfx::Rect damage_rect(56, 123, 19, 43);
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 314
314 // Make a copy with CopyAll(). 315 // Make a copy with CopyAll().
315 RenderPassList copy_list; 316 RenderPassList copy_list;
316 RenderPass::CopyAll(pass_list, &copy_list); 317 RenderPass::CopyAll(pass_list, &copy_list);
317 318
318 CompareRenderPassLists(pass_list, copy_list); 319 CompareRenderPassLists(pass_list, copy_list);
319 } 320 }
320 321
321 } // namespace 322 } // namespace
322 } // namespace cc 323 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/render_pass.cc ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698