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

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

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/core.gni ('k') | sky/engine/core/painting/Canvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Canvas.h
diff --git a/sky/engine/core/painting/Canvas.h b/sky/engine/core/painting/Canvas.h
index c1d34221e80fd7021d286ff1a274f348b1bca194..ae1150914ed3070c529b564fdf4722be4bb070f5 100644
--- a/sky/engine/core/painting/Canvas.h
+++ b/sky/engine/core/painting/Canvas.h
@@ -10,6 +10,7 @@
#include "sky/engine/core/painting/Drawable.h"
#include "sky/engine/core/painting/Offset.h"
#include "sky/engine/core/painting/Paint.h"
+#include "sky/engine/core/painting/PaintingNode.h"
#include "sky/engine/core/painting/Picture.h"
#include "sky/engine/core/painting/PictureRecorder.h"
#include "sky/engine/core/painting/Point.h"
@@ -35,7 +36,7 @@ public:
}
static PassRefPtr<Canvas> create(PictureRecorder* recorder,
- Size& bounds,
+ Rect& bounds,
ExceptionState& es) {
ASSERT(recorder);
if (recorder->isRecording()) {
@@ -50,8 +51,7 @@ public:
// dart code catches the error, it will leak a canvas
// but it won't crash.
}
- PassRefPtr<Canvas> canvas = create(
- recorder->beginRecording(bounds.sk_size.width(), bounds.sk_size.height()));
+ PassRefPtr<Canvas> canvas = create(recorder->beginRecording(bounds));
recorder->set_canvas(canvas.get());
return canvas;
}
@@ -83,6 +83,7 @@ public:
void drawImageRect(const CanvasImage* image, Rect& src, Rect& dst, Paint* paint);
void drawPicture(Picture* picture);
void drawDrawable(Drawable* drawable);
+ void drawPaintingNode(PaintingNode* paintingNode, const Point& p);
SkCanvas* skCanvas() { return m_canvas; }
void clearSkCanvas() { m_canvas = nullptr; }
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/painting/Canvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698