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

Unified Diff: sky/engine/core/painting/Canvas.cpp

Issue 1129353010: Add Canvas.drawPicture (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 | « sky/engine/core/painting/Canvas.h ('k') | sky/engine/core/painting/Canvas.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Canvas.cpp
diff --git a/sky/engine/core/painting/Canvas.cpp b/sky/engine/core/painting/Canvas.cpp
index c3bde989568332920e278f6431bb33fcd1dfab88..0854cdba98501275b815342eb0268a8fb69f8890 100644
--- a/sky/engine/core/painting/Canvas.cpp
+++ b/sky/engine/core/painting/Canvas.cpp
@@ -111,6 +111,15 @@ void Canvas::clipRect(const Vector<float>& rect)
m_canvas->clipRect(toSkRect(rect));
}
+void Canvas::drawPicture(Picture* picture)
+{
+ if (!m_canvas)
+ return;
+ ASSERT(picture);
+ ASSERT(m_displayList->isRecording());
+ m_canvas->drawPicture(picture->displayList()->picture());
+}
+
void Canvas::drawPaint(Paint* paint)
{
if (!m_canvas)
« no previous file with comments | « sky/engine/core/painting/Canvas.h ('k') | sky/engine/core/painting/Canvas.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698