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..76b9c0a2380bd4f6287dd863677cbb2186b41bf0 100644 |
--- a/cc/layers/picture_layer_impl.cc |
+++ b/cc/layers/picture_layer_impl.cc |
@@ -605,6 +605,15 @@ skia::RefPtr<SkPicture> PictureLayerImpl::GetPicture() { |
return raster_source_->GetFlattenedPicture(); |
} |
+Region PictureLayerImpl::GetInvalidationRegion() { |
+ // |invalidation_| gives the invalidation contained in the source frame, but |
+ // is not cleared after drawing from the layer. However, update_rect() is |
+ // cleared once the invalidation is drawn, which is useful for debugging |
+ // visualizations. This method intersects the two to give a more exact |
+ // representation of what was invalidated that is cleared after drawing. |
+ return IntersectRegions(invalidation_, update_rect()); |
+} |
+ |
scoped_refptr<Tile> PictureLayerImpl::CreateTile( |
float contents_scale, |
const gfx::Rect& content_rect) { |