ensure that negative zeros are still ignored when computing isIdentity()
crbug.com/162747 git-svn-id: http://skia.googlecode.com/svn/trunk@8761 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
f685a22971
commit
87f99cb543
@ -231,6 +231,17 @@ static void test_gettype(skiatest::Reporter* reporter) {
|
||||
|
||||
matrix.set(3, 2, 1);
|
||||
REPORTER_ASSERT(reporter, matrix.getType() & SkMatrix44::kPerspective_Mask);
|
||||
|
||||
// ensure that negative zero is treated as zero
|
||||
SkMScalar dx = 0;
|
||||
SkMScalar dy = 0;
|
||||
SkMScalar dz = 0;
|
||||
matrix.setTranslate(-dx, -dy, -dz);
|
||||
REPORTER_ASSERT(reporter, matrix.isIdentity());
|
||||
matrix.preTranslate(-dx, -dy, -dz);
|
||||
REPORTER_ASSERT(reporter, matrix.isIdentity());
|
||||
matrix.postTranslate(-dx, -dy, -dz);
|
||||
REPORTER_ASSERT(reporter, matrix.isIdentity());
|
||||
}
|
||||
|
||||
static void test_common_angles(skiatest::Reporter* reporter) {
|
||||
|
Loading…
Reference in New Issue
Block a user