| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 "SkColor.h" | 8 #include "SkColor.h" |
| 9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
| 10 #include "SkFixed.h" | 10 #include "SkFixed.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 #else | 135 #else |
| 136 // ARGB -> RGBA | 136 // ARGB -> RGBA |
| 137 Sk4f dst = SkNx_shuffle<1,2,3,0>(src); | 137 Sk4f dst = SkNx_shuffle<1,2,3,0>(src); |
| 138 #endif | 138 #endif |
| 139 | 139 |
| 140 SkPM4f pm4; | 140 SkPM4f pm4; |
| 141 dst.store(pm4.fVec); | 141 dst.store(pm4.fVec); |
| 142 return pm4; | 142 return pm4; |
| 143 } | 143 } |
| 144 | 144 |
| 145 bool SkPM4f::isUnit() const { | 145 #ifdef SK_DEBUG |
| 146 void SkPM4f::assertIsUnit() const { |
| 146 auto c4 = Sk4f::Load(fVec); | 147 auto c4 = Sk4f::Load(fVec); |
| 147 return (c4 >= Sk4f(0)).allTrue() && (c4 <= Sk4f(1)).allTrue(); | 148 SkASSERT((c4 >= Sk4f(0)).allTrue() && (c4 <= Sk4f(1)).allTrue()); |
| 148 } | 149 } |
| 150 #endif |
| OLD | NEW |