Web lists-archives.com

Window surface referencing




GDK does
> window->current_paint.surface = gdk_window_ref_impl_surface (window);
before every paint for windows that don't need offscreen surfaces, and then
does
> cairo_surface_destroy (window->current_paint.surface);
> window->current_paint.surface = NULL;
after the paint, which leads to surface being created and destroyed repeatedly.

AFAIU, the assumption is that the underlying drawing thingy persists along
with the window, only a cairo interface (surface) to that thingy gets
created/destroyed.

Question is: can i instead create a cairo surface and have it persist (say,
by getting an extra reference to it) between repaints? Does GDK rely on
surface not living for long?


-- 
O< ascii ribbon - stop html email! - www.asciiribbon.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-devel-list