DescriptionAlways initialize SkDashPathEffect fields.
SkDashPathEffect is flattened into a hash key as part of the old-and-busted
SkPicture paint deduping code. If all its fields aren't intialized, this hash
will be based on uninitialized data. This means the hash won't be
deterministic, and worse, Valgrind and MSAN will make us feel bad.
An alternative to this is to have SkDashPath::CalcDashParameters always
guarantee it writes something to all its output parameters, even when the dash
intervals make no sense. I like it being dumb and its users defensive, but
could go either way.
BUG=391001
Committed: https://skia.googlesource.com/skia/+/1c577cd3ee331944b9061ee0eec147b211ee563c
Patch Set 1 #
Messages
Total messages: 5 (0 generated)
|