<AWT Dev> 6603887: Where are transparent areas filled with bgColor?

Clemens Eisserer linuxhippy at gmail.com
Wed Sep 26 08:09:58 PDT 2007


Sorry, just discovered that there is a seperate list for java2d related stuff.
I sent it there too, so that the discussion (hopefully) will start there.

Sorry for the traffic, lg Clemens

2007/9/26, Clemens Eisserer <linuxhippy at gmail.com>:
> Hi there,
>
> I recently found a strange bug while fixing the
> Mozilla-Browser-Plugin, somehow the Java2d/X11 pipeline has problems
> with the graybox_error.gif which is shown when an applet fails to
> initialize.
> The image is a partially transparent gif which is drawn with a
> background-color specified. It works for the first time, but at
> subsequent blits the transparent pixels which should be white are
> black.
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6603887.
>
> I played a bit with Java2D's trace functionality that came out:
>
> 1.) First draw, rendered correctly:
> sun.java2d.loops.BlitBg::BlitBg(ByteIndexedBm, SrcNoEa, IntRgb)
>
> 2.) Seems like the accaleration-blit:
> sun.java2d.x11.X11PMBlitLoops$DelegateBlitLoop::Blit(Any, SrcNoEa,
> "Integer RGB Pixmap with 1-bit transp")
> sun.java2d.loops.Blit::Blit(ByteIndexed, SrcNoEa, IntRgb)
> sun.java2d.x11.X11PMBlitBgLoops::BlitBg("Integer RGB Pixmap with 1-bit
> transp", SrcNoEa, "Integer RGB Pixmap")
>
> 3.) subsequent draws only do:
> sun.java2d.x11.X11PMBlitBgLoops::BlitBg("Integer RGB Pixmap with 1-bit
> transp", SrcNoEa, "Integer RGB Pixmap")
>
> So the interesing opereations seem to habben in 2.) I guess.
>
> In X11PMLoops I saw the following comment:
>     /* do an unmasked copy as we've already filled transparent
>        pixels of the source image with the desired color */
>     XCopyArea(awt_display, srcDrawable, dstXsdo->drawable, dstGC,
>               srcx, srcy, width, height, dstx, dsty);
>
> So I guess somehow the filling of the transparent colors with the
> background-color does something wrong.
> However I did not find the code where this happens, so some
> navigation-help would be really appiciated ;)
>
> Thank you in advance, lg Clemens
>



More information about the awt-dev mailing list