History log of /external/skia/gm/fontcache.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fc4f768e5aaf8efdd112f38295a35de83a0f9a55 25-Jan-2018 Jim Van Verth <jvanverth@google.com> Use int when possible to calculate atlas indices in shaders.

On certain iOS devices half has a mantissa of only 10 bits, which is not
enough to perform the floating point trickery to get the lower bits
out of the "texture coordinates". Instead we use int if available, and
float if not available.

Also re-enables multitexturing for iOS and adds a sample which
stresses the issue, and a version of fontcache that tests multitexturing.

Bug: skia:7285
Change-Id: Ia541b6a418c1860c941071750ceb26459eb846ea
Reviewed-on: https://skia-review.googlesource.com/99800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
/external/skia/gm/fontcache.cpp
8def8bffe98ee58af6c088f3ab6e4a41f32b732f 30-Nov-2017 Robert Phillips <robertphillips@google.com> Add a GrContextThreadSafeProxy to SkSurfaceCharacterization

Ganesh will require access to the GrCaps to make rendering decisions.

Change-Id: I6dee42a3f0dc638f052706b8d1ea6e02b589e062
Reviewed-on: https://skia-review.googlesource.com/77681
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/gm/fontcache.cpp
9f545bc18a1fdff64d40104028c6d8449e660a6e 06-Nov-2017 Brian Salomon <bsalomon@google.com> Modify fontcache GM to actually spill atlas.

Adds an option to GrDrawOpAtlas to disable multitexturing.

Adds option to GrContextOptions to disable multitexturing for glyph atlases.


Change-Id: If413ab7061538fa0e75628d252be4fd14215b6ba
Reviewed-on: https://skia-review.googlesource.com/67802
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/gm/fontcache.cpp
713195071dc7bdeddec2d1c9fab9b3720f049f07 27-Jul-2017 Ben Wagner <bungeman@google.com> Remove internal use of SkTypeface::Style.

Change-Id: I71cf04b12be95a54b7fb47d048ba1f8672ed9a8f
Reviewed-on: https://skia-review.googlesource.com/27760
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/gm/fontcache.cpp
2a475eae622adc1e8fa29206be1eaf862c23548e 28-Apr-2017 Cary Clark <caryclark@google.com> add drawString helper to canvas

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>
/external/skia/gm/fontcache.cpp
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/fontcache.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/fontcache.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/fontcache.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/fontcache.cpp
6296da736fbf40aae881650c239420f64e576c3f 11-May-2016 bungeman <bungeman@google.com> Move SkTypeface to sk_sp.

Review-Url: https://codereview.chromium.org/1933393002
/external/skia/gm/fontcache.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/fontcache.cpp
385fe4d4b62d7d1dd76116dd570df3290a2f487b 26-Aug-2015 halcanary <halcanary@google.com> Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
/external/skia/gm/fontcache.cpp
1818acb6a4b11cd9a1d44ce5dde77452502a9796 24-Jul-2015 caryclark <caryclark@google.com> rename portable_typeface_always to portable_typeface

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1257773002
/external/skia/gm/fontcache.cpp
1b31402babc2c98b27ef7a7741720db20f2862ea 23-Jul-2015 caryclark <caryclark@google.com> make fontcache textblob gm portable

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1245123006
/external/skia/gm/fontcache.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/fontcache.cpp
c1e97b372e21edf9c7e45cfea0eca7f1a52fe9e5 05-Mar-2015 herb <herb@google.com> Fix uninitialized memory bug in the SkGlyphCache.

The core of the problem is that the system is asked to lookup the metrics for a character with id == 0. This causes a hit in the fCharToGlyphHash matching the sentinel glyph. This happens because fCharToGlpyhHash is initialized with all zeros, therefore, the fID is zero matching the char with id == 0. The fAdvanceX field of the sentinel glyph is in fact not initialized.

The bigger question is now did a zero character get passed to getUnicharMetrics?

The breaking code is basically as follows:
wchar_t glyph = L'S';
paint.measureText(&glyph, 2);

This get mischaracterized as a utf8 string instead of a utf16(?) string. Because of the little endian ordering, this is the character string 'L' '\0'. Since the size of the original string is two bytes (but a single character) the '\0' is treated as its own character and past to getUnicharMetrics.

TEST:
On windows failed using DrMemory. With this change does not fail.

BUG=463204

