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

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

Issue 2255663002: [Remoting Android] Use floating point coords for rendering the cursor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge ToT Created 4 years, 4 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/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..0cf0338bb286db91f312af9dcf852406e9e71c5b 100644
--- a/remoting/android/java/src/org/chromium/chromoting/RenderData.java
+++ b/remoting/android/java/src/org/chromium/chromoting/RenderData.java
@@ -5,7 +5,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 +27,15 @@ 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);
}
/**
@@ -45,7 +45,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;

Powered by Google App Engine
This is Rietveld 408576698