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 Descriptor& desc) | 173 const Descriptor& desc, const SkMatrix* localMatrix) |
174 : SkGradientShaderBase(desc), | 174 : SkGradientShaderBase(desc, localMatrix), |
175 fCenter1(start), | 175 fCenter1(start), |
176 fCenter2(end), | 176 fCenter2(end), |
177 fRadius1(startRadius), | 177 fRadius1(startRadius), |
178 fRadius2(endRadius) { | 178 fRadius2(endRadius) { |
179 init(); | 179 init(); |
180 } | 180 } |
181 | 181 |
182 SkShader::BitmapType SkTwoPointRadialGradient::asABitmap( | 182 SkShader::BitmapType SkTwoPointRadialGradient::asABitmap( |
183 SkBitmap* bitmap, | 183 SkBitmap* bitmap, |
184 SkMatrix* matrix, | 184 SkMatrix* matrix, |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 } | 705 } |
706 | 706 |
707 #else | 707 #else |
708 | 708 |
709 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c
onst { | 709 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c
onst { |
710 SkDEBUGFAIL("Should not call in GPU-less build"); | 710 SkDEBUGFAIL("Should not call in GPU-less build"); |
711 return NULL; | 711 return NULL; |
712 } | 712 } |
713 | 713 |
714 #endif | 714 #endif |
OLD | NEW |