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 |
11 #include "GrBatchFlushState.h" | 11 #include "GrBatchFlushState.h" |
12 #include "GrDrawBatch.h" | 12 #include "GrDrawBatch.h" |
13 #include "GrGpu.h" | 13 #include "GrGpu.h" |
14 #include "GrPath.h" | 14 #include "GrPath.h" |
15 #include "GrPathRendering.h" | 15 #include "GrPathRendering.h" |
16 #include "GrPathProcessor.h" | 16 #include "GrPathProcessor.h" |
17 | 17 |
18 #include "SkTLList.h" | 18 #include "SkTLList.h" |
19 | 19 |
20 class GrDrawPathBatchBase : public GrDrawBatch { | 20 class GrDrawPathBatchBase : public GrDrawBatch { |
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 overrides->fUsePLSDstRead = false; | |
28 } | 27 } |
29 | 28 |
30 GrPathRendering::FillType fillType() const { return fFillType; } | 29 GrPathRendering::FillType fillType() const { return fFillType; } |
31 | 30 |
32 void setStencilSettings(const GrStencilSettings& stencil) { fStencilSettings
= stencil; } | 31 void setStencilSettings(const GrStencilSettings& stencil) { fStencilSettings
= stencil; } |
33 | 32 |
34 protected: | 33 protected: |
35 GrDrawPathBatchBase(uint32_t classID, const SkMatrix& viewMatrix, GrColor in
itialColor, | 34 GrDrawPathBatchBase(uint32_t classID, const SkMatrix& viewMatrix, GrColor in
itialColor, |
36 GrPathRendering::FillType fill) | 35 GrPathRendering::FillType fill) |
37 : INHERITED(classID) | 36 : INHERITED(classID) |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 200 |
202 PendingPathRange fPathRange; | 201 PendingPathRange fPathRange; |
203 DrawList fDraws; | 202 DrawList fDraws; |
204 int fTotalPathCount; | 203 int fTotalPathCount; |
205 SkScalar fScale; | 204 SkScalar fScale; |
206 | 205 |
207 typedef GrDrawPathBatchBase INHERITED; | 206 typedef GrDrawPathBatchBase INHERITED; |
208 }; | 207 }; |
209 | 208 |
210 #endif | 209 #endif |
OLD | NEW |