diff options
author | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
commit | 07274513e984f0b5544586c74508ccd16e7dcafa (patch) | |
tree | b32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/evas/src/modules/engines/directfb | |
parent | Added Irrlicht 1.8, but without all the Windows binaries. (diff) | |
download | SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2 SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz |
Remove EFL, since it's been released now.
Diffstat (limited to 'libraries/evas/src/modules/engines/directfb')
6 files changed, 0 insertions, 2971 deletions
diff --git a/libraries/evas/src/modules/engines/directfb/Evas_Engine_DirectFB.h b/libraries/evas/src/modules/engines/directfb/Evas_Engine_DirectFB.h deleted file mode 100644 index 53352b7..0000000 --- a/libraries/evas/src/modules/engines/directfb/Evas_Engine_DirectFB.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _EVAS_ENGINE_DIRECTFB_H | ||
2 | #define _EVAS_ENGINE_DIRECTFB_H | ||
3 | |||
4 | #include <Evas.h> | ||
5 | #include <directfb.h> | ||
6 | |||
7 | typedef struct _Evas_Engine_Info_DirectFB Evas_Engine_Info_DirectFB; | ||
8 | |||
9 | struct _Evas_Engine_Info_DirectFB | ||
10 | { | ||
11 | /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ | ||
12 | /* at you and make nasty noises */ | ||
13 | Evas_Engine_Info magic; | ||
14 | |||
15 | struct Evas_Engine_DirectFB_Spec { | ||
16 | IDirectFB *dfb; | ||
17 | IDirectFBSurface *surface; | ||
18 | } info; | ||
19 | |||
20 | /* non-blocking or blocking mode */ | ||
21 | Evas_Engine_Render_Mode render_mode; | ||
22 | }; | ||
23 | #endif | ||
24 | |||
25 | |||
diff --git a/libraries/evas/src/modules/engines/directfb/Makefile.am b/libraries/evas/src/modules/engines/directfb/Makefile.am deleted file mode 100644 index 967e594..0000000 --- a/libraries/evas/src/modules/engines/directfb/Makefile.am +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | |||
2 | MAINTAINERCLEANFILES = Makefile.in | ||
3 | |||
4 | AM_CPPFLAGS = \ | ||
5 | -I. \ | ||
6 | -I$(top_srcdir)/src/lib \ | ||
7 | -I$(top_srcdir)/src/lib/include \ | ||
8 | -I$(top_srcdir)/src/modules/engines \ | ||
9 | @FREETYPE_CFLAGS@ \ | ||
10 | @PIXMAN_CFLAGS@ \ | ||
11 | @EINA_CFLAGS@ \ | ||
12 | @evas_engine_directfb_cflags@ | ||
13 | |||
14 | if BUILD_ENGINE_DIRECTFB | ||
15 | |||
16 | DIRECTFB_SOURCES = evas_engine.c polygon.c | ||
17 | DIRECTFB_LIBADD = @evas_engine_directfb_libs@ | ||
18 | |||
19 | |||
20 | includes_HEADERS = Evas_Engine_DirectFB.h | ||
21 | includesdir = $(includedir)/evas-@VMAJ@ | ||
22 | |||
23 | if !EVAS_STATIC_BUILD_DIRECTFB | ||
24 | |||
25 | pkgdir = $(libdir)/evas/modules/engines/directfb/$(MODULE_ARCH) | ||
26 | pkg_LTLIBRARIES = module.la | ||
27 | |||
28 | module_la_SOURCES = $(DIRECTFB_SOURCES) | ||
29 | |||
30 | module_la_LIBADD = @EINA_LIBS@ $(DIRECTFB_LIBADD) $(top_builddir)/src/lib/libevas.la | ||
31 | module_la_LDFLAGS = -module -avoid-version | ||
32 | module_la_LIBTOOLFLAGS = --tag=disable-static | ||
33 | |||
34 | else | ||
35 | |||
36 | noinst_LTLIBRARIES = libevas_engine_directfb.la | ||
37 | |||
38 | libevas_engine_directfb_la_SOURCES = $(DIRECTFB_SOURCES) | ||
39 | libevas_engine_directfb_la_LIBADD = $(DIRECTFB_LIBADD) | ||
40 | |||
41 | endif | ||
42 | endif | ||
43 | |||
44 | EXTRA_DIST = evas_engine.h | ||
diff --git a/libraries/evas/src/modules/engines/directfb/Makefile.in b/libraries/evas/src/modules/engines/directfb/Makefile.in deleted file mode 100644 index 7d642c9..0000000 --- a/libraries/evas/src/modules/engines/directfb/Makefile.in +++ /dev/null | |||
@@ -1,808 +0,0 @@ | |||
1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. | ||
2 | # @configure_input@ | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, | ||
6 | # Inc. | ||
7 | # This Makefile.in is free software; the Free Software Foundation | ||
8 | # gives unlimited permission to copy and/or distribute it, | ||
9 | # with or without modifications, as long as this notice is preserved. | ||
10 | |||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
14 | # PARTICULAR PURPOSE. | ||
15 | |||
16 | @SET_MAKE@ | ||
17 | |||
18 | |||
19 | VPATH = @srcdir@ | ||
20 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
21 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
22 | pkglibdir = $(libdir)/@PACKAGE@ | ||
23 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | ||
24 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
25 | install_sh_DATA = $(install_sh) -c -m 644 | ||
26 | install_sh_PROGRAM = $(install_sh) -c | ||
27 | install_sh_SCRIPT = $(install_sh) -c | ||
28 | INSTALL_HEADER = $(INSTALL_DATA) | ||
29 | transform = $(program_transform_name) | ||
30 | NORMAL_INSTALL = : | ||
31 | PRE_INSTALL = : | ||
32 | POST_INSTALL = : | ||
33 | NORMAL_UNINSTALL = : | ||
34 | PRE_UNINSTALL = : | ||
35 | POST_UNINSTALL = : | ||
36 | build_triplet = @build@ | ||
37 | host_triplet = @host@ | ||
38 | subdir = src/modules/engines/directfb | ||
39 | DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ | ||
40 | $(srcdir)/Makefile.in | ||
41 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
42 | am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ | ||
43 | $(top_srcdir)/m4/efl_coverage.m4 \ | ||
44 | $(top_srcdir)/m4/efl_doxygen.m4 \ | ||
45 | $(top_srcdir)/m4/efl_fnmatch.m4 \ | ||
46 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ | ||
47 | $(top_srcdir)/m4/evas_check_engine.m4 \ | ||
48 | $(top_srcdir)/m4/evas_check_loader.m4 \ | ||
49 | $(top_srcdir)/m4/evas_converter.m4 \ | ||
50 | $(top_srcdir)/m4/evas_dither.m4 \ | ||
51 | $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ | ||
52 | $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ | ||
53 | $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ | ||
54 | $(top_srcdir)/configure.ac | ||
55 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
56 | $(ACLOCAL_M4) | ||
57 | mkinstalldirs = $(install_sh) -d | ||
58 | CONFIG_HEADER = $(top_builddir)/config.h | ||
59 | CONFIG_CLEAN_FILES = | ||
60 | CONFIG_CLEAN_VPATH_FILES = | ||
61 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
62 | am__vpath_adj = case $$p in \ | ||
63 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
64 | *) f=$$p;; \ | ||
65 | esac; | ||
66 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; | ||
67 | am__install_max = 40 | ||
68 | am__nobase_strip_setup = \ | ||
69 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` | ||
70 | am__nobase_strip = \ | ||
71 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" | ||
72 | am__nobase_list = $(am__nobase_strip_setup); \ | ||
73 | for p in $$list; do echo "$$p $$p"; done | \ | ||
74 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ | ||
75 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ | ||
76 | if (++n[$$2] == $(am__install_max)) \ | ||
77 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ | ||
78 | END { for (dir in files) print dir, files[dir] }' | ||
79 | am__base_list = \ | ||
80 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ | ||
81 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | ||
82 | am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" | ||
83 | LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) | ||
84 | am__DEPENDENCIES_1 = | ||
85 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@libevas_engine_directfb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) | ||
86 | am__libevas_engine_directfb_la_SOURCES_DIST = evas_engine.c polygon.c | ||
87 | @BUILD_ENGINE_DIRECTFB_TRUE@am__objects_1 = evas_engine.lo polygon.lo | ||
88 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am_libevas_engine_directfb_la_OBJECTS = $(am__objects_1) | ||
89 | libevas_engine_directfb_la_OBJECTS = \ | ||
90 | $(am_libevas_engine_directfb_la_OBJECTS) | ||
91 | AM_V_lt = $(am__v_lt_$(V)) | ||
92 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) | ||
93 | am__v_lt_0 = --silent | ||
94 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am_libevas_engine_directfb_la_rpath = | ||
95 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ | ||
96 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@ $(top_builddir)/src/lib/libevas.la | ||
97 | am__module_la_SOURCES_DIST = evas_engine.c polygon.c | ||
98 | @BUILD_ENGINE_DIRECTFB_TRUE@am__objects_2 = module_la-evas_engine.lo \ | ||
99 | @BUILD_ENGINE_DIRECTFB_TRUE@ module_la-polygon.lo | ||
100 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@am_module_la_OBJECTS = $(am__objects_2) | ||
101 | module_la_OBJECTS = $(am_module_la_OBJECTS) | ||
102 | module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ | ||
103 | $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ | ||
104 | $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ | ||
105 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@am_module_la_rpath = -rpath \ | ||
106 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@ $(pkgdir) | ||
107 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) | ||
108 | depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
109 | am__depfiles_maybe = depfiles | ||
110 | am__mv = mv -f | ||
111 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
112 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
113 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
114 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ | ||
115 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
116 | $(AM_CFLAGS) $(CFLAGS) | ||
117 | AM_V_CC = $(am__v_CC_$(V)) | ||
118 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) | ||
119 | am__v_CC_0 = @echo " CC " $@; | ||
120 | AM_V_at = $(am__v_at_$(V)) | ||
121 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) | ||
122 | am__v_at_0 = @ | ||
123 | CCLD = $(CC) | ||
124 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
125 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
126 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
127 | AM_V_CCLD = $(am__v_CCLD_$(V)) | ||
128 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) | ||
129 | am__v_CCLD_0 = @echo " CCLD " $@; | ||
130 | AM_V_GEN = $(am__v_GEN_$(V)) | ||
131 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
132 | am__v_GEN_0 = @echo " GEN " $@; | ||
133 | SOURCES = $(libevas_engine_directfb_la_SOURCES) $(module_la_SOURCES) | ||
134 | DIST_SOURCES = $(am__libevas_engine_directfb_la_SOURCES_DIST) \ | ||
135 | $(am__module_la_SOURCES_DIST) | ||
136 | am__includes_HEADERS_DIST = Evas_Engine_DirectFB.h | ||
137 | HEADERS = $(includes_HEADERS) | ||
138 | ETAGS = etags | ||
139 | CTAGS = ctags | ||
140 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
141 | ACLOCAL = @ACLOCAL@ | ||
142 | ALLOCA = @ALLOCA@ | ||
143 | AMTAR = @AMTAR@ | ||
144 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
145 | AR = @AR@ | ||
146 | AS = @AS@ | ||
147 | AUTOCONF = @AUTOCONF@ | ||
148 | AUTOHEADER = @AUTOHEADER@ | ||
149 | AUTOMAKE = @AUTOMAKE@ | ||
150 | AWK = @AWK@ | ||
151 | CC = @CC@ | ||
152 | CCDEPMODE = @CCDEPMODE@ | ||
153 | CFLAGS = @CFLAGS@ | ||
154 | CHECK_CFLAGS = @CHECK_CFLAGS@ | ||
155 | CHECK_LIBS = @CHECK_LIBS@ | ||
156 | CPP = @CPP@ | ||
157 | CPPFLAGS = @CPPFLAGS@ | ||
158 | CXX = @CXX@ | ||
159 | CXXCPP = @CXXCPP@ | ||
160 | CXXDEPMODE = @CXXDEPMODE@ | ||
161 | CXXFLAGS = @CXXFLAGS@ | ||
162 | CYGPATH_W = @CYGPATH_W@ | ||
163 | DEFS = @DEFS@ | ||
164 | DEPDIR = @DEPDIR@ | ||
165 | DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ | ||
166 | DIRECTFB_LIBS = @DIRECTFB_LIBS@ | ||
167 | DLLTOOL = @DLLTOOL@ | ||
168 | DSYMUTIL = @DSYMUTIL@ | ||
169 | DUMPBIN = @DUMPBIN@ | ||
170 | ECHO_C = @ECHO_C@ | ||
171 | ECHO_N = @ECHO_N@ | ||
172 | ECHO_T = @ECHO_T@ | ||
173 | ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ | ||
174 | ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ | ||
175 | EDB_CFLAGS = @EDB_CFLAGS@ | ||
176 | EDB_LIBS = @EDB_LIBS@ | ||
177 | EDJE_CFLAGS = @EDJE_CFLAGS@ | ||
178 | EDJE_LIBS = @EDJE_LIBS@ | ||
179 | EET_CFLAGS = @EET_CFLAGS@ | ||
180 | EET_LIBS = @EET_LIBS@ | ||
181 | EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ | ||
182 | EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ | ||
183 | EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ | ||
184 | EGREP = @EGREP@ | ||
185 | EINA_CFLAGS = @EINA_CFLAGS@ | ||
186 | EINA_LIBS = @EINA_LIBS@ | ||
187 | EVAS_CFLAGS = @EVAS_CFLAGS@ | ||
188 | EVAS_LIBS = @EVAS_LIBS@ | ||
189 | EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ | ||
190 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
191 | EVIL_LIBS = @EVIL_LIBS@ | ||
192 | EXEEXT = @EXEEXT@ | ||
193 | EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ | ||
194 | EXOTIC_LIBS = @EXOTIC_LIBS@ | ||
195 | FGREP = @FGREP@ | ||
196 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ | ||
197 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ | ||
198 | FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ | ||
199 | FREETYPE_LIBS = @FREETYPE_LIBS@ | ||
200 | FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ | ||
201 | FRIBIDI_LIBS = @FRIBIDI_LIBS@ | ||
202 | GL_EET_CFLAGS = @GL_EET_CFLAGS@ | ||
203 | GL_EET_LIBS = @GL_EET_LIBS@ | ||
204 | GREP = @GREP@ | ||
205 | HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ | ||
206 | HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ | ||
207 | INSTALL = @INSTALL@ | ||
208 | INSTALL_DATA = @INSTALL_DATA@ | ||
209 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
210 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
211 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
212 | LD = @LD@ | ||
213 | LDFLAGS = @LDFLAGS@ | ||
214 | LIBOBJS = @LIBOBJS@ | ||
215 | LIBS = @LIBS@ | ||
216 | LIBTOOL = @LIBTOOL@ | ||
217 | LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ | ||
218 | LINEBREAK_LIBS = @LINEBREAK_LIBS@ | ||
219 | LIPO = @LIPO@ | ||
220 | LN_S = @LN_S@ | ||
221 | LTLIBOBJS = @LTLIBOBJS@ | ||
222 | MAKEINFO = @MAKEINFO@ | ||
223 | MKDIR_P = @MKDIR_P@ | ||
224 | MODULE_ARCH = @MODULE_ARCH@ | ||
225 | NM = @NM@ | ||
226 | NMEDIT = @NMEDIT@ | ||
227 | OBJC = @OBJC@ | ||
228 | OBJCDEPMODE = @OBJCDEPMODE@ | ||
229 | OBJCFLAGS = @OBJCFLAGS@ | ||
230 | OBJDUMP = @OBJDUMP@ | ||
231 | OBJEXT = @OBJEXT@ | ||
232 | OTOOL = @OTOOL@ | ||
233 | OTOOL64 = @OTOOL64@ | ||
234 | PACKAGE = @PACKAGE@ | ||
235 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
236 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
237 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
238 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
239 | PACKAGE_URL = @PACKAGE_URL@ | ||
240 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
241 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
242 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | ||
243 | PIXMAN_LIBS = @PIXMAN_LIBS@ | ||
244 | PKG_CONFIG = @PKG_CONFIG@ | ||
245 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
246 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
247 | PNG_CFLAGS = @PNG_CFLAGS@ | ||
248 | PNG_LIBS = @PNG_LIBS@ | ||
249 | RANLIB = @RANLIB@ | ||
250 | SDL_CFLAGS = @SDL_CFLAGS@ | ||
251 | SDL_LIBS = @SDL_LIBS@ | ||
252 | SED = @SED@ | ||
253 | SET_MAKE = @SET_MAKE@ | ||
254 | SHELL = @SHELL@ | ||
255 | SHM_OPEN_LINK = @SHM_OPEN_LINK@ | ||
256 | STRIP = @STRIP@ | ||
257 | SVG_CFLAGS = @SVG_CFLAGS@ | ||
258 | SVG_LIBS = @SVG_LIBS@ | ||
259 | VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ | ||
260 | VALGRIND_LIBS = @VALGRIND_LIBS@ | ||
261 | VERSION = @VERSION@ | ||
262 | VMAJ = @VMAJ@ | ||
263 | WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ | ||
264 | WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ | ||
265 | XCB_CFLAGS = @XCB_CFLAGS@ | ||
266 | XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ | ||
267 | XCB_GL_LIBS = @XCB_GL_LIBS@ | ||
268 | XCB_LIBS = @XCB_LIBS@ | ||
269 | XEXT_CFLAGS = @XEXT_CFLAGS@ | ||
270 | XEXT_LIBS = @XEXT_LIBS@ | ||
271 | XMKMF = @XMKMF@ | ||
272 | X_CFLAGS = @X_CFLAGS@ | ||
273 | X_EXTRA_LIBS = @X_EXTRA_LIBS@ | ||
274 | X_LIBS = @X_LIBS@ | ||
275 | X_PRE_LIBS = @X_PRE_LIBS@ | ||
276 | abs_builddir = @abs_builddir@ | ||
277 | abs_srcdir = @abs_srcdir@ | ||
278 | abs_top_builddir = @abs_top_builddir@ | ||
279 | abs_top_srcdir = @abs_top_srcdir@ | ||
280 | ac_ct_CC = @ac_ct_CC@ | ||
281 | ac_ct_CXX = @ac_ct_CXX@ | ||
282 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
283 | ac_ct_OBJC = @ac_ct_OBJC@ | ||
284 | altivec_cflags = @altivec_cflags@ | ||
285 | am__include = @am__include@ | ||
286 | am__leading_dot = @am__leading_dot@ | ||
287 | am__quote = @am__quote@ | ||
288 | am__tar = @am__tar@ | ||
289 | am__untar = @am__untar@ | ||
290 | bindir = @bindir@ | ||
291 | build = @build@ | ||
292 | build_alias = @build_alias@ | ||
293 | build_cpu = @build_cpu@ | ||
294 | build_os = @build_os@ | ||
295 | build_vendor = @build_vendor@ | ||
296 | builddir = @builddir@ | ||
297 | datadir = @datadir@ | ||
298 | datarootdir = @datarootdir@ | ||
299 | dlopen_libs = @dlopen_libs@ | ||
300 | docdir = @docdir@ | ||
301 | dvidir = @dvidir@ | ||
302 | edje_cc = @edje_cc@ | ||
303 | efl_doxygen = @efl_doxygen@ | ||
304 | efl_have_doxygen = @efl_have_doxygen@ | ||
305 | evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ | ||
306 | evas_engine_buffer_libs = @evas_engine_buffer_libs@ | ||
307 | evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ | ||
308 | evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ | ||
309 | evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ | ||
310 | evas_engine_directfb_libs = @evas_engine_directfb_libs@ | ||
311 | evas_engine_fb_cflags = @evas_engine_fb_cflags@ | ||
312 | evas_engine_fb_libs = @evas_engine_fb_libs@ | ||
313 | evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ | ||
314 | evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ | ||
315 | evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ | ||
316 | evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ | ||
317 | evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ | ||
318 | evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ | ||
319 | evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ | ||
320 | evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ | ||
321 | evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ | ||
322 | evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ | ||
323 | evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ | ||
324 | evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ | ||
325 | evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ | ||
326 | evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ | ||
327 | evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ | ||
328 | evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ | ||
329 | evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ | ||
330 | evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ | ||
331 | evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ | ||
332 | evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ | ||
333 | evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ | ||
334 | evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ | ||
335 | evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ | ||
336 | evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ | ||
337 | evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ | ||
338 | evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ | ||
339 | evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ | ||
340 | evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ | ||
341 | evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ | ||
342 | evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ | ||
343 | evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ | ||
344 | evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ | ||
345 | evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ | ||
346 | evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ | ||
347 | evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ | ||
348 | evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ | ||
349 | evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ | ||
350 | evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ | ||
351 | evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ | ||
352 | evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ | ||
353 | evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ | ||
354 | evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ | ||
355 | evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ | ||
356 | evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ | ||
357 | evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ | ||
358 | evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ | ||
359 | evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ | ||
360 | evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ | ||
361 | evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ | ||
362 | evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ | ||
363 | evas_image_loader_png_libs = @evas_image_loader_png_libs@ | ||
364 | evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ | ||
365 | evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ | ||
366 | evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ | ||
367 | evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ | ||
368 | evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ | ||
369 | evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ | ||
370 | evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ | ||
371 | evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ | ||
372 | evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ | ||
373 | evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ | ||
374 | evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ | ||
375 | evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ | ||
376 | exec_prefix = @exec_prefix@ | ||
377 | have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ | ||
378 | have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ | ||
379 | have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ | ||
380 | have_evas_engine_software_x11 = @have_evas_engine_software_x11@ | ||
381 | have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ | ||
382 | have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ | ||
383 | have_lcov = @have_lcov@ | ||
384 | host = @host@ | ||
385 | host_alias = @host_alias@ | ||
386 | host_cpu = @host_cpu@ | ||
387 | host_os = @host_os@ | ||
388 | host_vendor = @host_vendor@ | ||
389 | htmldir = @htmldir@ | ||
390 | includedir = @includedir@ | ||
391 | infodir = @infodir@ | ||
392 | install_sh = @install_sh@ | ||
393 | libdir = @libdir@ | ||
394 | libexecdir = @libexecdir@ | ||
395 | localedir = @localedir@ | ||
396 | localstatedir = @localstatedir@ | ||
397 | lt_ECHO = @lt_ECHO@ | ||
398 | lt_enable_auto_import = @lt_enable_auto_import@ | ||
399 | mandir = @mandir@ | ||
400 | mkdir_p = @mkdir_p@ | ||
401 | oldincludedir = @oldincludedir@ | ||
402 | pdfdir = @pdfdir@ | ||
403 | pkgconfig_requires_private = @pkgconfig_requires_private@ | ||
404 | prefix = @prefix@ | ||
405 | program_transform_name = @program_transform_name@ | ||
406 | psdir = @psdir@ | ||
407 | pthread_cflags = @pthread_cflags@ | ||
408 | pthread_libs = @pthread_libs@ | ||
409 | release_info = @release_info@ | ||
410 | requirement_evas = @requirement_evas@ | ||
411 | sbindir = @sbindir@ | ||
412 | sharedstatedir = @sharedstatedir@ | ||
413 | srcdir = @srcdir@ | ||
414 | sysconfdir = @sysconfdir@ | ||
415 | target_alias = @target_alias@ | ||
416 | top_build_prefix = @top_build_prefix@ | ||
417 | top_builddir = @top_builddir@ | ||
418 | top_srcdir = @top_srcdir@ | ||
419 | version_info = @version_info@ | ||
420 | MAINTAINERCLEANFILES = Makefile.in | ||
421 | AM_CPPFLAGS = \ | ||
422 | -I. \ | ||
423 | -I$(top_srcdir)/src/lib \ | ||
424 | -I$(top_srcdir)/src/lib/include \ | ||
425 | -I$(top_srcdir)/src/modules/engines \ | ||
426 | @FREETYPE_CFLAGS@ \ | ||
427 | @PIXMAN_CFLAGS@ \ | ||
428 | @EINA_CFLAGS@ \ | ||
429 | @evas_engine_directfb_cflags@ | ||
430 | |||
431 | @BUILD_ENGINE_DIRECTFB_TRUE@DIRECTFB_SOURCES = evas_engine.c polygon.c | ||
432 | @BUILD_ENGINE_DIRECTFB_TRUE@DIRECTFB_LIBADD = @evas_engine_directfb_libs@ | ||
433 | @BUILD_ENGINE_DIRECTFB_TRUE@includes_HEADERS = Evas_Engine_DirectFB.h | ||
434 | @BUILD_ENGINE_DIRECTFB_TRUE@includesdir = $(includedir)/evas-@VMAJ@ | ||
435 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@pkgdir = $(libdir)/evas/modules/engines/directfb/$(MODULE_ARCH) | ||
436 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@pkg_LTLIBRARIES = module.la | ||
437 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@module_la_SOURCES = $(DIRECTFB_SOURCES) | ||
438 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@module_la_LIBADD = @EINA_LIBS@ $(DIRECTFB_LIBADD) $(top_builddir)/src/lib/libevas.la | ||
439 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@module_la_LDFLAGS = -module -avoid-version | ||
440 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static | ||
441 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@noinst_LTLIBRARIES = libevas_engine_directfb.la | ||
442 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@libevas_engine_directfb_la_SOURCES = $(DIRECTFB_SOURCES) | ||
443 | @BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@libevas_engine_directfb_la_LIBADD = $(DIRECTFB_LIBADD) | ||
444 | EXTRA_DIST = evas_engine.h | ||
445 | all: all-am | ||
446 | |||
447 | .SUFFIXES: | ||
448 | .SUFFIXES: .c .lo .o .obj | ||
449 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
450 | @for dep in $?; do \ | ||
451 | case '$(am__configure_deps)' in \ | ||
452 | *$$dep*) \ | ||
453 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
454 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
455 | exit 1;; \ | ||
456 | esac; \ | ||
457 | done; \ | ||
458 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/directfb/Makefile'; \ | ||
459 | $(am__cd) $(top_srcdir) && \ | ||
460 | $(AUTOMAKE) --gnu src/modules/engines/directfb/Makefile | ||
461 | .PRECIOUS: Makefile | ||
462 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
463 | @case '$?' in \ | ||
464 | *config.status*) \ | ||
465 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
466 | *) \ | ||
467 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
468 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
469 | esac; | ||
470 | |||
471 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
472 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
473 | |||
474 | $(top_srcdir)/configure: $(am__configure_deps) | ||
475 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
476 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
477 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
478 | $(am__aclocal_m4_deps): | ||
479 | |||
480 | clean-noinstLTLIBRARIES: | ||
481 | -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) | ||
482 | @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ | ||
483 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
484 | test "$$dir" != "$$p" || dir=.; \ | ||
485 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
486 | rm -f "$${dir}/so_locations"; \ | ||
487 | done | ||
488 | install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) | ||
489 | @$(NORMAL_INSTALL) | ||
490 | test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" | ||
491 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
492 | list2=; for p in $$list; do \ | ||
493 | if test -f $$p; then \ | ||
494 | list2="$$list2 $$p"; \ | ||
495 | else :; fi; \ | ||
496 | done; \ | ||
497 | test -z "$$list2" || { \ | ||
498 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ | ||
499 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ | ||
500 | } | ||
501 | |||
502 | uninstall-pkgLTLIBRARIES: | ||
503 | @$(NORMAL_UNINSTALL) | ||
504 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
505 | for p in $$list; do \ | ||
506 | $(am__strip_dir) \ | ||
507 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ | ||
508 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ | ||
509 | done | ||
510 | |||
511 | clean-pkgLTLIBRARIES: | ||
512 | -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) | ||
513 | @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ | ||
514 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
515 | test "$$dir" != "$$p" || dir=.; \ | ||
516 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
517 | rm -f "$${dir}/so_locations"; \ | ||
518 | done | ||
519 | libevas_engine_directfb.la: $(libevas_engine_directfb_la_OBJECTS) $(libevas_engine_directfb_la_DEPENDENCIES) | ||
520 | $(AM_V_CCLD)$(LINK) $(am_libevas_engine_directfb_la_rpath) $(libevas_engine_directfb_la_OBJECTS) $(libevas_engine_directfb_la_LIBADD) $(LIBS) | ||
521 | module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) | ||
522 | $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) | ||
523 | |||
524 | mostlyclean-compile: | ||
525 | -rm -f *.$(OBJEXT) | ||
526 | |||
527 | distclean-compile: | ||
528 | -rm -f *.tab.c | ||
529 | |||
530 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ | ||
531 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ | ||
532 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-polygon.Plo@am__quote@ | ||
533 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polygon.Plo@am__quote@ | ||
534 | |||
535 | .c.o: | ||
536 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
537 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
538 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
539 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
540 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
541 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
542 | |||
543 | .c.obj: | ||
544 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
545 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
546 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
547 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
548 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
549 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
550 | |||
551 | .c.lo: | ||
552 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
553 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
554 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
555 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
556 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
557 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
558 | |||
559 | module_la-evas_engine.lo: evas_engine.c | ||
560 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c | ||
561 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo | ||
562 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
563 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ | ||
564 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
565 | @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c | ||
566 | |||
567 | module_la-polygon.lo: polygon.c | ||
568 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-polygon.lo -MD -MP -MF $(DEPDIR)/module_la-polygon.Tpo -c -o module_la-polygon.lo `test -f 'polygon.c' || echo '$(srcdir)/'`polygon.c | ||
569 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-polygon.Tpo $(DEPDIR)/module_la-polygon.Plo | ||
570 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
571 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polygon.c' object='module_la-polygon.lo' libtool=yes @AMDEPBACKSLASH@ | ||
572 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
573 | @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-polygon.lo `test -f 'polygon.c' || echo '$(srcdir)/'`polygon.c | ||
574 | |||
575 | mostlyclean-libtool: | ||
576 | -rm -f *.lo | ||
577 | |||
578 | clean-libtool: | ||
579 | -rm -rf .libs _libs | ||
580 | install-includesHEADERS: $(includes_HEADERS) | ||
581 | @$(NORMAL_INSTALL) | ||
582 | test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" | ||
583 | @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ | ||
584 | for p in $$list; do \ | ||
585 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | ||
586 | echo "$$d$$p"; \ | ||
587 | done | $(am__base_list) | \ | ||
588 | while read files; do \ | ||
589 | echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ | ||
590 | $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ | ||
591 | done | ||
592 | |||
593 | uninstall-includesHEADERS: | ||
594 | @$(NORMAL_UNINSTALL) | ||
595 | @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ | ||
596 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | ||
597 | test -n "$$files" || exit 0; \ | ||
598 | echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ | ||
599 | cd "$(DESTDIR)$(includesdir)" && rm -f $$files | ||
600 | |||
601 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
602 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
603 | unique=`for i in $$list; do \ | ||
604 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
605 | done | \ | ||
606 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
607 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
608 | mkid -fID $$unique | ||
609 | tags: TAGS | ||
610 | |||
611 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
612 | $(TAGS_FILES) $(LISP) | ||
613 | set x; \ | ||
614 | here=`pwd`; \ | ||
615 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
616 | unique=`for i in $$list; do \ | ||
617 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
618 | done | \ | ||
619 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
620 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
621 | shift; \ | ||
622 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
623 | test -n "$$unique" || unique=$$empty_fix; \ | ||
624 | if test $$# -gt 0; then \ | ||
625 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
626 | "$$@" $$unique; \ | ||
627 | else \ | ||
628 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
629 | $$unique; \ | ||
630 | fi; \ | ||
631 | fi | ||
632 | ctags: CTAGS | ||
633 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
634 | $(TAGS_FILES) $(LISP) | ||
635 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
636 | unique=`for i in $$list; do \ | ||
637 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
638 | done | \ | ||
639 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
640 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
641 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
642 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
643 | $$unique | ||
644 | |||
645 | GTAGS: | ||
646 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
647 | && $(am__cd) $(top_srcdir) \ | ||
648 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
649 | |||
650 | distclean-tags: | ||
651 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
652 | |||
653 | distdir: $(DISTFILES) | ||
654 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
655 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
656 | list='$(DISTFILES)'; \ | ||
657 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
658 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
659 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
660 | case $$dist_files in \ | ||
661 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
662 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
663 | sort -u` ;; \ | ||
664 | esac; \ | ||
665 | for file in $$dist_files; do \ | ||
666 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
667 | if test -d $$d/$$file; then \ | ||
668 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
669 | if test -d "$(distdir)/$$file"; then \ | ||
670 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
671 | fi; \ | ||
672 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
673 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
674 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
675 | fi; \ | ||
676 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
677 | else \ | ||
678 | test -f "$(distdir)/$$file" \ | ||
679 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
680 | || exit 1; \ | ||
681 | fi; \ | ||
682 | done | ||
683 | check-am: all-am | ||
684 | check: check-am | ||
685 | all-am: Makefile $(LTLIBRARIES) $(HEADERS) | ||
686 | installdirs: | ||
687 | for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ | ||
688 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
689 | done | ||
690 | install: install-am | ||
691 | install-exec: install-exec-am | ||
692 | install-data: install-data-am | ||
693 | uninstall: uninstall-am | ||
694 | |||
695 | install-am: all-am | ||
696 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
697 | |||
698 | installcheck: installcheck-am | ||
699 | install-strip: | ||
700 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
701 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
702 | `test -z '$(STRIP)' || \ | ||
703 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
704 | mostlyclean-generic: | ||
705 | |||
706 | clean-generic: | ||
707 | |||
708 | distclean-generic: | ||
709 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
710 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
711 | |||
712 | maintainer-clean-generic: | ||
713 | @echo "This command is intended for maintainers to use" | ||
714 | @echo "it deletes files that may require special tools to rebuild." | ||
715 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
716 | clean: clean-am | ||
717 | |||
718 | clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ | ||
719 | clean-pkgLTLIBRARIES mostlyclean-am | ||
720 | |||
721 | distclean: distclean-am | ||
722 | -rm -rf ./$(DEPDIR) | ||
723 | -rm -f Makefile | ||
724 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
725 | distclean-tags | ||
726 | |||
727 | dvi: dvi-am | ||
728 | |||
729 | dvi-am: | ||
730 | |||
731 | html: html-am | ||
732 | |||
733 | html-am: | ||
734 | |||
735 | info: info-am | ||
736 | |||
737 | info-am: | ||
738 | |||
739 | install-data-am: install-includesHEADERS install-pkgLTLIBRARIES | ||
740 | |||
741 | install-dvi: install-dvi-am | ||
742 | |||
743 | install-dvi-am: | ||
744 | |||
745 | install-exec-am: | ||
746 | |||
747 | install-html: install-html-am | ||
748 | |||
749 | install-html-am: | ||
750 | |||
751 | install-info: install-info-am | ||
752 | |||
753 | install-info-am: | ||
754 | |||
755 | install-man: | ||
756 | |||
757 | install-pdf: install-pdf-am | ||
758 | |||
759 | install-pdf-am: | ||
760 | |||
761 | install-ps: install-ps-am | ||
762 | |||
763 | install-ps-am: | ||
764 | |||
765 | installcheck-am: | ||
766 | |||
767 | maintainer-clean: maintainer-clean-am | ||
768 | -rm -rf ./$(DEPDIR) | ||
769 | -rm -f Makefile | ||
770 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
771 | |||
772 | mostlyclean: mostlyclean-am | ||
773 | |||
774 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
775 | mostlyclean-libtool | ||
776 | |||
777 | pdf: pdf-am | ||
778 | |||
779 | pdf-am: | ||
780 | |||
781 | ps: ps-am | ||
782 | |||
783 | ps-am: | ||
784 | |||
785 | uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES | ||
786 | |||
787 | .MAKE: install-am install-strip | ||
788 | |||
789 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
790 | clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ | ||
791 | ctags distclean distclean-compile distclean-generic \ | ||
792 | distclean-libtool distclean-tags distdir dvi dvi-am html \ | ||
793 | html-am info info-am install install-am install-data \ | ||
794 | install-data-am install-dvi install-dvi-am install-exec \ | ||
795 | install-exec-am install-html install-html-am \ | ||
796 | install-includesHEADERS install-info install-info-am \ | ||
797 | install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ | ||
798 | install-ps install-ps-am install-strip installcheck \ | ||
799 | installcheck-am installdirs maintainer-clean \ | ||
800 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
801 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
802 | tags uninstall uninstall-am uninstall-includesHEADERS \ | ||
803 | uninstall-pkgLTLIBRARIES | ||
804 | |||
805 | |||
806 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
807 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
808 | .NOEXPORT: | ||
diff --git a/libraries/evas/src/modules/engines/directfb/evas_engine.c b/libraries/evas/src/modules/engines/directfb/evas_engine.c deleted file mode 100644 index 5347d2d..0000000 --- a/libraries/evas/src/modules/engines/directfb/evas_engine.c +++ /dev/null | |||
@@ -1,1754 +0,0 @@ | |||
1 | #include <assert.h> | ||
2 | #include <math.h> | ||
3 | #include <string.h> | ||
4 | #include <sys/time.h> | ||
5 | #include <time.h> | ||
6 | #include "evas_engine.h" | ||
7 | #include "evas_common.h" /* Also includes international specific stuff */ | ||
8 | |||
9 | /* Uses Evas own image_draw primitive, for comparison purposes only. */ | ||
10 | //#define DFB_USE_EVAS_IMAGE_DRAW 1 | ||
11 | //#define DFB_USE_EVAS_RECT_DRAW 1 | ||
12 | //#define DFB_USE_EVAS_POLYGON_DRAW 1 | ||
13 | //#define DFB_UPDATE_INDIVIDUAL_RECTS 1 | ||
14 | #define DFB_FLIP_FLAGS DSFLIP_NONE | ||
15 | //#define DFB_FLIP_FLAGS (DSFLIP_ONSYNC | DSFLIP_WAIT) | ||
16 | |||
17 | /* Turn on debug */ | ||
18 | //#define DFB_DEBUG_IMAGE 1 | ||
19 | //#define DFB_DEBUG_FLAGS 1 | ||
20 | //#define DFB_DEBUG_ACCELERATION 1 | ||
21 | int _evas_engine_directfb_log_dom = -1; | ||
22 | |||
23 | static Evas_Func func = {}; | ||
24 | static Evas_Func parent_func = {}; | ||
25 | static IDirectFB *dfb = NULL; /* XXX HACK to work around evas image cache | ||
26 | * lack of extra data. Fix it instead later. | ||
27 | */ | ||
28 | |||
29 | |||
30 | /*********************************************************************** | ||
31 | * Evas helpers | ||
32 | **********************************************************************/ | ||
33 | static void | ||
34 | _context_get_color(RGBA_Draw_Context *dc, int *r, int *g, int *b, int *a) | ||
35 | { | ||
36 | DATA32 col; | ||
37 | |||
38 | if (dc->mul.use) | ||
39 | col = dc->mul.col; | ||
40 | else | ||
41 | col = dc->col.col; | ||
42 | |||
43 | *r = R_VAL(&col); | ||
44 | *g = G_VAL(&col); | ||
45 | *b = B_VAL(&col); | ||
46 | *a = A_VAL(&col); | ||
47 | } | ||
48 | |||
49 | |||
50 | /*********************************************************************** | ||
51 | * DirectFB helpers | ||
52 | **********************************************************************/ | ||
53 | static void | ||
54 | _dfb_surface_clear(IDirectFBSurface *surface, int x, int y, int w, int h) | ||
55 | { | ||
56 | DFBRegion cr; | ||
57 | DFBResult r; | ||
58 | |||
59 | cr.x1 = x; | ||
60 | cr.y1 = y; | ||
61 | cr.x2 = x + w - 1; | ||
62 | cr.y2 = y + h - 1; | ||
63 | r = surface->SetClip(surface, &cr); | ||
64 | if (r != DFB_OK) | ||
65 | goto error; | ||
66 | |||
67 | r = surface->Clear(surface, 0, 0, 0, 0); | ||
68 | if (r != DFB_OK) | ||
69 | goto error; | ||
70 | |||
71 | return; | ||
72 | |||
73 | error: | ||
74 | ERR("DirectFB: could not clear surface: %s", | ||
75 | DirectFBErrorString(r)); | ||
76 | } | ||
77 | |||
78 | static void | ||
79 | _image_clear(DirectFB_Engine_Image_Entry *image, int x, int y, int w, int h) | ||
80 | { | ||
81 | if (image->cache_entry.src->flags.alpha) | ||
82 | _dfb_surface_clear(image->surface, x, y, w, h); | ||
83 | } | ||
84 | |||
85 | static void | ||
86 | _image_autoset_alpha(DirectFB_Engine_Image_Entry *image) | ||
87 | { | ||
88 | DFBResult r; | ||
89 | DFBSurfacePixelFormat fmt; | ||
90 | IDirectFBSurface *surface; | ||
91 | RGBA_Image *im; | ||
92 | int has_alpha; | ||
93 | |||
94 | surface = image->surface; | ||
95 | r = surface->GetPixelFormat(surface, &fmt); | ||
96 | if (r != DFB_OK) | ||
97 | { | ||
98 | ERR("Could not get pixel format: %s", | ||
99 | DirectFBErrorString(r)); | ||
100 | return; | ||
101 | } | ||
102 | |||
103 | /* XXX: check this in more depth in future, if other PF are supported */ | ||
104 | image->cache_entry.src->flags.alpha = (fmt == DSPF_ARGB); | ||
105 | } | ||
106 | |||
107 | static void | ||
108 | _dfb_surface_update(IDirectFBSurface *surface, int x, int y, int w, int h) | ||
109 | { | ||
110 | DFBRegion cr; | ||
111 | DFBResult r; | ||
112 | |||
113 | cr.x1 = x; | ||
114 | cr.y1 = y; | ||
115 | cr.x2 = x + w - 1; | ||
116 | cr.y2 = y + h - 1; | ||
117 | r = surface->Flip(surface, &cr, DSFLIP_NONE); | ||
118 | if (r != DFB_OK) | ||
119 | WRN("Could not update surface: %s", | ||
120 | DirectFBErrorString(r)); | ||
121 | } | ||
122 | |||
123 | static IDirectFBSurface * | ||
124 | _dfb_surface_from_data(IDirectFB *dfb, int w, int h, void *data) | ||
125 | { | ||
126 | IDirectFBSurface *s; | ||
127 | DFBSurfaceDescription desc; | ||
128 | DFBResult r; | ||
129 | |||
130 | desc.flags = (DSDESC_CAPS | DSDESC_WIDTH | DSDESC_HEIGHT | | ||
131 | DSDESC_PIXELFORMAT | DSDESC_PREALLOCATED); | ||
132 | desc.caps = DSCAPS_PREMULTIPLIED; | ||
133 | desc.width = w; | ||
134 | desc.height = h; | ||
135 | desc.preallocated[0].data = data; | ||
136 | desc.preallocated[0].pitch = w * 4; | ||
137 | desc.preallocated[1].data = NULL; | ||
138 | desc.preallocated[1].pitch = 0; | ||
139 | desc.pixelformat = DSPF_ARGB; | ||
140 | r = dfb->CreateSurface(dfb, &desc, &s); | ||
141 | if (r != DFB_OK) | ||
142 | { | ||
143 | ERR("Cannot create DirectFB surface: %s", | ||
144 | DirectFBErrorString(r)); | ||
145 | return NULL; | ||
146 | } | ||
147 | |||
148 | s->SetPorterDuff(s, DSPD_SRC_OVER); | ||
149 | |||
150 | return s; | ||
151 | } | ||
152 | |||
153 | static void | ||
154 | _dfb_surface_free(IDirectFBSurface *surface) | ||
155 | { | ||
156 | if (surface) | ||
157 | surface->Release(surface); | ||
158 | } | ||
159 | |||
160 | static void | ||
161 | _dfb_blit_accel_caps_print(IDirectFBSurface *dst, IDirectFBSurface *src) | ||
162 | { | ||
163 | #ifdef DFB_DEBUG_ACCELERATION | ||
164 | DFBAccelerationMask mask; | ||
165 | DFBResult r; | ||
166 | |||
167 | r = dst->GetAccelerationMask(dst, src, &mask); | ||
168 | if (r != DFB_OK) | ||
169 | { | ||
170 | ERR("Could not retrieve acceleration mask: %s", | ||
171 | DirectFBErrorString(r)); | ||
172 | return; | ||
173 | } | ||
174 | |||
175 | DBG("Acceleration: "); | ||
176 | |||
177 | #define O(m) if (mask & m) DBG(#m " ") | ||
178 | O(DFXL_FILLRECTANGLE); | ||
179 | O(DFXL_DRAWRECTANGLE); | ||
180 | O(DFXL_DRAWLINE); | ||
181 | O(DFXL_FILLTRIANGLE); | ||
182 | O(DFXL_BLIT); | ||
183 | O(DFXL_STRETCHBLIT); | ||
184 | O(DFXL_TEXTRIANGLES); | ||
185 | O(DFXL_DRAWSTRING); | ||
186 | #undef O | ||
187 | |||
188 | if (mask == DFXL_NONE) DBG("<NONE>"); | ||
189 | #endif /* DFB_DEBUG_ACCELERATION */ | ||
190 | } | ||
191 | |||
192 | #ifdef DFB_DEBUG_FLAGS | ||
193 | static const char * | ||
194 | _dfb_blit_flags_str(DFBSurfaceBlittingFlags flags) | ||
195 | { | ||
196 | static char buf[1024]; | ||
197 | |||
198 | buf[0] = 0; | ||
199 | |||
200 | #define T(m, n) \ | ||
201 | do { \ | ||
202 | if (flags & m) { \ | ||
203 | if (buf[0] != 0) strcat(buf, " | "); \ | ||
204 | strcat(buf, n); \ | ||
205 | } \ | ||
206 | } while (0) | ||
207 | |||
208 | T(DSBLIT_BLEND_ALPHACHANNEL, "BLEND_ALPHACHANNEL"); | ||
209 | T(DSBLIT_BLEND_COLORALPHA, "BLEND_COLORALPHA"); | ||
210 | T(DSBLIT_COLORIZE, "COLORIZE"); | ||
211 | T(DSBLIT_SRC_COLORKEY, "SRC_COLORKEY"); | ||
212 | T(DSBLIT_DST_COLORKEY, "DST_COLORKEY"); | ||
213 | T(DSBLIT_SRC_PREMULTIPLY, "SRC_PREMULTIPLY"); | ||
214 | T(DSBLIT_DST_PREMULTIPLY, "DST_PREMULTIPLY"); | ||
215 | T(DSBLIT_DEMULTIPLY, "DEMULTIPLY"); | ||
216 | T(DSBLIT_DEINTERLACE, "DSBLIT_DEINTERLACE"); | ||
217 | T(DSBLIT_SRC_PREMULTCOLOR, "SRC_PREMULTCOLOR"); | ||
218 | T(DSBLIT_XOR, "XOR"); | ||
219 | T(DSBLIT_INDEX_TRANSLATION, "INDEX_TRANSLATION"); | ||
220 | #undef T | ||
221 | |||
222 | if (buf[0] == 0) | ||
223 | strcpy(buf, "NOFX"); | ||
224 | |||
225 | return buf; | ||
226 | } | ||
227 | |||
228 | static const char * | ||
229 | _dfb_draw_flags_str(DFBSurfaceDrawingFlags flags) | ||
230 | { | ||
231 | static char buf[1024]; | ||
232 | |||
233 | buf[0] = 0; | ||
234 | |||
235 | #define T(m, n) \ | ||
236 | do { \ | ||
237 | if (flags & m) { \ | ||
238 | if (buf[0] != 0) strcat(buf, " | "); \ | ||
239 | strcat(buf, n); \ | ||
240 | } \ | ||
241 | } while (0) | ||
242 | T(DSDRAW_BLEND, "BLEND"); | ||
243 | T(DSDRAW_DST_COLORKEY, "DST_COLORKEY"); | ||
244 | T(DSDRAW_SRC_PREMULTIPLY, "SRC_PREMULTIPLY"); | ||
245 | T(DSDRAW_DST_PREMULTIPLY, "DST_PREMULTIPLY"); | ||
246 | T(DSDRAW_DEMULTIPLY, "DEMULTIPLY"); | ||
247 | T(DSDRAW_XOR, "DSDRAW_XOR"); | ||
248 | #undef T | ||
249 | if (buf[0] == 0) | ||
250 | strcpy(buf, "NOFX"); | ||
251 | |||
252 | return buf; | ||
253 | } | ||
254 | |||
255 | static const char * | ||
256 | _dfb_blend_func_str(DFBSurfaceBlendFunction func) | ||
257 | { | ||
258 | static char *names[] = { | ||
259 | "ZERO", | ||
260 | "ONE", | ||
261 | "SRCCOLOR", | ||
262 | "INVSRCCOLOR", | ||
263 | "SRCALPHA", | ||
264 | "INVSRCALPHA", | ||
265 | "DESTALPHA", | ||
266 | "INVDESTALPHA", | ||
267 | "DESTCOLOR", | ||
268 | "INVDESTCOLOR", | ||
269 | "SRCALPHASAT" | ||
270 | }; | ||
271 | func--; | ||
272 | if ((func >= 0) && (func <= sizeof(names)/sizeof(*names))) | ||
273 | return names[func]; | ||
274 | else | ||
275 | return NULL; | ||
276 | } | ||
277 | #endif /* DFB_DEBUG_FLAGS */ | ||
278 | |||
279 | int | ||
280 | _dfb_surface_set_color_from_context(IDirectFBSurface *surface, RGBA_Draw_Context *dc) | ||
281 | { | ||
282 | DFBSurfaceDrawingFlags flags; | ||
283 | int r, g, b, a; | ||
284 | DFBResult res; | ||
285 | |||
286 | _context_get_color(dc, &r, &g, &b, &a); | ||
287 | if (a == 0) | ||
288 | return 0; | ||
289 | |||
290 | r = 0xff * r / a; | ||
291 | g = 0xff * g / a; | ||
292 | b = 0xff * b / a; | ||
293 | |||
294 | res = surface->SetColor(surface, r, g, b, a); | ||
295 | if (res != DFB_OK) | ||
296 | goto error; | ||
297 | |||
298 | flags = (a != 255) ? DSDRAW_BLEND : DSDRAW_NOFX; | ||
299 | res = surface->SetDrawingFlags(surface, flags); | ||
300 | if (res != DFB_OK) | ||
301 | goto error; | ||
302 | |||
303 | #ifdef DFB_DEBUG_FLAGS | ||
304 | DBG("Color=%d %d %d %d, flags=%s", | ||
305 | r, g, b, a, _dfb_draw_flags_str(flags)); | ||
306 | #endif /* DFB_DEBUG_FLAGS */ | ||
307 | |||
308 | return 1; | ||
309 | |||
310 | error: | ||
311 | ERR("Could not set color from context: %s", | ||
312 | DirectFBErrorString(res)); | ||
313 | return 0; | ||
314 | } | ||
315 | |||
316 | static int | ||
317 | _dfb_surface_set_blit_params(DirectFB_Engine_Image_Entry *d, DirectFB_Engine_Image_Entry *s, RGBA_Draw_Context *dc) | ||
318 | { | ||
319 | IDirectFBSurface *surface; | ||
320 | DFBSurfaceBlittingFlags blit_flags = DSBLIT_NOFX; | ||
321 | DFBResult res; | ||
322 | int r, g, b, a; | ||
323 | |||
324 | _context_get_color(dc, &r, &g, &b, &a); | ||
325 | if (a == 0) | ||
326 | return 0; | ||
327 | |||
328 | if (a != 255) | ||
329 | blit_flags = DSBLIT_BLEND_COLORALPHA | DSBLIT_SRC_PREMULTCOLOR; | ||
330 | |||
331 | if ((r != a) || (g != a) || (b != a)) | ||
332 | { | ||
333 | blit_flags |= DSBLIT_COLORIZE; | ||
334 | |||
335 | r = 0xff * r / a; | ||
336 | g = 0xff * g / a; | ||
337 | b = 0xff * b / a; | ||
338 | } | ||
339 | |||
340 | if (s->cache_entry.src->flags.alpha) | ||
341 | blit_flags |= DSBLIT_BLEND_ALPHACHANNEL; | ||
342 | |||
343 | surface = d->surface; | ||
344 | |||
345 | if (blit_flags & | ||
346 | (DSBLIT_BLEND_COLORALPHA | DSBLIT_SRC_PREMULTCOLOR | DSBLIT_COLORIZE)) | ||
347 | { | ||
348 | res = surface->SetColor(surface, r, g, b, a); | ||
349 | if (res != DFB_OK) | ||
350 | goto error; | ||
351 | } | ||
352 | |||
353 | res = surface->SetBlittingFlags(surface, blit_flags); | ||
354 | if (res != DFB_OK) | ||
355 | goto error; | ||
356 | |||
357 | #ifdef DFB_DEBUG_FLAGS | ||
358 | DBG("sfunc=%s, dfunc=%s, color=%d %d %d %d, blit=%s, draw=%s", | ||
359 | _dfb_blend_func_str(src_func), _dfb_blend_func_str(dst_func), | ||
360 | r, g, b, a, | ||
361 | _dfb_blit_flags_str(blit_flags), _dfb_draw_flags_str(draw_flags)); | ||
362 | #endif /* DFB_DEBUG_FLAGS */ | ||
363 | |||
364 | return 1; | ||
365 | |||
366 | error: | ||
367 | ERR("Could not set blit params: %s", | ||
368 | DirectFBErrorString(res)); | ||
369 | return 0; | ||
370 | } | ||
371 | |||
372 | static int | ||
373 | _dfb_lock_and_sync_image(IDirectFBSurface *surface, RGBA_Image *image, DFBSurfaceLockFlags flags) | ||
374 | { | ||
375 | DFBResult r; | ||
376 | int pitch, sw, sh; | ||
377 | void *pixels; | ||
378 | |||
379 | r = surface->GetSize(surface, &sw, &sh); | ||
380 | if (r != DFB_OK) | ||
381 | return 0; | ||
382 | |||
383 | r = surface->Lock(surface, flags, &pixels, &pitch); | ||
384 | if (r != DFB_OK) | ||
385 | return 0; | ||
386 | |||
387 | if (pitch != (sw * 4)) | ||
388 | { | ||
389 | /* XXX TODO: support other pixel formats. */ | ||
390 | ERR("IDirectFBSurface pitch(%d) is not supported: " | ||
391 | "should be %d.", | ||
392 | pitch, sw * 4); | ||
393 | surface->Unlock(surface); | ||
394 | return 0; | ||
395 | } | ||
396 | |||
397 | image->cache_entry.w = sw; | ||
398 | image->cache_entry.h = sh; | ||
399 | image->image.data = pixels; | ||
400 | return 1; | ||
401 | } | ||
402 | |||
403 | typedef void (*_cb_for_each_cutout_t)(IDirectFBSurface *surface, RGBA_Draw_Context *dc, const DFBRegion *region, void *data); | ||
404 | static void | ||
405 | _dfb_surface_for_each_cutout(IDirectFBSurface *surface, RGBA_Draw_Context *dc, _cb_for_each_cutout_t cb, void *data) | ||
406 | { | ||
407 | Cutout_Rects *rects; | ||
408 | int i; | ||
409 | |||
410 | rects = evas_common_draw_context_apply_cutouts(dc); | ||
411 | if (!rects) | ||
412 | { | ||
413 | DFBRegion cr; | ||
414 | cr.x1 = 0; | ||
415 | cr.y1 = 0; | ||
416 | surface->GetSize(surface, &cr.x2, &cr.y2); | ||
417 | cr.x2 -= 1; | ||
418 | cr.y2 -= 1; | ||
419 | surface->SetClip(surface, NULL); | ||
420 | cb(surface, dc, &cr, data); | ||
421 | return; | ||
422 | } | ||
423 | |||
424 | for (i = 0; i < rects->active; ++i) | ||
425 | { | ||
426 | Cutout_Rect *r; | ||
427 | DFBRegion cr; | ||
428 | |||
429 | r = rects->rects + i; | ||
430 | |||
431 | cr.x1 = r->x; | ||
432 | cr.y1 = r->y; | ||
433 | cr.x2 = r->x + r->w - 1; | ||
434 | cr.y2 = r->y + r->h - 1; | ||
435 | surface->SetClip(surface, &cr); | ||
436 | cb(surface, dc, &cr, data); | ||
437 | } | ||
438 | evas_common_draw_context_apply_clear_cutouts(rects); | ||
439 | } | ||
440 | |||
441 | static void | ||
442 | _dfb_rect_set(DFBRectangle *r, int x, int y, int w, int h) | ||
443 | { | ||
444 | r->x = x; | ||
445 | r->y = y; | ||
446 | r->w = w; | ||
447 | r->h = h; | ||
448 | } | ||
449 | |||
450 | |||
451 | /*********************************************************************** | ||
452 | * Image Cache | ||
453 | **********************************************************************/ | ||
454 | static Engine_Image_Entry * | ||
455 | evas_cache_image_dfb_alloc(void) | ||
456 | { | ||
457 | DirectFB_Engine_Image_Entry *deie; | ||
458 | |||
459 | deie = calloc(1, sizeof (DirectFB_Engine_Image_Entry)); | ||
460 | |||
461 | return (Engine_Image_Entry *)deie; | ||
462 | } | ||
463 | |||
464 | static void | ||
465 | evas_cache_image_dfb_delete(Engine_Image_Entry *eie) | ||
466 | { | ||
467 | free(eie); | ||
468 | } | ||
469 | |||
470 | static int | ||
471 | evas_cache_image_dfb_constructor(Engine_Image_Entry *eie, void *data) | ||
472 | { | ||
473 | DirectFB_Engine_Image_Entry *deie = (DirectFB_Engine_Image_Entry *)eie; | ||
474 | Render_Engine *re = data; | ||
475 | IDirectFBSurface *s; | ||
476 | RGBA_Image *im; | ||
477 | |||
478 | im = (RGBA_Image *)eie->src; | ||
479 | if (!im) | ||
480 | return EVAS_LOAD_ERROR_NONE; // XXX TODO: confirm? | ||
481 | |||
482 | evas_cache_image_load_data(&im->cache_entry); | ||
483 | if (!im->image.data) | ||
484 | return EVAS_LOAD_ERROR_NONE; // XXX TODO: confirm? | ||
485 | |||
486 | s = _dfb_surface_from_data(re->spec->dfb, eie->w, eie->h, im->image.data); | ||
487 | if (!s) | ||
488 | return EVAS_LOAD_ERROR_GENERIC; | ||
489 | |||
490 | deie->surface = s; | ||
491 | deie->flags.engine_surface = 0; | ||
492 | |||
493 | return EVAS_LOAD_ERROR_NONE; | ||
494 | } | ||
495 | |||
496 | static void | ||
497 | evas_cache_image_dfb_destructor(Engine_Image_Entry *eie) | ||
498 | { | ||
499 | DirectFB_Engine_Image_Entry *deie = (DirectFB_Engine_Image_Entry *)eie; | ||
500 | |||
501 | if (!deie->flags.engine_surface) | ||
502 | _dfb_surface_free(deie->surface); | ||
503 | deie->surface = NULL; | ||
504 | } | ||
505 | |||
506 | /* note: dst have some properties set, like desired size (w, h) */ | ||
507 | static int | ||
508 | _cache_image_copy(Engine_Image_Entry *dst, const Engine_Image_Entry *src) | ||
509 | { | ||
510 | DirectFB_Engine_Image_Entry *dst_deie; | ||
511 | const DirectFB_Engine_Image_Entry *src_deie; | ||
512 | IDirectFBSurface *s; | ||
513 | RGBA_Image *im; | ||
514 | |||
515 | dst_deie = (DirectFB_Engine_Image_Entry *)dst; | ||
516 | src_deie = (const DirectFB_Engine_Image_Entry *)src; | ||
517 | im = (RGBA_Image *)dst->src; | ||
518 | s = _dfb_surface_from_data(dfb, dst->w, dst->h, im->image.data); | ||
519 | if (!s) | ||
520 | return -1; | ||
521 | |||
522 | dst_deie->surface = s; | ||
523 | dst_deie->flags.engine_surface = 0; | ||
524 | |||
525 | return 0; | ||
526 | } | ||
527 | |||
528 | static int | ||
529 | evas_cache_image_dfb_dirty(Engine_Image_Entry *dst, const Engine_Image_Entry *src) | ||
530 | { | ||
531 | return _cache_image_copy(dst, src); | ||
532 | } | ||
533 | |||
534 | static void | ||
535 | evas_cache_image_dfb_dirty_region(Engine_Image_Entry *eim, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) | ||
536 | { | ||
537 | RGBA_Image *im; | ||
538 | |||
539 | im = (RGBA_Image *)eim->src; | ||
540 | im->flags |= RGBA_IMAGE_IS_DIRTY; | ||
541 | } | ||
542 | |||
543 | static int | ||
544 | evas_cache_image_dfb_update_data(Engine_Image_Entry *dst, void *engine_data) | ||
545 | { | ||
546 | DirectFB_Engine_Image_Entry *deie = (DirectFB_Engine_Image_Entry *)dst; | ||
547 | IDirectFBSurface *s = engine_data; | ||
548 | Image_Entry *ie; | ||
549 | RGBA_Image *im; | ||
550 | |||
551 | ie = dst->src; | ||
552 | im = (RGBA_Image *)ie; | ||
553 | |||
554 | if (s) | ||
555 | { | ||
556 | deie->surface = s; | ||
557 | |||
558 | /* XXX why size is required here? */ | ||
559 | s->GetSize(s, &dst->w, &dst->h); | ||
560 | |||
561 | if (im) | ||
562 | { | ||
563 | im->image.data = NULL; /* IDirectFBSurface requires lock */ | ||
564 | im->image.no_free = 1; | ||
565 | ie->w = dst->w; | ||
566 | ie->h = dst->h; | ||
567 | _image_autoset_alpha(deie); | ||
568 | } | ||
569 | } | ||
570 | else | ||
571 | { | ||
572 | _dfb_surface_free(deie->surface); | ||
573 | s = _dfb_surface_from_data(dfb, dst->w, dst->h, im->image.data); | ||
574 | deie->surface = s; | ||
575 | } | ||
576 | |||
577 | return 0; | ||
578 | } | ||
579 | |||
580 | static int | ||
581 | evas_cache_image_dfb_size_set(Engine_Image_Entry *dst, const Engine_Image_Entry *src) | ||
582 | { | ||
583 | return _cache_image_copy(dst, src); | ||
584 | } | ||
585 | |||
586 | static void | ||
587 | evas_cache_image_dfb_load(Engine_Image_Entry *eim, const Image_Entry *ie) | ||
588 | { | ||
589 | DirectFB_Engine_Image_Entry *deie = (DirectFB_Engine_Image_Entry *)eim; | ||
590 | IDirectFBSurface *s; | ||
591 | const RGBA_Image *im; | ||
592 | |||
593 | if (deie->surface) | ||
594 | return; | ||
595 | |||
596 | im = (const RGBA_Image *)ie; | ||
597 | s = _dfb_surface_from_data(dfb, eim->w, eim->h, im->image.data); | ||
598 | deie->surface = s; | ||
599 | } | ||
600 | |||
601 | static int | ||
602 | evas_cache_image_dfb_mem_size_get(Engine_Image_Entry *eie) | ||
603 | { | ||
604 | DirectFB_Engine_Image_Entry *deie = (DirectFB_Engine_Image_Entry *)eie; | ||
605 | DFBResult r; | ||
606 | int size, w, h; | ||
607 | |||
608 | if (!deie->surface) | ||
609 | return 0; | ||
610 | |||
611 | size = sizeof(*deie->surface); | ||
612 | |||
613 | r = deie->surface->GetSize(deie->surface, &w, &h); | ||
614 | if (r != DFB_OK) | ||
615 | { | ||
616 | ERR("Could not get surface size: %s", | ||
617 | DirectFBErrorString(r)); | ||
618 | return size; | ||
619 | } | ||
620 | |||
621 | size += w * h * 4; // XXX get correct surface size using pixelformat | ||
622 | |||
623 | return size; | ||
624 | } | ||
625 | |||
626 | #ifdef DFB_DEBUG_IMAGE | ||
627 | static void | ||
628 | evas_cache_image_dfb_debug(const char *context, Engine_Image_Entry* eie) | ||
629 | { | ||
630 | DirectFB_Engine_Image_Entry *eim = (DirectFB_Engine_Image_Entry *)eie; | ||
631 | |||
632 | DBG("*** %s image (%p) ***", context, eim); | ||
633 | if (eim) | ||
634 | { | ||
635 | DBG("W: %d, H: %d, R: %d, Key: %s, DFB Surface: %p", | ||
636 | eie->w, eie->h, eie->references, eie->cache_key, eim->surface); | ||
637 | |||
638 | if (eie->src) | ||
639 | DBG("Pixels: %p", ((RGBA_Image*) eie->src)->image.data); | ||
640 | } | ||
641 | DBG("*** ***"); | ||
642 | } | ||
643 | #endif | ||
644 | |||
645 | static const Evas_Cache_Engine_Image_Func _dfb_cache_engine_image_cb = { | ||
646 | NULL /* key */, | ||
647 | evas_cache_image_dfb_alloc /* alloc */, | ||
648 | evas_cache_image_dfb_delete /* dealloc */, | ||
649 | evas_cache_image_dfb_constructor /* constructor */, | ||
650 | evas_cache_image_dfb_destructor /* destructor */, | ||
651 | evas_cache_image_dfb_dirty_region /* dirty_region */, | ||
652 | evas_cache_image_dfb_dirty /* dirty */, | ||
653 | evas_cache_image_dfb_size_set /* size_set */, | ||
654 | evas_cache_image_dfb_update_data /* update_data */, | ||
655 | evas_cache_image_dfb_load /* load */, | ||
656 | evas_cache_image_dfb_mem_size_get /* mem_size_get */, | ||
657 | #ifdef DFB_DEBUG_IMAGE /* debug */ | ||
658 | evas_cache_image_dfb_debug | ||
659 | #else | ||
660 | NULL | ||
661 | #endif | ||
662 | }; | ||
663 | |||
664 | |||
665 | /*********************************************************************** | ||
666 | * Evas Engine | ||
667 | **********************************************************************/ | ||
668 | static void * | ||
669 | evas_engine_dfb_info(Evas* e __UNUSED__) | ||
670 | { | ||
671 | Evas_Engine_Info_DirectFB *info; | ||
672 | info = calloc(1, sizeof(Evas_Engine_Info_DirectFB)); | ||
673 | if (!info) | ||
674 | return NULL; | ||
675 | info->magic.magic = rand(); | ||
676 | return info; | ||
677 | } | ||
678 | |||
679 | static void | ||
680 | evas_engine_dfb_info_free(Evas *e __UNUSED__, void *in) | ||
681 | { | ||
682 | Evas_Engine_Info_DirectFB *info = in; | ||
683 | free(info); | ||
684 | } | ||
685 | |||
686 | static Eina_Bool | ||
687 | _is_dfb_data_ok(IDirectFB *idfb, IDirectFBSurface *surface, int w, int h) | ||
688 | { | ||
689 | DFBResult r; | ||
690 | int sw, sh; | ||
691 | |||
692 | if (!idfb) | ||
693 | { | ||
694 | ERR("missing IDirectFB"); | ||
695 | return EINA_FALSE; | ||
696 | } | ||
697 | dfb = idfb; | ||
698 | |||
699 | if (!surface) | ||
700 | { | ||
701 | ERR("missing IDirectFBSurface"); | ||
702 | return EINA_FALSE; | ||
703 | } | ||
704 | |||
705 | r = surface->GetSize(surface, &sw, &sh); | ||
706 | if (r != DFB_OK) | ||
707 | { | ||
708 | ERR("Could not get surface %p size: %s", | ||
709 | surface, DirectFBErrorString(r)); | ||
710 | return EINA_FALSE; | ||
711 | } | ||
712 | |||
713 | if ((w > sw) || (h > sh)) | ||
714 | { | ||
715 | ERR("Requested size is larger than surface: %dx%d > %dx%d", | ||
716 | w, h, sw, sh); | ||
717 | return EINA_FALSE; | ||
718 | } | ||
719 | else if ((w <= 0) || (h <= 0)) | ||
720 | { | ||
721 | w = sw; | ||
722 | h = sh; | ||
723 | } | ||
724 | |||
725 | return EINA_TRUE; | ||
726 | } | ||
727 | |||
728 | static void | ||
729 | _evas_common_init(void) | ||
730 | { | ||
731 | evas_common_cpu_init(); | ||
732 | evas_common_blend_init(); | ||
733 | evas_common_image_init(); | ||
734 | evas_common_convert_init(); | ||
735 | evas_common_scale_init(); | ||
736 | evas_common_rectangle_init(); | ||
737 | evas_common_polygon_init(); | ||
738 | evas_common_line_init(); | ||
739 | evas_common_font_init(); | ||
740 | evas_common_draw_init(); | ||
741 | evas_common_tilebuf_init(); | ||
742 | } | ||
743 | |||
744 | static int | ||
745 | evas_engine_dfb_output_reconfigure(Render_Engine *re, int w, int h) | ||
746 | { | ||
747 | if (re->screen_image) | ||
748 | evas_cache_engine_image_drop(&re->screen_image->cache_entry); | ||
749 | |||
750 | if (re->tb) | ||
751 | evas_common_tilebuf_free(re->tb); | ||
752 | |||
753 | re->tb = evas_common_tilebuf_new(w, h); | ||
754 | if (!re->tb) | ||
755 | { | ||
756 | ERR("Could not allocate tile buffer."); | ||
757 | goto failed_tilebuf; | ||
758 | } | ||
759 | evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); | ||
760 | |||
761 | /* We create a "fake" RGBA_Image which points to the IDirectFB surface. | ||
762 | * Each access to that surface is wrapped in Lock / Unlock calls whenever | ||
763 | * the data is manipulated directly. | ||
764 | */ | ||
765 | re->screen_image = (DirectFB_Engine_Image_Entry *) | ||
766 | evas_cache_engine_image_engine(re->cache, re->spec->surface); | ||
767 | if (!re->screen_image) | ||
768 | { | ||
769 | ERR("RGBA_Image allocation from DFB failed"); | ||
770 | goto failed_image; | ||
771 | } | ||
772 | re->screen_image->flags.engine_surface = 1; | ||
773 | |||
774 | _image_autoset_alpha(re->screen_image); | ||
775 | _image_clear(re->screen_image, 0, 0, w, h); | ||
776 | |||
777 | return 1; | ||
778 | |||
779 | failed_image: | ||
780 | evas_common_tilebuf_free(re->tb); | ||
781 | re->tb = NULL; | ||
782 | failed_tilebuf: | ||
783 | re->screen_image = NULL; | ||
784 | ERR("Evas DirectFB reconfigure failed"); | ||
785 | return 0; | ||
786 | } | ||
787 | |||
788 | static void * | ||
789 | _dfb_output_setup(int w, int h, const struct Evas_Engine_DirectFB_Spec *spec) | ||
790 | { | ||
791 | Render_Engine *re; | ||
792 | |||
793 | if (!_is_dfb_data_ok(spec->dfb, spec->surface, w, h)) | ||
794 | goto fatal; | ||
795 | |||
796 | _evas_common_init(); | ||
797 | |||
798 | re = calloc(1, sizeof(Render_Engine)); | ||
799 | if (!re) | ||
800 | { | ||
801 | perror("calloc"); | ||
802 | goto fatal; | ||
803 | } | ||
804 | re->dfb = spec->dfb; | ||
805 | re->spec = spec; | ||
806 | re->cache = evas_cache_engine_image_init(&_dfb_cache_engine_image_cb, | ||
807 | evas_common_image_cache_get()); | ||
808 | if (!re->cache) | ||
809 | { | ||
810 | ERR("Evas_Cache_Engine_Image allocation failed!"); | ||
811 | goto fatal_after_engine; | ||
812 | } | ||
813 | |||
814 | if (!evas_engine_dfb_output_reconfigure(re, w, h)) | ||
815 | { | ||
816 | ERR("Could not reconfigure evas engine."); | ||
817 | goto fatal_after_reconfigure; | ||
818 | } | ||
819 | |||
820 | _dfb_blit_accel_caps_print(spec->surface, NULL); | ||
821 | |||
822 | return re; | ||
823 | |||
824 | |||
825 | fatal_after_reconfigure: | ||
826 | evas_cache_engine_image_shutdown(re->cache); | ||
827 | fatal_after_engine: | ||
828 | free(re); | ||
829 | fatal: | ||
830 | CRIT("DirectFB: unable to continue, abort()!"); | ||
831 | abort(); | ||
832 | return NULL; | ||
833 | } | ||
834 | |||
835 | static int | ||
836 | evas_engine_dfb_setup(Evas *e, void *in) | ||
837 | { | ||
838 | Evas_Engine_Info_DirectFB *info = in; | ||
839 | |||
840 | if (!e->engine.data.output) | ||
841 | e->engine.data.output = _dfb_output_setup(e->output.w, e->output.h, | ||
842 | &info->info); | ||
843 | // XXX TODO: else reconfigure existing... | ||
844 | |||
845 | if (!e->engine.data.output) | ||
846 | return 0; | ||
847 | |||
848 | if (!e->engine.data.context) | ||
849 | e->engine.data.context = | ||
850 | e->engine.func->context_new(e->engine.data.output); | ||
851 | |||
852 | return 1; | ||
853 | } | ||
854 | |||
855 | static void | ||
856 | evas_engine_dfb_output_free(void *data) | ||
857 | { | ||
858 | Render_Engine *re = data; | ||
859 | |||
860 | if (!re) | ||
861 | return; | ||
862 | |||
863 | if (re->cache) | ||
864 | evas_cache_engine_image_shutdown(re->cache); | ||
865 | |||
866 | evas_common_tilebuf_free(re->tb); | ||
867 | if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); | ||
868 | free(re); | ||
869 | |||
870 | evas_common_font_shutdown(); | ||
871 | evas_common_image_shutdown(); | ||
872 | } | ||
873 | |||
874 | static void | ||
875 | evas_engine_dfb_output_resize(void *data, int w, int h) | ||
876 | { | ||
877 | if (!evas_engine_dfb_output_reconfigure(data, w, h)) | ||
878 | ERR("Failed to resize DirectFB evas"); | ||
879 | } | ||
880 | |||
881 | static void | ||
882 | evas_engine_dfb_output_tile_size_set(void *data, int w, int h) | ||
883 | { | ||
884 | Render_Engine *re = data; | ||
885 | |||
886 | evas_common_tilebuf_set_tile_size(re->tb, w, h); | ||
887 | } | ||
888 | |||
889 | static void | ||
890 | evas_engine_dfb_output_redraws_rect_add(void *data, int x, int y, int w, int h) | ||
891 | { | ||
892 | Render_Engine *re = data; | ||
893 | |||
894 | evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); | ||
895 | } | ||
896 | |||
897 | static void | ||
898 | evas_engine_dfb_output_redraws_rect_del(void *data, int x, int y, int w, int h) | ||
899 | { | ||
900 | Render_Engine *re = data; | ||
901 | |||
902 | evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); | ||
903 | } | ||
904 | |||
905 | static void | ||
906 | evas_engine_dfb_output_redraws_clear(void *data) | ||
907 | { | ||
908 | Render_Engine *re = data; | ||
909 | |||
910 | evas_common_tilebuf_clear(re->tb); | ||
911 | } | ||
912 | |||
913 | static void * | ||
914 | evas_engine_dfb_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) | ||
915 | { | ||
916 | Render_Engine *re = data; | ||
917 | Tilebuf_Rect *tb_rect; | ||
918 | |||
919 | if (re->end) | ||
920 | { | ||
921 | re->end = 0; | ||
922 | return NULL; | ||
923 | } | ||
924 | if (!re->rects) | ||
925 | { | ||
926 | re->rects = evas_common_tilebuf_get_render_rects(re->tb); | ||
927 | re->cur_rect = EINA_INLIST_GET(re->rects); | ||
928 | } | ||
929 | if (!re->cur_rect) | ||
930 | return NULL; | ||
931 | |||
932 | tb_rect = (Tilebuf_Rect*) re->cur_rect; | ||
933 | *cx = *x = tb_rect->x; | ||
934 | *cy = *y = tb_rect->y; | ||
935 | *cw = *w = tb_rect->w; | ||
936 | *ch = *h = tb_rect->h; | ||
937 | re->cur_rect = re->cur_rect->next; | ||
938 | if (!re->cur_rect) | ||
939 | { | ||
940 | evas_common_tilebuf_free_render_rects(re->rects); | ||
941 | re->rects = NULL; | ||
942 | re->end = 1; | ||
943 | } | ||
944 | |||
945 | return re->screen_image; | ||
946 | } | ||
947 | |||
948 | static void | ||
949 | evas_engine_dfb_output_redraws_next_update_push(void *data, void *surface __UNUSED__, int x, int y, int w, int h) | ||
950 | { | ||
951 | Render_Engine *re = data; | ||
952 | DFBRegion *r; | ||
953 | |||
954 | if (re->update_regions_count >= re->update_regions_limit) | ||
955 | { | ||
956 | void *tmp; | ||
957 | |||
958 | re->update_regions_limit += 16; | ||
959 | |||
960 | tmp = realloc(re->update_regions, | ||
961 | sizeof(DFBRegion) * re->update_regions_limit); | ||
962 | if (!tmp) | ||
963 | { | ||
964 | perror("realloc"); | ||
965 | return; | ||
966 | } | ||
967 | re->update_regions = tmp; | ||
968 | } | ||
969 | |||
970 | r = re->update_regions + re->update_regions_count; | ||
971 | re->update_regions_count++; | ||
972 | |||
973 | r->x1 = x; | ||
974 | r->y1 = y; | ||
975 | r->x2 = x + w - 1; | ||
976 | r->y2 = y + h - 1; | ||
977 | } | ||
978 | |||
979 | static void | ||
980 | evas_engine_dfb_output_flush(void *data) | ||
981 | { | ||
982 | Render_Engine *re = data; | ||
983 | IDirectFBSurface *s = re->screen_image->surface; | ||
984 | DFBRegion *r, *r_end; | ||
985 | |||
986 | r = re->update_regions; | ||
987 | r_end = re->update_regions + re->update_regions_count; | ||
988 | |||
989 | #ifdef DFB_UPDATE_INDIVIDUAL_RECTS | ||
990 | for (; r < r_end; r++) | ||
991 | s->Flip(s, r, DFB_FLIP_FLAGS); | ||
992 | #else | ||
993 | DFBRegion bb; | ||
994 | |||
995 | bb.x1 = bb.y1 = 10000; | ||
996 | bb.x2 = bb.y2 = 0; | ||
997 | for (; r < r_end; r++) | ||
998 | { | ||
999 | if (bb.x1 > r->x1) | ||
1000 | bb.x1 = r->x1; | ||
1001 | if (bb.y1 > r->y1) | ||
1002 | bb.y1 = r->y1; | ||
1003 | |||
1004 | if (bb.x2 < r->x2) | ||
1005 | bb.x2 = r->x2; | ||
1006 | if (bb.y2 < r->y2) | ||
1007 | bb.y2 = r->y2; | ||
1008 | } | ||
1009 | |||
1010 | s->Flip(s, &bb, DFB_FLIP_FLAGS); | ||
1011 | #endif | ||
1012 | |||
1013 | re->update_regions_count = 0; | ||
1014 | } | ||
1015 | |||
1016 | static void | ||
1017 | evas_engine_dfb_output_idle_flush(void *data) | ||
1018 | { | ||
1019 | Render_Engine *re = data; | ||
1020 | |||
1021 | if (re->update_regions_count != 0) | ||
1022 | ERR("update_regions_count not 0 as it should be!"); | ||
1023 | |||
1024 | free(re->update_regions); | ||
1025 | re->update_regions_count = 0; | ||
1026 | re->update_regions_limit = 0; | ||
1027 | re->update_regions = NULL; | ||
1028 | } | ||
1029 | |||
1030 | /* HACK!!! -- KLUDGE!!! | ||
1031 | * | ||
1032 | * This should really use IDirectFBFont and IDirectFBSurface::DrawString(), | ||
1033 | * but to be edje-compatible IDirectFBFont::CreateFont() should be able to | ||
1034 | * load fonts from non-files, which it does not. | ||
1035 | * | ||
1036 | * Try to find a way to create own IDirectFBFont in future and load from | ||
1037 | * memory. | ||
1038 | */ | ||
1039 | static void | ||
1040 | evas_engine_dfb_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props) | ||
1041 | { | ||
1042 | DirectFB_Engine_Image_Entry *eim = surface; | ||
1043 | IDirectFBSurface *screen; | ||
1044 | Render_Engine *re = data; | ||
1045 | RGBA_Image *im; | ||
1046 | |||
1047 | im = (RGBA_Image *)eim->cache_entry.src; | ||
1048 | screen = eim->surface; | ||
1049 | if (!_dfb_lock_and_sync_image(screen, im, DSLF_READ | DSLF_WRITE)) | ||
1050 | return; | ||
1051 | |||
1052 | evas_common_font_draw(im, context, font, x, y, intl_props); | ||
1053 | evas_common_cpu_end_opt(); | ||
1054 | |||
1055 | im->image.data = NULL; | ||
1056 | |||
1057 | screen->Unlock(screen); | ||
1058 | } | ||
1059 | |||
1060 | |||
1061 | static void | ||
1062 | _cb_draw_line(IDirectFBSurface *surface, RGBA_Draw_Context *dc __UNUSED__, const DFBRegion *region __UNUSED__, void *data) | ||
1063 | { | ||
1064 | const Eina_Rectangle *r = data; | ||
1065 | |||
1066 | surface->DrawLine(surface, r->x, r->y, r->w, r->h); /* x2, y2 really */ | ||
1067 | } | ||
1068 | |||
1069 | static void | ||
1070 | evas_engine_dfb_line_draw(void *data __UNUSED__, void *context, void *surface, int x1, int y1, int x2, int y2) | ||
1071 | { | ||
1072 | DirectFB_Engine_Image_Entry *eim = surface; | ||
1073 | Eina_Rectangle r; | ||
1074 | |||
1075 | if (!_dfb_surface_set_color_from_context(eim->surface, context)) | ||
1076 | return; | ||
1077 | |||
1078 | EINA_RECTANGLE_SET(&r, x1, y1, x2, y2); /* x2, y2 (ab)used as w, h */ | ||
1079 | _dfb_surface_for_each_cutout(eim->surface, context, _cb_draw_line, &r); | ||
1080 | } | ||
1081 | |||
1082 | #ifndef DFB_USE_EVAS_RECT_DRAW | ||
1083 | static void | ||
1084 | _cb_draw_rectangle(IDirectFBSurface *surface, RGBA_Draw_Context *dc __UNUSED__, const DFBRegion *region __UNUSED__, void *data) | ||
1085 | { | ||
1086 | const Eina_Rectangle *r = data; | ||
1087 | |||
1088 | surface->FillRectangle(surface, r->x, r->y, r->w, r->h); | ||
1089 | } | ||
1090 | |||
1091 | static void | ||
1092 | evas_engine_dfb_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h) | ||
1093 | { | ||
1094 | DirectFB_Engine_Image_Entry *eim = surface; | ||
1095 | IDirectFBSurface *screen; | ||
1096 | Render_Engine *re = data; | ||
1097 | RGBA_Draw_Context *dc = context; | ||
1098 | Eina_Rectangle r; | ||
1099 | |||
1100 | screen = eim->surface; | ||
1101 | if (!_dfb_surface_set_color_from_context(screen, context)) | ||
1102 | { | ||
1103 | if (dc->render_op != EVAS_RENDER_COPY) | ||
1104 | return; | ||
1105 | if (!eim->cache_entry.src->flags.alpha) | ||
1106 | return; | ||
1107 | screen->SetColor(screen, 0, 0, 0, 0); | ||
1108 | screen->SetDrawingFlags(screen, DSDRAW_NOFX); | ||
1109 | } | ||
1110 | |||
1111 | EINA_RECTANGLE_SET(&r, x, y, w, h); | ||
1112 | _dfb_surface_for_each_cutout(screen, context, _cb_draw_rectangle, &r); | ||
1113 | } | ||
1114 | #else | ||
1115 | static void | ||
1116 | evas_engine_dfb_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h) | ||
1117 | { | ||
1118 | DirectFB_Engine_Image_Entry *eim = surface; | ||
1119 | IDirectFBSurface *screen; | ||
1120 | Render_Engine *re = data; | ||
1121 | RGBA_Image *dst; | ||
1122 | |||
1123 | dst = (RGBA_Image *)eim->cache_entry.src; | ||
1124 | screen = eim->surface; | ||
1125 | if (!_dfb_lock_and_sync_image(screen, dst, DSLF_READ | DSLF_WRITE)) | ||
1126 | return; | ||
1127 | |||
1128 | evas_common_rectangle_draw(dst, context, x, y, w, h); | ||
1129 | evas_common_cpu_end_opt(); | ||
1130 | |||
1131 | dst->image.data = NULL; | ||
1132 | |||
1133 | screen->Unlock(screen); | ||
1134 | } | ||
1135 | #endif | ||
1136 | |||
1137 | #ifndef DFB_USE_EVAS_POLYGON_DRAW | ||
1138 | static void | ||
1139 | evas_engine_dfb_polygon_draw(void *data __UNUSED__, void *context, void *surface, void *polygon, int x, int y) | ||
1140 | { | ||
1141 | DirectFB_Engine_Image_Entry *eim = surface; | ||
1142 | _dfb_polygon_draw(eim->surface, context, polygon, x, y); | ||
1143 | } | ||
1144 | #else | ||
1145 | static void | ||
1146 | evas_engine_dfb_polygon_draw(void *data, void *context, void *surface, void *polygon, int x, int y) | ||
1147 | { | ||
1148 | DirectFB_Engine_Image_Entry *eim = surface; | ||
1149 | IDirectFBSurface *screen; | ||
1150 | Render_Engine *re = data; | ||
1151 | RGBA_Image *dst; | ||
1152 | |||
1153 | dst = (RGBA_Image *)eim->cache_entry.src; | ||
1154 | screen = eim->surface; | ||
1155 | if (!_dfb_lock_and_sync_image(screen, dst, DSLF_READ | DSLF_WRITE)) | ||
1156 | return; | ||
1157 | |||
1158 | evas_common_polygon_draw(dst, context, polygon, x, y); | ||
1159 | evas_common_cpu_end_opt(); | ||
1160 | |||
1161 | dst->image.data = NULL; | ||
1162 | |||
1163 | screen->Unlock(screen); | ||
1164 | } | ||
1165 | #endif | ||
1166 | |||
1167 | /** Image Object *******************************************************/ | ||
1168 | static void * | ||
1169 | evas_engine_dfb_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) | ||
1170 | { | ||
1171 | Render_Engine *re = data; | ||
1172 | |||
1173 | *error = 0; | ||
1174 | return evas_cache_engine_image_request(re->cache, file, key, lo, | ||
1175 | data, error); | ||
1176 | } | ||
1177 | |||
1178 | static int | ||
1179 | evas_engine_dfb_image_alpha_get(void *data __UNUSED__, void *image) | ||
1180 | { | ||
1181 | DirectFB_Engine_Image_Entry *eim = image; | ||
1182 | Image_Entry *ie; | ||
1183 | RGBA_Image *im; | ||
1184 | |||
1185 | if (!eim) return 1; | ||
1186 | ie = eim->cache_entry.src; | ||
1187 | im = (RGBA_Image *)ie; | ||
1188 | switch (ie->space) | ||
1189 | { | ||
1190 | case EVAS_COLORSPACE_ARGB8888: | ||
1191 | if (ie->flags.alpha) return 1; | ||
1192 | default: | ||
1193 | break; | ||
1194 | } | ||
1195 | return 0; | ||
1196 | } | ||
1197 | |||
1198 | static void | ||
1199 | evas_engine_dfb_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) | ||
1200 | { | ||
1201 | DirectFB_Engine_Image_Entry *eim = image; | ||
1202 | Image_Entry *ie; | ||
1203 | |||
1204 | ie = eim->cache_entry.src; | ||
1205 | if (w) *w = ie->w; | ||
1206 | if (h) *h = ie->h; | ||
1207 | } | ||
1208 | |||
1209 | static int | ||
1210 | evas_engine_dfb_image_colorspace_get(void *data __UNUSED__, void *image) | ||
1211 | { | ||
1212 | DirectFB_Engine_Image_Entry *eim = image; | ||
1213 | |||
1214 | if (!eim) return EVAS_COLORSPACE_ARGB8888; | ||
1215 | return eim->cache_entry.src->space; | ||
1216 | } | ||
1217 | |||
1218 | static void | ||
1219 | evas_engine_dfb_image_colorspace_set(void *data, void *image, int cspace) | ||
1220 | { | ||
1221 | DirectFB_Engine_Image_Entry *eim = image; | ||
1222 | |||
1223 | if (!eim) return; | ||
1224 | if (eim->cache_entry.src->space == cspace) return; | ||
1225 | |||
1226 | evas_cache_engine_image_colorspace(&eim->cache_entry, cspace, data); | ||
1227 | } | ||
1228 | |||
1229 | static void * | ||
1230 | evas_engine_dfb_image_new_from_copied_data(void *data, int w, int h, DATA32* image_data, int alpha, int cspace) | ||
1231 | { | ||
1232 | Render_Engine *re = data; | ||
1233 | |||
1234 | return evas_cache_engine_image_copied_data(re->cache, w, h, image_data, | ||
1235 | alpha, cspace, NULL); | ||
1236 | } | ||
1237 | |||
1238 | static void * | ||
1239 | evas_engine_dfb_image_new_from_data(void *data, int w, int h, DATA32* image_data, int alpha, int cspace) | ||
1240 | { | ||
1241 | Render_Engine *re = data; | ||
1242 | |||
1243 | return evas_cache_engine_image_data(re->cache, w, h, image_data, | ||
1244 | alpha, cspace, NULL); | ||
1245 | } | ||
1246 | |||
1247 | static void | ||
1248 | evas_engine_dfb_image_free(void *data __UNUSED__, void *image) | ||
1249 | { | ||
1250 | DirectFB_Engine_Image_Entry *eim = image; | ||
1251 | |||
1252 | evas_cache_engine_image_drop(&eim->cache_entry); | ||
1253 | } | ||
1254 | |||
1255 | static void * | ||
1256 | evas_engine_dfb_image_size_set(void *data __UNUSED__, void *image, int w, int h) | ||
1257 | { | ||
1258 | DirectFB_Engine_Image_Entry *eim = image; | ||
1259 | |||
1260 | return evas_cache_engine_image_size_set(&eim->cache_entry, w, h); | ||
1261 | } | ||
1262 | |||
1263 | static void * | ||
1264 | evas_engine_dfb_image_dirty_region(void *data __UNUSED__, void *image, int x, int y, int w, int h) | ||
1265 | { | ||
1266 | DirectFB_Engine_Image_Entry *eim = image; | ||
1267 | |||
1268 | return evas_cache_engine_image_dirty(&eim->cache_entry, x, y, w, h); | ||
1269 | } | ||
1270 | |||
1271 | static void * | ||
1272 | evas_engine_dfb_image_data_get(void *data __UNUSED__, void *image, int to_write, DATA32** image_data) | ||
1273 | { | ||
1274 | DirectFB_Engine_Image_Entry *deie = image; | ||
1275 | Engine_Image_Entry *ce; | ||
1276 | Image_Entry *ie; | ||
1277 | RGBA_Image *im; | ||
1278 | |||
1279 | if (!deie) | ||
1280 | { | ||
1281 | *image_data = NULL; | ||
1282 | return NULL; | ||
1283 | } | ||
1284 | |||
1285 | ce = (Engine_Image_Entry *)deie; | ||
1286 | ie = ce->src; | ||
1287 | im = (RGBA_Image *)ie; | ||
1288 | |||
1289 | switch (ie->space) | ||
1290 | { | ||
1291 | case EVAS_COLORSPACE_ARGB8888: | ||
1292 | { | ||
1293 | DFBResult r; | ||
1294 | IDirectFBSurface *s; | ||
1295 | void *pixels; | ||
1296 | int pitch; | ||
1297 | |||
1298 | if (to_write) | ||
1299 | deie = (DirectFB_Engine_Image_Entry *) | ||
1300 | evas_cache_engine_image_dirty(ce, 0, 0, ie->w, ie->h); | ||
1301 | |||
1302 | evas_cache_engine_image_load_data(ce); | ||
1303 | |||
1304 | ce = (Engine_Image_Entry *)deie; | ||
1305 | ie = ce->src; | ||
1306 | im = (RGBA_Image *)ie; | ||
1307 | s = deie->surface; | ||
1308 | |||
1309 | if (to_write) | ||
1310 | { | ||
1311 | r = s->Lock(s, DSLF_WRITE, &pixels, &pitch); | ||
1312 | if (r != DFB_OK) | ||
1313 | goto error; | ||
1314 | deie->flags.is_locked = 1; | ||
1315 | } | ||
1316 | else | ||
1317 | { | ||
1318 | r = s->Lock(s, DSLF_READ, &pixels, &pitch); | ||
1319 | if (r != DFB_OK) | ||
1320 | goto error; | ||
1321 | s->Unlock(s); | ||
1322 | } | ||
1323 | |||
1324 | *image_data = pixels; | ||
1325 | im->image.data = pixels; /* remember for _put() */ | ||
1326 | break; | ||
1327 | |||
1328 | error: | ||
1329 | ERR("Could not lock surface %p: %s", | ||
1330 | s, DirectFBErrorString(r)); | ||
1331 | *image_data = NULL; | ||
1332 | break; | ||
1333 | } | ||
1334 | case EVAS_COLORSPACE_YCBCR422P709_PL: | ||
1335 | case EVAS_COLORSPACE_YCBCR422P601_PL: | ||
1336 | case EVAS_COLORSPACE_YCBCR422601_PL: | ||
1337 | /* XXX untested */ | ||
1338 | *image_data = im->cs.data; | ||
1339 | break; | ||
1340 | default: | ||
1341 | abort(); | ||
1342 | break; | ||
1343 | } | ||
1344 | return deie; | ||
1345 | } | ||
1346 | |||
1347 | static void * | ||
1348 | evas_engine_dfb_image_data_put(void *data, void *image, DATA32* image_data) | ||
1349 | { | ||
1350 | DirectFB_Engine_Image_Entry *deie = image; | ||
1351 | Render_Engine *re = data; | ||
1352 | Engine_Image_Entry *ce; | ||
1353 | Image_Entry *ie; | ||
1354 | RGBA_Image *im; | ||
1355 | |||
1356 | if (!deie) return NULL; | ||
1357 | |||
1358 | ce = (Engine_Image_Entry *)deie; | ||
1359 | ie = ce->src; | ||
1360 | im = (RGBA_Image*)ie; | ||
1361 | |||
1362 | switch (ie->space) | ||
1363 | { | ||
1364 | case EVAS_COLORSPACE_ARGB8888: | ||
1365 | if (image_data == im->image.data) | ||
1366 | { | ||
1367 | if (deie->flags.is_locked) | ||
1368 | { | ||
1369 | deie->surface->Unlock(deie->surface); | ||
1370 | deie->flags.is_locked = 0; | ||
1371 | } | ||
1372 | } | ||
1373 | else | ||
1374 | { | ||
1375 | int alpha, cspace; | ||
1376 | |||
1377 | alpha = func.image_alpha_get(re, deie); | ||
1378 | cspace = func.image_colorspace_get(re, deie); | ||
1379 | |||
1380 | evas_cache_engine_image_drop(ce); | ||
1381 | deie = (DirectFB_Engine_Image_Entry *) | ||
1382 | evas_cache_engine_image_data(re->cache, ce->w, ce->h, | ||
1383 | image_data, alpha, cspace, NULL); | ||
1384 | } | ||
1385 | break; | ||
1386 | case EVAS_COLORSPACE_YCBCR422P601_PL: | ||
1387 | case EVAS_COLORSPACE_YCBCR422P709_PL: | ||
1388 | case EVAS_COLORSPACE_YCBCR422601_PL: | ||
1389 | /* XXX untested */ | ||
1390 | if (image_data != im->cs.data) | ||
1391 | { | ||
1392 | if (im->cs.data) | ||
1393 | if (!im->cs.no_free) | ||
1394 | free(im->cs.data); | ||
1395 | im->cs.data = image_data; | ||
1396 | evas_common_image_colorspace_dirty(im); | ||
1397 | } | ||
1398 | break; | ||
1399 | default: | ||
1400 | abort(); | ||
1401 | break; | ||
1402 | } | ||
1403 | return deie; | ||
1404 | } | ||
1405 | |||
1406 | static void | ||
1407 | evas_engine_dfb_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) | ||
1408 | { | ||
1409 | DirectFB_Engine_Image_Entry *deie = image; | ||
1410 | RGBA_Image *im; | ||
1411 | |||
1412 | if (!deie) return ; | ||
1413 | im = (RGBA_Image*) deie->cache_entry.src; | ||
1414 | if (!im) return ; | ||
1415 | evas_cache_image_preload_data(&im->cache_entry, target); | ||
1416 | } | ||
1417 | |||
1418 | static void | ||
1419 | evas_engine_dfb_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) | ||
1420 | { | ||
1421 | DirectFB_Engine_Image_Entry *deie = image; | ||
1422 | RGBA_Image *im; | ||
1423 | |||
1424 | if (!deie) return ; | ||
1425 | im = (RGBA_Image*) deie->cache_entry.src; | ||
1426 | if (!im) return ; | ||
1427 | evas_cache_image_preload_cancel(&im->cache_entry, target); | ||
1428 | } | ||
1429 | |||
1430 | static void * | ||
1431 | evas_engine_dfb_image_alpha_set(void *data __UNUSED__, void *image, int has_alpha) | ||
1432 | { | ||
1433 | DirectFB_Engine_Image_Entry *eim = image; | ||
1434 | Engine_Image_Entry *ce; | ||
1435 | Image_Entry *ie; | ||
1436 | RGBA_Image *im; | ||
1437 | |||
1438 | if (!eim) return NULL; | ||
1439 | |||
1440 | ce = &eim->cache_entry; | ||
1441 | ie = ce->src; | ||
1442 | im = (RGBA_Image*)ie; | ||
1443 | |||
1444 | if (ie->space != EVAS_COLORSPACE_ARGB8888) | ||
1445 | { | ||
1446 | ie->flags.alpha = 0; | ||
1447 | return eim; | ||
1448 | } | ||
1449 | |||
1450 | eim = (DirectFB_Engine_Image_Entry *) | ||
1451 | evas_cache_engine_image_dirty(ce, 0, 0, ce->w, ce->h); | ||
1452 | |||
1453 | ie->flags.alpha = !!has_alpha; | ||
1454 | return eim; | ||
1455 | } | ||
1456 | |||
1457 | struct _for_each_cutout_image | ||
1458 | { | ||
1459 | IDirectFBSurface *image; | ||
1460 | DFBRectangle src, dst; | ||
1461 | }; | ||
1462 | |||
1463 | static void | ||
1464 | _cb_draw_image_unscaled(IDirectFBSurface *surface, RGBA_Draw_Context *dc __UNUSED__, const DFBRegion *region __UNUSED__, void *data) | ||
1465 | { | ||
1466 | const struct _for_each_cutout_image *p = data; | ||
1467 | |||
1468 | surface->Blit(surface, p->image, &p->src, p->dst.x, p->dst.y); | ||
1469 | } | ||
1470 | |||
1471 | static void | ||
1472 | _cb_draw_image_scaled(IDirectFBSurface *surface, RGBA_Draw_Context *dc __UNUSED__, const DFBRegion *region __UNUSED__, void *data) | ||
1473 | { | ||
1474 | const struct _for_each_cutout_image *p = data; | ||
1475 | |||
1476 | surface->StretchBlit(surface, p->image, &p->src, &p->dst); | ||
1477 | } | ||
1478 | |||
1479 | #ifndef DFB_USE_EVAS_IMAGE_DRAW | ||
1480 | static void | ||
1481 | evas_engine_dfb_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth __UNUSED__) | ||
1482 | { | ||
1483 | DirectFB_Engine_Image_Entry *eim = surface; | ||
1484 | Render_Engine *re = data; | ||
1485 | IDirectFBSurface *screen; | ||
1486 | DirectFB_Engine_Image_Entry *deie = image; | ||
1487 | struct _for_each_cutout_image p; | ||
1488 | _cb_for_each_cutout_t cb; | ||
1489 | |||
1490 | screen = eim->surface; | ||
1491 | if (deie->cache_entry.src->space == EVAS_COLORSPACE_ARGB8888) | ||
1492 | evas_cache_engine_image_load_data(&deie->cache_entry); | ||
1493 | |||
1494 | evas_common_image_colorspace_normalize((RGBA_Image *)deie->cache_entry.src); | ||
1495 | |||
1496 | _dfb_surface_set_blit_params(eim, deie, context); | ||
1497 | |||
1498 | _dfb_rect_set(&p.src, src_x, src_y, src_w, src_h); | ||
1499 | _dfb_rect_set(&p.dst, dst_x, dst_y, dst_w, dst_h); | ||
1500 | p.image = deie->surface; | ||
1501 | |||
1502 | if ((src_w == dst_w) && (src_h == dst_h)) | ||
1503 | cb = _cb_draw_image_unscaled; | ||
1504 | else | ||
1505 | cb = _cb_draw_image_scaled; | ||
1506 | |||
1507 | _dfb_blit_accel_caps_print(screen, deie->surface); | ||
1508 | _dfb_surface_for_each_cutout(screen, context, cb, &p); | ||
1509 | } | ||
1510 | #else /* DFB_USE_EVAS_IMAGE_DRAW */ | ||
1511 | static void | ||
1512 | evas_engine_dfb_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth) | ||
1513 | { | ||
1514 | DirectFB_Engine_Image_Entry *deie = image; | ||
1515 | DirectFB_Engine_Image_Entry *eim = surface; | ||
1516 | Render_Engine *re = data; | ||
1517 | RGBA_Image *dst, *src; | ||
1518 | IDirectFBSurface *screen; | ||
1519 | |||
1520 | screen = eim->surface; | ||
1521 | if (deie->cache_entry.src->space == EVAS_COLORSPACE_ARGB8888) | ||
1522 | evas_cache_engine_image_load_data(&deie->cache_entry); | ||
1523 | |||
1524 | evas_common_image_colorspace_normalize((RGBA_Image *)deie->cache_entry.src); | ||
1525 | |||
1526 | dst = (RGBA_Image *)eim->cache_entry.src; | ||
1527 | if (!_dfb_lock_and_sync_image(screen, dst, DSLF_READ | DSLF_WRITE)) | ||
1528 | return; | ||
1529 | |||
1530 | src = (RGBA_Image *)deie->cache_entry.src; | ||
1531 | if (!_dfb_lock_and_sync_image(deie->surface, src, DSLF_READ)) | ||
1532 | goto error_src; | ||
1533 | |||
1534 | if (smooth) | ||
1535 | evas_common_scale_rgba_in_to_out_clip_smooth(src, dst, context, | ||
1536 | src_x, src_y, src_w, src_h, | ||
1537 | dst_x, dst_y, dst_w, dst_h); | ||
1538 | else | ||
1539 | evas_common_scale_rgba_in_to_out_clip_sample(src, dst, context, | ||
1540 | src_x, src_y, src_w, src_h, | ||
1541 | dst_x, dst_y, dst_w, dst_h); | ||
1542 | evas_common_cpu_end_opt(); | ||
1543 | |||
1544 | dst->image.data = NULL; | ||
1545 | |||
1546 | screen->Unlock(screen); | ||
1547 | deie->surface->Unlock(deie->surface); | ||
1548 | |||
1549 | return; | ||
1550 | |||
1551 | error_src: | ||
1552 | screen->Unlock(screen); | ||
1553 | } | ||
1554 | #endif | ||
1555 | |||
1556 | static void | ||
1557 | evas_engine_dfb_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) | ||
1558 | { | ||
1559 | Render_Engine *re = (Render_Engine*) data; | ||
1560 | DirectFB_Engine_Image_Entry *deie = image; | ||
1561 | DirectFB_Engine_Image_Entry *eim = surface; | ||
1562 | IDirectFBSurface *screen; | ||
1563 | RGBA_Image *dst, *src; | ||
1564 | |||
1565 | if (!deie || !eim) return ; | ||
1566 | |||
1567 | screen = eim->surface; | ||
1568 | dst = (RGBA_Image *) eim->cache_entry.src; | ||
1569 | if (!_dfb_lock_and_sync_image(screen, dst, DSLF_READ | DSLF_WRITE)) | ||
1570 | return; | ||
1571 | |||
1572 | src = (RGBA_Image *)deie->cache_entry.src; | ||
1573 | if (!_dfb_lock_and_sync_image(deie->surface, src, DSLF_READ)) | ||
1574 | goto error_src; | ||
1575 | |||
1576 | evas_common_map_rgba(src, dst, context, 4, p, smooth, level); | ||
1577 | evas_common_cpu_end_opt(); | ||
1578 | |||
1579 | screen->Unlock(screen); | ||
1580 | deie->surface->Unlock(deie->surface); | ||
1581 | |||
1582 | return ; | ||
1583 | |||
1584 | error_src: | ||
1585 | screen->Unlock(screen); | ||
1586 | } | ||
1587 | |||
1588 | static void * | ||
1589 | evas_engine_dfb_image_map_surface_new(void *data, int w, int h, int alpha) | ||
1590 | { | ||
1591 | Render_Engine *re = (Render_Engine*) data; | ||
1592 | void *surface; | ||
1593 | |||
1594 | surface = evas_cache_engine_image_copied_data(re->cache, | ||
1595 | w, h, NULL, alpha, | ||
1596 | EVAS_COLORSPACE_ARGB8888, | ||
1597 | NULL); | ||
1598 | return surface; | ||
1599 | } | ||
1600 | |||
1601 | static void | ||
1602 | evas_engine_dfb_image_map_surface_free(void *data __UNUSED__, void *surface) | ||
1603 | { | ||
1604 | evas_cache_engine_image_drop(surface); | ||
1605 | } | ||
1606 | |||
1607 | |||
1608 | static void | ||
1609 | evas_engine_dfb_image_cache_flush(void *data) | ||
1610 | { | ||
1611 | Render_Engine *re = data; | ||
1612 | int size; | ||
1613 | |||
1614 | size = evas_cache_engine_image_get(re->cache); | ||
1615 | evas_cache_engine_image_set(re->cache, 0); | ||
1616 | evas_cache_engine_image_set(re->cache, size); | ||
1617 | } | ||
1618 | |||
1619 | static void | ||
1620 | evas_engine_dfb_image_cache_set(void *data, int bytes) | ||
1621 | { | ||
1622 | Render_Engine *re = data; | ||
1623 | |||
1624 | evas_cache_engine_image_set(re->cache, bytes); | ||
1625 | } | ||
1626 | |||
1627 | static int | ||
1628 | evas_engine_dfb_image_cache_get(void *data) | ||
1629 | { | ||
1630 | Render_Engine *re = data; | ||
1631 | |||
1632 | return evas_cache_engine_image_get(re->cache); | ||
1633 | } | ||
1634 | |||
1635 | static char * | ||
1636 | evas_engine_dfb_image_comment_get(void *data __UNUSED__, void *image, char *key __UNUSED__) | ||
1637 | { | ||
1638 | DirectFB_Engine_Image_Entry *eim = image; | ||
1639 | RGBA_Image *im; | ||
1640 | |||
1641 | if (!eim) return NULL; | ||
1642 | im = (RGBA_Image *)eim->cache_entry.src; | ||
1643 | |||
1644 | return im->info.comment; | ||
1645 | } | ||
1646 | |||
1647 | static void | ||
1648 | evas_engine_dfb_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) | ||
1649 | { | ||
1650 | } | ||
1651 | |||
1652 | static int | ||
1653 | evas_engine_dfb_image_scale_hint_get(void *data __UNUSED__, void *image) | ||
1654 | { | ||
1655 | return EVAS_IMAGE_SCALE_HINT_NONE; | ||
1656 | } | ||
1657 | |||
1658 | static Eina_Bool | ||
1659 | evas_engine_dfb_canvas_alpha_get(void *data, void *context) | ||
1660 | { | ||
1661 | Render_Engine *re = data; | ||
1662 | |||
1663 | return re->screen_image->cache_entry.src->flags.alpha; | ||
1664 | } | ||
1665 | |||
1666 | static int | ||
1667 | module_open(Evas_Module *em) | ||
1668 | { | ||
1669 | if (!em) return 0; | ||
1670 | /* get whatever engine module we inherit from */ | ||
1671 | if (!_evas_module_engine_inherit(&parent_func, "software_generic")) return 0; | ||
1672 | _evas_engine_directfb_log_dom = eina_log_domain_register | ||
1673 | ("evas-directfb", EVAS_DEFAULT_LOG_COLOR); | ||
1674 | if (_evas_engine_directfb_log_dom < 0) | ||
1675 | { | ||
1676 | EINA_LOG_ERR("Can not create a module log domain."); | ||
1677 | return 0; | ||
1678 | } | ||
1679 | /* store it for later use */ | ||
1680 | func = parent_func; | ||
1681 | /* now to override methods */ | ||
1682 | #define ORD(f) EVAS_API_OVERRIDE(f, &func, evas_engine_dfb_) | ||
1683 | ORD(info); | ||
1684 | ORD(info_free); | ||
1685 | ORD(setup); | ||
1686 | ORD(canvas_alpha_get); | ||
1687 | ORD(output_free); | ||
1688 | ORD(output_resize); | ||
1689 | ORD(output_tile_size_set); | ||
1690 | ORD(output_redraws_rect_add); | ||
1691 | ORD(output_redraws_rect_del); | ||
1692 | ORD(output_redraws_clear); | ||
1693 | ORD(output_redraws_next_update_get); | ||
1694 | ORD(output_redraws_next_update_push); | ||
1695 | ORD(output_flush); | ||
1696 | ORD(output_idle_flush); | ||
1697 | ORD(image_load); | ||
1698 | ORD(image_new_from_data); | ||
1699 | ORD(image_new_from_copied_data); | ||
1700 | ORD(image_colorspace_set); | ||
1701 | ORD(image_colorspace_get); | ||
1702 | ORD(image_free); | ||
1703 | ORD(image_size_set); | ||
1704 | ORD(image_size_get); | ||
1705 | ORD(image_dirty_region); | ||
1706 | ORD(image_data_get); | ||
1707 | ORD(image_data_put); | ||
1708 | ORD(image_data_preload_request); | ||
1709 | ORD(image_data_preload_cancel); | ||
1710 | ORD(image_alpha_set); | ||
1711 | ORD(image_alpha_get); | ||
1712 | ORD(image_draw); | ||
1713 | ORD(image_comment_get); | ||
1714 | ORD(image_cache_flush); | ||
1715 | ORD(image_cache_set); | ||
1716 | ORD(image_cache_get); | ||
1717 | ORD(font_draw); | ||
1718 | ORD(line_draw); | ||
1719 | ORD(rectangle_draw); | ||
1720 | ORD(polygon_draw); | ||
1721 | ORD(image_scale_hint_set); | ||
1722 | ORD(image_scale_hint_get); | ||
1723 | |||
1724 | ORD(image_map_draw); | ||
1725 | ORD(image_map_surface_new); | ||
1726 | ORD(image_map_surface_free); | ||
1727 | |||
1728 | /* now advertise out own api */ | ||
1729 | em->functions = (void *)(&func); | ||
1730 | return 1; | ||
1731 | } | ||
1732 | |||
1733 | static void | ||
1734 | module_close(Evas_Module *em) | ||
1735 | { | ||
1736 | eina_log_domain_unregister(_evas_engine_directfb_log_dom); | ||
1737 | } | ||
1738 | |||
1739 | static Evas_Module_Api evas_modapi = | ||
1740 | { | ||
1741 | EVAS_MODULE_API_VERSION, | ||
1742 | "directfb", | ||
1743 | "ProFUSION embedded systems", | ||
1744 | { | ||
1745 | module_open, | ||
1746 | module_close | ||
1747 | } | ||
1748 | }; | ||
1749 | |||
1750 | EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, directfb); | ||
1751 | |||
1752 | #ifndef EVAS_STATIC_BUILD_DIRECTFB | ||
1753 | EVAS_EINA_MODULE_DEFINE(engine, directfb); | ||
1754 | #endif | ||
diff --git a/libraries/evas/src/modules/engines/directfb/evas_engine.h b/libraries/evas/src/modules/engines/directfb/evas_engine.h deleted file mode 100644 index 7ad1e38..0000000 --- a/libraries/evas/src/modules/engines/directfb/evas_engine.h +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | #ifndef EVAS_ENGINE_DIRECTFB_H | ||
2 | #define EVAS_ENGINE_DIRECTFB_H | ||
3 | |||
4 | #include "evas_common.h" | ||
5 | #include "evas_private.h" | ||
6 | #include "Evas_Engine_DirectFB.h" | ||
7 | |||
8 | extern int _evas_engine_directfb_log_dom ; | ||
9 | |||
10 | #ifdef ERR | ||
11 | # undef ERR | ||
12 | #endif | ||
13 | #define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_directfb_log_dom, __VA_ARGS__) | ||
14 | |||
15 | #ifdef DBG | ||
16 | # undef DBG | ||
17 | #endif | ||
18 | #define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_directfb_log_dom, __VA_ARGS__) | ||
19 | |||
20 | #ifdef INF | ||
21 | # undef INF | ||
22 | #endif | ||
23 | #define INF(...) EINA_LOG_DOM_INFO(_evas_engine_directfb_log_dom, __VA_ARGS__) | ||
24 | |||
25 | #ifdef WRN | ||
26 | # undef WRN | ||
27 | #endif | ||
28 | #define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_directfb_log_dom, __VA_ARGS__) | ||
29 | |||
30 | #ifdef CRIT | ||
31 | # undef CRIT | ||
32 | #endif | ||
33 | #define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_directfb_log_dom, __VA_ARGS__) | ||
34 | |||
35 | typedef struct _DirectFB_Engine_Image_Entry DirectFB_Engine_Image_Entry; | ||
36 | struct _DirectFB_Engine_Image_Entry | ||
37 | { | ||
38 | Engine_Image_Entry cache_entry; | ||
39 | IDirectFBSurface *surface; | ||
40 | |||
41 | struct | ||
42 | { | ||
43 | Eina_Bool engine_surface : 1; | ||
44 | Eina_Bool is_locked : 1; | ||
45 | } flags; | ||
46 | }; | ||
47 | |||
48 | typedef struct _Render_Engine Render_Engine; | ||
49 | struct _Render_Engine | ||
50 | { | ||
51 | DirectFB_Engine_Image_Entry *screen_image; | ||
52 | const struct Evas_Engine_DirectFB_Spec *spec; | ||
53 | IDirectFB *dfb; | ||
54 | |||
55 | Evas_Cache_Engine_Image *cache; | ||
56 | |||
57 | Tilebuf *tb; | ||
58 | Tilebuf_Rect *rects; | ||
59 | Eina_Inlist *cur_rect; | ||
60 | |||
61 | DFBRegion *update_regions; | ||
62 | unsigned int update_regions_count; | ||
63 | unsigned int update_regions_limit; | ||
64 | |||
65 | Eina_Bool end : 1; | ||
66 | }; | ||
67 | |||
68 | int _dfb_surface_set_color_from_context(IDirectFBSurface *surface, RGBA_Draw_Context *dc); | ||
69 | void _dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Eina_Inlist *points, int x, int y); | ||
70 | |||
71 | #endif | ||
diff --git a/libraries/evas/src/modules/engines/directfb/polygon.c b/libraries/evas/src/modules/engines/directfb/polygon.c deleted file mode 100644 index 715fd84..0000000 --- a/libraries/evas/src/modules/engines/directfb/polygon.c +++ /dev/null | |||
@@ -1,269 +0,0 @@ | |||
1 | #include <math.h> | ||
2 | #include "evas_engine.h" | ||
3 | |||
4 | /* reduce calls to DirectFB (FillSpans), but uses twice as much memory */ | ||
5 | //#define USE_SPAN_RECTS 1 | ||
6 | |||
7 | #define MAX_SPANS 512 | ||
8 | typedef struct _RGBA_Edge RGBA_Edge; | ||
9 | typedef struct _RGBA_Vertex RGBA_Vertex; | ||
10 | |||
11 | struct _RGBA_Edge | ||
12 | { | ||
13 | double x, dx; | ||
14 | int i; | ||
15 | }; | ||
16 | |||
17 | struct _RGBA_Vertex | ||
18 | { | ||
19 | double x, y; | ||
20 | int i; | ||
21 | }; | ||
22 | |||
23 | #define POLY_EDGE_DEL(_i) \ | ||
24 | { \ | ||
25 | int _j; \ | ||
26 | \ | ||
27 | for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ | ||
28 | if (_j < num_active_edges) \ | ||
29 | { \ | ||
30 | num_active_edges--; \ | ||
31 | memmove(&(edges[_j]), &(edges[_j + 1]), \ | ||
32 | (num_active_edges - _j) * sizeof(RGBA_Edge)); \ | ||
33 | } \ | ||
34 | } | ||
35 | |||
36 | #define POLY_EDGE_ADD(_i, _y) \ | ||
37 | { \ | ||
38 | int _j; \ | ||
39 | float _dx; \ | ||
40 | RGBA_Vertex *_p, *_q; \ | ||
41 | if (_i < (n - 1)) _j = _i + 1; \ | ||
42 | else _j = 0; \ | ||
43 | if (point[_i].y < point[_j].y) \ | ||
44 | { \ | ||
45 | _p = &(point[_i]); \ | ||
46 | _q = &(point[_j]); \ | ||
47 | } \ | ||
48 | else \ | ||
49 | { \ | ||
50 | _p = &(point[_j]); \ | ||
51 | _q = &(point[_i]); \ | ||
52 | } \ | ||
53 | edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ | ||
54 | edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ | ||
55 | edges[num_active_edges].i = _i; \ | ||
56 | num_active_edges++; \ | ||
57 | } | ||
58 | |||
59 | static int | ||
60 | polygon_point_sorter(const void *a, const void *b) | ||
61 | { | ||
62 | RGBA_Vertex *p, *q; | ||
63 | |||
64 | p = (RGBA_Vertex *)a; | ||
65 | q = (RGBA_Vertex *)b; | ||
66 | if (p->y <= q->y) return -1; | ||
67 | return 1; | ||
68 | } | ||
69 | |||
70 | static int | ||
71 | polygon_edge_sorter(const void *a, const void *b) | ||
72 | { | ||
73 | RGBA_Edge *p, *q; | ||
74 | |||
75 | p = (RGBA_Edge *)a; | ||
76 | q = (RGBA_Edge *)b; | ||
77 | if (p->x <= q->x) return -1; | ||
78 | return 1; | ||
79 | } | ||
80 | |||
81 | #ifndef USE_SPAN_RECTS | ||
82 | typedef DFBSpan span_t; | ||
83 | |||
84 | static void | ||
85 | polygon_span_add(span_t *span, int y __UNUSED__, int x, int w) | ||
86 | { | ||
87 | span->x = x; | ||
88 | span->w = w; | ||
89 | } | ||
90 | |||
91 | static void | ||
92 | polygon_spans_fill(IDirectFBSurface *surface, int y, const span_t *spans, int n_spans) | ||
93 | { | ||
94 | /* directfb automatically increments y for each span */ | ||
95 | for (; n_spans > 0; n_spans--, spans++) | ||
96 | surface->FillSpans(surface, y, spans, 1); | ||
97 | } | ||
98 | #else /* USE_SPAN_RECTS */ | ||
99 | typedef DFBRectangle span_t; | ||
100 | |||
101 | static void | ||
102 | polygon_span_add(span_t *span, int y, int x, int w) | ||
103 | { | ||
104 | span->x = x; | ||
105 | span->y = y; | ||
106 | span->w = w; | ||
107 | span->h = 1; | ||
108 | } | ||
109 | |||
110 | static void | ||
111 | polygon_spans_fill(IDirectFBSurface *surface, int y, const span_t *spans, int n_spans) | ||
112 | { | ||
113 | surface->FillRectangles(surface, spans, n_spans); | ||
114 | } | ||
115 | #endif /* USE_SPAN_RECTS */ | ||
116 | |||
117 | |||
118 | void | ||
119 | _dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Eina_Inlist *points, int px, int py) | ||
120 | { | ||
121 | RGBA_Polygon_Point *pt; | ||
122 | RGBA_Vertex *point; | ||
123 | RGBA_Edge *edges; | ||
124 | int num_active_edges; | ||
125 | int n; | ||
126 | int i, j, k; | ||
127 | int y0, y1, y; | ||
128 | int ext_x, ext_y, ext_w, ext_h; | ||
129 | int *sorted_index; | ||
130 | |||
131 | ext_x = 0; | ||
132 | ext_y = 0; | ||
133 | surface->GetSize(surface, &ext_w, &ext_h); | ||
134 | if (dc->clip.use) | ||
135 | { | ||
136 | if (dc->clip.x > ext_x) | ||
137 | { | ||
138 | ext_w += ext_x - dc->clip.x; | ||
139 | ext_x = dc->clip.x; | ||
140 | } | ||
141 | if ((ext_x + ext_w) > (dc->clip.x + dc->clip.w)) | ||
142 | { | ||
143 | ext_w = (dc->clip.x + dc->clip.w) - ext_x; | ||
144 | } | ||
145 | if (dc->clip.y > ext_y) | ||
146 | { | ||
147 | ext_h += ext_y - dc->clip.y; | ||
148 | ext_y = dc->clip.y; | ||
149 | } | ||
150 | if ((ext_y + ext_h) > (dc->clip.y + dc->clip.h)) | ||
151 | { | ||
152 | ext_h = (dc->clip.y + dc->clip.h) - ext_y; | ||
153 | } | ||
154 | } | ||
155 | if ((ext_w <= 0) || (ext_h <= 0)) return; | ||
156 | |||
157 | evas_common_cpu_end_opt(); | ||
158 | |||
159 | if (!_dfb_surface_set_color_from_context(surface, dc)) | ||
160 | return; | ||
161 | |||
162 | n = 0; EINA_INLIST_FOREACH(points, pt) n++; | ||
163 | if (n < 3) return; | ||
164 | edges = malloc(sizeof(RGBA_Edge) * n); | ||
165 | if (!edges) return; | ||
166 | point = malloc(sizeof(RGBA_Vertex) * n); | ||
167 | if (!point) | ||
168 | { | ||
169 | free(edges); | ||
170 | return; | ||
171 | } | ||
172 | sorted_index = malloc(sizeof(int) * n); | ||
173 | if (!sorted_index) | ||
174 | { | ||
175 | free(edges); | ||
176 | free(point); | ||
177 | return; | ||
178 | } | ||
179 | |||
180 | k = 0; | ||
181 | EINA_INLIST_FOREACH(points, pt) | ||
182 | { | ||
183 | point[k].x = pt->x + px; | ||
184 | point[k].y = pt->y + py; | ||
185 | point[k].i = k; | ||
186 | k++; | ||
187 | } | ||
188 | qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); | ||
189 | for (k = 0; k < n; k++) sorted_index[k] = point[k].i; | ||
190 | k = 0; | ||
191 | EINA_INLIST_FOREACH(points, pt) | ||
192 | { | ||
193 | point[k].x = pt->x + px; | ||
194 | point[k].y = pt->y + py; | ||
195 | point[k].i = k; | ||
196 | k++; | ||
197 | } | ||
198 | |||
199 | y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); | ||
200 | y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); | ||
201 | |||
202 | k = 0; | ||
203 | num_active_edges = 0; | ||
204 | |||
205 | for (y = y0; y <= y1; y++) | ||
206 | { | ||
207 | span_t spans[MAX_SPANS]; | ||
208 | unsigned int n_spans = 0; | ||
209 | |||
210 | for (; (k < n) && (point[sorted_index[k]].y <= ((double)y + 0.5)); k++) | ||
211 | { | ||
212 | i = sorted_index[k]; | ||
213 | |||
214 | if (i > 0) j = i - 1; | ||
215 | else j = n - 1; | ||
216 | if (point[j].y <= ((double)y - 0.5)) | ||
217 | { | ||
218 | POLY_EDGE_DEL(j) | ||
219 | } | ||
220 | else if (point[j].y > ((double)y + 0.5)) | ||
221 | { | ||
222 | POLY_EDGE_ADD(j, y) | ||
223 | } | ||
224 | if (i < (n - 1)) j = i + 1; | ||
225 | else j = 0; | ||
226 | if (point[j].y <= ((double)y - 0.5)) | ||
227 | { | ||
228 | POLY_EDGE_DEL(i) | ||
229 | } | ||
230 | else if (point[j].y > ((double)y + 0.5)) | ||
231 | { | ||
232 | POLY_EDGE_ADD(i, y) | ||
233 | } | ||
234 | } | ||
235 | |||
236 | qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); | ||
237 | |||
238 | for (j = 0; j < num_active_edges; j += 2) | ||
239 | { | ||
240 | int x0, x1; | ||
241 | |||
242 | x0 = ceil(edges[j].x - 0.5); | ||
243 | if (j < (num_active_edges - 1)) | ||
244 | x1 = floor(edges[j + 1].x - 0.5); | ||
245 | else | ||
246 | x1 = x0; | ||
247 | if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) | ||
248 | { | ||
249 | if (n_spans == MAX_SPANS) | ||
250 | { | ||
251 | polygon_spans_fill(surface, y, spans, n_spans); | ||
252 | n_spans = 0; | ||
253 | } | ||
254 | |||
255 | polygon_span_add(spans + n_spans, y, x0, (x1 - x0) + 1); | ||
256 | n_spans++; | ||
257 | } | ||
258 | edges[j].x += edges[j].dx; | ||
259 | edges[j + 1].x += edges[j + 1].dx; | ||
260 | } | ||
261 | |||
262 | if (n_spans) | ||
263 | polygon_spans_fill(surface, y, spans, n_spans); | ||
264 | } | ||
265 | |||
266 | free(edges); | ||
267 | free(point); | ||
268 | free(sorted_index); | ||
269 | } | ||