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

Issue 311803002: Randomize seed for SkDiscretePathEffect::filterPath() (Closed)

Created:
6 years, 6 months ago by rs.prinja
Modified:
6 years, 6 months ago
Reviewers:
scroggo, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Randomize seed for SkDiscretePathEffect::filterPath() Fix for https://code.google.com/p/skia/issues/detail?id=2581. Randomizes the seed in SkDiscretePathEffect::filterPath(). Prior to this we were using the path length as a seed. Now, if we have two different paths with identical contents and we apply an SkDiscretePathEffect to each, we obtain two different random paths. Previously, we would obtain two overlapping paths (identical path contents leading to the same seed). BUG=skia: Committed: https://skia.googlesource.com/skia/+/39e58adb99111acbcc0b115e44812a3090bd6a2b

Patch Set 1 #

Patch Set 2 : Remove usage of rand() - do not want to use stdlib #

Patch Set 3 : Remove unnecessary function #

Total comments: 18

Patch Set 4 : Randomization depends on caller supplied seed and path length as discussed in skbug.com/2581 #

Total comments: 6

Patch Set 5 : Add doc + flatten/unflatten lines #

Patch Set 6 : don't multiply seedAssist with seed, xor instead #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -7 lines) Patch
M include/effects/SkDiscretePathEffect.h View 1 2 3 4 5 2 chunks +20 lines, -3 lines 0 comments Download
M src/effects/SkDiscretePathEffect.cpp View 1 2 3 4 5 3 chunks +10 lines, -4 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
rs.prinja
6 years, 6 months ago (2014-06-03 11:16:50 UTC) #1
rs.prinja
The CQ bit was checked by rs.prinja@samsung.com
6 years, 6 months ago (2014-06-03 11:17:01 UTC) #2
rs.prinja
The CQ bit was unchecked by rs.prinja@samsung.com
6 years, 6 months ago (2014-06-03 11:17:02 UTC) #3
scroggo
https://codereview.chromium.org/311803002/diff/40001/include/effects/SkDiscretePathEffect.h File include/effects/SkDiscretePathEffect.h (right): https://codereview.chromium.org/311803002/diff/40001/include/effects/SkDiscretePathEffect.h#newcode12 include/effects/SkDiscretePathEffect.h:12: #include "SkRandom.h" No need for this include here, since ...
6 years, 6 months ago (2014-06-05 16:09:30 UTC) #4
rs.prinja
https://codereview.chromium.org/311803002/diff/40001/include/effects/SkDiscretePathEffect.h File include/effects/SkDiscretePathEffect.h (right): https://codereview.chromium.org/311803002/diff/40001/include/effects/SkDiscretePathEffect.h#newcode12 include/effects/SkDiscretePathEffect.h:12: #include "SkRandom.h" On 2014/06/05 16:09:30, scroggo wrote: > No ...
6 years, 6 months ago (2014-06-07 10:46:05 UTC) #5
scroggo
Changes look good so far. A couple more comments: https://codereview.chromium.org/311803002/diff/60001/include/effects/SkDiscretePathEffect.h File include/effects/SkDiscretePathEffect.h (right): https://codereview.chromium.org/311803002/diff/60001/include/effects/SkDiscretePathEffect.h#newcode25 include/effects/SkDiscretePathEffect.h:25: ...
6 years, 6 months ago (2014-06-09 14:01:04 UTC) #6
rs.prinja
https://codereview.chromium.org/311803002/diff/60001/include/effects/SkDiscretePathEffect.h File include/effects/SkDiscretePathEffect.h (right): https://codereview.chromium.org/311803002/diff/60001/include/effects/SkDiscretePathEffect.h#newcode25 include/effects/SkDiscretePathEffect.h:25: uint32_t seedAssist=1) { On 2014/06/09 14:01:04, scroggo wrote: > ...
6 years, 6 months ago (2014-06-11 04:15:16 UTC) #7
scroggo
On 2014/06/11 04:15:16, rs.prinja wrote: > https://codereview.chromium.org/311803002/diff/60001/include/effects/SkDiscretePathEffect.h > File include/effects/SkDiscretePathEffect.h (right): > > https://codereview.chromium.org/311803002/diff/60001/include/effects/SkDiscretePathEffect.h#newcode25 > ...
6 years, 6 months ago (2014-06-11 14:10:24 UTC) #8
reed1
Its a small matter, but I think 1. the default value should be 0 2. ...
6 years, 6 months ago (2014-06-11 14:46:31 UTC) #9
rs.prinja
On 2014/06/11 14:46:31, reed1 wrote: > Its a small matter, but I think > > ...
6 years, 6 months ago (2014-06-12 01:14:53 UTC) #10
reed1
lgtm
6 years, 6 months ago (2014-06-12 16:13:35 UTC) #11
rs.prinja
The CQ bit was checked by rs.prinja@samsung.com
6 years, 6 months ago (2014-06-13 05:33:20 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/rs.prinja@samsung.com/311803002/100001
6 years, 6 months ago (2014-06-13 05:33:37 UTC) #13
commit-bot: I haz the power
6 years, 6 months ago (2014-06-13 05:55:12 UTC) #14
Message was sent while issue was closed.
Change committed as 39e58adb99111acbcc0b115e44812a3090bd6a2b

Powered by Google App Engine
This is Rietveld 408576698