Open Bug 950869 Opened 12 years ago Updated 3 years ago

2D canvas: Drawing an image into a clip is faulty

Categories

(Core :: Graphics: Canvas2D, defect)

28 Branch
ARM
Gonk (Firefox OS)
defect

Tracking

()

UNCONFIRMED

People

(Reporter: tharedmoose, Unassigned)

Details

Attachments

(4 files)

Attached image FxOS.png
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release) Build ID: 20131214004001 Steps to reproduce: <html> <head> <meta charset="utf-8" /> <title>2D canvas: Drawing an image into a clip is faulty</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> </head> <body> <!-- I randomly discovered that changing the canvas' width fixes the problem. Anything higher than 127 seems to break the rendering...bizarre. Seems to be linked to canvas height as well, but can't put my finger on what. --> <canvas id="stage" width="128" height="200" style="background-color: gray;"></canvas> <script type="text/javascript"> var img = new Image(); img.onload = handleImageLoad; img.src = "daisy.png"; function handleImageLoad () { var stage = document.getElementById("stage"), ctx = stage.getContext("2d"); ctx.beginPath(); ctx.arc(35, 25, 20, 0, Math.PI * 2); ctx.clip(); ctx.drawImage(img, 0, 0); } </script> </body> </html> Device: Keon Platform Version: 26.0 OS: FxOS 1.2.0.0-prerelease (20131215225106) Actual results: Seeing a bunch of garbled pixels. See FxOS.png Expected results: Should see an image that's been clipped by a circle.
Attached image FFDesktop.png
This is what it SHOULD look like (seen in Firefox on desktop)
Attached image daisy.png
The image used in the example.
Attached file masks.html
The HTML document (for convenience).
Component: Gaia::Browser → Canvas: 2D
OS: All → Gonk (Firefox OS)
Product: Firefox OS → Core
Hardware: All → ARM
Version: unspecified → 28 Branch
Moved it into the right group and platform. This should give it better visibility. If not, we'll escalate.
kbrosnan, is this something you can help get to the right people so the bug can be confirmed? Thanks!
Flags: needinfo?(kbrosnan)
Over to JSmith.
Flags: needinfo?(kbrosnan)
What I need to understand here is if this is a regression or not. Did this happen on a 1.1 Keon build?
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: