History log of /external/skia/gm/typeface.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
33d2055e594177b27360f84e0631b26d74a55a9b 22-Mar-2017 Mike Klein <mtklein@chromium.org> GM: some header cleanup

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>
/external/skia/gm/typeface.cpp
4ecf0d484373b806b41f7ff1747ed380ee3be817 20-Sep-2016 halcanary <halcanary@google.com> GM: add test for type1 font

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350453002

Review-Url: https://codereview.chromium.org/2350453002
/external/skia/gm/typeface.cpp
dbfd7ab10883f173f5c1b653a233e18dc6142002 01-Sep-2016 mtklein <mtklein@chromium.org> Replace a lot of 'static const' with 'constexpr' or 'const'.

'static const' means, there must be at most one of these, and initialize it at
compile time if possible or runtime if necessary. This leads to unexpected
code execution, and TSAN* will complain about races on the guard variables.

Generally 'constexpr' or 'const' are better choices. Neither can cause races:
they're either intialized at compile time (constexpr) or intialized each time
independently (const).

This CL prefers constexpr where possible, and uses const where not. It even
prefers constexpr over const where they don't make a difference... I want to have
lots of examples of constexpr for people to see and mimic.

The scoped-to-class static has nothing to do with any of this, and is not changed.

* Not yet on the bots, which use an older TSAN.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300623005

Review-Url: https://codereview.chromium.org/2300623005
/external/skia/gm/typeface.cpp
f382b48687176f15091c2defc0002f0a189f4167 13-Jul-2016 bungeman <bungeman@google.com> Disable aliased font test on iOS.

See if not requesting aliased text fixes iOS.

BUG=skia:5530

TBR=mtklein

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2150483003

Review-Url: https://codereview.chromium.org/2150483003
/external/skia/gm/typeface.cpp
82945560e61f2996d2749b74359d219f56c92dda 13-Jul-2016 bungeman <bungeman@google.com> Disable embedded bitmap test on iOS.

The TypefaceRenderingGM crashes on iOS when drawing an embedded
bitmap when requesting aliased rendering. The crash looks like

