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 "SkTwoPointRadialGradient.h" | 9 #include "SkTwoPointRadialGradient.h" |
10 | 10 |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 SkShader::TileMode tm; | 535 SkShader::TileMode tm; |
536 int colorCount = RandomGradientParams(random, colors, &stops, &tm); | 536 int colorCount = RandomGradientParams(random, colors, &stops, &tm); |
537 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateTwoPointRadial(center1
, radius1, | 537 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateTwoPointRadial(center1
, radius1, |
538 center2
, radius2, | 538 center2
, radius2, |
539 colors,
stops, colorCount, | 539 colors,
stops, colorCount, |
540 tm)); | 540 tm)); |
541 SkPaint paint; | 541 SkPaint paint; |
542 GrFragmentProcessor* fp; | 542 GrFragmentProcessor* fp; |
543 GrColor paintColor; | 543 GrColor paintColor; |
544 SkAssertResult(shader->asFragmentProcessor(context, paint, | 544 SkAssertResult(shader->asFragmentProcessor(context, paint, |
545 GrProcessorUnitTest::TestMatrix(r
andom), NULL, | 545 GrTest::TestMatrix(random), NULL, |
546 &paintColor, &fp)); | 546 &paintColor, &fp)); |
547 return fp; | 547 return fp; |
548 } | 548 } |
549 | 549 |
550 ///////////////////////////////////////////////////////////////////// | 550 ///////////////////////////////////////////////////////////////////// |
551 | 551 |
552 GrGLRadial2Gradient::GrGLRadial2Gradient(const GrProcessor& processor) | 552 GrGLRadial2Gradient::GrGLRadial2Gradient(const GrProcessor& processor) |
553 : fVSVaryingName(NULL) | 553 : fVSVaryingName(NULL) |
554 , fFSVaryingName(NULL) | 554 , fFSVaryingName(NULL) |
555 , fCachedCenter(SK_ScalarMax) | 555 , fCachedCenter(SK_ScalarMax) |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 #else | 715 #else |
716 | 716 |
717 bool SkTwoPointRadialGradient::asFragmentProcessor(GrContext*, const SkPaint&, c
onst SkMatrix&, | 717 bool SkTwoPointRadialGradient::asFragmentProcessor(GrContext*, const SkPaint&, c
onst SkMatrix&, |
718 const SkMatrix*, | 718 const SkMatrix*, |
719 GrColor*, GrFragmentProcessor
**) const { | 719 GrColor*, GrFragmentProcessor
**) const { |
720 SkDEBUGFAIL("Should not call in GPU-less build"); | 720 SkDEBUGFAIL("Should not call in GPU-less build"); |
721 return false; | 721 return false; |
722 } | 722 } |
723 | 723 |
724 #endif | 724 #endif |
OLD | NEW |