| Index: sky/engine/core/painting/PictureRecorder.cpp
|
| diff --git a/sky/engine/core/painting/PictureRecorder.cpp b/sky/engine/core/painting/PictureRecorder.cpp
|
| index ee6265a253ce4848a21f9b1c80f26f2a99249a0e..08cb42317ccb0330e9165eb29220b2712856e8ea 100644
|
| --- a/sky/engine/core/painting/PictureRecorder.cpp
|
| +++ b/sky/engine/core/painting/PictureRecorder.cpp
|
| @@ -3,6 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| #include "sky/engine/core/painting/Canvas.h"
|
| +#include "sky/engine/core/painting/Drawable.h"
|
| #include "sky/engine/core/painting/Picture.h"
|
| #include "sky/engine/core/painting/PictureRecorder.h"
|
|
|
| @@ -37,6 +38,17 @@ PassRefPtr<Picture> PictureRecorder::endRecording()
|
| return picture.release();
|
| }
|
|
|
| +PassRefPtr<Drawable> PictureRecorder::endRecordingAsDrawable()
|
| +{
|
| + if (!isRecording())
|
| + return nullptr;
|
| + RefPtr<Drawable> drawable = Drawable::create(
|
| + adoptRef(m_pictureRecorder->endRecordingAsDrawable()));
|
| + m_canvas->clearSkCanvas();
|
| + m_canvas = nullptr;
|
| + return drawable.release();
|
| +}
|
| +
|
| void PictureRecorder::set_canvas(PassRefPtr<Canvas> canvas) { m_canvas = canvas; }
|
|
|
| } // namespace blink
|
|
|