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

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

Issue 2716733007: cc: Rename LayerImpl::render_surface to GetRenderSurface (Closed)
Patch Set: Created 3 years, 10 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/occlusion_tracker.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/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/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // layer. Simple wrapper around GetUnoccludedContentRect. 70 // layer. Simple wrapper around GetUnoccludedContentRect.
71 gfx::Rect UnoccludedLayerContentRect(const LayerImpl* layer, 71 gfx::Rect UnoccludedLayerContentRect(const LayerImpl* layer,
72 const gfx::Rect& content_rect) const { 72 const gfx::Rect& content_rect) const {
73 DCHECK(layer->visible_layer_rect().Contains(content_rect)); 73 DCHECK(layer->visible_layer_rect().Contains(content_rect));
74 return this->GetCurrentOcclusionForLayer(layer->DrawTransform()) 74 return this->GetCurrentOcclusionForLayer(layer->DrawTransform())
75 .GetUnoccludedContentRect(content_rect); 75 .GetUnoccludedContentRect(content_rect);
76 } 76 }
77 77
78 gfx::Rect UnoccludedSurfaceContentRect(const LayerImpl* layer, 78 gfx::Rect UnoccludedSurfaceContentRect(const LayerImpl* layer,
79 const gfx::Rect& content_rect) const { 79 const gfx::Rect& content_rect) const {
80 RenderSurfaceImpl* surface = layer->render_surface(); 80 RenderSurfaceImpl* surface = layer->GetRenderSurface();
81 return this->GetCurrentOcclusionForContributingSurface( 81 return this->GetCurrentOcclusionForContributingSurface(
82 surface->draw_transform()) 82 surface->draw_transform())
83 .GetUnoccludedContentRect(content_rect); 83 .GetUnoccludedContentRect(content_rect);
84 } 84 }
85 }; 85 };
86 86
87 class OcclusionTrackerTest : public testing::Test { 87 class OcclusionTrackerTest : public testing::Test {
88 protected: 88 protected:
89 explicit OcclusionTrackerTest(bool opaque_layers) 89 explicit OcclusionTrackerTest(bool opaque_layers)
90 : opaque_layers_(opaque_layers), 90 : opaque_layers_(opaque_layers),
(...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2425 EXPECT_EQ(gfx::Rect(), 2425 EXPECT_EQ(gfx::Rect(),
2426 occlusion.UnoccludedSurfaceContentRect( 2426 occlusion.UnoccludedSurfaceContentRect(
2427 surface, gfx::Rect(80, 70, 50, 50))); 2427 surface, gfx::Rect(80, 70, 50, 50)));
2428 } 2428 }
2429 }; 2429 };
2430 2430
2431 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) 2431 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery)
2432 2432
2433 } // namespace 2433 } // namespace
2434 } // namespace cc 2434 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/occlusion_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698