| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 void LayerTreeHostImpl::BeginCommit() { | 329 void LayerTreeHostImpl::BeginCommit() { |
| 330 TRACE_EVENT0("cc", "LayerTreeHostImpl::BeginCommit"); | 330 TRACE_EVENT0("cc", "LayerTreeHostImpl::BeginCommit"); |
| 331 | 331 |
| 332 if (UsePendingTreeForSync()) | 332 if (UsePendingTreeForSync()) |
| 333 CreatePendingTree(); | 333 CreatePendingTree(); |
| 334 } | 334 } |
| 335 | 335 |
| 336 void LayerTreeHostImpl::CommitComplete() { | 336 void LayerTreeHostImpl::CommitComplete() { |
| 337 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete"); | 337 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete"); |
| 338 | 338 |
| 339 // Ask to be animated if there are animations | |
| 340 if (needs_animate_layers()) | |
| 341 SetNeedsAnimate(); | |
| 342 | |
| 343 if (pending_tree_) | 339 if (pending_tree_) |
| 344 pending_tree_->ApplyScrollDeltasSinceBeginMainFrame(); | 340 pending_tree_->ApplyScrollDeltasSinceBeginMainFrame(); |
| 345 sync_tree()->set_needs_update_draw_properties(); | 341 sync_tree()->set_needs_update_draw_properties(); |
| 346 | 342 |
| 347 if (settings_.impl_side_painting) { | 343 if (settings_.impl_side_painting) { |
| 348 // Impl-side painting needs an update immediately post-commit to have the | 344 // Impl-side painting needs an update immediately post-commit to have the |
| 349 // opportunity to create tilings. Other paths can call UpdateDrawProperties | 345 // opportunity to create tilings. Other paths can call UpdateDrawProperties |
| 350 // more lazily when needed prior to drawing. | 346 // more lazily when needed prior to drawing. |
| 351 sync_tree()->UpdateDrawProperties(); | 347 sync_tree()->UpdateDrawProperties(); |
| 352 // Start working on newly created tiles immediately if needed. | 348 // Start working on newly created tiles immediately if needed. |
| (...skipping 3022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3375 } | 3371 } |
| 3376 | 3372 |
| 3377 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3373 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3378 std::vector<PictureLayerImpl*>::iterator it = | 3374 std::vector<PictureLayerImpl*>::iterator it = |
| 3379 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3375 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3380 DCHECK(it != picture_layers_.end()); | 3376 DCHECK(it != picture_layers_.end()); |
| 3381 picture_layers_.erase(it); | 3377 picture_layers_.erase(it); |
| 3382 } | 3378 } |
| 3383 | 3379 |
| 3384 } // namespace cc | 3380 } // namespace cc |
| OLD | NEW |