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

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

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning 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/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.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/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "cc/animation/layer_animation_controller.h" 9 #include "cc/animation/layer_animation_controller.h"
10 #include "cc/animation/transform_operations.h" 10 #include "cc/animation/transform_operations.h"
(...skipping 7834 matching lines...) Expand 10 before | Expand all | Expand 10 after
7845 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 2); 7845 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 2);
7846 scoped_ptr<AnimationScaleFactorTrackingLayerImpl> child = 7846 scoped_ptr<AnimationScaleFactorTrackingLayerImpl> child =
7847 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 3); 7847 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 3);
7848 scoped_ptr<AnimationScaleFactorTrackingLayerImpl> grand_child = 7848 scoped_ptr<AnimationScaleFactorTrackingLayerImpl> grand_child =
7849 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 4); 7849 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 4);
7850 7850
7851 AnimationScaleFactorTrackingLayerImpl* parent_raw = parent.get(); 7851 AnimationScaleFactorTrackingLayerImpl* parent_raw = parent.get();
7852 AnimationScaleFactorTrackingLayerImpl* child_raw = child.get(); 7852 AnimationScaleFactorTrackingLayerImpl* child_raw = child.get();
7853 AnimationScaleFactorTrackingLayerImpl* grand_child_raw = grand_child.get(); 7853 AnimationScaleFactorTrackingLayerImpl* grand_child_raw = grand_child.get();
7854 7854
7855 child->AddChild(grand_child.PassAs<LayerImpl>()); 7855 child->AddChild(grand_child.Pass());
7856 parent->AddChild(child.PassAs<LayerImpl>()); 7856 parent->AddChild(child.Pass());
7857 grand_parent->AddChild(parent.PassAs<LayerImpl>()); 7857 grand_parent->AddChild(parent.Pass());
7858 7858
7859 SetLayerPropertiesForTesting(grand_parent.get(), 7859 SetLayerPropertiesForTesting(grand_parent.get(),
7860 identity_matrix, 7860 identity_matrix,
7861 gfx::Point3F(), 7861 gfx::Point3F(),
7862 gfx::PointF(), 7862 gfx::PointF(),
7863 gfx::Size(1, 2), 7863 gfx::Size(1, 2),
7864 true, 7864 true,
7865 false); 7865 false);
7866 SetLayerPropertiesForTesting(parent_raw, 7866 SetLayerPropertiesForTesting(parent_raw,
7867 identity_matrix, 7867 identity_matrix,
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
8610 // by the viewport. 8610 // by the viewport.
8611 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), root->visible_content_rect()); 8611 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), root->visible_content_rect());
8612 8612
8613 // Layers drawing to a child render surface should still have their visible 8613 // Layers drawing to a child render surface should still have their visible
8614 // content rect clipped by the viewport. 8614 // content rect clipped by the viewport.
8615 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), content->visible_content_rect()); 8615 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), content->visible_content_rect());
8616 } 8616 }
8617 8617
8618 } // namespace 8618 } // namespace
8619 } // namespace cc 8619 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698