Last Comment Bug 653658 - JavaScript implementation of WebGL MOZ_dom_element_texture extension
: JavaScript implementation of WebGL MOZ_dom_element_texture extension
Product: Firefox
Classification: Client Software
Component: Developer Tools (show other bugs)
: unspecified
: All All
P2 normal (vote)
: ---
Assigned To: Cedric Vivier [:cedricv]
: J. Ryan Stinnett [:jryans] (use ni?)
Depends on: 653656
Blocks: 703910
  Show dependency treegraph
Reported: 2011-04-28 22:45 PDT by Cedric Vivier [:cedricv]
Modified: 2012-01-19 01:11 PST (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

First version. Completely untested. (12.03 KB, application/javascript)
2011-07-20 06:17 PDT, Cedric Vivier [:cedricv]
no flags Details

Description User image Cedric Vivier [:cedricv] 2011-04-28 22:45:01 PDT
Implement MOZ_dom_element_texture (#653656) as a JavaScript shim using canvas.drawWindow or similar.

Won't provide awesome performance, but it shouldn't take much time to do and it will validate the extension's semantics, which is a good thing before working on #653657.
Comment 1 User image Kevin Dangoor 2011-05-11 11:27:53 PDT
This doesn't seem like a Developer Tools bug?
Comment 2 User image Cedric Vivier [:cedricv] 2011-05-11 18:36:55 PDT
I think this is, I thought one of us at DevTools (Victor?) would implement this.
This is a JavaScript shim that can be implemented by Tilt directly with currently available APIs... when the extension API is agreed upon (canvas.webgl bug #653656)

Not very efficient but this does not require native implementation, which will take longer to write/review/land.
We will then switch to the efficient native implementation (which is definitely a canvas.webgl bug) as soon it lands with no change.
Comment 3 User image Rob Campbell [:rc] (:robcee) 2011-05-11 18:38:34 PDT
yup. I agree with Cedric that this is something that we can and should do. We are the primary consumers of this shim.
Comment 4 User image Cedric Vivier [:cedricv] 2011-06-29 07:10:31 PDT
This is a placeholder for the native/optimized implementation of the extension, reusing underlying textures (or FBOs?) when possible.

First we need to all agree on a sane design for #653656, and it does not seem necessary for now as Tilt's framerate seems quite acceptable as it does not do interactive refresh yet afaik (the native implementation will be probably needed for interactive refresh rates - especially on pages using canvas or video heavily).

Additionally it might not make sense to implement this natively before Azure is ready, depending whether or not access to underlying gfx objects is going to significantly change. Benoit?
Comment 5 User image Cedric Vivier [:cedricv] 2011-06-29 07:13:04 PDT
Please ignore comment #4. It was intended for #653657.
Comment 6 User image Cedric Vivier [:cedricv] 2011-07-20 06:17:16 PDT
Created attachment 547059 [details]
First version. Completely untested.
Comment 7 User image Cedric Vivier [:cedricv] 2011-08-02 22:16:14 PDT
Need to update according to comment #26 over at #653656.

- add readWindowTexCoords, always [0.0,0.0, <stride>, 0.0,1.0, <stride>, 1.0,1.0, <stride>, 1.0,0.0] in the shim
Comment 8 User image Victor Porof [:vporof][:vp] 2012-01-17 08:30:57 PST
We're getting closer to making our tools update themselves. This would be a great start for Tilt, maybe we can start playing with this again? See also bug 703910.
Comment 9 User image Victor Porof [:vporof][:vp] 2012-01-17 10:45:05 PST
Or we could skip this entirely and focus on the actual bug 653656 and bug 653657. I would somewhat prefer the latter, because wasting time on a JavaScript shim that is temporary anyway and doesn't really help much is probably not a good idea.

Cedric, what do you think?
Comment 10 User image Cedric Vivier [:cedricv] 2012-01-19 00:49:52 PST
(In reply to Victor Porof from comment #9)
> Or we could skip this entirely and focus on the actual bug 653656 and bug
> 653657. I would somewhat prefer the latter
> Cedric, what do you think?

I think that's reasonable since the proposed API in bug 653656 seems to be in a good shape now (there's still a few issues to answer/validate tho).
Comment 11 User image Victor Porof [:vporof][:vp] 2012-01-19 01:11:36 PST
Ok, I'll mark bug 653656 as P2.

Note You need to log in before you can comment on or make changes to this bug.