2009-03-25 Dean Jackson <dino@apple.com>
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2009 01:38:52 +0000 (01:38 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2009 01:38:52 +0000 (01:38 +0000)
commit7a937f39a94e3a702240cbfe9957b142c7d8077c
tree6af32765708f80b6ade79b7f708dc5f99a12e6c5
parenteba7fbf831d2b489e83202ced25c7cc0e4fa11bd
2009-03-25  Dean Jackson  <dino@apple.com>

        Reviewed by Simon Fraser

        https://bugs.webkit.org/show_bug.cgi?id=23361

        When using hardware compositing, some images can be directly
        rendered by the hardware - no need to draw them into a separate
        context, therefore saving memory.
        Only images with certain style properties can be directly
        composited - basically anything that is not a simple image requires
        the usual rendering path (eg. if the image has borders).

        Test: compositing/direct-image-compositing.html

        * manual-tests/resources/simple_image.png: Added.
        * manual-tests/simple-image-compositing.html: Added.
        * platform/graphics/Image.h:
        (WebCore::Image::startAnimation):
            - move this to public
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::imageChanged):
            - poke compositing layer if image has changed
        (WebCore::RenderImage::notifyFinished):
            - let the compositing layer know that it can render the image
        * rendering/RenderImage.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::rendererContentChanged):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::canUseInnerContentLayer):
        (WebCore::RenderLayerBacking::detectDrawingOptimizations):
        (WebCore::RenderLayerBacking::rendererContentChanged):
        * rendering/RenderLayerBacking.h:
            - code to hook up direct compositing of images where
              possible

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/compositing/direct-image-compositing.html [new file with mode: 0644]
LayoutTests/compositing/resources/simple_image.png [new file with mode: 0644]
LayoutTests/platform/mac/compositing/direct-image-compositing-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/compositing/direct-image-compositing-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/compositing/direct-image-compositing-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/manual-tests/resources/simple_image.png [new file with mode: 0644]
WebCore/manual-tests/simple-image-compositing.html [new file with mode: 0644]
WebCore/platform/graphics/Image.h
WebCore/rendering/RenderImage.cpp
WebCore/rendering/RenderImage.h
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderLayer.h
WebCore/rendering/RenderLayerBacking.cpp
WebCore/rendering/RenderLayerBacking.h