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 --- src/utils/SkDeferredCanvas.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/utils/SkDeferredCanvas.cpp') diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp index 19957fd81d..2820bac48d 100644 --- a/src/utils/SkDeferredCanvas.cpp +++ b/src/utils/SkDeferredCanvas.cpp @@ -224,6 +224,8 @@ protected: SkXfermode* xmode, const uint16_t indices[], int indexCount, const SkPaint& paint) SK_OVERRIDE {SkASSERT(0);} + virtual void drawPatch(const SkDraw&, const SkPatch& patch, const SkPaint& paint) SK_OVERRIDE + {SkASSERT(0);} virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const SkPaint&) SK_OVERRIDE {SkASSERT(0);} @@ -914,6 +916,10 @@ void SkDeferredCanvas::drawVertices(VertexMode vmode, int vertexCount, this->recordedDrawCommand(); } +void SkDeferredCanvas::drawPatch(const SkPatch& patch, const SkPaint& paint) { + //TODO +} + SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { this->drawingCanvas()->setDrawFilter(filter); this->INHERITED::setDrawFilter(filter); -- cgit v1.2.3