diff --git a/include/utils/SkNWayCanvas.h b/include/utils/SkNWayCanvas.h index c48bcab3c4..eae3bfc538 100644 --- a/include/utils/SkNWayCanvas.h +++ b/include/utils/SkNWayCanvas.h @@ -38,12 +38,12 @@ public: virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE; virtual bool clipRegion(const SkRegion& deviceRgn, SkRegion::Op) SK_OVERRIDE; - + virtual void clear(SkColor) SK_OVERRIDE; virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; - virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; virtual void drawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; + virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE; virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, @@ -53,6 +53,9 @@ public: DrawBitmapRectFlags flags) SK_OVERRIDE; virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, const SkPaint*) SK_OVERRIDE; + virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, + const SkRect& dst, + const SkPaint* paint = NULL) SK_OVERRIDE; virtual void drawSprite(const SkBitmap& bitmap, int left, int top, const SkPaint*) SK_OVERRIDE; virtual void drawText(const void* text, size_t byteLength, SkScalar x, @@ -71,6 +74,7 @@ public: const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, const SkPaint&) SK_OVERRIDE; + virtual void drawData(const void* data, size_t length) SK_OVERRIDE; virtual SkBounder* setBounder(SkBounder*) SK_OVERRIDE; virtual SkDrawFilter* setDrawFilter(SkDrawFilter*) SK_OVERRIDE; diff --git a/src/utils/SkNWayCanvas.cpp b/src/utils/SkNWayCanvas.cpp index eeb1bc2a09..da8bdb6f41 100644 --- a/src/utils/SkNWayCanvas.cpp +++ b/src/utils/SkNWayCanvas.cpp @@ -168,6 +168,13 @@ bool SkNWayCanvas::clipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { return this->INHERITED::clipRegion(deviceRgn, op); } +void SkNWayCanvas::clear(SkColor color) { + Iter iter(fList); + while (iter.next()) { + iter->clear(color); + } +} + void SkNWayCanvas::drawPaint(const SkPaint& paint) { Iter iter(fList); while (iter.next()) { @@ -183,13 +190,6 @@ void SkNWayCanvas::drawPoints(PointMode mode, size_t count, const SkPoint pts[], } } -void SkNWayCanvas::drawOval(const SkRect& rect, const SkPaint& paint) { - Iter iter(fList); - while (iter.next()) { - iter->drawOval(rect, paint); - } -} - void SkNWayCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { Iter iter(fList); while (iter.next()) { @@ -197,6 +197,13 @@ void SkNWayCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { } } +void SkNWayCanvas::drawOval(const SkRect& rect, const SkPaint& paint) { + Iter iter(fList); + while (iter.next()) { + iter->drawOval(rect, paint); + } +} + void SkNWayCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { Iter iter(fList); while (iter.next()) { @@ -236,6 +243,14 @@ void SkNWayCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, } } +void SkNWayCanvas::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, + const SkRect& dst, const SkPaint* paint) { + Iter iter(fList); + while (iter.next()) { + iter->drawBitmapNine(bitmap, center, dst, paint); + } +} + void SkNWayCanvas::drawSprite(const SkBitmap& bitmap, int x, int y, const SkPaint* paint) { Iter iter(fList); @@ -297,6 +312,13 @@ void SkNWayCanvas::drawVertices(VertexMode vmode, int vertexCount, } } +void SkNWayCanvas::drawData(const void* data, size_t length) { + Iter iter(fList); + while (iter.next()) { + iter->drawData(data, length); + } +} + SkBounder* SkNWayCanvas::setBounder(SkBounder* bounder) { Iter iter(fList); while (iter.next()) {