DescriptionThe SkDescriptor checksum calculation for Sk2DPathEffect currently evaluates all the bytes in the embedded SkMatrix. This includes the type mask, which contains some uninitialized padding. Changing it to use SkMatrix::flatten() and SkMatrix::unflatten() (as SkGroupShape was doing) avoids the uninitialized data errors.
To test, run SampleApp under valgrind and look for the absence of:
==5490== Conditional jump or move depends on uninitialised value(s)
==5490== at 0x402ABC9: bcmp (mc_replace_strmem.c:567)
==5490== by 0x47C55C: SkPaint::descriptorProc(SkMatrix const*, void (*)(SkDescriptor const*, void*), void*, bool) const (SkPaint.cpp:1440)
==5490== by 0x47C73B: SkPaint::detachCache(SkMatrix const*) const (SkPaint.cpp:1450)
==5490== by 0x4662A0: SkAutoGlyphCache::SkAutoGlyphCache(SkPaint const&, SkMatrix const*) (SkGlyphCache.h:287)
==5490== by 0x4628C7: SkDraw::drawText(char const*, unsigned long, float, float, SkPaint const&) const (SkDraw.cpp:1584)
==5490== by 0x45D2C1: SkDevice::drawText(SkDraw const&, void const*, unsigned long, float, float, SkPaint const&) (SkDevice.cpp:197)
==5490== by 0x451CA6: SkCanvas::drawText(void const*, unsigned long, float, float, SkPaint const&) (SkCanvas.cpp:1393)
==5490== by 0x40DB6F: ClockFaceView::onDraw(SkCanvas*) (ClockFaceView.cpp:230)
Patch Set 1 #
Total comments: 1
MessagesTotal messages: 4
|