-
noel.gordon@gmail.com authored
https://bugs.webkit.org/show_bug.cgi?id=70172 Reviewed by Adam Barth. Source/WebCore: Add a webp image encoder for the chromium skia ports, add it to the canvas element toDataURL() flow with support for an optional quality [0.0-1.0]. Use a webp compression method (3) that provides good speed and compression performance for this image format, and works well for various input image types: line-art, screen-shots, and photographic images. Test: fast/canvas/canvas-toDataURL-webp.html * WebCore.gypi: * platform/chromium/MIMETypeRegistryChromium.cpp: (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageToDataURL): * platform/image-encoders/skia/WEBPImageEncoder.cpp: Added. (WebCore::writeOutput): (WebCore::importPicture): (WebCore::importPictureBGRA): (WebCore::importPictureRGBA): (WebCore::encodePixels): (WebCore::WEBPImageEncoder::encode): * platform/image-encoders/skia/WEBPImageEncoder.h: Added. LayoutTests: * fast/canvas/canvas-toDataURL-webp-expected.txt: Added. * fast/canvas/canvas-toDataURL-webp.html: Added. * platform/chromium/test_expectations.txt: skip test on MAC CPU-CG (CoreGraphics) * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
f00d37a5