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

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

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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 | « src/core/SkFontStream.h ('k') | src/core/SkGeometry.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 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 "SkEndian.h" 8 #include "SkEndian.h"
9 #include "SkFontStream.h" 9 #include "SkFontStream.h"
10 #include "SkStream.h" 10 #include "SkStream.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if (offsetToDir) { 94 if (offsetToDir) {
95 // add the size of the header, so we will point to the DirEntries 95 // add the size of the header, so we will point to the DirEntries
96 *offsetToDir = offset + sizeof(SkSFNTHeader); 96 *offsetToDir = offset + sizeof(SkSFNTHeader);
97 } 97 }
98 return SkEndian_SwapBE16(header->fSingle.fNumTables); 98 return SkEndian_SwapBE16(header->fSingle.fNumTables);
99 } 99 }
100 100
101 /////////////////////////////////////////////////////////////////////////////// 101 ///////////////////////////////////////////////////////////////////////////////
102 102
103 struct SfntHeader { 103 struct SfntHeader {
104 SfntHeader() : fCount(0), fDir(NULL) {} 104 SfntHeader() : fCount(0), fDir(nullptr) {}
105 ~SfntHeader() { sk_free(fDir); } 105 ~SfntHeader() { sk_free(fDir); }
106 106
107 /** If it returns true, then fCount and fDir are properly initialized. 107 /** If it returns true, then fCount and fDir are properly initialized.
108 Note: fDir will point to the raw array of SkSFNTDirEntry values, 108 Note: fDir will point to the raw array of SkSFNTDirEntry values,
109 meaning they will still be in the file's native endianness (BE). 109 meaning they will still be in the file's native endianness (BE).
110 110
111 fDir will be automatically freed when this object is destroyed 111 fDir will be automatically freed when this object is destroyed
112 */ 112 */
113 bool init(SkStream* stream, int ttcIndex) { 113 bool init(SkStream* stream, int ttcIndex) {
114 stream->rewind(); 114 stream->rewind();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 if (!read(stream, data, length)) { 202 if (!read(stream, data, length)) {
203 return 0; 203 return 0;
204 } 204 }
205 } 205 }
206 return length; 206 return length;
207 } 207 }
208 } 208 }
209 return 0; 209 return 0;
210 } 210 }
OLDNEW
« no previous file with comments | « src/core/SkFontStream.h ('k') | src/core/SkGeometry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698