| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 fQuadsIndexBuffer->unref(); | 160 fQuadsIndexBuffer->unref(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 namespace { | 163 namespace { |
| 164 | 164 |
| 165 #define PREALLOC_PTARRAY(N) SkSTArray<(N),SkPoint, true> | 165 #define PREALLOC_PTARRAY(N) SkSTArray<(N),SkPoint, true> |
| 166 | 166 |
| 167 // Takes 178th time of logf on Z600 / VC2010 | 167 // Takes 178th time of logf on Z600 / VC2010 |
| 168 int get_float_exp(float x) { | 168 int get_float_exp(float x) { |
| 169 GR_STATIC_ASSERT(sizeof(int) == sizeof(float)); | 169 GR_STATIC_ASSERT(sizeof(int) == sizeof(float)); |
| 170 #if GR_DEBUG | 170 #if SK_DEBUG |
| 171 static bool tested; | 171 static bool tested; |
| 172 if (!tested) { | 172 if (!tested) { |
| 173 tested = true; | 173 tested = true; |
| 174 SkASSERT(get_float_exp(0.25f) == -2); | 174 SkASSERT(get_float_exp(0.25f) == -2); |
| 175 SkASSERT(get_float_exp(0.3f) == -2); | 175 SkASSERT(get_float_exp(0.3f) == -2); |
| 176 SkASSERT(get_float_exp(0.5f) == -1); | 176 SkASSERT(get_float_exp(0.5f) == -1); |
| 177 SkASSERT(get_float_exp(1.f) == 0); | 177 SkASSERT(get_float_exp(1.f) == 0); |
| 178 SkASSERT(get_float_exp(2.f) == 1); | 178 SkASSERT(get_float_exp(2.f) == 1); |
| 179 SkASSERT(get_float_exp(2.5f) == 1); | 179 SkASSERT(get_float_exp(2.5f) == 1); |
| 180 SkASSERT(get_float_exp(8.f) == 3); | 180 SkASSERT(get_float_exp(8.f) == 3); |
| (...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 &devBounds); | 1279 &devBounds); |
| 1280 conics += n; | 1280 conics += n; |
| 1281 } | 1281 } |
| 1282 } | 1282 } |
| 1283 } | 1283 } |
| 1284 | 1284 |
| 1285 target->resetIndexSource(); | 1285 target->resetIndexSource(); |
| 1286 | 1286 |
| 1287 return true; | 1287 return true; |
| 1288 } | 1288 } |
| OLD | NEW |