diff options
author | 2014-03-10 19:38:51 +0000 | |
---|---|---|
committer | 2014-03-10 19:38:51 +0000 | |
commit | bf998240837d8798e0b257416ce8832250b64af6 (patch) | |
tree | 124e4abe8d57f6d1655844de9802cab884272402 /gm/gmmain.cpp | |
parent | bfce48e0bca2c92eca55f31511a3d6def1b5309f (diff) |
Add new module for distance field generation.
This improves the speed over the previous method by 10x+, and makes using distance fields practical.
BUG=skia:2173
R=bsalomon@google.com, robertphillips@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/178543007
git-svn-id: http://skia.googlecode.com/svn/trunk@13729 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/gmmain.cpp')
-rw-r--r-- | gm/gmmain.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp index 165c5affb7..de9e1a15a0 100644 --- a/gm/gmmain.cpp +++ b/gm/gmmain.cpp @@ -46,6 +46,7 @@ #ifdef SK_DEBUG static const bool kDebugOnly = true; +#define GR_DUMP_FONT_CACHE 0 #else static const bool kDebugOnly = false; #endif @@ -2408,6 +2409,18 @@ int tool_main(int argc, char** argv) { } #endif +#if GR_DUMP_FONT_CACHE + for (int i = 0; i < configs.count(); i++) { + ConfigData config = gRec[configs[i]]; + + if (kGPU_Backend == config.fBackend) { + GrContext* gr = grFactory->get(config.fGLContextType); + + gr->dumpFontCache(); + } + } +#endif + delete grFactory; #endif SkGraphics::Term(); |