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

Side by Side Diff: include/core/SkDataTable.h

Issue 1217573002: remove SkInstCnt (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « include/core/SkData.h ('k') | include/core/SkDevice.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 SkDataTable_DEFINED 8 #ifndef SkDataTable_DEFINED
9 #define SkDataTable_DEFINED 9 #define SkDataTable_DEFINED
10 10
11 #include "SkChunkAlloc.h" 11 #include "SkChunkAlloc.h"
12 #include "SkData.h" 12 #include "SkData.h"
13 #include "SkString.h" 13 #include "SkString.h"
14 #include "SkTDArray.h" 14 #include "SkTDArray.h"
15 15
16 /** 16 /**
17 * Like SkData, SkDataTable holds an immutable data buffer. The data buffer is 17 * Like SkData, SkDataTable holds an immutable data buffer. The data buffer is
18 * organized into a table of entries, each with a length, so the entries are 18 * organized into a table of entries, each with a length, so the entries are
19 * not required to all be the same size. 19 * not required to all be the same size.
20 */ 20 */
21 class SK_API SkDataTable : public SkRefCnt { 21 class SK_API SkDataTable : public SkRefCnt {
22 public: 22 public:
23 SK_DECLARE_INST_COUNT(SkDataTable)
24
25 /** 23 /**
26 * Returns true if the table is empty (i.e. has no entries). 24 * Returns true if the table is empty (i.e. has no entries).
27 */ 25 */
28 bool isEmpty() const { return 0 == fCount; } 26 bool isEmpty() const { return 0 == fCount; }
29 27
30 /** 28 /**
31 * Return the number of entries in the table. 0 for an empty table 29 * Return the number of entries in the table. 0 for an empty table
32 */ 30 */
33 int count() const { return fCount; } 31 int count() const { return fCount; }
34 32
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 */ 166 */
169 SkDataTable* detachDataTable(); 167 SkDataTable* detachDataTable();
170 168
171 private: 169 private:
172 SkTDArray<SkDataTable::Dir> fDir; 170 SkTDArray<SkDataTable::Dir> fDir;
173 SkChunkAlloc* fHeap; 171 SkChunkAlloc* fHeap;
174 size_t fMinChunkSize; 172 size_t fMinChunkSize;
175 }; 173 };
176 174
177 #endif 175 #endif
OLDNEW
« no previous file with comments | « include/core/SkData.h ('k') | include/core/SkDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698