OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 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 SkMergeImageFilter_DEFINED | 8 #ifndef SkMergeImageFilter_DEFINED |
9 #define SkMergeImageFilter_DEFINED | 9 #define SkMergeImageFilter_DEFINED |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 temp[i] = sk_ref_sp<SkImageFilter>(filters[i]); | 44 temp[i] = sk_ref_sp<SkImageFilter>(filters[i]); |
45 } | 45 } |
46 return Make(temp.get(), count, modes, cropRect).release(); | 46 return Make(temp.get(), count, modes, cropRect).release(); |
47 } | 47 } |
48 #endif | 48 #endif |
49 | 49 |
50 protected: | 50 protected: |
51 void flatten(SkWriteBuffer&) const override; | 51 void flatten(SkWriteBuffer&) const override; |
52 sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, | 52 sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, |
53 SkIPoint* offset) const override; | 53 SkIPoint* offset) const override; |
| 54 bool onCanHandleComplexCTM() const override { return true; } |
54 | 55 |
55 private: | 56 private: |
56 SkMergeImageFilter(sk_sp<SkImageFilter> filters[], int count, const SkXfermo
de::Mode modes[], | 57 SkMergeImageFilter(sk_sp<SkImageFilter> filters[], int count, const SkXfermo
de::Mode modes[], |
57 const CropRect* cropRect); | 58 const CropRect* cropRect); |
58 | 59 |
59 uint8_t* fModes; // SkXfermode::Mode | 60 uint8_t* fModes; // SkXfermode::Mode |
60 | 61 |
61 // private storage, to avoid dynamically allocating storage for our copy | 62 // private storage, to avoid dynamically allocating storage for our copy |
62 // of the modes (unless the count is so large we can't fit). | 63 // of the modes (unless the count is so large we can't fit). |
63 intptr_t fStorage[16]; | 64 intptr_t fStorage[16]; |
64 | 65 |
65 void initAllocModes(); | 66 void initAllocModes(); |
66 void initModes(const SkXfermode::Mode []); | 67 void initModes(const SkXfermode::Mode []); |
67 | 68 |
68 typedef SkImageFilter INHERITED; | 69 typedef SkImageFilter INHERITED; |
69 }; | 70 }; |
70 | 71 |
71 #endif | 72 #endif |
OLD | NEW |