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

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

Issue 1955633002: Take SkStrokeRec::InitStyle rather than SkPaint::Style in mask filter and DrawMask (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix xps change Created 4 years, 7 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 | « src/core/SkRasterizer.cpp ('k') | src/effects/SkLayerRasterizer.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 * 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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 SkRect smallRect; 984 SkRect smallRect;
985 smallRect.setWH(SkIntToScalar(smallRectSide), SkIntToScalar(smallRectSid e)); 985 smallRect.setWH(SkIntToScalar(smallRectSide), SkIntToScalar(smallRectSid e));
986 986
987 SkRRect smallRRect; 987 SkRRect smallRRect;
988 smallRRect.setRectXY(smallRect, SkIntToScalar(cornerRadius), SkIntToScal ar(cornerRadius)); 988 smallRRect.setRectXY(smallRect, SkIntToScalar(cornerRadius), SkIntToScal ar(cornerRadius));
989 989
990 SkPath path; 990 SkPath path;
991 path.addRRect(smallRRect); 991 path.addRRect(smallRRect);
992 992
993 SkDraw::DrawToMask(path, &mask.fBounds, nullptr, nullptr, &mask, 993 SkDraw::DrawToMask(path, &mask.fBounds, nullptr, nullptr, &mask,
994 SkMask::kJustRenderImage_CreateMode, SkPaint::kFill_S tyle); 994 SkMask::kJustRenderImage_CreateMode, SkStrokeRec::kFi ll_InitStyle);
995 995
996 SkMask blurredMask; 996 SkMask blurredMask;
997 if (!SkBlurMask::BoxBlur(&blurredMask, mask, sigma, kNormal_SkBlurStyle, 997 if (!SkBlurMask::BoxBlur(&blurredMask, mask, sigma, kNormal_SkBlurStyle,
998 kHigh_SkBlurQuality, nullptr, true)) { 998 kHigh_SkBlurQuality, nullptr, true)) {
999 return nullptr; 999 return nullptr;
1000 } 1000 }
1001 1001
1002 unsigned int texSide = smallRectSide + 2*blurRadius; 1002 unsigned int texSide = smallRectSide + 2*blurRadius;
1003 GrSurfaceDesc texDesc; 1003 GrSurfaceDesc texDesc;
1004 texDesc.fWidth = texSide; 1004 texDesc.fWidth = texSide;
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 } else { 1316 } else {
1317 str->append("None"); 1317 str->append("None");
1318 } 1318 }
1319 str->append("))"); 1319 str->append("))");
1320 } 1320 }
1321 #endif 1321 #endif
1322 1322
1323 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1323 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1324 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1324 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1325 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1325 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/core/SkRasterizer.cpp ('k') | src/effects/SkLayerRasterizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698