OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkClampRange.h" | 8 #include "SkClampRange.h" |
9 #include "SkMath.h" | 9 #include "SkMathPriv.h" |
10 | 10 |
11 static int SkCLZ64(uint64_t value) { | 11 static int SkCLZ64(uint64_t value) { |
12 int count = 0; | 12 int count = 0; |
13 if (value >> 32) { | 13 if (value >> 32) { |
14 value >>= 32; | 14 value >>= 32; |
15 } else { | 15 } else { |
16 count += 32; | 16 count += 32; |
17 } | 17 } |
18 return count + SkCLZ(SkToU32(value)); | 18 return count + SkCLZ(SkToU32(value)); |
19 } | 19 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 if (doSwap) { | 149 if (doSwap) { |
150 SkTSwap(fCount0, fCount2); | 150 SkTSwap(fCount0, fCount2); |
151 SkTSwap(fV0, fV1); | 151 SkTSwap(fV0, fV1); |
152 dx = -dx; | 152 dx = -dx; |
153 } | 153 } |
154 | 154 |
155 if (fCount1 > 0) { | 155 if (fCount1 > 0) { |
156 fFx1 = fx0 + fCount0 * dx; | 156 fFx1 = fx0 + fCount0 * dx; |
157 } | 157 } |
158 } | 158 } |
OLD | NEW |