[rfc][icedtea-web] awt framework - added handling of alpha and small performance improvement

Pavel Tisnovsky ptisnovs at redhat.com
Mon Apr 29 06:52:37 PDT 2013

Hi Jiri,

your patch looks ok in overall. Ok to push to HEAD if following minor
issues would be fixed:

+        //to filter oout values with alpha
filter out

+        //accessing those to often, copying
too often

+            int w=icon.getWidth();
+            int h = icon.getHeight();
+            boolean[][] b= getMask(icon);
^^^ needs autoformating (spaces between operands and operators)

+            int w=icon.getWidth();
+            int h = icon.getHeight();
+            boolean[][] r = new boolean[w][h];
It would be faster to construct all arrays transposed, ie. new boolean[h][w] and then
rearrange for-loops in following way:
for (y:all_rows) {
   for (x:all_columns) {
because it will make CPU caches more happy :-)


----- Jiri Vanek <jvanek at redhat.com> wrote:
> Hi!
> This aptch is adding masks for iamges using alpha.
> Parts of pattern with alpha chanel are unpredictable, so this is simply removing those parts.
> Also I think it is worthy to save image we are looking fro into array and to avoid repeated getRGB()
> J.

More information about the distro-pkg-dev mailing list