REGRESSION(r215211): [GTK] Several webgl related tests are failing
authormagomez@igalia.com <magomez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Apr 2017 11:53:52 +0000 (11:53 +0000)
committermagomez@igalia.com <magomez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Apr 2017 11:53:52 +0000 (11:53 +0000)
commit290714d379c6f887ef5665848e79f485d929fab2
tree9b9c851e508c6f09dd5b5b4268dc4c088530cddb
parent39ad8ae31ccdf92d489e57e805dfefb85d570cf2
REGRESSION(r215211): [GTK] Several webgl related tests are failing
https://bugs.webkit.org/show_bug.cgi?id=170730

Reviewed by Said Abou-Hallawa.

Source/WebCore:

There is a wrong situation in the image decoders where the complete data has been assigned
to them but the size of the image hasn't been decoded yet. This is causing rendering
issues in webgl when decoding the images used as textures. To fix this, we refactor how the
encoded data status is stored to avoid that situation: the status is handled completely
by ImageDecoder.h, and it's the one forcing the decode of the size when data gets assigned
to the decoders.

Covered by existent tests.

* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::isAllDataReceived):
(WebCore::ImageDecoder::setData):
(WebCore::ImageDecoder::encodedDataStatus):
(WebCore::ImageDecoder::isSizeAvailable):
(WebCore::ImageDecoder::setSize):
(WebCore::ImageDecoder::setFailed):
(WebCore::ImageDecoder::failed):
* platform/image-decoders/bmp/BMPImageDecoder.cpp:
(WebCore::BMPImageDecoder::frameBufferAtIndex):
(WebCore::BMPImageDecoder::decode):
(WebCore::BMPImageDecoder::encodedDataStatus): Deleted.
* platform/image-decoders/bmp/BMPImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::frameCount):
(WebCore::GIFImageDecoder::frameBufferAtIndex):
(WebCore::GIFImageDecoder::decode):
(WebCore::GIFImageDecoder::encodedDataStatus): Deleted.
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::setData):
(WebCore::ICOImageDecoder::frameCount):
(WebCore::ICOImageDecoder::frameBufferAtIndex):
(WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
(WebCore::ICOImageDecoder::decode):
(WebCore::ICOImageDecoder::decodeAtIndex):
(WebCore::ICOImageDecoder::encodedDataStatus): Deleted.
* platform/image-decoders/ico/ICOImageDecoder.h:
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageDecoder::frameBufferAtIndex):
(WebCore::JPEGImageDecoder::decode):
(WebCore::JPEGImageDecoder::encodedDataStatus): Deleted.
* platform/image-decoders/jpeg/JPEGImageDecoder.h:
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::frameBufferAtIndex):
(WebCore::PNGImageDecoder::decode):
(WebCore::PNGImageDecoder::encodedDataStatus): Deleted.
* platform/image-decoders/png/PNGImageDecoder.h:
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::frameBufferAtIndex):
(WebCore::WEBPImageDecoder::decode):
(WebCore::WEBPImageDecoder::encodedDataStatus): Deleted.
* platform/image-decoders/webp/WEBPImageDecoder.h:

LayoutTests:

Adjust test expectations for the tests that were failing. They must pass now.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/gtk/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/image-decoders/ImageDecoder.h
Source/WebCore/platform/image-decoders/bmp/BMPImageDecoder.cpp
Source/WebCore/platform/image-decoders/bmp/BMPImageDecoder.h
Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h
Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp
Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.h
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h
Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h
Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp
Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h