From 60aaeb2b551d5e3e90baacac315e899e26f758f1 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Fri, 3 Nov 2017 08:06:09 -0400 Subject: 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 Commit-Queue: Cary Clark --- include/core/SkImageFilter.h | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'include/core/SkImageFilter.h') 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 filterImage(SkSpecialImage* src, const Context&, SkIPoint* offset) const; + sk_sp 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 makeWithLocalMatrix(const SkMatrix&) const; + sk_sp 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 -- cgit v1.2.3