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

Side by Side Diff: remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java

Issue 2105433003: [Chromoting] Panning inertia is way too sensitive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chromoting; 5 package org.chromium.chromoting;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.graphics.Matrix; 8 import android.graphics.Matrix;
9 import android.graphics.PointF; 9 import android.graphics.PointF;
10 import android.graphics.Rect; 10 import android.graphics.Rect;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 @Override 101 @Override
102 protected void processAction(float deltaX, float deltaY) { 102 protected void processAction(float deltaX, float deltaY) {
103 float[] delta = {deltaX, deltaY}; 103 float[] delta = {deltaX, deltaY};
104 synchronized (mRenderData) { 104 synchronized (mRenderData) {
105 Matrix canvasToImage = new Matrix(); 105 Matrix canvasToImage = new Matrix();
106 mRenderData.transform.invert(canvasToImage); 106 mRenderData.transform.invert(canvasToImage);
107 canvasToImage.mapVectors(delta); 107 canvasToImage.mapVectors(delta);
108 } 108 }
109 109
110 moveViewportWithOffset(-deltaX, -deltaY); 110 moveViewportWithOffset(-delta[0], -delta[1]);
111 } 111 }
112 } 112 }
113 113
114 /** 114 /**
115 * This class implements fling animation for scrolling 115 * This class implements fling animation for scrolling
116 */ 116 */
117 private class ScrollAnimationJob extends FlingAnimationJob { 117 private class ScrollAnimationJob extends FlingAnimationJob {
118 public ScrollAnimationJob(Context context) { 118 public ScrollAnimationJob(Context context) {
119 super(context); 119 super(context);
120 } 120 }
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 case 2: 558 case 2:
559 return BUTTON_RIGHT; 559 return BUTTON_RIGHT;
560 case 3: 560 case 3:
561 return BUTTON_MIDDLE; 561 return BUTTON_MIDDLE;
562 default: 562 default:
563 return BUTTON_UNDEFINED; 563 return BUTTON_UNDEFINED;
564 } 564 }
565 } 565 }
566 } 566 }
567 } 567 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698