Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

googlevr: Don't eagerly enable VR #28

Merged
merged 7 commits into from
Nov 30, 2018
Merged

Conversation

Manishearth
Copy link
Member

@Manishearth Manishearth commented Nov 28, 2018

This causes some weird framerate issues.

This now enables VR only when necessary.

I didn't update the checked in AAR file since I'm not sure what the right way to generate it. I was able to test with a GVRService-debug.aar file. (It would be nice if the googlevr folder documented how to check in changes)

also fixes servo/servo#22318

r? @MortimerGoro

the framerate is weird if you enable VR without using it
@Manishearth
Copy link
Member Author

When we start presenting we must force landscape mode (and fullscreen)

@@ -102,6 +108,10 @@ public void run() {
// Hide GvrLayout
FrameLayout rootLayout = (FrameLayout)mActivity.findViewById(android.R.id.content);
rootLayout.removeView(gvrLayout);

AndroidCompat.setVrModeEnabled(mActivity, false);
mActivity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the user was browsing in landscape before he enters VR? Should we save the last orientation before entering VR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I'll set it to _USER instead

@Manishearth
Copy link
Member Author

Done. I don't know how to properly update the AAR file (should I just do a debug build? that's what I've been using for testing), can you handle that when merging?

@Manishearth
Copy link
Member Author

Manishearth commented Nov 30, 2018

@bors-servo r=MortimerGoro

I poked into the aar, it's a release build. Built one and checked it in.

@Manishearth
Copy link
Member Author

Checked in an AAR update, a version bump, and instructions for generating the AAR.

r? @MortimerGoro

(I don't have merge access, so I'll need you to merge/publish this once done)

@jdm jdm merged commit 148deba into servo:master Nov 30, 2018
@MortimerGoro
Copy link
Contributor

Thanks @Manishearth! Yep copying that file is the way to update the AAR. You can also generate it from command line ./gradlew assembleRelease

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

googlevr only renders one eye
3 participants