| Index: remoting/android/java/src/org/chromium/chromoting/RenderData.java
|
| diff --git a/remoting/android/java/src/org/chromium/chromoting/RenderData.java b/remoting/android/java/src/org/chromium/chromoting/RenderData.java
|
| index 8e21488f30199551395da036f62673419f57de8a..a548f53906c83fe2a3402d2b3619112643a0eee8 100644
|
| --- a/remoting/android/java/src/org/chromium/chromoting/RenderData.java
|
| +++ b/remoting/android/java/src/org/chromium/chromoting/RenderData.java
|
| @@ -6,6 +6,7 @@ package org.chromium.chromoting;
|
|
|
| import android.graphics.Matrix;
|
| import android.graphics.Point;
|
| +import android.graphics.PointF;
|
|
|
| /**
|
| * This class stores data that needs to be accessed on both the display thread and the
|
| @@ -27,15 +28,24 @@ public class RenderData {
|
| * Specifies the position, in image coordinates, at which the cursor image will be drawn.
|
| * This will normally be at the location of the most recently injected motion event.
|
| */
|
| - private Point mCursorPosition = new Point();
|
| + private PointF mCursorPosition = new PointF();
|
|
|
| /**
|
| * Returns the position of the rendered cursor.
|
| *
|
| * @return A point representing the current position.
|
| */
|
| - public Point getCursorPosition() {
|
| - return new Point(mCursorPosition);
|
| + public PointF getCursorPosition() {
|
| + return new PointF(mCursorPosition.x, mCursorPosition.y);
|
| + }
|
| +
|
| + /**
|
| + * Returns the position of the rendered cursor. The values are casted to integer.
|
| + *
|
| + * @return A point representing the current position.
|
| + */
|
| + public Point getIntegerCursorPosition() {
|
| + return new Point((int) mCursorPosition.x, (int) mCursorPosition.y);
|
| }
|
|
|
| /**
|
| @@ -45,7 +55,7 @@ public class RenderData {
|
| * @param newY The new value of the y coordinate
|
| * @return True if the cursor position has changed.
|
| */
|
| - public boolean setCursorPosition(int newX, int newY) {
|
| + public boolean setCursorPosition(float newX, float newY) {
|
| boolean cursorMoved = false;
|
| if (newX != mCursorPosition.x) {
|
| mCursorPosition.x = newX;
|
|
|