From 350219ee4e5d02ca86f2f898172411f7da3d6902 Mon Sep 17 00:00:00 2001 From: daplatz Date: Wed, 4 Mar 2015 11:04:41 -0800 Subject: Draw correct repaint regions instead of a conservative bounding box Previously, the update_rect() of the LayerImpl was used for the repaint regions in the DebugRectHistory; now the base LayerImpl class defines a virtual method giving back an invalidation Region that is overwritten by PictureLayerImpl to use the already existent invalidations_ Region. Regions give a more tighter bound on the invalidations than the single conservative rect that was used before on a per-layer basis. BUG=424682 Review URL: https://codereview.chromium.org/958843004 Cr-Commit-Position: refs/heads/master@{#319094} --- cc/layers/layer_impl.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cc/layers/layer_impl.cc') diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc index 0c6ddf5..0353a78 100644 --- a/cc/layers/layer_impl.cc +++ b/cc/layers/layer_impl.cc @@ -1590,4 +1590,8 @@ void LayerImpl::SetHasRenderSurface(bool should_have_render_surface) { render_surface_.reset(); } +Region LayerImpl::GetInvalidationRegion() { + return Region(update_rect_); +} + } // namespace cc -- cgit v1.1