• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## 7.9\. Virtual Reality
2
3Android includes APIs and facilities to build "Virtual Reality" (VR)
4applications including high quality mobile VR experiences. Device
5implementations MUST properly implement these APIs and behaviors,
6as detailed in this section.
7
8### 7.9.1\. Virtual Reality Mode
9
10Android includes support for [VR Mode](
11https://developer.android.com/reference/android/app/Activity.html#setVrModeEnabled%28boolean, android.content.ComponentName%29),
12a feature which handles stereoscopic rendering of notifications and disables
13monocular system UI components while a VR application has user focus.
14
15If Handheld device implementations include support for the VR mode, they:
16
17*   [H-1-1] MUST declare the `android.software.vr.mode` feature.
18
19If device implementations declare `android.software.vr.mode` feature, they:
20
21*   [H-2-1] MUST include an application implementing
22`android.service.vr.VrListenerService`
23that can be enabled by VR applications via
24`android.app.Activity#setVrModeEnabled`.
25
26### 7.9.2\. Virtual Reality High Performance
27
28
29If Handheld device implementations are capable of meeting all the requirements
30to declare the `android.hardware.vr.high_performance` feature flag, they:
31
32*   [H-1-1] MUST declare the `android.hardware.vr.high_performance`
33feature flag.
34
35If device implementations identify the support of high performance VR
36for longer user periods through the `android.hardware.vr.high_performance`
37feature flag, they:
38
39*   [C-1-1] MUST have at least 2 physical cores.
40*   [C-1-2] MUST declare `android.software.vr.mode feature`.
41*   [C-1-3] MUST support sustained performance mode.
42*   [C-1-4] MUST support OpenGL ES 3.2.
43*   [C-1-5] MUST support Vulkan Hardware Level 0 and SHOULD support
44    Vulkan Hardware Level 1.
45*   [C-1-6] MUST implement
46    [`EGL_KHR_mutable_render_buffer`](https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_mutable_render_buffer.txt),
47    [`EGL_ANDROID_front_buffer_auto_refresh`](https://www.khronos.org/registry/EGL/extensions/ANDROID/EGL_ANDROID_front_buffer_auto_refresh.txt),
48    [`EGL_ANDROID_get_native_client_buffer`](https://www.khronos.org/registry/EGL/extensions/ANDROID/EGL_ANDROID_get_native_client_buffer.txt),
49    [`EGL_KHR_fence_sync`](https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt),
50    [`EGL_KHR_wait_sync`](https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_wait_sync.txt),
51    [`EGL_IMG_context_priority`](https://www.khronos.org/registry/EGL/extensions/IMG/EGL_IMG_context_priority.txt),
52    [`EGL_EXT_protected_content`](https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_protected_content.txt),
53    and expose the extensions in the list of available EGL extensions.
54*   [C-1-7] The GPU and display MUST be able to synchronize access to the shared
55front buffer such that alternating-eye rendering of VR content at 60fps with two
56render contexts will be displayed with no visible tearing artifacts.
57*   [C-1-8] MUST implement
58    [`GL_EXT_multisampled_render_to_texture`](https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_multisampled_render_to_texture.txt),
59    [`GL_OVR_multiview`](https://www.khronos.org/registry/OpenGL/extensions/OVR/OVR_multiview.txt),
60    [`GL_OVR_multiview2`](https://www.khronos.org/registry/OpenGL/extensions/OVR/OVR_multiview2.txt),
61    [`GL_OVR_multiview_multisampled_render_to_texture`](https://www.khronos.org/registry/OpenGL/extensions/OVR/OVR_multiview_multisampled_render_to_texture.txt),
62    [`GL_EXT_protected_textures`](https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_protected_textures.txt),
63    and expose the extensions in the list of available GL extensions.
64*   [C-1-9] MUST implement support for [`AHardwareBuffer`](https://developer.android.com/ndk/reference/hardware__buffer_8h.html)
65    flags `AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER` and
66    `AHARDWAREBUFFER_USAGE_SENSOR_DIRECT_DATA` as
67    described in the NDK.
68*   [C-1-10] MUST implement support for `AHardwareBuffers` with more than one
69layer.
70*   [C-1-11] MUST support H.264 decoding at least 3840x2160@30fps-40Mbps
71(equivalent to 4 instances of 1920x1080@30fps-10Mbps or 2 instances of
721920x1080@60fps-20Mbps).
73*   [C-1-12] MUST support HEVC and VP9, MUST be capable to decode at least
74    1920x1080@30fps-10Mbps and SHOULD be capable to decode
75    3840x2160@30fps-20Mbps (equivalent to
76    4 instances of 1920x1080@30fps-5Mbps).
77*   [C-1-13] MUST support `HardwarePropertiesManager.getDeviceTemperatures` API
78and return accurate values for skin temperature.
79*   [C-1-14] MUST have an embedded screen, and its resolution MUST be at least be
80    FullHD(1080p) and STRONGLY RECOMMENDED TO BE  be QuadHD (1440p) or higher.
81*   [C-1-15] The display MUST measure between 4.7" and 6.3" diagonal.
82*   [C-1-16] The display MUST update at least 60 Hz while in VR Mode.
83*   [C-1-17] The display latency on Gray-to-Gray, White-to-Black, and
84Black-to-White switching time MUST be ≤ 3 ms.
85*   [C-1-18] The display MUST support a low-persistence mode with ≤5 ms
86persistence, persistence being defined as the amount of time for
87which a pixel is emitting light.
88*   [C-1-19] MUST support Bluetooth 4.2 and Bluetooth LE Data Length Extension
89    [section 7.4.3](#7_4_3_bluetooth).
90*   [SR] STRONGLY RECOMMENDED to support
91    `android.hardware.sensor.hifi_sensors` feature and MUST meet the gyroscope,
92    accelerometer, and magnetometer related requirements for
93    `android.hardware.hifi_sensors`.
94*   MAY provide an exclusive core to the foreground
95    application and MAY support the `Process.getExclusiveCores` API to return
96    the numbers of the cpu cores that are exclusive to the top foreground
97    application. If exclusive core is supported then the core MUST not allow
98    any other userspace processes to run on it (except device drivers used
99    by the application), but MAY allow some kernel processes to run as
100    necessary.
101