Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2879)

Issue 6458088: If we lose precision computing sum of the dash intervals, then we can have the (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by reed1
Modified:
12 years, 1 month ago
Reviewers:
caryclark1
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

If we lose precision computing sum of the dash intervals, then we can have the same error when we subtract-in-a-loop with the phase. The result is that we can read past the end of the array. To fix this, we just pin the loop counter, and if we exhaust our intervals, we just treat the phase as 0. Not precisely the exact answer, but we aren't going to draw this dash correctly anyway, since it contains massive interval values that will be imprecise given our current float implementation. Fixes http://code.google.com/p/chromium/issues/detail?id=140642 Committed: https://code.google.com/p/skia/source/detail?r=4959

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -8 lines) Patch
M src/effects/SkDashPathEffect.cpp View 2 chunks +16 lines, -8 lines 0 comments Download
M tests/DrawPathTest.cpp View 2 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 2
reed1
12 years, 1 month ago (2012-08-06 14:20:14 UTC) #1
caryclark1
12 years, 1 month ago (2012-08-06 14:52:42 UTC) #2
lgtm
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b