After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 546504 - clutter backend
clutter backend
Status: RESOLVED OBSOLETE
Product: eog
Classification: Core
Component: image viewer
git master
Other Linux
: Normal enhancement
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on: 532183
Blocks: 632994
 
 
Reported: 2008-08-06 02:41 UTC by Claudio Saavedra
Modified: 2021-06-19 08:45 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
first try (24.05 KB, patch)
2008-08-06 02:59 UTC, Claudio Saavedra
none Details | Review
[1/1] Fix the critical warning caused by gtk_clutter_embed_show(). (685 bytes, patch)
2008-10-09 18:55 UTC, Claudio Saavedra
none Details | Review
[PATCH] Explicitely ref and unref the EogImageData, to avoid leaks. (23.09 KB, patch)
2008-10-09 20:38 UTC, Claudio Saavedra
none Details | Review
updated patch (19.91 KB, patch)
2009-11-10 13:48 UTC, Gustavo Noronha (kov)
none Details | Review

Description Claudio Saavedra 2008-08-06 02:41:11 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)
Comment 1 Claudio Saavedra 2008-08-06 02:59:54 UTC
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!
Comment 2 Claudio Saavedra 2008-08-06 03:04:53 UTC
By the way, configure with --with-clutter to activate it. Maybe we could even change it to be activatable on runtime.
Comment 3 Felix Riemann 2008-10-07 13:47:12 UTC
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.
Comment 4 Claudio Saavedra 2008-10-09 17:14:16 UTC
Well, with all the explicit realizations that EogWindow has... this is a bit messy to do, I guess.
Comment 5 Claudio Saavedra 2008-10-09 17:57:55 UTC
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.
Comment 6 Claudio Saavedra 2008-10-09 18:24:07 UTC
Filed http://bugzilla.o-hand.com/show_bug.cgi?id=1185 about this.
Comment 7 Claudio Saavedra 2008-10-09 18:55:33 UTC
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(-)
Comment 8 Claudio Saavedra 2008-10-09 20:38:02 UTC
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(-)
Comment 9 Claudio Saavedra 2008-10-09 20:39:21 UTC
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.
Comment 10 Felix Riemann 2008-10-10 11:56:04 UTC
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
  • #0 gdk_x_error
    at gdkmain-x11.c line 614
  • #1 bonobo_x_error_handler
    at bonobo-ui-main.c line 58
  • #2 _XError
    at XlibInt.c line 2912
  • #3 _XReply
    at XlibInt.c line 1838
  • #4 XSync
    at Sync.c line 48
  • #5 _XSyncFunction
    at Synchro.c line 37
  • #6 glXSwapBuffers
    from //usr//lib/opengl/nvidia/lib/libGL.so.1
  • #7 ??
  • #8 ??
  • #9 ??

Comment 11 Felix Riemann 2008-10-10 15:24:46 UTC
Seems to be driver related. Just tried with the xorg nv driver (using mesa's software renderer) and it worked.
Comment 12 Gustavo Noronha (kov) 2009-11-10 13:48:11 UTC
Created attachment 147375 [details] [review]
updated patch

Patch updated to master, and ported to clutter 1.0.
Comment 13 Emmanuele Bassi (:ebassi) 2010-03-21 11:51:07 UTC
(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.*
Comment 14 André Klapper 2021-06-19 08:45:37 UTC
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.