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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 const char* name() const override { return "DrawPath"; } | 72 const char* name() const override { return "DrawPath"; } |
73 | 73 |
74 SkString dumpInfo() const override; | 74 SkString dumpInfo() const override; |
75 | 75 |
76 private: | 76 private: |
77 GrDrawPathBatch(const SkMatrix& viewMatrix, GrColor color, GrPathRendering::
FillType fill, | 77 GrDrawPathBatch(const SkMatrix& viewMatrix, GrColor color, GrPathRendering::
FillType fill, |
78 const GrPath* path) | 78 const GrPath* path) |
79 : INHERITED(ClassID(), viewMatrix, color, fill) | 79 : INHERITED(ClassID(), viewMatrix, color, fill) |
80 , fPath(path) { | 80 , fPath(path) { |
81 fBounds = path->getBounds(); | 81 this->setTransformedBounds(path->getBounds(), viewMatrix, HasAABloat::kN
o, IsZeroArea::kNo); |
82 viewMatrix.mapRect(&fBounds); | |
83 } | 82 } |
84 | 83 |
85 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f
alse; } | 84 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f
alse; } |
86 | 85 |
87 void onDraw(GrBatchFlushState* state) override; | 86 void onDraw(GrBatchFlushState* state) override; |
88 | 87 |
89 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; | 88 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; |
90 | 89 |
91 typedef GrDrawPathBatchBase INHERITED; | 90 typedef GrDrawPathBatchBase INHERITED; |
92 }; | 91 }; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 194 |
196 PendingPathRange fPathRange; | 195 PendingPathRange fPathRange; |
197 DrawList fDraws; | 196 DrawList fDraws; |
198 int fTotalPathCount; | 197 int fTotalPathCount; |
199 SkScalar fScale; | 198 SkScalar fScale; |
200 | 199 |
201 typedef GrDrawPathBatchBase INHERITED; | 200 typedef GrDrawPathBatchBase INHERITED; |
202 }; | 201 }; |
203 | 202 |
204 #endif | 203 #endif |
OLD | NEW |