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)); |