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 "SkRadialGradient.h" | 9 #include "SkRadialGradient.h" |
10 #include "SkRadialGradient_Table.h" | 10 #include "SkRadialGradient_Table.h" |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 t.append(builder->getFragmentShaderBuilder()->ensureFSCoords2D(coords, 0)); | 572 t.append(builder->getFragmentShaderBuilder()->ensureFSCoords2D(coords, 0)); |
573 t.append(")"); | 573 t.append(")"); |
574 this->emitColor(builder, t.c_str(), baseKey, outputColor, inputColor, sample
rs); | 574 this->emitColor(builder, t.c_str(), baseKey, outputColor, inputColor, sample
rs); |
575 } | 575 } |
576 | 576 |
577 ///////////////////////////////////////////////////////////////////// | 577 ///////////////////////////////////////////////////////////////////// |
578 | 578 |
579 bool SkRadialGradient::asNewEffect(GrContext* context, const SkPaint& paint, | 579 bool SkRadialGradient::asNewEffect(GrContext* context, const SkPaint& paint, |
580 const SkMatrix* localMatrix, GrColor* paintCo
lor, | 580 const SkMatrix* localMatrix, GrColor* paintCo
lor, |
581 GrEffect** effect) const { | 581 GrEffect** effect) const { |
582 SkASSERT(NULL != context); | 582 SkASSERT(context); |
583 | 583 |
584 SkMatrix matrix; | 584 SkMatrix matrix; |
585 if (!this->getLocalMatrix().invert(&matrix)) { | 585 if (!this->getLocalMatrix().invert(&matrix)) { |
586 return false; | 586 return false; |
587 } | 587 } |
588 if (localMatrix) { | 588 if (localMatrix) { |
589 SkMatrix inv; | 589 SkMatrix inv; |
590 if (!localMatrix->invert(&inv)) { | 590 if (!localMatrix->invert(&inv)) { |
591 return false; | 591 return false; |
592 } | 592 } |
(...skipping 28 matching lines...) Expand all Loading... |
621 str->appendScalar(fCenter.fY); | 621 str->appendScalar(fCenter.fY); |
622 str->append(") radius: "); | 622 str->append(") radius: "); |
623 str->appendScalar(fRadius); | 623 str->appendScalar(fRadius); |
624 str->append(" "); | 624 str->append(" "); |
625 | 625 |
626 this->INHERITED::toString(str); | 626 this->INHERITED::toString(str); |
627 | 627 |
628 str->append(")"); | 628 str->append(")"); |
629 } | 629 } |
630 #endif | 630 #endif |
OLD | NEW |