| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 The Android Open Source Project | 2 * Copyright 2013 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkPictureImageFilter_DEFINED | 8 #ifndef SkPictureImageFilter_DEFINED |
| 9 #define SkPictureImageFilter_DEFINED | 9 #define SkPictureImageFilter_DEFINED |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 /* Constructs an SkPictureImageFilter object from an SkReadBuffer. | 63 /* Constructs an SkPictureImageFilter object from an SkReadBuffer. |
| 64 * Note: If the SkPictureImageFilter object construction requires bitmap | 64 * Note: If the SkPictureImageFilter object construction requires bitmap |
| 65 * decoding, the decoder must be set on the SkReadBuffer parameter by calli
ng | 65 * decoding, the decoder must be set on the SkReadBuffer parameter by calli
ng |
| 66 * SkReadBuffer::setBitmapDecoder() before calling this constructor. | 66 * SkReadBuffer::setBitmapDecoder() before calling this constructor. |
| 67 * @param SkReadBuffer Serialized picture data. | 67 * @param SkReadBuffer Serialized picture data. |
| 68 */ | 68 */ |
| 69 void flatten(SkWriteBuffer&) const override; | 69 void flatten(SkWriteBuffer&) const override; |
| 70 sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, | 70 sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, |
| 71 SkIPoint* offset) const override; | 71 SkIPoint* offset) const override; |
| 72 int numSlowPaths() const override; |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 explicit SkPictureImageFilter(sk_sp<SkPicture> picture); | 75 explicit SkPictureImageFilter(sk_sp<SkPicture> picture); |
| 75 SkPictureImageFilter(sk_sp<SkPicture> picture, const SkRect& cropRect, | 76 SkPictureImageFilter(sk_sp<SkPicture> picture, const SkRect& cropRect, |
| 76 PictureResolution, SkFilterQuality); | 77 PictureResolution, SkFilterQuality); |
| 77 | 78 |
| 78 void drawPictureAtDeviceResolution(SkCanvas* canvas, | 79 void drawPictureAtDeviceResolution(SkCanvas* canvas, |
| 79 const SkIRect& deviceBounds, | 80 const SkIRect& deviceBounds, |
| 80 const Context&) const; | 81 const Context&) const; |
| 81 void drawPictureAtLocalResolution(SkSpecialImage* source, | 82 void drawPictureAtLocalResolution(SkSpecialImage* source, |
| 82 SkCanvas*, | 83 SkCanvas*, |
| 83 const SkIRect& deviceBounds, | 84 const SkIRect& deviceBounds, |
| 84 const Context&) const; | 85 const Context&) const; |
| 85 | 86 |
| 86 sk_sp<SkPicture> fPicture; | 87 sk_sp<SkPicture> fPicture; |
| 87 SkRect fCropRect; | 88 SkRect fCropRect; |
| 88 PictureResolution fPictureResolution; | 89 PictureResolution fPictureResolution; |
| 89 SkFilterQuality fFilterQuality; | 90 SkFilterQuality fFilterQuality; |
| 90 | 91 |
| 91 typedef SkImageFilter INHERITED; | 92 typedef SkImageFilter INHERITED; |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 #endif | 95 #endif |
| OLD | NEW |