diff options
author | senorblanco <senorblanco@chromium.org> | 2016-02-01 10:32:42 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-01 10:32:42 -0800 |
commit | 6404981b0c3984ba91b3bda35e60c6c8a8a773c2 (patch) | |
tree | 04cb394b4fae9e9b73c83f42d25f06010cbffc54 /gm | |
parent | 0575c495bcdc33176446a43a5214d30668788dc7 (diff) |
Fix zero-sized blur with crop rect.
Neither the GPU nor CPU paths were correctly handling the crop rect
in this case.
NOTE: this change adds a new test case to the imageblurcropped GM, so
it will have to be rebaselined.
BUG=skia:4876
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1657773002
Review URL: https://codereview.chromium.org/1657773002
Diffstat (limited to 'gm')
-rw-r--r-- | gm/imagefilterscropped.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gm/imagefilterscropped.cpp b/gm/imagefilterscropped.cpp index 4c6ef62356..d39e6b026a 100644 --- a/gm/imagefilterscropped.cpp +++ b/gm/imagefilterscropped.cpp @@ -72,11 +72,11 @@ public: ImageFiltersCroppedGM () {} protected: - virtual SkString onShortName() override { + SkString onShortName() override { return SkString("imagefilterscropped"); } - virtual SkISize onISize() override { return SkISize::Make(400, 880); } + SkISize onISize() override { return SkISize::Make(400, 960); } void make_checkerboard() { fCheckerboard.allocN32Pixels(80, 80); @@ -131,6 +131,7 @@ protected: SkImageFilter* filters[] = { nullptr, SkColorFilterImageFilter::Create(cf.get(), nullptr, &cropRect), + SkBlurImageFilter::Create(0.0f, 0.0f, nullptr, &cropRect), SkBlurImageFilter::Create(1.0f, 1.0f, nullptr, &cropRect), SkBlurImageFilter::Create(8.0f, 0.0f, nullptr, &cropRect), SkBlurImageFilter::Create(0.0f, 8.0f, nullptr, &cropRect), |