| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |