[chromium] compositing/masks layout tests fail with accelerated drawing
authoralokp@chromium.org <alokp@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Dec 2011 21:12:40 +0000 (21:12 +0000)
committeralokp@chromium.org <alokp@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Dec 2011 21:12:40 +0000 (21:12 +0000)
commitc672abd09b118c26d4191e111174a65f547e9d9b
treeda51c0c3af9aacf1726f21ac736ba76bcc97b4e0
parentf24ef81501cbd354232023040b4098facf559b88
[chromium] compositing/masks layout tests fail with accelerated drawing
https://bugs.webkit.org/show_bug.cgi?id=72760

Reviewed by Stephen White.

Source/WebCore:

Accelerated drawing path used to render bottom-up upright textures, which was opposite of what the software path rendered.
The textures produced by the accelerated path was flipped along Y in the shader to make it upside down as expected by the compositor.
This strategy does not work in case of masks which do not go through a shader and hence do not get flipped,
which results in a case where texture in the render surface is top-down, while that in the mask is bottom-up.
This patch makes accelerated drawing path render textures in the same orientation as the software path.
LayerTextureUpdater::Orientation was added to support the difference in texture orientation between software and accelerated paths.
Now that both paths produce textures in the same orientation, there is no need for it.

No new tests needed. Covered by existing compositing tests.

* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
* platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
* platform/graphics/chromium/ImageLayerChromium.cpp:
* platform/graphics/chromium/LayerTextureUpdater.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::TiledLayerChromium):
(WebCore::TiledLayerChromium::setLayerTreeHost):
(WebCore::TiledLayerChromium::pushPropertiesTo):
* platform/graphics/chromium/TiledLayerChromium.h:
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::drawTiles):
* platform/graphics/chromium/cc/CCTiledLayerImpl.h:
(WebCore::CCTiledLayerImpl::setSkipsDraw):

Source/WebKit/chromium:

* tests/TiledLayerChromiumTest.cpp:
(WTF::FakeLayerTextureUpdater::createTexture):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h
Source/WebCore/platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h
Source/WebCore/platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp
Source/WebCore/platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h
Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerTextureUpdater.h
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h
Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp