| OLD | NEW | 
|---|
| 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/PictureRecorder.h" | 6 #include "sky/engine/core/painting/PictureRecorder.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/painting/PaintingTasks.h" | 10 #include "sky/engine/core/painting/PaintingTasks.h" | 
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 110     ASSERT(m_displayList->isRecording()); | 110     ASSERT(m_displayList->isRecording()); | 
| 111     m_canvas->clipRect(toSkRect(rect)); | 111     m_canvas->clipRect(toSkRect(rect)); | 
| 112 } | 112 } | 
| 113 | 113 | 
| 114 void Canvas::drawPicture(Picture* picture) | 114 void Canvas::drawPicture(Picture* picture) | 
| 115 { | 115 { | 
| 116     if (!m_canvas) | 116     if (!m_canvas) | 
| 117         return; | 117         return; | 
| 118     ASSERT(picture); | 118     ASSERT(picture); | 
| 119     ASSERT(m_displayList->isRecording()); | 119     ASSERT(m_displayList->isRecording()); | 
| 120     m_canvas->drawPicture(picture->displayList()->picture()); | 120     m_canvas->drawPicture(picture->toSkia()); | 
| 121 } | 121 } | 
| 122 | 122 | 
| 123 void Canvas::drawPaint(const Paint* paint) | 123 void Canvas::drawPaint(const Paint* paint) | 
| 124 { | 124 { | 
| 125     if (!m_canvas) | 125     if (!m_canvas) | 
| 126         return; | 126         return; | 
| 127     ASSERT(paint); | 127     ASSERT(paint); | 
| 128     ASSERT(m_displayList->isRecording()); | 128     ASSERT(m_displayList->isRecording()); | 
| 129     m_canvas->drawPaint(paint->paint()); | 129     m_canvas->drawPaint(paint->paint()); | 
| 130 } | 130 } | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
| 159 PassRefPtr<DisplayList> Canvas::finishRecording() | 159 PassRefPtr<DisplayList> Canvas::finishRecording() | 
| 160 { | 160 { | 
| 161     if (!isRecording()) | 161     if (!isRecording()) | 
| 162         return nullptr; | 162         return nullptr; | 
| 163     m_canvas = nullptr; | 163     m_canvas = nullptr; | 
| 164     m_displayList->endRecording(); | 164     m_displayList->endRecording(); | 
| 165     return m_displayList.release(); | 165     return m_displayList.release(); | 
| 166 } | 166 } | 
| 167 | 167 | 
| 168 } // namespace blink | 168 } // namespace blink | 
| OLD | NEW | 
|---|