summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2012-10-15 19:52:04 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-15 19:52:05 -0700
commit809bb404da66498f1723279542d2a7d1f4512052 (patch)
tree732179c3ca4004019fca094e81bd42a234f1cafb /core
parent69fbc3c089e3399ebd94cc3a7ba846f426a7b32d (diff)
parentb6ce6e42cc89864354c7ecb9ae80504a6c9dddcf (diff)
downloadframeworks_base-809bb404da66498f1723279542d2a7d1f4512052.zip
frameworks_base-809bb404da66498f1723279542d2a7d1f4512052.tar.gz
frameworks_base-809bb404da66498f1723279542d2a7d1f4512052.tar.bz2
Merge "Flag window animation transactions as animations." into jb-mr1-dev
Diffstat (limited to 'core')
-rw-r--r--core/java/android/view/Surface.java6
-rw-r--r--core/jni/android_view_Surface.cpp6
2 files changed, 12 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",