OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 SkDataSet_DEFINED | 8 #ifndef SkDataSet_DEFINED |
9 #define SkDataSet_DEFINED | 9 #define SkDataSet_DEFINED |
10 | 10 |
11 #include "SkData.h" | 11 #include "SkData.h" |
12 #include "SkFlattenable.h" | 12 #include "SkFlattenable.h" |
13 | 13 |
14 class SkStream; | 14 class SkStream; |
15 class SkWStream; | 15 class SkWStream; |
16 | 16 |
17 class SkDataSet : public SkFlattenable { | 17 class SkDataSet : public SkFlattenable { |
| 18 typedef SkFlattenable INHERITED; |
| 19 |
18 public: | 20 public: |
19 /** | 21 /** |
20 * Returns a new empty dataset. Note: since SkDataSet is immutable, this | 22 * Returns a new empty dataset. Note: since SkDataSet is immutable, this |
21 * "new" set may be the same one that was returned before, but each | 23 * "new" set may be the same one that was returned before, but each |
22 * returned object must have its reference-count balanced regardless. | 24 * returned object must have its reference-count balanced regardless. |
23 * | 25 * |
24 * SkDataSet* empty = SkDataSet::NewEmpty(); | 26 * SkDataSet* empty = SkDataSet::NewEmpty(); |
25 * ... | 27 * ... |
26 * empty->unref(); | 28 * empty->unref(); |
27 */ | 29 */ |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDataSet) | 76 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDataSet) |
75 | 77 |
76 protected: | 78 protected: |
77 SkDataSet(SkFlattenableReadBuffer&); | 79 SkDataSet(SkFlattenableReadBuffer&); |
78 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; | 80 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; |
79 | 81 |
80 private: | 82 private: |
81 int32_t fCount; | 83 int32_t fCount; |
82 uint32_t fKeySize; | 84 uint32_t fKeySize; |
83 Pair* fPairs; | 85 Pair* fPairs; |
84 | |
85 typedef SkFlattenable INHERITED; | |
86 }; | 86 }; |
87 | 87 |
88 #endif | 88 #endif |
OLD | NEW |