From ecfff21bde1f0ca3c36533eded325066b5f2d42d Mon Sep 17 00:00:00 2001 From: dandov Date: Mon, 4 Aug 2014 10:02:00 -0700 Subject: 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 --- include/core/SkDevice.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/core/SkDevice.h') 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. */ -- cgit v1.2.3