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

Unified Diff: tools/bench_record.cpp

Issue 231853006: SkRecord: turn on cull annotation pass in public API. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 8 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 19bff782c33b1cb4e9c0dda82fa1dead817dc0c7..ae91eb119a5383b760cac6a149d3261f7c6e95eb 100644
--- a/tools/bench_record.cpp
+++ b/tools/bench_record.cpp
@@ -11,7 +11,7 @@
#include "SkOSFile.h"
#include "SkPicture.h"
#include "SkQuadTreePicture.h"
-#include "SkRecorder.h"
+#include "SkRecording.h"
#include "SkStream.h"
#include "SkString.h"
#include "SkTileGridPicture.h"
@@ -86,11 +86,12 @@ static void bench_record(SkPicture* src, const char* name, PictureFactory pictur
for (int i = 0; i < FLAGS_loops; i++) {
if (FLAGS_skr) {
- SkRecord record;
- SkRecorder canvas(SkRecorder::kWriteOnly_Mode, &record, width, height);
+ using EXPERIMENTAL::SkRecording;
+ SkRecording* recording = SkRecording::Create(width, height);
if (NULL != src) {
- src->draw(&canvas);
+ src->draw(recording->canvas());
}
+ SkDELETE(SkRecording::Delete(recording)); // delete the SkPlayback*.
} else {
int recordingFlags = FLAGS_flags;
SkAutoTUnref<SkPictureFactory> factory(pictureFactory(&recordingFlags));
« 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