| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 "SkTwoPointConicalGradient_gpu.h" | 9 #include "SkTwoPointConicalGradient_gpu.h" |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 const char* name() const override { | 72 const char* name() const override { |
| 73 return "Two-Point Conical Gradient Edge Touching"; | 73 return "Two-Point Conical Gradient Edge Touching"; |
| 74 } | 74 } |
| 75 | 75 |
| 76 // The radial gradient parameters can collapse to a linear (instead of quadr
atic) equation. | 76 // The radial gradient parameters can collapse to a linear (instead of quadr
atic) equation. |
| 77 SkScalar center() const { return fCenterX1; } | 77 SkScalar center() const { return fCenterX1; } |
| 78 SkScalar diffRadius() const { return fDiffRadius; } | 78 SkScalar diffRadius() const { return fDiffRadius; } |
| 79 SkScalar radius() const { return fRadius0; } | 79 SkScalar radius() const { return fRadius0; } |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 GrGLSLFragmentProcessor* onCreateGLInstance() const override; | 82 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
| 83 | 83 |
| 84 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; | 84 void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const
override; |
| 85 | 85 |
| 86 bool onIsEqual(const GrFragmentProcessor& sBase) const override { | 86 bool onIsEqual(const GrFragmentProcessor& sBase) const override { |
| 87 const Edge2PtConicalEffect& s = sBase.cast<Edge2PtConicalEffect>(); | 87 const Edge2PtConicalEffect& s = sBase.cast<Edge2PtConicalEffect>(); |
| 88 return (INHERITED::onIsEqual(sBase) && | 88 return (INHERITED::onIsEqual(sBase) && |
| 89 this->fCenterX1 == s.fCenterX1 && | 89 this->fCenterX1 == s.fCenterX1 && |
| 90 this->fRadius0 == s.fRadius0 && | 90 this->fRadius0 == s.fRadius0 && |
| 91 this->fDiffRadius == s.fDiffRadius); | 91 this->fDiffRadius == s.fDiffRadius); |
| 92 } | 92 } |
| 93 | 93 |
| 94 Edge2PtConicalEffect(GrContext* ctx, | 94 Edge2PtConicalEffect(GrContext* ctx, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 SkScalar fCachedRadius; | 162 SkScalar fCachedRadius; |
| 163 SkScalar fCachedDiffRadius; | 163 SkScalar fCachedDiffRadius; |
| 164 | 164 |
| 165 // @} | 165 // @} |
| 166 | 166 |
| 167 private: | 167 private: |
| 168 typedef GrGLGradientEffect INHERITED; | 168 typedef GrGLGradientEffect INHERITED; |
| 169 | 169 |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 void Edge2PtConicalEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, | 172 void Edge2PtConicalEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps, |
| 173 GrProcessorKeyBuilder* b) const { | 173 GrProcessorKeyBuilder* b) const
{ |
| 174 GLEdge2PtConicalEffect::GenKey(*this, caps, b); | 174 GLEdge2PtConicalEffect::GenKey(*this, caps, b); |
| 175 } | 175 } |
| 176 | 176 |
| 177 GrGLSLFragmentProcessor* Edge2PtConicalEffect::onCreateGLInstance() const { | 177 GrGLSLFragmentProcessor* Edge2PtConicalEffect::onCreateGLSLInstance() const { |
| 178 return new GLEdge2PtConicalEffect(*this); | 178 return new GLEdge2PtConicalEffect(*this); |
| 179 } | 179 } |
| 180 | 180 |
| 181 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(Edge2PtConicalEffect); | 181 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(Edge2PtConicalEffect); |
| 182 | 182 |
| 183 /* | 183 /* |
| 184 * All Two point conical gradient test create functions may occasionally create
edge case shaders | 184 * All Two point conical gradient test create functions may occasionally create
edge case shaders |
| 185 */ | 185 */ |
| 186 const GrFragmentProcessor* Edge2PtConicalEffect::TestCreate(GrProcessorTestData*
d) { | 186 const GrFragmentProcessor* Edge2PtConicalEffect::TestCreate(GrProcessorTestData*
d) { |
| 187 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; | 187 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 virtual ~FocalOutside2PtConicalEffect() { } | 378 virtual ~FocalOutside2PtConicalEffect() { } |
| 379 | 379 |
| 380 const char* name() const override { | 380 const char* name() const override { |
| 381 return "Two-Point Conical Gradient Focal Outside"; | 381 return "Two-Point Conical Gradient Focal Outside"; |
| 382 } | 382 } |
| 383 | 383 |
| 384 bool isFlipped() const { return fIsFlipped; } | 384 bool isFlipped() const { return fIsFlipped; } |
| 385 SkScalar focal() const { return fFocalX; } | 385 SkScalar focal() const { return fFocalX; } |
| 386 | 386 |
| 387 private: | 387 private: |
| 388 GrGLSLFragmentProcessor* onCreateGLInstance() const override; | 388 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
| 389 | 389 |
| 390 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; | 390 void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const
override; |
| 391 | 391 |
| 392 bool onIsEqual(const GrFragmentProcessor& sBase) const override { | 392 bool onIsEqual(const GrFragmentProcessor& sBase) const override { |
| 393 const FocalOutside2PtConicalEffect& s = sBase.cast<FocalOutside2PtConica
lEffect>(); | 393 const FocalOutside2PtConicalEffect& s = sBase.cast<FocalOutside2PtConica
lEffect>(); |
| 394 return (INHERITED::onIsEqual(sBase) && | 394 return (INHERITED::onIsEqual(sBase) && |
| 395 this->fFocalX == s.fFocalX && | 395 this->fFocalX == s.fFocalX && |
| 396 this->fIsFlipped == s.fIsFlipped); | 396 this->fIsFlipped == s.fIsFlipped); |
| 397 } | 397 } |
| 398 | 398 |
| 399 FocalOutside2PtConicalEffect(GrContext* ctx, | 399 FocalOutside2PtConicalEffect(GrContext* ctx, |
| 400 const SkTwoPointConicalGradient& shader, | 400 const SkTwoPointConicalGradient& shader, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 439 |
| 440 SkScalar fCachedFocal; | 440 SkScalar fCachedFocal; |
| 441 | 441 |
| 442 // @} | 442 // @} |
| 443 | 443 |
| 444 private: | 444 private: |
| 445 typedef GrGLGradientEffect INHERITED; | 445 typedef GrGLGradientEffect INHERITED; |
| 446 | 446 |
| 447 }; | 447 }; |
| 448 | 448 |
| 449 void FocalOutside2PtConicalEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, | 449 void FocalOutside2PtConicalEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps, |
| 450 GrProcessorKeyBuilder* b)
const { | 450 GrProcessorKeyBuilder*
b) const { |
| 451 GLFocalOutside2PtConicalEffect::GenKey(*this, caps, b); | 451 GLFocalOutside2PtConicalEffect::GenKey(*this, caps, b); |
| 452 } | 452 } |
| 453 | 453 |
| 454 GrGLSLFragmentProcessor* FocalOutside2PtConicalEffect::onCreateGLInstance() cons
t { | 454 GrGLSLFragmentProcessor* FocalOutside2PtConicalEffect::onCreateGLSLInstance() co
nst { |
| 455 return new GLFocalOutside2PtConicalEffect(*this); | 455 return new GLFocalOutside2PtConicalEffect(*this); |
| 456 } | 456 } |
| 457 | 457 |
| 458 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(FocalOutside2PtConicalEffect); | 458 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(FocalOutside2PtConicalEffect); |
| 459 | 459 |
| 460 /* | 460 /* |
| 461 * All Two point conical gradient test create functions may occasionally create
edge case shaders | 461 * All Two point conical gradient test create functions may occasionally create
edge case shaders |
| 462 */ | 462 */ |
| 463 const GrFragmentProcessor* FocalOutside2PtConicalEffect::TestCreate(GrProcessorT
estData* d) { | 463 const GrFragmentProcessor* FocalOutside2PtConicalEffect::TestCreate(GrProcessorT
estData* d) { |
| 464 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; | 464 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 } | 585 } |
| 586 | 586 |
| 587 virtual ~FocalInside2PtConicalEffect() {} | 587 virtual ~FocalInside2PtConicalEffect() {} |
| 588 | 588 |
| 589 const char* name() const override { | 589 const char* name() const override { |
| 590 return "Two-Point Conical Gradient Focal Inside"; | 590 return "Two-Point Conical Gradient Focal Inside"; |
| 591 } | 591 } |
| 592 | 592 |
| 593 SkScalar focal() const { return fFocalX; } | 593 SkScalar focal() const { return fFocalX; } |
| 594 | 594 |
| 595 typedef GLFocalInside2PtConicalEffect GLProcessor; | 595 typedef GLFocalInside2PtConicalEffect GLSLProcessor; |
| 596 | 596 |
| 597 private: | 597 private: |
| 598 GrGLSLFragmentProcessor* onCreateGLInstance() const override; | 598 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
| 599 | 599 |
| 600 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; | 600 void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const
override; |
| 601 | 601 |
| 602 bool onIsEqual(const GrFragmentProcessor& sBase) const override { | 602 bool onIsEqual(const GrFragmentProcessor& sBase) const override { |
| 603 const FocalInside2PtConicalEffect& s = sBase.cast<FocalInside2PtConicalE
ffect>(); | 603 const FocalInside2PtConicalEffect& s = sBase.cast<FocalInside2PtConicalE
ffect>(); |
| 604 return (INHERITED::onIsEqual(sBase) && | 604 return (INHERITED::onIsEqual(sBase) && |
| 605 this->fFocalX == s.fFocalX); | 605 this->fFocalX == s.fFocalX); |
| 606 } | 606 } |
| 607 | 607 |
| 608 FocalInside2PtConicalEffect(GrContext* ctx, | 608 FocalInside2PtConicalEffect(GrContext* ctx, |
| 609 const SkTwoPointConicalGradient& shader, | 609 const SkTwoPointConicalGradient& shader, |
| 610 const SkMatrix& matrix, | 610 const SkMatrix& matrix, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 | 643 |
| 644 SkScalar fCachedFocal; | 644 SkScalar fCachedFocal; |
| 645 | 645 |
| 646 // @} | 646 // @} |
| 647 | 647 |
| 648 private: | 648 private: |
| 649 typedef GrGLGradientEffect INHERITED; | 649 typedef GrGLGradientEffect INHERITED; |
| 650 | 650 |
| 651 }; | 651 }; |
| 652 | 652 |
| 653 void FocalInside2PtConicalEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, | 653 void FocalInside2PtConicalEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps, |
| 654 GrProcessorKeyBuilder* b)
const { | 654 GrProcessorKeyBuilder* b
) const { |
| 655 GLFocalInside2PtConicalEffect::GenKey(*this, caps, b); | 655 GLFocalInside2PtConicalEffect::GenKey(*this, caps, b); |
| 656 } | 656 } |
| 657 | 657 |
| 658 GrGLSLFragmentProcessor* FocalInside2PtConicalEffect::onCreateGLInstance() const
{ | 658 GrGLSLFragmentProcessor* FocalInside2PtConicalEffect::onCreateGLSLInstance() con
st { |
| 659 return new GLFocalInside2PtConicalEffect(*this); | 659 return new GLFocalInside2PtConicalEffect(*this); |
| 660 } | 660 } |
| 661 | 661 |
| 662 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(FocalInside2PtConicalEffect); | 662 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(FocalInside2PtConicalEffect); |
| 663 | 663 |
| 664 /* | 664 /* |
| 665 * All Two point conical gradient test create functions may occasionally create
edge case shaders | 665 * All Two point conical gradient test create functions may occasionally create
edge case shaders |
| 666 */ | 666 */ |
| 667 const GrFragmentProcessor* FocalInside2PtConicalEffect::TestCreate(GrProcessorTe
stData* d) { | 667 const GrFragmentProcessor* FocalInside2PtConicalEffect::TestCreate(GrProcessorTe
stData* d) { |
| 668 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; | 668 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 | 821 |
| 822 const char* name() const override { return "Two-Point Conical Gradient Insid
e"; } | 822 const char* name() const override { return "Two-Point Conical Gradient Insid
e"; } |
| 823 | 823 |
| 824 SkScalar centerX() const { return fInfo.fCenterEnd.fX; } | 824 SkScalar centerX() const { return fInfo.fCenterEnd.fX; } |
| 825 SkScalar centerY() const { return fInfo.fCenterEnd.fY; } | 825 SkScalar centerY() const { return fInfo.fCenterEnd.fY; } |
| 826 SkScalar A() const { return fInfo.fA; } | 826 SkScalar A() const { return fInfo.fA; } |
| 827 SkScalar B() const { return fInfo.fB; } | 827 SkScalar B() const { return fInfo.fB; } |
| 828 SkScalar C() const { return fInfo.fC; } | 828 SkScalar C() const { return fInfo.fC; } |
| 829 | 829 |
| 830 private: | 830 private: |
| 831 GrGLSLFragmentProcessor* onCreateGLInstance() const override; | 831 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
| 832 | 832 |
| 833 virtual void onGetGLProcessorKey(const GrGLSLCaps& caps, | 833 virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps, |
| 834 GrProcessorKeyBuilder* b) const override; | 834 GrProcessorKeyBuilder* b) const override; |
| 835 | 835 |
| 836 bool onIsEqual(const GrFragmentProcessor& sBase) const override { | 836 bool onIsEqual(const GrFragmentProcessor& sBase) const override { |
| 837 const CircleInside2PtConicalEffect& s = sBase.cast<CircleInside2PtConica
lEffect>(); | 837 const CircleInside2PtConicalEffect& s = sBase.cast<CircleInside2PtConica
lEffect>(); |
| 838 return (INHERITED::onIsEqual(sBase) && | 838 return (INHERITED::onIsEqual(sBase) && |
| 839 this->fInfo.fCenterEnd == s.fInfo.fCenterEnd && | 839 this->fInfo.fCenterEnd == s.fInfo.fCenterEnd && |
| 840 this->fInfo.fA == s.fInfo.fA && | 840 this->fInfo.fA == s.fInfo.fA && |
| 841 this->fInfo.fB == s.fInfo.fB && | 841 this->fInfo.fB == s.fInfo.fB && |
| 842 this->fInfo.fC == s.fInfo.fC); | 842 this->fInfo.fC == s.fInfo.fC); |
| 843 } | 843 } |
| 844 | 844 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 SkScalar fCachedB; | 885 SkScalar fCachedB; |
| 886 SkScalar fCachedC; | 886 SkScalar fCachedC; |
| 887 | 887 |
| 888 // @} | 888 // @} |
| 889 | 889 |
| 890 private: | 890 private: |
| 891 typedef GrGLGradientEffect INHERITED; | 891 typedef GrGLGradientEffect INHERITED; |
| 892 | 892 |
| 893 }; | 893 }; |
| 894 | 894 |
| 895 void CircleInside2PtConicalEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, | 895 void CircleInside2PtConicalEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps, |
| 896 GrProcessorKeyBuilder* b)
const { | 896 GrProcessorKeyBuilder*
b) const { |
| 897 GLCircleInside2PtConicalEffect::GenKey(*this, caps, b); | 897 GLCircleInside2PtConicalEffect::GenKey(*this, caps, b); |
| 898 } | 898 } |
| 899 | 899 |
| 900 GrGLSLFragmentProcessor* CircleInside2PtConicalEffect::onCreateGLInstance() cons
t { | 900 GrGLSLFragmentProcessor* CircleInside2PtConicalEffect::onCreateGLSLInstance() co
nst { |
| 901 return new GLCircleInside2PtConicalEffect(*this); | 901 return new GLCircleInside2PtConicalEffect(*this); |
| 902 } | 902 } |
| 903 | 903 |
| 904 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(CircleInside2PtConicalEffect); | 904 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(CircleInside2PtConicalEffect); |
| 905 | 905 |
| 906 /* | 906 /* |
| 907 * All Two point conical gradient test create functions may occasionally create
edge case shaders | 907 * All Two point conical gradient test create functions may occasionally create
edge case shaders |
| 908 */ | 908 */ |
| 909 const GrFragmentProcessor* CircleInside2PtConicalEffect::TestCreate(GrProcessorT
estData* d) { | 909 const GrFragmentProcessor* CircleInside2PtConicalEffect::TestCreate(GrProcessorT
estData* d) { |
| 910 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; | 910 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 | 1033 |
| 1034 SkScalar centerX() const { return fInfo.fCenterEnd.fX; } | 1034 SkScalar centerX() const { return fInfo.fCenterEnd.fX; } |
| 1035 SkScalar centerY() const { return fInfo.fCenterEnd.fY; } | 1035 SkScalar centerY() const { return fInfo.fCenterEnd.fY; } |
| 1036 SkScalar A() const { return fInfo.fA; } | 1036 SkScalar A() const { return fInfo.fA; } |
| 1037 SkScalar B() const { return fInfo.fB; } | 1037 SkScalar B() const { return fInfo.fB; } |
| 1038 SkScalar C() const { return fInfo.fC; } | 1038 SkScalar C() const { return fInfo.fC; } |
| 1039 SkScalar tLimit() const { return fTLimit; } | 1039 SkScalar tLimit() const { return fTLimit; } |
| 1040 bool isFlipped() const { return fIsFlipped; } | 1040 bool isFlipped() const { return fIsFlipped; } |
| 1041 | 1041 |
| 1042 private: | 1042 private: |
| 1043 GrGLSLFragmentProcessor* onCreateGLInstance() const override; | 1043 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
| 1044 | 1044 |
| 1045 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; | 1045 void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const
override; |
| 1046 | 1046 |
| 1047 bool onIsEqual(const GrFragmentProcessor& sBase) const override { | 1047 bool onIsEqual(const GrFragmentProcessor& sBase) const override { |
| 1048 const CircleOutside2PtConicalEffect& s = sBase.cast<CircleOutside2PtConi
calEffect>(); | 1048 const CircleOutside2PtConicalEffect& s = sBase.cast<CircleOutside2PtConi
calEffect>(); |
| 1049 return (INHERITED::onIsEqual(sBase) && | 1049 return (INHERITED::onIsEqual(sBase) && |
| 1050 this->fInfo.fCenterEnd == s.fInfo.fCenterEnd && | 1050 this->fInfo.fCenterEnd == s.fInfo.fCenterEnd && |
| 1051 this->fInfo.fA == s.fInfo.fA && | 1051 this->fInfo.fA == s.fInfo.fA && |
| 1052 this->fInfo.fB == s.fInfo.fB && | 1052 this->fInfo.fB == s.fInfo.fB && |
| 1053 this->fInfo.fC == s.fInfo.fC && | 1053 this->fInfo.fC == s.fInfo.fC && |
| 1054 this->fTLimit == s.fTLimit && | 1054 this->fTLimit == s.fTLimit && |
| 1055 this->fIsFlipped == s.fIsFlipped); | 1055 this->fIsFlipped == s.fIsFlipped); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1110 SkScalar fCachedC; | 1110 SkScalar fCachedC; |
| 1111 SkScalar fCachedTLimit; | 1111 SkScalar fCachedTLimit; |
| 1112 | 1112 |
| 1113 // @} | 1113 // @} |
| 1114 | 1114 |
| 1115 private: | 1115 private: |
| 1116 typedef GrGLGradientEffect INHERITED; | 1116 typedef GrGLGradientEffect INHERITED; |
| 1117 | 1117 |
| 1118 }; | 1118 }; |
| 1119 | 1119 |
| 1120 void CircleOutside2PtConicalEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, | 1120 void CircleOutside2PtConicalEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps
, |
| 1121 GrProcessorKeyBuilder* b
) const { | 1121 GrProcessorKeyBuilder*
b) const { |
| 1122 GLCircleOutside2PtConicalEffect::GenKey(*this, caps, b); | 1122 GLCircleOutside2PtConicalEffect::GenKey(*this, caps, b); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 GrGLSLFragmentProcessor* CircleOutside2PtConicalEffect::onCreateGLInstance() con
st { | 1125 GrGLSLFragmentProcessor* CircleOutside2PtConicalEffect::onCreateGLSLInstance() c
onst { |
| 1126 return new GLCircleOutside2PtConicalEffect(*this); | 1126 return new GLCircleOutside2PtConicalEffect(*this); |
| 1127 } | 1127 } |
| 1128 | 1128 |
| 1129 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(CircleOutside2PtConicalEffect); | 1129 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(CircleOutside2PtConicalEffect); |
| 1130 | 1130 |
| 1131 /* | 1131 /* |
| 1132 * All Two point conical gradient test create functions may occasionally create
edge case shaders | 1132 * All Two point conical gradient test create functions may occasionally create
edge case shaders |
| 1133 */ | 1133 */ |
| 1134 const GrFragmentProcessor* CircleOutside2PtConicalEffect::TestCreate(GrProcessor
TestData* d) { | 1134 const GrFragmentProcessor* CircleOutside2PtConicalEffect::TestCreate(GrProcessor
TestData* d) { |
| 1135 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; | 1135 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 return CircleInside2PtConicalEffect::Create(ctx, shader, matrix, tm, inf
o); | 1304 return CircleInside2PtConicalEffect::Create(ctx, shader, matrix, tm, inf
o); |
| 1305 } else if (type == kEdge_ConicalType) { | 1305 } else if (type == kEdge_ConicalType) { |
| 1306 set_matrix_edge_conical(shader, &matrix); | 1306 set_matrix_edge_conical(shader, &matrix); |
| 1307 return Edge2PtConicalEffect::Create(ctx, shader, matrix, tm); | 1307 return Edge2PtConicalEffect::Create(ctx, shader, matrix, tm); |
| 1308 } else { | 1308 } else { |
| 1309 return CircleOutside2PtConicalEffect::Create(ctx, shader, matrix, tm, in
fo); | 1309 return CircleOutside2PtConicalEffect::Create(ctx, shader, matrix, tm, in
fo); |
| 1310 } | 1310 } |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 #endif | 1313 #endif |
| OLD | NEW |