Closed Bug 1567544 Opened 5 years ago Closed 5 years ago

Canvas SVG issue when using the Context2D "globalCompositeOperation" set to "destination-in"

Categories

(Core :: Graphics: Canvas2D, defect, P3)

68 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox-esr68 --- wontfix
firefox74 --- wontfix
firefox75 --- wontfix
firefox76 --- fixed

People

(Reporter: register, Assigned: adroitwhiz)

References

(Regression)

Details

(Keywords: parity-chrome, parity-edge, regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Firefox for Android

Steps to reproduce:

Define an HTML5 <canvas>, draw a plain image (i.e. with no transparent pixels) and then draw a SVG image containing some transparent pixels and some opaque pixels (i.e. a mask), with the canvas Context2D ""globalCompositeOperation" set to "destination-in", so as to apply a mask.

Actual results:

The SVG image is drawn as if the Context2D "globalCompositeOperation" were set to its default "source-over" value, and the SVG image simply overwrites the previously drawn image.

This occurs on desktop but also on the Android mobile application "Mozilla Firefox" v68.0.

Expected results:

The SVG image should have behaved like a mask.

I have attached a stand-alone HTML5 file which shows the bug and a work-around by using an intermediate canvas.

I can reproduce on Nightly70.0a1 windows10.
Edge44.18362.1.0 and Chrome 75.0.3770.142 works as expected

Status: UNCONFIRMED → NEW
Component: Untriaged → Canvas: 2D
Ever confirmed: true
Product: Firefox → Core
Keywords: regression
Regressed by: 603488

The priority flag is not set for this bug.
:lsalzman, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(lsalzman)
Flags: needinfo?(lsalzman)
Priority: -- → P3
Assignee: nobody → adroitwhiz
Status: NEW → ASSIGNED
Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1fe5ae0c8768
set composite op in DrawDirectlyToCanvas r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: