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

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

Issue 2090793002: cc: Fix property tree animation sync bug (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "TransformOperations" Created 4 years, 5 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 | « no previous file | cc/trees/layer_tree_host_unittest_animation.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.h" 5 #include "cc/trees/layer_tree_host.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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 516
517 DCHECK(!sync_tree->ViewportSizeInvalid()); 517 DCHECK(!sync_tree->ViewportSizeInvalid());
518 518
519 sync_tree->set_has_ever_been_drawn(false); 519 sync_tree->set_has_ever_been_drawn(false);
520 520
521 { 521 {
522 TRACE_EVENT0("cc", "LayerTreeHost::PushProperties"); 522 TRACE_EVENT0("cc", "LayerTreeHost::PushProperties");
523 523
524 TreeSynchronizer::PushLayerProperties(this, sync_tree); 524 TreeSynchronizer::PushLayerProperties(this, sync_tree);
525 525
526 // This must happen after synchronizing property trees and after push
527 // properties, which updates property tree indices, but before animation
528 // host pushes properties as animation host push properties can change
529 // Animation::InEffect and we want the old InEffect value for updating
530 // property tree scrolling and animation.
531 sync_tree->UpdatePropertyTreeScrollingAndAnimationFromMainThread();
532
526 TRACE_EVENT0("cc", "LayerTreeHost::AnimationHost::PushProperties"); 533 TRACE_EVENT0("cc", "LayerTreeHost::AnimationHost::PushProperties");
527 DCHECK(host_impl->animation_host()); 534 DCHECK(host_impl->animation_host());
528 animation_host_->PushPropertiesTo(host_impl->animation_host()); 535 animation_host_->PushPropertiesTo(host_impl->animation_host());
529 } 536 }
530 537
531 // This must happen after synchronizing property trees and after push
532 // properties, which updates property tree indices.
533 sync_tree->UpdatePropertyTreeScrollingAndAnimationFromMainThread();
534
535 // This must happen after synchronizing property trees and after pushing 538 // This must happen after synchronizing property trees and after pushing
536 // properties, which updates the clobber_active_value flag. 539 // properties, which updates the clobber_active_value flag.
537 sync_tree->UpdatePropertyTreeScrollOffset(&property_trees_); 540 sync_tree->UpdatePropertyTreeScrollOffset(&property_trees_);
538 541
539 micro_benchmark_controller_.ScheduleImplBenchmarks(host_impl); 542 micro_benchmark_controller_.ScheduleImplBenchmarks(host_impl);
540 property_trees_.ResetAllChangeTracking(); 543 property_trees_.ResetAllChangeTracking();
541 } 544 }
542 545
543 void LayerTreeHost::WillCommit() { 546 void LayerTreeHost::WillCommit() {
544 OnCommitForSwapPromises(); 547 OnCommitForSwapPromises();
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 int seq_num = property_trees_.sequence_number; 1684 int seq_num = property_trees_.sequence_number;
1682 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { 1685 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) {
1683 layer->set_property_tree_sequence_number(seq_num); 1686 layer->set_property_tree_sequence_number(seq_num);
1684 }); 1687 });
1685 1688
1686 surface_id_namespace_ = proto.surface_id_namespace(); 1689 surface_id_namespace_ = proto.surface_id_namespace();
1687 next_surface_sequence_ = proto.next_surface_sequence(); 1690 next_surface_sequence_ = proto.next_surface_sequence();
1688 } 1691 }
1689 1692
1690 } // namespace cc 1693 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698