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

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

Issue 11474050: cc: Unify namespaces for all test files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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.cc ('k') | cc/test/paths.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 #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/occlusion_tracker.h" 8 #include "cc/occlusion_tracker.h"
9 #include "cc/render_surface.h" 9 #include "cc/render_surface.h"
10 #include "cc/render_surface_impl.h" 10 #include "cc/render_surface_impl.h"
11 11
12 namespace WebKitTests { 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 occlusionInScreenSpace() const { return cc::OcclusionTrackerBase< LayerType, RenderSurfaceType>::m_stack.back().occlusionInScreen; } 23 cc::Region occlusionInScreenSpace() const { return cc::OcclusionTrackerBase< LayerType, RenderSurfaceType>::m_stack.back().occlusionInScreen; }
24 cc::Region occlusionInTargetSurface() const { return cc::OcclusionTrackerBas e<LayerType, RenderSurfaceType>::m_stack.back().occlusionInTarget; } 24 cc::Region occlusionInTargetSurface() const { return cc::OcclusionTrackerBas e<LayerType, RenderSurfaceType>::m_stack.back().occlusionInTarget; }
25 25
26 void setOcclusionInScreenSpace(const cc::Region& region) { cc::OcclusionTrac kerBase<LayerType, RenderSurfaceType>::m_stack.back().occlusionInScreen = region ; } 26 void setOcclusionInScreenSpace(const cc::Region& region) { cc::OcclusionTrac kerBase<LayerType, RenderSurfaceType>::m_stack.back().occlusionInScreen = region ; }
27 void setOcclusionInTargetSurface(const cc::Region& region) { cc::OcclusionTr ackerBase<LayerType, RenderSurfaceType>::m_stack.back().occlusionInTarget = regi on; } 27 void setOcclusionInTargetSurface(const cc::Region& region) { cc::OcclusionTr ackerBase<LayerType, RenderSurfaceType>::m_stack.back().occlusionInTarget = regi on; }
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 } 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.cc ('k') | cc/test/paths.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698