diff options
Diffstat (limited to 'platform_tools')
-rw-r--r-- | platform_tools/android/apps/canvasproof/src/main/jni/org_skia_canvasproof_GaneshPictureRenderer.cpp | 5 | ||||
-rw-r--r-- | platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp | 9 |
2 files changed, 4 insertions, 10 deletions
diff --git a/platform_tools/android/apps/canvasproof/src/main/jni/org_skia_canvasproof_GaneshPictureRenderer.cpp b/platform_tools/android/apps/canvasproof/src/main/jni/org_skia_canvasproof_GaneshPictureRenderer.cpp index de38919fe5..d1de529674 100644 --- a/platform_tools/android/apps/canvasproof/src/main/jni/org_skia_canvasproof_GaneshPictureRenderer.cpp +++ b/platform_tools/android/apps/canvasproof/src/main/jni/org_skia_canvasproof_GaneshPictureRenderer.cpp @@ -37,8 +37,9 @@ static void render_picture(GrContext* grContext, SkSurfaceProps surfaceProps(SkSurfaceProps::kUseDeviceIndependentFonts_Flag, kUnknown_SkPixelGeometry); // TODO: Check to see if we can keep the surface between draw calls. - sk_sp<SkSurface> surface( - SkSurface::MakeFromBackendRenderTarget(grContext, desc, nullptr, &surfaceProps)); + SkAutoTUnref<SkSurface> surface( + SkSurface::NewFromBackendRenderTarget( + grContext, desc, &surfaceProps)); if (surface) { SkCanvas* canvas = surface->getCanvas(); SkASSERT(canvas); 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 2e12d37a6b..dec529ff3c 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 @@ JNIEXPORT void JNICALL Java_com_example_HelloSkiaActivity_drawIntoBitmap(JNIEnv* 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" |