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

Side by Side Diff: include/core/SkColorFilter.h

Issue 1217573002: remove SkInstCnt (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 6 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/core/SkCanvas.h ('k') | include/core/SkColorTable.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 2006 The Android Open Source Project 2 * Copyright 2006 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 SkColorFilter_DEFINED 8 #ifndef SkColorFilter_DEFINED
9 #define SkColorFilter_DEFINED 9 #define SkColorFilter_DEFINED
10 10
11 #include "SkColor.h" 11 #include "SkColor.h"
12 #include "SkFlattenable.h" 12 #include "SkFlattenable.h"
13 #include "SkTDArray.h" 13 #include "SkTDArray.h"
14 #include "SkXfermode.h" 14 #include "SkXfermode.h"
15 15
16 class SkBitmap; 16 class SkBitmap;
17 class GrProcessor; 17 class GrProcessor;
18 class GrContext; 18 class GrContext;
19 19
20 /** 20 /**
21 * ColorFilters are optional objects in the drawing pipeline. When present in 21 * ColorFilters are optional objects in the drawing pipeline. When present in
22 * a paint, they are called with the "src" colors, and return new colors, which 22 * a paint, they are called with the "src" colors, and return new colors, which
23 * are then passed onto the next stage (either ImageFilter or Xfermode). 23 * are then passed onto the next stage (either ImageFilter or Xfermode).
24 * 24 *
25 * All subclasses are required to be reentrant-safe : it must be legal to share 25 * All subclasses are required to be reentrant-safe : it must be legal to share
26 * the same instance between several threads. 26 * the same instance between several threads.
27 */ 27 */
28 class SK_API SkColorFilter : public SkFlattenable { 28 class SK_API SkColorFilter : public SkFlattenable {
29 public: 29 public:
30 SK_DECLARE_INST_COUNT(SkColorFilter)
31
32 /** 30 /**
33 * If the filter can be represented by a source color plus Mode, this 31 * If the filter can be represented by a source color plus Mode, this
34 * returns true, and sets (if not NULL) the color and mode appropriately. 32 * returns true, and sets (if not NULL) the color and mode appropriately.
35 * If not, this returns false and ignores the parameters. 33 * If not, this returns false and ignores the parameters.
36 */ 34 */
37 virtual bool asColorMode(SkColor* color, SkXfermode::Mode* mode) const; 35 virtual bool asColorMode(SkColor* color, SkXfermode::Mode* mode) const;
38 36
39 /** 37 /**
40 * If the filter can be represented by a 5x4 matrix, this 38 * If the filter can be represented by a 5x4 matrix, this
41 * returns true, and sets the matrix appropriately. 39 * returns true, and sets the matrix appropriately.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 * 154 *
157 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4 155 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4
158 */ 156 */
159 virtual int privateComposedFilterCount() const { return 1; } 157 virtual int privateComposedFilterCount() const { return 1; }
160 friend class SkComposeColorFilter; 158 friend class SkComposeColorFilter;
161 159
162 typedef SkFlattenable INHERITED; 160 typedef SkFlattenable INHERITED;
163 }; 161 };
164 162
165 #endif 163 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | include/core/SkColorTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698