gdk: drop mediaLib, nothing uses it any more
This commit is contained in:
parent
e782c550d5
commit
3d3969ab23
8 changed files with 1 additions and 235 deletions
|
|
@ -150,12 +150,6 @@
|
|||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if sys/sysinfo.h is available */
|
||||
/* #undef HAVE_SYS_SYSINFO_H */
|
||||
|
||||
/* Define to 1 if sys/systeminfo.h is available */
|
||||
/* #undef HAVE_SYS_SYSTEMINFO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
|
@ -280,12 +274,6 @@
|
|||
/* Whether to load modules via .la files rather than directly */
|
||||
/* #undef USE_LA_MODULES */
|
||||
|
||||
/* Define to 1 if medialib is available and should be used */
|
||||
/* #undef USE_MEDIALIB */
|
||||
|
||||
/* Define to 1 if medialib 2.5 is available */
|
||||
/* #undef USE_MEDIALIB25 */
|
||||
|
||||
/* Define to 1 if XXM is available and should be used */
|
||||
#ifndef _MSC_VER
|
||||
# define USE_MMX 1
|
||||
|
|
|
|||
32
configure.ac
32
configure.ac
|
|
@ -958,38 +958,6 @@ AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
|
|||
|
||||
AC_HEADER_SYS_WAIT
|
||||
|
||||
# Checks to see whether we should include mediaLib
|
||||
# support.
|
||||
#
|
||||
AC_CHECK_HEADER(sys/systeminfo.h,
|
||||
AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
|
||||
[Define to 1 if sys/systeminfo.h is available]))
|
||||
AC_CHECK_HEADER(sys/sysinfo.h,
|
||||
AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
|
||||
[Define to 1 if sys/sysinfo.h is available]))
|
||||
|
||||
AC_MSG_CHECKING(for mediaLib 2.3)
|
||||
use_mlib25=no
|
||||
# Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
|
||||
# patch requires.
|
||||
AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
|
||||
if test $use_mlib = yes; then
|
||||
AC_DEFINE(USE_MEDIALIB, 1,
|
||||
[Define to 1 if medialib is available and should be used])
|
||||
MEDIA_LIB=-lmlib
|
||||
|
||||
AC_MSG_CHECKING(for mediaLib 2.5)
|
||||
# Check for a mediaLib 2.5 function since that is what is needed for
|
||||
# gdk_rgb_convert integration.
|
||||
AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
|
||||
if test $use_mlib25 = yes; then
|
||||
AC_DEFINE(USE_MEDIALIB25, 1,
|
||||
[Define to 1 if medialib 2.5 is available])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
|
||||
AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
|
||||
|
||||
dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
|
||||
|
||||
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
|
||||
|
|
|
|||
|
|
@ -34,13 +34,6 @@ created in grayscale and direct color modes, and the visual is changed
|
|||
in cases where a "better" visual than the default is available.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If GDK is built with the Sun mediaLib library, the GdkRGB functions are
|
||||
accelerated using mediaLib, which provides hardware acceleration on Intel,
|
||||
AMD, and Sparc chipsets. If desired, mediaLib support can be turned off
|
||||
by setting the GDK_DISABLE_MEDIALIB environment variable.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>A simple example program using GdkRGB</title>
|
||||
<programlisting>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ EXTRA_DIST += \
|
|||
gdkkeysyms-update.pl \
|
||||
gdk.def \
|
||||
gdkmarshalers.list \
|
||||
gdkmedialib.h \
|
||||
gdkwindowimpl.h \
|
||||
makeenums.pl \
|
||||
makefile.msc \
|
||||
|
|
@ -59,13 +58,6 @@ LDADD = \
|
|||
$(no_undefined) \
|
||||
$(LIBTOOL_EXPORT_OPTIONS)
|
||||
|
||||
if USE_MEDIALIB
|
||||
medialib_sources = \
|
||||
gdkmedialib.c
|
||||
else
|
||||
medialib_sources =
|
||||
endif
|
||||
|
||||
#
|
||||
# setup source file variables
|
||||
#
|
||||
|
|
@ -119,7 +111,6 @@ gdk_private_headers = \
|
|||
gdkregion-generic.h
|
||||
|
||||
gdk_c_sources = \
|
||||
$(medialib_sources) \
|
||||
gdk.c \
|
||||
gdkapplaunchcontext.c \
|
||||
gdkcairo.c \
|
||||
|
|
@ -477,7 +468,7 @@ INTROSPECTION_INTERMEDIATE_ITEMS = \
|
|||
$(top_builddir)/build/win32/Gdk-2.0.gir.msvc.introspect \
|
||||
$(top_builddir)/build/win32/Gdk_2_0_gir_list
|
||||
|
||||
Gdk_2_0_gir_MSVC_FILES = $(filter-out gdkmedialib.c, $(base_introspection_files))
|
||||
Gdk_2_0_gir_MSVC_FILES = $(base_introspection_files)
|
||||
Gdk_2_0_gir_MSVC_EXPORT_PACKAGES = $(Gdk_2_0_gir_EXPORT_PACKAGES)
|
||||
Gdk_2_0_gir_MSVC_INCLUDE_GIRS = $(Gdk_2_0_gir_INCLUDES)
|
||||
Gdk_2_0_gir_MSVC_LIBS = gdk-win32-2.0
|
||||
|
|
|
|||
|
|
@ -794,12 +794,6 @@ gdk_draw_image (GdkDrawable *drawable,
|
|||
* On older X servers, rendering pixbufs with an alpha channel involves round
|
||||
* trips to the X server, and may be somewhat slow.
|
||||
*
|
||||
* If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuf
|
||||
* function is accelerated using mediaLib, which provides hardware
|
||||
* acceleration on Intel, AMD, and Sparc chipsets. If desired, mediaLib
|
||||
* support can be turned off by setting the GDK_DISABLE_MEDIALIB environment
|
||||
* variable.
|
||||
*
|
||||
* Since: 2.2
|
||||
*
|
||||
* Deprecated: 2.22: Use gdk_cairo_set_source_pixbuf() and cairo_paint() or
|
||||
|
|
|
|||
|
|
@ -33,9 +33,6 @@
|
|||
#include <gdk/gdktypes.h>
|
||||
#include <gdk/gdkwindow.h>
|
||||
#include <gdk/gdkprivate.h>
|
||||
#ifdef USE_MEDIALIB
|
||||
#include <gdk/gdkmedialib.h>
|
||||
#endif
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
|
|||
|
|
@ -1,120 +0,0 @@
|
|||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 2001-2007 Sun Microsystems, Inc. All rights reserved.
|
||||
* (Brian Cameron, Dmitriy Demin, James Cheng, Padraig O'Briain)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2007. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_SYSTEMINFO_H)
|
||||
#include <sys/systeminfo.h>
|
||||
#elif defined(HAVE_SYS_SYSINFO_H)
|
||||
#include <sys/sysinfo.h>
|
||||
#endif
|
||||
|
||||
#include "gdkmedialib.h"
|
||||
|
||||
typedef char * (*ml_version) (void);
|
||||
|
||||
static ml_version medialib_version = mlib_version;
|
||||
|
||||
gboolean
|
||||
_gdk_use_medialib (void)
|
||||
{
|
||||
char *mlib_version_string;
|
||||
char sys_info[257];
|
||||
long count;
|
||||
|
||||
/*
|
||||
* Sun mediaLib(tm) support.
|
||||
*
|
||||
* http://www.sun.com/processors/vis/mlib.html
|
||||
*
|
||||
*/
|
||||
if (getenv ("GDK_DISABLE_MEDIALIB"))
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
* The imaging functions we want to use were added in mediaLib version 2.
|
||||
* So turn off mediaLib support if the user has an older version.
|
||||
* mlib_version returns a string in this format:
|
||||
*
|
||||
* mediaLib:0210:20011101:v8plusa
|
||||
* ^^^^^^^^ ^^^^ ^^^^^^^^ ^^^^^^^
|
||||
* libname vers build ISALIST identifier
|
||||
* date (in this case sparcv8plus+vis)
|
||||
*
|
||||
* The first 2 digits of the version are the major version. The 3rd digit
|
||||
* is the minor version, and the 4th digit is the micro version. So the
|
||||
* above string corresponds to version 2.1.0.In the following test we only
|
||||
* care about the major version.
|
||||
*/
|
||||
mlib_version_string = medialib_version ();
|
||||
|
||||
count = sysinfo (SI_ARCHITECTURE, &sys_info[0], 257);
|
||||
|
||||
if (count != -1)
|
||||
{
|
||||
if (strcmp (sys_info, "i386") == 0)
|
||||
{
|
||||
char *mlib_target_isa = &mlib_version_string[23];
|
||||
|
||||
/*
|
||||
* For x86 processors mediaLib generic C implementation
|
||||
* does not give any performance advantage so disable it.
|
||||
*/
|
||||
if (strncmp (mlib_target_isa, "sse", 3) != 0)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* For x86 processors use of libumem conflicts with
|
||||
* mediaLib, so avoid using it.
|
||||
*/
|
||||
if (dlsym (RTLD_PROBE, "umem_alloc") != NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Failed to get system architecture, disable mediaLib */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 2001-2007 Sun Microsystems, Inc. All rights reserved.
|
||||
* (Brian Cameron, Dmitriy Demin, James Cheng, Padraig O'Briain)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_MEDIALIB_H__
|
||||
#define __GDK_MEDIALIB_H__
|
||||
|
||||
#ifdef USE_MEDIALIB
|
||||
#include <mlib_image.h>
|
||||
#include <mlib_video.h>
|
||||
|
||||
#include <gdktypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
gboolean _gdk_use_medialib (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* USE_MEDIALIB */
|
||||
#endif /* __GDK_MEDIALIB_H__ */
|
||||
|
||||
Loading…
Reference in a new issue