Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Unified Diff: platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp

Issue 137993012: use some helper Make functions to initialize SkImageInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkImageInfo.h ('k') | samplecode/SampleFatBits.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp
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 65f622883d2c39c10ec05a07682f6de4832093bd..dec529ff3c3833c508879c6d7f4a49e81fa866aa 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));
« no previous file with comments | « include/core/SkImageInfo.h ('k') | samplecode/SampleFatBits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698