forked from enlightenment/efl
parent
9c88e07f13
commit
6e452edfd4
|
@ -160,6 +160,7 @@ ecore_con_url_new(const char *url)
|
|||
*/
|
||||
curl_easy_setopt(url_con->curl_easy, CURLOPT_CONNECTTIMEOUT, 30);
|
||||
curl_easy_setopt(url_con->curl_easy, CURLOPT_TIMEOUT, 300);
|
||||
curl_easy_setopt(url_con->curl_easy, CURLOPT_FOLLOWLOCATION, 1);
|
||||
|
||||
return url_con;
|
||||
#else
|
||||
|
@ -233,10 +234,6 @@ ecore_con_url_send(Ecore_Con_Url *url_con, void *data, size_t length, char *cont
|
|||
sprintf(tmp, "Content-length: %d", length);
|
||||
url_con->headers = curl_slist_append(url_con->headers, tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDS, NULL);
|
||||
}
|
||||
|
||||
curl_easy_setopt(url_con->curl_easy, CURLOPT_HTTPHEADER, url_con->headers);
|
||||
|
||||
|
|
|
@ -19,15 +19,28 @@ AC_FUNC_ALLOCA
|
|||
|
||||
AC_CHECK_FUNCS(gettimeofday)
|
||||
|
||||
create_shared_lib=""
|
||||
case "$host_os" in
|
||||
mingw|mingw32)
|
||||
create_shared_lib="-no-undefined "
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(create_shared_lib)
|
||||
|
||||
AC_CHECK_HEADERS(fnmatch.h,, AC_MSG_ERROR([Cannot find fnmatch.h. Make sure your CFLAGS environment variable contains include lines for the location of this file]))
|
||||
|
||||
fnmatch_libs=""
|
||||
AC_CHECK_FUNCS(fnmatch, res=yes, res=no)
|
||||
if test "x$res" = "xno"; then
|
||||
AC_CHECK_LIB(fnmatch, fnmatch, res=yes, res=no)
|
||||
AC_CHECK_LIB(fnmatch, fnmatch, res=yes fnmatch_libs="-lfnmatch", res=no)
|
||||
dnl Test for compilation with MinGW.
|
||||
dnl fnmatch function is in the libiberty library
|
||||
if test "x$res" = "xno"; then
|
||||
AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch])
|
||||
else
|
||||
fnmatch_libs="-lfnmatch"
|
||||
AC_CHECK_LIB(iberty, fnmatch, res=yes fnmatch_libs="-liberty", res=no)
|
||||
fi
|
||||
if test "x$res" = "xno"; then
|
||||
AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch, nor libiberty])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -11,18 +11,218 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/param.h>
|
||||
#include <dlfcn.h>
|
||||
#include <math.h>
|
||||
#include <fnmatch.h>
|
||||
#include <limits.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include <dirent.h>
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#else
|
||||
#include <dlfcn.h> /* dlopen,dlclose,etc */
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <glob.h>
|
||||
#endif /* WIN32 */
|
||||
|
||||
#include "embryo_cc_prefix.h"
|
||||
|
||||
/* FIXME: that hack is a temporary one. That code will be in MinGW soon */
|
||||
#ifdef WIN32
|
||||
|
||||
#define RTLD_LAZY 1 /* lazy function call binding */
|
||||
#define RTLD_NOW 2 /* immediate function call binding */
|
||||
#define RTLD_GLOBAL 4 /* symbols in this dlopen'ed obj are visible
|
||||
to other dlopen'ed objs */
|
||||
|
||||
static char *dlerr_ptr;
|
||||
static char dlerr_data[80];
|
||||
|
||||
void *dlopen (const char *file, int mode)
|
||||
{
|
||||
HMODULE hmodule;
|
||||
|
||||
hmodule = LoadLibrary(file);
|
||||
if (hmodule == NULL) {
|
||||
int error;
|
||||
|
||||
error = GetLastError();
|
||||
sprintf(dlerr_data, "LoadLibraryEx returned %d.", error);
|
||||
dlerr_ptr = dlerr_data;
|
||||
}
|
||||
return hmodule;
|
||||
}
|
||||
|
||||
int dlclose (void *handle)
|
||||
{
|
||||
if (FreeLibrary(handle)) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
int error;
|
||||
|
||||
error = GetLastError();
|
||||
sprintf(dlerr_data, "FreeLibrary returned %d.", error);
|
||||
dlerr_ptr = dlerr_data;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
void *dlsym (void *handle, const char *name)
|
||||
{
|
||||
FARPROC fp;
|
||||
|
||||
fp = GetProcAddress(handle, name);
|
||||
if (fp == NULL) {
|
||||
int error;
|
||||
|
||||
error = GetLastError();
|
||||
sprintf(dlerr_data, "GetProcAddress returned %d.", error);
|
||||
dlerr_ptr = dlerr_data;
|
||||
}
|
||||
return fp;
|
||||
}
|
||||
|
||||
char *dlerror (void)
|
||||
{
|
||||
if (dlerr_ptr != NULL) {
|
||||
dlerr_ptr = NULL;
|
||||
return dlerr_data;
|
||||
}
|
||||
else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
char *realpath(const char *path, char resolved_path[PATH_MAX])
|
||||
{
|
||||
char *return_path = 0;
|
||||
|
||||
if (path) //Else EINVAL
|
||||
{
|
||||
if (resolved_path)
|
||||
{
|
||||
return_path = resolved_path;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Non standard extension that glibc uses
|
||||
return_path = malloc(PATH_MAX);
|
||||
}
|
||||
|
||||
if (return_path) //Else EINVAL
|
||||
{
|
||||
//This is a Win32 API function similar to what realpath() is supposed to do
|
||||
size_t size = GetFullPathNameA(path, PATH_MAX, return_path, 0);
|
||||
|
||||
//GetFullPathNameA() returns a size larger than buffer if buffer is too small
|
||||
if (size > PATH_MAX)
|
||||
{
|
||||
if (return_path != resolved_path) //Malloc'd buffer - Unstandard extension retry
|
||||
{
|
||||
size_t new_size;
|
||||
|
||||
free(return_path);
|
||||
return_path = malloc(size);
|
||||
|
||||
if (return_path)
|
||||
{
|
||||
new_size = GetFullPathNameA(path, size, return_path, 0); //Try again
|
||||
|
||||
if (new_size > size) //If it's still too large, we have a problem, don't try again
|
||||
{
|
||||
free(return_path);
|
||||
return_path = 0;
|
||||
errno = ENAMETOOLONG;
|
||||
}
|
||||
else
|
||||
{
|
||||
size = new_size;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//I wasn't sure what to return here, but the standard does say to return EINVAL
|
||||
//if resolved_path is null, and in this case we couldn't malloc large enough buffer
|
||||
errno = EINVAL;
|
||||
}
|
||||
}
|
||||
else //resolved_path buffer isn't big enough
|
||||
{
|
||||
return_path = 0;
|
||||
errno = ENAMETOOLONG;
|
||||
}
|
||||
}
|
||||
|
||||
//GetFullPathNameA() returns 0 if some path resolve problem occured
|
||||
if (!size)
|
||||
{
|
||||
if (return_path != resolved_path) //Malloc'd buffer
|
||||
{
|
||||
free(return_path);
|
||||
}
|
||||
|
||||
return_path = 0;
|
||||
|
||||
//Convert MS errors into standard errors
|
||||
switch (GetLastError())
|
||||
{
|
||||
case ERROR_FILE_NOT_FOUND:
|
||||
errno = ENOENT;
|
||||
break;
|
||||
|
||||
case ERROR_PATH_NOT_FOUND: case ERROR_INVALID_DRIVE:
|
||||
errno = ENOTDIR;
|
||||
break;
|
||||
|
||||
case ERROR_ACCESS_DENIED:
|
||||
errno = EACCES;
|
||||
break;
|
||||
|
||||
default: //Unknown Error
|
||||
errno = EIO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//If we get to here with a valid return_path, we're still doing good
|
||||
if (return_path)
|
||||
{
|
||||
struct stat stat_buffer;
|
||||
|
||||
//Make sure path exists, stat() returns 0 on success
|
||||
if (stat(return_path, &stat_buffer))
|
||||
{
|
||||
if (return_path != resolved_path)
|
||||
{
|
||||
free(return_path);
|
||||
}
|
||||
|
||||
return_path = 0;
|
||||
//stat() will set the correct errno for us
|
||||
}
|
||||
//else we succeeded!
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errno = EINVAL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errno = EINVAL;
|
||||
}
|
||||
|
||||
return return_path;
|
||||
}
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
/* local subsystem functions */
|
||||
static int _e_prefix_share_hunt(void);
|
||||
static int _e_prefix_fallbacks(void);
|
||||
|
|
|
@ -36,6 +36,12 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#ifdef WIN32
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#endif /* WIN32 */
|
||||
|
||||
#include "embryo_cc_osdefs.h"
|
||||
#include "embryo_cc_sc.h"
|
||||
#include "embryo_cc_prefix.h"
|
||||
|
@ -314,7 +320,16 @@ sc_compile(int argc, char *argv[])
|
|||
if (!tmpdir) tmpdir = "/tmp";
|
||||
|
||||
snprintf(outfname, _MAX_PATH, "%s/embryo_cc.asm-tmp-XXXXXX", tmpdir);
|
||||
#ifndef WIN32
|
||||
fd_out = mkstemp(outfname);
|
||||
#else
|
||||
if (mktemp (outfname))
|
||||
do
|
||||
fd_out = open (outfname, O_CREAT | O_EXCL, S_IREAD | S_IWRITE);
|
||||
while (!(fd_out == -1 && errno == EEXIST) && mktemp (outfname));
|
||||
else
|
||||
fd_out = -1;
|
||||
#endif /* WIN32 */
|
||||
if (fd_out < 0)
|
||||
error(101, outfname);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#ifdef EAPI
|
||||
#undef EAPI
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
#ifdef _MSC_VER
|
||||
# ifdef BUILDING_DLL
|
||||
# define EAPI __declspec(dllexport)
|
||||
# else
|
||||
|
|
|
@ -7,7 +7,6 @@ INCLUDES = -I. \
|
|||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src/lib \
|
||||
-I$(top_srcdir)/src/lib/include
|
||||
|
||||
|
||||
lib_LTLIBRARIES = libembryo.la
|
||||
include_HEADERS = Embryo.h
|
||||
|
@ -23,4 +22,4 @@ embryo_private.h
|
|||
|
||||
libembryo_la_LIBADD = -lm @fnmatch_libs@
|
||||
libembryo_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
libembryo_la_LDFLAGS = -version-info 9:1:9
|
||||
libembryo_la_LDFLAGS = @create_shared_lib@ -version-info 9:1:9
|
||||
|
|
|
@ -21,6 +21,14 @@ MODULE_ARCH="$host_os-$host_cpu"
|
|||
AC_SUBST(MODULE_ARCH)
|
||||
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
|
||||
|
||||
create_shared_lib=""
|
||||
case "$host_os" in
|
||||
mingw|mingw32)
|
||||
create_shared_lib="-no-undefined "
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(create_shared_lib)
|
||||
|
||||
if test "x${bindir}" = 'xNONE'; then
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
PACKAGE_BIN_DIR="${ac_default_prefix}/bin"
|
||||
|
@ -117,18 +125,24 @@ fi
|
|||
## dlopen
|
||||
|
||||
dlopen_libs=""
|
||||
AC_CHECK_FUNCS(dlopen, res=yes, res=no)
|
||||
if test "x$res" = "xyes"; then
|
||||
AC_CHECK_FUNCS(dladdr, AC_DEFINE(HAVE_DLADDR))
|
||||
else
|
||||
AC_CHECK_LIB(dl, dlopen, res=yes, res=no)
|
||||
if test "x$res" = "xyes"; then
|
||||
AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
|
||||
dlopen_libs=-ldl
|
||||
else
|
||||
AC_MSG_ERROR(Cannot find dlopen)
|
||||
fi
|
||||
fi
|
||||
case "$host_os" in
|
||||
mingw|mingw32)
|
||||
AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR(Cannot find windows.h)])
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_FUNCS(dlopen, res=yes, res=no)
|
||||
if test "x$res" = "xyes"; then
|
||||
AC_CHECK_FUNCS(dladdr, AC_DEFINE(HAVE_DLADDR))
|
||||
else
|
||||
AC_CHECK_LIB(dl, dlopen, res=yes, res=no)
|
||||
if test "x$res" = "xyes"; then
|
||||
AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
|
||||
dlopen_libs=-ldl
|
||||
else
|
||||
AC_MSG_ERROR(Cannot find dlopen)
|
||||
fi
|
||||
fi
|
||||
esac
|
||||
AC_SUBST(dlopen_libs)
|
||||
|
||||
#####################################################################
|
||||
|
@ -715,6 +729,14 @@ AC_CHECK_HEADER(jpeglib.h,
|
|||
[ have_jpeg="no" ]
|
||||
)
|
||||
AC_MSG_CHECKING(whether to enable jpeg image loader)
|
||||
dnl Windows has no sigsetjmp function, nor equivalent.
|
||||
dnl So we disable the jpeg saver.
|
||||
have_jpeg_saver="yes"
|
||||
case "$host_os" in
|
||||
mingw|mingw32)
|
||||
have_jpeg_saver="no"
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE(image-loader-jpeg,
|
||||
[ --enable-image-loader-jpeg enable JPEG image loader], [
|
||||
if test x"$enableval" = x"yes" ; then
|
||||
|
@ -741,6 +763,7 @@ if test "x$have_jpeg" = "xyes"; then
|
|||
fi
|
||||
|
||||
AM_CONDITIONAL(BUILD_LOADER_JPEG, test x$have_jpeg = xyes)
|
||||
AM_CONDITIONAL(BUILD_SAVER_JPEG, test x$have_jpeg_saver = xyes)
|
||||
|
||||
#######################################
|
||||
## EET
|
||||
|
@ -1444,12 +1467,12 @@ AC_ARG_ENABLE(convert-8-rgb-111,
|
|||
## Convert to 16bpp RGB 565
|
||||
conv_16_rgb_565="no"
|
||||
conv_16_rgb_565="yes"
|
||||
AC_MSG_CHECKING(whether to build 16bpp 565 converter code)
|
||||
AC_MSG_CHECKING(whether to build 16bpp 565 rgb converter code)
|
||||
AC_ARG_ENABLE(convert-16-rgb-565,
|
||||
[ --enable-convert-16-rgb-565 enable 16bpp 565 converter code], [
|
||||
[ --enable-convert-16-rgb-565 enable 16bpp rgb 565 converter code], [
|
||||
if test x"$enableval" = x"yes" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(BUILD_CONVERT_16_RGB_565, 1, [16bpp 565 Converter Support])
|
||||
AC_DEFINE(BUILD_CONVERT_16_RGB_565, 1, [16bpp RGB 565 Converter Support])
|
||||
conv_16_rgb_565="yes"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
|
@ -1458,7 +1481,30 @@ AC_ARG_ENABLE(convert-16-rgb-565,
|
|||
], [
|
||||
AC_MSG_RESULT($conv_16_rgb_565)
|
||||
if test x"$conv_16_rgb_565" = x"yes" ; then
|
||||
AC_DEFINE(BUILD_CONVERT_16_RGB_565, 1, [16bpp 565 Converter Support])
|
||||
AC_DEFINE(BUILD_CONVERT_16_RGB_565, 1, [16bpp RGB 565 Converter Support])
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
#######################################
|
||||
## Convert to 16bpp BGR 565
|
||||
conv_16_bgr_565="no"
|
||||
conv_16_bgr_565="yes"
|
||||
AC_MSG_CHECKING(whether to build 16bpp 565 bgr converter code)
|
||||
AC_ARG_ENABLE(convert-16-bgr-565,
|
||||
[ --enable-convert-16-bgr-565 enable 16bpp bgr 565 converter code], [
|
||||
if test x"$enableval" = x"yes" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(BUILD_CONVERT_16_BGR_565, 1, [16bpp BGR 565 Converter Support])
|
||||
conv_16_bgr_565="yes"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
conv_16_bgr_565="no"
|
||||
fi
|
||||
], [
|
||||
AC_MSG_RESULT($conv_16_bgr_565)
|
||||
if test x"$conv_16_bgr_565" = x"yes" ; then
|
||||
AC_DEFINE(BUILD_CONVERT_16_BGR_565, 1, [16bpp BGR 565 Converter Support])
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
@ -2020,6 +2066,7 @@ echo " 8bpp RGB 121............: $conv_8_rgb_121"
|
|||
echo " 8bpp RGB 111............: $conv_8_rgb_111"
|
||||
# FIXME: add grayscale and B&W support
|
||||
echo " 16bpp RGB 565...........: $conv_16_rgb_565"
|
||||
echo " 16bpp BGR 565...........: $conv_16_bgr_565"
|
||||
echo " 16bpp RGB 555...........: $conv_16_rgb_555"
|
||||
echo " 16bpp RGB 444...........: $conv_16_rgb_444"
|
||||
echo " 16bpp RGB 565 (444 ipaq): $conv_16_rgb_ipq"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#ifdef EAPI
|
||||
#undef EAPI
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
#ifdef _MSC_VER
|
||||
# ifdef BUILDING_DLL
|
||||
# define EAPI __declspec(dllexport)
|
||||
# else
|
||||
|
|
|
@ -40,4 +40,4 @@ libevas_la_DEPENDENCIES = \
|
|||
file/libevas_file.la \
|
||||
imaging/libevas_imaging.la \
|
||||
engines/common/libevas_engine_common.la
|
||||
libevas_la_LDFLAGS = -version-info 1:0:0
|
||||
libevas_la_LDFLAGS = @create_shared_lib@ -version-info 1:0:0
|
||||
|
|
|
@ -228,6 +228,38 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
#endif
|
||||
}
|
||||
#endif
|
||||
#ifdef BUILD_CONVERT_16_BGR_565
|
||||
if ((rmask == 0x0000001f) && (gmask == 0x000007e0) && (bmask == 0x0000f800))
|
||||
{
|
||||
#ifdef BUILD_CONVERT_16_RGB_ROT0
|
||||
if (rotation == 0)
|
||||
{
|
||||
if ((!(w & 0x1)) && (!((int)dest & 0x3)))
|
||||
return evas_common_convert_rgba2_to_16bpp_bgr_565_dith;
|
||||
else
|
||||
return evas_common_convert_rgba_to_16bpp_bgr_565_dith;
|
||||
}
|
||||
#endif
|
||||
#ifdef BUILD_CONVERT_16_RGB_ROT270
|
||||
if (rotation == 270)
|
||||
{
|
||||
if ((!(w & 0x1)) && (!((int)dest & 0x3)))
|
||||
return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270;
|
||||
else
|
||||
return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270;
|
||||
}
|
||||
#endif
|
||||
#ifdef BUILD_CONVERT_16_RGB_ROT90
|
||||
if (rotation == 90)
|
||||
{
|
||||
if ((!(w & 0x1)) && (!((int)dest & 0x3)))
|
||||
return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90;
|
||||
else
|
||||
return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#ifdef BUILD_CONVERT_16_RGB_555
|
||||
if ((rmask == 0x00007c00) && (gmask == 0x000003e0) && (bmask == 0x0000001f))
|
||||
{
|
||||
|
|
|
@ -264,6 +264,263 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst,
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_CONVERT_16_BGR_565
|
||||
#ifdef BUILD_CONVERT_16_RGB_ROT0
|
||||
void
|
||||
evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
|
||||
{
|
||||
DATA32 *src_ptr;
|
||||
DATA16 *dst_ptr;
|
||||
int x, y;
|
||||
DATA8 r1, g1, b1;
|
||||
DATA8 r2, g2, b2;
|
||||
DATA8 dith, dith2;
|
||||
|
||||
dst_ptr = (DATA16 *)dst;
|
||||
|
||||
CONVERT_LOOP2_START_ROT_0();
|
||||
|
||||
r1 = (R_VAL(src_ptr)) >> 3;
|
||||
g1 = (G_VAL(src_ptr)) >> 2;
|
||||
b1 = (B_VAL(src_ptr)) >> 3;
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
|
||||
if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
|
||||
if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
|
||||
if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
|
||||
CONVERT_LOOP2_INC_ROT_0();
|
||||
|
||||
r2 = (R_VAL(src_ptr)) >> 3;
|
||||
g2 = (G_VAL(src_ptr)) >> 2;
|
||||
b2 = (B_VAL(src_ptr)) >> 3;
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
|
||||
if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
|
||||
if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
|
||||
if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
|
||||
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
*((DATA32 *)dst_ptr) =
|
||||
(b2 << 27) | (g2 << 21) | (r2 << 16) |
|
||||
(b1 << 11) | (g1 << 5 ) | (r1 );
|
||||
#else
|
||||
*((DATA32 *)dst_ptr) =
|
||||
(b1 << 27) | (g1 << 21) | (r1 << 16) |
|
||||
(b2 << 11) | (g2 << 5 ) | (r2 );
|
||||
#endif
|
||||
|
||||
CONVERT_LOOP2_END_ROT_0();
|
||||
return;
|
||||
pal = 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_CONVERT_16_BGR_565
|
||||
#ifdef BUILD_CONVERT_16_RGB_ROT0
|
||||
void
|
||||
evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
|
||||
{
|
||||
DATA32 *src_ptr;
|
||||
DATA16 *dst_ptr;
|
||||
int x, y;
|
||||
DATA8 r, g, b;
|
||||
DATA8 dith, dith2;
|
||||
|
||||
dst_ptr = (DATA16 *)dst;
|
||||
|
||||
CONVERT_LOOP_START_ROT_0();
|
||||
|
||||
r = (R_VAL(src_ptr)) >> 3;
|
||||
g = (G_VAL(src_ptr)) >> 2;
|
||||
b = (B_VAL(src_ptr)) >> 3;
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
|
||||
if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
|
||||
if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
|
||||
if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
|
||||
|
||||
*dst_ptr = (b << 11) | (g << 5) | (r);
|
||||
|
||||
CONVERT_LOOP_END_ROT_0();
|
||||
return;
|
||||
pal = 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_CONVERT_16_BGR_565
|
||||
#ifdef BUILD_CONVERT_16_RGB_ROT270
|
||||
void
|
||||
evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
|
||||
{
|
||||
DATA32 *src_ptr;
|
||||
DATA16 *dst_ptr;
|
||||
int x, y;
|
||||
DATA8 r1, g1, b1;
|
||||
DATA8 r2, g2, b2;
|
||||
DATA8 dith, dith2;
|
||||
|
||||
dst_ptr = (DATA16 *)dst;
|
||||
|
||||
CONVERT_LOOP2_START_ROT_270();
|
||||
|
||||
r1 = (R_VAL(src_ptr)) >> 3;
|
||||
g1 = (G_VAL(src_ptr)) >> 2;
|
||||
b1 = (B_VAL(src_ptr)) >> 3;
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
|
||||
if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
|
||||
if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
|
||||
if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
|
||||
|
||||
CONVERT_LOOP2_INC_ROT_270();
|
||||
|
||||
r2 = (R_VAL(src_ptr)) >> 3;
|
||||
g2 = (G_VAL(src_ptr)) >> 2;
|
||||
b2 = (B_VAL(src_ptr)) >> 3;
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
|
||||
if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
|
||||
if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
|
||||
if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
|
||||
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
*((DATA32 *)dst_ptr) =
|
||||
(b2 << 27) | (g2 << 21) | (r2 << 16) |
|
||||
(b1 << 11) | (g1 << 5 ) | (r1 );
|
||||
#else
|
||||
*((DATA32 *)dst_ptr) =
|
||||
(b1 << 27) | (g1 << 21) | (r1 << 16) |
|
||||
(b2 << 11) | (g2 << 5 ) | (r2 );
|
||||
#endif
|
||||
|
||||
CONVERT_LOOP2_END_ROT_270();
|
||||
return;
|
||||
pal = 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_CONVERT_16_BGR_565
|
||||
#ifdef BUILD_CONVERT_16_RGB_ROT270
|
||||
void
|
||||
evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
|
||||
{
|
||||
DATA32 *src_ptr;
|
||||
DATA16 *dst_ptr;
|
||||
int x, y;
|
||||
DATA8 r, g, b;
|
||||
DATA8 dith, dith2;
|
||||
|
||||
dst_ptr = (DATA16 *)dst;
|
||||
|
||||
CONVERT_LOOP_START_ROT_270();
|
||||
|
||||
r = (R_VAL(src_ptr)) >> 3;
|
||||
g = (G_VAL(src_ptr)) >> 2;
|
||||
b = (B_VAL(src_ptr)) >> 3;
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
|
||||
if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
|
||||
if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
|
||||
if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
|
||||
|
||||
*dst_ptr = (b << 11) | (g << 5) | (r);
|
||||
|
||||
CONVERT_LOOP_END_ROT_270();
|
||||
return;
|
||||
pal = 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_CONVERT_16_BGR_565
|
||||
#ifdef BUILD_CONVERT_16_RGB_ROT90
|
||||
void
|
||||
evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
|
||||
{
|
||||
DATA32 *src_ptr;
|
||||
DATA16 *dst_ptr;
|
||||
int x, y;
|
||||
DATA8 r1, g1, b1;
|
||||
DATA8 r2, g2, b2;
|
||||
DATA8 dith, dith2;
|
||||
|
||||
dst_ptr = (DATA16 *)dst;
|
||||
|
||||
CONVERT_LOOP2_START_ROT_90();
|
||||
|
||||
r1 = (R_VAL(src_ptr)) >> 3;
|
||||
g1 = (G_VAL(src_ptr)) >> 2;
|
||||
b1 = (B_VAL(src_ptr)) >> 3;
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
|
||||
if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
|
||||
if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
|
||||
if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
|
||||
|
||||
CONVERT_LOOP2_INC_ROT_90();
|
||||
|
||||
r2 = (R_VAL(src_ptr)) >> 3;
|
||||
g2 = (G_VAL(src_ptr)) >> 2;
|
||||
b2 = (B_VAL(src_ptr)) >> 3;
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
|
||||
if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
|
||||
if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
|
||||
if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
|
||||
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
*((DATA32 *)dst_ptr) =
|
||||
(b2 << 27) | (g2 << 21) | (r2 << 16) |
|
||||
(b1 << 11) | (g1 << 5 ) | (r1 );
|
||||
#else
|
||||
*((DATA32 *)dst_ptr) =
|
||||
(b1 << 27) | (g1 << 21) | (r1 << 16) |
|
||||
(b2 << 11) | (g2 << 5 ) | (r2 );
|
||||
#endif
|
||||
|
||||
CONVERT_LOOP2_END_ROT_90();
|
||||
return;
|
||||
pal = 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_CONVERT_16_BGR_565
|
||||
#ifdef BUILD_CONVERT_16_RGB_ROT90
|
||||
void
|
||||
evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
|
||||
{
|
||||
DATA32 *src_ptr;
|
||||
DATA16 *dst_ptr;
|
||||
int x, y;
|
||||
DATA8 r, g, b;
|
||||
DATA8 dith, dith2;
|
||||
|
||||
dst_ptr = (DATA16 *)dst;
|
||||
|
||||
CONVERT_LOOP_START_ROT_90();
|
||||
|
||||
r = (R_VAL(src_ptr)) >> 3;
|
||||
g = (G_VAL(src_ptr)) >> 2;
|
||||
b = (B_VAL(src_ptr)) >> 3;
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
|
||||
if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
|
||||
if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
|
||||
if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
|
||||
|
||||
*dst_ptr = (b << 11) | (g << 5) | (r);
|
||||
|
||||
CONVERT_LOOP_END_ROT_90();
|
||||
return;
|
||||
pal = 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_CONVERT_16_RGB_444
|
||||
#ifdef BUILD_CONVERT_16_RGB_ROT0
|
||||
void
|
||||
|
|
|
@ -11,11 +11,86 @@
|
|||
#endif
|
||||
|
||||
#include <dirent.h> /* DIR, dirent */
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#else
|
||||
#include <dlfcn.h> /* dlopen,dlclose,etc */
|
||||
#endif
|
||||
|
||||
#include <evas_common.h>
|
||||
#include <evas_private.h>
|
||||
|
||||
/* FIXME: that hack is a temporary one. That code will be in MinGW soon */
|
||||
#ifdef _WIN32
|
||||
|
||||
#define RTLD_LAZY 1 /* lazy function call binding */
|
||||
#define RTLD_NOW 2 /* immediate function call binding */
|
||||
#define RTLD_GLOBAL 4 /* symbols in this dlopen'ed obj are visible
|
||||
to other dlopen'ed objs */
|
||||
|
||||
static char *dlerr_ptr;
|
||||
static char dlerr_data[80];
|
||||
|
||||
void *dlopen (const char *file, int mode)
|
||||
{
|
||||
HMODULE hmodule;
|
||||
|
||||
hmodule = LoadLibrary(file);
|
||||
if (hmodule == NULL) {
|
||||
int error;
|
||||
|
||||
error = GetLastError();
|
||||
sprintf(dlerr_data, "LoadLibraryEx returned %d.", error);
|
||||
dlerr_ptr = dlerr_data;
|
||||
}
|
||||
return hmodule;
|
||||
}
|
||||
|
||||
int dlclose (void *handle)
|
||||
{
|
||||
if (FreeLibrary(handle)) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
int error;
|
||||
|
||||
error = GetLastError();
|
||||
sprintf(dlerr_data, "FreeLibrary returned %d.", error);
|
||||
dlerr_ptr = dlerr_data;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
void *dlsym (void *handle, const char *name)
|
||||
{
|
||||
FARPROC fp;
|
||||
|
||||
fp = GetProcAddress(handle, name);
|
||||
if (fp == NULL) {
|
||||
int error;
|
||||
|
||||
error = GetLastError();
|
||||
sprintf(dlerr_data, "GetProcAddress returned %d.", error);
|
||||
dlerr_ptr = dlerr_data;
|
||||
}
|
||||
return fp;
|
||||
}
|
||||
|
||||
char *dlerror (void)
|
||||
{
|
||||
if (dlerr_ptr != NULL) {
|
||||
dlerr_ptr = NULL;
|
||||
return dlerr_data;
|
||||
}
|
||||
else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
Evas_List *evas_modules = NULL;
|
||||
static Evas_List *evas_module_paths = NULL;
|
||||
|
||||
|
|
|
@ -700,6 +700,8 @@ EAPI Gfx_Func_Convert evas_common_convert_func_get (DATA8 *dest, int w, int
|
|||
|
||||
void evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
|
@ -709,6 +711,8 @@ void evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DA
|
|||
|
||||
void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
|
@ -718,6 +722,8 @@ void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DA
|
|||
|
||||
void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
|
|
|
@ -15,7 +15,7 @@ evas_engine.c \
|
|||
evas_outbuf.c
|
||||
|
||||
module_la_LIBADD = $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
include_HEADERS = Evas_Engine_Buffer.h
|
||||
|
|
|
@ -80,6 +80,10 @@ static Evas_Func evas_engine_directfb_func = {
|
|||
evas_engine_directfb_image_draw,
|
||||
evas_engine_directfb_image_comment_get,
|
||||
evas_engine_directfb_image_format_get,
|
||||
evas_engine_directfb_image_colorspace_set,
|
||||
evas_engine_directfb_image_colorspace_get,
|
||||
evas_engine_directfb_image_native_set,
|
||||
evas_engine_directfb_image_native_get,
|
||||
|
||||
evas_engine_directfb_image_cache_flush,
|
||||
evas_engine_directfb_image_cache_set,
|
||||
|
@ -771,7 +775,7 @@ evas_engine_directfb_polygon_draw(void *data, void *context, void *surface, void
|
|||
*
|
||||
* */
|
||||
void *
|
||||
eng_gradient_new(void *data)
|
||||
evas_engine_directfb_gradient_new(void *data)
|
||||
{
|
||||
return evas_common_gradient_new();
|
||||
}
|
||||
|
@ -914,10 +918,10 @@ evas_engine_directfb_gradient_is_visible(void *data, void *context, void *gradie
|
|||
re = (Render_Engine *)data;
|
||||
if (!context || !gradient) return 0;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
eng_gradient_render_pre(void *data, void *context, void *gradient)
|
||||
void
|
||||
evas_engine_directfb_gradient_render_pre(void *data, void *context, void *gradient)
|
||||
{
|
||||
int len;
|
||||
Render_Engine *re;
|
||||
|
@ -930,8 +934,8 @@ eng_gradient_render_pre(void *data, void *context, void *gradient)
|
|||
evas_common_gradient_map(context, gradient, len);
|
||||
}
|
||||
|
||||
static void
|
||||
eng_gradient_render_post(void *data, void *gradient)
|
||||
void
|
||||
evas_engine_directfb_gradient_render_post(void *data, void *gradient)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -965,7 +969,7 @@ evas_engine_directfb_gradient_draw(void *data, void *context, void *surface, voi
|
|||
* */
|
||||
|
||||
void *
|
||||
evas_engine_directfb_font_load(void *data, char *name, int size)
|
||||
evas_engine_directfb_font_load(void *data, const char *name, int size)
|
||||
{
|
||||
Render_Engine *re;
|
||||
|
||||
|
@ -983,7 +987,7 @@ evas_engine_directfb_font_memory_load(void *data, char *name, int size, const vo
|
|||
}
|
||||
|
||||
void *
|
||||
evas_engine_directfb_font_add(void *data, void *font, char *name, int size)
|
||||
evas_engine_directfb_font_add(void *data, void *font, const char *name, int size)
|
||||
{
|
||||
Render_Engine *re;
|
||||
|
||||
|
@ -1047,7 +1051,7 @@ evas_engine_directfb_font_max_descent_get(void *data, void *font)
|
|||
}
|
||||
|
||||
void
|
||||
evas_engine_directfb_font_string_size_get(void *data, void *font, char *text,
|
||||
evas_engine_directfb_font_string_size_get(void *data, void *font, const char *text,
|
||||
int *w, int *h)
|
||||
{
|
||||
Render_Engine *re;
|
||||
|
@ -1057,7 +1061,7 @@ evas_engine_directfb_font_string_size_get(void *data, void *font, char *text,
|
|||
}
|
||||
|
||||
int
|
||||
evas_engine_directfb_font_inset_get(void *data, void *font, char *text)
|
||||
evas_engine_directfb_font_inset_get(void *data, void *font, const char *text)
|
||||
{
|
||||
Render_Engine *re;
|
||||
|
||||
|
@ -1066,7 +1070,7 @@ evas_engine_directfb_font_inset_get(void *data, void *font, char *text)
|
|||
}
|
||||
|
||||
int
|
||||
evas_engine_directfb_font_h_advance_get(void *data, void *font, char *text)
|
||||
evas_engine_directfb_font_h_advance_get(void *data, void *font, const char *text)
|
||||
{
|
||||
Render_Engine *re;
|
||||
int h, v;
|
||||
|
@ -1077,7 +1081,7 @@ evas_engine_directfb_font_h_advance_get(void *data, void *font, char *text)
|
|||
}
|
||||
|
||||
int
|
||||
evas_engine_directfb_font_v_advance_get(void *data, void *font, char *text)
|
||||
evas_engine_directfb_font_v_advance_get(void *data, void *font, const char *text)
|
||||
{
|
||||
Render_Engine *re;
|
||||
int h, v;
|
||||
|
@ -1088,7 +1092,7 @@ evas_engine_directfb_font_v_advance_get(void *data, void *font, char *text)
|
|||
}
|
||||
|
||||
int
|
||||
evas_engine_directfb_font_char_coords_get(void *data, void *font, char *text,
|
||||
evas_engine_directfb_font_char_coords_get(void *data, void *font, const char *text,
|
||||
int pos, int *cx, int *cy, int *cw,
|
||||
int *ch)
|
||||
{
|
||||
|
@ -1099,7 +1103,7 @@ evas_engine_directfb_font_char_coords_get(void *data, void *font, char *text,
|
|||
}
|
||||
|
||||
int
|
||||
evas_engine_directfb_font_char_at_coords_get(void *data, void *font, char *text,
|
||||
evas_engine_directfb_font_char_at_coords_get(void *data, void *font, const char *text,
|
||||
int x, int y, int *cx, int *cy,
|
||||
int *cw, int *ch)
|
||||
{
|
||||
|
@ -1112,7 +1116,7 @@ evas_engine_directfb_font_char_at_coords_get(void *data, void *font, char *text,
|
|||
void
|
||||
evas_engine_directfb_font_draw(void *data, void *context, void *surface,
|
||||
void *font, int x, int y, int w, int h, int ow,
|
||||
int oh, char *text)
|
||||
int oh, const char *text)
|
||||
{
|
||||
Render_Engine *re;
|
||||
void *p;
|
||||
|
|
|
@ -152,15 +152,18 @@ void evas_engine_directfb_gradient_render_post(void *data, void *g
|
|||
void evas_engine_directfb_gradient_draw(void *data, void *context, void *surface,
|
||||
void *gradient, int x, int y, int w, int h);
|
||||
|
||||
void *evas_engine_directfb_font_load(void *data, char *name,
|
||||
void *evas_engine_directfb_font_load(void *data, const char *name,
|
||||
int size);
|
||||
void *evas_engine_directfb_font_memory_load(void *data,
|
||||
char *name,
|
||||
int size,
|
||||
const void *fdata,
|
||||
int fdata_size);
|
||||
void *evas_engine_directfb_font_add(void *data, void *font, char *name, int size);
|
||||
void *evas_engine_directfb_font_memory_add(void *data, void *font, char *name, int size, const void *fdata, int fdata_size);
|
||||
void *evas_engine_directfb_font_add(void *data, void *font, const char *name, int size);
|
||||
void *evas_engine_directfb_font_memory_add(void *data, void *font,
|
||||
char *name, int size,
|
||||
const void *fdata,
|
||||
int fdata_size);
|
||||
void evas_engine_directfb_font_free(void *data, void *font);
|
||||
int evas_engine_directfb_font_ascent_get(void *data,
|
||||
void *font);
|
||||
|
@ -172,25 +175,25 @@ int evas_engine_directfb_font_max_descent_get(void *data,
|
|||
void *font);
|
||||
void evas_engine_directfb_font_string_size_get(void *data,
|
||||
void *font,
|
||||
char *text,
|
||||
const char *text,
|
||||
int *w, int *h);
|
||||
int evas_engine_directfb_font_inset_get(void *data, void *font,
|
||||
char *text);
|
||||
const char *text);
|
||||
int evas_engine_directfb_font_h_advance_get(void *data,
|
||||
void *font,
|
||||
char *text);
|
||||
const char *text);
|
||||
int evas_engine_directfb_font_v_advance_get(void *data,
|
||||
void *font,
|
||||
char *text);
|
||||
const char *text);
|
||||
int evas_engine_directfb_font_char_coords_get(void *data,
|
||||
void *font,
|
||||
char *text,
|
||||
const char *text,
|
||||
int pos, int *cx,
|
||||
int *cy, int *cw,
|
||||
int *ch);
|
||||
int evas_engine_directfb_font_char_at_coords_get(void *data,
|
||||
void *font,
|
||||
char *text,
|
||||
const char *text,
|
||||
int x, int y,
|
||||
int *cx,
|
||||
int *cy,
|
||||
|
@ -199,7 +202,7 @@ int evas_engine_directfb_font_char_at_coords_get(void *data,
|
|||
void evas_engine_directfb_font_draw(void *data, void *context,
|
||||
void *surface, void *font,
|
||||
int x, int y, int w, int h,
|
||||
int ow, int oh, char *text);
|
||||
int ow, int oh, const char *text);
|
||||
void evas_engine_directfb_font_cache_flush(void *data);
|
||||
void evas_engine_directfb_font_cache_set(void *data, int bytes);
|
||||
int evas_engine_directfb_font_cache_get(void *data);
|
||||
|
|
|
@ -28,7 +28,7 @@ static RGBA_Image *_dfb_image_find(const char *filename, const char *key, DATA64
|
|||
*/
|
||||
|
||||
void *
|
||||
evas_engine_directfb_image_load(void *data, char *file, char *key, int *error, Evas_Image_Load_Opts *lo)
|
||||
evas_engine_directfb_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo)
|
||||
{
|
||||
Render_Engine *re;
|
||||
DFBSurfaceDescription dsc;
|
||||
|
@ -99,13 +99,14 @@ evas_engine_directfb_image_new_from_data(void *data, int w, int h,
|
|||
DATA32 * image_data, int alpha, int cspace)
|
||||
{
|
||||
/* FIXME document this peculiarity */
|
||||
return evas_engine_directfb_image_new_from_copied_data(data, w, h, image_data);
|
||||
return evas_engine_directfb_image_new_from_copied_data(data, w, h, image_data, alpha, cspace);
|
||||
}
|
||||
|
||||
void *
|
||||
evas_engine_directfb_image_new_from_copied_data(void *data, int w, int h,
|
||||
DATA32 * image_data, int alpha, int cspace)
|
||||
{
|
||||
/* FIXME use alpha and cspace here or not? */
|
||||
|
||||
Render_Engine *re;
|
||||
RGBA_Image *im = NULL;
|
||||
|
@ -235,7 +236,8 @@ evas_engine_directfb_image_data_put(void *data, void *image,
|
|||
w = im->image->w;
|
||||
h = im->image->h;
|
||||
_dfb_image_unref(im);
|
||||
return evas_engine_directfb_image_new_from_data(data, w, h, image_data);
|
||||
/* FIXME alpha and cspace (0, 0) is not used here yet */
|
||||
return evas_engine_directfb_image_new_from_data(data, w, h, image_data, 0, 0);
|
||||
}
|
||||
_dfb_image_dirty(im);
|
||||
|
||||
|
@ -539,8 +541,31 @@ evas_engine_directfb_image_format_get(void *data, void *image)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
evas_engine_directfb_image_colorspace_set(void *data, void *image, int cspace)
|
||||
{
|
||||
/* FIXME impliment image_colorspace_set */
|
||||
}
|
||||
|
||||
int
|
||||
evas_engine_directfb_image_colorspace_get(void *data, void *image)
|
||||
{
|
||||
/* FIXME impliment image_colorspace_get */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
evas_engine_directfb_image_native_set(void *data, void *image, void *native)
|
||||
{
|
||||
/* FIXME impliment image_native_set */
|
||||
}
|
||||
|
||||
void *
|
||||
evas_engine_directfb_image_native_get(void *data, void *image)
|
||||
{
|
||||
/* FIXME impliment image_native_get */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Private routines. These are slightly modified versions of the ones in
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#ifndef EVAS_ENGINE_DFB_IMAGE_OBJECTS_H
|
||||
#define EVAS_ENGINE_DFB_IMAGE_OBJECTS_H
|
||||
void *evas_engine_directfb_image_load(void *data, char *file,
|
||||
char *key, int *error, Evas_Image_Load_Opts *lo);
|
||||
void *evas_engine_directfb_image_load(void *data, const char *file,
|
||||
const char *key, int *error, Evas_Image_Load_Opts *lo);
|
||||
void *evas_engine_directfb_image_new_from_data(void *data, int w,
|
||||
int h,
|
||||
DATA32 *
|
||||
image_data);
|
||||
DATA32 *image_data,
|
||||
int alpha, int cspace);
|
||||
void *evas_engine_directfb_image_new_from_copied_data(void *data,
|
||||
int w,
|
||||
int h,
|
||||
DATA32 *
|
||||
image_data);
|
||||
DATA32 *image_data,
|
||||
int alpha, int cspace);
|
||||
void evas_engine_directfb_image_free(void *data, void *image);
|
||||
void evas_engine_directfb_image_size_get(void *data, void *image,
|
||||
int *w, int *h);
|
||||
|
@ -48,6 +48,16 @@ char *evas_engine_directfb_image_comment_get(void *data,
|
|||
char *key);
|
||||
char *evas_engine_directfb_image_format_get(void *data,
|
||||
void *image);
|
||||
void evas_engine_directfb_image_colorspace_set(void *data,
|
||||
void *image,
|
||||
int cspace);
|
||||
int evas_engine_directfb_image_colorspace_get(void *data,
|
||||
void *image);
|
||||
void evas_engine_directfb_image_native_set(void *data,
|
||||
void *image,
|
||||
void *native);
|
||||
void *evas_engine_directfb_image_native_get(void *data,
|
||||
void *image);
|
||||
void evas_engine_directfb_image_cache_flush(void *data);
|
||||
void evas_engine_directfb_image_cache_set(void *data, int bytes);
|
||||
int evas_engine_directfb_image_cache_get(void *data);
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_load_edb.c
|
||||
|
||||
module_la_LIBADD = @edb_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_load_eet.c
|
||||
|
||||
module_la_LIBADD = @eet_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_load_gif.c
|
||||
|
||||
module_la_LIBADD = @gif_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_load_jpeg.c
|
||||
|
||||
module_la_LIBADD = @jpeg_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_load_png.c
|
||||
|
||||
module_la_LIBADD = @png_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_load_svg.c
|
||||
|
||||
module_la_LIBADD = @svg_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_load_tiff.c
|
||||
|
||||
module_la_LIBADD = @tiff_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_load_xpm.c
|
||||
|
||||
module_la_LIBADD = $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ if BUILD_LOADER_EET
|
|||
eet_subdir = eet
|
||||
endif
|
||||
|
||||
if BUILD_LOADER_JPEG
|
||||
if BUILD_SAVER_JPEG
|
||||
jpeg_subdir = jpeg
|
||||
endif
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_save_edb.c
|
||||
|
||||
module_la_LIBADD = @edb_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_save_eet.c
|
||||
|
||||
module_la_LIBADD = @eet_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_save_jpeg.c
|
||||
|
||||
module_la_LIBADD = @jpeg_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_save_png.c
|
||||
|
||||
module_la_LIBADD = @png_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pkg_LTLIBRARIES = module.la
|
|||
module_la_SOURCES = evas_image_save_tiff.c
|
||||
|
||||
module_la_LIBADD = @tiff_libs@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
|
||||
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
||||
|
|
Loading…
Reference in New Issue