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

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

Issue 1991523002: cc : Track ids for which active opacity always wins on property trees (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/proto/property_tree.proto ('k') | cc/trees/layer_tree_host_impl_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_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 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 // damage status by pushing the damage status from active tree property 1977 // damage status by pushing the damage status from active tree property
1978 // trees to pending tree property trees or by moving it onto the layers. 1978 // trees to pending tree property trees or by moving it onto the layers.
1979 if (active_tree_->property_trees()->changed) { 1979 if (active_tree_->property_trees()->changed) {
1980 if (pending_tree_->property_trees()->sequence_number == 1980 if (pending_tree_->property_trees()->sequence_number ==
1981 active_tree_->property_trees()->sequence_number) 1981 active_tree_->property_trees()->sequence_number)
1982 active_tree_->property_trees()->PushChangeTrackingTo( 1982 active_tree_->property_trees()->PushChangeTrackingTo(
1983 pending_tree_->property_trees()); 1983 pending_tree_->property_trees());
1984 else 1984 else
1985 active_tree_->MoveChangeTrackingToLayers(); 1985 active_tree_->MoveChangeTrackingToLayers();
1986 } 1986 }
1987 active_tree_->property_trees()->PushOpacityIfNeeded(
1988 pending_tree_->property_trees());
1987 1989
1988 TreeSynchronizer::PushLayerProperties(pending_tree(), active_tree()); 1990 TreeSynchronizer::PushLayerProperties(pending_tree(), active_tree());
1989 pending_tree_->PushPropertiesTo(active_tree_.get()); 1991 pending_tree_->PushPropertiesTo(active_tree_.get());
1990 if (pending_tree_->root_layer()) 1992 if (pending_tree_->root_layer())
1991 pending_tree_->property_trees()->ResetAllChangeTracking( 1993 pending_tree_->property_trees()->ResetAllChangeTracking(
1992 PropertyTrees::ResetFlags::ALL_TREES); 1994 PropertyTrees::ResetFlags::ALL_TREES);
1993 1995
1994 // Now that we've synced everything from the pending tree to the active 1996 // Now that we've synced everything from the pending tree to the active
1995 // tree, rename the pending tree the recycle tree so we can reuse it on the 1997 // tree, rename the pending tree the recycle tree so we can reuse it on the
1996 // next sync. 1998 // next sync.
(...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after
3987 return task_runner_provider_->HasImplThread(); 3989 return task_runner_provider_->HasImplThread();
3988 } 3990 }
3989 3991
3990 bool LayerTreeHostImpl::CommitToActiveTree() const { 3992 bool LayerTreeHostImpl::CommitToActiveTree() const {
3991 // In single threaded mode we skip the pending tree and commit directly to the 3993 // In single threaded mode we skip the pending tree and commit directly to the
3992 // active tree. 3994 // active tree.
3993 return !task_runner_provider_->HasImplThread(); 3995 return !task_runner_provider_->HasImplThread();
3994 } 3996 }
3995 3997
3996 } // namespace cc 3998 } // namespace cc
OLDNEW
« no previous file with comments | « cc/proto/property_tree.proto ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698