mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1210745. Change image progress asserts to allow transparency to be posted after the size is posted. r=seth
The PNG decoder posts the size almost immediately, and later posts transparency (even for non-animated images). It would be nice to still assert what this assert is intending (that transparency of non-animated images is posted during the metadata decode) but we don't have any easy way of telling when a metadata finishes here.
This commit is contained in:
parent
3822e4c6c4
commit
417ecff3c2
@ -53,12 +53,8 @@ CheckProgressConsistency(Progress aOldProgress, Progress aNewProgress)
|
||||
// GIFs may fool us.
|
||||
}
|
||||
if (aNewProgress & FLAG_HAS_TRANSPARENCY) {
|
||||
// We should never discover this after FLAG_SIZE_AVAILABLE except in the
|
||||
// case of animated images, which may have an opaque first frame but
|
||||
// transparent frames later on in the animation.
|
||||
MOZ_ASSERT((aNewProgress & FLAG_IS_ANIMATED) ||
|
||||
(aOldProgress & FLAG_HAS_TRANSPARENCY) ||
|
||||
!(aOldProgress & FLAG_SIZE_AVAILABLE));
|
||||
// XXX We'd like to assert that transparency is only set during metadata
|
||||
// decode but we don't have any way to assert that until bug 1254892 is fixed.
|
||||
}
|
||||
if (aNewProgress & FLAG_LAST_PART_COMPLETE) {
|
||||
MOZ_ASSERT(aNewProgress & FLAG_LOAD_COMPLETE);
|
||||
|
Loading…
Reference in New Issue
Block a user