Lines Matching refs:fOffset
159 , fOffset(SkTMin(offset, fSize)) in SkFILEStream()
185 fOffset = 0; in close()
189 if (size > fSize - fOffset) { in read()
190 size = fSize - fOffset; in read()
194 bytesRead = sk_qread(fFILE.get(), buffer, size, fOffset); in read()
199 fOffset += bytesRead; in read()
204 if (fOffset == fSize) { in isAtEnd()
207 return fOffset >= sk_fgetsize(fFILE.get()); in isAtEnd()
211 fOffset = fOriginalOffset; in rewind()
220 SkASSERT(fOffset >= fOriginalOffset); in getPosition()
221 return fOffset - fOriginalOffset; in getPosition()
225 fOffset = SkTMin(SkSafeMath::Add(position, fOriginalOffset), fSize); in seek()
234 fOffset = fOriginalOffset; in move()
236 fOffset += offset; in move()
239 fOffset = fSize; in move()
241 fOffset = SkTMin(SkSafeMath::Add(fOffset, (size_t) offset), fSize); in move()
244 SkASSERT(fOffset >= fOriginalOffset && fOffset <= fSize); in move()
249 return new SkFILEStream(fFILE, fSize, fOffset, fOriginalOffset); in onFork()
268 fOffset = 0; in SkMemoryStream()
273 fOffset = 0; in SkMemoryStream()
278 fOffset = 0; in SkMemoryStream()
285 fOffset = 0; in SkMemoryStream()
302 fOffset = 0; in setMemoryOwned()
307 fOffset = 0; in setMemory()
316 fOffset = 0; in setData()
321 fOffset += -(int)fOffset & 0x03; in skipToAlign4()
327 if (size > dataSize - fOffset) { in read()
328 size = dataSize - fOffset; in read()
331 memcpy(buffer, fData->bytes() + fOffset, size); in read()
333 fOffset += size; in read()
340 const size_t currentOffset = fOffset; in peek()
343 nonConstThis->fOffset = currentOffset; in peek()
348 return fOffset == fData->size(); in isAtEnd()
352 fOffset = 0; in rewind()
361 return fOffset; in getPosition()
365 fOffset = position > fData->size() in seek()
372 return this->seek(fOffset + offset); in move()
377 that->seek(fOffset); in onFork()
390 return fData->bytes() + fOffset; in getAtPos()
746 , fSize(size) , fOffset(0), fCurrentOffset(0) { } in SkBlockMemoryStream()
750 if (fOffset + count > fSize) { in read()
751 count = fSize - fOffset; in read()
763 fOffset += count; in read()
775 return fOffset == fSize; in isAtEnd()
781 bytesToPeek = SkTMin(bytesToPeek, fSize - fOffset); in peek()
801 fOffset = 0; in rewind()
811 return fOffset; in getPosition()
816 if (position >= fOffset) { in seek()
817 size_t skipAmount = position - fOffset; in seek()
821 size_t moveBackAmount = fOffset - position; in seek()
824 fOffset -= moveBackAmount; in seek()
832 return seek(fOffset + offset); in move()
838 that->fOffset = this->fOffset; in onFork()
858 size_t fOffset; member in SkBlockMemoryStream