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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 30 06:00:59 PDT 2010


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





--- Comment #12 from Chris Marrin <cmarrin at apple.com>  2010-07-30 06:00:59 PST ---
(In reply to comment #8)
> GraphicsContext3D is tightly coupled with WebGL and it seems odd to make a canvas 2d backend depend on WebGL.  Some ports (perhaps mobile) may want to use a GL-accelerated canvas but not compile WebGL in at all.  WebGL is very close to GL ES 2, so switching between the two is not very difficult in terms of amount of code, but I think it's a slight layering violation.

The only reason GraphicsContext3D is "tightly bound" to WebGL is because that is its only client. We named it GraphicsContext3D purposely to avoid it being simply a WebGL class.

> 
> Coding to OpenGL ES 2.0 will currently work without any changes or extra glue needed on Chromium on all platforms and on ANGLE.  To work on desktop OpenGL everywhere each port has to have a glue header with lines like this:
> 
> #define glBindFramebuffer glBindFramebufferEXT
> 
> guarded by the appropriate #ifdefs.

I'm not sure why you say that. The only place there are any OpenGL specific calls in in GraphicsContext3DMac, which is the Mac specific version of GraphicsContext3D. One that used Angle would have a different implementation. I'm just talking about using GraphicsContext3D as an interface with whatever backend is needed. If the code were similar enough you could do an implementation with ifdefs for both OpenGL and OpenGL ES, but that may not be the best approach.

-- 
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