summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-03-05 18:12:34 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-05 18:12:35 +0000
commit35da7d904b4eb6ef215ea57cef35bac31f05defd (patch)
tree1d2fffbbfb8f6e052e842e6570e0e1cec486f493 /media
parentbe331a3809b9cf921c6ad65e1d671b24e97dded9 (diff)
parentb2915245b74b3b5541b123e38403f8e26426b4b7 (diff)
downloadframeworks_base-35da7d904b4eb6ef215ea57cef35bac31f05defd.zip
frameworks_base-35da7d904b4eb6ef215ea57cef35bac31f05defd.tar.gz
frameworks_base-35da7d904b4eb6ef215ea57cef35bac31f05defd.tar.bz2
Merge "Cleanup Bitmap JNI"
Diffstat (limited to 'media')
-rw-r--r--media/jni/android_media_MediaMetadataRetriever.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/media/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp
index 93138fa..2f6bbf4 100644
--- a/media/jni/android_media_MediaMetadataRetriever.cpp
+++ b/media/jni/android_media_MediaMetadataRetriever.cpp
@@ -40,7 +40,6 @@ using namespace android;
struct fields_t {
jfieldID context;
jclass bitmapClazz; // Must be a global ref
- jfieldID nativeBitmap;
jmethodID createBitmapMethod;
jmethodID createScaledBitmapMethod;
jclass configClazz; // Must be a global ref
@@ -282,8 +281,7 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env,
return NULL;
}
- SkBitmap *bitmap =
- (SkBitmap *) env->GetLongField(jBitmap, fields.nativeBitmap);
+ SkBitmap *bitmap = GraphicsJNI::getSkBitmap(env, jBitmap);
bitmap->lockPixels();
rotate((uint16_t*)bitmap->getPixels(),
@@ -421,10 +419,6 @@ static void android_media_MediaMetadataRetriever_native_init(JNIEnv *env)
if (fields.createScaledBitmapMethod == NULL) {
return;
}
- fields.nativeBitmap = env->GetFieldID(fields.bitmapClazz, "mNativeBitmap", "J");
- if (fields.nativeBitmap == NULL) {
- return;
- }
jclass configClazz = env->FindClass("android/graphics/Bitmap$Config");
if (configClazz == NULL) {