Commit 511e7f72 authored by bshe's avatar bshe Committed by Commit bot

Reland gvr upgrade

The original CL is here: https://codereview.chromium.org/2367673002/
It was reverted because of compile failure with gn flags:
is_debug=false
is_component_build=true
target_os="android"
The reason is gvr uses API that only available in Android N SDK. For
release build, proguard detected the dependancy and results a compile
error. N SDK is in the process of rolling to chromium
https://codereview.chromium.org/2350013004/
In this CL, I restricted WebVr to debug build only. This could unblock
us. And I will remove the is_debug restriction once N is in Chromium

BUG=389343
TBR=dtrainor@

Review-Url: https://codereview.chromium.org/2396663002
Cr-Commit-Position: refs/heads/master@{#423005}
parent b2fd3d47
...@@ -488,7 +488,7 @@ deps_os = { ...@@ -488,7 +488,7 @@ deps_os = {
Var('chromium_git') + '/external/github.com/GoogleChrome/custom-tabs-client.git' + '@' + 'c51efbddc4f976c88d15c730a79feba65ca857af', Var('chromium_git') + '/external/github.com/GoogleChrome/custom-tabs-client.git' + '@' + 'c51efbddc4f976c88d15c730a79feba65ca857af',
'src/third_party/gvr-android-sdk/src': 'src/third_party/gvr-android-sdk/src':
Var('chromium_git') + '/external/github.com/googlevr/gvr-android-sdk.git' + '@' + 'cff15311c7c1abbe77b3c714135dccc2009ee473', Var('chromium_git') + '/external/github.com/googlevr/gvr-android-sdk.git' + '@' + '25e7e14413229d4644a66be77e8f8ddeb3f91fe7',
}, },
} }
......
...@@ -117,7 +117,7 @@ declare_args() { ...@@ -117,7 +117,7 @@ declare_args() {
# Enable WebVR support by default on Android # Enable WebVR support by default on Android
# Still requires command line flag to access API # Still requires command line flag to access API
enable_webvr = is_android && is_component_build && enable_webvr = is_android && is_component_build && is_debug &&
(current_cpu == "x86" || current_cpu == "x64" || (current_cpu == "x86" || current_cpu == "x64" ||
current_cpu == "arm" || current_cpu == "arm64") current_cpu == "arm" || current_cpu == "arm64")
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "base/logging.h" #include "base/logging.h"
#include "chrome/browser/android/vr_shell/vr_math.h" #include "chrome/browser/android/vr_shell/vr_math.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
namespace vr_shell { namespace vr_shell {
......
...@@ -97,11 +97,11 @@ bool VrController::IsTouchUp() { ...@@ -97,11 +97,11 @@ bool VrController::IsTouchUp() {
return controller_state_.GetTouchUp(); return controller_state_.GetTouchUp();
} }
bool VrController::IsButtonDown(const int32_t button) { bool VrController::IsButtonDown(gvr::ControllerButton button) {
return controller_state_.GetButtonDown(button); return controller_state_.GetButtonDown(button);
} }
bool VrController::IsButtonUp(const int32_t button) { bool VrController::IsButtonUp(gvr::ControllerButton button) {
return controller_state_.GetButtonUp(button); return controller_state_.GetButtonUp(button);
} }
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "chrome/browser/android/vr_shell/vr_gesture.h" #include "chrome/browser/android/vr_shell/vr_gesture.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_controller.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_controller.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
namespace vr_shell { namespace vr_shell {
...@@ -44,8 +44,8 @@ class VrController { ...@@ -44,8 +44,8 @@ class VrController {
bool IsTouchUp(); bool IsTouchUp();
bool IsButtonUp(const int32_t button); bool IsButtonUp(gvr::ControllerButton button);
bool IsButtonDown(const int32_t button); bool IsButtonDown(gvr::ControllerButton button);
bool IsConnected(); bool IsConnected();
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GESTURE_H_ #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GESTURE_H_
#include "third_party/WebKit/public/web/WebInputEvent.h" #include "third_party/WebKit/public/web/WebInputEvent.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
using blink::WebInputEvent; using blink::WebInputEvent;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_
#define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_bindings.h"
namespace vr_shell { namespace vr_shell {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <array> #include <array>
#include <cmath> #include <cmath>
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
namespace vr_shell { namespace vr_shell {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <string> #include <string>
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
namespace vr_shell { namespace vr_shell {
......
...@@ -220,7 +220,7 @@ void VrShell::InitializeGl(JNIEnv* env, ...@@ -220,7 +220,7 @@ void VrShell::InitializeGl(JNIEnv* env,
std::vector<gvr::BufferSpec> specs; std::vector<gvr::BufferSpec> specs;
specs.push_back(gvr_api_->CreateBufferSpec()); specs.push_back(gvr_api_->CreateBufferSpec());
render_size_ = specs[0].GetSize(); render_size_ = specs[0].GetSize();
swap_chain_.reset(new gvr::SwapChain(gvr_api_->CreateSwapchain(specs))); swap_chain_.reset(new gvr::SwapChain(gvr_api_->CreateSwapChain(specs)));
vr_shell_renderer_.reset(new VrShellRenderer()); vr_shell_renderer_.reset(new VrShellRenderer());
buffer_viewport_list_.reset( buffer_viewport_list_.reset(
...@@ -347,31 +347,6 @@ void VrShell::UpdateController(const gvr::Vec3f& forward_vector) { ...@@ -347,31 +347,6 @@ void VrShell::UpdateController(const gvr::Vec3f& forward_vector) {
} }
} }
void ApplyNeckModel(gvr::Mat4f& mat_forward) {
// This assumes that the input matrix is a pure rotation matrix. The
// input object_from_reference matrix has the inverse rotation of
// the head rotation. Invert it (this is just a transpose).
gvr::Mat4f mat = MatrixTranspose(mat_forward);
// Position of the point between the eyes, relative to the neck pivot:
const float kNeckHorizontalOffset = -0.080f; // meters in Z
const float kNeckVerticalOffset = 0.075f; // meters in Y
std::array<float, 4> neckOffset = {
{0.0f, kNeckVerticalOffset, kNeckHorizontalOffset, 1.0f}};
// Rotate eyes around neck pivot point.
auto offset = MatrixVectorMul(mat, neckOffset);
// Measure new position relative to original center of head, because
// applying a neck model should not elevate the camera.
offset[1] -= kNeckVerticalOffset;
// Right-multiply the inverse translation onto the
// object_from_reference_matrix.
TranslateMRight(mat_forward, mat_forward, -offset[0], -offset[1], -offset[2]);
}
void VrShell::DrawFrame(JNIEnv* env, const JavaParamRef<jobject>& obj) { void VrShell::DrawFrame(JNIEnv* env, const JavaParamRef<jobject>& obj) {
buffer_viewport_list_->SetToRecommendedBufferViewports(); buffer_viewport_list_->SetToRecommendedBufferViewports();
...@@ -380,7 +355,7 @@ void VrShell::DrawFrame(JNIEnv* env, const JavaParamRef<jobject>& obj) { ...@@ -380,7 +355,7 @@ void VrShell::DrawFrame(JNIEnv* env, const JavaParamRef<jobject>& obj) {
target_time.monotonic_system_time_nanos += kPredictionTimeWithoutVsyncNanos; target_time.monotonic_system_time_nanos += kPredictionTimeWithoutVsyncNanos;
gvr::Mat4f head_pose = gvr::Mat4f head_pose =
gvr_api_->GetHeadPoseInStartSpace(target_time); gvr_api_->GetHeadSpaceFromStartSpaceRotation(target_time);
gvr::Vec3f position = GetTranslation(head_pose); gvr::Vec3f position = GetTranslation(head_pose);
if (position.x == 0.0f && position.y == 0.0f && position.z == 0.0f) { if (position.x == 0.0f && position.y == 0.0f && position.z == 0.0f) {
...@@ -389,7 +364,7 @@ void VrShell::DrawFrame(JNIEnv* env, const JavaParamRef<jobject>& obj) { ...@@ -389,7 +364,7 @@ void VrShell::DrawFrame(JNIEnv* env, const JavaParamRef<jobject>& obj) {
// object_from_reference_matrix, we're not updating position_external. // object_from_reference_matrix, we're not updating position_external.
// TODO: Not sure what object_from_reference_matrix is. The new api removed // TODO: Not sure what object_from_reference_matrix is. The new api removed
// it. For now, removing it seems working fine. // it. For now, removing it seems working fine.
ApplyNeckModel(head_pose); gvr_api_->ApplyNeckModel(head_pose, 1.0f);
} }
// Bind back to the default framebuffer. // Bind back to the default framebuffer.
...@@ -569,6 +544,7 @@ void VrShell::DrawWebVr() { ...@@ -569,6 +544,7 @@ void VrShell::DrawWebVr() {
glDisable(GL_POLYGON_OFFSET_FILL); glDisable(GL_POLYGON_OFFSET_FILL);
// Don't need to clear, since we're drawing over the entire render target. // Don't need to clear, since we're drawing over the entire render target.
glClear(GL_COLOR_BUFFER_BIT);
glViewport(0, 0, render_size_.width, render_size_.height); glViewport(0, 0, render_size_.width, render_size_.height);
vr_shell_renderer_->GetWebVrRenderer()->Draw(content_texture_id_); vr_shell_renderer_->GetWebVrRenderer()->Draw(content_texture_id_);
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include "chrome/browser/android/vr_shell/ui_elements.h" #include "chrome/browser/android/vr_shell/ui_elements.h"
#include "chrome/browser/android/vr_shell/ui_scene.h" #include "chrome/browser/android/vr_shell/ui_scene.h"
#include "device/vr/android/gvr/gvr_delegate.h" #include "device/vr/android/gvr/gvr_delegate.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
namespace content { namespace content {
class ContentViewCore; class ContentViewCore;
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#include "base/macros.h" #include "base/macros.h"
#include "chrome/browser/android/vr_shell/vr_math.h" #include "chrome/browser/android/vr_shell/vr_math.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_bindings.h"
namespace vr_shell { namespace vr_shell {
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "device/vr/android/gvr/gvr_delegate.h" #include "device/vr/android/gvr/gvr_delegate.h"
#include "device/vr/vr_device_manager.h" #include "device/vr/vr_device_manager.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
#include "ui/gfx/transform.h" #include "ui/gfx/transform.h"
#include "ui/gfx/transform_util.h" #include "ui/gfx/transform_util.h"
...@@ -150,7 +150,9 @@ VRPosePtr GvrDevice::GetPose() { ...@@ -150,7 +150,9 @@ VRPosePtr GvrDevice::GetPose() {
gvr::ClockTimePoint target_time = gvr::GvrApi::GetTimePointNow(); gvr::ClockTimePoint target_time = gvr::GvrApi::GetTimePointNow();
target_time.monotonic_system_time_nanos += kPredictionTimeWithoutVsyncNanos; target_time.monotonic_system_time_nanos += kPredictionTimeWithoutVsyncNanos;
gvr::Mat4f head_mat = gvr_api->GetHeadPoseInStartSpace(target_time); gvr::Mat4f head_mat =
gvr_api->GetHeadSpaceFromStartSpaceRotation(target_time);
head_mat = gvr_api->ApplyNeckModel(head_mat, 1.0f);
gfx::Transform inv_transform( gfx::Transform inv_transform(
head_mat.m[0][0], head_mat.m[0][1], head_mat.m[0][2], head_mat.m[0][3], head_mat.m[0][0], head_mat.m[0][1], head_mat.m[0][2], head_mat.m[0][3],
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
#include "device/vr/android/gvr/gvr_gamepad_data_fetcher.h" #include "device/vr/android/gvr/gvr_gamepad_data_fetcher.h"
#include "device/vr/vr_device_manager.h" #include "device/vr/vr_device_manager.h"
#include "jni/GvrDeviceProvider_jni.h" #include "jni/GvrDeviceProvider_jni.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_controller.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_controller.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
using base::android::AttachCurrentThread; using base::android::AttachCurrentThread;
using base::android::GetApplicationContext; using base::android::GetApplicationContext;
...@@ -78,9 +78,6 @@ GvrDeviceProvider::GvrDeviceProvider() ...@@ -78,9 +78,6 @@ GvrDeviceProvider::GvrDeviceProvider()
main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()) {} main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
GvrDeviceProvider::~GvrDeviceProvider() { GvrDeviceProvider::~GvrDeviceProvider() {
GamepadDataFetcherManager::GetInstance()->RemoveSourceFactory(
GAMEPAD_SOURCE_GVR);
ExitPresent(); ExitPresent();
} }
...@@ -97,16 +94,9 @@ void GvrDeviceProvider::SetClient(VRClientDispatcher* client) { ...@@ -97,16 +94,9 @@ void GvrDeviceProvider::SetClient(VRClientDispatcher* client) {
} }
void GvrDeviceProvider::Initialize() { void GvrDeviceProvider::Initialize() {
if (!non_presenting_delegate_) { if (!vr_device_) {
non_presenting_delegate_.reset(new GvrNonPresentingDelegate()); vr_device_.reset(new GvrDevice(this, nullptr));
if (non_presenting_delegate_->gvr_api()) { client_->OnDeviceConnectionStatusChanged(vr_device_.get(), true);
vr_device_.reset(new GvrDevice(this, non_presenting_delegate_.get()));
client_->OnDeviceConnectionStatusChanged(vr_device_.get(), true);
GamepadDataFetcherManager::GetInstance()->AddFactory(
new GvrGamepadDataFetcher::Factory(non_presenting_delegate_.get(),
vr_device_->id()));
}
} }
} }
...@@ -124,7 +114,10 @@ void GvrDeviceProvider::ExitPresent() { ...@@ -124,7 +114,10 @@ void GvrDeviceProvider::ExitPresent() {
if (!vr_device_) if (!vr_device_)
return; return;
vr_device_->SetDelegate(non_presenting_delegate_.get()); vr_device_->SetDelegate(nullptr);
GamepadDataFetcherManager::GetInstance()->RemoveSourceFactory(
GAMEPAD_SOURCE_GVR);
GvrDelegateProvider* delegate_provider = GvrDelegateProvider::GetInstance(); GvrDelegateProvider* delegate_provider = GvrDelegateProvider::GetInstance();
if (delegate_provider) if (delegate_provider)
...@@ -154,6 +147,8 @@ void GvrDeviceProvider::GvrDelegateReady(GvrDelegate* delegate) { ...@@ -154,6 +147,8 @@ void GvrDeviceProvider::GvrDelegateReady(GvrDelegate* delegate) {
DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
vr_device_->SetDelegate(delegate); vr_device_->SetDelegate(delegate);
GamepadDataFetcherManager::GetInstance()->AddFactory(
new GvrGamepadDataFetcher::Factory(delegate, vr_device_->id()));
} }
} // namespace device } // namespace device
...@@ -44,7 +44,6 @@ class DEVICE_VR_EXPORT GvrDeviceProvider : public VRDeviceProvider { ...@@ -44,7 +44,6 @@ class DEVICE_VR_EXPORT GvrDeviceProvider : public VRDeviceProvider {
std::unique_ptr<VRClientDispatcher> client_; std::unique_ptr<VRClientDispatcher> client_;
std::unique_ptr<GvrDevice> vr_device_; std::unique_ptr<GvrDevice> vr_device_;
std::unique_ptr<GvrNonPresentingDelegate> non_presenting_delegate_;
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
......
...@@ -54,6 +54,8 @@ GvrGamepadDataFetcher::GvrGamepadDataFetcher(GvrDelegate* delegate, ...@@ -54,6 +54,8 @@ GvrGamepadDataFetcher::GvrGamepadDataFetcher(GvrDelegate* delegate,
bool success = controller_api_->Init(options, gvr_api->GetContext()); bool success = controller_api_->Init(options, gvr_api->GetContext());
if (!success) if (!success)
controller_api_.reset(nullptr); controller_api_.reset(nullptr);
user_prefs_.reset(new gvr::UserPrefs(gvr_api->GetUserPrefs().cobj()));
} }
GvrGamepadDataFetcher::~GvrGamepadDataFetcher() {} GvrGamepadDataFetcher::~GvrGamepadDataFetcher() {}
...@@ -94,7 +96,9 @@ void GvrGamepadDataFetcher::GetGamepadData(bool devices_changed_hint) { ...@@ -94,7 +96,9 @@ void GvrGamepadDataFetcher::GetGamepadData(bool devices_changed_hint) {
pad.timestamp = controller_state_.GetLastOrientationTimestamp(); pad.timestamp = controller_state_.GetLastOrientationTimestamp();
// TODO: Query from API if avaialable. // TODO: Query from API if avaialable.
pad.hand = GamepadHandRight; gvr::ControllerHandedness handedness = user_prefs_->GetControllerHandedness();
pad.hand = (handedness == GVR_CONTROLLER_RIGHT_HANDED) ? GamepadHandRight
: GamepadHandLeft;
if (controller_state_.IsTouching()) { if (controller_state_.IsTouching()) {
gvr_vec2f touch_position = controller_state_.GetTouchPos(); gvr_vec2f touch_position = controller_state_.GetTouchPos();
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#include <string> #include <string>
#include "device/gamepad/gamepad_data_fetcher.h" #include "device/gamepad/gamepad_data_fetcher.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_controller.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_controller.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h" #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
namespace device { namespace device {
...@@ -40,6 +40,7 @@ class GvrGamepadDataFetcher : public GamepadDataFetcher { ...@@ -40,6 +40,7 @@ class GvrGamepadDataFetcher : public GamepadDataFetcher {
private: private:
std::unique_ptr<gvr::ControllerApi> controller_api_; std::unique_ptr<gvr::ControllerApi> controller_api_;
std::unique_ptr<gvr::UserPrefs> user_prefs_;
gvr::ControllerState controller_state_; gvr::ControllerState controller_state_;
unsigned int display_id_; unsigned int display_id_;
......
...@@ -10,13 +10,12 @@ if (gvr_arch == "x64") { ...@@ -10,13 +10,12 @@ if (gvr_arch == "x64") {
} }
android_aar_prebuilt("gvr_common_java") { android_aar_prebuilt("gvr_common_java") {
aar_path = "src/ndk-beta/lib/common_library.aar" aar_path = "src/ndk/lib/common_library.aar"
jar_excluded_patterns = [ "*/protobuf/*" ]
} }
android_aar_prebuilt("gvr_base_java") { android_aar_prebuilt("gvr_base_java") {
aar_path = "src/libraries/base/base.aar" aar_path = "src/libraries/base/base.aar"
proguard_configs = [ "proguard/base.flags" ] proguard_configs = [ "src/proguard-gvr.txt" ]
ignore_manifest = true # Ignored because manifest merging is not supported (http://crbug.com/643967) ignore_manifest = true # Ignored because manifest merging is not supported (http://crbug.com/643967)
ignore_native_libraries = true ignore_native_libraries = true
} }
...@@ -37,7 +36,7 @@ source_set("libgvr") { ...@@ -37,7 +36,7 @@ source_set("libgvr") {
if (gvr_arch != "mipsel") { if (gvr_arch != "mipsel") {
copy("libgvr_copy") { copy("libgvr_copy") {
sources = [ sources = [
"src/ndk-beta/lib/android_${gvr_arch}/libgvr.so", "src/ndk/lib/android_${gvr_arch}/libgvr.so",
] ]
outputs = [ outputs = [
"${root_out_dir}/libgvr.so", "${root_out_dir}/libgvr.so",
...@@ -46,5 +45,5 @@ if (gvr_arch != "mipsel") { ...@@ -46,5 +45,5 @@ if (gvr_arch != "mipsel") {
} }
config("libgvr_config") { config("libgvr_config") {
include_dirs = [ "src/ndk-beta/include/" ] include_dirs = [ "src/ndk/include/" ]
} }
This diff is collapsed.
Name: Google VR SDK Name: Google VR SDK
Short Name: gvr Short Name: gvr
URL: https://github.com/googlevr/gvr-android-sdk URL: https://github.com/googlevr/gvr-android-sdk
Version: 0.9.0 Version: 1.0.0
Date: 3 Aug 2016 Date: 23 Sep 2016
Revision: cff15311c7c1abbe77b3c714135dccc2009ee473 Revision: 25e7e14413229d4644a66be77e8f8ddeb3f91fe7
License: Apache 2.0 License: Apache 2.0
License File: LICENSE License File: LICENSE
Security Critical: yes Security Critical: yes
......
# Proguard rules for commonly-shared libraries in gvr.
-keepattributes *Annotation*
# Keep natively accessed methods used by GVR.
-keep class com.google.vr.cardboard.UsedByNative
-keep @com.google.vr.cardboard.UsedByNative class *
-keepclassmembers class * {
@com.google.vr.cardboard.UsedByNative *;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment