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

Unified Diff: cc/trees/occlusion_tracker.h

Issue 23708021: Do not clip inside OcclusionTracker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added DCHECK Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
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/16 17:29:08 draw_transform and impl_draw_transform_is_unknown
alokp 2013/09/17 00:31:41 Done.
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/16 17:29:08 draw_transform and impl_draw_transform_is_unknown
alokp 2013/09/17 00:31:41 Done.
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_;

Powered by Google App Engine
This is Rietveld 408576698