cc: DCHECK that pile size == layer size during draw if pile isn't empty.
commit45377978a7fbf2054502875aec48a90cb27f62e0
authordanakj <danakj@chromium.org>
Thu, 6 Nov 2014 22:05:49 +0000 (6 14:05 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 6 Nov 2014 22:06:12 +0000 (6 22:06 +0000)
tree74239444a956779f1f9f8f386bfd9f416f44e5b8
parentd411b9c43fffaa7ccd4929ea15a1ec94e3b37884
cc: DCHECK that pile size == layer size during draw if pile isn't empty.

Ensure that when the pile and layer size don't match during push
properties that the pile is invalidated and given an empty size, since
it means Update was skipped (layer isn't part of the frame) and the
pile is not longer up to date.

In AppendQuads only dcheck the layer bounds() == pile's size when the
pile is not empty. A layer may animate or scroll into the viewport
while it was not part of the main thread frame. We will checkerboard in
that case.

Adds a test to ensure we don't consider the pile to be solid color once
we make it empty to avoid drawing a solid color if that isn't correct
in this scenario. An empty pile shouldn't be used to draw with.

R=enne, vmpstr
BUG=430894

Review URL: https://codereview.chromium.org/711503002

Cr-Commit-Position: refs/heads/master@{#303097}
cc/layers/picture_layer.cc
cc/layers/picture_layer_impl.cc
cc/layers/picture_layer_unittest.cc
cc/resources/picture_pile.cc
cc/resources/picture_pile_base.cc
cc/resources/picture_pile_unittest.cc