| 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 getInvariantOutputColor(GrInitInvariantOutput* out) const override { | 22 void computeBatchToXPOverrides(GrInitInvariantOutput* color, GrInitInvariant
Output* coverage, |
| 23 out->setKnownFourComponents(fColor); | 23 bool* usePLSDstRead) const { |
| 24 } | 24 color->setKnownFourComponents(fColor); |
| 25 | 25 coverage->setKnownSingleComponent(0xff); |
| 26 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { | 26 *usePLSDstRead = false; |
| 27 out->setKnownSingleComponent(0xff); | |
| 28 } | 27 } |
| 29 | 28 |
| 30 void setStencilSettings(const GrStencilSettings& stencil) { fStencilSettings
= stencil; } | 29 void setStencilSettings(const GrStencilSettings& stencil) { fStencilSettings
= stencil; } |
| 31 | 30 |
| 32 protected: | 31 protected: |
| 33 GrDrawPathBatchBase(uint32_t classID, const SkMatrix& viewMatrix, GrColor in
itialColor) | 32 GrDrawPathBatchBase(uint32_t classID, const SkMatrix& viewMatrix, GrColor in
itialColor) |
| 34 : INHERITED(classID) | 33 : INHERITED(classID) |
| 35 , fViewMatrix(viewMatrix) | 34 , fViewMatrix(viewMatrix) |
| 36 , fColor(initialColor) {} | 35 , fColor(initialColor) {} |
| 37 | 36 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 typedef SkTLList<GrPathRangeDraw*, 4> DrawList; | 173 typedef SkTLList<GrPathRangeDraw*, 4> DrawList; |
| 175 PendingPathRange fPathRange; | 174 PendingPathRange fPathRange; |
| 176 DrawList fDraws; | 175 DrawList fDraws; |
| 177 int fTotalPathCount; | 176 int fTotalPathCount; |
| 178 SkMatrix fLocalMatrix; | 177 SkMatrix fLocalMatrix; |
| 179 | 178 |
| 180 typedef GrDrawPathBatchBase INHERITED; | 179 typedef GrDrawPathBatchBase INHERITED; |
| 181 }; | 180 }; |
| 182 | 181 |
| 183 #endif | 182 #endif |
| OLD | NEW |