Closed Bug 1248398 Opened 8 years ago Closed 7 years ago

canvas2d clearRect ignores clipping region

Categories

(Core :: Graphics, defect, P3)

44 Branch
Unspecified
macOS
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox44 - wontfix
firefox45 - wontfix
firefox46 --- fixed
firefox-esr38 --- unaffected

People

(Reporter: neil.morrison44, Unassigned)

References

Details

(Keywords: regression, testcase, Whiteboard: gfx-noted)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36

Steps to reproduce:

http://jsfiddle.net/wbf2930a/3/

within a canvas 2d context, begin a path, draw an arc, then clip(), clearRect an area containing the clipped region.

FireFox 44.0.2 on OSX El Capitan version 10.11.3


Actual results:

The entirety of the canvas will be cleared, not just the rect defined in clearRect.


Expected results:

The cleared area should have been limited to the clipped region.
(as happens in Chrome, Safari, IE etc)
Component: Untriaged → Canvas: 2D
Keywords: testcase
Product: Firefox → Core
Version: 44 Branch → unspecified
[Tracking Requested - why for this release]: regression from enabling SkiaGL on Mac OS X (bug 1150944) and fixed with a Skia update in Firefox 46. As highlighted in bug 1248525 this is probably too risky to uplift and the alternative is turning off SkiaGL in Beta/Release. The work around is to simply use Developer Edition.
Blocks: 1150944
Whiteboard: gfx-noted
Version: unspecified → 44 Branch
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to Sylvestre Ledru [:sylvestre] from comment #3)
> Same as in bug 1248525

Noting here as well that I had looked into this. I could not manage to isolat ea simple fix to backport for this one from the Skia update. So I agree on waiting for 46 for the fix to come in.
I have seen this in Firefox 44 and 45 with this simple use case: http://jsfiddle.net/6r63fan0/3/. It should show a red square with two overlapping white squares in the top left corner. But in firefox on two macs it just shows a white square. (but not on my linux machine).

the user agents and graphics cards for the machines I saw it on are below:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Firefox/45.0
AMD Radeon HD 6750M 512 MB

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:44.0) Gecko/20100101 Firefox/44.0
Intel HD Graphics 5000 (1536 MB VRAM)
A workaround that worked for me, is using globalCompositeOperation = 'destination-out' and using fillRect instead of clearRect.
Fixed since long ago in 46 with Skia update, and older branches than that are wontfix, so just closing this out.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.