Allow ports to decide whether an image should be directly composited
authornoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Nov 2012 04:49:08 +0000 (04:49 +0000)
committernoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Nov 2012 04:49:08 +0000 (04:49 +0000)
commit2d5cdc10620830a0283d071350668b1e158188f5
treec848377465480aa19433eb35f298f61c859e0ba4
parent2d64b60f5c46428567fd9c7ac911c2a2cd01b04b
Allow ports to decide whether an image should be directly composited
https://bugs.webkit.org/show_bug.cgi?id=101827

Reviewed by Simon Fraser.

Source/WebCore:

Tested by compositing/tiling/huge-layer-img.html.

* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::shouldDirectlyCompositeImage):
    Allow the GraphicsLayer implementation to decide if the image can be composited.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
    Take onto account the new shouldDirectlyCompositeImage check.

Source/WebKit2:

Implement shouldDirectlyCompositeImage for coordinated graphics, effectively disabling direct
compositing of images with width or height larger than 2000 pixels.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::shouldDirectlyCompositeImage):
(WebCore):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayer.h
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h