Update endRecordingAsPicture to finishRecordingAsPicture
authorYuqian Li <liyuqian@google.com>
Wed, 22 Feb 2017 18:12:30 +0000 (13:12 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 22 Feb 2017 19:55:27 +0000 (19:55 +0000)
BUG=skia:

DOCS_PREVIEW= https://skia.org/?cl=8854

Change-Id: Ia3ad32d088d44fbe47ec37de016931c4bd21231c
Reviewed-on: https://skia-review.googlesource.com/8854
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>

include/core/SkPictureRecorder.h
site/user/api/canvas.md

index a440790..9e29e0d 100644 (file)
@@ -78,7 +78,7 @@ public:
     /**
      *  Signal that the caller is done recording, and update the cull rect to use for bounding
      *  box hierarchy (BBH) generation. The behavior is the same as calling
-     *  endRecordingAsPicture(), except that this method updates the cull rect initially passed
+     *  finishRecordingAsPicture(), except that this method updates the cull rect initially passed
      *  into beginRecording.
      *  @param cullRect the new culling rectangle to use as the overall bound for BBH generation
      *                  and subsequent culling operations.
@@ -92,7 +92,7 @@ public:
      *  beginRecording/getRecordingCanvas. Ownership of the object is passed to the caller, who
      *  must call unref() when they are done using it.
      *
-     *  Unlike endRecordingAsPicture(), which returns an immutable picture, the returned drawable
+     *  Unlike finishRecordingAsPicture(), which returns an immutable picture, the returned drawable
      *  may contain live references to other drawables (if they were added to the recording canvas)
      *  and therefore this drawable will reflect the current state of those nested drawables anytime
      *  it is drawn or a new picture is snapped from it (by calling drawable->newPictureSnapshot()).
index 1b60ec5..3c92905 100644 (file)
@@ -87,7 +87,7 @@ has been made current to the current thread when Skia calls are made.
     #include "SkImage.h"
     #include "SkStream.h"
     #include "SkSurface.h"
-    
+
     void gl_example(int width, int height, void(*draw)(SkCanvas*), const char* path) {
         // You've already created your OpenGL context and bound it.
         const GrGLInterface* interface = nullptr;
@@ -153,7 +153,7 @@ The SkPicture backend uses SkPictureRecorder instead of SkSurface.
         SkCanvas* recordingCanvas = recorder.beginRecording(SkIntToScalar(width),
                                                             SkIntToScalar(height));
         draw(recordingCanvas);
-        sk_sp<SkPicture> picture(recorder.endRecordingAsPicture());
+        sk_sp<SkPicture> picture(recorder.finishRecordingAsPicture());
         SkFILEWStream skpStream(path);
         // Open SKP files with `SampleApp --picture SKP_FILE`
         picture->serialize(&skpStream);