diff options
4 files changed, 6 insertions, 11 deletions
diff --git a/experimental/GLFWTest/glfw_main.cpp b/experimental/GLFWTest/glfw_main.cpp index 21ec33def3..a8ca7ea97e 100644 --- a/experimental/GLFWTest/glfw_main.cpp +++ b/experimental/GLFWTest/glfw_main.cpp @@ -42,7 +42,7 @@ static void init_skia(int w, int h) { desc.fStencilBits = 0; desc.fRenderTargetHandle = 0; // assume default framebuffer - sSurface = SkSurface::MakeFromBackendRenderTarget(sContext, desc, nullptr, nullptr).release(); + sSurface = SkSurface::NewFromBackendRenderTarget(sContext, desc, NULL); } static void cleanup_skia() { 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" diff --git a/public.bzl b/public.bzl index bb78d65b32..c409c39f0d 100644 --- a/public.bzl +++ b/public.bzl @@ -612,6 +612,7 @@ DEFINES_ALL = [ "SK_SUPPORT_LEGACY_IMAGEFILTER_PTR", "SK_SUPPORT_LEGACY_MASKFILTER_PTR", "SK_SUPPORT_LEGACY_MINOR_EFFECT_PTR", + "SK_SUPPORT_LEGACY_NEW_SURFACE_API", "SK_SUPPORT_LEGACY_PATHEFFECT_PTR", "SK_SUPPORT_LEGACY_PICTURE_PTR", "SK_SUPPORT_LEGACY_TYPEFACE_PTR", |