aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-11-11 19:36:09 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-11 19:36:10 -0800
commit6a070dc06af4e9f305f9d08a69e34d18ade473cb (patch)
tree48723d46a9e7ba7246445e98b960add2c7eabce3 /src
parentad8aa1dcf36d64ddf849b914281713b901a01f49 (diff)
experimental
Diffstat (limited to 'src')
-rw-r--r--src/core/SkCanvas.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 2d9b55929b..ead844fcc1 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.