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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 958843004: Fix for 424682: Draw correct repaint regions instead of a conservative bounding box (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated PictureLayerImpl::GetInvalidationRegion to calculate intersection of invalidation_ and upda… Created 5 years, 10 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
« cc/debug/debug_rect_history.cc ('K') | « cc/layers/picture_layer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index e819afd860d412784301915fe1fcbd7ac857aa67..47cf03548870d8b01b8d2b9c865a08e5a877be7a 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -605,6 +605,20 @@ skia::RefPtr<SkPicture> PictureLayerImpl::GetPicture() {
return raster_source_->GetFlattenedPicture();
}
+Region PictureLayerImpl::GetInvalidationRegion() {
+ // PictureLayerImpl::invalidation_ is not cleared in the same was as
danakj 2015/03/02 20:10:53 I think I'd reword this a bit.. "truth" is subject
+ // LayerImpl::update_rect_ is and thus might not give the true state of the
+ // current invalidations at all time.
+ // Ideally, update_rect_ of LayerImpl would be replaced completely by
+ // invalidation_ region as it give thighter bounds but this might be
+ // to much overhead based on where update_rect_ is used today.
+ // That's why we intersect invalidation_ with the update_rect to get the
+ // true invalidations of the present frame.
+ Region current_invalidation(invalidation_);
danakj 2015/03/02 20:10:53 you can do this whole thing as return IntersectRe
daplatz 2015/03/02 20:28:02 Acknowledged.
+ current_invalidation.Intersect(update_rect());
+ return current_invalidation;
+}
+
scoped_refptr<Tile> PictureLayerImpl::CreateTile(
float contents_scale,
const gfx::Rect& content_rect) {
« cc/debug/debug_rect_history.cc ('K') | « cc/layers/picture_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698