Closed Bug 1325297 Opened 3 years ago Closed 3 years ago

add a way to determine if a StartDecoding call resulted in a complete image and use it while painting

Categories

(Core :: ImageLib, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(2 files)

If we use async notifications (as we want to in bug 1317562) during painting, we will not be able to determine if the decoding we do during painting resulted in a complete image. So we add a way to tell so we can still draw the image in the current paint.
Attachment #8821024 - Flags: review?(aosmond)
Comment on attachment 8821024 [details] [diff] [review]
create StartDecodingWithResult

Review of attachment 8821024 [details] [diff] [review]:
-----------------------------------------------------------------

::: image/RasterImage.cpp
@@ +1061,5 @@
> +    return false;
> +  }
> +
> +  uint32_t flags = (aFlags & FLAG_ASYNC_NOTIFY) | FLAG_SYNC_DECODE_IF_FAST;
> +  DrawableSurface surface = RequestDecodeForSizeInternal(mSize, flags);  

nit: extra whitespace at end of line
Attachment #8821024 - Flags: review?(aosmond) → review+
Attachment #8821025 - Flags: review?(aosmond) → review+
Pushed by tnikkel@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3382306ba5c5
Create a variant of imgIContainer::StartDecoding that returns if the current image frame is complete. r=aosmond
https://hg.mozilla.org/integration/mozilla-inbound/rev/95f052c8d95a
Use the return value of StartDecoding to determine if an image finished decoding during painting. r=aosmond
https://hg.mozilla.org/mozilla-central/rev/3382306ba5c5
https://hg.mozilla.org/mozilla-central/rev/95f052c8d95a
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.