diff options
author | 2015-01-05 07:49:08 -0800 | |
---|---|---|
committer | 2015-01-05 07:49:08 -0800 | |
commit | 41af966ab338e95eee81ab618ab28195075338f7 (patch) | |
tree | e11def4f93345bfb4204d20f6f28fc7a2fecda1a /include | |
parent | 49aabde6ef80e39f00a2d00487cf5a881987dd81 (diff) |
Revert of Revert of move remaining virtual draw methods to onDraw (patchset #1 id:1 of https://codereview.chromium.org/835913002/)
Reason for revert:
test to see if it wasn't this CL that broke chromeos
Original issue's description:
> Revert of move remaining virtual draw methods to onDraw (patchset #5 id:80001 of https://codereview.chromium.org/817723005/)
>
> Reason for revert:
> did this cause chromeos heap corruption on skp?
>
> Original issue's description:
> > move remaining virtual draw methods to onDraw
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/2e0f7d53bba5438c9bf11ee5ccae2c301e348419
>
> TBR=robertphillips@google.com,djsollen@google.com,bsalomon@google.com,mtklein@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e87e383351e1547b21d96d02bcd0c3cbbe0837f1
TBR=robertphillips@google.com,djsollen@google.com,bsalomon@google.com,mtklein@google.com,reed@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/831253002
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkCanvas.h | 52 | ||||
-rw-r--r-- | include/core/SkImage.h | 1 | ||||
-rw-r--r-- | include/utils/SkDeferredCanvas.h | 52 | ||||
-rw-r--r-- | include/utils/SkDumpCanvas.h | 40 | ||||
-rw-r--r-- | include/utils/SkLuaCanvas.h | 41 | ||||
-rw-r--r-- | include/utils/SkNWayCanvas.h | 49 | ||||
-rw-r--r-- | include/utils/SkProxyCanvas.h | 46 |
7 files changed, 148 insertions, 133 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index cb4fedefdc..f2cacf124d 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -36,6 +36,12 @@ class GrRenderTarget; class SkCanvasState; +#ifdef SK_SUPPORT_LEGACY_CANVAS_VIRTUAL + #define SK_LEGACY_CANVAS_VIRTUAL virtual +#else + #define SK_LEGACY_CANVAS_VIRTUAL +#endif + /** \class SkCanvas A Canvas encapsulates all of the state about drawing into a device (bitmap). @@ -608,7 +614,7 @@ public: * specified paint. * @param paint The paint used to fill the canvas */ - virtual void drawPaint(const SkPaint& paint); + SK_LEGACY_CANVAS_VIRTUAL void drawPaint(const SkPaint& paint); enum PointMode { /** drawPoints draws each point separately */ @@ -640,8 +646,8 @@ public: @param pts Array of points to draw @param paint The paint used to draw the points */ - virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], - const SkPaint& paint); + SK_LEGACY_CANVAS_VIRTUAL void drawPoints(PointMode mode, size_t count, const SkPoint pts[], + const SkPaint& paint); /** Helper method for drawing a single point. See drawPoints() for a more details. @@ -672,7 +678,7 @@ public: @param rect The rect to be drawn @param paint The paint used to draw the rect */ - virtual void drawRect(const SkRect& rect, const SkPaint& paint); + SK_LEGACY_CANVAS_VIRTUAL void drawRect(const SkRect& rect, const SkPaint& paint); /** Draw the specified rectangle using the specified paint. The rectangle will be filled or framed based on the Style in the paint. @@ -701,7 +707,7 @@ public: @param oval The rectangle bounds of the oval to be drawn @param paint The paint used to draw the oval */ - virtual void drawOval(const SkRect& oval, const SkPaint&); + SK_LEGACY_CANVAS_VIRTUAL void drawOval(const SkRect& oval, const SkPaint&); /** * Draw the specified RRect using the specified paint The rrect will be filled or stroked @@ -710,7 +716,7 @@ public: * @param rrect The round-rect to draw * @param paint The paint used to draw the round-rect */ - virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint); + SK_LEGACY_CANVAS_VIRTUAL void drawRRect(const SkRRect& rrect, const SkPaint& paint); /** * Draw the annulus formed by the outer and inner rrects. The results @@ -758,7 +764,7 @@ public: @param path The path to be drawn @param paint The paint used to draw the path */ - virtual void drawPath(const SkPath& path, const SkPaint& paint); + SK_LEGACY_CANVAS_VIRTUAL void drawPath(const SkPath& path, const SkPaint& paint); /** Draw the specified image, with its top/left corner at (x,y), using the specified paint, transformed by the current matrix. @@ -768,7 +774,7 @@ public: @param top The position of the top side of the image being drawn @param paint The paint used to draw the image, or NULL */ - virtual void drawImage(const SkImage* image, SkScalar left, SkScalar top, + SK_LEGACY_CANVAS_VIRTUAL void drawImage(const SkImage* image, SkScalar left, SkScalar top, const SkPaint* paint = NULL); /** Draw the specified image, with the specified matrix applied (before the canvas' matrix is applied). @@ -779,7 +785,7 @@ public: image will be drawn @param paint The paint used to draw the image, or NULL */ - virtual void drawImageRect(const SkImage* image, const SkRect* src, + SK_LEGACY_CANVAS_VIRTUAL void drawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst, const SkPaint* paint = NULL); @@ -799,7 +805,7 @@ public: @param top The position of the top side of the bitmap being drawn @param paint The paint used to draw the bitmap, or NULL */ - virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, + SK_LEGACY_CANVAS_VIRTUAL void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, const SkPaint* paint = NULL); enum DrawBitmapRectFlags { @@ -820,7 +826,7 @@ public: image will be drawn @param paint The paint used to draw the bitmap, or NULL */ - virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, + SK_LEGACY_CANVAS_VIRTUAL void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, const SkPaint* paint = NULL, DrawBitmapRectFlags flags = kNone_DrawBitmapRectFlag); @@ -856,7 +862,7 @@ public: * - The corners shrink proportionally * - The sides (along the shrink axis) and center are not drawn */ - virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, + SK_LEGACY_CANVAS_VIRTUAL void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, const SkRect& dst, const SkPaint* paint = NULL); /** Draw the specified bitmap, with its top/left corner at (x,y), @@ -870,7 +876,7 @@ public: @param top The position of the top side of the bitmap being drawn @param paint The paint used to draw the bitmap, or NULL */ - virtual void drawSprite(const SkBitmap& bitmap, int left, int top, + SK_LEGACY_CANVAS_VIRTUAL void drawSprite(const SkBitmap& bitmap, int left, int top, const SkPaint* paint = NULL); /** Draw the text, with origin at (x,y), using the specified paint. @@ -993,7 +999,7 @@ public: @param indexCount number of entries in the indices array (if not null) @param paint Specifies the shader/texture if present. */ - virtual void drawVertices(VertexMode vmode, int vertexCount, + SK_LEGACY_CANVAS_VIRTUAL void drawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, @@ -1197,6 +1203,24 @@ protected: virtual void onDrawDrawable(SkCanvasDrawable*); + virtual void onDrawPaint(const SkPaint&); + virtual void onDrawRect(const SkRect&, const SkPaint&); + virtual void onDrawOval(const SkRect&, const SkPaint&); + virtual void onDrawRRect(const SkRRect&, const SkPaint&); + virtual void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&); + virtual void onDrawVertices(VertexMode, int vertexCount, const SkPoint vertices[], + const SkPoint texs[], const SkColor colors[], SkXfermode*, + const uint16_t indices[], int indexCount, const SkPaint&); + virtual void onDrawPath(const SkPath&, const SkPaint&); + virtual void onDrawImage(const SkImage*, SkScalar dx, SkScalar dy, const SkPaint*); + virtual void onDrawImageRect(const SkImage*, const SkRect*, const SkRect&, const SkPaint*); + virtual void onDrawBitmap(const SkBitmap&, SkScalar dx, SkScalar dy, const SkPaint*); + virtual void onDrawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&, const SkPaint*, + DrawBitmapRectFlags); + virtual void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, + const SkPaint*); + virtual void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*); + enum ClipEdgeStyle { kHard_ClipEdgeStyle, kSoft_ClipEdgeStyle diff --git a/include/core/SkImage.h b/include/core/SkImage.h index 39239fbf8f..5ce32eafb7 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -18,6 +18,7 @@ class SkData; class SkCanvas; class SkImageGenerator; class SkPaint; +class SkString; class SkSurface; class SkSurfaceProps; class GrContext; diff --git a/include/utils/SkDeferredCanvas.h b/include/utils/SkDeferredCanvas.h index b9b85e6819..0527198d77 100644 --- a/include/utils/SkDeferredCanvas.h +++ b/include/utils/SkDeferredCanvas.h @@ -143,32 +143,6 @@ public: */ void silentFlush(); - // Overrides of the SkCanvas interface - virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; - virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], - const SkPaint& paint) SK_OVERRIDE; - virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; - virtual void drawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE; - virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; - virtual void drawPath(const SkPath& path, const SkPaint& paint) - SK_OVERRIDE; - virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, - SkScalar top, const SkPaint* paint) - SK_OVERRIDE; - virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, - const SkRect& dst, const SkPaint* paint, - DrawBitmapRectFlags flags) SK_OVERRIDE; - - virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, - const SkRect& dst, const SkPaint* paint) - SK_OVERRIDE; - virtual void drawSprite(const SkBitmap& bitmap, int left, int top, - const SkPaint* paint) SK_OVERRIDE; - virtual void drawVertices(VertexMode vmode, int vertexCount, - const SkPoint vertices[], const SkPoint texs[], - const SkColor colors[], SkXfermode* xmode, - const uint16_t indices[], int indexCount, - const SkPaint& paint) SK_OVERRIDE; virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE; protected: @@ -193,7 +167,31 @@ protected: virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint) SK_OVERRIDE; - + + void onDrawPaint(const SkPaint&) SK_OVERRIDE; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; + void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, + DrawBitmapRectFlags flags) SK_OVERRIDE; +#if 0 + // rely on conversion to bitmap(for now) + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; +#endif + void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + void onDrawVertices(VertexMode vmode, int vertexCount, + const SkPoint vertices[], const SkPoint texs[], + const SkColor colors[], SkXfermode* xmode, + const uint16_t indices[], int indexCount, + const SkPaint&) SK_OVERRIDE; + virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; diff --git a/include/utils/SkDumpCanvas.h b/include/utils/SkDumpCanvas.h index 0c66506c44..d8f50d0521 100644 --- a/include/utils/SkDumpCanvas.h +++ b/include/utils/SkDumpCanvas.h @@ -75,25 +75,6 @@ public: int getNestLevel() const { return fNestLevel; } - virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; - virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], - const SkPaint& paint) SK_OVERRIDE; - virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; - virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE; - virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; - virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; - virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, - const SkPaint* paint) SK_OVERRIDE; - virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, - const SkRect& dst, const SkPaint* paint, - DrawBitmapRectFlags flags) SK_OVERRIDE; - virtual void drawSprite(const SkBitmap& bitmap, int left, int top, - const SkPaint* paint) SK_OVERRIDE; - virtual void drawVertices(VertexMode vmode, int vertexCount, - const SkPoint vertices[], const SkPoint texs[], - const SkColor colors[], SkXfermode* xmode, - const uint16_t indices[], int indexCount, - const SkPaint& paint) SK_OVERRIDE; virtual void beginCommentGroup(const char* description) SK_OVERRIDE; virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; virtual void endCommentGroup() SK_OVERRIDE; @@ -121,6 +102,27 @@ protected: const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint) SK_OVERRIDE; + void onDrawPaint(const SkPaint&) SK_OVERRIDE; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; + void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, + DrawBitmapRectFlags flags) SK_OVERRIDE; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; + void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + void onDrawVertices(VertexMode vmode, int vertexCount, + const SkPoint vertices[], const SkPoint texs[], + const SkColor colors[], SkXfermode* xmode, + const uint16_t indices[], int indexCount, + const SkPaint&) SK_OVERRIDE; + virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; diff --git a/include/utils/SkLuaCanvas.h b/include/utils/SkLuaCanvas.h index d2019d4325..8c535226f2 100644 --- a/include/utils/SkLuaCanvas.h +++ b/include/utils/SkLuaCanvas.h @@ -20,26 +20,6 @@ public: SkLuaCanvas(int width, int height, lua_State*, const char function[]); virtual ~SkLuaCanvas(); - virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; - virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], - const SkPaint& paint) SK_OVERRIDE; - virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; - virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE; - virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; - virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; - virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, - const SkPaint* paint) SK_OVERRIDE; - virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, - const SkRect& dst, const SkPaint* paint, - DrawBitmapRectFlags flags) SK_OVERRIDE; - virtual void drawSprite(const SkBitmap& bitmap, int left, int top, - const SkPaint* paint) SK_OVERRIDE; - virtual void drawVertices(VertexMode vmode, int vertexCount, - const SkPoint vertices[], const SkPoint texs[], - const SkColor colors[], SkXfermode* xmode, - const uint16_t indices[], int indexCount, - const SkPaint& paint) SK_OVERRIDE; - protected: virtual void willSave() SK_OVERRIDE; virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE; @@ -60,6 +40,27 @@ protected: virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint) SK_OVERRIDE; + void onDrawPaint(const SkPaint&) SK_OVERRIDE; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; + void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, + DrawBitmapRectFlags flags) SK_OVERRIDE; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; + void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + void onDrawVertices(VertexMode vmode, int vertexCount, + const SkPoint vertices[], const SkPoint texs[], + const SkColor colors[], SkXfermode* xmode, + const uint16_t indices[], int indexCount, + const SkPaint&) SK_OVERRIDE; + virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; diff --git a/include/utils/SkNWayCanvas.h b/include/utils/SkNWayCanvas.h index 5e8c52d136..b547fe524a 100644 --- a/include/utils/SkNWayCanvas.h +++ b/include/utils/SkNWayCanvas.h @@ -23,34 +23,6 @@ public: /////////////////////////////////////////////////////////////////////////// // These are forwarded to the N canvases we're referencing - 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 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, - const SkPaint*) SK_OVERRIDE; - virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, - const SkRect& dst, const SkPaint* paint, - DrawBitmapRectFlags flags) SK_OVERRIDE; - virtual void drawImage(const SkImage* image, SkScalar left, SkScalar top, - const SkPaint* paint) SK_OVERRIDE; - virtual void drawImageRect(const SkImage* image, const SkRect* src, - const SkRect& dst, - const SkPaint* paint) 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 drawVertices(VertexMode vmode, int vertexCount, - const SkPoint vertices[], const SkPoint texs[], - const SkColor colors[], SkXfermode* xmode, - const uint16_t indices[], int indexCount, - const SkPaint&) SK_OVERRIDE; - virtual SkDrawFilter* setDrawFilter(SkDrawFilter*) SK_OVERRIDE; virtual void beginCommentGroup(const char* description) SK_OVERRIDE; @@ -82,6 +54,27 @@ protected: const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint) SK_OVERRIDE; + void onDrawPaint(const SkPaint&) SK_OVERRIDE; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; + void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, + DrawBitmapRectFlags flags) SK_OVERRIDE; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; + void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + void onDrawVertices(VertexMode vmode, int vertexCount, + const SkPoint vertices[], const SkPoint texs[], + const SkColor colors[], SkXfermode* xmode, + const uint16_t indices[], int indexCount, + const SkPaint&) SK_OVERRIDE; + virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; diff --git a/include/utils/SkProxyCanvas.h b/include/utils/SkProxyCanvas.h index c8a830f613..2a2d7746f5 100644 --- a/include/utils/SkProxyCanvas.h +++ b/include/utils/SkProxyCanvas.h @@ -26,31 +26,6 @@ public: SkCanvas* getProxy() const { return fProxy; } void setProxy(SkCanvas* proxy); - virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; - virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], - const SkPaint& paint) SK_OVERRIDE; - virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; - virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE; - virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; - virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; - virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, - const SkPaint* paint = NULL) SK_OVERRIDE; - virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, - const SkRect& dst, const SkPaint* paint, - DrawBitmapRectFlags flags) SK_OVERRIDE; - virtual void drawImage(const SkImage* image, SkScalar left, SkScalar top, - const SkPaint* paint = NULL) SK_OVERRIDE; - virtual void drawImageRect(const SkImage* image, const SkRect* src, - const SkRect& dst, - const SkPaint* paint = NULL) SK_OVERRIDE; - virtual void drawSprite(const SkBitmap& bitmap, int left, int top, - const SkPaint* paint = NULL) SK_OVERRIDE; - virtual void drawVertices(VertexMode vmode, int vertexCount, - const SkPoint vertices[], const SkPoint texs[], - const SkColor colors[], SkXfermode* xmode, - const uint16_t indices[], int indexCount, - const SkPaint& paint) SK_OVERRIDE; - virtual void beginCommentGroup(const char* description) SK_OVERRIDE; virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; virtual void endCommentGroup() SK_OVERRIDE; @@ -79,6 +54,27 @@ protected: virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint) SK_OVERRIDE; + + void onDrawPaint(const SkPaint&) SK_OVERRIDE; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; + void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, + DrawBitmapRectFlags flags) SK_OVERRIDE; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; + void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + void onDrawVertices(VertexMode vmode, int vertexCount, + const SkPoint vertices[], const SkPoint texs[], + const SkColor colors[], SkXfermode* xmode, + const uint16_t indices[], int indexCount, + const SkPaint&) SK_OVERRIDE; virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; |