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

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

Issue 1334293003: Create fragment processor for performing input color blend with child processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 5 years, 3 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 | « gyp/gpu.gypi ('k') | include/core/SkXfermode.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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 * array, each of which has been ref'd, so that the caller is responsible f or calling unref() 129 * array, each of which has been ref'd, so that the caller is responsible f or calling unref()
130 * on them when they are finished. If more than one processor is appended, they will be 130 * on them when they are finished. If more than one processor is appended, they will be
131 * applied in FIFO order. 131 * applied in FIFO order.
132 * 132 *
133 * The fragment processor(s) must each return their color as a premul norma lized value 133 * The fragment processor(s) must each return their color as a premul norma lized value
134 * e.g. each component between [0..1] and each color component <= alpha. 134 * e.g. each component between [0..1] and each color component <= alpha.
135 * 135 *
136 * If the subclass returns false, then it should not modify the array at al l. 136 * If the subclass returns false, then it should not modify the array at al l.
137 */ 137 */
138 virtual bool asFragmentProcessors(GrContext*, GrProcessorDataManager*, 138 virtual bool asFragmentProcessors(GrContext*, GrProcessorDataManager*,
139 SkTDArray<GrFragmentProcessor*>*) const { 139 SkTDArray<const GrFragmentProcessor*>*) co nst {
140 return false; 140 return false;
141 } 141 }
142 142
143 bool affectsTransparentBlack() const { 143 bool affectsTransparentBlack() const {
144 return this->filterColor(0) != 0; 144 return this->filterColor(0) != 0;
145 } 145 }
146 146
147 SK_TO_STRING_PUREVIRT() 147 SK_TO_STRING_PUREVIRT()
148 148
149 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() 149 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
(...skipping 10 matching lines...) Expand all
160 * 160 *
161 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4 161 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4
162 */ 162 */
163 virtual int privateComposedFilterCount() const { return 1; } 163 virtual int privateComposedFilterCount() const { return 1; }
164 friend class SkComposeColorFilter; 164 friend class SkComposeColorFilter;
165 165
166 typedef SkFlattenable INHERITED; 166 typedef SkFlattenable INHERITED;
167 }; 167 };
168 168
169 #endif 169 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | include/core/SkXfermode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698