Bug 34027 - Canvas globalCompositeOperation does not render destination-in or destination-atop correctly
Summary: Canvas globalCompositeOperation does not render destination-in or destination...
Status: RESOLVED DUPLICATE of bug 39177
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Major
Assignee: Nobody
URL: https://developer.mozilla.org/samples...
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2010-01-22 16:30 PST by Steven Littiebrant
Modified: 2010-08-16 03:25 PDT (History)
2 users (show)

See Also:


Attachments
my render results - note destination-in and destination-atop (12.60 KB, image/png)
2010-01-22 16:30 PST, Steven Littiebrant
no flags Details
Reduction (1.17 KB, text/html)
2010-01-22 16:45 PST, Steven Littiebrant
no flags Details
Correct render results (5.96 KB, image/png)
2010-01-22 16:52 PST, Steven Littiebrant
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Littiebrant 2010-01-22 16:30:00 PST
Created attachment 47243 [details]
my render results - note destination-in and destination-atop

Summary describes the problem.  This exists in Safari 4.0.4 as well as nightlies, and I'm not sure about other possible versions, but it likely affects them all.

In more detail, for searching & future reference:
When a canvas' globalCompositeOperation is set to "destination-in" or "destination-atop", WebKit does not render correctly.
Destination-in should retain the destination data where the new object overlaps, and the new object should not appear at all.  Currently, the entire destination is retained, and the source does not appear.
Destination-atop should retain the destination data where the new object overlaps, and the new object should appear where not covered by the destination.  Currently, the destination is fully retained, and the new object appears to be drawn "under", though I cannot attest to what's actually being rendered.

Expected render results:
https://developer.mozilla.org/en/Canvas_tutorial%3aCompositing#globalCompositeOperation

Final render results:
https://developer.mozilla.org/samples/canvas-tutorial/6_1_canvas_composite.html

My render results are attached.
Comment 1 Steven Littiebrant 2010-01-22 16:45:24 PST
Created attachment 47245 [details]
Reduction

Code is modified from the Mozilla website linked originally.
Comment 2 Steven Littiebrant 2010-01-22 16:52:52 PST
Created attachment 47246 [details]
Correct render results

Also from the Mozilla site, these are what should have rendered.
Comment 3 Steven Littiebrant 2010-02-01 13:43:16 PST
Noted that it has a reduction.
Comment 4 Shinichiro Hamaji 2010-08-16 03:25:16 PDT
Merging this bug as Bug 39177 seems to be more generic.

*** This bug has been marked as a duplicate of bug 39177 ***