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

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

Issue 2866733002: Remove owning_id from EffectNode and replace it by an opaque stable_id (Closed)
Patch Set: none Created 3 years, 7 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_impl_unittest.cc ('k') | cc/trees/property_tree.h » ('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/animation/animation_host.h" 9 #include "cc/animation/animation_host.h"
10 #include "cc/base/filter_operation.h" 10 #include "cc/base/filter_operation.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // layer. Simple wrapper around GetUnoccludedContentRect. 71 // layer. Simple wrapper around GetUnoccludedContentRect.
72 gfx::Rect UnoccludedLayerContentRect(const LayerImpl* layer, 72 gfx::Rect UnoccludedLayerContentRect(const LayerImpl* layer,
73 const gfx::Rect& content_rect) const { 73 const gfx::Rect& content_rect) const {
74 DCHECK(layer->visible_layer_rect().Contains(content_rect)); 74 DCHECK(layer->visible_layer_rect().Contains(content_rect));
75 return this->GetCurrentOcclusionForLayer(layer->DrawTransform()) 75 return this->GetCurrentOcclusionForLayer(layer->DrawTransform())
76 .GetUnoccludedContentRect(content_rect); 76 .GetUnoccludedContentRect(content_rect);
77 } 77 }
78 78
79 gfx::Rect UnoccludedSurfaceContentRect(const LayerImpl* layer, 79 gfx::Rect UnoccludedSurfaceContentRect(const LayerImpl* layer,
80 const gfx::Rect& content_rect) const { 80 const gfx::Rect& content_rect) const {
81 const RenderSurfaceImpl* surface = GetRenderSurface(layer); 81 const RenderSurfaceImpl* surface =
82 GetRenderSurface(const_cast<LayerImpl*>(layer));
82 return this->GetCurrentOcclusionForContributingSurface( 83 return this->GetCurrentOcclusionForContributingSurface(
83 surface->draw_transform()) 84 surface->draw_transform())
84 .GetUnoccludedContentRect(content_rect); 85 .GetUnoccludedContentRect(content_rect);
85 } 86 }
86 }; 87 };
87 88
88 class OcclusionTrackerTest : public testing::Test { 89 class OcclusionTrackerTest : public testing::Test {
89 protected: 90 protected:
90 explicit OcclusionTrackerTest(bool opaque_layers) 91 explicit OcclusionTrackerTest(bool opaque_layers)
91 : opaque_layers_(opaque_layers), 92 : opaque_layers_(opaque_layers),
(...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2433 EXPECT_EQ(gfx::Rect(), 2434 EXPECT_EQ(gfx::Rect(),
2434 occlusion.UnoccludedSurfaceContentRect( 2435 occlusion.UnoccludedSurfaceContentRect(
2435 surface, gfx::Rect(80, 70, 50, 50))); 2436 surface, gfx::Rect(80, 70, 50, 50)));
2436 } 2437 }
2437 }; 2438 };
2438 2439
2439 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) 2440 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery)
2440 2441
2441 } // namespace 2442 } // namespace
2442 } // namespace cc 2443 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698