Closed Bug 740963 Opened 14 years ago Closed 14 years ago

[Skia] Handle non-multiple-of-two dash lengths in HelpersSkia::StrokeOptionsToPaint()

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: gw280, Assigned: gw280)

Details

Attachments

(1 file, 1 obsolete file)

Skia requires that dash arrays are a multiple of two in size for SkDashPathEffect.
Comment on attachment 611032 [details] [diff] [review] Bug 740963 - [Skia] Handle non-multiple-of-two dash lengths in HelpersSkia::StrokeOptionsToPaint() >+ if (aOptions.mDashLength % 2 == 0) { >+ dashCount = aOptions.mDashLength; >+ } else { >+ dashCount = aOptions.mDashLength * 2; > } >- >- SkDashPathEffect* dash = new SkDashPathEffect(&pattern.front(), >- aOptions.mDashLength, >+ >+ SkScalar pattern[dashCount]; Please don't allocate this on the stack.
Attachment #611032 - Flags: review?(jmuizelaar) → review-
Attachment #611040 - Flags: review?(jmuizelaar) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: