Chromium Code Reviews| 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.graphics.Bitmap; | 7 import android.graphics.Bitmap; |
| 8 import android.graphics.Canvas; | 8 import android.graphics.Canvas; |
| 9 import android.graphics.Color; | 9 import android.graphics.Color; |
| 10 import android.graphics.Paint; | 10 import android.graphics.Paint; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 * will not be blank if the user later switches back to our window. | 217 * will not be blank if the user later switches back to our window. |
| 218 */ | 218 */ |
| 219 @Override | 219 @Override |
| 220 public void surfaceDestroyed(SurfaceHolder holder) { | 220 public void surfaceDestroyed(SurfaceHolder holder) { |
| 221 synchronized (mRenderData) { | 221 synchronized (mRenderData) { |
| 222 mSurfaceCreated = false; | 222 mSurfaceCreated = false; |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 | 225 |
| 226 @Override | 226 @Override |
| 227 public void showInputFeedback(InputFeedbackType feedbackToShow, Point pos) { | 227 public void showInputFeedback(float feedbackRadius, Point pos) { |
| 228 if (feedbackToShow != InputFeedbackType.NONE) { | 228 FeedbackAnimator.startAnimation(this, pos, feedbackRadius); |
|
Yuwei
2016/07/25 23:43:12
Removed this check since NONE is not been used any
joedow
2016/07/26 03:03:24
It is set in a few places. The check was useful a
Yuwei
2016/07/26 18:47:26
You are right. Looks like it is set in several pla
| |
| 229 FeedbackAnimator.startAnimation(this, pos, feedbackToShow); | 229 requestRepaint(); |
| 230 requestRepaint(); | |
| 231 } | |
| 232 } | 230 } |
| 233 | 231 |
| 234 @Override | 232 @Override |
| 235 public void transformationChanged() { | 233 public void transformationChanged() { |
| 236 requestRepaint(); | 234 requestRepaint(); |
| 237 } | 235 } |
| 238 | 236 |
| 239 @Override | 237 @Override |
| 240 public void cursorMoved() { | 238 public void cursorMoved() { |
| 241 // For current implementation, cursorMoved() is always followed by trans formationChanged() | 239 // For current implementation, cursorMoved() is always followed by trans formationChanged() |
| 242 // even if the canvas isn't really changed. For future we should improve this by not calling | 240 // even if the canvas isn't really changed. For future we should improve this by not calling |
| 243 // transformationChanged() if the cursor is moved but the canvas is not changed. | 241 // transformationChanged() if the cursor is moved but the canvas is not changed. |
| 244 } | 242 } |
| 245 | 243 |
| 246 @Override | 244 @Override |
| 247 public void cursorVisibilityChanged() { | 245 public void cursorVisibilityChanged() { |
| 248 requestRepaint(); | 246 requestRepaint(); |
| 249 } | 247 } |
| 250 | 248 |
| 251 @Override | 249 @Override |
| 252 public void setAnimationEnabled(boolean enabled) { | 250 public void setAnimationEnabled(boolean enabled) { |
| 253 synchronized (mAnimationLock) { | 251 synchronized (mAnimationLock) { |
| 254 if (enabled && !mInputAnimationRunning) { | 252 if (enabled && !mInputAnimationRunning) { |
| 255 requestRepaint(); | 253 requestRepaint(); |
| 256 } | 254 } |
| 257 mInputAnimationRunning = enabled; | 255 mInputAnimationRunning = enabled; |
| 258 } | 256 } |
| 259 } | 257 } |
| 260 } | 258 } |
| OLD | NEW |