summaryrefslogtreecommitdiffstats
path: root/media/jni/android_media_MediaMetadataRetriever.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-03-05 13:50:31 -0800
committerJohn Reck <jreck@google.com>2015-03-05 13:56:16 -0800
commitf4faeac3525fe1ce3707ab785a1651aec367589d (patch)
treeb49502dc2381517f3314d16fae1eef7414314a8f /media/jni/android_media_MediaMetadataRetriever.cpp
parentcd4ed96d10d49cb182e66aa1735f2de7596707ee (diff)
downloadframeworks_base-f4faeac3525fe1ce3707ab785a1651aec367589d.zip
frameworks_base-f4faeac3525fe1ce3707ab785a1651aec367589d.tar.gz
frameworks_base-f4faeac3525fe1ce3707ab785a1651aec367589d.tar.bz2
Cleanup Bitmap JNI attempt #2
Original version missed a spot This reverts commit c02977e3bbfaaedcb1b1d67e1692becc7dddd59b. Change-Id: I56244ce10d709fcdef42a001fe4c6ba7b6bbb04d
Diffstat (limited to 'media/jni/android_media_MediaMetadataRetriever.cpp')
-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) {