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

Unified Diff: trunk/src/cc/layers/layer.cc

Issue 23702010: Revert 220418 "cc: Block commit on activate by setting a flag on..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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 | « trunk/src/cc/layers/layer.h ('k') | trunk/src/cc/layers/texture_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/layers/layer.cc
===================================================================
--- trunk/src/cc/layers/layer.cc (revision 220454)
+++ trunk/src/cc/layers/layer.cc (working copy)
@@ -152,11 +152,14 @@
layer_tree_host_->SetNeedsFullTreeSync();
}
-void Layer::SetNextCommitWaitsForActivation() {
+bool Layer::IsPropertyChangeAllowed() const {
if (!layer_tree_host_)
- return;
+ return true;
- layer_tree_host_->SetNextCommitWaitsForActivation();
+ if (!layer_tree_host_->settings().strict_layer_property_change_checking)
+ return true;
+
+ return !layer_tree_host_->in_paint_layer_contents();
}
void Layer::SetNeedsPushProperties() {
@@ -184,16 +187,6 @@
parent_->RemoveDependentNeedsPushProperties();
}
-bool Layer::IsPropertyChangeAllowed() const {
- if (!layer_tree_host_)
- return true;
-
- if (!layer_tree_host_->settings().strict_layer_property_change_checking)
- return true;
-
- return !layer_tree_host_->in_paint_layer_contents();
-}
-
gfx::Rect Layer::LayerRectToContentRect(const gfx::RectF& layer_rect) const {
gfx::RectF content_rect =
gfx::ScaleRect(layer_rect, contents_scale_x(), contents_scale_y());
@@ -203,6 +196,10 @@
return gfx::ToEnclosingRect(content_rect);
}
+bool Layer::BlocksPendingCommit() const {
+ return false;
+}
+
skia::RefPtr<SkPicture> Layer::GetPicture() const {
return skia::RefPtr<SkPicture>();
}
@@ -211,6 +208,20 @@
return false;
}
+bool Layer::BlocksPendingCommitRecursive() const {
+ if (BlocksPendingCommit())
+ return true;
+ if (mask_layer() && mask_layer()->BlocksPendingCommitRecursive())
+ return true;
+ if (replica_layer() && replica_layer()->BlocksPendingCommitRecursive())
+ return true;
+ for (size_t i = 0; i < children_.size(); ++i) {
+ if (children_[i]->BlocksPendingCommitRecursive())
+ return true;
+ }
+ return false;
+}
+
void Layer::SetParent(Layer* layer) {
DCHECK(!layer || !layer->HasAncestor(this));
« no previous file with comments | « trunk/src/cc/layers/layer.h ('k') | trunk/src/cc/layers/texture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698