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

Unified Diff: remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java

Issue 1687873002: Revert of Refactor Chromoting JNI code to use jni/Client (Java changes only). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java b/remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java
index e8a05f0b450f1ba618d73d3c1f5f4c84728d36d6..843edd1cd3e2871f830c1fd12523138343d01906 100644
--- a/remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java
+++ b/remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java
@@ -15,7 +15,7 @@
import com.google.vrtoolkit.cardboard.HeadTransform;
import com.google.vrtoolkit.cardboard.Viewport;
-import org.chromium.chromoting.jni.Client;
+import org.chromium.chromoting.jni.JniInterface;
import javax.microedition.khronos.egl.EGLConfig;
@@ -65,7 +65,6 @@
private static final float EPSILON = 1e-5f;
private final Activity mActivity;
- private final Client mClient;
private float mCameraPosition;
@@ -104,9 +103,8 @@
// Flag to indicate whether to show menu bar.
private boolean mMenuBarVisible;
- public CardboardRenderer(Activity activity, Client client) {
+ public CardboardRenderer(Activity activity) {
mActivity = activity;
- mClient = client;
mCameraPosition = 0.0f;
mCameraMatrix = new float[16];
@@ -124,7 +122,7 @@
private void initializeRedrawCallback() {
mActivity.runOnUiThread(new Runnable() {
public void run() {
- mClient.provideRedrawCallback(new Runnable() {
+ JniInterface.provideRedrawCallback(new Runnable() {
@Override
public void run() {
mDesktop.reloadTexture();
@@ -132,7 +130,7 @@
}
});
- mClient.redrawGraphics();
+ JniInterface.redrawGraphics();
}
});
}
@@ -148,10 +146,10 @@
// Enable depth testing.
GLES20.glEnable(GLES20.GL_DEPTH_TEST);
- mDesktop = new Desktop(mClient);
+ mDesktop = new Desktop();
mMenuBar = new MenuBar(mActivity);
mPhotosphere = new Photosphere(mActivity);
- mCursor = new Cursor(mClient);
+ mCursor = new Cursor();
initializeRedrawCallback();
}
@@ -431,4 +429,4 @@
return Math.abs(phi) > FARAWAY_ANGLE_RATIO * Math.abs(theta);
}
-}
+}

Powered by Google App Engine
This is Rietveld 408576698