void SkLayerDrawLooper::flatten(SkFlattenableWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); #ifdef SK_DEBUG { Rec* rec = fRecs; int count = 0; while (rec) { rec = rec->fNext; count += 1; } SkASSERT(count == fCount); } #endif buffer.writeInt(fCount); Rec* rec = fRecs; for (int i = 0; i < fCount; i++) { buffer.writeInt(rec->fInfo.fFlagsMask); buffer.writeInt(rec->fInfo.fPaintBits); buffer.writeInt(rec->fInfo.fColorMode); buffer.writePoint(rec->fInfo.fOffset); buffer.writeBool(rec->fInfo.fPostTranslate); buffer.writePaint(rec->fPaint); rec = rec->fNext; } }
void SkPaintShape::flatten(SkFlattenableWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writePaint(fPaint); }