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

Side by Side Diff: cc/layers/render_surface_unittest.cc

Issue 551013002: Use Custome ListContainer to Allocate SharedQuadState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DQAllo
Patch Set: rebase 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/layers/picture_layer_impl_unittest.cc ('k') | cc/layers/tiled_layer_impl_unittest.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/base/scoped_ptr_vector.h" 5 #include "cc/base/scoped_ptr_vector.h"
6 #include "cc/layers/append_quads_data.h" 6 #include "cc/layers/append_quads_data.h"
7 #include "cc/layers/layer_impl.h" 7 #include "cc/layers/layer_impl.h"
8 #include "cc/layers/render_pass_sink.h" 8 #include "cc/layers/render_pass_sink.h"
9 #include "cc/layers/render_surface_impl.h" 9 #include "cc/layers/render_surface_impl.h"
10 #include "cc/quads/shared_quad_state.h" 10 #include "cc/quads/shared_quad_state.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 AppendQuadsData append_quads_data; 112 AppendQuadsData append_quads_data;
113 113
114 bool for_replica = false; 114 bool for_replica = false;
115 render_surface->AppendQuads(render_pass.get(), 115 render_surface->AppendQuads(render_pass.get(),
116 occlusion_tracker, 116 occlusion_tracker,
117 &append_quads_data, 117 &append_quads_data,
118 for_replica, 118 for_replica,
119 RenderPassId(2, 0)); 119 RenderPassId(2, 0));
120 120
121 ASSERT_EQ(1u, render_pass->shared_quad_state_list.size()); 121 ASSERT_EQ(1u, render_pass->shared_quad_state_list.size());
122 SharedQuadState* shared_quad_state = render_pass->shared_quad_state_list[0]; 122 SharedQuadState* shared_quad_state =
123 render_pass->shared_quad_state_list.front();
123 124
124 EXPECT_EQ( 125 EXPECT_EQ(
125 30.0, 126 30.0,
126 shared_quad_state->content_to_target_transform.matrix().getDouble(0, 3)); 127 shared_quad_state->content_to_target_transform.matrix().getDouble(0, 3));
127 EXPECT_EQ( 128 EXPECT_EQ(
128 40.0, 129 40.0,
129 shared_quad_state->content_to_target_transform.matrix().getDouble(1, 3)); 130 shared_quad_state->content_to_target_transform.matrix().getDouble(1, 3));
130 EXPECT_RECT_EQ(content_rect, 131 EXPECT_RECT_EQ(content_rect,
131 gfx::Rect(shared_quad_state->visible_content_rect)); 132 gfx::Rect(shared_quad_state->visible_content_rect));
132 EXPECT_EQ(1.f, shared_quad_state->opacity); 133 EXPECT_EQ(1.f, shared_quad_state->opacity);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 ASSERT_EQ(1u, pass_sink.RenderPasses().size()); 177 ASSERT_EQ(1u, pass_sink.RenderPasses().size());
177 RenderPass* pass = pass_sink.RenderPasses()[0]; 178 RenderPass* pass = pass_sink.RenderPasses()[0];
178 179
179 EXPECT_EQ(RenderPassId(2, 0), pass->id); 180 EXPECT_EQ(RenderPassId(2, 0), pass->id);
180 EXPECT_RECT_EQ(content_rect, pass->output_rect); 181 EXPECT_RECT_EQ(content_rect, pass->output_rect);
181 EXPECT_EQ(origin, pass->transform_to_root_target); 182 EXPECT_EQ(origin, pass->transform_to_root_target);
182 } 183 }
183 184
184 } // namespace 185 } // namespace
185 } // namespace cc 186 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/layers/tiled_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698