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 "SkSweepGradient.h" | 9 #include "SkSweepGradient.h" |
10 | 10 |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 | 439 |
440 typedef GrGradientEffect INHERITED; | 440 typedef GrGradientEffect INHERITED; |
441 }; | 441 }; |
442 | 442 |
443 ///////////////////////////////////////////////////////////////////// | 443 ///////////////////////////////////////////////////////////////////// |
444 | 444 |
445 GR_DEFINE_EFFECT_TEST(GrSweepGradient); | 445 GR_DEFINE_EFFECT_TEST(GrSweepGradient); |
446 | 446 |
447 GrEffectRef* GrSweepGradient::TestCreate(SkMWCRandom* random, | 447 GrEffectRef* GrSweepGradient::TestCreate(SkMWCRandom* random, |
448 GrContext* context, | 448 GrContext* context, |
| 449 const GrDrawTargetCaps&, |
449 GrTexture**) { | 450 GrTexture**) { |
450 SkPoint center = {random->nextUScalar1(), random->nextUScalar1()}; | 451 SkPoint center = {random->nextUScalar1(), random->nextUScalar1()}; |
451 | 452 |
452 SkColor colors[kMaxRandomGradientColors]; | 453 SkColor colors[kMaxRandomGradientColors]; |
453 SkScalar stopsArray[kMaxRandomGradientColors]; | 454 SkScalar stopsArray[kMaxRandomGradientColors]; |
454 SkScalar* stops = stopsArray; | 455 SkScalar* stops = stopsArray; |
455 SkShader::TileMode tmIgnored; | 456 SkShader::TileMode tmIgnored; |
456 int colorCount = RandomGradientParams(random, colors, &stops, &tmIgnored); | 457 int colorCount = RandomGradientParams(random, colors, &stops, &tmIgnored); |
457 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateSweep(center.fX, cente
r.fY, | 458 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateSweep(center.fX, cente
r.fY, |
458 colors, stops, c
olorCount)); | 459 colors, stops, c
olorCount)); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 str->appendScalar(fCenter.fX); | 505 str->appendScalar(fCenter.fX); |
505 str->append(", "); | 506 str->append(", "); |
506 str->appendScalar(fCenter.fY); | 507 str->appendScalar(fCenter.fY); |
507 str->append(") "); | 508 str->append(") "); |
508 | 509 |
509 this->INHERITED::toString(str); | 510 this->INHERITED::toString(str); |
510 | 511 |
511 str->append(")"); | 512 str->append(")"); |
512 } | 513 } |
513 #endif | 514 #endif |
OLD | NEW |