Last Comment Bug 705200 - Add mozilla::gfx::Matrix::IsIdentity()
: Add mozilla::gfx::Matrix::IsIdentity()
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla12
Assigned To: Joe Drew (not getting mail)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-24 14:59 PST by Joe Drew (not getting mail)
Modified: 2012-01-05 08:41 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
add IsIdentity() (850 bytes, patch)
2011-11-24 14:59 PST, Joe Drew (not getting mail)
no flags Details | Diff | Review
add IsIdentity() v2 (856 bytes, patch)
2012-01-04 11:33 PST, Joe Drew (not getting mail)
bas: review+
Details | Diff | Review

Description Joe Drew (not getting mail) 2011-11-24 14:59:27 PST
Created attachment 576831 [details] [diff] [review]
add IsIdentity()

We should be able to tell if a matrix is the identity matrix.
Comment 1 Bas Schouten (:bas.schouten) 2011-12-08 12:42:07 PST
Comment on attachment 576831 [details] [diff] [review]
add IsIdentity()

Review of attachment 576831 [details] [diff] [review]:
-----------------------------------------------------------------

This is not an uncommon thing to use and will be pretty slow now. I suggest since 1.0 and 0.0 are both well representable in float, we check ==.
Comment 2 Joe Drew (not getting mail) 2012-01-04 11:33:56 PST
Created attachment 585824 [details] [diff] [review]
add IsIdentity() v2
Comment 3 Bas Schouten (:bas.schouten) 2012-01-04 12:48:46 PST
Comment on attachment 585824 [details] [diff] [review]
add IsIdentity() v2

Review of attachment 585824 [details] [diff] [review]:
-----------------------------------------------------------------

I wonder if we want to fuzzyequal or not. I'm thinking it's okay not to, as what someone's really asking is 'did anything happen to this matrix?' most of the time, which is accurately answered here. So this seems fine.
Comment 4 Joe Drew (not getting mail) 2012-01-04 15:04:08 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/ec3401e5a7b8
Comment 5 Marco Bonardo [::mak] 2012-01-05 08:41:52 PST
https://hg.mozilla.org/mozilla-central/rev/ec3401e5a7b8

Note You need to log in before you can comment on or make changes to this bug.