OLD | NEW |
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 "SkFlattenable.h" | 8 #include "SkFlattenable.h" |
9 #include "SkPtrRecorder.h" | 9 #include "SkPtrRecorder.h" |
10 | 10 |
11 SK_DEFINE_INST_COUNT(SkFlattenable) | |
12 | |
13 /////////////////////////////////////////////////////////////////////////////// | 11 /////////////////////////////////////////////////////////////////////////////// |
14 | 12 |
15 void SkFlattenable::flatten(SkFlattenableWriteBuffer&) const | 13 void SkFlattenable::flatten(SkFlattenableWriteBuffer&) const |
16 { | 14 { |
17 /* we don't write anything at the moment, but this allows our subclasses | 15 /* we don't write anything at the moment, but this allows our subclasses |
18 to not know that, since we want them to always call INHERITED::flatten() | 16 to not know that, since we want them to always call INHERITED::flatten() |
19 in their code. | 17 in their code. |
20 */ | 18 */ |
21 } | 19 } |
22 | 20 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 report_no_entries(__FUNCTION__); | 136 report_no_entries(__FUNCTION__); |
139 #endif | 137 #endif |
140 const Entry* entries = gEntries; | 138 const Entry* entries = gEntries; |
141 for (int i = gCount - 1; i >= 0; --i) { | 139 for (int i = gCount - 1; i >= 0; --i) { |
142 if (entries[i].fFactory == fact) { | 140 if (entries[i].fFactory == fact) { |
143 return entries[i].fName; | 141 return entries[i].fName; |
144 } | 142 } |
145 } | 143 } |
146 return NULL; | 144 return NULL; |
147 } | 145 } |
OLD | NEW |