Change SkPicture::draw to playback

R=reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/540963002
diff --git a/bench/PicturePlaybackBench.cpp b/bench/PicturePlaybackBench.cpp
index 0109c72..947a784 100644
--- a/bench/PicturePlaybackBench.cpp
+++ b/bench/PicturePlaybackBench.cpp
@@ -46,7 +46,7 @@
         const SkPoint translateDelta = getTranslateDelta(loops);
 
         for (int i = 0; i < loops; i++) {
-            picture->draw(canvas);
+            picture->playback(canvas);
             canvas->translate(translateDelta.fX, translateDelta.fY);
         }
     }
diff --git a/bench/SKPBench.cpp b/bench/SKPBench.cpp
index cd7d4b0..308cea6 100644
--- a/bench/SKPBench.cpp
+++ b/bench/SKPBench.cpp
@@ -30,7 +30,7 @@
     canvas->save();
         canvas->scale(fScale, fScale);
         for (int i = 0; i < loops; i++) {
-            fPic->draw(canvas);
+            fPic->playback(canvas);
             canvas->flush();
         }
     canvas->restore();
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index a484fc2..ea62570 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -491,9 +491,9 @@
                     };
                     SkTileGridFactory factory(info);
                     SkPictureRecorder recorder;
-                    pic->draw(recorder.beginRecording(pic->cullRect().width(), 
-                                                      pic->cullRect().height(), 
-                                                      &factory));
+                    pic->playback(recorder.beginRecording(pic->cullRect().width(),
+                                                          pic->cullRect().height(), 
+                                                          &factory));
                     pic.reset(recorder.endRecording());
                 }
 
diff --git a/debugger/SkDebugger.cpp b/debugger/SkDebugger.cpp
index fda8f9a..8833df3 100644
--- a/debugger/SkDebugger.cpp
+++ b/debugger/SkDebugger.cpp
@@ -31,7 +31,7 @@
     fDebugCanvas = new SkDebugCanvas(SkScalarCeilToInt(this->pictureCull().width()), 
                                      SkScalarCeilToInt(this->pictureCull().height()));
     fDebugCanvas->setPicture(picture);
-    picture->draw(fDebugCanvas);
+    picture->playback(fDebugCanvas);
     fDebugCanvas->setPicture(NULL);
     fIndex = fDebugCanvas->getSize() - 1;
 }
diff --git a/dm/DMPDFTask.cpp b/dm/DMPDFTask.cpp
index 7d1fa59..c047771 100644
--- a/dm/DMPDFTask.cpp
+++ b/dm/DMPDFTask.cpp
@@ -77,7 +77,7 @@
         pdfData.reset(pdf.end());
     } else {
         SinglePagePDF pdf(fPicture->cullRect().width(), fPicture->cullRect().height());
-        fPicture->draw(pdf.canvas());
+        fPicture->playback(pdf.canvas());
         pdfData.reset(pdf.end());
     }
 
diff --git a/dm/DMQuiltTask.cpp b/dm/DMQuiltTask.cpp
index a824de0..6ffe360 100644
--- a/dm/DMQuiltTask.cpp
+++ b/dm/DMQuiltTask.cpp
@@ -46,7 +46,7 @@
         SkCanvas tileCanvas(tile);
 
         tileCanvas.translate(SkIntToScalar(-fX), SkIntToScalar(-fY));
-        fPicture.draw(&tileCanvas);
+        fPicture.playback(&tileCanvas);
         tileCanvas.flush();
 
         delete this;
