Loading core/java/android/view/SurfaceControl.java +8 −0 Original line number Diff line number Diff line Loading @@ -254,6 +254,7 @@ public final class SurfaceControl implements Parcelable { private static native int nativeGetLayerId(long nativeObject); private static native void nativeAddTransactionCommittedListener(long nativeObject, TransactionCommittedListener listener); private static native void nativeSanitize(long transactionObject); /** * Transforms that can be applied to buffers as they are displayed to a window. Loading Loading @@ -3699,6 +3700,13 @@ public final class SurfaceControl implements Parcelable { return this; } /** * @hide */ public void sanitize() { nativeSanitize(mNativeObject); } /** * Merge the other transaction into this transaction, clearing the * other transaction as if it had been applied. Loading core/jni/android_view_SurfaceControl.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -953,6 +953,11 @@ static void nativeSetDropInputMode(JNIEnv* env, jclass clazz, jlong transactionO transaction->setDropInputMode(ctrl, static_cast<gui::DropInputMode>(mode)); } static void nativeSanitize(JNIEnv* env, jclass clazz, jlong transactionObj) { auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj); transaction->sanitize(); } static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) { const auto displayIds = SurfaceComposerClient::getPhysicalDisplayIds(); jlongArray array = env->NewLongArray(displayIds.size()); Loading Loading @@ -2134,6 +2139,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeSetDropInputMode }, {"nativeAddTransactionCommittedListener", "(JLandroid/view/TransactionCommittedListener;)V", (void*) nativeAddTransactionCommittedListener }, {"nativeSanitize", "(J)V", (void*) nativeSanitize } // clang-format on }; Loading services/core/java/com/android/server/wm/WindowManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -2622,6 +2622,10 @@ public class WindowManagerService extends IWindowManager.Stub void finishDrawingWindow(Session session, IWindow client, @Nullable SurfaceControl.Transaction postDrawTransaction) { if (postDrawTransaction != null) { postDrawTransaction.sanitize(); } final long origId = Binder.clearCallingIdentity(); try { synchronized (mGlobalLock) { Loading Loading
core/java/android/view/SurfaceControl.java +8 −0 Original line number Diff line number Diff line Loading @@ -254,6 +254,7 @@ public final class SurfaceControl implements Parcelable { private static native int nativeGetLayerId(long nativeObject); private static native void nativeAddTransactionCommittedListener(long nativeObject, TransactionCommittedListener listener); private static native void nativeSanitize(long transactionObject); /** * Transforms that can be applied to buffers as they are displayed to a window. Loading Loading @@ -3699,6 +3700,13 @@ public final class SurfaceControl implements Parcelable { return this; } /** * @hide */ public void sanitize() { nativeSanitize(mNativeObject); } /** * Merge the other transaction into this transaction, clearing the * other transaction as if it had been applied. Loading
core/jni/android_view_SurfaceControl.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -953,6 +953,11 @@ static void nativeSetDropInputMode(JNIEnv* env, jclass clazz, jlong transactionO transaction->setDropInputMode(ctrl, static_cast<gui::DropInputMode>(mode)); } static void nativeSanitize(JNIEnv* env, jclass clazz, jlong transactionObj) { auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj); transaction->sanitize(); } static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) { const auto displayIds = SurfaceComposerClient::getPhysicalDisplayIds(); jlongArray array = env->NewLongArray(displayIds.size()); Loading Loading @@ -2134,6 +2139,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeSetDropInputMode }, {"nativeAddTransactionCommittedListener", "(JLandroid/view/TransactionCommittedListener;)V", (void*) nativeAddTransactionCommittedListener }, {"nativeSanitize", "(J)V", (void*) nativeSanitize } // clang-format on }; Loading
services/core/java/com/android/server/wm/WindowManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -2622,6 +2622,10 @@ public class WindowManagerService extends IWindowManager.Stub void finishDrawingWindow(Session session, IWindow client, @Nullable SurfaceControl.Transaction postDrawTransaction) { if (postDrawTransaction != null) { postDrawTransaction.sanitize(); } final long origId = Binder.clearCallingIdentity(); try { synchronized (mGlobalLock) { Loading