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

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

Issue 182733008: Switch the factory chunk in the skps to storing its size in bytes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Add markers to allow clean up of backwards compatibility code Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPicturePlayback.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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698