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 "GrAAHairLinePathRenderer.h" | 8 #include "GrAAHairLinePathRenderer.h" |
9 | 9 |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 fQuadsIndexBuffer->unref(); | 159 fQuadsIndexBuffer->unref(); |
160 } | 160 } |
161 | 161 |
162 namespace { | 162 namespace { |
163 | 163 |
164 #define PREALLOC_PTARRAY(N) SkSTArray<(N),SkPoint, true> | 164 #define PREALLOC_PTARRAY(N) SkSTArray<(N),SkPoint, true> |
165 | 165 |
166 // Takes 178th time of logf on Z600 / VC2010 | 166 // Takes 178th time of logf on Z600 / VC2010 |
167 int get_float_exp(float x) { | 167 int get_float_exp(float x) { |
168 GR_STATIC_ASSERT(sizeof(int) == sizeof(float)); | 168 GR_STATIC_ASSERT(sizeof(int) == sizeof(float)); |
169 #if GR_DEBUG | 169 #ifdef SK_DEBUG |
170 static bool tested; | 170 static bool tested; |
171 if (!tested) { | 171 if (!tested) { |
172 tested = true; | 172 tested = true; |
173 SkASSERT(get_float_exp(0.25f) == -2); | 173 SkASSERT(get_float_exp(0.25f) == -2); |
174 SkASSERT(get_float_exp(0.3f) == -2); | 174 SkASSERT(get_float_exp(0.3f) == -2); |
175 SkASSERT(get_float_exp(0.5f) == -1); | 175 SkASSERT(get_float_exp(0.5f) == -1); |
176 SkASSERT(get_float_exp(1.f) == 0); | 176 SkASSERT(get_float_exp(1.f) == 0); |
177 SkASSERT(get_float_exp(2.f) == 1); | 177 SkASSERT(get_float_exp(2.f) == 1); |
178 SkASSERT(get_float_exp(2.5f) == 1); | 178 SkASSERT(get_float_exp(2.5f) == 1); |
179 SkASSERT(get_float_exp(8.f) == 3); | 179 SkASSERT(get_float_exp(8.f) == 3); |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 &devBounds); | 997 &devBounds); |
998 conics += n; | 998 conics += n; |
999 } | 999 } |
1000 } | 1000 } |
1001 } | 1001 } |
1002 | 1002 |
1003 target->resetIndexSource(); | 1003 target->resetIndexSource(); |
1004 | 1004 |
1005 return true; | 1005 return true; |
1006 } | 1006 } |
OLD | NEW |