Closed
Bug 877309
Opened 11 years ago
Closed 11 years ago
Drawing a webgl canvas to another canvas shows last bound framebuffer
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: wbaxter, Assigned: jgilbert)
Details
Attachments
(2 files)
4.82 KB,
text/plain
|
Details | |
978 bytes,
patch
|
bjacob
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36 Steps to reproduce: If you are doing offscreen rendering to a texture render target, and don't re-bind the primary framebuffer, then when you do a call like context2d.drawImage(webglCanvas, 0, 0), what you get is a copy of the last bound framebuffer, rather than the content that is actually showing on the WebGL canvas. This is not the result that the spec leads me to expect. I have a repro at http://www.billbaxter.com/rttRepro, and also attached. Actual results: If you call drawImage with the webgl canvas as the source, you seem to get the last framebuffer bound rather than the primary/screen framebuffer of the webgl canvas. Expected results: I think context2d.drawImage should never copy an offscreen framebuffer from a webgl canvas, but rather always the primary framebuffer.
Reporter | ||
Comment 1•11 years ago
|
||
Note that it seems that Firefox behaves the same whether or not preserveDrawingBuffer is set to true or not. In the case of preserveDrawingBuffer=false, the spec says you can't count on drawImage working properly unless you do it before returning from your requestAnimationFrame callback. You can turn preserveDrawingBuffer on in the demo with http://www.billbaxter.com/rttRepro?preserve
Updated•11 years ago
|
Component: Untriaged → Canvas: WebGL
Product: Firefox → Core
Assignee | ||
Comment 2•11 years ago
|
||
Yep, oops.
Assignee: nobody → jgilbert
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #756852 -
Flags: review?(bjacob)
Reporter | ||
Comment 3•11 years ago
|
||
Nice! Thanks for the quick fix.
Updated•11 years ago
|
Attachment #756852 -
Flags: review?(bjacob) → review+
Assignee | ||
Comment 4•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/338bb731eb55
Comment 5•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/338bb731eb55
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•