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

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

Issue 2262263002: Remove quantization of device-space dest rect for Ganesh analytic rrect blurs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months 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 | « no previous file | no next file » | 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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBlurMaskFilter.h" 8 #include "SkBlurMaskFilter.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkGpuBlurUtils.h" 10 #include "SkGpuBlurUtils.h"
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 if (!strokeRec.isFillStyle()) { 1027 if (!strokeRec.isFillStyle()) {
1028 return false; 1028 return false;
1029 } 1029 }
1030 1030
1031 SkScalar xformedSigma = this->computeXformedSigma(viewMatrix); 1031 SkScalar xformedSigma = this->computeXformedSigma(viewMatrix);
1032 1032
1033 sk_sp<GrFragmentProcessor> fp; 1033 sk_sp<GrFragmentProcessor> fp;
1034 1034
1035 SkRect rect; 1035 SkRect rect;
1036 if (path.isRect(&rect)) { 1036 if (path.isRect(&rect)) {
1037 int pad = SkScalarCeilToInt(6*xformedSigma)/2; 1037 SkScalar pad = 3.0f * xformedSigma;
1038 rect.outset(SkIntToScalar(pad), SkIntToScalar(pad)); 1038 rect.outset(pad, pad);
1039 1039
1040 fp = GrRectBlurEffect::Make(texProvider, rect, xformedSigma); 1040 fp = GrRectBlurEffect::Make(texProvider, rect, xformedSigma);
1041 } else if (path.isOval(&rect) && SkScalarNearlyEqual(rect.width(), rect.heig ht())) { 1041 } else if (path.isOval(&rect) && SkScalarNearlyEqual(rect.width(), rect.heig ht())) {
1042 fp = GrCircleBlurFragmentProcessor::Make(texProvider, rect, xformedSigma ); 1042 fp = GrCircleBlurFragmentProcessor::Make(texProvider, rect, xformedSigma );
1043 1043
1044 // expand the rect for the coverage geometry 1044 // expand the rect for the coverage geometry
1045 int pad = SkScalarCeilToInt(6*xformedSigma)/2; 1045 int pad = SkScalarCeilToInt(6*xformedSigma)/2;
1046 rect.outset(SkIntToScalar(pad), SkIntToScalar(pad)); 1046 rect.outset(SkIntToScalar(pad), SkIntToScalar(pad));
1047 } else { 1047 } else {
1048 return false; 1048 return false;
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 } else { 1550 } else {
1551 str->append("None"); 1551 str->append("None");
1552 } 1552 }
1553 str->append("))"); 1553 str->append("))");
1554 } 1554 }
1555 #endif 1555 #endif
1556 1556
1557 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1557 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1558 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1558 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1559 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1559 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698