[Wayland-bugs] [Bug 772075] GTK+ uses a lot more CPU under Wayland than under X11

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Thu Nov 10 11:33:31 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=772075

--- Comment #7 from Gustavo Noronha (kov) <gns at gnome.org> ---
I was talking to Pekka Paalanen about the pixman fast path and he was telling
me:

1) good luck getting anything new into pixman
2) affine matrix + scaling, repeat/pad masking all make fast paths harder to
find

I believe the problematic bit in question is scaling, since it is not a problem
when not in hidpi, so we could take that out of the equation, but I'm not sure
how - sounds like it would be a much more intrusive change. Pekka suggested
that I try disabling bilinear filtering:

diff --git a/gtk/gtkcssshadowvalue.c b/gtk/gtkcssshadowvalue.c
index 35d3df7..6de2bf1 100644
--- a/gtk/gtkcssshadowvalue.c
+++ b/gtk/gtkcssshadowvalue.c
@@ -381,6 +381,7 @@ mask_surface_repeat (cairo_t         *cr,

     pattern = cairo_pattern_create_for_surface (surface);
     cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
+    cairo_pattern_set_filter (pattern, CAIRO_FILTER_FAST);

     cairo_mask (cr, pattern);

That improves things quite a bit, but not as much as my patch does - resizing
the main gtk3-demo window is still quite jerky, for instance.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20161110/b7d28eba/attachment.html>


More information about the wayland-bugs mailing list