Closed
Bug 66461
Opened 24 years ago
Closed 24 years ago
[libimg]stretched transparent GIFs should not eat CPU time
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.0
People
(Reporter: jesup, Assigned: tor)
References
Details
(Keywords: perf, Whiteboard: [imglib])
Attachments
(4 files)
4.26 KB,
patch
|
Details | Diff | Splinter Review | |
4.23 KB,
patch
|
Details | Diff | Splinter Review | |
4.25 KB,
patch
|
Details | Diff | Splinter Review | |
4.66 KB,
patch
|
Details | Diff | Splinter Review |
From the footprint meeting:
Transparent GIFs (especially 1x1's) stretched into different sizes should be
optimized away - we shouldn't store a (say) 400x200 bitmap of 0's, then spend
lots of time rendering, compositing, the transparent GIF. At least we should
save the memory, but avoiding rendering would be a significant performance win
as well.
Updated•24 years ago
|
Summary: stretched transparent GIFs should not eat memory/CPU time → [libimg]stretched transparent GIFs should not eat memory/CPU time
Comment 4•24 years ago
|
||
Okay, in libpr0n we strech images at render time, we don't cache each
scaled copy, so I'm going to close this. We could still optimize away 1x1
transparent spacer GIFs entirely, but there isn't a big savings there. Feel
free to open this bug again for that issue (but it won't be mozilla 0.9
targeted)
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 5•24 years ago
|
||
Ok, thanks for getting this. Reopening for the performance item involved -
avoiding stretching and renderering 1x1 transparent gifs would be a noticable
win (scaling is not cheap).
Removing target milestone, changing subject to CPU only, removing footprint.
Status: RESOLVED → REOPENED
Keywords: footprint
Resolution: FIXED → ---
Summary: [libimg]stretched transparent GIFs should not eat memory/CPU time → [libimg]stretched transparent GIFs should not eat CPU time
Target Milestone: mozilla0.9 → ---
Comment 6•24 years ago
|
||
Okay, targeting 9.1 for totally optimizing away transparent spacers.
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla0.9.1
Reporter | ||
Comment 10•24 years ago
|
||
Very cool! I looked over the patch; it seems quite reasonable. This appears to
avoid drawing a transparent spacer of any size; does it avoid scaling it as
well, or has that already been handled?
Assignee | ||
Comment 11•24 years ago
|
||
Scaling happens on the fly in the nsImageGTK::Draw* methods, and this patch
causes all of those to bail before doing any work on a spacer.
Reporter | ||
Comment 12•24 years ago
|
||
I tried out the patch - it seems to work well. The number of "alpha bitmap not
scaled" warnings is WAY down. Everything renders fine (not surprising since we
only eliminate bitmaps with all alpha of 0). This should be a nice little boost
in performance on complex pages.
Comment 13•24 years ago
|
||
Lots of these:
+ if ((mAlphaDepth==1) && mIsSpacer) {
+ return NS_OK;
+ }
Kill the braces around one-liners, and r=dr.
Assignee | ||
Comment 15•24 years ago
|
||
Assignee | ||
Comment 16•24 years ago
|
||
Comment 17•24 years ago
|
||
r=dr
Comment 18•24 years ago
|
||
sr=blizzard if you comment some of the bit masking
Assignee | ||
Comment 19•24 years ago
|
||
Comment 20•24 years ago
|
||
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)
Assignee | ||
Comment 21•24 years ago
|
||
Checked in on trunk.
Status: NEW → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•