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 10 matching lines...) Expand all Loading... |
21 /** | 21 /** |
22 * Refs the passed-in picture. rect can be used to crop or expand the desti
nation rect when | 22 * Refs the passed-in picture. rect can be used to crop or expand the desti
nation rect when |
23 * the picture is drawn. (No scaling is implied by the dest rect; only the
CTM is applied.) | 23 * the picture is drawn. (No scaling is implied by the dest rect; only the
CTM is applied.) |
24 */ | 24 */ |
25 SkPictureImageFilter(SkPicture* picture, const SkRect& rect); | 25 SkPictureImageFilter(SkPicture* picture, const SkRect& rect); |
26 | 26 |
27 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureImageFilter) | 27 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureImageFilter) |
28 | 28 |
29 protected: | 29 protected: |
30 virtual ~SkPictureImageFilter(); | 30 virtual ~SkPictureImageFilter(); |
31 /* Constructs an SkPictureImageFilter object from an SkReadBuffer. | 31 explicit SkPictureImageFilter(SkReadBuffer& buffer); |
32 * Note: If the SkPictureImageFilter object construction requires bitmap | |
33 * decoding, the decoder must be set on the SkReadBuffer parameter by calli
ng | |
34 * SkReadBuffer::setBitmapDecoder() before calling this constructor. | |
35 * @param SkReadBuffer Serialized picture data. | |
36 */ | |
37 explicit SkPictureImageFilter(SkReadBuffer&); | |
38 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 32 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
39 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, | 33 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, |
40 SkBitmap* result, SkIPoint* offset) const SK_OVER
RIDE; | 34 SkBitmap* result, SkIPoint* offset) const SK_OVER
RIDE; |
41 | 35 |
42 private: | 36 private: |
43 SkPicture* fPicture; | 37 SkPicture* fPicture; |
44 SkRect fRect; | 38 SkRect fRect; |
45 typedef SkImageFilter INHERITED; | 39 typedef SkImageFilter INHERITED; |
46 }; | 40 }; |
47 | 41 |
48 #endif | 42 #endif |
OLD | NEW |