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

Side by Side Diff: cc/layer_tree_host.cc

Issue 12212156: cc: Only allow trees created at the current viewport size to draw. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move viewport sizes out of LTHI Created 7 years, 10 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_host_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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 page_scale_delta = hostImpl->activeTree()->page_scale_delta(); 305 page_scale_delta = hostImpl->activeTree()->page_scale_delta();
306 sent_page_scale_delta = hostImpl->activeTree()->sent_page_scale_delta(); 306 sent_page_scale_delta = hostImpl->activeTree()->sent_page_scale_delta();
307 } else { 307 } else {
308 page_scale_delta = syncTree->page_scale_delta(); 308 page_scale_delta = syncTree->page_scale_delta();
309 sent_page_scale_delta = syncTree->sent_page_scale_delta(); 309 sent_page_scale_delta = syncTree->sent_page_scale_delta();
310 syncTree->set_sent_page_scale_delta(1); 310 syncTree->set_sent_page_scale_delta(1);
311 } 311 }
312 312
313 syncTree->SetPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto r, m_maxPageScaleFactor); 313 syncTree->SetPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto r, m_maxPageScaleFactor);
314 syncTree->SetPageScaleDelta(page_scale_delta / sent_page_scale_delta); 314 syncTree->SetPageScaleDelta(page_scale_delta / sent_page_scale_delta);
315 syncTree->SetViewportSize(layoutViewportSize(), deviceViewportSize());
315 316
316 if (!m_settings.implSidePainting) { 317 if (!m_settings.implSidePainting) {
317 // If we're not in impl-side painting, the tree is immediately 318 // If we're not in impl-side painting, the tree is immediately
318 // considered active. 319 // considered active.
319 syncTree->DidBecomeActive(); 320 syncTree->DidBecomeActive();
320 } 321 }
321 322
322 hostImpl->setViewportSize(layoutViewportSize(), deviceViewportSize());
323 hostImpl->setDeviceScaleFactor(deviceScaleFactor()); 323 hostImpl->setDeviceScaleFactor(deviceScaleFactor());
324 hostImpl->setDebugState(m_debugState); 324 hostImpl->setDebugState(m_debugState);
325 hostImpl->savePaintTime(m_renderingStats.totalPaintTime); 325 hostImpl->savePaintTime(m_renderingStats.totalPaintTime);
326 326
327 if (newImplTreeHasNoEvictedResources) { 327 if (newImplTreeHasNoEvictedResources) {
328 if (syncTree->ContentsTexturesPurged()) 328 if (syncTree->ContentsTexturesPurged())
329 syncTree->ResetContentsTexturesPurged(); 329 syncTree->ResetContentsTexturesPurged();
330 } 330 }
331 331
332 m_commitNumber++; 332 m_commitNumber++;
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 877 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
878 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 878 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
879 } 879 }
880 880
881 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture() 881 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture()
882 { 882 {
883 return m_proxy->capturePicture(); 883 return m_proxy->capturePicture();
884 } 884 }
885 885
886 } // namespace cc 886 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.h » ('j') | cc/layer_tree_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698