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

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

Issue 12315131: Make SkTDArray accessors const-friendly (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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/SkTDict.h ('k') | src/core/SkPictureFlat.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 #include "SkPathHeap.h" 8 #include "SkPathHeap.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 #include "SkStream.h" 10 #include "SkStream.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 SkPath* p = (SkPath*)fHeap.allocThrow(sizeof(SkPath)); 47 SkPath* p = (SkPath*)fHeap.allocThrow(sizeof(SkPath));
48 new (p) SkPath(path); 48 new (p) SkPath(path);
49 *fPaths.append() = p; 49 *fPaths.append() = p;
50 return fPaths.count(); 50 return fPaths.count();
51 } 51 }
52 52
53 void SkPathHeap::flatten(SkFlattenableWriteBuffer& buffer) const { 53 void SkPathHeap::flatten(SkFlattenableWriteBuffer& buffer) const {
54 int count = fPaths.count(); 54 int count = fPaths.count();
55 55
56 buffer.writeInt(count); 56 buffer.writeInt(count);
57 SkPath** iter = fPaths.begin(); 57 SkPath* const* iter = fPaths.begin();
58 SkPath** stop = fPaths.end(); 58 SkPath* const* stop = fPaths.end();
59 while (iter < stop) { 59 while (iter < stop) {
60 buffer.writePath(**iter); 60 buffer.writePath(**iter);
61 iter++; 61 iter++;
62 } 62 }
63 } 63 }
OLDNEW
« no previous file with comments | « include/core/SkTDict.h ('k') | src/core/SkPictureFlat.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698