When using gtk-based programs on wayland, cairo commit 38a242a "spans,image,gl: Add fast-path for simple copies" makes them corrupted. Specifically, I think, any partly-repainted regions become transparent, and remain so until the window is fully repainted. gnome-calculator demonstrates the problem quite nicely.
Verified mentioned first bad commit glitches, and commit before it works. With wayland 0.85. Video of problem here: http://www.chaosreigns.com/wayland/demos/2012-04-03-wayland-gtk-glitches.html
Something caught my eye in that commit: (In function composite_boxes(), cairo-gl-spans-compositor.c, line 371) - _cairo_gl_operand_translate (&setup.mask, -src_x, -src_y); + _cairo_gl_operand_translate (&setup.src, -src_x, -src_y); From the surrounding code, I see that this change makes sense. However, it seems unrelated to the rest of this commit. Could someone check if just reverting this change makes the problems go away? Disclaimer: I have no clue what I am doing here. :-)
(In reply to comment #2) > seems unrelated to the rest of this commit. Could someone check if just > reverting this change makes the problems go away? I tried, it didn't help.
Created attachment 59861 [details] [review] Patch against 38a242a which fixes this bug Just - spans.draw_image_boxes = draw_image_boxes; +// spans.draw_image_boxes = draw_image_boxes; in src/cairo-gl-spans-compositor.c
Ugh, please ignore the previous comment. That change did not fix this problem.
src/cairo-gl-spans-compositor.c - spans.copy_boxes = copy_boxes; +// spans.copy_boxes = copy_boxes; Doesn't seem to fix it either.
Created attachment 59939 [details] [review] patch? The attached sign-swap in _cairo_gl_operand_translate fixes this bug for me. I've checked gnome-calculator and gtk3-demo in wayland, and this fixes both of them. I don't understand the code well enough to know why this fixes it, or why it was this way in the first place.
commit 748dcdef4b67097c079a3ff98f970451428c24f3 Author: Chuanbo Weng <strgnm@gmail.com> Date: Fri May 4 08:53:20 2012 +0800 gl: fix the translate value in copy_boxes. Fixes 36 test cases (such as push-group-color) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48221
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.