• Home
  • Raw
  • Download

Lines Matching refs:lattice

39 bool SkCanvasPriv::ReadLattice(SkReadBuffer& buffer, SkCanvas::Lattice* lattice) {  in ReadLattice()  argument
40 lattice->fXCount = buffer.readInt(); in ReadLattice()
41 lattice->fXDivs = buffer.skipT<int32_t>(lattice->fXCount); in ReadLattice()
42 lattice->fYCount = buffer.readInt(); in ReadLattice()
43 lattice->fYDivs = buffer.skipT<int32_t>(lattice->fYCount); in ReadLattice()
45 lattice->fRectTypes = nullptr; in ReadLattice()
46 lattice->fColors = nullptr; in ReadLattice()
48 lattice->fRectTypes = buffer.skipT<SkCanvas::Lattice::RectType>(flagCount); in ReadLattice()
49 lattice->fColors = buffer.skipT<SkColor>(flagCount); in ReadLattice()
51 lattice->fBounds = buffer.skipT<SkIRect>(); in ReadLattice()
55 size_t SkCanvasPriv::WriteLattice(void* buffer, const SkCanvas::Lattice& lattice) { in WriteLattice() argument
56 int flagCount = lattice.fRectTypes ? (lattice.fXCount + 1) * (lattice.fYCount + 1) : 0; in WriteLattice()
58 const size_t size = (1 + lattice.fXCount + 1 + lattice.fYCount + 1) * sizeof(int32_t) + in WriteLattice()
65 writer.write32(lattice.fXCount); in WriteLattice()
66 writer.write(lattice.fXDivs, lattice.fXCount * sizeof(uint32_t)); in WriteLattice()
67 writer.write32(lattice.fYCount); in WriteLattice()
68 writer.write(lattice.fYDivs, lattice.fYCount * sizeof(uint32_t)); in WriteLattice()
70 writer.writePad(lattice.fRectTypes, flagCount * sizeof(uint8_t)); in WriteLattice()
71 writer.write(lattice.fColors, flagCount * sizeof(SkColor)); in WriteLattice()
72 SkASSERT(lattice.fBounds); in WriteLattice()
73 writer.write(lattice.fBounds, sizeof(SkIRect)); in WriteLattice()
79 void SkCanvasPriv::WriteLattice(SkWriteBuffer& buffer, const SkCanvas::Lattice& lattice) { in WriteLattice() argument
80 const size_t size = WriteLattice(nullptr, lattice); in WriteLattice()
82 WriteLattice(storage.get(), lattice); in WriteLattice()