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

Commit 5c5050d9 authored by Grace Kloba's avatar Grace Kloba
Browse files

Make TextureView to use async SurfaceTexture.

With this, there is no synchronous destroy SurfaceTexture requirement any more.

Revert the previous change which only applies to the sync SurfaceTexture.

Change-Id: Id4790d38a27f2982d0c8ad471bc1107683d27ffc
parent 138f33bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ class GLES20TextureLayer extends GLES20Layer {

    SurfaceTexture getSurfaceTexture() {
        if (mSurface == null) {
            mSurface = new SurfaceTexture(mTexture);
            mSurface = new SurfaceTexture(mTexture, false);
        }
        return mSurface;
    }
+1 −3
Original line number Diff line number Diff line
@@ -649,9 +649,7 @@ static void android_view_GLES20Canvas_updateTextureLayer(JNIEnv* env, jobject cl
    float transform[16];
    sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, surface));

    while (surfaceTexture->getQueuedCount() > 0) {
    surfaceTexture->updateTexImage();
    }
    surfaceTexture->getTransformMatrix(transform);
    GLenum renderTarget = surfaceTexture->getCurrentTextureTarget();