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

Issue 284763010: fix the rendering error for drawPosText_asPaths (Closed)

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

Description

fix the rendering error for drawPosText_asPaths A big thick-stroke text(>256*256, strokeWidth>0) is drawn on the basis of canonical text in drawPosText_asPaths. This behavior is the same with drawText_asPaths. So the textSize as well as strokeWidth in drawPosText_asPaths should be set as those in drawText_asPaths. After SkGlyphCache has been detached and constructed, the SkPaint should be set to kFill_Style to draw the correct path for the text, as that in drawText_asPaths. In addtion, PathEffect installed in SkPaint should be considered, who affects the path generation for text. Current implementation of SkDraw::drawPosText_asPaths didn't consider this. As a result, big text and hairline stroked text with path effect is not correctly rendered by SkCanvas::drawPosText. This patch also fixed this issue. BUG=skia:2547, skia:2555 BUG=280221, 311731 @reed has landed a patch to fix the issues above: https://codereview.chromium.org/288983004/. So close this one.

Patch Set 1 : #

Patch Set 2 : also fix the rendering error for text with path effects #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -2 lines) Patch
M src/core/SkDraw.cpp View 1 1 chunk +12 lines, -0 lines 0 comments Download
M src/core/SkPaint.cpp View 1 1 chunk +19 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
yunchao
6 years, 7 months ago (2014-05-14 08:31:09 UTC) #1
yunchao
On 2014/05/14 08:31:09, Richard Ho wrote: I will update expectations/gm/ignore-tests.txt if this CL is OK.
6 years, 7 months ago (2014-05-14 15:48:50 UTC) #2
zino
@Richard, I'm not reviewer but it seems that this is duplicated with my CL. (https://codereview.chromium.org/273283003/)
6 years, 7 months ago (2014-05-14 15:58:30 UTC) #3
yunchao
On 2014/05/14 15:58:30, zino wrote: @zino, I am aware of this bug from GM case ...
6 years, 7 months ago (2014-05-14 16:23:57 UTC) #4
reed1
... am reviewing
6 years, 7 months ago (2014-05-14 21:43:27 UTC) #5
yunchao
On 2014/05/14 21:43:27, reed1 wrote: > ... am reviewing Hi, Mike and all, please take ...
6 years, 7 months ago (2014-05-15 09:24:16 UTC) #6
yunchao
On 2014/05/15 09:24:16, Richard Ho wrote: > On 2014/05/14 21:43:27, reed1 wrote: > > ...
6 years, 7 months ago (2014-05-15 09:26:04 UTC) #7
yunchao
On 2014/05/15 09:26:04, Richard Ho wrote: > On 2014/05/15 09:24:16, Richard Ho wrote: > > ...
6 years, 7 months ago (2014-05-22 14:35:24 UTC) #8
bungeman-skia
See also https://codereview.chromium.org/20693003/ .
6 years, 7 months ago (2014-05-22 15:03:52 UTC) #9
reed1
Hi. Very sorry for the long delay in reviewing. We have had many fires to ...
6 years, 7 months ago (2014-05-22 15:28:55 UTC) #10
reed1
On 2014/05/22 15:28:55, reed1 wrote: > Hi. > > Very sorry for the long delay ...
6 years, 7 months ago (2014-05-22 15:29:30 UTC) #11
yunchao
On 2014/05/22 15:28:55, reed1 wrote: > Hi. > > Very sorry for the long delay ...
6 years, 7 months ago (2014-05-22 16:00:21 UTC) #12
yunchao
6 years, 7 months ago (2014-05-22 16:04:03 UTC) #13
On 2014/05/22 16:00:21, Richard Ho wrote:
> On 2014/05/22 15:28:55, reed1 wrote:
> > Hi.
> > 
> > Very sorry for the long delay in reviewing. We have had many fires to fight
> with
> > the recent Chrome milestone. I am now actively re-leaning some of the bugs,
> and
> > experimenting with your CL and others.
> 
> Yeah, I know that. Heather told me that you are overloaded because of a very
> important Chrome milestone(but I don't know the exact day, :) ). I hope you
can
> take a look when you have time.

In fact, this CL's logic is basically the same as that in
SkTextToPathIter::SkTextToPathIter in SkPaint.cpp, who is called by
SkDraw::drawText_asPaths. Unfortunately,  currently Skdraw::drawPosText_asPaths
doesn't follow the logic in SkDraw::drawText_asPaths, and show rendering errors.

Powered by Google App Engine
This is Rietveld 408576698