diff options
author | 2017-11-03 08:06:09 -0400 | |
---|---|---|
committer | 2017-11-03 13:56:30 +0000 | |
commit | 60aaeb2b551d5e3e90baacac315e899e26f758f1 (patch) | |
tree | 7749aef06d37c83be8776c9355468cfbccaad6c4 /include/core/SkImageFilter.h | |
parent | e657dc8ce6cb17136dfd21be905b97a3957e957e (diff) |
create imagepriv and name params
Named all parameters and made the names consistent
for documentation.
Moved SK_IMAGEFILTER_UNFLATTEN_COMMON to private file.
TBR=reed@google.com
Bug: skia:6898
Change-Id: I1343d2b16d4217088fa3bc9c40f1f4177fa32740
Reviewed-on: https://skia-review.googlesource.com/66521
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'include/core/SkImageFilter.h')
-rw-r--r-- | include/core/SkImageFilter.h | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h index 0991bea63f..a1fa789a03 100644 --- a/include/core/SkImageFilter.h +++ b/include/core/SkImageFilter.h @@ -101,7 +101,7 @@ public: * Note: imageBounds is in "device" space, as the output cropped rectangle will be, * so the matrix is ignored for those. It is only applied the croprect's bounds. */ - void applyTo(const SkIRect& imageBounds, const SkMatrix&, bool embiggen, + void applyTo(const SkIRect& imageBounds, const SkMatrix& matrix, bool embiggen, SkIRect* cropped) const; private: @@ -130,11 +130,12 @@ public: * TODO: Right now the imagefilters sometimes return empty result bitmaps/ * specialimages. That doesn't seem quite right. */ - sk_sp<SkSpecialImage> filterImage(SkSpecialImage* src, const Context&, SkIPoint* offset) const; + sk_sp<SkSpecialImage> filterImage(SkSpecialImage* src, const Context& context, + SkIPoint* offset) const; enum MapDirection { kForward_MapDirection, - kReverse_MapDirection + kReverse_MapDirection, }; /** * Map a device-space rect recursively forward or backward through the @@ -211,7 +212,7 @@ public: CropRect getCropRect() const { return fCropRect; } // Default impl returns union of all input bounds. - virtual SkRect computeFastBounds(const SkRect&) const; + virtual SkRect computeFastBounds(const SkRect& bounds) const; // Can this filter DAG compute the resulting bounds of an object-space rectangle? bool canComputeFastBounds() const; @@ -220,7 +221,7 @@ public: * If this filter can be represented by another filter + a localMatrix, return that filter, * else return null. */ - sk_sp<SkImageFilter> makeWithLocalMatrix(const SkMatrix&) const; + sk_sp<SkImageFilter> makeWithLocalMatrix(const SkMatrix& matrix) const; /** * ImageFilters can natively handle scaling and translate components in the CTM. Only some of @@ -433,15 +434,4 @@ private: typedef SkFlattenable INHERITED; }; -/** - * Helper to unflatten the common data, and return nullptr if we fail. - */ -#define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ - Common localVar; \ - do { \ - if (!localVar.unflatten(buffer, expectedCount)) { \ - return nullptr; \ - } \ - } while (0) - #endif |