summaryrefslogtreecommitdiffstats
path: root/core/jni/android
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-03-15 18:57:48 -0700
committerRomain Guy <romainguy@google.com>2012-03-15 18:57:48 -0700
commitcaf813fe1ec10dda75cd752cb3ff80872ae7ac0b (patch)
treeee6c485b23bc5f482e0f6cf9f3e3d384ecedcd36 /core/jni/android
parent51e4d4db296c252641161b39e98f49acebc46062 (diff)
downloadframeworks_base-caf813fe1ec10dda75cd752cb3ff80872ae7ac0b.zip
frameworks_base-caf813fe1ec10dda75cd752cb3ff80872ae7ac0b.tar.gz
frameworks_base-caf813fe1ec10dda75cd752cb3ff80872ae7ac0b.tar.bz2
Remove unused private API
Change-Id: Iec9c2bc275fc7376f4e0b0b9c44059c56a9dd173
Diffstat (limited to 'core/jni/android')
-rw-r--r--core/jni/android/graphics/BitmapFactory.cpp31
1 files changed, 4 insertions, 27 deletions
diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp
index 4b64bf3..c9eb640 100644
--- a/core/jni/android/graphics/BitmapFactory.cpp
+++ b/core/jni/android/graphics/BitmapFactory.cpp
@@ -79,18 +79,15 @@ jstring getMimeTypeString(JNIEnv* env, SkImageDecoder::Format format) {
}
static bool optionsPurgeable(JNIEnv* env, jobject options) {
- return options != NULL &&
- env->GetBooleanField(options, gOptions_purgeableFieldID);
+ return options != NULL && env->GetBooleanField(options, gOptions_purgeableFieldID);
}
static bool optionsShareable(JNIEnv* env, jobject options) {
- return options != NULL &&
- env->GetBooleanField(options, gOptions_shareableFieldID);
+ return options != NULL && env->GetBooleanField(options, gOptions_shareableFieldID);
}
static bool optionsJustBounds(JNIEnv* env, jobject options) {
- return options != NULL &&
- env->GetBooleanField(options, gOptions_justBoundsFieldID);
+ return options != NULL && env->GetBooleanField(options, gOptions_justBoundsFieldID);
}
static SkPixelRef* installPixelRef(SkBitmap* bitmap, SkStream* stream,
@@ -119,8 +116,7 @@ static jobject doDecode(JNIEnv* env, SkStream* stream, jobject padding,
SkBitmap::Config prefConfig = SkBitmap::kARGB_8888_Config;
bool doDither = true;
bool isMutable = false;
- bool isPurgeable = forcePurgeable ||
- (allowPurgeable && optionsPurgeable(env, options));
+ bool isPurgeable = forcePurgeable || (allowPurgeable && optionsPurgeable(env, options));
bool preferQualityOverSpeed = false;
jobject javaBitmap = NULL;
@@ -437,23 +433,6 @@ static jbyteArray nativeScaleNinePatch(JNIEnv* env, jobject, jbyteArray chunkObj
return chunkObject;
}
-static void nativeSetDefaultConfig(JNIEnv* env, jobject, int nativeConfig) {
- SkBitmap::Config config = static_cast<SkBitmap::Config>(nativeConfig);
-
- // these are the only default configs that make sense for codecs right now
- static const SkBitmap::Config gValidDefConfig[] = {
- SkBitmap::kRGB_565_Config,
- SkBitmap::kARGB_8888_Config,
- };
-
- for (size_t i = 0; i < SK_ARRAY_COUNT(gValidDefConfig); i++) {
- if (config == gValidDefConfig[i]) {
- SkImageDecoder::SetDeviceConfig(config);
- break;
- }
- }
-}
-
static jboolean nativeIsSeekable(JNIEnv* env, jobject, jobject fileDescriptor) {
jint descriptor = jniGetFDFromFileDescriptor(env, fileDescriptor);
return ::lseek64(descriptor, 0, SEEK_CUR) != -1 ? JNI_TRUE : JNI_FALSE;
@@ -487,8 +466,6 @@ static JNINativeMethod gMethods[] = {
(void*)nativeScaleNinePatch
},
- { "nativeSetDefaultConfig", "(I)V", (void*)nativeSetDefaultConfig },
-
{ "nativeIsSeekable",
"(Ljava/io/FileDescriptor;)Z",
(void*)nativeIsSeekable