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

Side by Side Diff: src/core/SkData.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/SkColorTable.cpp ('k') | src/core/SkDataTable.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 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 #include "SkData.h" 8 #include "SkData.h"
9 #include "SkFlattenableBuffers.h" 9 #include "SkFlattenableBuffers.h"
10 #include "SkOSFile.h" 10 #include "SkOSFile.h"
11 #include "SkOnce.h" 11 #include "SkOnce.h"
12 12
13 SK_DEFINE_INST_COUNT(SkData)
14
15 SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) { 13 SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) {
16 fPtr = ptr; 14 fPtr = ptr;
17 fSize = size; 15 fSize = size;
18 fReleaseProc = proc; 16 fReleaseProc = proc;
19 fReleaseProcContext = context; 17 fReleaseProcContext = context;
20 } 18 }
21 19
22 SkData::~SkData() { 20 SkData::~SkData() {
23 if (fReleaseProc) { 21 if (fReleaseProc) {
24 fReleaseProc(fPtr, fSize, fReleaseProcContext); 22 fReleaseProc(fPtr, fSize, fReleaseProcContext);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 SkData* SkData::NewWithCString(const char cstr[]) { 150 SkData* SkData::NewWithCString(const char cstr[]) {
153 size_t size; 151 size_t size;
154 if (NULL == cstr) { 152 if (NULL == cstr) {
155 cstr = ""; 153 cstr = "";
156 size = 1; 154 size = 1;
157 } else { 155 } else {
158 size = strlen(cstr) + 1; 156 size = strlen(cstr) + 1;
159 } 157 }
160 return NewWithCopy(cstr, size); 158 return NewWithCopy(cstr, size);
161 } 159 }
OLDNEW
« no previous file with comments | « src/core/SkColorTable.cpp ('k') | src/core/SkDataTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698