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

Issue 335603003: Fix SkPaint::measureText for stroked hairline text (Closed)

Created:
6 years, 6 months ago by Kimmo Kinnunen
Modified:
6 years, 6 months ago
Reviewers:
jvanverth1, rmistry, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@01-draw-fonts-nvpr-extract-state-procs
Visibility:
Public.

Description

Fix SkPaint::measureText for stroked hairline text SkPaint::measureText and text drawing used different criteria for determining whether text should be drawn as paths or not. Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph positioning in the rendering. Mainly added in order to define what is the expected text rendering when hairline stroke is used with various transform options. The testcase also tries to note or highlight the fact that SkPaint::measureText is not expected to produce intuitively matching results when compared to a rendering, if the rendering is done so that the device ends up having a device transform. This fixes the glyph_pos_h_s (hairline, stroked) test-case. Ignore shadertext2_pdf-poppler.png gm on Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails. Committed: https://skia.googlesource.com/skia/+/196af738027c5e18c3eb792dbcaf90ef27821793

Patch Set 1 #

Patch Set 2 : whitespace #

Patch Set 3 : rebase test #

Patch Set 4 : fix win build: replace doubles with float SkScalar autoconversion #

Patch Set 5 : ignore shadertext2_pdf-poppler.png #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -14 lines) Patch
M expectations/gm/Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug/expected-results.json View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
A gm/glyph_pos.cpp View 1 2 3 1 chunk +204 lines, -0 lines 0 comments Download
M gyp/gmslides.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkPaint.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M src/core/SkPaint.cpp View 1 2 3 chunks +2 lines, -10 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
Kimmo Kinnunen
6 years, 6 months ago (2014-06-12 12:44:26 UTC) #1
jvanverth1
This looks reasonable, but adding reed@ to be sure (and to get permission to change ...
6 years, 6 months ago (2014-06-12 14:36:23 UTC) #2
reed1
api lgtm
6 years, 6 months ago (2014-06-12 15:12:04 UTC) #3
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 6 months ago (2014-06-16 05:18:26 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/335603003/40001
6 years, 6 months ago (2014-06-16 05:18:45 UTC) #5
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-16 05:33:05 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-16 05:39:34 UTC) #7
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/402)
6 years, 6 months ago (2014-06-16 05:39:35 UTC) #8
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 6 months ago (2014-06-16 05:58:41 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/335603003/60001
6 years, 6 months ago (2014-06-16 05:59:45 UTC) #10
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug-Trybot on tryserver.skia ...
6 years, 6 months ago (2014-06-16 06:13:45 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-16 06:28:15 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug-Trybot on tryserver.skia (http://108.170.220.120:10117/builders/Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug-Trybot/builds/324)
6 years, 6 months ago (2014-06-16 06:28:15 UTC) #13
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 6 months ago (2014-06-17 07:08:53 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/335603003/60001
6 years, 6 months ago (2014-06-17 07:09:13 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-17 07:38:13 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug-Trybot on tryserver.skia (http://108.170.220.120:10117/builders/Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug-Trybot/builds/341)
6 years, 6 months ago (2014-06-17 07:38:14 UTC) #17
Kimmo Kinnunen
Jim, Is it ok to add shadertext2_pdf-poppler.png to ignore on ubuntu 13.10 debug build? I ...
6 years, 6 months ago (2014-06-19 07:36:19 UTC) #18
Jvsquare
On 2014/06/19 07:36:19, kkinnunen wrote: > Jim, > Is it ok to add shadertext2_pdf-poppler.png to ...
6 years, 6 months ago (2014-06-19 13:39:27 UTC) #19
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 6 months ago (2014-06-23 05:02:56 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/335603003/80001
6 years, 6 months ago (2014-06-23 05:03:39 UTC) #21
commit-bot: I haz the power
Change committed as 196af738027c5e18c3eb792dbcaf90ef27821793
6 years, 6 months ago (2014-06-23 05:18:19 UTC) #22
rmistry
This CL appears to have caused many shader text GM failures across multiple builders. Is ...
6 years, 6 months ago (2014-06-23 11:53:02 UTC) #23
rmistry
A revert of this CL has been created in https://codereview.chromium.org/354433002/ by rmistry@google.com. The reason for ...
6 years, 6 months ago (2014-06-23 12:38:55 UTC) #24
rmistry
On 2014/06/23 12:38:55, rmistry wrote: > A revert of this CL has been created in ...
6 years, 6 months ago (2014-06-23 12:40:53 UTC) #25
Kimmo Kinnunen
On 2014/06/23 12:40:53, rmistry wrote: > On 2014/06/23 12:38:55, rmistry wrote: > > A revert ...
6 years, 6 months ago (2014-06-23 13:07:54 UTC) #26
rmistry
On 2014/06/23 13:07:54, kkinnunen wrote: > On 2014/06/23 12:40:53, rmistry wrote: > > On 2014/06/23 ...
6 years, 6 months ago (2014-06-23 13:09:31 UTC) #27
rmistry
6 years, 6 months ago (2014-06-23 13:57:51 UTC) #28
Message was sent while issue was closed.
On 2014/06/23 13:09:31, rmistry wrote:
> On 2014/06/23 13:07:54, kkinnunen wrote:
> > On 2014/06/23 12:40:53, rmistry wrote:
> > > On 2014/06/23 12:38:55, rmistry wrote:
> > > > A revert of this CL has been created in
> > > > https://codereview.chromium.org/354433002/ by mailto:rmistry@google.com.
> > > > 
> > > > The reason for reverting is: Caused many shadertext GM failures.
> > > 
> > > These are the builders that failed the CompareGM step due to this CL
(which
> > has
> > > been reverted):
> > > 
> > 
> > Right.. A rebaseline was up for review in this issue:
> > https://codereview.chromium.org/347393002/
> > 
> > I can not commit rebaselines directly..
> 
> Let me know when the rebaseline CL is ready to be submitted, I will then
revert
> this revert.

Looks like the rebaseline CL is ready to be submitted. I will revert my revert.

Powered by Google App Engine
This is Rietveld 408576698