weblayer: Fix fullscreen video
The compositor surface is opaque, which means when video is lifted into a separate surface during fullscreen below the compositor surface, it is never showing through. Always set the compositor surface to translucent for now, which will use more memory even when not in fullscreen. Bug: 1022042 Change-Id: I2ff368dfa2a04ba0e62891039244c0bcb148e6fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899901 Reviewed-by: Frank Liberato <liberato@chromium.org> Commit-Queue: Bo <boliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#713178}
This commit is contained in:
@ -6,6 +6,7 @@ package org.chromium.weblayer_private;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.SurfaceTexture;
|
||||
import android.view.Surface;
|
||||
import android.view.SurfaceHolder;
|
||||
@ -193,6 +194,10 @@ public class ContentViewRenderView extends FrameLayout {
|
||||
mSurfaceView.getHolder().addCallback(mSurfaceCallback);
|
||||
mSurfaceView.setVisibility(View.VISIBLE);
|
||||
|
||||
// TODO(boliu): This is only needed when video is lifted into a separate surface.
|
||||
// Keeping this constantly will use one more byte per pixel constantly.
|
||||
mSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
|
||||
|
||||
mTextureView = null;
|
||||
mSurfaceTextureListener = null;
|
||||
} else if (mode == MODE_TEXTURE_VIEW) {
|
||||
|
Reference in New Issue
Block a user