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 18 matching lines...) Expand all Loading... |
29 return SkNEW_ARGS(SkMergeImageFilter, (filters, count, modes, cropRect))
; | 29 return SkNEW_ARGS(SkMergeImageFilter, (filters, count, modes, cropRect))
; |
30 } | 30 } |
31 | 31 |
32 SK_TO_STRING_OVERRIDE() | 32 SK_TO_STRING_OVERRIDE() |
33 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter) | 33 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter) |
34 | 34 |
35 protected: | 35 protected: |
36 SkMergeImageFilter(SkImageFilter* filters[], int count, | 36 SkMergeImageFilter(SkImageFilter* filters[], int count, |
37 const SkXfermode::Mode modes[], | 37 const SkXfermode::Mode modes[], |
38 const CropRect* cropRect); | 38 const CropRect* cropRect); |
39 void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 39 void flatten(SkWriteBuffer&) const override; |
40 | 40 |
41 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 41 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, |
42 SkBitmap* result, SkIPoint* loc) const SK_OVERRID
E; | 42 SkBitmap* result, SkIPoint* loc) const override; |
43 | 43 |
44 private: | 44 private: |
45 uint8_t* fModes; // SkXfermode::Mode | 45 uint8_t* fModes; // SkXfermode::Mode |
46 | 46 |
47 // private storage, to avoid dynamically allocating storage for our copy | 47 // private storage, to avoid dynamically allocating storage for our copy |
48 // of the modes (unless the count is so large we can't fit). | 48 // of the modes (unless the count is so large we can't fit). |
49 intptr_t fStorage[16]; | 49 intptr_t fStorage[16]; |
50 | 50 |
51 void initAllocModes(); | 51 void initAllocModes(); |
52 void initModes(const SkXfermode::Mode []); | 52 void initModes(const SkXfermode::Mode []); |
53 | 53 |
54 typedef SkImageFilter INHERITED; | 54 typedef SkImageFilter INHERITED; |
55 }; | 55 }; |
56 | 56 |
57 #endif | 57 #endif |
OLD | NEW |