Lines Matching refs:lattice
42 bool SkCanvasPriv::ReadLattice(SkReadBuffer& buffer, SkCanvas::Lattice* lattice) { in ReadLattice() argument
43 lattice->fXCount = buffer.readInt(); in ReadLattice()
44 lattice->fXDivs = buffer.skipT<int32_t>(lattice->fXCount); in ReadLattice()
45 lattice->fYCount = buffer.readInt(); in ReadLattice()
46 lattice->fYDivs = buffer.skipT<int32_t>(lattice->fYCount); in ReadLattice()
48 lattice->fRectTypes = nullptr; in ReadLattice()
49 lattice->fColors = nullptr; in ReadLattice()
51 lattice->fRectTypes = buffer.skipT<SkCanvas::Lattice::RectType>(flagCount); in ReadLattice()
52 lattice->fColors = buffer.skipT<SkColor>(flagCount); in ReadLattice()
54 lattice->fBounds = buffer.skipT<SkIRect>(); in ReadLattice()
58 size_t SkCanvasPriv::WriteLattice(void* buffer, const SkCanvas::Lattice& lattice) { in WriteLattice() argument
59 int flagCount = lattice.fRectTypes ? (lattice.fXCount + 1) * (lattice.fYCount + 1) : 0; in WriteLattice()
61 const size_t size = (1 + lattice.fXCount + 1 + lattice.fYCount + 1) * sizeof(int32_t) + in WriteLattice()
68 writer.write32(lattice.fXCount); in WriteLattice()
69 writer.write(lattice.fXDivs, lattice.fXCount * sizeof(uint32_t)); in WriteLattice()
70 writer.write32(lattice.fYCount); in WriteLattice()
71 writer.write(lattice.fYDivs, lattice.fYCount * sizeof(uint32_t)); in WriteLattice()
73 writer.writePad(lattice.fRectTypes, flagCount * sizeof(uint8_t)); in WriteLattice()
74 writer.write(lattice.fColors, flagCount * sizeof(SkColor)); in WriteLattice()
75 SkASSERT(lattice.fBounds); in WriteLattice()
76 writer.write(lattice.fBounds, sizeof(SkIRect)); in WriteLattice()
82 void SkCanvasPriv::WriteLattice(SkWriteBuffer& buffer, const SkCanvas::Lattice& lattice) { in WriteLattice() argument
83 const size_t size = WriteLattice(nullptr, lattice); in WriteLattice()
85 WriteLattice(storage.get(), lattice); in WriteLattice()