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 28 matching lines...) Expand all Loading... |
39 * dest rect; only the CTM is applied.) | 39 * dest rect; only the CTM is applied.) |
40 */ | 40 */ |
41 static SkPictureImageFilter* CreateForLocalSpace(const SkPicture* picture, | 41 static SkPictureImageFilter* CreateForLocalSpace(const SkPicture* picture, |
42 const SkRect& cropRect, | 42 const SkRect& cropRect, |
43 SkPaint::FilterLevel filter
Level, | 43 SkPaint::FilterLevel filter
Level, |
44 uint32_t uniqueID = 0) { | 44 uint32_t uniqueID = 0) { |
45 return SkNEW_ARGS(SkPictureImageFilter, (picture, cropRect, uniqueID, | 45 return SkNEW_ARGS(SkPictureImageFilter, (picture, cropRect, uniqueID, |
46 kLocalSpace_PictureResolution,
filterLevel)); | 46 kLocalSpace_PictureResolution,
filterLevel)); |
47 } | 47 } |
48 | 48 |
| 49 SK_TO_STRING_OVERRIDE() |
49 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureImageFilter) | 50 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureImageFilter) |
50 | 51 |
51 protected: | 52 protected: |
52 enum PictureResolution { | 53 enum PictureResolution { |
53 kDeviceSpace_PictureResolution, | 54 kDeviceSpace_PictureResolution, |
54 kLocalSpace_PictureResolution | 55 kLocalSpace_PictureResolution |
55 }; | 56 }; |
56 | 57 |
57 explicit SkPictureImageFilter(const SkPicture* picture, uint32_t uniqueID); | 58 explicit SkPictureImageFilter(const SkPicture* picture, uint32_t uniqueID); |
58 SkPictureImageFilter(const SkPicture* picture, const SkRect& cropRect, uint3
2_t uniqueID, | 59 SkPictureImageFilter(const SkPicture* picture, const SkRect& cropRect, uint3
2_t uniqueID, |
(...skipping 18 matching lines...) Expand all Loading... |
77 const Context&) const; | 78 const Context&) const; |
78 | 79 |
79 const SkPicture* fPicture; | 80 const SkPicture* fPicture; |
80 SkRect fCropRect; | 81 SkRect fCropRect; |
81 PictureResolution fPictureResolution; | 82 PictureResolution fPictureResolution; |
82 SkPaint::FilterLevel fFilterLevel; | 83 SkPaint::FilterLevel fFilterLevel; |
83 typedef SkImageFilter INHERITED; | 84 typedef SkImageFilter INHERITED; |
84 }; | 85 }; |
85 | 86 |
86 #endif | 87 #endif |
OLD | NEW |