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

Unified Diff: tools/render_pictures_main.cpp

Issue 197123003: Proposed SkCanvas API for preLoading textures to VRAM v2.0 (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: retry upload Created 6 years, 9 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/render_pictures_main.cpp
===================================================================
--- tools/render_pictures_main.cpp (revision 13812)
+++ tools/render_pictures_main.cpp (working copy)
@@ -44,6 +44,8 @@
DEFINE_bool(bench_record, false, "If true, drop into an infinite loop of recording the picture.");
+DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing before rendering.");
+
static void make_output_filepath(SkString* path, const SkString& dir,
const SkString& name) {
sk_tools::make_filepath(path, dir, name);
@@ -188,6 +190,13 @@
inputPath.c_str());
renderer.init(picture);
+
+ if (FLAGS_preprocess) {
+ if (NULL != renderer.getCanvas()) {
+ renderer.getCanvas()->EXPERIMENTAL_optimize(picture);
+ }
+ }
+
renderer.setup();
SkString* outputPath = NULL;
« 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