Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76b06759 authored by Teng-Hui Zhu's avatar Teng-Hui Zhu Committed by Android (Google) Code Review
Browse files

Merge "Create GL texture when it is missing for video layer" into ics-mr1

parents e395f645 1f546733
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -74,11 +74,13 @@ public class HTML5VideoInline extends HTML5VideoView{
    public SurfaceTexture getSurfaceTexture(int videoLayerId) {
        // Create the surface texture.
        if (videoLayerId != mVideoLayerUsingSurfaceTexture
            || mSurfaceTexture == null) {
            if (mTextureNames == null) {
            || mSurfaceTexture == null
            || mTextureNames == null) {
            if (mTextureNames != null) {
                GLES20.glDeleteTextures(1, mTextureNames, 0);
            }
            mTextureNames = new int[1];
            GLES20.glGenTextures(1, mTextureNames, 0);
            }
            mSurfaceTexture = new SurfaceTexture(mTextureNames[0]);
        }
        mVideoLayerUsingSurfaceTexture = videoLayerId;