| Index: cc/layers/layer.cc
|
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
|
| index ed979a9a41301c26e18e9373a25bb9bf1e02a269..694813982b01c8759604e089d953920f1e2dfc87 100644
|
| --- a/cc/layers/layer.cc
|
| +++ b/cc/layers/layer.cc
|
| @@ -115,6 +115,11 @@ void Layer::SetLayerTreeHost(LayerTreeHost* host) {
|
| layer_tree_host_->set_needs_filter_context();
|
| }
|
|
|
| +void Layer::SetNeedsUpdate() {
|
| + if (layer_tree_host_)
|
| + layer_tree_host_->SetNeedsUpdateLayers();
|
| +}
|
| +
|
| void Layer::SetNeedsCommit() {
|
| if (ignore_set_needs_commit_)
|
| return;
|
| @@ -517,6 +522,8 @@ void Layer::SetScrollOffset(gfx::Vector2d scroll_offset) {
|
|
|
| void Layer::SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset) {
|
| DCHECK(IsPropertyChangeAllowed());
|
| + // This function only gets called during a begin frame, so there
|
| + // is no need to call SetNeedsUpdate here.
|
| DCHECK(layer_tree_host_ && layer_tree_host_->CommitRequested());
|
| if (scroll_offset_ == scroll_offset)
|
| return;
|
| @@ -620,11 +627,8 @@ void Layer::SetNeedsDisplayRect(const gfx::RectF& dirty_rect) {
|
| update_rect_.Union(dirty_rect);
|
| needs_display_ = true;
|
|
|
| - // Simply mark the contents as dirty. For non-root layers, the call to
|
| - // SetNeedsCommit will schedule a fresh compositing pass.
|
| - // For the root layer, SetNeedsCommit has no effect.
|
| if (DrawsContent() && !update_rect_.IsEmpty())
|
| - SetNeedsCommit();
|
| + SetNeedsUpdate();
|
| }
|
|
|
| bool Layer::DescendantIsFixedToContainerLayer() const {
|
|
|