diff options
author | Xavier Ducrohet <xav@android.com> | 2011-01-26 18:09:34 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2011-01-26 18:19:11 -0800 |
commit | 6aeb047ea010de8f3e820dab6625aef762418de6 (patch) | |
tree | e37bad45739de1c8dd86731a7bbeb88003dad5b1 /layoutlib_api/src/com/android | |
parent | cae0377d0c2d15d8917e2fa50bdb0f2ab81bd513 (diff) | |
download | sdk-6aeb047ea010de8f3e820dab6625aef762418de6.zip sdk-6aeb047ea010de8f3e820dab6625aef762418de6.tar.gz sdk-6aeb047ea010de8f3e820dab6625aef762418de6.tar.bz2 |
Properly convert the rendered layout images if alpha is needed.
The layoutlib can specify if the image is rendered as a floating
window, and needs alpha.
If it doesn't needed it we do a faster convert discarding the
alpha which will be better when playing animations in the normal
case.
Change-Id: I2dbd2d1ae9190207b51978e4a8d77cdff25f3e45
Diffstat (limited to 'layoutlib_api/src/com/android')
-rw-r--r-- | layoutlib_api/src/com/android/ide/common/rendering/api/RenderSession.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/RenderSession.java b/layoutlib_api/src/com/android/ide/common/rendering/api/RenderSession.java index 0adf6f5..5a00ebc 100644 --- a/layoutlib_api/src/com/android/ide/common/rendering/api/RenderSession.java +++ b/layoutlib_api/src/com/android/ide/common/rendering/api/RenderSession.java @@ -73,6 +73,16 @@ public class RenderSession { return null; } + /** + * Returns true if the current session is rendered as a floating window. + * <p/> + * If true this means the alpha channel of {@link #getImage()} should be respected. If false, + * if can be dropped if it's more convenient/faster. + * @return whether the current session is rendered as a floating window. + */ + public boolean isFloatingWindow() { + return true; + } /** * Returns a map of (XML attribute name, attribute value) containing only default attribute |