diff options
-rw-r--r-- | core/java/android/view/Surface.java | 6 | ||||
-rw-r--r-- | core/jni/android_view_Surface.cpp | 6 | ||||
-rw-r--r-- | services/java/com/android/server/wm/WindowAnimator.java | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java index 07bb8f9..7ef6939 100644 --- a/core/java/android/view/Surface.java +++ b/core/java/android/view/Surface.java @@ -245,6 +245,7 @@ public class Surface implements Parcelable { private static native void nativeOpenTransaction(); private static native void nativeCloseTransaction(); + private static native void nativeSetAnimationTransaction(); private native void nativeSetLayer(int zorder); private native void nativeSetPosition(float x, float y); @@ -525,6 +526,11 @@ public class Surface implements Parcelable { nativeCloseTransaction(); } + /** flag the transaction as an animation @hide */ + public static void setAnimationTransaction() { + nativeSetAnimationTransaction(); + } + /** @hide */ public void setLayer(int zorder) { nativeSetLayer(zorder); diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp index 4982f31..531445f 100644 --- a/core/jni/android_view_Surface.cpp +++ b/core/jni/android_view_Surface.cpp @@ -526,6 +526,10 @@ static void nativeCloseTransaction(JNIEnv* env, jclass clazz) { SurfaceComposerClient::closeGlobalTransaction(); } +static void nativeSetAnimationTransaction(JNIEnv* env, jclass clazz) { + SurfaceComposerClient::setAnimationTransaction(); +} + static void nativeSetLayer(JNIEnv* env, jobject surfaceObj, jint zorder) { sp<SurfaceControl> surface(getSurfaceControl(env, surfaceObj)); if (surface == NULL) return; @@ -819,6 +823,8 @@ static JNINativeMethod gSurfaceMethods[] = { (void*)nativeOpenTransaction }, {"nativeCloseTransaction", "()V", (void*)nativeCloseTransaction }, + {"nativeSetAnimationTransaction", "()V", + (void*)nativeSetAnimationTransaction }, {"nativeSetLayer", "(I)V", (void*)nativeSetLayer }, {"nativeSetPosition", "(FF)V", diff --git a/services/java/com/android/server/wm/WindowAnimator.java b/services/java/com/android/server/wm/WindowAnimator.java index b67fb51..269eac0 100644 --- a/services/java/com/android/server/wm/WindowAnimator.java +++ b/services/java/com/android/server/wm/WindowAnimator.java @@ -618,6 +618,7 @@ public class WindowAnimator { if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i( TAG, ">>> OPEN TRANSACTION animateLocked"); Surface.openTransaction(); + Surface.setAnimationTransaction(); try { updateAppWindowsLocked(); |