@@ -92,7 +92,7 @@
     if (fGM->getFlags() & skiagm::GM::kSkipTiled_Flag) {
         // Some GMs don't draw exactly the same when tiled.  Draw them in one go.
         SkCanvas canvas(full);
-        recorded->draw(&canvas);
+        recorded->playback(&canvas);
         canvas.flush();
     } else {
         // Draw tiles in parallel into the same bitmap, simulating aggressive impl-side painting.
diff --git a/experimental/nanomsg/picture_demo.cpp b/experimental/nanomsg/picture_demo.cpp
index f04a96e..5efa03c 100644
--- a/experimental/nanomsg/picture_demo.cpp
+++ b/experimental/nanomsg/picture_demo.cpp
@@ -152,7 +152,7 @@
         canvas->saveLayer(NULL, &paint);
             canvas->concat(header.matrix);
             canvas->clipRect(header.clip);
-            picture->draw(canvas);
+            picture->playback(canvas);
         canvas->restore();
         SkDebugf(" drew");
 
diff --git a/gm/distantclip.cpp b/gm/distantclip.cpp
index 0f89559..54938b0 100644
--- a/gm/distantclip.cpp
+++ b/gm/distantclip.cpp
@@ -46,15 +46,15 @@
         SkAutoTUnref<SkPicture> pict(recorder.endRecording());
 
         // Next we play that picture into another picture of the same size.
-        pict->draw(recorder.beginRecording(pict->cullRect().width(), 
-                                           pict->cullRect().height(), 
-                                           NULL, 0));
+        pict->playback(recorder.beginRecording(pict->cullRect().width(), 
+                                               pict->cullRect().height(), 
+                                               NULL, 0));
         SkAutoTUnref<SkPicture> pict2(recorder.endRecording());
 
         // Finally we play the part of that second picture that should be green into the canvas.
         canvas->save();
         canvas->translate(kExtents / 2, -(kOffset - kExtents / 2));
-        pict2->draw(canvas);
+        pict2->playback(canvas);
         canvas->restore();
 
         // If the image is red, we erroneously decided the clipPath was empty and didn't record
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 5d6481c..40d616e 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -633,7 +633,7 @@
                     mat.postTranslate(SkIntToScalar(-xTile*tileSize.width()),
                                       SkIntToScalar(-yTile*tileSize.height()));
                     tileCanvas.setMatrix(mat);
-                    pict->draw(&tileCanvas);
+                    pict->playback(&tileCanvas);
                     tileCanvas.flush();
                     tileCanvas.restoreToCount(saveCount);
                     bmpCanvas.drawBitmap(tileBM,
diff --git a/gm/optimizations.cpp b/gm/optimizations.cpp
index 00be04c..85ce3e9 100644
--- a/gm/optimizations.cpp
+++ b/gm/optimizations.cpp
@@ -19,7 +19,7 @@
 static bool check_pattern(SkPicture& input, const SkTDArray<DrawType> &pattern) {
     SkDebugCanvas debugCanvas(SkScalarCeilToInt(input.cullRect().width()), 
                               SkScalarCeilToInt(input.cullRect().height()));
-    input.draw(&debugCanvas);
+    input.playback(&debugCanvas);
 
     if (pattern.count() != debugCanvas.getSize()) {
         return false;
@@ -352,7 +352,7 @@
 
             canvas->save();
                 canvas->translate(xPos, yPos);
-                pre->draw(canvas);
+                pre->playback(canvas);
                 xPos += pre->cullRect().width();
             canvas->restore();
 
@@ -364,7 +364,7 @@
                                                    pre->cullRect().height(), 
                                                    NULL, 0);
 
-            pre->draw(recordCanvas);
+            pre->playback(recordCanvas);
 
             SkAutoTUnref<SkPicture> post(recorder.endRecording());
 
@@ -375,7 +375,7 @@
 
             canvas->save();
                 canvas->translate(xPos, yPos);
-                post->draw(canvas);
+                post->playback(canvas);
                 xPos += post->cullRect().width();
             canvas->restore();
 
diff --git a/gyp/skia_for_android_framework_defines.gypi b/gyp/skia_for_android_framework_defines.gypi
index c5fd769..ec0725f 100644
--- a/gyp/skia_for_android_framework_defines.gypi
+++ b/gyp/skia_for_android_framework_defines.gypi
@@ -21,6 +21,7 @@
       # Transitional, for deprecated SkCanvas::SaveFlags methods.
       'SK_ATTR_DEPRECATED=SK_NOTHING_ARG1',
       'SK_LEGACY_PICTURE_SIZE_API',
+      'SK_LEGACY_PICTURE_DRAW_API',
     ],
   },
 }
diff --git a/gyp/skia_for_chromium_defines.gypi b/gyp/skia_for_chromium_defines.gypi
index 225eb5b..f614cd3 100644
--- a/gyp/skia_for_chromium_defines.gypi
+++ b/gyp/skia_for_chromium_defines.gypi
@@ -20,6 +20,7 @@
       'SK_IGNORE_GPU_DITHER',
       'SK_SUPPORT_LEGACY_IMAGECACHE_NAME',
       'SK_LEGACY_PICTURE_SIZE_API',
+      'SK_LEGACY_PICTURE_DRAW_API',
     ],
   },
 }
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index 7f0665e..d8aced1 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -111,10 +111,20 @@
     SkPicture* clone() const;
 #endif
 
