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

Unified Diff: cc/layers/picture_layer.cc

Issue 375923005: cc: Explicitly invalidate all dropped recordings on the main thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: invalid-resize: . Created 6 years, 5 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/layers/picture_layer.cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index 5d5457456f06642c8d173658ef15e58c9a05b841..da7a6ab8ac7392a8ef433ae8ae553b83ba529ed5 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -44,7 +44,7 @@ void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
// Update may not get called for an empty layer, so resize here instead.
// Using layer_impl because either bounds() or paint_properties().bounds
// may disagree and either one could have been pushed to layer_impl.
- pile_->SetTilingRect(gfx::Rect());
+ pile_->SetEmptyBoundsAndExpandInvalidation(&pile_invalidation_);
} else if (update_source_frame_number_ ==
layer_tree_host()->source_frame_number()) {
// TODO(ernstm): This DCHECK is only valid as long as the pile's tiling_rect
@@ -109,8 +109,6 @@ bool PictureLayer::Update(ResourceUpdateQueue* queue,
devtools_instrumentation::ScopedLayerTreeTask update_layer(
devtools_instrumentation::kUpdateLayer, id(), layer_tree_host()->id());
- pile_->SetTilingRect(layer_rect);
-
// Calling paint in WebKit can sometimes cause invalidations, so save
// off the invalidation prior to calling update.
pending_invalidation_.Swap(&pile_invalidation_);
@@ -133,6 +131,7 @@ bool PictureLayer::Update(ResourceUpdateQueue* queue,
SafeOpaqueBackgroundColor(),
contents_opaque(),
client_->FillsBoundsCompletely(),
+ layer_rect,
visible_layer_rect,
update_source_frame_number_,
RecordingMode(),

Powered by Google App Engine
This is Rietveld 408576698