Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 2d9b55929baf2756bbc7f0f48f6b34611cbe06bf..ead844fcc1ed7df4c36d10d2c168949ee6d2d5d4 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -6,6 +6,7 @@ |
*/ |
#include "SkCanvas.h" |
+#include "SkCanvasDrawable.h" |
#include "SkCanvasPriv.h" |
#include "SkBitmapDevice.h" |
#include "SkDeviceImageFilterProxy.h" |
@@ -2304,6 +2305,19 @@ void SkCanvas::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
LOOPER_END |
} |
+void SkCanvas::EXPERIMENTAL_drawDrawable(SkCanvasDrawable* dr) { |
+ if (dr) { |
+ SkRect bounds; |
+ if (!dr->getBounds(&bounds) || !this->quickReject(bounds)) { |
+ this->onDrawDrawable(dr); |
+ } |
+ } |
+} |
+ |
+void SkCanvas::onDrawDrawable(SkCanvasDrawable* dr) { |
+ dr->draw(this); |
+} |
+ |
////////////////////////////////////////////////////////////////////////////// |
// These methods are NOT virtual, and therefore must call back into virtual |
// methods, rather than actually drawing themselves. |