Bug 92758 - [Chromium] Skia assert triggered by custom filter unmultiplied results
Summary: [Chromium] Skia assert triggered by custom filter unmultiplied results
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexandru Chiculita
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-31 08:19 PDT by Florin Malita
Modified: 2012-08-08 10:14 PDT (History)
5 users (show)

See Also:


Attachments
Patch V1 (247.84 KB, patch)
2012-08-07 14:00 PDT, Alexandru Chiculita
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
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 Details
Patch V2 (337.32 KB, patch)
2012-08-07 15:54 PDT, Alexandru Chiculita
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florin Malita 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]
Comment 1 Alexandru Chiculita 2012-07-31 09:33:54 PDT
I will take a look at this bug today.
Comment 2 Alexandru Chiculita 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.
Comment 3 Alexandru Chiculita 2012-08-07 14:00:17 PDT
Created attachment 156994 [details]
Patch V1

Using EWS to get test results for cr-linux.
Comment 4 WebKit Review Bot 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
Comment 5 WebKit Review Bot 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
Comment 6 Alexandru Chiculita 2012-08-07 15:54:57 PDT
Created attachment 157029 [details]
Patch V2
Comment 7 Dean Jackson 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.
Comment 8 Alexandru Chiculita 2012-08-08 10:14:35 PDT
Landed manually in http://trac.webkit.org/changeset/125044 .