-    /** Replays the drawing commands on the specified canvas.
+    /** Replays the drawing commands on the specified canvas. Note that
+        this has the effect of unfurling this picture into the destination
+        canvas. Using the SkCanvas::drawPicture entry point gives the destination
+        canvas the option of just taking a ref.
         @param canvas the canvas receiving the drawing commands.
+        @param callback a callback that allows interruption of playback
     */
-    void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const;
+    void playback(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const;
+
+#ifdef SK_LEGACY_PICTURE_DRAW_API
+    void draw(SkCanvas* canvas, SkDrawPictureCallback* callback = NULL) const {
+        this->playback(canvas, callback);
+    }
+#endif
 
 #ifdef SK_LEGACY_PICTURE_SIZE_API
     int width() const  { return SkScalarCeilToInt(fCullWidth); }
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp
index 395314c..19e692f 100644
--- a/samplecode/SampleAll.cpp
+++ b/samplecode/SampleAll.cpp
@@ -322,7 +322,7 @@
             do {
                 canvas->save();
                 canvas->clipRect(clip);
-                picture->draw(canvas);
+                picture->playback(canvas);
                 canvas->restore();
                 if (clip.fRight < SkIntToScalar(320))
                     clip.offset(SkIntToScalar(160), 0);
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index e8d6d99..9c9b343 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -1376,7 +1376,7 @@
                 orig->drawPicture(pict.get());
             }
         } else {
-            picture->draw(orig);
+            picture->playback(orig);
         }
     }
 
diff --git a/samplecode/SamplePictFile.cpp b/samplecode/SamplePictFile.cpp
index 3d7acfc..df0c369 100644
--- a/samplecode/SamplePictFile.cpp
+++ b/samplecode/SamplePictFile.cpp
@@ -144,9 +144,9 @@
             }
             if (false) { // re-record
                 SkPictureRecorder recorder;
-                pic->draw(recorder.beginRecording(pic->cullRect().width(), 
-                                                  pic->cullRect().height(), 
-                                                  NULL, 0));
+                pic->playback(recorder.beginRecording(pic->cullRect().width(),
+                                                      pic->cullRect().height(), 
+                                                      NULL, 0));
                 SkAutoTUnref<SkPicture> p2(recorder.endRecording());
 
                 SkString path2(path);
@@ -182,9 +182,9 @@
         }
 
         SkPictureRecorder recorder;
-        pic->draw(recorder.beginRecording(pic->cullRect().width(), 
-                                          pic->cullRect().height(), 
-                                          factory.get(), 0));
+        pic->playback(recorder.beginRecording(pic->cullRect().width(),
+                                              pic->cullRect().height(), 
+                                              factory.get(), 0));
         return recorder.endRecording();
     }
 
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 83fe140..3d2fc8c 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -2455,7 +2455,7 @@
 
     SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->cullRect());
 
-    picture->draw(this);
+    picture->playback(this);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index c0fc371..e80a17b 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -327,7 +327,7 @@
 }
 
 // fRecord OK
-void SkPicture::draw(SkCanvas* canvas, SkDrawPictureCallback* callback) const {
+void SkPicture::playback(SkCanvas* canvas, SkDrawPictureCallback* callback) const {
     SkASSERT(NULL != canvas);
     SkASSERT(NULL != fData.get() || NULL != fRecord.get());
 
@@ -459,7 +459,7 @@
 SkPicture* SkPicture::Forwardport(const SkPicture& src) {
     SkAutoTDelete<SkRecord> record(SkNEW(SkRecord));
     SkRecorder canvas(record.get(), src.cullRect().width(), src.cullRect().height());
-    src.draw(&canvas);
+    src.playback(&canvas);
     return SkNEW_ARGS(SkPicture, (src.cullRect().width(), src.cullRect().height(), 
                                   record.detach(), NULL/*bbh*/));
 }
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp
index fadb937..92deac3 100644
--- a/src/core/SkPictureRecorder.cpp
+++ b/src/core/SkPictureRecorder.cpp
@@ -108,6 +108,6 @@
         const bool deepCopyOps = true;
         SkPicture picture(fCullWidth, fCullHeight, 
                           *fPictureRecord.get(), deepCopyOps);
-        picture.draw(canvas);
+        picture.playback(canvas);
     }
 }
