make compute helper for blurs private
Precursor for moving blurmaskfilter into core, since it is referenced
by core code for drawShadow.
Bug: skia:
Change-Id: I900c6e10523115c75f45d2c410eb6a5ca56a6e4d
Reviewed-on: https://skia-review.googlesource.com/112301
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/tests/BlurTest.cpp b/tests/BlurTest.cpp
index 29c44d7..b84fb4c 100644
--- a/tests/BlurTest.cpp
+++ b/tests/BlurTest.cpp
@@ -8,6 +8,7 @@
#include "SkBlurMask.h"
#include "SkBlurMaskFilter.h"
#include "SkBlurDrawLooper.h"
+#include "SkBlurPriv.h"
#include "SkCanvas.h"
#include "SkColorFilter.h"
#include "SkColorPriv.h"
@@ -522,8 +523,10 @@
bool ninePatchable;
SkRRect rrectToDraw;
SkISize size;
- SkScalar rectXs[SkBlurMaskFilter::kMaxDivisions], rectYs[SkBlurMaskFilter::kMaxDivisions];
- SkScalar texXs[SkBlurMaskFilter::kMaxDivisions], texYs[SkBlurMaskFilter::kMaxDivisions];
+ SkScalar rectXs[kSkBlurRRectMaxDivisions],
+ rectYs[kSkBlurRRectMaxDivisions];
+ SkScalar texXs[kSkBlurRRectMaxDivisions],
+ texYs[kSkBlurRRectMaxDivisions];
int numX, numY;
uint32_t skipMask;
@@ -534,11 +537,11 @@
SkRRect rr;
rr.setRectRadii(r, radii);
- ninePatchable = SkBlurMaskFilter::ComputeBlurredRRectParams(rr, rr, SkRect::MakeEmpty(),
- kBlurRad, kBlurRad,
- &rrectToDraw, &size,
- rectXs, rectYs, texXs, texYs,
- &numX, &numY, &skipMask);
+ ninePatchable = SkComputeBlurredRRectParams(rr, rr, SkRect::MakeEmpty(),
+ kBlurRad, kBlurRad,
+ &rrectToDraw, &size,
+ rectXs, rectYs, texXs, texYs,
+ &numX, &numY, &skipMask);
REPORTER_ASSERT(reporter, !ninePatchable);
}
@@ -548,11 +551,11 @@
SkRRect rr;
rr.setRectXY(r, kCornerRad, kCornerRad);
- ninePatchable = SkBlurMaskFilter::ComputeBlurredRRectParams(rr, rr, SkRect::MakeEmpty(),
- kBlurRad, kBlurRad,
- &rrectToDraw, &size,
- rectXs, rectYs, texXs, texYs,
- &numX, &numY, &skipMask);
+ ninePatchable = SkComputeBlurredRRectParams(rr, rr, SkRect::MakeEmpty(),
+ kBlurRad, kBlurRad,
+ &rrectToDraw, &size,
+ rectXs, rectYs, texXs, texYs,
+ &numX, &numY, &skipMask);
static const SkScalar kAns = 12.0f * kBlurRad + 2.0f * kCornerRad + 1.0f;
REPORTER_ASSERT(reporter, ninePatchable);
@@ -569,11 +572,11 @@
SkRRect rr;
rr.setRectXY(r, kXCornerRad, kYCornerRad);
- ninePatchable = SkBlurMaskFilter::ComputeBlurredRRectParams(rr, rr, SkRect::MakeEmpty(),
- kBlurRad, kBlurRad,
- &rrectToDraw, &size,
- rectXs, rectYs, texXs, texYs,
- &numX, &numY, &skipMask);
+ ninePatchable = SkComputeBlurredRRectParams(rr, rr, SkRect::MakeEmpty(),
+ kBlurRad, kBlurRad,
+ &rrectToDraw, &size,
+ rectXs, rectYs, texXs, texYs,
+ &numX, &numY, &skipMask);
static const SkScalar kXAns = 12.0f * kBlurRad + 2.0f * kXCornerRad + 1.0f;
static const SkScalar kYAns = 12.0f * kBlurRad + 2.0f * kYCornerRad + 1.0f;
@@ -614,8 +617,7 @@
continue;
}
- ninePatchable = SkBlurMaskFilter::ComputeBlurredRRectParams(
- rr, rr, occluder,
+ ninePatchable = SkComputeBlurredRRectParams(rr, rr, occluder,
kBlurRad, kBlurRad,
&rrectToDraw, &size,
rectXs, rectYs, texXs, texYs,