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

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

Issue 1221583003: Add APIs for dynamic display lists, using SkDrawable and SkPictureRecorder::endRecordingAsDrawable. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 0e0bac9485372e17d4e95df09c190b9659cfd615..468e9bfc2f6479f0a18cbeb19d98a9771c07afd9 100644
--- a/sky/engine/core/painting/Canvas.cpp
+++ b/sky/engine/core/painting/Canvas.cpp
@@ -127,14 +127,6 @@ void Canvas::drawLine(const Point& p1, const Point& p2, const Paint* paint)
m_canvas->drawLine(p1.sk_point.x(), p1.sk_point.y(), p2.sk_point.x(), p2.sk_point.y(), paint->paint());
}
-void Canvas::drawPicture(Picture* picture)
-{
- if (!m_canvas)
- return;
- ASSERT(picture);
- m_canvas->drawPicture(picture->toSkia());
-}
-
void Canvas::drawPaint(const Paint* paint)
{
if (!m_canvas)
@@ -199,4 +191,20 @@ void Canvas::drawImageRect(const CanvasImage* image, Rect& src, Rect& dst, Paint
m_canvas->drawBitmapRectToRect(image->bitmap(), &src.sk_rect, dst.sk_rect, &paint->paint());
}
+void Canvas::drawPicture(Picture* picture)
+{
+ if (!m_canvas)
+ return;
+ ASSERT(picture);
+ m_canvas->drawPicture(picture->toSkia());
+}
+
+void Canvas::drawDrawable(Drawable* drawable)
+{
+ if (!m_canvas)
+ return;
+ ASSERT(drawable);
+ m_canvas->drawDrawable(drawable->toSkia());
+}
+
} // namespace blink
« 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