summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/jni/android/graphics/SurfaceTexture.cpp2
-rw-r--r--core/jni/android_opengl_EGL14.cpp6
-rw-r--r--core/jni/android_view_TextureView.cpp2
-rw-r--r--core/jni/com_google_android_gles_jni_EGLImpl.cpp2
4 files changed, 8 insertions, 4 deletions
diff --git a/core/jni/android/graphics/SurfaceTexture.cpp b/core/jni/android/graphics/SurfaceTexture.cpp
index 842c557..3315045 100644
--- a/core/jni/android/graphics/SurfaceTexture.cpp
+++ b/core/jni/android/graphics/SurfaceTexture.cpp
@@ -87,7 +87,7 @@ sp<ANativeWindow> android_SurfaceTexture_getNativeWindow(
{
sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, thiz));
sp<SurfaceTextureClient> surfaceTextureClient(surfaceTexture != NULL ?
- new SurfaceTextureClient(surfaceTexture) : NULL);
+ new SurfaceTextureClient(surfaceTexture->getBufferQueue()) : NULL);
return surfaceTextureClient;
}
diff --git a/core/jni/android_opengl_EGL14.cpp b/core/jni/android_opengl_EGL14.cpp
index b1664c6..2b265db 100644
--- a/core/jni/android_opengl_EGL14.cpp
+++ b/core/jni/android_opengl_EGL14.cpp
@@ -627,7 +627,11 @@ not_valid_surface:
goto exit;
}
surfaceTexture = android::SurfaceTexture_getSurfaceTexture(_env, win);
- window = new android::SurfaceTextureClient(surfaceTexture);
+
+ if (surfaceTexture == NULL)
+ goto not_valid_surface;
+
+ window = new android::SurfaceTextureClient(surfaceTexture->getBufferQueue());
if (window == NULL)
goto not_valid_surface;
diff --git a/core/jni/android_view_TextureView.cpp b/core/jni/android_view_TextureView.cpp
index 9484c6b..854c9ae 100644
--- a/core/jni/android_view_TextureView.cpp
+++ b/core/jni/android_view_TextureView.cpp
@@ -102,7 +102,7 @@ static void android_view_TextureView_createNativeWindow(JNIEnv* env, jobject tex
jobject surface) {
sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, surface));
- sp<ANativeWindow> window = new SurfaceTextureClient(surfaceTexture);
+ sp<ANativeWindow> window = new SurfaceTextureClient(surfaceTexture->getBufferQueue());
window->incStrong(0);
SET_INT(textureView, gTextureViewClassInfo.nativeWindow, jint(window.get()));
diff --git a/core/jni/com_google_android_gles_jni_EGLImpl.cpp b/core/jni/com_google_android_gles_jni_EGLImpl.cpp
index f8904bd..1c9562e 100644
--- a/core/jni/com_google_android_gles_jni_EGLImpl.cpp
+++ b/core/jni/com_google_android_gles_jni_EGLImpl.cpp
@@ -355,7 +355,7 @@ not_valid_surface:
sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(_env, native_window));
- window = new SurfaceTextureClient(surfaceTexture);
+ window = new SurfaceTextureClient(surfaceTexture->getBufferQueue());
if (window == NULL)
goto not_valid_surface;