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.content.Context; | 7 import android.content.Context; |
| 8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
| 9 import android.graphics.Canvas; | 9 import android.graphics.Canvas; |
| 10 import android.graphics.Color; | 10 import android.graphics.Color; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 if (cursorBitmap != null) { | 195 if (cursorBitmap != null) { |
| 196 Point hotspot = mClient.getDisplay().getCursorHotspot(); | 196 Point hotspot = mClient.getDisplay().getCursorHotspot(); |
| 197 canvas.drawBitmap(cursorBitmap, cursorPosition.x - hotspot.x, | 197 canvas.drawBitmap(cursorBitmap, cursorPosition.x - hotspot.x, |
| 198 cursorPosition.y - hotspot.y, new Paint()); | 198 cursorPosition.y - hotspot.y, new Paint()); |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 | 201 |
| 202 getHolder().unlockCanvasAndPost(canvas); | 202 getHolder().unlockCanvasAndPost(canvas); |
| 203 | 203 |
| 204 synchronized (mAnimationLock) { | 204 synchronized (mAnimationLock) { |
| 205 if (mInputAnimationRunning) { | 205 if (mInputAnimationRunning || !mOnPaint.isEmpty()) { |
|
Yuwei
2016/06/29 02:26:25
lgtm as a simple fix of this problem. I think you
Hzj_jie
2016/06/29 18:12:36
Done.
| |
| 206 getHandler().postAtTime(new Runnable() { | 206 getHandler().postAtTime(new Runnable() { |
| 207 @Override | 207 @Override |
| 208 public void run() { | 208 public void run() { |
| 209 processAnimation(); | 209 processAnimation(); |
| 210 } | 210 } |
| 211 }, startTimeMs + 30); | 211 }, startTimeMs + 30); |
| 212 } | 212 } |
| 213 } | 213 } |
| 214 } | 214 } |
| 215 | 215 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 @Override | 324 @Override |
| 325 public void setAnimationEnabled(boolean enabled) { | 325 public void setAnimationEnabled(boolean enabled) { |
| 326 synchronized (mAnimationLock) { | 326 synchronized (mAnimationLock) { |
| 327 if (enabled && !mInputAnimationRunning) { | 327 if (enabled && !mInputAnimationRunning) { |
| 328 requestRepaint(); | 328 requestRepaint(); |
| 329 } | 329 } |
| 330 mInputAnimationRunning = enabled; | 330 mInputAnimationRunning = enabled; |
| 331 } | 331 } |
| 332 } | 332 } |
| 333 } | 333 } |
| OLD | NEW |