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

Side by Side Diff: cc/layer_tree_impl.cc

Issue 11826017: cc: Preserve currently scrolling layer during tree activation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: FULL STOP Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « cc/layer_tree_impl.h ('k') | no next file » | 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/layer_tree_impl.h" 5 #include "cc/layer_tree_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/layer_tree_host_common.h" 8 #include "cc/layer_tree_host_common.h"
9 #include "cc/layer_tree_host_impl.h" 9 #include "cc/layer_tree_host_impl.h"
10 #include "ui/gfx/vector2d_conversions.h" 10 #include "ui/gfx/vector2d_conversions.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 void LayerTreeImpl::RegisterLayer(LayerImpl* layer) { 170 void LayerTreeImpl::RegisterLayer(LayerImpl* layer) {
171 DCHECK(!LayerById(layer->id())); 171 DCHECK(!LayerById(layer->id()));
172 layer_id_map_[layer->id()] = layer; 172 layer_id_map_[layer->id()] = layer;
173 } 173 }
174 174
175 void LayerTreeImpl::UnregisterLayer(LayerImpl* layer) { 175 void LayerTreeImpl::UnregisterLayer(LayerImpl* layer) {
176 DCHECK(LayerById(layer->id())); 176 DCHECK(LayerById(layer->id()));
177 layer_id_map_.erase(layer->id()); 177 layer_id_map_.erase(layer->id());
178 } 178 }
179 179
180 void LayerTreeImpl::PushPersistedState(LayerTreeImpl* pendingTree) {
181 int id = currently_scrolling_layer_ ? currently_scrolling_layer_->id() : 0;
182 pendingTree->set_currently_scrolling_layer(
183 LayerTreeHostCommon::findLayerInSubtree(pendingTree->RootLayer(), id));
184 }
185
180 const LayerTreeSettings& LayerTreeImpl::settings() const { 186 const LayerTreeSettings& LayerTreeImpl::settings() const {
181 return layer_tree_host_impl_->settings(); 187 return layer_tree_host_impl_->settings();
182 } 188 }
183 189
184 OutputSurface* LayerTreeImpl::output_surface() const { 190 OutputSurface* LayerTreeImpl::output_surface() const {
185 return layer_tree_host_impl_->outputSurface(); 191 return layer_tree_host_impl_->outputSurface();
186 } 192 }
187 193
188 ResourceProvider* LayerTreeImpl::resource_provider() const { 194 ResourceProvider* LayerTreeImpl::resource_provider() const {
189 return layer_tree_host_impl_->resourceProvider(); 195 return layer_tree_host_impl_->resourceProvider();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 263
258 AnimationRegistrar* LayerTreeImpl::animationRegistrar() const { 264 AnimationRegistrar* LayerTreeImpl::animationRegistrar() const {
259 return layer_tree_host_impl_->animationRegistrar(); 265 return layer_tree_host_impl_->animationRegistrar();
260 } 266 }
261 267
262 const PinchZoomViewport& LayerTreeImpl::pinch_zoom_viewport() const { 268 const PinchZoomViewport& LayerTreeImpl::pinch_zoom_viewport() const {
263 return layer_tree_host_impl_->pinchZoomViewport(); 269 return layer_tree_host_impl_->pinchZoomViewport();
264 } 270 }
265 271
266 } // namespace cc 272 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698