diff options
author | Mike Reed <reed@google.com> | 2018-03-05 16:56:52 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-06 15:12:16 +0000 |
commit | 28d47731a1488009eed98c3ddfff2df2c95753c8 (patch) | |
tree | 8a7ac87f37f5df95ba67bb78c50a00891ae066b1 /tests | |
parent | 0c4b7b1f2f1dd37204d401a6993119e5431942a6 (diff) |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/BlurTest.cpp | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/tests/BlurTest.cpp b/tests/BlurTest.cpp index 29c44d7886..b84fb4ca14 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 @@ DEF_TEST(BlurredRRectNinePatchComputation, reporter) { 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 @@ DEF_TEST(BlurredRRectNinePatchComputation, reporter) { 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 @@ DEF_TEST(BlurredRRectNinePatchComputation, reporter) { 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 @@ DEF_TEST(BlurredRRectNinePatchComputation, reporter) { 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 @@ DEF_TEST(BlurredRRectNinePatchComputation, reporter) { continue; } - ninePatchable = SkBlurMaskFilter::ComputeBlurredRRectParams( - rr, rr, occluder, + ninePatchable = SkComputeBlurredRRectParams(rr, rr, occluder, kBlurRad, kBlurRad, &rrectToDraw, &size, rectXs, rectYs, texXs, texYs, |