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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/engine/config.h" 5 #include "sky/engine/config.h"
6 #include "sky/engine/core/painting/LayoutRoot.h" 6 #include "sky/engine/core/painting/LayoutRoot.h"
7 7
8 #include "sky/engine/core/dom/Document.h" 8 #include "sky/engine/core/dom/Document.h"
9 #include "sky/engine/core/dom/Element.h" 9 #include "sky/engine/core/dom/Element.h"
10 #include "sky/engine/core/frame/FrameView.h" 10 #include "sky/engine/core/frame/FrameView.h"
11 #include "sky/engine/core/frame/LocalFrame.h" 11 #include "sky/engine/core/frame/LocalFrame.h"
12 #include "sky/engine/core/frame/Settings.h" 12 #include "sky/engine/core/frame/Settings.h"
13 #include "sky/engine/core/painting/Canvas.h"
13 #include "sky/engine/core/painting/PaintingTasks.h" 14 #include "sky/engine/core/painting/PaintingTasks.h"
14 #include "sky/engine/platform/geometry/IntRect.h" 15 #include "sky/engine/platform/geometry/IntRect.h"
15 #include "third_party/skia/include/core/SkCanvas.h" 16 #include "third_party/skia/include/core/SkCanvas.h"
16 17
17 namespace blink { 18 namespace blink {
18 19
19 PassRefPtr<LayoutRoot> LayoutRoot::create() 20 PassRefPtr<LayoutRoot> LayoutRoot::create()
20 { 21 {
21 return adoptRef(new LayoutRoot); 22 return adoptRef(new LayoutRoot);
22 } 23 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 m_frame->view()->setLayoutSize(maxSize); 77 m_frame->view()->setLayoutSize(maxSize);
77 78
78 m_document->updateLayout(); 79 m_document->updateLayout();
79 80
80 m_document->setFrame(nullptr); 81 m_document->setFrame(nullptr);
81 m_frame->setDocument(nullptr); 82 m_frame->setDocument(nullptr);
82 } 83 }
83 84
84 void LayoutRoot::paint(Canvas* canvas) 85 void LayoutRoot::paint(Canvas* canvas)
85 { 86 {
86 if (m_document) 87 if (m_document && canvas && canvas->skCanvas())
87 rootElement()->paint(canvas); 88 rootElement()->paint(canvas);
88 } 89 }
89 90
90 } // namespace blink 91 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698