Index: include/core/SkCanvas.h |
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
index 4aaf46b39703d33957098c0d98e1904b163808c1..ee8ad250d23027a3567f735f31e8a785cf10c86c 100644 |
--- a/include/core/SkCanvas.h |
+++ b/include/core/SkCanvas.h |
@@ -969,13 +969,13 @@ public: |
drawPicture call. |
@param picture The recorded drawing commands to analyze/optimize |
*/ |
- void EXPERIMENTAL_optimize(SkPicture* picture); |
+ void EXPERIMENTAL_optimize(const SkPicture* picture); |
/** PRIVATE / EXPERIMENTAL -- do not call |
Purge all the discardable optimization information associated with |
'picture'. If NULL is passed in, purge all discardable information. |
*/ |
- void EXPERIMENTAL_purge(SkPicture* picture); |
+ void EXPERIMENTAL_purge(const SkPicture* picture); |
/** Draw the picture into this canvas. This method effective brackets the |
playback of the picture's draw calls with save/restore, so the state |
@@ -983,7 +983,13 @@ public: |
@param picture The recorded drawing commands to playback into this |
canvas. |
*/ |
- virtual void drawPicture(SkPicture& picture); |
+ void drawPicture(const SkPicture* picture); |
mtklein
2014/06/03 22:23:23
How come these aren't all const SkPicture&?
robertphillips
2014/06/03 23:17:21
It seems/seemed at bit odd to pass by reference so
|
+ |
+#ifdef SK_SUPPORT_LEGACY_DRAWPICTURE_API |
+ virtual void drawPicture(SkPicture& picture) { |
+ this->drawPicture(&picture); |
+ } |
+#endif |
enum VertexMode { |
kTriangles_VertexMode, |
@@ -1242,6 +1248,8 @@ protected: |
virtual void onDiscard(); |
+ virtual void onDrawPicture(const SkPicture* picture); |
+ |
// Returns the canvas to be used by DrawIter. Default implementation |
// returns this. Subclasses that encapsulate an indirect canvas may |
// need to overload this method. The impl must keep track of this, as it |