| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkBitmap.h" | 8 #include "SkBitmap.h" |
| 9 #include "SkCodec.h" | 9 #include "SkCodec.h" |
| 10 #include "SkFrontBufferedStream.h" | 10 #include "SkFrontBufferedStream.h" |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 private: | 278 private: |
| 279 bool fAtEnd; | 279 bool fAtEnd; |
| 280 }; | 280 }; |
| 281 | 281 |
| 282 DEF_TEST(ShortFrontBufferedStream, reporter) { | 282 DEF_TEST(ShortFrontBufferedStream, reporter) { |
| 283 FailingStream* failingStream = new FailingStream; | 283 FailingStream* failingStream = new FailingStream; |
| 284 SkAutoTDelete<SkStreamRewindable> stream(SkFrontBufferedStream::Create(faili
ngStream, 64)); | 284 SkAutoTDelete<SkStreamRewindable> stream(SkFrontBufferedStream::Create(faili
ngStream, 64)); |
| 285 | 285 |
| 286 // This will fail to create a codec. However, what we really want to test i
s that we | 286 // This will fail to create a codec. However, what we really want to test i
s that we |
| 287 // won't read past the end of the stream. | 287 // won't read past the end of the stream. |
| 288 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.detach())); | 288 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.release())); |
| 289 } | 289 } |
| OLD | NEW |