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 571732 - Get rid of deprecated libart_lgpl
Get rid of deprecated libart_lgpl
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Felix Riemann
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-14 15:06 UTC by André Klapper
Modified: 2009-04-05 21:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description André Klapper 2009-02-14 15:06:19 UTC
According to http://live.gnome.org/TwoPointTwentyfive/Platform libart_lgpl has been deprecated for more than three years and should be removed.



./eog/src/eog-thumbnail.c: #include <libart_lgpl/art_rgb.h>
./eog/src/uta.c: #include <libart_lgpl/art_uta_rect.h>
./eog/src/uta.h: #include <libart_lgpl/art_misc.h>
./eog/src/uta.h: #include <libart_lgpl/art_rect.h>
./eog/src/uta.h: #include <libart_lgpl/art_uta.h>
./eog/src/eog-transform.c: #include <libart_lgpl/art_affine.h>
./eog/configure.ac: LIBART_REQUIRED=2.3.16
./eog/configure.ac: libart-2.0 >= $LIBART_REQUIRED \
Comment 1 André Klapper 2009-02-14 15:10:17 UTC
Hint for potential contributors: Port this to cairo etc.
Comment 2 Felix Riemann 2009-02-15 19:45:13 UTC
(In reply to comment #0)
> 
> ./eog/src/eog-thumbnail.c: #include <libart_lgpl/art_rgb.h>

Got that one away. libart_lgpl was only used here to fill a pixbuf white.

2009-02-15  Felix Riemann  <>

	* src/eog-thumbnail.c: (eog_thumbnail_stretch_frame_image):
	Don't use deprecated libart_lgpl calls to fill an empty pixbuf when
	there's a GDK function for it. Part of bug #571732.


> ./eog/src/uta.c: #include <libart_lgpl/art_uta_rect.h>
> ./eog/src/uta.h: #include <libart_lgpl/art_misc.h>
> ./eog/src/uta.h: #include <libart_lgpl/art_rect.h>
> ./eog/src/uta.h: #include <libart_lgpl/art_uta.h>

This is a hard one. It's some microtile array utilities which are used to find the dirty regions that need to be redrawn by EogScrollView.
Ripping these µta's out of the current widget will probably require rewriting quite some of the current drawing code. As we plan to replace it with a clutter-based widget for 2.28/2.30 it might be worth waiting for that. 

> ./eog/src/eog-transform.c: #include <libart_lgpl/art_affine.h>

It looks like cairo_matrix_t could be used here. Probably something for 2.27/2.28.
Comment 3 André Klapper 2009-02-16 09:26:14 UTC
(In reply to comment #2)
> As we plan to replace it with a
> clutter-based widget for 2.28/2.30 it might be worth waiting for that. 

I'm fine with everything as long as it's definitely on the RoadMap for the next 9 months (2.27, or earliest 2.29).
Thanks!
Comment 4 Felix Riemann 2009-04-02 14:22:23 UTC
As this is now listed on the GNOME 3.0 schedule, :-)
a little status update:

(In reply to comment #2)
> (In reply to comment #0)
> > ./eog/src/uta.c: #include <libart_lgpl/art_uta_rect.h>
> > ./eog/src/uta.h: #include <libart_lgpl/art_misc.h>
> > ./eog/src/uta.h: #include <libart_lgpl/art_rect.h>
> > ./eog/src/uta.h: #include <libart_lgpl/art_uta.h>
> 
> This is a hard one. It's some microtile array utilities which are used to find
> the dirty regions that need to be redrawn by EogScrollView.
> Ripping these µta's out of the current widget will probably require rewriting
> quite some of the current drawing code. As we plan to replace it with a
> clutter-based widget for 2.28/2.30 it might be worth waiting for that. 
> 
> > ./eog/src/eog-transform.c: #include <libart_lgpl/art_affine.h>
> 

Well, it turned out it wasn't that hard. A closer look showed that we mostly use datatypes and macros from libart here. libart was more a build time dependency than a runtime dep here. So, I imported the functions I couldn't find an equivalent for and moved the macros and datatypes into our own namespace. 

> It looks like cairo_matrix_t could be used here. Probably something for
> 2.27/2.28.
> 

This is done as well. I also needed to import a few functions from libart where cairo doesn't have an equivalent for (e.g. flipping matrices) and a simple datatype for points because I didn't want to change a lot on the algorithm. 

I just need to polish the patches a bit before merging them.
Comment 5 Felix Riemann 2009-04-05 21:01:49 UTC
(In reply to comment #0)
> ./eog/src/eog-transform.c: #include <libart_lgpl/art_affine.h>
> 

2009-04-05  Felix Riemann  <friemann@svn.gnome.org>

	* src/eog-transform.c: (eog_transform_apply),
	(_eog_cairo_matrix_copy), (_eog_cairo_matrix_equal),
	(_eog_cairo_matrix_flip), (eog_transform_reverse),
	(eog_transform_compose), (eog_transform_is_identity),
	(eog_transform_identity_new), (eog_transform_rotate_new),
	(eog_transform_flip_new), (eog_transform_get_transform_type):
	Use cairo_matrix_t instead of libart for affine transformations.
	Import missing parts from libart_lgpl. Part of bug #571732.
Comment 6 Felix Riemann 2009-04-05 21:23:43 UTC
(In reply to comment #0)
> ./eog/src/uta.c: #include <libart_lgpl/art_uta_rect.h>
> ./eog/src/uta.h: #include <libart_lgpl/art_misc.h>
> ./eog/src/uta.h: #include <libart_lgpl/art_rect.h>
> ./eog/src/uta.h: #include <libart_lgpl/art_uta.h>
> ./eog/configure.ac: LIBART_REQUIRED=2.3.16
> ./eog/configure.ac: libart-2.0 >= $LIBART_REQUIRED \
> 

Done mostly by importing the needed libart symbols into eog's namespace. One modification was to update the imported pieces to use glib's memory allocation functions instead of their own (which were also simple malloc/calloc/free wrappers).

2009-04-05  Felix Riemann  <>

	* configure.ac: Remove libart dependency and set version.
	* src/eog-scroll-view.c: (pull_rectangle), (paint_background),
	(paint_rectangle), (paint_iteration_idle), (request_paint_area),
	(scroll_to), (eog_scroll_view_dispose):
	* src/uta.c: (eog_uta_new), (eog_uta_free), (eog_irect_intersect),
	(eog_irect_empty), (eog_uta_from_irect), (uta_ensure_size),
	(uta_add_rect), (uta_remove_rect), (uta_find_first_glom_rect),
	(copy_tile), (uta_copy_area):
	* src/uta.h:
	Copy pieces needed from libart_lgpl for the µta code into our own
	namespace as there is no replacement available. This removes the
	libart_lgpl dependency. Fixes bug #571732.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.