Bug 119992 - [Cairo] Canvas putImageData is not working as expected
Summary: [Cairo] Canvas putImageData is not working as expected
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-18 21:24 PDT by Hurnjoo Lee
Modified: 2013-12-03 08:53 PST (History)
7 users (show)

See Also:


Attachments
patch (5.34 KB, patch)
2013-08-18 21:26 PDT, Hurnjoo Lee
no flags Details | Formatted Diff | Diff
fixed patch (5.40 KB, patch)
2013-08-18 21:32 PDT, Hurnjoo Lee
no flags Details | Formatted Diff | Diff
Fixed patch v2 (5.31 KB, patch)
2013-08-18 22:38 PDT, Hurnjoo Lee
no flags Details | Formatted Diff | Diff
fixed patch v3 (4.02 KB, patch)
2013-08-18 23:43 PDT, Hurnjoo Lee
darin: review+
Details | Formatted Diff | Diff
patch for landing (4.01 KB, patch)
2013-08-19 19:17 PDT, Hurnjoo Lee
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hurnjoo Lee 2013-08-18 21:24:57 PDT
ImageBufferCairo::putImageArray didn't perform pre-multiply in case of zero alpha value.
If the alpha value is not 255, image data should always be pre-multiplied.
Comment 1 Hurnjoo Lee 2013-08-18 21:26:52 PDT
Created attachment 209049 [details]
patch
Comment 2 WebKit Commit Bot 2013-08-18 21:28:06 PDT
Attachment 209049 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/canvas/canvas-putImageData-zero-alpha-expected.txt', u'LayoutTests/fast/canvas/canvas-putImageData-zero-alpha.html', u'LayoutTests/platform/efl/fast/canvas/canvas-putImageData-zero-alpha-expected.png', u'LayoutTests/platform/gtk/fast/canvas/canvas-putImageData-zero-alpha-expected.png', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp']" exit_code: 1
LayoutTests/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Source/WebCore/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 2 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Hurnjoo Lee 2013-08-18 21:32:44 PDT
Created attachment 209050 [details]
fixed patch
Comment 4 Hurnjoo Lee 2013-08-18 21:38:17 PDT
I'm sorry, there was some mistake.
I will upload patch again.
Comment 5 Hurnjoo Lee 2013-08-18 22:38:05 PDT
Created attachment 209055 [details]
Fixed patch v2
Comment 6 Chris Dumez 2013-08-18 23:09:48 PDT
Comment on attachment 209055 [details]
Fixed patch v2

View in context: https://bugs.webkit.org/attachment.cgi?id=209055&action=review

> LayoutTests/fast/canvas/canvas-putImageData-zero-alpha.html:6
> +    background-color:blue;

Can this be a ref test instead?

> LayoutTests/fast/canvas/canvas-putImageData-zero-alpha.html:33
> +      if (window.testRunner) {

No need for curly brackets here.
Comment 7 Hurnjoo Lee 2013-08-18 23:43:56 PDT
Created attachment 209060 [details]
fixed patch v3
Comment 8 Hurnjoo Lee 2013-08-18 23:49:14 PDT
(In reply to comment #6)

Thanks for the review.

> (From update of attachment 209055 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=209055&action=review
> 
> > LayoutTests/fast/canvas/canvas-putImageData-zero-alpha.html:6
> > +    background-color:blue;
> 
> Can this be a ref test instead?

Done. I added the ref test.

> 
> > LayoutTests/fast/canvas/canvas-putImageData-zero-alpha.html:33
> > +      if (window.testRunner) {
> 
> No need for curly brackets here.

Done.
Comment 9 Martin Robinson 2013-08-19 06:47:41 PDT
(In reply to comment #8)
> (In reply to comment #6)
> 
> Thanks for the review.

Looks good to me, assuming this is how other ports work.
Comment 10 Hurnjoo Lee 2013-08-19 19:17:43 PDT
Created attachment 209148 [details]
patch for landing
Comment 11 WebKit Commit Bot 2013-08-19 23:47:38 PDT
Comment on attachment 209148 [details]
patch for landing

Clearing flags on attachment: 209148

Committed r154316: <http://trac.webkit.org/changeset/154316>
Comment 12 WebKit Commit Bot 2013-08-19 23:47:41 PDT
All reviewed patches have been landed.  Closing bug.