aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/verttext2.cpp
Commit message (Collapse)AuthorAge
* remove platform_font_name()Gravatar Mike Klein2017-11-14
| | | | | | | | | | | | It's used rarely and now that we're mostly using portable fonts, it only serves to confuse. Sans-serif doesn't seem to work anyway. Simplify gm/typeface.cpp to just test the default typeface. Change-Id: I091239ea91af9d9e01d3c76280636a6061b5fb5c Reviewed-on: https://skia-review.googlesource.com/71261 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* add platform_font_manager()Gravatar Mike Klein2017-11-13
| | | | | | | | | | | | | This string replaces {major_}platform_os_name() and platform_extra_config() for the font-focused GMs using them. The GDI bots will report "GDI", the NativeFont bots their OS, and other bots "". Change-Id: I8f7bb1ffea3cc91601c98b4ccff7a3a234ac77d3 Reviewed-on: https://skia-review.googlesource.com/70500 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* add drawString helper to canvasGravatar Cary Clark2017-04-28
| | | | | | | | | | | | | | | | | | Many tests and examples use drawText with a guess of how long the text is in bytes, or a call to strlen(). Add a helper to SkCanvas to simplify these examples. Add another helper for SkString. R=reed@google.com Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2 Reviewed-on: https://skia-review.googlesource.com/13642 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
* GM: some header cleanupGravatar Mike Klein2017-03-22
| | | | | | | | | | | | | | gm.h includes sk_tool_utils.h but does not use it. The bulk of this CL makes each gm that uses sk_tool_utils include it. sk_tool_utils.h also provided SkRandom and SkTDArray, so a couple GMs add those headers too. Change-Id: Ieb2a7c542f0ca89c3223f744fc11b0ff37af36c1 Reviewed-on: https://skia-review.googlesource.com/10014 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* SkTypeface::MakeFromName to take SkFontStyle.Gravatar mboc2016-05-31
| | | | | | | | | | | | | SkTypeface::MakeFromName currently takes SkTypeface::Style, which is quite limited. This starts the transition to this function taking SkFontStyle instead. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1818043002 TBR=reed He said it sounded like a good idea. Review-Url: https://codereview.chromium.org/1818043002
* Move SkTypeface to sk_sp.Gravatar bungeman2016-05-12
| | | | | | | Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1933393002 Review-Url: https://codereview.chromium.org/1933393002
* Revert of Move SkTypeface to sk_sp. (patchset #5 id:80001 of ↵Gravatar scroggo2016-05-12
| | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1933393002/ ) Reason for revert: fontmgr_iterAndroid failing to draw emoji. E.g. https://gold.skia.org/search2?blame=6296da736fbf40aae881650c239420f64e576c3f&unt=true&head=true&query=source_type%3Dgm Original issue's description: > Move SkTypeface to sk_sp. > > Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f TBR=reed@google.com,fmalita@chromium.org,tomhudson@google.com,bungeman@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1974783002
* Move SkTypeface to sk_sp.Gravatar bungeman2016-05-11
| | | | Review-Url: https://codereview.chromium.org/1933393002
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* make fontscalar gammatext lcdtext typeface verttext2 gm portableGravatar caryclark2015-07-24
| | | | | | | | | Pass generic font names to tool util function to generate platform specific fonts and gm test output by unique name. R=bungeman@google.com Review URL: https://codereview.chromium.org/1256903002
* Move font loading in gm tests and benches out of constructorsGravatar kkinnunen2015-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Constructing the gm tests and benches causes many calls to font loads. This is visible as profiling samples in fontconfig and freetype on Linux for all profiling runs of nanobench. This complicates analysis of test-cases that are suspected of being slow due to font-related issues. Move the font loading to GM::onOnceBeforeDraw and Benchmark::onPreDraw. This way the code is not executed if the testcase does not match the nanobench --match filter. This way the samples in font-related code are more easy to identify as legitimate occurances caused by the testcase. This should not cause differences in timings, because: * Benchmark::preDraw / onPreDraw is defined to be run outside the timer * GM::runAsBench is not enabled for any of the modified testcases. Also nanobench untimed warmup round should run the onOnceBeforeDraw. (and there are other GM::runAsBench gms already doing loading in onOnceBeforeDraw). Changes the behavior: In TextBench: Before, the test would report two different gms with the same name if the color emoji font was not loaded successfully. After, the test always reports all tests as individual names. Generally: The errors from loading fonts now print inbetween each testcase, as opposed to printing during construction phase. Sample output: ( 143/145 MB 1872) 14.7ms 8888 gm quadclosepathResource /fonts/Funkster.ttf not a valid font. ( 160/160 MB 1831) 575µs 8888 gm surfacenewResource /fonts/Funkster.ttf not a valid font. ( 163/165 MB 1816) 12.5ms 8888 gm linepathResource /fonts/Funkster.ttf not a valid font. ( 263/411 MB 1493) 118ms 8888 gm typefacestyles_kerningResource /fonts/Funkster.ttf not a valid font. ( 374/411 MB 1231) 7.16ms 565 gm getpostextpathResource /fonts/Funkster.ttf not a valid font. ( 323/411 MB 1179) 4.92ms 565 gm stringartResource /fonts/Funkster.ttf not a valid font. ( 347/493 MB 917) 191ms 565 gm patch_gridResource /fonts/Funkster.ttf not a valid font. ( 375/493 MB 857) 23.9ms gpu gm clipdrawdrawCannot render path (0) ( 393/493 MB 706) 2.91ms unit test ParsePath------ png error IEND: CRC error ( 394/493 MB 584) 166ms gpu gm hairmodesResource /fonts/Funkster.ttf not a valid font. Resource /fonts/Funkster.ttf not a valid font. Resource /fonts/Funkster.ttf not a valid font. ... Review URL: https://codereview.chromium.org/1144023002
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* remove unused GM flagsGravatar mtklein2015-01-23
| | | | | | | | | | Depends on https://codereview.chromium.org/873753002/ Thumbs up to CLion for refactoring this for me. BUG=skia: Review URL: https://codereview.chromium.org/867963004
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Cleanup: Another round of override fixes.Gravatar tfarina2014-12-20
| | | | | | | | BUG=skia:3075 TEST=ninja -C out/Debug TBR=mtklein@google.com Review URL: https://codereview.chromium.org/815883002
* Add standard fonts to all GMs.Gravatar Cary Clark2014-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow GM results to be compared across machines and platforms by standardizing the fonts used by all tests. This adds runtime flags to DM to use either the system font context (the default), the fonts in the resources directory ( --resourceFonts ) or a set of canonical paths generated from the fonts ( --portableFonts ). This CL should leave the current DM results unchanged by default. If the portable font data or resource font is missing when DM is run, it falls back to using the system font context. The create_test_font tool generates the paths and metrics read by DM with the --portableFonts flag set, and generates the font substitution tables read by DM with the --resourceFonts flag set. If DM is run in SkDebug mode with the --reportUsedChars flag set, it generates the corresponding data compiled into the create_test_font tool. All GM tests set their typeface information by calling either sk_tool_utils::set_portable_typeface or sk_tool_utils::portable_typeface . (The former takes the paint, the latter returns a SkTypeface.) These calls can be removed in the future when the Font Manager can be superceded. BUG=skia:2687 R=mtklein@google.com Review URL: https://codereview.chromium.org/407183003
* Cleanup: Get rid of make_isize() function from gm.h.Gravatar tfarina2014-06-09
| | | | | | | | | | | | | | | This helper function is not necessary. The same thing can be achieved by using SkISize::Make() provided by SkTSize API. BUG=skia:2645 TEST=make dm && out/Debug/dm R=robertphillips@google.com, reed@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/326523002
* Turn on quilt mode in DM.Gravatar commit-bot@chromium.org2014-04-30
| | | | | | | | | | | | | | | | | | - Rename TileGrid -> Quilt to avoid the name overload. - Tag all failing GMs with kSkipTiled_Flag. You may be wondering, do any GMs pass? Yes, some do! And that trends towards all of them as we increase --quiltTile. Two GMs only fail in --quilt mode in 565. Otherwise all GMs which fail are skipped, and those which don't fail aren't. (The 8888 variants of those two GMs are skipped even though they pass.) BUG=skia:2477 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/256373002 git-svn-id: http://skia.googlecode.com/svn/trunk@14457 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part III of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6475053 git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81
* more SkInstCnt plumbingGravatar reed@google.com2012-06-26
| | | | | | | | fix some typeface leaks git-svn-id: http://skia.googlecode.com/svn/trunk@4348 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix miscellaneous compiler warnings from Visual Studio 2010.Gravatar tomhudson@google.com2012-04-10
| | | | | | | | | Changes serialization path for MorphologyImageFilter, handling of Windows HRESULTS; otherwise just tweaks tests. git-svn-id: http://skia.googlecode.com/svn/trunk@3642 2bbb7eff-a529-9590-31e7-b0007b416f81
* support vertical text and typeface-by-name on LeopardGravatar caryclark@google.com2011-12-21
M src/ports/SkFontHost_mac_coretext.cpp M gyp/gmslides.gypi A gm/verttext2.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@2920 2bbb7eff-a529-9590-31e7-b0007b416f81