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

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

Issue 1841783003: Update property trees' bounds delta before updating viewport container sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved UpdateViewportContainerSizes instead Created 4 years, 8 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_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 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 if (pending_tree_->root_layer()) 1979 if (pending_tree_->root_layer())
1980 pending_tree_->property_trees()->ResetAllChangeTracking( 1980 pending_tree_->property_trees()->ResetAllChangeTracking(
1981 PropertyTrees::ResetFlags::ALL_TREES); 1981 PropertyTrees::ResetFlags::ALL_TREES);
1982 1982
1983 // Now that we've synced everything from the pending tree to the active 1983 // Now that we've synced everything from the pending tree to the active
1984 // tree, rename the pending tree the recycle tree so we can reuse it on the 1984 // tree, rename the pending tree the recycle tree so we can reuse it on the
1985 // next sync. 1985 // next sync.
1986 DCHECK(!recycle_tree_); 1986 DCHECK(!recycle_tree_);
1987 pending_tree_.swap(recycle_tree_); 1987 pending_tree_.swap(recycle_tree_);
1988 1988
1989 UpdateViewportContainerSizes();
1990
1991 // If we commit to the active tree directly, this is already done during 1989 // If we commit to the active tree directly, this is already done during
1992 // commit. 1990 // commit.
1993 ActivateAnimations(); 1991 ActivateAnimations();
1994 } else { 1992 } else {
1995 active_tree_->ProcessUIResourceRequestQueue(); 1993 active_tree_->ProcessUIResourceRequestQueue();
1996 } 1994 }
1997 1995
1998 // bounds_delta isn't a pushed property, so the newly-pushed property tree 1996 // bounds_delta isn't a pushed property, so the newly-pushed property tree
1999 // won't already account for current bounds_delta values. 1997 // won't already account for current bounds_delta values. This needs to
1998 // happen before calling UpdateViewportContainerSizes().
2000 active_tree_->UpdatePropertyTreesForBoundsDelta(); 1999 active_tree_->UpdatePropertyTreesForBoundsDelta();
2000 UpdateViewportContainerSizes();
2001
2001 active_tree_->DidBecomeActive(); 2002 active_tree_->DidBecomeActive();
2002 client_->RenewTreePriority(); 2003 client_->RenewTreePriority();
2003 // If we have any picture layers, then by activating we also modified tile 2004 // If we have any picture layers, then by activating we also modified tile
2004 // priorities. 2005 // priorities.
2005 if (!active_tree_->picture_layers().empty()) 2006 if (!active_tree_->picture_layers().empty())
2006 DidModifyTilePriorities(); 2007 DidModifyTilePriorities();
2007 2008
2008 client_->OnCanDrawStateChanged(CanDraw()); 2009 client_->OnCanDrawStateChanged(CanDraw());
2009 client_->DidActivateSyncTree(); 2010 client_->DidActivateSyncTree();
2010 if (!tree_activation_callback_.is_null()) 2011 if (!tree_activation_callback_.is_null())
(...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after
3922 return task_runner_provider_->HasImplThread(); 3923 return task_runner_provider_->HasImplThread();
3923 } 3924 }
3924 3925
3925 bool LayerTreeHostImpl::CommitToActiveTree() const { 3926 bool LayerTreeHostImpl::CommitToActiveTree() const {
3926 // In single threaded mode we skip the pending tree and commit directly to the 3927 // In single threaded mode we skip the pending tree and commit directly to the
3927 // active tree. 3928 // active tree.
3928 return !task_runner_provider_->HasImplThread(); 3929 return !task_runner_provider_->HasImplThread();
3929 } 3930 }
3930 3931
3931 } // namespace cc 3932 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698