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/VisualBench/VisualBench.cpp

Issue 1421723004: Add visualbench option for device-independent fonts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | tools/VisualBench/VisualBenchmarkStream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench/VisualBench.cpp
diff --git a/tools/VisualBench/VisualBench.cpp b/tools/VisualBench/VisualBench.cpp
index 893dba6ab3ff9741207654664716d90da69d60c6..10fdbfe4b145f86e8feffc8dbfa377facf31e569 100644
--- a/tools/VisualBench/VisualBench.cpp
+++ b/tools/VisualBench/VisualBench.cpp
@@ -24,12 +24,18 @@
DEFINE_bool2(fullscreen, f, true, "Run fullscreen.");
DEFINE_bool2(interactive, n, false, "Run in interactive mode.");
+DEFINE_bool2(dif, d, false, "Use device-independent fonts.");
VisualBench::VisualBench(void* hwnd, int argc, char** argv)
: INHERITED(hwnd) {
SkCommandLineFlags::Parse(argc, argv);
- // this has to happen after commandline parsing
+ // these have to happen after commandline parsing
+ if (FLAGS_dif) {
+ const SkSurfaceProps& props(INHERITED::getSurfaceProps());
+ uint32_t flags = SkSurfaceProps::kUseDeviceIndependentFonts_Flag | props.flags();
+ INHERITED::setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry()));
+ }
fModule.reset(new VisualLightweightBenchModule(this));
if (FLAGS_interactive) {
fModule.reset(new VisualInteractiveModule(this));
« no previous file with comments | « no previous file | tools/VisualBench/VisualBenchmarkStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698