Create EGL surfaces through nsIWidget

RESOLVED FIXED in Firefox 46

Status

()

Firefox for Android
Toolbar
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jchen, Assigned: jchen)

Tracking

(Blocks: 1 bug)

unspecified
Firefox 46
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox46 fixed)

Details

Attachments

(2 attachments, 1 obsolete attachment)

Right now we create EGL surfaces through AndroidBridge, but we should create them through nsIWidget to support multiple windows.
Created attachment 8698203 [details] [diff] [review]
Create EGL surface through widget (v1)

This patch makes GLContextProviderEGL create EGL surfaces through
nsWindow/nsIWidget on Android. nsWindow then calls GLController in Java
to actually create the surface.
Attachment #8698203 - Flags: review?(snorp)
Created attachment 8698204 [details] [diff] [review]
Save widget in GLContextEGL for renewing surface (v1)

This patch adds a widget member to GLContextEGL, so that it can later
use it to renew surfaces.
Attachment #8698204 - Flags: review?(snorp)
Comment on attachment 8698203 [details] [diff] [review]
Create EGL surface through widget (v1)

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

We want to kill GLController entirely eventually, but this is a good step towards that.
Attachment #8698203 - Flags: review?(snorp) → review+
Comment on attachment 8698204 [details] [diff] [review]
Save widget in GLContextEGL for renewing surface (v1)

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

As discussed, I don't think we want this. The compositor has the widget when it asks us to renew, so it should probably just pass it in.
Attachment #8698204 - Flags: review?(snorp) → review-
Created attachment 8700124 [details] [diff] [review]
Renew EGL surface using existing compositor widget (v1)

Add a widget parameter to RenewSurface so that the compositor can pass in its
widget.
Attachment #8700124 - Flags: review?(snorp)
Attachment #8698204 - Attachment is obsolete: true
Comment on attachment 8700124 [details] [diff] [review]
Renew EGL surface using existing compositor widget (v1)

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

I like it, but lets get another gfx person to review.

::: gfx/gl/GLContextEAGL.h
@@ +59,5 @@
>      virtual GLuint GetDefaultFramebuffer() override {
>          return mBackbufferFB;
>      }
>  
> +    virtual bool RenewSurface(nsIWidget* aWidget) override {

This is wrong for UIKit, but maybe just add something like:

// FIXME: should use the passed widget instead of the existing one
Attachment #8700124 - Flags: review?(snorp)
Attachment #8700124 - Flags: review?(jgilbert)
Attachment #8700124 - Flags: review+
Attachment #8700124 - Flags: review?(jgilbert) → review+

Comment 7

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/4b23cb28ee3d
https://hg.mozilla.org/integration/mozilla-inbound/rev/fa4764e92630

Comment 8

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4b23cb28ee3d
https://hg.mozilla.org/mozilla-central/rev/fa4764e92630
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox46: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
You need to log in before you can comment on or make changes to this bug.