Chromium Code Reviews| 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) { |