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

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

Issue 189913021: Implement support for a Context parameter in image filters (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Revert all but the Context changes. Created 6 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 | Annotate | Revision Log
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 15 matching lines...) Expand all
26 const CropRect* cropRect = NULL) { 26 const CropRect* cropRect = NULL) {
27 return SkNEW_ARGS(SkMergeImageFilter, (filters, count, modes, cropRect)) ; 27 return SkNEW_ARGS(SkMergeImageFilter, (filters, count, modes, cropRect)) ;
28 } 28 }
29 29
30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter) 30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter)
31 31
32 protected: 32 protected:
33 SkMergeImageFilter(SkReadBuffer& buffer); 33 SkMergeImageFilter(SkReadBuffer& buffer);
34 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 34 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
35 35
36 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, 36 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
37 SkBitmap* result, SkIPoint* loc) const SK_OVERRID E; 37 SkBitmap* result, SkIPoint* loc) const SK_OVERRID E;
38 38
39 #ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS 39 #ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
40 public: 40 public:
41 #endif 41 #endif
42 SkMergeImageFilter(SkImageFilter* first, SkImageFilter* second, 42 SkMergeImageFilter(SkImageFilter* first, SkImageFilter* second,
43 SkXfermode::Mode = SkXfermode::kSrcOver_Mode, 43 SkXfermode::Mode = SkXfermode::kSrcOver_Mode,
44 const CropRect* cropRect = NULL); 44 const CropRect* cropRect = NULL);
45 SkMergeImageFilter(SkImageFilter* filters[], int count, 45 SkMergeImageFilter(SkImageFilter* filters[], int count,
46 const SkXfermode::Mode modes[] = NULL, 46 const SkXfermode::Mode modes[] = NULL,
47 const CropRect* cropRect = NULL); 47 const CropRect* cropRect = NULL);
48 private: 48 private:
49 uint8_t* fModes; // SkXfermode::Mode 49 uint8_t* fModes; // SkXfermode::Mode
50 50
51 // private storage, to avoid dynamically allocating storage for our copy 51 // private storage, to avoid dynamically allocating storage for our copy
52 // of the modes (unless the count is so large we can't fit). 52 // of the modes (unless the count is so large we can't fit).
53 intptr_t fStorage[16]; 53 intptr_t fStorage[16];
54 54
55 void initAllocModes(); 55 void initAllocModes();
56 void initModes(const SkXfermode::Mode []); 56 void initModes(const SkXfermode::Mode []);
57 57
58 typedef SkImageFilter INHERITED; 58 typedef SkImageFilter INHERITED;
59 }; 59 };
60 60
61 #endif 61 #endif
OLDNEW
« no previous file with comments | « include/effects/SkMatrixConvolutionImageFilter.h ('k') | include/effects/SkMorphologyImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698