Another fix for fixed point (nan == nan in fixed pt)

git-svn-id: http://skia.googlecode.com/svn/trunk@3491 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2012-03-26 15:57:37 +00:00
Родитель cefc865090
Коммит 9ed2ecd3ac
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -39,7 +39,6 @@ static bool are_equal(skiatest::Reporter* reporter,
bool cheapEqual = a.cheapEqualTo(b);
if (equal != cheapEqual) {
#if SK_SCALAR_IS_FLOAT
if (equal) {
bool foundZeroSignDiff = false;
for (int i = 0; i < 9; ++i) {
float aVal = a.get(i);
@ -291,7 +290,12 @@ void TestMatrix(skiatest::Reporter* reporter) {
mat.reset();
mat.set(SkMatrix::kMSkewX, SK_ScalarNaN);
mat2.set(SkMatrix::kMSkewX, SK_ScalarNaN);
// fixed pt doesn't have the property that NaN does not equal itself.
#ifdef SK_SCALAR_IS_FIXED
REPORTER_ASSERT(reporter, are_equal(reporter, mat, mat2));
#else
REPORTER_ASSERT(reporter, !are_equal(reporter, mat, mat2));
#endif
test_matrix_max_stretch(reporter);
}