| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 kLocalSpace_PictureResolution | 72 kLocalSpace_PictureResolution |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 /* Constructs an SkPictureImageFilter object from an SkReadBuffer. | 75 /* Constructs an SkPictureImageFilter object from an SkReadBuffer. |
| 76 * Note: If the SkPictureImageFilter object construction requires bitmap | 76 * Note: If the SkPictureImageFilter object construction requires bitmap |
| 77 * decoding, the decoder must be set on the SkReadBuffer parameter by calli
ng | 77 * decoding, the decoder must be set on the SkReadBuffer parameter by calli
ng |
| 78 * SkReadBuffer::setBitmapDecoder() before calling this constructor. | 78 * SkReadBuffer::setBitmapDecoder() before calling this constructor. |
| 79 * @param SkReadBuffer Serialized picture data. | 79 * @param SkReadBuffer Serialized picture data. |
| 80 */ | 80 */ |
| 81 void flatten(SkWriteBuffer&) const override; | 81 void flatten(SkWriteBuffer&) const override; |
| 82 bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&, Sk
Bitmap* result, | 82 sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, |
| 83 SkIPoint* offset) const override; | 83 SkIPoint* offset) const override; |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 explicit SkPictureImageFilter(sk_sp<SkPicture> picture); | 86 explicit SkPictureImageFilter(sk_sp<SkPicture> picture); |
| 87 SkPictureImageFilter(sk_sp<SkPicture> picture, const SkRect& cropRect, | 87 SkPictureImageFilter(sk_sp<SkPicture> picture, const SkRect& cropRect, |
| 88 PictureResolution, SkFilterQuality); | 88 PictureResolution, SkFilterQuality); |
| 89 | 89 |
| 90 void drawPictureAtDeviceResolution(SkBaseDevice*, const SkIRect& deviceBound
s, | 90 void drawPictureAtDeviceResolution(SkCanvas* canvas, |
| 91 const SkIRect& deviceBounds, |
| 91 const Context&) const; | 92 const Context&) const; |
| 92 void drawPictureAtLocalResolution(Proxy*, SkBaseDevice*, const SkIRect& devi
ceBounds, | 93 void drawPictureAtLocalResolution(SkSpecialImage* source, |
| 94 SkCanvas*, |
| 95 const SkIRect& deviceBounds, |
| 93 const Context&) const; | 96 const Context&) const; |
| 94 | 97 |
| 95 sk_sp<SkPicture> fPicture; | 98 sk_sp<SkPicture> fPicture; |
| 96 SkRect fCropRect; | 99 SkRect fCropRect; |
| 97 PictureResolution fPictureResolution; | 100 PictureResolution fPictureResolution; |
| 98 SkFilterQuality fFilterQuality; | 101 SkFilterQuality fFilterQuality; |
| 99 | 102 |
| 100 typedef SkImageFilter INHERITED; | 103 typedef SkImageFilter INHERITED; |
| 101 }; | 104 }; |
| 102 | 105 |
| 103 #endif | 106 #endif |
| OLD | NEW |