2011-07-19 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2011 20:32:58 +0000 (20:32 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2011 20:32:58 +0000 (20:32 +0000)
commit76637a9d088446810deb50e281e7279702aae481
treeb9c4162670c818707530dab12e57356ddd1b4d7c
parent45ff4f008c96d034ecb048c2ee7d641df62c6bc4
2011-07-19  Simon Fraser  <simon.fraser@apple.com>

        Possible recursion in GraphicsLayerCA::updateGeometry()
        https://bugs.webkit.org/show_bug.cgi?id=64815

        Reviewed by Sam Weinig.

        It was possible to recurse via updateGeometry/swapFromOrToTiledLayer/
        updateContentsScale because updateGeometry() and updateContentsScale()
        used different sizes; updateGeometry() used the scaled size, while
        updateContentsScale() used the unscaled size.

        Always use the unscaled size; the scaled size will be at most a couple
        of pixels bigger, and our threshold is not close to the max texture
        size limit, so using the slightly smaller size is OK.

        Test: compositing/scaling/tiled-layer-recursion.html

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::updateGeometry):
        (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
        (WebCore::GraphicsLayerCA::updateContentsScale):
        (WebCore::GraphicsLayerCA::requiresTiledLayer):
        * platform/graphics/ca/GraphicsLayerCA.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/scaling/tiled-layer-recursion-expected.txt [new file with mode: 0644]
LayoutTests/compositing/scaling/tiled-layer-recursion.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h