Chromium Code Reviews| Index: remoting/android/java/src/org/chromium/chromoting/DesktopView.java |
| diff --git a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java |
| index c6f427bf2f9bf3fa2af959127c40cd44eb0cbb7c..56e3a8b890ff08ffe14329ae633c5f9db34b3313 100644 |
| --- a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java |
| +++ b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java |
| @@ -87,6 +87,8 @@ public class DesktopView extends AbstractDesktopView implements SurfaceHolder.Ca |
| mRepaintPending = false; |
| getHolder().addCallback(this); |
| + |
| + attachRedrawCallback(); |
| } |
| @Override |
| @@ -140,6 +142,9 @@ public class DesktopView extends AbstractDesktopView implements SurfaceHolder.Ca |
| } |
| Bitmap image = mDisplay.getVideoFrame(); |
| + synchronized (mRenderData) { |
| + mRepaintPending = false; |
|
Yuwei
2016/07/11 20:21:42
mRepaintPending would also be frozen if image == n
|
| + } |
| if (image == null) { |
| // This can happen if the client is connected, but a complete video frame has not yet |
| // been decoded. |
| @@ -167,7 +172,6 @@ public class DesktopView extends AbstractDesktopView implements SurfaceHolder.Ca |
| Point cursorPosition; |
| boolean drawCursor; |
| synchronized (mRenderData) { |
| - mRepaintPending = false; |
| // Don't try to lock the canvas before it is ready, as the implementation of |
| // lockCanvas() may throttle these calls to a slow rate in order to avoid consuming CPU. |
| // Note that a successful call to lockCanvas() will prevent the framework from |
| @@ -240,7 +244,6 @@ public class DesktopView extends AbstractDesktopView implements SurfaceHolder.Ca |
| mRenderData.screenHeight = height; |
| } |
| - attachRedrawCallback(); |
| mOnClientSizeChanged.raise(new SizeChangedEventParameter(width, height)); |
| requestRepaint(); |
| } |