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

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

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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
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. */

Powered by Google App Engine
This is Rietveld 408576698