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

Unified Diff: cc/layer_tree_host_impl.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: Fix nits and rebase to 182333 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layer_tree_host.cc ('k') | cc/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index 06db701f3a9279b63d86d5ec7fdfe06c9e84883a..4d2bc9a52a2523eca4cabec4f76d0326ead612d7 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -234,6 +234,10 @@ bool LayerTreeHostImpl::canDraw()
TRACE_EVENT_INSTANT0("cc", "LayerTreeHostImpl::canDraw empty viewport");
return false;
}
+ if (m_activeTree->ViewportSizeInvalid()) {
+ TRACE_EVENT_INSTANT0("cc", "LayerTreeHostImpl::canDraw viewport size recently changed");
+ return false;
+ }
if (!m_renderer) {
TRACE_EVENT_INSTANT0("cc", "LayerTreeHostImpl::canDraw no renderer");
return false;
@@ -1102,6 +1106,9 @@ void LayerTreeHostImpl::setViewportSize(const gfx::Size& layoutViewportSize, con
if (layoutViewportSize == m_layoutViewportSize && deviceViewportSize == m_deviceViewportSize)
return;
+ if (pendingTree() && m_deviceViewportSize != deviceViewportSize)
+ activeTree()->SetViewportSizeInvalid();
+
m_layoutViewportSize = layoutViewportSize;
m_deviceViewportSize = deviceViewportSize;
« no previous file with comments | « cc/layer_tree_host.cc ('k') | cc/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698