OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 SkData_DEFINED | 8 #ifndef SkData_DEFINED |
9 #define SkData_DEFINED | 9 #define SkData_DEFINED |
10 | 10 |
11 #include <stdio.h> | 11 #include <stdio.h> |
12 | 12 |
13 #include "SkRefCnt.h" | 13 #include "SkRefCnt.h" |
14 | 14 |
15 class SkStream; | 15 class SkStream; |
16 | 16 |
| 17 #ifndef SK_SUPPORT_LEGACY_DATA_FACTORIES |
17 #define SK_SUPPORT_LEGACY_DATA_FACTORIES | 18 #define SK_SUPPORT_LEGACY_DATA_FACTORIES |
| 19 #endif |
18 | 20 |
19 /** | 21 /** |
20 * SkData holds an immutable data buffer. Not only is the data immutable, | 22 * SkData holds an immutable data buffer. Not only is the data immutable, |
21 * but the actual ptr that is returned (by data() or bytes()) is guaranteed | 23 * but the actual ptr that is returned (by data() or bytes()) is guaranteed |
22 * to always be the same for the life of this instance. | 24 * to always be the same for the life of this instance. |
23 */ | 25 */ |
24 class SK_API SkData : public SkRefCnt { | 26 class SK_API SkData : public SkRefCnt { |
25 public: | 27 public: |
26 /** | 28 /** |
27 * Returns the number of bytes stored. | 29 * Returns the number of bytes stored. |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 222 |
221 typedef SkRefCnt INHERITED; | 223 typedef SkRefCnt INHERITED; |
222 }; | 224 }; |
223 | 225 |
224 #ifdef SK_SUPPORT_LEGACY_DATA_FACTORIES | 226 #ifdef SK_SUPPORT_LEGACY_DATA_FACTORIES |
225 /** Typedef of SkAutoTUnref<SkData> for automatically unref-ing a SkData. */ | 227 /** Typedef of SkAutoTUnref<SkData> for automatically unref-ing a SkData. */ |
226 typedef SkAutoTUnref<SkData> SkAutoDataUnref; | 228 typedef SkAutoTUnref<SkData> SkAutoDataUnref; |
227 #endif | 229 #endif |
228 | 230 |
229 #endif | 231 #endif |
OLD | NEW |