mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1589204 - Fix a bug in Matrix4x4Flagged::operator*. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D49486 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
b7433f9959
commit
a980b29c49
@ -2150,7 +2150,7 @@ class Matrix4x4TypedFlagged
|
||||
matrix._14 = _11 * aMatrix._14 + _12 * aMatrix._24;
|
||||
matrix._24 = _21 * aMatrix._14 + _22 * aMatrix._24;
|
||||
matrix._34 = aMatrix._34;
|
||||
matrix._44 = _41 * aMatrix._14 + _42 * aMatrix._24;
|
||||
matrix._44 = _41 * aMatrix._14 + _42 * aMatrix._24 + aMatrix._44;
|
||||
matrix.Analyze();
|
||||
return matrix;
|
||||
}
|
||||
|
@ -59,3 +59,12 @@ TEST(Matrix, TransformAndClipRect)
|
||||
EXPECT_TRUE(NudgedToInt(m.TransformAndClipBounds(Rect(150, 50, 100, 200), c))
|
||||
.IsEqualInterior(Rect(150, 100, 50, 100)));
|
||||
}
|
||||
|
||||
TEST(Matrix4x4Flagged, Mult)
|
||||
{
|
||||
Matrix4x4Flagged a = Matrix4x4::Translation(Point(42, 42));
|
||||
Matrix4x4 b = Matrix4x4::Scaling(2, 2, 1);
|
||||
Matrix4x4Flagged actual = a * b;
|
||||
Matrix4x4Flagged expected(2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 84, 84, 0, 1);
|
||||
EXPECT_EQ(expected, actual);
|
||||
}
|
Loading…
Reference in New Issue
Block a user