Chromium Code Reviews| 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 212d15db17a1b7d194ef1ba018f79d0cd08b9da8..8df52f596b2490d646829386b82fe916adc1020b 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; |
| @@ -57,6 +59,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); |
| } |
| @@ -172,6 +175,18 @@ public class BlimpView extends SurfaceView implements SurfaceHolder.Callback { |
| || eventAction == MotionEvent.ACTION_POINTER_UP; |
| } |
| + @CalledByNative |
| + public void onSwapBuffersCompleted() { |
| + if (getBackground() != null) { |
| + post(new Runnable() { |
|
Khushal
2016/04/28 03:32:26
Is there a reason why this is done as a separate t
shaktisahu
2016/04/28 21:38:15
Done. It's better to remove this since we are cert
Khushal
2016/04/28 21:45:35
I actually asked yusuf@ about this and he said its
|
| + @Override |
| + public void run() { |
| + setBackgroundResource(0); |
| + } |
| + }); |
| + } |
| + } |
| + |
| // Native Methods |
| private native long nativeInit(BlimpClientSession blimpClientSession, int physicalWidth, |
| int physicalHeight, int displayWidth, int displayHeight, float dpToPixel); |