Index: remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java |
diff --git a/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java b/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java |
index cf8353b58a1fd9d41f70a6ead29d1b6d5b517d89..23d00647fe42fc8aeb9743446fa1c4cd1e4e5d0f 100644 |
--- a/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java |
+++ b/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java |
@@ -122,14 +122,19 @@ public class DesktopCanvas { |
startOffsetReductionAnimation(); |
} |
- repositionImage(); |
+ if (mRenderData.initialized()) { |
+ // The viewport center may have changed so update the position to reflect the new value. |
+ repositionImage(); |
+ } |
} |
public void adjustViewportForSystemUi(boolean adjustViewportForSystemUi) { |
mAdjustViewportSizeForSystemUi = adjustViewportForSystemUi; |
- // The viewport center may have changed so reposition the image to reflect the new value. |
- repositionImage(); |
+ if (mRenderData.initialized()) { |
+ // The viewport center may have changed so update the position to reflect the new value. |
+ repositionImage(); |
+ } |
} |
/** Resizes the image by zooming it such that the image is displayed without borders. */ |