[dia/cairo-port] Remove libart renderer
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia/cairo-port] Remove libart renderer
- Date: Fri, 7 Dec 2018 05:27:14 +0000 (UTC)
commit a6eed67a1b4a0f73783067a27a8a56a7e4506185
Author: Zander Brown <zbrown gnome org>
Date: Fri Dec 7 04:12:28 2018 +0000
Remove libart renderer
Only benefit to libart was antialiasing with is now provided by cairo
app/Makefile.am | 3 +-
app/app_procs.c | 23 +-
app/display.c | 70 +-
app/makefile.mingw | 7 +-
bindings/Makefile.am | 2 +-
config.h.win32 | 4 -
configure.ac | 9 -
lib/Makefile.am | 3 +-
lib/makefile.mingw | 2 -
makefile.msc | 8 -
plug-ins/Makefile.am | 2 +-
plug-ins/libart/Makefile.am | 20 -
plug-ins/libart/dialibart.c | 71 --
plug-ins/libart/dialibartrenderer.c | 1417 -----------------------------------
plug-ins/libart/dialibartrenderer.h | 62 --
plug-ins/libart/export_png.c | 391 ----------
plug-ins/libart/render_libart.c | 510 -------------
plug-ins/libart/render_libart.h | 26 -
plug-ins/makefile.msc | 12 +-
plug-ins/python/Makefile.am | 1 -
plug-ins/shape/shape-export.c | 6 +-
po/POTFILES.in | 4 -
tests/exports/Makefile.am | 2 +-
23 files changed, 28 insertions(+), 2627 deletions(-)
---
diff --git a/app/Makefile.am b/app/Makefile.am
index 93c8ea0a..674fc80e 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -9,7 +9,6 @@ AM_CPPFLAGS = \
$(DEBUG_FLAGS) \
$(GTK_CFLAGS) \
$(GTK_MAC_CFLAGS) \
- $(LIBART_CFLAGS) \
$(CAIRO_CFLAGS) \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
@@ -222,7 +221,7 @@ EFENCE =
dia_LDADD = ../lib/libdia.la \
$(EFENCE) \
$(APP_LIBS) $(Z_LIBS) $(FREETYPE_LIBS) $(GTK_LIBS) $(PNG_LIBS) $(INTLLIBS) $(INTLOBJS) \
- $(XML_LIBS) $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_MAC_LIBS)
+ $(XML_LIBS) $(GLIB_LIBS) $(GTK_MAC_LIBS)
## Bonobo embeddable dia. Commented out, because it's a bit raw.
## Especially the configure/make parts.
diff --git a/app/app_procs.c b/app/app_procs.c
index 82290b93..739f0133 100644
--- a/app/app_procs.c
+++ b/app/app_procs.c
@@ -327,13 +327,9 @@ do_convert(const char *infname,
* are quite some filter selecting their output format by it. --hb
*/
if (size) {
- if (ef == filter_export_get_by_name ("png-libart")) /* the warning we get is appropriate, don't cast */
- ef->export_func(diagdata, ctx, outfname, infname, size);
- else {
- g_warning ("--size parameter unsupported for %s filter",
- ef->unique_name ? ef->unique_name : "selected");
- ef->export_func(diagdata, ctx, outfname, infname, ef->user_data);
- }
+ g_warning ("--size parameter unsupported for %s filter",
+ ef->unique_name ? ef->unique_name : "selected");
+ ef->export_func(diagdata, ctx, outfname, infname, ef->user_data);
}
else
ef->export_func(diagdata, ctx, outfname, infname, ef->user_data);
@@ -370,9 +366,6 @@ dump_dependencies(void)
"threads "
#endif
"cairo "
-#ifdef HAVE_LIBART
- "libart "
-#endif
"pangocairo "
"\n");
@@ -481,11 +474,7 @@ handle_initial_diagram(const char *in_file_name,
/* First try guessing based on extension */
export_file_name = build_output_file_name(in_file_name, export_file_format, outdir);
- /* to make the --size hack even uglier but work again for the only filter supporting it */
- if ( size && strcmp(export_file_format, "png") == 0)
- ef = filter_export_get_by_name ("png-libart");
- if (!ef)
- ef = filter_guess_export_filter(export_file_name);
+ ef = filter_guess_export_filter(export_file_name);
if (ef == NULL) {
ef = filter_export_get_by_name(export_file_format);
if (ef == NULL) {
@@ -501,10 +490,6 @@ handle_initial_diagram(const char *in_file_name,
g_free(export_file_name);
} else if (out_file_name) {
DiaExportFilter *ef = NULL;
-
- /* if this looks like an ugly hack to you, agreed ;) */
- if (size && strstr(out_file_name, ".png"))
- ef = filter_export_get_by_name ("png-libart");
made_conversions |= do_convert(in_file_name, out_file_name, ef,
size, show_layers);
diff --git a/app/display.c b/app/display.c
index db4bd73e..7dc3c4a2 100644
--- a/app/display.c
+++ b/app/display.c
@@ -1091,44 +1091,6 @@ ddisplay_get_clicked_position(DDisplay *ddisp)
return ddisp->clicked_position;
}
-
-/**
- * Kind of dirty way to initialize an anti-aliased renderer, maybe there
- * should be some plug-in interface to do this.
- * With the Libart renderer being a deprecated plug-in and the cairo renderer
- * offering a lot of features including proper highlighting it seems reasonable
- * to have default at cairo, although you loose a lot when it is switched off ;)
- */
-static DiaRenderer *
-new_aa_renderer (DDisplay *ddisp)
-{
- GType renderer_type;
-
- renderer_type = g_type_from_name ("DiaCairoInteractiveRenderer");
- if (renderer_type) {
- DiaRenderer *renderer = g_object_new(renderer_type, NULL);
- g_object_set (renderer,
- "zoom", &ddisp->zoom_factor,
- "rect", &ddisp->visible,
- NULL);
- return renderer;
- }
-
- renderer_type = g_type_from_name ("DiaLibartRenderer");
- if (renderer_type) {
- DiaRenderer *renderer = g_object_new(renderer_type, NULL);
- g_object_set (renderer,
- "transform", dia_transform_new (&ddisp->visible, &ddisp->zoom_factor),
- NULL);
- return renderer;
- }
-
- /* we really should not come here but instead disable the menu command earlier */
- message_warning (_("No antialiased renderer found"));
- /* fallback: built-in libart renderer */
- return dia_cairo_interactive_renderer_new ();
-}
-
void
ddisplay_set_renderer(DDisplay *ddisp, int aa_renderer)
{
@@ -1149,15 +1111,14 @@ ddisplay_set_renderer(DDisplay *ddisp, int aa_renderer)
width = ddisp->canvas->allocation.width;
height = ddisp->canvas->allocation.height;
- if (ddisp->aa_renderer){
- ddisp->renderer = new_aa_renderer (ddisp);
- } else {
- ddisp->renderer = dia_cairo_interactive_renderer_new();
- g_object_set (ddisp->renderer,
- "zoom", &ddisp->zoom_factor,
- "rect", &ddisp->visible,
- NULL);
+ if (!ddisp->aa_renderer){
+ g_message ("Only antialias renderers supported");
}
+ ddisp->renderer = dia_cairo_interactive_renderer_new ();
+ g_object_set (ddisp->renderer,
+ "zoom", &ddisp->zoom_factor,
+ "rect", &ddisp->visible,
+ NULL);
if (window)
dia_renderer_set_size(ddisp->renderer, window, width, height);
@@ -1168,15 +1129,14 @@ ddisplay_resize_canvas(DDisplay *ddisp,
int width, int height)
{
if (ddisp->renderer==NULL) {
- if (ddisp->aa_renderer) {
- ddisp->renderer = new_aa_renderer (ddisp);
- } else {
- ddisp->renderer = dia_cairo_interactive_renderer_new();
- g_object_set (ddisp->renderer,
- "zoom", &ddisp->zoom_factor,
- "rect", &ddisp->visible,
- NULL);
+ if (!ddisp->aa_renderer){
+ g_message ("Only antialias renderers supported");
}
+ ddisp->renderer = dia_cairo_interactive_renderer_new ();
+ g_object_set (ddisp->renderer,
+ "zoom", &ddisp->zoom_factor,
+ "rect", &ddisp->visible,
+ NULL);
}
dia_renderer_set_size(ddisp->renderer, gtk_widget_get_window(ddisp->canvas), width, height);
@@ -1343,7 +1303,7 @@ display_update_menu_state(DDisplay *ddisp)
antialiased = GTK_TOGGLE_ACTION (menus_get_action ("ViewAntialiased"));
gtk_action_set_sensitive (menus_get_action ("ViewAntialiased"),
- g_type_from_name ("DiaCairoInteractiveRenderer") != 0 || g_type_from_name
("DiaLibartRenderer") != 0);
+ g_type_from_name ("DiaCairoInteractiveRenderer") != 0);
ddisplay_do_update_menu_sensitivity (ddisp);
diff --git a/app/makefile.mingw b/app/makefile.mingw
index fd4373f7..aa24a1ce 100644
--- a/app/makefile.mingw
+++ b/app/makefile.mingw
@@ -8,18 +8,16 @@ PRJ_TOP = ..
PACKAGE = dia
include $(TOP)/glib/build/win32/make.mingw
-LIBART = $(TOP)/libart_lgpl
-
# -DHAVE_LIBPNG
PKG_CFLAGS = -DHAVE_CONFIG_H \
-fno-exceptions \
-I.. $(GLIB_CFLAGS) $(GTK2_CFLAGS) \
$(LIBXML2_CFLAGS) $(PNG_CFLAGS) \
- -I$(PRJ_TOP)/lib -I$(LIBART)/.. -DHAVE_LIBART
+ -I$(PRJ_TOP)/lib
PKG_LINK = $(GLIB_LIBS) $(GTK2_LIBS) $(PANGO_LIBS) \
$(LIBXML2_LIBS) $(PNG_LIBS) \
- -L $(PRJ_TOP)/lib -llibdia -L $(LIBART) -llibart \
+ -L $(PRJ_TOP)/lib -llibdia \
OBJECTS = \
autosave.o \
@@ -70,7 +68,6 @@ OBJECTS = \
properties-dialog.o \
recent_files.o \
render_eps.o \
- render_libart.o \
render_pixmap.o \
scroll_tool.o \
select.o \
diff --git a/bindings/Makefile.am b/bindings/Makefile.am
index 162c75a0..3d9d316d 100644
--- a/bindings/Makefile.am
+++ b/bindings/Makefile.am
@@ -86,7 +86,7 @@ dia-python.cpp : $(INTERFACES)
echo /* No SWIG */ > $@
endif
-GCCXMLINC = -I.. -I../lib -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/libxml2 -I/usr/include/libart-2.0 -I/usr/include/python2.5 -I/usr/include/libxml2
+GCCXMLINC = -I.. -I../lib -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/libxml2 -I/usr/include/python2.5 -I/usr/include/libxml2
$(srcdir)/dia-object.xml : $(INTERFACES)
gccxml --gccxml-cxxflags '$(GTK_CFLAGS) $(XML_CFLAGS)' -I$(top_srcdir) -I ../lib dia-object.cpp
-fxml=$@
diff --git a/config.h.win32 b/config.h.win32
index 89801cbf..c9996d1d 100644
--- a/config.h.win32
+++ b/config.h.win32
@@ -16,10 +16,6 @@
/* NOT: #define LOCALEDIR "../lib/locale" */
/* some non critical defines */
-#if 0
-#define HAVE_LIBART
-#define HAVE_LIBPNG
-#endif
#define HAVE_LIBZ
#define VERSION "0.97+git"
diff --git a/configure.ac b/configure.ac
index 72740c9d..95bfcf77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,13 +100,6 @@ AM_CONDITIONAL(WITH_FREETYPE, test "x$with_freetype" != "xno")
CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
-dnl Try for libart
-PKG_CHECK_MODULES(LIBART,libart-2.0,have_libart=yes,have_libart=no)
-if test "$have_libart" = "yes" ; then
- GTK_MODULES="$GTK_MODULES libart-2.0"
- AC_DEFINE(HAVE_LIBART,1,[Define if building with LIBART support])
-fi
-
dnl Try for poppler
PKG_CHECK_MODULES(POPPLER,poppler,have_poppler=yes,have_poppler=no)
if test "$have_poppler" = "yes" ; then
@@ -650,7 +643,6 @@ plug-ins/drs/Makefile
plug-ins/dxf/Makefile
plug-ins/hpgl/Makefile
plug-ins/layout/Makefile
-plug-ins/libart/Makefile
plug-ins/metapost/Makefile
plug-ins/pixbuf/Makefile
plug-ins/postscript/Makefile
@@ -713,7 +705,6 @@ Configuration:
can C++: ${cxx_ok}
Python support: ${with_python}
- Libart support (PNG export): ${have_libart}
Dia Python bindings with SWIG ${with_swig}
PDF import with poppler (experimental) ${have_poppler}
WMF plug-in with libEMF: ${emf_ok}
diff --git a/lib/Makefile.am b/lib/Makefile.am
index b6bd8dc0..ceb526fd 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -239,7 +239,6 @@ endif
libdia_la_LIBADD = $(GTK_LIBS)
AM_CPPFLAGS = \
- $(LIBART_CFLAGS) \
-DLIBDIA_COMPILATION \
-DLIBDIR=\"$(libdir)\" \
-DDATADIR=\"$(pkgdatadir)\" \
@@ -251,7 +250,7 @@ sheetdir = $(pkgdatadir)/sheets
AM_CPPFLAGS += -I$(top_srcdir)/intl $(DEBUG_FLAGS) $(GDK_PIXBUF_CFLAGS) \
$(XML_CFLAGS) $(GTK_CFLAGS) \
-DDIA_SHEETDIR=\"$(sheetdir)\" \
- $(PANGOFT2_CFLAGS) $(LIBART_CFLAGS) $(UNICODE_CFLAGS)
+ $(PANGOFT2_CFLAGS) $(UNICODE_CFLAGS)
libdia_la_extra_sources = diamarshal.list
diff --git a/lib/makefile.mingw b/lib/makefile.mingw
index fe62690d..c5dc2ab3 100644
--- a/lib/makefile.mingw
+++ b/lib/makefile.mingw
@@ -13,7 +13,6 @@ PKG_CFLAGS = -I .. \
$(GTK2_CFLAGS) \
-DWIN32 $(LIBXML2_CFLAGS) \
$(ZLIB_CFLAGS) \
- -I $(LIBART)/.. \
$(INTL_CFLAGS) \
-DLIBDIA_COMPILATION
@@ -42,7 +41,6 @@ OBJECTS = \
diagdkrenderer.o \
diagtkfontsel.o \
diainteractiverenderer.o \
- dialibartrenderer.o \
diarenderer.o \
diatransform.o \
dynamic_obj.o \
diff --git a/makefile.msc b/makefile.msc
index 94fedec0..b15a5cc8 100644
--- a/makefile.msc
+++ b/makefile.msc
@@ -8,7 +8,6 @@ full: build \
build\win32\bin\diaw.exe \
build\win32\bin\dia-app.dll \
build\win32\bin\libdia.dll \
- build\win32\bin\libart_lgpl_2-2.dll \
# build\win32\bin\libfontconfig-1.dll \
build\win32\bin\libgtk-win32-2.0-0.dll \
build\win32\bin\libxml2.dll \
@@ -29,7 +28,6 @@ full: build \
build\win32\dia\istar.dll \
build\win32\dia\jackson.dll \
build\win32\dia\kaos.dll \
- build\win32\dia\libart.dll \
build\win32\dia\misc.dll \
build\win32\dia\network.dll \
build\win32\dia\sadt.dll \
@@ -114,9 +112,6 @@ build\win32\bin\diaw.exe: build\win32\bin app\diaw.exe
build\win32\bin\dia-app.dll: build\win32\bin app\dia-app.dll
copy app\dia-app.dll build\win32\bin\dia-app.dll
-
-build\win32\bin\libart_lgpl_2-2.dll: build\win32\bin ..\bin\libart_lgpl_2-2.dll
- copy ..\bin\libart_lgpl_2-2.dll build\win32\bin
build\win32\bin\libfontconfig-1.dll: build\win32\bin ..\bin\libfontconfig-1.dll
copy ..\bin\libfontconfig-1.dll build\win32\bin
@@ -178,9 +173,6 @@ build\win32\dia\jackson.dll: build\win32\dia objects\Jackson\jackson.dll
build\win32\dia\kaos.dll: build\win32\dia objects\KAOS\kaos.dll
copy objects\KAOS\kaos.dll build\win32\dia
-build\win32\dia\libart.dll: build\win32\dia plug-ins\libart\libart.dll
- copy plug-ins\libart\libart.dll build\win32\dia
-
build\win32\dia\misc.dll: build\win32\dia objects\Misc\misc.dll
copy objects\Misc\misc.dll build\win32\dia
diff --git a/plug-ins/Makefile.am b/plug-ins/Makefile.am
index 707fae8b..5b68ecbf 100644
--- a/plug-ins/Makefile.am
+++ b/plug-ins/Makefile.am
@@ -1,6 +1,6 @@
# Remember to also add subdirs in configure.in
SUBDIRS = cgm cairo pstricks hpgl wpg svg shape dxf python xfig \
- wmf libart metapost xslt pixbuf pgf vdx postscript \
+ wmf metapost xslt pixbuf pgf vdx postscript \
drs stress layout pdf
EXTRA_DIST = \
diff --git a/plug-ins/makefile.msc b/plug-ins/makefile.msc
index de2c755b..12522227 100644
--- a/plug-ins/makefile.msc
+++ b/plug-ins/makefile.msc
@@ -1,7 +1,7 @@
!IFNDEF PACKAGE
# dummy sissi
-PLUGINS = cairo cgm dxf hpgl libart metapost pgf pixbuf \
+PLUGINS = cairo cgm dxf hpgl metapost pgf pixbuf \
postscript pstricks shape svg vdx wmf wpg xfig xslt \
drs stress layout pdf
@@ -93,16 +93,6 @@ OBJECTS = \
layout.obj
!ENDIF
-!IFDEF OBJ_libart
-DEPCFLAGS = -DHAVE_LIBART -DHAVE_LIBPNG $(LIBART_CFLAGS) $(PNG_CFLAGS)
-PKG_LINK = $(PKG_LINK) $(LIBART_LIBS) $(PNG_LIBS) ..\..\app\dia-app.lib
-OBJECTS = \
- dialibart.obj \
- export_png.obj \
- render_libart.obj \
- dialibartrenderer.obj
-!ENDIF
-
!IFDEF OBJ_metapost
OBJECTS = \
metapost.obj \
diff --git a/plug-ins/python/Makefile.am b/plug-ins/python/Makefile.am
index b9f2a620..f210c3ca 100644
--- a/plug-ins/python/Makefile.am
+++ b/plug-ins/python/Makefile.am
@@ -4,7 +4,6 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/lib \
$(DEBUG_FLAGS) \
$(GTK_CFLAGS) \
- $(LIBART_CFLAGS) \
$(PYTHON_INCLUDES) \
$(XML_CFLAGS) $(UNICODE_CFLAGS)
diff --git a/plug-ins/shape/shape-export.c b/plug-ins/shape/shape-export.c
index e99ae053..ffd64ceb 100644
--- a/plug-ins/shape/shape-export.c
+++ b/plug-ins/shape/shape-export.c
@@ -626,11 +626,7 @@ export_shape(DiagramData *data, DiaContext *ctx,
point = g_strndup(filename, i);
png_filename = g_strdup_printf("%s.png",point);
g_free(point);
- /* we are especially requesting the libart/png cause it is the only one with the size-hack */
- exportfilter = filter_export_get_by_name ("png-libart");
- /* ... but the code below does not use the size-hack anymore ... */
- if (!exportfilter)
- exportfilter = filter_guess_export_filter(png_filename);
+ exportfilter = filter_guess_export_filter(png_filename);
if (!exportfilter) {
dia_context_add_message(ctx, _("Can't export PNG icon without export plugin!"));
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 9eda3013..136add3c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -206,10 +206,6 @@ plug-ins/dxf/dxf-export.c
plug-ins/dxf/dxf-import.c
plug-ins/hpgl/hpgl.c
plug-ins/layout/layout.cpp
-plug-ins/libart/dialibart.c
-plug-ins/libart/dialibartrenderer.c
-plug-ins/libart/export_png.c
-plug-ins/libart/render_libart.c
plug-ins/metapost/metapost.c
plug-ins/metapost/render_metapost.c
plug-ins/pdf/pdf.c
diff --git a/tests/exports/Makefile.am b/tests/exports/Makefile.am
index ce406146..c805fe08 100644
--- a/tests/exports/Makefile.am
+++ b/tests/exports/Makefile.am
@@ -1,4 +1,4 @@
-EXPORT_PLUGINS=cgm dxf eps eps-builtin eps-pango fig mp plt hpgl png png-libart pixbuf-png jpg shape svg tex
wpg
+EXPORT_PLUGINS=cgm dxf eps eps-builtin eps-pango fig mp plt hpgl png pixbuf-png jpg shape svg tex wpg
tests:
mkdir /tmp/dia-tests; \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]