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

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

Issue 2223023002: Cleanup use of legacy SkSurface creation methods a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rm public.bzl Created 4 years, 4 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 | « platform_tools/android/apps/canvasproof/src/main/jni/org_skia_canvasproof_GaneshPictureRenderer.cpp ('k') | no next file » | 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 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"
« no previous file with comments | « platform_tools/android/apps/canvasproof/src/main/jni/org_skia_canvasproof_GaneshPictureRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698