Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: tools/bench_record.cpp

Issue 331573004: Add EXPERIMENTAL_beginRecording() for SkRecord-based recording. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: put back Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/bench_playback.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bench_record.cpp
diff --git a/tools/bench_record.cpp b/tools/bench_record.cpp
index a8d7a8a0e5d7535fb95a3a384174e782abc1c974..0024c2ccdbea644eb600efec04e39672d9f76f0a 100644
--- a/tools/bench_record.cpp
+++ b/tools/bench_record.cpp
@@ -11,7 +11,6 @@
#include "SkOSFile.h"
#include "SkPicture.h"
#include "SkPictureRecorder.h"
-#include "SkRecording.h"
#include "SkStream.h"
#include "SkString.h"
@@ -65,16 +64,13 @@ static SkBBHFactory* parse_FLAGS_bbh() {
}
static void rerecord(const SkPicture& src, SkBBHFactory* bbhFactory) {
+ SkPictureRecorder recorder;
if (FLAGS_skr) {
- EXPERIMENTAL::SkRecording recording(src.width(), src.height());
- src.draw(recording.canvas());
- // Release and delete the SkPlayback so that recording optimizes its SkRecord.
- SkDELETE(recording.releasePlayback());
+ src.draw(recorder.EXPERIMENTAL_beginRecording(src.width(), src.height(), bbhFactory));
} else {
- SkPictureRecorder recorder;
src.draw(recorder.beginRecording(src.width(), src.height(), bbhFactory));
- SkAutoTUnref<SkPicture> dst(recorder.endRecording());
}
+ SkAutoTUnref<SkPicture> pic(recorder.endRecording());
}
static void bench_record(const SkPicture& src,
« no previous file with comments | « tools/bench_playback.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698