Index: sky/engine/core/painting/PictureRecorder.cpp |
diff --git a/sky/engine/core/painting/PictureRecorder.cpp b/sky/engine/core/painting/PictureRecorder.cpp |
index 4896215210088f05beabeffd410676e47a4f8b2b..f4ec70af15b139706ad6d05bbf4aec1dba8dfbc6 100644 |
--- a/sky/engine/core/painting/PictureRecorder.cpp |
+++ b/sky/engine/core/painting/PictureRecorder.cpp |
@@ -9,25 +9,30 @@ |
namespace blink { |
-PassRefPtr<PictureRecorder> PictureRecorder::create(double width, double height) |
+PictureRecorder::PictureRecorder() |
+ : m_pictureRecorder(adoptPtr(new SkPictureRecorder())) |
{ |
- return adoptRef(new PictureRecorder(FloatSize(width, height))); |
} |
-PictureRecorder::PictureRecorder(const FloatSize& size) |
- : Canvas(size) |
+PictureRecorder::~PictureRecorder() |
{ |
} |
-PictureRecorder::~PictureRecorder() |
+PassRefPtr<Canvas> PictureRecorder::beginRecording(double width, double height) |
{ |
+ m_canvas = Canvas::create( |
+ m_pictureRecorder->beginRecording(width, height)); |
abarth-chromium
2015/06/18 00:03:52
indent
iansf
2015/06/20 00:02:38
Done.
|
+ return m_canvas; |
} |
PassRefPtr<Picture> PictureRecorder::endRecording() |
{ |
if (!isRecording()) |
return nullptr; |
- return Picture::create(finishRecording()); |
+ auto picture = Picture::create( |
+ adoptRef(m_pictureRecorder->endRecording())); |
+ m_canvas->clearSkCanvas(); |
+ return picture; |
} |
} // namespace blink |