| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 GrStencilSettings fStencilPassSettings
; | 57 GrStencilSettings fStencilPassSettings
; |
| 58 GrXPOverridesForBatch fOverrides; | 58 GrXPOverridesForBatch fOverrides; |
| 59 | 59 |
| 60 typedef GrDrawBatch INHERITED; | 60 typedef GrDrawBatch INHERITED; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 class GrDrawPathBatch final : public GrDrawPathBatchBase { | 63 class GrDrawPathBatch final : public GrDrawPathBatchBase { |
| 64 public: | 64 public: |
| 65 DEFINE_BATCH_CLASS_ID | 65 DEFINE_BATCH_CLASS_ID |
| 66 | 66 |
| 67 static GrDrawBatch* Create(const SkMatrix& viewMatrix, GrColor color, | 67 static GrDrawBatch* Create(const SkMatrix& viewMatrix, GrColor color, const
GrPath* path) { |
| 68 GrPathRendering::FillType fill, const GrPath* pat
h) { | 68 return new GrDrawPathBatch(viewMatrix, color, path); |
| 69 return new GrDrawPathBatch(viewMatrix, color, fill, path); | |
| 70 } | 69 } |
| 71 | 70 |
| 72 const char* name() const override { return "DrawPath"; } | 71 const char* name() const override { return "DrawPath"; } |
| 73 | 72 |
| 74 SkString dumpInfo() const override; | 73 SkString dumpInfo() const override; |
| 75 | 74 |
| 76 private: | 75 private: |
| 77 GrDrawPathBatch(const SkMatrix& viewMatrix, GrColor color, GrPathRendering::
FillType fill, | 76 GrDrawPathBatch(const SkMatrix& viewMatrix, GrColor color, const GrPath* pat
h) |
| 78 const GrPath* path) | 77 : INHERITED(ClassID(), viewMatrix, color, path->getFillType()) |
| 79 : INHERITED(ClassID(), viewMatrix, color, fill) | |
| 80 , fPath(path) { | 78 , fPath(path) { |
| 81 this->setTransformedBounds(path->getBounds(), viewMatrix, HasAABloat::kN
o, IsZeroArea::kNo); | 79 this->setTransformedBounds(path->getBounds(), viewMatrix, HasAABloat::kN
o, IsZeroArea::kNo); |
| 82 } | 80 } |
| 83 | 81 |
| 84 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f
alse; } | 82 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f
alse; } |
| 85 | 83 |
| 86 void onDraw(GrBatchFlushState* state) override; | 84 void onDraw(GrBatchFlushState* state) override; |
| 87 | 85 |
| 88 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; | 86 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; |
| 89 | 87 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 192 |
| 195 PendingPathRange fPathRange; | 193 PendingPathRange fPathRange; |
| 196 DrawList fDraws; | 194 DrawList fDraws; |
| 197 int fTotalPathCount; | 195 int fTotalPathCount; |
| 198 SkScalar fScale; | 196 SkScalar fScale; |
| 199 | 197 |
| 200 typedef GrDrawPathBatchBase INHERITED; | 198 typedef GrDrawPathBatchBase INHERITED; |
| 201 }; | 199 }; |
| 202 | 200 |
| 203 #endif | 201 #endif |
| OLD | NEW |