[webkit-gtk] Alpha channel problem in pixel-tests.

Young Han Lee joybro at company100.net
Wed Jun 15 10:41:35 PDT 2011

On Wed, Jun 15, 2011 at 2:38 AM, Martin Robinson <mrobinson at webkit.org>wrote:

> On Tue, Jun 14, 2011 at 9:56 AM, Young Han Lee <joybro at company100.net>
> wrote:
> > The pixmap snapshoted from the webview widget has 24-depth, and this
> > eventually causes cairo making a png file has RGB color, not RGBA.
> Did you try forcing the toplevel window to have an RGBA colormap by
> using gtk_widget_set_colormap?

Yes, I did that today, but it didn't help because what I said for the pixmap
was wrong.

The real reason for the RGB-PNG output is cairo. By
cairo_surface_write_to_png_stream(), this cairo function always makes a RGB
stream instead of RGBA if the given cairo-surface isn't translucent, even if
the surface has ARGB32 format. But, this actually doesn't matter. ;)

The really interesting thing is that this is not a problem at all. DRT of
the gtk port has always made a RGB pixel-test-output, and the output has
been compared with the *RGB* PNG file which is under the platform/gtk
directory. You can see that the most of all png files under the platform/gtk
have RGB color space.

joybro at joybro-linux:~/Works/WebKitGtk$ find ./LayoutTests/platform/gtk/
-name "*.png" | xargs file | grep -c RGB

joybro at joybro-linux:~/Works/WebKitGtk$ find ./LayoutTests/platform/gtk/
-name "*.png" | xargs file | grep -c RGBA

Thus, DRT has worked correctly from the beginning even on my desktop! The
only problem is that I tried to pixel-test for a testcase that hasn't
gtk-own expected result. I checked that testcases has gtk-own expected
result are passed well.

Thank you for your advice :)


> --Martin
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-gtk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20110616/cfef32d1/attachment.html>

More information about the webkit-gtk mailing list