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

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

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: Addressed comments Created 4 years, 1 month 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
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 if (compositor_frame_sink_) 331 if (compositor_frame_sink_)
332 compositor_frame_sink_->ForceReclaimResources(); 332 compositor_frame_sink_->ForceReclaimResources();
333 333
334 if (!CommitToActiveTree()) 334 if (!CommitToActiveTree())
335 CreatePendingTree(); 335 CreatePendingTree();
336 } 336 }
337 337
338 void LayerTreeHostImpl::CommitComplete() { 338 void LayerTreeHostImpl::CommitComplete() {
339 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete"); 339 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete");
340 340
341 // Apply any reflected deltas that were not applied during the main frame, if
342 // we use a pending tree.
343 if (!CommitToActiveTree())
aelias_OOO_until_Jul13 2016/10/26 04:04:12 Can you DCHECK(!CommitToActiveTree()) inside the i
Khushal 2016/10/26 19:02:35 I just DCHECKed !IsActiveTree() in that if block i
344 sync_tree()->ApplyReflectedMainFrameState();
345
341 if (CommitToActiveTree()) { 346 if (CommitToActiveTree()) {
342 // We have to activate animations here or "IsActive()" is true on the layers 347 // We have to activate animations here or "IsActive()" is true on the layers
343 // but the animations aren't activated yet so they get ignored by 348 // but the animations aren't activated yet so they get ignored by
344 // UpdateDrawProperties. 349 // UpdateDrawProperties.
345 ActivateAnimations(); 350 ActivateAnimations();
346 } 351 }
347 352
348 // Start animations before UpdateDrawProperties and PrepareTiles, as they can 353 // Start animations before UpdateDrawProperties and PrepareTiles, as they can
349 // change the results. When doing commit to the active tree, this must happen 354 // change the results. When doing commit to the active tree, this must happen
350 // after ActivateAnimations() in order for this ticking to be propogated to 355 // after ActivateAnimations() in order for this ticking to be propogated to
(...skipping 3733 matching lines...) Expand 10 before | Expand all | Expand 10 after
4084 if (is_visible) { 4089 if (is_visible) {
4085 worker_context_visibility_ = 4090 worker_context_visibility_ =
4086 worker_context->CacheController()->ClientBecameVisible(); 4091 worker_context->CacheController()->ClientBecameVisible();
4087 } else { 4092 } else {
4088 worker_context->CacheController()->ClientBecameNotVisible( 4093 worker_context->CacheController()->ClientBecameNotVisible(
4089 std::move(worker_context_visibility_)); 4094 std::move(worker_context_visibility_));
4090 } 4095 }
4091 } 4096 }
4092 4097
4093 } // namespace cc 4098 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698