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 #ifndef SKY_ENGINE_CORE_PAINTING_PICTURERECORDER_H_ | 5 #ifndef SKY_ENGINE_CORE_PAINTING_PICTURERECORDER_H_ |
6 #define SKY_ENGINE_CORE_PAINTING_PICTURERECORDER_H_ | 6 #define SKY_ENGINE_CORE_PAINTING_PICTURERECORDER_H_ |
7 | 7 |
8 #include "sky/engine/core/painting/Canvas.h" | 8 #include "sky/engine/tonic/dart_wrappable.h" |
9 #include "sky/engine/wtf/PassRefPtr.h" | |
10 #include "sky/engine/wtf/RefCounted.h" | |
11 #include "third_party/skia/include/core/SkPictureRecorder.h" | |
9 | 12 |
10 namespace blink { | 13 namespace blink { |
11 | 14 |
12 class Picture; | 15 class Picture; |
16 class Canvas; | |
13 | 17 |
14 class PictureRecorder : public Canvas { | 18 class PictureRecorder : public RefCounted<PictureRecorder>, |
19 public DartWrappable { | |
15 DEFINE_WRAPPERTYPEINFO(); | 20 DEFINE_WRAPPERTYPEINFO(); |
16 public: | 21 public: |
17 ~PictureRecorder() override; | 22 static PassRefPtr<PictureRecorder> create() |
18 static PassRefPtr<PictureRecorder> create(double width, double height); | 23 { |
24 return adoptRef(new PictureRecorder()); | |
25 } | |
19 | 26 |
27 ~PictureRecorder(); | |
28 | |
29 // PassRefPtr<Canvas> beginRecording(double width, double height); | |
30 SkCanvas* beginRecording(double width, double height); | |
20 PassRefPtr<Picture> endRecording(); | 31 PassRefPtr<Picture> endRecording(); |
32 bool isRecording(); | |
33 | |
34 void set_canvas(PassRefPtr<Canvas> canvas); | |
35 | |
36 int foo = 0; | |
eseidel
2015/06/23 00:41:32
I suspect you don't want this?
iansf
2015/06/23 22:46:09
You may be right... ;-)
| |
21 | 37 |
22 private: | 38 private: |
23 PictureRecorder(const FloatSize& size); | 39 » PictureRecorder(); |
40 | |
41 » OwnPtr<SkPictureRecorder> m_pictureRecorder; | |
42 » RefPtr<Canvas> m_canvas; | |
24 }; | 43 }; |
25 | 44 |
26 } // namespace blink | 45 } // namespace blink |
27 | 46 |
28 #endif // SKY_ENGINE_CORE_PAINTING_PICTURERECORDER_H_ | 47 #endif // SKY_ENGINE_CORE_PAINTING_PICTURERECORDER_H_ |
OLD | NEW |