diff --git a/tests/PathOpsSkpClipTest.cpp b/tests/PathOpsSkpClipTest.cpp
index 0769141..b8142cd 100755
--- a/tests/PathOpsSkpClipTest.cpp
+++ b/tests/PathOpsSkpClipTest.cpp
@@ -400,7 +400,7 @@
     SkMSec start = SkTime::GetMSecs();
     for (int x = 0; x < slices; ++x) {
         for (int y = 0; y < slices; ++y) {
-            pic->draw(canvas);
+            pic->playback(canvas);
             canvas->translate(0, yInterval);
         }
         canvas->translate(xInterval, -yInterval * slices);
@@ -416,7 +416,7 @@
         canvas->save();
         canvas->scale(1.0f / scale, 1.0f / scale);
     }
-    pic->draw(canvas);
+    pic->playback(canvas);
     if (scale != 1) {
         canvas->restore();
     }
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 8b19df2..eb85c94 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -1191,7 +1191,7 @@
     SaveCountingCanvas canvas(SkScalarCeilToInt(picture->cullRect().width()), 
                               SkScalarCeilToInt(picture->cullRect().height()));
 
-    picture->draw(&canvas);
+    picture->playback(&canvas);
 
     REPORTER_ASSERT(reporter, numSaves == canvas.getSaveCount());
     REPORTER_ASSERT(reporter, numSaveLayers == canvas.getSaveLayerCount());
@@ -1693,7 +1693,7 @@
     SkAutoTUnref<SkPicture> picture(recorder.endRecording());
 
     ClipCountingCanvas testCanvas(10, 10);
-    picture->draw(&testCanvas);
+    picture->playback(&testCanvas);
 
     // Both clips should be present on playback.
     REPORTER_ASSERT(reporter, testCanvas.getClipCount() == 2);
@@ -1866,7 +1866,7 @@
     SkBitmap replayBM;
     make_bm(&replayBM, 100, 100, SK_ColorBLACK, false);
     SkCanvas replayCanvas(replayBM);
-    picture->draw(&replayCanvas);
+    picture->playback(&replayCanvas);
     replayCanvas.flush();
 
     // With the bug present, at (55, 55) we would get a fully opaque red
@@ -1914,10 +1914,10 @@
 
     SkCanvas big(640, 480), small(300, 200);
 
-    picture->draw(&big);
+    picture->playback(&big);
     REPORTER_ASSERT(r, bbh.searchCalls == 0);
 
-    picture->draw(&small);
+    picture->playback(&small);
     REPORTER_ASSERT(r, bbh.searchCalls == 1);
 }
 
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp
index ea03e87..b5582dc 100644
--- a/tests/SerializationTest.cpp
+++ b/tests/SerializationTest.cpp
@@ -266,7 +266,7 @@
      bitmap.allocN32Pixels(SkScalarCeilToInt(picture.cullRect().width()), 
                            SkScalarCeilToInt(picture.cullRect().height()));
      SkCanvas canvas(bitmap);
-     picture.draw(&canvas);
+     picture.playback(&canvas);
      return bitmap;
 }
 
diff --git a/tests/TileGridTest.cpp b/tests/TileGridTest.cpp
index 81f383d..16434ab 100644
--- a/tests/TileGridTest.cpp
+++ b/tests/TileGridTest.cpp
@@ -73,14 +73,14 @@
     // Test parts of top-left tile
     {
         MockCanvas mockCanvas(store);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
     }
     {
         MockCanvas mockCanvas(store);
         mockCanvas.translate(-7.99f, -7.99f);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
     }
@@ -88,7 +88,7 @@
     {
         MockCanvas mockCanvas(store);
         mockCanvas.translate(-9.5f, -9.5f);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 2 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
         REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[1]);
@@ -97,7 +97,7 @@
     {
         MockCanvas mockCanvas(store);
         mockCanvas.translate(-16.0f, -16.0f);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]);
     }
@@ -105,28 +105,28 @@
     {
         MockCanvas mockCanvas(store);
         mockCanvas.translate(2.0f, 0.0f);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
     }
     {
         MockCanvas mockCanvas(store);
         mockCanvas.translate(0.0f, 2.0f);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
     }
     {
         MockCanvas mockCanvas(store);
         mockCanvas.translate(-22.0f, -16.0f);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]);
     }
     {
         MockCanvas mockCanvas(store);
         mockCanvas.translate(-16.0f, -22.0f);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]);
     }
