| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 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 "SkBlurMaskFilter.h" | 9 #include "SkBlurMaskFilter.h" |
| 10 #include "SkBlurMask.h" | 10 #include "SkBlurMask.h" |
| 11 #include "SkGpuBlurUtils.h" | 11 #include "SkGpuBlurUtils.h" |
| 12 #include "SkReadBuffer.h" | 12 #include "SkReadBuffer.h" |
| 13 #include "SkWriteBuffer.h" | 13 #include "SkWriteBuffer.h" |
| 14 #include "SkMaskFilter.h" | 14 #include "SkMaskFilter.h" |
| 15 #include "SkRRect.h" | 15 #include "SkRRect.h" |
| 16 #include "SkRTConf.h" | 16 #include "SkRTConf.h" |
| 17 #include "SkStringUtils.h" | 17 #include "SkStringUtils.h" |
| 18 #include "SkStrokeRec.h" | 18 #include "SkStrokeRec.h" |
| 19 | 19 |
| 20 #if SK_SUPPORT_GPU | 20 #if SK_SUPPORT_GPU |
| 21 #include "GrContext.h" | 21 #include "GrContext.h" |
| 22 #include "GrTexture.h" | 22 #include "GrTexture.h" |
| 23 #include "GrFragmentProcessor.h" | 23 #include "GrFragmentProcessor.h" |
| 24 #include "GrInvariantOutput.h" | 24 #include "GrInvariantOutput.h" |
| 25 #include "SkGrPixelRef.h" |
| 26 #include "SkDraw.h" |
| 27 #include "effects/GrSimpleTextureEffect.h" |
| 25 #include "gl/GrGLProcessor.h" | 28 #include "gl/GrGLProcessor.h" |
| 26 #include "gl/builders/GrGLProgramBuilder.h" | 29 #include "gl/builders/GrGLProgramBuilder.h" |
| 27 #include "effects/GrSimpleTextureEffect.h" | |
| 28 #include "GrTBackendProcessorFactory.h" | |
| 29 #include "SkGrPixelRef.h" | |
| 30 #include "SkDraw.h" | |
| 31 #endif | 30 #endif |
| 32 | 31 |
| 33 SkScalar SkBlurMaskFilter::ConvertRadiusToSigma(SkScalar radius) { | 32 SkScalar SkBlurMaskFilter::ConvertRadiusToSigma(SkScalar radius) { |
| 34 return SkBlurMask::ConvertRadiusToSigma(radius); | 33 return SkBlurMask::ConvertRadiusToSigma(radius); |
| 35 } | 34 } |
| 36 | 35 |
| 37 class SkBlurMaskFilterImpl : public SkMaskFilter { | 36 class SkBlurMaskFilterImpl : public SkMaskFilter { |
| 38 public: | 37 public: |
| 39 SkBlurMaskFilterImpl(SkScalar sigma, SkBlurStyle, uint32_t flags); | 38 SkBlurMaskFilterImpl(SkScalar sigma, SkBlurStyle, uint32_t flags); |
| 40 | 39 |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 } | 601 } |
| 603 | 602 |
| 604 #if SK_SUPPORT_GPU | 603 #if SK_SUPPORT_GPU |
| 605 | 604 |
| 606 class GrGLRectBlurEffect; | 605 class GrGLRectBlurEffect; |
| 607 | 606 |
| 608 class GrRectBlurEffect : public GrFragmentProcessor { | 607 class GrRectBlurEffect : public GrFragmentProcessor { |
| 609 public: | 608 public: |
| 610 virtual ~GrRectBlurEffect(); | 609 virtual ~GrRectBlurEffect(); |
| 611 | 610 |
| 612 static const char* Name() { return "RectBlur"; } | 611 virtual const char* name() const SK_OVERRIDE { return "RectBlur"; } |
| 613 | 612 |
| 614 typedef GrGLRectBlurEffect GLProcessor; | 613 virtual void getGLProcessorKey(const GrGLCaps& caps, |
| 614 GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
| 615 | 615 |
| 616 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR
IDE; | 616 virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; |
| 617 |
| 618 virtual uint32_t classID() const { |
| 619 static uint32_t id = GenClassID(); |
| 620 return id; |
| 621 } |
| 622 |
| 617 /** | 623 /** |
| 618 * Create a simple filter effect with custom bicubic coefficients. | 624 * Create a simple filter effect with custom bicubic coefficients. |
| 619 */ | 625 */ |
| 620 static GrFragmentProcessor* Create(GrContext *context, const SkRect& rect, f
loat sigma) { | 626 static GrFragmentProcessor* Create(GrContext *context, const SkRect& rect, f
loat sigma) { |
| 621 GrTexture *blurProfileTexture = NULL; | 627 GrTexture *blurProfileTexture = NULL; |
| 622 int doubleProfileSize = SkScalarCeilToInt(12*sigma); | 628 int doubleProfileSize = SkScalarCeilToInt(12*sigma); |
| 623 | 629 |
| 624 if (doubleProfileSize >= rect.width() || doubleProfileSize >= rect.heigh
t()) { | 630 if (doubleProfileSize >= rect.width() || doubleProfileSize >= rect.heigh
t()) { |
| 625 // if the blur sigma is too large so the gaussian overlaps the whole | 631 // if the blur sigma is too large so the gaussian overlaps the whole |
| 626 // rect in either direction, fall back to CPU path for now. | 632 // rect in either direction, fall back to CPU path for now. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 652 float fSigma; | 658 float fSigma; |
| 653 GrTextureAccess fBlurProfileAccess; | 659 GrTextureAccess fBlurProfileAccess; |
| 654 | 660 |
| 655 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 661 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
| 656 | 662 |
| 657 typedef GrFragmentProcessor INHERITED; | 663 typedef GrFragmentProcessor INHERITED; |
| 658 }; | 664 }; |
| 659 | 665 |
| 660 class GrGLRectBlurEffect : public GrGLFragmentProcessor { | 666 class GrGLRectBlurEffect : public GrGLFragmentProcessor { |
| 661 public: | 667 public: |
| 662 GrGLRectBlurEffect(const GrBackendProcessorFactory& factory, | 668 GrGLRectBlurEffect(const GrProcessor&) {} |
| 663 const GrProcessor&); | |
| 664 virtual void emitCode(GrGLFPBuilder*, | 669 virtual void emitCode(GrGLFPBuilder*, |
| 665 const GrFragmentProcessor&, | 670 const GrFragmentProcessor&, |
| 666 const char* outputColor, | 671 const char* outputColor, |
| 667 const char* inputColor, | 672 const char* inputColor, |
| 668 const TransformedCoordsArray&, | 673 const TransformedCoordsArray&, |
| 669 const TextureSamplerArray&) SK_OVERRIDE; | 674 const TextureSamplerArray&) SK_OVERRIDE; |
| 670 | 675 |
| 671 virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_O
VERRIDE; | 676 virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_O
VERRIDE; |
| 672 | 677 |
| 673 private: | 678 private: |
| 674 typedef GrGLProgramDataManager::UniformHandle UniformHandle; | 679 typedef GrGLProgramDataManager::UniformHandle UniformHandle; |
| 675 | 680 |
| 676 UniformHandle fProxyRectUniform; | 681 UniformHandle fProxyRectUniform; |
| 677 UniformHandle fProfileSizeUniform; | 682 UniformHandle fProfileSizeUniform; |
| 678 | 683 |
| 679 typedef GrGLFragmentProcessor INHERITED; | 684 typedef GrGLFragmentProcessor INHERITED; |
| 680 }; | 685 }; |
| 681 | 686 |
| 682 | |
| 683 | |
| 684 GrGLRectBlurEffect::GrGLRectBlurEffect(const GrBackendProcessorFactory& factory,
const GrProcessor&) | |
| 685 : INHERITED(factory) { | |
| 686 } | |
| 687 | |
| 688 void OutputRectBlurProfileLookup(GrGLFPFragmentBuilder* fsBuilder, | 687 void OutputRectBlurProfileLookup(GrGLFPFragmentBuilder* fsBuilder, |
| 689 const GrGLShaderBuilder::TextureSampler& sample
r, | 688 const GrGLShaderBuilder::TextureSampler& sample
r, |
| 690 const char *output, | 689 const char *output, |
| 691 const char *profileSize, const char *loc, | 690 const char *profileSize, const char *loc, |
| 692 const char *blurred_width, | 691 const char *blurred_width, |
| 693 const char *sharp_width) { | 692 const char *sharp_width) { |
| 694 fsBuilder->codeAppendf("\tfloat %s;\n", output); | 693 fsBuilder->codeAppendf("\tfloat %s;\n", output); |
| 695 fsBuilder->codeAppendf("\t\t{\n"); | 694 fsBuilder->codeAppendf("\t\t{\n"); |
| 696 fsBuilder->codeAppendf("\t\t\tfloat coord = (0.5 * (abs(2.0*%s - %s) - %s))/
%s;\n", | 695 fsBuilder->codeAppendf("\t\t\tfloat coord = (0.5 * (abs(2.0*%s - %s) - %s))/
%s;\n", |
| 697 loc, blurred_width, sharp_width, profileSize); | 696 loc, blurred_width, sharp_width, profileSize); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 if (NULL == *blurProfileTexture) { | 786 if (NULL == *blurProfileTexture) { |
| 788 return false; | 787 return false; |
| 789 } | 788 } |
| 790 } | 789 } |
| 791 | 790 |
| 792 return true; | 791 return true; |
| 793 } | 792 } |
| 794 | 793 |
| 795 GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma, | 794 GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma, |
| 796 GrTexture *blur_profile) | 795 GrTexture *blur_profile) |
| 797 : INHERITED(), | 796 : fRect(rect), |
| 798 fRect(rect), | |
| 799 fSigma(sigma), | 797 fSigma(sigma), |
| 800 fBlurProfileAccess(blur_profile) { | 798 fBlurProfileAccess(blur_profile) { |
| 801 this->addTextureAccess(&fBlurProfileAccess); | 799 this->addTextureAccess(&fBlurProfileAccess); |
| 802 this->setWillReadFragmentPosition(); | 800 this->setWillReadFragmentPosition(); |
| 803 } | 801 } |
| 804 | 802 |
| 805 GrRectBlurEffect::~GrRectBlurEffect() { | 803 GrRectBlurEffect::~GrRectBlurEffect() { |
| 806 } | 804 } |
| 807 | 805 |
| 808 const GrBackendFragmentProcessorFactory& GrRectBlurEffect::getFactory() const { | 806 void GrRectBlurEffect::getGLProcessorKey(const GrGLCaps& caps, |
| 809 return GrTBackendFragmentProcessorFactory<GrRectBlurEffect>::getInstance(); | 807 GrProcessorKeyBuilder* b) const { |
| 808 GrGLRectBlurEffect::GenKey(*this, caps, b); |
| 809 } |
| 810 |
| 811 GrGLFragmentProcessor* GrRectBlurEffect::createGLInstance() const { |
| 812 return SkNEW_ARGS(GrGLRectBlurEffect, (*this)); |
| 810 } | 813 } |
| 811 | 814 |
| 812 bool GrRectBlurEffect::onIsEqual(const GrFragmentProcessor& sBase) const { | 815 bool GrRectBlurEffect::onIsEqual(const GrFragmentProcessor& sBase) const { |
| 813 const GrRectBlurEffect& s = sBase.cast<GrRectBlurEffect>(); | 816 const GrRectBlurEffect& s = sBase.cast<GrRectBlurEffect>(); |
| 814 return this->getSigma() == s.getSigma() && this->getRect() == s.getRect(); | 817 return this->getSigma() == s.getSigma() && this->getRect() == s.getRect(); |
| 815 } | 818 } |
| 816 | 819 |
| 817 void GrRectBlurEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const
{ | 820 void GrRectBlurEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const
{ |
| 818 inout->mulByUnknownAlpha(); | 821 inout->mulByUnknownAlpha(); |
| 819 } | 822 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 if (!am.setIdentity(context, grp)) { | 866 if (!am.setIdentity(context, grp)) { |
| 864 return false; | 867 return false; |
| 865 } | 868 } |
| 866 | 869 |
| 867 grp->addCoverageProcessor(fp); | 870 grp->addCoverageProcessor(fp); |
| 868 | 871 |
| 869 context->drawRect(*grp, rect); | 872 context->drawRect(*grp, rect); |
| 870 return true; | 873 return true; |
| 871 } | 874 } |
| 872 | 875 |
| 873 class GrGLRRectBlurEffect; | |
| 874 | |
| 875 class GrRRectBlurEffect : public GrFragmentProcessor { | 876 class GrRRectBlurEffect : public GrFragmentProcessor { |
| 876 public: | 877 public: |
| 877 | 878 |
| 878 static GrFragmentProcessor* Create(GrContext* context, float sigma, const Sk
RRect&); | 879 static GrFragmentProcessor* Create(GrContext* context, float sigma, const Sk
RRect&); |
| 879 | 880 |
| 880 virtual ~GrRRectBlurEffect() {}; | 881 virtual ~GrRRectBlurEffect() {}; |
| 881 static const char* Name() { return "GrRRectBlur"; } | 882 virtual const char* name() const SK_OVERRIDE { return "GrRRectBlur"; } |
| 882 | 883 |
| 883 const SkRRect& getRRect() const { return fRRect; } | 884 const SkRRect& getRRect() const { return fRRect; } |
| 884 float getSigma() const { return fSigma; } | 885 float getSigma() const { return fSigma; } |
| 885 | 886 |
| 886 typedef GrGLRRectBlurEffect GLProcessor; | 887 virtual void getGLProcessorKey(const GrGLCaps& caps, |
| 888 GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
| 887 | 889 |
| 888 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR
IDE; | 890 virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; |
| 891 |
| 892 virtual uint32_t classID() const { |
| 893 static uint32_t id = GenClassID(); |
| 894 return id; |
| 895 } |
| 889 | 896 |
| 890 private: | 897 private: |
| 891 GrRRectBlurEffect(float sigma, const SkRRect&, GrTexture* profileTexture); | 898 GrRRectBlurEffect(float sigma, const SkRRect&, GrTexture* profileTexture); |
| 892 | 899 |
| 893 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE; | 900 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE; |
| 894 | 901 |
| 895 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE
RRIDE; | 902 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE
RRIDE; |
| 896 | 903 |
| 897 SkRRect fRRect; | 904 SkRRect fRRect; |
| 898 float fSigma; | 905 float fSigma; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 return NULL; | 981 return NULL; |
| 975 } | 982 } |
| 976 | 983 |
| 977 return SkNEW_ARGS(GrRRectBlurEffect, (sigma, rrect, blurNinePatchTexture)); | 984 return SkNEW_ARGS(GrRRectBlurEffect, (sigma, rrect, blurNinePatchTexture)); |
| 978 } | 985 } |
| 979 | 986 |
| 980 void GrRRectBlurEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const
{ | 987 void GrRRectBlurEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const
{ |
| 981 inout->mulByUnknownAlpha(); | 988 inout->mulByUnknownAlpha(); |
| 982 } | 989 } |
| 983 | 990 |
| 984 const GrBackendFragmentProcessorFactory& GrRRectBlurEffect::getFactory() const { | |
| 985 return GrTBackendFragmentProcessorFactory<GrRRectBlurEffect>::getInstance(); | |
| 986 } | |
| 987 | |
| 988 GrRRectBlurEffect::GrRRectBlurEffect(float sigma, const SkRRect& rrect, GrTextur
e *ninePatchTexture) | 991 GrRRectBlurEffect::GrRRectBlurEffect(float sigma, const SkRRect& rrect, GrTextur
e *ninePatchTexture) |
| 989 : fRRect(rrect), | 992 : fRRect(rrect), |
| 990 fSigma(sigma), | 993 fSigma(sigma), |
| 991 fNinePatchAccess(ninePatchTexture) { | 994 fNinePatchAccess(ninePatchTexture) { |
| 992 this->addTextureAccess(&fNinePatchAccess); | 995 this->addTextureAccess(&fNinePatchAccess); |
| 993 this->setWillReadFragmentPosition(); | 996 this->setWillReadFragmentPosition(); |
| 994 } | 997 } |
| 995 | 998 |
| 996 bool GrRRectBlurEffect::onIsEqual(const GrFragmentProcessor& other) const { | 999 bool GrRRectBlurEffect::onIsEqual(const GrFragmentProcessor& other) const { |
| 997 const GrRRectBlurEffect& rrbe = other.cast<GrRRectBlurEffect>(); | 1000 const GrRRectBlurEffect& rrbe = other.cast<GrRRectBlurEffect>(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1012 SkScalar sigma = random->nextRangeF(1.f,10.f); | 1015 SkScalar sigma = random->nextRangeF(1.f,10.f); |
| 1013 SkRRect rrect; | 1016 SkRRect rrect; |
| 1014 rrect.setRectXY(SkRect::MakeWH(w, h), r, r); | 1017 rrect.setRectXY(SkRect::MakeWH(w, h), r, r); |
| 1015 return GrRRectBlurEffect::Create(context, sigma, rrect); | 1018 return GrRRectBlurEffect::Create(context, sigma, rrect); |
| 1016 } | 1019 } |
| 1017 | 1020 |
| 1018 ////////////////////////////////////////////////////////////////////////////// | 1021 ////////////////////////////////////////////////////////////////////////////// |
| 1019 | 1022 |
| 1020 class GrGLRRectBlurEffect : public GrGLFragmentProcessor { | 1023 class GrGLRRectBlurEffect : public GrGLFragmentProcessor { |
| 1021 public: | 1024 public: |
| 1022 GrGLRRectBlurEffect(const GrBackendProcessorFactory&, const GrProcessor&); | 1025 GrGLRRectBlurEffect(const GrProcessor&) {} |
| 1023 | 1026 |
| 1024 virtual void emitCode(GrGLFPBuilder*, | 1027 virtual void emitCode(GrGLFPBuilder*, |
| 1025 const GrFragmentProcessor&, | 1028 const GrFragmentProcessor&, |
| 1026 const char* outputColor, | 1029 const char* outputColor, |
| 1027 const char* inputColor, | 1030 const char* inputColor, |
| 1028 const TransformedCoordsArray&, | 1031 const TransformedCoordsArray&, |
| 1029 const TextureSamplerArray&) SK_OVERRIDE; | 1032 const TextureSamplerArray&) SK_OVERRIDE; |
| 1030 | 1033 |
| 1031 virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_O
VERRIDE; | 1034 virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_O
VERRIDE; |
| 1032 | 1035 |
| 1033 private: | 1036 private: |
| 1034 GrGLProgramDataManager::UniformHandle fProxyRectUniform; | 1037 GrGLProgramDataManager::UniformHandle fProxyRectUniform; |
| 1035 GrGLProgramDataManager::UniformHandle fCornerRadiusUniform; | 1038 GrGLProgramDataManager::UniformHandle fCornerRadiusUniform; |
| 1036 GrGLProgramDataManager::UniformHandle fBlurRadiusUniform; | 1039 GrGLProgramDataManager::UniformHandle fBlurRadiusUniform; |
| 1037 typedef GrGLFragmentProcessor INHERITED; | 1040 typedef GrGLFragmentProcessor INHERITED; |
| 1038 }; | 1041 }; |
| 1039 | 1042 |
| 1040 GrGLRRectBlurEffect::GrGLRRectBlurEffect(const GrBackendProcessorFactory& factor
y, | |
| 1041 const GrProcessor&) | |
| 1042 : INHERITED (factory) { | |
| 1043 } | |
| 1044 | |
| 1045 void GrGLRRectBlurEffect::emitCode(GrGLFPBuilder* builder, | 1043 void GrGLRRectBlurEffect::emitCode(GrGLFPBuilder* builder, |
| 1046 const GrFragmentProcessor&, | 1044 const GrFragmentProcessor&, |
| 1047 const char* outputColor, | 1045 const char* outputColor, |
| 1048 const char* inputColor, | 1046 const char* inputColor, |
| 1049 const TransformedCoordsArray&, | 1047 const TransformedCoordsArray&, |
| 1050 const TextureSamplerArray& samplers) { | 1048 const TextureSamplerArray& samplers) { |
| 1051 const char *rectName; | 1049 const char *rectName; |
| 1052 const char *cornerRadiusName; | 1050 const char *cornerRadiusName; |
| 1053 const char *blurRadiusName; | 1051 const char *blurRadiusName; |
| 1054 | 1052 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 SkRect rect = rrect.getBounds(); | 1107 SkRect rect = rrect.getBounds(); |
| 1110 rect.outset(blurRadius, blurRadius); | 1108 rect.outset(blurRadius, blurRadius); |
| 1111 pdman.set4f(fProxyRectUniform, rect.fLeft, rect.fTop, rect.fRight, rect.fBot
tom); | 1109 pdman.set4f(fProxyRectUniform, rect.fLeft, rect.fTop, rect.fRight, rect.fBot
tom); |
| 1112 | 1110 |
| 1113 SkScalar radius = 0; | 1111 SkScalar radius = 0; |
| 1114 SkASSERT(rrect.isSimpleCircular() || rrect.isRect()); | 1112 SkASSERT(rrect.isSimpleCircular() || rrect.isRect()); |
| 1115 radius = rrect.getSimpleRadii().fX; | 1113 radius = rrect.getSimpleRadii().fX; |
| 1116 pdman.set1f(fCornerRadiusUniform, radius); | 1114 pdman.set1f(fCornerRadiusUniform, radius); |
| 1117 } | 1115 } |
| 1118 | 1116 |
| 1117 void GrRRectBlurEffect::getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBu
ilder* b) const { |
| 1118 GrGLRRectBlurEffect::GenKey(*this, caps, b); |
| 1119 } |
| 1120 |
| 1121 GrGLFragmentProcessor* GrRRectBlurEffect::createGLInstance() const { |
| 1122 return SkNEW_ARGS(GrGLRRectBlurEffect, (*this)); |
| 1123 } |
| 1119 | 1124 |
| 1120 bool SkBlurMaskFilterImpl::directFilterRRectMaskGPU(GrContext* context, | 1125 bool SkBlurMaskFilterImpl::directFilterRRectMaskGPU(GrContext* context, |
| 1121 GrPaint* grp, | 1126 GrPaint* grp, |
| 1122 const SkStrokeRec& strokeRec
, | 1127 const SkStrokeRec& strokeRec
, |
| 1123 const SkRRect& rrect) const
{ | 1128 const SkRRect& rrect) const
{ |
| 1124 if (fBlurStyle != kNormal_SkBlurStyle) { | 1129 if (fBlurStyle != kNormal_SkBlurStyle) { |
| 1125 return false; | 1130 return false; |
| 1126 } | 1131 } |
| 1127 | 1132 |
| 1128 if (!strokeRec.isFillStyle()) { | 1133 if (!strokeRec.isFillStyle()) { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 } else { | 1270 } else { |
| 1266 str->append("None"); | 1271 str->append("None"); |
| 1267 } | 1272 } |
| 1268 str->append("))"); | 1273 str->append("))"); |
| 1269 } | 1274 } |
| 1270 #endif | 1275 #endif |
| 1271 | 1276 |
| 1272 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) | 1277 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) |
| 1273 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) | 1278 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) |
| 1274 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1279 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |