Loading core/java/android/view/SurfaceControl.java +14 −0 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -1641,6 +1642,19 @@ public class SurfaceControl implements Parcelable { return this; } /** * 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. Loading core/jni/android_view_SurfaceControl.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,11 @@ static void nativeSetAnimationTransaction(JNIEnv* env, jclass clazz, jlong trans transaction->setAnimationTransaction(); } static void nativeSetEarlyWakeup(JNIEnv* env, jclass clazz, jlong transactionObj) { auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj); transaction->setEarlyWakeup(); } static void nativeSetLayer(JNIEnv* env, jclass clazz, jlong transactionObj, jlong nativeObject, jint zorder) { auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj); Loading Loading @@ -934,6 +939,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeMergeTransaction }, {"nativeSetAnimationTransaction", "(J)V", (void*)nativeSetAnimationTransaction }, {"nativeSetEarlyWakeup", "(J)V", (void*)nativeSetEarlyWakeup }, {"nativeSetLayer", "(JJI)V", (void*)nativeSetLayer }, {"nativeSetRelativeLayer", "(JJLandroid/os/IBinder;I)V", Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/TransactionCompat.java +5 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,11 @@ public class TransactionCompat { return this; } public TransactionCompat setEarlyWakeup() { mTransaction.setEarlyWakeup(); return this; } public TransactionCompat setColor(SurfaceControlCompat surfaceControl, float[] color) { mTransaction.setColor(surfaceControl.mSurfaceControl, color); return this; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java +1 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,7 @@ public class ActivityLaunchAnimator { t.deferTransactionUntilSurface(app.leash, systemUiSurface, systemUiSurface.getNextFrameNumber()); } t.setEarlyWakeup(); t.apply(); } Loading services/core/java/com/android/server/wm/AppWindowToken.java +2 −1 Original line number Diff line number Diff line Loading @@ -1714,7 +1714,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree adapter = new LocalAnimationAdapter( new WindowAnimationSpec(a, mTmpPoint, mTmpRect, mService.mAppTransition.canSkipFirstFrame(), mService.mAppTransition.getAppStackClipMode()), mService.mAppTransition.getAppStackClipMode(), true /* isAppAnimation */), mService.mSurfaceAnimationRunner); if (a.getZAdjustment() == Animation.ZORDER_TOP) { mNeedsZBoost = true; Loading Loading
core/java/android/view/SurfaceControl.java +14 −0 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -1641,6 +1642,19 @@ public class SurfaceControl implements Parcelable { return this; } /** * 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. Loading
core/jni/android_view_SurfaceControl.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,11 @@ static void nativeSetAnimationTransaction(JNIEnv* env, jclass clazz, jlong trans transaction->setAnimationTransaction(); } static void nativeSetEarlyWakeup(JNIEnv* env, jclass clazz, jlong transactionObj) { auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj); transaction->setEarlyWakeup(); } static void nativeSetLayer(JNIEnv* env, jclass clazz, jlong transactionObj, jlong nativeObject, jint zorder) { auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj); Loading Loading @@ -934,6 +939,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeMergeTransaction }, {"nativeSetAnimationTransaction", "(J)V", (void*)nativeSetAnimationTransaction }, {"nativeSetEarlyWakeup", "(J)V", (void*)nativeSetEarlyWakeup }, {"nativeSetLayer", "(JJI)V", (void*)nativeSetLayer }, {"nativeSetRelativeLayer", "(JJLandroid/os/IBinder;I)V", Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/TransactionCompat.java +5 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,11 @@ public class TransactionCompat { return this; } public TransactionCompat setEarlyWakeup() { mTransaction.setEarlyWakeup(); return this; } public TransactionCompat setColor(SurfaceControlCompat surfaceControl, float[] color) { mTransaction.setColor(surfaceControl.mSurfaceControl, color); return this; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java +1 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,7 @@ public class ActivityLaunchAnimator { t.deferTransactionUntilSurface(app.leash, systemUiSurface, systemUiSurface.getNextFrameNumber()); } t.setEarlyWakeup(); t.apply(); } Loading
services/core/java/com/android/server/wm/AppWindowToken.java +2 −1 Original line number Diff line number Diff line Loading @@ -1714,7 +1714,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree adapter = new LocalAnimationAdapter( new WindowAnimationSpec(a, mTmpPoint, mTmpRect, mService.mAppTransition.canSkipFirstFrame(), mService.mAppTransition.getAppStackClipMode()), mService.mAppTransition.getAppStackClipMode(), true /* isAppAnimation */), mService.mSurfaceAnimationRunner); if (a.getZAdjustment() == Animation.ZORDER_TOP) { mNeedsZBoost = true; Loading