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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 678773002: cc: Always use invalidation on the pending tree when deciding to share (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: getpendinginvalidation: . Created 6 years, 2 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
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | 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 e51821fbc92a7d2b8f13536998b41210f141003d..2dc0724c9e8fbd368dc85c94fb7f07ccf0e98fa3 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -632,8 +632,13 @@ PicturePileImpl* PictureLayerImpl::GetPile() {
return pile_.get();
}
-const Region* PictureLayerImpl::GetInvalidation() {
- return &invalidation_;
+const Region* PictureLayerImpl::GetPendingInvalidation() {
+ if (layer_tree_impl()->IsPendingTree())
+ return &invalidation_;
+ DCHECK(layer_tree_impl()->IsActiveTree());
+ if (PictureLayerImpl* twin_layer = GetTwinLayer())
+ return &twin_layer->invalidation_;
+ return nullptr;
}
const PictureLayerTiling* PictureLayerImpl::GetTwinTiling(
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698