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

Unified Diff: tools/bench_record.cpp

Issue 239703006: Retract SkPicture::kOptimizeForClippedPlayback_RecordingFlag from public API (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: 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/PictureRenderer.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
===================================================================
--- tools/bench_record.cpp (revision 14216)
+++ tools/bench_record.cpp (working copy)
@@ -12,6 +12,7 @@
#include "SkPicture.h"
#include "SkQuadTreePicture.h"
#include "SkRecording.h"
+#include "SkRTreePicture.h"
#include "SkStream.h"
#include "SkString.h"
#include "SkTileGridPicture.h"
@@ -33,19 +34,17 @@
DEFINE_string(bbh, "", "Turn on the bbh and select the type, one of rtree, tilegrid, quadtree");
DEFINE_bool(skr, false, "Record SKR instead of SKP.");
-typedef SkPictureFactory* (*PictureFactory)(int* recordingFlags);
+typedef SkPictureFactory* (*PictureFactory)();
-static SkPictureFactory* vanilla_factory(int* recordingFlags) {
+static SkPictureFactory* vanilla_factory() {
return NULL;
}
-static SkPictureFactory* rtree_factory(int* recordingFlags) {
- *recordingFlags |= SkPicture::kOptimizeForClippedPlayback_RecordingFlag;
- return NULL;
+static SkPictureFactory* rtree_factory() {
+ return SkNEW(SkRTreePictureFactory);
}
-static SkPictureFactory* tilegrid_factory(int* recordingFlags) {
- *recordingFlags |= SkPicture::kOptimizeForClippedPlayback_RecordingFlag;
+static SkPictureFactory* tilegrid_factory() {
SkTileGridPicture::TileGridInfo info;
info.fTileInterval.set(FLAGS_tileGridSize, FLAGS_tileGridSize);
info.fMargin.setEmpty();
@@ -53,8 +52,7 @@
return SkNEW_ARGS(SkTileGridPictureFactory, (info));
}
-static SkPictureFactory* quadtree_factory(int* recordingFlags) {
- *recordingFlags |= SkPicture::kOptimizeForClippedPlayback_RecordingFlag;
+static SkPictureFactory* quadtree_factory() {
return SkNEW(SkQuadTreePictureFactory);
}
@@ -94,7 +92,7 @@
SkDELETE(SkRecording::Delete(recording)); // delete the SkPlayback*.
} else {
int recordingFlags = FLAGS_flags;
- SkAutoTUnref<SkPictureFactory> factory(pictureFactory(&recordingFlags));
+ SkAutoTUnref<SkPictureFactory> factory(pictureFactory());
SkPictureRecorder recorder(factory);
SkCanvas* canvas = recorder.beginRecording(width, height, recordingFlags);
if (NULL != src) {
« no previous file with comments | « tools/PictureRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698