diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-09-11 21:13:37 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2009-09-14 15:29:44 -0700 |
commit | 19382ac1a4e4e7c23a1346d299368763f149de9c (patch) | |
tree | 9165f1b94f1bd5e9966729b1047d03a733570867 /tools/layoutlib | |
parent | 714ec1360cde8b1cbf6e6b8572256e4100f11560 (diff) | |
download | frameworks_base-19382ac1a4e4e7c23a1346d299368763f149de9c.zip frameworks_base-19382ac1a4e4e7c23a1346d299368763f149de9c.tar.gz frameworks_base-19382ac1a4e4e7c23a1346d299368763f149de9c.tar.bz2 |
Some optizations to wallpaper drawing/scrolling.
First, fix some issues with the final wallpaper bitmap
we use: ensure it is always 16bpp, and make sure dithering
of its bitmap is turned off. We take of dithering
when loading, to make sure we don't use it when drawing.
Also add new APIs to return the wallpaper with the equivalent
of Launcher's old FastBitmapDrawable. As doing this, also load
the default wallpaper the same way as custom ones, taking care to
resize it as needed at load time.
Finally implement a mechanism for the window manager to wait
for the wallpaper to redraw at its new position before returning
from the application's call to change the offset. This ensures
that the wallpaper better tracks the application. Note that there
is a timeout in this wait that is relatively short, and if it
expires we will run for a while without waiting.
Change-Id: Ife449437746da85958bd447e0a6cf3d2223b398c
Diffstat (limited to 'tools/layoutlib')
-rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java index 55fe4ac..0888fd8 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java @@ -1051,15 +1051,22 @@ public final class Bridge implements ILayoutBridge { // pass for now. } + @SuppressWarnings("unused") public void setInsets(IWindow window, int touchable, Rect contentInsets, Rect visibleInsets) { // pass for now. } + @SuppressWarnings("unused") public void setWallpaperPosition(IBinder window, float x, float y) { // pass for now. } + @SuppressWarnings("unused") + public void wallpaperOffsetsComplete(IBinder window) { + // pass for now. + } + public IBinder asBinder() { // pass for now. return null; @@ -1114,7 +1121,7 @@ public final class Bridge implements ILayoutBridge { } @SuppressWarnings("unused") - public void dispatchWallpaperOffsets(float x, float y) { + public void dispatchWallpaperOffsets(float x, float y, boolean sync) { // pass for now. } |