diff options
Diffstat (limited to 'libraries/evas/src/modules/engines/software_sdl')
5 files changed, 2158 insertions, 0 deletions
diff --git a/libraries/evas/src/modules/engines/software_sdl/Evas_Engine_SDL.h b/libraries/evas/src/modules/engines/software_sdl/Evas_Engine_SDL.h new file mode 100644 index 0000000..3cce6ec --- /dev/null +++ b/libraries/evas/src/modules/engines/software_sdl/Evas_Engine_SDL.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef _EVAS_ENGINE_SDL_H | ||
2 | #define _EVAS_ENGINE_SDL_H | ||
3 | |||
4 | #include <SDL/SDL.h> | ||
5 | |||
6 | typedef struct _Evas_Engine_Info_SDL Evas_Engine_Info_SDL; | ||
7 | |||
8 | struct _Evas_Engine_Info_SDL | ||
9 | { | ||
10 | /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ | ||
11 | /* at you and make nasty noises */ | ||
12 | Evas_Engine_Info magic; | ||
13 | |||
14 | struct { | ||
15 | int rotation; | ||
16 | int fullscreen : 1; | ||
17 | int hwsurface : 1; | ||
18 | int noframe : 1; | ||
19 | int alpha : 1; | ||
20 | } info; | ||
21 | |||
22 | /* non-blocking or blocking mode */ | ||
23 | Evas_Engine_Render_Mode render_mode; | ||
24 | }; | ||
25 | #endif | ||
26 | |||
27 | |||
diff --git a/libraries/evas/src/modules/engines/software_sdl/Makefile.am b/libraries/evas/src/modules/engines/software_sdl/Makefile.am new file mode 100644 index 0000000..dc548ba --- /dev/null +++ b/libraries/evas/src/modules/engines/software_sdl/Makefile.am | |||
@@ -0,0 +1,45 @@ | |||
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_software_sdl_cflags@ | ||
13 | |||
14 | AM_CFLAGS = @WIN32_CFLAGS@ | ||
15 | |||
16 | if BUILD_ENGINE_SOFTWARE_SDL | ||
17 | |||
18 | SOFTWARE_SDL_SOURCES = evas_engine.c | ||
19 | SOFTWARE_SDL_LIBADD = @evas_engine_software_sdl_libs@ | ||
20 | |||
21 | |||
22 | includes_HEADERS = Evas_Engine_SDL.h | ||
23 | includesdir = $(includedir)/evas-@VMAJ@ | ||
24 | |||
25 | if !EVAS_STATIC_BUILD_SOFTWARE_SDL | ||
26 | |||
27 | pkgdir = $(libdir)/evas/modules/engines/software_sdl/$(MODULE_ARCH) | ||
28 | pkg_LTLIBRARIES = module.la | ||
29 | |||
30 | module_la_SOURCES = $(SOFTWARE_SDL_SOURCES) | ||
31 | module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_SDL_LIBADD) | ||
32 | module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version | ||
33 | module_la_LIBTOOLFLAGS = --tag=disable-static | ||
34 | |||
35 | else | ||
36 | |||
37 | noinst_LTLIBRARIES = libevas_engine_software_sdl.la | ||
38 | |||
39 | libevas_engine_software_sdl_la_SOURCES = $(SOFTWARE_SDL_SOURCES) | ||
40 | libevas_engine_software_sdl_la_LIBADD = $(SOFTWARE_SDL_LIBADD) | ||
41 | |||
42 | endif | ||
43 | endif | ||
44 | |||
45 | EXTRA_DIST = evas_engine.h | ||
diff --git a/libraries/evas/src/modules/engines/software_sdl/Makefile.in b/libraries/evas/src/modules/engines/software_sdl/Makefile.in new file mode 100644 index 0000000..d1052c1 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_sdl/Makefile.in | |||
@@ -0,0 +1,796 @@ | |||
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/software_sdl | ||
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_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@libevas_engine_software_sdl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) | ||
86 | am__libevas_engine_software_sdl_la_SOURCES_DIST = evas_engine.c | ||
87 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@am__objects_1 = evas_engine.lo | ||
88 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@am_libevas_engine_software_sdl_la_OBJECTS = $(am__objects_1) | ||
89 | libevas_engine_software_sdl_la_OBJECTS = \ | ||
90 | $(am_libevas_engine_software_sdl_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_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@am_libevas_engine_software_sdl_la_rpath = | ||
95 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la \ | ||
96 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@ $(am__DEPENDENCIES_1) | ||
97 | am__module_la_SOURCES_DIST = evas_engine.c | ||
98 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@am__objects_2 = \ | ||
99 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@ module_la-evas_engine.lo | ||
100 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_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_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@am_module_la_rpath = -rpath \ | ||
106 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_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_software_sdl_la_SOURCES) \ | ||
134 | $(module_la_SOURCES) | ||
135 | DIST_SOURCES = $(am__libevas_engine_software_sdl_la_SOURCES_DIST) \ | ||
136 | $(am__module_la_SOURCES_DIST) | ||
137 | am__includes_HEADERS_DIST = Evas_Engine_SDL.h | ||
138 | HEADERS = $(includes_HEADERS) | ||
139 | ETAGS = etags | ||
140 | CTAGS = ctags | ||
141 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
142 | ACLOCAL = @ACLOCAL@ | ||
143 | ALLOCA = @ALLOCA@ | ||
144 | AMTAR = @AMTAR@ | ||
145 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
146 | AR = @AR@ | ||
147 | AS = @AS@ | ||
148 | AUTOCONF = @AUTOCONF@ | ||
149 | AUTOHEADER = @AUTOHEADER@ | ||
150 | AUTOMAKE = @AUTOMAKE@ | ||
151 | AWK = @AWK@ | ||
152 | CC = @CC@ | ||
153 | CCDEPMODE = @CCDEPMODE@ | ||
154 | CFLAGS = @CFLAGS@ | ||
155 | CHECK_CFLAGS = @CHECK_CFLAGS@ | ||
156 | CHECK_LIBS = @CHECK_LIBS@ | ||
157 | CPP = @CPP@ | ||
158 | CPPFLAGS = @CPPFLAGS@ | ||
159 | CXX = @CXX@ | ||
160 | CXXCPP = @CXXCPP@ | ||
161 | CXXDEPMODE = @CXXDEPMODE@ | ||
162 | CXXFLAGS = @CXXFLAGS@ | ||
163 | CYGPATH_W = @CYGPATH_W@ | ||
164 | DEFS = @DEFS@ | ||
165 | DEPDIR = @DEPDIR@ | ||
166 | DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ | ||
167 | DIRECTFB_LIBS = @DIRECTFB_LIBS@ | ||
168 | DLLTOOL = @DLLTOOL@ | ||
169 | DSYMUTIL = @DSYMUTIL@ | ||
170 | DUMPBIN = @DUMPBIN@ | ||
171 | ECHO_C = @ECHO_C@ | ||
172 | ECHO_N = @ECHO_N@ | ||
173 | ECHO_T = @ECHO_T@ | ||
174 | ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ | ||
175 | ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ | ||
176 | EDB_CFLAGS = @EDB_CFLAGS@ | ||
177 | EDB_LIBS = @EDB_LIBS@ | ||
178 | EDJE_CFLAGS = @EDJE_CFLAGS@ | ||
179 | EDJE_LIBS = @EDJE_LIBS@ | ||
180 | EET_CFLAGS = @EET_CFLAGS@ | ||
181 | EET_LIBS = @EET_LIBS@ | ||
182 | EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ | ||
183 | EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ | ||
184 | EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ | ||
185 | EGREP = @EGREP@ | ||
186 | EINA_CFLAGS = @EINA_CFLAGS@ | ||
187 | EINA_LIBS = @EINA_LIBS@ | ||
188 | EVAS_CFLAGS = @EVAS_CFLAGS@ | ||
189 | EVAS_LIBS = @EVAS_LIBS@ | ||
190 | EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ | ||
191 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
192 | EVIL_LIBS = @EVIL_LIBS@ | ||
193 | EXEEXT = @EXEEXT@ | ||
194 | FGREP = @FGREP@ | ||
195 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ | ||
196 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ | ||
197 | FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ | ||
198 | FREETYPE_LIBS = @FREETYPE_LIBS@ | ||
199 | FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ | ||
200 | FRIBIDI_LIBS = @FRIBIDI_LIBS@ | ||
201 | GL_EET_CFLAGS = @GL_EET_CFLAGS@ | ||
202 | GL_EET_LIBS = @GL_EET_LIBS@ | ||
203 | GREP = @GREP@ | ||
204 | HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ | ||
205 | HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ | ||
206 | INSTALL = @INSTALL@ | ||
207 | INSTALL_DATA = @INSTALL_DATA@ | ||
208 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
209 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
210 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
211 | LD = @LD@ | ||
212 | LDFLAGS = @LDFLAGS@ | ||
213 | LIBOBJS = @LIBOBJS@ | ||
214 | LIBS = @LIBS@ | ||
215 | LIBTOOL = @LIBTOOL@ | ||
216 | LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ | ||
217 | LINEBREAK_LIBS = @LINEBREAK_LIBS@ | ||
218 | LIPO = @LIPO@ | ||
219 | LN_S = @LN_S@ | ||
220 | LTLIBOBJS = @LTLIBOBJS@ | ||
221 | MAKEINFO = @MAKEINFO@ | ||
222 | MKDIR_P = @MKDIR_P@ | ||
223 | MODULE_ARCH = @MODULE_ARCH@ | ||
224 | NM = @NM@ | ||
225 | NMEDIT = @NMEDIT@ | ||
226 | OBJC = @OBJC@ | ||
227 | OBJCDEPMODE = @OBJCDEPMODE@ | ||
228 | OBJCFLAGS = @OBJCFLAGS@ | ||
229 | OBJDUMP = @OBJDUMP@ | ||
230 | OBJEXT = @OBJEXT@ | ||
231 | OTOOL = @OTOOL@ | ||
232 | OTOOL64 = @OTOOL64@ | ||
233 | PACKAGE = @PACKAGE@ | ||
234 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
235 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
236 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
237 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
238 | PACKAGE_URL = @PACKAGE_URL@ | ||
239 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
240 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
241 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | ||
242 | PIXMAN_LIBS = @PIXMAN_LIBS@ | ||
243 | PKG_CONFIG = @PKG_CONFIG@ | ||
244 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
245 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
246 | PNG_CFLAGS = @PNG_CFLAGS@ | ||
247 | PNG_LIBS = @PNG_LIBS@ | ||
248 | RANLIB = @RANLIB@ | ||
249 | SDL_CFLAGS = @SDL_CFLAGS@ | ||
250 | SDL_LIBS = @SDL_LIBS@ | ||
251 | SED = @SED@ | ||
252 | SET_MAKE = @SET_MAKE@ | ||
253 | SHELL = @SHELL@ | ||
254 | SHM_OPEN_LINK = @SHM_OPEN_LINK@ | ||
255 | STRIP = @STRIP@ | ||
256 | SVG_CFLAGS = @SVG_CFLAGS@ | ||
257 | SVG_LIBS = @SVG_LIBS@ | ||
258 | VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ | ||
259 | VALGRIND_LIBS = @VALGRIND_LIBS@ | ||
260 | VERSION = @VERSION@ | ||
261 | VMAJ = @VMAJ@ | ||
262 | WIN32_CFLAGS = @WIN32_CFLAGS@ | ||
263 | WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ | ||
264 | XCB_CFLAGS = @XCB_CFLAGS@ | ||
265 | XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ | ||
266 | XCB_GL_LIBS = @XCB_GL_LIBS@ | ||
267 | XCB_LIBS = @XCB_LIBS@ | ||
268 | XEXT_CFLAGS = @XEXT_CFLAGS@ | ||
269 | XEXT_LIBS = @XEXT_LIBS@ | ||
270 | XMKMF = @XMKMF@ | ||
271 | X_CFLAGS = @X_CFLAGS@ | ||
272 | X_EXTRA_LIBS = @X_EXTRA_LIBS@ | ||
273 | X_LIBS = @X_LIBS@ | ||
274 | X_PRE_LIBS = @X_PRE_LIBS@ | ||
275 | abs_builddir = @abs_builddir@ | ||
276 | abs_srcdir = @abs_srcdir@ | ||
277 | abs_top_builddir = @abs_top_builddir@ | ||
278 | abs_top_srcdir = @abs_top_srcdir@ | ||
279 | ac_ct_CC = @ac_ct_CC@ | ||
280 | ac_ct_CXX = @ac_ct_CXX@ | ||
281 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
282 | ac_ct_OBJC = @ac_ct_OBJC@ | ||
283 | altivec_cflags = @altivec_cflags@ | ||
284 | am__include = @am__include@ | ||
285 | am__leading_dot = @am__leading_dot@ | ||
286 | am__quote = @am__quote@ | ||
287 | am__tar = @am__tar@ | ||
288 | am__untar = @am__untar@ | ||
289 | bindir = @bindir@ | ||
290 | build = @build@ | ||
291 | build_alias = @build_alias@ | ||
292 | build_cpu = @build_cpu@ | ||
293 | build_os = @build_os@ | ||
294 | build_vendor = @build_vendor@ | ||
295 | builddir = @builddir@ | ||
296 | datadir = @datadir@ | ||
297 | datarootdir = @datarootdir@ | ||
298 | dlopen_libs = @dlopen_libs@ | ||
299 | docdir = @docdir@ | ||
300 | dvidir = @dvidir@ | ||
301 | edje_cc = @edje_cc@ | ||
302 | efl_doxygen = @efl_doxygen@ | ||
303 | efl_have_doxygen = @efl_have_doxygen@ | ||
304 | evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ | ||
305 | evas_engine_buffer_libs = @evas_engine_buffer_libs@ | ||
306 | evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ | ||
307 | evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ | ||
308 | evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ | ||
309 | evas_engine_directfb_libs = @evas_engine_directfb_libs@ | ||
310 | evas_engine_fb_cflags = @evas_engine_fb_cflags@ | ||
311 | evas_engine_fb_libs = @evas_engine_fb_libs@ | ||
312 | evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ | ||
313 | evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ | ||
314 | evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ | ||
315 | evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ | ||
316 | evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ | ||
317 | evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ | ||
318 | evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ | ||
319 | evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ | ||
320 | evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ | ||
321 | evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ | ||
322 | evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ | ||
323 | evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ | ||
324 | evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ | ||
325 | evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ | ||
326 | evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ | ||
327 | evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ | ||
328 | evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ | ||
329 | evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ | ||
330 | evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ | ||
331 | evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ | ||
332 | evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ | ||
333 | evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ | ||
334 | evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ | ||
335 | evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ | ||
336 | evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ | ||
337 | evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ | ||
338 | evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ | ||
339 | evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ | ||
340 | evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ | ||
341 | evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ | ||
342 | evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ | ||
343 | evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ | ||
344 | evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ | ||
345 | evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ | ||
346 | evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ | ||
347 | evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ | ||
348 | evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ | ||
349 | evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ | ||
350 | evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ | ||
351 | evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ | ||
352 | evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ | ||
353 | evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ | ||
354 | evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ | ||
355 | evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ | ||
356 | evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ | ||
357 | evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ | ||
358 | evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ | ||
359 | evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ | ||
360 | evas_image_loader_png_libs = @evas_image_loader_png_libs@ | ||
361 | evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ | ||
362 | evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ | ||
363 | evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ | ||
364 | evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ | ||
365 | evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ | ||
366 | evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ | ||
367 | evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ | ||
368 | evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ | ||
369 | evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ | ||
370 | evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ | ||
371 | evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ | ||
372 | evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ | ||
373 | exec_prefix = @exec_prefix@ | ||
374 | have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ | ||
375 | have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ | ||
376 | have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ | ||
377 | have_evas_engine_software_x11 = @have_evas_engine_software_x11@ | ||
378 | have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ | ||
379 | have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ | ||
380 | have_lcov = @have_lcov@ | ||
381 | host = @host@ | ||
382 | host_alias = @host_alias@ | ||
383 | host_cpu = @host_cpu@ | ||
384 | host_os = @host_os@ | ||
385 | host_vendor = @host_vendor@ | ||
386 | htmldir = @htmldir@ | ||
387 | includedir = @includedir@ | ||
388 | infodir = @infodir@ | ||
389 | install_sh = @install_sh@ | ||
390 | libdir = @libdir@ | ||
391 | libexecdir = @libexecdir@ | ||
392 | localedir = @localedir@ | ||
393 | localstatedir = @localstatedir@ | ||
394 | lt_ECHO = @lt_ECHO@ | ||
395 | lt_enable_auto_import = @lt_enable_auto_import@ | ||
396 | mandir = @mandir@ | ||
397 | mkdir_p = @mkdir_p@ | ||
398 | oldincludedir = @oldincludedir@ | ||
399 | pdfdir = @pdfdir@ | ||
400 | pkgconfig_requires_private = @pkgconfig_requires_private@ | ||
401 | prefix = @prefix@ | ||
402 | program_transform_name = @program_transform_name@ | ||
403 | psdir = @psdir@ | ||
404 | pthread_cflags = @pthread_cflags@ | ||
405 | pthread_libs = @pthread_libs@ | ||
406 | release_info = @release_info@ | ||
407 | requirement_evas = @requirement_evas@ | ||
408 | sbindir = @sbindir@ | ||
409 | sharedstatedir = @sharedstatedir@ | ||
410 | srcdir = @srcdir@ | ||
411 | sysconfdir = @sysconfdir@ | ||
412 | target_alias = @target_alias@ | ||
413 | top_build_prefix = @top_build_prefix@ | ||
414 | top_builddir = @top_builddir@ | ||
415 | top_srcdir = @top_srcdir@ | ||
416 | version_info = @version_info@ | ||
417 | MAINTAINERCLEANFILES = Makefile.in | ||
418 | AM_CPPFLAGS = \ | ||
419 | -I. \ | ||
420 | -I$(top_srcdir)/src/lib \ | ||
421 | -I$(top_srcdir)/src/lib/include \ | ||
422 | -I$(top_srcdir)/src/modules/engines \ | ||
423 | @FREETYPE_CFLAGS@ \ | ||
424 | @PIXMAN_CFLAGS@ \ | ||
425 | @EINA_CFLAGS@ \ | ||
426 | @evas_engine_software_sdl_cflags@ | ||
427 | |||
428 | AM_CFLAGS = @WIN32_CFLAGS@ | ||
429 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@SOFTWARE_SDL_SOURCES = evas_engine.c | ||
430 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@SOFTWARE_SDL_LIBADD = @evas_engine_software_sdl_libs@ | ||
431 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@includes_HEADERS = Evas_Engine_SDL.h | ||
432 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@includesdir = $(includedir)/evas-@VMAJ@ | ||
433 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_sdl/$(MODULE_ARCH) | ||
434 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@pkg_LTLIBRARIES = module.la | ||
435 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_SOURCES = $(SOFTWARE_SDL_SOURCES) | ||
436 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_SDL_LIBADD) | ||
437 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version | ||
438 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static | ||
439 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@noinst_LTLIBRARIES = libevas_engine_software_sdl.la | ||
440 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@libevas_engine_software_sdl_la_SOURCES = $(SOFTWARE_SDL_SOURCES) | ||
441 | @BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@libevas_engine_software_sdl_la_LIBADD = $(SOFTWARE_SDL_LIBADD) | ||
442 | EXTRA_DIST = evas_engine.h | ||
443 | all: all-am | ||
444 | |||
445 | .SUFFIXES: | ||
446 | .SUFFIXES: .c .lo .o .obj | ||
447 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
448 | @for dep in $?; do \ | ||
449 | case '$(am__configure_deps)' in \ | ||
450 | *$$dep*) \ | ||
451 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
452 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
453 | exit 1;; \ | ||
454 | esac; \ | ||
455 | done; \ | ||
456 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_sdl/Makefile'; \ | ||
457 | $(am__cd) $(top_srcdir) && \ | ||
458 | $(AUTOMAKE) --gnu src/modules/engines/software_sdl/Makefile | ||
459 | .PRECIOUS: Makefile | ||
460 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
461 | @case '$?' in \ | ||
462 | *config.status*) \ | ||
463 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
464 | *) \ | ||
465 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
466 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
467 | esac; | ||
468 | |||
469 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
470 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
471 | |||
472 | $(top_srcdir)/configure: $(am__configure_deps) | ||
473 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
474 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
475 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
476 | $(am__aclocal_m4_deps): | ||
477 | |||
478 | clean-noinstLTLIBRARIES: | ||
479 | -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) | ||
480 | @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ | ||
481 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
482 | test "$$dir" != "$$p" || dir=.; \ | ||
483 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
484 | rm -f "$${dir}/so_locations"; \ | ||
485 | done | ||
486 | install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) | ||
487 | @$(NORMAL_INSTALL) | ||
488 | test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" | ||
489 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
490 | list2=; for p in $$list; do \ | ||
491 | if test -f $$p; then \ | ||
492 | list2="$$list2 $$p"; \ | ||
493 | else :; fi; \ | ||
494 | done; \ | ||
495 | test -z "$$list2" || { \ | ||
496 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ | ||
497 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ | ||
498 | } | ||
499 | |||
500 | uninstall-pkgLTLIBRARIES: | ||
501 | @$(NORMAL_UNINSTALL) | ||
502 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
503 | for p in $$list; do \ | ||
504 | $(am__strip_dir) \ | ||
505 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ | ||
506 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ | ||
507 | done | ||
508 | |||
509 | clean-pkgLTLIBRARIES: | ||
510 | -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) | ||
511 | @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ | ||
512 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
513 | test "$$dir" != "$$p" || dir=.; \ | ||
514 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
515 | rm -f "$${dir}/so_locations"; \ | ||
516 | done | ||
517 | libevas_engine_software_sdl.la: $(libevas_engine_software_sdl_la_OBJECTS) $(libevas_engine_software_sdl_la_DEPENDENCIES) | ||
518 | $(AM_V_CCLD)$(LINK) $(am_libevas_engine_software_sdl_la_rpath) $(libevas_engine_software_sdl_la_OBJECTS) $(libevas_engine_software_sdl_la_LIBADD) $(LIBS) | ||
519 | module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) | ||
520 | $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) | ||
521 | |||
522 | mostlyclean-compile: | ||
523 | -rm -f *.$(OBJEXT) | ||
524 | |||
525 | distclean-compile: | ||
526 | -rm -f *.tab.c | ||
527 | |||
528 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ | ||
529 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ | ||
530 | |||
531 | .c.o: | ||
532 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
533 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
534 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
535 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
536 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
537 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
538 | |||
539 | .c.obj: | ||
540 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
541 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
542 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
543 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
544 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
545 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
546 | |||
547 | .c.lo: | ||
548 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
549 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
550 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
551 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
552 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
553 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
554 | |||
555 | module_la-evas_engine.lo: evas_engine.c | ||
556 | @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 | ||
557 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo | ||
558 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
559 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ | ||
560 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
561 | @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 | ||
562 | |||
563 | mostlyclean-libtool: | ||
564 | -rm -f *.lo | ||
565 | |||
566 | clean-libtool: | ||
567 | -rm -rf .libs _libs | ||
568 | install-includesHEADERS: $(includes_HEADERS) | ||
569 | @$(NORMAL_INSTALL) | ||
570 | test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" | ||
571 | @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ | ||
572 | for p in $$list; do \ | ||
573 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | ||
574 | echo "$$d$$p"; \ | ||
575 | done | $(am__base_list) | \ | ||
576 | while read files; do \ | ||
577 | echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ | ||
578 | $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ | ||
579 | done | ||
580 | |||
581 | uninstall-includesHEADERS: | ||
582 | @$(NORMAL_UNINSTALL) | ||
583 | @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ | ||
584 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | ||
585 | test -n "$$files" || exit 0; \ | ||
586 | echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ | ||
587 | cd "$(DESTDIR)$(includesdir)" && rm -f $$files | ||
588 | |||
589 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
590 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
591 | unique=`for i in $$list; do \ | ||
592 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
593 | done | \ | ||
594 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
595 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
596 | mkid -fID $$unique | ||
597 | tags: TAGS | ||
598 | |||
599 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
600 | $(TAGS_FILES) $(LISP) | ||
601 | set x; \ | ||
602 | here=`pwd`; \ | ||
603 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
604 | unique=`for i in $$list; do \ | ||
605 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
606 | done | \ | ||
607 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
608 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
609 | shift; \ | ||
610 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
611 | test -n "$$unique" || unique=$$empty_fix; \ | ||
612 | if test $$# -gt 0; then \ | ||
613 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
614 | "$$@" $$unique; \ | ||
615 | else \ | ||
616 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
617 | $$unique; \ | ||
618 | fi; \ | ||
619 | fi | ||
620 | ctags: CTAGS | ||
621 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
622 | $(TAGS_FILES) $(LISP) | ||
623 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
624 | unique=`for i in $$list; do \ | ||
625 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
626 | done | \ | ||
627 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
628 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
629 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
630 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
631 | $$unique | ||
632 | |||
633 | GTAGS: | ||
634 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
635 | && $(am__cd) $(top_srcdir) \ | ||
636 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
637 | |||
638 | distclean-tags: | ||
639 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
640 | |||
641 | distdir: $(DISTFILES) | ||
642 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
643 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
644 | list='$(DISTFILES)'; \ | ||
645 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
646 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
647 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
648 | case $$dist_files in \ | ||
649 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
650 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
651 | sort -u` ;; \ | ||
652 | esac; \ | ||
653 | for file in $$dist_files; do \ | ||
654 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
655 | if test -d $$d/$$file; then \ | ||
656 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
657 | if test -d "$(distdir)/$$file"; then \ | ||
658 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
659 | fi; \ | ||
660 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
661 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
662 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
663 | fi; \ | ||
664 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
665 | else \ | ||
666 | test -f "$(distdir)/$$file" \ | ||
667 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
668 | || exit 1; \ | ||
669 | fi; \ | ||
670 | done | ||
671 | check-am: all-am | ||
672 | check: check-am | ||
673 | all-am: Makefile $(LTLIBRARIES) $(HEADERS) | ||
674 | installdirs: | ||
675 | for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ | ||
676 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
677 | done | ||
678 | install: install-am | ||
679 | install-exec: install-exec-am | ||
680 | install-data: install-data-am | ||
681 | uninstall: uninstall-am | ||
682 | |||
683 | install-am: all-am | ||
684 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
685 | |||
686 | installcheck: installcheck-am | ||
687 | install-strip: | ||
688 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
689 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
690 | `test -z '$(STRIP)' || \ | ||
691 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
692 | mostlyclean-generic: | ||
693 | |||
694 | clean-generic: | ||
695 | |||
696 | distclean-generic: | ||
697 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
698 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
699 | |||
700 | maintainer-clean-generic: | ||
701 | @echo "This command is intended for maintainers to use" | ||
702 | @echo "it deletes files that may require special tools to rebuild." | ||
703 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
704 | clean: clean-am | ||
705 | |||
706 | clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ | ||
707 | clean-pkgLTLIBRARIES mostlyclean-am | ||
708 | |||
709 | distclean: distclean-am | ||
710 | -rm -rf ./$(DEPDIR) | ||
711 | -rm -f Makefile | ||
712 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
713 | distclean-tags | ||
714 | |||
715 | dvi: dvi-am | ||
716 | |||
717 | dvi-am: | ||
718 | |||
719 | html: html-am | ||
720 | |||
721 | html-am: | ||
722 | |||
723 | info: info-am | ||
724 | |||
725 | info-am: | ||
726 | |||
727 | install-data-am: install-includesHEADERS install-pkgLTLIBRARIES | ||
728 | |||
729 | install-dvi: install-dvi-am | ||
730 | |||
731 | install-dvi-am: | ||
732 | |||
733 | install-exec-am: | ||
734 | |||
735 | install-html: install-html-am | ||
736 | |||
737 | install-html-am: | ||
738 | |||
739 | install-info: install-info-am | ||
740 | |||
741 | install-info-am: | ||
742 | |||
743 | install-man: | ||
744 | |||
745 | install-pdf: install-pdf-am | ||
746 | |||
747 | install-pdf-am: | ||
748 | |||
749 | install-ps: install-ps-am | ||
750 | |||
751 | install-ps-am: | ||
752 | |||
753 | installcheck-am: | ||
754 | |||
755 | maintainer-clean: maintainer-clean-am | ||
756 | -rm -rf ./$(DEPDIR) | ||
757 | -rm -f Makefile | ||
758 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
759 | |||
760 | mostlyclean: mostlyclean-am | ||
761 | |||
762 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
763 | mostlyclean-libtool | ||
764 | |||
765 | pdf: pdf-am | ||
766 | |||
767 | pdf-am: | ||
768 | |||
769 | ps: ps-am | ||
770 | |||
771 | ps-am: | ||
772 | |||
773 | uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES | ||
774 | |||
775 | .MAKE: install-am install-strip | ||
776 | |||
777 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
778 | clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ | ||
779 | ctags distclean distclean-compile distclean-generic \ | ||
780 | distclean-libtool distclean-tags distdir dvi dvi-am html \ | ||
781 | html-am info info-am install install-am install-data \ | ||
782 | install-data-am install-dvi install-dvi-am install-exec \ | ||
783 | install-exec-am install-html install-html-am \ | ||
784 | install-includesHEADERS install-info install-info-am \ | ||
785 | install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ | ||
786 | install-ps install-ps-am install-strip installcheck \ | ||
787 | installcheck-am installdirs maintainer-clean \ | ||
788 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
789 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
790 | tags uninstall uninstall-am uninstall-includesHEADERS \ | ||
791 | uninstall-pkgLTLIBRARIES | ||
792 | |||
793 | |||
794 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
795 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
796 | .NOEXPORT: | ||
diff --git a/libraries/evas/src/modules/engines/software_sdl/evas_engine.c b/libraries/evas/src/modules/engines/software_sdl/evas_engine.c new file mode 100644 index 0000000..22c11b0 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_sdl/evas_engine.c | |||
@@ -0,0 +1,1218 @@ | |||
1 | #include <assert.h> | ||
2 | #include <math.h> | ||
3 | #include <string.h> | ||
4 | #include <sys/time.h> | ||
5 | #include <time.h> | ||
6 | #include <SDL/SDL.h> | ||
7 | |||
8 | #include "evas_common.h" /* Also includes international specific stuff */ | ||
9 | #include "evas_engine.h" | ||
10 | |||
11 | int _evas_engine_soft_sdl_log_dom = -1; | ||
12 | /* #define DEBUG_SDL */ | ||
13 | |||
14 | static Evas_Func func, pfunc; | ||
15 | |||
16 | static void* _sdl_output_setup (int w, int h, int fullscreen, int noframe, int alpha, int hwsurface); | ||
17 | |||
18 | static Engine_Image_Entry *_sdl_image_alloc (void); | ||
19 | static void _sdl_image_delete (Engine_Image_Entry *eim); | ||
20 | |||
21 | static int _sdl_image_constructor (Engine_Image_Entry*, void* data); | ||
22 | static void _sdl_image_destructor (Engine_Image_Entry *eim); | ||
23 | |||
24 | static void _sdl_image_dirty_region(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h); | ||
25 | |||
26 | static int _sdl_image_dirty (Engine_Image_Entry *dst, const Engine_Image_Entry *src); | ||
27 | |||
28 | static int _sdl_image_size_set (Engine_Image_Entry *dst, const Engine_Image_Entry *src); | ||
29 | |||
30 | static int _sdl_image_update_data (Engine_Image_Entry* dst, void* engine_data); | ||
31 | |||
32 | static void _sdl_image_load (Engine_Image_Entry *eim, const Image_Entry* im); | ||
33 | static int _sdl_image_mem_size_get(Engine_Image_Entry *eim); | ||
34 | |||
35 | #ifdef DEBUG_SDL | ||
36 | static void _sdl_image_debug (const char* context, Engine_Image_Entry* im); | ||
37 | #endif | ||
38 | |||
39 | static const Evas_Cache_Engine_Image_Func _sdl_cache_engine_image_cb = { | ||
40 | NULL /* key */, | ||
41 | _sdl_image_alloc /* alloc */, | ||
42 | _sdl_image_delete /* dealloc */, | ||
43 | _sdl_image_constructor /* constructor */, | ||
44 | _sdl_image_destructor /* destructor */, | ||
45 | _sdl_image_dirty_region /* dirty_region */, | ||
46 | _sdl_image_dirty /* dirty */, | ||
47 | _sdl_image_size_set /* size_set */, | ||
48 | _sdl_image_update_data /* update_data */, | ||
49 | _sdl_image_load /* load */, | ||
50 | _sdl_image_mem_size_get /* mem_size_get */, | ||
51 | #ifdef DEBUG_SDL /* debug */ | ||
52 | _sdl_image_debug | ||
53 | #else | ||
54 | NULL | ||
55 | #endif | ||
56 | }; | ||
57 | |||
58 | #define _SDL_UPDATE_PIXELS(EIM) \ | ||
59 | ((RGBA_Image *) EIM->cache_entry.src)->image.data = EIM->surface->pixels; | ||
60 | |||
61 | #define RMASK 0x00ff0000 | ||
62 | #define GMASK 0x0000ff00 | ||
63 | #define BMASK 0x000000ff | ||
64 | #define AMASK 0xff000000 | ||
65 | |||
66 | /* SDL engine info function */ | ||
67 | static void* | ||
68 | evas_engine_sdl_info (Evas* e __UNUSED__) | ||
69 | { | ||
70 | Evas_Engine_Info_SDL* info; | ||
71 | info = calloc(1, sizeof (Evas_Engine_Info_SDL)); | ||
72 | if (!info) return NULL; | ||
73 | info->magic.magic = rand(); | ||
74 | return info; | ||
75 | } | ||
76 | |||
77 | static void | ||
78 | evas_engine_sdl_info_free (Evas* e __UNUSED__, void* info) | ||
79 | { | ||
80 | Evas_Engine_Info_SDL* in; | ||
81 | in = (Evas_Engine_Info_SDL*) info; | ||
82 | free(in); | ||
83 | } | ||
84 | |||
85 | /* SDL engine output manipulation function */ | ||
86 | static int | ||
87 | evas_engine_sdl_setup (Evas* e, void* in) | ||
88 | { | ||
89 | Evas_Engine_Info_SDL* info = (Evas_Engine_Info_SDL*) in; | ||
90 | |||
91 | /* if we arent set to sdl, why the hell do we get called?! */ | ||
92 | if (evas_output_method_get(e) != evas_render_method_lookup("software_sdl")) | ||
93 | return 0; | ||
94 | |||
95 | SDL_Init(SDL_INIT_NOPARACHUTE); | ||
96 | |||
97 | if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) | ||
98 | { | ||
99 | ERR("SDL_Init failed with %s", SDL_GetError()); | ||
100 | SDL_Quit(); | ||
101 | return 0; | ||
102 | } | ||
103 | |||
104 | /* lets just set up */ | ||
105 | e->engine.data.output = _sdl_output_setup(e->output.w, e->output.h, | ||
106 | info->info.fullscreen, | ||
107 | info->info.noframe, | ||
108 | info->info.alpha, | ||
109 | info->info.hwsurface); | ||
110 | |||
111 | if (!e->engine.data.output) | ||
112 | return 0; | ||
113 | |||
114 | e->engine.func = &func; | ||
115 | e->engine.data.context = e->engine.func->context_new(e->engine.data.output); | ||
116 | |||
117 | return 1; | ||
118 | } | ||
119 | |||
120 | static void | ||
121 | evas_engine_sdl_output_free (void *data) | ||
122 | { | ||
123 | Render_Engine* re = data; | ||
124 | |||
125 | if (re->tb) | ||
126 | evas_common_tilebuf_free(re->tb); | ||
127 | if (re->rects) | ||
128 | evas_common_tilebuf_free_render_rects(re->rects); | ||
129 | if (re->rgba_engine_image) | ||
130 | evas_cache_engine_image_drop(&re->rgba_engine_image->cache_entry); | ||
131 | if (re->cache) | ||
132 | evas_cache_engine_image_shutdown(re->cache); | ||
133 | |||
134 | if (re->update_rects) | ||
135 | free(re->update_rects); | ||
136 | free(re); | ||
137 | |||
138 | evas_common_font_shutdown(); | ||
139 | evas_common_image_shutdown(); | ||
140 | |||
141 | SDL_QuitSubSystem(SDL_INIT_VIDEO); | ||
142 | } | ||
143 | |||
144 | static void | ||
145 | evas_engine_sdl_output_resize (void *data, int w, int h) | ||
146 | { | ||
147 | /* FIXME */ | ||
148 | Render_Engine *re = data; | ||
149 | SDL_Surface *surface; | ||
150 | |||
151 | if (w == re->tb->outbuf_w && h == re->tb->outbuf_h) | ||
152 | return; | ||
153 | |||
154 | /* Destroy the current screen */ | ||
155 | evas_cache_engine_image_drop(&re->rgba_engine_image->cache_entry); | ||
156 | |||
157 | /* Rebuil tilebuf */ | ||
158 | evas_common_tilebuf_free(re->tb); | ||
159 | re->tb = evas_common_tilebuf_new(w, h); | ||
160 | if (re->tb) | ||
161 | evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); | ||
162 | |||
163 | /* Build the new screen */ | ||
164 | surface = SDL_SetVideoMode(w, h, 32, | ||
165 | (re->flags.hwsurface ? SDL_HWSURFACE : SDL_SWSURFACE) | ||
166 | | (re->flags.fullscreen ? SDL_FULLSCREEN : 0) | ||
167 | | (re->flags.noframe ? SDL_NOFRAME : 0) | ||
168 | | (re->flags.alpha ? SDL_SRCALPHA : 0)); | ||
169 | |||
170 | if (!surface) | ||
171 | { | ||
172 | ERR("Unable to change the resolution to : %ix%i", w, h); | ||
173 | exit(-1); | ||
174 | } | ||
175 | re->rgba_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface); | ||
176 | if (!re->rgba_engine_image) | ||
177 | { | ||
178 | ERR("RGBA_Image allocation from SDL failed"); | ||
179 | exit(-1); | ||
180 | } | ||
181 | |||
182 | SDL_FillRect(surface, NULL, 0); | ||
183 | } | ||
184 | |||
185 | static void | ||
186 | evas_engine_sdl_output_tile_size_set (void *data, int w, int h) | ||
187 | { | ||
188 | Render_Engine* re = (Render_Engine*) data; | ||
189 | |||
190 | evas_common_tilebuf_set_tile_size(re->tb, w, h); | ||
191 | } | ||
192 | |||
193 | static void | ||
194 | evas_engine_sdl_output_redraws_rect_add (void *data, int x, int y, int w, int h) | ||
195 | { | ||
196 | Render_Engine* re = (Render_Engine*) data; | ||
197 | |||
198 | evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); | ||
199 | } | ||
200 | |||
201 | static void | ||
202 | evas_engine_sdl_output_redraws_rect_del (void *data, int x, int y, int w, int h) | ||
203 | { | ||
204 | Render_Engine* re = (Render_Engine*) data; | ||
205 | |||
206 | evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); | ||
207 | } | ||
208 | |||
209 | static void | ||
210 | evas_engine_sdl_output_redraws_clear (void *data) | ||
211 | { | ||
212 | Render_Engine* re = (Render_Engine*) data; | ||
213 | |||
214 | evas_common_tilebuf_clear(re->tb); | ||
215 | } | ||
216 | |||
217 | static void* | ||
218 | evas_engine_sdl_output_redraws_next_update_get (void *data, | ||
219 | int *x, int *y, int *w, int *h, | ||
220 | int *cx, int *cy, int *cw, int *ch) | ||
221 | { | ||
222 | Render_Engine *re = data; | ||
223 | Tilebuf_Rect *tb_rect; | ||
224 | SDL_Rect rect; | ||
225 | |||
226 | if (re->flags.end) | ||
227 | { | ||
228 | re->flags.end = 0; | ||
229 | return NULL; | ||
230 | } | ||
231 | if (!re->rects) | ||
232 | { | ||
233 | re->rects = evas_common_tilebuf_get_render_rects(re->tb); | ||
234 | re->cur_rect = EINA_INLIST_GET(re->rects); | ||
235 | } | ||
236 | if (!re->cur_rect) | ||
237 | { | ||
238 | if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); | ||
239 | re->rects = NULL; | ||
240 | return NULL; | ||
241 | } | ||
242 | |||
243 | tb_rect = (Tilebuf_Rect*) re->cur_rect; | ||
244 | *cx = *x = tb_rect->x; | ||
245 | *cy = *y = tb_rect->y; | ||
246 | *cw = *w = tb_rect->w; | ||
247 | *ch = *h = tb_rect->h; | ||
248 | re->cur_rect = re->cur_rect->next; | ||
249 | if (!re->cur_rect) | ||
250 | { | ||
251 | evas_common_tilebuf_free_render_rects(re->rects); | ||
252 | re->rects = NULL; | ||
253 | re->flags.end = 1; | ||
254 | } | ||
255 | |||
256 | rect.x = *x; | ||
257 | rect.y = *y; | ||
258 | rect.w = *w; | ||
259 | rect.h = *h; | ||
260 | |||
261 | /* Return the "fake" surface so it is passed to the drawing routines. */ | ||
262 | return re->rgba_engine_image; | ||
263 | } | ||
264 | |||
265 | static void | ||
266 | evas_engine_sdl_output_redraws_next_update_push (void *data, void *surface __UNUSED__, | ||
267 | int x, int y, int w, int h) | ||
268 | { | ||
269 | Render_Engine *re = (Render_Engine *) data; | ||
270 | |||
271 | if (re->update_rects_count + 1 > re->update_rects_limit) | ||
272 | { | ||
273 | re->update_rects_limit += 8; | ||
274 | re->update_rects = realloc(re->update_rects, sizeof (SDL_Rect) * re->update_rects_limit); | ||
275 | } | ||
276 | |||
277 | re->update_rects[re->update_rects_count].x = x; | ||
278 | re->update_rects[re->update_rects_count].y = y; | ||
279 | re->update_rects[re->update_rects_count].w = w; | ||
280 | re->update_rects[re->update_rects_count].h = h; | ||
281 | |||
282 | ++re->update_rects_count; | ||
283 | |||
284 | evas_common_cpu_end_opt(); | ||
285 | } | ||
286 | |||
287 | static void | ||
288 | _sdl_image_dirty_region(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h) | ||
289 | { | ||
290 | SDL_Engine_Image_Entry *dst; | ||
291 | RGBA_Image *im; | ||
292 | |||
293 | dst = (SDL_Engine_Image_Entry *) eim; | ||
294 | |||
295 | SDL_UpdateRect(dst->surface, x, y, w, h); | ||
296 | |||
297 | im = (RGBA_Image *)eim->src; | ||
298 | im->flags |= RGBA_IMAGE_IS_DIRTY; | ||
299 | } | ||
300 | |||
301 | static void | ||
302 | evas_engine_sdl_output_flush(void *data) | ||
303 | { | ||
304 | Render_Engine *re = (Render_Engine *) data; | ||
305 | |||
306 | if (re->update_rects_count > 0) | ||
307 | SDL_UpdateRects(re->rgba_engine_image->surface, re->update_rects_count, re->update_rects); | ||
308 | |||
309 | re->update_rects_count = 0; | ||
310 | } | ||
311 | |||
312 | |||
313 | static void | ||
314 | evas_engine_sdl_output_idle_flush(void *data) | ||
315 | { | ||
316 | (void) data; | ||
317 | } | ||
318 | |||
319 | /* | ||
320 | * Image objects | ||
321 | */ | ||
322 | |||
323 | static void* | ||
324 | evas_engine_sdl_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) | ||
325 | { | ||
326 | Render_Engine* re = (Render_Engine*) data;; | ||
327 | |||
328 | *error = 0; | ||
329 | return evas_cache_engine_image_request(re->cache, file, key, lo, NULL, error); | ||
330 | } | ||
331 | |||
332 | static int | ||
333 | evas_engine_sdl_image_alpha_get(void *data __UNUSED__, void *image) | ||
334 | { | ||
335 | SDL_Engine_Image_Entry *eim = image; | ||
336 | RGBA_Image *im; | ||
337 | |||
338 | if (!eim) return 1; | ||
339 | im = (RGBA_Image *) eim->cache_entry.src; | ||
340 | switch (eim->cache_entry.src->space) | ||
341 | { | ||
342 | case EVAS_COLORSPACE_ARGB8888: | ||
343 | if (im->cache_entry.flags.alpha) return 1; | ||
344 | default: | ||
345 | break; | ||
346 | } | ||
347 | return 0; | ||
348 | } | ||
349 | |||
350 | static void | ||
351 | evas_engine_sdl_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) | ||
352 | { | ||
353 | SDL_Engine_Image_Entry *eim; | ||
354 | |||
355 | eim = image; | ||
356 | if (w) *w = eim->cache_entry.src->w; | ||
357 | if (h) *h = eim->cache_entry.src->h; | ||
358 | } | ||
359 | |||
360 | static int | ||
361 | evas_engine_sdl_image_colorspace_get(void *data __UNUSED__, void *image) | ||
362 | { | ||
363 | SDL_Engine_Image_Entry *eim = image; | ||
364 | |||
365 | if (!eim) return EVAS_COLORSPACE_ARGB8888; | ||
366 | return eim->cache_entry.src->space; | ||
367 | } | ||
368 | |||
369 | static void | ||
370 | evas_engine_sdl_image_colorspace_set(void *data __UNUSED__, void *image, int cspace) | ||
371 | { | ||
372 | SDL_Engine_Image_Entry *eim = image; | ||
373 | |||
374 | if (!eim) return; | ||
375 | if (eim->cache_entry.src->space == cspace) return; | ||
376 | |||
377 | evas_cache_engine_image_colorspace(&eim->cache_entry, cspace, NULL); | ||
378 | } | ||
379 | |||
380 | static void* | ||
381 | evas_engine_sdl_image_new_from_copied_data(void *data, | ||
382 | int w, int h, | ||
383 | DATA32* image_data, | ||
384 | int alpha, int cspace) | ||
385 | { | ||
386 | Render_Engine *re = (Render_Engine*) data; | ||
387 | |||
388 | return evas_cache_engine_image_copied_data(re->cache, w, h, image_data, alpha, cspace, NULL); | ||
389 | } | ||
390 | |||
391 | static void* | ||
392 | evas_engine_sdl_image_new_from_data(void *data, int w, int h, DATA32* image_data, int alpha, int cspace) | ||
393 | { | ||
394 | Render_Engine *re = (Render_Engine*) data; | ||
395 | |||
396 | return evas_cache_engine_image_data(re->cache, w, h, image_data, alpha, cspace, NULL); | ||
397 | } | ||
398 | |||
399 | static void | ||
400 | evas_engine_sdl_image_free(void *data, void *image) | ||
401 | { | ||
402 | SDL_Engine_Image_Entry *eim = image; | ||
403 | |||
404 | (void) data; | ||
405 | |||
406 | evas_cache_engine_image_drop(&eim->cache_entry); | ||
407 | } | ||
408 | |||
409 | static void* | ||
410 | evas_engine_sdl_image_size_set(void *data, void *image, int w, int h) | ||
411 | { | ||
412 | SDL_Engine_Image_Entry *eim = image; | ||
413 | |||
414 | (void) data; | ||
415 | |||
416 | return evas_cache_engine_image_size_set(&eim->cache_entry, w, h); | ||
417 | } | ||
418 | |||
419 | static void* | ||
420 | evas_engine_sdl_image_dirty_region(void *data, | ||
421 | void *image, | ||
422 | int x, int y, int w, int h) | ||
423 | { | ||
424 | SDL_Engine_Image_Entry *eim = image; | ||
425 | |||
426 | (void) data; | ||
427 | |||
428 | return evas_cache_engine_image_dirty(&eim->cache_entry, x, y, w, h); | ||
429 | } | ||
430 | |||
431 | static void* | ||
432 | evas_engine_sdl_image_data_get(void *data, void *image, | ||
433 | int to_write, DATA32** image_data, int *err) | ||
434 | { | ||
435 | SDL_Engine_Image_Entry *eim = image; | ||
436 | RGBA_Image *im; | ||
437 | |||
438 | (void) data; | ||
439 | |||
440 | if (!eim) | ||
441 | { | ||
442 | *image_data = NULL; | ||
443 | if (err) *err = EVAS_LOAD_ERROR_GENERIC; | ||
444 | return NULL; | ||
445 | } | ||
446 | im = (RGBA_Image *) eim->cache_entry.src; | ||
447 | |||
448 | switch (eim->cache_entry.src->space) | ||
449 | { | ||
450 | case EVAS_COLORSPACE_ARGB8888: | ||
451 | if (to_write) | ||
452 | eim = (SDL_Engine_Image_Entry *) evas_cache_engine_image_dirty(&eim->cache_entry, 0, 0, eim->cache_entry.src->w, eim->cache_entry.src->h); | ||
453 | |||
454 | evas_cache_engine_image_load_data(&eim->cache_entry); | ||
455 | *image_data = im->image.data; | ||
456 | break; | ||
457 | case EVAS_COLORSPACE_YCBCR422P709_PL: | ||
458 | case EVAS_COLORSPACE_YCBCR422P601_PL: | ||
459 | case EVAS_COLORSPACE_YCBCR422601_PL: | ||
460 | *image_data = im->cs.data; | ||
461 | break; | ||
462 | default: | ||
463 | abort(); | ||
464 | break; | ||
465 | } | ||
466 | if (err) *err = EVAS_LOAD_ERROR_NONE; | ||
467 | return eim; | ||
468 | } | ||
469 | |||
470 | static void* | ||
471 | evas_engine_sdl_image_data_put(void *data, void *image, DATA32* image_data) | ||
472 | { | ||
473 | SDL_Engine_Image_Entry *eim = image; | ||
474 | Render_Engine *re = data; | ||
475 | RGBA_Image *im; | ||
476 | |||
477 | if (!eim) return NULL; | ||
478 | im = (RGBA_Image*) eim->cache_entry.src; | ||
479 | |||
480 | switch (eim->cache_entry.src->space) | ||
481 | { | ||
482 | case EVAS_COLORSPACE_ARGB8888: | ||
483 | if (image_data != im->image.data) | ||
484 | { | ||
485 | evas_cache_engine_image_drop(&eim->cache_entry); | ||
486 | eim = (SDL_Engine_Image_Entry *) evas_cache_engine_image_data(re->cache, | ||
487 | eim->cache_entry.w, eim->cache_entry.h, | ||
488 | image_data, | ||
489 | func.image_alpha_get(data, eim), | ||
490 | func.image_colorspace_get(data, eim), | ||
491 | NULL); | ||
492 | } | ||
493 | break; | ||
494 | case EVAS_COLORSPACE_YCBCR422P601_PL: | ||
495 | case EVAS_COLORSPACE_YCBCR422P709_PL: | ||
496 | case EVAS_COLORSPACE_YCBCR422601_PL: | ||
497 | if (image_data != im->cs.data) | ||
498 | { | ||
499 | if (im->cs.data) | ||
500 | if (!im->cs.no_free) | ||
501 | free(im->cs.data); | ||
502 | im->cs.data = image_data; | ||
503 | evas_common_image_colorspace_dirty(im); | ||
504 | } | ||
505 | break; | ||
506 | default: | ||
507 | abort(); | ||
508 | break; | ||
509 | } | ||
510 | return eim; | ||
511 | } | ||
512 | |||
513 | static void | ||
514 | evas_engine_sdl_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) | ||
515 | { | ||
516 | SDL_Engine_Image_Entry *eim = image; | ||
517 | RGBA_Image *im; | ||
518 | |||
519 | if (!eim) return ; | ||
520 | im = (RGBA_Image*) eim->cache_entry.src; | ||
521 | if (!im) return ; | ||
522 | evas_cache_image_preload_data(&im->cache_entry, target); | ||
523 | } | ||
524 | |||
525 | static void | ||
526 | evas_engine_sdl_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) | ||
527 | { | ||
528 | SDL_Engine_Image_Entry *eim = image; | ||
529 | RGBA_Image *im; | ||
530 | |||
531 | if (!eim) return ; | ||
532 | im = (RGBA_Image*) eim->cache_entry.src; | ||
533 | if (!im) return ; | ||
534 | evas_cache_image_preload_cancel(&im->cache_entry, target); | ||
535 | } | ||
536 | |||
537 | static void* | ||
538 | evas_engine_sdl_image_alpha_set(void *data, void *image, int has_alpha) | ||
539 | { | ||
540 | SDL_Engine_Image_Entry *eim = image; | ||
541 | RGBA_Image *im; | ||
542 | |||
543 | (void) data; | ||
544 | |||
545 | if (!eim) return NULL; | ||
546 | |||
547 | im = (RGBA_Image *) eim->cache_entry.src; | ||
548 | |||
549 | if (eim->cache_entry.src->space != EVAS_COLORSPACE_ARGB8888) | ||
550 | { | ||
551 | im->cache_entry.flags.alpha = 0; | ||
552 | return eim; | ||
553 | } | ||
554 | |||
555 | eim = (SDL_Engine_Image_Entry *) evas_cache_engine_image_dirty(&eim->cache_entry, 0, 0, eim->cache_entry.w, eim->cache_entry.h); | ||
556 | |||
557 | /* FIXME: update SDL_Surface flags */ | ||
558 | im->cache_entry.flags.alpha = has_alpha ? 1 : 0; | ||
559 | return eim; | ||
560 | } | ||
561 | |||
562 | static void* | ||
563 | evas_engine_sdl_image_border_set(void *data __UNUSED__, void *image, int l __UNUSED__, int r __UNUSED__, int t __UNUSED__, int b __UNUSED__) | ||
564 | { | ||
565 | return image; | ||
566 | } | ||
567 | |||
568 | static void | ||
569 | evas_engine_sdl_image_border_get(void *data __UNUSED__, void *image __UNUSED__, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__) | ||
570 | { | ||
571 | /* FIXME: need to know what evas expect from this call */ | ||
572 | } | ||
573 | |||
574 | static void | ||
575 | evas_engine_sdl_image_draw(void *data, void *context, void *surface, void *image, | ||
576 | int src_region_x, int src_region_y, int src_region_w, int src_region_h, | ||
577 | int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, | ||
578 | int smooth) | ||
579 | { | ||
580 | SDL_Engine_Image_Entry *eim = image; | ||
581 | SDL_Engine_Image_Entry *dst = surface; | ||
582 | RGBA_Draw_Context *dc = (RGBA_Draw_Context*) context; | ||
583 | int mustlock_im = 0; | ||
584 | int mustlock_dst = 0; | ||
585 | |||
586 | (void) data; | ||
587 | |||
588 | if (eim->cache_entry.src->space == EVAS_COLORSPACE_ARGB8888) | ||
589 | evas_cache_engine_image_load_data(&eim->cache_entry); | ||
590 | |||
591 | /* Fallback to software method */ | ||
592 | if (SDL_MUSTLOCK(dst->surface)) | ||
593 | { | ||
594 | mustlock_dst = 1; | ||
595 | SDL_LockSurface(dst->surface); | ||
596 | _SDL_UPDATE_PIXELS(dst); | ||
597 | } | ||
598 | |||
599 | if (eim->surface && SDL_MUSTLOCK(eim->surface)) | ||
600 | { | ||
601 | mustlock_im = 1; | ||
602 | SDL_LockSurface(eim->surface); | ||
603 | _SDL_UPDATE_PIXELS(eim); | ||
604 | } | ||
605 | |||
606 | evas_common_image_colorspace_normalize((RGBA_Image *) eim->cache_entry.src); | ||
607 | |||
608 | if (smooth) | ||
609 | evas_common_scale_rgba_in_to_out_clip_smooth((RGBA_Image *) eim->cache_entry.src, | ||
610 | (RGBA_Image *) dst->cache_entry.src, | ||
611 | dc, | ||
612 | src_region_x, src_region_y, src_region_w, src_region_h, | ||
613 | dst_region_x, dst_region_y, dst_region_w, dst_region_h); | ||
614 | else | ||
615 | evas_common_scale_rgba_in_to_out_clip_sample((RGBA_Image *) eim->cache_entry.src, | ||
616 | (RGBA_Image *) dst->cache_entry.src, | ||
617 | dc, | ||
618 | src_region_x, src_region_y, src_region_w, src_region_h, | ||
619 | dst_region_x, dst_region_y, dst_region_w, dst_region_h); | ||
620 | evas_common_cpu_end_opt (); | ||
621 | |||
622 | if (mustlock_im) | ||
623 | SDL_UnlockSurface(eim->surface); | ||
624 | |||
625 | if (mustlock_dst) | ||
626 | SDL_UnlockSurface(dst->surface); | ||
627 | } | ||
628 | |||
629 | static void | ||
630 | evas_engine_sdl_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) | ||
631 | { | ||
632 | SDL_Engine_Image_Entry *eim = image; | ||
633 | SDL_Engine_Image_Entry *dst = surface; | ||
634 | int mustlock_im = 0; | ||
635 | int mustlock_dst = 0; | ||
636 | |||
637 | if (!eim || !dst) return; | ||
638 | |||
639 | if (SDL_MUSTLOCK(dst->surface)) | ||
640 | { | ||
641 | mustlock_dst = 1; | ||
642 | SDL_LockSurface(dst->surface); | ||
643 | _SDL_UPDATE_PIXELS(dst); | ||
644 | } | ||
645 | |||
646 | if (eim->surface && SDL_MUSTLOCK(eim->surface)) | ||
647 | { | ||
648 | mustlock_im = 1; | ||
649 | SDL_LockSurface(eim->surface); | ||
650 | _SDL_UPDATE_PIXELS(eim); | ||
651 | } | ||
652 | |||
653 | evas_common_map_rgba((RGBA_Image*) eim->cache_entry.src, | ||
654 | (RGBA_Image*) dst->cache_entry.src, context, npoints, p, smooth, level); | ||
655 | evas_common_cpu_end_opt(); | ||
656 | |||
657 | if (mustlock_im) | ||
658 | SDL_UnlockSurface(eim->surface); | ||
659 | |||
660 | if (mustlock_dst) | ||
661 | SDL_UnlockSurface(dst->surface); | ||
662 | } | ||
663 | |||
664 | static void * | ||
665 | evas_engine_sdl_image_map_surface_new(void *data, int w, int h, int alpha) | ||
666 | { | ||
667 | Render_Engine *re = (Render_Engine*) data; | ||
668 | void *surface; | ||
669 | |||
670 | surface = evas_cache_engine_image_copied_data(re->cache, | ||
671 | w, h, NULL, alpha, | ||
672 | EVAS_COLORSPACE_ARGB8888, | ||
673 | NULL); | ||
674 | return surface; | ||
675 | } | ||
676 | |||
677 | static void | ||
678 | evas_engine_sdl_image_map_surface_free(void *data __UNUSED__, void *surface) | ||
679 | { | ||
680 | evas_cache_engine_image_drop(surface); | ||
681 | } | ||
682 | |||
683 | static void | ||
684 | evas_engine_sdl_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) | ||
685 | { | ||
686 | SDL_Engine_Image_Entry *eim; | ||
687 | |||
688 | if (!image) return ; | ||
689 | eim = image; | ||
690 | eim->cache_entry.src->scale_hint = hint; | ||
691 | } | ||
692 | |||
693 | static int | ||
694 | evas_engine_sdl_image_scale_hint_get(void *data __UNUSED__, void *image) | ||
695 | { | ||
696 | SDL_Engine_Image_Entry *eim; | ||
697 | |||
698 | if (!image) return EVAS_IMAGE_SCALE_HINT_NONE; | ||
699 | eim = image; | ||
700 | return eim->cache_entry.src->scale_hint; | ||
701 | } | ||
702 | |||
703 | static void | ||
704 | evas_engine_sdl_image_cache_flush(void *data) | ||
705 | { | ||
706 | Render_Engine *re = (Render_Engine*) data; | ||
707 | int size; | ||
708 | |||
709 | size = evas_cache_engine_image_get(re->cache); | ||
710 | evas_cache_engine_image_set(re->cache, 0); | ||
711 | evas_cache_engine_image_set(re->cache, size); | ||
712 | } | ||
713 | |||
714 | static void | ||
715 | evas_engine_sdl_image_cache_set(void *data, int bytes) | ||
716 | { | ||
717 | Render_Engine *re = (Render_Engine*) data; | ||
718 | |||
719 | evas_cache_engine_image_set(re->cache, bytes); | ||
720 | } | ||
721 | |||
722 | static int | ||
723 | evas_engine_sdl_image_cache_get(void *data) | ||
724 | { | ||
725 | Render_Engine *re = (Render_Engine*) data; | ||
726 | |||
727 | return evas_cache_engine_image_get(re->cache); | ||
728 | } | ||
729 | |||
730 | static char* | ||
731 | evas_engine_sdl_image_comment_get(void *data __UNUSED__, void *image, char *key __UNUSED__) | ||
732 | { | ||
733 | SDL_Engine_Image_Entry *eim = image; | ||
734 | RGBA_Image *im; | ||
735 | |||
736 | if (!eim) return NULL; | ||
737 | im = (RGBA_Image *) eim->cache_entry.src; | ||
738 | |||
739 | return im->info.comment; | ||
740 | } | ||
741 | |||
742 | static char* | ||
743 | evas_engine_sdl_image_format_get(void *data __UNUSED__, void *image __UNUSED__) | ||
744 | { | ||
745 | /* FIXME: need to know what evas expect from this call */ | ||
746 | return NULL; | ||
747 | } | ||
748 | |||
749 | static void | ||
750 | evas_engine_sdl_font_draw(void *data __UNUSED__, 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) | ||
751 | { | ||
752 | SDL_Engine_Image_Entry *eim = surface; | ||
753 | int mustlock_im = 0; | ||
754 | |||
755 | if (eim->surface && SDL_MUSTLOCK(eim->surface)) | ||
756 | { | ||
757 | mustlock_im = 1; | ||
758 | SDL_LockSurface(eim->surface); | ||
759 | _SDL_UPDATE_PIXELS(eim); | ||
760 | } | ||
761 | |||
762 | evas_common_font_draw((RGBA_Image *) eim->cache_entry.src, context, font, x, y, intl_props); | ||
763 | evas_common_cpu_end_opt(); | ||
764 | |||
765 | if (mustlock_im) | ||
766 | SDL_UnlockSurface(eim->surface); | ||
767 | } | ||
768 | |||
769 | static void | ||
770 | evas_engine_sdl_line_draw(void *data __UNUSED__, void *context, void *surface, int x1, int y1, int x2, int y2) | ||
771 | { | ||
772 | SDL_Engine_Image_Entry *eim = surface; | ||
773 | int mustlock_im = 0; | ||
774 | |||
775 | if (eim->surface && SDL_MUSTLOCK(eim->surface)) | ||
776 | { | ||
777 | mustlock_im = 1; | ||
778 | SDL_LockSurface(eim->surface); | ||
779 | _SDL_UPDATE_PIXELS(eim); | ||
780 | } | ||
781 | |||
782 | evas_common_line_draw((RGBA_Image *) eim->cache_entry.src, context, x1, y1, x2, y2); | ||
783 | evas_common_cpu_end_opt(); | ||
784 | |||
785 | if (mustlock_im) | ||
786 | SDL_UnlockSurface(eim->surface); | ||
787 | } | ||
788 | |||
789 | static void | ||
790 | evas_engine_sdl_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x, int y, int w, int h) | ||
791 | { | ||
792 | SDL_Engine_Image_Entry *eim = surface; | ||
793 | #if ENGINE_SDL_PRIMITIVE | ||
794 | RGBA_Draw_Context *dc = context; | ||
795 | #endif | ||
796 | int mustlock_im = 0; | ||
797 | |||
798 | #if ENGINE_SDL_PRIMITIVE | ||
799 | if (A_VAL(&dc->col.col) != 0x00) | ||
800 | { | ||
801 | if (A_VAL(&dc->col.col) != 0xFF) | ||
802 | { | ||
803 | #endif | ||
804 | if (eim->surface && SDL_MUSTLOCK(eim->surface)) | ||
805 | { | ||
806 | mustlock_im = 1; | ||
807 | SDL_LockSurface(eim->surface); | ||
808 | _SDL_UPDATE_PIXELS(eim); | ||
809 | } | ||
810 | |||
811 | evas_common_rectangle_draw((RGBA_Image *) eim->cache_entry.src, context, x, y, w, h); | ||
812 | evas_common_cpu_end_opt(); | ||
813 | |||
814 | if (mustlock_im) | ||
815 | SDL_UnlockSurface(eim->surface); | ||
816 | #if ENGINE_SDL_PRIMITIVE | ||
817 | } | ||
818 | else | ||
819 | { | ||
820 | SDL_Rect dstrect; | ||
821 | |||
822 | if (dc->clip.use) | ||
823 | { | ||
824 | SDL_Rect cliprect; | ||
825 | |||
826 | cliprect.x = dc->clip.x; | ||
827 | cliprect.y = dc->clip.y; | ||
828 | cliprect.w = dc->clip.w; | ||
829 | cliprect.h = dc->clip.h; | ||
830 | |||
831 | SDL_SetClipRect(eim->surface, &cliprect); | ||
832 | } | ||
833 | |||
834 | dstrect.x = x; | ||
835 | dstrect.y = y; | ||
836 | dstrect.w = w; | ||
837 | dstrect.h = h; | ||
838 | |||
839 | SDL_FillRect(eim->surface, &dstrect, SDL_MapRGBA(eim->surface->format, R_VAL(&dc->col.col), G_VAL(&dc->col.col), B_VAL(&dc->col.col), 0xFF)); | ||
840 | |||
841 | if (dc->clip.use) | ||
842 | SDL_SetClipRect(eim->surface, NULL); | ||
843 | } | ||
844 | } | ||
845 | #endif | ||
846 | } | ||
847 | |||
848 | static void | ||
849 | evas_engine_sdl_polygon_draw(void *data __UNUSED__, void *context, void *surface, void *polygon, int x, int y) | ||
850 | { | ||
851 | SDL_Engine_Image_Entry *eim = surface; | ||
852 | int mustlock_im = 0; | ||
853 | |||
854 | if (eim->surface && SDL_MUSTLOCK(eim->surface)) | ||
855 | { | ||
856 | mustlock_im = 1; | ||
857 | SDL_LockSurface(eim->surface); | ||
858 | _SDL_UPDATE_PIXELS(eim); | ||
859 | } | ||
860 | |||
861 | evas_common_polygon_draw((RGBA_Image *) eim->cache_entry.src, context, polygon, x, y); | ||
862 | evas_common_cpu_end_opt(); | ||
863 | |||
864 | if (mustlock_im) | ||
865 | SDL_UnlockSurface(eim->surface); | ||
866 | } | ||
867 | |||
868 | static int module_open(Evas_Module *em) | ||
869 | { | ||
870 | if (!em) return 0; | ||
871 | /* get whatever engine module we inherit from */ | ||
872 | if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; | ||
873 | _evas_engine_soft_sdl_log_dom = eina_log_domain_register | ||
874 | ("evas-software_sdl", EVAS_DEFAULT_LOG_COLOR); | ||
875 | if (_evas_engine_soft_sdl_log_dom < 0) | ||
876 | { | ||
877 | EINA_LOG_ERR("Can not create a module log domain."); | ||
878 | return 0; | ||
879 | } | ||
880 | /* store it for later use */ | ||
881 | func = pfunc; | ||
882 | /* now to override methods */ | ||
883 | #define ORD(f) EVAS_API_OVERRIDE(f, &func, evas_engine_sdl_) | ||
884 | ORD(info); | ||
885 | ORD(info_free); | ||
886 | ORD(setup); | ||
887 | ORD(output_free); | ||
888 | ORD(output_resize); | ||
889 | ORD(output_tile_size_set); | ||
890 | ORD(output_redraws_rect_add); | ||
891 | ORD(output_redraws_rect_del); | ||
892 | ORD(output_redraws_clear); | ||
893 | ORD(output_redraws_next_update_get); | ||
894 | ORD(output_redraws_next_update_push); | ||
895 | ORD(output_flush); | ||
896 | ORD(output_idle_flush); | ||
897 | ORD(image_load); | ||
898 | ORD(image_new_from_data); | ||
899 | ORD(image_new_from_copied_data); | ||
900 | ORD(image_colorspace_set); | ||
901 | ORD(image_colorspace_get); | ||
902 | ORD(image_free); | ||
903 | ORD(image_size_set); | ||
904 | ORD(image_size_get); | ||
905 | ORD(image_dirty_region); | ||
906 | ORD(image_data_get); | ||
907 | ORD(image_data_put); | ||
908 | ORD(image_data_preload_request); | ||
909 | ORD(image_data_preload_cancel); | ||
910 | ORD(image_alpha_set); | ||
911 | ORD(image_alpha_get); | ||
912 | ORD(image_border_set); | ||
913 | ORD(image_border_get); | ||
914 | ORD(image_draw); | ||
915 | ORD(image_map_draw); | ||
916 | ORD(image_map_surface_new); | ||
917 | ORD(image_map_surface_free); | ||
918 | ORD(image_comment_get); | ||
919 | ORD(image_format_get); | ||
920 | ORD(image_cache_flush); | ||
921 | ORD(image_cache_set); | ||
922 | ORD(image_cache_get); | ||
923 | ORD(font_draw); | ||
924 | ORD(line_draw); | ||
925 | ORD(rectangle_draw); | ||
926 | ORD(polygon_draw); | ||
927 | |||
928 | ORD(image_scale_hint_set); | ||
929 | ORD(image_scale_hint_get); | ||
930 | |||
931 | /* now advertise out own api */ | ||
932 | em->functions = (void *)(&func); | ||
933 | return 1; | ||
934 | } | ||
935 | |||
936 | static void module_close(Evas_Module *em __UNUSED__) | ||
937 | { | ||
938 | eina_log_domain_unregister(_evas_engine_soft_sdl_log_dom); | ||
939 | } | ||
940 | |||
941 | static Evas_Module_Api evas_modapi = | ||
942 | { | ||
943 | EVAS_MODULE_API_VERSION, | ||
944 | "software_sdl", | ||
945 | "none", | ||
946 | { | ||
947 | module_open, | ||
948 | module_close | ||
949 | } | ||
950 | }; | ||
951 | |||
952 | EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_sdl); | ||
953 | |||
954 | #ifndef EVAS_STATIC_BUILD_SOFTWARE_SDL | ||
955 | EVAS_EINA_MODULE_DEFINE(engine, software_sdl); | ||
956 | #endif | ||
957 | |||
958 | /* Private routines. */ | ||
959 | |||
960 | static void* | ||
961 | _sdl_output_setup (int w, int h, int fullscreen, int noframe, int alpha, int hwsurface) | ||
962 | { | ||
963 | Render_Engine *re = calloc(1, sizeof(Render_Engine)); | ||
964 | SDL_Surface *surface; | ||
965 | |||
966 | if (!re) | ||
967 | return NULL; | ||
968 | |||
969 | /* if we haven't initialized - init (automatic abort if already done) */ | ||
970 | evas_common_cpu_init(); | ||
971 | evas_common_blend_init(); | ||
972 | evas_common_image_init(); | ||
973 | evas_common_convert_init(); | ||
974 | evas_common_scale_init(); | ||
975 | evas_common_rectangle_init(); | ||
976 | evas_common_polygon_init(); | ||
977 | evas_common_line_init(); | ||
978 | evas_common_font_init(); | ||
979 | evas_common_draw_init(); | ||
980 | evas_common_tilebuf_init(); | ||
981 | |||
982 | if (w <= 0) w = 640; | ||
983 | if (h <= 0) h = 480; | ||
984 | |||
985 | re->cache = evas_cache_engine_image_init(&_sdl_cache_engine_image_cb, evas_common_image_cache_get()); | ||
986 | if (!re->cache) | ||
987 | { | ||
988 | ERR("Evas_Cache_Engine_Image allocation failed!"); | ||
989 | free (re); | ||
990 | return NULL; | ||
991 | } | ||
992 | |||
993 | re->tb = evas_common_tilebuf_new(w, h); | ||
994 | /* in preliminary tests 16x16 gave highest framerates */ | ||
995 | evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); | ||
996 | surface = SDL_SetVideoMode(w, h, 32, | ||
997 | (hwsurface ? SDL_HWSURFACE : SDL_SWSURFACE) | ||
998 | | (fullscreen ? SDL_FULLSCREEN : 0) | ||
999 | | (noframe ? SDL_NOFRAME : 0) | ||
1000 | | (alpha ? SDL_SRCALPHA : 0)); | ||
1001 | |||
1002 | if (!surface) | ||
1003 | { | ||
1004 | ERR("SDL_SetVideoMode [ %i x %i x 32 ] failed.", w, h); | ||
1005 | evas_cache_engine_image_shutdown(re->cache); | ||
1006 | free (re); | ||
1007 | return NULL; | ||
1008 | } | ||
1009 | |||
1010 | SDL_SetAlpha(surface, SDL_SRCALPHA | SDL_RLEACCEL, 0); | ||
1011 | |||
1012 | /* We create a "fake" RGBA_Image which points to the SDL surface. Each access | ||
1013 | * to that surface is wrapped in Lock / Unlock calls whenever the data is | ||
1014 | * manipulated directly. */ | ||
1015 | re->rgba_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface); | ||
1016 | if (!re->rgba_engine_image) | ||
1017 | { | ||
1018 | CRIT("RGBA_Image allocation from SDL failed"); | ||
1019 | evas_cache_engine_image_shutdown(re->cache); | ||
1020 | free (re); | ||
1021 | return NULL; | ||
1022 | } | ||
1023 | |||
1024 | SDL_FillRect(surface, NULL, 0); | ||
1025 | |||
1026 | re->flags.alpha = alpha; | ||
1027 | re->flags.hwsurface = hwsurface; | ||
1028 | re->flags.fullscreen = fullscreen; | ||
1029 | re->flags.noframe = noframe; | ||
1030 | return re; | ||
1031 | } | ||
1032 | |||
1033 | static Engine_Image_Entry* | ||
1034 | _sdl_image_alloc(void) | ||
1035 | { | ||
1036 | SDL_Engine_Image_Entry *new; | ||
1037 | |||
1038 | new = calloc(1, sizeof (SDL_Engine_Image_Entry)); | ||
1039 | |||
1040 | return (Engine_Image_Entry *) new; | ||
1041 | } | ||
1042 | |||
1043 | static void | ||
1044 | _sdl_image_delete(Engine_Image_Entry *eim) | ||
1045 | { | ||
1046 | free(eim); | ||
1047 | } | ||
1048 | |||
1049 | static int | ||
1050 | _sdl_image_constructor(Engine_Image_Entry *ie, void *data __UNUSED__) | ||
1051 | { | ||
1052 | SDL_Surface *sdl = NULL; | ||
1053 | SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) ie; | ||
1054 | RGBA_Image *im; | ||
1055 | |||
1056 | im = (RGBA_Image *) ie->src; | ||
1057 | |||
1058 | if (im) | ||
1059 | { | ||
1060 | evas_cache_image_load_data(&im->cache_entry); | ||
1061 | |||
1062 | if (im->image.data) | ||
1063 | { | ||
1064 | /* FIXME: Take care of CSPACE */ | ||
1065 | sdl = SDL_CreateRGBSurfaceFrom(im->image.data, | ||
1066 | ie->w, ie->h, | ||
1067 | 32, ie->w * 4, | ||
1068 | RMASK, GMASK, BMASK, AMASK); | ||
1069 | eim->surface = sdl; | ||
1070 | eim->flags.engine_surface = 0; | ||
1071 | } | ||
1072 | } | ||
1073 | |||
1074 | return EVAS_LOAD_ERROR_NONE; | ||
1075 | } | ||
1076 | |||
1077 | static void | ||
1078 | _sdl_image_destructor(Engine_Image_Entry *eie) | ||
1079 | { | ||
1080 | SDL_Engine_Image_Entry *seie = (SDL_Engine_Image_Entry *) eie; | ||
1081 | |||
1082 | if (seie->surface && !seie->flags.engine_surface) | ||
1083 | SDL_FreeSurface(seie->surface); | ||
1084 | seie->surface = NULL; | ||
1085 | } | ||
1086 | |||
1087 | static int | ||
1088 | _sdl_image_dirty(Engine_Image_Entry *dst, const Engine_Image_Entry *src __UNUSED__) | ||
1089 | { | ||
1090 | SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) dst; | ||
1091 | SDL_Surface *sdl = NULL; | ||
1092 | RGBA_Image *im; | ||
1093 | |||
1094 | im = (RGBA_Image *) dst->src; | ||
1095 | |||
1096 | /* FIXME: Take care of CSPACE */ | ||
1097 | sdl = SDL_CreateRGBSurfaceFrom(im->image.data, | ||
1098 | dst->w, dst->h, | ||
1099 | 32, dst->w * 4, | ||
1100 | 0xff0000, 0xff00, 0xff, 0xff000000); | ||
1101 | eim->surface = sdl; | ||
1102 | eim->flags.engine_surface = 0; | ||
1103 | |||
1104 | return 0; | ||
1105 | } | ||
1106 | |||
1107 | static int | ||
1108 | _sdl_image_update_data(Engine_Image_Entry *dst, void* engine_data) | ||
1109 | { | ||
1110 | SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) dst; | ||
1111 | SDL_Surface *sdl = NULL; | ||
1112 | RGBA_Image *im; | ||
1113 | |||
1114 | im = (RGBA_Image *) dst->src; | ||
1115 | |||
1116 | if (engine_data) | ||
1117 | { | ||
1118 | sdl = engine_data; | ||
1119 | |||
1120 | if (im) | ||
1121 | { | ||
1122 | im->image.data = sdl->pixels; | ||
1123 | im->image.no_free = 1; | ||
1124 | im->cache_entry.flags.alpha = 0; | ||
1125 | dst->src->w = sdl->w; | ||
1126 | dst->src->h = sdl->h; | ||
1127 | } | ||
1128 | dst->w = sdl->w; | ||
1129 | dst->h = sdl->h; | ||
1130 | } | ||
1131 | else | ||
1132 | { | ||
1133 | /* FIXME: Take care of CSPACE */ | ||
1134 | SDL_FreeSurface(eim->surface); | ||
1135 | sdl = SDL_CreateRGBSurfaceFrom(im->image.data, | ||
1136 | dst->w, dst->h, | ||
1137 | 32, dst->w * 4, | ||
1138 | RMASK, GMASK, BMASK, AMASK); | ||
1139 | } | ||
1140 | |||
1141 | eim->surface = sdl; | ||
1142 | |||
1143 | return 0; | ||
1144 | } | ||
1145 | |||
1146 | static int | ||
1147 | _sdl_image_size_set(Engine_Image_Entry *dst, const Engine_Image_Entry *src __UNUSED__) | ||
1148 | { | ||
1149 | SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) dst; | ||
1150 | SDL_Surface *sdl; | ||
1151 | RGBA_Image *im; | ||
1152 | |||
1153 | im = (RGBA_Image *) dst->src; | ||
1154 | |||
1155 | /* FIXME: handle im == NULL */ | ||
1156 | sdl = SDL_CreateRGBSurfaceFrom(im->image.data, | ||
1157 | dst->w, dst->h, | ||
1158 | 32, dst->w * 4, | ||
1159 | RMASK, GMASK, BMASK, AMASK); | ||
1160 | |||
1161 | eim->surface = sdl; | ||
1162 | |||
1163 | return 0; | ||
1164 | } | ||
1165 | |||
1166 | static void | ||
1167 | _sdl_image_load(Engine_Image_Entry *eim, const Image_Entry *ie_im) | ||
1168 | { | ||
1169 | SDL_Engine_Image_Entry *load = (SDL_Engine_Image_Entry *) eim; | ||
1170 | SDL_Surface *sdl; | ||
1171 | |||
1172 | if (!load->surface) | ||
1173 | { | ||
1174 | RGBA_Image *im; | ||
1175 | |||
1176 | im = (RGBA_Image *) ie_im; | ||
1177 | |||
1178 | sdl = SDL_CreateRGBSurfaceFrom(im->image.data, | ||
1179 | eim->w, eim->h, | ||
1180 | 32, eim->w * 4, | ||
1181 | RMASK, GMASK, BMASK, AMASK); | ||
1182 | load->surface = sdl; | ||
1183 | } | ||
1184 | } | ||
1185 | |||
1186 | static int | ||
1187 | _sdl_image_mem_size_get(Engine_Image_Entry *eim) | ||
1188 | { | ||
1189 | SDL_Engine_Image_Entry *seie = (SDL_Engine_Image_Entry *) eim; | ||
1190 | int size = 0; | ||
1191 | |||
1192 | /* FIXME: Count surface size. */ | ||
1193 | if (seie->surface) | ||
1194 | size = sizeof (SDL_Surface) + sizeof (SDL_PixelFormat); | ||
1195 | |||
1196 | return size; | ||
1197 | } | ||
1198 | |||
1199 | #ifdef DEBUG_SDL | ||
1200 | static void | ||
1201 | _sdl_image_debug(const char* context, Engine_Image_Entry* eie) | ||
1202 | { | ||
1203 | SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) eie; | ||
1204 | |||
1205 | DBG("*** %s image (%p) ***", context, eim); | ||
1206 | if (eim) | ||
1207 | { | ||
1208 | DBG("W: %i, H: %i, R: %i", eim->cache_entry.w, eim->cache_entry.h, eim->cache_entry.references); | ||
1209 | if (eim->cache_entry.src) | ||
1210 | DBG("Pixels: %p, SDL Surface: %p",((RGBA_Image*) eim->cache_entry.src)->image.data, eim->surface); | ||
1211 | if (eim->surface) | ||
1212 | DBG("Surface->pixels: %p", eim->surface->pixels); | ||
1213 | DBG("Key: %s", eim->cache_entry.cache_key); | ||
1214 | DBG("Reference: %i", eim->cache_entry.references); | ||
1215 | } | ||
1216 | DBG("*** ***"); | ||
1217 | } | ||
1218 | #endif | ||
diff --git a/libraries/evas/src/modules/engines/software_sdl/evas_engine.h b/libraries/evas/src/modules/engines/software_sdl/evas_engine.h new file mode 100644 index 0000000..5133fec --- /dev/null +++ b/libraries/evas/src/modules/engines/software_sdl/evas_engine.h | |||
@@ -0,0 +1,72 @@ | |||
1 | #ifndef EVAS_ENGINE_SDL_H | ||
2 | #define EVAS_ENGINE_SDL_H | ||
3 | |||
4 | #include "evas_common.h" | ||
5 | #include "evas_private.h" | ||
6 | #include "Evas_Engine_SDL.h" | ||
7 | |||
8 | extern int _evas_engine_soft_sdl_log_dom ; | ||
9 | #ifdef ERR | ||
10 | # undef ERR | ||
11 | #endif | ||
12 | #define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft_sdl_log_dom, __VA_ARGS__) | ||
13 | |||
14 | #ifdef DBG | ||
15 | # undef DBG | ||
16 | #endif | ||
17 | #define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft_sdl_log_dom, __VA_ARGS__) | ||
18 | |||
19 | #ifdef INF | ||
20 | # undef INF | ||
21 | #endif | ||
22 | #define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft_sdl_log_dom, __VA_ARGS__) | ||
23 | |||
24 | #ifdef WRN | ||
25 | # undef WRN | ||
26 | #endif | ||
27 | #define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft_sdl_log_dom, __VA_ARGS__) | ||
28 | |||
29 | #ifdef CRIT | ||
30 | # undef CRIT | ||
31 | #endif | ||
32 | #define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft_sdl_log_dom, __VA_ARGS__) | ||
33 | |||
34 | typedef struct _SDL_Engine_Image_Entry SDL_Engine_Image_Entry; | ||
35 | struct _SDL_Engine_Image_Entry | ||
36 | { | ||
37 | Engine_Image_Entry cache_entry; | ||
38 | |||
39 | SDL_Surface *surface; | ||
40 | |||
41 | struct | ||
42 | { | ||
43 | unsigned int engine_surface : 1; | ||
44 | } flags; | ||
45 | }; | ||
46 | |||
47 | typedef struct _Render_Engine Render_Engine; | ||
48 | struct _Render_Engine | ||
49 | { | ||
50 | SDL_Engine_Image_Entry *rgba_engine_image; | ||
51 | |||
52 | Tilebuf *tb; | ||
53 | Tilebuf_Rect *rects; | ||
54 | Eina_Inlist *cur_rect; | ||
55 | |||
56 | Evas_Cache_Engine_Image *cache; | ||
57 | |||
58 | SDL_Rect *update_rects; | ||
59 | int update_rects_count; | ||
60 | int update_rects_limit; | ||
61 | |||
62 | struct | ||
63 | { | ||
64 | unsigned int fullscreen : 1; | ||
65 | unsigned int noframe : 1; | ||
66 | unsigned int alpha : 1; | ||
67 | unsigned int hwsurface : 1; | ||
68 | unsigned int end : 1; | ||
69 | } flags; | ||
70 | }; | ||
71 | |||
72 | #endif | ||