skia /
skia /
1c577cd3ee331944b9061ee0eec147b211ee563c Always 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
R=reed@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/379813004
1 file changed