diff options
author | robertphillips <robertphillips@google.com> | 2016-08-08 09:17:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-08 09:17:20 -0700 |
commit | 0652baa23ec2ea9e1bcdf686bf1e1118b186b42c (patch) | |
tree | 2a78f6f32d92181359719b0506d516e45000a8c8 /platform_tools | |
parent | 8b1d32c8d017c84828ed65af38cd1f1e7075ce08 (diff) |
Revert of Cleanup use of legacy SkSurface creation methods a bit (patchset #2 id:20001 of https://codereview.chromium.org/2223023002/ )
Reason for revert:
webkit_headless!
Original issue's description:
> Cleanup use of legacy SkSurface creation methods a bit
>
> This:
> removes the SK_SUPPORT_LEGACY_NEW_SURFACE_API flag from the bzl build
> cleans up some remaining uses of the old API
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223023002
>
> Committed: https://skia.googlesource.com/skia/+/f21cd16228c20927fa4e9b937d6951471cfaa37a
TBR=benjaminwagner@google.com,egdaniel@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2220933004
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" |