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)
Tracking
()
UNCONFIRMED
People
(Reporter: tharedmoose, Unassigned)
Details
Attachments
(4 files)
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.
| Reporter | ||
Comment 1•12 years ago
|
||
This is what it SHOULD look like (seen in Firefox on desktop)
| Reporter | ||
Comment 2•12 years ago
|
||
The image used in the example.
| Reporter | ||
Comment 3•12 years ago
|
||
The HTML document (for convenience).
Updated•12 years ago
|
Component: Gaia::Browser → Canvas: 2D
OS: All → Gonk (Firefox OS)
Product: Firefox OS → Core
Hardware: All → ARM
Version: unspecified → 28 Branch
Comment 4•12 years ago
|
||
Moved it into the right group and platform. This should give it better visibility. If not, we'll escalate.
Comment 5•11 years ago
|
||
kbrosnan, is this something you can help get to the right people so the bug can be confirmed? Thanks!
Flags: needinfo?(kbrosnan)
Comment 7•11 years ago
|
||
What I need to understand here is if this is a regression or not. Did this happen on a 1.1 Keon build?
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•