diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/modules/engines/fb | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/modules/engines/fb/Evas_Engine_FB.h | 25 | ||||
-rw-r--r-- | libraries/evas/src/modules/engines/fb/Makefile.am | 48 | ||||
-rw-r--r-- | libraries/evas/src/modules/engines/fb/Makefile.in | 825 | ||||
-rw-r--r-- | libraries/evas/src/modules/engines/fb/evas_engine.c | 317 | ||||
-rw-r--r-- | libraries/evas/src/modules/engines/fb/evas_engine.h | 85 | ||||
-rw-r--r-- | libraries/evas/src/modules/engines/fb/evas_fb.h | 93 | ||||
-rw-r--r-- | libraries/evas/src/modules/engines/fb/evas_fb_main.c | 600 | ||||
-rw-r--r-- | libraries/evas/src/modules/engines/fb/evas_outbuf.c | 397 |
8 files changed, 2390 insertions, 0 deletions
diff --git a/libraries/evas/src/modules/engines/fb/Evas_Engine_FB.h b/libraries/evas/src/modules/engines/fb/Evas_Engine_FB.h new file mode 100644 index 0000000..b548237 --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/Evas_Engine_FB.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef _EVAS_ENGINE_FB_H | ||
2 | #define _EVAS_ENGINE_FB_H | ||
3 | |||
4 | typedef struct _Evas_Engine_Info_FB Evas_Engine_Info_FB; | ||
5 | |||
6 | struct _Evas_Engine_Info_FB | ||
7 | { | ||
8 | /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ | ||
9 | /* at you and make nasty noises */ | ||
10 | Evas_Engine_Info magic; | ||
11 | |||
12 | struct { | ||
13 | |||
14 | int virtual_terminal; | ||
15 | int device_number; | ||
16 | int refresh; | ||
17 | int rotation; | ||
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/fb/Makefile.am b/libraries/evas/src/modules/engines/fb/Makefile.am new file mode 100644 index 0000000..55127bb --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/Makefile.am | |||
@@ -0,0 +1,48 @@ | |||
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_fb_cflags@ | ||
13 | |||
14 | if BUILD_ENGINE_FB | ||
15 | |||
16 | FB_SOURCES = \ | ||
17 | evas_engine.c \ | ||
18 | evas_fb_main.c \ | ||
19 | evas_outbuf.c | ||
20 | |||
21 | FB_LIBADD = @evas_engine_fb_libs@ | ||
22 | |||
23 | |||
24 | includes_HEADERS = Evas_Engine_FB.h | ||
25 | includesdir = $(includedir)/evas-@VMAJ@ | ||
26 | |||
27 | if !EVAS_STATIC_BUILD_FB | ||
28 | |||
29 | pkgdir = $(libdir)/evas/modules/engines/fb/$(MODULE_ARCH) | ||
30 | pkg_LTLIBRARIES = module.la | ||
31 | module_la_SOURCES = $(FB_SOURCES) | ||
32 | module_la_LIBADD = @EINA_LIBS@ $(FB_LIBADD) $(top_builddir)/src/lib/libevas.la | ||
33 | module_la_LDFLAGS = -module -avoid-version | ||
34 | module_la_LIBTOOLFLAGS = --tag=disable-static | ||
35 | |||
36 | else | ||
37 | |||
38 | noinst_LTLIBRARIES = libevas_engine_fb.la | ||
39 | |||
40 | libevas_engine_fb_la_SOURCES = $(FB_SOURCES) | ||
41 | libevas_engine_fb_la_LIBADD = $(FB_LIBADD) | ||
42 | |||
43 | endif | ||
44 | endif | ||
45 | |||
46 | EXTRA_DIST = \ | ||
47 | evas_engine.h \ | ||
48 | evas_fb.h | ||
diff --git a/libraries/evas/src/modules/engines/fb/Makefile.in b/libraries/evas/src/modules/engines/fb/Makefile.in new file mode 100644 index 0000000..aec24ff --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/Makefile.in | |||
@@ -0,0 +1,825 @@ | |||
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/fb | ||
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_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@libevas_engine_fb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) | ||
86 | am__libevas_engine_fb_la_SOURCES_DIST = evas_engine.c evas_fb_main.c \ | ||
87 | evas_outbuf.c | ||
88 | @BUILD_ENGINE_FB_TRUE@am__objects_1 = evas_engine.lo evas_fb_main.lo \ | ||
89 | @BUILD_ENGINE_FB_TRUE@ evas_outbuf.lo | ||
90 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@am_libevas_engine_fb_la_OBJECTS = $(am__objects_1) | ||
91 | libevas_engine_fb_la_OBJECTS = $(am_libevas_engine_fb_la_OBJECTS) | ||
92 | AM_V_lt = $(am__v_lt_$(V)) | ||
93 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) | ||
94 | am__v_lt_0 = --silent | ||
95 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@am_libevas_engine_fb_la_rpath = | ||
96 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ | ||
97 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@ $(top_builddir)/src/lib/libevas.la | ||
98 | am__module_la_SOURCES_DIST = evas_engine.c evas_fb_main.c \ | ||
99 | evas_outbuf.c | ||
100 | @BUILD_ENGINE_FB_TRUE@am__objects_2 = module_la-evas_engine.lo \ | ||
101 | @BUILD_ENGINE_FB_TRUE@ module_la-evas_fb_main.lo \ | ||
102 | @BUILD_ENGINE_FB_TRUE@ module_la-evas_outbuf.lo | ||
103 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@am_module_la_OBJECTS = $(am__objects_2) | ||
104 | module_la_OBJECTS = $(am_module_la_OBJECTS) | ||
105 | module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ | ||
106 | $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ | ||
107 | $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ | ||
108 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@am_module_la_rpath = \ | ||
109 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@ -rpath \ | ||
110 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@ $(pkgdir) | ||
111 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) | ||
112 | depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
113 | am__depfiles_maybe = depfiles | ||
114 | am__mv = mv -f | ||
115 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
116 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
117 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
118 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ | ||
119 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
120 | $(AM_CFLAGS) $(CFLAGS) | ||
121 | AM_V_CC = $(am__v_CC_$(V)) | ||
122 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) | ||
123 | am__v_CC_0 = @echo " CC " $@; | ||
124 | AM_V_at = $(am__v_at_$(V)) | ||
125 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) | ||
126 | am__v_at_0 = @ | ||
127 | CCLD = $(CC) | ||
128 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
129 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
130 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
131 | AM_V_CCLD = $(am__v_CCLD_$(V)) | ||
132 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) | ||
133 | am__v_CCLD_0 = @echo " CCLD " $@; | ||
134 | AM_V_GEN = $(am__v_GEN_$(V)) | ||
135 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
136 | am__v_GEN_0 = @echo " GEN " $@; | ||
137 | SOURCES = $(libevas_engine_fb_la_SOURCES) $(module_la_SOURCES) | ||
138 | DIST_SOURCES = $(am__libevas_engine_fb_la_SOURCES_DIST) \ | ||
139 | $(am__module_la_SOURCES_DIST) | ||
140 | am__includes_HEADERS_DIST = Evas_Engine_FB.h | ||
141 | HEADERS = $(includes_HEADERS) | ||
142 | ETAGS = etags | ||
143 | CTAGS = ctags | ||
144 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
145 | ACLOCAL = @ACLOCAL@ | ||
146 | ALLOCA = @ALLOCA@ | ||
147 | AMTAR = @AMTAR@ | ||
148 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
149 | AR = @AR@ | ||
150 | AS = @AS@ | ||
151 | AUTOCONF = @AUTOCONF@ | ||
152 | AUTOHEADER = @AUTOHEADER@ | ||
153 | AUTOMAKE = @AUTOMAKE@ | ||
154 | AWK = @AWK@ | ||
155 | CC = @CC@ | ||
156 | CCDEPMODE = @CCDEPMODE@ | ||
157 | CFLAGS = @CFLAGS@ | ||
158 | CHECK_CFLAGS = @CHECK_CFLAGS@ | ||
159 | CHECK_LIBS = @CHECK_LIBS@ | ||
160 | CPP = @CPP@ | ||
161 | CPPFLAGS = @CPPFLAGS@ | ||
162 | CXX = @CXX@ | ||
163 | CXXCPP = @CXXCPP@ | ||
164 | CXXDEPMODE = @CXXDEPMODE@ | ||
165 | CXXFLAGS = @CXXFLAGS@ | ||
166 | CYGPATH_W = @CYGPATH_W@ | ||
167 | DEFS = @DEFS@ | ||
168 | DEPDIR = @DEPDIR@ | ||
169 | DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ | ||
170 | DIRECTFB_LIBS = @DIRECTFB_LIBS@ | ||
171 | DLLTOOL = @DLLTOOL@ | ||
172 | DSYMUTIL = @DSYMUTIL@ | ||
173 | DUMPBIN = @DUMPBIN@ | ||
174 | ECHO_C = @ECHO_C@ | ||
175 | ECHO_N = @ECHO_N@ | ||
176 | ECHO_T = @ECHO_T@ | ||
177 | ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ | ||
178 | ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ | ||
179 | EDB_CFLAGS = @EDB_CFLAGS@ | ||
180 | EDB_LIBS = @EDB_LIBS@ | ||
181 | EDJE_CFLAGS = @EDJE_CFLAGS@ | ||
182 | EDJE_LIBS = @EDJE_LIBS@ | ||
183 | EET_CFLAGS = @EET_CFLAGS@ | ||
184 | EET_LIBS = @EET_LIBS@ | ||
185 | EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ | ||
186 | EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ | ||
187 | EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ | ||
188 | EGREP = @EGREP@ | ||
189 | EINA_CFLAGS = @EINA_CFLAGS@ | ||
190 | EINA_LIBS = @EINA_LIBS@ | ||
191 | EVAS_CFLAGS = @EVAS_CFLAGS@ | ||
192 | EVAS_LIBS = @EVAS_LIBS@ | ||
193 | EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ | ||
194 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
195 | EVIL_LIBS = @EVIL_LIBS@ | ||
196 | EXEEXT = @EXEEXT@ | ||
197 | FGREP = @FGREP@ | ||
198 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ | ||
199 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ | ||
200 | FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ | ||
201 | FREETYPE_LIBS = @FREETYPE_LIBS@ | ||
202 | FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ | ||
203 | FRIBIDI_LIBS = @FRIBIDI_LIBS@ | ||
204 | GL_EET_CFLAGS = @GL_EET_CFLAGS@ | ||
205 | GL_EET_LIBS = @GL_EET_LIBS@ | ||
206 | GREP = @GREP@ | ||
207 | HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ | ||
208 | HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ | ||
209 | INSTALL = @INSTALL@ | ||
210 | INSTALL_DATA = @INSTALL_DATA@ | ||
211 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
212 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
213 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
214 | LD = @LD@ | ||
215 | LDFLAGS = @LDFLAGS@ | ||
216 | LIBOBJS = @LIBOBJS@ | ||
217 | LIBS = @LIBS@ | ||
218 | LIBTOOL = @LIBTOOL@ | ||
219 | LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ | ||
220 | LINEBREAK_LIBS = @LINEBREAK_LIBS@ | ||
221 | LIPO = @LIPO@ | ||
222 | LN_S = @LN_S@ | ||
223 | LTLIBOBJS = @LTLIBOBJS@ | ||
224 | MAKEINFO = @MAKEINFO@ | ||
225 | MKDIR_P = @MKDIR_P@ | ||
226 | MODULE_ARCH = @MODULE_ARCH@ | ||
227 | NM = @NM@ | ||
228 | NMEDIT = @NMEDIT@ | ||
229 | OBJC = @OBJC@ | ||
230 | OBJCDEPMODE = @OBJCDEPMODE@ | ||
231 | OBJCFLAGS = @OBJCFLAGS@ | ||
232 | OBJDUMP = @OBJDUMP@ | ||
233 | OBJEXT = @OBJEXT@ | ||
234 | OTOOL = @OTOOL@ | ||
235 | OTOOL64 = @OTOOL64@ | ||
236 | PACKAGE = @PACKAGE@ | ||
237 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
238 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
239 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
240 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
241 | PACKAGE_URL = @PACKAGE_URL@ | ||
242 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
243 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
244 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | ||
245 | PIXMAN_LIBS = @PIXMAN_LIBS@ | ||
246 | PKG_CONFIG = @PKG_CONFIG@ | ||
247 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
248 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
249 | PNG_CFLAGS = @PNG_CFLAGS@ | ||
250 | PNG_LIBS = @PNG_LIBS@ | ||
251 | RANLIB = @RANLIB@ | ||
252 | SDL_CFLAGS = @SDL_CFLAGS@ | ||
253 | SDL_LIBS = @SDL_LIBS@ | ||
254 | SED = @SED@ | ||
255 | SET_MAKE = @SET_MAKE@ | ||
256 | SHELL = @SHELL@ | ||
257 | SHM_OPEN_LINK = @SHM_OPEN_LINK@ | ||
258 | STRIP = @STRIP@ | ||
259 | SVG_CFLAGS = @SVG_CFLAGS@ | ||
260 | SVG_LIBS = @SVG_LIBS@ | ||
261 | VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ | ||
262 | VALGRIND_LIBS = @VALGRIND_LIBS@ | ||
263 | VERSION = @VERSION@ | ||
264 | VMAJ = @VMAJ@ | ||
265 | WIN32_CFLAGS = @WIN32_CFLAGS@ | ||
266 | WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ | ||
267 | XCB_CFLAGS = @XCB_CFLAGS@ | ||
268 | XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ | ||
269 | XCB_GL_LIBS = @XCB_GL_LIBS@ | ||
270 | XCB_LIBS = @XCB_LIBS@ | ||
271 | XEXT_CFLAGS = @XEXT_CFLAGS@ | ||
272 | XEXT_LIBS = @XEXT_LIBS@ | ||
273 | XMKMF = @XMKMF@ | ||
274 | X_CFLAGS = @X_CFLAGS@ | ||
275 | X_EXTRA_LIBS = @X_EXTRA_LIBS@ | ||
276 | X_LIBS = @X_LIBS@ | ||
277 | X_PRE_LIBS = @X_PRE_LIBS@ | ||
278 | abs_builddir = @abs_builddir@ | ||
279 | abs_srcdir = @abs_srcdir@ | ||
280 | abs_top_builddir = @abs_top_builddir@ | ||
281 | abs_top_srcdir = @abs_top_srcdir@ | ||
282 | ac_ct_CC = @ac_ct_CC@ | ||
283 | ac_ct_CXX = @ac_ct_CXX@ | ||
284 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
285 | ac_ct_OBJC = @ac_ct_OBJC@ | ||
286 | altivec_cflags = @altivec_cflags@ | ||
287 | am__include = @am__include@ | ||
288 | am__leading_dot = @am__leading_dot@ | ||
289 | am__quote = @am__quote@ | ||
290 | am__tar = @am__tar@ | ||
291 | am__untar = @am__untar@ | ||
292 | bindir = @bindir@ | ||
293 | build = @build@ | ||
294 | build_alias = @build_alias@ | ||
295 | build_cpu = @build_cpu@ | ||
296 | build_os = @build_os@ | ||
297 | build_vendor = @build_vendor@ | ||
298 | builddir = @builddir@ | ||
299 | datadir = @datadir@ | ||
300 | datarootdir = @datarootdir@ | ||
301 | dlopen_libs = @dlopen_libs@ | ||
302 | docdir = @docdir@ | ||
303 | dvidir = @dvidir@ | ||
304 | edje_cc = @edje_cc@ | ||
305 | efl_doxygen = @efl_doxygen@ | ||
306 | efl_have_doxygen = @efl_have_doxygen@ | ||
307 | evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ | ||
308 | evas_engine_buffer_libs = @evas_engine_buffer_libs@ | ||
309 | evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ | ||
310 | evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ | ||
311 | evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ | ||
312 | evas_engine_directfb_libs = @evas_engine_directfb_libs@ | ||
313 | evas_engine_fb_cflags = @evas_engine_fb_cflags@ | ||
314 | evas_engine_fb_libs = @evas_engine_fb_libs@ | ||
315 | evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ | ||
316 | evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ | ||
317 | evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ | ||
318 | evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ | ||
319 | evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ | ||
320 | evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ | ||
321 | evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ | ||
322 | evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ | ||
323 | evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ | ||
324 | evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ | ||
325 | evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ | ||
326 | evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ | ||
327 | evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ | ||
328 | evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ | ||
329 | evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ | ||
330 | evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ | ||
331 | evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ | ||
332 | evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ | ||
333 | evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ | ||
334 | evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ | ||
335 | evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ | ||
336 | evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ | ||
337 | evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ | ||
338 | evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ | ||
339 | evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ | ||
340 | evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ | ||
341 | evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ | ||
342 | evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ | ||
343 | evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ | ||
344 | evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ | ||
345 | evas_engine_software_xlib_libs = @evas_engine_software_xlib_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_fb_cflags@ | ||
430 | |||
431 | @BUILD_ENGINE_FB_TRUE@FB_SOURCES = \ | ||
432 | @BUILD_ENGINE_FB_TRUE@evas_engine.c \ | ||
433 | @BUILD_ENGINE_FB_TRUE@evas_fb_main.c \ | ||
434 | @BUILD_ENGINE_FB_TRUE@evas_outbuf.c | ||
435 | |||
436 | @BUILD_ENGINE_FB_TRUE@FB_LIBADD = @evas_engine_fb_libs@ | ||
437 | @BUILD_ENGINE_FB_TRUE@includes_HEADERS = Evas_Engine_FB.h | ||
438 | @BUILD_ENGINE_FB_TRUE@includesdir = $(includedir)/evas-@VMAJ@ | ||
439 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@pkgdir = $(libdir)/evas/modules/engines/fb/$(MODULE_ARCH) | ||
440 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@pkg_LTLIBRARIES = module.la | ||
441 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@module_la_SOURCES = $(FB_SOURCES) | ||
442 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@module_la_LIBADD = @EINA_LIBS@ $(FB_LIBADD) $(top_builddir)/src/lib/libevas.la | ||
443 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@module_la_LDFLAGS = -module -avoid-version | ||
444 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static | ||
445 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@noinst_LTLIBRARIES = libevas_engine_fb.la | ||
446 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@libevas_engine_fb_la_SOURCES = $(FB_SOURCES) | ||
447 | @BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@libevas_engine_fb_la_LIBADD = $(FB_LIBADD) | ||
448 | EXTRA_DIST = \ | ||
449 | evas_engine.h \ | ||
450 | evas_fb.h | ||
451 | |||
452 | all: all-am | ||
453 | |||
454 | .SUFFIXES: | ||
455 | .SUFFIXES: .c .lo .o .obj | ||
456 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
457 | @for dep in $?; do \ | ||
458 | case '$(am__configure_deps)' in \ | ||
459 | *$$dep*) \ | ||
460 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
461 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
462 | exit 1;; \ | ||
463 | esac; \ | ||
464 | done; \ | ||
465 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/fb/Makefile'; \ | ||
466 | $(am__cd) $(top_srcdir) && \ | ||
467 | $(AUTOMAKE) --gnu src/modules/engines/fb/Makefile | ||
468 | .PRECIOUS: Makefile | ||
469 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
470 | @case '$?' in \ | ||
471 | *config.status*) \ | ||
472 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
473 | *) \ | ||
474 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
475 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
476 | esac; | ||
477 | |||
478 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
479 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
480 | |||
481 | $(top_srcdir)/configure: $(am__configure_deps) | ||
482 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
483 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
484 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
485 | $(am__aclocal_m4_deps): | ||
486 | |||
487 | clean-noinstLTLIBRARIES: | ||
488 | -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) | ||
489 | @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ | ||
490 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
491 | test "$$dir" != "$$p" || dir=.; \ | ||
492 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
493 | rm -f "$${dir}/so_locations"; \ | ||
494 | done | ||
495 | install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) | ||
496 | @$(NORMAL_INSTALL) | ||
497 | test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" | ||
498 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
499 | list2=; for p in $$list; do \ | ||
500 | if test -f $$p; then \ | ||
501 | list2="$$list2 $$p"; \ | ||
502 | else :; fi; \ | ||
503 | done; \ | ||
504 | test -z "$$list2" || { \ | ||
505 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ | ||
506 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ | ||
507 | } | ||
508 | |||
509 | uninstall-pkgLTLIBRARIES: | ||
510 | @$(NORMAL_UNINSTALL) | ||
511 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
512 | for p in $$list; do \ | ||
513 | $(am__strip_dir) \ | ||
514 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ | ||
515 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ | ||
516 | done | ||
517 | |||
518 | clean-pkgLTLIBRARIES: | ||
519 | -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) | ||
520 | @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ | ||
521 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
522 | test "$$dir" != "$$p" || dir=.; \ | ||
523 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
524 | rm -f "$${dir}/so_locations"; \ | ||
525 | done | ||
526 | libevas_engine_fb.la: $(libevas_engine_fb_la_OBJECTS) $(libevas_engine_fb_la_DEPENDENCIES) | ||
527 | $(AM_V_CCLD)$(LINK) $(am_libevas_engine_fb_la_rpath) $(libevas_engine_fb_la_OBJECTS) $(libevas_engine_fb_la_LIBADD) $(LIBS) | ||
528 | module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) | ||
529 | $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) | ||
530 | |||
531 | mostlyclean-compile: | ||
532 | -rm -f *.$(OBJEXT) | ||
533 | |||
534 | distclean-compile: | ||
535 | -rm -f *.tab.c | ||
536 | |||
537 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ | ||
538 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_fb_main.Plo@am__quote@ | ||
539 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_outbuf.Plo@am__quote@ | ||
540 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ | ||
541 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_fb_main.Plo@am__quote@ | ||
542 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_outbuf.Plo@am__quote@ | ||
543 | |||
544 | .c.o: | ||
545 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
546 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
547 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
548 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
549 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
550 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
551 | |||
552 | .c.obj: | ||
553 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
554 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
555 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
556 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
557 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
558 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
559 | |||
560 | .c.lo: | ||
561 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
562 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
563 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
564 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
565 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
566 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
567 | |||
568 | module_la-evas_engine.lo: evas_engine.c | ||
569 | @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 | ||
570 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo | ||
571 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
572 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ | ||
573 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
574 | @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 | ||
575 | |||
576 | module_la-evas_fb_main.lo: evas_fb_main.c | ||
577 | @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_fb_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_fb_main.Tpo -c -o module_la-evas_fb_main.lo `test -f 'evas_fb_main.c' || echo '$(srcdir)/'`evas_fb_main.c | ||
578 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_fb_main.Tpo $(DEPDIR)/module_la-evas_fb_main.Plo | ||
579 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
580 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_fb_main.c' object='module_la-evas_fb_main.lo' libtool=yes @AMDEPBACKSLASH@ | ||
581 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
582 | @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_fb_main.lo `test -f 'evas_fb_main.c' || echo '$(srcdir)/'`evas_fb_main.c | ||
583 | |||
584 | module_la-evas_outbuf.lo: evas_outbuf.c | ||
585 | @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_outbuf.lo -MD -MP -MF $(DEPDIR)/module_la-evas_outbuf.Tpo -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c | ||
586 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_outbuf.Tpo $(DEPDIR)/module_la-evas_outbuf.Plo | ||
587 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
588 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_outbuf.c' object='module_la-evas_outbuf.lo' libtool=yes @AMDEPBACKSLASH@ | ||
589 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
590 | @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_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c | ||
591 | |||
592 | mostlyclean-libtool: | ||
593 | -rm -f *.lo | ||
594 | |||
595 | clean-libtool: | ||
596 | -rm -rf .libs _libs | ||
597 | install-includesHEADERS: $(includes_HEADERS) | ||
598 | @$(NORMAL_INSTALL) | ||
599 | test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" | ||
600 | @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ | ||
601 | for p in $$list; do \ | ||
602 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | ||
603 | echo "$$d$$p"; \ | ||
604 | done | $(am__base_list) | \ | ||
605 | while read files; do \ | ||
606 | echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ | ||
607 | $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ | ||
608 | done | ||
609 | |||
610 | uninstall-includesHEADERS: | ||
611 | @$(NORMAL_UNINSTALL) | ||
612 | @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ | ||
613 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | ||
614 | test -n "$$files" || exit 0; \ | ||
615 | echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ | ||
616 | cd "$(DESTDIR)$(includesdir)" && rm -f $$files | ||
617 | |||
618 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
619 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
620 | unique=`for i in $$list; do \ | ||
621 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
622 | done | \ | ||
623 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
624 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
625 | mkid -fID $$unique | ||
626 | tags: TAGS | ||
627 | |||
628 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
629 | $(TAGS_FILES) $(LISP) | ||
630 | set x; \ | ||
631 | here=`pwd`; \ | ||
632 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
633 | unique=`for i in $$list; do \ | ||
634 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
635 | done | \ | ||
636 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
637 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
638 | shift; \ | ||
639 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
640 | test -n "$$unique" || unique=$$empty_fix; \ | ||
641 | if test $$# -gt 0; then \ | ||
642 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
643 | "$$@" $$unique; \ | ||
644 | else \ | ||
645 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
646 | $$unique; \ | ||
647 | fi; \ | ||
648 | fi | ||
649 | ctags: CTAGS | ||
650 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
651 | $(TAGS_FILES) $(LISP) | ||
652 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
653 | unique=`for i in $$list; do \ | ||
654 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
655 | done | \ | ||
656 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
657 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
658 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
659 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
660 | $$unique | ||
661 | |||
662 | GTAGS: | ||
663 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
664 | && $(am__cd) $(top_srcdir) \ | ||
665 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
666 | |||
667 | distclean-tags: | ||
668 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
669 | |||
670 | distdir: $(DISTFILES) | ||
671 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
672 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
673 | list='$(DISTFILES)'; \ | ||
674 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
675 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
676 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
677 | case $$dist_files in \ | ||
678 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
679 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
680 | sort -u` ;; \ | ||
681 | esac; \ | ||
682 | for file in $$dist_files; do \ | ||
683 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
684 | if test -d $$d/$$file; then \ | ||
685 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
686 | if test -d "$(distdir)/$$file"; then \ | ||
687 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
688 | fi; \ | ||
689 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
690 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
691 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
692 | fi; \ | ||
693 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
694 | else \ | ||
695 | test -f "$(distdir)/$$file" \ | ||
696 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
697 | || exit 1; \ | ||
698 | fi; \ | ||
699 | done | ||
700 | check-am: all-am | ||
701 | check: check-am | ||
702 | all-am: Makefile $(LTLIBRARIES) $(HEADERS) | ||
703 | installdirs: | ||
704 | for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ | ||
705 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
706 | done | ||
707 | install: install-am | ||
708 | install-exec: install-exec-am | ||
709 | install-data: install-data-am | ||
710 | uninstall: uninstall-am | ||
711 | |||
712 | install-am: all-am | ||
713 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
714 | |||
715 | installcheck: installcheck-am | ||
716 | install-strip: | ||
717 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
718 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
719 | `test -z '$(STRIP)' || \ | ||
720 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
721 | mostlyclean-generic: | ||
722 | |||
723 | clean-generic: | ||
724 | |||
725 | distclean-generic: | ||
726 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
727 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
728 | |||
729 | maintainer-clean-generic: | ||
730 | @echo "This command is intended for maintainers to use" | ||
731 | @echo "it deletes files that may require special tools to rebuild." | ||
732 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
733 | clean: clean-am | ||
734 | |||
735 | clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ | ||
736 | clean-pkgLTLIBRARIES mostlyclean-am | ||
737 | |||
738 | distclean: distclean-am | ||
739 | -rm -rf ./$(DEPDIR) | ||
740 | -rm -f Makefile | ||
741 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
742 | distclean-tags | ||
743 | |||
744 | dvi: dvi-am | ||
745 | |||
746 | dvi-am: | ||
747 | |||
748 | html: html-am | ||
749 | |||
750 | html-am: | ||
751 | |||
752 | info: info-am | ||
753 | |||
754 | info-am: | ||
755 | |||
756 | install-data-am: install-includesHEADERS install-pkgLTLIBRARIES | ||
757 | |||
758 | install-dvi: install-dvi-am | ||
759 | |||
760 | install-dvi-am: | ||
761 | |||
762 | install-exec-am: | ||
763 | |||
764 | install-html: install-html-am | ||
765 | |||
766 | install-html-am: | ||
767 | |||
768 | install-info: install-info-am | ||
769 | |||
770 | install-info-am: | ||
771 | |||
772 | install-man: | ||
773 | |||
774 | install-pdf: install-pdf-am | ||
775 | |||
776 | install-pdf-am: | ||
777 | |||
778 | install-ps: install-ps-am | ||
779 | |||
780 | install-ps-am: | ||
781 | |||
782 | installcheck-am: | ||
783 | |||
784 | maintainer-clean: maintainer-clean-am | ||
785 | -rm -rf ./$(DEPDIR) | ||
786 | -rm -f Makefile | ||
787 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
788 | |||
789 | mostlyclean: mostlyclean-am | ||
790 | |||
791 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
792 | mostlyclean-libtool | ||
793 | |||
794 | pdf: pdf-am | ||
795 | |||
796 | pdf-am: | ||
797 | |||
798 | ps: ps-am | ||
799 | |||
800 | ps-am: | ||
801 | |||
802 | uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES | ||
803 | |||
804 | .MAKE: install-am install-strip | ||
805 | |||
806 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
807 | clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ | ||
808 | ctags distclean distclean-compile distclean-generic \ | ||
809 | distclean-libtool distclean-tags distdir dvi dvi-am html \ | ||
810 | html-am info info-am install install-am install-data \ | ||
811 | install-data-am install-dvi install-dvi-am install-exec \ | ||
812 | install-exec-am install-html install-html-am \ | ||
813 | install-includesHEADERS install-info install-info-am \ | ||
814 | install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ | ||
815 | install-ps install-ps-am install-strip installcheck \ | ||
816 | installcheck-am installdirs maintainer-clean \ | ||
817 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
818 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
819 | tags uninstall uninstall-am uninstall-includesHEADERS \ | ||
820 | uninstall-pkgLTLIBRARIES | ||
821 | |||
822 | |||
823 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
824 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
825 | .NOEXPORT: | ||
diff --git a/libraries/evas/src/modules/engines/fb/evas_engine.c b/libraries/evas/src/modules/engines/fb/evas_engine.c new file mode 100644 index 0000000..7681b00 --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/evas_engine.c | |||
@@ -0,0 +1,317 @@ | |||
1 | #include "evas_common.h" | ||
2 | #include "evas_private.h" | ||
3 | #include "evas_engine.h" | ||
4 | #include "Evas_Engine_FB.h" | ||
5 | |||
6 | int _evas_engine_fb_log_dom = -1; | ||
7 | |||
8 | /* function tables - filled in later (func and parent func) */ | ||
9 | static Evas_Func func, pfunc; | ||
10 | |||
11 | /* engine struct data */ | ||
12 | typedef struct _Render_Engine Render_Engine; | ||
13 | |||
14 | struct _Render_Engine | ||
15 | { | ||
16 | Tilebuf *tb; | ||
17 | Outbuf *ob; | ||
18 | Tilebuf_Rect *rects; | ||
19 | Eina_Inlist *cur_rect; | ||
20 | int end : 1; | ||
21 | }; | ||
22 | |||
23 | /* prototypes we will use here */ | ||
24 | static void *_output_setup(int w, int h, int rot, int vt, int dev, int refresh); | ||
25 | |||
26 | static void *eng_info(Evas *e); | ||
27 | static void eng_info_free(Evas *e, void *info); | ||
28 | static int eng_setup(Evas *e, void *info); | ||
29 | static void eng_output_free(void *data); | ||
30 | static void eng_output_resize(void *data, int w, int h); | ||
31 | static void eng_output_tile_size_set(void *data, int w, int h); | ||
32 | static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h); | ||
33 | static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h); | ||
34 | static void eng_output_redraws_clear(void *data); | ||
35 | static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); | ||
36 | static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h); | ||
37 | static void eng_output_flush(void *data); | ||
38 | static void eng_output_idle_flush(void *data); | ||
39 | |||
40 | /* internal engine routines */ | ||
41 | static void * | ||
42 | _output_setup(int w, int h, int rot, int vt, int dev, int refresh) | ||
43 | { | ||
44 | Render_Engine *re; | ||
45 | |||
46 | re = calloc(1, sizeof(Render_Engine)); | ||
47 | if (!re) | ||
48 | return NULL; | ||
49 | /* if we haven't initialized - init (automatic abort if already done) */ | ||
50 | evas_common_cpu_init(); | ||
51 | |||
52 | evas_common_blend_init(); | ||
53 | evas_common_image_init(); | ||
54 | evas_common_convert_init(); | ||
55 | evas_common_scale_init(); | ||
56 | evas_common_rectangle_init(); | ||
57 | evas_common_polygon_init(); | ||
58 | evas_common_line_init(); | ||
59 | evas_common_font_init(); | ||
60 | evas_common_draw_init(); | ||
61 | evas_common_tilebuf_init(); | ||
62 | |||
63 | evas_fb_outbuf_fb_init(); | ||
64 | |||
65 | /* get any stored performance metrics from device (xserver) */ | ||
66 | re->ob = evas_fb_outbuf_fb_setup_fb(w, h, rot, OUTBUF_DEPTH_INHERIT, vt, dev, refresh); | ||
67 | re->tb = evas_common_tilebuf_new(evas_fb_outbuf_fb_get_width(re->ob), evas_fb_outbuf_fb_get_height(re->ob)); | ||
68 | /* no backbuf! */ | ||
69 | evas_fb_outbuf_fb_set_have_backbuf(re->ob, 0); | ||
70 | /* in preliminary tests 16x16 gave highest framerates */ | ||
71 | evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); | ||
72 | return re; | ||
73 | } | ||
74 | |||
75 | /* engine api this module provides */ | ||
76 | static void * | ||
77 | eng_info(Evas *e) | ||
78 | { | ||
79 | Evas_Engine_Info_FB *info; | ||
80 | info = calloc(1, sizeof(Evas_Engine_Info_FB)); | ||
81 | if (!info) return NULL; | ||
82 | info->magic.magic = rand(); | ||
83 | info->render_mode = EVAS_RENDER_MODE_BLOCKING; | ||
84 | return info; | ||
85 | e = NULL; | ||
86 | } | ||
87 | |||
88 | static void | ||
89 | eng_info_free(Evas *e __UNUSED__, void *info) | ||
90 | { | ||
91 | Evas_Engine_Info_FB *in; | ||
92 | in = (Evas_Engine_Info_FB *)info; | ||
93 | free(in); | ||
94 | } | ||
95 | |||
96 | static int | ||
97 | eng_setup(Evas *e, void *in) | ||
98 | { | ||
99 | Render_Engine *re; | ||
100 | Evas_Engine_Info_FB *info; | ||
101 | |||
102 | info = (Evas_Engine_Info_FB *)in; | ||
103 | re = _output_setup(e->output.w, | ||
104 | e->output.h, | ||
105 | info->info.rotation, | ||
106 | info->info.virtual_terminal, | ||
107 | info->info.device_number, | ||
108 | info->info.refresh); | ||
109 | e->engine.data.output = re; | ||
110 | if (!e->engine.data.output) return 0; | ||
111 | e->engine.data.context = e->engine.func->context_new(e->engine.data.output); | ||
112 | |||
113 | return 1; | ||
114 | } | ||
115 | |||
116 | static void | ||
117 | eng_output_free(void *data) | ||
118 | { | ||
119 | Render_Engine *re; | ||
120 | |||
121 | re = (Render_Engine *)data; | ||
122 | evas_fb_outbuf_fb_free(re->ob); | ||
123 | evas_common_tilebuf_free(re->tb); | ||
124 | if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); | ||
125 | free(re); | ||
126 | |||
127 | evas_common_font_shutdown(); | ||
128 | evas_common_image_shutdown(); | ||
129 | } | ||
130 | |||
131 | static void | ||
132 | eng_output_resize(void *data, int w, int h) | ||
133 | { | ||
134 | Render_Engine *re; | ||
135 | |||
136 | re = (Render_Engine *)data; | ||
137 | evas_fb_outbuf_fb_reconfigure(re->ob, w, h, | ||
138 | evas_fb_outbuf_fb_get_rot(re->ob), | ||
139 | OUTBUF_DEPTH_INHERIT); | ||
140 | evas_common_tilebuf_free(re->tb); | ||
141 | re->tb = evas_common_tilebuf_new(w, h); | ||
142 | if (re->tb) | ||
143 | evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); | ||
144 | } | ||
145 | |||
146 | static void | ||
147 | eng_output_tile_size_set(void *data, int w, int h) | ||
148 | { | ||
149 | Render_Engine *re; | ||
150 | |||
151 | re = (Render_Engine *)data; | ||
152 | evas_common_tilebuf_set_tile_size(re->tb, w, h); | ||
153 | } | ||
154 | |||
155 | static void | ||
156 | eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) | ||
157 | { | ||
158 | Render_Engine *re; | ||
159 | |||
160 | re = (Render_Engine *)data; | ||
161 | evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); | ||
162 | } | ||
163 | |||
164 | static void | ||
165 | eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) | ||
166 | { | ||
167 | Render_Engine *re; | ||
168 | |||
169 | re = (Render_Engine *)data; | ||
170 | evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); | ||
171 | } | ||
172 | |||
173 | static void | ||
174 | eng_output_redraws_clear(void *data) | ||
175 | { | ||
176 | Render_Engine *re; | ||
177 | |||
178 | re = (Render_Engine *)data; | ||
179 | evas_common_tilebuf_clear(re->tb); | ||
180 | } | ||
181 | |||
182 | static void * | ||
183 | eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) | ||
184 | { | ||
185 | Render_Engine *re; | ||
186 | RGBA_Image *surface; | ||
187 | Tilebuf_Rect *rect; | ||
188 | int ux, uy, uw, uh; | ||
189 | |||
190 | re = (Render_Engine *)data; | ||
191 | if (re->end) | ||
192 | { | ||
193 | re->end = 0; | ||
194 | return NULL; | ||
195 | } | ||
196 | if (!re->rects) | ||
197 | { | ||
198 | re->rects = evas_common_tilebuf_get_render_rects(re->tb); | ||
199 | re->cur_rect = EINA_INLIST_GET(re->rects); | ||
200 | } | ||
201 | if (!re->cur_rect) return NULL; | ||
202 | rect = (Tilebuf_Rect *)re->cur_rect; | ||
203 | ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h; | ||
204 | re->cur_rect = re->cur_rect->next; | ||
205 | if (!re->cur_rect) | ||
206 | { | ||
207 | evas_common_tilebuf_free_render_rects(re->rects); | ||
208 | re->rects = NULL; | ||
209 | re->end = 1; | ||
210 | } | ||
211 | |||
212 | surface = evas_fb_outbuf_fb_new_region_for_update(re->ob, | ||
213 | ux, uy, uw, uh, | ||
214 | cx, cy, cw, ch); | ||
215 | *x = ux; *y = uy; *w = uw; *h = uh; | ||
216 | return surface; | ||
217 | } | ||
218 | |||
219 | static void | ||
220 | eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) | ||
221 | { | ||
222 | Render_Engine *re; | ||
223 | |||
224 | re = (Render_Engine *)data; | ||
225 | #ifdef BUILD_PIPE_RENDER | ||
226 | evas_common_pipe_map_begin(surface); | ||
227 | #endif | ||
228 | evas_fb_outbuf_fb_push_updated_region(re->ob, surface, x, y, w, h); | ||
229 | evas_fb_outbuf_fb_free_region_for_update(re->ob, surface); | ||
230 | evas_common_cpu_end_opt(); | ||
231 | } | ||
232 | |||
233 | static void | ||
234 | eng_output_flush(void *data) | ||
235 | { | ||
236 | Render_Engine *re; | ||
237 | |||
238 | re = (Render_Engine *)data; | ||
239 | } | ||
240 | |||
241 | static void | ||
242 | eng_output_idle_flush(void *data) | ||
243 | { | ||
244 | Render_Engine *re; | ||
245 | |||
246 | re = (Render_Engine *)data; | ||
247 | } | ||
248 | |||
249 | static Eina_Bool | ||
250 | eng_canvas_alpha_get(void *data, void *context __UNUSED__) | ||
251 | { | ||
252 | Render_Engine *re; | ||
253 | |||
254 | re = (Render_Engine *)data; | ||
255 | return (re->ob->priv.fb.fb->fb_var.transp.length > 0); | ||
256 | } | ||
257 | |||
258 | /* module advertising code */ | ||
259 | static int | ||
260 | module_open(Evas_Module *em) | ||
261 | { | ||
262 | if (!em) return 0; | ||
263 | /* get whatever engine module we inherit from */ | ||
264 | if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; | ||
265 | _evas_engine_fb_log_dom = eina_log_domain_register | ||
266 | ("evas-fb", EVAS_DEFAULT_LOG_COLOR); | ||
267 | if (_evas_engine_fb_log_dom < 0) | ||
268 | { | ||
269 | EINA_LOG_ERR("Can not create a module log domain."); | ||
270 | return 0; | ||
271 | } | ||
272 | |||
273 | /* store it for later use */ | ||
274 | func = pfunc; | ||
275 | /* now to override methods */ | ||
276 | #define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) | ||
277 | ORD(info); | ||
278 | ORD(info_free); | ||
279 | ORD(setup); | ||
280 | ORD(canvas_alpha_get); | ||
281 | ORD(output_free); | ||
282 | ORD(output_resize); | ||
283 | ORD(output_tile_size_set); | ||
284 | ORD(output_redraws_rect_add); | ||
285 | ORD(output_redraws_rect_del); | ||
286 | ORD(output_redraws_clear); | ||
287 | ORD(output_redraws_next_update_get); | ||
288 | ORD(output_redraws_next_update_push); | ||
289 | ORD(output_flush); | ||
290 | ORD(output_idle_flush); | ||
291 | /* now advertise out own api */ | ||
292 | em->functions = (void *)(&func); | ||
293 | return 1; | ||
294 | } | ||
295 | |||
296 | static void | ||
297 | module_close(Evas_Module *em __UNUSED__) | ||
298 | { | ||
299 | eina_log_domain_unregister(_evas_engine_fb_log_dom); | ||
300 | } | ||
301 | |||
302 | static Evas_Module_Api evas_modapi = | ||
303 | { | ||
304 | EVAS_MODULE_API_VERSION, | ||
305 | "fb", | ||
306 | "none", | ||
307 | { | ||
308 | module_open, | ||
309 | module_close | ||
310 | } | ||
311 | }; | ||
312 | |||
313 | EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, fb); | ||
314 | |||
315 | #ifndef EVAS_STATIC_BUILD_FB | ||
316 | EVAS_EINA_MODULE_DEFINE(engine, fb); | ||
317 | #endif | ||
diff --git a/libraries/evas/src/modules/engines/fb/evas_engine.h b/libraries/evas/src/modules/engines/fb/evas_engine.h new file mode 100644 index 0000000..295e91e --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/evas_engine.h | |||
@@ -0,0 +1,85 @@ | |||
1 | #ifndef EVAS_ENGINE_H | ||
2 | #define EVAS_ENGINE_H | ||
3 | |||
4 | #include "evas_fb.h" | ||
5 | |||
6 | extern int _evas_engine_fb_log_dom; | ||
7 | #ifdef ERR | ||
8 | # undef ERR | ||
9 | #endif | ||
10 | #define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_fb_log_dom, __VA_ARGS__) | ||
11 | |||
12 | #ifdef DBG | ||
13 | # undef DBG | ||
14 | #endif | ||
15 | #define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_fb_log_dom, __VA_ARGS__) | ||
16 | |||
17 | #ifdef INF | ||
18 | # undef INF | ||
19 | #endif | ||
20 | #define INF(...) EINA_LOG_DOM_INFO(_evas_engine_fb_log_dom, __VA_ARGS__) | ||
21 | |||
22 | #ifdef WRN | ||
23 | # undef WRN | ||
24 | #endif | ||
25 | #define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_fb_log_dom, __VA_ARGS__) | ||
26 | |||
27 | #ifdef CRIT | ||
28 | # undef CRIT | ||
29 | #endif | ||
30 | #define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_fb_log_dom, __VA_ARGS__) | ||
31 | |||
32 | typedef struct _Outbuf Outbuf; | ||
33 | |||
34 | typedef enum _Outbuf_Depth Outbuf_Depth; | ||
35 | |||
36 | enum _Outbuf_Depth | ||
37 | { | ||
38 | OUTBUF_DEPTH_NONE, | ||
39 | OUTBUF_DEPTH_INHERIT, | ||
40 | OUTBUF_DEPTH_RGB_16BPP_565_565_DITHERED, | ||
41 | OUTBUF_DEPTH_RGB_16BPP_555_555_DITHERED, | ||
42 | OUTBUF_DEPTH_RGB_16BPP_444_444_DITHERED, | ||
43 | OUTBUF_DEPTH_RGB_16BPP_565_444_DITHERED, | ||
44 | OUTBUF_DEPTH_RGB_32BPP_888_8888, | ||
45 | OUTBUF_DEPTH_LAST | ||
46 | }; | ||
47 | |||
48 | struct _Outbuf | ||
49 | { | ||
50 | Outbuf_Depth depth; | ||
51 | int w, h; | ||
52 | int rot; | ||
53 | |||
54 | struct { | ||
55 | struct { | ||
56 | FB_Mode *fb; | ||
57 | } fb; | ||
58 | struct { | ||
59 | DATA32 r, g, b; | ||
60 | } mask; | ||
61 | RGBA_Image *back_buf; | ||
62 | } priv; | ||
63 | }; | ||
64 | |||
65 | /****/ | ||
66 | |||
67 | void evas_fb_outbuf_fb_init (void); | ||
68 | void evas_fb_outbuf_fb_free (Outbuf *buf); | ||
69 | |||
70 | Outbuf *evas_fb_outbuf_fb_setup_fb (int w, int h, int rot, Outbuf_Depth depth, int vt_no, int dev_no, int refresh); | ||
71 | |||
72 | void evas_fb_outbuf_fb_blit (Outbuf *buf, int src_x, int src_y, int w, int h, int dst_x, int dst_y); | ||
73 | void evas_fb_outbuf_fb_update (Outbuf *buf, int x, int y, int w, int h); | ||
74 | RGBA_Image *evas_fb_outbuf_fb_new_region_for_update (Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); | ||
75 | void evas_fb_outbuf_fb_free_region_for_update (Outbuf *buf, RGBA_Image *update); | ||
76 | void evas_fb_outbuf_fb_push_updated_region (Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h); | ||
77 | void evas_fb_outbuf_fb_reconfigure (Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth); | ||
78 | int evas_fb_outbuf_fb_get_width (Outbuf *buf); | ||
79 | int evas_fb_outbuf_fb_get_height (Outbuf *buf); | ||
80 | Outbuf_Depth evas_fb_outbuf_fb_get_depth (Outbuf *buf); | ||
81 | int evas_fb_outbuf_fb_get_rot (Outbuf *buf); | ||
82 | int evas_fb_outbuf_fb_get_have_backbuf (Outbuf *buf); | ||
83 | void evas_fb_outbuf_fb_set_have_backbuf (Outbuf *buf, int have_backbuf); | ||
84 | |||
85 | #endif | ||
diff --git a/libraries/evas/src/modules/engines/fb/evas_fb.h b/libraries/evas/src/modules/engines/fb/evas_fb.h new file mode 100644 index 0000000..76ab30b --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/evas_fb.h | |||
@@ -0,0 +1,93 @@ | |||
1 | #ifndef _EVAS_FB_H | ||
2 | #define _EVAS_FB_H 1 | ||
3 | |||
4 | /* -------------------------------------------------------------------- */ | ||
5 | /* LINUX FBCON FRAMEBUFFER UTILITY CODE */ | ||
6 | /* makes setting up the framebuffer easy. Also makes it eays to port to */ | ||
7 | /* some other system if needed. */ | ||
8 | /* Copyright (c) 1999 - Carsten Haitzler (The Rasterman) */ | ||
9 | /* -------------------------------------------------------------------- */ | ||
10 | |||
11 | #include <stdio.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <string.h> | ||
14 | #include <unistd.h> | ||
15 | #include <fcntl.h> | ||
16 | #include <termios.h> | ||
17 | #include <errno.h> | ||
18 | #include <sys/ioctl.h> | ||
19 | #include <sys/mman.h> | ||
20 | #include <sys/wait.h> | ||
21 | #include <sys/stat.h> | ||
22 | #include <linux/kd.h> | ||
23 | #include <linux/vt.h> | ||
24 | #include <linux/fb.h> | ||
25 | |||
26 | typedef struct _fb_mode FB_Mode; | ||
27 | |||
28 | struct _fb_mode | ||
29 | { | ||
30 | unsigned int width; | ||
31 | unsigned int height; | ||
32 | unsigned int refresh; | ||
33 | unsigned int depth; | ||
34 | unsigned int bpp; | ||
35 | int fb_fd; | ||
36 | void *mem; | ||
37 | unsigned int mem_offset; | ||
38 | struct fb_var_screeninfo fb_var; | ||
39 | }; | ||
40 | |||
41 | /* init a framebuffer (and switch to) vt number vt. If vt == 0 use current */ | ||
42 | /* vt */ | ||
43 | void fb_init(int vt, int device); | ||
44 | /* call this afetr setting or getting the fb mode (whichever) to complete */ | ||
45 | /* the dsetup */ | ||
46 | int fb_postinit(FB_Mode *mode); | ||
47 | /* console switching - if a switch was requested this with block if block */ | ||
48 | /* is 1, otherwise it will return 1 if current console is active or 0 if */ | ||
49 | /* the user has switched away in the meantime */ | ||
50 | int fb_await_switch(int block); | ||
51 | /* list all current possible video modes listed in /etc/fb.modes */ | ||
52 | /* returns pointer to an aray of FB_Mode, and sets num_return to the number */ | ||
53 | /* of elements in the returned array */ | ||
54 | FB_Mode *fb_list_modes(unsigned int *num_return); | ||
55 | /* sets the fb mode to the resolution width x height and the depth to depth. */ | ||
56 | /* and if refresh > 0 attempts to use a mode with a refresh rate (in Hz) of */ | ||
57 | /* that. If this fails it will return NULL - if it succeeds it will return */ | ||
58 | /* a pointer to the FB_Mode thatwas set. only modes in /etc/fb.modes will */ | ||
59 | /* be used. If refresh is 0 it uses the DEFAULT mode (the one with no */ | ||
60 | /* refresh rate at the end of its name (WIDTHxHEIGHT-REFRESH) */ | ||
61 | /* NB: in 8bpp you get a 332 palette. This is fixed so all modes are */ | ||
62 | /* "truecolor" - the only difference is how many bits bep red, green and */ | ||
63 | /* blue channel. This is for speed reasons */ | ||
64 | FB_Mode *fb_setmode(unsigned int width, unsigned int height, unsigned int depth, unsigned int refresh); | ||
65 | /* returns the current fb mode being used in FB_Mode */ | ||
66 | FB_Mode *fb_getmode(void); | ||
67 | /* changes the bit depth of the current fb mode to depth and returns a new */ | ||
68 | /* handle to a new fb mode with updated parameters. frees cur_mode for you. */ | ||
69 | FB_Mode *fb_changedepth(FB_Mode *cur_mode, unsigned int depth); | ||
70 | /* changes resolution - retaining current depth of the current mode, */ | ||
71 | /* returning a handle to the new mode once done. frees cur_mode for you. */ | ||
72 | FB_Mode *fb_changeres(FB_Mode *cur_mode, unsigned int width, unsigned int height, unsigned int refresh); | ||
73 | /* chnages both resolution and depth and returns a handle to the new mode */ | ||
74 | /* when done. frees cur_mode for you */ | ||
75 | FB_Mode *fb_changemode(FB_Mode *cur_mode, unsigned int width, unsigned int height, unsigned int depth, unsigned int refresh); | ||
76 | |||
77 | /* ------------------------------------------------------------------------- */ | ||
78 | /* How to init: */ | ||
79 | /* (Example) */ | ||
80 | |||
81 | /* FB_Mode *mode; */ | ||
82 | /* int fb_fd = -1; */ | ||
83 | /* fb_init(0); */ | ||
84 | /* mode = fb_setmode(640, 480, 8, 0); */ | ||
85 | /* if (mode) */ | ||
86 | /* fb_fd = fb_postinit(mode); */ | ||
87 | /* if (fb_fd == -1) */ | ||
88 | /* { */ | ||
89 | /* fprintf(stderr, "Frambuffer init failed\n"); */ | ||
90 | /* exit(1); */ | ||
91 | /* } */ | ||
92 | /* .... code to play with the FB */ | ||
93 | #endif | ||
diff --git a/libraries/evas/src/modules/engines/fb/evas_fb_main.c b/libraries/evas/src/modules/engines/fb/evas_fb_main.c new file mode 100644 index 0000000..1d61f1a --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/evas_fb_main.c | |||
@@ -0,0 +1,600 @@ | |||
1 | /* -------------------------------------------------------------------- */ | ||
2 | /* LINUX FBCON FRAMEBUFFER UTILITY CODE */ | ||
3 | /* makes setting up the framebuffer easy. Also makes it eays to port to */ | ||
4 | /* some other system if needed. */ | ||
5 | /* Copyright (c) 1999 - Carsten Haitzler (The Rasterman) */ | ||
6 | /* -------------------------------------------------------------------- */ | ||
7 | #include "evas_common.h" | ||
8 | #include "evas_fb.h" | ||
9 | |||
10 | #include <sys/ioctl.h> | ||
11 | #include <sys/wait.h> | ||
12 | #include <linux/kd.h> | ||
13 | #include <linux/vt.h> | ||
14 | #include <sys/user.h> | ||
15 | |||
16 | #define FB_ACTIVE 0 | ||
17 | #define FB_REL_REQ 1 | ||
18 | #define FB_INACTIVE 2 | ||
19 | #define FB_ACQ_REQ 3 | ||
20 | |||
21 | /* -------------------------------------------------------------------- */ | ||
22 | /* internal variables */ | ||
23 | |||
24 | static struct fb_fix_screeninfo fb_fix; | ||
25 | static int fb, tty; | ||
26 | static int bpp, depth; | ||
27 | //static int orig_vt_no = 0; | ||
28 | static int kd_mode; | ||
29 | static struct vt_mode vt_omode; | ||
30 | static struct fb_var_screeninfo fb_ovar; | ||
31 | static unsigned short ored[256], ogreen[256], oblue[256]; | ||
32 | static unsigned short red[256], green[256], blue[256]; | ||
33 | static struct fb_cmap ocmap = { 0, 256, ored, ogreen, oblue, NULL }; | ||
34 | static struct fb_cmap cmap = { 0, 256, red, green, blue, NULL }; | ||
35 | |||
36 | /* -------------------------------------------------------------------- */ | ||
37 | /* internal function prototypes */ | ||
38 | |||
39 | static void fb_cleanup(void); | ||
40 | //static void fb_cleanup_fork(void); | ||
41 | //static void fb_setvt(int vtno); | ||
42 | static void fb_init_palette_332(FB_Mode *mode); | ||
43 | static void fb_init_palette_linear(FB_Mode *mode); | ||
44 | |||
45 | /* -------------------------------------------------------------------- */ | ||
46 | /* palette setting */ | ||
47 | |||
48 | static void | ||
49 | fb_init_palette_332(FB_Mode *mode) | ||
50 | { | ||
51 | int r, g, b, i; | ||
52 | |||
53 | if (mode->fb_var.bits_per_pixel != 8) | ||
54 | return; | ||
55 | i = 0; | ||
56 | |||
57 | if (ioctl(fb, FBIOGETCMAP, &cmap) == -1) | ||
58 | perror("ioctl FBIOGETCMAP"); | ||
59 | |||
60 | /* generate the palette */ | ||
61 | for (r = 0; r < 8; r++) | ||
62 | { | ||
63 | for (g = 0; g < 8; g++) | ||
64 | { | ||
65 | for (b = 0; b < 4; b++) | ||
66 | { | ||
67 | int val; | ||
68 | |||
69 | val = (r << 5) | (r << 2) | (r >> 1); | ||
70 | red[i] = (val << 8) | val; | ||
71 | val = (g << 5) | (g << 2) | (g >> 1); | ||
72 | green[i] = (val << 8) | val; | ||
73 | val = (b << 6) | (b << 4) | (b << 2) | (b); | ||
74 | blue[i] = (val << 8) | val; | ||
75 | i++; | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | |||
80 | /* set colormap */ | ||
81 | if (ioctl(fb, FBIOPUTCMAP, &cmap) == -1) | ||
82 | perror("ioctl FBIOPUTCMAP"); | ||
83 | } | ||
84 | |||
85 | static void | ||
86 | fb_init_palette_linear(FB_Mode *mode) | ||
87 | { | ||
88 | int i; | ||
89 | |||
90 | if (mode->fb_var.bits_per_pixel != 8) | ||
91 | return; | ||
92 | |||
93 | if (ioctl(fb, FBIOGETCMAP, &cmap) == -1) | ||
94 | perror("ioctl FBIOGETCMAP"); | ||
95 | |||
96 | /* generate the palette */ | ||
97 | for (i = 0; i < 256; i++) | ||
98 | red[i] = (i << 8) | i; | ||
99 | for (i = 0; i < 256; i++) | ||
100 | green[i] = (i << 8) | i; | ||
101 | for (i = 0; i < 256; i++) | ||
102 | blue[i] = (i << 8) | i; | ||
103 | |||
104 | /* set colormap */ | ||
105 | if (ioctl(fb, FBIOPUTCMAP, &cmap) == -1) | ||
106 | perror("ioctl FBIOPUTCMAP"); | ||
107 | } | ||
108 | |||
109 | /* -------------------------------------------------------------------- */ | ||
110 | /* initialisation & cleanup */ | ||
111 | |||
112 | FB_Mode * | ||
113 | fb_list_modes(unsigned int *num_return) | ||
114 | { | ||
115 | FILE *f; | ||
116 | char line[256], label[256], value[256]; | ||
117 | FB_Mode *modes = NULL; | ||
118 | int num; | ||
119 | |||
120 | num = 0; | ||
121 | f = fopen("/etc/fb.modes","r"); | ||
122 | if (!f) | ||
123 | { | ||
124 | *num_return = 0; | ||
125 | return NULL; | ||
126 | } | ||
127 | while (fgets(line, sizeof(line) - 1, f)) | ||
128 | { | ||
129 | if (sscanf(line, "mode \"%250[^\"]\"", label) == 1) | ||
130 | { | ||
131 | char f1[32], f2[32], f3[32], f4[32]; | ||
132 | |||
133 | f1[0] = 0; f2[0] = 0; f3[0] = 0; f4[0] = 0; | ||
134 | sscanf(label, "%30[^x]x%30[^-]-%30[^-]-%30s", f1, f2, f3, f4); | ||
135 | if ((f1[0]) && (f2[0])) | ||
136 | { | ||
137 | int geometry = 0; | ||
138 | int timings = 0; | ||
139 | |||
140 | num++; | ||
141 | modes = realloc(modes, num * sizeof(FB_Mode)); | ||
142 | modes[num - 1].width = atoi(f1); | ||
143 | modes[num - 1].height = atoi(f2); | ||
144 | if (f3[0]) | ||
145 | modes[num - 1].refresh = atoi(f3); | ||
146 | else | ||
147 | modes[num - 1].refresh = 0; | ||
148 | modes[num - 1].fb_var.sync = 0; | ||
149 | while ((fgets(line, sizeof(line) - 1, f)) && | ||
150 | (!strstr(line, "endmode"))) | ||
151 | { | ||
152 | |||
153 | if (sscanf(line," geometry %i %i %i %i %i", | ||
154 | &modes[num - 1].fb_var.xres, | ||
155 | &modes[num - 1].fb_var.yres, | ||
156 | &modes[num - 1].fb_var.xres_virtual, | ||
157 | &modes[num - 1].fb_var.yres_virtual, | ||
158 | &modes[num - 1].fb_var.bits_per_pixel) == 5) | ||
159 | geometry = 1; | ||
160 | if (sscanf(line," timings %i %i %i %i %i %i %i", | ||
161 | &modes[num - 1].fb_var.pixclock, | ||
162 | &modes[num - 1].fb_var.left_margin, | ||
163 | &modes[num - 1].fb_var.right_margin, | ||
164 | &modes[num - 1].fb_var.upper_margin, | ||
165 | &modes[num - 1].fb_var.lower_margin, | ||
166 | &modes[num - 1].fb_var.hsync_len, | ||
167 | &modes[num - 1].fb_var.vsync_len) == 7) | ||
168 | timings = 1; | ||
169 | if ((sscanf(line, " hsync %15s", value) == 1) && | ||
170 | (!strcmp(value,"high"))) | ||
171 | modes[num - 1].fb_var.sync |= FB_SYNC_HOR_HIGH_ACT; | ||
172 | if ((sscanf(line, " vsync %15s", value) == 1) && | ||
173 | (!strcmp(value,"high"))) | ||
174 | modes[num - 1].fb_var.sync |= FB_SYNC_VERT_HIGH_ACT; | ||
175 | if ((sscanf(line, " csync %15s", value) == 1) && | ||
176 | (!strcmp(value,"high"))) | ||
177 | modes[num - 1].fb_var.sync |= FB_SYNC_COMP_HIGH_ACT; | ||
178 | if ((sscanf(line, " extsync %15s", value) == 1) && | ||
179 | (!strcmp(value,"true"))) | ||
180 | modes[num - 1].fb_var.sync |= FB_SYNC_EXT; | ||
181 | if ((sscanf(line, " laced %15s", value) == 1) && | ||
182 | (!strcmp(value,"true"))) | ||
183 | modes[num - 1].fb_var.vmode |= FB_VMODE_INTERLACED; | ||
184 | if ((sscanf(line, " double %15s",value) == 1) && | ||
185 | (!strcmp(value,"true"))) | ||
186 | modes[num - 1].fb_var.vmode |= FB_VMODE_DOUBLE; | ||
187 | } | ||
188 | if ((!geometry) || (!timings)) | ||
189 | { | ||
190 | num--; | ||
191 | if (num == 0) | ||
192 | { | ||
193 | free(modes); | ||
194 | modes = NULL; | ||
195 | } | ||
196 | } | ||
197 | else | ||
198 | { | ||
199 | modes[num - 1].fb_var.xoffset = 0; | ||
200 | modes[num - 1].fb_var.yoffset = 0; | ||
201 | } | ||
202 | } | ||
203 | } | ||
204 | } | ||
205 | fclose(f); | ||
206 | *num_return = num; | ||
207 | return modes; | ||
208 | } | ||
209 | |||
210 | FB_Mode * | ||
211 | fb_setmode(unsigned int width, unsigned int height, unsigned int pdepth, unsigned int refresh) | ||
212 | { | ||
213 | FB_Mode *modes, *mode = NULL; | ||
214 | unsigned int i, num_modes; | ||
215 | |||
216 | modes = fb_list_modes(&num_modes); | ||
217 | if (modes) | ||
218 | { | ||
219 | for (i = 0; i < num_modes; i++) | ||
220 | { | ||
221 | if ((modes[i].width == width) && | ||
222 | (modes[i].height == height) && | ||
223 | (!pdepth || modes[i].fb_var.bits_per_pixel == pdepth) && | ||
224 | (modes[i].refresh == refresh)) | ||
225 | { | ||
226 | if (pdepth) modes[i].fb_var.bits_per_pixel = pdepth; | ||
227 | |||
228 | if (ioctl(fb, FBIOPUT_VSCREENINFO, &modes[i].fb_var) == -1) | ||
229 | perror("ioctl FBIOPUT_VSCREENINFO"); | ||
230 | |||
231 | free(modes); | ||
232 | return fb_getmode(); | ||
233 | } | ||
234 | } | ||
235 | free(modes); | ||
236 | } | ||
237 | return mode; | ||
238 | } | ||
239 | |||
240 | FB_Mode * | ||
241 | fb_changedepth(FB_Mode *cur_mode, unsigned int pdepth) | ||
242 | { | ||
243 | cur_mode->fb_var.bits_per_pixel = pdepth; | ||
244 | |||
245 | if (ioctl(fb, FBIOPUT_VSCREENINFO, &cur_mode->fb_var) == -1) | ||
246 | perror("ioctl FBIOPUT_VSCREENINFO"); | ||
247 | |||
248 | free(cur_mode); | ||
249 | return fb_getmode(); | ||
250 | } | ||
251 | |||
252 | FB_Mode * | ||
253 | fb_changeres(FB_Mode *cur_mode, unsigned int width, unsigned int height, unsigned int refresh) | ||
254 | { | ||
255 | FB_Mode *modes; | ||
256 | unsigned int i, num_modes; | ||
257 | |||
258 | modes = fb_list_modes(&num_modes); | ||
259 | if (modes) | ||
260 | { | ||
261 | for (i = 0; i < num_modes; i++) | ||
262 | { | ||
263 | if ((modes[i].width == width) && | ||
264 | (modes[i].height == height) && | ||
265 | (modes[i].refresh == refresh)) | ||
266 | { | ||
267 | modes[i].fb_var.bits_per_pixel = cur_mode->depth; | ||
268 | |||
269 | if (ioctl(fb, FBIOPUT_VSCREENINFO, &modes[i].fb_var) == -1) | ||
270 | perror("ioctl FBIOPUT_VSCREENINFO"); | ||
271 | |||
272 | free(modes); | ||
273 | free(cur_mode); | ||
274 | return fb_getmode(); | ||
275 | } | ||
276 | } | ||
277 | free(modes); | ||
278 | } | ||
279 | return cur_mode; | ||
280 | } | ||
281 | |||
282 | FB_Mode * | ||
283 | fb_changemode(FB_Mode *cur_mode, unsigned int width, unsigned int height, unsigned int pdepth, unsigned int refresh) | ||
284 | { | ||
285 | FB_Mode *modes; | ||
286 | unsigned int i, num_modes; | ||
287 | |||
288 | modes = fb_list_modes(&num_modes); | ||
289 | if (modes) | ||
290 | { | ||
291 | for (i = 0; i < num_modes; i++) | ||
292 | { | ||
293 | if ((modes[i].width == width) && | ||
294 | (modes[i].height == height) && | ||
295 | (!pdepth || modes[i].fb_var.bits_per_pixel == pdepth) && | ||
296 | (modes[i].refresh == refresh)) | ||
297 | { | ||
298 | if (pdepth) modes[i].fb_var.bits_per_pixel = pdepth; | ||
299 | |||
300 | if (ioctl(fb, FBIOPUT_VSCREENINFO, &modes[i].fb_var) == -1) | ||
301 | perror("ioctl FBIOPUT_VSCREENINFO"); | ||
302 | |||
303 | free(modes); | ||
304 | free(cur_mode); | ||
305 | return fb_getmode(); | ||
306 | } | ||
307 | } | ||
308 | free(modes); | ||
309 | } | ||
310 | return cur_mode; | ||
311 | } | ||
312 | |||
313 | FB_Mode * | ||
314 | fb_getmode(void) | ||
315 | { | ||
316 | FB_Mode *mode = NULL; | ||
317 | int hpix, lines, clockrate; | ||
318 | |||
319 | mode = malloc(sizeof(FB_Mode)); | ||
320 | /* look what we have now ... */ | ||
321 | |||
322 | if (ioctl(fb, FBIOGET_VSCREENINFO, &mode->fb_var) == -1) | ||
323 | { | ||
324 | perror("ioctl FBIOGET_VSCREENINFO"); | ||
325 | return NULL; | ||
326 | } | ||
327 | |||
328 | mode->width = mode->fb_var.xres_virtual; | ||
329 | mode->height = mode->fb_var.yres_virtual; | ||
330 | hpix = | ||
331 | mode->fb_var.left_margin + | ||
332 | mode->fb_var.xres + | ||
333 | mode->fb_var.right_margin + | ||
334 | mode->fb_var.hsync_len; | ||
335 | lines = | ||
336 | mode->fb_var.upper_margin + | ||
337 | mode->fb_var.yres + | ||
338 | mode->fb_var.lower_margin + | ||
339 | mode->fb_var.vsync_len; | ||
340 | if (mode->fb_var.pixclock > 0) | ||
341 | clockrate = 1000000 / mode->fb_var.pixclock; | ||
342 | else | ||
343 | clockrate = 0; | ||
344 | if ((lines > 0) && (hpix > 0)) | ||
345 | mode->refresh = clockrate * 1000000 / (lines * hpix); | ||
346 | switch (mode->fb_var.bits_per_pixel) | ||
347 | { | ||
348 | case 1: | ||
349 | bpp = 1; | ||
350 | depth = 1; | ||
351 | break; | ||
352 | case 4: | ||
353 | bpp = 1; | ||
354 | depth = 4; | ||
355 | break; | ||
356 | case 8: | ||
357 | bpp = 1; | ||
358 | depth = 8; | ||
359 | break; | ||
360 | case 15: | ||
361 | case 16: | ||
362 | if (mode->fb_var.green.length == 6) | ||
363 | depth = 16; | ||
364 | else | ||
365 | depth = 15; | ||
366 | bpp = 2; | ||
367 | break; | ||
368 | case 24: | ||
369 | depth = 24; | ||
370 | bpp = mode->fb_var.bits_per_pixel / 8; | ||
371 | break; | ||
372 | case 32: | ||
373 | depth = 32; | ||
374 | bpp = mode->fb_var.bits_per_pixel / 8; | ||
375 | break; | ||
376 | default: | ||
377 | ERR("Cannot handle framebuffer of depth %i", | ||
378 | mode->fb_var.bits_per_pixel); | ||
379 | fb_cleanup(); | ||
380 | free(mode); | ||
381 | return NULL; | ||
382 | } | ||
383 | mode->depth = depth; | ||
384 | mode->bpp = bpp; | ||
385 | if (mode->depth == 8) fb_init_palette_332(mode); | ||
386 | else fb_init_palette_linear(mode); | ||
387 | return mode; | ||
388 | } | ||
389 | |||
390 | /* XXX: unused | ||
391 | static void | ||
392 | fb_setvt(int vtno) | ||
393 | { | ||
394 | struct vt_stat vts; | ||
395 | char vtname[32]; | ||
396 | int vtfd; | ||
397 | |||
398 | if (vtno < 0) | ||
399 | { | ||
400 | if ((ioctl(tty,VT_OPENQRY, &vtno) == -1)) | ||
401 | { | ||
402 | perror("ioctl VT_OPENQRY"); | ||
403 | return; | ||
404 | } | ||
405 | if (vtno <= 0 ) | ||
406 | { | ||
407 | perror("ioctl VT_OPENQRY vtno <= 0"); | ||
408 | return; | ||
409 | } | ||
410 | } | ||
411 | vtno &= 0xff; | ||
412 | sprintf(vtname, "/dev/tty%i", vtno); | ||
413 | if (chown(vtname, getuid(), getgid()) != 0) | ||
414 | { | ||
415 | vtfd = 0; // do nothing - don't worry about chown | ||
416 | } | ||
417 | if (access(vtname,R_OK | W_OK) == -1) | ||
418 | { | ||
419 | CRIT("Access %s: %s",vtname,strerror(errno)); | ||
420 | return; | ||
421 | } | ||
422 | vtfd = open(vtname,O_RDWR); | ||
423 | |||
424 | if (ioctl(tty, VT_GETSTATE, &vts) == -1) | ||
425 | { | ||
426 | perror("ioctl VT_GETSTATE"); | ||
427 | close(vtfd); | ||
428 | return; | ||
429 | } | ||
430 | |||
431 | orig_vt_no = vts.v_active; | ||
432 | close(vtfd); | ||
433 | #if 0 | ||
434 | if (ioctl(tty, VT_ACTIVATE, vtno) == -1) | ||
435 | { | ||
436 | perror("ioctl VT_ACTIVATE"); | ||
437 | exit(1); | ||
438 | } | ||
439 | if (ioctl(tty, VT_WAITACTIVE, vtno) == -1) | ||
440 | { | ||
441 | perror("ioctl VT_WAITACTIVE"); | ||
442 | exit(1); | ||
443 | } | ||
444 | #endif | ||
445 | } | ||
446 | */ | ||
447 | |||
448 | void | ||
449 | fb_init(int vt __UNUSED__, int device) | ||
450 | { | ||
451 | char dev[32]; | ||
452 | |||
453 | tty = 0; | ||
454 | #if 0 | ||
455 | if (vt != 0) fb_setvt(vt); | ||
456 | #endif | ||
457 | |||
458 | if ( getenv("EVAS_FB_DEV") ) | ||
459 | { | ||
460 | fb = open(getenv("EVAS_FB_DEV"), O_RDWR); | ||
461 | } | ||
462 | else | ||
463 | { | ||
464 | sprintf(dev, "/dev/fb/%i", device); | ||
465 | fb = open(dev, O_RDWR); | ||
466 | if ( fb == -1 ) | ||
467 | { | ||
468 | sprintf(dev, "/dev/fb%i", device); | ||
469 | fb = open(dev, O_RDWR); | ||
470 | } | ||
471 | } | ||
472 | if (fb == -1) | ||
473 | { | ||
474 | CRIT("open %s: %s", dev, strerror(errno)); | ||
475 | fb_cleanup(); | ||
476 | return; | ||
477 | } | ||
478 | |||
479 | if (ioctl(fb, FBIOGET_VSCREENINFO, &fb_ovar) == -1) | ||
480 | { | ||
481 | perror("ioctl FBIOGET_VSCREENINFO"); | ||
482 | return; | ||
483 | } | ||
484 | if (ioctl(fb, FBIOGET_FSCREENINFO, &fb_fix) == -1) | ||
485 | { | ||
486 | perror("ioctl FBIOGET_FSCREENINFO"); | ||
487 | return; | ||
488 | } | ||
489 | |||
490 | if ((fb_ovar.bits_per_pixel == 8) || | ||
491 | (fb_fix.visual == FB_VISUAL_DIRECTCOLOR)) | ||
492 | { | ||
493 | if (ioctl(fb,FBIOGETCMAP , &ocmap) == -1) | ||
494 | { | ||
495 | perror("ioctl FBIOGETCMAP"); | ||
496 | return; | ||
497 | } | ||
498 | } | ||
499 | #if 0 | ||
500 | if (isatty(0)) | ||
501 | tty = 0; | ||
502 | else if ((tty = open("/dev/tty",O_RDWR)) == -1) | ||
503 | { | ||
504 | CITICAL("open %s: %s", "/dev/tty", strerror(errno)); | ||
505 | return; | ||
506 | } | ||
507 | if (tty) | ||
508 | { | ||
509 | if (ioctl(tty, KDGETMODE, &kd_mode) == -1) | ||
510 | { | ||
511 | perror("ioctl KDGETMODE"); | ||
512 | return; | ||
513 | } | ||
514 | if (ioctl(tty, VT_GETMODE, &vt_omode) == -1) | ||
515 | { | ||
516 | perror("ioctl VT_GETMODE"); | ||
517 | return; | ||
518 | } | ||
519 | } | ||
520 | #endif | ||
521 | } | ||
522 | |||
523 | int | ||
524 | fb_postinit(FB_Mode *mode) | ||
525 | { | ||
526 | if (ioctl(fb,FBIOGET_FSCREENINFO, &fb_fix) == -1) | ||
527 | { | ||
528 | perror("ioctl FBIOGET_FSCREENINFO"); | ||
529 | fb_cleanup(); | ||
530 | return 0; | ||
531 | } | ||
532 | |||
533 | if (fb_fix.type != FB_TYPE_PACKED_PIXELS) | ||
534 | { | ||
535 | CRIT("can handle only packed pixel frame buffers"); | ||
536 | fb_cleanup(); | ||
537 | return 0; | ||
538 | } | ||
539 | mode->mem_offset = (unsigned)(fb_fix.smem_start) & (getpagesize()-1); | ||
540 | mode->mem = (unsigned char *)mmap(NULL, fb_fix.smem_len + mode->mem_offset, | ||
541 | PROT_WRITE | PROT_READ, MAP_SHARED, fb, 0); | ||
542 | if (mode->mem == MAP_FAILED) | ||
543 | { | ||
544 | perror("mmap"); | ||
545 | fb_cleanup(); | ||
546 | } | ||
547 | /* move viewport to upper left corner */ | ||
548 | if ((mode->fb_var.xoffset != 0) || (mode->fb_var.yoffset != 0)) | ||
549 | { | ||
550 | mode->fb_var.xoffset = 0; | ||
551 | mode->fb_var.yoffset = 0; | ||
552 | |||
553 | if (ioctl(fb, FBIOPAN_DISPLAY, &(mode->fb_var)) == -1) | ||
554 | { | ||
555 | perror("ioctl FBIOPAN_DISPLAY"); | ||
556 | fb_cleanup(); | ||
557 | } | ||
558 | } | ||
559 | #if 0 | ||
560 | if (tty) | ||
561 | { | ||
562 | if (ioctl(tty,KDSETMODE, KD_GRAPHICS) == -1) | ||
563 | { | ||
564 | perror("ioctl KDSETMODE"); | ||
565 | fb_cleanup(); | ||
566 | } | ||
567 | } | ||
568 | #endif | ||
569 | mode->fb_fd = fb; | ||
570 | return fb; | ||
571 | } | ||
572 | |||
573 | static void | ||
574 | fb_cleanup(void) | ||
575 | { | ||
576 | /* restore console */ | ||
577 | if (ioctl(fb, FBIOPUT_VSCREENINFO, &fb_ovar) == -1) | ||
578 | perror("ioctl FBIOPUT_VSCREENINFO"); | ||
579 | if (ioctl(fb, FBIOGET_FSCREENINFO, &fb_fix) == -1) | ||
580 | perror("ioctl FBIOGET_FSCREENINFO"); | ||
581 | if ((fb_ovar.bits_per_pixel == 8) || | ||
582 | (fb_fix.visual == FB_VISUAL_DIRECTCOLOR)) | ||
583 | { | ||
584 | if (ioctl(fb, FBIOPUTCMAP, &ocmap) == -1) | ||
585 | perror("ioctl FBIOPUTCMAP"); | ||
586 | } | ||
587 | close(fb); | ||
588 | if (tty) | ||
589 | { | ||
590 | if (ioctl(tty, KDSETMODE, kd_mode) == -1) | ||
591 | perror("ioctl KDSETMODE"); | ||
592 | if (ioctl(tty, VT_SETMODE, &vt_omode) == -1) | ||
593 | perror("ioctl VT_SETMODE"); | ||
594 | #if 0 | ||
595 | if ((ioctl(tty, VT_ACTIVATE, orig_vt_no) == -1) && (orig_vt_no)) | ||
596 | perror("ioctl VT_ACTIVATE"); | ||
597 | #endif | ||
598 | } | ||
599 | close(tty); | ||
600 | } | ||
diff --git a/libraries/evas/src/modules/engines/fb/evas_outbuf.c b/libraries/evas/src/modules/engines/fb/evas_outbuf.c new file mode 100644 index 0000000..57cf7a6 --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/evas_outbuf.c | |||
@@ -0,0 +1,397 @@ | |||
1 | #include "evas_common.h" | ||
2 | #include "evas_engine.h" | ||
3 | #include <sys/time.h> | ||
4 | #include <sys/utsname.h> | ||
5 | |||
6 | void | ||
7 | evas_fb_outbuf_fb_init(void) | ||
8 | { | ||
9 | } | ||
10 | |||
11 | void | ||
12 | evas_fb_outbuf_fb_free(Outbuf *buf) | ||
13 | { | ||
14 | /* FIXME: implement */ | ||
15 | WRN("destroying fb info.. not implemented!!!! WARNING. LEAK!"); | ||
16 | if (buf->priv.back_buf) | ||
17 | evas_cache_image_drop(&buf->priv.back_buf->cache_entry); | ||
18 | free(buf); | ||
19 | } | ||
20 | |||
21 | Outbuf * | ||
22 | evas_fb_outbuf_fb_setup_fb(int w, int h, int rot, Outbuf_Depth depth, int vt_no, int dev_no, int refresh) | ||
23 | { | ||
24 | /* create outbuf struct */ | ||
25 | /* setup window and/or fb */ | ||
26 | /* if (dithered) create backbuf */ | ||
27 | Outbuf *buf; | ||
28 | int fb_fd = -1; | ||
29 | int fb_depth; | ||
30 | |||
31 | fb_depth = -1; | ||
32 | if (depth == OUTBUF_DEPTH_RGB_16BPP_565_565_DITHERED) fb_depth = 16; | ||
33 | else if (depth == OUTBUF_DEPTH_RGB_16BPP_555_555_DITHERED) fb_depth = 15; | ||
34 | else if (depth == OUTBUF_DEPTH_RGB_16BPP_565_444_DITHERED) fb_depth = 16; | ||
35 | else if (depth == OUTBUF_DEPTH_RGB_16BPP_444_444_DITHERED) fb_depth = 12; | ||
36 | else if (depth == OUTBUF_DEPTH_RGB_32BPP_888_8888) fb_depth = 32; | ||
37 | else if (depth == OUTBUF_DEPTH_INHERIT) fb_depth = 0; | ||
38 | buf = calloc(1, sizeof(Outbuf)); | ||
39 | if (!buf) | ||
40 | return NULL; | ||
41 | |||
42 | fb_init(vt_no, dev_no); | ||
43 | if (rot == 0 || rot == 180) | ||
44 | buf->priv.fb.fb = fb_setmode(w, h, fb_depth, refresh); | ||
45 | else if (rot == 90 || rot == 270) | ||
46 | buf->priv.fb.fb = fb_setmode(h, w, fb_depth, refresh); | ||
47 | if (!buf->priv.fb.fb) buf->priv.fb.fb = fb_getmode(); | ||
48 | if (!buf->priv.fb.fb) | ||
49 | { | ||
50 | free(buf); | ||
51 | return NULL; | ||
52 | } | ||
53 | fb_fd = fb_postinit(buf->priv.fb.fb); | ||
54 | |||
55 | if (rot == 0 || rot == 180) | ||
56 | { | ||
57 | buf->w = buf->priv.fb.fb->width; | ||
58 | buf->h = buf->priv.fb.fb->height; | ||
59 | } | ||
60 | else if (rot == 90 || rot == 270) | ||
61 | { | ||
62 | buf->w = buf->priv.fb.fb->height; | ||
63 | buf->h = buf->priv.fb.fb->width; | ||
64 | } | ||
65 | |||
66 | buf->depth = depth; | ||
67 | buf->rot = rot; | ||
68 | |||
69 | { | ||
70 | Gfx_Func_Convert conv_func; | ||
71 | int i; | ||
72 | |||
73 | buf->priv.mask.r = 0; | ||
74 | for (i = 0; i < (int)buf->priv.fb.fb->fb_var.red.length; i++) | ||
75 | buf->priv.mask.r |= (1 << (buf->priv.fb.fb->fb_var.red.offset + i)); | ||
76 | buf->priv.mask.g = 0; | ||
77 | for (i = 0; i < (int)buf->priv.fb.fb->fb_var.green.length; i++) | ||
78 | buf->priv.mask.g |= (1 << (buf->priv.fb.fb->fb_var.green.offset + i)); | ||
79 | buf->priv.mask.b = 0; | ||
80 | for (i = 0; i < (int)buf->priv.fb.fb->fb_var.blue.length; i++) | ||
81 | buf->priv.mask.b |= (1 << (buf->priv.fb.fb->fb_var.blue.offset + i)); | ||
82 | |||
83 | conv_func = NULL; | ||
84 | if (buf->rot == 0 || buf->rot == 180) | ||
85 | conv_func = evas_common_convert_func_get(0, buf->w, buf->h, | ||
86 | buf->priv.fb.fb->fb_var.bits_per_pixel, | ||
87 | buf->priv.mask.r, | ||
88 | buf->priv.mask.g, | ||
89 | buf->priv.mask.b, | ||
90 | PAL_MODE_NONE, | ||
91 | buf->rot); | ||
92 | else if (buf->rot == 90 || buf->rot == 270) | ||
93 | conv_func = evas_common_convert_func_get(0, buf->h, buf->w, | ||
94 | buf->priv.fb.fb->fb_var.bits_per_pixel, | ||
95 | buf->priv.mask.r, | ||
96 | buf->priv.mask.g, | ||
97 | buf->priv.mask.b, | ||
98 | PAL_MODE_NONE, | ||
99 | buf->rot); | ||
100 | if (!conv_func) | ||
101 | { | ||
102 | free(buf); | ||
103 | return NULL; | ||
104 | } | ||
105 | } | ||
106 | // if (buf->priv.fb.fb->fb_var.bits_per_pixel < 24) | ||
107 | // buf->priv.back_buf = evas_common_image_create(buf->w, buf->h); | ||
108 | |||
109 | return buf; | ||
110 | } | ||
111 | |||
112 | void | ||
113 | evas_fb_outbuf_fb_blit(Outbuf *buf, int src_x, int src_y, int w, int h, int dst_x, int dst_y) | ||
114 | { | ||
115 | if (buf->priv.back_buf) | ||
116 | { | ||
117 | evas_common_blit_rectangle(buf->priv.back_buf, buf->priv.back_buf, | ||
118 | src_x, src_y, w, h, dst_x, dst_y); | ||
119 | evas_fb_outbuf_fb_update(buf, dst_x, dst_y, w, h); | ||
120 | } | ||
121 | else | ||
122 | { | ||
123 | if (buf->priv.fb.fb) | ||
124 | { | ||
125 | /* FIXME: need to implement an fb call for "copy area" */ | ||
126 | } | ||
127 | } | ||
128 | } | ||
129 | |||
130 | void | ||
131 | evas_fb_outbuf_fb_update(Outbuf *buf, int x, int y, int w, int h) | ||
132 | { | ||
133 | if (!(buf->priv.back_buf)) return; | ||
134 | if (buf->priv.fb.fb) | ||
135 | { | ||
136 | Gfx_Func_Convert conv_func; | ||
137 | DATA8 *data; | ||
138 | |||
139 | data = NULL; | ||
140 | conv_func = NULL; | ||
141 | if (buf->rot == 0) | ||
142 | { | ||
143 | data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset + | ||
144 | buf->priv.fb.fb->bpp * | ||
145 | (x + (y * buf->priv.fb.fb->width)); | ||
146 | conv_func = evas_common_convert_func_get(data, w, h, buf->priv.fb.fb->fb_var.bits_per_pixel, | ||
147 | buf->priv.mask.r, buf->priv.mask.g, | ||
148 | buf->priv.mask.b, PAL_MODE_NONE, | ||
149 | buf->rot); | ||
150 | } | ||
151 | else if (buf->rot == 180) | ||
152 | { | ||
153 | data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset + | ||
154 | buf->priv.fb.fb->bpp * | ||
155 | (buf->w - x - w + ((buf->h - y - h) * buf->priv.fb.fb->width)); | ||
156 | conv_func = evas_common_convert_func_get(data, w, h, buf->priv.fb.fb->fb_var.bits_per_pixel, | ||
157 | buf->priv.mask.r, buf->priv.mask.g, | ||
158 | buf->priv.mask.b, PAL_MODE_NONE, | ||
159 | buf->rot); | ||
160 | } | ||
161 | else if (buf->rot == 270) | ||
162 | { | ||
163 | data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset + | ||
164 | buf->priv.fb.fb->bpp * | ||
165 | (buf->h - y - h + (x * buf->priv.fb.fb->width)); | ||
166 | conv_func = evas_common_convert_func_get(data, h, w, buf->priv.fb.fb->fb_var.bits_per_pixel, | ||
167 | buf->priv.mask.r, buf->priv.mask.g, | ||
168 | buf->priv.mask.b, PAL_MODE_NONE, | ||
169 | buf->rot); | ||
170 | } | ||
171 | else if (buf->rot == 90) | ||
172 | { | ||
173 | data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset + | ||
174 | buf->priv.fb.fb->bpp * | ||
175 | (y + ((buf->w - x - w) * buf->priv.fb.fb->width)); | ||
176 | conv_func = evas_common_convert_func_get(data, h, w, buf->priv.fb.fb->fb_var.bits_per_pixel, | ||
177 | buf->priv.mask.r, buf->priv.mask.g, | ||
178 | buf->priv.mask.b, PAL_MODE_NONE, | ||
179 | buf->rot); | ||
180 | } | ||
181 | if (conv_func) | ||
182 | { | ||
183 | DATA32 *src_data; | ||
184 | |||
185 | src_data = buf->priv.back_buf->image.data + (y * buf->w) + x; | ||
186 | if (buf->rot == 0 || buf->rot == 180) | ||
187 | { | ||
188 | conv_func(src_data, data, | ||
189 | buf->w - w, | ||
190 | buf->priv.fb.fb->width - w, | ||
191 | w, h, | ||
192 | x, y, NULL); | ||
193 | } | ||
194 | else if (buf->rot == 90 || buf->rot == 270) | ||
195 | { | ||
196 | conv_func(src_data, data, | ||
197 | buf->w - w, | ||
198 | buf->priv.fb.fb->width - h, | ||
199 | h, w, | ||
200 | x, y, NULL); | ||
201 | } | ||
202 | } | ||
203 | } | ||
204 | } | ||
205 | |||
206 | RGBA_Image * | ||
207 | evas_fb_outbuf_fb_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch) | ||
208 | { | ||
209 | if (buf->priv.back_buf) | ||
210 | { | ||
211 | *cx = x; *cy = y; *cw = w; *ch = h; | ||
212 | return buf->priv.back_buf; | ||
213 | } | ||
214 | else | ||
215 | { | ||
216 | RGBA_Image *im; | ||
217 | |||
218 | *cx = 0; *cy = 0; *cw = w; *ch = h; | ||
219 | im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get()); | ||
220 | im->cache_entry.flags.alpha = 1; | ||
221 | im = (RGBA_Image *) evas_cache_image_size_set(&im->cache_entry, w, h); | ||
222 | |||
223 | return im; | ||
224 | } | ||
225 | return NULL; | ||
226 | } | ||
227 | |||
228 | void | ||
229 | evas_fb_outbuf_fb_free_region_for_update(Outbuf *buf, RGBA_Image *update) | ||
230 | { | ||
231 | if (update != buf->priv.back_buf) evas_cache_image_drop(&update->cache_entry); | ||
232 | } | ||
233 | |||
234 | void | ||
235 | evas_fb_outbuf_fb_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h) | ||
236 | { | ||
237 | if (!buf->priv.fb.fb) return; | ||
238 | if (buf->priv.back_buf) | ||
239 | { | ||
240 | if (update != buf->priv.back_buf) | ||
241 | evas_common_blit_rectangle(update, buf->priv.back_buf, | ||
242 | 0, 0, w, h, x, y); | ||
243 | evas_fb_outbuf_fb_update(buf, x, y, w, h); | ||
244 | } | ||
245 | else | ||
246 | { | ||
247 | Gfx_Func_Convert conv_func; | ||
248 | DATA8 *data; | ||
249 | |||
250 | data = NULL; | ||
251 | conv_func = NULL; | ||
252 | if (buf->rot == 0) | ||
253 | { | ||
254 | data = (DATA8 *)buf->priv.fb.fb->mem + | ||
255 | buf->priv.fb.fb->mem_offset + | ||
256 | buf->priv.fb.fb->bpp * | ||
257 | (x + (y * buf->priv.fb.fb->width)); | ||
258 | conv_func = evas_common_convert_func_get(data, w, h, | ||
259 | buf->priv.fb.fb->fb_var.bits_per_pixel, | ||
260 | buf->priv.mask.r, buf->priv.mask.g, | ||
261 | buf->priv.mask.b, PAL_MODE_NONE, | ||
262 | buf->rot); | ||
263 | } | ||
264 | else if (buf->rot == 180) | ||
265 | { | ||
266 | data = (DATA8 *)buf->priv.fb.fb->mem + | ||
267 | buf->priv.fb.fb->mem_offset + | ||
268 | buf->priv.fb.fb->bpp * | ||
269 | (buf->w - x - w + ((buf->h - y - h) * buf->priv.fb.fb->width)); | ||
270 | conv_func = evas_common_convert_func_get(data, w, h, | ||
271 | buf->priv.fb.fb->fb_var.bits_per_pixel, | ||
272 | buf->priv.mask.r, buf->priv.mask.g, | ||
273 | buf->priv.mask.b, PAL_MODE_NONE, | ||
274 | buf->rot); | ||
275 | } | ||
276 | else if (buf->rot == 270) | ||
277 | { | ||
278 | data = (DATA8 *)buf->priv.fb.fb->mem + | ||
279 | buf->priv.fb.fb->mem_offset + | ||
280 | buf->priv.fb.fb->bpp * | ||
281 | (buf->h - y - h + (x * buf->priv.fb.fb->width)); | ||
282 | conv_func = evas_common_convert_func_get(data, h, w, | ||
283 | buf->priv.fb.fb->fb_var.bits_per_pixel, | ||
284 | buf->priv.mask.r, buf->priv.mask.g, | ||
285 | buf->priv.mask.b, PAL_MODE_NONE, | ||
286 | buf->rot); | ||
287 | } | ||
288 | else if (buf->rot == 90) | ||
289 | { | ||
290 | data = (DATA8 *)buf->priv.fb.fb->mem + | ||
291 | buf->priv.fb.fb->mem_offset + | ||
292 | buf->priv.fb.fb->bpp * | ||
293 | (y + ((buf->w - x - w) * buf->priv.fb.fb->width)); | ||
294 | conv_func = evas_common_convert_func_get(data, h, w, | ||
295 | buf->priv.fb.fb->fb_var.bits_per_pixel, | ||
296 | buf->priv.mask.r, buf->priv.mask.g, | ||
297 | buf->priv.mask.b, PAL_MODE_NONE, | ||
298 | buf->rot); | ||
299 | } | ||
300 | if (conv_func) | ||
301 | { | ||
302 | DATA32 *src_data; | ||
303 | |||
304 | src_data = update->image.data; | ||
305 | if (buf->rot == 0 || buf->rot == 180) | ||
306 | { | ||
307 | conv_func(src_data, data, | ||
308 | 0, | ||
309 | buf->priv.fb.fb->width - w, | ||
310 | w, h, | ||
311 | x, y, NULL); | ||
312 | } | ||
313 | else if (buf->rot == 90 || buf->rot == 270) | ||
314 | { | ||
315 | conv_func(src_data, data, | ||
316 | 0, | ||
317 | buf->priv.fb.fb->width - h, | ||
318 | h, w, | ||
319 | x, y, NULL); | ||
320 | } | ||
321 | } | ||
322 | } | ||
323 | } | ||
324 | |||
325 | void | ||
326 | evas_fb_outbuf_fb_reconfigure(Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth) | ||
327 | { | ||
328 | if ((w == buf->w) && (h == buf->h) && | ||
329 | (rot == buf->rot) && (depth == buf->depth)) | ||
330 | return; | ||
331 | if (buf->priv.back_buf) | ||
332 | { | ||
333 | evas_cache_image_drop(&buf->priv.back_buf->cache_entry); | ||
334 | buf->priv.back_buf = NULL; | ||
335 | } | ||
336 | if (buf->priv.fb.fb) | ||
337 | { | ||
338 | /* FIXME: implement this */ | ||
339 | } | ||
340 | /* if backbuf delet it */ | ||
341 | /* resize window or reset fb mode */ | ||
342 | /* if (dithered) create new backbuf */ | ||
343 | } | ||
344 | |||
345 | int | ||
346 | evas_fb_outbuf_fb_get_width(Outbuf *buf) | ||
347 | { | ||
348 | return buf->w; | ||
349 | } | ||
350 | |||
351 | int | ||
352 | evas_fb_outbuf_fb_get_height(Outbuf *buf) | ||
353 | { | ||
354 | return buf->h; | ||
355 | } | ||
356 | |||
357 | Outbuf_Depth | ||
358 | evas_fb_outbuf_fb_get_depth(Outbuf *buf) | ||
359 | { | ||
360 | return buf->depth; | ||
361 | } | ||
362 | |||
363 | int | ||
364 | evas_fb_outbuf_fb_get_rot(Outbuf *buf) | ||
365 | { | ||
366 | return buf->rot; | ||
367 | } | ||
368 | |||
369 | int | ||
370 | evas_fb_outbuf_fb_get_have_backbuf(Outbuf *buf) | ||
371 | { | ||
372 | if (buf->priv.back_buf) return 1; | ||
373 | return 0; | ||
374 | } | ||
375 | |||
376 | void | ||
377 | evas_fb_outbuf_fb_set_have_backbuf(Outbuf *buf, int have_backbuf) | ||
378 | { | ||
379 | if (buf->priv.back_buf) | ||
380 | { | ||
381 | if (have_backbuf) return; | ||
382 | evas_cache_image_drop(&buf->priv.back_buf->cache_entry); | ||
383 | buf->priv.back_buf = NULL; | ||
384 | } | ||
385 | else | ||
386 | { | ||
387 | if (!have_backbuf) return; | ||
388 | if (buf->priv.fb.fb) | ||
389 | { | ||
390 | if (buf->priv.fb.fb->fb_var.bits_per_pixel < 24) | ||
391 | { | ||
392 | buf->priv.back_buf = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get()); | ||
393 | buf->priv.back_buf = (RGBA_Image *) evas_cache_image_size_set(&buf->priv.back_buf->cache_entry, buf->w, buf->h); | ||
394 | } | ||
395 | } | ||
396 | } | ||
397 | } | ||