Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 bool writeText(const char text[]); | 198 bool writeText(const char text[]); |
| 199 bool writeDecAsText(int32_t); | 199 bool writeDecAsText(int32_t); |
| 200 bool writeBigDecAsText(int64_t, int minDigits = 0); | 200 bool writeBigDecAsText(int64_t, int minDigits = 0); |
| 201 bool writeHexAsText(uint32_t, int minDigits = 0); | 201 bool writeHexAsText(uint32_t, int minDigits = 0); |
| 202 bool writeScalarAsText(SkScalar); | 202 bool writeScalarAsText(SkScalar); |
| 203 | 203 |
| 204 bool writeBool(bool v) { return this->write8(v); } | 204 bool writeBool(bool v) { return this->write8(v); } |
| 205 bool writeScalar(SkScalar); | 205 bool writeScalar(SkScalar); |
| 206 bool writePackedUInt(size_t); | 206 bool writePackedUInt(size_t); |
| 207 | 207 |
| 208 bool writeStream(SkStream* input, size_t length); | 208 bool writeStream(SkStream* input, size_t length); |
| 209 | 209 |
| 210 /** | 210 /** |
| 211 * Append an SkData object to the stream, such that it can be read | 211 * Append an SkData object to the stream, such that it can be read |
| 212 * out of the stream using SkStream::readData(). | 212 * out of the stream using SkStream::readData(). |
| 213 * | 213 * |
| 214 * Note that the encoding method used to write the SkData object | 214 * Note that the encoding method used to write the SkData object |
| 215 * to the stream may change over time. This method DOES NOT | 215 * to the stream may change over time. This method DOES NOT |
| 216 * just write the raw content of the SkData object to the stream. | 216 * just write the raw content of the SkData object to the stream. |
| 217 */ | 217 */ |
| 218 bool writeData(const SkData*); | 218 bool writeData(const SkData*); |
| 219 | |
| 220 static int SizeOfPackedUInt(size_t value); | |
|
bungeman-skia
2014/03/04 23:01:49
No issue with making this static, but it does forc
reed1
2014/03/05 17:05:57
/**
* This returns ...
*/
number of bytes it wi
robertphillips
2014/03/05 17:18:24
Done.
| |
| 219 }; | 221 }; |
| 220 | 222 |
| 221 //////////////////////////////////////////////////////////////////////////////// //////// | 223 //////////////////////////////////////////////////////////////////////////////// //////// |
| 222 | 224 |
| 223 #include "SkString.h" | 225 #include "SkString.h" |
| 224 #include <stdio.h> | 226 #include <stdio.h> |
| 225 | 227 |
| 226 struct SkFILE; | 228 struct SkFILE; |
| 227 | 229 |
| 228 /** A stream that wraps a C FILE* file stream. */ | 230 /** A stream that wraps a C FILE* file stream. */ |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 444 virtual void newline() SK_OVERRIDE; | 446 virtual void newline() SK_OVERRIDE; |
| 445 | 447 |
| 446 private: | 448 private: |
| 447 typedef SkWStream INHERITED; | 449 typedef SkWStream INHERITED; |
| 448 }; | 450 }; |
| 449 | 451 |
| 450 // for now | 452 // for now |
| 451 typedef SkFILEStream SkURLStream; | 453 typedef SkFILEStream SkURLStream; |
| 452 | 454 |
| 453 #endif | 455 #endif |
| OLD | NEW |