| 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/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // |draw_transform| and |impl_draw_transform_is_unknown| are relative to that. | 55 // |draw_transform| and |impl_draw_transform_is_unknown| are relative to that. |
| 56 gfx::Rect UnoccludedContentRect(const LayerType* render_target, | 56 gfx::Rect UnoccludedContentRect(const LayerType* render_target, |
| 57 const gfx::Rect& content_rect, | 57 const gfx::Rect& content_rect, |
| 58 const gfx::Transform& draw_transform) const; | 58 const gfx::Transform& draw_transform) const; |
| 59 | 59 |
| 60 // Gives an unoccluded sub-rect of |content_rect| in the content space of the | 60 // Gives an unoccluded sub-rect of |content_rect| in the content space of the |
| 61 // render_target owned by the layer. Used when considering occlusion for a | 61 // render_target owned by the layer. Used when considering occlusion for a |
| 62 // contributing surface that is rendering into another target. | 62 // contributing surface that is rendering into another target. |
| 63 gfx::Rect UnoccludedContributingSurfaceContentRect( | 63 gfx::Rect UnoccludedContributingSurfaceContentRect( |
| 64 const LayerType* layer, | 64 const LayerType* layer, |
| 65 bool for_replica, | 65 const gfx::Rect& content_rect, |
| 66 const gfx::Rect& content_rect) const; | 66 const gfx::Transform& draw_transform) const; |
| 67 | 67 |
| 68 // Gives the region of the screen that is not occluded by something opaque. | 68 // Gives the region of the screen that is not occluded by something opaque. |
| 69 Region ComputeVisibleRegionInScreen() const { | 69 Region ComputeVisibleRegionInScreen() const { |
| 70 DCHECK(!stack_.back().target->parent()); | 70 DCHECK(!stack_.back().target->parent()); |
| 71 return SubtractRegions(screen_space_clip_rect_, | 71 return SubtractRegions(screen_space_clip_rect_, |
| 72 stack_.back().occlusion_from_inside_target); | 72 stack_.back().occlusion_from_inside_target); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void set_minimum_tracking_size(const gfx::Size& size) { | 75 void set_minimum_tracking_size(const gfx::Size& size) { |
| 76 minimum_tracking_size_ = size; | 76 minimum_tracking_size_ = size; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 #if !defined(COMPILER_MSVC) | 144 #if !defined(COMPILER_MSVC) |
| 145 extern template class OcclusionTracker<Layer>; | 145 extern template class OcclusionTracker<Layer>; |
| 146 extern template class OcclusionTracker<LayerImpl>; | 146 extern template class OcclusionTracker<LayerImpl>; |
| 147 #endif | 147 #endif |
| 148 | 148 |
| 149 } // namespace cc | 149 } // namespace cc |
| 150 | 150 |
| 151 #endif // CC_TREES_OCCLUSION_TRACKER_H_ | 151 #endif // CC_TREES_OCCLUSION_TRACKER_H_ |
| OLD | NEW |