aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkDeferredCanvas.cpp
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 /src/utils/SkDeferredCanvas.cpp
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 'src/utils/SkDeferredCanvas.cpp')
-rw-r--r--src/utils/SkDeferredCanvas.cpp6
1 files changed, 6 insertions, 0 deletions
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);