зеркало из https://github.com/mozilla/moz-skia.git
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:
Родитель
cefc865090
Коммит
9ed2ecd3ac
|
@ -39,7 +39,6 @@ static bool are_equal(skiatest::Reporter* reporter,
|
||||||
bool cheapEqual = a.cheapEqualTo(b);
|
bool cheapEqual = a.cheapEqualTo(b);
|
||||||
if (equal != cheapEqual) {
|
if (equal != cheapEqual) {
|
||||||
#if SK_SCALAR_IS_FLOAT
|
#if SK_SCALAR_IS_FLOAT
|
||||||
if (equal) {
|
|
||||||
bool foundZeroSignDiff = false;
|
bool foundZeroSignDiff = false;
|
||||||
for (int i = 0; i < 9; ++i) {
|
for (int i = 0; i < 9; ++i) {
|
||||||
float aVal = a.get(i);
|
float aVal = a.get(i);
|
||||||
|
@ -291,7 +290,12 @@ void TestMatrix(skiatest::Reporter* reporter) {
|
||||||
mat.reset();
|
mat.reset();
|
||||||
mat.set(SkMatrix::kMSkewX, SK_ScalarNaN);
|
mat.set(SkMatrix::kMSkewX, SK_ScalarNaN);
|
||||||
mat2.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));
|
REPORTER_ASSERT(reporter, !are_equal(reporter, mat, mat2));
|
||||||
|
#endif
|
||||||
|
|
||||||
test_matrix_max_stretch(reporter);
|
test_matrix_max_stretch(reporter);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче