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

Unified Diff: cc/layer.cc

Issue 11644036: cc: Don't let invalidations that we're going to handle immediately cause an extra commit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ignoreSetNeedsCommit Created 8 years 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.h ('k') | cc/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer.cc
diff --git a/cc/layer.cc b/cc/layer.cc
index b277735fbc083350ccc6c670442f875d344bf5aa..b167edb61f451cfaa931b5f43dab3795280b01a2 100644
--- a/cc/layer.cc
+++ b/cc/layer.cc
@@ -30,6 +30,7 @@ Layer::Layer()
: m_needsDisplay(false)
, m_stackingOrderChanged(false)
, m_layerId(s_nextLayerId++)
+ , m_ignoreSetNeedsCommit(false)
, m_parent(0)
, m_layerTreeHost(0)
, m_layerAnimationController(LayerAnimationController::create(this))
@@ -99,6 +100,8 @@ void Layer::setLayerTreeHost(LayerTreeHost* host)
void Layer::setNeedsCommit()
{
+ if (m_ignoreSetNeedsCommit)
+ return;
if (m_layerTreeHost)
m_layerTreeHost->setNeedsCommit();
}
@@ -654,7 +657,8 @@ void Layer::setRasterScale(float scale)
return;
m_rasterScale = scale;
- if (!m_automaticallyComputeRasterScale)
+ // When automatically computed, this acts like a draw property.
+ if (m_automaticallyComputeRasterScale)
return;
setNeedsDisplay();
}
« no previous file with comments | « cc/layer.h ('k') | cc/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698