<Swing Dev> [PATCH] GrayFilter cache

Roman Kennke roman.kennke at aicas.com
Wed Apr 23 12:46:51 UTC 2008


Hi,

I have an application here, that has a lot of buttons with image icons,
all have the same icon, and many of them get disabled. This leads to
gray-filtering the icons, and since they are all the same, the
grayfilter filters the same icon over and over again. I think this can
be optimized by introducing a cache like in the attached patch.

Now I am not sure if this change is feasible. There is a (very small)
chance that somebody uses this to filter changing images. For example,
somebody could filter a BufferedImage, then draw into that and filter it
again (to refresh the gray representation or so). I would guess that
nobody really does this, but what do I know? In this case, he would get
the old gray image in return.

What do you think about that, could this be included in OpenJDK?

Cheers, Roman

-- 
Dipl.-Inform. (FH) Roman Kennke, Software Engineer, http://kennke.org
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-0
USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
Geschäftsführer: Dr. James J. Hunt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grayfiltercache.patch
Type: text/x-patch
Size: 1759 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20080423/24910107/grayfiltercache.patch>


More information about the swing-dev mailing list