Lines Matching refs:bytesLeft
88 size_t bytesLeft = this->fDataSz - bytesRead; in readKeyAndValue() local
92 if (bytesLeft > 0) { in readKeyAndValue()
93 this->fValue.set(value, bytesLeft - 1); in readKeyAndValue()
137 uint32_t SkKTXFile::readInt(const uint8_t** buf, size_t* bytesLeft) const { in readInt()
138 SkASSERT(buf && bytesLeft); in readInt()
142 if (*bytesLeft < 4) { in readInt()
154 *bytesLeft -= 4; in readInt()
195 size_t bytesLeft = dataLen; in readKTXFile() local
199 SkASSERT(bytesLeft > KTX_FILE_IDENTIFIER_SIZE); in readKTXFile()
202 bytesLeft -= KTX_FILE_IDENTIFIER_SIZE; in readKTXFile()
207 if (bytesLeft < 8 + sizeof(Header)) { in readKTXFile()
211 uint32_t endianness = this->readInt(&buf, &bytesLeft); in readKTXFile()
215 fHeader.fGLType = this->readInt(&buf, &bytesLeft); in readKTXFile()
216 fHeader.fGLTypeSize = this->readInt(&buf, &bytesLeft); in readKTXFile()
217 fHeader.fGLFormat = this->readInt(&buf, &bytesLeft); in readKTXFile()
218 fHeader.fGLInternalFormat = this->readInt(&buf, &bytesLeft); in readKTXFile()
219 fHeader.fGLBaseInternalFormat = this->readInt(&buf, &bytesLeft); in readKTXFile()
220 fHeader.fPixelWidth = this->readInt(&buf, &bytesLeft); in readKTXFile()
221 fHeader.fPixelHeight = this->readInt(&buf, &bytesLeft); in readKTXFile()
222 fHeader.fPixelDepth = this->readInt(&buf, &bytesLeft); in readKTXFile()
223 fHeader.fNumberOfArrayElements = this->readInt(&buf, &bytesLeft); in readKTXFile()
224 fHeader.fNumberOfFaces = this->readInt(&buf, &bytesLeft); in readKTXFile()
225 fHeader.fNumberOfMipmapLevels = this->readInt(&buf, &bytesLeft); in readKTXFile()
226 fHeader.fBytesOfKeyValueData = this->readInt(&buf, &bytesLeft); in readKTXFile()
268 if (bytesLeft < fHeader.fBytesOfKeyValueData) { in readKTXFile()
275 uint32_t keyValueBytes = this->readInt(&buf, &bytesLeft); in readKTXFile()
278 if (keyValueBytes > bytesLeft) { in readKTXFile()
292 bytesLeft -= keyValueBytesPadded; in readKTXFile()
310 if (bytesLeft < 4) { in readKTXFile()
314 uint32_t imgSize = this->readInt(&buf, &bytesLeft); in readKTXFile()
317 if (bytesLeft < imgSize) { in readKTXFile()
334 bytesLeft -= imgSizePadded; in readKTXFile()
337 return bytesLeft == 0; in readKTXFile()