Lines Matching refs:stream

166 bool is_asset_stream(const SkStream& stream) {
167 return stream.hasLength() && stream.hasPosition();
177 * Gets the length of the stream. Depending on the type of stream, this may require reading to
178 * the end of the stream.
218 explicit SkRawBufferedStream(std::unique_ptr<SkStream> stream)
219 : fStream(std::move(stream))
222 // Only use SkRawBufferedStream when the stream is not an asset stream.
229 if (!this->bufferMoreData(kReadToEnd)) { // read whole stream
284 // Note: if the newSize == kReadToEnd (0), this function will read to the end of stream.
298 if (fWholeStreamRead) { // newSize is larger than the whole stream.
317 // Use a size-limited stream to avoid holding too huge buffer.
325 explicit SkRawAssetStream(std::unique_ptr<SkStream> stream)
326 : fStream(std::move(stream))
328 // Only use SkRawAssetStream when the stream is an asset stream.
392 // Will NOT take the ownership of the stream.
393 explicit SkPiexStream(SkRawStream* stream) : fStream(stream) {}
409 // Will NOT take the ownership of the stream.
410 SkDngStream(SkRawStream* stream) : fStream(stream) {}
434 * Note: this will take the ownership of the stream.
436 static SkDngImage* NewFromStream(SkRawStream* stream) {
437 std::unique_ptr<SkDngImage> dngImage(new SkDngImage(stream));
523 // Does not affect ownership of stream.
524 static bool IsTiffHeaderValid(SkRawStream* stream) {
527 if (!stream->read(header, 0 /* offset */, kHeaderSize)) {
598 SkDngImage(SkRawStream* stream)
599 : fStream(stream)
620 std::unique_ptr<SkCodec> SkRawCodec::MakeFromStream(std::unique_ptr<SkStream> stream,
623 if (is_asset_stream(*stream)) {
624 rawStream = std::make_unique<SkRawAssetStream>(std::move(stream));
626 rawStream = std::make_unique<SkRawBufferedStream>(std::move(stream));