void SkLayerRasterizer::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); SkASSERT(fLayers); buffer.writeInt(fLayers->count()); SkDeque::F2BIter iter(*fLayers); const SkLayerRasterizer_Rec* rec; while ((rec = (const SkLayerRasterizer_Rec*)iter.next()) != NULL) { buffer.writePaint(rec->fPaint); buffer.writePoint(rec->fOffset); } }
void SkLayerDrawLooper::flatten(SkWriteBuffer& buffer) const { buffer.writeInt(fCount); Rec* rec = fRecs; for (int i = 0; i < fCount; i++) { // Legacy "flagsmask" field -- now ignored, remove when we bump version buffer.writeInt(0); 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 SkOffsetImageFilter::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writePoint(fOffset); }
void SkSweepGradient::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writePoint(fCenter); }
void SkLinearGradient::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writePoint(fStart); buffer.writePoint(fEnd); }
void SkRadialGradient::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writePoint(fCenter); buffer.writeScalar(fRadius); }