Closed Bug 1324648 Opened 7 years ago Closed 7 years ago

Use GLContext to get GL functions pointers for webrender

Categories

(Core :: Graphics: WebRender, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file, 4 obsolete files)

By using GLContext for getting GL functions pointers, GLContext and webrender become consistent and bindings.js becomes simpler.
Assignee: nobody → sotaro.ikeda.g
Attachment #8820147 - Attachment is obsolete: true
Attachment #8820157 - Attachment is obsolete: true
Blocks: 1323612
Attachment #8820165 - Flags: review?(bugmail)
Comment on attachment 8820165 [details] [diff] [review]
patch - Use GLContext to get GL functions pointers for webrender

Review of attachment 8820165 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/gl/GLLibraryLoader.cpp
@@ +42,5 @@
>  
>  PRFuncPtr
> +GLLibraryLoader::LookupSymbol(const char* sym)
> +{
> +    return LookupSymbol(mLibrary,sym, mLookupFunc);

nit: put a space before |sym|.

::: gfx/layers/wr/WebRenderBridgeParent.cpp
@@ +22,5 @@
>  {
>    return mozilla::layers::CompositorThreadHolder::IsInCompositorThread();
>  }
>  
> +void* get_proc_address_from_glcontext(void* webrender_bridge_ptr, const char* procname)

Instead of passing a pointer to the WebRenderBridgeParent, can we pass a pointer to the GLContext instead? That seems a little safer and more direct. The WebRenderBridgeParent constructor already has the mGLContext so you don't need to break out the separate Init() function, and then in this callback you can cast the pointer back to a GLContext.

@@ +88,5 @@
>    MOZ_ASSERT(mGLContext);
>    MOZ_ASSERT(mCompositor);
> +}
> +void
> +WebRenderBridgeParent::Init()

If you leave Init() as a separate function, put a blank line before it
Attachment #8820165 - Flags: review?(bugmail) → review+
(In reply to Sotaro Ikeda [:sotaro] from comment #4)
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=3072b0ccb5da79a973883cdcb55943691636f76d

Note that you can restrict the try push to the QR builds by doing something like this:

try: -b do -p macosx64-qr,linux64-qr,win64-qr -u all[linux64-qr] -t none
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #6)
> (In reply to Sotaro Ikeda [:sotaro] from comment #4)
> > https://treeherder.mozilla.org/#/
> > jobs?repo=try&revision=3072b0ccb5da79a973883cdcb55943691636f76d
> 
> Note that you can restrict the try push to the QR builds by doing something
> like this:
> 
> try: -b do -p macosx64-qr,linux64-qr,win64-qr -u all[linux64-qr] -t none

Thanks for the advice!
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #5)
> 
> ::: gfx/layers/wr/WebRenderBridgeParent.cpp
> @@ +22,5 @@
> >  {
> >    return mozilla::layers::CompositorThreadHolder::IsInCompositorThread();
> >  }
> >  
> > +void* get_proc_address_from_glcontext(void* webrender_bridge_ptr, const char* procname)
> 
> Instead of passing a pointer to the WebRenderBridgeParent, can we pass a
> pointer to the GLContext instead?

I am going to update the patch as to use GLContext.
Apply the comments.
Attachment #8820165 - Attachment is obsolete: true
Attachment #8820511 - Flags: review+
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/19a951289cad
Use GLContext to get GL functions pointers for webrender r=nical
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
(In reply to Pulsebot from comment #12)
> Pushed by sikeda@mozilla.com:
> https://hg.mozilla.org/projects/graphics/rev/19a951289cad
> Use GLContext to get GL functions pointers for webrender r=nical

Sorry, reviewer was :kats.
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: