Closed
Bug 1255104
Opened 9 years ago
Closed 9 years ago
Use SurfacePipe in the Icon decoder
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: seth, Assigned: seth)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
7.33 KB,
patch
|
n.nethercote
:
review+
|
Details | Diff | Splinter Review |
SurfacePipe is intended to eliminate the possibility of output buffer overflows in ImageLib, so we want to use it for all decoders. That includes Icon.
This is a good opportunity to introduce downscale-during-decode support for the Icon format, since it's trivial with SurfacePipe.
Assignee | ||
Comment 1•9 years ago
|
||
Silly me - of course we already introduced downscale-during-decode for Icon. I went ahead and did this one because the patch is so simple, and I figured it'd be nice to have this as a simple example for both SurfacePipe and StreamingLexer.
Assignee | ||
Comment 2•9 years ago
|
||
Here's the patch. nsIconDecoder is truly minimal at this point. We could even
get rid of mBytesPerRow but I think it makes things a bit clearer.
I preferred WritePixels to WriteRows here. Unlike in the GIF decoder, there's
probably not enough work per pixel to make this effectively free (i.e. memcpy
with WriteRows would undoubtedly be faster) but I would prefer the additional
memory safety unless we run into an issue.
Attachment #8728682 -
Flags: review?(n.nethercote)
Assignee | ||
Comment 3•9 years ago
|
||
Whoops, forgot to commit before attaching.
Attachment #8728684 -
Flags: review?(n.nethercote)
Assignee | ||
Updated•9 years ago
|
Attachment #8728682 -
Attachment is obsolete: true
Attachment #8728682 -
Flags: review?(n.nethercote)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → seth
![]() |
||
Updated•9 years ago
|
Attachment #8728684 -
Flags: review?(n.nethercote) → review+
Assignee | ||
Comment 4•9 years ago
|
||
Thanks for the review!
Assignee | ||
Comment 5•9 years ago
|
||
Assignee | ||
Comment 6•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/033d603cd91d2a6ec256c23cb26f7aa4310e47b0
Bug 1255104 - Use SurfacePipe in nsIconDecoder. r=njn
Comment 7•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•