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

Unified Diff: blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java

Issue 1925863003: Changed Blimp client to start with white screen before drawing contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge origin/master Created 4 years, 7 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 | « blimp/client/app/android/blimp_view.cc ('k') | blimp/client/app/linux/blimp_display_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java
diff --git a/blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java b/blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java
index 27d6a44ad8044f4fb403fdf36870726eeaaa1a5e..acf2ad4019e329a31163d76914b8ca7cd900ee93 100644
--- a/blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java
+++ b/blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java
@@ -5,6 +5,7 @@
package org.chromium.blimp;
import android.content.Context;
+import android.graphics.Color;
import android.graphics.Point;
import android.os.Build;
import android.util.AttributeSet;
@@ -14,6 +15,7 @@ import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.WindowManager;
+import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.blimp.session.BlimpClientSession;
import org.chromium.ui.UiUtils;
@@ -58,6 +60,7 @@ public class BlimpView extends SurfaceView implements SurfaceHolder.Callback {
mNativeBlimpViewPtr = nativeInit(blimpClientSession, physicalSize.x, physicalSize.y,
displaySize.x, displaySize.y, deviceScaleFactor);
getHolder().addCallback(this);
+ setBackgroundColor(Color.WHITE);
setVisibility(VISIBLE);
}
@@ -177,6 +180,13 @@ public class BlimpView extends SurfaceView implements SurfaceHolder.Callback {
|| eventAction == MotionEvent.ACTION_POINTER_UP;
}
+ @CalledByNative
+ public void onSwapBuffersCompleted() {
+ if (getBackground() == null) return;
+
+ setBackgroundResource(0);
+ }
+
// Native Methods
private native long nativeInit(BlimpClientSession blimpClientSession, int physicalWidth,
int physicalHeight, int displayWidth, int displayHeight, float dpToPixel);
« no previous file with comments | « blimp/client/app/android/blimp_view.cc ('k') | blimp/client/app/linux/blimp_display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698