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

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

Issue 1122423009: Make it possible to custom-paint without an Element. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Comment tweak 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
Index: sky/engine/core/painting/PaintingTasks.cpp
diff --git a/sky/engine/core/painting/PaintingTasks.cpp b/sky/engine/core/painting/PaintingTasks.cpp
index e266eafc5b20d830a3193efcc59102dcfeed0c60..994ff11611affebeecd73bc53af723c861e5a33b 100644
--- a/sky/engine/core/painting/PaintingTasks.cpp
+++ b/sky/engine/core/painting/PaintingTasks.cpp
@@ -29,10 +29,10 @@ struct RequestTask {
};
struct CommitTask {
- CommitTask(PassRefPtr<Element> e, PassRefPtr<DisplayList> d)
- : element(e), displayList(d) { }
+ CommitTask(PassRefPtr<Node> n, PassRefPtr<DisplayList> d)
+ : node(n), displayList(d) { }
- RefPtr<Element> element;
+ RefPtr<Node> node;
RefPtr<DisplayList> displayList;
};
@@ -55,9 +55,9 @@ void PaintingTasks::enqueueRequest(PassRefPtr<Element> element, PassOwnPtr<Paint
requests().append(adoptPtr(new RequestTask(element, callback)));
}
-void PaintingTasks::enqueueCommit(PassRefPtr<Element> element, PassRefPtr<DisplayList> displayList)
+void PaintingTasks::enqueueCommit(PassRefPtr<Node> node, PassRefPtr<DisplayList> displayList)
{
- commits().append(CommitTask(element, displayList));
+ commits().append(CommitTask(node, displayList));
}
bool PaintingTasks::serviceRequests()
@@ -86,7 +86,7 @@ bool PaintingTasks::serviceRequests()
void PaintingTasks::drainCommits()
{
for (auto& commit : commits()) {
- RenderObject* renderer = commit.element->renderer();
+ RenderObject* renderer = commit.node->renderer();
if (!renderer || !renderer->isBox())
return;
toRenderBox(renderer)->setCustomPainting(commit.displayList.release());

Powered by Google App Engine
This is Rietveld 408576698