diff options
author | Romain Guy <romainguy@google.com> | 2012-10-16 19:05:48 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-16 19:05:49 -0700 |
commit | 1b85122bd22c4528679ae8bd67077dfc2fdf1847 (patch) | |
tree | 4664b577e4dfdd34b63e6004961c8c7d2f3e1e0b /core | |
parent | e13ae648504661ca158d15aa415568e351b380c4 (diff) | |
parent | 713e1bb9df6bdfc21bd5c40d1a6ecf6c822a4be5 (diff) | |
download | frameworks_base-1b85122bd22c4528679ae8bd67077dfc2fdf1847.zip frameworks_base-1b85122bd22c4528679ae8bd67077dfc2fdf1847.tar.gz frameworks_base-1b85122bd22c4528679ae8bd67077dfc2fdf1847.tar.bz2 |
Merge "Add API to enable mipmaps on Bitmap Bug #7353771" into jb-mr1-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/jni/android/graphics/Bitmap.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp index fd7a6a7..f485e03 100644 --- a/core/jni/android/graphics/Bitmap.cpp +++ b/core/jni/android/graphics/Bitmap.cpp @@ -7,7 +7,7 @@ #include "SkUnPreMultiply.h"
#include <binder/Parcel.h>
-#include "android_os_Parcel.h" +#include "android_os_Parcel.h"
#include "android_util_Binder.h"
#include "android_nio_utils.h"
#include "CreateJavaOutputStreamAdaptor.h"
@@ -353,6 +353,15 @@ static void Bitmap_setHasAlpha(JNIEnv* env, jobject, SkBitmap* bitmap, bitmap->setIsOpaque(!hasAlpha);
}
+static jboolean Bitmap_hasMipMap(JNIEnv* env, jobject, SkBitmap* bitmap) {
+ return bitmap->hasHardwareMipMap();
+}
+
+static void Bitmap_setHasMipMap(JNIEnv* env, jobject, SkBitmap* bitmap,
+ jboolean hasMipMap) {
+ bitmap->setHasHardwareMipMap(hasMipMap);
+}
+
///////////////////////////////////////////////////////////////////////////////
static jobject Bitmap_createFromParcel(JNIEnv* env, jobject, jobject parcel) {
@@ -666,6 +675,8 @@ static JNINativeMethod gBitmapMethods[] = { { "nativeConfig", "(I)I", (void*)Bitmap_config },
{ "nativeHasAlpha", "(I)Z", (void*)Bitmap_hasAlpha },
{ "nativeSetHasAlpha", "(IZ)V", (void*)Bitmap_setHasAlpha },
+ { "nativeHasMipMap", "(I)Z", (void*)Bitmap_hasMipMap },
+ { "nativeSetHasMipMap", "(IZ)V", (void*)Bitmap_setHasMipMap },
{ "nativeCreateFromParcel",
"(Landroid/os/Parcel;)Landroid/graphics/Bitmap;",
(void*)Bitmap_createFromParcel },
|