Lines Matching refs:stream
60 * Checks the start of the stream to see if the image is a bitmap
71 * Reads enough of the stream to determine the image format
73 std::unique_ptr<SkCodec> SkBmpCodec::MakeFromStream(std::unique_ptr<SkStream> stream,
75 return SkBmpCodec::MakeFromStream(std::move(stream), result, false);
80 * Reads enough of the stream to determine the image format
82 std::unique_ptr<SkCodec> SkBmpCodec::MakeFromIco(std::unique_ptr<SkStream> stream, Result* result) {
83 return SkBmpCodec::MakeFromStream(std::move(stream), result, true);
139 SkCodec::Result SkBmpCodec::ReadHeader(SkStream* stream, bool inIco,
154 if (stream->read(hBuffer, kBmpHeaderBytesPlusFour) !=
188 if (stream->read(hBuffer, 4) != 4) {
210 if (stream->read(iBuffer.get(), infoBytesRemaining) != infoBytesRemaining) {
340 if (stream->read(buffer, kBmpMaskBytes) != kBmpMaskBytes) {
484 SkASSERT(!inIco || nullptr != stream->getMemoryBase());
489 std::unique_ptr<SkStream>(stream),
519 if (stream->skip(offset - bytesRead) != offset - bytesRead) {
548 std::unique_ptr<SkStream>(stream), bitsPerPixel,
580 std::unique_ptr<SkStream>(stream), bitsPerPixel,
594 * Reads enough of the stream to determine the image format
596 std::unique_ptr<SkCodec> SkBmpCodec::MakeFromStream(std::unique_ptr<SkStream> stream,
599 *result = ReadHeader(stream.get(), inIco, &codec);
601 // codec has taken ownership of stream, so we do not need to delete it.
602 stream.release();
607 SkBmpCodec::SkBmpCodec(SkEncodedInfo&& info, std::unique_ptr<SkStream> stream,
609 : INHERITED(std::move(info), kXformSrcColorFormat, std::move(stream))
617 return SkBmpCodec::ReadHeader(this->stream(), this->inIco(), nullptr) == kSuccess;
648 return this->stream()->skip(bytesToSkip) == bytesToSkip;