Auto merge of #22773 - paulrouget:immersive, r=jdm

Support for ExternalVR implementation

This PR adds the hook necessary for the ExternalVR rust-webvr driver.
Waiting on rust-webvr 0.9.3 to be published before landing.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22773)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-02-07 00:17:26 -05:00 committed by GitHub
commit 6c161e5037
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 66 additions and 13 deletions

View file

@ -73,6 +73,7 @@ public class JNIServo {
public int height = 0;
public float density = 1;
public boolean enableSubpixelTextAntialiasing = true;
public long VRExternalContext = 0;
public String logStr;
public boolean enableLogs = false;
}

View file

@ -36,6 +36,7 @@ public class ServoSurface {
private Surface mASurface;
private int mWidth;
private int mHeight;
private long mVRExternalContext;
private Servo mServo;
private Client mClient = null;
private String mServoArgs;
@ -69,6 +70,10 @@ public class ServoSurface {
mActivity = activity;
}
public void setVRExternalContext(long context) {
mVRExternalContext = context;
}
public void runLoop() {
mGLThread.start();
}
@ -265,6 +270,7 @@ public class ServoSurface {
options.logStr = mServoLog;
options.enableLogs = true;
options.enableSubpixelTextAntialiasing = false;
options.VRExternalContext = mVRExternalContext;
mServo = new Servo(options, this, mSurface, mClient, mActivity);
});