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

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

Issue 2175353003: [Remoting Android] Define feedback animation size in dp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's Feedback Created 4 years, 5 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 | « remoting/android/java/src/org/chromium/chromoting/FeedbackAnimator.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/android/java/src/org/chromium/chromoting/GlDesktopView.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/GlDesktopView.java b/remoting/android/java/src/org/chromium/chromoting/GlDesktopView.java
index 439eeab6d21644f38faa9a2f30daa45bccf665a7..524db4e8c1510b7134accd6fea5dcd5258899c57 100644
--- a/remoting/android/java/src/org/chromium/chromoting/GlDesktopView.java
+++ b/remoting/android/java/src/org/chromium/chromoting/GlDesktopView.java
@@ -30,18 +30,9 @@ public class GlDesktopView extends AbstractDesktopView implements SurfaceHolder.
@Override
public void showInputFeedback(InputFeedbackType feedbackToShow, Point pos) {
- float diameter;
- // TODO(yuweih): diameter (and radius in DesktopView) should be defined in dp so that it is
- // DPI independent.
- switch (feedbackToShow) {
- case LARGE_ANIMATION:
- diameter = 320.f;
- break;
- case SMALL_ANIMATION:
- diameter = 80.f;
- break;
- default:
- return;
+ float diameter = getFeedbackRadius(feedbackToShow) * 2.0f;
+ if (diameter <= 0.0f) {
+ return;
}
float scaleFactor = mRenderData.transform.mapRadius(1);
mDisplay.showCursorInputFeedback(pos.x, pos.y, diameter / scaleFactor);
« no previous file with comments | « remoting/android/java/src/org/chromium/chromoting/FeedbackAnimator.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698