aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r--dm/DM.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index b7513939be..075a0b2c83 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -39,6 +39,7 @@
#include "SkSpinlock.h"
#include "SkTHash.h"
#include "SkTaskGroup.h"
+#include "SkTypeface_win.h"
#include "Test.h"
#include "Timer.h"
#include "ios_utils.h"
@@ -104,6 +105,7 @@ DEFINE_string(dont_write, "", "File extensions to skip writing to --writePath.")
DEFINE_bool(nativeFonts, true, "If true, use native font manager and rendering. "
"If false, fonts will draw as portably as possible.");
+DEFINE_bool(gdi, false, "On Windows, use GDI instead of DirectWrite for font rendering.");
using namespace DM;
using sk_gpu_test::GrContextFactory;
@@ -1323,6 +1325,14 @@ int main(int argc, char** argv) {
};
}
+#if defined(SK_BUILD_FOR_WIN)
+ if (FLAGS_gdi) {
+ gSkFontMgr_DefaultFactory = []() -> sk_sp<SkFontMgr> {
+ return SkFontMgr_New_GDI();
+ };
+ }
+#endif
+
initializeEventTracingForTools();
#if !defined(GOOGLE3) && defined(SK_BUILD_FOR_IOS)