Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: include/effects/SkMergeImageFilter.h

Issue 1826893002: Switch new SkImageFilter internal methods over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change method name to drawSpriteWithFilter Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/effects/SkImageSource.h ('k') | include/effects/SkOffsetImageFilter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 17 matching lines...) Expand all
28 const SkXfermode::Mode modes[] = NULL, 28 const SkXfermode::Mode modes[] = NULL,
29 const CropRect* cropRect = NULL) { 29 const CropRect* cropRect = NULL) {
30 return new SkMergeImageFilter(filters, count, modes, cropRect); 30 return new SkMergeImageFilter(filters, count, modes, cropRect);
31 } 31 }
32 32
33 SK_TO_STRING_OVERRIDE() 33 SK_TO_STRING_OVERRIDE()
34 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter) 34 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter)
35 35
36 protected: 36 protected:
37 void flatten(SkWriteBuffer&) const override; 37 void flatten(SkWriteBuffer&) const override;
38 SkSpecialImage* onFilterImage(SkSpecialImage* source, const Context&, 38 sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
39 SkIPoint* offset) const override; 39 SkIPoint* offset) const override;
40 40
41 private: 41 private:
42 SkMergeImageFilter(SkImageFilter* filters[], int count, const SkXfermode::Mo de modes[], 42 SkMergeImageFilter(SkImageFilter* filters[], int count, const SkXfermode::Mo de modes[],
43 const CropRect* cropRect); 43 const CropRect* cropRect);
44 44
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
OLDNEW
« no previous file with comments | « include/effects/SkImageSource.h ('k') | include/effects/SkOffsetImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698