summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-20 04:52:17 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-20 04:52:17 +0000
commit6ac755f9fa7fad3e2b26c66a21020cf2f9d5aa21 (patch)
tree05734b3eabbe8b14bae66ad64cb88634373432e2 /cc
parent14b4e34f0832e555465d7348ae3efd85381f2e13 (diff)
downloadchromium_src-6ac755f9fa7fad3e2b26c66a21020cf2f9d5aa21.zip
chromium_src-6ac755f9fa7fad3e2b26c66a21020cf2f9d5aa21.tar.gz
chromium_src-6ac755f9fa7fad3e2b26c66a21020cf2f9d5aa21.tar.bz2
cc: Don't sync tilings to layers that don't draw content.
If a layer is drawsContent == false, it should have no tilings, which we assert to be the case. When the pending tree is created, tilings are synced back to the pending tree, but not for layers that do not draw content in the pending tree. However, if we create a tiling for the active tree later, we sync that tiling to the pending tree even if the layer does not draw content, creating a situation where a non-content- drawing layer has tilings but it should not. Similarly, if the pending tree creates a tiling, but the layer already exists in the active tree in a state that does not draw content, the tiling should not be added to the active layer. R=reveman,enne BUG=176524 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/12291002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183410 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/picture_layer_impl.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc
index 6664ba63..d950bec 100644
--- a/cc/picture_layer_impl.cc
+++ b/cc/picture_layer_impl.cc
@@ -435,6 +435,8 @@ void PictureLayerImpl::SyncFromActiveLayer(const PictureLayerImpl* other) {
void PictureLayerImpl::SyncTiling(
const PictureLayerTiling* tiling,
const Region& pending_layer_invalidation) {
+ if (!drawsContent())
+ return;
tilings_->Clone(tiling, pending_layer_invalidation);
}