Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: sky/engine/core/painting/PictureRecorder.h

Issue 1190123003: Decouple Canvas from DisplayList and map Picture and PictureRecorder more directly to their Skia co… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebased version of previous patch Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698