diff options
Diffstat (limited to 'tests/CodecTest.cpp')
-rw-r--r-- | tests/CodecTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp index ffaeb2b61c..f839aaad80 100644 --- a/tests/CodecTest.cpp +++ b/tests/CodecTest.cpp @@ -1514,7 +1514,8 @@ DEF_TEST(Codec_InvalidAnimated, r) { SkCodec::Options opts; for (int i = 0; static_cast<size_t>(i) < frameInfos.size(); i++) { opts.fFrameIndex = i; - opts.fHasPriorFrame = frameInfos[i].fRequiredFrame == i - 1; + const auto reqFrame = frameInfos[i].fRequiredFrame; + opts.fPriorFrame = reqFrame == i - 1 ? reqFrame : SkCodec::kNone; auto result = codec->startIncrementalDecode(info, bm.getPixels(), bm.rowBytes(), &opts); if (result != SkCodec::kSuccess) { ERRORF(r, "Failed to start decoding frame %i (out of %i) with error %i\n", i, |