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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 | 527 |
528 typedef GrGradientEffect INHERITED; | 528 typedef GrGradientEffect INHERITED; |
529 }; | 529 }; |
530 | 530 |
531 ///////////////////////////////////////////////////////////////////// | 531 ///////////////////////////////////////////////////////////////////// |
532 | 532 |
533 GR_DEFINE_EFFECT_TEST(GrRadialGradient); | 533 GR_DEFINE_EFFECT_TEST(GrRadialGradient); |
534 | 534 |
535 GrEffectRef* GrRadialGradient::TestCreate(SkMWCRandom* random, | 535 GrEffectRef* GrRadialGradient::TestCreate(SkMWCRandom* random, |
536 GrContext* context, | 536 GrContext* context, |
| 537 const GrDrawTargetCaps&, |
537 GrTexture**) { | 538 GrTexture**) { |
538 SkPoint center = {random->nextUScalar1(), random->nextUScalar1()}; | 539 SkPoint center = {random->nextUScalar1(), random->nextUScalar1()}; |
539 SkScalar radius = random->nextUScalar1(); | 540 SkScalar radius = random->nextUScalar1(); |
540 | 541 |
541 SkColor colors[kMaxRandomGradientColors]; | 542 SkColor colors[kMaxRandomGradientColors]; |
542 SkScalar stopsArray[kMaxRandomGradientColors]; | 543 SkScalar stopsArray[kMaxRandomGradientColors]; |
543 SkScalar* stops = stopsArray; | 544 SkScalar* stops = stopsArray; |
544 SkShader::TileMode tm; | 545 SkShader::TileMode tm; |
545 int colorCount = RandomGradientParams(random, colors, &stops, &tm); | 546 int colorCount = RandomGradientParams(random, colors, &stops, &tm); |
546 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center, radius, | 547 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center, radius, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 str->appendScalar(fCenter.fY); | 600 str->appendScalar(fCenter.fY); |
600 str->append(") radius: "); | 601 str->append(") radius: "); |
601 str->appendScalar(fRadius); | 602 str->appendScalar(fRadius); |
602 str->append(" "); | 603 str->append(" "); |
603 | 604 |
604 this->INHERITED::toString(str); | 605 this->INHERITED::toString(str); |
605 | 606 |
606 str->append(")"); | 607 str->append(")"); |
607 } | 608 } |
608 #endif | 609 #endif |
OLD | NEW |