Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: src/effects/SkBlurMaskFilter.cpp

Issue 791743003: Remove GP from drawstate, revision of invariant output for GP (Closed) Base URL: https://skia.googlesource.com/skia.git@color-to-gp
Patch Set: more windows fix Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 GrGLFragmentProcessor* GrRectBlurEffect::createGLInstance() const { 810 GrGLFragmentProcessor* GrRectBlurEffect::createGLInstance() const {
811 return SkNEW_ARGS(GrGLRectBlurEffect, (*this)); 811 return SkNEW_ARGS(GrGLRectBlurEffect, (*this));
812 } 812 }
813 813
814 bool GrRectBlurEffect::onIsEqual(const GrFragmentProcessor& sBase) const { 814 bool GrRectBlurEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
815 const GrRectBlurEffect& s = sBase.cast<GrRectBlurEffect>(); 815 const GrRectBlurEffect& s = sBase.cast<GrRectBlurEffect>();
816 return this->getSigma() == s.getSigma() && this->getRect() == s.getRect(); 816 return this->getSigma() == s.getSigma() && this->getRect() == s.getRect();
817 } 817 }
818 818
819 void GrRectBlurEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const { 819 void GrRectBlurEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
820 inout->mulByUnknownAlpha(); 820 inout->mulByUnknownSingleComponent();
821 } 821 }
822 822
823 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRectBlurEffect); 823 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRectBlurEffect);
824 824
825 GrFragmentProcessor* GrRectBlurEffect::TestCreate(SkRandom* random, 825 GrFragmentProcessor* GrRectBlurEffect::TestCreate(SkRandom* random,
826 GrContext* context, 826 GrContext* context,
827 const GrDrawTargetCaps&, 827 const GrDrawTargetCaps&,
828 GrTexture**) { 828 GrTexture**) {
829 float sigma = random->nextRangeF(3,8); 829 float sigma = random->nextRangeF(3,8);
830 float width = random->nextRangeF(200,300); 830 float width = random->nextRangeF(200,300);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 972
973 SkAutoTUnref<GrTexture> blurunref(blurNinePatchTexture); 973 SkAutoTUnref<GrTexture> blurunref(blurNinePatchTexture);
974 if (NULL == blurNinePatchTexture) { 974 if (NULL == blurNinePatchTexture) {
975 return NULL; 975 return NULL;
976 } 976 }
977 977
978 return SkNEW_ARGS(GrRRectBlurEffect, (sigma, rrect, blurNinePatchTexture)); 978 return SkNEW_ARGS(GrRRectBlurEffect, (sigma, rrect, blurNinePatchTexture));
979 } 979 }
980 980
981 void GrRRectBlurEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const { 981 void GrRRectBlurEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
982 inout->mulByUnknownAlpha(); 982 inout->mulByUnknownSingleComponent();
983 } 983 }
984 984
985 GrRRectBlurEffect::GrRRectBlurEffect(float sigma, const SkRRect& rrect, GrTextur e *ninePatchTexture) 985 GrRRectBlurEffect::GrRRectBlurEffect(float sigma, const SkRRect& rrect, GrTextur e *ninePatchTexture)
986 : fRRect(rrect), 986 : fRRect(rrect),
987 fSigma(sigma), 987 fSigma(sigma),
988 fNinePatchAccess(ninePatchTexture) { 988 fNinePatchAccess(ninePatchTexture) {
989 this->initClassID<GrRRectBlurEffect>(); 989 this->initClassID<GrRRectBlurEffect>();
990 this->addTextureAccess(&fNinePatchAccess); 990 this->addTextureAccess(&fNinePatchAccess);
991 this->setWillReadFragmentPosition(); 991 this->setWillReadFragmentPosition();
992 } 992 }
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 } else { 1268 } else {
1269 str->append("None"); 1269 str->append("None");
1270 } 1270 }
1271 str->append("))"); 1271 str->append("))");
1272 } 1272 }
1273 #endif 1273 #endif
1274 1274
1275 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1275 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1276 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1276 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1277 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1277 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698