Merge "DO NOT MERGE: WM: Call Transaction#sanitize" into sc-qpr1-dev
This commit is contained in:
@@ -239,6 +239,7 @@ public final class SurfaceControl implements Parcelable {
|
|||||||
private static native int nativeGetGPUContextPriority();
|
private static native int nativeGetGPUContextPriority();
|
||||||
private static native void nativeSetTransformHint(long nativeObject, int transformHint);
|
private static native void nativeSetTransformHint(long nativeObject, int transformHint);
|
||||||
private static native int nativeGetTransformHint(long nativeObject);
|
private static native int nativeGetTransformHint(long nativeObject);
|
||||||
|
private static native void nativeSanitize(long transactionObject);
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@GuardedBy("mLock")
|
@GuardedBy("mLock")
|
||||||
@@ -3439,7 +3440,14 @@ public final class SurfaceControl implements Parcelable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public void sanitize() {
|
||||||
|
nativeSanitize(mNativeObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
* Merge the other transaction into this transaction, clearing the
|
* Merge the other transaction into this transaction, clearing the
|
||||||
* other transaction as if it had been applied.
|
* other transaction as if it had been applied.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -875,6 +875,11 @@ static void nativeSetDropInputMode(JNIEnv* env, jclass clazz, jlong transactionO
|
|||||||
transaction->setDropInputMode(ctrl, static_cast<gui::DropInputMode>(mode));
|
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) {
|
static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) {
|
||||||
const auto displayIds = SurfaceComposerClient::getPhysicalDisplayIds();
|
const auto displayIds = SurfaceComposerClient::getPhysicalDisplayIds();
|
||||||
jlongArray array = env->NewLongArray(displayIds.size());
|
jlongArray array = env->NewLongArray(displayIds.size());
|
||||||
@@ -2003,6 +2008,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = {
|
|||||||
(void*)nativeSetTrustedOverlay },
|
(void*)nativeSetTrustedOverlay },
|
||||||
{"nativeSetDropInputMode", "(JJI)V",
|
{"nativeSetDropInputMode", "(JJI)V",
|
||||||
(void*)nativeSetDropInputMode},
|
(void*)nativeSetDropInputMode},
|
||||||
|
{"nativeSanitize", "(J)V",
|
||||||
|
(void*) nativeSanitize }
|
||||||
// clang-format on
|
// clang-format on
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2643,6 +2643,10 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
|
|
||||||
void finishDrawingWindow(Session session, IWindow client,
|
void finishDrawingWindow(Session session, IWindow client,
|
||||||
@Nullable SurfaceControl.Transaction postDrawTransaction) {
|
@Nullable SurfaceControl.Transaction postDrawTransaction) {
|
||||||
|
if (postDrawTransaction != null) {
|
||||||
|
postDrawTransaction.sanitize();
|
||||||
|
}
|
||||||
|
|
||||||
final long origId = Binder.clearCallingIdentity();
|
final long origId = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
synchronized (mGlobalLock) {
|
synchronized (mGlobalLock) {
|
||||||
|
|||||||
Reference in New Issue
Block a user