aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GifTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/GifTest.cpp')
-rw-r--r--tests/GifTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/GifTest.cpp b/tests/GifTest.cpp
index 5219825f1b..0de5fc586d 100644
--- a/tests/GifTest.cpp
+++ b/tests/GifTest.cpp
@@ -225,12 +225,12 @@ DEF_TEST(Gif, reporter) {
// Regression test for decoding a gif image with sampleSize of 4, which was
// previously crashing.
DEF_TEST(Gif_Sampled, r) {
- auto stream = SkFILEStream::Make(GetResourcePath("images/test640x479.gif").c_str());
- REPORTER_ASSERT(r, stream);
- if (!stream) {
+ auto data = GetResourceAsData("images/test640x479.gif");
+ REPORTER_ASSERT(r, data);
+ if (!data) {
return;
}
-
+ std::unique_ptr<SkStreamAsset> stream(new SkMemoryStream(std::move(data)));
std::unique_ptr<SkAndroidCodec> codec(SkAndroidCodec::MakeFromStream(std::move(stream)));
REPORTER_ASSERT(r, codec);
if (!codec) {