diff options
Diffstat (limited to 'android/view/SurfaceControl.java')
-rw-r--r-- | android/view/SurfaceControl.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/android/view/SurfaceControl.java b/android/view/SurfaceControl.java index d4610a56..5deee11b 100644 --- a/android/view/SurfaceControl.java +++ b/android/view/SurfaceControl.java @@ -87,6 +87,7 @@ public class SurfaceControl implements Parcelable { private static native void nativeMergeTransaction(long transactionObj, long otherTransactionObj); private static native void nativeSetAnimationTransaction(long transactionObj); + private static native void nativeSetEarlyWakeup(long transactionObj); private static native void nativeSetLayer(long transactionObj, long nativeObject, int zorder); private static native void nativeSetRelativeLayer(long transactionObj, long nativeObject, @@ -1642,6 +1643,19 @@ public class SurfaceControl implements Parcelable { } /** + * Indicate that SurfaceFlinger should wake up earlier than usual as a result of this + * transaction. This should be used when the caller thinks that the scene is complex enough + * that it's likely to hit GL composition, and thus, SurfaceFlinger needs to more time in + * order not to miss frame deadlines. + * <p> + * Corresponds to setting ISurfaceComposer::eEarlyWakeup + */ + public Transaction setEarlyWakeup() { + nativeSetEarlyWakeup(mNativeObject); + return this; + } + + /** * Merge the other transaction into this transaction, clearing the * other transaction as if it had been applied. */ |