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

Side by Side Diff: cc/delegated_renderer_layer_impl_unittest.cc

Issue 11828011: cc: Map the clip_rect in the SharedQuadState to include the host layer's drawTransform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « cc/delegated_renderer_layer_impl.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/delegated_renderer_layer_impl.h" 5 #include "cc/delegated_renderer_layer_impl.h"
6 6
7 #include "cc/append_quads_data.h" 7 #include "cc/append_quads_data.h"
8 #include "cc/layer_tree_host_impl.h" 8 #include "cc/layer_tree_host_impl.h"
9 #include "cc/layer_tree_impl.h" 9 #include "cc/layer_tree_impl.h"
10 #include "cc/quad_sink.h" 10 #include "cc/quad_sink.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 ASSERT_EQ(4u, quadList.size()); 444 ASSERT_EQ(4u, quadList.size());
445 445
446 // All quads should share the same state. 446 // All quads should share the same state.
447 const SharedQuadState* sharedState = quadList[0]->shared_quad_state; 447 const SharedQuadState* sharedState = quadList[0]->shared_quad_state;
448 EXPECT_EQ(sharedState, quadList[1]->shared_quad_state); 448 EXPECT_EQ(sharedState, quadList[1]->shared_quad_state);
449 EXPECT_EQ(sharedState, quadList[2]->shared_quad_state); 449 EXPECT_EQ(sharedState, quadList[2]->shared_quad_state);
450 EXPECT_EQ(sharedState, quadList[3]->shared_quad_state); 450 EXPECT_EQ(sharedState, quadList[3]->shared_quad_state);
451 451
452 // The state should be transformed only once. 452 // The state should be transformed only once.
453 EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clipped_rect_in_targe t); 453 EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clipped_rect_in_targe t);
454 EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clip_rect);
454 gfx::Transform expected; 455 gfx::Transform expected;
455 expected.Translate(30, 30); 456 expected.Translate(30, 30);
456 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, sharedState->content_to_target_tra nsform); 457 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, sharedState->content_to_target_tra nsform);
457 458
458 m_hostImpl->drawLayers(frame); 459 m_hostImpl->drawLayers(frame);
459 m_hostImpl->didDrawAllLayers(frame); 460 m_hostImpl->didDrawAllLayers(frame);
460 } 461 }
461 462
462 } // namespace 463 } // namespace
463 } // namespace cc 464 } // namespace cc
OLDNEW
« no previous file with comments | « cc/delegated_renderer_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698