| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "Test.h" | 8 #include "Test.h" |
| 9 #include "SkAutoPixmapStorage.h" |
| 9 #include "SkColor.h" | 10 #include "SkColor.h" |
| 10 #include "SkHalf.h" | 11 #include "SkHalf.h" |
| 11 #include "SkOpts.h" | 12 #include "SkOpts.h" |
| 12 #include "SkPixmap.h" | 13 #include "SkPixmap.h" |
| 13 #include "SkPM4f.h" | 14 #include "SkPM4f.h" |
| 14 #include "SkRandom.h" | 15 #include "SkRandom.h" |
| 15 | 16 |
| 16 static bool eq_within_half_float(float a, float b) { | 17 static bool eq_within_half_float(float a, float b) { |
| 17 const float kTolerance = 1.0f / (1 << (8 + 10)); | 18 const float kTolerance = 1.0f / (1 << (8 + 10)); |
| 18 | 19 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 bool ok = (h1 == h2 || h1 == h2-1); | 107 bool ok = (h1 == h2 || h1 == h2-1); |
| 107 REPORTER_ASSERT(r, ok); | 108 REPORTER_ASSERT(r, ok); |
| 108 if (!ok) { | 109 if (!ok) { |
| 109 SkDebugf("%08x (%d) -> %04x (%d), want %04x (%d)\n", | 110 SkDebugf("%08x (%d) -> %04x (%d), want %04x (%d)\n", |
| 110 bits, bits>>23, h1, h1>>10, h2, h2>>10); | 111 bits, bits>>23, h1, h1>>10, h2, h2>>10); |
| 111 break; | 112 break; |
| 112 } | 113 } |
| 113 } | 114 } |
| 114 } | 115 } |
| 115 } | 116 } |
| OLD | NEW |