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 SkRecorder_DEFINED | 8 #ifndef SkRecorder_DEFINED |
9 #define SkRecorder_DEFINED | 9 #define SkRecorder_DEFINED |
10 | 10 |
| 11 #include "SkBigPicture.h" |
11 #include "SkCanvas.h" | 12 #include "SkCanvas.h" |
12 #include "SkRecord.h" | 13 #include "SkRecord.h" |
13 #include "SkRecords.h" | 14 #include "SkRecords.h" |
14 #include "SkTDArray.h" | 15 #include "SkTDArray.h" |
15 | 16 |
16 class SkBBHFactory; | 17 class SkBBHFactory; |
17 | 18 |
18 class SkDrawableList : SkNoncopyable { | 19 class SkDrawableList : SkNoncopyable { |
19 public: | 20 public: |
20 ~SkDrawableList(); | 21 ~SkDrawableList(); |
21 | 22 |
22 int count() const { return fArray.count(); } | 23 int count() const { return fArray.count(); } |
23 SkDrawable* const* begin() const { return fArray.begin(); } | 24 SkDrawable* const* begin() const { return fArray.begin(); } |
24 | 25 |
25 void append(SkDrawable* drawable); | 26 void append(SkDrawable* drawable); |
26 | 27 |
27 // Return a new or ref'd array of pictures that were snapped from our drawab
les. | 28 // Return a new or ref'd array of pictures that were snapped from our drawab
les. |
28 SkPicture::SnapshotArray* newDrawableSnapshot(); | 29 SkBigPicture::SnapshotArray* newDrawableSnapshot(); |
29 | 30 |
30 private: | 31 private: |
31 SkTDArray<SkDrawable*> fArray; | 32 SkTDArray<SkDrawable*> fArray; |
32 }; | 33 }; |
33 | 34 |
34 // SkRecorder provides an SkCanvas interface for recording into an SkRecord. | 35 // SkRecorder provides an SkCanvas interface for recording into an SkRecord. |
35 | 36 |
36 class SkRecorder : public SkCanvas { | 37 class SkRecorder : public SkCanvas { |
37 public: | 38 public: |
38 // Does not take ownership of the SkRecord. | 39 // Does not take ownership of the SkRecord. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 this->getClipDeviceBounds(&devBounds); | 133 this->getClipDeviceBounds(&devBounds); |
133 return devBounds; | 134 return devBounds; |
134 } | 135 } |
135 | 136 |
136 size_t fApproxBytesUsedBySubPictures; | 137 size_t fApproxBytesUsedBySubPictures; |
137 SkRecord* fRecord; | 138 SkRecord* fRecord; |
138 SkAutoTDelete<SkDrawableList> fDrawableList; | 139 SkAutoTDelete<SkDrawableList> fDrawableList; |
139 }; | 140 }; |
140 | 141 |
141 #endif//SkRecorder_DEFINED | 142 #endif//SkRecorder_DEFINED |
OLD | NEW |