Lines Matching refs:SkFlatData
188 class SkFlatData; variable
278 class SkFlatData {
282 static SkFlatData* Create(SkFlatController* controller, const T& obj, int index) { in Create()
296 size_t allocSize = sizeof(SkFlatData) + size; in Create()
297 SkFlatData* result = (SkFlatData*) controller->allocThrow(allocSize); in Create()
325 bool operator==(const SkFlatData& that) const {
357 static const SkFlatData& GetKey(const SkFlatData& flat) { return flat; } in GetKey()
358 static uint32_t Hash(const SkFlatData& flat) { return flat.checksum(); } in Hash()
406 const SkFlatData* operator[](int index) {
427 const SkFlatData* findAndReplace(const T& element, in findAndReplace()
428 const SkFlatData* toReplace, in findAndReplace()
434 SkFlatData* flat = this->findAndReturnMutableFlat(element); in findAndReplace()
444 const SkFlatData* found = fHash.find(*toReplace); in findAndReplace()
472 const SkFlatData* element = fIndexedData[index-1]; in unflatten()
484 const SkFlatData* findAndReturnFlat(const T& element) { in findAndReturnFlat()
505 SkFlatData* findAndReturnMutableFlat(const T& element) { in findAndReturnMutableFlat()
507 const SkFlatData& scratch = this->resetScratch(element, this->count()+1); in findAndReturnMutableFlat()
509 SkFlatData* candidate = fHash.find(scratch); in findAndReturnMutableFlat()
514 SkFlatData* detached = this->detachScratch(); in findAndReturnMutableFlat()
522 const SkFlatData& resetScratch(const T& element, int index) { in resetScratch()
527 fScratch.reserve(sizeof(SkFlatData)); in resetScratch()
529 const size_t dataSize = fScratch.bytesWritten() - sizeof(SkFlatData); in resetScratch()
532 SkFlatData* scratch = (SkFlatData*)fScratch.getWriter32()->contiguousArray(); in resetScratch()
539 SkFlatData* detachScratch() { in detachScratch()
543 SkFlatData* detached = (SkFlatData*)fController->allocThrow(fScratch.bytesWritten()); in detachScratch()
546 SkFlatData* scratch = (SkFlatData*)fScratch.getWriter32()->contiguousArray(); in detachScratch()
554 void unflatten(T* dst, const SkFlatData* element) const { in unflatten()
566 SkTDArray<const SkFlatData*> fIndexedData;
569 SkTDynamicHash<SkFlatData, SkFlatData, SkFlatData::HashTraits> fHash;