| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkFlattenable.h" | 8 #include "SkFlattenable.h" |
| 9 #include "SkPtrRecorder.h" | 9 #include "SkPtrRecorder.h" |
| 10 #include "SkReadBuffer.h" | 10 #include "SkReadBuffer.h" |
| 11 | 11 |
| 12 /////////////////////////////////////////////////////////////////////////////// | 12 /////////////////////////////////////////////////////////////////////////////// |
| 13 | 13 |
| 14 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING | 14 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
| 15 bool SkFlattenable::NeedsDeepUnflatten(const SkReadBuffer& buffer) { | 15 bool SkFlattenable::NeedsDeepUnflatten(const SkReadBuffer& buffer) { |
| 16 return buffer.isVersionLT(SkReadBuffer::kFlattenCreateProc_Version); | 16 return false; // TODO: looks like all this can go away too now? |
| 17 } | 17 } |
| 18 #endif | 18 #endif |
| 19 | 19 |
| 20 /////////////////////////////////////////////////////////////////////////////// | 20 /////////////////////////////////////////////////////////////////////////////// |
| 21 | 21 |
| 22 SkNamedFactorySet::SkNamedFactorySet() : fNextAddedFactory(0) {} | 22 SkNamedFactorySet::SkNamedFactorySet() : fNextAddedFactory(0) {} |
| 23 | 23 |
| 24 uint32_t SkNamedFactorySet::find(SkFlattenable::Factory factory) { | 24 uint32_t SkNamedFactorySet::find(SkFlattenable::Factory factory) { |
| 25 uint32_t index = fFactorySet.find(factory); | 25 uint32_t index = fFactorySet.find(factory); |
| 26 if (index > 0) { | 26 if (index > 0) { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 report_no_entries(__FUNCTION__); | 135 report_no_entries(__FUNCTION__); |
| 136 #endif | 136 #endif |
| 137 const Entry* entries = gEntries; | 137 const Entry* entries = gEntries; |
| 138 for (int i = gCount - 1; i >= 0; --i) { | 138 for (int i = gCount - 1; i >= 0; --i) { |
| 139 if (entries[i].fFactory == fact) { | 139 if (entries[i].fFactory == fact) { |
| 140 return entries[i].fName; | 140 return entries[i].fName; |
| 141 } | 141 } |
| 142 } | 142 } |
| 143 return NULL; | 143 return NULL; |
| 144 } | 144 } |
| OLD | NEW |