| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "SkTwoPointRadialGradient.h" | 9 #include "SkTwoPointRadialGradient.h" |
| 10 | 10 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 b += db; | 163 b += db; |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 ///////////////////////////////////////////////////////////////////// | 168 ///////////////////////////////////////////////////////////////////// |
| 169 | 169 |
| 170 SkTwoPointRadialGradient::SkTwoPointRadialGradient( | 170 SkTwoPointRadialGradient::SkTwoPointRadialGradient( |
| 171 const SkPoint& start, SkScalar startRadius, | 171 const SkPoint& start, SkScalar startRadius, |
| 172 const SkPoint& end, SkScalar endRadius, | 172 const SkPoint& end, SkScalar endRadius, |
| 173 const SkColor colors[], const SkScalar pos[], | 173 const Descriptor& desc) |
| 174 int colorCount, SkShader::TileMode mode, | 174 : SkGradientShaderBase(desc), |
| 175 SkUnitMapper* mapper) | |
| 176 : SkGradientShaderBase(colors, pos, colorCount, mode, mapper), | |
| 177 fCenter1(start), | 175 fCenter1(start), |
| 178 fCenter2(end), | 176 fCenter2(end), |
| 179 fRadius1(startRadius), | 177 fRadius1(startRadius), |
| 180 fRadius2(endRadius) { | 178 fRadius2(endRadius) { |
| 181 init(); | 179 init(); |
| 182 } | 180 } |
| 183 | 181 |
| 184 SkShader::BitmapType SkTwoPointRadialGradient::asABitmap( | 182 SkShader::BitmapType SkTwoPointRadialGradient::asABitmap( |
| 185 SkBitmap* bitmap, | 183 SkBitmap* bitmap, |
| 186 SkMatrix* matrix, | 184 SkMatrix* matrix, |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 } | 708 } |
| 711 | 709 |
| 712 #else | 710 #else |
| 713 | 711 |
| 714 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c
onst { | 712 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c
onst { |
| 715 SkDEBUGFAIL("Should not call in GPU-less build"); | 713 SkDEBUGFAIL("Should not call in GPU-less build"); |
| 716 return NULL; | 714 return NULL; |
| 717 } | 715 } |
| 718 | 716 |
| 719 #endif | 717 #endif |
| OLD | NEW |