Merge "Expose transaction id" into tm-qpr-dev am: e58a36c1c3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18799654 Change-Id: I5df72b9e9b2c9db416157067ef7c14ac536ec795 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -121,6 +121,7 @@ public final class SurfaceControl implements Parcelable {
|
|||||||
private static native void nativeSetAnimationTransaction(long transactionObj);
|
private static native void nativeSetAnimationTransaction(long transactionObj);
|
||||||
private static native void nativeSetEarlyWakeupStart(long transactionObj);
|
private static native void nativeSetEarlyWakeupStart(long transactionObj);
|
||||||
private static native void nativeSetEarlyWakeupEnd(long transactionObj);
|
private static native void nativeSetEarlyWakeupEnd(long transactionObj);
|
||||||
|
private static native long nativeGetTransactionId(long transactionObj);
|
||||||
|
|
||||||
private static native void nativeSetLayer(long transactionObj, long nativeObject, int zorder);
|
private static native void nativeSetLayer(long transactionObj, long nativeObject, int zorder);
|
||||||
private static native void nativeSetRelativeLayer(long transactionObj, long nativeObject,
|
private static native void nativeSetRelativeLayer(long transactionObj, long nativeObject,
|
||||||
@@ -3536,6 +3537,15 @@ public final class SurfaceControl implements Parcelable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @hide
|
||||||
|
* @return The transaction's current id.
|
||||||
|
* The id changed every time the transaction is applied.
|
||||||
|
*/
|
||||||
|
public long getId() {
|
||||||
|
return nativeGetTransactionId(mNativeObject);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets an arbitrary piece of metadata on the surface. This is a helper for int data.
|
* Sets an arbitrary piece of metadata on the surface. This is a helper for int data.
|
||||||
* @hide
|
* @hide
|
||||||
|
|||||||
@@ -580,6 +580,11 @@ static void nativeSetEarlyWakeupEnd(JNIEnv* env, jclass clazz, jlong transaction
|
|||||||
transaction->setEarlyWakeupEnd();
|
transaction->setEarlyWakeupEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static jlong nativeGetTransactionId(JNIEnv* env, jclass clazz, jlong transactionObj) {
|
||||||
|
auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
|
||||||
|
return transaction->getId();
|
||||||
|
}
|
||||||
|
|
||||||
static void nativeSetLayer(JNIEnv* env, jclass clazz, jlong transactionObj,
|
static void nativeSetLayer(JNIEnv* env, jclass clazz, jlong transactionObj,
|
||||||
jlong nativeObject, jint zorder) {
|
jlong nativeObject, jint zorder) {
|
||||||
auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
|
auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
|
||||||
@@ -2103,6 +2108,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = {
|
|||||||
(void*)nativeSetEarlyWakeupStart },
|
(void*)nativeSetEarlyWakeupStart },
|
||||||
{"nativeSetEarlyWakeupEnd", "(J)V",
|
{"nativeSetEarlyWakeupEnd", "(J)V",
|
||||||
(void*)nativeSetEarlyWakeupEnd },
|
(void*)nativeSetEarlyWakeupEnd },
|
||||||
|
{"nativeGetTransactionId", "(J)J",
|
||||||
|
(void*)nativeGetTransactionId },
|
||||||
{"nativeSetLayer", "(JJI)V",
|
{"nativeSetLayer", "(JJI)V",
|
||||||
(void*)nativeSetLayer },
|
(void*)nativeSetLayer },
|
||||||
{"nativeSetRelativeLayer", "(JJJI)V",
|
{"nativeSetRelativeLayer", "(JJJI)V",
|
||||||
|
|||||||
Reference in New Issue
Block a user