@@ -168,14 +168,14 @@
         // The offset should cancel the top and left borders of the top left tile
         // So a look-up at interval 0-10 should be grid aligned,
         MockCanvas mockCanvas(tileBitmap);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
     }
     {
         // Encroaching border by one pixel
         MockCanvas mockCanvas(moreThanATileBitmap);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 2 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
         REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[1]);
@@ -186,14 +186,14 @@
         // with middle tile.
         MockCanvas mockCanvas(tileBitmap);
         mockCanvas.translate(SkIntToScalar(-8), SkIntToScalar(-8));
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]);
     }
     {
         MockCanvas mockCanvas(tileBitmap);
         mockCanvas.translate(-7.9f, -7.9f);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 2 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
         REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[1]);
@@ -201,7 +201,7 @@
     {
         MockCanvas mockCanvas(tileBitmap);
         mockCanvas.translate(-8.1f, -8.1f);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         REPORTER_ASSERT(reporter, 2 == mockCanvas.fRects.count());
         REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]);
         REPORTER_ASSERT(reporter, rect3 == mockCanvas.fRects[1]);
@@ -212,7 +212,7 @@
         // adjusted region, sitting right on top of the tile boundary.
         MockCanvas mockCanvas(tinyBitmap);
         mockCanvas.translate(-8.0f, -8.0f);
-        picture->draw(&mockCanvas);
+        picture->playback(&mockCanvas);
         // This test passes by not asserting. We do not validate the rects recorded
         // because the result is numerically unstable (floating point equality).
         // The content of any one of the four tiles of the tilegrid would be a valid
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index ed5bdfe..b2bac00 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -220,7 +220,7 @@
                                                    fPicture->cullRect().height(),
                                                    factory.get(),
                                                    this->recordFlags());
-        fPicture->draw(canvas);
+        fPicture->playback(canvas);
         fPicture.reset(recorder.endRecording());
     }
 }
@@ -361,7 +361,7 @@
                                                factory.get(),
                                                this->recordFlags());
     this->scaleToScaleFactor(canvas);
-    fPicture->draw(canvas);
+    fPicture->playback(canvas);
     SkAutoTUnref<SkPicture> picture(recorder.endRecording());
     if (!fWritePath.isEmpty()) {
         // Record the new picture as a new SKP with PNG encoded bitmaps.
diff --git a/tools/bench_pictures_main.cpp b/tools/bench_pictures_main.cpp
index 4bb3194..2eda73c 100644
--- a/tools/bench_pictures_main.cpp
+++ b/tools/bench_pictures_main.cpp
@@ -201,9 +201,9 @@
         // Because the GPU preprocessing step relies on the in-memory picture
         // statistics we need to rerecord the picture here
         SkPictureRecorder recorder;
-        picture->draw(recorder.beginRecording(picture->cullRect().width(), 
-                                              picture->cullRect().height(), 
-                                              NULL, 0));
+        picture->playback(recorder.beginRecording(picture->cullRect().width(), 
+                                                  picture->cullRect().height(), 
+                                                  NULL, 0));
         picture.reset(recorder.endRecording());
     }
 
diff --git a/tools/bench_playback.cpp b/tools/bench_playback.cpp
index f5bbc12..53c988c 100644
--- a/tools/bench_playback.cpp
+++ b/tools/bench_playback.cpp
@@ -44,12 +44,12 @@
     SkTileGridFactory factory(info);
 
     SkPictureRecorder recorder;
-    src.draw(skr ? recorder.EXPERIMENTAL_beginRecording(src.cullRect().width(), 
-                                                        src.cullRect().height(), 
-                                                        &factory)
-                 : recorder.  DEPRECATED_beginRecording(src.cullRect().width(), 
-                                                        src.cullRect().height(), 
-                                                        &factory));
+    src.playback(skr ? recorder.EXPERIMENTAL_beginRecording(src.cullRect().width(), 
+                                                            src.cullRect().height(), 
+                                                            &factory)
+                     : recorder.  DEPRECATED_beginRecording(src.cullRect().width(), 
+                                                            src.cullRect().height(), 
+                                                            &factory));
     return recorder.endRecording();
 }
 
@@ -64,7 +64,7 @@
     canvas->clipRect(SkRect::MakeWH(SkIntToScalar(FLAGS_tile), SkIntToScalar(FLAGS_tile)));
 
     // Draw once to warm any caches.  The first sample otherwise can be very noisy.
-    picture->draw(canvas.get());
+    picture->playback(canvas.get());
 
     WallTimer timer;
     const double scale = timescale();
