Index: sky/engine/core/painting/PictureRecorder.h |
diff --git a/sky/engine/core/painting/PictureRecorder.h b/sky/engine/core/painting/PictureRecorder.h |
index 485edd50499bb006a22784d5d68a202816dbd5b6..bded2758bc3ba5316da67667cef434b6d8fed23b 100644 |
--- a/sky/engine/core/painting/PictureRecorder.h |
+++ b/sky/engine/core/painting/PictureRecorder.h |
@@ -6,21 +6,34 @@ |
#define SKY_ENGINE_CORE_PAINTING_PICTURERECORDER_H_ |
#include "sky/engine/core/painting/Canvas.h" |
+#include "third_party/skia/include/core/SkPictureRecorder.h" |
namespace blink { |
class Picture; |
-class PictureRecorder : public Canvas { |
+class PictureRecorder : public RefCounted<PictureRecorder>, |
+ public DartWrappable { |
DEFINE_WRAPPERTYPEINFO(); |
public: |
- ~PictureRecorder() override; |
- static PassRefPtr<PictureRecorder> create(double width, double height); |
+ static PassRefPtr<PictureRecorder> create() |
+ { |
+ return adoptRef(new PictureRecorder()); |
+ } |
+ ~PictureRecorder(); |
+ |
+ PassRefPtr<Canvas> beginRecording(double width, double height); |
PassRefPtr<Picture> endRecording(); |
+ bool isRecording() { return m_canvas != nullptr && m_canvas->isRecording(); } |
abarth-chromium
2015/06/20 00:50:29
It is every possible for m_canvas != nullptr and !
|
+ |
+ void setCanvas(PassRefPtr<Canvas> canvas) { m_canvas = canvas; } |
abarth-chromium
2015/06/20 00:50:29
This function doesn't make much sense. What does
|
private: |
- PictureRecorder(const FloatSize& size); |
+ PictureRecorder(); |
+ |
+ OwnPtr<SkPictureRecorder> m_pictureRecorder; |
+ RefPtr<Canvas> m_canvas; |
}; |
} // namespace blink |