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

Unified Diff: src/core/SkCanvas.cpp

Issue 716793004: experimental (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove bad start in picture Created 6 years, 1 month 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
« samplecode/SampleArc.cpp ('K') | « samplecode/SampleArc.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« samplecode/SampleArc.cpp ('K') | « samplecode/SampleArc.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698