aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DM.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-11-13 12:40:46 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-13 18:47:11 +0000
commit0c5fdcb18986b46ddad48f4157570c4ead4fe54a (patch)
treecd0ed911d743e8a5ea92239c979e6dae1a48becb /dm/DM.cpp
parent4c723832df5d1a1368c996d8f8349becd395ad90 (diff)
streamline GDI bots
- Replace build-time GDI support in all of Skia with run-time GDI support only in DM. - Make the GDI bots NativeFont bots paralelling the other NativeFonts bots. Change-Id: I424b20f6983d8a8ba8574650efefea2b8776bbe2 Reviewed-on: https://skia-review.googlesource.com/70721 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
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)