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

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

Issue 1844343004: SkWStream::writeText inlined. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « bench/PDFBench.cpp ('k') | src/core/SkStream.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkStream_DEFINED 8 #ifndef SkStream_DEFINED
9 #define SkStream_DEFINED 9 #define SkStream_DEFINED
10 10
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 virtual void flush(); 193 virtual void flush();
194 194
195 virtual size_t bytesWritten() const = 0; 195 virtual size_t bytesWritten() const = 0;
196 196
197 // helpers 197 // helpers
198 198
199 bool write8(U8CPU); 199 bool write8(U8CPU);
200 bool write16(U16CPU); 200 bool write16(U16CPU);
201 bool write32(uint32_t); 201 bool write32(uint32_t);
202 202
203 bool writeText(const char text[]); 203 bool writeText(const char text[]) {
204 SkASSERT(text);
205 return this->write(text, strlen(text));
bungeman-skia 2016/04/01 15:19:18 The win here appears to be mostly that the compile
206 }
204 bool writeDecAsText(int32_t); 207 bool writeDecAsText(int32_t);
205 bool writeBigDecAsText(int64_t, int minDigits = 0); 208 bool writeBigDecAsText(int64_t, int minDigits = 0);
206 bool writeHexAsText(uint32_t, int minDigits = 0); 209 bool writeHexAsText(uint32_t, int minDigits = 0);
207 bool writeScalarAsText(SkScalar); 210 bool writeScalarAsText(SkScalar);
208 211
209 bool writeBool(bool v) { return this->write8(v); } 212 bool writeBool(bool v) { return this->write8(v); }
210 bool writeScalar(SkScalar); 213 bool writeScalar(SkScalar);
211 bool writePackedUInt(size_t); 214 bool writePackedUInt(size_t);
212 215
213 bool writeStream(SkStream* input, size_t length); 216 bool writeStream(SkStream* input, size_t length);
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 444
442 private: 445 private:
443 size_t fBytesWritten; 446 size_t fBytesWritten;
444 typedef SkWStream INHERITED; 447 typedef SkWStream INHERITED;
445 }; 448 };
446 449
447 // for now 450 // for now
448 typedef SkFILEStream SkURLStream; 451 typedef SkFILEStream SkURLStream;
449 452
450 #endif 453 #endif
OLDNEW
« no previous file with comments | « bench/PDFBench.cpp ('k') | src/core/SkStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698