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

Unified Diff: dm/DM.cpp

Issue 407183003: add portable and canonical font support for DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix linux-exposed bugs Created 6 years, 5 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 | gm/bigtext.cpp » ('j') | gm/colortype.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 003145b92187a92743051a57bd1e5724612d5b2e..1c851334a17dfaa026357d5280ebe972370b3bf3 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -9,6 +9,8 @@
#include "SkString.h"
#include "Test.h"
#include "gm.h"
+#include "sk_tool_utils.h"
+#include "sk_tool_utils_flags.h"
#include "DMCpuGMTask.h"
#include "DMGpuGMTask.h"
@@ -48,6 +50,8 @@ DEFINE_string(skps, "", "Directory to read skps from.");
DEFINE_bool(gms, true, "Run GMs?");
DEFINE_bool(tests, true, "Run tests?");
+DEFINE_bool(reportUsedChars, false, "Output test font construction data to be pasted into"
mtklein 2014/07/30 15:03:57 Is it silly to just preemptively create paths for
caryclark 2014/07/30 15:45:32 My first pass was to do just that, and that may ma
+ " create_test_font.cpp.");
__SK_FORCE_IMAGE_DECODER_LINKING;
@@ -231,7 +235,13 @@ int dm_main() {
tasks.wait();
SkDebugf("\n");
-
+#ifdef SK_DEBUG
mtklein 2014/07/30 15:03:57 Seems like you can drop the #ifdef/#endif wrapping
caryclark 2014/07/30 15:45:32 The report_used_chars relies on data gathered only
+ if (FLAGS_portableFonts && FLAGS_reportUsedChars) {
+ sk_tool_utils::report_used_chars();
+ }
+#endif
+ sk_tool_utils::release_portable_typeface();
mtklein 2014/07/30 15:03:57 Is there a corresponding ref/acquire? How do we k
caryclark 2014/07/30 15:45:32 I don't doubt this could be better. Would this be
mtklein 2014/07/30 17:19:05 Think we could have the portable font code registe
caryclark 2014/07/30 19:00:16 Done.
caryclark 2014/07/30 19:00:16 Done.
+
SkTArray<SkString> failures;
reporter.getFailures(&failures);
report_failures(failures);
« no previous file with comments | « no previous file | gm/bigtext.cpp » ('j') | gm/colortype.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698