diff options
Diffstat (limited to 'platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp')
-rw-r--r-- | platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp b/platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp index 65f622883d..dec529ff3c 100644 --- a/platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp +++ b/platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp @@ -26,9 +26,7 @@ JNIEXPORT void JNICALL Java_com_example_HelloSkiaActivity_drawIntoBitmap(JNIEnv* AndroidBitmap_getInfo(env, dstBitmap, &dstInfo); AndroidBitmap_lockPixels(env, dstBitmap, &dstPixels); - SkImageInfo info = { - dstInfo.width, dstInfo.height, kPMColor_SkColorType, kPremul_SkAlphaType - }; + SkImageInfo info = SkImageInfo::MakeN32Premul(dstInfo.width, dstInfo.height); // Create a surface from the given bitmap SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterDirect(info, dstPixels, dstInfo.stride)); |