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

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

Issue 497493004: cc: Stop testing occlusion by making awkward queries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unoccluded: replicaqueries Created 6 years, 4 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 | « no previous file | cc/trees/occlusion_tracker_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_TEST_OCCLUSION_TRACKER_H_ 5 #ifndef CC_TEST_TEST_OCCLUSION_TRACKER_H_
6 #define CC_TEST_TEST_OCCLUSION_TRACKER_H_ 6 #define CC_TEST_TEST_OCCLUSION_TRACKER_H_
7 7
8 #include "cc/layers/render_surface.h" 8 #include "cc/layers/render_surface.h"
9 #include "cc/layers/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"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 void set_occlusion_from_outside_target(const SimpleEnclosedRegion& region) { 47 void set_occlusion_from_outside_target(const SimpleEnclosedRegion& region) {
48 OcclusionTracker<LayerType>::stack_.back().occlusion_from_outside_target = 48 OcclusionTracker<LayerType>::stack_.back().occlusion_from_outside_target =
49 region; 49 region;
50 } 50 }
51 void set_occlusion_from_inside_target(const SimpleEnclosedRegion& region) { 51 void set_occlusion_from_inside_target(const SimpleEnclosedRegion& region) {
52 OcclusionTracker<LayerType>::stack_.back().occlusion_from_inside_target = 52 OcclusionTracker<LayerType>::stack_.back().occlusion_from_inside_target =
53 region; 53 region;
54 } 54 }
55
56 void set_occlusion_on_contributing_surface_from_outside_target(
57 const SimpleEnclosedRegion& region) {
58 size_t stack_size = OcclusionTracker<LayerType>::stack_.size();
59 DCHECK_GE(stack_size, 2u);
60 OcclusionTracker<LayerType>::stack_[stack_size - 2]
61 .occlusion_from_outside_target = region;
62 }
63 void set_occlusion_on_contributing_surface_from_inside_target(
64 const SimpleEnclosedRegion& region) {
65 size_t stack_size = OcclusionTracker<LayerType>::stack_.size();
66 DCHECK_GE(stack_size, 2u);
67 OcclusionTracker<LayerType>::stack_[stack_size - 2]
68 .occlusion_from_inside_target = region;
69 }
55 }; 70 };
56 71
57 } // namespace cc 72 } // namespace cc
58 73
59 #endif // CC_TEST_TEST_OCCLUSION_TRACKER_H_ 74 #endif // CC_TEST_TEST_OCCLUSION_TRACKER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698