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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 621823003: Making scheduler run ANIMATE after a COMMIT (instead of LayerTreeHostImpl). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto master. 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 unified diff | Download patch
« no previous file with comments | « cc/scheduler/scheduler_state_machine_unittest.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
mithro-old 2014/10/15 07:18:19 These lines appear to be the cause of the hang iss
Sami 2014/10/20 09:44:04 Sorry for missing this in the review :( This is we
brianderson 2014/10/20 18:05:05 These lines really shouldn't have caused us to han
340 if (needs_animate_layers())
341 SetNeedsAnimate();
342
339 if (pending_tree_) 343 if (pending_tree_)
340 pending_tree_->ApplyScrollDeltasSinceBeginMainFrame(); 344 pending_tree_->ApplyScrollDeltasSinceBeginMainFrame();
341 sync_tree()->set_needs_update_draw_properties(); 345 sync_tree()->set_needs_update_draw_properties();
342 346
343 if (settings_.impl_side_painting) { 347 if (settings_.impl_side_painting) {
344 // Impl-side painting needs an update immediately post-commit to have the 348 // Impl-side painting needs an update immediately post-commit to have the
345 // opportunity to create tilings. Other paths can call UpdateDrawProperties 349 // opportunity to create tilings. Other paths can call UpdateDrawProperties
346 // more lazily when needed prior to drawing. 350 // more lazily when needed prior to drawing.
347 sync_tree()->UpdateDrawProperties(); 351 sync_tree()->UpdateDrawProperties();
348 // Start working on newly created tiles immediately if needed. 352 // Start working on newly created tiles immediately if needed.
(...skipping 3022 matching lines...) Expand 10 before | Expand all | Expand 10 after
3371 } 3375 }
3372 3376
3373 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3377 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3374 std::vector<PictureLayerImpl*>::iterator it = 3378 std::vector<PictureLayerImpl*>::iterator it =
3375 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3379 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3376 DCHECK(it != picture_layers_.end()); 3380 DCHECK(it != picture_layers_.end());
3377 picture_layers_.erase(it); 3381 picture_layers_.erase(it);
3378 } 3382 }
3379 3383
3380 } // namespace cc 3384 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine_unittest.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698