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

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

Issue 2220933004: Revert of Cleanup use of legacy SkSurface creation methods a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
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 2e12d37a6ba57d49c7a7e324145cca0a2c3e0ab8..dec529ff3c3833c508879c6d7f4a49e81fa866aa 100644
--- a/platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp
+++ b/platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp
@@ -1,10 +1,3 @@
-/*
- * 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>
@@ -36,7 +29,7 @@
SkImageInfo info = SkImageInfo::MakeN32Premul(dstInfo.width, dstInfo.height);
// Create a surface from the given bitmap
- sk_sp<SkSurface> surface(SkSurface::MakeRasterDirect(info, dstPixels, dstInfo.stride));
+ SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterDirect(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') | public.bzl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698