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

Issue 196133014: Implement text rendering with NVPR (Closed)

Created:
6 years, 9 months ago by Kimmo Kinnunen
Modified:
6 years, 6 months ago
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Implement text rendering with NVPR Use path rendering to render the text from outlines if supported by the GPU. Implement this in GrStencilAndCoverTextContext by copying chunks of code from GrBitmapTextContext. The drawing is implemented with "instanced" path drawing functions. Moves the creation of the "main" text context from SkGpuDevice to the GrContext::createTextContext. This is done because the decision of which text renderer is optimal can be made only with the internal implementation-specific information of the context. Remove a windows assertion from SkScalerContext_GDI::getGDIGlyphPath. The GetGlyphOutlineW fails in fontmgr_match for the initial space char in the string " [700] ...". According to MSDN, this is a known problem. Just return that the glyph has no path data in these cases. Committed: https://skia.googlesource.com/skia/+/c6cb56f36c4aad8ed45486a3bb4de614bb822f1b

Patch Set 1 #

Patch Set 2 : use instanced #

Patch Set 3 : rebase #

Patch Set 4 : cleanup #

Patch Set 5 : #

Patch Set 6 : remove path drawing from the patch #

Total comments: 6

Patch Set 7 : address review comments + one changed hunk #

Total comments: 1

Patch Set 8 : rebase #

Patch Set 9 : remove unused member variable causing mac build failure. #

Patch Set 10 : fix a windows assertion #

Patch Set 11 : #

Patch Set 12 : try to align the glyphs similarly to the bitmap text context #

Patch Set 13 : rebase #

Patch Set 14 : rebase and fix postext #

Total comments: 12

Patch Set 15 : review comments #

Patch Set 16 : parts of code moved to other patches #

Patch Set 17 : working version #

Patch Set 18 : oopses #

Patch Set 19 : rebase #

Patch Set 20 : fix VS "performance warning" converting int to bool #

