mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-11 22:41:02 +00:00
Bug 1629490. In RasterImage invalidate if we get a non-empty dirty rect, don't ignore it if mFrameAdvanced is false. r=aosmond
We invalidate for more things than just frames advancing (if we are redecoding and still showing the same frame as before discarding for example). So there is no reason that the dirty rect and a frame being advanced should be linked. Differential Revision: https://phabricator.services.mozilla.com/D71483
This commit is contained in:
parent
288dbdf3a5
commit
008ffcf520
@ -360,9 +360,6 @@ RefreshResult FrameAnimator::RequestRefresh(AnimationState& aState,
|
||||
ret.mDirtyRect = aState.UpdateStateInternal(result, mSize);
|
||||
if (aState.IsDiscarded() || !result) {
|
||||
aState.MaybeAdvanceAnimationFrameTime(aTime);
|
||||
if (!ret.mDirtyRect.IsEmpty()) {
|
||||
ret.mFrameAdvanced = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -166,14 +166,16 @@ RasterImage::RequestRefresh(const TimeStamp& aTime) {
|
||||
res = mFrameAnimator->RequestRefresh(*mAnimationState, aTime);
|
||||
}
|
||||
|
||||
if (res.mFrameAdvanced) {
|
||||
// Notify listeners that our frame has actually changed, but do this only
|
||||
// once for all frames that we've now passed (if AdvanceFrame() was called
|
||||
// more than once).
|
||||
#ifdef DEBUG
|
||||
if (res.mFrameAdvanced) {
|
||||
mFramesNotified++;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Notify listeners that our frame has actually changed, but do this only
|
||||
// once for all frames that we've now passed (if AdvanceFrame() was called
|
||||
// more than once).
|
||||
if (!res.mDirtyRect.IsEmpty() || res.mFrameAdvanced) {
|
||||
auto dirtyRect = UnorientedIntRect::FromUnknownRect(res.mDirtyRect);
|
||||
NotifyProgress(NoProgress, dirtyRect);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user