Chromium Code Reviews| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 Sk4f dst = SkNx_shuffle<3,2,1,0>(src); | 134 Sk4f dst = SkNx_shuffle<3,2,1,0>(src); |
| 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 | |
| 145 bool SkPM4f::isUnit() const { | |
|
mtklein
2016/01/29 15:23:00
If this is only used inside asserts, we may want t
reed1
2016/01/29 22:35:27
Gotcha. No idea if we'll need it for real, so for
| |
| 146 auto c4 = Sk4f::Load(fVec); | |
| 147 return (c4 >= Sk4f(0)).allTrue() && (c4 <= Sk4f(1)).allTrue(); | |
| 148 } | |
| OLD | NEW |