Index: remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java |
diff --git a/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java b/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java |
index 7e0bf9ab731fb0f5da0203a500299c2dacd0a18e..24127b2cfdff58f6bb6ad445b38a04516c48a06c 100644 |
--- a/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java |
+++ b/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java |
@@ -14,6 +14,7 @@ import android.opengl.GLES20; |
import org.chromium.chromoting.InputStub; |
import org.chromium.chromoting.jni.Client; |
+import org.chromium.chromoting.jni.Display; |
import java.nio.FloatBuffer; |
@@ -53,6 +54,7 @@ public class Cursor { |
private static final float CURSOR_MOVE_THRESHOLD = 1.0f; |
private final Client mClient; |
+ private final Display mDisplay; |
private FloatBuffer mPositionCoordinates; |
@@ -80,6 +82,7 @@ public class Cursor { |
public Cursor(Client client) { |
mClient = client; |
+ mDisplay = (Display) client.getDisplay(); |
mHalfFrameSize = new PointF(0.0f, 0.0f); |
mCursorPosition = new PointF(0.0f, 0.0f); |
@@ -140,7 +143,7 @@ public class Cursor { |
} |
} |
- Bitmap cursorBitmap = mClient.getDisplay().getCursorBitmap(); |
+ Bitmap cursorBitmap = mDisplay.getCursorBitmap(); |
if (cursorBitmap == mCursorBitmap) { |
// Case when cursor image has not changed. |
@@ -151,7 +154,7 @@ public class Cursor { |
} |
mCursorBitmap = cursorBitmap; |
- updatePosition(desktop, mCursorBitmap, mClient.getDisplay().getCursorHotspot()); |
+ updatePosition(desktop, mCursorBitmap, mDisplay.getCursorHotspot()); |
TextureHelper.linkTexture(mTextureDataHandle, cursorBitmap); |