• Home
  • Raw
  • Download

Lines Matching refs:rec

54     Rec* rec = fRec;  in reset()  local
55 while (rec) { in reset()
56 if (kPtr_Type == rec->fType) { in reset()
57 PtrPair* pair = (PtrPair*)rec->data(); in reset()
62 Rec* next = rec->fNext; in reset()
63 Rec::Free(rec); in reset()
64 rec = next; in reset()
73 const Rec* rec = src.fRec; in operator =() local
74 while (rec) in operator =()
76 this->set(rec->name(), rec->data(), rec->fDataLen, (Type)rec->fType, rec->fDataCount); in operator =()
77 rec = rec->fNext; in operator =()
128 Rec* rec = Rec::Alloc(sizeof(Rec) + dataSize * count + len + 1); in set() local
131 rec->fType = SkToU8(type); in set()
133 rec->fType = type; in set()
135 rec->fDataLen = SkToU8(dataSize); in set()
136 rec->fDataCount = SkToU16(count); in set()
138 memcpy(rec->data(), data, dataSize * count); in set()
139 memcpy(rec->name(), name, len + 1); in set()
142 PtrPair* pair = (PtrPair*)rec->data(); in set()
148 rec->fNext = fRec; in set()
149 fRec = rec; in set()
150 return rec->data(); in set()
155 const Rec* rec = this->find(name, kS32_Type); in findS32() local
156 if (rec) in findS32()
158 SkASSERT(rec->fDataCount == 1); in findS32()
160 *value = *(const int32_t*)rec->data(); in findS32()
168 const Rec* rec = this->find(name, kScalar_Type); in findScalar() local
169 if (rec) in findScalar()
171 SkASSERT(rec->fDataCount == 1); in findScalar()
173 *value = *(const SkScalar*)rec->data(); in findScalar()
181 const Rec* rec = this->find(name, kScalar_Type); in findScalars() local
182 if (rec) in findScalars()
185 *count = rec->fDataCount; in findScalars()
187 memcpy(values, rec->data(), rec->fDataCount * rec->fDataLen); in findScalars()
188 return (const SkScalar*)rec->data(); in findScalars()
194 const Rec* rec = this->find(name, kPtr_Type); in findPtr() local
195 if (rec) { in findPtr()
196 SkASSERT(rec->fDataCount == 1); in findPtr()
197 const PtrPair* pair = (const PtrPair*)rec->data(); in findPtr()
211 const Rec* rec = this->find(name, kString_Type); in findString() local
212 SkASSERT(rec == NULL || rec->fDataLen == sizeof(char)); in findString()
213 return rec ? (const char*)rec->data() : NULL; in findString()
218 const Rec* rec = this->find(name, kBool_Type); in findBool() local
219 if (rec) in findBool()
221 SkASSERT(rec->fDataCount == 1); in findBool()
223 *value = *(const bool*)rec->data(); in findBool()
230 const Rec* rec = this->find(name, kData_Type); in findData() local
231 if (rec) { in findData()
232 SkASSERT(rec->fDataLen == sizeof(char)); in findData()
234 *length = rec->fDataCount; in findData()
236 return rec->data(); in findData()
243 const Rec* rec = fRec; in find() local
244 while (rec) in find()
246 if (rec->fType == type && !strcmp(rec->name(), name)) in find()
247 return rec; in find()
248 rec = rec->fNext; in find()
254 Rec* rec = fRec; in remove() local
256 while (rec) { in remove()
257 Rec* next = rec->fNext; in remove()
258 if (rec->fType == type && !strcmp(rec->name(), name)) { in remove()
266 PtrPair* pair = (PtrPair*)rec->data(); in remove()
271 Rec::Free(rec); in remove()
274 prev = rec; in remove()
275 rec = next; in remove()
342 void SkMetaData::Rec::Free(Rec* rec) { in Free() argument
343 sk_free(rec); in Free()