OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
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 GrFragmentProcessor_DEFINED | 8 #ifndef GrFragmentProcessor_DEFINED |
9 #define GrFragmentProcessor_DEFINED | 9 #define GrFragmentProcessor_DEFINED |
10 | 10 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 /** Does this FP need a vector to the nearest edge? */ | 114 /** Does this FP need a vector to the nearest edge? */ |
115 bool usesDistanceVectorField() const { return fUsesDistanceVectorField; } | 115 bool usesDistanceVectorField() const { return fUsesDistanceVectorField; } |
116 | 116 |
117 /** Returns true if this and other processor conservatively draw identically
. It can only return | 117 /** Returns true if this and other processor conservatively draw identically
. It can only return |
118 true when the two processor are of the same subclass (i.e. they return t
he same object from | 118 true when the two processor are of the same subclass (i.e. they return t
he same object from |
119 from getFactory()). | 119 from getFactory()). |
120 | 120 |
121 A return value of true from isEqual() should not be used to test whether
the processor would | 121 A return value of true from isEqual() should not be used to test whether
the processor would |
122 generate the same shader code. To test for identical code generation use
getGLSLProcessorKey | 122 generate the same shader code. To test for identical code generation use
getGLSLProcessorKey |
123 */ | 123 */ |
124 bool isEqual(const GrFragmentProcessor& that, bool ignoreCoordTransforms) co
nst; | 124 bool isEqual(const GrFragmentProcessor& that) const; |
125 | 125 |
126 /** | 126 /** |
127 * This function is used to perform optimizations. When called the invarient
Ouput param | 127 * This function is used to perform optimizations. When called the invarient
Ouput param |
128 * indicate whether the input components to this processor in the FS will ha
ve known values. | 128 * indicate whether the input components to this processor in the FS will ha
ve known values. |
129 * In inout the validFlags member is a bitfield of GrColorComponentFlags. Th
e isSingleComponent | 129 * In inout the validFlags member is a bitfield of GrColorComponentFlags. Th
e isSingleComponent |
130 * member indicates whether the input will be 1 or 4 bytes. The function upd
ates the members of | 130 * member indicates whether the input will be 1 or 4 bytes. The function upd
ates the members of |
131 * inout to indicate known values of its output. A component of the color me
mber only has | 131 * inout to indicate known values of its output. A component of the color me
mber only has |
132 * meaning if the corresponding bit in validFlags is set. | 132 * meaning if the corresponding bit in validFlags is set. |
133 */ | 133 */ |
134 void computeInvariantOutput(GrInvariantOutput* inout) const { | 134 void computeInvariantOutput(GrInvariantOutput* inout) const { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 /** | 237 /** |
238 * This is not SkSTArray<1, sk_sp<GrFragmentProcessor>> because this class h
olds strong | 238 * This is not SkSTArray<1, sk_sp<GrFragmentProcessor>> because this class h
olds strong |
239 * references until notifyRefCntIsZero and then it holds pending executions. | 239 * references until notifyRefCntIsZero and then it holds pending executions. |
240 */ | 240 */ |
241 SkSTArray<1, GrFragmentProcessor*, true> fChildProcessors; | 241 SkSTArray<1, GrFragmentProcessor*, true> fChildProcessors; |
242 | 242 |
243 typedef GrProcessor INHERITED; | 243 typedef GrProcessor INHERITED; |
244 }; | 244 }; |
245 | 245 |
246 #endif | 246 #endif |
OLD | NEW |