Backed out changeset dda520b4ed32 (bug 1360572) for Assertion failure at RasterImage.cpp

This commit is contained in:
Iris Hsiao 2017-05-04 11:30:45 +08:00
Родитель 553dbd294c
Коммит ab85c1ac98
2 изменённых файлов: 11 добавлений и 15 удалений

Просмотреть файл

@ -425,7 +425,6 @@ FrameAnimator::RequestRefresh(AnimationState& aState,
// Advanced to the correct frame, the composited frame is now valid to be drawn.
if (*currentFrameEndTime > aTime) {
aState.mCompositedFrameInvalid = false;
ret.mDirtyRect = IntRect(IntPoint(0,0), mSize);
}
MOZ_ASSERT(!aState.mIsCurrentlyDecoded || !aState.mCompositedFrameInvalid);

Просмотреть файл

@ -1262,20 +1262,17 @@ RasterImage::Decode(const IntSize& aSize,
mSourceBuffer, mSize,
decoderFlags, surfaceFlags);
// We may not be able to send an invalidation right here because of async
// notifications but that shouldn't be a problem because we shouldn't be
// getting a non-empty rect back from UpdateState. This is because UpdateState
// will only return a non-empty rect if we are currently decoded, or the
// animation is finished. We can't be decoded because we are creating a decoder
// here. If the animation is finished then the composited frame would have
// been valid when the animation finished, and it's not possible to mark
// the composited frame as invalid when the animation is finished. So
// the composited frame can't change from invalid to valid in this UpdateState
// call, and hence no rect can be returned.
#ifdef DEBUG
gfx::IntRect rect =
#endif
mAnimationState->UpdateState(mAnimationFinished, this, mSize);
MOZ_ASSERT(rect.IsEmpty());
// notifications but that's not a problem because the first frame
// invalidation (when it comes) will invalidate for us. So we can ignore
// the return value of UpdateState. This also handles the invalidation
// from setting the composited frame as valid below.
mAnimationState->UpdateState(mAnimationFinished, this, mSize);
// If the animation is finished we can draw right away because we just draw
// the final frame all the time from now on. See comment in
// AnimationState::UpdateState.
if (mAnimationFinished) {
mAnimationState->SetCompositedFrameInvalid(false);
}
} else {
task = DecoderFactory::CreateDecoder(mDecoderType, WrapNotNull(this),
mSourceBuffer, mSize, aSize,