Bug 1527085 - Ensure we invalidate when the image request changes. r=jrmuizel

When the underlying image request (imgIRequest) changes for an image, we
need to ensure that we invalidate the cached WebRenderImageData such that
the image container stored therein is updated to be for the correct
image. This gets a little tricky because some display items store both
the current and previous images, and choose to display the latter if the
former is not yet ready. We also don't know what image the image
container belongs to. As such, we now compare the producer ID of the
current frame in the image container, to the expected producer ID of the
current image request. If they don't match, we must regenerate the
display list.

Differential Revision: https://phabricator.services.mozilla.com/D19699
This commit is contained in:
Andrew Osmond
2019-02-13 14:13:55 -05:00
parent 5dc3fa80e3
commit e92a71dc96
18 changed files with 111 additions and 22 deletions

View File

@@ -120,6 +120,12 @@ DynamicImage::GetType(uint16_t* aType) {
return NS_OK;
}
NS_IMETHODIMP
DynamicImage::GetProducerId(uint32_t* aId) {
*aId = 0;
return NS_OK;
}
NS_IMETHODIMP
DynamicImage::GetAnimated(bool* aAnimated) {
*aAnimated = false;