Skip to content
This repository was archived by the owner on Nov 8, 2019. It is now read-only.

Commit 6aef4ab

Browse files
committed
GVR Android SDK v1.101.0
1 parent 2b8db5b commit 6aef4ab

37 files changed

+93
-59
lines changed

apks/controller_emulator.apk

5.25 KB
Binary file not shown.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ task clean(type: Delete) {
3333
// The dependencies for NDK builds live inside the .aar files so they need to
3434
// be extracted before NDK targets can build.
3535
task extractAudioSo(type: Copy) {
36-
from zipTree("${project.rootDir}/libraries/sdk-audio-1.100.0.aar")
36+
from zipTree("${project.rootDir}/libraries/sdk-audio-1.101.0.aar")
3737
into "${project.rootDir}/libraries/"
3838
include "jni/**/libgvr_audio.so"
3939
}
4040

4141
task extractGvrSo(type: Copy) {
42-
from zipTree("${project.rootDir}/libraries/sdk-base-1.100.0.aar")
42+
from zipTree("${project.rootDir}/libraries/sdk-base-1.101.0.aar")
4343
into "${project.rootDir}/libraries/"
4444
include "jni/**/libgvr.so"
4545
}

libraries/headers/vr/gvr/capi/include/gvr.h

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,23 @@ gvr_sizei gvr_frame_get_buffer_size(const gvr_frame* frame, int32_t index);
775775
/// submitted.
776776
int32_t gvr_frame_get_framebuffer_object(const gvr_frame* frame, int32_t index);
777777

778+
/// Gets the hardware buffer backing the specified frame buffer.
779+
///
780+
/// Hardware buffers (Android NDK type AHardwareBuffer) are used to back frames
781+
/// if asynchronous reprojection is enabled and GVR_FEATURE_HARDWARE_BUFFERS is
782+
/// supported (currently on Android O and later Android versions). See the
783+
/// documentation for the feature enum value for further information.
784+
///
785+
/// There is no need to acquire or release the AHardwareBuffer. The swap chain
786+
/// maintains a reference to it while the frame is acquired.
787+
///
788+
/// @param frame The gvr_frame from which to obtain the buffer.
789+
/// @param index Index of the pixel buffer.
790+
/// @return Pointer to AHardwareBuffer backing the frame's pixel buffer where
791+
/// available, or NULL otherwise.
792+
AHardwareBuffer* gvr_frame_get_hardware_buffer(const gvr_frame* frame,
793+
int32_t index);
794+
778795
/// Submits the frame for distortion and display on the screen. The passed
779796
/// pointer is nulled to prevent reuse.
780797
///
@@ -1273,10 +1290,15 @@ class Frame : public WrapperBase<gvr_frame> {
12731290
}
12741291

12751292
/// For more information, see gvr_frame_get_framebuffer_object().
1276-
int32_t GetFramebufferObject(int32_t index) {
1293+
int32_t GetFramebufferObject(int32_t index) const {
12771294
return gvr_frame_get_framebuffer_object(cobj(), index);
12781295
}
12791296

1297+
/// For more information, see gvr_frame_get_hardware_buffer().
1298+
void* GetHardwareBuffer(int32_t index) const {
1299+
return gvr_frame_get_hardware_buffer(cobj(), index);
1300+
}
1301+
12801302
/// For more information, see gvr_frame_submit().
12811303
void Submit(const BufferViewportList& viewport_list,
12821304
const Mat4f& head_space_from_start_space) {

libraries/headers/vr/gvr/capi/include/gvr_types.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ typedef enum {
7272
/// Support for providing head poses with 6 degrees-of-freedom (orientation
7373
/// and position).
7474
GVR_FEATURE_HEAD_POSE_6DOF = 3,
75+
/// Indicates that buffers which are part of a frame are backed by Android
76+
/// AHardwareBuffer objects. When this feature is available, the function
77+
/// gvr_frame_get_hardware_buffer can be called to get the AHardwareBuffer
78+
/// pointer.
79+
/// Hardware buffers are only supported on Android O and later, on a
80+
/// best-effort basis. Future versions of GVR and/or Android may also cease to
81+
/// support hardware buffers if the underlying implementation no longer
82+
/// supports this rendering path.
83+
GVR_FEATURE_HARDWARE_BUFFERS = 4,
7584
} gvr_feature;
7685

7786
/// @}
@@ -682,6 +691,9 @@ typedef enum {
682691

683692
/// @}
684693

694+
// Forward declaration of Android AHardwareBuffer.
695+
typedef struct AHardwareBuffer AHardwareBuffer;
696+
685697
#ifdef __cplusplus
686698
} // extern "C"
687699
#endif
Binary file not shown.

libraries/sdk-audio-1.100.0.pom renamed to libraries/sdk-audio-1.101.0.pom

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-audio</artifactId>
7-
<version>1.100.0</version>
7+
<version>1.101.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-Audio</name>
@@ -19,7 +19,7 @@
1919
<groupId>com.google.vr</groupId>
2020
<artifactId>sdk-base</artifactId>
2121
<type>aar</type>
22-
<version>1.100.0</version>
22+
<version>1.101.0</version>
2323
</dependency>
2424
</dependencies>
2525
</project>

libraries/sdk-base-1.100.0.aar

-2.51 MB
Binary file not shown.

libraries/sdk-base-1.101.0.aar

2.51 MB
Binary file not shown.

libraries/sdk-base-1.100.0.pom renamed to libraries/sdk-base-1.101.0.pom

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-base</artifactId>
7-
<version>1.100.0</version>
7+
<version>1.101.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-Base</name>
@@ -19,7 +19,7 @@
1919
<groupId>com.google.vr</groupId>
2020
<artifactId>sdk-common</artifactId>
2121
<type>aar</type>
22-
<version>1.100.0</version>
22+
<version>1.101.0</version>
2323
</dependency>
2424
</dependencies>
2525
</project>

libraries/sdk-common-1.100.0.aar

-695 KB
Binary file not shown.

0 commit comments

Comments
 (0)