Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(753)

Issue 227593010: Move distance field generation to the glyph cache (Closed)

Created:
6 years, 8 months ago by jvanverth1
Modified:
6 years, 8 months ago
Reviewers:
robertphillips, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Move distance field generation to the glyph cache. Distance fields are currently created in GrTextStrike, which is the wrong place. This moves that to the glyph cache where it belongs. As part of my testing, I found that when we fall back to paths in the GrDistanceFieldTextContext it was not scaling them properly, so that's fixed in here too. Committed: http://code.google.com/p/skia/source/detail?r=14193

Patch Set 1 #

Patch Set 2 : Move distance field constants to SkDistanceFieldGen #

Patch Set 3 : First pass at using new distance field cache #

Patch Set 4 : Kinda working #

Patch Set 5 : Fix issues with pitch #

Patch Set 6 : Various fixes and clean-ups #

Patch Set 7 : A few more nits #

Patch Set 8 : Fix size_t def #

Patch Set 9 : Re-disable distance fields #

Total comments: 33

Patch Set 10 : Address nits #

Patch Set 11 : Missed some indents #

Total comments: 2

Patch Set 12 : Move GrFontScaler to private interface; remove rowBytes from getPackedGlyphDFImage() signature #

Total comments: 1

Patch Set 13 : Move GrFontScaler back to public interface #

Unified diffs Side-by-side diffs Delta from patch set Stats (+241 lines, -112 lines) Patch
M include/gpu/GrFontScaler.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +6 lines, -0 lines 0 comments Download
M include/gpu/SkGr.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -2 lines 0 comments Download
M src/core/SkDistanceFieldGen.h View 1 2 3 4 5 6 7 8 9 1 chunk +44 lines, -9 lines 0 comments Download
M src/core/SkDistanceFieldGen.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +71 lines, -28 lines 0 comments Download
M src/core/SkGlyph.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M src/core/SkGlyphCache.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/core/SkGlyphCache.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +45 lines, -2 lines 0 comments Download
M src/gpu/GrDistanceFieldTextContext.cpp View 1 2 3 4 5 6 8 1 chunk +4 lines, -3 lines 0 comments Download
M src/gpu/GrTextStrike.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +17 lines, -53 lines 0 comments Download
M src/gpu/SkGrFontScaler.cpp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +34 lines, -6 lines 0 comments Download
M src/gpu/effects/GrDistanceFieldTextureEffect.cpp View 1 3 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
jvanverth1
Two notes: This will create the mask and cache it as well. I'm not sure ...
6 years, 8 months ago (2014-04-11 13:36:51 UTC) #1
robertphillips
lgtm + nits & questions https://codereview.chromium.org/227593010/diff/140001/include/gpu/GrFontScaler.h File include/gpu/GrFontScaler.h (right): https://codereview.chromium.org/227593010/diff/140001/include/gpu/GrFontScaler.h#newcode34 include/gpu/GrFontScaler.h:34: virtual bool getPackedGlyphDFImage(GrGlyph::PackedID, int ...
6 years, 8 months ago (2014-04-11 14:13:00 UTC) #2
jvanverth1
Nits addressed. I think I still need an OK from Mike before I can commit. ...
6 years, 8 months ago (2014-04-11 17:54:14 UTC) #3
jvanverth1
Mike, can you take a look at this please?
6 years, 8 months ago (2014-04-14 14:12:26 UTC) #4
reed1
Does GrFontScaler.h need to be public? https://codereview.chromium.org/227593010/diff/170001/include/gpu/GrFontScaler.h File include/gpu/GrFontScaler.h (right): https://codereview.chromium.org/227593010/diff/170001/include/gpu/GrFontScaler.h#newcode34 include/gpu/GrFontScaler.h:34: virtual bool getPackedGlyphDFImage(GrGlyph::PackedID, ...
6 years, 8 months ago (2014-04-14 14:18:04 UTC) #5
jvanverth1
GrFontScaler is now a private interface. Also removed an unused parameter from the getPackedGlyphDFImage() call. ...
6 years, 8 months ago (2014-04-14 17:58:42 UTC) #6
jvanverth1
On 2014/04/14 17:58:42, JimVV wrote: > It generates distance field pixels from the image pixels, ...
6 years, 8 months ago (2014-04-14 17:59:26 UTC) #7
reed1
lgtm https://codereview.chromium.org/227593010/diff/190001/src/gpu/GrFontScaler.h File src/gpu/GrFontScaler.h (right): https://codereview.chromium.org/227593010/diff/190001/src/gpu/GrFontScaler.h#newcode36 src/gpu/GrFontScaler.h:36: virtual bool getPackedGlyphDFImage(GrGlyph::PackedID, int width, int height, ah, ...
6 years, 8 months ago (2014-04-14 19:43:02 UTC) #8
jvanverth1
I had to roll back the change which puts GrFontScaler.h in the private interface, since ...
6 years, 8 months ago (2014-04-14 20:33:51 UTC) #9
reed1
lgtm
6 years, 8 months ago (2014-04-14 20:38:30 UTC) #10
jvanverth1
The CQ bit was checked by jvanverth@google.com
6 years, 8 months ago (2014-04-14 21:35:04 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/jvanverth@google.com/227593010/210001
6 years, 8 months ago (2014-04-14 21:35:24 UTC) #12
commit-bot: I haz the power
6 years, 8 months ago (2014-04-14 22:06:15 UTC) #13
Message was sent while issue was closed.
Change committed as 14193

Powered by Google App Engine
This is Rietveld 408576698