Lines Matching refs:Rec
185 const SkString::Rec SkString::gEmptyRec = { 0, 0, 0 };
208 SkString::Rec* SkString::AllocRec(const char text[], size_t len) {
209 Rec* rec;
212 rec = const_cast<Rec*>(&gEmptyRec);
217 rec = (Rec*)sk_malloc_throw(SizeOfRec() + SkAlign4(len + 1));
218 rec->fLength = SkToU32(len);
219 rec->fRefCnt = 1;
221 memcpy(rec->data(), text, len);
223 rec->data()[len] = 0;
225 return rec;
228 SkString::Rec* SkString::RefRec(Rec* src) {
253 SkString::SkString() : fRec(const_cast<Rec*>(&gEmptyRec)) {
345 fRec = const_cast<Rec*>(&gEmptyRec);
356 Rec* rec = AllocRec(fRec->data(), fRec->fLength);
360 // data (fRec and rec), so we need to delete one of them.
363 fRec = rec;
621 SkTSwap<Rec*>(fRec, other.fRec);