libTrueTypeScaler.dylib`<redacted> + 80
stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=...)
-> 0x330b19d0 <+80>: strd r2, r3, [r5, #36]
0x330b19d4 <+84>: movs r3, #0x0
0x330b19d6 <+86>: add r2, sp, #0x28
0x330b19d8 <+88>: ldr r0, [r4, #0x4]

Disable testing embedded bitmaps on iOS for now.

BUG=skia:5530

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2140383004

Review-Url: https://codereview.chromium.org/2140383004
/external/skia/gm/typeface.cpp
7438bfc0804d021aa92cdd5ea644994a4248f3db 13-Jul-2016 bungeman <bungeman@google.com> Factor code to rotate a canvas about a point.

SkMatrix::scale and ::rotate take a point around which to scale or rotate.
Canvas lacks these helpers, so the code to rotate a canvas around a
point has been duplicated many times. Factor all of these
implementations into SkCanvas::rotate.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142033002

Review-Url: https://codereview.chromium.org/2142033002
/external/skia/gm/typeface.cpp
5dba301e916448bbb17bfe8e70dc367f32eb7159 12-Jul-2016 bungeman <bungeman@google.com> Use hintgasp font when testing rendering.

The hintgasp font was added specifically for the typefacerendering gm.
However, this gm didn't actually use the font, so now use it. In
addition this adds embedded bitmap strikes to the hintgasp font and the
gm is updated to test these as well.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2140863002

NOTREECHECKS=true
Test only change, does not affect users.

Review-Url: https://codereview.chromium.org/2140863002
/external/skia/gm/typeface.cpp
61457a6b80397256cbe24fa8927d6ed296cb5824 06-Jul-2016 bungeman <bungeman@google.com> Add gm for various font rendering combinations.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2080453002

Review-Url: https://codereview.chromium.org/2080453002
/external/skia/gm/typeface.cpp
ee6a9919a362e16c1d84a870ce867d1ad7b8a141 31-May-2016 mboc <mboc@opera.com> SkTypeface::MakeFromName to take SkFontStyle.

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
/external/skia/gm/typeface.cpp
13b9c95295f4c5732e34574789e721a6bc08f7b4 12-May-2016 bungeman <bungeman@google.com> Move SkTypeface to sk_sp.

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
/external/skia/gm/typeface.cpp
9a9a7b29e5e5916a7b6453cd124ca437f14b9da4 12-May-2016 scroggo <scroggo@google.com> Revert of Move SkTypeface to sk_sp. (patchset #5 id:80001 of 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
/external/skia/gm/typeface.cpp
6296da736fbf40aae881650c239420f64e576c3f 11-May-2016 bungeman <bungeman@google.com> Move SkTypeface to sk_sp.

Review-Url: https://codereview.chromium.org/1933393002
/external/skia/gm/typeface.cpp
96fcdcc219d2a0d3579719b84b28bede76efba64 27-Aug-2015 halcanary <halcanary@google.com> Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
/external/skia/gm/typeface.cpp
37213558e6d269807cde031e59b9567d0db6e471 24-Jul-2015 caryclark <caryclark@google.com> make fontscalar gammatext lcdtext typeface verttext2 gm portable

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
/external/skia/gm/typeface.cpp
b4a797f3aa8c10387f01cf51a65dd1a8aa5eec9d 21-May-2015 kkinnunen <kkinnunen@nvidia.com> Move font loading in gm tests and benches out of constructors

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
/external/skia/gm/typeface.cpp
36352bf5e38f45a70ee4f4fc132a38048d38206d 26-Mar-2015 mtklein <mtklein@chromium.org> C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}

NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
/external/skia/gm/typeface.cpp
72c9faab45124e08c85f70ca38536914862d947c 09-Jan-2015 mtklein <mtklein@chromium.org> Fix up all the easy virtual ... SK_OVERRIDE cases.

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
/external/skia/gm/typeface.cpp
992c7b03ef7914a18bfd78e965b0b4c99a5f5672 31-Jul-2014 Cary Clark <caryclark@google.com> Add standard fonts to all GMs.

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
/external/skia/gm/typeface.cpp
7fa2a65c0cfc714364490cb715171461143024e0 27-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> fix more 64bit warnings

BUG=skia:

Review URL: https://codereview.chromium.org/147683003

git-svn-id: http://skia.googlecode.com/svn/trunk@13190 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/typeface.cpp
7ed98df9ba14bdb58e381508eb0505c963a4b6db 31-Oct-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@12043 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/typeface.cpp
35fe7372b1b897a77578a220c334e1fb36d144e9 30-Oct-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> prototype for kerning api

BUG=
R=bungeman@google.com

Review URL: https://codereview.chromium.org/29363009

git-svn-id: http://skia.googlecode.com/svn/trunk@12018 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/typeface.cpp
12eea2b10d6caaafe0a207d10b1e9322510983a2 27-Feb-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@7875 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/typeface.cpp
098b7ff2642471c715e6824a5d79d97f7cd45045 26-Feb-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> git-svn-id: http://skia.googlecode.com/svn/trunk@7868 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/typeface.cpp
92abe48f2494d9415ec955247153319531b1f55e 26-Feb-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> move SampleTypeface into gm/typefacestyles



git-svn-id: http://skia.googlecode.com/svn/trunk@7867 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/typeface.cpp
ae933ce0ea5fd9d21cb6ef2cee7e729d32690aac 23-Aug-2012 rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Result of running tools/sanitize_source_files.py (which was added in 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
/external/skia/gm/typeface.cpp
5d8d18651a64f62dbb8881794e23f53bf22c9a23 15-Aug-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Addressed Windows compiler complaints

http://codereview.appspot.com/6462062/

This CL will require re-baselining of the imagemagnifier GM



git-svn-id: http://skia.googlecode.com/svn/trunk@5108 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/typeface.cpp
3cb969f27de56df0d9116c13f18bd31ee0715f1a 27-Jul-2012 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> In SkGPipe, only serialize SkTypefaces in cross process mode.

Also make SkGPipeController ref the recording canvas to ensure that
objects used by SkGPipeCanvas (e.g. SharedHeap and fTypefaceSet, which
hold references to objects to which pointers are written to the stream)
survive to be played back even if SkGPipeWriter.endRecording() is called.

BUG=
TEST=TypefaceGM

Review URL: https://codereview.appspot.com/6447055

git-svn-id: http://skia.googlecode.com/svn/trunk@4817 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/typeface.cpp