OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkRecording_DEFINED | 8 #ifndef SkRecording_DEFINED |
9 #define SkRecording_DEFINED | 9 #define SkRecording_DEFINED |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... | |
37 */ | 37 */ |
38 | 38 |
39 class SK_API SkPlayback : SkNoncopyable { | 39 class SK_API SkPlayback : SkNoncopyable { |
40 public: | 40 public: |
41 // Remember, if you've got an SkPlayback*, you probably own it. Don't forge t to delete it! | 41 // Remember, if you've got an SkPlayback*, you probably own it. Don't forge t to delete it! |
42 ~SkPlayback(); | 42 ~SkPlayback(); |
43 | 43 |
44 // Draw recorded commands into a canvas. | 44 // Draw recorded commands into a canvas. |
45 void draw(SkCanvas*) const; | 45 void draw(SkCanvas*) const; |
46 | 46 |
47 bool willPlaybackBitmaps() const { return fWillPlaybackBitmaps; } | |
mtklein
2014/07/01 18:58:01
This file and all its classes will be deleted.
I
mtklein
2014/07/01 19:02:23
Alternatively, we can do it proactively in SkPictu
tomhudson
2014/07/02 15:25:41
Done.
| |
48 | |
47 private: | 49 private: |
48 explicit SkPlayback(const SkRecord*); | 50 explicit SkPlayback(const SkRecord*); |
49 | 51 |
50 SkAutoTDelete<const SkRecord> fRecord; | 52 SkAutoTDelete<const SkRecord> fRecord; |
53 bool fWillPlaybackBitmaps; | |
51 | 54 |
52 friend class SkRecording; | 55 friend class SkRecording; |
53 }; | 56 }; |
54 | 57 |
55 class SK_API SkRecording : SkNoncopyable { | 58 class SK_API SkRecording : SkNoncopyable { |
56 public: | 59 public: |
57 SkRecording(int width, int height); | 60 SkRecording(int width, int height); |
58 ~SkRecording(); | 61 ~SkRecording(); |
59 | 62 |
60 // Draws issued to this canvas will be replayed by SkPlayback::draw(). | 63 // Draws issued to this canvas will be replayed by SkPlayback::draw(). |
61 // Any refs held on canvas() must be dropped before you may call releasePlay back(). | 64 // Any refs held on canvas() must be dropped before you may call releasePlay back(). |
62 SkCanvas* canvas(); | 65 SkCanvas* canvas(); |
63 | 66 |
64 // Release exclusive ownership of an SkPlayback to the caller. | 67 // Release exclusive ownership of an SkPlayback to the caller. |
65 // Any refs held on canvas() must be dropped before you may call releasePlay back(). | 68 // Any refs held on canvas() must be dropped before you may call releasePlay back(). |
66 SkPlayback* releasePlayback(); | 69 SkPlayback* releasePlayback(); |
67 | 70 |
68 private: | 71 private: |
69 SkAutoTDelete<SkRecord> fRecord; | 72 SkAutoTDelete<SkRecord> fRecord; |
70 SkAutoTUnref<SkRecorder> fRecorder; | 73 SkAutoTUnref<SkRecorder> fRecorder; |
71 }; | 74 }; |
72 | 75 |
73 } // namespace EXPERIMENTAL | 76 } // namespace EXPERIMENTAL |
74 | 77 |
75 #endif//SkRecording_DEFINED | 78 #endif//SkRecording_DEFINED |
OLD | NEW |