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

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

Issue 1853383002: Revert of Delete SkFlattenable::Type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « gm/imagefiltersgraph.cpp ('k') | include/core/SkDrawLooper.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
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return nullptr; 155 return nullptr;
156 } 156 }
157 157
158 bool affectsTransparentBlack() const { 158 bool affectsTransparentBlack() const {
159 return this->filterColor(0) != 0; 159 return this->filterColor(0) != 0;
160 } 160 }
161 161
162 SK_TO_STRING_PUREVIRT() 162 SK_TO_STRING_PUREVIRT()
163 163
164 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() 164 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
165 SK_DEFINE_FLATTENABLE_TYPE(SkColorFilter)
165 166
166 protected: 167 protected:
167 SkColorFilter() {} 168 SkColorFilter() {}
168 169
169 private: 170 private:
170 /* 171 /*
171 * Returns 1 if this is a single filter (not a composition of other filters ), otherwise it 172 * Returns 1 if this is a single filter (not a composition of other filters ), otherwise it
172 * reutrns the number of leaf-node filters in a composition. This should be the same value 173 * reutrns the number of leaf-node filters in a composition. This should be the same value
173 * as the number of GrFragmentProcessors returned by asFragmentProcessors's array parameter. 174 * as the number of GrFragmentProcessors returned by asFragmentProcessors's array parameter.
174 * 175 *
175 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4 176 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4
176 */ 177 */
177 virtual int privateComposedFilterCount() const { return 1; } 178 virtual int privateComposedFilterCount() const { return 1; }
178 friend class SkComposeColorFilter; 179 friend class SkComposeColorFilter;
179 180
180 typedef SkFlattenable INHERITED; 181 typedef SkFlattenable INHERITED;
181 }; 182 };
182 183
183 #endif 184 #endif
OLDNEW
« no previous file with comments | « gm/imagefiltersgraph.cpp ('k') | include/core/SkDrawLooper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698