RESOLVED FIXED 103749
ENABLE(IMAGE_DECODER_DOWN_SAMPLING): Should use TURBO_JPEG_RGB_SWIZZLE fast path for non-scaled images
https://bugs.webkit.org/show_bug.cgi?id=103749
Summary ENABLE(IMAGE_DECODER_DOWN_SAMPLING): Should use TURBO_JPEG_RGB_SWIZZLE fast p...
Yong Li
Reported 2012-11-30 07:54:12 PST
There is currently following line #if !ENABLE(IMAGE_DECODER_DOWN_SAMPLING) && defined(TURBO_JPEG_RGB_SWIZZLE) in JPEGImaggeDecoder.cpp. The reason of this !ENABLE(IMAGE_DECODER_DOWN_SAMPLING) check is we cannot do swizzling when the buffer wants a down-sampled image. However this doesn't work. As there is no such check when it sets the colorspace. If you enable both IMAGE_DECODER_DOWN_SAMPLING and TURBO_JPEG_RGB_SWIZZLE, it will crash for sure. ENABLE(IMAGE_DECODER_DOWN_SAMPLING) is probably not widely used, and could be improved. However, I found it super easy to make TURBO_JPEG_RGB_SWIZZLE work with it, so why not?
Attachments
the patch (1.73 KB, patch)
2012-11-30 10:45 PST, Yong Li
no flags
Yong Li
Comment 1 2012-11-30 10:30:25 PST
seems the crash has been fixed.
Yong Li
Comment 2 2012-11-30 10:45:47 PST
Created attachment 176995 [details] the patch
Yong Li
Comment 3 2012-11-30 12:18:57 PST
+Recent JPEGImageDecoder reviewers and Antonio
Yong Li
Comment 4 2012-11-30 12:20:19 PST
Kenneth Russell
Comment 5 2012-11-30 13:37:21 PST
Noel: could you unofficially review this?
noel gordon
Comment 6 2012-11-30 23:15:48 PST
Thank you Yong Li. Looks good to me.
noel gordon
Comment 7 2012-11-30 23:18:36 PST
(In reply to comment #1) > seems the crash has been fixed. Yes. Fixed on bug 98878.
Rob Buis
Comment 8 2012-12-03 07:43:34 PST
Comment on attachment 176995 [details] the patch LGTM.
WebKit Review Bot
Comment 9 2012-12-03 07:48:54 PST
Comment on attachment 176995 [details] the patch Clearing flags on attachment: 176995 Committed r136401: <http://trac.webkit.org/changeset/136401>
WebKit Review Bot
Comment 10 2012-12-03 07:48:57 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.