aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar hcm <hcm@google.com>2014-10-27 20:55:01 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-27 20:55:01 -0700
commitd0f1969100a0c00f41166f2fe616de56d44f4a59 (patch)
tree6e84e12ef702ed1618473e8316a53f4b0feb6a6b /include
parent4984d473aba2c3ca2dc3ce834978718d4b9d56a8 (diff)
Revert of Fix bounds computation of all 0-input filters. (patchset #2 id:20001 of https://codereview.chromium.org/681643003/)
Reason for revert: try again Original issue's description: > Fix bounds computation of all 0-input filters. > > The SkRectShaderImageFilter had the same bug as previously fixed for > SkBitmapSource and SkPictureImageFilter. Rather than copy-and-paste > the implementation, this change makes all filters with 0 inputs return > their source bounds, instead of returning false. > > BUG=427251 > > Committed: https://skia.googlesource.com/skia/+/ba036cc82b5a543a13cafd11a19ba0e3087fca38 TBR=bsalomon@google.com,senorblanco@chromium.org NOTREECHECKS=true NOTRY=true BUG=427251 Review URL: https://codereview.chromium.org/678273002
Diffstat (limited to 'include')
-rw-r--r--include/effects/SkBitmapSource.h1
-rw-r--r--include/effects/SkPictureImageFilter.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/effects/SkBitmapSource.h b/include/effects/SkBitmapSource.h
index 27c7ae204f..9004a462fc 100644
--- a/include/effects/SkBitmapSource.h
+++ b/include/effects/SkBitmapSource.h
@@ -34,6 +34,7 @@ protected:
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
+ virtual bool onFilterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect* dst) const SK_OVERRIDE;
private:
SkBitmap fBitmap;
diff --git a/include/effects/SkPictureImageFilter.h b/include/effects/SkPictureImageFilter.h
index ed5c63c18a..fbd04f097a 100644
--- a/include/effects/SkPictureImageFilter.h
+++ b/include/effects/SkPictureImageFilter.h
@@ -46,6 +46,8 @@ protected:
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
+ virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&,
+ SkIRect* dst) const SK_OVERRIDE;
private:
const SkPicture* fPicture;