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

Side by Side Diff: cc/layer_tree_host.cc

Issue 12025031: Find root scroll layer at tree activation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | cc/layer_tree_host_impl.h » ('j') | cc/layer_tree_impl.cc » ('J')
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_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 syncTree = hostImpl->activeTree(); 278 syncTree = hostImpl->activeTree();
279 needsFullTreeSync = m_needsFullTreeSync; 279 needsFullTreeSync = m_needsFullTreeSync;
280 } 280 }
281 281
282 if (needsFullTreeSync) 282 if (needsFullTreeSync)
283 syncTree->SetRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), s yncTree->DetachLayerTree(), syncTree)); 283 syncTree->SetRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), s yncTree->DetachLayerTree(), syncTree));
284 { 284 {
285 TRACE_EVENT0("cc", "LayerTreeHost::pushProperties"); 285 TRACE_EVENT0("cc", "LayerTreeHost::pushProperties");
286 TreeSynchronizer::pushProperties(rootLayer(), syncTree->RootLayer()); 286 TreeSynchronizer::pushProperties(rootLayer(), syncTree->RootLayer());
287 } 287 }
288 syncTree->FindRootScrollLayer();
289 288
290 m_needsFullTreeSync = false; 289 m_needsFullTreeSync = false;
291 290
292 if (m_rootLayer && m_hudLayer) 291 if (m_rootLayer && m_hudLayer)
293 syncTree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>(LayerTreeH ostCommon::findLayerInSubtree(syncTree->RootLayer(), m_hudLayer->id()))); 292 syncTree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>(LayerTreeH ostCommon::findLayerInSubtree(syncTree->RootLayer(), m_hudLayer->id())));
294 else 293 else
295 syncTree->set_hud_layer(0); 294 syncTree->set_hud_layer(0);
296 295
297 syncTree->set_source_frame_number(commitNumber()); 296 syncTree->set_source_frame_number(commitNumber());
298 syncTree->set_background_color(m_backgroundColor); 297 syncTree->set_background_color(m_backgroundColor);
299 syncTree->set_has_transparent_background(m_hasTransparentBackground); 298 syncTree->set_has_transparent_background(m_hasTransparentBackground);
300 299
300 syncTree->FindRootScrollLayer();
301
301 if (!m_settings.implSidePainting) { 302 if (!m_settings.implSidePainting) {
302 // If we're not in impl-side painting, the tree is immediately 303 // If we're not in impl-side painting, the tree is immediately
303 // considered active. 304 // considered active.
304 syncTree->DidBecomeActive(); 305 syncTree->DidBecomeActive();
305 } 306 }
306 307
307 hostImpl->setViewportSize(layoutViewportSize(), deviceViewportSize()); 308 hostImpl->setViewportSize(layoutViewportSize(), deviceViewportSize());
308 hostImpl->setDeviceScaleFactor(deviceScaleFactor()); 309 hostImpl->setDeviceScaleFactor(deviceScaleFactor());
309 hostImpl->setPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto r, m_maxPageScaleFactor); 310 hostImpl->setPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto r, m_maxPageScaleFactor);
310 hostImpl->setDebugState(m_debugState); 311 hostImpl->setDebugState(m_debugState);
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 877 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
877 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 878 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
878 } 879 }
879 880
880 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture() 881 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture()
881 { 882 {
882 return m_proxy->capturePicture(); 883 return m_proxy->capturePicture();
883 } 884 }
884 885
885 } // namespace cc 886 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.h » ('j') | cc/layer_tree_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698