diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-24 13:18:06 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-24 13:18:06 +0000 |
commit | 58c856a54a75e703aa3c82a0cd4e1affd9bd8ffc (patch) | |
tree | 4cfc8e41169906cdda2422b5701e59bab83aae6c /include | |
parent | 7f1af501f206da48a7ff791af53432c9c1c89d08 (diff) |
Reverting r10251 (Implement crop rect for SkImageFilter) due to Chromium-side unit test failures
git-svn-id: http://skia.googlecode.com/svn/trunk@10304 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkImageFilter.h | 24 | ||||
-rw-r--r-- | include/core/SkRect.h | 11 | ||||
-rw-r--r-- | include/effects/SkBicubicImageFilter.h | 3 | ||||
-rw-r--r-- | include/effects/SkBlurImageFilter.h | 5 | ||||
-rwxr-xr-x | include/effects/SkColorFilterImageFilter.h | 8 |
5 files changed, 8 insertions, 43 deletions
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h index e467761a1f..fe383ae9e3 100644 --- a/include/core/SkImageFilter.h +++ b/include/core/SkImageFilter.h @@ -9,13 +9,13 @@ #define SkImageFilter_DEFINED #include "SkFlattenable.h" -#include "SkRect.h" class SkBitmap; class SkColorFilter; class SkDevice; class SkMatrix; struct SkIPoint; +struct SkIRect; class SkShader; class GrEffectRef; class GrTexture; @@ -139,25 +139,14 @@ public: return fInputs[i]; } - /** - * Returns the crop rectangle of this filter. This is set at construction - * time, and determines which pixels from the input image will - * be processed. The size of this rectangle should be used as the size - * of the destination image. The origin of this rect should be used to - * offset access to the input images, and should also be added to the - * "offset" parameter in onFilterImage and filterImageGPU(). (The latter - * ensures that the resulting buffer is drawn in the correct location.) - */ - const SkIRect& cropRect() const { return fCropRect; } - protected: - SkImageFilter(int inputCount, SkImageFilter** inputs, const SkIRect* cropRect = NULL); + SkImageFilter(int inputCount, SkImageFilter** inputs); // Convenience constructor for 1-input filters. - explicit SkImageFilter(SkImageFilter* input, const SkIRect* cropRect = NULL); + explicit SkImageFilter(SkImageFilter* input); // Convenience constructor for 2-input filters. - SkImageFilter(SkImageFilter* input1, SkImageFilter* input2, const SkIRect* cropRect = NULL); + SkImageFilter(SkImageFilter* input1, SkImageFilter* input2); virtual ~SkImageFilter(); @@ -171,15 +160,10 @@ protected: // Default impl copies src into dst and returns true virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*); - // Sets rect to the intersection of rect and the crop rect. If there - // is no overlap, returns false and leaves rect unchanged. - bool applyCropRect(SkIRect* rect) const; - private: typedef SkFlattenable INHERITED; int fInputCount; SkImageFilter** fInputs; - SkIRect fCropRect; }; #endif diff --git a/include/core/SkRect.h b/include/core/SkRect.h index 9f3b59a38f..b2f515129d 100644 --- a/include/core/SkRect.h +++ b/include/core/SkRect.h @@ -26,12 +26,6 @@ struct SK_API SkIRect { return r; } - static SkIRect SK_WARN_UNUSED_RESULT MakeLargest() { - SkIRect r; - r.setLargest(); - return r; - } - static SkIRect SK_WARN_UNUSED_RESULT MakeWH(int32_t w, int32_t h) { SkIRect r; r.set(0, 0, w, h); @@ -100,11 +94,6 @@ struct SK_API SkIRect { */ bool isEmpty() const { return fLeft >= fRight || fTop >= fBottom; } - bool isLargest() const { return SK_MinS32 == fLeft && - SK_MinS32 == fTop && - SK_MaxS32 == fRight && - SK_MaxS32 == fBottom; } - friend bool operator==(const SkIRect& a, const SkIRect& b) { return !memcmp(&a, &b, sizeof(a)); } diff --git a/include/effects/SkBicubicImageFilter.h b/include/effects/SkBicubicImageFilter.h index 6696365433..75cd27df74 100644 --- a/include/effects/SkBicubicImageFilter.h +++ b/include/effects/SkBicubicImageFilter.h @@ -27,8 +27,7 @@ public: passed to filterImage() is used instead. */ - SkBicubicImageFilter(const SkSize& scale, - const SkScalar coefficients[16], + SkBicubicImageFilter(const SkSize& scale, const SkScalar coefficients[16], SkImageFilter* input = NULL); static SkBicubicImageFilter* CreateMitchell(const SkSize& scale, SkImageFilter* input = NULL); virtual ~SkBicubicImageFilter(); diff --git a/include/effects/SkBlurImageFilter.h b/include/effects/SkBlurImageFilter.h index f2677353e0..56b1f3543e 100644 --- a/include/effects/SkBlurImageFilter.h +++ b/include/effects/SkBlurImageFilter.h @@ -13,10 +13,7 @@ class SK_API SkBlurImageFilter : public SkImageFilter { public: - SkBlurImageFilter(SkScalar sigmaX, - SkScalar sigmaY, - SkImageFilter* input = NULL, - const SkIRect* cropRect = NULL); + SkBlurImageFilter(SkScalar sigmaX, SkScalar sigmaY, SkImageFilter* input = NULL); SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter) diff --git a/include/effects/SkColorFilterImageFilter.h b/include/effects/SkColorFilterImageFilter.h index 314ab070b6..2e5e59c3c0 100755 --- a/include/effects/SkColorFilterImageFilter.h +++ b/include/effects/SkColorFilterImageFilter.h @@ -14,9 +14,7 @@ class SkColorFilter; class SK_API SkColorFilterImageFilter : public SkImageFilter { public: - static SkColorFilterImageFilter* Create(SkColorFilter* cf, - SkImageFilter* input = NULL, - const SkIRect* cropRect = NULL); + static SkColorFilterImageFilter* Create(SkColorFilter* cf, SkImageFilter* input = NULL); virtual ~SkColorFilterImageFilter(); SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter) @@ -31,9 +29,7 @@ protected: virtual bool asColorFilter(SkColorFilter**) const SK_OVERRIDE; private: - SkColorFilterImageFilter(SkColorFilter* cf, - SkImageFilter* input, - const SkIRect* cropRect = NULL); + SkColorFilterImageFilter(SkColorFilter* cf, SkImageFilter* input); SkColorFilter* fColorFilter; typedef SkImageFilter INHERITED; |