Add mozilla::gfx::Matrix::IsIdentity()

RESOLVED FIXED in mozilla12

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Joe Drew (not getting mail), Assigned: Joe Drew (not getting mail))

Tracking

Trunk
mozilla12
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Created attachment 576831 [details] [diff] [review]
add IsIdentity()

We should be able to tell if a matrix is the identity matrix.
Attachment #576831 - Flags: review?(bas.schouten)
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 ==.
(Assignee)

Comment 2

6 years ago
Created attachment 585824 [details] [diff] [review]
add IsIdentity() v2
Assignee: nobody → joe
Attachment #576831 - Attachment is obsolete: true
Attachment #576831 - Flags: review?(bas.schouten)
Attachment #585824 - Flags: review?(bas.schouten)
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.
Attachment #585824 - Flags: review?(bas.schouten) → review+
(Assignee)

Comment 4

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ec3401e5a7b8
https://hg.mozilla.org/mozilla-central/rev/ec3401e5a7b8
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.