diff options
Diffstat (limited to 'libraries/evas/src/lib/engines/common_8')
12 files changed, 3797 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/engines/common_8/Makefile.am b/libraries/evas/src/lib/engines/common_8/Makefile.am new file mode 100644 index 0000000..58a1b1f --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/Makefile.am | |||
@@ -0,0 +1,32 @@ | |||
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 | @FREETYPE_CFLAGS@ \ | ||
9 | @PIXMAN_CFLAGS@ \ | ||
10 | @VALGRIND_CFLAGS@ \ | ||
11 | @EINA_CFLAGS@ \ | ||
12 | @EET_CFLAGS@ \ | ||
13 | @pthread_cflags@ | ||
14 | |||
15 | noinst_LTLIBRARIES = libevas_engine_common_8.la | ||
16 | |||
17 | libevas_engine_common_8_la_SOURCES = \ | ||
18 | evas_soft8_dither_mask.c \ | ||
19 | evas_soft8_font.c \ | ||
20 | evas_soft8_image_unscaled.c \ | ||
21 | evas_soft8_main.c \ | ||
22 | evas_soft8_rectangle.c \ | ||
23 | evas_soft8_line.c \ | ||
24 | evas_soft8_polygon.c \ | ||
25 | evas_soft8_image_scaled_sampled.c | ||
26 | |||
27 | |||
28 | libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h | ||
29 | |||
30 | EXTRA_DIST = \ | ||
31 | evas_soft8_scanline_blend.c \ | ||
32 | evas_soft8_scanline_fill.c | ||
diff --git a/libraries/evas/src/lib/engines/common_8/Makefile.in b/libraries/evas/src/lib/engines/common_8/Makefile.in new file mode 100644 index 0000000..06c13de --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/Makefile.in | |||
@@ -0,0 +1,696 @@ | |||
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 | VPATH = @srcdir@ | ||
19 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
20 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
21 | pkglibdir = $(libdir)/@PACKAGE@ | ||
22 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | ||
23 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
24 | install_sh_DATA = $(install_sh) -c -m 644 | ||
25 | install_sh_PROGRAM = $(install_sh) -c | ||
26 | install_sh_SCRIPT = $(install_sh) -c | ||
27 | INSTALL_HEADER = $(INSTALL_DATA) | ||
28 | transform = $(program_transform_name) | ||
29 | NORMAL_INSTALL = : | ||
30 | PRE_INSTALL = : | ||
31 | POST_INSTALL = : | ||
32 | NORMAL_UNINSTALL = : | ||
33 | PRE_UNINSTALL = : | ||
34 | POST_UNINSTALL = : | ||
35 | build_triplet = @build@ | ||
36 | host_triplet = @host@ | ||
37 | subdir = src/lib/engines/common_8 | ||
38 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
39 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
40 | am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ | ||
41 | $(top_srcdir)/m4/efl_coverage.m4 \ | ||
42 | $(top_srcdir)/m4/efl_doxygen.m4 \ | ||
43 | $(top_srcdir)/m4/efl_fnmatch.m4 \ | ||
44 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ | ||
45 | $(top_srcdir)/m4/evas_check_engine.m4 \ | ||
46 | $(top_srcdir)/m4/evas_check_loader.m4 \ | ||
47 | $(top_srcdir)/m4/evas_converter.m4 \ | ||
48 | $(top_srcdir)/m4/evas_dither.m4 \ | ||
49 | $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ | ||
50 | $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ | ||
51 | $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ | ||
52 | $(top_srcdir)/configure.ac | ||
53 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
54 | $(ACLOCAL_M4) | ||
55 | mkinstalldirs = $(install_sh) -d | ||
56 | CONFIG_HEADER = $(top_builddir)/config.h | ||
57 | CONFIG_CLEAN_FILES = | ||
58 | CONFIG_CLEAN_VPATH_FILES = | ||
59 | LTLIBRARIES = $(noinst_LTLIBRARIES) | ||
60 | libevas_engine_common_8_la_LIBADD = | ||
61 | am_libevas_engine_common_8_la_OBJECTS = evas_soft8_dither_mask.lo \ | ||
62 | evas_soft8_font.lo evas_soft8_image_unscaled.lo \ | ||
63 | evas_soft8_main.lo evas_soft8_rectangle.lo evas_soft8_line.lo \ | ||
64 | evas_soft8_polygon.lo evas_soft8_image_scaled_sampled.lo | ||
65 | libevas_engine_common_8_la_OBJECTS = \ | ||
66 | $(am_libevas_engine_common_8_la_OBJECTS) | ||
67 | AM_V_lt = $(am__v_lt_$(V)) | ||
68 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) | ||
69 | am__v_lt_0 = --silent | ||
70 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) | ||
71 | depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
72 | am__depfiles_maybe = depfiles | ||
73 | am__mv = mv -f | ||
74 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
75 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
76 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
77 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ | ||
78 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
79 | $(AM_CFLAGS) $(CFLAGS) | ||
80 | AM_V_CC = $(am__v_CC_$(V)) | ||
81 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) | ||
82 | am__v_CC_0 = @echo " CC " $@; | ||
83 | AM_V_at = $(am__v_at_$(V)) | ||
84 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) | ||
85 | am__v_at_0 = @ | ||
86 | CCLD = $(CC) | ||
87 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
88 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
89 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
90 | AM_V_CCLD = $(am__v_CCLD_$(V)) | ||
91 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) | ||
92 | am__v_CCLD_0 = @echo " CCLD " $@; | ||
93 | AM_V_GEN = $(am__v_GEN_$(V)) | ||
94 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
95 | am__v_GEN_0 = @echo " GEN " $@; | ||
96 | SOURCES = $(libevas_engine_common_8_la_SOURCES) | ||
97 | DIST_SOURCES = $(libevas_engine_common_8_la_SOURCES) | ||
98 | ETAGS = etags | ||
99 | CTAGS = ctags | ||
100 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
101 | ACLOCAL = @ACLOCAL@ | ||
102 | ALLOCA = @ALLOCA@ | ||
103 | AMTAR = @AMTAR@ | ||
104 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
105 | AR = @AR@ | ||
106 | AS = @AS@ | ||
107 | AUTOCONF = @AUTOCONF@ | ||
108 | AUTOHEADER = @AUTOHEADER@ | ||
109 | AUTOMAKE = @AUTOMAKE@ | ||
110 | AWK = @AWK@ | ||
111 | CC = @CC@ | ||
112 | CCDEPMODE = @CCDEPMODE@ | ||
113 | CFLAGS = @CFLAGS@ | ||
114 | CHECK_CFLAGS = @CHECK_CFLAGS@ | ||
115 | CHECK_LIBS = @CHECK_LIBS@ | ||
116 | CPP = @CPP@ | ||
117 | CPPFLAGS = @CPPFLAGS@ | ||
118 | CXX = @CXX@ | ||
119 | CXXCPP = @CXXCPP@ | ||
120 | CXXDEPMODE = @CXXDEPMODE@ | ||
121 | CXXFLAGS = @CXXFLAGS@ | ||
122 | CYGPATH_W = @CYGPATH_W@ | ||
123 | DEFS = @DEFS@ | ||
124 | DEPDIR = @DEPDIR@ | ||
125 | DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ | ||
126 | DIRECTFB_LIBS = @DIRECTFB_LIBS@ | ||
127 | DLLTOOL = @DLLTOOL@ | ||
128 | DSYMUTIL = @DSYMUTIL@ | ||
129 | DUMPBIN = @DUMPBIN@ | ||
130 | ECHO_C = @ECHO_C@ | ||
131 | ECHO_N = @ECHO_N@ | ||
132 | ECHO_T = @ECHO_T@ | ||
133 | ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ | ||
134 | ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ | ||
135 | EDB_CFLAGS = @EDB_CFLAGS@ | ||
136 | EDB_LIBS = @EDB_LIBS@ | ||
137 | EDJE_CFLAGS = @EDJE_CFLAGS@ | ||
138 | EDJE_LIBS = @EDJE_LIBS@ | ||
139 | EET_CFLAGS = @EET_CFLAGS@ | ||
140 | EET_LIBS = @EET_LIBS@ | ||
141 | EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ | ||
142 | EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ | ||
143 | EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ | ||
144 | EGREP = @EGREP@ | ||
145 | EINA_CFLAGS = @EINA_CFLAGS@ | ||
146 | EINA_LIBS = @EINA_LIBS@ | ||
147 | EVAS_CFLAGS = @EVAS_CFLAGS@ | ||
148 | EVAS_LIBS = @EVAS_LIBS@ | ||
149 | EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ | ||
150 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
151 | EVIL_LIBS = @EVIL_LIBS@ | ||
152 | EXEEXT = @EXEEXT@ | ||
153 | FGREP = @FGREP@ | ||
154 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ | ||
155 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ | ||
156 | FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ | ||
157 | FREETYPE_LIBS = @FREETYPE_LIBS@ | ||
158 | FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ | ||
159 | FRIBIDI_LIBS = @FRIBIDI_LIBS@ | ||
160 | GL_EET_CFLAGS = @GL_EET_CFLAGS@ | ||
161 | GL_EET_LIBS = @GL_EET_LIBS@ | ||
162 | GREP = @GREP@ | ||
163 | HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ | ||
164 | HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ | ||
165 | INSTALL = @INSTALL@ | ||
166 | INSTALL_DATA = @INSTALL_DATA@ | ||
167 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
168 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
169 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
170 | LD = @LD@ | ||
171 | LDFLAGS = @LDFLAGS@ | ||
172 | LIBOBJS = @LIBOBJS@ | ||
173 | LIBS = @LIBS@ | ||
174 | LIBTOOL = @LIBTOOL@ | ||
175 | LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ | ||
176 | LINEBREAK_LIBS = @LINEBREAK_LIBS@ | ||
177 | LIPO = @LIPO@ | ||
178 | LN_S = @LN_S@ | ||
179 | LTLIBOBJS = @LTLIBOBJS@ | ||
180 | MAKEINFO = @MAKEINFO@ | ||
181 | MKDIR_P = @MKDIR_P@ | ||
182 | MODULE_ARCH = @MODULE_ARCH@ | ||
183 | NM = @NM@ | ||
184 | NMEDIT = @NMEDIT@ | ||
185 | OBJC = @OBJC@ | ||
186 | OBJCDEPMODE = @OBJCDEPMODE@ | ||
187 | OBJCFLAGS = @OBJCFLAGS@ | ||
188 | OBJDUMP = @OBJDUMP@ | ||
189 | OBJEXT = @OBJEXT@ | ||
190 | OTOOL = @OTOOL@ | ||
191 | OTOOL64 = @OTOOL64@ | ||
192 | PACKAGE = @PACKAGE@ | ||
193 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
194 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
195 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
196 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
197 | PACKAGE_URL = @PACKAGE_URL@ | ||
198 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
199 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
200 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | ||
201 | PIXMAN_LIBS = @PIXMAN_LIBS@ | ||
202 | PKG_CONFIG = @PKG_CONFIG@ | ||
203 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
204 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
205 | PNG_CFLAGS = @PNG_CFLAGS@ | ||
206 | PNG_LIBS = @PNG_LIBS@ | ||
207 | RANLIB = @RANLIB@ | ||
208 | SDL_CFLAGS = @SDL_CFLAGS@ | ||
209 | SDL_LIBS = @SDL_LIBS@ | ||
210 | SED = @SED@ | ||
211 | SET_MAKE = @SET_MAKE@ | ||
212 | SHELL = @SHELL@ | ||
213 | SHM_OPEN_LINK = @SHM_OPEN_LINK@ | ||
214 | STRIP = @STRIP@ | ||
215 | SVG_CFLAGS = @SVG_CFLAGS@ | ||
216 | SVG_LIBS = @SVG_LIBS@ | ||
217 | VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ | ||
218 | VALGRIND_LIBS = @VALGRIND_LIBS@ | ||
219 | VERSION = @VERSION@ | ||
220 | VMAJ = @VMAJ@ | ||
221 | WIN32_CFLAGS = @WIN32_CFLAGS@ | ||
222 | WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ | ||
223 | XCB_CFLAGS = @XCB_CFLAGS@ | ||
224 | XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ | ||
225 | XCB_GL_LIBS = @XCB_GL_LIBS@ | ||
226 | XCB_LIBS = @XCB_LIBS@ | ||
227 | XEXT_CFLAGS = @XEXT_CFLAGS@ | ||
228 | XEXT_LIBS = @XEXT_LIBS@ | ||
229 | XMKMF = @XMKMF@ | ||
230 | X_CFLAGS = @X_CFLAGS@ | ||
231 | X_EXTRA_LIBS = @X_EXTRA_LIBS@ | ||
232 | X_LIBS = @X_LIBS@ | ||
233 | X_PRE_LIBS = @X_PRE_LIBS@ | ||
234 | abs_builddir = @abs_builddir@ | ||
235 | abs_srcdir = @abs_srcdir@ | ||
236 | abs_top_builddir = @abs_top_builddir@ | ||
237 | abs_top_srcdir = @abs_top_srcdir@ | ||
238 | ac_ct_CC = @ac_ct_CC@ | ||
239 | ac_ct_CXX = @ac_ct_CXX@ | ||
240 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
241 | ac_ct_OBJC = @ac_ct_OBJC@ | ||
242 | altivec_cflags = @altivec_cflags@ | ||
243 | am__include = @am__include@ | ||
244 | am__leading_dot = @am__leading_dot@ | ||
245 | am__quote = @am__quote@ | ||
246 | am__tar = @am__tar@ | ||
247 | am__untar = @am__untar@ | ||
248 | bindir = @bindir@ | ||
249 | build = @build@ | ||
250 | build_alias = @build_alias@ | ||
251 | build_cpu = @build_cpu@ | ||
252 | build_os = @build_os@ | ||
253 | build_vendor = @build_vendor@ | ||
254 | builddir = @builddir@ | ||
255 | datadir = @datadir@ | ||
256 | datarootdir = @datarootdir@ | ||
257 | dlopen_libs = @dlopen_libs@ | ||
258 | docdir = @docdir@ | ||
259 | dvidir = @dvidir@ | ||
260 | edje_cc = @edje_cc@ | ||
261 | efl_doxygen = @efl_doxygen@ | ||
262 | efl_have_doxygen = @efl_have_doxygen@ | ||
263 | evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ | ||
264 | evas_engine_buffer_libs = @evas_engine_buffer_libs@ | ||
265 | evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ | ||
266 | evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ | ||
267 | evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ | ||
268 | evas_engine_directfb_libs = @evas_engine_directfb_libs@ | ||
269 | evas_engine_fb_cflags = @evas_engine_fb_cflags@ | ||
270 | evas_engine_fb_libs = @evas_engine_fb_libs@ | ||
271 | evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ | ||
272 | evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ | ||
273 | evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ | ||
274 | evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ | ||
275 | evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ | ||
276 | evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ | ||
277 | evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ | ||
278 | evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ | ||
279 | evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ | ||
280 | evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ | ||
281 | evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ | ||
282 | evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ | ||
283 | evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ | ||
284 | evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ | ||
285 | evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ | ||
286 | evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ | ||
287 | evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ | ||
288 | evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ | ||
289 | evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ | ||
290 | evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ | ||
291 | evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ | ||
292 | evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ | ||
293 | evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ | ||
294 | evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ | ||
295 | evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ | ||
296 | evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ | ||
297 | evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ | ||
298 | evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ | ||
299 | evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ | ||
300 | evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ | ||
301 | evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ | ||
302 | evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ | ||
303 | evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ | ||
304 | evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ | ||
305 | evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ | ||
306 | evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ | ||
307 | evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ | ||
308 | evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ | ||
309 | evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ | ||
310 | evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ | ||
311 | evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ | ||
312 | evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ | ||
313 | evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ | ||
314 | evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ | ||
315 | evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ | ||
316 | evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ | ||
317 | evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ | ||
318 | evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ | ||
319 | evas_image_loader_png_libs = @evas_image_loader_png_libs@ | ||
320 | evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ | ||
321 | evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ | ||
322 | evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ | ||
323 | evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ | ||
324 | evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ | ||
325 | evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ | ||
326 | evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ | ||
327 | evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ | ||
328 | evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ | ||
329 | evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ | ||
330 | evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ | ||
331 | evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ | ||
332 | exec_prefix = @exec_prefix@ | ||
333 | have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ | ||
334 | have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ | ||
335 | have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ | ||
336 | have_evas_engine_software_x11 = @have_evas_engine_software_x11@ | ||
337 | have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ | ||
338 | have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ | ||
339 | have_lcov = @have_lcov@ | ||
340 | host = @host@ | ||
341 | host_alias = @host_alias@ | ||
342 | host_cpu = @host_cpu@ | ||
343 | host_os = @host_os@ | ||
344 | host_vendor = @host_vendor@ | ||
345 | htmldir = @htmldir@ | ||
346 | includedir = @includedir@ | ||
347 | infodir = @infodir@ | ||
348 | install_sh = @install_sh@ | ||
349 | libdir = @libdir@ | ||
350 | libexecdir = @libexecdir@ | ||
351 | localedir = @localedir@ | ||
352 | localstatedir = @localstatedir@ | ||
353 | lt_ECHO = @lt_ECHO@ | ||
354 | lt_enable_auto_import = @lt_enable_auto_import@ | ||
355 | mandir = @mandir@ | ||
356 | mkdir_p = @mkdir_p@ | ||
357 | oldincludedir = @oldincludedir@ | ||
358 | pdfdir = @pdfdir@ | ||
359 | pkgconfig_requires_private = @pkgconfig_requires_private@ | ||
360 | prefix = @prefix@ | ||
361 | program_transform_name = @program_transform_name@ | ||
362 | psdir = @psdir@ | ||
363 | pthread_cflags = @pthread_cflags@ | ||
364 | pthread_libs = @pthread_libs@ | ||
365 | release_info = @release_info@ | ||
366 | requirement_evas = @requirement_evas@ | ||
367 | sbindir = @sbindir@ | ||
368 | sharedstatedir = @sharedstatedir@ | ||
369 | srcdir = @srcdir@ | ||
370 | sysconfdir = @sysconfdir@ | ||
371 | target_alias = @target_alias@ | ||
372 | top_build_prefix = @top_build_prefix@ | ||
373 | top_builddir = @top_builddir@ | ||
374 | top_srcdir = @top_srcdir@ | ||
375 | version_info = @version_info@ | ||
376 | MAINTAINERCLEANFILES = Makefile.in | ||
377 | AM_CPPFLAGS = \ | ||
378 | -I. \ | ||
379 | -I$(top_srcdir)/src/lib \ | ||
380 | -I$(top_srcdir)/src/lib/include \ | ||
381 | @FREETYPE_CFLAGS@ \ | ||
382 | @PIXMAN_CFLAGS@ \ | ||
383 | @VALGRIND_CFLAGS@ \ | ||
384 | @EINA_CFLAGS@ \ | ||
385 | @EET_CFLAGS@ \ | ||
386 | @pthread_cflags@ | ||
387 | |||
388 | noinst_LTLIBRARIES = libevas_engine_common_8.la | ||
389 | libevas_engine_common_8_la_SOURCES = \ | ||
390 | evas_soft8_dither_mask.c \ | ||
391 | evas_soft8_font.c \ | ||
392 | evas_soft8_image_unscaled.c \ | ||
393 | evas_soft8_main.c \ | ||
394 | evas_soft8_rectangle.c \ | ||
395 | evas_soft8_line.c \ | ||
396 | evas_soft8_polygon.c \ | ||
397 | evas_soft8_image_scaled_sampled.c | ||
398 | |||
399 | libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h | ||
400 | EXTRA_DIST = \ | ||
401 | evas_soft8_scanline_blend.c \ | ||
402 | evas_soft8_scanline_fill.c | ||
403 | |||
404 | all: all-am | ||
405 | |||
406 | .SUFFIXES: | ||
407 | .SUFFIXES: .c .lo .o .obj | ||
408 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
409 | @for dep in $?; do \ | ||
410 | case '$(am__configure_deps)' in \ | ||
411 | *$$dep*) \ | ||
412 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
413 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
414 | exit 1;; \ | ||
415 | esac; \ | ||
416 | done; \ | ||
417 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile'; \ | ||
418 | $(am__cd) $(top_srcdir) && \ | ||
419 | $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile | ||
420 | .PRECIOUS: Makefile | ||
421 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
422 | @case '$?' in \ | ||
423 | *config.status*) \ | ||
424 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
425 | *) \ | ||
426 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
427 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
428 | esac; | ||
429 | |||
430 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
431 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
432 | |||
433 | $(top_srcdir)/configure: $(am__configure_deps) | ||
434 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
435 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
436 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
437 | $(am__aclocal_m4_deps): | ||
438 | |||
439 | clean-noinstLTLIBRARIES: | ||
440 | -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) | ||
441 | @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ | ||
442 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
443 | test "$$dir" != "$$p" || dir=.; \ | ||
444 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
445 | rm -f "$${dir}/so_locations"; \ | ||
446 | done | ||
447 | libevas_engine_common_8.la: $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_DEPENDENCIES) | ||
448 | $(AM_V_CCLD)$(LINK) $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_LIBADD) $(LIBS) | ||
449 | |||
450 | mostlyclean-compile: | ||
451 | -rm -f *.$(OBJEXT) | ||
452 | |||
453 | distclean-compile: | ||
454 | -rm -f *.tab.c | ||
455 | |||
456 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_dither_mask.Plo@am__quote@ | ||
457 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_font.Plo@am__quote@ | ||
458 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_scaled_sampled.Plo@am__quote@ | ||
459 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_unscaled.Plo@am__quote@ | ||
460 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_line.Plo@am__quote@ | ||
461 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_main.Plo@am__quote@ | ||
462 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_polygon.Plo@am__quote@ | ||
463 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_rectangle.Plo@am__quote@ | ||
464 | |||
465 | .c.o: | ||
466 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
467 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
468 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
469 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
470 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
471 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
472 | |||
473 | .c.obj: | ||
474 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
475 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
476 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
477 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
478 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
479 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
480 | |||
481 | .c.lo: | ||
482 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
483 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
484 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
485 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
486 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
487 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
488 | |||
489 | mostlyclean-libtool: | ||
490 | -rm -f *.lo | ||
491 | |||
492 | clean-libtool: | ||
493 | -rm -rf .libs _libs | ||
494 | |||
495 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
496 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
497 | unique=`for i in $$list; do \ | ||
498 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
499 | done | \ | ||
500 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
501 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
502 | mkid -fID $$unique | ||
503 | tags: TAGS | ||
504 | |||
505 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
506 | $(TAGS_FILES) $(LISP) | ||
507 | set x; \ | ||
508 | here=`pwd`; \ | ||
509 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
510 | unique=`for i in $$list; do \ | ||
511 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
512 | done | \ | ||
513 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
514 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
515 | shift; \ | ||
516 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
517 | test -n "$$unique" || unique=$$empty_fix; \ | ||
518 | if test $$# -gt 0; then \ | ||
519 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
520 | "$$@" $$unique; \ | ||
521 | else \ | ||
522 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
523 | $$unique; \ | ||
524 | fi; \ | ||
525 | fi | ||
526 | ctags: CTAGS | ||
527 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
528 | $(TAGS_FILES) $(LISP) | ||
529 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
530 | unique=`for i in $$list; do \ | ||
531 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
532 | done | \ | ||
533 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
534 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
535 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
536 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
537 | $$unique | ||
538 | |||
539 | GTAGS: | ||
540 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
541 | && $(am__cd) $(top_srcdir) \ | ||
542 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
543 | |||
544 | distclean-tags: | ||
545 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
546 | |||
547 | distdir: $(DISTFILES) | ||
548 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
549 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
550 | list='$(DISTFILES)'; \ | ||
551 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
552 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
553 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
554 | case $$dist_files in \ | ||
555 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
556 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
557 | sort -u` ;; \ | ||
558 | esac; \ | ||
559 | for file in $$dist_files; do \ | ||
560 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
561 | if test -d $$d/$$file; then \ | ||
562 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
563 | if test -d "$(distdir)/$$file"; then \ | ||
564 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
565 | fi; \ | ||
566 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
567 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
568 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
569 | fi; \ | ||
570 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
571 | else \ | ||
572 | test -f "$(distdir)/$$file" \ | ||
573 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
574 | || exit 1; \ | ||
575 | fi; \ | ||
576 | done | ||
577 | check-am: all-am | ||
578 | check: check-am | ||
579 | all-am: Makefile $(LTLIBRARIES) | ||
580 | installdirs: | ||
581 | install: install-am | ||
582 | install-exec: install-exec-am | ||
583 | install-data: install-data-am | ||
584 | uninstall: uninstall-am | ||
585 | |||
586 | install-am: all-am | ||
587 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
588 | |||
589 | installcheck: installcheck-am | ||
590 | install-strip: | ||
591 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
592 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
593 | `test -z '$(STRIP)' || \ | ||
594 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
595 | mostlyclean-generic: | ||
596 | |||
597 | clean-generic: | ||
598 | |||
599 | distclean-generic: | ||
600 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
601 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
602 | |||
603 | maintainer-clean-generic: | ||
604 | @echo "This command is intended for maintainers to use" | ||
605 | @echo "it deletes files that may require special tools to rebuild." | ||
606 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
607 | clean: clean-am | ||
608 | |||
609 | clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ | ||
610 | mostlyclean-am | ||
611 | |||
612 | distclean: distclean-am | ||
613 | -rm -rf ./$(DEPDIR) | ||
614 | -rm -f Makefile | ||
615 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
616 | distclean-tags | ||
617 | |||
618 | dvi: dvi-am | ||
619 | |||
620 | dvi-am: | ||
621 | |||
622 | html: html-am | ||
623 | |||
624 | html-am: | ||
625 | |||
626 | info: info-am | ||
627 | |||
628 | info-am: | ||
629 | |||
630 | install-data-am: | ||
631 | |||
632 | install-dvi: install-dvi-am | ||
633 | |||
634 | install-dvi-am: | ||
635 | |||
636 | install-exec-am: | ||
637 | |||
638 | install-html: install-html-am | ||
639 | |||
640 | install-html-am: | ||
641 | |||
642 | install-info: install-info-am | ||
643 | |||
644 | install-info-am: | ||
645 | |||
646 | install-man: | ||
647 | |||
648 | install-pdf: install-pdf-am | ||
649 | |||
650 | install-pdf-am: | ||
651 | |||
652 | install-ps: install-ps-am | ||
653 | |||
654 | install-ps-am: | ||
655 | |||
656 | installcheck-am: | ||
657 | |||
658 | maintainer-clean: maintainer-clean-am | ||
659 | -rm -rf ./$(DEPDIR) | ||
660 | -rm -f Makefile | ||
661 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
662 | |||
663 | mostlyclean: mostlyclean-am | ||
664 | |||
665 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
666 | mostlyclean-libtool | ||
667 | |||
668 | pdf: pdf-am | ||
669 | |||
670 | pdf-am: | ||
671 | |||
672 | ps: ps-am | ||
673 | |||
674 | ps-am: | ||
675 | |||
676 | uninstall-am: | ||
677 | |||
678 | .MAKE: install-am install-strip | ||
679 | |||
680 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
681 | clean-libtool clean-noinstLTLIBRARIES ctags distclean \ | ||
682 | distclean-compile distclean-generic distclean-libtool \ | ||
683 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
684 | install install-am install-data install-data-am install-dvi \ | ||
685 | install-dvi-am install-exec install-exec-am install-html \ | ||
686 | install-html-am install-info install-info-am install-man \ | ||
687 | install-pdf install-pdf-am install-ps install-ps-am \ | ||
688 | install-strip installcheck installcheck-am installdirs \ | ||
689 | maintainer-clean maintainer-clean-generic mostlyclean \ | ||
690 | mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ | ||
691 | pdf pdf-am ps ps-am tags uninstall uninstall-am | ||
692 | |||
693 | |||
694 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
695 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
696 | .NOEXPORT: | ||
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c new file mode 100644 index 0000000..c1f3c14 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c | |||
@@ -0,0 +1,100 @@ | |||
1 | #include "evas_common_soft8.h" | ||
2 | |||
3 | EFL_ALWAYS_INLINE void | ||
4 | _soft8_convert_from_rgba_pt(const DATA32 * src, DATA8 * dst, DATA8 * alpha) | ||
5 | { | ||
6 | if (A_VAL(src) == 0) | ||
7 | { | ||
8 | *dst = 0; | ||
9 | *alpha = 0; | ||
10 | } | ||
11 | else | ||
12 | { | ||
13 | *dst = GRY_8_FROM_RGB(src); | ||
14 | *alpha = A_VAL(src); | ||
15 | } | ||
16 | } | ||
17 | |||
18 | static inline void | ||
19 | _soft8_convert_from_rgba_scanline(const DATA32 * src, DATA8 * dst, | ||
20 | DATA8 * alpha, const int w) | ||
21 | { | ||
22 | int x, m; | ||
23 | |||
24 | m = (w & ~7); | ||
25 | x = 0; | ||
26 | pld(src, 0); | ||
27 | |||
28 | while (x < m) | ||
29 | { | ||
30 | pld(src, 32); | ||
31 | UNROLL8( | ||
32 | { | ||
33 | _soft8_convert_from_rgba_pt(src, dst, alpha); | ||
34 | src++; dst++; alpha++; x++;} | ||
35 | ); | ||
36 | } | ||
37 | |||
38 | for (; x < w; x++, src++, dst++, alpha++) | ||
39 | _soft8_convert_from_rgba_pt(src, dst, alpha); | ||
40 | } | ||
41 | |||
42 | void | ||
43 | evas_common_soft8_image_convert_from_rgba(Soft8_Image * im, const DATA32 * src) | ||
44 | { | ||
45 | const DATA32 *sp; | ||
46 | DATA8 *dp; | ||
47 | DATA8 *ap; | ||
48 | unsigned int y; | ||
49 | |||
50 | sp = src; | ||
51 | dp = im->pixels; | ||
52 | ap = im->alpha; | ||
53 | |||
54 | for (y = 0; y < im->cache_entry.h; | ||
55 | y++, sp += im->cache_entry.w, dp += im->stride, ap += im->stride) | ||
56 | _soft8_convert_from_rgba_scanline(sp, dp, ap, im->cache_entry.w); | ||
57 | } | ||
58 | |||
59 | EFL_ALWAYS_INLINE void | ||
60 | _soft8_convert_from_rgb_pt(const DATA32 * src, DATA8 * dst) | ||
61 | { | ||
62 | *dst = GRY_8_FROM_RGB(src); | ||
63 | } | ||
64 | |||
65 | static inline void | ||
66 | _soft8_convert_from_rgb_scanline(const DATA32 * src, DATA8 * dst, const int w) | ||
67 | { | ||
68 | int x, m; | ||
69 | |||
70 | m = (w & ~7); | ||
71 | x = 0; | ||
72 | pld(src, 0); | ||
73 | |||
74 | while (x < m) | ||
75 | { | ||
76 | pld(src, 32); | ||
77 | UNROLL8( | ||
78 | { | ||
79 | _soft8_convert_from_rgb_pt(src, dst); src++; dst++; x++;} | ||
80 | ); | ||
81 | } | ||
82 | |||
83 | for (; x < w; x++, src++, dst++) | ||
84 | _soft8_convert_from_rgb_pt(src, dst); | ||
85 | } | ||
86 | |||
87 | void | ||
88 | evas_common_soft8_image_convert_from_rgb(Soft8_Image * im, const DATA32 * src) | ||
89 | { | ||
90 | const DATA32 *sp; | ||
91 | DATA8 *dp; | ||
92 | unsigned int y; | ||
93 | |||
94 | sp = src; | ||
95 | dp = im->pixels; | ||
96 | |||
97 | for (y = 0; y < im->cache_entry.h; | ||
98 | y++, sp += im->cache_entry.w, dp += im->stride) | ||
99 | _soft8_convert_from_rgb_scanline(sp, dp, im->cache_entry.w); | ||
100 | } | ||
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_font.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_font.c new file mode 100644 index 0000000..8f69b86 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_font.c | |||
@@ -0,0 +1,285 @@ | |||
1 | #include "evas_common_soft8.h" | ||
2 | #include "evas_soft8_scanline_blend.c" | ||
3 | |||
4 | EFL_ALWAYS_INLINE void | ||
5 | _glyph_pt_mask_solid_solid(DATA8 * dst, const DATA8 gry8, const DATA8 * mask) | ||
6 | { | ||
7 | DATA8 alpha = *mask; | ||
8 | |||
9 | if (alpha == 0xff) | ||
10 | *dst = gry8; | ||
11 | else if (alpha > 0) | ||
12 | { | ||
13 | *dst = GRY_8_BLEND_UNMUL(gry8, *dst, alpha); | ||
14 | } | ||
15 | } | ||
16 | |||
17 | static void | ||
18 | _glyph_scanline_mask_solid_solid(DATA8 * dst, | ||
19 | int size, const DATA8 gry8, const DATA8 * mask) | ||
20 | { | ||
21 | DATA8 *start, *end; | ||
22 | |||
23 | start = dst; | ||
24 | pld(start, 0); | ||
25 | pld(mask, 0); | ||
26 | end = start + (size & ~3); | ||
27 | |||
28 | while (start < end) | ||
29 | { | ||
30 | pld(start, 8); | ||
31 | pld(mask, 4); | ||
32 | UNROLL4( | ||
33 | { | ||
34 | _glyph_pt_mask_solid_solid(start, gry8, mask); | ||
35 | start++; mask++;} | ||
36 | ); | ||
37 | } | ||
38 | |||
39 | end = start + (size & 3); | ||
40 | for (; start < end; start++, mask++) | ||
41 | _glyph_pt_mask_solid_solid(start, gry8, mask); | ||
42 | } | ||
43 | |||
44 | EFL_ALWAYS_INLINE void | ||
45 | _glyph_pt_mask_transp_solid(DATA8 * dst, | ||
46 | DATA8 gry8, DATA8 alpha, const DATA8 * mask) | ||
47 | { | ||
48 | int rel_alpha; | ||
49 | |||
50 | rel_alpha = *mask; | ||
51 | alpha = (alpha * rel_alpha) >> 8; | ||
52 | if (alpha == 0) | ||
53 | return; | ||
54 | |||
55 | alpha++; | ||
56 | |||
57 | *dst = GRY_8_BLEND((gry8 * rel_alpha) >> 8, *dst, alpha); | ||
58 | } | ||
59 | |||
60 | static void | ||
61 | _glyph_scanline_mask_transp_solid(DATA8 * dst, | ||
62 | int size, | ||
63 | const DATA8 gry8, | ||
64 | const DATA8 rel_alpha, const DATA8 * mask) | ||
65 | { | ||
66 | DATA8 *start, *end; | ||
67 | |||
68 | start = dst; | ||
69 | pld(start, 0); | ||
70 | pld(mask, 0); | ||
71 | end = start + (size & ~3); | ||
72 | |||
73 | while (start < end) | ||
74 | { | ||
75 | pld(start, 8); | ||
76 | pld(mask, 4); | ||
77 | UNROLL4( | ||
78 | { | ||
79 | _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask); | ||
80 | start++; mask++;} | ||
81 | ); | ||
82 | } | ||
83 | |||
84 | end = start + (size & 3); | ||
85 | for (; start < end; start++, mask++) | ||
86 | _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask); | ||
87 | } | ||
88 | |||
89 | static inline void | ||
90 | _calc_ext(const Soft8_Image * dst, const RGBA_Draw_Context * dc, | ||
91 | Eina_Rectangle * ext) | ||
92 | { | ||
93 | EINA_RECTANGLE_SET(ext, 0, 0, dst->cache_entry.w, dst->cache_entry.h); | ||
94 | |||
95 | if (dc->clip.use) | ||
96 | { | ||
97 | int v; | ||
98 | |||
99 | EINA_RECTANGLE_SET(ext, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); | ||
100 | if (ext->x < 0) | ||
101 | { | ||
102 | ext->w += ext->x; | ||
103 | ext->x = 0; | ||
104 | } | ||
105 | if (ext->y < 0) | ||
106 | { | ||
107 | ext->h += ext->y; | ||
108 | ext->y = 0; | ||
109 | } | ||
110 | |||
111 | v = dst->cache_entry.w - ext->x; | ||
112 | if (ext->w > v) | ||
113 | ext->w = v; | ||
114 | |||
115 | v = dst->cache_entry.h - ext->y; | ||
116 | if (ext->h > v) | ||
117 | ext->h = v; | ||
118 | } | ||
119 | } | ||
120 | |||
121 | static inline void | ||
122 | _glyph_scanline(Soft8_Image * dst, const DATA8 * p_mask, | ||
123 | const Eina_Rectangle ext, int dx, int dy, int max_x, int max_y, | ||
124 | int w, DATA8 alpha, const DATA8 gry8) | ||
125 | { | ||
126 | int size, in_x, in_w; | ||
127 | DATA8 *p_pixels; | ||
128 | |||
129 | if ((dx >= max_x) || (dy < ext.y) || (dy >= max_y)) | ||
130 | return; | ||
131 | |||
132 | in_x = 0; | ||
133 | in_w = 0; | ||
134 | |||
135 | if (dx + w > max_x) | ||
136 | in_w += (dx + w) - max_x; | ||
137 | |||
138 | if (dx < ext.x) | ||
139 | { | ||
140 | in_w += ext.x - dx; | ||
141 | in_x = ext.x - dx; | ||
142 | dx = ext.x; | ||
143 | } | ||
144 | |||
145 | size = w - in_w; | ||
146 | p_pixels = dst->pixels + (dy * dst->stride) + dx; | ||
147 | p_mask += in_x; | ||
148 | |||
149 | if (size > 1) | ||
150 | { | ||
151 | if (alpha == 0xff) | ||
152 | _glyph_scanline_mask_solid_solid(p_pixels, size, gry8, p_mask); | ||
153 | else if (alpha != 0) | ||
154 | _glyph_scanline_mask_transp_solid | ||
155 | (p_pixels, size, gry8, alpha, p_mask); | ||
156 | } | ||
157 | else if (size == 1) | ||
158 | { | ||
159 | if (alpha == 0xff) | ||
160 | _glyph_pt_mask_solid_solid(p_pixels, gry8, p_mask); | ||
161 | else if (alpha != 0) | ||
162 | _glyph_pt_mask_transp_solid(p_pixels, gry8, alpha, p_mask); | ||
163 | } | ||
164 | } | ||
165 | |||
166 | static void | ||
167 | _soft8_font_glyph_draw_grayscale(Soft8_Image * dst, | ||
168 | RGBA_Draw_Context * dc __UNUSED__, | ||
169 | RGBA_Font_Glyph * fg __UNUSED__, int x, int y, | ||
170 | DATA8 alpha, DATA8 gry8, | ||
171 | const Eina_Rectangle ext, int bw, int bh, | ||
172 | int bpitch, const DATA8 * bitmap) | ||
173 | { | ||
174 | int i, max_x, max_y; | ||
175 | |||
176 | max_x = ext.x + ext.w; | ||
177 | max_y = ext.y + ext.h; | ||
178 | |||
179 | for (i = 0; i < bh; i++, bitmap += bpitch) | ||
180 | _glyph_scanline(dst, bitmap, ext, x, y + i, max_x, max_y, bw, | ||
181 | alpha, gry8); | ||
182 | } | ||
183 | |||
184 | static inline void | ||
185 | _glyph_create_mask_line(DATA8 * mask, const DATA8 * bitmap, int w) | ||
186 | { | ||
187 | const DATA8 bitrepl[2] = { 0x0, 0xff }; | ||
188 | int i; | ||
189 | |||
190 | for (i = 0; i < w; i += 8, bitmap++) | ||
191 | { | ||
192 | int j, size; | ||
193 | DATA32 bits; | ||
194 | |||
195 | if (i + 8 < w) | ||
196 | size = 8; | ||
197 | else | ||
198 | size = w - i; | ||
199 | |||
200 | bits = *bitmap; | ||
201 | |||
202 | for (j = size - 1; j >= 0; j--, mask++) | ||
203 | *mask = bitrepl[(bits >> j) & 0x1]; | ||
204 | } | ||
205 | } | ||
206 | |||
207 | static void | ||
208 | _soft8_font_glyph_draw_mono(Soft8_Image * dst, | ||
209 | RGBA_Draw_Context * dc __UNUSED__, | ||
210 | RGBA_Font_Glyph * fg __UNUSED__, int x, int y, | ||
211 | DATA8 alpha, DATA8 gry8, const Eina_Rectangle ext, | ||
212 | int bw, int bh, int bpitch, const DATA8 * bitmap) | ||
213 | { | ||
214 | DATA8 *mask; | ||
215 | int i, max_x, max_y; | ||
216 | |||
217 | max_x = ext.x + ext.w; | ||
218 | max_y = ext.y + ext.h; | ||
219 | |||
220 | mask = alloca(bpitch); | ||
221 | for (i = 0; i < bh; i++, bitmap += bpitch) | ||
222 | { | ||
223 | _glyph_create_mask_line(mask, bitmap, bw); | ||
224 | _glyph_scanline(dst, mask, ext, x, y + i, max_x, max_y, bw, | ||
225 | alpha, gry8); | ||
226 | } | ||
227 | } | ||
228 | |||
229 | void | ||
230 | evas_common_soft8_font_glyph_draw(void *data, void *dest __UNUSED__, void *context, | ||
231 | RGBA_Font_Glyph * fg, int x, int y) | ||
232 | { | ||
233 | Soft8_Image *dst; | ||
234 | RGBA_Draw_Context *dc; | ||
235 | const DATA8 *bitmap; | ||
236 | DATA8 alpha; // r, g, b | ||
237 | DATA8 gry8; | ||
238 | Eina_Rectangle ext; | ||
239 | int bpitch, bw, bh; | ||
240 | |||
241 | dst = data; | ||
242 | dc = context; | ||
243 | |||
244 | alpha = A_VAL(&dc->col.col); | ||
245 | if (alpha == 0) | ||
246 | return; | ||
247 | |||
248 | gry8 = GRY_8_FROM_RGB(&dc->col.col); | ||
249 | |||
250 | /* | ||
251 | * if (r > alpha) r = alpha; | ||
252 | * if (g > alpha) g = alpha; | ||
253 | * if (b > alpha) b = alpha; | ||
254 | * | ||
255 | * gry8 = GRY_8_FROM_COMPONENTS(r, g, b); | ||
256 | */ | ||
257 | |||
258 | bitmap = fg->glyph_out->bitmap.buffer; | ||
259 | bh = fg->glyph_out->bitmap.rows; | ||
260 | bw = fg->glyph_out->bitmap.width; | ||
261 | bpitch = fg->glyph_out->bitmap.pitch; | ||
262 | if (bpitch < bw) | ||
263 | bpitch = bw; | ||
264 | |||
265 | _calc_ext(dst, dc, &ext); | ||
266 | |||
267 | if ((fg->glyph_out->bitmap.num_grays == 256) && | ||
268 | (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays)) | ||
269 | _soft8_font_glyph_draw_grayscale(dst, dc, fg, x, y, alpha, gry8, | ||
270 | ext, bw, bh, bpitch, bitmap); | ||
271 | else | ||
272 | _soft8_font_glyph_draw_mono(dst, dc, fg, x, y, alpha, gry8, | ||
273 | ext, bw, bh, bpitch, bitmap); | ||
274 | } | ||
275 | |||
276 | void * | ||
277 | evas_common_soft8_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph * fg __UNUSED__) | ||
278 | { | ||
279 | return (void *)1; /* core requires != NULL to work */ | ||
280 | } | ||
281 | |||
282 | void | ||
283 | evas_common_soft8_font_glyph_free(void *ext_dat __UNUSED__) | ||
284 | { | ||
285 | } | ||
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c new file mode 100644 index 0000000..7344263 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c | |||
@@ -0,0 +1,463 @@ | |||
1 | #include "evas_common_soft8.h" | ||
2 | #include "evas_soft8_scanline_blend.c" | ||
3 | |||
4 | static void | ||
5 | _soft8_image_draw_scaled_solid_solid(Soft8_Image * src, | ||
6 | Soft8_Image * dst, | ||
7 | RGBA_Draw_Context * dc __UNUSED__, | ||
8 | int dst_offset, int w, int h, | ||
9 | int *offset_x, int *offset_y) | ||
10 | { | ||
11 | DATA8 *dst_itr; | ||
12 | int y, w_align; | ||
13 | |||
14 | w_align = w & ~7; | ||
15 | |||
16 | dst_itr = dst->pixels + dst_offset; | ||
17 | for (y = 0; y < h; y++, dst_itr += dst->stride) | ||
18 | { | ||
19 | DATA8 *d, *s; | ||
20 | int x; | ||
21 | |||
22 | s = src->pixels + offset_y[y]; | ||
23 | pld(s, 0); | ||
24 | pld(offset_x, 0); | ||
25 | |||
26 | d = dst_itr; | ||
27 | x = 0; | ||
28 | while (x < w_align) | ||
29 | { | ||
30 | pld(s, 32); | ||
31 | pld(offset_x + x, 32); | ||
32 | |||
33 | UNROLL8( | ||
34 | { | ||
35 | _soft8_pt_blend_solid_solid(d, s[offset_x[x]]); x++; d++;} | ||
36 | ); | ||
37 | } | ||
38 | |||
39 | for (; x < w; x++, d++) | ||
40 | _soft8_pt_blend_solid_solid(d, s[offset_x[x]]); | ||
41 | } | ||
42 | } | ||
43 | static void | ||
44 | _soft8_image_draw_scaled_transp_solid(Soft8_Image * src, | ||
45 | Soft8_Image * dst, | ||
46 | RGBA_Draw_Context * dc __UNUSED__, | ||
47 | int dst_offset, int w, int h, | ||
48 | int *offset_x, int *offset_y) | ||
49 | { | ||
50 | DATA8 *dst_itr; | ||
51 | int y, w_align; | ||
52 | |||
53 | w_align = w & ~7; | ||
54 | |||
55 | dst_itr = dst->pixels + dst_offset; | ||
56 | for (y = 0; y < h; y++, dst_itr += dst->stride) | ||
57 | { | ||
58 | DATA8 *d, *s; | ||
59 | DATA8 *a; | ||
60 | int x; | ||
61 | |||
62 | s = src->pixels + offset_y[y]; | ||
63 | a = src->alpha + offset_y[y]; | ||
64 | pld(s, 0); | ||
65 | pld(a, 0); | ||
66 | pld(offset_x, 0); | ||
67 | |||
68 | d = dst_itr; | ||
69 | x = 0; | ||
70 | while (x < w_align) | ||
71 | { | ||
72 | pld(s, 32); | ||
73 | pld(a, 8); | ||
74 | pld(offset_x + x, 32); | ||
75 | |||
76 | UNROLL8( | ||
77 | { | ||
78 | int off_x = offset_x[x]; | ||
79 | _soft8_pt_blend_transp_solid(d, s[off_x], a[off_x]); | ||
80 | x++; d++;}); | ||
81 | } | ||
82 | |||
83 | for (; x < w; x++, d++) | ||
84 | _soft8_pt_blend_transp_solid(d, s[offset_x[x]], a[offset_x[x]]); | ||
85 | } | ||
86 | } | ||
87 | |||
88 | static inline void | ||
89 | _soft8_image_draw_scaled_no_mul(Soft8_Image * src, Soft8_Image * dst, | ||
90 | RGBA_Draw_Context * dc, | ||
91 | int dst_offset, int w, int h, | ||
92 | int *offset_x, int *offset_y) | ||
93 | { | ||
94 | if ((src->cache_entry.flags.alpha && src->alpha) && | ||
95 | (!dst->cache_entry.flags.alpha)) | ||
96 | _soft8_image_draw_scaled_transp_solid | ||
97 | (src, dst, dc, dst_offset, w, h, offset_x, offset_y); | ||
98 | else if (!dst->cache_entry.flags.alpha) | ||
99 | _soft8_image_draw_scaled_solid_solid | ||
100 | (src, dst, dc, dst_offset, w, h, offset_x, offset_y); | ||
101 | else | ||
102 | ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " | ||
103 | "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", | ||
104 | src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); | ||
105 | } | ||
106 | |||
107 | static void | ||
108 | _soft8_image_draw_scaled_solid_solid_mul_alpha(Soft8_Image * src, | ||
109 | Soft8_Image * dst, | ||
110 | RGBA_Draw_Context * | ||
111 | dc __UNUSED__, int dst_offset, | ||
112 | int w, int h, int *offset_x, | ||
113 | int *offset_y, DATA8 alpha) | ||
114 | { | ||
115 | DATA8 *dst_itr; | ||
116 | int y, w_align; | ||
117 | |||
118 | w_align = w & ~7; | ||
119 | |||
120 | dst_itr = dst->pixels + dst_offset; | ||
121 | for (y = 0; y < h; y++, dst_itr += dst->stride) | ||
122 | { | ||
123 | DATA8 *d, *s; | ||
124 | int x; | ||
125 | |||
126 | s = src->pixels + offset_y[y]; | ||
127 | pld(s, 0); | ||
128 | pld(offset_x, 0); | ||
129 | |||
130 | d = dst_itr; | ||
131 | x = 0; | ||
132 | while (x < w_align) | ||
133 | { | ||
134 | pld(s, 32); | ||
135 | pld(offset_x + x, 32); | ||
136 | |||
137 | UNROLL8( | ||
138 | { | ||
139 | _soft8_pt_blend_solid_solid_mul_alpha | ||
140 | (d, s[offset_x[x]], alpha); x++; d++;} | ||
141 | ); | ||
142 | } | ||
143 | |||
144 | for (; x < w; x++, d++) | ||
145 | _soft8_pt_blend_solid_solid_mul_alpha(d, s[offset_x[x]], alpha); | ||
146 | } | ||
147 | } | ||
148 | |||
149 | static void | ||
150 | _soft8_image_draw_scaled_transp_solid_mul_alpha(Soft8_Image * src, | ||
151 | Soft8_Image * dst, | ||
152 | RGBA_Draw_Context * | ||
153 | dc __UNUSED__, int dst_offset, | ||
154 | int w, int h, int *offset_x, | ||
155 | int *offset_y, DATA8 alpha) | ||
156 | { | ||
157 | DATA8 *dst_itr; | ||
158 | int y, w_align; | ||
159 | |||
160 | w_align = w & ~7; | ||
161 | |||
162 | dst_itr = dst->pixels + dst_offset; | ||
163 | for (y = 0; y < h; y++, dst_itr += dst->stride) | ||
164 | { | ||
165 | DATA8 *d, *s; | ||
166 | DATA8 *a; | ||
167 | int x; | ||
168 | |||
169 | s = src->pixels + offset_y[y]; | ||
170 | a = src->alpha + offset_y[y]; | ||
171 | pld(s, 0); | ||
172 | pld(a, 0); | ||
173 | pld(offset_x, 0); | ||
174 | |||
175 | d = dst_itr; | ||
176 | x = 0; | ||
177 | while (x < w_align) | ||
178 | { | ||
179 | pld(s, 32); | ||
180 | pld(a, 8); | ||
181 | pld(offset_x + x, 32); | ||
182 | |||
183 | UNROLL8( | ||
184 | { | ||
185 | int off_x = offset_x[x]; | ||
186 | _soft8_pt_blend_transp_solid_mul_alpha | ||
187 | (d, s[off_x], a[off_x], alpha); x++; d++;}); | ||
188 | } | ||
189 | |||
190 | for (; x < w; x++, d++) | ||
191 | _soft8_pt_blend_transp_solid_mul_alpha | ||
192 | (d, s[offset_x[x]], a[offset_x[x]], alpha); | ||
193 | } | ||
194 | } | ||
195 | |||
196 | static inline void | ||
197 | _soft8_image_draw_scaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst, | ||
198 | RGBA_Draw_Context * dc, | ||
199 | int dst_offset, int w, int h, | ||
200 | int *offset_x, int *offset_y, DATA8 a) | ||
201 | { | ||
202 | if ((src->cache_entry.flags.alpha && src->alpha) && | ||
203 | (!dst->cache_entry.flags.alpha)) | ||
204 | _soft8_image_draw_scaled_transp_solid_mul_alpha | ||
205 | (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); | ||
206 | else if (!dst->cache_entry.flags.alpha) | ||
207 | _soft8_image_draw_scaled_solid_solid_mul_alpha | ||
208 | (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); | ||
209 | else | ||
210 | ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " | ||
211 | "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", | ||
212 | src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, | ||
213 | A_VAL(&dc->mul.col)); | ||
214 | } | ||
215 | |||
216 | static void | ||
217 | _soft8_image_draw_scaled_solid_solid_mul_color(Soft8_Image * src, | ||
218 | Soft8_Image * dst, | ||
219 | RGBA_Draw_Context * | ||
220 | dc __UNUSED__, int dst_offset, | ||
221 | int w, int h, int *offset_x, | ||
222 | int *offset_y, DATA8 r, DATA8 g, | ||
223 | DATA8 b, DATA8 alpha) | ||
224 | { | ||
225 | DATA8 *dst_itr; | ||
226 | int y, w_align; | ||
227 | |||
228 | w_align = w & ~7; | ||
229 | |||
230 | dst_itr = dst->pixels + dst_offset; | ||
231 | |||
232 | if (alpha == 0xff) | ||
233 | for (y = 0; y < h; y++, dst_itr += dst->stride) | ||
234 | { | ||
235 | DATA8 *d, *s; | ||
236 | int x; | ||
237 | |||
238 | s = src->pixels + offset_y[y]; | ||
239 | pld(s, 0); | ||
240 | pld(offset_x, 0); | ||
241 | |||
242 | d = dst_itr; | ||
243 | x = 0; | ||
244 | while (x < w_align) | ||
245 | { | ||
246 | pld(s, 32); | ||
247 | pld(offset_x + x, 32); | ||
248 | |||
249 | UNROLL8( | ||
250 | { | ||
251 | _soft8_pt_blend_solid_solid_mul_color_solid | ||
252 | (d, s[offset_x[x]], r, g, b); x++; d++;} | ||
253 | ); | ||
254 | } | ||
255 | |||
256 | for (; x < w; x++, d++) | ||
257 | _soft8_pt_blend_solid_solid_mul_color_solid | ||
258 | (d, s[offset_x[x]], r, g, b); | ||
259 | } | ||
260 | else | ||
261 | for (y = 0; y < h; y++, dst_itr += dst->stride) | ||
262 | { | ||
263 | DATA8 *d, *s; | ||
264 | int x; | ||
265 | |||
266 | s = src->pixels + offset_y[y]; | ||
267 | pld(s, 0); | ||
268 | pld(offset_x, 0); | ||
269 | |||
270 | d = dst_itr; | ||
271 | x = 0; | ||
272 | while (x < w_align) | ||
273 | { | ||
274 | pld(s, 32); | ||
275 | pld(offset_x + x, 32); | ||
276 | |||
277 | UNROLL8( | ||
278 | { | ||
279 | _soft8_pt_blend_solid_solid_mul_color_transp | ||
280 | (d, s[offset_x[x]], alpha, r, g, b); x++; d++;} | ||
281 | ); | ||
282 | } | ||
283 | |||
284 | for (; x < w; x++, d++) | ||
285 | _soft8_pt_blend_solid_solid_mul_color_transp | ||
286 | (d, s[offset_x[x]], alpha, r, g, b); | ||
287 | } | ||
288 | } | ||
289 | |||
290 | static void | ||
291 | _soft8_image_draw_scaled_transp_solid_mul_color(Soft8_Image * src, | ||
292 | Soft8_Image * dst, | ||
293 | RGBA_Draw_Context * | ||
294 | dc __UNUSED__, int dst_offset, | ||
295 | int w, int h, int *offset_x, | ||
296 | int *offset_y, DATA8 r, DATA8 g, | ||
297 | DATA8 b, DATA8 alpha) | ||
298 | { | ||
299 | DATA8 *dst_itr; | ||
300 | int y, w_align; | ||
301 | |||
302 | w_align = w & ~7; | ||
303 | |||
304 | dst_itr = dst->pixels + dst_offset; | ||
305 | |||
306 | if (alpha == 0xff) | ||
307 | for (y = 0; y < h; y++, dst_itr += dst->stride) | ||
308 | { | ||
309 | DATA8 *d, *s; | ||
310 | DATA8 *a; | ||
311 | int x; | ||
312 | |||
313 | s = src->pixels + offset_y[y]; | ||
314 | a = src->alpha + offset_y[y]; | ||
315 | pld(s, 0); | ||
316 | pld(a, 0); | ||
317 | pld(offset_x, 0); | ||
318 | |||
319 | d = dst_itr; | ||
320 | x = 0; | ||
321 | while (x < w_align) | ||
322 | { | ||
323 | pld(s, 32); | ||
324 | pld(a, 8); | ||
325 | pld(offset_x + x, 32); | ||
326 | |||
327 | UNROLL8( | ||
328 | { | ||
329 | int off_x = offset_x[x]; | ||
330 | _soft8_pt_blend_transp_solid_mul_color_solid | ||
331 | (d, s[off_x], a[off_x], r, g, b); x++; d++;}); | ||
332 | } | ||
333 | |||
334 | for (; x < w; x++, d++) | ||
335 | _soft8_pt_blend_transp_solid_mul_color_solid | ||
336 | (d, s[offset_x[x]], a[offset_x[x]], r, g, b); | ||
337 | } | ||
338 | else | ||
339 | for (y = 0; y < h; y++, dst_itr += dst->stride) | ||
340 | { | ||
341 | DATA8 *d, *s; | ||
342 | DATA8 *a; | ||
343 | int x; | ||
344 | |||
345 | s = src->pixels + offset_y[y]; | ||
346 | a = src->alpha + offset_y[y]; | ||
347 | pld(s, 0); | ||
348 | pld(a, 0); | ||
349 | pld(offset_x, 0); | ||
350 | |||
351 | d = dst_itr; | ||
352 | x = 0; | ||
353 | while (x < w_align) | ||
354 | { | ||
355 | pld(s, 32); | ||
356 | pld(a, 8); | ||
357 | pld(offset_x + x, 32); | ||
358 | |||
359 | UNROLL8( | ||
360 | { | ||
361 | int off_x = offset_x[x]; | ||
362 | _soft8_pt_blend_transp_solid_mul_color_transp | ||
363 | (d, s[off_x], a[off_x], alpha, r, g, b); x++; d++;}); | ||
364 | } | ||
365 | |||
366 | for (; x < w; x++, d++) | ||
367 | _soft8_pt_blend_transp_solid_mul_color_transp | ||
368 | (d, s[offset_x[x]], a[offset_x[x]], alpha, r, g, b); | ||
369 | } | ||
370 | } | ||
371 | |||
372 | static inline void | ||
373 | _soft8_image_draw_scaled_mul_color(Soft8_Image * src, Soft8_Image * dst, | ||
374 | RGBA_Draw_Context * dc, | ||
375 | int dst_offset, int w, int h, | ||
376 | int *offset_x, int *offset_y, | ||
377 | DATA8 r, DATA8 g, DATA8 b, DATA8 a) | ||
378 | { | ||
379 | if ((src->cache_entry.flags.alpha && src->alpha) && | ||
380 | (!dst->cache_entry.flags.alpha)) | ||
381 | _soft8_image_draw_scaled_transp_solid_mul_color | ||
382 | (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); | ||
383 | else if (!dst->cache_entry.flags.alpha) | ||
384 | _soft8_image_draw_scaled_solid_solid_mul_color | ||
385 | (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); | ||
386 | else | ||
387 | ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " | ||
388 | "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", | ||
389 | src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, | ||
390 | dc->mul.col); | ||
391 | } | ||
392 | |||
393 | static inline void | ||
394 | _soft8_image_draw_scaled_mul(Soft8_Image * src, Soft8_Image * dst, | ||
395 | RGBA_Draw_Context * dc, | ||
396 | int dst_offset, int w, int h, | ||
397 | int *offset_x, int *offset_y, DATA8 r, DATA8 g, | ||
398 | DATA8 b, DATA8 a) | ||
399 | { | ||
400 | if ((a == r) && (a == g) && (a == b)) | ||
401 | _soft8_image_draw_scaled_mul_alpha | ||
402 | (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); | ||
403 | else | ||
404 | _soft8_image_draw_scaled_mul_color | ||
405 | (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); | ||
406 | } | ||
407 | |||
408 | void | ||
409 | evas_common_soft8_image_draw_scaled_sampled(Soft8_Image * src, Soft8_Image * dst, | ||
410 | RGBA_Draw_Context * dc, | ||
411 | const Eina_Rectangle sr, | ||
412 | const Eina_Rectangle dr, | ||
413 | const Eina_Rectangle cr) | ||
414 | { | ||
415 | int x, y, dst_offset, *offset_x, *offset_y; | ||
416 | DATA8 mul_gry8; | ||
417 | DATA8 r, g, b, a; | ||
418 | |||
419 | if (!dc->mul.use) | ||
420 | { | ||
421 | r = g = b = a = 0xff; | ||
422 | mul_gry8 = 0xff; | ||
423 | } | ||
424 | else | ||
425 | { | ||
426 | a = A_VAL(&dc->mul.col); | ||
427 | if (a == 0) | ||
428 | return; | ||
429 | |||
430 | r = R_VAL(&dc->mul.col); | ||
431 | g = G_VAL(&dc->mul.col); | ||
432 | b = B_VAL(&dc->mul.col); | ||
433 | |||
434 | if (r > a) | ||
435 | r = a; | ||
436 | if (g > a) | ||
437 | g = a; | ||
438 | if (b > a) | ||
439 | b = a; | ||
440 | |||
441 | mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b); | ||
442 | } | ||
443 | |||
444 | /* pre-calculated scale tables */ | ||
445 | offset_x = alloca(cr.w * sizeof(*offset_x)); | ||
446 | for (x = 0; x < cr.w; x++) | ||
447 | offset_x[x] = (((x + cr.x - dr.x) * sr.w) / dr.w) + sr.x; | ||
448 | |||
449 | offset_y = alloca(cr.h * sizeof(*offset_y)); | ||
450 | for (y = 0; y < cr.h; y++) | ||
451 | offset_y[y] = (((((y + cr.y - dr.y) * sr.h) / dr.h) + sr.y) | ||
452 | * src->stride); | ||
453 | |||
454 | dst_offset = cr.x + (cr.y * dst->stride); | ||
455 | |||
456 | if (mul_gry8 == 0xff) | ||
457 | _soft8_image_draw_scaled_no_mul | ||
458 | (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y); | ||
459 | else | ||
460 | _soft8_image_draw_scaled_mul | ||
461 | (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y, r, g, b, | ||
462 | a); | ||
463 | } | ||
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c new file mode 100644 index 0000000..6f4e76b --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c | |||
@@ -0,0 +1,284 @@ | |||
1 | #include "evas_common_soft8.h" | ||
2 | #include "evas_soft8_scanline_blend.c" | ||
3 | |||
4 | static void | ||
5 | _soft8_image_draw_unscaled_solid_solid(Soft8_Image * src, Soft8_Image * dst, | ||
6 | RGBA_Draw_Context * dc __UNUSED__, | ||
7 | int src_offset, int dst_offset, | ||
8 | int w, int h) | ||
9 | { | ||
10 | DATA8 *src_itr, *dst_itr; | ||
11 | int y; | ||
12 | |||
13 | src_itr = src->pixels + src_offset; | ||
14 | dst_itr = dst->pixels + dst_offset; | ||
15 | |||
16 | for (y = 0; y < h; y++) | ||
17 | { | ||
18 | _soft8_scanline_blend_solid_solid(src_itr, dst_itr, w); | ||
19 | src_itr += src->stride; | ||
20 | dst_itr += dst->stride; | ||
21 | } | ||
22 | } | ||
23 | |||
24 | static void | ||
25 | _soft8_image_draw_unscaled_transp_solid(Soft8_Image * src, Soft8_Image * dst, | ||
26 | RGBA_Draw_Context * dc __UNUSED__, | ||
27 | int src_offset, int dst_offset, | ||
28 | int w, int h) | ||
29 | { | ||
30 | DATA8 *src_itr, *dst_itr; | ||
31 | DATA8 *alpha_itr; | ||
32 | int y; | ||
33 | |||
34 | src_itr = src->pixels + src_offset; | ||
35 | alpha_itr = src->alpha + src_offset; | ||
36 | dst_itr = dst->pixels + dst_offset; | ||
37 | |||
38 | for (y = 0; y < h; y++) | ||
39 | { | ||
40 | _soft8_scanline_blend_transp_solid(src_itr, alpha_itr, dst_itr, w); | ||
41 | src_itr += src->stride; | ||
42 | alpha_itr += src->stride; | ||
43 | dst_itr += dst->stride; | ||
44 | } | ||
45 | } | ||
46 | |||
47 | static inline void | ||
48 | _soft8_image_draw_unscaled_no_mul(Soft8_Image * src, Soft8_Image * dst, | ||
49 | RGBA_Draw_Context * dc, | ||
50 | int src_offset, int dst_offset, | ||
51 | int width, int height) | ||
52 | { | ||
53 | if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) | ||
54 | _soft8_image_draw_unscaled_transp_solid(src, dst, dc, | ||
55 | src_offset, dst_offset, | ||
56 | width, height); | ||
57 | else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) | ||
58 | _soft8_image_draw_unscaled_solid_solid(src, dst, dc, | ||
59 | src_offset, dst_offset, | ||
60 | width, height); | ||
61 | else | ||
62 | ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " | ||
63 | "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", | ||
64 | src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); | ||
65 | } | ||
66 | |||
67 | static void | ||
68 | _soft8_image_draw_unscaled_solid_solid_mul_alpha(Soft8_Image * src, | ||
69 | Soft8_Image * dst, | ||
70 | RGBA_Draw_Context * | ||
71 | dc __UNUSED__, int src_offset, | ||
72 | int dst_offset, int w, int h, | ||
73 | DATA8 a) | ||
74 | { | ||
75 | DATA8 *src_itr, *dst_itr; | ||
76 | int y; | ||
77 | |||
78 | src_itr = src->pixels + src_offset; | ||
79 | dst_itr = dst->pixels + dst_offset; | ||
80 | |||
81 | for (y = 0; y < h; y++) | ||
82 | { | ||
83 | _soft8_scanline_blend_solid_solid_mul_alpha(src_itr, dst_itr, w, a); | ||
84 | src_itr += src->stride; | ||
85 | dst_itr += dst->stride; | ||
86 | } | ||
87 | } | ||
88 | |||
89 | static void | ||
90 | _soft8_image_draw_unscaled_transp_solid_mul_alpha(Soft8_Image * src, | ||
91 | Soft8_Image * dst, | ||
92 | RGBA_Draw_Context * | ||
93 | dc __UNUSED__, int src_offset, | ||
94 | int dst_offset, int w, int h, | ||
95 | DATA8 a) | ||
96 | { | ||
97 | DATA8 *src_itr, *dst_itr; | ||
98 | DATA8 *alpha_itr; | ||
99 | int y; | ||
100 | |||
101 | src_itr = src->pixels + src_offset; | ||
102 | alpha_itr = src->alpha + src_offset; | ||
103 | dst_itr = dst->pixels + dst_offset; | ||
104 | |||
105 | for (y = 0; y < h; y++) | ||
106 | { | ||
107 | _soft8_scanline_blend_transp_solid_mul_alpha(src_itr, alpha_itr, | ||
108 | dst_itr, w, a); | ||
109 | src_itr += src->stride; | ||
110 | alpha_itr += src->stride; | ||
111 | dst_itr += dst->stride; | ||
112 | } | ||
113 | } | ||
114 | |||
115 | static inline void | ||
116 | _soft8_image_draw_unscaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst, | ||
117 | RGBA_Draw_Context * dc, | ||
118 | int src_offset, int dst_offset, | ||
119 | int width, int height, DATA8 a) | ||
120 | { | ||
121 | if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) | ||
122 | _soft8_image_draw_unscaled_transp_solid_mul_alpha | ||
123 | (src, dst, dc, src_offset, dst_offset, width, height, a); | ||
124 | else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) | ||
125 | _soft8_image_draw_unscaled_solid_solid_mul_alpha | ||
126 | (src, dst, dc, src_offset, dst_offset, width, height, a); | ||
127 | else | ||
128 | ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " | ||
129 | "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", | ||
130 | src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); | ||
131 | } | ||
132 | |||
133 | static void | ||
134 | _soft8_image_draw_unscaled_solid_solid_mul_color(Soft8_Image * src, | ||
135 | Soft8_Image * dst, | ||
136 | RGBA_Draw_Context * | ||
137 | dc __UNUSED__, int src_offset, | ||
138 | int dst_offset, int w, int h, | ||
139 | DATA8 r, DATA8 g, DATA8 b, | ||
140 | DATA8 a) | ||
141 | { | ||
142 | DATA8 *src_itr, *dst_itr; | ||
143 | int y; | ||
144 | |||
145 | src_itr = src->pixels + src_offset; | ||
146 | dst_itr = dst->pixels + dst_offset; | ||
147 | |||
148 | if (a == 0xff) | ||
149 | for (y = 0; y < h; y++) | ||
150 | { | ||
151 | _soft8_scanline_blend_solid_solid_mul_color_solid | ||
152 | (src_itr, dst_itr, w, r, g, b); | ||
153 | src_itr += src->stride; | ||
154 | dst_itr += dst->stride; | ||
155 | } | ||
156 | else | ||
157 | for (y = 0; y < h; y++) | ||
158 | { | ||
159 | _soft8_scanline_blend_solid_solid_mul_color_transp | ||
160 | (src_itr, dst_itr, w, a, r, g, b); | ||
161 | src_itr += src->stride; | ||
162 | dst_itr += dst->stride; | ||
163 | } | ||
164 | } | ||
165 | |||
166 | static void | ||
167 | _soft8_image_draw_unscaled_transp_solid_mul_color(Soft8_Image * src, | ||
168 | Soft8_Image * dst, | ||
169 | RGBA_Draw_Context * | ||
170 | dc __UNUSED__, int src_offset, | ||
171 | int dst_offset, int w, int h, | ||
172 | DATA8 r, DATA8 g, DATA8 b, | ||
173 | DATA8 a) | ||
174 | { | ||
175 | DATA8 *src_itr, *dst_itr; | ||
176 | DATA8 *alpha_itr; | ||
177 | int y; | ||
178 | |||
179 | src_itr = src->pixels + src_offset; | ||
180 | alpha_itr = src->alpha + src_offset; | ||
181 | dst_itr = dst->pixels + dst_offset; | ||
182 | |||
183 | if (a == 0xff) | ||
184 | for (y = 0; y < h; y++) | ||
185 | { | ||
186 | _soft8_scanline_blend_transp_solid_mul_color_solid | ||
187 | (src_itr, alpha_itr, dst_itr, w, r, g, b); | ||
188 | src_itr += src->stride; | ||
189 | alpha_itr += src->stride; | ||
190 | dst_itr += dst->stride; | ||
191 | } | ||
192 | else | ||
193 | for (y = 0; y < h; y++) | ||
194 | { | ||
195 | _soft8_scanline_blend_transp_solid_mul_color_transp | ||
196 | (src_itr, alpha_itr, dst_itr, w, a, r, g, b); | ||
197 | src_itr += src->stride; | ||
198 | alpha_itr += src->stride; | ||
199 | dst_itr += dst->stride; | ||
200 | } | ||
201 | } | ||
202 | |||
203 | static inline void | ||
204 | _soft8_image_draw_unscaled_mul_color(Soft8_Image * src, Soft8_Image * dst, | ||
205 | RGBA_Draw_Context * dc, | ||
206 | int src_offset, int dst_offset, | ||
207 | int width, int height, | ||
208 | DATA8 r, DATA8 g, DATA8 b, DATA8 a) | ||
209 | { | ||
210 | if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) | ||
211 | _soft8_image_draw_unscaled_transp_solid_mul_color | ||
212 | (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); | ||
213 | else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) | ||
214 | _soft8_image_draw_unscaled_solid_solid_mul_color | ||
215 | (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); | ||
216 | else | ||
217 | ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " | ||
218 | "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", | ||
219 | src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); | ||
220 | } | ||
221 | |||
222 | static inline void | ||
223 | _soft8_image_draw_unscaled_mul(Soft8_Image * src, Soft8_Image * dst, | ||
224 | RGBA_Draw_Context * dc, | ||
225 | int src_offset, int dst_offset, | ||
226 | int width, int height, DATA8 r, DATA8 g, | ||
227 | DATA8 b, DATA8 a) | ||
228 | { | ||
229 | if ((a == r) && (a == g) && (a == b)) | ||
230 | _soft8_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset, | ||
231 | dst_offset, width, height, a); | ||
232 | else | ||
233 | _soft8_image_draw_unscaled_mul_color(src, dst, dc, src_offset, | ||
234 | dst_offset, width, height, | ||
235 | r, g, b, a); | ||
236 | } | ||
237 | |||
238 | void | ||
239 | evas_common_soft8_image_draw_unscaled(Soft8_Image * src, Soft8_Image * dst, | ||
240 | RGBA_Draw_Context * dc, | ||
241 | const Eina_Rectangle sr, | ||
242 | const Eina_Rectangle dr, const Eina_Rectangle cr) | ||
243 | { | ||
244 | int src_offset_rows, src_offset, dst_offset; | ||
245 | DATA8 mul_gry8; | ||
246 | DATA8 r, g, b, a; | ||
247 | |||
248 | if (!dc->mul.use) | ||
249 | { | ||
250 | r = g = b = a = 0xff; | ||
251 | mul_gry8 = 0xff; | ||
252 | } | ||
253 | else | ||
254 | { | ||
255 | a = A_VAL(&dc->mul.col); | ||
256 | if (a == 0) | ||
257 | return; | ||
258 | |||
259 | r = R_VAL(&dc->mul.col); | ||
260 | g = G_VAL(&dc->mul.col); | ||
261 | b = B_VAL(&dc->mul.col); | ||
262 | |||
263 | if (r > a) | ||
264 | r = a; | ||
265 | if (g > a) | ||
266 | g = a; | ||
267 | if (b > a) | ||
268 | b = a; | ||
269 | |||
270 | mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b); | ||
271 | } | ||
272 | |||
273 | src_offset_rows = (cr.y - dr.y) + sr.y; | ||
274 | src_offset = (src_offset_rows * src->stride) + (cr.x - dr.x) + sr.x; | ||
275 | |||
276 | dst_offset = cr.x + (cr.y * dst->stride); | ||
277 | |||
278 | if (mul_gry8 == 0xff) | ||
279 | _soft8_image_draw_unscaled_no_mul(src, dst, dc, src_offset, dst_offset, | ||
280 | cr.w, cr.h); | ||
281 | else | ||
282 | _soft8_image_draw_unscaled_mul(src, dst, dc, src_offset, dst_offset, | ||
283 | cr.w, cr.h, r, g, b, a); | ||
284 | } | ||
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_line.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_line.c new file mode 100644 index 0000000..6ec2d22 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_line.c | |||
@@ -0,0 +1,426 @@ | |||
1 | #include "evas_common_soft8.h" | ||
2 | #include "evas_soft8_scanline_fill.c" | ||
3 | |||
4 | /* | ||
5 | * All functions except by evas_common_soft8_line_draw() expect x0 <= x1. | ||
6 | */ | ||
7 | |||
8 | static inline int | ||
9 | _in_range(int value, int min, int max) | ||
10 | { | ||
11 | return min <= value && value <= max; | ||
12 | } | ||
13 | |||
14 | static inline int | ||
15 | _is_xy_inside_clip(int x, int y, const struct RGBA_Draw_Context_clip clip) | ||
16 | { | ||
17 | if (!clip.use) | ||
18 | return 1; | ||
19 | |||
20 | if (!_in_range(x, clip.x, clip.x + clip.w - 1)) | ||
21 | return 0; | ||
22 | |||
23 | if (!_in_range(y, clip.y, clip.y + clip.h - 1)) | ||
24 | return 0; | ||
25 | |||
26 | return 1; | ||
27 | } | ||
28 | |||
29 | static inline int | ||
30 | _is_x_inside_clip(int x, const struct RGBA_Draw_Context_clip clip) | ||
31 | { | ||
32 | if (!clip.use) | ||
33 | return 1; | ||
34 | |||
35 | return _in_range(x, clip.x, clip.x + clip.w - 1); | ||
36 | } | ||
37 | |||
38 | static inline int | ||
39 | _is_y_inside_clip(int y, const struct RGBA_Draw_Context_clip clip) | ||
40 | { | ||
41 | if (!clip.use) | ||
42 | return 1; | ||
43 | |||
44 | return _in_range(y, clip.y, clip.y + clip.h - 1); | ||
45 | } | ||
46 | |||
47 | static inline int | ||
48 | _is_xy_inside_rect(int x, int y, int w, int h) | ||
49 | { | ||
50 | return _in_range(x, 0, w - 1) && _in_range(y, 0, h - 1); | ||
51 | } | ||
52 | |||
53 | static inline int | ||
54 | _is_empty_clip(const struct RGBA_Draw_Context_clip clip) | ||
55 | { | ||
56 | return clip.w < 1 || clip.h < 1; | ||
57 | } | ||
58 | |||
59 | static void | ||
60 | _soft8_line_point(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y) | ||
61 | { | ||
62 | DATA8 gry8, *dst_itr; | ||
63 | DATA8 alpha; | ||
64 | |||
65 | if (!_is_xy_inside_rect(x, y, dst->cache_entry.w, dst->cache_entry.h)) | ||
66 | return; | ||
67 | |||
68 | if (!_is_xy_inside_clip(x, y, dc->clip)) | ||
69 | return; | ||
70 | |||
71 | dst_itr = dst->pixels + (dst->stride * y) + x; | ||
72 | alpha = A_VAL(&dc->col.col); | ||
73 | gry8 = GRY_8_FROM_RGB(&dc->col.col); | ||
74 | |||
75 | if (alpha == 0xff) | ||
76 | _soft8_pt_fill_solid_solid(dst_itr, gry8); | ||
77 | else if (alpha > 0) | ||
78 | { | ||
79 | alpha++; | ||
80 | _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); | ||
81 | } | ||
82 | } | ||
83 | |||
84 | static void | ||
85 | _soft8_line_horiz(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int x1, | ||
86 | int y) | ||
87 | { | ||
88 | DATA8 gry8, *dst_itr; | ||
89 | DATA8 alpha; | ||
90 | int w; | ||
91 | |||
92 | if (!_is_y_inside_clip(y, dc->clip)) | ||
93 | return; | ||
94 | |||
95 | if (x0 < dc->clip.x) | ||
96 | x0 = dc->clip.x; | ||
97 | |||
98 | if (x1 >= dc->clip.x + dc->clip.w) | ||
99 | x1 = dc->clip.x + dc->clip.w - 1; | ||
100 | |||
101 | w = x1 - x0; | ||
102 | if (w < 1) | ||
103 | return; | ||
104 | |||
105 | dst_itr = dst->pixels + (dst->stride * y) + x0; | ||
106 | alpha = A_VAL(&dc->col.col); | ||
107 | gry8 = GRY_8_FROM_RGB(&dc->col.col); | ||
108 | |||
109 | if (alpha == 0xff) | ||
110 | _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); | ||
111 | else if (alpha > 0) | ||
112 | { | ||
113 | alpha++; | ||
114 | _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); | ||
115 | } | ||
116 | } | ||
117 | |||
118 | static void | ||
119 | _soft8_line_vert(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y0, | ||
120 | int y1) | ||
121 | { | ||
122 | DATA8 gry8, *dst_itr; | ||
123 | DATA8 alpha; | ||
124 | int h; | ||
125 | |||
126 | if (!_is_x_inside_clip(x, dc->clip)) | ||
127 | return; | ||
128 | |||
129 | if (y1 < y0) | ||
130 | { | ||
131 | int t; | ||
132 | t = y0; | ||
133 | y0 = y1; | ||
134 | y1 = t; | ||
135 | } | ||
136 | |||
137 | if (y0 < dc->clip.y) | ||
138 | y0 = dc->clip.y; | ||
139 | |||
140 | if (y1 >= dc->clip.y + dc->clip.h) | ||
141 | y1 = dc->clip.y + dc->clip.h - 1; | ||
142 | |||
143 | h = y1 - y0; | ||
144 | if (h < 1) | ||
145 | return; | ||
146 | |||
147 | dst_itr = dst->pixels + (dst->stride * y0) + x; | ||
148 | alpha = A_VAL(&dc->col.col); | ||
149 | gry8 = GRY_8_FROM_RGB(&dc->col.col); | ||
150 | |||
151 | if (alpha == 0xff) | ||
152 | { | ||
153 | for (; h > 0; h--, dst_itr += dst->stride) | ||
154 | _soft8_pt_fill_solid_solid(dst_itr, gry8); | ||
155 | } | ||
156 | else if (alpha > 0) | ||
157 | { | ||
158 | alpha++; | ||
159 | |||
160 | for (; h > 0; h--, dst_itr += dst->stride) | ||
161 | _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); | ||
162 | } | ||
163 | } | ||
164 | |||
165 | static inline void | ||
166 | _soft8_line_45deg_adjust_boundaries(const struct RGBA_Draw_Context_clip clip, | ||
167 | int *p_x0, int *p_y0, int *p_x1, int *p_y1) | ||
168 | { | ||
169 | int diff, dy, x0, y0, x1, y1; | ||
170 | |||
171 | x0 = *p_x0; | ||
172 | y0 = *p_y0; | ||
173 | x1 = *p_x1; | ||
174 | y1 = *p_y1; | ||
175 | |||
176 | dy = y1 - y0; | ||
177 | |||
178 | diff = clip.x - x0; | ||
179 | if (diff > 0) | ||
180 | { | ||
181 | x0 = clip.x; | ||
182 | y0 += (dy > 0) ? diff : -diff; | ||
183 | } | ||
184 | |||
185 | diff = x1 - (clip.x + clip.w); | ||
186 | if (diff > 0) | ||
187 | { | ||
188 | x1 = clip.x + clip.w; | ||
189 | y1 += (dy > 0) ? -diff : diff; | ||
190 | } | ||
191 | |||
192 | if (dy > 0) | ||
193 | { | ||
194 | diff = clip.y - y0; | ||
195 | if (diff > 0) | ||
196 | { | ||
197 | y0 = clip.y; | ||
198 | x0 += diff; | ||
199 | } | ||
200 | |||
201 | diff = y1 - (clip.y + clip.h); | ||
202 | if (diff > 0) | ||
203 | { | ||
204 | y1 = clip.y + clip.h; | ||
205 | x1 -= diff; | ||
206 | } | ||
207 | } | ||
208 | else | ||
209 | { | ||
210 | diff = clip.y - y1; | ||
211 | if (diff > 0) | ||
212 | { | ||
213 | y1 = clip.y; | ||
214 | x1 -= diff; | ||
215 | } | ||
216 | |||
217 | diff = y0 - (clip.y + clip.h - 1); | ||
218 | if (diff > 0) | ||
219 | { | ||
220 | y0 = clip.y + clip.h - 1; | ||
221 | x0 += diff; | ||
222 | } | ||
223 | } | ||
224 | |||
225 | *p_x0 = x0; | ||
226 | *p_y0 = y0; | ||
227 | *p_x1 = x1; | ||
228 | *p_y1 = y1; | ||
229 | } | ||
230 | |||
231 | static void | ||
232 | _soft8_line_45deg(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, | ||
233 | int x1, int y1) | ||
234 | { | ||
235 | int dy, step_dst_itr, len; | ||
236 | DATA8 alpha; | ||
237 | DATA8 *dst_itr, gry8; | ||
238 | |||
239 | alpha = A_VAL(&dc->col.col); | ||
240 | if (alpha < 1) | ||
241 | return; | ||
242 | |||
243 | gry8 = GRY_8_FROM_RGB(&dc->col.col); | ||
244 | |||
245 | dy = y1 - y0; | ||
246 | step_dst_itr = 1 + ((dy > 0) ? dst->stride : -dst->stride); | ||
247 | |||
248 | _soft8_line_45deg_adjust_boundaries(dc->clip, &x0, &y0, &x1, &y1); | ||
249 | |||
250 | len = (dy > 0) ? (y1 - y0) : (y0 - y1); | ||
251 | if (len < 1) | ||
252 | return; | ||
253 | |||
254 | dst_itr = dst->pixels + dst->stride * y0 + x0; | ||
255 | if (alpha == 0xff) | ||
256 | { | ||
257 | for (; len > 0; len--, dst_itr += step_dst_itr) | ||
258 | _soft8_pt_fill_solid_solid(dst_itr, gry8); | ||
259 | } | ||
260 | else | ||
261 | { | ||
262 | alpha++; | ||
263 | for (; len > 0; len--, dst_itr += step_dst_itr) | ||
264 | _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); | ||
265 | } | ||
266 | } | ||
267 | |||
268 | EFL_ALWAYS_INLINE void | ||
269 | _soft8_line_aliased_pt(DATA8 * dst_itr, DATA8 gry8, DATA8 alpha) | ||
270 | { | ||
271 | if (alpha == 32) | ||
272 | _soft8_pt_fill_solid_solid(dst_itr, gry8); | ||
273 | else | ||
274 | _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); | ||
275 | } | ||
276 | |||
277 | static void | ||
278 | _soft8_line_aliased(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, | ||
279 | int x1, int y1) | ||
280 | { | ||
281 | int dx, dy, step_y, step_dst_itr; | ||
282 | DATA8 gry8; | ||
283 | DATA8 alpha; | ||
284 | |||
285 | alpha = A_VAL(&dc->col.col); | ||
286 | if (alpha == 0) | ||
287 | return; | ||
288 | alpha++; | ||
289 | |||
290 | gry8 = GRY_8_FROM_RGB(&dc->col.col); | ||
291 | |||
292 | dx = x1 - x0; | ||
293 | dy = y1 - y0; | ||
294 | |||
295 | if (dy >= 0) | ||
296 | { | ||
297 | step_y = 1; | ||
298 | step_dst_itr = dst->stride; | ||
299 | } | ||
300 | else | ||
301 | { | ||
302 | dy = -dy; | ||
303 | step_y = -1; | ||
304 | step_dst_itr = -dst->stride; | ||
305 | } | ||
306 | |||
307 | if (dx > dy) | ||
308 | { | ||
309 | DATA8 *dst_itr; | ||
310 | int e, x, y; | ||
311 | |||
312 | e = -(dx / 2); | ||
313 | y = y0; | ||
314 | dst_itr = dst->pixels + dst->stride * y0 + x0; | ||
315 | for (x = x0; x <= x1; x++, dst_itr++) | ||
316 | { | ||
317 | if (_is_xy_inside_clip(x, y, dc->clip)) | ||
318 | _soft8_line_aliased_pt(dst_itr, gry8, alpha); | ||
319 | |||
320 | e += dy; | ||
321 | if (e >= 0) | ||
322 | { | ||
323 | dst_itr += step_dst_itr; | ||
324 | y += step_y; | ||
325 | e -= dx; | ||
326 | } | ||
327 | } | ||
328 | } | ||
329 | else | ||
330 | { | ||
331 | DATA8 *dst_itr; | ||
332 | int e, x, y; | ||
333 | |||
334 | e = -(dy / 2); | ||
335 | x = x0; | ||
336 | dst_itr = dst->pixels + dst->stride * y0 + x0; | ||
337 | for (y = y0; y != y1; y += step_y, dst_itr += step_dst_itr) | ||
338 | { | ||
339 | if (_is_xy_inside_clip(x, y, dc->clip)) | ||
340 | _soft8_line_aliased_pt(dst_itr, gry8, alpha); | ||
341 | |||
342 | e += dx; | ||
343 | if (e >= 0) | ||
344 | { | ||
345 | dst_itr++; | ||
346 | x++; | ||
347 | e -= dy; | ||
348 | } | ||
349 | } | ||
350 | } | ||
351 | } | ||
352 | |||
353 | void | ||
354 | evas_common_soft8_line_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, | ||
355 | int x1, int y1) | ||
356 | { | ||
357 | struct RGBA_Draw_Context_clip c_bkp, c_tmp; | ||
358 | int dx, dy; | ||
359 | int x, y, w, h; | ||
360 | |||
361 | c_tmp.use = 1; | ||
362 | c_tmp.x = 0; | ||
363 | c_tmp.y = 0; | ||
364 | c_tmp.w = dst->cache_entry.w; | ||
365 | c_tmp.h = dst->cache_entry.h; | ||
366 | |||
367 | /* save out clip info */ | ||
368 | c_bkp = dc->clip; | ||
369 | if (c_bkp.use) | ||
370 | { | ||
371 | RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, | ||
372 | c_bkp.x, c_bkp.y, c_bkp.w, c_bkp.h); | ||
373 | if (_is_empty_clip(c_tmp)) | ||
374 | return; | ||
375 | } | ||
376 | |||
377 | x = MIN(x0, x1); | ||
378 | y = MIN(y0, y1); | ||
379 | w = MAX(x0, x1) - x + 1; | ||
380 | h = MAX(y0, y1) - y + 1; | ||
381 | |||
382 | RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, x, y, w, h); | ||
383 | if (_is_empty_clip(c_tmp)) | ||
384 | return; | ||
385 | |||
386 | /* Check if the line doesn't cross the clip area */ | ||
387 | if (x0 < c_tmp.x && x1 < c_tmp.x) | ||
388 | return; | ||
389 | if (x0 >= c_tmp.x + c_tmp.w && x1 >= c_tmp.x + c_tmp.w) | ||
390 | return; | ||
391 | if (y0 < c_tmp.y && y1 < c_tmp.y) | ||
392 | return; | ||
393 | if (y0 >= c_tmp.y + c_tmp.h && y1 >= c_tmp.y + c_tmp.h) | ||
394 | return; | ||
395 | |||
396 | dc->clip = c_tmp; | ||
397 | dx = x1 - x0; | ||
398 | dy = y1 - y0; | ||
399 | |||
400 | if (dx < 0) | ||
401 | { | ||
402 | int t; | ||
403 | |||
404 | t = x0; | ||
405 | x0 = x1; | ||
406 | x1 = t; | ||
407 | |||
408 | t = y0; | ||
409 | y0 = y1; | ||
410 | y1 = t; | ||
411 | } | ||
412 | |||
413 | if (dx == 0 && dy == 0) | ||
414 | _soft8_line_point(dst, dc, x0, y0); | ||
415 | else if (dx == 0) | ||
416 | _soft8_line_vert(dst, dc, x0, y0, y1); | ||
417 | else if (dy == 0) | ||
418 | _soft8_line_horiz(dst, dc, x0, x1, y0); | ||
419 | else if (dy == dx || dy == -dx) | ||
420 | _soft8_line_45deg(dst, dc, x0, y0, x1, y1); | ||
421 | else | ||
422 | _soft8_line_aliased(dst, dc, x0, y0, x1, y1); | ||
423 | |||
424 | /* restore clip info */ | ||
425 | dc->clip = c_bkp; | ||
426 | } | ||
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_main.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_main.c new file mode 100644 index 0000000..cc4ce25 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_main.c | |||
@@ -0,0 +1,656 @@ | |||
1 | #include "evas_common_soft8.h" | ||
2 | |||
3 | static Evas_Cache_Image *eci = NULL; | ||
4 | static int reference = 0; | ||
5 | |||
6 | static Image_Entry *_evas_common_soft8_image_new(void); | ||
7 | static void _evas_common_soft8_image_delete(Image_Entry * ie); | ||
8 | |||
9 | static int _evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h); | ||
10 | static void _evas_common_soft8_image_surface_delete(Image_Entry * ie); | ||
11 | static DATA32 *_evas_common_soft8_image_surface_pixels(Image_Entry * ie); | ||
12 | |||
13 | static int _evas_common_load_soft8_image_from_file(Image_Entry * ie); | ||
14 | static void _evas_common_soft8_image_unload(Image_Entry * ie); | ||
15 | |||
16 | static void _evas_common_soft8_image_dirty_region(Image_Entry * im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); | ||
17 | static int _evas_common_soft8_image_dirty(Image_Entry * ie_dst, | ||
18 | const Image_Entry * ie_src); | ||
19 | |||
20 | static int _evas_common_soft8_image_ram_usage(Image_Entry * ie); | ||
21 | |||
22 | static int _evas_common_soft8_image_size_set(Image_Entry * ie_dst, | ||
23 | const Image_Entry * ie_im, unsigned int w, unsigned int h); | ||
24 | static int _evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace); | ||
25 | static int _evas_common_soft8_image_from_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace); | ||
26 | static int _evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst, | ||
27 | int cspace); | ||
28 | |||
29 | static int _evas_common_load_soft8_image_data_from_file(Image_Entry * ie); | ||
30 | |||
31 | /* | ||
32 | static void | ||
33 | _evas_common_soft8_image_debug(const char* context, Image_Entry *eim) | ||
34 | { | ||
35 | DBG("[8] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); | ||
36 | } | ||
37 | */ | ||
38 | |||
39 | static const Evas_Cache_Image_Func _evas_common_soft8_image_func = { | ||
40 | _evas_common_soft8_image_new, | ||
41 | _evas_common_soft8_image_delete, | ||
42 | _evas_common_soft8_image_surface_alloc, | ||
43 | _evas_common_soft8_image_surface_delete, | ||
44 | _evas_common_soft8_image_surface_pixels, | ||
45 | _evas_common_load_soft8_image_from_file, | ||
46 | _evas_common_soft8_image_unload, | ||
47 | _evas_common_soft8_image_dirty_region, | ||
48 | _evas_common_soft8_image_dirty, | ||
49 | _evas_common_soft8_image_size_set, | ||
50 | _evas_common_soft8_image_from_copied_data, | ||
51 | _evas_common_soft8_image_from_data, | ||
52 | _evas_common_soft8_image_colorspace_set, | ||
53 | _evas_common_load_soft8_image_data_from_file, | ||
54 | _evas_common_soft8_image_ram_usage, | ||
55 | /* _evas_common_soft8_image_debug */ | ||
56 | NULL | ||
57 | }; | ||
58 | |||
59 | EAPI void | ||
60 | evas_common_soft8_image_init(void) | ||
61 | { | ||
62 | if (!eci) | ||
63 | eci = evas_cache_image_init(&_evas_common_soft8_image_func); | ||
64 | reference++; | ||
65 | } | ||
66 | |||
67 | EAPI void | ||
68 | evas_common_soft8_image_shutdown(void) | ||
69 | { | ||
70 | if (--reference == 0) | ||
71 | { | ||
72 | // DISABLE for now - something wrong with cache shutdown freeing things | ||
73 | // still in use - rage_thumb segv's now. | ||
74 | // | ||
75 | // actually - i think i see it. cache ref goes to 0 (and thus gets freed) | ||
76 | // because in eng_setup() when a buffer changes size it is FIRST freed | ||
77 | // THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately | ||
78 | // where it should stay at 1. - see evas_engine.c in the buffer enigne for | ||
79 | // example. eng_output_free() is called BEFORE _output_setup(). although this | ||
80 | // is only a SIGNE of the problem. we can patch this up with either freeing | ||
81 | // after the setup (so we just pt a ref of 2 then back to 1), or just | ||
82 | // evas_common_image_init() at the start and evas_common_image_shutdown() | ||
83 | // after it all. really ref 0 should only be reached when no more canvases | ||
84 | // with no more objects exist anywhere. | ||
85 | |||
86 | // ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009. | ||
87 | //evas_cache_image_shutdown(eci); | ||
88 | //eci = NULL; | ||
89 | } | ||
90 | } | ||
91 | |||
92 | EAPI Evas_Cache_Image * | ||
93 | evas_common_soft8_image_cache_get(void) | ||
94 | { | ||
95 | return eci; | ||
96 | } | ||
97 | |||
98 | static Image_Entry * | ||
99 | _evas_common_soft8_image_new(void) | ||
100 | { | ||
101 | Soft8_Image *im; | ||
102 | |||
103 | im = calloc(1, sizeof(Soft8_Image)); | ||
104 | if (!im) | ||
105 | return NULL; | ||
106 | |||
107 | im->stride = -1; | ||
108 | |||
109 | return (Image_Entry *) im; | ||
110 | } | ||
111 | |||
112 | static void | ||
113 | _evas_common_soft8_image_delete(Image_Entry * ie) | ||
114 | { | ||
115 | memset(ie, 0xFF, sizeof(Soft8_Image)); | ||
116 | free(ie); | ||
117 | } | ||
118 | |||
119 | static int | ||
120 | _evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h) | ||
121 | { | ||
122 | Soft8_Image *im = (Soft8_Image *) ie; | ||
123 | |||
124 | if (im->stride < 0) | ||
125 | im->stride = _calc_stride(w); | ||
126 | |||
127 | im->pixels = | ||
128 | realloc(im->pixels, IMG_BYTE_SIZE(im->stride, h, ie->flags.alpha)); | ||
129 | if (!im->pixels) | ||
130 | return -1; | ||
131 | |||
132 | if (ie->flags.alpha) | ||
133 | { | ||
134 | im->alpha = (DATA8 *) (im->pixels + (im->stride * h)); | ||
135 | im->flags.free_alpha = 0; | ||
136 | } | ||
137 | im->flags.free_pixels = 1; | ||
138 | |||
139 | return 0; | ||
140 | } | ||
141 | |||
142 | static void | ||
143 | _evas_common_soft8_image_surface_delete(Image_Entry * ie) | ||
144 | { | ||
145 | Soft8_Image *im = (Soft8_Image *) ie; | ||
146 | |||
147 | if (im->flags.free_pixels) | ||
148 | free(im->pixels); | ||
149 | im->pixels = NULL; | ||
150 | im->flags.free_pixels = 0; | ||
151 | |||
152 | if (im->flags.free_alpha) | ||
153 | free(im->alpha); | ||
154 | im->alpha = NULL; | ||
155 | im->flags.free_alpha = 0; | ||
156 | } | ||
157 | |||
158 | static DATA32 * | ||
159 | _evas_common_soft8_image_surface_pixels(Image_Entry * ie __UNUSED__) | ||
160 | { | ||
161 | abort(); | ||
162 | |||
163 | return NULL; | ||
164 | } | ||
165 | |||
166 | static int | ||
167 | _evas_common_load_soft8_image_from_file(Image_Entry * ie) | ||
168 | { | ||
169 | Soft8_Image *sim = (Soft8_Image *) ie; | ||
170 | RGBA_Image *im; | ||
171 | int error = 0; | ||
172 | |||
173 | im = (RGBA_Image *) evas_cache_image_request(evas_common_image_cache_get(), | ||
174 | sim->cache_entry.file, | ||
175 | sim->cache_entry.key, | ||
176 | &sim->cache_entry.load_opts, | ||
177 | &error); | ||
178 | sim->source = im; | ||
179 | if (!sim->source) | ||
180 | return -1; | ||
181 | |||
182 | sim->cache_entry.w = sim->source->cache_entry.w; | ||
183 | sim->cache_entry.h = sim->source->cache_entry.h; | ||
184 | ie->flags.alpha = im->cache_entry.flags.alpha; | ||
185 | if (sim->stride < 0) | ||
186 | sim->stride = _calc_stride(sim->cache_entry.w); | ||
187 | |||
188 | return 0; | ||
189 | } | ||
190 | |||
191 | static void | ||
192 | _evas_common_soft8_image_unload(Image_Entry * ie __UNUSED__) | ||
193 | { | ||
194 | } | ||
195 | |||
196 | static void | ||
197 | _evas_common_soft8_image_dirty_region(Image_Entry * im __UNUSED__, | ||
198 | unsigned int x __UNUSED__, | ||
199 | unsigned int y __UNUSED__, | ||
200 | unsigned int w __UNUSED__, | ||
201 | unsigned int h __UNUSED__) | ||
202 | { | ||
203 | } | ||
204 | |||
205 | static int | ||
206 | _evas_common_soft8_image_dirty(Image_Entry * ie_dst, const Image_Entry * ie_src) | ||
207 | { | ||
208 | Soft8_Image *dst = (Soft8_Image *) ie_dst; | ||
209 | Soft8_Image *src = (Soft8_Image *) ie_src; | ||
210 | |||
211 | evas_cache_image_load_data(&src->cache_entry); | ||
212 | evas_cache_image_surface_alloc(&dst->cache_entry, | ||
213 | src->cache_entry.w, src->cache_entry.h); | ||
214 | |||
215 | /* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ | ||
216 | |||
217 | return 0; | ||
218 | } | ||
219 | |||
220 | static int | ||
221 | _evas_common_soft8_image_ram_usage(Image_Entry * ie) | ||
222 | { | ||
223 | Soft8_Image *im = (Soft8_Image *) ie; | ||
224 | |||
225 | if (im->pixels && im->flags.free_pixels) | ||
226 | return IMG_BYTE_SIZE(im->stride, im->cache_entry.h, ie->flags.alpha); | ||
227 | return 0; | ||
228 | } | ||
229 | |||
230 | static int | ||
231 | _evas_common_soft8_image_size_set(Image_Entry * ie_dst, | ||
232 | const Image_Entry * ie_im, | ||
233 | unsigned int w __UNUSED__, | ||
234 | unsigned int h __UNUSED__) | ||
235 | { | ||
236 | Soft8_Image *dst = (Soft8_Image *) ie_dst; | ||
237 | Soft8_Image *im = (Soft8_Image *) ie_im; | ||
238 | |||
239 | dst->flags = im->flags; | ||
240 | |||
241 | return 0; | ||
242 | } | ||
243 | |||
244 | static int | ||
245 | _evas_common_soft8_image_from_data(Image_Entry * ie_dst, | ||
246 | unsigned int w, unsigned int h, | ||
247 | DATA32 * image_data, int alpha, | ||
248 | int cspace __UNUSED__) | ||
249 | { | ||
250 | Soft8_Image *im = (Soft8_Image *) ie_dst; | ||
251 | |||
252 | /* FIXME: handle colorspace */ | ||
253 | ie_dst->w = w; | ||
254 | ie_dst->h = h; | ||
255 | ie_dst->flags.alpha = alpha; | ||
256 | |||
257 | im->flags.free_pixels = 0; | ||
258 | im->flags.free_alpha = 0; | ||
259 | if (im->stride < 0) | ||
260 | im->stride = _calc_stride(w); | ||
261 | |||
262 | /* FIXME: That's bad, the application must be aware of the engine internal. */ | ||
263 | im->pixels = (DATA8 *) image_data; | ||
264 | if (ie_dst->flags.alpha) | ||
265 | im->alpha = (DATA8 *) (im->pixels + (im->stride * h)); | ||
266 | |||
267 | return 0; | ||
268 | } | ||
269 | |||
270 | static int | ||
271 | _evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst, | ||
272 | unsigned int w __UNUSED__, | ||
273 | unsigned int h, | ||
274 | DATA32 * image_data, | ||
275 | int alpha __UNUSED__, | ||
276 | int cspace __UNUSED__) | ||
277 | { | ||
278 | Soft8_Image *im = (Soft8_Image *) ie_dst; | ||
279 | |||
280 | /* FIXME: handle colorspace */ | ||
281 | if (image_data) | ||
282 | memcpy(im->pixels, image_data, | ||
283 | IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); | ||
284 | else | ||
285 | memset(im->pixels, 0, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); | ||
286 | |||
287 | return 0; | ||
288 | } | ||
289 | |||
290 | static int | ||
291 | _evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst __UNUSED__, | ||
292 | int cspace __UNUSED__) | ||
293 | { | ||
294 | /* FIXME: handle colorspace */ | ||
295 | return 0; | ||
296 | } | ||
297 | |||
298 | static int | ||
299 | _evas_common_load_soft8_image_data_from_file(Image_Entry * ie) | ||
300 | { | ||
301 | Soft8_Image *im = (Soft8_Image *) ie; | ||
302 | |||
303 | if (im->pixels) | ||
304 | return 0; | ||
305 | if (!im->source) | ||
306 | return -1; | ||
307 | |||
308 | evas_cache_image_load_data(&im->source->cache_entry); | ||
309 | if (im->source->image.data) | ||
310 | { | ||
311 | DATA32 *sp; | ||
312 | |||
313 | evas_cache_image_surface_alloc(&im->cache_entry, | ||
314 | im->source->cache_entry.w, | ||
315 | im->source->cache_entry.h); | ||
316 | |||
317 | sp = im->source->image.data; | ||
318 | if (im->alpha) | ||
319 | evas_common_soft8_image_convert_from_rgba(im, sp); | ||
320 | else | ||
321 | evas_common_soft8_image_convert_from_rgb(im, sp); | ||
322 | } | ||
323 | evas_cache_image_drop(&im->source->cache_entry); | ||
324 | im->source = NULL; | ||
325 | |||
326 | return 0; | ||
327 | } | ||
328 | |||
329 | /* Soft16_Image * */ | ||
330 | /* evas_common_soft16_image_new(int w, unsigned int h, unsigned int stride, int have_alpha, DATA16 *pixels, */ | ||
331 | /* int copy) */ | ||
332 | /* { */ | ||
333 | /* Soft16_Image *im; */ | ||
334 | |||
335 | /* if (stride < 0) stride = _calc_stride(w); */ | ||
336 | |||
337 | /* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */ | ||
338 | /* if (!im) return NULL; */ | ||
339 | |||
340 | /* if (pixels) */ | ||
341 | /* { */ | ||
342 | /* if (copy) */ | ||
343 | /* memcpy(im->pixels, pixels, IMG_BYTE_SIZE(stride, h, have_alpha)); */ | ||
344 | /* else */ | ||
345 | /* { */ | ||
346 | /* im->pixels = pixels; */ | ||
347 | /* if (have_alpha) im->alpha = (DATA8 *)(im->pixels + (stride * h)); */ | ||
348 | /* } */ | ||
349 | /* } */ | ||
350 | /* return im; */ | ||
351 | /* } */ | ||
352 | |||
353 | static inline void | ||
354 | _get_clip(const RGBA_Draw_Context * dc, const Soft8_Image * im, | ||
355 | Eina_Rectangle * clip) | ||
356 | { | ||
357 | if (dc->clip.use) | ||
358 | { | ||
359 | EINA_RECTANGLE_SET(clip, dc->clip.x, dc->clip.y, dc->clip.w, | ||
360 | dc->clip.h); | ||
361 | if (clip->x < 0) | ||
362 | { | ||
363 | clip->w += clip->x; | ||
364 | clip->x = 0; | ||
365 | } | ||
366 | if (clip->y < 0) | ||
367 | { | ||
368 | clip->h += clip->y; | ||
369 | clip->y = 0; | ||
370 | } | ||
371 | if ((clip->x + clip->w) > (int)im->cache_entry.w) | ||
372 | clip->w = im->cache_entry.w - clip->x; | ||
373 | if ((clip->y + clip->h) > (int)im->cache_entry.h) | ||
374 | clip->h = im->cache_entry.h - clip->y; | ||
375 | } | ||
376 | else | ||
377 | { | ||
378 | EINA_RECTANGLE_SET(clip, 0, 0, im->cache_entry.w, im->cache_entry.h); | ||
379 | } | ||
380 | } | ||
381 | |||
382 | static inline int | ||
383 | _is_empty_rectangle(const Eina_Rectangle * r) | ||
384 | { | ||
385 | return (r->w < 1) || (r->h < 1); | ||
386 | } | ||
387 | |||
388 | static inline void | ||
389 | _shrink(int *s_pos, int *s_size, int pos, int size) | ||
390 | { | ||
391 | int d; | ||
392 | |||
393 | d = (*s_pos) - pos; | ||
394 | if (d < 0) | ||
395 | { | ||
396 | (*s_size) += d; | ||
397 | (*s_pos) = pos; | ||
398 | } | ||
399 | |||
400 | d = size + pos - (*s_pos); | ||
401 | if ((*s_size) > d) | ||
402 | (*s_size) = d; | ||
403 | } | ||
404 | |||
405 | static int | ||
406 | _soft8_adjust_areas(Eina_Rectangle * src, | ||
407 | int src_max_x, int src_max_y, Eina_Rectangle * dst, | ||
408 | int dst_max_x, int dst_max_y, Eina_Rectangle * dst_clip) | ||
409 | { | ||
410 | if (_is_empty_rectangle(src) || | ||
411 | _is_empty_rectangle(dst) || _is_empty_rectangle(dst_clip)) | ||
412 | return 0; | ||
413 | |||
414 | /* shrink clip */ | ||
415 | _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst->w); | ||
416 | _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst->h); | ||
417 | if (_is_empty_rectangle(dst_clip)) | ||
418 | return 0; | ||
419 | |||
420 | /* sanitise x */ | ||
421 | if (src->x < 0) | ||
422 | { | ||
423 | dst->x -= (src->x * dst->w) / src->w; | ||
424 | dst->w += (src->x * dst->w) / src->w; | ||
425 | src->w += src->x; | ||
426 | src->x = 0; | ||
427 | } | ||
428 | if (src->x >= src_max_x) | ||
429 | return 0; | ||
430 | if ((src->x + src->w) > src_max_x) | ||
431 | { | ||
432 | dst->w = (dst->w * (src_max_x - src->x)) / (src->w); | ||
433 | src->w = src_max_x - src->x; | ||
434 | } | ||
435 | if (dst->w <= 0) | ||
436 | return 0; | ||
437 | if (src->w <= 0) | ||
438 | return 0; | ||
439 | if (dst_clip->x < 0) | ||
440 | { | ||
441 | dst_clip->w += dst_clip->x; | ||
442 | dst_clip->x = 0; | ||
443 | } | ||
444 | if (dst_clip->w <= 0) | ||
445 | return 0; | ||
446 | if (dst_clip->x >= dst_max_x) | ||
447 | return 0; | ||
448 | |||
449 | _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x); | ||
450 | if (dst_clip->w <= 0) | ||
451 | return 0; | ||
452 | |||
453 | /* sanitise y */ | ||
454 | if (src->y < 0) | ||
455 | { | ||
456 | dst->y -= (src->y * dst->h) / src->h; | ||
457 | dst->h += (src->y * dst->h) / src->h; | ||
458 | src->h += src->y; | ||
459 | src->y = 0; | ||
460 | } | ||
461 | if (src->y >= src_max_y) | ||
462 | return 0; | ||
463 | if ((src->y + src->h) > src_max_y) | ||
464 | { | ||
465 | dst->h = (dst->h * (src_max_y - src->y)) / (src->h); | ||
466 | src->h = src_max_y - src->y; | ||
467 | } | ||
468 | if (dst->h <= 0) | ||
469 | return 0; | ||
470 | if (src->h <= 0) | ||
471 | return 0; | ||
472 | if (dst_clip->y < 0) | ||
473 | { | ||
474 | dst_clip->h += dst_clip->y; | ||
475 | dst_clip->y = 0; | ||
476 | } | ||
477 | if (dst_clip->h <= 0) | ||
478 | return 0; | ||
479 | if (dst_clip->y >= dst_max_y) | ||
480 | return 0; | ||
481 | |||
482 | _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y); | ||
483 | if (dst_clip->h <= 0) | ||
484 | return 0; | ||
485 | |||
486 | return 1; | ||
487 | } | ||
488 | |||
489 | static void | ||
490 | _soft8_image_draw_sampled_int(Soft8_Image * src, Soft8_Image * dst, | ||
491 | RGBA_Draw_Context * dc, | ||
492 | Eina_Rectangle sr, Eina_Rectangle dr) | ||
493 | { | ||
494 | Eina_Rectangle cr; | ||
495 | |||
496 | if (! | ||
497 | (RECTS_INTERSECT | ||
498 | (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) | ||
499 | return; | ||
500 | if (! | ||
501 | (RECTS_INTERSECT | ||
502 | (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) | ||
503 | return; | ||
504 | |||
505 | _get_clip(dc, dst, &cr); | ||
506 | if (!_soft8_adjust_areas | ||
507 | (&sr, src->cache_entry.w, src->cache_entry.h, &dr, dst->cache_entry.w, | ||
508 | dst->cache_entry.h, &cr)) | ||
509 | return; | ||
510 | |||
511 | if ((dr.w == sr.w) && (dr.h == sr.h)) | ||
512 | evas_common_soft8_image_draw_unscaled(src, dst, dc, sr, dr, cr); | ||
513 | else | ||
514 | evas_common_soft8_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr); | ||
515 | } | ||
516 | |||
517 | EAPI void | ||
518 | evas_common_soft8_image_draw(Soft8_Image * src, Soft8_Image * dst, | ||
519 | RGBA_Draw_Context * dc, | ||
520 | int src_region_x, int src_region_y, | ||
521 | int src_region_w, int src_region_h, | ||
522 | int dst_region_x, int dst_region_y, | ||
523 | int dst_region_w, int dst_region_h, | ||
524 | int smooth __UNUSED__) | ||
525 | { | ||
526 | Eina_Rectangle sr, dr; | ||
527 | Cutout_Rects *rects; | ||
528 | Cutout_Rect *r; | ||
529 | struct RGBA_Draw_Context_clip clip_bkp; | ||
530 | int i; | ||
531 | |||
532 | /* handle cutouts here! */ | ||
533 | EINA_RECTANGLE_SET(&dr, dst_region_x, dst_region_y, dst_region_w, | ||
534 | dst_region_h); | ||
535 | |||
536 | if (_is_empty_rectangle(&dr)) | ||
537 | return; | ||
538 | if (! | ||
539 | (RECTS_INTERSECT | ||
540 | (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) | ||
541 | return; | ||
542 | |||
543 | EINA_RECTANGLE_SET(&sr, src_region_x, src_region_y, src_region_w, | ||
544 | src_region_h); | ||
545 | |||
546 | if (_is_empty_rectangle(&sr)) | ||
547 | return; | ||
548 | if (! | ||
549 | (RECTS_INTERSECT | ||
550 | (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) | ||
551 | return; | ||
552 | |||
553 | /* no cutouts - cut right to the chase */ | ||
554 | if (!dc->cutout.rects) | ||
555 | { | ||
556 | _soft8_image_draw_sampled_int(src, dst, dc, sr, dr); | ||
557 | return; | ||
558 | } | ||
559 | |||
560 | /* save out clip info */ | ||
561 | clip_bkp = dc->clip; | ||
562 | evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, | ||
563 | dst->cache_entry.h); | ||
564 | evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, | ||
565 | dst_region_w, dst_region_h); | ||
566 | /* our clip is 0 size.. abort */ | ||
567 | if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) | ||
568 | { | ||
569 | dc->clip = clip_bkp; | ||
570 | return; | ||
571 | } | ||
572 | rects = evas_common_draw_context_apply_cutouts(dc); | ||
573 | for (i = 0; i < rects->active; i++) | ||
574 | { | ||
575 | r = rects->rects + i; | ||
576 | evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); | ||
577 | _soft8_image_draw_sampled_int(src, dst, dc, sr, dr); | ||
578 | } | ||
579 | evas_common_draw_context_apply_clear_cutouts(rects); | ||
580 | dc->clip = clip_bkp; | ||
581 | } | ||
582 | |||
583 | EAPI Soft8_Image * | ||
584 | evas_common_soft8_image_alpha_set(Soft8_Image * im, int have_alpha) | ||
585 | { | ||
586 | Soft8_Image *new_im; | ||
587 | |||
588 | if (im->cache_entry.flags.alpha == have_alpha) | ||
589 | return im; | ||
590 | |||
591 | new_im = (Soft8_Image *) evas_cache_image_alone(&im->cache_entry); | ||
592 | |||
593 | new_im->cache_entry.flags.alpha = have_alpha; | ||
594 | |||
595 | if (im->cache_entry.w > 0 && im->cache_entry.h) | ||
596 | new_im = | ||
597 | (Soft8_Image *) evas_cache_image_size_set(&new_im->cache_entry, | ||
598 | im->cache_entry.w, | ||
599 | im->cache_entry.h); | ||
600 | |||
601 | return new_im; | ||
602 | } | ||
603 | |||
604 | /* Soft16_Image * */ | ||
605 | /* evas_common_soft16_image_size_set(Soft16_Image *old_im, unsigned int w, unsigned int h) */ | ||
606 | /* { */ | ||
607 | /* Soft16_Image *new_im; */ | ||
608 | /* DATA16 *dp, *sp; */ | ||
609 | /* int i, cw, ch, ew; */ | ||
610 | |||
611 | /* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */ | ||
612 | |||
613 | /* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */ | ||
614 | |||
615 | /* if (old_im->cache_entry.w < new_im->cache_entry.w) */ | ||
616 | /* cw = old_im->cache_entry.w; */ | ||
617 | /* else */ | ||
618 | /* cw = new_im->cache_entry.w; */ | ||
619 | |||
620 | /* ew = new_im->cache_entry.w - cw; */ | ||
621 | |||
622 | /* if (old_im->cache_entry.h < new_im->cache_entry.h) */ | ||
623 | /* ch = old_im->cache_entry.h; */ | ||
624 | /* else */ | ||
625 | /* ch = new_im->cache_entry.h; */ | ||
626 | |||
627 | /* dp = new_im->pixels; */ | ||
628 | /* sp = old_im->pixels; */ | ||
629 | /* for (i = 0; i < ch; i++) */ | ||
630 | /* { */ | ||
631 | /* memcpy(dp, sp, cw * sizeof(DATA16)); */ | ||
632 | /* if (ew > 0) memset(dp, 0, ew * sizeof(DATA16)); */ | ||
633 | |||
634 | /* dp += new_im->stride; */ | ||
635 | /* sp += old_im->stride; */ | ||
636 | /* } */ | ||
637 | |||
638 | /* if (old_im->flags.have_alpha) */ | ||
639 | /* { */ | ||
640 | /* DATA8 *dp, *sp; */ | ||
641 | |||
642 | /* dp = new_im->alpha; */ | ||
643 | /* sp = old_im->alpha; */ | ||
644 | /* for (i = 0; i < ch; i++) */ | ||
645 | /* { */ | ||
646 | /* memcpy(dp, sp, cw * sizeof(DATA8)); */ | ||
647 | /* if (ew > 0) memset(dp, 0, ew * sizeof(DATA8)); */ | ||
648 | |||
649 | /* dp += new_im->stride; */ | ||
650 | /* sp += old_im->stride; */ | ||
651 | /* } */ | ||
652 | /* } */ | ||
653 | |||
654 | /* evas_cache_image_drop(&old_im->cache_entry); */ | ||
655 | /* return new_im; */ | ||
656 | /* } */ | ||
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c new file mode 100644 index 0000000..fb7027e --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c | |||
@@ -0,0 +1,230 @@ | |||
1 | #include <evas_common_soft8.h> | ||
2 | #include "evas_soft8_scanline_fill.c" | ||
3 | #include <math.h> | ||
4 | |||
5 | typedef struct _RGBA_Edge RGBA_Edge; | ||
6 | typedef struct _RGBA_Vertex RGBA_Vertex; | ||
7 | |||
8 | struct _RGBA_Edge { | ||
9 | float x, dx; | ||
10 | int i; | ||
11 | }; | ||
12 | |||
13 | struct _RGBA_Vertex { | ||
14 | float x, y; | ||
15 | int i; | ||
16 | }; | ||
17 | |||
18 | #define POLY_EDGE_DEL(_i) \ | ||
19 | { \ | ||
20 | int _j; \ | ||
21 | \ | ||
22 | for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ | ||
23 | if (_j < num_active_edges) \ | ||
24 | { \ | ||
25 | num_active_edges--; \ | ||
26 | memmove(&(edges[_j]), &(edges[_j + 1]), \ | ||
27 | (num_active_edges - _j) * sizeof(RGBA_Edge)); \ | ||
28 | } \ | ||
29 | } | ||
30 | |||
31 | #define POLY_EDGE_ADD(_i, _y) \ | ||
32 | { \ | ||
33 | int _j; \ | ||
34 | float _dx; \ | ||
35 | RGBA_Vertex *_p, *_q; \ | ||
36 | if (_i < (n - 1)) _j = _i + 1; \ | ||
37 | else _j = 0; \ | ||
38 | if (point[_i].y < point[_j].y) \ | ||
39 | { \ | ||
40 | _p = &(point[_i]); \ | ||
41 | _q = &(point[_j]); \ | ||
42 | } \ | ||
43 | else \ | ||
44 | { \ | ||
45 | _p = &(point[_j]); \ | ||
46 | _q = &(point[_i]); \ | ||
47 | } \ | ||
48 | edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ | ||
49 | edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ | ||
50 | edges[num_active_edges].i = _i; \ | ||
51 | num_active_edges++; \ | ||
52 | } | ||
53 | |||
54 | static int | ||
55 | polygon_point_sorter(const void *a, const void *b) | ||
56 | { | ||
57 | RGBA_Vertex *p, *q; | ||
58 | |||
59 | p = (RGBA_Vertex *) a; | ||
60 | q = (RGBA_Vertex *) b; | ||
61 | if (p->y <= q->y) | ||
62 | return -1; | ||
63 | return 1; | ||
64 | } | ||
65 | |||
66 | static int | ||
67 | polygon_edge_sorter(const void *a, const void *b) | ||
68 | { | ||
69 | RGBA_Edge *p, *q; | ||
70 | |||
71 | p = (RGBA_Edge *) a; | ||
72 | q = (RGBA_Edge *) b; | ||
73 | if (p->x <= q->x) | ||
74 | return -1; | ||
75 | return 1; | ||
76 | } | ||
77 | |||
78 | void | ||
79 | evas_common_soft8_polygon_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, | ||
80 | RGBA_Polygon_Point * points, int x, int y) | ||
81 | { | ||
82 | RGBA_Polygon_Point *pt; | ||
83 | RGBA_Vertex *point; | ||
84 | RGBA_Edge *edges; | ||
85 | int num_active_edges; | ||
86 | int n; | ||
87 | int i, j, k; | ||
88 | int y0, y1, yi; | ||
89 | int ext_x, ext_y, ext_w, ext_h; | ||
90 | int *sorted_index; | ||
91 | DATA8 alpha; | ||
92 | DATA8 gry8; | ||
93 | |||
94 | alpha = A_VAL(&dc->col.col); | ||
95 | if (alpha == 0) | ||
96 | return; | ||
97 | alpha++; | ||
98 | |||
99 | gry8 = GRY_8_FROM_RGB(&dc->col.col); | ||
100 | |||
101 | ext_x = 0; | ||
102 | ext_y = 0; | ||
103 | ext_w = dst->cache_entry.w; | ||
104 | ext_h = dst->cache_entry.h; | ||
105 | if (dc->clip.use) | ||
106 | RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h, | ||
107 | dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); | ||
108 | |||
109 | if ((ext_w <= 0) || (ext_h <= 0)) | ||
110 | return; | ||
111 | |||
112 | n = 0; | ||
113 | EINA_INLIST_FOREACH(points, pt) n++; | ||
114 | |||
115 | if (n < 3) | ||
116 | return; | ||
117 | |||
118 | edges = malloc(sizeof(RGBA_Edge) * n); | ||
119 | if (!edges) | ||
120 | return; | ||
121 | |||
122 | point = malloc(sizeof(RGBA_Vertex) * n); | ||
123 | if (!point) | ||
124 | { | ||
125 | free(edges); | ||
126 | return; | ||
127 | } | ||
128 | |||
129 | sorted_index = malloc(sizeof(int) * n); | ||
130 | if (!sorted_index) | ||
131 | { | ||
132 | free(edges); | ||
133 | free(point); | ||
134 | return; | ||
135 | } | ||
136 | |||
137 | k = 0; | ||
138 | EINA_INLIST_FOREACH(points, pt) | ||
139 | { | ||
140 | point[k].x = pt->x + x; | ||
141 | point[k].y = pt->y + y; | ||
142 | point[k].i = k; | ||
143 | k++; | ||
144 | } | ||
145 | qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); | ||
146 | |||
147 | for (k = 0; k < n; k++) | ||
148 | sorted_index[k] = point[k].i; | ||
149 | |||
150 | k = 0; | ||
151 | EINA_INLIST_FOREACH(points, pt) | ||
152 | { | ||
153 | point[k].x = pt->x + x; | ||
154 | point[k].y = pt->y + y; | ||
155 | point[k].i = k; | ||
156 | k++; | ||
157 | } | ||
158 | |||
159 | y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); | ||
160 | y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); | ||
161 | |||
162 | k = 0; | ||
163 | num_active_edges = 0; | ||
164 | |||
165 | for (yi = y0; yi <= y1; yi++) | ||
166 | { | ||
167 | for (; (k < n) && (point[sorted_index[k]].y <= ((float)yi + 0.5)); k++) | ||
168 | { | ||
169 | i = sorted_index[k]; | ||
170 | |||
171 | if (i > 0) | ||
172 | j = i - 1; | ||
173 | else | ||
174 | j = n - 1; | ||
175 | if (point[j].y <= ((float)yi - 0.5)) | ||
176 | { | ||
177 | POLY_EDGE_DEL(j)} | ||
178 | else if (point[j].y > ((float)yi + 0.5)) | ||
179 | { | ||
180 | POLY_EDGE_ADD(j, yi)} | ||
181 | if (i < (n - 1)) | ||
182 | j = i + 1; | ||
183 | else | ||
184 | j = 0; | ||
185 | if (point[j].y <= ((float)yi - 0.5)) | ||
186 | { | ||
187 | POLY_EDGE_DEL(i)} | ||
188 | else if (point[j].y > ((float)yi + 0.5)) | ||
189 | { | ||
190 | POLY_EDGE_ADD(i, yi)} | ||
191 | } | ||
192 | |||
193 | qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); | ||
194 | |||
195 | for (j = 0; j < num_active_edges; j += 2) | ||
196 | { | ||
197 | int x0, x1; | ||
198 | |||
199 | x0 = ceil(edges[j].x - 0.5); | ||
200 | if (j < (num_active_edges - 1)) | ||
201 | x1 = floor(edges[j + 1].x - 0.5); | ||
202 | else | ||
203 | x1 = x0; | ||
204 | if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) | ||
205 | { | ||
206 | DATA8 *dst_itr; | ||
207 | int w; | ||
208 | |||
209 | if (x0 < ext_x) | ||
210 | x0 = ext_x; | ||
211 | if (x1 >= (ext_x + ext_w)) | ||
212 | x1 = ext_x + ext_w - 1; | ||
213 | |||
214 | w = (x1 - x0) + 1; | ||
215 | dst_itr = dst->pixels + (yi * dst->stride) + x0; | ||
216 | |||
217 | if (alpha == 0xff) | ||
218 | _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); | ||
219 | else | ||
220 | _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); | ||
221 | } | ||
222 | edges[j].x += edges[j].dx; | ||
223 | edges[j + 1].x += edges[j + 1].dx; | ||
224 | } | ||
225 | } | ||
226 | |||
227 | free(edges); | ||
228 | free(point); | ||
229 | free(sorted_index); | ||
230 | } | ||
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c new file mode 100644 index 0000000..150f262 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c | |||
@@ -0,0 +1,125 @@ | |||
1 | #include "evas_common_soft8.h" | ||
2 | #include "evas_soft8_scanline_fill.c" | ||
3 | |||
4 | static inline int | ||
5 | _is_empty_rectangle(const Eina_Rectangle * r) | ||
6 | { | ||
7 | return (r->w < 1) || (r->h < 1); | ||
8 | } | ||
9 | |||
10 | static inline void | ||
11 | _soft8_rectangle_draw_solid_solid(Soft8_Image * dst, int offset, int w, int h, | ||
12 | DATA8 gry8) | ||
13 | { | ||
14 | DATA8 *dst_itr; | ||
15 | int i; | ||
16 | |||
17 | dst_itr = dst->pixels + offset; | ||
18 | |||
19 | for (i = 0; i < h; i++, dst_itr += dst->stride) | ||
20 | _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); | ||
21 | } | ||
22 | |||
23 | static inline void | ||
24 | _soft8_rectangle_draw_transp_solid(Soft8_Image * dst, int offset, int w, int h, | ||
25 | DATA8 gry8, DATA8 alpha) | ||
26 | { | ||
27 | DATA8 *dst_itr; | ||
28 | int i; | ||
29 | |||
30 | dst_itr = dst->pixels + offset; | ||
31 | alpha++; | ||
32 | |||
33 | for (i = 0; i < h; i++, dst_itr += dst->stride) | ||
34 | _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); | ||
35 | } | ||
36 | |||
37 | static void | ||
38 | _soft8_rectangle_draw_int(Soft8_Image * dst, RGBA_Draw_Context * dc, | ||
39 | Eina_Rectangle dr) | ||
40 | { | ||
41 | int dst_offset; | ||
42 | |||
43 | if (_is_empty_rectangle(&dr)) | ||
44 | return; | ||
45 | RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, | ||
46 | dst->cache_entry.h); | ||
47 | if (_is_empty_rectangle(&dr)) | ||
48 | return; | ||
49 | |||
50 | if (dc->clip.use) | ||
51 | RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, dc->clip.x, | ||
52 | dc->clip.y, dc->clip.w, dc->clip.h); | ||
53 | if (_is_empty_rectangle(&dr)) | ||
54 | return; | ||
55 | if (A_VAL(&dc->col.col) == 0) | ||
56 | return; | ||
57 | |||
58 | dst_offset = dr.x + (dr.y * dst->stride); | ||
59 | |||
60 | if (!dst->cache_entry.flags.alpha) | ||
61 | { | ||
62 | DATA8 gry8; | ||
63 | DATA8 alpha; | ||
64 | |||
65 | alpha = A_VAL(&dc->col.col); | ||
66 | gry8 = GRY_8_FROM_RGB(&dc->col.col); | ||
67 | |||
68 | if (alpha == 0xff) | ||
69 | _soft8_rectangle_draw_solid_solid(dst, dst_offset, dr.w, dr.h, gry8); | ||
70 | else if (alpha > 0) | ||
71 | _soft8_rectangle_draw_transp_solid | ||
72 | (dst, dst_offset, dr.w, dr.h, gry8, alpha); | ||
73 | } | ||
74 | else | ||
75 | ERR("Unsupported feature: drawing rectangle to non-opaque destination."); | ||
76 | } | ||
77 | |||
78 | void | ||
79 | evas_common_soft8_rectangle_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, | ||
80 | int x, int y, int w, int h) | ||
81 | { | ||
82 | Eina_Rectangle dr; | ||
83 | Cutout_Rects *rects; | ||
84 | Cutout_Rect *r; | ||
85 | struct RGBA_Draw_Context_clip c_bkp; | ||
86 | int i; | ||
87 | |||
88 | /* handle cutouts here! */ | ||
89 | EINA_RECTANGLE_SET(&dr, x, y, w, h); | ||
90 | |||
91 | if (_is_empty_rectangle(&dr)) | ||
92 | return; | ||
93 | if (! | ||
94 | (RECTS_INTERSECT | ||
95 | (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) | ||
96 | return; | ||
97 | |||
98 | /* no cutouts - cut right to the chase */ | ||
99 | if (!dc->cutout.rects) | ||
100 | { | ||
101 | _soft8_rectangle_draw_int(dst, dc, dr); | ||
102 | return; | ||
103 | } | ||
104 | |||
105 | c_bkp = dc->clip; | ||
106 | |||
107 | evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, | ||
108 | dst->cache_entry.h); | ||
109 | evas_common_draw_context_clip_clip(dc, x, y, w, h); | ||
110 | /* our clip is 0 size.. abort */ | ||
111 | if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) | ||
112 | { | ||
113 | dc->clip = c_bkp; | ||
114 | return; | ||
115 | } | ||
116 | rects = evas_common_draw_context_apply_cutouts(dc); | ||
117 | for (i = 0; i < rects->active; ++i) | ||
118 | { | ||
119 | r = rects->rects + i; | ||
120 | evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); | ||
121 | _soft8_rectangle_draw_int(dst, dc, dr); | ||
122 | } | ||
123 | evas_common_draw_context_apply_clear_cutouts(rects); | ||
124 | dc->clip = c_bkp; | ||
125 | } | ||
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c new file mode 100644 index 0000000..5fc62c2 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c | |||
@@ -0,0 +1,447 @@ | |||
1 | /** NOTE: This file is meant to be included by users **/ | ||
2 | |||
3 | /** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive. | ||
4 | ** this is due our division by 256 when multiplying the color. | ||
5 | **/ | ||
6 | |||
7 | /***************************************************************************** | ||
8 | * Scanline processing | ||
9 | * | ||
10 | * _soft8_scanline_<description>_<src>_<dst>[_<modifier>]() | ||
11 | * | ||
12 | ****************************************************************************/ | ||
13 | |||
14 | EFL_ALWAYS_INLINE void | ||
15 | _soft8_pt_blend_transp_solid(DATA8 * p_dst, DATA8 src, DATA8 alpha) | ||
16 | { | ||
17 | if (alpha == 0xff) | ||
18 | *p_dst = src; | ||
19 | else if (alpha != 0) | ||
20 | { | ||
21 | *p_dst = GRY_8_BLEND(src, *p_dst, alpha); | ||
22 | } | ||
23 | } | ||
24 | |||
25 | /*********************************************************************** | ||
26 | * Regular blend operations | ||
27 | */ | ||
28 | static void | ||
29 | _soft8_scanline_blend_transp_solid(DATA8 * src, DATA8 * alpha, DATA8 * dst, | ||
30 | int size) | ||
31 | { | ||
32 | DATA8 *start, *end; | ||
33 | |||
34 | start = dst; | ||
35 | end = start + (size & ~7); | ||
36 | |||
37 | pld(alpha, 0); | ||
38 | pld(src, 0); | ||
39 | |||
40 | /* work on 8 pixels per time, do data preload */ | ||
41 | while (start < end) | ||
42 | { | ||
43 | DATA8 alpha1, alpha2; | ||
44 | |||
45 | alpha1 = alpha[0]; | ||
46 | alpha += 8; | ||
47 | |||
48 | /* empirical tests show these give the best performance */ | ||
49 | pld(alpha, 8); | ||
50 | pld(src, 32); | ||
51 | |||
52 | src += 8; | ||
53 | start += 8; | ||
54 | |||
55 | alpha2 = alpha[-7]; | ||
56 | _soft8_pt_blend_transp_solid(start - 8, src[-8], alpha1); | ||
57 | |||
58 | alpha1 = alpha[-6]; | ||
59 | _soft8_pt_blend_transp_solid(start - 7, src[-7], alpha2); | ||
60 | |||
61 | alpha2 = alpha[-5]; | ||
62 | _soft8_pt_blend_transp_solid(start - 6, src[-6], alpha1); | ||
63 | |||
64 | alpha1 = alpha[-4]; | ||
65 | _soft8_pt_blend_transp_solid(start - 5, src[-5], alpha2); | ||
66 | |||
67 | alpha2 = alpha[-3]; | ||
68 | _soft8_pt_blend_transp_solid(start - 4, src[-4], alpha1); | ||
69 | |||
70 | alpha1 = alpha[-2]; | ||
71 | _soft8_pt_blend_transp_solid(start - 3, src[-3], alpha2); | ||
72 | |||
73 | alpha2 = alpha[-1]; | ||
74 | _soft8_pt_blend_transp_solid(start - 2, src[-2], alpha1); | ||
75 | |||
76 | _soft8_pt_blend_transp_solid(start - 1, src[-1], alpha2); | ||
77 | } | ||
78 | |||
79 | /* remaining pixels (up to 7) */ | ||
80 | end = start + (size & 7); | ||
81 | for (; start < end; start++, src++, alpha++) | ||
82 | _soft8_pt_blend_transp_solid(start, *src, *alpha); | ||
83 | } | ||
84 | |||
85 | EFL_ALWAYS_INLINE void | ||
86 | _soft8_pt_blend_solid_solid(DATA8 * p_dst, DATA8 src) | ||
87 | { | ||
88 | *p_dst = src; | ||
89 | } | ||
90 | |||
91 | static inline void | ||
92 | _soft8_scanline_blend_solid_solid(DATA8 * src, DATA8 * dst, int size) | ||
93 | { | ||
94 | memcpy(dst, src, size * sizeof(DATA8)); | ||
95 | } | ||
96 | |||
97 | /*********************************************************************** | ||
98 | * Blend operations taking an extra alpha (fade in, out) | ||
99 | */ | ||
100 | |||
101 | static inline void | ||
102 | _soft8_pt_blend_transp_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 alpha, | ||
103 | DATA8 rel_alpha) | ||
104 | { | ||
105 | alpha = alpha * rel_alpha; | ||
106 | if (alpha == 0) | ||
107 | return; | ||
108 | |||
109 | alpha++; | ||
110 | *p_dst = GRY_8_BLEND((src * rel_alpha) & 0xff, *p_dst, alpha); | ||
111 | } | ||
112 | |||
113 | static void | ||
114 | _soft8_scanline_blend_transp_solid_mul_alpha(DATA8 * src, DATA8 * alpha, | ||
115 | DATA8 * dst, int size, | ||
116 | const DATA8 rel_alpha) | ||
117 | { | ||
118 | DATA8 *start, *end; | ||
119 | |||
120 | start = dst; | ||
121 | end = start + (size & ~7); | ||
122 | |||
123 | pld(alpha, 0); | ||
124 | pld(src, 0); | ||
125 | |||
126 | while (start < end) | ||
127 | { | ||
128 | DATA8 alpha1, alpha2; | ||
129 | |||
130 | alpha1 = alpha[0]; | ||
131 | alpha += 8; | ||
132 | |||
133 | pld(alpha, 8); | ||
134 | pld(src, 32); | ||
135 | |||
136 | src += 8; | ||
137 | start += 8; | ||
138 | |||
139 | alpha2 = alpha[-7]; | ||
140 | _soft8_pt_blend_transp_solid_mul_alpha | ||
141 | (start - 8, src[-8], alpha1, rel_alpha); | ||
142 | |||
143 | alpha1 = alpha[-6]; | ||
144 | _soft8_pt_blend_transp_solid_mul_alpha | ||
145 | (start - 7, src[-7], alpha2, rel_alpha); | ||
146 | |||
147 | alpha2 = alpha[-5]; | ||
148 | _soft8_pt_blend_transp_solid_mul_alpha | ||
149 | (start - 6, src[-6], alpha1, rel_alpha); | ||
150 | |||
151 | alpha1 = alpha[-4]; | ||
152 | _soft8_pt_blend_transp_solid_mul_alpha | ||
153 | (start - 5, src[-5], alpha2, rel_alpha); | ||
154 | |||
155 | alpha2 = alpha[-3]; | ||
156 | _soft8_pt_blend_transp_solid_mul_alpha | ||
157 | (start - 4, src[-4], alpha1, rel_alpha); | ||
158 | |||
159 | alpha1 = alpha[-2]; | ||
160 | _soft8_pt_blend_transp_solid_mul_alpha | ||
161 | (start - 3, src[-3], alpha2, rel_alpha); | ||
162 | |||
163 | alpha2 = alpha[-1]; | ||
164 | _soft8_pt_blend_transp_solid_mul_alpha | ||
165 | (start - 2, src[-2], alpha1, rel_alpha); | ||
166 | |||
167 | _soft8_pt_blend_transp_solid_mul_alpha | ||
168 | (start - 1, src[-1], alpha2, rel_alpha); | ||
169 | } | ||
170 | |||
171 | end = start + (size & 7); | ||
172 | for (; start < end; start++, src++, alpha++) | ||
173 | _soft8_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha); | ||
174 | } | ||
175 | |||
176 | EFL_ALWAYS_INLINE void | ||
177 | _soft8_pt_blend_solid_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 rel_alpha) | ||
178 | { | ||
179 | *p_dst = GRY_8_BLEND_UNMUL(src, *p_dst, rel_alpha); | ||
180 | } | ||
181 | |||
182 | static void | ||
183 | _soft8_scanline_blend_solid_solid_mul_alpha(DATA8 * src, DATA8 * dst, int size, | ||
184 | DATA8 rel_alpha) | ||
185 | { | ||
186 | DATA8 *start, *end; | ||
187 | |||
188 | start = dst; | ||
189 | end = start + (size & ~7); | ||
190 | |||
191 | pld(src, 0); | ||
192 | |||
193 | while (start < end) | ||
194 | { | ||
195 | pld(src, 32); | ||
196 | UNROLL8( | ||
197 | { | ||
198 | _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); | ||
199 | start++; src++;} | ||
200 | ); | ||
201 | } | ||
202 | |||
203 | end = start + (size & 7); | ||
204 | for (; start < end; start++, src++) | ||
205 | _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); | ||
206 | } | ||
207 | |||
208 | /*********************************************************************** | ||
209 | * Blend operations with extra alpha and multiply color | ||
210 | */ | ||
211 | |||
212 | EFL_ALWAYS_INLINE void | ||
213 | _soft8_pt_blend_transp_solid_mul_color_transp(DATA8 * p_dst, DATA8 src, | ||
214 | DATA8 alpha, DATA8 rel_alpha, | ||
215 | DATA8 r, DATA8 g, DATA8 b) | ||
216 | { | ||
217 | alpha = alpha * rel_alpha; | ||
218 | if (alpha == 0) | ||
219 | return; | ||
220 | |||
221 | alpha++; | ||
222 | |||
223 | DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; | ||
224 | *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha); | ||
225 | } | ||
226 | |||
227 | static void | ||
228 | _soft8_scanline_blend_transp_solid_mul_color_transp(DATA8 * src, DATA8 * alpha, | ||
229 | DATA8 * dst, int size, | ||
230 | DATA8 rel_alpha, DATA8 r, | ||
231 | DATA8 g, DATA8 b) | ||
232 | { | ||
233 | DATA8 *start, *end; | ||
234 | |||
235 | start = dst; | ||
236 | end = start + (size & ~7); | ||
237 | |||
238 | pld(alpha, 0); | ||
239 | pld(src, 0); | ||
240 | |||
241 | while (start < end) | ||
242 | { | ||
243 | DATA8 alpha1, alpha2; | ||
244 | |||
245 | alpha1 = alpha[0]; | ||
246 | alpha += 8; | ||
247 | |||
248 | pld(src, 32); | ||
249 | pld(start, 32); | ||
250 | |||
251 | src += 8; | ||
252 | start += 8; | ||
253 | |||
254 | alpha2 = alpha[-7]; | ||
255 | _soft8_pt_blend_transp_solid_mul_color_transp | ||
256 | (start - 8, src[-8], alpha1, rel_alpha, r, g, b); | ||
257 | |||
258 | alpha1 = alpha[-6]; | ||
259 | _soft8_pt_blend_transp_solid_mul_color_transp | ||
260 | (start - 7, src[-7], alpha2, rel_alpha, r, g, b); | ||
261 | |||
262 | alpha2 = alpha[-5]; | ||
263 | _soft8_pt_blend_transp_solid_mul_color_transp | ||
264 | (start - 6, src[-6], alpha1, rel_alpha, r, g, b); | ||
265 | |||
266 | alpha1 = alpha[-4]; | ||
267 | _soft8_pt_blend_transp_solid_mul_color_transp | ||
268 | (start - 5, src[-5], alpha2, rel_alpha, r, g, b); | ||
269 | |||
270 | alpha2 = alpha[-3]; | ||
271 | _soft8_pt_blend_transp_solid_mul_color_transp | ||
272 | (start - 4, src[-4], alpha1, rel_alpha, r, g, b); | ||
273 | |||
274 | alpha1 = alpha[-2]; | ||
275 | _soft8_pt_blend_transp_solid_mul_color_transp | ||
276 | (start - 3, src[-3], alpha2, rel_alpha, r, g, b); | ||
277 | |||
278 | alpha2 = alpha[-1]; | ||
279 | _soft8_pt_blend_transp_solid_mul_color_transp | ||
280 | (start - 2, src[-2], alpha1, rel_alpha, r, g, b); | ||
281 | |||
282 | _soft8_pt_blend_transp_solid_mul_color_transp | ||
283 | (start - 1, src[-1], alpha2, rel_alpha, r, g, b); | ||
284 | } | ||
285 | |||
286 | end = start + (size & 7); | ||
287 | for (; start < end; start++, src++, alpha++) | ||
288 | _soft8_pt_blend_transp_solid_mul_color_transp | ||
289 | (start, *src, *alpha, rel_alpha, r, g, b); | ||
290 | } | ||
291 | |||
292 | EFL_ALWAYS_INLINE void | ||
293 | _soft8_pt_blend_solid_solid_mul_color_transp(DATA8 * p_dst, DATA8 src, | ||
294 | DATA8 rel_alpha, DATA8 r, DATA8 g, | ||
295 | DATA8 b) | ||
296 | { | ||
297 | DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; | ||
298 | *p_dst = GRY_8_BLEND(gry8, *p_dst, rel_alpha); | ||
299 | } | ||
300 | |||
301 | static void | ||
302 | _soft8_scanline_blend_solid_solid_mul_color_transp(DATA8 * src, DATA8 * dst, | ||
303 | int size, DATA8 rel_alpha, | ||
304 | DATA8 r, DATA8 g, DATA8 b) | ||
305 | { | ||
306 | DATA8 *start, *end; | ||
307 | |||
308 | start = dst; | ||
309 | end = start + (size & ~7); | ||
310 | |||
311 | pld(src, 0); | ||
312 | |||
313 | while (start < end) | ||
314 | { | ||
315 | pld(src, 32); | ||
316 | UNROLL8( | ||
317 | { | ||
318 | _soft8_pt_blend_solid_solid_mul_color_transp | ||
319 | (start, *src, rel_alpha, r, g, b); start++; src++;} | ||
320 | ); | ||
321 | } | ||
322 | |||
323 | end = start + (size & 7); | ||
324 | for (; start < end; start++, src++) | ||
325 | _soft8_pt_blend_solid_solid_mul_color_transp | ||
326 | (start, *src, rel_alpha, r, g, b); | ||
327 | } | ||
328 | |||
329 | /*********************************************************************** | ||
330 | * Blend operations with extra multiply color | ||
331 | */ | ||
332 | EFL_ALWAYS_INLINE void | ||
333 | _soft8_pt_blend_transp_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, | ||
334 | DATA8 alpha, DATA8 r, DATA8 g, | ||
335 | DATA8 b) | ||
336 | { | ||
337 | if (alpha == 0) | ||
338 | return; | ||
339 | |||
340 | DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; | ||
341 | |||
342 | if (alpha == 0xff) | ||
343 | *p_dst = gry8; | ||
344 | else | ||
345 | { | ||
346 | *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha); | ||
347 | } | ||
348 | } | ||
349 | |||
350 | static void | ||
351 | _soft8_scanline_blend_transp_solid_mul_color_solid(DATA8 * src, DATA8 * alpha, | ||
352 | DATA8 * dst, int size, | ||
353 | DATA8 r, DATA8 g, DATA8 b) | ||
354 | { | ||
355 | DATA8 *start, *end; | ||
356 | |||
357 | start = dst; | ||
358 | end = start + (size & ~7); | ||
359 | |||
360 | pld(alpha, 0); | ||
361 | pld(src, 0); | ||
362 | |||
363 | while (start < end) | ||
364 | { | ||
365 | DATA8 alpha1, alpha2; | ||
366 | |||
367 | alpha1 = alpha[0]; | ||
368 | alpha += 8; | ||
369 | |||
370 | pld(alpha, 8); | ||
371 | pld(src, 32); | ||
372 | |||
373 | src += 8; | ||
374 | start += 8; | ||
375 | |||
376 | alpha2 = alpha[-7]; | ||
377 | _soft8_pt_blend_transp_solid_mul_color_solid | ||
378 | (start - 8, src[-8], alpha1, r, g, b); | ||
379 | |||
380 | alpha1 = alpha[-6]; | ||
381 | _soft8_pt_blend_transp_solid_mul_color_solid | ||
382 | (start - 7, src[-7], alpha2, r, g, b); | ||
383 | |||
384 | alpha2 = alpha[-5]; | ||
385 | _soft8_pt_blend_transp_solid_mul_color_solid | ||
386 | (start - 6, src[-6], alpha1, r, g, b); | ||
387 | |||
388 | alpha1 = alpha[-4]; | ||
389 | _soft8_pt_blend_transp_solid_mul_color_solid | ||
390 | (start - 5, src[-5], alpha2, r, g, b); | ||
391 | |||
392 | alpha2 = alpha[-3]; | ||
393 | _soft8_pt_blend_transp_solid_mul_color_solid | ||
394 | (start - 4, src[-4], alpha1, r, g, b); | ||
395 | |||
396 | alpha1 = alpha[-2]; | ||
397 | _soft8_pt_blend_transp_solid_mul_color_solid | ||
398 | (start - 3, src[-3], alpha2, r, g, b); | ||
399 | |||
400 | alpha2 = alpha[-1]; | ||
401 | _soft8_pt_blend_transp_solid_mul_color_solid | ||
402 | (start - 2, src[-2], alpha1, r, g, b); | ||
403 | |||
404 | _soft8_pt_blend_transp_solid_mul_color_solid | ||
405 | (start - 1, src[-1], alpha2, r, g, b); | ||
406 | } | ||
407 | |||
408 | end = start + (size & 7); | ||
409 | for (; start < end; start++, src++, alpha++) | ||
410 | _soft8_pt_blend_transp_solid_mul_color_solid | ||
411 | (start, *src, *alpha, r, g, b); | ||
412 | } | ||
413 | |||
414 | EFL_ALWAYS_INLINE void | ||
415 | _soft8_pt_blend_solid_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, DATA8 r, | ||
416 | DATA8 g, DATA8 b) | ||
417 | { | ||
418 | *p_dst = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; | ||
419 | } | ||
420 | |||
421 | static void | ||
422 | _soft8_scanline_blend_solid_solid_mul_color_solid(DATA8 * src, DATA8 * dst, | ||
423 | int size, DATA8 r, DATA8 g, | ||
424 | DATA8 b) | ||
425 | { | ||
426 | DATA8 *start, *end; | ||
427 | |||
428 | start = dst; | ||
429 | end = start + (size & ~7); | ||
430 | |||
431 | pld(src, 0); | ||
432 | |||
433 | while (start < end) | ||
434 | { | ||
435 | pld(src, 32); | ||
436 | UNROLL8( | ||
437 | { | ||
438 | _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, | ||
439 | b); start++; | ||
440 | src++;} | ||
441 | ); | ||
442 | } | ||
443 | |||
444 | end = start + (size & 7); | ||
445 | for (; start < end; start++, src++) | ||
446 | _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b); | ||
447 | } | ||
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c new file mode 100644 index 0000000..f1f3b8f --- /dev/null +++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c | |||
@@ -0,0 +1,53 @@ | |||
1 | /** NOTE: This file is meant to be included by users **/ | ||
2 | |||
3 | /***************************************************************************** | ||
4 | * Point processing | ||
5 | * | ||
6 | * _soft8_pt_<description>_<src>_<dst>[_<modifier>]() | ||
7 | * | ||
8 | * Scanline processing | ||
9 | * | ||
10 | * _soft8_scanline_<description>_<src>_<dst>[_<modifier>]() | ||
11 | * | ||
12 | ****************************************************************************/ | ||
13 | EFL_ALWAYS_INLINE void | ||
14 | _soft8_pt_fill_solid_solid(DATA8 * dst, DATA8 gry8) | ||
15 | { | ||
16 | *dst = gry8; | ||
17 | } | ||
18 | |||
19 | EFL_ALWAYS_INLINE void | ||
20 | _soft8_scanline_fill_solid_solid(DATA8 * dst, int size, DATA8 gry8) | ||
21 | { | ||
22 | memset(dst, gry8, size); | ||
23 | } | ||
24 | |||
25 | EFL_ALWAYS_INLINE void | ||
26 | _soft8_pt_fill_transp_solid(DATA8 * dst, DATA8 gry8, DATA8 alpha) | ||
27 | { | ||
28 | *dst = GRY_8_BLEND(gry8, *dst, alpha); | ||
29 | } | ||
30 | |||
31 | static void | ||
32 | _soft8_scanline_fill_transp_solid(DATA8 * dst, int size, DATA8 gry8, | ||
33 | DATA8 alpha) | ||
34 | { | ||
35 | DATA8 *start, *end; | ||
36 | |||
37 | start = dst; | ||
38 | pld(start, 0); | ||
39 | end = start + (size & ~7); | ||
40 | |||
41 | while (start < end) | ||
42 | { | ||
43 | pld(start, 32); | ||
44 | UNROLL8( | ||
45 | { | ||
46 | _soft8_pt_fill_transp_solid(start, gry8, alpha); start++;} | ||
47 | ); | ||
48 | } | ||
49 | |||
50 | end = start + (size & 7); | ||
51 | for (; start < end; start++) | ||
52 | _soft8_pt_fill_transp_solid(start, gry8, alpha); | ||
53 | } | ||