@@ -73,7 +73,7 @@
         // We assume timer overhead (typically, ~30ns) is insignificant
         // compared to draw runtime (at least ~100us, usually several ms).
         timer.start();
-        picture->draw(canvas.get());
+        picture->playback(canvas.get());
         timer.end();
         samples[i] = timer.fWall * scale;
     }
diff --git a/tools/bench_record.cpp b/tools/bench_record.cpp
index 45a143f..fe28e34 100644
--- a/tools/bench_record.cpp
+++ b/tools/bench_record.cpp
@@ -61,11 +61,11 @@
 static void rerecord(const SkPicture& src, SkBBHFactory* bbhFactory) {
     SkPictureRecorder recorder;
     if (FLAGS_skr) {
-        src.draw(recorder.EXPERIMENTAL_beginRecording(src.cullRect().width(), 
+        src.playback(recorder.EXPERIMENTAL_beginRecording(src.cullRect().width(), 
                                                       src.cullRect().height(), 
                                                       bbhFactory));
     } else {
-        src.draw(recorder.  DEPRECATED_beginRecording(src.cullRect().width(), 
+        src.playback(recorder.  DEPRECATED_beginRecording(src.cullRect().width(), 
                                                       src.cullRect().height(), 
                                                       bbhFactory));
     }
diff --git a/tools/dump_record.cpp b/tools/dump_record.cpp
index bc1538f..fc2e102 100644
--- a/tools/dump_record.cpp
+++ b/tools/dump_record.cpp
@@ -62,7 +62,7 @@
 
         SkRecord record;
         SkRecorder canvas(&record, w, h);
-        src->draw(&canvas);
+        src->playback(&canvas);
 
         if (FLAGS_optimize) {
             SkRecordOptimize(&record);
diff --git a/tools/filtermain.cpp b/tools/filtermain.cpp
index a7ed20d..00854d4 100644
--- a/tools/filtermain.cpp
+++ b/tools/filtermain.cpp
@@ -679,7 +679,7 @@
 
     SkDebugCanvas debugCanvas(SkScalarCeilToInt(inPicture->cullRect().width()), 
                               SkScalarCeilToInt(inPicture->cullRect().height()));
-    inPicture->draw(&debugCanvas);
+    inPicture->playback(&debugCanvas);
 
     // delete the initial save and restore since replaying the commands will
     // re-add them
diff --git a/tools/gpuveto.cpp b/tools/gpuveto.cpp
index bfe3837..4e9fdeb 100644
--- a/tools/gpuveto.cpp
+++ b/tools/gpuveto.cpp
@@ -55,9 +55,9 @@
     // The SkPicture tracking information is only generated during recording
     // an isn't serialized. Replay the picture to regenerated the tracking data.
     SkPictureRecorder recorder;
-    picture->draw(recorder.beginRecording(picture->cullRect().width(), 
-                                          picture->cullRect().height(), 
-                                          NULL, 0));
+    picture->playback(recorder.beginRecording(picture->cullRect().width(), 
+                                              picture->cullRect().height(), 
+                                              NULL, 0));
     SkAutoTUnref<SkPicture> recorded(recorder.endRecording());
 
     if (recorded->suitableForGpuRasterization(NULL)) {
diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp
index c9bdf13..9ec136c 100644
--- a/tools/render_pictures_main.cpp
+++ b/tools/render_pictures_main.cpp
@@ -184,17 +184,17 @@
         // Because the GPU preprocessing step relies on the in-memory picture
         // statistics we need to rerecord the picture here
         SkPictureRecorder recorder;
-        picture->draw(recorder.beginRecording(picture->cullRect().width(), 
-                                              picture->cullRect().height(), 
-                                              NULL, 0));
+        picture->playback(recorder.beginRecording(picture->cullRect().width(), 
+                                                  picture->cullRect().height(), 
+                                                  NULL, 0));
         picture.reset(recorder.endRecording());
     }
 
     while (FLAGS_bench_record) {
         SkPictureRecorder recorder;
-        picture->draw(recorder.beginRecording(picture->cullRect().width(), 
-                                              picture->cullRect().height(), 
-                                              NULL, 0));
+        picture->playback(recorder.beginRecording(picture->cullRect().width(), 
+                                                  picture->cullRect().height(), 
+                                                  NULL, 0));
         SkAutoTUnref<SkPicture> other(recorder.endRecording());
     }