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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 this->resetStages(); | 141 this->resetStages(); |
142 } | 142 } |
143 | 143 |
144 /** | 144 /** |
145 * Returns true if isOpaque would return true and the paint represents a sol
id constant color | 145 * Returns true if isOpaque would return true and the paint represents a sol
id constant color |
146 * draw. If the result is true, constantColor will be updated to contain the
constant color. | 146 * draw. If the result is true, constantColor will be updated to contain the
constant color. |
147 */ | 147 */ |
148 bool isOpaqueAndConstantColor(GrColor* constantColor) const; | 148 bool isOpaqueAndConstantColor(GrColor* constantColor) const; |
149 | 149 |
150 /** | 150 /** |
151 * Called when the source coord system from which geometry is rendered chang
es. It ensures that | 151 * DO NOT USE THESE |
152 * the local coordinates seen by effects remains unchanged. oldToNew gives t
he transformation | 152 * TODO Remove remaining use cases and delete these |
153 * from the previous coord system to the new coord system. | |
154 */ | 153 */ |
155 void localCoordChange(const SkMatrix& oldToNew) { | 154 void localCoordChange(const SkMatrix& oldToNew) { |
156 for (int i = 0; i < fColorStages.count(); ++i) { | 155 for (int i = 0; i < fColorStages.count(); ++i) { |
157 fColorStages[i].localCoordChange(oldToNew); | 156 fColorStages[i].localCoordChange(oldToNew); |
158 } | 157 } |
159 for (int i = 0; i < fCoverageStages.count(); ++i) { | 158 for (int i = 0; i < fCoverageStages.count(); ++i) { |
160 fCoverageStages[i].localCoordChange(oldToNew); | 159 fCoverageStages[i].localCoordChange(oldToNew); |
161 } | 160 } |
162 } | 161 } |
163 | 162 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 } | 201 } |
203 | 202 |
204 void resetColor() { | 203 void resetColor() { |
205 fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff); | 204 fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff); |
206 } | 205 } |
207 | 206 |
208 void resetStages(); | 207 void resetStages(); |
209 }; | 208 }; |
210 | 209 |
211 #endif | 210 #endif |
OLD | NEW |