diff options
author | Mathias Agopian <mathias@google.com> | 2011-11-11 11:49:38 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-11 11:49:38 -0800 |
commit | c153fc5bb00ca1169651c914ad15a6cd1bbe2128 (patch) | |
tree | 4c1bfce47f1893c41e511542788dde76cec3baf3 /cmds | |
parent | ed68299b99a854696f99c0825de5ebe09d70f25a (diff) | |
parent | de62d9cbe00d0fcac24af9a3d89ba7a125e56eaa (diff) | |
download | frameworks_base-c153fc5bb00ca1169651c914ad15a6cd1bbe2128.zip frameworks_base-c153fc5bb00ca1169651c914ad15a6cd1bbe2128.tar.gz frameworks_base-c153fc5bb00ca1169651c914ad15a6cd1bbe2128.tar.bz2 |
am de62d9cb: Merge "boot animation is dithered and scaled" into ics-mr1
* commit 'de62d9cbe00d0fcac24af9a3d89ba7a125e56eaa':
boot animation is dithered and scaled
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index d816e7c..154dbb8 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -42,6 +42,7 @@ #include <surfaceflinger/ISurfaceComposerClient.h> #include <core/SkBitmap.h> +#include <core/SkStream.h> #include <images/SkImageDecoder.h> #include <GLES/gl.h> @@ -150,9 +151,15 @@ status_t BootAnimation::initTexture(void* buffer, size_t len) //StopWatch watch("blah"); SkBitmap bitmap; - SkImageDecoder::DecodeMemory(buffer, len, - &bitmap, SkBitmap::kRGB_565_Config, - SkImageDecoder::kDecodePixels_Mode); + SkMemoryStream stream(buffer, len); + SkImageDecoder* codec = SkImageDecoder::Factory(&stream); + codec->setDitherImage(false); + if (codec) { + codec->decode(&stream, &bitmap, + SkBitmap::kRGB_565_Config, + SkImageDecoder::kDecodePixels_Mode); + delete codec; + } // ensure we can call getPixels(). No need to call unlock, since the // bitmap will go out of scope when we return from this method. |