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

Side by Side Diff: cc/test/render_pass_test_utils.cc

Issue 2029813002: cc::SharedQuadState: drop CopyFrom and add copy constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use = default in cc Created 4 years, 6 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/surfaces/surface_aggregator.cc ('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 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/test/render_pass_test_utils.h" 5 #include "cc/test/render_pass_test_utils.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "cc/quads/debug_border_draw_quad.h" 10 #include "cc/quads/debug_border_draw_quad.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 vertex_opacity, false, false, false); 251 vertex_opacity, false, false, false);
252 252
253 TileDrawQuad* scaled_tile_quad = 253 TileDrawQuad* scaled_tile_quad =
254 to_pass->CreateAndAppendDrawQuad<TileDrawQuad>(); 254 to_pass->CreateAndAppendDrawQuad<TileDrawQuad>();
255 scaled_tile_quad->SetNew(shared_state, rect, opaque_rect, visible_rect, 255 scaled_tile_quad->SetNew(shared_state, rect, opaque_rect, visible_rect,
256 resource2, gfx::RectF(0, 0, 50, 50), 256 resource2, gfx::RectF(0, 0, 50, 50),
257 gfx::Size(50, 50), false, false); 257 gfx::Size(50, 50), false, false);
258 258
259 SharedQuadState* transformed_state = 259 SharedQuadState* transformed_state =
260 to_pass->CreateAndAppendSharedQuadState(); 260 to_pass->CreateAndAppendSharedQuadState();
261 transformed_state->CopyFrom(shared_state); 261 *transformed_state = *shared_state;
262 gfx::Transform rotation; 262 gfx::Transform rotation;
263 rotation.Rotate(45); 263 rotation.Rotate(45);
264 transformed_state->quad_to_target_transform = 264 transformed_state->quad_to_target_transform =
265 transformed_state->quad_to_target_transform * rotation; 265 transformed_state->quad_to_target_transform * rotation;
266 TileDrawQuad* transformed_tile_quad = 266 TileDrawQuad* transformed_tile_quad =
267 to_pass->CreateAndAppendDrawQuad<TileDrawQuad>(); 267 to_pass->CreateAndAppendDrawQuad<TileDrawQuad>();
268 transformed_tile_quad->SetNew( 268 transformed_tile_quad->SetNew(
269 transformed_state, rect, opaque_rect, visible_rect, resource3, 269 transformed_state, rect, opaque_rect, visible_rect, resource3,
270 gfx::RectF(0, 0, 100, 100), gfx::Size(100, 100), false, false); 270 gfx::RectF(0, 0, 100, 100), gfx::Size(100, 100), false, false);
271 271
(...skipping 18 matching lines...) Expand all
290 to_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); 290 to_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>();
291 yuv_quad->SetNew(shared_state2, rect, opaque_rect, visible_rect, 291 yuv_quad->SetNew(shared_state2, rect, opaque_rect, visible_rect,
292 gfx::RectF(.0f, .0f, 100.0f, 100.0f), 292 gfx::RectF(.0f, .0f, 100.0f, 100.0f),
293 gfx::RectF(.0f, .0f, 50.0f, 50.0f), gfx::Size(100, 100), 293 gfx::RectF(.0f, .0f, 50.0f, 50.0f), gfx::Size(100, 100),
294 gfx::Size(50, 50), plane_resources[0], plane_resources[1], 294 gfx::Size(50, 50), plane_resources[0], plane_resources[1],
295 plane_resources[2], plane_resources[3], color_space, 0.0, 295 plane_resources[2], plane_resources[3], color_space, 0.0,
296 1.0); 296 1.0);
297 } 297 }
298 298
299 } // namespace cc 299 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_aggregator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698