From bdd896c26453ffc56831b0cd167e8780068cee53 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Mon, 19 Mar 2012 13:40:49 -0700 Subject: [PATCH] Enable DisplayList properties This CL simply enables DisplayList property functionality. The code for this feature is already there, but it's been disabled by default pending further testing and analysis. This change sets these build-type flags to true so that all hw-accelerated apps will now use DisplayList properties by default. In particular, this feature enables a fast-path for changes that affect the handful of View properties involved in animations (alpha, translationX, etc.). Setting these properties now gets propagated to the native DisplayList associated with the View, avoiding costly recreation of the SDK-level DisplayList and also enabling faster invalidation of the view hierarchy. Change-Id: Ic99c8f28fa9183f2e54e9e4860b333eb9c540f7c --- core/java/android/view/View.java | 2 +- libs/hwui/DisplayListRenderer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 6d1f207a4dcd4..fdf3a81452554 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -1503,7 +1503,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * apps. * @hide */ - public static final boolean USE_DISPLAY_LIST_PROPERTIES = false; + public static final boolean USE_DISPLAY_LIST_PROPERTIES = true; /** * Map used to store views' tags. diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h index 4bbb04f36a417..38d0374ca0894 100644 --- a/libs/hwui/DisplayListRenderer.h +++ b/libs/hwui/DisplayListRenderer.h @@ -51,7 +51,7 @@ namespace uirenderer { // Set to 1 to enable native processing of View properties. 0 by default. Eventually this // will go away and we will always use this approach for accelerated apps. -#define USE_DISPLAY_LIST_PROPERTIES 0 +#define USE_DISPLAY_LIST_PROPERTIES 1 #define TRANSLATION 0x0001 #define ROTATION 0x0002