SkBitmap::Config is deprecated, use SkColorType
Change-Id: Ida181d2aac760072cf2d01409edac37699dea216
diff --git a/core/jni/android/graphics/Graphics.cpp b/core/jni/android/graphics/Graphics.cpp
index 2bd7a28..7a186a2 100644
--- a/core/jni/android/graphics/Graphics.cpp
+++ b/core/jni/android/graphics/Graphics.cpp
@@ -301,18 +301,17 @@
return b;
}
-SkBitmap::Config GraphicsJNI::getNativeBitmapConfig(JNIEnv* env,
- jobject jconfig) {
+SkColorType GraphicsJNI::getNativeBitmapColorType(JNIEnv* env, jobject jconfig) {
SkASSERT(env);
if (NULL == jconfig) {
- return SkBitmap::kNo_Config;
+ return kUnknown_SkColorType;
}
SkASSERT(env->IsInstanceOf(jconfig, gBitmapConfig_class));
int c = env->GetIntField(jconfig, gBitmapConfig_nativeInstanceID);
if (c < 0 || c >= SkBitmap::kConfigCount) {
- c = SkBitmap::kNo_Config;
+ c = kUnknown_SkColorType;
}
- return static_cast<SkBitmap::Config>(c);
+ return SkBitmapConfigToColorType(static_cast<SkBitmap::Config>(c));
}
SkCanvas* GraphicsJNI::getNativeCanvas(JNIEnv* env, jobject canvas) {