Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: include/core/SkCanvas.h

Issue 903993002: rename SkCanvasDrawable to SkDrawable, and make public (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add dox for drawDrawable Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/core.gypi ('k') | include/core/SkDrawable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 53ca92ee959d9adfd233ad58f53d7c4978bfe544..0ec167e1166e72870b90440ae31d4ca348a7cec4 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&);
« no previous file with comments | « gyp/core.gypi ('k') | include/core/SkDrawable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698