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 dec529ff3c3833c508879c6d7f4a49e81fa866aa..2e12d37a6ba57d49c7a7e324145cca0a2c3e0ab8 100644 |
--- a/platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp |
+++ b/platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp |
@@ -1,3 +1,10 @@ |
+/* |
+ * Copyright 2016 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
#include <math.h> |
#include <jni.h> |
#include <android/bitmap.h> |
@@ -29,7 +36,7 @@ JNIEXPORT void JNICALL Java_com_example_HelloSkiaActivity_drawIntoBitmap(JNIEnv* |
SkImageInfo info = SkImageInfo::MakeN32Premul(dstInfo.width, dstInfo.height); |
// Create a surface from the given bitmap |
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterDirect(info, dstPixels, dstInfo.stride)); |
+ sk_sp<SkSurface> surface(SkSurface::MakeRasterDirect(info, dstPixels, dstInfo.stride)); |
SkCanvas* canvas = surface->getCanvas(); |
// Draw something "interesting" |