aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkDevice.h
diff options
context:
space:
mode:
authorGravatar dandov <dandov@google.com>2014-08-04 10:02:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-04 10:02:00 -0700
commitecfff21bde1f0ca3c36533eded325066b5f2d42d (patch)
tree72fd989d958f337a3b6c779cc3f8f34378645501 /include/core/SkDevice.h
parentd3d6b818c70fa809837eb0cdf2ff5a5d4c6dff53 (diff)
SkCanvas interface for drawing a patch.
Added function SkCanvas::drawPatch to the API. This function receives the patch to draw and the paint. Added function SkBaseDevice::drawPatch to the API. This function also receives the patch to draw and the paint. Currently SkGpuDevice and SkBitmapDevice generate the mesh taking into account the scale factor and call the corresponding device's drawVertices. BUG=skia: R=jvanverth@google.com, egdaniel@google.com, bsalomon@google.com Author: dandov@google.com Review URL: https://codereview.chromium.org/424663006
Diffstat (limited to 'include/core/SkDevice.h')
-rw-r--r--include/core/SkDevice.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 504138df1e..3e5e42b48f 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -242,6 +242,8 @@ protected:
const SkColor colors[], SkXfermode* xmode,
const uint16_t indices[], int indexCount,
const SkPaint& paint) = 0;
+ // default implementation calls drawVertices
+ virtual void drawPatch(const SkDraw&, const SkPatch& patch, const SkPaint& paint);
/** The SkDevice passed will be an SkDevice which was returned by a call to
onCreateDevice on this device with kSaveLayer_Usage.
*/