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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 } | 357 } |
358 | 358 |
359 #if SK_SUPPORT_GPU | 359 #if SK_SUPPORT_GPU |
360 | 360 |
361 #include "SkGr.h" | 361 #include "SkGr.h" |
362 | 362 |
363 const GrFragmentProcessor* SkTwoPointConicalGradient::asFragmentProcessor( | 363 const GrFragmentProcessor* SkTwoPointConicalGradient::asFragmentProcessor( |
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) const { |
368 GrProcessorDataManager* procDa
taManager) const { | |
369 SkASSERT(context); | 368 SkASSERT(context); |
370 SkASSERT(fPtsToUnit.isIdentity()); | 369 SkASSERT(fPtsToUnit.isIdentity()); |
371 SkAutoTUnref<const GrFragmentProcessor> inner( | 370 SkAutoTUnref<const GrFragmentProcessor> inner( |
372 Gr2PtConicalGradientEffect::Create(context, procDataManager, *this, fTil
eMode, | 371 Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMatri
x)); |
373 localMatrix)); | |
374 return GrFragmentProcessor::MulOutputByInputAlpha(inner); | 372 return GrFragmentProcessor::MulOutputByInputAlpha(inner); |
375 } | 373 } |
376 | 374 |
377 #endif | 375 #endif |
378 | 376 |
379 #ifndef SK_IGNORE_TO_STRING | 377 #ifndef SK_IGNORE_TO_STRING |
380 void SkTwoPointConicalGradient::toString(SkString* str) const { | 378 void SkTwoPointConicalGradient::toString(SkString* str) const { |
381 str->append("SkTwoPointConicalGradient: ("); | 379 str->append("SkTwoPointConicalGradient: ("); |
382 | 380 |
383 str->append("center1: ("); | 381 str->append("center1: ("); |
(...skipping 10 matching lines...) Expand all Loading... |
394 str->appendScalar(fCenter2.fY); | 392 str->appendScalar(fCenter2.fY); |
395 str->append(") radius2: "); | 393 str->append(") radius2: "); |
396 str->appendScalar(fRadius2); | 394 str->appendScalar(fRadius2); |
397 str->append(" "); | 395 str->append(" "); |
398 | 396 |
399 this->INHERITED::toString(str); | 397 this->INHERITED::toString(str); |
400 | 398 |
401 str->append(")"); | 399 str->append(")"); |
402 } | 400 } |
403 #endif | 401 #endif |
OLD | NEW |