[Kde-accessibility] [PATCH] Fix for Kmag redraw problems
Olaf Jan Schmidt
olaf at amen-online.de
Thu Jun 12 13:26:35 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[Sarang Lakare]
> The patch does what it is supposed to, but the CPU usage increases
> after applying this patch.
I cannot reproduce this. In all my tests, the CPU usage is more or less
identical with or without the patch.
> I tried to find the reason, but it is not very obvious. This was my test
> case: Zoom level 8, kmag window pretty large, refresh set to very low.
> Run kmag with and w/o the patch. w/o the patch, on my machine, the CPU
> usage is a constant 75%, while with the patch, the CPU usage is 100%.
On my computer, there is a strange jump from 5% CPU usage to 100% when the
size of the window exceeds a certain size. There is a sharp "border"
between the two states - the CPU usage is 5% up to a certain limit, and
if you increase the window size one pixel further, it suddenly jumps to
100%. This does not depend on the patch, so I believe it is rather a
problem in already existing code.
> This happens even when the selection window is not shown.
I have checked several times that the new code behaves identical to the
old one if the selection widnow is not shown.
> My guess is that KMagSelWin is getting a refresh call when it
> shouldn't.. other than that I see no reason for the jump in CPU usage.
The KMagSelWin is hidden when it isn't shown - so it cannot get a refresh
call. If there really was an increase in CPU usage when the window is not
shown, then there would be a grave bug in KWin and Qt, which couldn't be
fixed inside of KMag. But as I said, I cannot reproduce this increase in
CPU usage.
> I think this should be fixed before applying the patch.
While showing the selection window, there must indeed be a small increase
in CPU usage, as the redraw problems can only be fixed by making sure
that proper redraw events are sent. This small CPU increase cannot be
avoided unless we take the opinion that redraw bugs are OK.
In the long term, I am thinking about adding an option to KMag that allows
to move and resize the KMagSelWin by grapping the border - we could
implement (optional) resize and move handlers for the window, or just
allow to set the border size a bit bigger for easier grapping.
Olaf.
- --
Meine Internetseiten:
http://www.GebetGenerator.de, http://www.amen-online.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAj7oVWAACgkQoLYC8AehV8dNbACg7o3JJUoTYQBOi7Romc3oLHfp
65YAn1AGYmdGP2C2vvbvIV7fdgaQ/wM8
=Mak5
-----END PGP SIGNATURE-----
More information about the kde-accessibility
mailing list