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

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

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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/SkPathEffect.cpp ('k') | src/core/SkPathRef.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 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"
11 #include "SkFlattenableBuffers.h" 11 #include "SkFlattenableBuffers.h"
12 #include <new> 12 #include <new>
13 13
14 SK_DEFINE_INST_COUNT(SkPathHeap)
15
16 #define kPathCount 64 14 #define kPathCount 64
17 15
18 SkPathHeap::SkPathHeap() : fHeap(kPathCount * sizeof(SkPath)) { 16 SkPathHeap::SkPathHeap() : fHeap(kPathCount * sizeof(SkPath)) {
19 } 17 }
20 18
21 SkPathHeap::SkPathHeap(SkFlattenableReadBuffer& buffer) 19 SkPathHeap::SkPathHeap(SkFlattenableReadBuffer& buffer)
22 : fHeap(kPathCount * sizeof(SkPath)) { 20 : fHeap(kPathCount * sizeof(SkPath)) {
23 const int count = buffer.readInt(); 21 const int count = buffer.readInt();
24 22
25 fPaths.setCount(count); 23 fPaths.setCount(count);
(...skipping 28 matching lines...) Expand all
54 int count = fPaths.count(); 52 int count = fPaths.count();
55 53
56 buffer.writeInt(count); 54 buffer.writeInt(count);
57 SkPath* const* iter = fPaths.begin(); 55 SkPath* const* iter = fPaths.begin();
58 SkPath* const* stop = fPaths.end(); 56 SkPath* const* stop = fPaths.end();
59 while (iter < stop) { 57 while (iter < stop) {
60 buffer.writePath(**iter); 58 buffer.writePath(**iter);
61 iter++; 59 iter++;
62 } 60 }
63 } 61 }
OLDNEW
« no previous file with comments | « src/core/SkPathEffect.cpp ('k') | src/core/SkPathRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698