OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef GrPaint_DEFINED | 10 #ifndef GrPaint_DEFINED |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 */ | 150 */ |
151 bool isOpaque() const; | 151 bool isOpaque() const; |
152 | 152 |
153 /** | 153 /** |
154 * Returns true if isOpaque would return true and the paint represents a sol
id constant color | 154 * Returns true if isOpaque would return true and the paint represents a sol
id constant color |
155 * draw. If the result is true, constantColor will be updated to contain the
constant color. | 155 * draw. If the result is true, constantColor will be updated to contain the
constant color. |
156 */ | 156 */ |
157 bool isOpaqueAndConstantColor(GrColor* constantColor) const; | 157 bool isOpaqueAndConstantColor(GrColor* constantColor) const; |
158 | 158 |
159 /** | 159 /** |
160 * Called when the source coord system from which geometry is rendered chang
es. It ensures that | 160 * DO NOT USE THESE |
161 * the local coordinates seen by effects remains unchanged. oldToNew gives t
he transformation | 161 * TODO Remove remaining use cases and delete these |
162 * from the previous coord system to the new coord system. | |
163 */ | 162 */ |
164 void localCoordChange(const SkMatrix& oldToNew) { | 163 void localCoordChange(const SkMatrix& oldToNew) { |
165 for (int i = 0; i < fColorStages.count(); ++i) { | 164 for (int i = 0; i < fColorStages.count(); ++i) { |
166 fColorStages[i].localCoordChange(oldToNew); | 165 fColorStages[i].localCoordChange(oldToNew); |
167 } | 166 } |
168 for (int i = 0; i < fCoverageStages.count(); ++i) { | 167 for (int i = 0; i < fCoverageStages.count(); ++i) { |
169 fCoverageStages[i].localCoordChange(oldToNew); | 168 fCoverageStages[i].localCoordChange(oldToNew); |
170 } | 169 } |
171 } | 170 } |
172 | 171 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } | 215 } |
217 | 216 |
218 void resetColor() { | 217 void resetColor() { |
219 fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff); | 218 fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff); |
220 } | 219 } |
221 | 220 |
222 void resetStages(); | 221 void resetStages(); |
223 }; | 222 }; |
224 | 223 |
225 #endif | 224 #endif |
OLD | NEW |