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 private: | 150 private: |
151 friend class GrContext; // To access above two functions | |
152 friend class GrStencilAndCoverTextContext; // To access above two functions | |
153 | |
154 SkAutoTUnref<const GrXPFactory> fXPFactory; | 151 SkAutoTUnref<const GrXPFactory> fXPFactory; |
155 SkSTArray<4, GrFragmentStage> fColorStages; | 152 SkSTArray<4, GrFragmentStage> fColorStages; |
156 SkSTArray<2, GrFragmentStage> fCoverageStages; | 153 SkSTArray<2, GrFragmentStage> fCoverageStages; |
157 | 154 |
158 bool fAntiAlias; | 155 bool fAntiAlias; |
159 bool fDither; | 156 bool fDither; |
160 | 157 |
161 GrColor fColor; | 158 GrColor fColor; |
162 | 159 |
163 void resetOptions() { | 160 void resetOptions() { |
164 fAntiAlias = false; | 161 fAntiAlias = false; |
165 fDither = false; | 162 fDither = false; |
166 } | 163 } |
167 | 164 |
168 void resetColor() { | 165 void resetColor() { |
169 fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff); | 166 fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff); |
170 } | 167 } |
171 | 168 |
172 void resetStages(); | 169 void resetStages(); |
173 }; | 170 }; |
174 | 171 |
175 #endif | 172 #endif |
OLD | NEW |