| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "SkTwoPointConicalGradient.h" | 8 #include "SkTwoPointConicalGradient.h" |
| 9 | 9 |
| 10 #include "SkTwoPointConicalGradient_gpu.h" | 10 #include "SkTwoPointConicalGradient_gpu.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 void SkTwoPointConicalGradient::init() { | 190 void SkTwoPointConicalGradient::init() { |
| 191 fRec.init(fCenter1, fRadius1, fCenter2, fRadius2, fFlippedGrad); | 191 fRec.init(fCenter1, fRadius1, fCenter2, fRadius2, fFlippedGrad); |
| 192 fPtsToUnit.reset(); | 192 fPtsToUnit.reset(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 ///////////////////////////////////////////////////////////////////// | 195 ///////////////////////////////////////////////////////////////////// |
| 196 | 196 |
| 197 SkTwoPointConicalGradient::SkTwoPointConicalGradient( | 197 SkTwoPointConicalGradient::SkTwoPointConicalGradient( |
| 198 const SkPoint& start, SkScalar startRadius, | 198 const SkPoint& start, SkScalar startRadius, |
| 199 const SkPoint& end, SkScalar endRadius, | 199 const SkPoint& end, SkScalar endRadius, |
| 200 bool flippedGrad, const Descriptor& desc) | 200 bool flippedGrad, const Descriptor& desc, |
| 201 : SkGradientShaderBase(desc), | 201 const SkMatrix* localMatrix) |
| 202 : SkGradientShaderBase(desc, localMatrix), |
| 202 fCenter1(start), | 203 fCenter1(start), |
| 203 fCenter2(end), | 204 fCenter2(end), |
| 204 fRadius1(startRadius), | 205 fRadius1(startRadius), |
| 205 fRadius2(endRadius), | 206 fRadius2(endRadius), |
| 206 fFlippedGrad(flippedGrad) { | 207 fFlippedGrad(flippedGrad) { |
| 207 // this is degenerate, and should be caught by our caller | 208 // this is degenerate, and should be caught by our caller |
| 208 SkASSERT(fCenter1 != fCenter2 || fRadius1 != fRadius2); | 209 SkASSERT(fCenter1 != fCenter2 || fRadius1 != fRadius2); |
| 209 this->init(); | 210 this->init(); |
| 210 } | 211 } |
| 211 | 212 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 str->appendScalar(fCenter2.fY); | 421 str->appendScalar(fCenter2.fY); |
| 421 str->append(") radius2: "); | 422 str->append(") radius2: "); |
| 422 str->appendScalar(fRadius2); | 423 str->appendScalar(fRadius2); |
| 423 str->append(" "); | 424 str->append(" "); |
| 424 | 425 |
| 425 this->INHERITED::toString(str); | 426 this->INHERITED::toString(str); |
| 426 | 427 |
| 427 str->append(")"); | 428 str->append(")"); |
| 428 } | 429 } |
| 429 #endif | 430 #endif |
| OLD | NEW |