On Mar 27, 2009, at 6:47 PM, Vitaliy Margolen wrote:
Anyway, e.g. Sib Icon Edit required ~ 30 Mb (something like 27
images *
13440 width * 24 height * sizeof(each pixel)) of memory for every
instance
to run (due to this bug). Now it requires only about 300kb
Fixing one app doesn't mean it's correct. Yes, there is an obvious
error in
the image list, but you are not just fixing it. You also removing some
functionality that tool bar depends on.
I'm not fixing an app (not one, but every which uses this codepath,
might be not many but in Wine you would not notice this due to
different memory model than in a real OS), I'm fixing a wrong
behavior when width of whole bitmap was confused with width of one
item in the image list!
Simple formula: NewTotalWidth = NewItemCount * WidthOfOneItem
(correct one), and now in Wine: NewTotalWidth = NewItemCount *
TotalWidth.
Then, after fixing, cx parameter becomes unused and thus gets
deleted. There was no way of changing individual image list item's
width with that cx parameter. The only possibility of its usage might
have been checking if image list is going to be reduced instead of
expanded, but that check is there, and is performed without using cx.
Am I wrong?