Chromium Code Reviews| Index: src/gpu/GrDrawTarget.h |
| diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h |
| index 7898dfdcab66fedc1083c3099e12c5cc5f326c0b..5975ff7ee4b4c22528f4cc4e4935177b5419742f 100644 |
| --- a/src/gpu/GrDrawTarget.h |
| +++ b/src/gpu/GrDrawTarget.h |
| @@ -26,6 +26,7 @@ |
| class GrClipData; |
| class GrDrawTargetCaps; |
| class GrPath; |
| +class GrPathRange; |
| class GrVertexBuffer; |
| class GrDrawTarget : public SkRefCnt { |
| @@ -349,14 +350,19 @@ public: |
| * Draws many paths. It will respect the HW |
| * antialias flag on the draw state (if possible in the 3D API). |
| * |
| - * @param transforms array of 2d affine transformations, one for each path. |
| - * @param fill the fill type for drawing all the paths. Fill must not be a |
| - * hairline. |
| - * @param stroke the stroke for drawing all the paths. |
| + * @param pathRange Source of paths to draw from, stroke must not be |
|
bsalomon
2014/07/17 17:27:28
Is this comment right or should the hairline text
Chris Dalton
2014/07/17 18:15:19
The old comment wasn't correct, hairline is a stro
|
| + * hairline |
| + * @param indices Array of indices into the the pathRange |
| + * @param count Number of paths to draw (length of indices array) |
| + * @param transforms Array of individual transforms, one for each path |
| + * @param transformsFormat Format of the transforms array. The array contains |
| + * GrTransformSize(transformsFormat) × count elements |
| + * @param fill Fill type for drawing all the paths |
| */ |
| - void drawPaths(int pathCount, const GrPath** paths, |
| - const SkMatrix* transforms, SkPath::FillType fill, |
| - SkStrokeRec::Style stroke); |
| + void drawPaths(const GrPathRange* pathRange, |
| + const uint32_t indices[], int count, |
| + const float transforms[], GrTransformFormat transformsFormat, |
| + SkPath::FillType fill); |
| /** |
| * Helper function for drawing rects. It performs a geometry src push and pop |
| @@ -516,11 +522,12 @@ public: |
| /** |
| * For subclass internal use to invoke a call to onDrawPaths(). |
| */ |
| - void executeDrawPaths(int pathCount, const GrPath** paths, |
| - const SkMatrix* transforms, SkPath::FillType fill, |
| - SkStrokeRec::Style stroke, |
| + void executeDrawPaths(const GrPathRange* pathRange, |
| + const uint32_t indices[], int count, |
| + const float transforms[], GrTransformFormat transformsFormat, |
| + SkPath::FillType fill, |
| const GrDeviceCoordTexture* dstCopy) { |
| - this->onDrawPaths(pathCount, paths, transforms, fill, stroke, dstCopy); |
| + this->onDrawPaths(pathRange, indices, count, transforms, transformsFormat, fill, dstCopy); |
| } |
| inline bool isGpuTracingEnabled() const { |
| @@ -909,9 +916,10 @@ private: |
| virtual void onStencilPath(const GrPath*, SkPath::FillType) = 0; |
| virtual void onDrawPath(const GrPath*, SkPath::FillType, |
| const GrDeviceCoordTexture* dstCopy) = 0; |
| - virtual void onDrawPaths(int, const GrPath**, const SkMatrix*, |
| - SkPath::FillType, SkStrokeRec::Style, |
| - const GrDeviceCoordTexture* dstCopy) = 0; |
| + virtual void onDrawPaths(const GrPathRange*, |
| + const uint32_t indices[], int count, |
| + const float transforms[], GrTransformFormat, |
| + SkPath::FillType, const GrDeviceCoordTexture*) = 0; |
| virtual void didAddGpuTraceMarker() = 0; |
| virtual void didRemoveGpuTraceMarker() = 0; |