OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrPathRenderer_DEFINED | 8 #ifndef GrPathRenderer_DEFINED |
9 #define GrPathRenderer_DEFINED | 9 #define GrPathRenderer_DEFINED |
10 | 10 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 * fAntiAlias true if anti-aliasing is required. | 123 * fAntiAlias true if anti-aliasing is required. |
124 * fGammaCorrect true if gamma-correct rendering is to be used. | 124 * fGammaCorrect true if gamma-correct rendering is to be used. |
125 */ | 125 */ |
126 struct DrawPathArgs { | 126 struct DrawPathArgs { |
127 GrResourceProvider* fResourceProvider; | 127 GrResourceProvider* fResourceProvider; |
128 const GrPaint* fPaint; | 128 const GrPaint* fPaint; |
129 const GrUserStencilSettings*fUserStencilSettings; | 129 const GrUserStencilSettings*fUserStencilSettings; |
130 | 130 |
131 GrDrawContext* fDrawContext; | 131 GrDrawContext* fDrawContext; |
132 const GrClip* fClip; | 132 const GrClip* fClip; |
133 GrColor fColor; | |
134 const SkMatrix* fViewMatrix; | 133 const SkMatrix* fViewMatrix; |
135 const GrShape* fShape; | 134 const GrShape* fShape; |
136 bool fAntiAlias; | 135 bool fAntiAlias; |
137 bool fGammaCorrect; | 136 bool fGammaCorrect; |
138 #ifdef SK_DEBUG | 137 #ifdef SK_DEBUG |
139 void validate() const { | 138 void validate() const { |
140 SkASSERT(fResourceProvider); | 139 SkASSERT(fResourceProvider); |
141 SkASSERT(fPaint); | 140 SkASSERT(fPaint); |
142 SkASSERT(fUserStencilSettings); | 141 SkASSERT(fUserStencilSettings); |
143 SkASSERT(fDrawContext); | 142 SkASSERT(fDrawContext); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 GrUserStencilSettings::StaticInit< | 267 GrUserStencilSettings::StaticInit< |
269 0xffff, | 268 0xffff, |
270 GrUserStencilTest::kAlways, | 269 GrUserStencilTest::kAlways, |
271 0xffff, | 270 0xffff, |
272 GrUserStencilOp::kReplace, | 271 GrUserStencilOp::kReplace, |
273 GrUserStencilOp::kReplace, | 272 GrUserStencilOp::kReplace, |
274 0xffff>() | 273 0xffff>() |
275 ); | 274 ); |
276 | 275 |
277 GrPaint paint; | 276 GrPaint paint; |
| 277 paint.setColor4f(GrColor4f(1.0f, 1.0f, 1.0f, 1.0f)); |
278 | 278 |
279 DrawPathArgs drawArgs; | 279 DrawPathArgs drawArgs; |
280 drawArgs.fResourceProvider = args.fResourceProvider; | 280 drawArgs.fResourceProvider = args.fResourceProvider; |
281 drawArgs.fPaint = &paint; | 281 drawArgs.fPaint = &paint; |
282 drawArgs.fUserStencilSettings = &kIncrementStencil; | 282 drawArgs.fUserStencilSettings = &kIncrementStencil; |
283 drawArgs.fDrawContext = args.fDrawContext; | 283 drawArgs.fDrawContext = args.fDrawContext; |
284 drawArgs.fColor = GrColor_WHITE; | |
285 drawArgs.fViewMatrix = args.fViewMatrix; | 284 drawArgs.fViewMatrix = args.fViewMatrix; |
286 drawArgs.fShape = args.fShape; | 285 drawArgs.fShape = args.fShape; |
287 drawArgs.fAntiAlias = false; // In this case the MSAA handles the AA so
we want to draw BW | 286 drawArgs.fAntiAlias = false; // In this case the MSAA handles the AA so
we want to draw BW |
288 drawArgs.fGammaCorrect = false; | 287 drawArgs.fGammaCorrect = false; |
289 this->drawPath(drawArgs); | 288 this->drawPath(drawArgs); |
290 } | 289 } |
291 | 290 |
292 typedef SkRefCnt INHERITED; | 291 typedef SkRefCnt INHERITED; |
293 }; | 292 }; |
294 | 293 |
295 #endif | 294 #endif |
OLD | NEW |