| 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 | 494 |
| 495 typedef GrGradientEffect INHERITED; | 495 typedef GrGradientEffect INHERITED; |
| 496 }; | 496 }; |
| 497 | 497 |
| 498 ///////////////////////////////////////////////////////////////////// | 498 ///////////////////////////////////////////////////////////////////// |
| 499 | 499 |
| 500 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRadialGradient); | 500 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRadialGradient); |
| 501 | 501 |
| 502 GrFragmentProcessor* GrRadialGradient::TestCreate(SkRandom* random, | 502 GrFragmentProcessor* GrRadialGradient::TestCreate(SkRandom* random, |
| 503 GrContext* context, | 503 GrContext* context, |
| 504 const GrDrawTargetCaps&, | 504 const GrCaps&, |
| 505 GrTexture**) { | 505 GrTexture**) { |
| 506 SkPoint center = {random->nextUScalar1(), random->nextUScalar1()}; | 506 SkPoint center = {random->nextUScalar1(), random->nextUScalar1()}; |
| 507 SkScalar radius = random->nextUScalar1(); | 507 SkScalar radius = random->nextUScalar1(); |
| 508 | 508 |
| 509 SkColor colors[kMaxRandomGradientColors]; | 509 SkColor colors[kMaxRandomGradientColors]; |
| 510 SkScalar stopsArray[kMaxRandomGradientColors]; | 510 SkScalar stopsArray[kMaxRandomGradientColors]; |
| 511 SkScalar* stops = stopsArray; | 511 SkScalar* stops = stopsArray; |
| 512 SkShader::TileMode tm; | 512 SkShader::TileMode tm; |
| 513 int colorCount = RandomGradientParams(random, colors, &stops, &tm); | 513 int colorCount = RandomGradientParams(random, colors, &stops, &tm); |
| 514 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center, radius, | 514 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center, radius, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 str->appendScalar(fCenter.fY); | 587 str->appendScalar(fCenter.fY); |
| 588 str->append(") radius: "); | 588 str->append(") radius: "); |
| 589 str->appendScalar(fRadius); | 589 str->appendScalar(fRadius); |
| 590 str->append(" "); | 590 str->append(" "); |
| 591 | 591 |
| 592 this->INHERITED::toString(str); | 592 this->INHERITED::toString(str); |
| 593 | 593 |
| 594 str->append(")"); | 594 str->append(")"); |
| 595 } | 595 } |
| 596 #endif | 596 #endif |
| OLD | NEW |