Chromium Code Reviews| Index: include/core/SkCanvas.h |
| diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
| index 011e3c3a037dfd1bc1c18b525ef3f08772115aeb..976fdbfc7eb3a89b03fc7916459489bd57da3b3c 100644 |
| --- a/include/core/SkCanvas.h |
| +++ b/include/core/SkCanvas.h |
| @@ -13,8 +13,8 @@ |
| #include "SkDeque.h" |
| #include "SkClipStack.h" |
| #include "SkPaint.h" |
| +#include "SkPatchUtils.h" |
|
reed1
2014/08/12 13:33:02
Does SkCanvas.h need this header?
dandov
2014/08/12 15:23:30
Removed header from SkCanvas.h and add it where it
|
| #include "SkRefCnt.h" |
| -#include "SkPatch.h" |
| #include "SkPath.h" |
| #include "SkRegion.h" |
| #include "SkXfermode.h" |
| @@ -1022,14 +1022,21 @@ public: |
| const uint16_t indices[], int indexCount, |
| const SkPaint& paint); |
| - /** |
| - |
| - Draw a SkPatch |
| + /** |
| + Draw a cubic coons patch |
| - @param patch specifies the 4 bounding cubic bezier curves of a patch. |
| + @param cubic specifies the 4 bounding cubic bezier curves of a patch with clockwise order |
| + starting at the top left corner. |
| + @param colors specifies the colors for the corners which will be bilerp across the patch, |
| + their order is clockwise starting at the top left corner. |
| + @param texCoords specifies the texture coordinates that will be bilerp across the patch, |
| + their order is the same as the colors. |
| + @param xmode specifies how are the colors and the textures combined if both of them are |
| + present. |
| @param paint Specifies the shader/texture if present. |
| */ |
| - virtual void drawPatch(const SkPatch& patch, const SkPaint& paint); |
| + void drawPatch(const SkPoint cubics[12], const SkColor colors[4], |
| + const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); |
| /** Send a blob of data to the canvas. |
| For canvases that draw, this call is effectively a no-op, as the data |
| @@ -1224,6 +1231,9 @@ protected: |
| virtual void onDrawTextOnPath(const void* text, size_t byteLength, |
| const SkPath& path, const SkMatrix* matrix, |
| const SkPaint& paint); |
| + |
| + virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
| + const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); |
| enum ClipEdgeStyle { |
| kHard_ClipEdgeStyle, |