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

Side by Side Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 687873004: Introduce Property Trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wip-awoloszyn2
Patch Set: . Created 6 years 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 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/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 replica_layer_transform.Scale3d(3.0, 3.0, 1.0); 663 replica_layer_transform.Scale3d(3.0, 3.0, 1.0);
664 gfx::Vector2dF parent_composite_scale = 664 gfx::Vector2dF parent_composite_scale =
665 MathUtil::ComputeTransform2dScaleComponents(parent_composite_transform, 665 MathUtil::ComputeTransform2dScaleComponents(parent_composite_transform,
666 1.f); 666 1.f);
667 gfx::Transform surface_sublayer_transform; 667 gfx::Transform surface_sublayer_transform;
668 surface_sublayer_transform.Scale(parent_composite_scale.x(), 668 surface_sublayer_transform.Scale(parent_composite_scale.x(),
669 parent_composite_scale.y()); 669 parent_composite_scale.y());
670 gfx::Transform replica_composite_transform = 670 gfx::Transform replica_composite_transform =
671 parent_composite_transform * replica_layer_transform * 671 parent_composite_transform * replica_layer_transform *
672 Inverse(surface_sublayer_transform); 672 Inverse(surface_sublayer_transform);
673 673 child_replica->SetIsDrawable(true);
674 // Child's render surface should not exist yet. 674 // Child's render surface should not exist yet.
675 ASSERT_FALSE(child->render_surface()); 675 ASSERT_FALSE(child->render_surface());
676 676
677 SetLayerPropertiesForTesting(parent.get(), 677 SetLayerPropertiesForTesting(parent.get(),
678 parent_layer_transform, 678 parent_layer_transform,
679 gfx::Point3F(2.5f, 3.0f, 0.f), 679 gfx::Point3F(2.5f, 3.0f, 0.f),
680 gfx::PointF(), 680 gfx::PointF(),
681 gfx::Size(10, 12), 681 gfx::Size(10, 12),
682 true, 682 true,
683 false); 683 false);
(...skipping 7937 matching lines...) Expand 10 before | Expand all | Expand 10 after
8621 // by the viewport. 8621 // by the viewport.
8622 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), root->visible_content_rect()); 8622 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), root->visible_content_rect());
8623 8623
8624 // Layers drawing to a child render surface should still have their visible 8624 // Layers drawing to a child render surface should still have their visible
8625 // content rect clipped by the viewport. 8625 // content rect clipped by the viewport.
8626 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), content->visible_content_rect()); 8626 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), content->visible_content_rect());
8627 } 8627 }
8628 8628
8629 } // namespace 8629 } // namespace
8630 } // namespace cc 8630 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698