Loading core/java/android/view/SurfaceControl.java +2 −7 Original line number Diff line number Diff line Loading @@ -509,13 +509,8 @@ public class SurfaceControl { if (displayToken == null) { throw new IllegalArgumentException("displayToken must not be null"); } if (surface == null) { throw new IllegalArgumentException("surface must not be null"); } if (surface.mNativeObject == 0) throw new NullPointerException("Surface native object is null. Are you using a released surface?"); nativeSetDisplaySurface(displayToken, surface.mNativeObject); int nativeSurface = surface != null ? surface.mNativeObject : 0; nativeSetDisplaySurface(displayToken, nativeSurface); } public static IBinder createDisplay(String name, boolean secure) { Loading core/jni/android_view_Surface.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -388,7 +388,7 @@ int register_android_view_Surface(JNIEnv* env) env->GetFieldID(gSurfaceClassInfo.clazz, "mGenerationId", "I"); gSurfaceClassInfo.mCanvas = env->GetFieldID(gSurfaceClassInfo.clazz, "mCanvas", "Landroid/graphics/Canvas;"); gSurfaceClassInfo.ctor = env->GetMethodID(gSurfaceClassInfo.clazz, "<init>", "()V"); gSurfaceClassInfo.ctor = env->GetMethodID(gSurfaceClassInfo.clazz, "<init>", "(I)V"); clazz = env->FindClass("android/graphics/Canvas"); gCanvasClassInfo.mFinalizer = env->GetFieldID(clazz, "mFinalizer", "Landroid/graphics/Canvas$CanvasFinalizer;"); Loading core/jni/android_view_SurfaceControl.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -320,8 +320,11 @@ static void nativeSetDisplaySurface(JNIEnv* env, jclass clazz, jobject tokenObj, jint nativeSurfaceObject) { sp<IBinder> token(ibinderForJavaObject(env, tokenObj)); if (token == NULL) return; sp<IGraphicBufferProducer> bufferProducer; sp<Surface> sur(reinterpret_cast<Surface *>(nativeSurfaceObject)); sp<IGraphicBufferProducer> bufferProducer(sur->getIGraphicBufferProducer()); if (sur != NULL) { bufferProducer = sur->getIGraphicBufferProducer(); } SurfaceComposerClient::setDisplaySurface(token, bufferProducer); } Loading Loading
core/java/android/view/SurfaceControl.java +2 −7 Original line number Diff line number Diff line Loading @@ -509,13 +509,8 @@ public class SurfaceControl { if (displayToken == null) { throw new IllegalArgumentException("displayToken must not be null"); } if (surface == null) { throw new IllegalArgumentException("surface must not be null"); } if (surface.mNativeObject == 0) throw new NullPointerException("Surface native object is null. Are you using a released surface?"); nativeSetDisplaySurface(displayToken, surface.mNativeObject); int nativeSurface = surface != null ? surface.mNativeObject : 0; nativeSetDisplaySurface(displayToken, nativeSurface); } public static IBinder createDisplay(String name, boolean secure) { Loading
core/jni/android_view_Surface.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -388,7 +388,7 @@ int register_android_view_Surface(JNIEnv* env) env->GetFieldID(gSurfaceClassInfo.clazz, "mGenerationId", "I"); gSurfaceClassInfo.mCanvas = env->GetFieldID(gSurfaceClassInfo.clazz, "mCanvas", "Landroid/graphics/Canvas;"); gSurfaceClassInfo.ctor = env->GetMethodID(gSurfaceClassInfo.clazz, "<init>", "()V"); gSurfaceClassInfo.ctor = env->GetMethodID(gSurfaceClassInfo.clazz, "<init>", "(I)V"); clazz = env->FindClass("android/graphics/Canvas"); gCanvasClassInfo.mFinalizer = env->GetFieldID(clazz, "mFinalizer", "Landroid/graphics/Canvas$CanvasFinalizer;"); Loading
core/jni/android_view_SurfaceControl.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -320,8 +320,11 @@ static void nativeSetDisplaySurface(JNIEnv* env, jclass clazz, jobject tokenObj, jint nativeSurfaceObject) { sp<IBinder> token(ibinderForJavaObject(env, tokenObj)); if (token == NULL) return; sp<IGraphicBufferProducer> bufferProducer; sp<Surface> sur(reinterpret_cast<Surface *>(nativeSurfaceObject)); sp<IGraphicBufferProducer> bufferProducer(sur->getIGraphicBufferProducer()); if (sur != NULL) { bufferProducer = sur->getIGraphicBufferProducer(); } SurfaceComposerClient::setDisplaySurface(token, bufferProducer); } Loading