| OLD | NEW |
| 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_TREES_OCCLUSION_TRACKER_H_ | 5 #ifndef CC_TREES_OCCLUSION_TRACKER_H_ |
| 6 #define CC_TREES_OCCLUSION_TRACKER_H_ | 6 #define CC_TREES_OCCLUSION_TRACKER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 explicit OcclusionTracker(const gfx::Rect& screen_space_clip_rect); | 33 explicit OcclusionTracker(const gfx::Rect& screen_space_clip_rect); |
| 34 ~OcclusionTracker(); | 34 ~OcclusionTracker(); |
| 35 | 35 |
| 36 // Return an occlusion that retains the current state of the tracker | 36 // Return an occlusion that retains the current state of the tracker |
| 37 // and can be used outside of a layer walk to check occlusion. | 37 // and can be used outside of a layer walk to check occlusion. |
| 38 Occlusion GetCurrentOcclusionForLayer( | 38 Occlusion GetCurrentOcclusionForLayer( |
| 39 const gfx::Transform& draw_transform) const; | 39 const gfx::Transform& draw_transform) const; |
| 40 Occlusion GetCurrentOcclusionForContributingSurface( | 40 Occlusion GetCurrentOcclusionForContributingSurface( |
| 41 const gfx::Transform& draw_transform) const; | 41 const gfx::Transform& draw_transform) const; |
| 42 | 42 |
| 43 const RenderSurfaceImpl* OcclusionSurfaceForContributingSurface() const; |
| 43 // Called at the beginning of each step in the LayerIterator's front-to-back | 44 // Called at the beginning of each step in the LayerIterator's front-to-back |
| 44 // traversal. | 45 // traversal. |
| 45 void EnterLayer(const LayerIteratorPosition& layer_iterator); | 46 void EnterLayer(const LayerIteratorPosition& layer_iterator); |
| 46 // Called at the end of each step in the LayerIterator's front-to-back | 47 // Called at the end of each step in the LayerIterator's front-to-back |
| 47 // traversal. | 48 // traversal. |
| 48 void LeaveLayer(const LayerIteratorPosition& layer_iterator); | 49 void LeaveLayer(const LayerIteratorPosition& layer_iterator); |
| 49 | 50 |
| 50 // Gives the region of the screen that is not occluded by something opaque. | 51 // Gives the region of the screen that is not occluded by something opaque. |
| 51 Region ComputeVisibleRegionInScreen(const LayerTreeImpl* layer_tree) const; | 52 Region ComputeVisibleRegionInScreen(const LayerTreeImpl* layer_tree) const; |
| 52 | 53 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 102 |
| 102 gfx::Rect screen_space_clip_rect_; | 103 gfx::Rect screen_space_clip_rect_; |
| 103 gfx::Size minimum_tracking_size_; | 104 gfx::Size minimum_tracking_size_; |
| 104 | 105 |
| 105 DISALLOW_COPY_AND_ASSIGN(OcclusionTracker); | 106 DISALLOW_COPY_AND_ASSIGN(OcclusionTracker); |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 } // namespace cc | 109 } // namespace cc |
| 109 | 110 |
| 110 #endif // CC_TREES_OCCLUSION_TRACKER_H_ | 111 #endif // CC_TREES_OCCLUSION_TRACKER_H_ |
| OLD | NEW |