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

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

Issue 1915943002: simplify handle-affine: subclass overrides just describe their leaf behavior (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: early out if onCanHandleComplexCTM returns false Created 4 years, 8 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/SkComposeImageFilter.h ('k') | src/core/SkCanvas.cpp » ('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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « include/effects/SkComposeImageFilter.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698