OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |