Loading core/jni/android/graphics/SurfaceTexture.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -131,13 +131,6 @@ sp<IGraphicBufferProducer> SurfaceTexture_getProducer(JNIEnv* env, jobject thiz) return (IGraphicBufferProducer*)env->GetLongField(thiz, fields.producer); } sp<ANativeWindow> android_SurfaceTexture_getNativeWindow(JNIEnv* env, jobject thiz) { sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, thiz)); sp<IGraphicBufferProducer> producer(SurfaceTexture_getProducer(env, thiz)); sp<Surface> surfaceTextureClient(surfaceTexture != NULL ? new Surface(producer) : NULL); return surfaceTextureClient; } bool android_SurfaceTexture_isInstanceOf(JNIEnv* env, jobject thiz) { jclass surfaceTextureClass = env->FindClass(kSurfaceTextureClassPathName); return env->IsInstanceOf(thiz, surfaceTextureClass); Loading core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ #include "core_jni_helpers.h" #include "android_runtime/android_view_Surface.h" #include "android_runtime/android_graphics_SurfaceTexture.h" #include "surfacetexture/SurfaceTexture.h" #include <gui/Surface.h> #include <gui/IGraphicBufferProducer.h> Loading Loading @@ -394,10 +395,17 @@ static sp<ANativeWindow> getNativeWindow(JNIEnv* env, jobject surface) { return anw; } static sp<ANativeWindow> getSurfaceTextureNativeWindow(JNIEnv* env, jobject thiz) { sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, thiz)); sp<IGraphicBufferProducer> producer(SurfaceTexture_getProducer(env, thiz)); sp<Surface> surfaceTextureClient(surfaceTexture != NULL ? new Surface(producer) : NULL); return surfaceTextureClient; } static sp<ANativeWindow> getNativeWindowFromTexture(JNIEnv* env, jobject surfaceTexture) { sp<ANativeWindow> anw; if (surfaceTexture) { anw = android_SurfaceTexture_getNativeWindow(env, surfaceTexture); anw = getSurfaceTextureNativeWindow(env, surfaceTexture); if (env->ExceptionCheck()) { return NULL; } Loading core/jni/include/android_runtime/android_graphics_SurfaceTexture.h +0 −3 Original line number Diff line number Diff line Loading @@ -17,8 +17,6 @@ #ifndef _ANDROID_GRAPHICS_SURFACETEXTURE_H #define _ANDROID_GRAPHICS_SURFACETEXTURE_H #include <android/native_window.h> #include "jni.h" namespace android { Loading @@ -26,7 +24,6 @@ namespace android { class IGraphicBufferProducer; class SurfaceTexture; extern sp<ANativeWindow> android_SurfaceTexture_getNativeWindow(JNIEnv* env, jobject thiz); extern bool android_SurfaceTexture_isInstanceOf(JNIEnv* env, jobject thiz); /* Gets the underlying C++ SurfaceTexture object from a SurfaceTexture Java object. */ Loading Loading
core/jni/android/graphics/SurfaceTexture.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -131,13 +131,6 @@ sp<IGraphicBufferProducer> SurfaceTexture_getProducer(JNIEnv* env, jobject thiz) return (IGraphicBufferProducer*)env->GetLongField(thiz, fields.producer); } sp<ANativeWindow> android_SurfaceTexture_getNativeWindow(JNIEnv* env, jobject thiz) { sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, thiz)); sp<IGraphicBufferProducer> producer(SurfaceTexture_getProducer(env, thiz)); sp<Surface> surfaceTextureClient(surfaceTexture != NULL ? new Surface(producer) : NULL); return surfaceTextureClient; } bool android_SurfaceTexture_isInstanceOf(JNIEnv* env, jobject thiz) { jclass surfaceTextureClass = env->FindClass(kSurfaceTextureClassPathName); return env->IsInstanceOf(thiz, surfaceTextureClass); Loading
core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ #include "core_jni_helpers.h" #include "android_runtime/android_view_Surface.h" #include "android_runtime/android_graphics_SurfaceTexture.h" #include "surfacetexture/SurfaceTexture.h" #include <gui/Surface.h> #include <gui/IGraphicBufferProducer.h> Loading Loading @@ -394,10 +395,17 @@ static sp<ANativeWindow> getNativeWindow(JNIEnv* env, jobject surface) { return anw; } static sp<ANativeWindow> getSurfaceTextureNativeWindow(JNIEnv* env, jobject thiz) { sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, thiz)); sp<IGraphicBufferProducer> producer(SurfaceTexture_getProducer(env, thiz)); sp<Surface> surfaceTextureClient(surfaceTexture != NULL ? new Surface(producer) : NULL); return surfaceTextureClient; } static sp<ANativeWindow> getNativeWindowFromTexture(JNIEnv* env, jobject surfaceTexture) { sp<ANativeWindow> anw; if (surfaceTexture) { anw = android_SurfaceTexture_getNativeWindow(env, surfaceTexture); anw = getSurfaceTextureNativeWindow(env, surfaceTexture); if (env->ExceptionCheck()) { return NULL; } Loading
core/jni/include/android_runtime/android_graphics_SurfaceTexture.h +0 −3 Original line number Diff line number Diff line Loading @@ -17,8 +17,6 @@ #ifndef _ANDROID_GRAPHICS_SURFACETEXTURE_H #define _ANDROID_GRAPHICS_SURFACETEXTURE_H #include <android/native_window.h> #include "jni.h" namespace android { Loading @@ -26,7 +24,6 @@ namespace android { class IGraphicBufferProducer; class SurfaceTexture; extern sp<ANativeWindow> android_SurfaceTexture_getNativeWindow(JNIEnv* env, jobject thiz); extern bool android_SurfaceTexture_isInstanceOf(JNIEnv* env, jobject thiz); /* Gets the underlying C++ SurfaceTexture object from a SurfaceTexture Java object. */ Loading