Closed Bug 1465816 Opened 6 years ago Closed 6 years ago

Add Android support to gfxVRExternal

Categories

(Core :: WebVR, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: rbarker, Assigned: rbarker)

Details

(Whiteboard: [geckoview:fxr])

Attachments

(1 file)

gfxVRExternal needs Android support so it may be used by FxR
Assignee: nobody → rbarker
Whiteboard: [geckoview:fxr]
Comment on attachment 8983253 [details]
Bug 1465816 - Add initial code needed to support gfxVRExternal on android

https://reviewboard.mozilla.org/r/249142/#review255382

This LGTM, thanks!
Attachment #8983253 - Flags: review?(kgilbert) → review+
Comment on attachment 8983253 [details]
Bug 1465816 - Add initial code needed to support gfxVRExternal on android

https://reviewboard.mozilla.org/r/249142/#review255508

r+ for Java bits

::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoVRManager.java:20
(Diff revision 1)
> -                }
> -            });
> -            return;
> -        }
> +    }
>  
> -        if (mGVRDelegate == null) {
> +    public static synchronized void setExternalContext(final long aExternalContext) {

No a-prefix for parameters in Java code

::: widget/android/GeckoVRManager.h:18
(Diff revision 1)
> -    : public mozilla::java::GeckoVRManager::Natives<mozilla::GeckoVRManager>
>  {
> -  typedef mozilla::java::GeckoVRManager::Natives<mozilla::GeckoVRManager> Super;
>  public:
> -  static void Init()
> -  {
> +  static void* GetExternalContext() {
> +    return (void*)mozilla::java::GeckoVRManager::GetExternalContext();

static_cast
Attachment #8983253 - Flags: review?(nchen) → review+
(In reply to Jim Chen [:jchen] [:darchons] from comment #4)
> Comment on attachment 8983253 [details]
> ::: widget/android/GeckoVRManager.h:18
> (Diff revision 1)
> > -    : public mozilla::java::GeckoVRManager::Natives<mozilla::GeckoVRManager>
> >  {
> > -  typedef mozilla::java::GeckoVRManager::Natives<mozilla::GeckoVRManager> Super;
> >  public:
> > -  static void Init()
> > -  {
> > +  static void* GetExternalContext() {
> > +    return (void*)mozilla::java::GeckoVRManager::GetExternalContext();
> 
> static_cast

static_cast won't work on a jlong, so changed it to a reinterpret_cast.
Pushed by rbarker@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/66a3146a7fce
Add initial code needed to support gfxVRExternal on android r=kip,jchen
I don't see how this patch is related. It is only for android and the pref isn't even enabled.
Flags: needinfo?(rbarker)
Okay, I think I see a potential problem. Will do a new try push.
Looks like it passes now:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=6b6318c01c3e7493349615effd79e440f0a9c2f0

Will push updated patch once inbound opens again.
Pushed by rbarker@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b077ffd9a84d
Add initial code needed to support gfxVRExternal on android r=kip,jchen
https://hg.mozilla.org/mozilla-central/rev/b077ffd9a84d
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: