diff options
author | Romain Guy <romainguy@google.com> | 2013-07-11 17:37:31 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2013-07-11 17:37:31 -0700 |
commit | 787e35793f47abdb6cc10f328cd58d362c7bd250 (patch) | |
tree | 87e0bf94652a3164d0558817e9a41a67d3031728 /core/jni/android | |
parent | 5fade8c69aef621312232ef0647502d7a63990b9 (diff) | |
download | frameworks_base-787e35793f47abdb6cc10f328cd58d362c7bd250.zip frameworks_base-787e35793f47abdb6cc10f328cd58d362c7bd250.tar.gz frameworks_base-787e35793f47abdb6cc10f328cd58d362c7bd250.tar.bz2 |
Trace bitmaps decoding
Also remove dead code
Change-Id: Ie931b21858ccbe6ee4def54caf028fd2aed23317
Diffstat (limited to 'core/jni/android')
-rw-r--r-- | core/jni/android/graphics/BitmapFactory.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp index 016c11e..3d0c75f 100644 --- a/core/jni/android/graphics/BitmapFactory.cpp +++ b/core/jni/android/graphics/BitmapFactory.cpp @@ -116,30 +116,6 @@ static void scaleNinePatchChunk(android::Res_png_9patch* chunk, float scale) { } } -static jbyteArray nativeScaleNinePatch(JNIEnv* env, jobject, jbyteArray chunkObject, jfloat scale, - jobject padding) { - - jbyte* array = env->GetByteArrayElements(chunkObject, 0); - if (array != NULL) { - size_t chunkSize = env->GetArrayLength(chunkObject); - void* storage = alloca(chunkSize); - android::Res_png_9patch* chunk = static_cast<android::Res_png_9patch*>(storage); - memcpy(chunk, array, chunkSize); - android::Res_png_9patch::deserialize(chunk); - - scaleNinePatchChunk(chunk, scale); - memcpy(array, chunk, chunkSize); - - if (padding) { - GraphicsJNI::set_jrect(env, padding, chunk->paddingLeft, chunk->paddingTop, - chunk->paddingRight, chunk->paddingBottom); - } - - env->ReleaseByteArrayElements(chunkObject, array, 0); - } - return chunkObject; -} - static SkPixelRef* installPixelRef(SkBitmap* bitmap, SkStream* stream, int sampleSize, bool ditherImage) { @@ -624,11 +600,6 @@ static JNINativeMethod gMethods[] = { (void*)nativeDecodeByteArray }, - { "nativeScaleNinePatch", - "([BFLandroid/graphics/Rect;)[B", - (void*)nativeScaleNinePatch - }, - { "nativeIsSeekable", "(Ljava/io/FileDescriptor;)Z", (void*)nativeIsSeekable |