diff options
| -rw-r--r-- | core/jni/android/graphics/SurfaceTexture.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/jni/android/graphics/SurfaceTexture.cpp b/core/jni/android/graphics/SurfaceTexture.cpp index 14bad0facf4f..9242b70a7e9a 100644 --- a/core/jni/android/graphics/SurfaceTexture.cpp +++ b/core/jni/android/graphics/SurfaceTexture.cpp @@ -286,9 +286,7 @@ static void SurfaceTexture_init(JNIEnv* env, jobject thiz, jboolean isDetached, createProcessUniqueId())); // If the current context is protected, inform the producer. - if (isProtectedContext()) { - consumer->setConsumerUsageBits(GRALLOC_USAGE_PROTECTED); - } + consumer->setConsumerIsProtected(isProtectedContext()); SurfaceTexture_setSurfaceTexture(env, thiz, surfaceTexture); SurfaceTexture_setProducer(env, thiz, producer); |