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/dom/Document.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/dom/Document.cpp
diff --git a/sky/engine/core/dom/Document.cpp b/sky/engine/core/dom/Document.cpp
index 38bb75179d003ba9db25ba590e98f101d7748d2d..2b37f28f7ecafc4db297bfb9f6979456130dc959 100644
--- a/sky/engine/core/dom/Document.cpp
+++ b/sky/engine/core/dom/Document.cpp
@@ -104,6 +104,8 @@
#include "sky/engine/core/page/EventHandler.h"
#include "sky/engine/core/page/FocusController.h"
#include "sky/engine/core/page/Page.h"
+#include "sky/engine/core/painting/PaintingTasks.h"
+#include "sky/engine/core/painting/Picture.h"
#include "sky/engine/core/rendering/HitTestResult.h"
#include "sky/engine/core/rendering/RenderView.h"
#include "sky/engine/platform/DateComponents.h"
@@ -2204,6 +2206,19 @@ bool Document::hasFocus() const
return focusedFrame && focusedFrame == frame();
}
+Picture* Document::rootPicture() const
+{
+ return m_picture.get();
+}
+
+void Document::setRootPicture(PassRefPtr<Picture> picture)
+{
+ m_picture = picture;
+ if (m_picture)
+ PaintingTasks::enqueueCommit(this, m_picture->displayList());
+ scheduleVisualUpdate();
+}
+
} // namespace blink
#ifndef NDEBUG

Powered by Google App Engine
This is Rietveld 408576698