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

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

Issue 1190123003: Decouple Canvas from DisplayList and map Picture and PictureRecorder more directly to their Skia co… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebased version of previous patch 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
Index: sky/engine/core/painting/LayoutRoot.cpp
diff --git a/sky/engine/core/painting/LayoutRoot.cpp b/sky/engine/core/painting/LayoutRoot.cpp
index c63acaa76d9e6278bcacc742cda8ad4a5d16d219..78c3ee6c7757409615c6ed29e44bb851c9400885 100644
--- a/sky/engine/core/painting/LayoutRoot.cpp
+++ b/sky/engine/core/painting/LayoutRoot.cpp
@@ -10,6 +10,7 @@
#include "sky/engine/core/frame/FrameView.h"
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/core/frame/Settings.h"
+#include "sky/engine/core/painting/Canvas.h"
#include "sky/engine/core/painting/PaintingTasks.h"
#include "sky/engine/platform/geometry/IntRect.h"
#include "third_party/skia/include/core/SkCanvas.h"
@@ -83,7 +84,7 @@ void LayoutRoot::layout()
void LayoutRoot::paint(Canvas* canvas)
{
- if (m_document)
+ if (m_document && canvas && canvas->skCanvas())
rootElement()->paint(canvas);
}

Powered by Google App Engine
This is Rietveld 408576698