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

Unified Diff: include/core/SkImageFilter.h

Issue 23011012: Implement correct clipping for image filters. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Cleanup Created 6 years, 11 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
Index: include/core/SkImageFilter.h
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index 37993c0ea3e2a527eafb2709061341c3e8fe86f3..e0439f201c1f45143b6e57d8918a857d7ea6ed39 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -83,7 +83,7 @@ public:
* Given the src bounds of an image, this returns the bounds of the result
* image after the filter has been applied.
*/
- bool filterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect* dst);
+ bool filterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect* dst) const;
/**
* Returns true if the filter can be processed on the GPU. This is most
@@ -188,8 +188,9 @@ protected:
*/
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
SkBitmap* result, SkIPoint* offset);
- // Default impl copies src into dst and returns true
- virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*);
+ // Default impl recursively unions all input bounds, or returns false
+ // if no inputs.
reed1 2014/02/04 15:30:08 Perhaps augment dox: - Given the bounds of the sr
Stephen White 2014/02/04 16:01:41 Done, although I've changed the wording slightly.
+ virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const;
// Applies "matrix" to the crop rect, and sets "rect" to the intersection of
// "rect" and the transformed crop rect. If there is no overlap, returns

Powered by Google App Engine
This is Rietveld 408576698