Title: [250029] trunk/Source/WebCore
- Revision
- 250029
- Author
- [email protected]
- Date
- 2019-09-18 03:03:19 -0700 (Wed, 18 Sep 2019)
Log Message
JPEGImageDecoder: use libjpeg-turbo RGBA output path even for Adobe transform=0 JPEGs
https://bugs.webkit.org/show_bug.cgi?id=200163
Reviewed by Carlos Garcia Campos.
Remove the workaround for old libjpeg-turbo which doesn't support
BGRA output for Adobe transform=0 images. The bug was fixed in
libjpeg-turbo 1.2.1.
No new tests, no behavior change.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode): Removed code in #if defined(TURBO_JPEG_RGB_SWIZZLE).
(colorSpaceHasAlpha): Removed an unused inline function.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (250028 => 250029)
--- trunk/Source/WebCore/ChangeLog 2019-09-18 09:19:33 UTC (rev 250028)
+++ trunk/Source/WebCore/ChangeLog 2019-09-18 10:03:19 UTC (rev 250029)
@@ -1,3 +1,20 @@
+2019-09-18 Loïc Yhuel <[email protected]> and Fujii Hironori <[email protected]>
+
+ JPEGImageDecoder: use libjpeg-turbo RGBA output path even for Adobe transform=0 JPEGs
+ https://bugs.webkit.org/show_bug.cgi?id=200163
+
+ Reviewed by Carlos Garcia Campos.
+
+ Remove the workaround for old libjpeg-turbo which doesn't support
+ BGRA output for Adobe transform=0 images. The bug was fixed in
+ libjpeg-turbo 1.2.1.
+
+ No new tests, no behavior change.
+
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+ (WebCore::JPEGImageReader::decode): Removed code in #if defined(TURBO_JPEG_RGB_SWIZZLE).
+ (colorSpaceHasAlpha): Removed an unused inline function.
+
2019-09-18 Joonghun Park <[email protected]>
Unreviewed. Remove build warning since r248998.
Modified: trunk/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (250028 => 250029)
--- trunk/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp 2019-09-18 09:19:33 UTC (rev 250028)
+++ trunk/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp 2019-09-18 10:03:19 UTC (rev 250029)
@@ -57,10 +57,8 @@
#define TURBO_JPEG_RGB_SWIZZLE
inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_EXT_BGRA; }
inline bool turboSwizzled(J_COLOR_SPACE colorSpace) { return colorSpace == JCS_EXT_RGBA || colorSpace == JCS_EXT_BGRA; }
-inline bool colorSpaceHasAlpha(J_COLOR_SPACE colorSpace) { return turboSwizzled(colorSpace); }
#else
inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_RGB; }
-inline bool colorSpaceHasAlpha(J_COLOR_SPACE) { return false; }
#endif
#if USE(LOW_QUALITY_IMAGE_NO_JPEG_DITHERING)
@@ -300,14 +298,6 @@
case JCS_YCbCr:
// libjpeg can convert GRAYSCALE and YCbCr image pixels to RGB.
m_info.out_color_space = rgbOutputColorSpace();
-#if defined(TURBO_JPEG_RGB_SWIZZLE)
- if (m_info.saw_JFIF_marker)
- break;
- // FIXME: Swizzle decoding does not support Adobe transform=0
- // images (yet), so revert to using JSC_RGB in that case.
- if (m_info.saw_Adobe_marker && !m_info.Adobe_transform)
- m_info.out_color_space = JCS_RGB;
-#endif
break;
case JCS_CMYK:
case JCS_YCCK:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes