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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 SkScalar* stops = stopsArray; | 612 SkScalar* stops = stopsArray; |
613 SkShader::TileMode tm; | 613 SkShader::TileMode tm; |
614 int colorCount = RandomGradientParams(random, colors, &stops, &tm); | 614 int colorCount = RandomGradientParams(random, colors, &stops, &tm); |
615 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center, radius, | 615 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center, radius, |
616 colors, stops,
colorCount, | 616 colors, stops,
colorCount, |
617 tm)); | 617 tm)); |
618 SkPaint paint; | 618 SkPaint paint; |
619 GrColor paintColor; | 619 GrColor paintColor; |
620 GrFragmentProcessor* fp; | 620 GrFragmentProcessor* fp; |
621 SkAssertResult(shader->asFragmentProcessor(context, paint, | 621 SkAssertResult(shader->asFragmentProcessor(context, paint, |
622 GrProcessorUnitTest::TestMatrix(r
andom), NULL, | 622 GrTest::TestMatrix(random), NULL, |
623 &paintColor, &fp)); | 623 &paintColor, &fp)); |
624 return fp; | 624 return fp; |
625 } | 625 } |
626 | 626 |
627 ///////////////////////////////////////////////////////////////////// | 627 ///////////////////////////////////////////////////////////////////// |
628 | 628 |
629 void GrGLRadialGradient::emitCode(GrGLFPBuilder* builder, | 629 void GrGLRadialGradient::emitCode(GrGLFPBuilder* builder, |
630 const GrFragmentProcessor& fp, | 630 const GrFragmentProcessor& fp, |
631 const char* outputColor, | 631 const char* outputColor, |
632 const char* inputColor, | 632 const char* inputColor, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 str->appendScalar(fCenter.fY); | 688 str->appendScalar(fCenter.fY); |
689 str->append(") radius: "); | 689 str->append(") radius: "); |
690 str->appendScalar(fRadius); | 690 str->appendScalar(fRadius); |
691 str->append(" "); | 691 str->append(" "); |
692 | 692 |
693 this->INHERITED::toString(str); | 693 this->INHERITED::toString(str); |
694 | 694 |
695 str->append(")"); | 695 str->append(")"); |
696 } | 696 } |
697 #endif | 697 #endif |
OLD | NEW |