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

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

Issue 1216833003: Make rendering use PaintingNodes for increased efficiency. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Different approach to calling markNeedsPaint with unattached nodes Created 5 years, 5 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 33bfc09201b6c864e4a39825521c1c9c0f4e4068..7a8d5a2d2070c8ba67ea69a273759b88e7ee1012 100644
--- a/sky/engine/core/painting/Canvas.cpp
+++ b/sky/engine/core/painting/Canvas.cpp
@@ -207,4 +207,14 @@ void Canvas::drawDrawable(Drawable* drawable)
m_canvas->drawDrawable(drawable->toSkia());
}
+void Canvas::drawPaintingNode(PaintingNode* paintingNode, const Point& p)
+{
+ if (!m_canvas)
+ return;
+ ASSERT(paintingNode);
+ translate(p.sk_point.x(), p.sk_point.y());
+ m_canvas->drawDrawable(paintingNode->toSkia());
+ translate(-p.sk_point.x(), -p.sk_point.y());
+}
+
} // 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