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 "SkLinearGradient.h" | 9 #include "SkLinearGradient.h" |
10 | 10 |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 : INHERITED(ctx, shader, matrix, tm) { } | 490 : INHERITED(ctx, shader, matrix, tm) { } |
491 GR_DECLARE_EFFECT_TEST; | 491 GR_DECLARE_EFFECT_TEST; |
492 | 492 |
493 typedef GrGradientEffect INHERITED; | 493 typedef GrGradientEffect INHERITED; |
494 }; | 494 }; |
495 | 495 |
496 ///////////////////////////////////////////////////////////////////// | 496 ///////////////////////////////////////////////////////////////////// |
497 | 497 |
498 GR_DEFINE_EFFECT_TEST(GrLinearGradient); | 498 GR_DEFINE_EFFECT_TEST(GrLinearGradient); |
499 | 499 |
500 GrEffectRef* GrLinearGradient::TestCreate(SkMWCRandom* random, | 500 GrEffectRef* GrLinearGradient::TestCreate(SkRandom* random, |
501 GrContext* context, | 501 GrContext* context, |
502 const GrDrawTargetCaps&, | 502 const GrDrawTargetCaps&, |
503 GrTexture**) { | 503 GrTexture**) { |
504 SkPoint points[] = {{random->nextUScalar1(), random->nextUScalar1()}, | 504 SkPoint points[] = {{random->nextUScalar1(), random->nextUScalar1()}, |
505 {random->nextUScalar1(), random->nextUScalar1()}}; | 505 {random->nextUScalar1(), random->nextUScalar1()}}; |
506 | 506 |
507 SkColor colors[kMaxRandomGradientColors]; | 507 SkColor colors[kMaxRandomGradientColors]; |
508 SkScalar stopsArray[kMaxRandomGradientColors]; | 508 SkScalar stopsArray[kMaxRandomGradientColors]; |
509 SkScalar* stops = stopsArray; | 509 SkScalar* stops = stopsArray; |
510 SkShader::TileMode tm; | 510 SkShader::TileMode tm; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 str->append("SkLinearGradient ("); | 559 str->append("SkLinearGradient ("); |
560 | 560 |
561 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); | 561 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); |
562 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); | 562 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); |
563 | 563 |
564 this->INHERITED::toString(str); | 564 this->INHERITED::toString(str); |
565 | 565 |
566 str->append(")"); | 566 str->append(")"); |
567 } | 567 } |
568 #endif | 568 #endif |
OLD | NEW |