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

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

Issue 1979413002: cc : Rebuild property trees when opacity changes only if its required. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/layers/layer.cc ('k') | cc/trees/layer_tree_host_common_unittest.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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 529
530 // This must happen after synchronizing property trees and after push 530 // This must happen after synchronizing property trees and after push
531 // properties, which updates property tree indices. 531 // properties, which updates property tree indices.
532 sync_tree->UpdatePropertyTreeScrollingAndAnimationFromMainThread(); 532 sync_tree->UpdatePropertyTreeScrollingAndAnimationFromMainThread();
533 533
534 // This must happen after synchronizing property trees and after pushing 534 // This must happen after synchronizing property trees and after pushing
535 // properties, which updates the clobber_active_value flag. 535 // properties, which updates the clobber_active_value flag.
536 sync_tree->UpdatePropertyTreeScrollOffset(&property_trees_); 536 sync_tree->UpdatePropertyTreeScrollOffset(&property_trees_);
537 537
538 micro_benchmark_controller_.ScheduleImplBenchmarks(host_impl); 538 micro_benchmark_controller_.ScheduleImplBenchmarks(host_impl);
539 // We don't track changes to effect tree on main thread. But, to preserve any 539 property_trees_.ResetAllChangeTracking(PropertyTrees::ResetFlags::ALL_TREES);
540 // change tracking done on active tree's effect tree, we copy it to the main
541 // thread's effect tree before we push the main thread property trees to
542 // active tree.
543 if (property_trees_changed_on_active_tree)
544 property_trees_.ResetAllChangeTracking(
545 PropertyTrees::ResetFlags::ALL_TREES);
546 else
547 property_trees_.ResetAllChangeTracking(
548 PropertyTrees::ResetFlags::TRANSFORM_TREE);
jaydasika 2016/05/17 01:40:01 TRANSFORM_TREE flag is used only here outside test
549 } 540 }
550 541
551 void LayerTreeHost::WillCommit() { 542 void LayerTreeHost::WillCommit() {
552 OnCommitForSwapPromises(); 543 OnCommitForSwapPromises();
553 client_->WillCommit(); 544 client_->WillCommit();
554 } 545 }
555 546
556 void LayerTreeHost::UpdateHudLayer() { 547 void LayerTreeHost::UpdateHudLayer() {
557 if (debug_state_.ShowHudInfo()) { 548 if (debug_state_.ShowHudInfo()) {
558 if (!hud_layer_.get()) { 549 if (!hud_layer_.get()) {
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 int seq_num = property_trees_.sequence_number; 1651 int seq_num = property_trees_.sequence_number;
1661 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { 1652 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) {
1662 layer->set_property_tree_sequence_number(seq_num); 1653 layer->set_property_tree_sequence_number(seq_num);
1663 }); 1654 });
1664 1655
1665 surface_id_namespace_ = proto.surface_id_namespace(); 1656 surface_id_namespace_ = proto.surface_id_namespace();
1666 next_surface_sequence_ = proto.next_surface_sequence(); 1657 next_surface_sequence_ = proto.next_surface_sequence();
1667 } 1658 }
1668 1659
1669 } // namespace cc 1660 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698