Loading core/java/android/view/SurfaceControl.java +0 −14 Original line number Diff line number Diff line Loading @@ -84,7 +84,6 @@ public final class SurfaceControl implements Parcelable { private static native long nativeCopyFromSurfaceControl(long nativeObject); private static native void nativeWriteToParcel(long nativeObject, Parcel out); private static native void nativeRelease(long nativeObject); private static native void nativeDestroy(long nativeObject); private static native void nativeDisconnect(long nativeObject); private static native ScreenshotGraphicBuffer nativeScreenshot(IBinder displayToken, Loading Loading @@ -931,19 +930,6 @@ public final class SurfaceControl implements Parcelable { mCloseGuard.close(); } /** * Release the local resources like {@link #release} but also * remove the Surface from the screen. * @hide */ public void remove() { if (mNativeObject != 0) { nativeDestroy(mNativeObject); mNativeObject = 0; } mCloseGuard.close(); } /** * Disconnect any client still connected to the surface. * @hide Loading core/java/android/view/SurfaceView.java +6 −4 Original line number Diff line number Diff line Loading @@ -200,6 +200,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb private int mPendingReportDraws; private SurfaceControl.Transaction mRtTransaction = new SurfaceControl.Transaction(); private SurfaceControl.Transaction mTmpTransaction = new SurfaceControl.Transaction(); public SurfaceView(Context context) { this(context, null); Loading Loading @@ -339,7 +340,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb updateSurface(); if (mSurfaceControl != null) { mSurfaceControl.remove(); mTmpTransaction.remove(mSurfaceControl).apply(); } mSurfaceControl = null; Loading Loading @@ -534,13 +535,14 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb private void releaseSurfaces() { if (mSurfaceControl != null) { mSurfaceControl.remove(); mTmpTransaction.remove(mSurfaceControl); mSurfaceControl = null; } if (mBackgroundControl != null) { mBackgroundControl.remove(); mTmpTransaction.remove(mBackgroundControl); mBackgroundControl = null; } mTmpTransaction.apply(); } /** @hide */ Loading Loading @@ -849,7 +851,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb } if (mDeferredDestroySurfaceControl != null) { mDeferredDestroySurfaceControl.remove(); mTmpTransaction.remove(mDeferredDestroySurfaceControl).apply(); mDeferredDestroySurfaceControl = null; } Loading core/java/android/view/ViewRootImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -1631,7 +1631,7 @@ public final class ViewRootImpl implements ViewParent, mSurfaceSession = null; if (mBoundsSurfaceControl != null) { mBoundsSurfaceControl.remove(); mTransaction.remove(mBoundsSurfaceControl).apply(); mBoundsSurface.release(); mBoundsSurfaceControl = null; } Loading core/java/android/widget/Magnifier.java +1 −1 Original line number Diff line number Diff line Loading @@ -1035,7 +1035,7 @@ public final class Magnifier { // Destroy the renderer. This will not proceed until pending frame callbacks complete. mRenderer.destroy(); mSurface.destroy(); mSurfaceControl.remove(); new SurfaceControl.Transaction().remove(mSurfaceControl).apply(); mSurfaceSession.kill(); mHandler.removeCallbacks(mMagnifierUpdater); if (mBitmap != null) { Loading core/jni/android_view_SurfaceControl.cpp +0 −8 Original line number Diff line number Diff line Loading @@ -217,12 +217,6 @@ static void nativeRelease(JNIEnv* env, jclass clazz, jlong nativeObject) { ctrl->decStrong((void *)nativeCreate); } static void nativeDestroy(JNIEnv* env, jclass clazz, jlong nativeObject) { sp<SurfaceControl> ctrl(reinterpret_cast<SurfaceControl *>(nativeObject)); ctrl->destroy(); ctrl->decStrong((void *)nativeCreate); } static void nativeDisconnect(JNIEnv* env, jclass clazz, jlong nativeObject) { SurfaceControl* const ctrl = reinterpret_cast<SurfaceControl *>(nativeObject); if (ctrl != NULL) { Loading Loading @@ -1295,8 +1289,6 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeWriteToParcel }, {"nativeRelease", "(J)V", (void*)nativeRelease }, {"nativeDestroy", "(J)V", (void*)nativeDestroy }, {"nativeDisconnect", "(J)V", (void*)nativeDisconnect }, {"nativeCreateTransaction", "()J", Loading Loading
core/java/android/view/SurfaceControl.java +0 −14 Original line number Diff line number Diff line Loading @@ -84,7 +84,6 @@ public final class SurfaceControl implements Parcelable { private static native long nativeCopyFromSurfaceControl(long nativeObject); private static native void nativeWriteToParcel(long nativeObject, Parcel out); private static native void nativeRelease(long nativeObject); private static native void nativeDestroy(long nativeObject); private static native void nativeDisconnect(long nativeObject); private static native ScreenshotGraphicBuffer nativeScreenshot(IBinder displayToken, Loading Loading @@ -931,19 +930,6 @@ public final class SurfaceControl implements Parcelable { mCloseGuard.close(); } /** * Release the local resources like {@link #release} but also * remove the Surface from the screen. * @hide */ public void remove() { if (mNativeObject != 0) { nativeDestroy(mNativeObject); mNativeObject = 0; } mCloseGuard.close(); } /** * Disconnect any client still connected to the surface. * @hide Loading
core/java/android/view/SurfaceView.java +6 −4 Original line number Diff line number Diff line Loading @@ -200,6 +200,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb private int mPendingReportDraws; private SurfaceControl.Transaction mRtTransaction = new SurfaceControl.Transaction(); private SurfaceControl.Transaction mTmpTransaction = new SurfaceControl.Transaction(); public SurfaceView(Context context) { this(context, null); Loading Loading @@ -339,7 +340,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb updateSurface(); if (mSurfaceControl != null) { mSurfaceControl.remove(); mTmpTransaction.remove(mSurfaceControl).apply(); } mSurfaceControl = null; Loading Loading @@ -534,13 +535,14 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb private void releaseSurfaces() { if (mSurfaceControl != null) { mSurfaceControl.remove(); mTmpTransaction.remove(mSurfaceControl); mSurfaceControl = null; } if (mBackgroundControl != null) { mBackgroundControl.remove(); mTmpTransaction.remove(mBackgroundControl); mBackgroundControl = null; } mTmpTransaction.apply(); } /** @hide */ Loading Loading @@ -849,7 +851,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb } if (mDeferredDestroySurfaceControl != null) { mDeferredDestroySurfaceControl.remove(); mTmpTransaction.remove(mDeferredDestroySurfaceControl).apply(); mDeferredDestroySurfaceControl = null; } Loading
core/java/android/view/ViewRootImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -1631,7 +1631,7 @@ public final class ViewRootImpl implements ViewParent, mSurfaceSession = null; if (mBoundsSurfaceControl != null) { mBoundsSurfaceControl.remove(); mTransaction.remove(mBoundsSurfaceControl).apply(); mBoundsSurface.release(); mBoundsSurfaceControl = null; } Loading
core/java/android/widget/Magnifier.java +1 −1 Original line number Diff line number Diff line Loading @@ -1035,7 +1035,7 @@ public final class Magnifier { // Destroy the renderer. This will not proceed until pending frame callbacks complete. mRenderer.destroy(); mSurface.destroy(); mSurfaceControl.remove(); new SurfaceControl.Transaction().remove(mSurfaceControl).apply(); mSurfaceSession.kill(); mHandler.removeCallbacks(mMagnifierUpdater); if (mBitmap != null) { Loading
core/jni/android_view_SurfaceControl.cpp +0 −8 Original line number Diff line number Diff line Loading @@ -217,12 +217,6 @@ static void nativeRelease(JNIEnv* env, jclass clazz, jlong nativeObject) { ctrl->decStrong((void *)nativeCreate); } static void nativeDestroy(JNIEnv* env, jclass clazz, jlong nativeObject) { sp<SurfaceControl> ctrl(reinterpret_cast<SurfaceControl *>(nativeObject)); ctrl->destroy(); ctrl->decStrong((void *)nativeCreate); } static void nativeDisconnect(JNIEnv* env, jclass clazz, jlong nativeObject) { SurfaceControl* const ctrl = reinterpret_cast<SurfaceControl *>(nativeObject); if (ctrl != NULL) { Loading Loading @@ -1295,8 +1289,6 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeWriteToParcel }, {"nativeRelease", "(J)V", (void*)nativeRelease }, {"nativeDestroy", "(J)V", (void*)nativeDestroy }, {"nativeDisconnect", "(J)V", (void*)nativeDisconnect }, {"nativeCreateTransaction", "()J", Loading