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

Unified Diff: include/effects/SkBlurMaskFilter.h

Issue 2248533002: Update ComputeBlurredRRectParams to compute all the parameters needed for occluded blurred rrect ni… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix indentation 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkBlurMaskFilter.h
diff --git a/include/effects/SkBlurMaskFilter.h b/include/effects/SkBlurMaskFilter.h
index 12eec6052f80768f69a0488c100c489aca67463c..dfbae6b689a25ecd64f5a2de4cc7c6731c2ef37f 100644
--- a/include/effects/SkBlurMaskFilter.h
+++ b/include/effects/SkBlurMaskFilter.h
@@ -73,15 +73,27 @@ public:
SkScalar blurRadius);
#endif
- static bool ComputeBlurredRRectParams(const SkRRect& rrect,
- SkScalar sigma,
+ static const int kMaxDivisions = 6;
+
+ // This method computes all the parameters for drawing a partially occluded nine-patched
+ // blurred rrect mask:
+ // rrectToDraw - the integerized rrect to draw in the mask
+ // widthHeight - how large to make the mask (rrectToDraw will be centered in this coord sys)
+ // rectXs, rectYs - the x & y coordinates of the covering geometry lattice
+ // texXs, texYs - the texture coordinate at each point in rectXs & rectYs
+ // numXs, numYs - number of coordinates in the x & y directions
+ // skipMask - bit mask that contains a 1-bit whenever one of the cells is occluded
+ // It returns true if 'devRRect' is nine-patchable
+ static bool ComputeBlurredRRectParams(const SkRRect& srcRRect, const SkRRect& devRRect,
+ const SkRect& occluder,
+ SkScalar sigma, SkScalar xformedSigma,
SkRRect* rrectToDraw,
SkISize* widthHeight,
- SkScalar xs[4],
- int* numXs,
- SkScalar ys[4],
- int* numYs);
-
+ SkScalar rectXs[kMaxDivisions],
+ SkScalar rectYs[kMaxDivisions],
+ SkScalar texXs[kMaxDivisions],
+ SkScalar texYs[kMaxDivisions],
+ int* numXs, int* numYs, uint32_t* skipMask);
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
« no previous file with comments | « no previous file | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698