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

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

Issue 134163010: Refactor read and write buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: original write flags were fine Created 6 years, 10 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
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 "SkReadBuffer.h"
10 #include "SkWriteBuffer.h"
10 #include "SkOSFile.h" 11 #include "SkOSFile.h"
11 #include "SkOnce.h" 12 #include "SkOnce.h"
12 13
13 SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) { 14 SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) {
14 fPtr = ptr; 15 fPtr = ptr;
15 fSize = size; 16 fSize = size;
16 fReleaseProc = proc; 17 fReleaseProc = proc;
17 fReleaseProcContext = context; 18 fReleaseProcContext = context;
18 } 19 }
19 20
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 SkData* SkData::NewWithCString(const char cstr[]) { 153 SkData* SkData::NewWithCString(const char cstr[]) {
153 size_t size; 154 size_t size;
154 if (NULL == cstr) { 155 if (NULL == cstr) {
155 cstr = ""; 156 cstr = "";
156 size = 1; 157 size = 1;
157 } else { 158 } else {
158 size = strlen(cstr) + 1; 159 size = strlen(cstr) + 1;
159 } 160 }
160 return NewWithCopy(cstr, size); 161 return NewWithCopy(cstr, size);
161 } 162 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698