- Dana
That's in platform/ right? Go for it.
I don't think we want modules/ including gpu, those interfaces are also using std::string. We should instead move webgraphicscontext3d_command_buffer_impl.cc and friends into blink platform probably to remove the indirections.
webgraphicscontext3d_command_buffer_impl.cc is the implementation of the virtual base classes you're talking about. Those indirections should be in blink platform. I don't think we should be pulling gpu/ stuff into modules. We can certainly move code from modules down into platform though if that's better.
On Fri, Mar 11, 2016 at 2:45 PM, Elliott Sprehn <esp...@chromium.org> wrote:webgraphicscontext3d_command_buffer_impl.cc is the implementation of the virtual base classes you're talking about. Those indirections should be in blink platform. I don't think we should be pulling gpu/ stuff into modules. We can certainly move code from modules down into platform though if that's better.I think WebGraphicsContext3DCommandBufferImpl should be deleted at some point, or maybe I'm misunderstanding. Blink can use GLES2Interface, so there's no need for any "WebGraphicsContext3D" anything at all, which wraps GLES2Interface with a Web api. Is this wrong?
I see that now, that seems more reason this should have a platform wrapper. Look at the incantations in:I don't think we want that spread all over blink for any consumer of the low level API. Just like we don't use pthread APIs directly and use base thread stuff.
That's the whole purpose of platform/ it should make these low level APIs friendly.
Doing those 10 line incantations to talk to GLES2Interface all over blink is not worth removing this stuff. I don't think the code rename being slightly harder is motivation either.
Doing those 10 line incantations to talk to GLES2Interface all over blink is not worth removing this stuff. I don't think the code rename being slightly harder is motivation either.
On Fri, Mar 11, 2016 at 3:20 PM, Elliott Sprehn <esp...@chromium.org> wrote:Doing those 10 line incantations to talk to GLES2Interface all over blink is not worth removing this stuff. I don't think the code rename being slightly harder is motivation either.What's this "all over blink" you're talking about?
The only caller of WGC3D in modules is the WebGL context hookup. All it does is translating WebGL to GL, which is essentially the same thing. I'm not sure what extra "wrapper" you would want in the middle. WebGLRenderingContextBase *is* that wrapper.
On Fri, Mar 11, 2016 at 3:31 PM, Antoine Labour <pi...@chromium.org> wrote:On Fri, Mar 11, 2016 at 3:20 PM, Elliott Sprehn <esp...@chromium.org> wrote:Doing those 10 line incantations to talk to GLES2Interface all over blink is not worth removing this stuff. I don't think the code rename being slightly harder is motivation either.What's this "all over blink" you're talking about?
The only caller of WGC3D in modules is the WebGL context hookup. All it does is translating WebGL to GL, which is essentially the same thing. I'm not sure what extra "wrapper" you would want in the middle. WebGLRenderingContextBase *is* that wrapper.No it's not, it's the idl mapped API surface speced for JS.
On Fri, Mar 11, 2016 at 3:39 PM, Elliott Sprehn <esp...@chromium.org> wrote:On Fri, Mar 11, 2016 at 3:31 PM, Antoine Labour <pi...@chromium.org> wrote:On Fri, Mar 11, 2016 at 3:20 PM, Elliott Sprehn <esp...@chromium.org> wrote:Doing those 10 line incantations to talk to GLES2Interface all over blink is not worth removing this stuff. I don't think the code rename being slightly harder is motivation either.What's this "all over blink" you're talking about?
The only caller of WGC3D in modules is the WebGL context hookup. All it does is translating WebGL to GL, which is essentially the same thing. I'm not sure what extra "wrapper" you would want in the middle. WebGLRenderingContextBase *is* that wrapper.No it's not, it's the idl mapped API surface speced for JS.WebGL and GL are the same API. They're just as high or low level. I don't understand this discussion - it makes absolutely no sense to me.
On Fri, Mar 11, 2016 at 3:43 PM, Antoine Labour <pi...@chromium.org> wrote:On Fri, Mar 11, 2016 at 3:39 PM, Elliott Sprehn <esp...@chromium.org> wrote:On Fri, Mar 11, 2016 at 3:31 PM, Antoine Labour <pi...@chromium.org> wrote:On Fri, Mar 11, 2016 at 3:20 PM, Elliott Sprehn <esp...@chromium.org> wrote:Doing those 10 line incantations to talk to GLES2Interface all over blink is not worth removing this stuff. I don't think the code rename being slightly harder is motivation either.What's this "all over blink" you're talking about?
The only caller of WGC3D in modules is the WebGL context hookup. All it does is translating WebGL to GL, which is essentially the same thing. I'm not sure what extra "wrapper" you would want in the middle. WebGLRenderingContextBase *is* that wrapper.No it's not, it's the idl mapped API surface speced for JS.WebGL and GL are the same API. They're just as high or low level. I don't understand this discussion - it makes absolutely no sense to me.As a base of comparison, WebGL is to GL just as 2D canvas is to Skia. 2D canvas->Skia is done in Source/modules/canvas2d/. If it works for Skia, why is it not acceptable for GL?
On Fri, Mar 11, 2016 at 3:31 PM, Antoine Labour <pi...@chromium.org> wrote:On Fri, Mar 11, 2016 at 3:20 PM, Elliott Sprehn <esp...@chromium.org> wrote:Doing those 10 line incantations to talk to GLES2Interface all over blink is not worth removing this stuff. I don't think the code rename being slightly harder is motivation either.What's this "all over blink" you're talking about?
The only caller of WGC3D in modules is the WebGL context hookup. All it does is translating WebGL to GL, which is essentially the same thing. I'm not sure what extra "wrapper" you would want in the middle. WebGLRenderingContextBase *is* that wrapper.No it's not, it's the idl mapped API surface speced for JS. That thing is not the same as the low level interface in blink that talks to gl with, for example WebGraphicsContext3D is used in the <video> element, Canvas2DLayerBridge, ImageBuffer, DrawingBuffer, etc.
On Fri, Mar 11, 2016 at 3:48 PM, Antoine Labour <pi...@chromium.org> wrote:On Fri, Mar 11, 2016 at 3:43 PM, Antoine Labour <pi...@chromium.org> wrote:On Fri, Mar 11, 2016 at 3:39 PM, Elliott Sprehn <esp...@chromium.org> wrote:On Fri, Mar 11, 2016 at 3:31 PM, Antoine Labour <pi...@chromium.org> wrote:On Fri, Mar 11, 2016 at 3:20 PM, Elliott Sprehn <esp...@chromium.org> wrote:Doing those 10 line incantations to talk to GLES2Interface all over blink is not worth removing this stuff. I don't think the code rename being slightly harder is motivation either.What's this "all over blink" you're talking about?
The only caller of WGC3D in modules is the WebGL context hookup. All it does is translating WebGL to GL, which is essentially the same thing. I'm not sure what extra "wrapper" you would want in the middle. WebGLRenderingContextBase *is* that wrapper.No it's not, it's the idl mapped API surface speced for JS.WebGL and GL are the same API. They're just as high or low level. I don't understand this discussion - it makes absolutely no sense to me.As a base of comparison, WebGL is to GL just as 2D canvas is to Skia. 2D canvas->Skia is done in Source/modules/canvas2d/. If it works for Skia, why is it not acceptable for GL?What do you mean, CanvasRenderingContext2D uses abstractions like platform/graphics/Path.h. :)
Anyway I'm happy to talk this out over VC if you want to schedule a meeting. The parts of the system that have access to the DOM, ScriptValue, and all that stuff, are at a different abstraction layer.
- E
--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To post to this group, send email to platform-arc...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAMeTaZdsJG5-tOGJMoi6HeHPydL-1OPEOX15Q%3DKb3A8Mk0tjqA%40mail.gmail.com.
I agree with Elliott; that seems like a clear layering violation.Our layering principle is:core/ and module/ are for purely web platform features (accessible from IDLs). They can't touch Chromium stuff directly. If they need access to something in Chromium, they have to use it through platform/.platform/ is an indirection layer that can access Chromium stuff.
On Sun, Mar 13, 2016 at 10:36 PM, Yuta Kitamura <yu...@chromium.org> wrote:I agree with Elliott; that seems like a clear layering violation.Our layering principle is:core/ and module/ are for purely web platform features (accessible from IDLs). They can't touch Chromium stuff directly. If they need access to something in Chromium, they have to use it through platform/.platform/ is an indirection layer that can access Chromium stuff.So IIUC you mean that platform/ should never return a type that isn't also defined in platform/? What about types defined in gfx:: or base::?
Because code would continue to go through platform/ in order to get a gpu::gles2::GLES2Interface, which seems okay?
So IIUC you mean that platform/ should never return a type that isn't also defined in platform/? What about types defined in gfx:: or base::?
Because code would continue to go through platform/ in order to get a gpu::gles2::GLES2Interface, which seems okay?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAMYvS2didfVfYC7P6b4Aop5MO3vdpwPfXAN36rGAiLdpb7g4MA%40mail.gmail.com.
So IIUC you mean that platform/ should never return a type that isn't also defined in platform/? What about types defined in gfx:: or base::?Because code would continue to go through platform/ in order to get a gpu::gles2::GLES2Interface, which seems okay?platform/ can access and return gfx:: and base:: types, and only (limited places of) platform/ should be able to do that. If core/ and modules/ want to use gfx:: and base::, they need to go through the platform/ as a glue layer.
On Mon, Mar 14, 2016 at 4:18 PM, Kentaro Hara <har...@chromium.org> wrote:So IIUC you mean that platform/ should never return a type that isn't also defined in platform/? What about types defined in gfx:: or base::?Because code would continue to go through platform/ in order to get a gpu::gles2::GLES2Interface, which seems okay?platform/ can access and return gfx:: and base:: types, and only (limited places of) platform/ should be able to do that. If core/ and modules/ want to use gfx:: and base::, they need to go through the platform/ as a glue layer.Maybe all that is needed here is a type alias in platform?namespace blink {
using GLES2Interface = gpu::gles2::GLES2Interface;
}Is that what y'all are looking for here? (Ignoring the inconsistency with SkCanvas.) Or is that not enough?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAHtyhaRy_CmtEj2cwj%3Dyhb7P0cDJC_ANghfNc%3DVcMsgJ3pE_5g%40mail.gmail.com.
I want the methods that deal with strings to be wrapped in helper functions that create WTF::String, or take them as arguments. The code needs this clean up in general, for example:that shouldn't be using name.utf8().data(), it should invoke a method in platform that takes a WTF::String, which then uses StringUTF8Adaptor to avoid the copy.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAO9Q3iLpnsbLoqi4kiRJ_GqeULsdvF9L-3e1AhPT1wx5BFiCug%40mail.gmail.com.
The <10% of the functions in GLES2Interface that take raw C strings can be wrapped in helper functions (perhaps in a new GLES2Utils.h, like SkiaUtils.h?) that take a GLES2Interface* as well as the rest of the arguments in WTF::String form. However, it would still only be by convention that the raw underlying functions wouldn't be called. Will that be OK?