Chromium Code Reviews| Index: cc/trees/occlusion_tracker.h |
| diff --git a/cc/trees/occlusion_tracker.h b/cc/trees/occlusion_tracker.h |
| index 132b3fa3160c8430d3dc2dbdb789d3d8f66206f1..8e4be077a50393a4b2d68e24e5d380142c3decc6 100644 |
| --- a/cc/trees/occlusion_tracker.h |
| +++ b/cc/trees/occlusion_tracker.h |
| @@ -32,8 +32,7 @@ class RenderSurface; |
| template <typename LayerType, typename RenderSurfaceType> |
| class CC_EXPORT OcclusionTrackerBase { |
| public: |
| - OcclusionTrackerBase(gfx::Rect screen_space_clip_rect, |
| - bool record_metrics_for_frame); |
| + explicit OcclusionTrackerBase(bool record_metrics_for_frame); |
| ~OcclusionTrackerBase(); |
| // Called at the beginning of each step in the LayerIterator's front-to-back |
| @@ -48,28 +47,22 @@ class CC_EXPORT OcclusionTrackerBase { |
| // Returns true if the given rect in content space for a layer is fully |
| // occluded in either screen space or the layer's target surface. |
| // |render_target| is the contributing layer's render target, and |
| - // |draw_transform|, |transformsToTargetKnown| and |clippedRectInTarget| are |
| - // relative to that. |
| + // |draw_transform| is relative to that. |
|
danakj
2013/09/10 14:36:37
and |impl_draw_transform_is_known|
|
| bool Occluded(const LayerType* render_target, |
| gfx::Rect content_rect, |
| const gfx::Transform& draw_transform, |
| bool impl_draw_transform_is_unknown, |
| - bool is_clipped, |
| - gfx::Rect clip_rect_in_target, |
| bool* has_occlusion_from_outside_target_surface) const; |
| // Gives an unoccluded sub-rect of |content_rect| in the content space of a |
| // layer. Used when considering occlusion for a layer that paints/draws |
| // something. |render_target| is the contributing layer's render target, and |
| - // |draw_transform|, |transformsToTargetKnown| and |clippedRectInTarget| are |
| - // relative to that. |
| + // |draw_transform| is relative to that. |
|
danakj
2013/09/10 14:36:37
and |impl_draw_t_i_known|
|
| gfx::Rect UnoccludedContentRect( |
| const LayerType* render_target, |
| gfx::Rect content_rect, |
| const gfx::Transform& draw_transform, |
| bool impl_draw_transform_is_unknown, |
| - bool is_clipped, |
| - gfx::Rect clip_rect_in_target, |
| bool* has_occlusion_from_outside_target_surface) const; |
| // Gives an unoccluded sub-rect of |content_rect| in the content space of the |
| @@ -87,9 +80,9 @@ class CC_EXPORT OcclusionTrackerBase { |
| } |
| // Gives the region of the screen that is not occluded by something opaque. |
| - Region ComputeVisibleRegionInScreen() const { |
| + Region ComputeVisibleRegionInScreen(gfx::Rect screen_space_clip_rect) const { |
| DCHECK(!stack_.back().target->parent()); |
| - return SubtractRegions(screen_space_clip_rect_, |
| + return SubtractRegions(screen_space_clip_rect, |
| stack_.back().occlusion_from_inside_target); |
| } |
| @@ -152,7 +145,6 @@ class CC_EXPORT OcclusionTrackerBase { |
| // Add the layer's occlusion to the tracked state. |
| void MarkOccludedBehindLayer(const LayerType* layer); |
| - gfx::Rect screen_space_clip_rect_; |
| scoped_ptr<class OverdrawMetrics> overdraw_metrics_; |
| gfx::Size minimum_tracking_size_; |
| bool prevent_occlusion_; |