In my experimentation for 400% and 800% magnification, I am experiencing a malfunction (entire image displays as black) when the magnified image is over 134217728 pixels.
I have a bad code change work around for the problem and will figure out a better code change.
Who do I ask for the mercurial write access, so I can put the relevant changes into a branch and try to get some testing by others?
I did a lot of stepping through the code looking for the actual failure point and haven't found it yet, but I expect to.
I think the whole failure might be dependent on the environment (such as, the bug may be in or below gtk, rather than in hugin or wxWidgets, and I expect some hugin environments don't use gtk). I'm even more confident that the performance reduction (for the CP dialog) caused by my code change and the possible performance increase (relative to original, not just relative to a crude fix) likely from doing it right would be highly dependent on which tools (gtk etc. and maybe even display driver) are underneath. I can't test enough to do that justice.
The crude fix is replacing the line:
dc.DrawBitmap(bitmap,0,0);
in CPImageCtrl::OnDraw with
if (bitmap.GetWidth() > 2*vSize.GetWidth() && bitmap.GetHeight() > 2*vSize.GetHeight() )
{
int posX, posY;
GetViewStart(&posX, &posY);
wxBitmap const& subBit = bitmap.GetSubBitmap(wxRect(posX,posY,vSize.GetWidth(),vSize.GetHeight()));
dc.DrawBitmap(subBit,posX,posY);
} else {
dc.DrawBitmap(bitmap,0,0);
}