[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 16:32:36 PDT 2010


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





--- Comment #7 from Chris Marrin <cmarrin at apple.com>  2010-07-29 16:32:35 PST ---
(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.

> 
> If it turns out that there is some feature that isn't possibly to easily use on widely deloyed desktop Open GL then we can just be careful to avoid it.  However, I think GL ES 2.0 should serve as a good lowest common denominator to code against.

We've already had to deal with all these diffs in WebGL, as well as D3D diffs, which is why I say WebGL (via GraphicsContext3D) is the better model to use.

> 
> > Perhaps this would be better phrased as "GPU-based Hardware Acceleration for Canvas"?
> 
> People may want to write a Direct2D or <insert accelerated graphics library here> backend for canvas.  That would probably be served better by a separate master bug.

True. It may be useful to have a separate implementation of GraphicsContext on top of Direct2D, and I agree that would be a separate bug.

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