Closed Bug 1280712 Opened 8 years ago Closed 8 years ago

Remove redundant memset() call in the GIF decoder

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: seth, Assigned: seth)

References

Details

Attachments

(1 file)

The GIF decoder has code to zero out new frames when they're allocated. This is redundant with code in imgFrame. We should remove it.
Here's the patch. imgFrame::InitForDecoder() already takes care of this by
allocating the memory using calloc() in the paletted case, and memset'ing it in
the non-paletted case. There are tests for this in
image/test/gtest/TestSurfaceSink.cpp already, as well.
Attachment #8763292 - Flags: review?(edwin)
Pushed by mfowler@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/10fd0046cf6f
Remove redundant memset() of GIF frame data. r=edwin
https://hg.mozilla.org/mozilla-central/rev/10fd0046cf6f
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: