diff options
| author | Romain Guy <romainguy@google.com> | 2010-08-03 18:05:47 -0700 |
|---|---|---|
| committer | Romain Guy <romainguy@google.com> | 2010-08-04 10:55:46 -0700 |
| commit | 529b60a3b16ac3dff24f2403d760ab8ebc9670ff (patch) | |
| tree | 81415ba149de613a165d94210938755982951017 /core/java/android/view/WindowManager.java | |
| parent | cf9a44cdf3647c8b31499ad6250f63259c0e34e2 (diff) | |
Add android:hardwareAccelerated to Activity.
Hardware acceleration can now be enabled/disabled locally on each activity
declared in the manifest. It can also be enabled/disabled directly on a
window through the WindowManager.LayoutParams.
Change-Id: I91dd0b26c4e7eb8cd7288e523ed6b7bda6d0990b
Diffstat (limited to 'core/java/android/view/WindowManager.java')
| -rw-r--r-- | core/java/android/view/WindowManager.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index eebbc931d0a3..c147b74aec88 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -72,6 +72,7 @@ public interface WindowManager extends ViewManager { * When using {@link Gravity#LEFT} or {@link Gravity#RIGHT} it provides * an offset from the given edge. */ + @ViewDebug.ExportedProperty public int x; /** @@ -79,6 +80,7 @@ public interface WindowManager extends ViewManager { * When using {@link Gravity#TOP} or {@link Gravity#BOTTOM} it provides * an offset from the given edge. */ + @ViewDebug.ExportedProperty public int y; /** @@ -87,6 +89,7 @@ public interface WindowManager extends ViewManager { * should not be stretched. Otherwise the extra pixels will be pro-rated * among all views whose weight is greater than 0. */ + @ViewDebug.ExportedProperty public float horizontalWeight; /** @@ -95,8 +98,9 @@ public interface WindowManager extends ViewManager { * should not be stretched. Otherwise the extra pixels will be pro-rated * among all views whose weight is greater than 0. */ + @ViewDebug.ExportedProperty public float verticalWeight; - + /** * The general type of window. There are three main classes of * window types: @@ -389,6 +393,7 @@ public interface WindowManager extends ViewManager { * @see #FLAG_FULLSCREEN * @see #FLAG_FORCE_NOT_FULLSCREEN * @see #FLAG_IGNORE_CHEEK_PRESSES + * @see #FLAG_HARDWARE_ACCELERATED */ @ViewDebug.ExportedProperty(flagMapping = { @ViewDebug.FlagToString(mask = FLAG_BLUR_BEHIND, equals = FLAG_BLUR_BEHIND, @@ -420,7 +425,9 @@ public interface WindowManager extends ViewManager { @ViewDebug.FlagToString(mask = FLAG_FORCE_NOT_FULLSCREEN, equals = FLAG_FORCE_NOT_FULLSCREEN, name = "FLAG_FORCE_NOT_FULLSCREEN"), @ViewDebug.FlagToString(mask = FLAG_IGNORE_CHEEK_PRESSES, - equals = FLAG_IGNORE_CHEEK_PRESSES, name = "FLAG_IGNORE_CHEEK_PRESSES") + equals = FLAG_IGNORE_CHEEK_PRESSES, name = "FLAG_IGNORE_CHEEK_PRESSES"), + @ViewDebug.FlagToString(mask = FLAG_HARDWARE_ACCELERATED, + equals = FLAG_HARDWARE_ACCELERATED, name = "FLAG_HARDWARE_ACCELERATED") }) public int flags; @@ -603,6 +610,12 @@ public interface WindowManager extends ViewManager { * it is created. * {@hide} */ public static final int FLAG_SYSTEM_ERROR = 0x40000000; + + /** + * Indicates whether this window should be hardware accelerated. + * Requesting hardware acceleration does not guarantee it will happen. + */ + public static final int FLAG_HARDWARE_ACCELERATED = 0x80000000; /** * Given a particular set of window manager flags, determine whether @@ -1075,6 +1088,7 @@ public interface WindowManager extends ViewManager { screenOrientation = o.screenOrientation; changes |= SCREEN_ORIENTATION_CHANGED; } + return changes; } |
