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

Side by Side Diff: src/core/SkDataTable.cpp

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkData.cpp ('k') | src/core/SkDevice.cpp » ('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 #include "SkData.h" 8 #include "SkData.h"
9 #include "SkDataTable.h" 9 #include "SkDataTable.h"
10 10
11 SK_DEFINE_INST_COUNT(SkDataTable)
12
13 static void malloc_freeproc(void* context) { 11 static void malloc_freeproc(void* context) {
14 sk_free(context); 12 sk_free(context);
15 } 13 }
16 14
17 // Makes empty table 15 // Makes empty table
18 SkDataTable::SkDataTable() { 16 SkDataTable::SkDataTable() {
19 fCount = 0; 17 fCount = 0;
20 fElemSize = 0; // 0 signals that we use fDir instead of fElems 18 fElemSize = 0; // 0 signals that we use fDir instead of fElems
21 fU.fDir = NULL; 19 fU.fDir = NULL;
22 fFreeProc = NULL; 20 fFreeProc = NULL;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 memcpy(dir, fDir.begin(), count * sizeof(SkDataTable::Dir)); 179 memcpy(dir, fDir.begin(), count * sizeof(SkDataTable::Dir));
182 180
183 SkDataTable* table = SkNEW_ARGS(SkDataTable, 181 SkDataTable* table = SkNEW_ARGS(SkDataTable,
184 ((SkDataTable::Dir*)dir, count, 182 ((SkDataTable::Dir*)dir, count,
185 chunkalloc_freeproc, fHeap)); 183 chunkalloc_freeproc, fHeap));
186 // we have to detach our fHeap, since we are giving that to the table 184 // we have to detach our fHeap, since we are giving that to the table
187 fHeap = NULL; 185 fHeap = NULL;
188 fDir.reset(); 186 fDir.reset();
189 return table; 187 return table;
190 } 188 }
OLDNEW
« no previous file with comments | « src/core/SkData.cpp ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698