Chromium Code Reviews| 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); | |
|
abarth-chromium
2015/06/24 01:29:34
Please remove commented out code.
| |
| 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); | |
| 21 | 35 |
| 22 private: | 36 private: |
| 23 PictureRecorder(const FloatSize& size); | 37 » PictureRecorder(); |
| 38 | |
| 39 » OwnPtr<SkPictureRecorder> m_pictureRecorder; | |
| 40 » RefPtr<Canvas> m_canvas; | |
|
abarth-chromium
2015/06/24 01:29:34
Please make the indent consistent in this file.
| |
| 24 }; | 41 }; |
| 25 | 42 |
| 26 } // namespace blink | 43 } // namespace blink |
| 27 | 44 |
| 28 #endif // SKY_ENGINE_CORE_PAINTING_PICTURERECORDER_H_ | 45 #endif // SKY_ENGINE_CORE_PAINTING_PICTURERECORDER_H_ |
| OLD | NEW |