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

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

Issue 1648933002: Move SkColorMatrixFilter implementation to core. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add back newComposed override Created 4 years, 10 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/effects.gypi ('k') | include/effects/SkColorMatrixFilter.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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 /** Construct a colorfilter whose effect is to first apply the inner filter and then apply 116 /** Construct a colorfilter whose effect is to first apply the inner filter and then apply
117 * the outer filter to the result of the inner's. 117 * the outer filter to the result of the inner's.
118 * The reference counts for outer and inner are incremented. 118 * The reference counts for outer and inner are incremented.
119 * 119 *
120 * Due to internal limits, it is possible that this will return NULL, so th e caller must 120 * Due to internal limits, it is possible that this will return NULL, so th e caller must
121 * always check. 121 * always check.
122 */ 122 */
123 static SkColorFilter* CreateComposeFilter(SkColorFilter* outer, SkColorFilte r* inner); 123 static SkColorFilter* CreateComposeFilter(SkColorFilter* outer, SkColorFilte r* inner);
124 124
125 /** Construct a color filter that transforms a color by a 4x5 matrix. The ma trix is in row-
126 * major order and the translation column is specified in unnormalized, 0.. .255, space.
127 */
128 static SkColorFilter* CreateMatrixFilterRowMajor255(const SkScalar array[20] );
129
125 /** 130 /**
126 * A subclass may implement this factory function to work with the GPU back end. It returns 131 * A subclass may implement this factory function to work with the GPU back end. It returns
127 * a GrFragmentProcessor that implemets the color filter in GPU shader code . 132 * a GrFragmentProcessor that implemets the color filter in GPU shader code .
128 * 133 *
129 * The fragment processor receives a premultiplied input color and produces a premultiplied 134 * The fragment processor receives a premultiplied input color and produces a premultiplied
130 * output color. 135 * output color.
131 * 136 *
132 * A null return indicates that the color filter isn't implemented for the GPU backend. 137 * A null return indicates that the color filter isn't implemented for the GPU backend.
133 */ 138 */
134 virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*) const { 139 virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*) const {
(...skipping 20 matching lines...) Expand all
155 * 160 *
156 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4 161 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4
157 */ 162 */
158 virtual int privateComposedFilterCount() const { return 1; } 163 virtual int privateComposedFilterCount() const { return 1; }
159 friend class SkComposeColorFilter; 164 friend class SkComposeColorFilter;
160 165
161 typedef SkFlattenable INHERITED; 166 typedef SkFlattenable INHERITED;
162 }; 167 };
163 168
164 #endif 169 #endif
OLDNEW
« no previous file with comments | « gyp/effects.gypi ('k') | include/effects/SkColorMatrixFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698