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

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

Issue 183563003: cc: Clean up OcclusionTracker template parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: occlusionparams: Created 6 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/occlusion_tracker_test_common.h ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_TEST_TEST_OCCLUSION_TRACKER_H_
6 #define CC_TEST_TEST_OCCLUSION_TRACKER_H_
7
8 #include "cc/layers/render_surface.h"
9 #include "cc/layers/render_surface_impl.h"
10 #include "cc/trees/occlusion_tracker.h"
11
12 namespace cc {
13
14 // A subclass to expose the total current occlusion.
15 template <typename LayerType>
16 class TestOcclusionTracker : public OcclusionTracker<LayerType> {
17 public:
18 TestOcclusionTracker(const gfx::Rect& screen_scissor_rect,
19 bool record_metrics_for_frame)
20 : OcclusionTracker<LayerType>(screen_scissor_rect,
21 record_metrics_for_frame) {}
22
23 Region occlusion_from_inside_target() const {
24 return OcclusionTracker<LayerType>::stack_.back()
25 .occlusion_from_inside_target;
26 }
27 Region occlusion_from_outside_target() const {
28 return OcclusionTracker<LayerType>::stack_.back()
29 .occlusion_from_outside_target;
30 }
31
32 void set_occlusion_from_outside_target(const Region& region) {
33 OcclusionTracker<LayerType>::stack_.back().occlusion_from_outside_target =
34 region;
35 }
36 void set_occlusion_from_inside_target(const Region& region) {
37 OcclusionTracker<LayerType>::stack_.back().occlusion_from_inside_target =
38 region;
39 }
40 };
41
42 } // namespace cc
43
44 #endif // CC_TEST_TEST_OCCLUSION_TRACKER_H_
OLDNEW
« no previous file with comments | « cc/test/occlusion_tracker_test_common.h ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698