Unified diffs Side-by-side diffs Delta from patch set Stats (+463 lines, -6 lines) Patch
M gyp/gpu.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkPaint.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M include/gpu/GrContext.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +12 lines, -0 lines 0 comments Download
M include/gpu/GrPaint.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/GrContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +15 lines, -0 lines 0 comments Download
A src/gpu/GrStencilAndCoverTextContext.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +54 lines, -0 lines 0 comments Download
A src/gpu/GrStencilAndCoverTextContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +372 lines, -0 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +4 lines, -5 lines 0 comments Download
M src/ports/SkFontHost_win.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 52 (0 generated)
Kimmo Kinnunen
Jim, Brian, Did I understand the intention of the text refactor correctly, eg. it was ...
6 years, 9 months ago (2014-03-20 13:55:54 UTC) #1
jvanverth1
On 2014/03/20 13:55:54, kkinnunen wrote: > Jim, Brian, > Did I understand the intention of ...
6 years, 9 months ago (2014-03-20 15:50:28 UTC) #2
jvanverth1
On 2014/03/20 15:50:28, JimVV wrote: > On 2014/03/20 13:55:54, kkinnunen wrote: > > Jim, Brian, ...
6 years, 9 months ago (2014-03-20 20:30:24 UTC) #3
Kimmo Kinnunen
On 2014/03/20 20:30:24, JimVV wrote: > far as 1), while it's not explicitly in the ...
6 years, 9 months ago (2014-03-21 08:29:35 UTC) #4
jvanverth1
On 2014/03/21 08:29:35, kkinnunen wrote: > On 2014/03/20 20:30:24, JimVV wrote: > > far as ...
6 years, 9 months ago (2014-03-21 12:56:47 UTC) #5
jvanverth1
On 2014/03/21 12:56:47, JimVV wrote: > On 2014/03/21 08:29:35, kkinnunen wrote: > > On 2014/03/20 ...
6 years, 9 months ago (2014-03-21 15:47:59 UTC) #6
Kimmo Kinnunen
On 2014/03/21 15:47:59, JimVV wrote: > After thinking about it with a clear head, I'm ...
6 years, 9 months ago (2014-03-24 09:56:22 UTC) #7
bsalomon
https://codereview.chromium.org/196133014/diff/100001/src/gpu/GrStencilAndCoverTextContext.cpp File src/gpu/GrStencilAndCoverTextContext.cpp (right): https://codereview.chromium.org/196133014/diff/100001/src/gpu/GrStencilAndCoverTextContext.cpp#newcode236 src/gpu/GrStencilAndCoverTextContext.cpp:236: default: tiny style nit: we indent the case/defaults (much ...
6 years, 9 months ago (2014-03-24 13:53:37 UTC) #8
jvanverth1
LGTM, though see comments for some issues that may need to be addressed. https://codereview.chromium.org/196133014/diff/100001/src/gpu/GrStencilAndCoverTextContext.cpp File ...
6 years, 9 months ago (2014-03-24 14:51:05 UTC) #9
Kimmo Kinnunen
There was a hunk missing wrong in the previous patch, would prevent Chromium from compiling.. ...
6 years, 9 months ago (2014-03-25 12:32:48 UTC) #10
jvanverth1
On 2014/03/25 12:32:48, kkinnunen wrote: > There was a hunk missing wrong in the previous ...
6 years, 9 months ago (2014-03-26 12:23:18 UTC) #11
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 9 months ago (2014-03-26 13:47:11 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/196133014/120001
6 years, 9 months ago (2014-03-26 13:47:17 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 13:47:21 UTC) #14
commit-bot: I haz the power
Failed to apply patch for src/gpu/GrContext.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-26 13:47:22 UTC) #15
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 9 months ago (2014-03-26 13:58:36 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/196133014/200001
6 years, 9 months ago (2014-03-26 13:58:37 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 13:58:41 UTC) #18
commit-bot: I haz the power
Presubmit check for 196133014-200001 failed and returned exit status 1. Running presubmit commit checks ...
6 years, 9 months ago (2014-03-26 13:58:41 UTC) #19
Kimmo Kinnunen
Brian, when you have time, can you check out this patch? (Changes the API -> ...
6 years, 9 months ago (2014-03-26 14:00:23 UTC) #20
bsalomon
On 2014/03/26 14:00:23, kkinnunen wrote: > Brian, when you have time, can you check out ...
6 years, 9 months ago (2014-03-26 14:02:52 UTC) #21
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 9 months ago (2014-03-26 14:07:05 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/196133014/200001
6 years, 9 months ago (2014-03-26 14:07:07 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 14:49:20 UTC) #24
commit-bot: I haz the power
Retried try job too often on Build-Mac10.8-Clang-x86-Release-Trybot for step(s) BuildSkiaLib http://skia-tree-status-staging.appspot.com/redirect/compile-buildbots/buildstatus?builder=Build-Mac10.8-Clang-x86-Release-Trybot&number=403
6 years, 9 months ago (2014-03-26 14:49:21 UTC) #25
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 9 months ago (2014-03-27 07:56:30 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/196133014/200001
6 years, 9 months ago (2014-03-27 07:56:40 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-27 08:04:46 UTC) #28
commit-bot: I haz the power
Retried try job too often on Build-Mac10.8-Clang-x86-Release-Trybot for step(s) BuildBench, BuildEverything, BuildTools http://skia-tree-status-staging.appspot.com/redirect/compile-buildbots/buildstatus?builder=Build-Mac10.8-Clang-x86-Release-Trybot&number=411
6 years, 9 months ago (2014-03-27 08:04:47 UTC) #29
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 9 months ago (2014-03-27 11:07:48 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/196133014/390001
6 years, 9 months ago (2014-03-27 11:07:51 UTC) #31
commit-bot: I haz the power
Change committed as 13962
6 years, 9 months ago (2014-03-27 11:26:13 UTC) #32
Kimmo Kinnunen
This probably caused Win8 "test" bot redness: http://108.170.217.252:10117/builders/Test-Win8-ShuttleA-GTX660-x86-Debug/builds/574 mtklein, maybe this should be reverted?
6 years, 9 months ago (2014-03-27 14:12:32 UTC) #33
Kimmo Kinnunen
A revert of this CL has been created in https://codereview.chromium.org/213123014/ by kkinnunen@nvidia.com. The reason for ...
6 years, 9 months ago (2014-03-27 14:16:15 UTC) #34
mtklein
On 2014/03/27 14:16:15, kkinnunen wrote: > A revert of this CL has been created in ...
6 years, 9 months ago (2014-03-27 14:18:37 UTC) #35
Kimmo Kinnunen
Could this get another review? Things that have changed: - Fixed the glyphs to match ...
6 years, 6 months ago (2014-06-09 12:26:46 UTC) #36
jvanverth1
https://codereview.chromium.org/196133014/diff/490001/src/core/SkDrawProcs.h File src/core/SkDrawProcs.h (right): https://codereview.chromium.org/196133014/diff/490001/src/core/SkDrawProcs.h#newcode100 src/core/SkDrawProcs.h:100: if (SkPaint::kLeft_Align == fAlign) { If I understand this ...
6 years, 6 months ago (2014-06-09 13:48:07 UTC) #37
bungeman-skia
https://codereview.chromium.org/196133014/diff/490001/src/gpu/GrStencilAndCoverTextContext.cpp File src/gpu/GrStencilAndCoverTextContext.cpp (right): https://codereview.chromium.org/196133014/diff/490001/src/gpu/GrStencilAndCoverTextContext.cpp#newcode101 src/gpu/GrStencilAndCoverTextContext.cpp:101: SkFixed fx = SkScalarToFixed(x) + halfSampleX; On 2014/06/09 13:48:07, ...
6 years, 6 months ago (2014-06-09 15:00:08 UTC) #38
Kimmo Kinnunen
Perf tries: bench_pictures -r $skps/ --config 8888 --repeat 30 bench --match ext --config 8888 X86 ...
6 years, 6 months ago (2014-06-11 12:33:24 UTC) #39
Kimmo Kinnunen
https://codereview.chromium.org/196133014/diff/490001/src/gpu/GrStencilAndCoverTextContext.cpp File src/gpu/GrStencilAndCoverTextContext.cpp (right): https://codereview.chromium.org/196133014/diff/490001/src/gpu/GrStencilAndCoverTextContext.cpp#newcode212 src/gpu/GrStencilAndCoverTextContext.cpp:212: if (SkPaint::kLeft_Align == fSkPaint.getTextAlign()) { On 2014/06/11 12:33:24, kkinnunen ...
6 years, 6 months ago (2014-06-11 12:39:21 UTC) #40
Kimmo Kinnunen
And note, there's something still inconsistent with the stroked hairline text rendered with nvpr, since ...
6 years, 6 months ago (2014-06-11 12:53:35 UTC) #41
Kimmo Kinnunen
I moved the code not strictly related to nvpr to these patches: https://codereview.chromium.org/335573002/ https://codereview.chromium.org/335603003/ I ...
6 years, 6 months ago (2014-06-12 12:59:16 UTC) #42
Kimmo Kinnunen
Now I think I got all the variants matching.. Does it make sense now?
6 years, 6 months ago (2014-06-13 12:52:40 UTC) #43
jvanverth1
On 2014/06/13 12:52:40, kkinnunen wrote: > Now I think I got all the variants matching.. ...
6 years, 6 months ago (2014-06-19 15:18:12 UTC) #44
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 6 months ago (2014-06-23 05:57:34 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/196133014/590001
6 years, 6 months ago (2014-06-23 05:57:42 UTC) #46
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Win7-VS2010-x86-Debug-Trybot on tryserver.skia ...
6 years, 6 months ago (2014-06-23 06:11:52 UTC) #47
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-23 06:32:01 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win7-VS2010-x86-Debug-Trybot on tryserver.skia (http://108.170.220.76:10117/builders/Build-Win7-VS2010-x86-Debug-Trybot/builds/503)
6 years, 6 months ago (2014-06-23 06:32:04 UTC) #49
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 6 months ago (2014-06-24 06:56:18 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/196133014/610001
6 years, 6 months ago (2014-06-24 06:57:22 UTC) #51
commit-bot: I haz the power
6 years, 6 months ago (2014-06-24 07:12:34 UTC) #52
Message was sent while issue was closed.
Change committed as c6cb56f36c4aad8ed45486a3bb4de614bb822f1b

Powered by Google App Engine
This is Rietveld 408576698