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

Side by Side Diff: sky/engine/core/painting/Canvas.cpp

Issue 1134913003: Teach SkyView path to draw a circle (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/painting/Picture.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/painting/Picture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698