GNOME Bugzilla – Bug 546504
clutter backend
Last modified: 2021-06-19 08:45:37 UTC
Now that we have clutter as a blessed external dependency, we may add a clutter backend to have nice transitions, cool zooming, and other nice things in the image viewing widget. I'll paste here my work in progress stuff. Take it with a grain of salt, and please, be constructive. (Note that this is NOT the shinny stuff I published in my blog, which was an ugly hack in the way of a plugin, without any real shape)
Created attachment 115952 [details] [review] first try This applies on top of patch #115951. Go play with it. So far, many things don't work, but: - We have nice transitions!
By the way, configure with --with-clutter to activate it. Maybe we could even change it to be activatable on runtime.
I think we might need to delay the view realization a bit in EogWindow because I get this: (./eog:5274): Gtk-CRITICAL **: gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed This will produce an extra window besides the normal eog window, which will go away when loading an image. The image area only becomes black then though.
Well, with all the explicit realizations that EogWindow has... this is a bit messy to do, I guess.
Hm, this is strange. It seems that doing a gtk_widget_show_all () in hpaned (which is an ancestor of the EogClutterView) is what is causing that critical warning. During the show_all() recursion, gtk_clutter_embed_show() is called, For some reason I don't yet understand, this one tries to realize the widget, which is not yet anchored, causing the critical warning and the displayed dialog. Need to figure out why gtk_clutter_embed_show() does the realization.
Filed http://bugzilla.o-hand.com/show_bug.cgi?id=1185 about this.
Created attachment 120298 [details] [review] [1/1] Fix the critical warning caused by gtk_clutter_embed_show(). According to ebassi, that's the way it should be done: make sure to embed before actually showing a GtkClutterEmbed. --- src/eog-window.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Created attachment 120309 [details] [review] [PATCH] Explicitely ref and unref the EogImageData, to avoid leaks. ChangeLog | 19 ++ bindings/python/Makefile.am | 2 +- bindings/python/eog.defs | 30 ++-- configure.ac | 23 ++ doc/reference/eog.types | 1 - src/Makefile.am | 18 ++- src/eog-clutter-view.c | 479 +++++++++++++++++++++++++++++++++++++++++++ src/eog-clutter-view.h | 55 +++++ src/eog-scroll-view.c | 2 +- src/eog-window.c | 17 ++- src/main.c | 7 + 11 files changed, 629 insertions(+), 24 deletions(-)
Above is a squashed patch with some cleanups that I did today: - Explicitely ref and unref the EogImageData, to avoid leaks. - Reuse the same two ClutterTexture objects during all the lifetime of the widget. - No need for a finalize method, the ClutterStage destroys all the actors itself. - Use gtk_clutter_init() instead of clutter_init(). - Fix the critical warning caused by gtk_clutter_embed_show(). - Add new EogClutterView widget and enable it if clutter installed.
Somethings wrong here :-( The program './eog' received an X Window System error. This probably reflects a bug in the program. The error was 'GLXBadDrawable'. (Details: serial 689 error_code 159 request_code 144 minor_code 11) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) Stacktrace is not really meaningful: (gdb) bt
+ Trace 207993
Seems to be driver related. Just tried with the xorg nv driver (using mesa's software renderer) and it worked.
Created attachment 147375 [details] [review] updated patch Patch updated to master, and ported to clutter 1.0.
(In reply to comment #11) > Seems to be driver related. Just tried with the xorg nv driver (using mesa's > software renderer) and it worked. crashers and X11 errors involving nvidia binary drivers should be fixed in Clutter 1.2.*
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/eog/-/issues/ Thank you for your understanding and your help.