summaryrefslogtreecommitdiffstats
path: root/cc/layer.cc
diff options
context:
space:
mode:
authorjunov@chromium.org <junov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-26 00:57:38 +0000
committerjunov@chromium.org <junov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-26 00:57:38 +0000
commit031ccfff942f5a5d797137613c87f738264e1423 (patch)
tree78397a67ad8526a2c8fbf596586d4d2dee46a3d9 /cc/layer.cc
parent574ef63851a8d31b411f88adc34b1371ee6779dd (diff)
downloadchromium_src-031ccfff942f5a5d797137613c87f738264e1423.zip
chromium_src-031ccfff942f5a5d797137613c87f738264e1423.tar.gz
chromium_src-031ccfff942f5a5d797137613c87f738264e1423.tar.bz2
Prevent TextureLayer from triggering commits and texture acquisitions when
the layer does not draw its contents. BUG=138448 TEST=cc_unittests TextureLayerTest.syncImplWhenDrawing Review URL: https://chromiumcodereview.appspot.com/11226061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer.cc')
-rw-r--r--cc/layer.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/cc/layer.cc b/cc/layer.cc
index afa35e8..4c39126 100644
--- a/cc/layer.cc
+++ b/cc/layer.cc
@@ -515,7 +515,8 @@ void Layer::setNeedsDisplayRect(const FloatRect& dirtyRect)
if (!dirtyRect.isEmpty())
m_needsDisplay = true;
- setNeedsCommit();
+ if (drawsContent())
+ setNeedsCommit();
}
bool Layer::descendantIsFixedToContainerLayer() const