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

Unified Diff: remoting/android/java/src/org/chromium/chromoting/DesktopView.java

Issue 2136233002: [Remoting Android] Fix Painting After Rotation Bug (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« 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