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

Side by Side Diff: cc/test/occlusion_tracker_test_common.h

Issue 12603013: Part 10 of cc/ directory shuffles: layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/mock_quad_culler.h ('k') | cc/test/render_pass_test_utils.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 #ifndef CC_TEST_OCCLUSION_TRACKER_TEST_COMMON_H_ 5 #ifndef CC_TEST_OCCLUSION_TRACKER_TEST_COMMON_H_
6 #define CC_TEST_OCCLUSION_TRACKER_TEST_COMMON_H_ 6 #define CC_TEST_OCCLUSION_TRACKER_TEST_COMMON_H_
7 7
8 #include "cc/render_surface.h" 8 #include "cc/layers/render_surface.h"
9 #include "cc/render_surface_impl.h" 9 #include "cc/layers/render_surface_impl.h"
10 #include "cc/trees/occlusion_tracker.h" 10 #include "cc/trees/occlusion_tracker.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 // A subclass to expose the total current occlusion. 14 // A subclass to expose the total current occlusion.
15 template<typename LayerType, typename RenderSurfaceType> 15 template<typename LayerType, typename RenderSurfaceType>
16 class TestOcclusionTrackerBase : public cc::OcclusionTrackerBase<LayerType, Rend erSurfaceType> { 16 class TestOcclusionTrackerBase : public cc::OcclusionTrackerBase<LayerType, Rend erSurfaceType> {
17 public: 17 public:
18 TestOcclusionTrackerBase(gfx::Rect screenScissorRect, bool recordMetricsForF rame = false) 18 TestOcclusionTrackerBase(gfx::Rect screenScissorRect, bool recordMetricsForF rame = false)
19 : cc::OcclusionTrackerBase<LayerType, RenderSurfaceType>(screenScissorRe ct, recordMetricsForFrame) 19 : cc::OcclusionTrackerBase<LayerType, RenderSurfaceType>(screenScissorRe ct, recordMetricsForFrame)
20 { 20 {
21 } 21 }
22 22
23 cc::Region occlusion_from_inside_target() const { return cc::OcclusionTracke rBase<LayerType, RenderSurfaceType>::stack_.back().occlusion_from_inside_target; } 23 cc::Region occlusion_from_inside_target() const { return cc::OcclusionTracke rBase<LayerType, RenderSurfaceType>::stack_.back().occlusion_from_inside_target; }
24 cc::Region occlusion_from_outside_target() const { return cc::OcclusionTrack erBase<LayerType, RenderSurfaceType>::stack_.back().occlusion_from_outside_targe t; } 24 cc::Region occlusion_from_outside_target() const { return cc::OcclusionTrack erBase<LayerType, RenderSurfaceType>::stack_.back().occlusion_from_outside_targe t; }
25 25
26 void setOcclusionFromOutsideTarget(const cc::Region& region) { cc::Occlusion TrackerBase<LayerType, RenderSurfaceType>::stack_.back().occlusion_from_outside_ target = region; } 26 void setOcclusionFromOutsideTarget(const cc::Region& region) { cc::Occlusion TrackerBase<LayerType, RenderSurfaceType>::stack_.back().occlusion_from_outside_ target = region; }
27 void setOcclusionFromInsideTarget(const cc::Region& region) { cc::OcclusionT rackerBase<LayerType, RenderSurfaceType>::stack_.back().occlusion_from_inside_ta rget = region; } 27 void setOcclusionFromInsideTarget(const cc::Region& region) { cc::OcclusionT rackerBase<LayerType, RenderSurfaceType>::stack_.back().occlusion_from_inside_ta rget = region; }
28 }; 28 };
29 29
30 typedef TestOcclusionTrackerBase<cc::Layer, cc::RenderSurface> TestOcclusionTrac ker; 30 typedef TestOcclusionTrackerBase<cc::Layer, cc::RenderSurface> TestOcclusionTrac ker;
31 typedef TestOcclusionTrackerBase<cc::LayerImpl, cc::RenderSurfaceImpl> TestOcclu sionTrackerImpl; 31 typedef TestOcclusionTrackerBase<cc::LayerImpl, cc::RenderSurfaceImpl> TestOcclu sionTrackerImpl;
32 32
33 } // namespace cc 33 } // namespace cc
34 34
35 #endif // CC_TEST_OCCLUSION_TRACKER_TEST_COMMON_H_ 35 #endif // CC_TEST_OCCLUSION_TRACKER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/test/mock_quad_culler.h ('k') | cc/test/render_pass_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698