aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-09-04 08:42:50 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-04 08:42:50 -0700
commitc5ba71d2e5cd426def66fa49dcf003e5b2c98dc7 (patch)
tree120359b17c8143f85462fefd855d2d94b50ce785 /tools
parent227c54e3d4e7b738d0b11a2f68b63cb1fd79cb12 (diff)
Change SkPicture::draw to playback
R=reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/540963002
Diffstat (limited to 'tools')
-rw-r--r--tools/PictureRenderer.cpp4
-rw-r--r--tools/bench_pictures_main.cpp6
-rw-r--r--tools/bench_playback.cpp16
-rw-r--r--tools/bench_record.cpp4
-rw-r--r--tools/dump_record.cpp2
-rw-r--r--tools/filtermain.cpp2
-rw-r--r--tools/gpuveto.cpp6
-rw-r--r--tools/render_pictures_main.cpp12
8 files changed, 26 insertions, 26 deletions
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index ed5bdfe612..b2bac003f4 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -220,7 +220,7 @@ void PictureRenderer::buildBBoxHierarchy() {
fPicture->cullRect().height(),
factory.get(),
this->recordFlags());
- fPicture->draw(canvas);
+ fPicture->playback(canvas);
fPicture.reset(recorder.endRecording());
}
}
@@ -361,7 +361,7 @@ bool RecordPictureRenderer::render(SkBitmap** out) {
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 4bb31949c9..2eda73c40f 100644
--- a/tools/bench_pictures_main.cpp
+++ b/tools/bench_pictures_main.cpp
@@ -201,9 +201,9 @@ static bool run_single_benchmark(const SkString& inputPath,
// 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 f5bbc12c0a..53c988cd66 100644
--- a/tools/bench_playback.cpp
+++ b/tools/bench_playback.cpp
@@ -44,12 +44,12 @@ static SkPicture* rerecord(const SkPicture& src, bool skr) {
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 @@ static void bench(SkPMColor* scratch, const SkPicture& src, const char* name) {
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 @@ static void bench(SkPMColor* scratch, const SkPicture& src, const char* name) {
// 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 45a143f824..fe28e342a4 100644
--- a/tools/bench_record.cpp
+++ b/tools/bench_record.cpp
@@ -61,11 +61,11 @@ static SkBBHFactory* parse_FLAGS_bbh() {
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 bc1538fdf1..fc2e102623 100644
--- a/tools/dump_record.cpp
+++ b/tools/dump_record.cpp
@@ -62,7 +62,7 @@ int tool_main(int argc, char** argv) {
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 a7ed20d928..00854d4e3e 100644
--- a/tools/filtermain.cpp
+++ b/tools/filtermain.cpp
@@ -679,7 +679,7 @@ static int filter_picture(const SkString& inFile, const SkString& outFile) {
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 bfe3837626..4e9fdebd4b 100644
--- a/tools/gpuveto.cpp
+++ b/tools/gpuveto.cpp
@@ -55,9 +55,9 @@ int tool_main(int argc, char** argv) {
// 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 c9bdf13451..9ec136c1e7 100644
--- a/tools/render_pictures_main.cpp
+++ b/tools/render_pictures_main.cpp
@@ -184,17 +184,17 @@ static bool render_picture_internal(const SkString& inputPath, const SkString* w
// 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());
}