Closed
Bug 528042
Opened 15 years ago
Closed 14 years ago
[webgl] missing ToDataURL()
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: ilmari.heikkinen, Assigned: vlad)
References
Details
Attachments
(1 file, 1 obsolete file)
3.37 KB,
patch
|
bjacob
:
review+
|
Details | Diff | Splinter Review |
ToDataURL does not work on WebGL canvases. Which means that the "View Image" and "Save Image As..." context menu items for the canvas do not work either. Try "View Image" on a WebGL canvas, e.g. on http://learningwebgl.com/lessons/lesson06/index.html The reason why ToDataURL does not work is because WebGLContext::GetInputStream in WebGLContext.cpp is commented out as broken and nsHTMLCanvasElement::ToDataURLImpl in nsHTMLCanvasElement.cpp does rv = GetContext(NS_LITERAL_STRING("2d"), getter_AddRefs(context)); instead of rv = GetContext(mCurrentContextId, getter_AddRefs(context)); (though what happens when mCurrentContextId is not set?) Attached patch makes ToDataURL work on WebGL canvases by implementing WebGLContext::GetInputStream and making nsHTMLCanvasElement::ToDataURLImpl use mCurrentContextId or "2d" when current context id is empty (which is bad as it fixes an unused canvas to 2D context on toDataURL.)
Comment 2•14 years ago
|
||
Comment on attachment 411797 [details] [diff] [review] Make ToDataURL work on WebGL contexts Asking Vlad to review this... i'm not competent ;-)
Attachment #411797 -
Flags: review?(vladimir)
Assignee | ||
Comment 3•14 years ago
|
||
Comment on attachment 411797 [details] [diff] [review] Make ToDataURL work on WebGL contexts This is quite old and needs to be completely changed for the current code; will get to it at some point.
Attachment #411797 -
Flags: review?(vladimir) → review-
Assignee | ||
Comment 5•14 years ago
|
||
Assignee: nobody → vladimir
Attachment #411797 -
Attachment is obsolete: true
Attachment #489557 -
Flags: review?(bjacob)
Updated•14 years ago
|
Attachment #489557 -
Flags: review?(bjacob) → review+
Assignee | ||
Comment 6•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/e5a34d3081b7
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•