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

Issue 183683010: fix the error that path is inversed for stroke and strokeAndFill styles (Closed)

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

Description

fix the error that path is inversed for stroke and strokeAndFill styles. However, because hairline stroke + fill = fill (see src/core/SkStrokeRec.cpp), strokeAndFill will be thought as fill style when paint.getStrokeWidth() <= 0, this edge case can be inverse-filled. BUG=skia:2222 Committed: http://code.google.com/p/skia/source/detail?r=14561

Patch Set 1 #

Patch Set 2 : this fix changed some gm cases, add them to ignore-tests.txt #

Patch Set 3 : fix the error when path inversed for StrokeAndFill style #

Total comments: 3

Patch Set 4 : update code according to Brian's suggestion #

Patch Set 5 : update ignore-tests.txt #

Patch Set 6 : update unittest EmptyPath accordingly #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -10 lines) Patch
M expectations/gm/ignored-tests.txt View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkDraw.cpp View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M src/core/SkStroke.cpp View 1 2 3 2 chunks +6 lines, -4 lines 0 comments Download
M src/gpu/GrStencilAndCoverPathRenderer.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/EmptyPathTest.cpp View 1 2 3 4 5 4 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
yunchao
PTAL, thanks.
6 years, 9 months ago (2014-03-03 09:32:25 UTC) #1
reed1
Is it sufficient to just change our internal stroker to never set "inverse" on the ...
6 years, 9 months ago (2014-03-03 15:24:32 UTC) #2
reed1
I wonder if we can write unittests to assert some of the correct behavior (once ...
6 years, 9 months ago (2014-03-03 15:26:16 UTC) #3
yunchao
On 2014/03/03 15:24:32, reed1 wrote: > Is it sufficient to just change our internal stroker ...
6 years, 9 months ago (2014-03-04 02:51:40 UTC) #4
yunchao
On 2014/03/03 15:26:16, reed1 wrote: > I wonder if we can write unittests to assert ...
6 years, 9 months ago (2014-03-04 03:02:18 UTC) #5
yunchao
ping... please see the comments at skbug:2222
6 years, 8 months ago (2014-04-23 09:02:18 UTC) #6
bsalomon
https://codereview.chromium.org/183683010/diff/40001/src/gpu/GrContext.cpp File src/gpu/GrContext.cpp (right): https://codereview.chromium.org/183683010/diff/40001/src/gpu/GrContext.cpp#newcode1210 src/gpu/GrContext.cpp:1210: // make sure the path will not be inverse-stroked ...
6 years, 8 months ago (2014-04-23 15:06:12 UTC) #7
yunchao
https://codereview.chromium.org/183683010/diff/40001/src/gpu/GrContext.cpp File src/gpu/GrContext.cpp (right): https://codereview.chromium.org/183683010/diff/40001/src/gpu/GrContext.cpp#newcode1210 src/gpu/GrContext.cpp:1210: // make sure the path will not be inverse-stroked ...
6 years, 8 months ago (2014-04-24 16:12:42 UTC) #8
bsalomon
https://codereview.chromium.org/183683010/diff/40001/src/gpu/GrContext.cpp File src/gpu/GrContext.cpp (right): https://codereview.chromium.org/183683010/diff/40001/src/gpu/GrContext.cpp#newcode1210 src/gpu/GrContext.cpp:1210: // make sure the path will not be inverse-stroked ...
6 years, 8 months ago (2014-04-24 17:33:21 UTC) #9
yunchao
On 2014/04/24 17:33:21, bsalomon wrote: > https://codereview.chromium.org/183683010/diff/40001/src/gpu/GrContext.cpp > File src/gpu/GrContext.cpp (right): > > https://codereview.chromium.org/183683010/diff/40001/src/gpu/GrContext.cpp#newcode1210 > ...
6 years, 8 months ago (2014-04-25 09:05:16 UTC) #10
bsalomon
This lgtm but I'd like reed@ to have a look as well.
6 years, 8 months ago (2014-04-25 13:30:48 UTC) #11
yunchao
On 2014/04/25 13:30:48, bsalomon wrote: > This lgtm but I'd like reed@ to have a ...
6 years, 8 months ago (2014-04-25 14:26:34 UTC) #12
yunchao
Ping... Mike, could you make a double check about this CL?
6 years, 7 months ago (2014-04-29 16:00:38 UTC) #13
yunchao
I will land this patch. Please revert it if you think this CL is not ...
6 years, 7 months ago (2014-05-01 15:16:38 UTC) #14
yunchao
The CQ bit was checked by yunchao.he@intel.com
6 years, 7 months ago (2014-05-04 03:37:32 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/yunchao.he@intel.com/183683010/90001
6 years, 7 months ago (2014-05-04 03:37:36 UTC) #16
commit-bot: I haz the power
Change committed as 14561
6 years, 7 months ago (2014-05-04 03:43:23 UTC) #17
yunchao
A revert of this CL has been created in https://codereview.chromium.org/267923008/ by yunchao.he@intel.com. The reason for ...
6 years, 7 months ago (2014-05-04 06:11:17 UTC) #18
yunchao
On 2014/05/04 06:11:17, Richard Ho wrote: > A revert of this CL has been created ...
6 years, 7 months ago (2014-05-04 06:16:17 UTC) #19
reed2
A revert of this CL has been created in https://codereview.chromium.org/269903002/ by reed@chromium.org. The reason for ...
6 years, 7 months ago (2014-05-04 18:05:31 UTC) #20
yunchao
On 2014/05/04 18:05:31, reed2 wrote: > A revert of this CL has been created in ...
6 years, 7 months ago (2014-05-05 01:36:05 UTC) #21
bsalomon
On 2014/05/05 01:36:05, Richard Ho wrote: > On 2014/05/04 18:05:31, reed2 wrote: > > A ...
6 years, 7 months ago (2014-05-13 08:00:00 UTC) #22
yunchao
On 2014/05/13 08:00:00, bsalomon wrote: > On 2014/05/05 01:36:05, Richard Ho wrote: > > On ...
6 years, 7 months ago (2014-05-13 08:50:40 UTC) #23
yunchao
6 years, 7 months ago (2014-05-14 15:52:11 UTC) #24
On 2014/05/13 08:50:40, Richard Ho wrote:
> On 2014/05/13 08:00:00, bsalomon wrote:
> > On 2014/05/05 01:36:05, Richard Ho wrote:
> > > On 2014/05/04 18:05:31, reed2 wrote:
> > > > A revert of this CL has been created in
> > > > https://codereview.chromium.org/269903002/ by mailto:reed@chromium.org.
> > > > 
> > > > The reason for reverting is: broke unittests.
> > > 
> > > update the unittest accordingly, PTAL. Thanks.
> > 
> > If we're going to remove kStrokeAndFill then I'd prefer to hold off on this
> > until after that is completed.
> 
> OK.

pending on the removal of kStrokeAndFill, also see
https://codereview.chromium.org/262113003/

Powered by Google App Engine
This is Rietveld 408576698