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

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

Issue 1918593002: cc : Stop pushing properties not used by LayerImpl to LayerImpl (3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_impl_unittest.cc ('k') | cc/trees/property_tree_builder.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 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/trees/occlusion_tracker.h" 5 #include "cc/trees/occlusion_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 gfx::Transform transform; 1181 gfx::Transform transform;
1182 transform.Translate(50.0, 50.0); 1182 transform.Translate(50.0, 50.0);
1183 transform.ApplyPerspectiveDepth(100.0); 1183 transform.ApplyPerspectiveDepth(100.0);
1184 transform.Translate3d(0.0, 0.0, 110.0); 1184 transform.Translate3d(0.0, 0.0, 110.0);
1185 transform.Translate(-50.0, -50.0); 1185 transform.Translate(-50.0, -50.0);
1186 1186
1187 TestContentLayerImpl* parent = this->CreateRoot( 1187 TestContentLayerImpl* parent = this->CreateRoot(
1188 this->identity_matrix, gfx::PointF(), gfx::Size(100, 100)); 1188 this->identity_matrix, gfx::PointF(), gfx::Size(100, 100));
1189 TestContentLayerImpl* layer = this->CreateDrawingLayer( 1189 TestContentLayerImpl* layer = this->CreateDrawingLayer(
1190 parent, transform, gfx::PointF(), gfx::Size(100, 100), true); 1190 parent, transform, gfx::PointF(), gfx::Size(100, 100), true);
1191 parent->SetShouldFlattenTransform(false); 1191 parent->test_properties()->should_flatten_transform = false;
1192 parent->Set3dSortingContextId(1); 1192 parent->Set3dSortingContextId(1);
1193 layer->SetShouldFlattenTransform(false); 1193 layer->test_properties()->should_flatten_transform = false;
1194 layer->Set3dSortingContextId(1); 1194 layer->Set3dSortingContextId(1);
1195 this->CalcDrawEtc(parent); 1195 this->CalcDrawEtc(parent);
1196 1196
1197 TestOcclusionTrackerWithClip occlusion(gfx::Rect(0, 0, 1000, 1000)); 1197 TestOcclusionTrackerWithClip occlusion(gfx::Rect(0, 0, 1000, 1000));
1198 1198
1199 // The |layer| is entirely behind the camera and should not occlude. 1199 // The |layer| is entirely behind the camera and should not occlude.
1200 this->VisitLayer(layer, &occlusion); 1200 this->VisitLayer(layer, &occlusion);
1201 this->EnterLayer(parent, &occlusion); 1201 this->EnterLayer(parent, &occlusion);
1202 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty()); 1202 EXPECT_TRUE(occlusion.occlusion_from_inside_target().IsEmpty());
1203 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty()); 1203 EXPECT_TRUE(occlusion.occlusion_from_outside_target().IsEmpty());
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
2516 EXPECT_EQ(gfx::Rect(), 2516 EXPECT_EQ(gfx::Rect(),
2517 occlusion.UnoccludedSurfaceContentRect( 2517 occlusion.UnoccludedSurfaceContentRect(
2518 surface, gfx::Rect(80, 70, 50, 50))); 2518 surface, gfx::Rect(80, 70, 50, 50)));
2519 } 2519 }
2520 }; 2520 };
2521 2521
2522 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) 2522 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery)
2523 2523
2524 } // namespace 2524 } // namespace
2525 } // namespace cc 2525 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698