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

Side by Side Diff: src/core/SkPtrRecorder.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/SkPixelRef.cpp ('k') | src/core/SkRTree.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 "SkPtrRecorder.h" 8 #include "SkPtrRecorder.h"
9 #include "SkTSearch.h" 9 #include "SkTSearch.h"
10 10
11 SK_DEFINE_INST_COUNT(SkPtrSet)
12 SK_DEFINE_INST_COUNT(SkNamedFactorySet)
13
14 void SkPtrSet::reset() { 11 void SkPtrSet::reset() {
15 Pair* p = fList.begin(); 12 Pair* p = fList.begin();
16 Pair* stop = fList.end(); 13 Pair* stop = fList.end();
17 while (p < stop) { 14 while (p < stop) {
18 this->decPtr(p->fPtr); 15 this->decPtr(p->fPtr);
19 p += 1; 16 p += 1;
20 } 17 }
21 fList.reset(); 18 fList.reset();
22 } 19 }
23 20
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 SkASSERT(array); 65 SkASSERT(array);
69 const Pair* p = fList.begin(); 66 const Pair* p = fList.begin();
70 // p->fIndex is base-1, so we need to subtract to find its slot 67 // p->fIndex is base-1, so we need to subtract to find its slot
71 for (int i = 0; i < count; i++) { 68 for (int i = 0; i < count; i++) {
72 int index = p[i].fIndex - 1; 69 int index = p[i].fIndex - 1;
73 SkASSERT((unsigned)index < (unsigned)count); 70 SkASSERT((unsigned)index < (unsigned)count);
74 array[index] = p[i].fPtr; 71 array[index] = p[i].fPtr;
75 } 72 }
76 } 73 }
77 } 74 }
OLDNEW
« no previous file with comments | « src/core/SkPixelRef.cpp ('k') | src/core/SkRTree.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698