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

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

Issue 1409753008: Rename non-aa rect methods on GrDrawContext in anticipation of making them support aa (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 1 month 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/core/SkImageFilter.cpp ('k') | src/effects/SkGpuBlurUtils.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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 return false; 886 return false;
887 } 887 }
888 888
889 grp->addCoverageFragmentProcessor(fp); 889 grp->addCoverageFragmentProcessor(fp);
890 890
891 SkMatrix inverse; 891 SkMatrix inverse;
892 if (!viewMatrix.invert(&inverse)) { 892 if (!viewMatrix.invert(&inverse)) {
893 return false; 893 return false;
894 } 894 }
895 895
896 drawContext->drawNonAARectWithLocalMatrix(clip, *grp, SkMatrix::I(), rect, i nverse); 896 drawContext->fillRectWithLocalMatrix(clip, *grp, SkMatrix::I(), rect, invers e);
897 return true; 897 return true;
898 } 898 }
899 899
900 ////////////////////////////////////////////////////////////////////////////// 900 //////////////////////////////////////////////////////////////////////////////
901 901
902 class GrRRectBlurEffect : public GrFragmentProcessor { 902 class GrRRectBlurEffect : public GrFragmentProcessor {
903 public: 903 public:
904 904
905 static const GrFragmentProcessor* Create(GrTextureProvider*, float sigma, co nst SkRRect&); 905 static const GrFragmentProcessor* Create(GrTextureProvider*, float sigma, co nst SkRRect&);
906 906
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 return false; 1167 return false;
1168 } 1168 }
1169 1169
1170 grp->addCoverageFragmentProcessor(fp); 1170 grp->addCoverageFragmentProcessor(fp);
1171 1171
1172 SkMatrix inverse; 1172 SkMatrix inverse;
1173 if (!viewMatrix.invert(&inverse)) { 1173 if (!viewMatrix.invert(&inverse)) {
1174 return false; 1174 return false;
1175 } 1175 }
1176 1176
1177 drawContext->drawNonAARectWithLocalMatrix(clip, *grp, SkMatrix::I(), proxyRe ct, inverse); 1177 drawContext->fillRectWithLocalMatrix(clip, *grp, SkMatrix::I(), proxyRect, i nverse);
1178 return true; 1178 return true;
1179 } 1179 }
1180 1180
1181 bool SkBlurMaskFilterImpl::canFilterMaskGPU(const SkRRect& devRRect, 1181 bool SkBlurMaskFilterImpl::canFilterMaskGPU(const SkRRect& devRRect,
1182 const SkIRect& clipBounds, 1182 const SkIRect& clipBounds,
1183 const SkMatrix& ctm, 1183 const SkMatrix& ctm,
1184 SkRect* maskRect) const { 1184 SkRect* maskRect) const {
1185 SkScalar xformedSigma = this->computeXformedSigma(ctm); 1185 SkScalar xformedSigma = this->computeXformedSigma(ctm);
1186 if (xformedSigma <= 0) { 1186 if (xformedSigma <= 0) {
1187 return false; 1187 return false;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 } else { 1300 } else {
1301 str->append("None"); 1301 str->append("None");
1302 } 1302 }
1303 str->append("))"); 1303 str->append("))");
1304 } 1304 }
1305 #endif 1305 #endif
1306 1306
1307 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1307 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1308 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1308 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1309 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1309 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698