Re: [spice-gtk 3/4] gtk-deprecated: silence warn on gtk_widget_set_double_buffered()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Jul 24, 2018 at 09:35:01AM -0400, Frediano Ziglio wrote:
> > Ugly indeed, I didn't care much at first sight but you are right.
> > 
> > I don't mind wrapping this in an utility function/macro but don't
> > exactly agree to use it in glib-compat as that's usually referred
> > to glib functions that were removed or too-new but we want to use
> > in our code (e.g basically a copy-paste from glib).
> > 
> > A local macro like SET_DOUBLE_BUFFER_ON_X11(widget, enabled)
> > should work well enough
> > 
> 
> Well, according to documentation now the default is true so you
> could remove first 2 calls which set buffering to true just
> after widget creation. Last call is very simple and adding 
> G_GNUC_BEGIN_IGNORE_DEPRECATIONS/G_GNUC_END_IGNORE_DEPRECATIONS seems
> enough.
> Didn't test it.

Right, I'll remove this patch from the series and push the rest
if you don't mind. I'll follow your suggestion and remove these
two calls while keeping the one related to egl as it has the
comment

 | /* even though the function is marked as deprecated, it's the
 |  * only way I found to prevent glitches when the window is
 |  * resized. */

> > > There are also some scary comment on this function, see
> > > https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-double-buffered,
> > > specifically
> > > "In 3.10 GTK and GDK have been restructured for translucent
> > > drawing. Since then expose events for double-buffered widgets
> > > are culled into a single event to the toplevel GDK window. If
> > > you now unset double buffering, you will cause a separate
> > > rendering pass for every widget. This will likely cause
> > > rendering problems - in particular related to stacking - and
> > > usually increases rendering times significantly."
> > 
> > Do you think I should add it in commit log?
> > 
> > > Which ones are the double-buffered widgets?
> > 
> > Just the display? :) The Drawing area is double buffered.
> > 
> 
> Then from what I understand from the documentation we should
> not call this function. Unless it only applied to these
> "translucent drawing".

One of the reasons to push for bumping gtk is to reduce the
amount of possibilities with #ifdef but it is hard to be 100%
based on documentation about the outcome in x11/wayland and in
which version was based the comment mentioned above, etc.

Let's keep this patch off and test it for a while the followup
version I'll be sending.

Thanks for the review,


Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]