OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrDrawPathBatch_DEFINED | 8 #ifndef GrDrawPathBatch_DEFINED |
9 #define GrDrawPathBatch_DEFINED | 9 #define GrDrawPathBatch_DEFINED |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 void computePipelineOptimizations(GrInitInvariantOutput* color, | 22 void computePipelineOptimizations(GrInitInvariantOutput* color, |
23 GrInitInvariantOutput* coverage, | 23 GrInitInvariantOutput* coverage, |
24 GrBatchToXPOverrides* overrides) const ove
rride { | 24 GrBatchToXPOverrides* overrides) const ove
rride { |
25 color->setKnownFourComponents(fColor); | 25 color->setKnownFourComponents(fColor); |
26 coverage->setKnownSingleComponent(0xff); | 26 coverage->setKnownSingleComponent(0xff); |
27 } | 27 } |
28 | 28 |
29 GrPathRendering::FillType fillType() const { return fFillType; } | 29 GrPathRendering::FillType fillType() const { return fFillType; } |
30 | 30 |
31 void setStencilSettings(const GrStencilSettings& stencil) { fStencilSettings
= stencil; } | 31 void setStencilSettings(const GrUserStencilSettings& stencil, bool hasStenci
lClip, |
| 32 int numStencilBits) { |
| 33 fStencilSettings.reset(stencil, hasStencilClip, numStencilBits); |
| 34 } |
32 | 35 |
33 protected: | 36 protected: |
34 GrDrawPathBatchBase(uint32_t classID, const SkMatrix& viewMatrix, GrColor in
itialColor, | 37 GrDrawPathBatchBase(uint32_t classID, const SkMatrix& viewMatrix, GrColor in
itialColor, |
35 GrPathRendering::FillType fill) | 38 GrPathRendering::FillType fill) |
36 : INHERITED(classID) | 39 : INHERITED(classID) |
37 , fViewMatrix(viewMatrix) | 40 , fViewMatrix(viewMatrix) |
38 , fColor(initialColor) | 41 , fColor(initialColor) |
39 , fFillType(fill) {} | 42 , fFillType(fill) {} |
40 | 43 |
41 const GrStencilSettings& stencilSettings() const { return fStencilSettings;
} | 44 const GrStencilSettings& stencilSettings() const { return fStencilSettings;
} |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 203 |
201 PendingPathRange fPathRange; | 204 PendingPathRange fPathRange; |
202 DrawList fDraws; | 205 DrawList fDraws; |
203 int fTotalPathCount; | 206 int fTotalPathCount; |
204 SkScalar fScale; | 207 SkScalar fScale; |
205 | 208 |
206 typedef GrDrawPathBatchBase INHERITED; | 209 typedef GrDrawPathBatchBase INHERITED; |
207 }; | 210 }; |
208 | 211 |
209 #endif | 212 #endif |
OLD | NEW |