[chromium] Don't force the visibleLayerRect to be empty for animating layers whose...
authordanakj@chromium.org <danakj@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 May 2012 01:02:16 +0000 (01:02 +0000)
committerdanakj@chromium.org <danakj@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 May 2012 01:02:16 +0000 (01:02 +0000)
commit27c9e985276e489c540292fb54140a9648a7a2f8
tree4f84bad95c90462cdce8fd7dc1ac687541778fe2
parent4f701ef0aec08fba5546d3322d5e85f33816b909
[chromium] Don't force the visibleLayerRect to be empty for animating layers whose front face is not visible
https://bugs.webkit.org/show_bug.cgi?id=86886

Reviewed by Adrienne Walker.

Source/WebCore:

Previously we would force the visibleLayerRect to be empty for these
animating layers, and then special case the pre-painting code to
paint them if they were within some size limit, to avoid having the
layer steal too much memory.

Instead, just use the visibleLayerRect given to the layer. Since the
transform flips the layer such that its back face is visible, it will
also compute a visibleLayerRect in the front face of the layer, and
its size will be bounded by the viewport. This will cause the
layer to be painted with visible priority instead of prepainted, but
ensures the visible parts of the layer is painted and ready to go when
the animation flips the layer around.

* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateVisibleLayerRect):

Source/WebKit/chromium:

* tests/CCLayerTreeHostCommonTest.cpp:
(WebKitTests::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@118090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp