Open
Bug 1164912
Opened 10 years ago
Updated 2 years ago
globalAlpha fails under certain radial gradient conditions
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
People
(Reporter: srjh1982, Assigned: bas.schouten)
References
Details
(Keywords: regression, Whiteboard: gfx-noted)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36
Steps to reproduce:
Following js code fails to render correctly (with HTML canvas object of id "myCanvas"):
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
var gradient = ctx.createRadialGradient(50, 50, 40, 50,50,50);
gradient.addColorStop("0", "black");
gradient.addColorStop("0.5", "red");
gradient.addColorStop("1.0", "black");
ctx.globalAlpha = 0.5;
ctx.beginPath();
ctx.strokeStyle = gradient;
ctx.lineWidth = 10;
ctx.arc(50,50,45,0,2*Math.PI);
ctx.stroke();
The fault occurs when the radial gradient begins at a value other than zero.
Actual results:
Drawn object rendered with full alpha; no transparency.
Expected results:
Drawn object renders with partial transparency as per globalAlpha value.
Comment 1•10 years ago
|
||
Reproduced since Firefox7 on Windows
Disable HWA or set gfx.canvas.azure.backends = skia,cairo helps
Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=f53268a84b23&tochange=c0eaec585ea7
Triggered by:c0eaec585ea7 Bas Schouten — Bug 666097 - Fix radial gradient drawing in Azure. r=jrmuizel
Blocks: 666097
Status: UNCONFIRMED → NEW
status-firefox38:
--- → affected
status-firefox38.0.5:
--- → affected
status-firefox39:
--- → affected
status-firefox40:
--- → affected
status-firefox41:
--- → affected
status-firefox-esr31:
--- → affected
status-firefox-esr38:
--- → affected
Component: Untriaged → Graphics
Ever confirmed: true
Keywords: regression
OS: Unspecified → Windows
Product: Firefox → Core
Version: 37 Branch → Trunk
Comment 2•10 years ago
|
||
Updated•9 years ago
|
Component: Graphics → Canvas: 2D
Flags: needinfo?(bas)
Whiteboard: gfx-noted
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bas
Flags: needinfo?(bas)
Updated•8 years ago
|
Version: Trunk → 7 Branch
Assignee | ||
Comment 4•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/64388/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/64388/
Attachment #8771142 -
Flags: review?(jmuizelaar)
Updated•8 years ago
|
Attachment #8771142 -
Flags: review?(jmuizelaar) → review-
Comment 5•8 years ago
|
||
Comment on attachment 8771142 [details]
Bug 1164912: Respect DrawOptions alpha value when drawing complex radial gradients.
https://reviewboard.mozilla.org/r/64388/#review61736
Looks reasonable but please include a test
Updated•5 years ago
|
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•