Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Issue 22904003: Make SkMatrix44::invert() check for finite 1/det instead of magic value (Closed)

Created:
7 years, 4 months ago by jvanverth1
Modified:
7 years, 4 months ago
Reviewers:
reed1, shawnsingh
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Make SkMatrix44::invert() check for finite 1/det instead of magic value Previously we were checking to see if the magnitude of determinant of the matrix to be inverted was less than 1.0e-8, which is a magic number possibly plucked from Graphics Gems. After some discussion, it's been determined (ha) that we can simply check to see if 1/det is finite and if so proceed. BUG=222926 Committed: http://code.google.com/p/skia/source/detail?r=10758 Committed: http://code.google.com/p/skia/source/detail?r=10818

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fix isfinite() check. #

Patch Set 3 : Add suggested comment #

Patch Set 4 : Shrink range of one matrix test to pass is_identity() check on i386-linux #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -3 lines) Patch
M src/utils/SkMatrix44.cpp View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M tests/Matrix44Test.cpp View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
jvanverth1
Shawn, just to move things along I've created a new change with the 1/det check. ...
7 years, 4 months ago (2013-08-15 19:26:17 UTC) #1
reed1
assuming there are no machines that halt on divide-by-zero, lgtm
7 years, 4 months ago (2013-08-15 19:39:28 UTC) #2
reed1
suggested comment for the code https://codereview.chromium.org/22904003/diff/1/src/utils/SkMatrix44.cpp File src/utils/SkMatrix44.cpp (right): https://codereview.chromium.org/22904003/diff/1/src/utils/SkMatrix44.cpp#newcode532 src/utils/SkMatrix44.cpp:532: double invdet = 1.0 ...
7 years, 4 months ago (2013-08-15 19:40:46 UTC) #3
shawnsingh
Nice - this is essentially what I have locally too, but you uploaded first =)
7 years, 4 months ago (2013-08-15 19:40:57 UTC) #4
shawnsingh
On 2013/08/15 19:40:57, shawnsingh wrote: > Nice - this is essentially what I have locally ...
7 years, 4 months ago (2013-08-15 19:42:42 UTC) #5
reed1
On 2013/08/15 19:42:42, shawnsingh wrote: > On 2013/08/15 19:40:57, shawnsingh wrote: > > Nice - ...
7 years, 4 months ago (2013-08-15 19:45:20 UTC) #6
jvanverth1
On 2013/08/15 19:45:20, reed1 wrote: > On 2013/08/15 19:42:42, shawnsingh wrote: > > On 2013/08/15 ...
7 years, 4 months ago (2013-08-15 19:51:51 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/jvanverth@google.com/22904003/15001
7 years, 4 months ago (2013-08-15 21:24:52 UTC) #8
commit-bot: I haz the power
Change committed as 10758
7 years, 4 months ago (2013-08-15 21:56:41 UTC) #9
scroggo
On 2013/08/15 21:56:41, I haz the power (commit-bot) wrote: > Change committed as 10758 Reverted ...
7 years, 4 months ago (2013-08-15 23:55:14 UTC) #10
jvanverth1
Tweaked one of the matrix tests for i386-Linux. This should allow this change to go ...
7 years, 4 months ago (2013-08-20 13:50:52 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/jvanverth@google.com/22904003/22001
7 years, 4 months ago (2013-08-20 14:57:49 UTC) #12
commit-bot: I haz the power
7 years, 4 months ago (2013-08-20 15:25:14 UTC) #13
Message was sent while issue was closed.
Change committed as 10818

Powered by Google App Engine
This is Rietveld 408576698