From 84b18c7e3e042bf206e1ace3d1b6ea5bb929fe51 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Sun, 13 Apr 2014 19:09:42 +0000 Subject: split SkPictureRecorder out of SkPicture https://codereview.chromium.org/214953003/ git-svn-id: http://skia.googlecode.com/svn/trunk@14171 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tools/skpmaker.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/skpmaker.cpp') diff --git a/tools/skpmaker.cpp b/tools/skpmaker.cpp index 00082075c7..740d522366 100644 --- a/tools/skpmaker.cpp +++ b/tools/skpmaker.cpp @@ -26,8 +26,8 @@ DEFINE_string(writePath, "", "Filepath to write the SKP into."); static void skpmaker(int width, int height, int border, SkColor color, const char *writePath) { - SkPicture pict; - SkCanvas* canvas = pict.beginRecording(width, height); + SkPictureRecorder recorder; + SkCanvas* canvas = recorder.beginRecording(width, height); SkPaint paint; paint.setStyle(SkPaint::kFill_Style); paint.setColor(SK_ColorBLACK); @@ -36,9 +36,9 @@ static void skpmaker(int width, int height, int border, SkColor color, canvas->drawRectCoords(SkIntToScalar(border), SkIntToScalar(border), SkIntToScalar(width - border*2), SkIntToScalar(height - border*2), paint); - pict.endRecording(); + SkAutoTUnref pict(recorder.endRecording()); SkFILEWStream stream(writePath); - pict.serialize(&stream); + pict->serialize(&stream); } int tool_main(int argc, char** argv); -- cgit v1.2.3