[Webkit-unassigned] [Bug 43210] Open GL ES 2 backend for canvas 2d

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 29 17:57:40 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43210





--- Comment #11 from Stephen White <senorblanco at chromium.org>  2010-07-29 17:57:40 PST ---
(In reply to comment #7)
> (In reply to comment #5)
> 
> > The idea is to code things to OpenGL ES 2.0 and then have a glue layer for desktop GLs (when needed).  In Chrome we have such a shim layer (like Stephen said) but for other ports I think the only shim layer needed is a few #defines for functions that have different names between desktop GL and GL ES 2.0 since ES is essentially a subset of what has existed in desktop GL for a while now.
> 
> But what you're talking about is exactly what GraphicsContext3D does. It is designed as an API which serves the needs of WebGL. Today it has backends for Mac OpenGL for WebKit, and Mac/Windows/Linux OpenGL for Chrome. It will soon have a backend for D3D via ANGLE and at some point it will no doubt have a true OpenGL ES 2.0 backend for mobile devices. If you ported the 2D Canvas code on top of that, it can be used on all the above back ends.
> 
> Porting directly to ES 2.0 with glue for desktop OpenGL is just duplicating effort. Seems like a version of GraphicsContext (which is what 2D Canvas uses) on top of GraphicsContext3D would give you what you want and would be easier to write.

We considered many different approaches when we looked at this issue.  However, due to Chrome's sandbox model, we don't make any GL or D3D calls directly from the renderer process, so we couldn't use any of the GC3D backends other than the marshalled OpenGL ES 2.0 one anyway.

Thus, I don't think GraphicsContext3D would buy us much for Chrome, except a layer of indirection we don't need.  I can see how it might make life easier for other ports, though, so it's something we could look at once the WebGL-isms have been factored out.  At that point, it should be fairly straightforward to convert the GLES2Canvas code to use it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list