DEFINE_bool(gpuStats, false, "Only meaningful with gpu configurations. "
"Report some GPU call statistics.");
#endif
-DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing before rendering.");
+DEFINE_bool(mpd, false, "If true, use MultiPictureDraw for rendering.");
DEFINE_string(readJsonSummaryPath, "", "JSON file to read image expectations from.");
DECLARE_string(readPath);
DEFINE_bool(writeChecksumBasedFilenames, false,
return false;
}
- if (FLAGS_preprocess) {
- // Because the GPU preprocessing step relies on the in-memory picture
- // statistics we need to rerecord the picture here
- SkPictureRecorder recorder;
- picture->playback(recorder.beginRecording(picture->cullRect().width(),
- picture->cullRect().height(),
- NULL, 0));
- picture.reset(recorder.endRecording());
- }
-
while (FLAGS_bench_record) {
SkPictureRecorder recorder;
picture->playback(recorder.beginRecording(picture->cullRect().width(),
inputPath.c_str());
renderer.init(picture, &writePathString, &mismatchPathString, &inputFilename,
- FLAGS_writeChecksumBasedFilenames);
-
- if (FLAGS_preprocess) {
- if (renderer.getCanvas()) {
- renderer.getCanvas()->EXPERIMENTAL_optimize(renderer.getPicture());
- }
- }
+ FLAGS_writeChecksumBasedFilenames, FLAGS_mpd);
renderer.setup();
renderer.enableWrites();
SkDebugf("Failed to render %i pictures.\n", failures);
return 1;
}
-#if SK_SUPPORT_GPU
-#if GR_CACHE_STATS
+#if GR_CACHE_STATS && SK_SUPPORT_GPU
if (renderer->isUsingGpuDevice()) {
GrContext* ctx = renderer->getGrContext();
ctx->printCacheStats();
#endif
}
#endif
-#if GR_GPU_STATS
+
+#if GR_GPU_STATS && SK_SUPPORT_GPU
if (FLAGS_gpuStats && renderer->isUsingGpuDevice()) {
GrContext* ctx = renderer->getGrContext();
SkDebugf("RenderTarget Binds: %d\n", ctx->gpuStats()->renderTargetBinds());
SkDebugf("Shader Compilations: %d\n", ctx->gpuStats()->shaderCompilations());
}
#endif
-#endif
+
if (FLAGS_writeJsonSummaryPath.count() == 1) {
// If there were any descriptions on the command line, insert them now.
for (int i=0; i<FLAGS_descriptions.count(); i++) {