diff options
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r-- | include/core/SkCanvas.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 53ca92ee95..0ec167e116 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -21,8 +21,8 @@ class SkBaseDevice; class SkCanvasClipVisitor; -class SkCanvasDrawable; class SkDraw; +class SkDrawable; class SkDrawFilter; class SkImage; class SkMetaData; @@ -1018,7 +1018,15 @@ public: void drawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); - void EXPERIMENTAL_drawDrawable(SkCanvasDrawable*); + /** + * Draw the contents of this drawable into the canvas. If the canvas is async + * (e.g. it is recording into a picture) then the drawable will be referenced instead, + * to have its draw() method called when the picture is finalized. + * + * If the intent is to force the contents of the drawable into this canvas immediately, + * then drawable->draw(canvas) may be called. + */ + void drawDrawable(SkDrawable* drawable); /** Add comments. beginCommentGroup/endCommentGroup open/close a new group. Each comment added via addComment is notionally attached to its @@ -1188,7 +1196,7 @@ protected: virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); - virtual void onDrawDrawable(SkCanvasDrawable*); + virtual void onDrawDrawable(SkDrawable*); virtual void onDrawPaint(const SkPaint&); virtual void onDrawRect(const SkRect&, const SkPaint&); |