RESOLVED FIXED 92758
[Chromium] Skia assert triggered by custom filter unmultiplied results
https://bugs.webkit.org/show_bug.cgi?id=92758
Summary [Chromium] Skia assert triggered by custom filter unmultiplied results
Florin Malita
Reported 2012-07-31 08:19:31 PDT
Enabling color space conversion (https://bugs.webkit.org/show_bug.cgi?id=6033) exposes what appears to be a problem with alpha channel handling in custom filters: Skia uses pre-multiplied buffers internally, but applying custom filters seems to always generate unmultiplied values. This triggers the following assert for css3/filters/custom/effect-custom-parameters.html: crash log for DumpRenderTree (pid 11776): STDOUT: <empty> STDERR: [11776:11776:1562692191948:FATAL:SkColor.h(34)] ../../third_party/skia/include/core/SkColor.h:34: failed assertion "a <= 255 && r <= 255 && g <= 255 && b <= 255" STDERR: STDERR: Backtrace: STDERR: base::debug::StackTrace::StackTrace() [0x7fa9573b1eb6] STDERR: logging::LogMessage::~LogMessage() [0x7fa9573e5a3f] STDERR: SkDebugf_FileLine() [0x7fa957b45df7] STDERR: SkColorSetARGBInline() [0x7fa9527673ce] STDERR: WebCore::SkPMColorToColor() [0x7fa9527675b0] STDERR: WebCore::ImageBuffer::platformTransformColorSpace() [0x7fa95275ae70] STDERR: WebCore::ImageBuffer::transformColorSpace() [0x7fa9526fb620] STDERR: WebCore::FilterEffectRenderer::apply() [0x7fa951eed886] STDERR: WebCore::FilterEffectRendererHelper::applyFilterEffect() [0x7fa951eede78]
Attachments
Patch V1 (247.84 KB, patch)
2012-08-07 14:00 PDT, Alexandru Chiculita
webkit.review.bot: commit-queue-
Archive of layout-test-results from gce-cr-linux-01 (415.16 KB, application/zip)
2012-08-07 14:37 PDT, WebKit Review Bot
no flags
Patch V2 (337.32 KB, patch)
2012-08-07 15:54 PDT, Alexandru Chiculita
dino: review+
Alexandru Chiculita
Comment 1 2012-07-31 09:33:54 PDT
I will take a look at this bug today.
Alexandru Chiculita
Comment 2 2012-08-06 11:49:28 PDT
Thanks for finding this. The shader itself was not providing a pre-multiplied color, but C++ was expecting it to be pre-multiplied. Also note that the shader might come from the network, so we cannot expect it to do the right thing. The spec didn't say anything about the color type yet, but we will add a note saying that the input and output of the shader are un-multiplied. I will post a fix later.
Alexandru Chiculita
Comment 3 2012-08-07 14:00:17 PDT
Created attachment 156994 [details] Patch V1 Using EWS to get test results for cr-linux.
WebKit Review Bot
Comment 4 2012-08-07 14:37:16 PDT
Comment on attachment 156994 [details] Patch V1 Attachment 156994 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13457181 New failing tests: css3/filters/custom/effect-custom-parameters.html css3/filters/custom/effect-custom-combined-missing.html css3/filters/custom/effect-color-check.html
WebKit Review Bot
Comment 5 2012-08-07 14:37:20 PDT
Created attachment 157009 [details] Archive of layout-test-results from gce-cr-linux-01 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-01 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Alexandru Chiculita
Comment 6 2012-08-07 15:54:57 PDT
Created attachment 157029 [details] Patch V2
Dean Jackson
Comment 7 2012-08-07 18:05:20 PDT
Comment on attachment 157029 [details] Patch V2 Not putting cq+ because it seems the patch tool had an issue with one of the PNG files. Should check just in case.
Alexandru Chiculita
Comment 8 2012-08-08 10:14:35 PDT
Note You need to log in before you can comment on or make changes to this bug.