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

Issue 1731053: Cr46591 Proposed Patch

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 3 months ago by wjmaclean
Modified:
14 years, 3 months ago
Reviewers:
reed, brettw, Stephen White
CC:
rjkroege
Visibility:
Public.

Description

BUG=46591 This CL modifies skia/src/SkMatrix.cpp to update a constant used to determine if it is safe to invert a matrix or not. The existing value (SkScalarNearlyZero^2) was failing with Coats_of_arms_of_Argentina.svg due to an unusually large range of coordinate values and scale factors. The previous comment in the code justifies ^2 since the determinant is "on the order of the square of the matrix members", but this should really be ^3 for a 3x3 determinant. If a comparably inexpensive estimate of the matrix condition number can be found that would be even more appropriate, but no such thing exists to my knowledge.

Patch Set 1 #

Patch Set 2 : Cr46591 Proposed Patch #

Total comments: 1

Patch Set 3 : Cr46591 Proposed Patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -3 lines) Patch
M src/core/SkMatrix.cpp View 1 2 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 12
wjmaclean
A proposed solution to Cr 46591.
14 years, 3 months ago (2010-07-19 16:27:49 UTC) #1
brettw
Don't forget to write a CL description and use BUG= in the description (it will ...
14 years, 3 months ago (2010-07-19 17:27:26 UTC) #2
wjmaclean
Brett - This is my first Skia submission. Is there some file I'm supposed to ...
14 years, 3 months ago (2010-07-19 17:33:27 UTC) #3
brettw
I see, then it looks like you should update the comment in the code you ...
14 years, 3 months ago (2010-07-19 17:39:58 UTC) #4
wjmaclean
Revised issue to improve CL description and revise comments in SkMatrix.cpp.
14 years, 3 months ago (2010-07-19 17:53:30 UTC) #5
wjmaclean
Sorry about that ... fixed :-) J On Mon, Jul 19, 2010 at 1:39 PM, ...
14 years, 3 months ago (2010-07-19 17:54:23 UTC) #6
brettw
LGTM, be sure to get Stephen's opinion before checking in.
14 years, 3 months ago (2010-07-19 23:51:43 UTC) #7
Stephen White
LGTM (I'm trusting you on the math..) http://codereview.appspot.com/1731053/diff/8001/9001 File src/core/SkMatrix.cpp (right): http://codereview.appspot.com/1731053/diff/8001/9001#newcode657 src/core/SkMatrix.cpp:657: // compare ...
14 years, 3 months ago (2010-07-20 14:47:02 UTC) #8
wjmaclean
Thanks for noticing that other 'square' - I've uploaded a new patch that fixes that. ...
14 years, 3 months ago (2010-07-20 15:00:24 UTC) #9
Stephen White
On Tue, Jul 20, 2010 at 11:00 AM, <wjmaclean@chromium.org> wrote: > Thanks for noticing that ...
14 years, 3 months ago (2010-07-20 15:20:36 UTC) #10
reed
^2 is sort of correct for a non-perspective matix (which is all we should see ...
14 years, 3 months ago (2010-07-22 16:55:48 UTC) #11
wjmaclean
14 years, 3 months ago (2010-07-22 17:03:31 UTC) #12
Agreed ... the best is really to do a condition number, but that is (in
general) a bit too expensive (unless I'm mistaken), so I guess this is still
hackery but with a smaller threshold value.

Cheers,

James

On Thu, Jul 22, 2010 at 12:55 PM, <reed@android.com> wrote:

> ^2 is sort of correct for a non-perspective matix (which is all we
> should see in SVG), but it was all a hack/heuristic anyway to know how
> small we can accept before we divide.
>
> On 2010/07/20 15:20:36, Stephen White wrote:
>
>> On Tue, Jul 20, 2010 at 11:00 AM, <mailto:wjmaclean@chromium.org>
>>
> wrote:
>
>  > Thanks for noticing that other 'square' - I've uploaded a new patch
>>
> that
>
>> > fixes that.
>> >
>> > Stephen, do you have committer status, as I don't?
>> >
>>
>
>  Landed as r589.
>>
>
>  Stephen
>>
>
>
>  > Cheers,
>> >
>> > James
>> >
>> >
>> > http://codereview.appspot.com/1731053/show
>> >
>>
>
>
>
>
> http://codereview.appspot.com/1731053/show
>
Sign in to reply to this message.

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