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

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: 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 | « no previous file | 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 607a50c2344ce9bc1810702f5238d2507b535de4..23e826333d959a58cd1b95e925c16c568bb3f9bf 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -223,6 +223,10 @@ bool LayerTreeHostImpl::canDraw()
TRACE_EVENT_INSTANT0("cc", "LayerTreeHostImpl::canDraw empty viewport");
return false;
}
+ if (deviceViewportSize() != activeTree()->device_viewport_size()) {
+ TRACE_EVENT_INSTANT0("cc", "LayerTreeHostImpl::canDraw viewport resize incomplete");
+ return false;
+ }
if (!m_renderer) {
TRACE_EVENT_INSTANT0("cc", "LayerTreeHostImpl::canDraw no renderer");
return false;
@@ -1095,6 +1099,11 @@ void LayerTreeHostImpl::setViewportSize(const gfx::Size& layoutViewportSize, con
m_layoutViewportSize = layoutViewportSize;
m_deviceViewportSize = deviceViewportSize;
danakj 2013/02/13 05:44:30 Can you just remove the m_deviceViewportSize from
+ if (m_settings.implSidePainting)
+ pendingTree()->SetDeviceViewportSize(deviceViewportSize);
+ else
+ activeTree()->SetDeviceViewportSize(deviceViewportSize);
+
updateMaxScrollOffset();
if (m_renderer)
« no previous file with comments | « no previous file | cc/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698