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

Issue 563283004: Use per-typeface sets of glyphs for nvpr text (Closed)

Created:
6 years, 3 months ago by Chris Dalton
Modified:
6 years, 3 months ago
CC:
reviews_skia.org, Kimmo Kinnunen, Mark Kilgard
Base URL:
https://skia.googlesource.com/skia.git@upload_glyphmemorypath
Project:
skia
Visibility:
Public.

Description

Uses a single pre-baked set of paths for drawing nvpr text of a given typeface. Loads the paths using the driver's glyph loading routines. Refactors GrPathRange to accept a PathGenerator class that it uses to lazily initialize its paths. The client code is no longer expected to initialize the paths in a GrPathRange; instead it must provide a PathGenerator* instance to createPathRange(). Adds a new createGlyphs() method to GrPathRendering that creates a range of glyph paths, indexed by glyph id. GrPathRendering implements createGlyphs() with a PathGenerator that loads glyph paths using the skia frameworks. GrGLPathRendering uses glMemoryGlyphIndexArrayNV() instead, when possible, to load the glyph paths. Removes all GlyphPathRange logic from GrStencilAndCoverTextContext. It instead uses createGlyphs(). BUG=skia:2939 Committed: https://skia.googlesource.com/skia/+/855d83ff79c6c822b2ad653f2f890178ad0f637b

Patch Set 1 #

Total comments: 8

Patch Set 2 : Respond to commentswq #

Patch Set 3 : Touch up fake bold stroking #

Total comments: 2

Patch Set 4 : Requested comments #

Patch Set 5 : Fix builds #

Unified diffs Side-by-side diffs Delta from patch set Stats (+504 lines, -201 lines) Patch
M expectations/gm/ignored-tests.txt View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M gyp/gpu.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkPaint.h View 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkTypeface.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/GrGpu.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/GrPathRange.h View 1 2 3 4 1 chunk +47 lines, -18 lines 0 comments Download
A src/gpu/GrPathRange.cpp View 1 1 chunk +70 lines, -0 lines 0 comments Download
M src/gpu/GrPathRendering.h View 1 2 chunks +34 lines, -2 lines 0 comments Download
A src/gpu/GrPathRendering.cpp View 1 1 chunk +79 lines, -0 lines 0 comments Download
M src/gpu/GrStencilAndCoverTextContext.h View 1 2 3 3 chunks +23 lines, -7 lines 0 comments Download
M src/gpu/GrStencilAndCoverTextContext.cpp View 1 2 8 chunks +127 lines, -154 lines 0 comments Download
M src/gpu/gl/GrGLPath.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLPathRange.h View 1 2 1 chunk +21 lines, -8 lines 0 comments Download
M src/gpu/gl/GrGLPathRange.cpp View 1 2 chunks +23 lines, -9 lines 0 comments Download
M src/gpu/gl/GrGLPathRendering.h View 1 chunk +5 lines, -1 line 0 comments Download
M src/gpu/gl/GrGLPathRendering.cpp View 1 2 2 chunks +56 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (6 generated)
Chris Dalton
6 years, 3 months ago (2014-09-12 22:18:42 UTC) #2
bsalomon
Some questions, adding Jim who knows the text code better than I do. https://codereview.chromium.org/563283004/diff/1/include/gpu/GrContext.h File ...
6 years, 3 months ago (2014-09-15 14:16:21 UTC) #4
Chris Dalton
https://codereview.chromium.org/563283004/diff/1/include/gpu/GrContext.h File include/gpu/GrContext.h (right): https://codereview.chromium.org/563283004/diff/1/include/gpu/GrContext.h#newcode1071 include/gpu/GrContext.h:1071: * Creates a range of glyph paths, indexed by ...
6 years, 3 months ago (2014-09-15 21:05:25 UTC) #5
bsalomon
lgtm but, Jim, can you review the new code in src/gpu/GrStencilAndCoverTextContext.cpp? https://codereview.chromium.org/563283004/diff/40001/src/gpu/GrStencilAndCoverTextContext.h File src/gpu/GrStencilAndCoverTextContext.h (right): ...
6 years, 3 months ago (2014-09-17 20:57:29 UTC) #6
Chris Dalton
https://codereview.chromium.org/563283004/diff/40001/src/gpu/GrStencilAndCoverTextContext.h File src/gpu/GrStencilAndCoverTextContext.h (right): https://codereview.chromium.org/563283004/diff/40001/src/gpu/GrStencilAndCoverTextContext.h#newcode43 src/gpu/GrStencilAndCoverTextContext.h:43: enum RenderMode { On 2014/09/17 20:57:29, bsalomon wrote: > ...
6 years, 3 months ago (2014-09-17 22:22:57 UTC) #7
jvanverth1
lgtm
6 years, 3 months ago (2014-09-18 19:21:17 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/563283004/60001
6 years, 3 months ago (2014-09-18 19:29:04 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: Build-Mac10.8-Clang-x86_64-Release-Trybot on tryserver.skia (http://108.170.220.76:10117/builders/Build-Mac10.8-Clang-x86_64-Release-Trybot/builds/1658)
6 years, 3 months ago (2014-09-18 19:36:01 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/563283004/80001
6 years, 3 months ago (2014-09-18 19:49:30 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001) as 855d83ff79c6c822b2ad653f2f890178ad0f637b
6 years, 3 months ago (2014-09-18 20:51:57 UTC) #15
reed1
6 years, 3 months ago (2014-09-19 18:06:33 UTC) #17
Message was sent while issue was closed.
Nervous about loading entire fonts into ram (and then driver), esp. when CJK
fonts rarely use more than 10-20% of their available glyphs...

Powered by Google App Engine
This is Rietveld 408576698