Review URL: https://codereview.chromium.org/977063002
/external/skia/gm/fontcache.cpp
ce07afb8fad3dd29f6d253ce83744853c10069c7 19-Feb-2015 jvanverth <jvanverth@google.com> Update fontcache gm to actually stress font atlas

BUG=skia:

Review URL: https://codereview.chromium.org/933313004
/external/skia/gm/fontcache.cpp
1c4029296f518a84ef90095243ba210163a1e1f9 23-Jan-2015 mtklein <mtklein@chromium.org> remove unused GM flags

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
/external/skia/gm/fontcache.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/fontcache.cpp
3f5417590a1ed34de2fb89994493db0b1153b4cb 03-Sep-2014 jvanverth <jvanverth@google.com> Update fontcache GM to stress the font atlas.

Pulled out of https://codereview.chromium.org/466363009/.

R=bsalomon@google.com

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/534253003
/external/skia/gm/fontcache.cpp
6a25bd017278f2cdaeaf6121548c13ab04702799 29-Aug-2014 Mike Klein <mtklein@google.com> Revert Jim's CL.

BUG=skia:

Review URL: https://codereview.chromium.org/517123005
/external/skia/gm/fontcache.cpp
63b9dc82474a4daf195c6157a711be401f7a0ddd 28-Aug-2014 jvanverth <jvanverth@google.com> Restore text vertex buffer alloc and other optimizations.

Modifies the fontcache GM to ensure that the font cache is forced to flush.

Committed: https://skia.googlesource.com/skia/+/9c3d24b9d1ba3d955094ff0cb1ba2d11e1c1adca

R=bsalomon@google.com, robertphillips@google.com

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/466363009
/external/skia/gm/fontcache.cpp
2e1a82675c9dc6fe7d6884f92ae59519d5359a70 27-Aug-2014 djsollen <djsollen@google.com> Revert of Restore text alloc optimizations. (patchset #4 of https://codereview.chromium.org/466363009/)

Reason for revert:
GM failures on http://108.170.220.120:10115/builders/Test-Ubuntu12-ShuttleA-GTX660-x86-Release/builds/1867/

Original issue's description:
> Restore text vertex buffer alloc and other optimizations.
>
> Modifies the fontcache GM to ensure that the font cache is forced to flush.
>
> Committed: https://skia.googlesource.com/skia/+/9c3d24b9d1ba3d955094ff0cb1ba2d11e1c1adca

R=bsalomon@google.com, robertphillips@google.com, jvanverth@google.com
TBR=bsalomon@google.com, jvanverth@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/510103003
/external/skia/gm/fontcache.cpp
9c3d24b9d1ba3d955094ff0cb1ba2d11e1c1adca 27-Aug-2014 jvanverth <jvanverth@google.com> Restore text vertex buffer alloc and other optimizations.

Modifies the fontcache GM to ensure that the font cache is forced to flush.

R=bsalomon@google.com, robertphillips@google.com

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/466363009
/external/skia/gm/fontcache.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/fontcache.cpp
f29c3802899c3e1e285a44140eb32cfa329764dc 10-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@11691 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/fontcache.cpp
73d13d70dc46849b88b79096772d6f8e32cb5fe2 09-Oct-2013 jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Give the new font cache GM a name

BUG=
R=borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11685 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/fontcache.cpp
338a49fc55be8555e171419d079a1b6317060a38 09-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add new GM to stress test the GPU font cache for cases similar to
Chromium issue 303803.

BUG=303803

Committed: http://code.google.com/p/skia/source/detail?r=11673

R=robertphillips@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11680 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/fontcache.cpp
5466b0ebbcf312bfa28a1a53d449cba30e898a9a 09-Oct-2013 jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Add new GM to stress test the GPU font cache"

git-svn-id: http://skia.googlecode.com/svn/trunk@11678 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/fontcache.cpp
b6aec0558810f5d3531ff7d530be0a3d148c5639 09-Oct-2013 jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix font cache GM on Windows

git-svn-id: http://skia.googlecode.com/svn/trunk@11675 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/fontcache.cpp
7d14ceff7bcedd48e585a5c1a45390defe8a2d89 09-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add new GM to stress test the GPU font cache for cases similar to
Chromium issue 303803.

BUG=303803
R=robertphillips@google.com

Author: jvanverth@google.com

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

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