Chromium Code Reviews| Index: include/core/SkImageFilter.h |
| diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h |
| index 97f84dc596720a2176869b1e97a63adfcb3c41c1..ad9eb11e88bedcbe22f6aa1e469b56fd334b0269 100644 |
| --- a/include/core/SkImageFilter.h |
| +++ b/include/core/SkImageFilter.h |
| @@ -34,22 +34,37 @@ struct SkImageFilterCacheKey; |
| */ |
| class SK_API SkImageFilter : public SkFlattenable { |
| public: |
|
robertphillips
2016/09/21 18:44:09
// Basically copy your CL's comment here - why is
Brian Osman
2016/09/21 19:00:31
Done.
|
| + class OutputProperties { |
| + public: |
|
robertphillips
2016/09/21 18:44:09
can this fit on one line?
Maybe a comment here ab
Brian Osman
2016/09/21 19:00:31
Done.
|
| + explicit OutputProperties(SkColorSpace* colorSpace) |
| + : fColorSpace(colorSpace) {} |
| + |
| + SkColorSpace* colorSpace() const { return fColorSpace; } |
| + |
| + private: |
| + SkColorSpace* fColorSpace; |
| + }; |
| + |
| class Context { |
| public: |
| - Context(const SkMatrix& ctm, const SkIRect& clipBounds, SkImageFilterCache* cache) |
| + Context(const SkMatrix& ctm, const SkIRect& clipBounds, SkImageFilterCache* cache, |
| + const OutputProperties& outputProperties) |
| : fCTM(ctm) |
| , fClipBounds(clipBounds) |
| , fCache(cache) |
| + , fOutputProperties(outputProperties) |
| {} |
| const SkMatrix& ctm() const { return fCTM; } |
| const SkIRect& clipBounds() const { return fClipBounds; } |
| SkImageFilterCache* cache() const { return fCache; } |
| + const OutputProperties& outputProperties() const { return fOutputProperties; } |
| private: |
| SkMatrix fCTM; |
| SkIRect fClipBounds; |
| SkImageFilterCache* fCache; |
| + OutputProperties fOutputProperties; |
| }; |
| class CropRect { |
| @@ -130,10 +145,10 @@ public: |
| MapDirection = kReverse_MapDirection) const; |
| #if SK_SUPPORT_GPU |
| - static sk_sp<SkSpecialImage> DrawWithFP(GrContext* context, |
| + static sk_sp<SkSpecialImage> DrawWithFP(GrContext* context, |
| sk_sp<GrFragmentProcessor> fp, |
| const SkIRect& bounds, |
| - sk_sp<SkColorSpace> colorSpace); |
| + const OutputProperties& outputProperties); |
| #endif |
| /** |