| 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 #include "SkTwoPointConicalGradient_gpu.h" | 9 #include "SkTwoPointConicalGradient_gpu.h" |
| 10 | 10 |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 GrContext* context, | 364 GrContext* context, |
| 365 const SkMatrix& viewM, | 365 const SkMatrix& viewM, |
| 366 const SkMatrix* localMatrix, | 366 const SkMatrix* localMatrix, |
| 367 SkFilterQuality, | 367 SkFilterQuality, |
| 368 GrProcessorDataManager* procDa
taManager) const { | 368 GrProcessorDataManager* procDa
taManager) const { |
| 369 SkASSERT(context); | 369 SkASSERT(context); |
| 370 SkASSERT(fPtsToUnit.isIdentity()); | 370 SkASSERT(fPtsToUnit.isIdentity()); |
| 371 SkAutoTUnref<const GrFragmentProcessor> inner( | 371 SkAutoTUnref<const GrFragmentProcessor> inner( |
| 372 Gr2PtConicalGradientEffect::Create(context, procDataManager, *this, fTil
eMode, | 372 Gr2PtConicalGradientEffect::Create(context, procDataManager, *this, fTil
eMode, |
| 373 localMatrix)); | 373 localMatrix)); |
| 374 return GrFragmentProcessor::MulOuputByInputAlpha(inner); | 374 return GrFragmentProcessor::MulOutputByInputAlpha(inner); |
| 375 } | 375 } |
| 376 | 376 |
| 377 #endif | 377 #endif |
| 378 | 378 |
| 379 #ifndef SK_IGNORE_TO_STRING | 379 #ifndef SK_IGNORE_TO_STRING |
| 380 void SkTwoPointConicalGradient::toString(SkString* str) const { | 380 void SkTwoPointConicalGradient::toString(SkString* str) const { |
| 381 str->append("SkTwoPointConicalGradient: ("); | 381 str->append("SkTwoPointConicalGradient: ("); |
| 382 | 382 |
| 383 str->append("center1: ("); | 383 str->append("center1: ("); |
| 384 str->appendScalar(fCenter1.fX); | 384 str->appendScalar(fCenter1.fX); |
| 385 str->append(", "); | 385 str->append(", "); |
| 386 str->appendScalar(fCenter1.fY); | 386 str->appendScalar(fCenter1.fY); |
| 387 str->append(") radius1: "); | 387 str->append(") radius1: "); |
| 388 str->appendScalar(fRadius1); | 388 str->appendScalar(fRadius1); |
| 389 str->append(" "); | 389 str->append(" "); |
| 390 | 390 |
| 391 str->append("center2: ("); | 391 str->append("center2: ("); |
| 392 str->appendScalar(fCenter2.fX); | 392 str->appendScalar(fCenter2.fX); |
| 393 str->append(", "); | 393 str->append(", "); |
| 394 str->appendScalar(fCenter2.fY); | 394 str->appendScalar(fCenter2.fY); |
| 395 str->append(") radius2: "); | 395 str->append(") radius2: "); |
| 396 str->appendScalar(fRadius2); | 396 str->appendScalar(fRadius2); |
| 397 str->append(" "); | 397 str->append(" "); |
| 398 | 398 |
| 399 this->INHERITED::toString(str); | 399 this->INHERITED::toString(str); |
| 400 | 400 |
| 401 str->append(")"); | 401 str->append(")"); |
| 402 } | 402 } |
| 403 #endif | 403 #endif |
| OLD | NEW |