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

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

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: minor fix 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
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_impl.h » ('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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 if (compositor_frame_sink_) 334 if (compositor_frame_sink_)
335 compositor_frame_sink_->ForceReclaimResources(); 335 compositor_frame_sink_->ForceReclaimResources();
336 336
337 if (!CommitToActiveTree()) 337 if (!CommitToActiveTree())
338 CreatePendingTree(); 338 CreatePendingTree();
339 } 339 }
340 340
341 void LayerTreeHostImpl::CommitComplete() { 341 void LayerTreeHostImpl::CommitComplete() {
342 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete"); 342 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete");
343 343
344 // If the state was committed to the pending tree, apply any reflected deltas
danakj 2016/10/25 22:14:43 sync tree
Khushal 2016/10/26 01:03:29 Done.
345 // that were not applied on the main thread.
danakj 2016/10/25 22:14:43 applied during the main frame
Khushal 2016/10/26 01:03:29 Done.
346 if (pending_tree())
347 pending_tree()->ApplyReflectedMainFrameState();
danakj 2016/10/25 22:14:43 Shouldn't it do this on the sync tree always?
Khushal 2016/10/25 22:44:33 Hmmm, if I copy to the pending base here, I don't
danakj 2016/10/25 23:55:55 That sounds ok I think. If this sounds like comple
Khushal 2016/10/26 01:03:29 Its not that complex to do, but we won't use it. S
348
344 if (CommitToActiveTree()) { 349 if (CommitToActiveTree()) {
345 // We have to activate animations here or "IsActive()" is true on the layers 350 // We have to activate animations here or "IsActive()" is true on the layers
346 // but the animations aren't activated yet so they get ignored by 351 // but the animations aren't activated yet so they get ignored by
347 // UpdateDrawProperties. 352 // UpdateDrawProperties.
348 ActivateAnimations(); 353 ActivateAnimations();
349 } 354 }
350 355
351 // Start animations before UpdateDrawProperties and PrepareTiles, as they can 356 // Start animations before UpdateDrawProperties and PrepareTiles, as they can
352 // change the results. When doing commit to the active tree, this must happen 357 // change the results. When doing commit to the active tree, this must happen
353 // after ActivateAnimations() in order for this ticking to be propogated to 358 // after ActivateAnimations() in order for this ticking to be propogated to
(...skipping 3748 matching lines...) Expand 10 before | Expand all | Expand 10 after
4102 if (is_visible) { 4107 if (is_visible) {
4103 worker_context_visibility_ = 4108 worker_context_visibility_ =
4104 worker_context->CacheController()->ClientBecameVisible(); 4109 worker_context->CacheController()->ClientBecameVisible();
4105 } else { 4110 } else {
4106 worker_context->CacheController()->ClientBecameNotVisible( 4111 worker_context->CacheController()->ClientBecameNotVisible(
4107 std::move(worker_context_visibility_)); 4112 std::move(worker_context_visibility_));
4108 } 4113 }
4109 } 4114 }
4110 4115
4111 } // namespace cc 4116 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698