Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add APNG support
https://bugs.webkit.org/show_bug.cgi?id=17022 Patch by Max Stepin <maxstepin@gmail.com> on 2015-03-16 Reviewed by Carlos Garcia Campos. Source/WebCore: Test: fast/images/animated-png.html * platform/image-decoders/ImageDecoder.h: (WebCore::ImageFrame::divide255): (WebCore::ImageFrame::overRGBA): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::frameHeader): (WebCore::readChunks): (WebCore::PNGImageReader::PNGImageReader): (WebCore::PNGImageDecoder::PNGImageDecoder): (WebCore::PNGImageDecoder::frameBufferAtIndex): (WebCore::PNGImageDecoder::headerAvailable): (WebCore::PNGImageDecoder::rowAvailable): (WebCore::PNGImageDecoder::pngComplete): (WebCore::PNGImageDecoder::readChunks): (WebCore::PNGImageDecoder::frameHeader): (WebCore::PNGImageDecoder::init): (WebCore::PNGImageDecoder::clearFrameBufferCache): (WebCore::PNGImageDecoder::initFrameBuffer): (WebCore::PNGImageDecoder::frameComplete): (WebCore::PNGImageDecoder::processingStart): (WebCore::PNGImageDecoder::processingFinish): (WebCore::PNGImageDecoder::fallbackNotAnimated): * platform/image-decoders/png/PNGImageDecoder.h: (WebCore::PNGImageDecoder::frameCount): (WebCore::PNGImageDecoder::repetitionCount): (WebCore::PNGImageDecoder::isComplete): Source/WTF: * wtf/FeatureDefines.h: LayoutTests: * fast/images/animated-png-expected.html: Added. * fast/images/animated-png.html: Added. * fast/images/resources/apng00-ref.png: Added. * fast/images/resources/apng00.png: Added. * fast/images/resources/apng01-ref.png: Added. * fast/images/resources/apng01.png: Added. * fast/images/resources/apng02-ref.png: Added. * fast/images/resources/apng02.png: Added. * fast/images/resources/apng04-ref.png: Added. * fast/images/resources/apng04.png: Added. * fast/images/resources/apng08-ref.png: Added. * fast/images/resources/apng08.png: Added. * fast/images/resources/apng10-ref.png: Added. * fast/images/resources/apng10.png: Added. * fast/images/resources/apng11-ref.png: Added. * fast/images/resources/apng11.png: Added. * fast/images/resources/apng12-ref.png: Added. * fast/images/resources/apng12.png: Added. * fast/images/resources/apng14-ref.png: Added. * fast/images/resources/apng14.png: Added. * fast/images/resources/apng18-ref.png: Added. * fast/images/resources/apng18.png: Added. * fast/images/resources/apng24-ref.png: Added. * fast/images/resources/apng24.png: Added. * fast/images/resources/apng26-ref.png: Added. * fast/images/resources/apng26.png: Added. * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/160733@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
733 additions
and 11 deletions.
- +35 −0 LayoutTests/ChangeLog
- +13 −0 LayoutTests/fast/images/animated-png-expected.html
- +27 −0 LayoutTests/fast/images/animated-png.html
- BIN LayoutTests/fast/images/resources/apng00-ref.png
- BIN LayoutTests/fast/images/resources/apng00.png
- BIN LayoutTests/fast/images/resources/apng01-ref.png
- BIN LayoutTests/fast/images/resources/apng01.png
- BIN LayoutTests/fast/images/resources/apng02-ref.png
- BIN LayoutTests/fast/images/resources/apng02.png
- BIN LayoutTests/fast/images/resources/apng04-ref.png
- BIN LayoutTests/fast/images/resources/apng04.png
- BIN LayoutTests/fast/images/resources/apng08-ref.png
- BIN LayoutTests/fast/images/resources/apng08.png
- BIN LayoutTests/fast/images/resources/apng10-ref.png
- BIN LayoutTests/fast/images/resources/apng10.png
- BIN LayoutTests/fast/images/resources/apng11-ref.png
- BIN LayoutTests/fast/images/resources/apng11.png
- BIN LayoutTests/fast/images/resources/apng12-ref.png
- BIN LayoutTests/fast/images/resources/apng12.png
- BIN LayoutTests/fast/images/resources/apng14-ref.png
- BIN LayoutTests/fast/images/resources/apng14.png
- BIN LayoutTests/fast/images/resources/apng18-ref.png
- BIN LayoutTests/fast/images/resources/apng18.png
- BIN LayoutTests/fast/images/resources/apng24-ref.png
- BIN LayoutTests/fast/images/resources/apng24.png
- BIN LayoutTests/fast/images/resources/apng26-ref.png
- BIN LayoutTests/fast/images/resources/apng26.png
- +3 −0 LayoutTests/platform/mac/TestExpectations
- +9 −0 Source/WTF/ChangeLog
- +4 −0 Source/WTF/wtf/FeatureDefines.h
- +35 −0 Source/WebCore/ChangeLog
- +42 −0 Source/WebCore/platform/image-decoders/ImageDecoder.h
- +508 −10 Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
- +57 −1 Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,13 @@ | ||
<html> | ||
<head> | ||
<title>APNG reftest: when animation ends, compare its last frame against the reference static PNG.</title> | ||
<style> | ||
img { margin: 1px; } | ||
</style> | ||
</head> | ||
<body style="margin: 1px"> | ||
<img src=resources/apng00-ref.png><img src=resources/apng01-ref.png><img src=resources/apng02-ref.png><img src=resources/apng04-ref.png><img src=resources/apng08-ref.png><br> | ||
<img src=resources/apng10-ref.png><img src=resources/apng11-ref.png><img src=resources/apng12-ref.png><img src=resources/apng14-ref.png><img src=resources/apng18-ref.png><br> | ||
<img src=resources/apng24-ref.png><img src=resources/apng26-ref.png> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,27 @@ | ||
<html> | ||
<head> | ||
<title>APNG reftest: when animation ends, compare its last frame against the reference static PNG.</title> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(true); | ||
|
||
window.onload = function() { | ||
if (window.testRunner) | ||
testRunner.waitUntilDone(); | ||
|
||
window.setTimeout(function() { | ||
if (window.testRunner) | ||
testRunner.notifyDone(); | ||
}, 300); | ||
} | ||
</script> | ||
<style> | ||
img { margin: 1px; } | ||
</style> | ||
</head> | ||
<body style="margin: 1px"> | ||
<img src=resources/apng00.png><img src=resources/apng01.png><img src=resources/apng02.png><img src=resources/apng04.png><img src=resources/apng08.png><br> | ||
<img src=resources/apng10.png><img src=resources/apng11.png><img src=resources/apng12.png><img src=resources/apng14.png><img src=resources/apng18.png><br> | ||
<img src=resources/apng24.png><img src=resources/apng26.png> | ||
</body> | ||
</html> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.