summaryrefslogtreecommitdiffstats
path: root/core/jni/android_view_Surface.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-08-02 01:38:38 -0700
committerMathias Agopian <mathias@google.com>2013-08-06 13:07:42 -0700
commit52a9a10b6b8c7b7a9f97777541841b94d4fd9754 (patch)
treeaaf72e50f157c69abc8be70991c16e93bef47fc4 /core/jni/android_view_Surface.cpp
parent0dff7064897afd4e07993bac28ae877aaeb1b5e3 (diff)
downloadframeworks_base-52a9a10b6b8c7b7a9f97777541841b94d4fd9754.zip
frameworks_base-52a9a10b6b8c7b7a9f97777541841b94d4fd9754.tar.gz
frameworks_base-52a9a10b6b8c7b7a9f97777541841b94d4fd9754.tar.bz2
Clearly separate consumer and producer interfaces
Bug: 9265647 Change-Id: Ic68e91788d0a05251e1d2fb9f9d4de403c7099bf
Diffstat (limited to 'core/jni/android_view_Surface.cpp')
-rw-r--r--core/jni/android_view_Surface.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index 1007e7d..304514b 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -135,15 +135,14 @@ static inline bool isSurfaceValid(const sp<Surface>& sur) {
static jint nativeCreateFromSurfaceTexture(JNIEnv* env, jclass clazz,
jobject surfaceTextureObj) {
- sp<GLConsumer> st(SurfaceTexture_getSurfaceTexture(env, surfaceTextureObj));
- if (st == NULL) {
+ sp<IGraphicBufferProducer> producer(SurfaceTexture_getProducer(env, surfaceTextureObj));
+ if (producer == NULL) {
jniThrowException(env, "java/lang/IllegalArgumentException",
"SurfaceTexture has already been released");
return 0;
}
- sp<IGraphicBufferProducer> bq = st->getBufferQueue();
- sp<Surface> surface(new Surface(bq, true));
+ sp<Surface> surface(new Surface(producer, true));
if (surface == NULL) {
jniThrowException(env, OutOfResourcesException, NULL);
return 0;