Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1809)

Unified Diff: device/vr/android/gvr/gvr_device.cc

Issue 2814443004: Refactor VR math off of GVR types, onto gfx types where possible. (Closed)
Patch Set: Fix tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/vr/android/gvr/gvr_delegate.cc ('k') | device/vr/android/gvr/gvr_gamepad_data_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/android/gvr/gvr_device.cc
diff --git a/device/vr/android/gvr/gvr_device.cc b/device/vr/android/gvr/gvr_device.cc
index 9f6036170b0afa023361862a3468437b6af724d0..bf48f6b882983c7e6454600f27075ddb0db83f6f 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -13,8 +13,7 @@
#include "device/vr/android/gvr/gvr_delegate_provider.h"
#include "device/vr/android/gvr/gvr_device_provider.h"
#include "device/vr/vr_device_manager.h"
-#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr.h"
-#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr_types.h"
+#include "device/vr/vr_types.h"
#include "ui/gfx/transform.h"
#include "ui/gfx/transform_util.h"
@@ -69,19 +68,11 @@ void GvrDevice::UpdateLayerBounds(int16_t frame_index,
if (!delegate)
return;
- gvr::Rectf left_gvr_bounds;
- left_gvr_bounds.left = left_bounds->left;
- left_gvr_bounds.top = 1.0f - left_bounds->top;
- left_gvr_bounds.right = left_bounds->left + left_bounds->width;
- left_gvr_bounds.bottom = 1.0f - (left_bounds->top + left_bounds->height);
-
- gvr::Rectf right_gvr_bounds;
- right_gvr_bounds.left = right_bounds->left;
- right_gvr_bounds.top = 1.0f - right_bounds->top;
- right_gvr_bounds.right = right_bounds->left + right_bounds->width;
- right_gvr_bounds.bottom = 1.0f - (right_bounds->top + right_bounds->height);
-
- gvr::Sizei source_size = {source_width, source_height};
+ gfx::RectF left_gvr_bounds(left_bounds->left, left_bounds->top,
+ left_bounds->width, left_bounds->height);
+ gfx::RectF right_gvr_bounds(right_bounds->left, right_bounds->top,
+ right_bounds->width, right_bounds->height);
+ gfx::Size source_size(source_width, source_height);
delegate->UpdateWebVRTextureBounds(frame_index, left_gvr_bounds,
right_gvr_bounds, source_size);
}
« no previous file with comments | « device/vr/android/gvr/gvr_delegate.cc ('k') | device/vr/android/gvr/gvr_gamepad_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698