summaryrefslogtreecommitdiffstats
path: root/core/jni/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/jni/android')
-rw-r--r--core/jni/android/graphics/BitmapFactory.cpp4
-rw-r--r--core/jni/android/graphics/NinePatchPeeker.cpp4
-rw-r--r--core/jni/android/graphics/NinePatchPeeker.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp
index a890eb4..2ce1b15 100644
--- a/core/jni/android/graphics/BitmapFactory.cpp
+++ b/core/jni/android/graphics/BitmapFactory.cpp
@@ -353,7 +353,7 @@ static jobject doDecode(JNIEnv* env, SkStreamRewindable* stream, jobject padding
ninePatchInsets = env->NewObject(gInsetStruct_class, gInsetStruct_constructorMethodID,
peeker.mOpticalInsets[0], peeker.mOpticalInsets[1], peeker.mOpticalInsets[2], peeker.mOpticalInsets[3],
peeker.mOutlineInsets[0], peeker.mOutlineInsets[1], peeker.mOutlineInsets[2], peeker.mOutlineInsets[3],
- peeker.mOutlineRadius, peeker.mOutlineFilled, scale);
+ peeker.mOutlineRadius, peeker.mOutlineAlpha, scale);
if (javaBitmap != NULL) {
env->SetObjectField(javaBitmap, gBitmap_ninePatchInsetsFieldID, ninePatchInsets);
}
@@ -589,7 +589,7 @@ int register_android_graphics_BitmapFactory(JNIEnv* env) {
"Landroid/graphics/NinePatch$InsetStruct;");
gInsetStruct_class = (jclass) env->NewGlobalRef(env->FindClass("android/graphics/NinePatch$InsetStruct"));
- gInsetStruct_constructorMethodID = env->GetMethodID(gInsetStruct_class, "<init>", "(IIIIIIIIFZF)V");
+ gInsetStruct_constructorMethodID = env->GetMethodID(gInsetStruct_class, "<init>", "(IIIIIIIIFIF)V");
int ret = AndroidRuntime::registerNativeMethods(env,
"android/graphics/BitmapFactory$Options",
diff --git a/core/jni/android/graphics/NinePatchPeeker.cpp b/core/jni/android/graphics/NinePatchPeeker.cpp
index ea5193b..1dafa1b 100644
--- a/core/jni/android/graphics/NinePatchPeeker.cpp
+++ b/core/jni/android/graphics/NinePatchPeeker.cpp
@@ -48,11 +48,11 @@ bool NinePatchPeeker::peek(const char tag[], const void* data, size_t length) {
} else if (!strcmp("npLb", tag) && length == sizeof(int32_t) * 4) {
mHasInsets = true;
memcpy(&mOpticalInsets, data, sizeof(int32_t) * 4);
- } else if (!strcmp("npOl", tag) && length == 24) { // 4 int32_ts, 1 float, 1 int32_t sized bool
+ } else if (!strcmp("npOl", tag) && length == 24) { // 4 int32_ts, 1 float, 1 int32_t sized byte
mHasInsets = true;
memcpy(&mOutlineInsets, data, sizeof(int32_t) * 4);
mOutlineRadius = ((const float*)data)[4];
- mOutlineFilled = ((const int32_t*)data)[5] & 0x01;
+ mOutlineAlpha = ((const int32_t*)data)[5] & 0xff;
}
return true; // keep on decoding
}
diff --git a/core/jni/android/graphics/NinePatchPeeker.h b/core/jni/android/graphics/NinePatchPeeker.h
index 8d3e6cf..7c18b2d 100644
--- a/core/jni/android/graphics/NinePatchPeeker.h
+++ b/core/jni/android/graphics/NinePatchPeeker.h
@@ -33,7 +33,7 @@ public:
, mPatchSize(0)
, mHasInsets(false)
, mOutlineRadius(0)
- , mOutlineFilled(false) {
+ , mOutlineAlpha(0) {
memset(mOpticalInsets, 0, 4 * sizeof(int32_t));
memset(mOutlineInsets, 0, 4 * sizeof(int32_t));
}
@@ -50,7 +50,7 @@ public:
int32_t mOpticalInsets[4];
int32_t mOutlineInsets[4];
float mOutlineRadius;
- bool mOutlineFilled;
+ uint8_t mOutlineAlpha;
};
#endif // NinePatchPeeker_h