Lines Matching refs:bufferedStream
15 static void test_read(skiatest::Reporter* reporter, SkStream* bufferedStream,
17 // output for reading bufferedStream.
20 size_t bytesRead = bufferedStream->read(storage.get(), bytesToRead);
21 REPORTER_ASSERT(reporter, bytesRead == bytesToRead || bufferedStream->isAtEnd());
26 SkStream* bufferedStream, bool shouldSucceed) {
27 const bool success = bufferedStream->rewind();
41 SkAutoTUnref<SkStream> bufferedStream(SkFrontBufferedStream::Create(&memStream, bufferSize));
44 test_read(reporter, bufferedStream, gAbcs, bufferSize / 2);
48 test_rewind(reporter, bufferedStream, true);
49 test_read(reporter, bufferedStream, gAbcs, bufferSize / 4);
52 test_read(reporter, bufferedStream, gAbcs + bufferedStream->getPosition(), bufferSize / 2);
56 test_rewind(reporter, bufferedStream, true);
57 test_read(reporter, bufferedStream, gAbcs, bufferSize << 1);
62 test_rewind(reporter, bufferedStream, false);
67 SkAutoTUnref<SkStream> bufferedStream(SkFrontBufferedStream::Create(&memStream, bufferSize));
70 test_read(reporter, bufferedStream, gAbcs, bufferSize);
73 test_rewind(reporter, bufferedStream, true);
76 test_read(reporter, bufferedStream, gAbcs, bufferSize);
79 test_read(reporter, bufferedStream, gAbcs + bufferedStream->getPosition(), 1);
80 test_rewind(reporter, bufferedStream, false);
85 SkAutoTUnref<SkStream> bufferedStream(SkFrontBufferedStream::Create(&memStream, bufferSize));
88 bufferedStream->skip(bufferSize / 2);
91 test_rewind(reporter, bufferedStream, true);
92 test_read(reporter, bufferedStream, gAbcs, bufferSize / 4);
95 bufferedStream->skip(bufferSize / 2);
98 test_read(reporter, bufferedStream, gAbcs + bufferedStream->getPosition(), bufferSize / 4);
100 test_rewind(reporter, bufferedStream, true);
101 test_read(reporter, bufferedStream, gAbcs, bufferSize);
137 SkAutoTUnref<SkStream> bufferedStream(SkFrontBufferedStream::Create(&memStream, bufferSize));
140 test_read(reporter, bufferedStream.get(), gAbcs, bufferSize + 1);
141 test_rewind(reporter, bufferedStream.get(), true);
144 test_read(reporter, bufferedStream, gAbcs, bufferSize);