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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 buffer.writeBool(fFlippedGrad); | 416 buffer.writeBool(fFlippedGrad); |
417 } | 417 } |
418 | 418 |
419 #if SK_SUPPORT_GPU | 419 #if SK_SUPPORT_GPU |
420 | 420 |
421 #include "SkGr.h" | 421 #include "SkGr.h" |
422 | 422 |
423 bool SkTwoPointConicalGradient::asNewEffect(GrContext* context, const SkPaint& p
aint, | 423 bool SkTwoPointConicalGradient::asNewEffect(GrContext* context, const SkPaint& p
aint, |
424 const SkMatrix* localMatrix, GrColo
r* paintColor, | 424 const SkMatrix* localMatrix, GrColo
r* paintColor, |
425 GrEffect** effect) const { | 425 GrEffect** effect) const { |
426 SkASSERT(NULL != context); | 426 SkASSERT(context); |
427 SkASSERT(fPtsToUnit.isIdentity()); | 427 SkASSERT(fPtsToUnit.isIdentity()); |
428 | 428 |
429 *effect = Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, loca
lMatrix); | 429 *effect = Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, loca
lMatrix); |
430 *paintColor = SkColor2GrColorJustAlpha(paint.getColor()); | 430 *paintColor = SkColor2GrColorJustAlpha(paint.getColor()); |
431 return true; | 431 return true; |
432 } | 432 } |
433 | 433 |
434 #else | 434 #else |
435 | 435 |
436 bool SkTwoPointConicalGradient::asNewEffect(GrContext* context, const SkPaint& p
aint, | 436 bool SkTwoPointConicalGradient::asNewEffect(GrContext* context, const SkPaint& p
aint, |
(...skipping 23 matching lines...) Expand all Loading... |
460 str->appendScalar(fCenter2.fY); | 460 str->appendScalar(fCenter2.fY); |
461 str->append(") radius2: "); | 461 str->append(") radius2: "); |
462 str->appendScalar(fRadius2); | 462 str->appendScalar(fRadius2); |
463 str->append(" "); | 463 str->append(" "); |
464 | 464 |
465 this->INHERITED::toString(str); | 465 this->INHERITED::toString(str); |
466 | 466 |
467 str->append(")"); | 467 str->append(")"); |
468 } | 468 } |
469 #endif | 469 #endif |
OLD | NEW |