OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
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 | 8 |
9 | 9 |
10 #include "SkMemberInfo.h" | 10 #include "SkMemberInfo.h" |
11 | 11 |
12 #if SK_USE_CONDENSED_INFO == 1 | 12 #if SK_USE_CONDENSED_INFO == 1 |
13 | 13 |
14 // SkCondensed.cpp is auto-generated | 14 // SkCondensed.inc is auto-generated |
15 // To generate it, execute SkDisplayType::BuildCondensedInfo() | 15 // To generate it, execute SkDisplayType::BuildCondensedInfo() |
16 #ifdef SK_DEBUG | 16 #ifdef SK_DEBUG |
17 #include "SkCondensedDebug.cpp" | 17 #include "SkCondensedDebug.inc" |
18 #else | 18 #else |
19 #include "SkCondensedRelease.cpp" | 19 #include "SkCondensedRelease.inc" |
20 #endif | 20 #endif |
21 | 21 |
22 static int _searchByName(const unsigned char* lengths, int count, const char* st
rings, const char target[]) { | 22 static int _searchByName(const unsigned char* lengths, int count, const char* st
rings, const char target[]) { |
23 int lo = 0; | 23 int lo = 0; |
24 int hi = count - 1; | 24 int hi = count - 1; |
25 while (lo < hi) { | 25 while (lo < hi) { |
26 int mid = (hi + lo) >> 1; | 26 int mid = (hi + lo) >> 1; |
27 if (strcmp(&strings[lengths[mid << 2]], target) < 0) | 27 if (strcmp(&strings[lengths[mid << 2]], target) < 0) |
28 lo = mid + 1; | 28 lo = mid + 1; |
29 else | 29 else |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 SkASSERT(lookup >= 0); | 112 SkASSERT(lookup >= 0); |
113 return _lookup(lookup, matchPtr); | 113 return _lookup(lookup, matchPtr); |
114 } | 114 } |
115 | 115 |
116 const SkMemberInfo* SkMemberInfo::getInherited() const { | 116 const SkMemberInfo* SkMemberInfo::getInherited() const { |
117 int baseTypeLookup = fOffset; | 117 int baseTypeLookup = fOffset; |
118 return gInfoTables[baseTypeLookup]; | 118 return gInfoTables[baseTypeLookup]; |
119 } | 119 } |
120 | 120 |
121 #endif | 121 #endif |
OLD | NEW |