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

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

Issue 51033004: add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | « src/core/SkMipMap.cpp ('k') | src/core/SkPath.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkOrderedWriteBuffer.h" 9 #include "SkOrderedWriteBuffer.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 if (0 == index) { 303 if (0 == index) {
304 return; 304 return;
305 } 305 }
306 } else { 306 } else {
307 this->writeFunctionPtr((void*)factory); 307 this->writeFunctionPtr((void*)factory);
308 } 308 }
309 309
310 // make room for the size of the flattened object 310 // make room for the size of the flattened object
311 (void)fWriter.reserve(sizeof(uint32_t)); 311 (void)fWriter.reserve(sizeof(uint32_t));
312 // record the current size, so we can subtract after the object writes. 312 // record the current size, so we can subtract after the object writes.
313 uint32_t offset = fWriter.size(); 313 uint32_t offset = fWriter.bytesWritten();
314 // now flatten the object 314 // now flatten the object
315 flattenObject(flattenable, *this); 315 flattenObject(flattenable, *this);
316 uint32_t objSize = fWriter.size() - offset; 316 uint32_t objSize = fWriter.bytesWritten() - offset;
317 // record the obj's size 317 // record the obj's size
318 *fWriter.peek32(offset - sizeof(uint32_t)) = objSize; 318 *fWriter.peek32(offset - sizeof(uint32_t)) = objSize;
319 } 319 }
OLDNEW
« no previous file with comments | « src/core/SkMipMap.cpp ('k') | src/core/SkPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698