From dd7595a3475407a7fa96a97393bae8c5220e8762 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 4 Jan 2012 18:41:13 +1000 Subject: Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje. Note that embryo wont be used, but I'm not sure yet if you can build edje without it. --- libraries/evas/src/Makefile.am | 3 + libraries/evas/src/Makefile.in | 734 ++ libraries/evas/src/bin/Makefile.am | 43 + libraries/evas/src/bin/Makefile.in | 750 ++ libraries/evas/src/bin/evas_cserve_main.c | 1684 +++ libraries/evas/src/bin/evas_cserve_tool.c | 160 + libraries/evas/src/examples/Makefile.am | 149 + libraries/evas/src/examples/Makefile.in | 983 ++ libraries/evas/src/examples/aspect.edc | 17 + libraries/evas/src/examples/cube1.png | Bin 0 -> 183167 bytes libraries/evas/src/examples/enlightenment.png | Bin 0 -> 17541 bytes libraries/evas/src/examples/evas-aspect-hints.c | 249 + libraries/evas/src/examples/evas-box.c | 382 + libraries/evas/src/examples/evas-buffer-simple.c | 228 + libraries/evas/src/examples/evas-events.c | 413 + libraries/evas/src/examples/evas-hints.c | 375 + libraries/evas/src/examples/evas-images.c | 353 + libraries/evas/src/examples/evas-images2.c | 204 + libraries/evas/src/examples/evas-init-shutdown.c | 56 + libraries/evas/src/examples/evas-map-utils.c | 321 + .../evas/src/examples/evas-object-manipulation.c | 235 + libraries/evas/src/examples/evas-smart-object.c | 708 ++ libraries/evas/src/examples/evas-stacking.c | 329 + libraries/evas/src/examples/evas-text.c | 411 + libraries/evas/src/examples/im1.png | Bin 0 -> 467518 bytes libraries/evas/src/examples/red.png | Bin 0 -> 225 bytes libraries/evas/src/lib/Evas.h | 12236 +++++++++++++++++++ libraries/evas/src/lib/Evas_GL.h | 1412 +++ libraries/evas/src/lib/Makefile.am | 261 + libraries/evas/src/lib/Makefile.in | 1092 ++ libraries/evas/src/lib/cache/Makefile.am | 27 + libraries/evas/src/lib/cache/Makefile.in | 683 ++ libraries/evas/src/lib/cache/evas_cache.h | 175 + .../evas/src/lib/cache/evas_cache_engine_image.c | 699 ++ libraries/evas/src/lib/cache/evas_cache_image.c | 1433 +++ libraries/evas/src/lib/cache/evas_preload.c | 264 + libraries/evas/src/lib/canvas/Makefile.am | 68 + libraries/evas/src/lib/canvas/Makefile.in | 760 ++ libraries/evas/src/lib/canvas/evas_async_events.c | 173 + libraries/evas/src/lib/canvas/evas_callbacks.c | 534 + libraries/evas/src/lib/canvas/evas_clip.c | 321 + libraries/evas/src/lib/canvas/evas_data.c | 72 + libraries/evas/src/lib/canvas/evas_events.c | 1602 +++ libraries/evas/src/lib/canvas/evas_filter.c | 1427 +++ libraries/evas/src/lib/canvas/evas_focus.c | 59 + libraries/evas/src/lib/canvas/evas_font_dir.c | 1349 ++ libraries/evas/src/lib/canvas/evas_gl.c | 245 + libraries/evas/src/lib/canvas/evas_key.c | 245 + libraries/evas/src/lib/canvas/evas_key_grab.c | 179 + libraries/evas/src/lib/canvas/evas_layer.c | 193 + libraries/evas/src/lib/canvas/evas_main.c | 671 + libraries/evas/src/lib/canvas/evas_map.c | 1031 ++ libraries/evas/src/lib/canvas/evas_name.c | 40 + libraries/evas/src/lib/canvas/evas_object_box.c | 2128 ++++ libraries/evas/src/lib/canvas/evas_object_grid.c | 465 + libraries/evas/src/lib/canvas/evas_object_image.c | 3895 ++++++ libraries/evas/src/lib/canvas/evas_object_inform.c | 79 + .../evas/src/lib/canvas/evas_object_intercept.c | 625 + libraries/evas/src/lib/canvas/evas_object_line.c | 461 + libraries/evas/src/lib/canvas/evas_object_main.c | 1319 ++ .../evas/src/lib/canvas/evas_object_polygon.c | 554 + .../evas/src/lib/canvas/evas_object_rectangle.c | 387 + libraries/evas/src/lib/canvas/evas_object_smart.c | 920 ++ .../src/lib/canvas/evas_object_smart_clipped.c | 183 + libraries/evas/src/lib/canvas/evas_object_table.c | 1373 +++ libraries/evas/src/lib/canvas/evas_object_text.c | 1943 +++ .../evas/src/lib/canvas/evas_object_textblock.c | 9569 +++++++++++++++ libraries/evas/src/lib/canvas/evas_rectangle.c | 98 + libraries/evas/src/lib/canvas/evas_render.c | 1866 +++ libraries/evas/src/lib/canvas/evas_smart.c | 266 + libraries/evas/src/lib/canvas/evas_stack.c | 391 + libraries/evas/src/lib/canvas/evas_stats.c | 185 + libraries/evas/src/lib/canvas/evas_touch_point.c | 110 + libraries/evas/src/lib/cserve/Makefile.am | 32 + libraries/evas/src/lib/cserve/Makefile.in | 688 ++ libraries/evas/src/lib/cserve/evas_cs.h | 285 + libraries/evas/src/lib/cserve/evas_cs_client.c | 528 + libraries/evas/src/lib/cserve/evas_cs_main.c | 9 + libraries/evas/src/lib/cserve/evas_cs_mem.c | 168 + libraries/evas/src/lib/cserve/evas_cs_server.c | 380 + libraries/evas/src/lib/engines/Makefile.am | 16 + libraries/evas/src/lib/engines/Makefile.in | 736 ++ libraries/evas/src/lib/engines/common/Makefile.am | 118 + libraries/evas/src/lib/engines/common/Makefile.in | 1005 ++ libraries/evas/src/lib/engines/common/evas_blend.h | 8 + .../evas/src/lib/engines/common/evas_blend_main.c | 325 + .../src/lib/engines/common/evas_blend_private.h | 31 + .../evas/src/lib/engines/common/evas_blit_main.c | 700 ++ .../src/lib/engines/common/evas_convert_color.c | 246 + .../src/lib/engines/common/evas_convert_color.h | 16 + .../lib/engines/common/evas_convert_colorspace.c | 186 + .../lib/engines/common/evas_convert_colorspace.h | 12 + .../src/lib/engines/common/evas_convert_gry_1.c | 6 + .../src/lib/engines/common/evas_convert_gry_1.h | 9 + .../src/lib/engines/common/evas_convert_gry_4.c | 10 + .../src/lib/engines/common/evas_convert_gry_4.h | 9 + .../src/lib/engines/common/evas_convert_gry_8.c | 78 + .../src/lib/engines/common/evas_convert_gry_8.h | 12 + .../src/lib/engines/common/evas_convert_grypal_6.c | 23 + .../src/lib/engines/common/evas_convert_grypal_6.h | 6 + .../src/lib/engines/common/evas_convert_main.c | 632 + .../src/lib/engines/common/evas_convert_main.h | 9 + .../src/lib/engines/common/evas_convert_rgb_16.c | 2089 ++++ .../src/lib/engines/common/evas_convert_rgb_16.h | 50 + .../src/lib/engines/common/evas_convert_rgb_24.c | 89 + .../src/lib/engines/common/evas_convert_rgb_24.h | 10 + .../src/lib/engines/common/evas_convert_rgb_32.c | 460 + .../src/lib/engines/common/evas_convert_rgb_32.h | 24 + .../src/lib/engines/common/evas_convert_rgb_8.c | 248 + .../src/lib/engines/common/evas_convert_rgb_8.h | 14 + .../evas/src/lib/engines/common/evas_convert_yuv.c | 1258 ++ .../evas/src/lib/engines/common/evas_convert_yuv.h | 9 + libraries/evas/src/lib/engines/common/evas_cpu.c | 270 + libraries/evas/src/lib/engines/common/evas_draw.h | 36 + .../evas/src/lib/engines/common/evas_draw_main.c | 576 + libraries/evas/src/lib/engines/common/evas_font.h | 76 + .../lib/engines/common/evas_font_default_walk.x | 144 + .../evas/src/lib/engines/common/evas_font_draw.c | 615 + .../evas/src/lib/engines/common/evas_font_load.c | 929 ++ .../evas/src/lib/engines/common/evas_font_main.c | 547 + .../evas/src/lib/engines/common/evas_font_ot.c | 336 + .../evas/src/lib/engines/common/evas_font_ot.h | 45 + .../src/lib/engines/common/evas_font_private.h | 52 + .../evas/src/lib/engines/common/evas_font_query.c | 789 ++ libraries/evas/src/lib/engines/common/evas_image.h | 63 + .../evas/src/lib/engines/common/evas_image_data.c | 147 + .../evas/src/lib/engines/common/evas_image_load.c | 381 + .../evas/src/lib/engines/common/evas_image_main.c | 818 ++ .../src/lib/engines/common/evas_image_private.h | 17 + .../evas/src/lib/engines/common/evas_image_save.c | 51 + .../src/lib/engines/common/evas_image_scalecache.c | 846 ++ libraries/evas/src/lib/engines/common/evas_line.h | 11 + .../evas/src/lib/engines/common/evas_line_main.c | 678 + .../evas/src/lib/engines/common/evas_map_image.c | 432 + .../evas/src/lib/engines/common/evas_map_image.h | 10 + .../src/lib/engines/common/evas_map_image_core.c | 226 + .../lib/engines/common/evas_map_image_internal.c | 117 + .../src/lib/engines/common/evas_map_image_loop.c | 116 + .../src/lib/engines/common/evas_op_add/Makefile.am | 13 + .../src/lib/engines/common/evas_op_add/Makefile.in | 543 + .../lib/engines/common/evas_op_add/op_add_color_.c | 33 + .../engines/common/evas_op_add/op_add_color_i386.c | 33 + .../common/evas_op_add/op_add_mask_color_.c | 33 + .../common/evas_op_add/op_add_mask_color_i386.c | 33 + .../lib/engines/common/evas_op_add/op_add_pixel_.c | 33 + .../common/evas_op_add/op_add_pixel_color_.c | 33 + .../common/evas_op_add/op_add_pixel_color_i386.c | 29 + .../engines/common/evas_op_add/op_add_pixel_i386.c | 33 + .../common/evas_op_add/op_add_pixel_mask_.c | 37 + .../common/evas_op_add/op_add_pixel_mask_i386.c | 33 + .../src/lib/engines/common/evas_op_add_main_.c | 541 + .../lib/engines/common/evas_op_blend/Makefile.am | 50 + .../lib/engines/common/evas_op_blend/Makefile.in | 720 ++ .../engines/common/evas_op_blend/op_blend_color_.c | 109 + .../common/evas_op_blend/op_blend_color_i386.c | 138 + .../common/evas_op_blend/op_blend_color_neon.c | 223 + .../common/evas_op_blend/op_blend_color_sse3.c | 166 + .../common/evas_op_blend/op_blend_mask_color_.c | 185 + .../evas_op_blend/op_blend_mask_color_i386.c | 251 + .../evas_op_blend/op_blend_mask_color_neon.c | 562 + .../evas_op_blend/op_blend_mask_color_sse3.c | 320 + .../common/evas_op_blend/op_blend_master_sse3.c | 77 + .../engines/common/evas_op_blend/op_blend_pixel_.c | 162 + .../common/evas_op_blend/op_blend_pixel_color_.c | 284 + .../evas_op_blend/op_blend_pixel_color_i386.c | 221 + .../evas_op_blend/op_blend_pixel_color_neon.c | 570 + .../evas_op_blend/op_blend_pixel_color_sse3.c | 543 + .../common/evas_op_blend/op_blend_pixel_i386.c | 217 + .../common/evas_op_blend/op_blend_pixel_mask_.c | 189 + .../evas_op_blend/op_blend_pixel_mask_i386.c | 157 + .../evas_op_blend/op_blend_pixel_mask_neon.c | 129 + .../evas_op_blend/op_blend_pixel_mask_sse3.c | 300 + .../common/evas_op_blend/op_blend_pixel_neon.c | 530 + .../common/evas_op_blend/op_blend_pixel_sse3.c | 316 + .../src/lib/engines/common/evas_op_blend_main_.c | 671 + .../lib/engines/common/evas_op_copy/Makefile.am | 18 + .../lib/engines/common/evas_op_copy/Makefile.in | 548 + .../engines/common/evas_op_copy/op_copy_color_.c | 138 + .../common/evas_op_copy/op_copy_color_i386.c | 150 + .../common/evas_op_copy/op_copy_color_neon.c | 212 + .../common/evas_op_copy/op_copy_mask_color_.c | 170 + .../common/evas_op_copy/op_copy_mask_color_i386.c | 193 + .../common/evas_op_copy/op_copy_mask_color_neon.c | 170 + .../engines/common/evas_op_copy/op_copy_pixel_.c | 117 + .../common/evas_op_copy/op_copy_pixel_color_.c | 236 + .../common/evas_op_copy/op_copy_pixel_color_i386.c | 255 + .../common/evas_op_copy/op_copy_pixel_color_neon.c | 238 + .../common/evas_op_copy/op_copy_pixel_i386.c | 131 + .../common/evas_op_copy/op_copy_pixel_mask_.c | 150 + .../common/evas_op_copy/op_copy_pixel_mask_i386.c | 176 + .../common/evas_op_copy/op_copy_pixel_mask_neon.c | 151 + .../common/evas_op_copy/op_copy_pixel_neon.c | 158 + .../src/lib/engines/common/evas_op_copy_main_.c | 675 + .../lib/engines/common/evas_op_mask/Makefile.am | 13 + .../lib/engines/common/evas_op_mask/Makefile.in | 543 + .../engines/common/evas_op_mask/op_mask_color_.c | 49 + .../common/evas_op_mask/op_mask_color_i386.c | 58 + .../common/evas_op_mask/op_mask_mask_color_.c | 63 + .../common/evas_op_mask/op_mask_mask_color_i386.c | 13 + .../engines/common/evas_op_mask/op_mask_pixel_.c | 48 + .../common/evas_op_mask/op_mask_pixel_color_.c | 100 + .../common/evas_op_mask/op_mask_pixel_color_i386.c | 13 + .../common/evas_op_mask/op_mask_pixel_i386.c | 58 + .../common/evas_op_mask/op_mask_pixel_mask_.c | 62 + .../common/evas_op_mask/op_mask_pixel_mask_i386.c | 13 + .../src/lib/engines/common/evas_op_mask_main_.c | 309 + .../src/lib/engines/common/evas_op_mul/Makefile.am | 13 + .../src/lib/engines/common/evas_op_mul/Makefile.in | 543 + .../lib/engines/common/evas_op_mul/op_mul_color_.c | 65 + .../engines/common/evas_op_mul/op_mul_color_i386.c | 66 + .../common/evas_op_mul/op_mul_mask_color_.c | 72 + .../common/evas_op_mul/op_mul_mask_color_i386.c | 92 + .../lib/engines/common/evas_op_mul/op_mul_pixel_.c | 56 + .../common/evas_op_mul/op_mul_pixel_color_.c | 122 + .../common/evas_op_mul/op_mul_pixel_color_i386.c | 120 + .../engines/common/evas_op_mul/op_mul_pixel_i386.c | 66 + .../common/evas_op_mul/op_mul_pixel_mask_.c | 117 + .../common/evas_op_mul/op_mul_pixel_mask_i386.c | 63 + .../src/lib/engines/common/evas_op_mul_main_.c | 308 + .../src/lib/engines/common/evas_op_sub/Makefile.am | 14 + .../src/lib/engines/common/evas_op_sub/Makefile.in | 543 + .../lib/engines/common/evas_op_sub/op_sub_color_.c | 33 + .../engines/common/evas_op_sub/op_sub_color_i386.c | 33 + .../common/evas_op_sub/op_sub_mask_color_.c | 33 + .../common/evas_op_sub/op_sub_mask_color_i386.c | 33 + .../lib/engines/common/evas_op_sub/op_sub_pixel_.c | 33 + .../common/evas_op_sub/op_sub_pixel_color_.c | 33 + .../common/evas_op_sub/op_sub_pixel_color_i386.c | 29 + .../engines/common/evas_op_sub/op_sub_pixel_i386.c | 33 + .../common/evas_op_sub/op_sub_pixel_mask_.c | 37 + .../common/evas_op_sub/op_sub_pixel_mask_i386.c | 33 + .../src/lib/engines/common/evas_op_sub_main_.c | 542 + libraries/evas/src/lib/engines/common/evas_pipe.c | 1733 +++ libraries/evas/src/lib/engines/common/evas_pipe.h | 111 + .../evas/src/lib/engines/common/evas_polygon.h | 13 + .../src/lib/engines/common/evas_polygon_main.c | 293 + .../evas/src/lib/engines/common/evas_rectangle.h | 11 + .../src/lib/engines/common/evas_rectangle_main.c | 73 + .../evas/src/lib/engines/common/evas_regionbuf.c | 357 + .../evas/src/lib/engines/common/evas_scale_main.c | 6 + .../evas/src/lib/engines/common/evas_scale_main.h | 13 + .../src/lib/engines/common/evas_scale_sample.c | 398 + .../src/lib/engines/common/evas_scale_smooth.c | 532 + .../src/lib/engines/common/evas_scale_smooth.h | 19 + .../lib/engines/common/evas_scale_smooth_scaler.c | 211 + .../engines/common/evas_scale_smooth_scaler_down.c | 43 + .../common/evas_scale_smooth_scaler_downx.c | 259 + .../common/evas_scale_smooth_scaler_downx_downy.c | 387 + .../common/evas_scale_smooth_scaler_downy.c | 260 + .../common/evas_scale_smooth_scaler_noscale.c | 62 + .../engines/common/evas_scale_smooth_scaler_up.c | 266 + .../evas/src/lib/engines/common/evas_scale_span.c | 653 + .../evas/src/lib/engines/common/evas_scale_span.h | 14 + .../evas/src/lib/engines/common/evas_text_utils.c | 472 + .../evas/src/lib/engines/common/evas_text_utils.h | 89 + libraries/evas/src/lib/engines/common/evas_tiler.c | 1391 +++ .../lib/engines/common/language/evas_bidi_utils.c | 641 + .../lib/engines/common/language/evas_bidi_utils.h | 157 + .../engines/common/language/evas_language_utils.c | 146 + .../engines/common/language/evas_language_utils.h | 132 + .../engines/common/language/evas_script_table.h | 3087 +++++ .../evas/src/lib/engines/common_16/Makefile.am | 32 + .../evas/src/lib/engines/common_16/Makefile.in | 698 ++ .../engines/common_16/evas_soft16_dither_mask.c | 293 + .../src/lib/engines/common_16/evas_soft16_font.c | 295 + .../common_16/evas_soft16_image_scaled_sampled.c | 471 + .../engines/common_16/evas_soft16_image_unscaled.c | 287 + .../src/lib/engines/common_16/evas_soft16_line.c | 444 + .../src/lib/engines/common_16/evas_soft16_main.c | 594 + .../engines/common_16/evas_soft16_point_blend.c | 149 + .../lib/engines/common_16/evas_soft16_polygon.c | 231 + .../lib/engines/common_16/evas_soft16_rectangle.c | 121 + .../engines/common_16/evas_soft16_scanline_blend.c | 353 + .../engines/common_16/evas_soft16_scanline_fill.c | 86 + .../evas/src/lib/engines/common_8/Makefile.am | 32 + .../evas/src/lib/engines/common_8/Makefile.in | 696 ++ .../lib/engines/common_8/evas_soft8_dither_mask.c | 100 + .../src/lib/engines/common_8/evas_soft8_font.c | 285 + .../common_8/evas_soft8_image_scaled_sampled.c | 463 + .../engines/common_8/evas_soft8_image_unscaled.c | 284 + .../src/lib/engines/common_8/evas_soft8_line.c | 426 + .../src/lib/engines/common_8/evas_soft8_main.c | 656 + .../src/lib/engines/common_8/evas_soft8_polygon.c | 230 + .../lib/engines/common_8/evas_soft8_rectangle.c | 125 + .../engines/common_8/evas_soft8_scanline_blend.c | 447 + .../engines/common_8/evas_soft8_scanline_fill.c | 53 + libraries/evas/src/lib/file/Makefile.am | 25 + libraries/evas/src/lib/file/Makefile.in | 680 ++ libraries/evas/src/lib/file/evas_module.c | 586 + libraries/evas/src/lib/file/evas_module.h | 94 + libraries/evas/src/lib/file/evas_path.c | 154 + libraries/evas/src/lib/file/evas_path.h | 15 + libraries/evas/src/lib/include/Makefile.am | 13 + libraries/evas/src/lib/include/Makefile.in | 542 + libraries/evas/src/lib/include/evas_blend_ops.h | 378 + libraries/evas/src/lib/include/evas_common.h | 1242 ++ .../evas/src/lib/include/evas_common_soft16.h | 100 + libraries/evas/src/lib/include/evas_common_soft8.h | 184 + libraries/evas/src/lib/include/evas_inline.x | 259 + libraries/evas/src/lib/include/evas_macros.h | 217 + libraries/evas/src/lib/include/evas_mmx.h | 735 ++ libraries/evas/src/lib/include/evas_options.h | 69 + libraries/evas/src/lib/include/evas_private.h | 1107 ++ libraries/evas/src/lib/main.c | 150 + libraries/evas/src/modules/Makefile.am | 3 + libraries/evas/src/modules/Makefile.in | 734 ++ libraries/evas/src/modules/engines/Makefile.am | 71 + libraries/evas/src/modules/engines/Makefile.in | 765 ++ .../modules/engines/buffer/Evas_Engine_Buffer.h | 40 + .../evas/src/modules/engines/buffer/Makefile.am | 44 + .../evas/src/modules/engines/buffer/Makefile.in | 805 ++ .../evas/src/modules/engines/buffer/evas_engine.c | 403 + .../evas/src/modules/engines/buffer/evas_engine.h | 85 + .../evas/src/modules/engines/buffer/evas_outbuf.c | 340 + .../engines/direct3d/Evas_Engine_Direct3D.h | 36 + .../evas/src/modules/engines/direct3d/Makefile.am | 71 + .../evas/src/modules/engines/direct3d/Makefile.in | 1021 ++ .../evas/src/modules/engines/direct3d/array.h | 305 + .../engines/direct3d/evas_direct3d_context.cpp | 8 + .../engines/direct3d/evas_direct3d_context.h | 22 + .../engines/direct3d/evas_direct3d_device.cpp | 393 + .../engines/direct3d/evas_direct3d_device.h | 87 + .../engines/direct3d/evas_direct3d_image_cache.cpp | 436 + .../engines/direct3d/evas_direct3d_image_cache.h | 108 + .../engines/direct3d/evas_direct3d_main.cpp | 774 ++ .../engines/direct3d/evas_direct3d_object.cpp | 12 + .../engines/direct3d/evas_direct3d_object.h | 35 + .../engines/direct3d/evas_direct3d_object_font.cpp | 231 + .../engines/direct3d/evas_direct3d_object_font.h | 113 + .../direct3d/evas_direct3d_object_image.cpp | 320 + .../engines/direct3d/evas_direct3d_object_image.h | 127 + .../engines/direct3d/evas_direct3d_object_line.cpp | 60 + .../engines/direct3d/evas_direct3d_object_line.h | 37 + .../engines/direct3d/evas_direct3d_object_rect.cpp | 65 + .../engines/direct3d/evas_direct3d_object_rect.h | 37 + .../engines/direct3d/evas_direct3d_scene.cpp | 33 + .../modules/engines/direct3d/evas_direct3d_scene.h | 63 + .../engines/direct3d/evas_direct3d_shader_pack.cpp | 344 + .../engines/direct3d/evas_direct3d_shader_pack.h | 75 + .../direct3d/evas_direct3d_vertex_buffer_cache.cpp | 154 + .../direct3d/evas_direct3d_vertex_buffer_cache.h | 60 + .../src/modules/engines/direct3d/evas_engine.c | 503 + .../src/modules/engines/direct3d/evas_engine.h | 125 + libraries/evas/src/modules/engines/direct3d/ref.h | 210 + .../engines/directfb/Evas_Engine_DirectFB.h | 25 + .../evas/src/modules/engines/directfb/Makefile.am | 46 + .../evas/src/modules/engines/directfb/Makefile.in | 805 ++ .../src/modules/engines/directfb/evas_engine.c | 1753 +++ .../src/modules/engines/directfb/evas_engine.h | 71 + .../evas/src/modules/engines/directfb/polygon.c | 269 + .../evas/src/modules/engines/fb/Evas_Engine_FB.h | 25 + libraries/evas/src/modules/engines/fb/Makefile.am | 48 + libraries/evas/src/modules/engines/fb/Makefile.in | 825 ++ .../evas/src/modules/engines/fb/evas_engine.c | 317 + .../evas/src/modules/engines/fb/evas_engine.h | 85 + libraries/evas/src/modules/engines/fb/evas_fb.h | 93 + .../evas/src/modules/engines/fb/evas_fb_main.c | 600 + .../evas/src/modules/engines/fb/evas_outbuf.c | 397 + .../engines/gl_cocoa/Evas_Engine_GL_Cocoa.h | 20 + .../evas/src/modules/engines/gl_cocoa/Makefile.am | 46 + .../evas/src/modules/engines/gl_cocoa/Makefile.in | 848 ++ .../src/modules/engines/gl_cocoa/evas_engine.c | 1462 +++ .../src/modules/engines/gl_cocoa/evas_engine.h | 69 + .../modules/engines/gl_cocoa/evas_gl_cocoa_main.m | 134 + .../evas/src/modules/engines/gl_common/Makefile.am | 164 + .../evas/src/modules/engines/gl_common/Makefile.in | 871 ++ .../src/modules/engines/gl_common/evas_gl_common.h | 659 + .../modules/engines/gl_common/evas_gl_context.c | 2723 +++++ .../src/modules/engines/gl_common/evas_gl_filter.c | 181 + .../src/modules/engines/gl_common/evas_gl_font.c | 203 + .../src/modules/engines/gl_common/evas_gl_image.c | 968 ++ .../src/modules/engines/gl_common/evas_gl_line.c | 32 + .../modules/engines/gl_common/evas_gl_polygon.c | 307 + .../modules/engines/gl_common/evas_gl_private.h | 32 + .../modules/engines/gl_common/evas_gl_rectangle.c | 53 + .../src/modules/engines/gl_common/evas_gl_shader.c | 1262 ++ .../modules/engines/gl_common/evas_gl_texture.c | 1668 +++ .../engines/gl_common/shader/compile-s3c6410.sh | 47 + .../engines/gl_common/shader/compile-sgx.sh | 48 + .../modules/engines/gl_common/shader/filter_blur.h | 24 + .../engines/gl_common/shader/filter_blur.shd | 24 + .../engines/gl_common/shader/filter_blur_bgra.h | 24 + .../engines/gl_common/shader/filter_blur_bgra.shd | 24 + .../gl_common/shader/filter_blur_bgra_nomul.h | 24 + .../gl_common/shader/filter_blur_bgra_nomul.shd | 24 + .../engines/gl_common/shader/filter_blur_nomul.h | 24 + .../engines/gl_common/shader/filter_blur_nomul.shd | 24 + .../engines/gl_common/shader/filter_greyscale.h | 15 + .../engines/gl_common/shader/filter_greyscale.shd | 15 + .../gl_common/shader/filter_greyscale_bgra.h | 15 + .../gl_common/shader/filter_greyscale_bgra.shd | 15 + .../gl_common/shader/filter_greyscale_bgra_nomul.h | 14 + .../shader/filter_greyscale_bgra_nomul.shd | 14 + .../gl_common/shader/filter_greyscale_nomul.h | 14 + .../gl_common/shader/filter_greyscale_nomul.shd | 14 + .../engines/gl_common/shader/filter_invert.h | 14 + .../engines/gl_common/shader/filter_invert.shd | 14 + .../engines/gl_common/shader/filter_invert_bgra.h | 14 + .../gl_common/shader/filter_invert_bgra.shd | 14 + .../gl_common/shader/filter_invert_bgra_nomul.h | 15 + .../gl_common/shader/filter_invert_bgra_nomul.shd | 15 + .../engines/gl_common/shader/filter_invert_nomul.h | 14 + .../gl_common/shader/filter_invert_nomul.shd | 14 + .../engines/gl_common/shader/filter_sepia.h | 20 + .../engines/gl_common/shader/filter_sepia.shd | 20 + .../engines/gl_common/shader/filter_sepia_bgra.h | 20 + .../engines/gl_common/shader/filter_sepia_bgra.shd | 20 + .../gl_common/shader/filter_sepia_bgra_nomul.h | 18 + .../gl_common/shader/filter_sepia_bgra_nomul.shd | 18 + .../engines/gl_common/shader/filter_sepia_nomul.h | 18 + .../gl_common/shader/filter_sepia_nomul.shd | 18 + .../modules/engines/gl_common/shader/font_frag.h | 14 + .../modules/engines/gl_common/shader/font_frag.shd | 14 + .../gl_common/shader/font_frag_bin_s3c6410.h | 9 + .../engines/gl_common/shader/font_frag_s3c6410.asm | 26 + .../modules/engines/gl_common/shader/font_vert.h | 15 + .../modules/engines/gl_common/shader/font_vert.shd | 15 + .../gl_common/shader/font_vert_bin_s3c6410.h | 20 + .../engines/gl_common/shader/img_bgra_frag.h | 14 + .../engines/gl_common/shader/img_bgra_frag.shd | 14 + .../gl_common/shader/img_bgra_frag_bin_s3c6410.h | 11 + .../engines/gl_common/shader/img_bgra_nomul_frag.h | 13 + .../gl_common/shader/img_bgra_nomul_frag.shd | 13 + .../shader/img_bgra_nomul_frag_bin_s3c6410.h | 10 + .../engines/gl_common/shader/img_bgra_nomul_vert.h | 12 + .../gl_common/shader/img_bgra_nomul_vert.shd | 12 + .../shader/img_bgra_nomul_vert_bin_s3c6410.h | 17 + .../engines/gl_common/shader/img_bgra_vert.h | 15 + .../engines/gl_common/shader/img_bgra_vert.shd | 15 + .../gl_common/shader/img_bgra_vert_bin_s3c6410.h | 20 + .../modules/engines/gl_common/shader/img_frag.h | 14 + .../modules/engines/gl_common/shader/img_frag.shd | 14 + .../gl_common/shader/img_frag_bin_s3c6410.h | 9 + .../engines/gl_common/shader/img_frag_s3c6410.asm | 26 + .../engines/gl_common/shader/img_mask_frag.h | 15 + .../engines/gl_common/shader/img_mask_vert.h | 16 + .../engines/gl_common/shader/img_nomul_frag.h | 13 + .../engines/gl_common/shader/img_nomul_frag.shd | 13 + .../gl_common/shader/img_nomul_frag_bin_s3c6410.h | 10 + .../engines/gl_common/shader/img_nomul_vert.h | 12 + .../engines/gl_common/shader/img_nomul_vert.shd | 12 + .../gl_common/shader/img_nomul_vert_bin_s3c6410.h | 17 + .../modules/engines/gl_common/shader/img_vert.h | 15 + .../modules/engines/gl_common/shader/img_vert.shd | 15 + .../gl_common/shader/img_vert_bin_s3c6410.h | 20 + .../modules/engines/gl_common/shader/make-c-bin.sh | 3 + .../modules/engines/gl_common/shader/make-c-str.sh | 3 + .../modules/engines/gl_common/shader/nv12_frag.h | 31 + .../modules/engines/gl_common/shader/nv12_frag.shd | 31 + .../engines/gl_common/shader/nv12_nomul_frag.h | 31 + .../engines/gl_common/shader/nv12_nomul_frag.shd | 31 + .../engines/gl_common/shader/nv12_nomul_vert.h | 14 + .../engines/gl_common/shader/nv12_nomul_vert.shd | 14 + .../modules/engines/gl_common/shader/nv12_vert.h | 16 + .../modules/engines/gl_common/shader/nv12_vert.shd | 16 + .../modules/engines/gl_common/shader/rect_frag.h | 13 + .../modules/engines/gl_common/shader/rect_frag.shd | 13 + .../gl_common/shader/rect_frag_bin_s3c6410.h | 6 + .../engines/gl_common/shader/rect_frag_s3c6410.asm | 24 + .../modules/engines/gl_common/shader/rect_vert.h | 12 + .../modules/engines/gl_common/shader/rect_vert.shd | 12 + .../gl_common/shader/rect_vert_bin_s3c6410.h | 17 + .../modules/engines/gl_common/shader/tex_frag.h | 14 + .../modules/engines/gl_common/shader/tex_frag.shd | 14 + .../gl_common/shader/tex_frag_bin_s3c6410.h | 9 + .../engines/gl_common/shader/tex_frag_s3c6410.asm | 26 + .../engines/gl_common/shader/tex_nomul_frag.h | 13 + .../engines/gl_common/shader/tex_nomul_frag.shd | 13 + .../gl_common/shader/tex_nomul_frag_bin_s3c6410.h | 10 + .../engines/gl_common/shader/tex_nomul_vert.h | 12 + .../engines/gl_common/shader/tex_nomul_vert.shd | 12 + .../gl_common/shader/tex_nomul_vert_bin_s3c6410.h | 17 + .../modules/engines/gl_common/shader/tex_vert.h | 15 + .../modules/engines/gl_common/shader/tex_vert.shd | 15 + .../gl_common/shader/tex_vert_bin_s3c6410.h | 20 + .../modules/engines/gl_common/shader/yuv_frag.h | 20 + .../modules/engines/gl_common/shader/yuv_frag.shd | 20 + .../gl_common/shader/yuv_frag_bin_s3c6410.h | 24 + .../engines/gl_common/shader/yuv_frag_s3c6410.asm | 46 + .../engines/gl_common/shader/yuv_nomul_frag.h | 19 + .../engines/gl_common/shader/yuv_nomul_frag.shd | 19 + .../gl_common/shader/yuv_nomul_frag_bin_s3c6410.h | 23 + .../engines/gl_common/shader/yuv_nomul_vert.h | 14 + .../engines/gl_common/shader/yuv_nomul_vert.shd | 14 + .../gl_common/shader/yuv_nomul_vert_bin_s3c6410.h | 23 + .../modules/engines/gl_common/shader/yuv_vert.h | 17 + .../modules/engines/gl_common/shader/yuv_vert.shd | 17 + .../gl_common/shader/yuv_vert_bin_s3c6410.h | 26 + .../modules/engines/gl_common/shader/yuy2_frag.h | 30 + .../modules/engines/gl_common/shader/yuy2_frag.shd | 30 + .../engines/gl_common/shader/yuy2_nomul_frag.h | 30 + .../engines/gl_common/shader/yuy2_nomul_frag.shd | 30 + .../engines/gl_common/shader/yuy2_nomul_vert.h | 13 + .../engines/gl_common/shader/yuy2_nomul_vert.shd | 13 + .../modules/engines/gl_common/shader/yuy2_vert.h | 16 + .../modules/engines/gl_common/shader/yuy2_vert.shd | 16 + .../modules/engines/gl_sdl/Evas_Engine_GL_SDL.h | 24 + .../evas/src/modules/engines/gl_sdl/Makefile.am | 46 + .../evas/src/modules/engines/gl_sdl/Makefile.in | 796 ++ .../evas/src/modules/engines/gl_sdl/evas_engine.c | 1081 ++ .../evas/src/modules/engines/gl_sdl/evas_engine.h | 73 + .../modules/engines/gl_x11/Evas_Engine_GL_X11.h | 46 + .../evas/src/modules/engines/gl_x11/Makefile.am | 47 + .../evas/src/modules/engines/gl_x11/Makefile.in | 810 ++ .../evas/src/modules/engines/gl_x11/evas_engine.c | 3993 ++++++ .../evas/src/modules/engines/gl_x11/evas_engine.h | 126 + .../evas/src/modules/engines/gl_x11/evas_x_main.c | 901 ++ .../modules/engines/psl1ght/Evas_Engine_PSL1GHT.h | 16 + .../evas/src/modules/engines/psl1ght/Makefile.am | 47 + .../evas/src/modules/engines/psl1ght/Makefile.in | 810 ++ .../evas/src/modules/engines/psl1ght/evas_engine.c | 511 + .../evas/src/modules/engines/psl1ght/evas_engine.h | 30 + .../evas/src/modules/engines/psl1ght/rsxutil.c | 275 + .../evas/src/modules/engines/psl1ght/rsxutil.h | 43 + .../src/modules/engines/software_16/Makefile.am | 39 + .../src/modules/engines/software_16/Makefile.in | 765 ++ .../src/modules/engines/software_16/evas_engine.c | 399 + .../Evas_Engine_Software_16_DDraw.h | 32 + .../modules/engines/software_16_ddraw/Makefile.am | 49 + .../modules/engines/software_16_ddraw/Makefile.in | 869 ++ .../software_16_ddraw/evas_ddraw_buffer.cpp | 87 + .../engines/software_16_ddraw/evas_ddraw_main.cpp | 71 + .../engines/software_16_ddraw/evas_engine.c | 628 + .../engines/software_16_ddraw/evas_engine.h | 85 + .../engines/software_16_sdl/Evas_Engine_SDL_16.h | 25 + .../modules/engines/software_16_sdl/Makefile.am | 40 + .../modules/engines/software_16_sdl/Makefile.in | 780 ++ .../modules/engines/software_16_sdl/evas_engine.c | 1337 ++ .../modules/engines/software_16_sdl/evas_engine.h | 79 + .../Evas_Engine_Software_16_WinCE.h | 35 + .../modules/engines/software_16_wince/Makefile.am | 52 + .../modules/engines/software_16_wince/Makefile.in | 898 ++ .../engines/software_16_wince/evas_engine.c | 770 ++ .../engines/software_16_wince/evas_engine.h | 120 + .../software_16_wince/evas_wince_ddraw_buffer.cpp | 195 + .../software_16_wince/evas_wince_fb_buffer.c | 210 + .../software_16_wince/evas_wince_gapi_buffer.c | 341 + .../software_16_wince/evas_wince_gdi_buffer.c | 165 + .../software_16_x11/Evas_Engine_Software_16_X11.h | 26 + .../modules/engines/software_16_x11/Makefile.am | 47 + .../modules/engines/software_16_x11/Makefile.in | 812 ++ .../modules/engines/software_16_x11/evas_engine.c | 741 ++ .../modules/engines/software_16_x11/evas_engine.h | 63 + .../engines/software_16_x11/evas_x_buffer.c | 186 + .../src/modules/engines/software_8/Makefile.am | 39 + .../src/modules/engines/software_8/Makefile.in | 764 ++ .../src/modules/engines/software_8/evas_engine.c | 440 + .../software_8_x11/Evas_Engine_Software_8_X11.h | 38 + .../src/modules/engines/software_8_x11/Makefile.am | 49 + .../src/modules/engines/software_8_x11/Makefile.in | 814 ++ .../modules/engines/software_8_x11/evas_engine.c | 699 ++ .../modules/engines/software_8_x11/evas_engine.h | 65 + .../modules/engines/software_8_x11/evas_x_buffer.c | 243 + .../software_ddraw/Evas_Engine_Software_DDraw.h | 30 + .../src/modules/engines/software_ddraw/Makefile.am | 48 + .../src/modules/engines/software_ddraw/Makefile.in | 880 ++ .../engines/software_ddraw/evas_ddraw_buffer.c | 92 + .../engines/software_ddraw/evas_ddraw_main.cpp | 248 + .../modules/engines/software_ddraw/evas_engine.c | 379 + .../modules/engines/software_ddraw/evas_engine.h | 220 + .../modules/engines/software_ddraw/evas_outbuf.c | 460 + .../software_gdi/Evas_Engine_Software_Gdi.h | 32 + .../src/modules/engines/software_gdi/Makefile.am | 47 + .../src/modules/engines/software_gdi/Makefile.in | 838 ++ .../src/modules/engines/software_gdi/evas_engine.c | 387 + .../src/modules/engines/software_gdi/evas_engine.h | 209 + .../modules/engines/software_gdi/evas_gdi_buffer.c | 88 + .../modules/engines/software_gdi/evas_gdi_main.c | 100 + .../src/modules/engines/software_gdi/evas_outbuf.c | 656 + .../modules/engines/software_generic/Makefile.am | 35 + .../modules/engines/software_generic/Makefile.in | 763 ++ .../modules/engines/software_generic/evas_engine.c | 1230 ++ .../modules/engines/software_sdl/Evas_Engine_SDL.h | 27 + .../src/modules/engines/software_sdl/Makefile.am | 45 + .../src/modules/engines/software_sdl/Makefile.in | 796 ++ .../src/modules/engines/software_sdl/evas_engine.c | 1218 ++ .../src/modules/engines/software_sdl/evas_engine.h | 72 + .../software_x11/Evas_Engine_Software_X11.h | 52 + .../src/modules/engines/software_x11/Makefile.am | 85 + .../src/modules/engines/software_x11/Makefile.in | 948 ++ .../src/modules/engines/software_x11/evas_engine.c | 929 ++ .../src/modules/engines/software_x11/evas_engine.h | 137 + .../modules/engines/software_x11/evas_xcb_buffer.c | 498 + .../modules/engines/software_x11/evas_xcb_buffer.h | 30 + .../modules/engines/software_x11/evas_xcb_color.c | 424 + .../modules/engines/software_x11/evas_xcb_color.h | 10 + .../modules/engines/software_x11/evas_xcb_main.c | 8 + .../modules/engines/software_x11/evas_xcb_outbuf.c | 1092 ++ .../modules/engines/software_x11/evas_xcb_outbuf.h | 30 + .../engines/software_x11/evas_xcb_xdefaults.c | 108 + .../engines/software_x11/evas_xcb_xdefaults.h | 11 + .../engines/software_x11/evas_xlib_buffer.c | 428 + .../engines/software_x11/evas_xlib_buffer.h | 45 + .../modules/engines/software_x11/evas_xlib_color.c | 368 + .../modules/engines/software_x11/evas_xlib_color.h | 16 + .../modules/engines/software_x11/evas_xlib_main.c | 7 + .../engines/software_x11/evas_xlib_outbuf.c | 1135 ++ .../engines/software_x11/evas_xlib_outbuf.h | 92 + libraries/evas/src/modules/loaders/Makefile.am | 93 + libraries/evas/src/modules/loaders/Makefile.in | 754 ++ libraries/evas/src/modules/loaders/TODO | 5 + libraries/evas/src/modules/loaders/bmp/Makefile.am | 33 + libraries/evas/src/modules/loaders/bmp/Makefile.in | 758 ++ .../src/modules/loaders/bmp/evas_image_load_bmp.c | 1451 +++ libraries/evas/src/modules/loaders/edb/Makefile.am | 34 + libraries/evas/src/modules/loaders/edb/Makefile.in | 757 ++ .../src/modules/loaders/edb/evas_image_load_edb.c | 250 + libraries/evas/src/modules/loaders/eet/Makefile.am | 36 + libraries/evas/src/modules/loaders/eet/Makefile.in | 758 ++ .../src/modules/loaders/eet/evas_image_load_eet.c | 182 + .../evas/src/modules/loaders/generic/Makefile.am | 38 + .../evas/src/modules/loaders/generic/Makefile.in | 761 ++ .../loaders/generic/evas_image_load_generic.c | 430 + libraries/evas/src/modules/loaders/gif/Makefile.am | 35 + libraries/evas/src/modules/loaders/gif/Makefile.in | 758 ++ .../src/modules/loaders/gif/evas_image_load_gif.c | 1030 ++ libraries/evas/src/modules/loaders/ico/Makefile.am | 33 + libraries/evas/src/modules/loaders/ico/Makefile.in | 758 ++ .../src/modules/loaders/ico/evas_image_load_ico.c | 770 ++ .../evas/src/modules/loaders/jpeg/Makefile.am | 36 + .../evas/src/modules/loaders/jpeg/Makefile.in | 760 ++ .../modules/loaders/jpeg/evas_image_load_jpeg.c | 1265 ++ .../evas/src/modules/loaders/pmaps/Makefile.am | 36 + .../evas/src/modules/loaders/pmaps/Makefile.in | 760 ++ .../modules/loaders/pmaps/evas_image_load_pmaps.c | 558 + libraries/evas/src/modules/loaders/png/Makefile.am | 34 + libraries/evas/src/modules/loaders/png/Makefile.in | 759 ++ .../src/modules/loaders/png/evas_image_load_png.c | 328 + libraries/evas/src/modules/loaders/psd/Makefile.am | 33 + libraries/evas/src/modules/loaders/psd/Makefile.in | 758 ++ .../src/modules/loaders/psd/evas_image_load_psd.c | 976 ++ libraries/evas/src/modules/loaders/svg/Makefile.am | 34 + libraries/evas/src/modules/loaders/svg/Makefile.in | 758 ++ .../src/modules/loaders/svg/evas_image_load_svg.c | 280 + libraries/evas/src/modules/loaders/tga/Makefile.am | 33 + libraries/evas/src/modules/loaders/tga/Makefile.in | 758 ++ .../src/modules/loaders/tga/evas_image_load_tga.c | 596 + .../evas/src/modules/loaders/tiff/Makefile.am | 37 + .../evas/src/modules/loaders/tiff/Makefile.in | 760 ++ .../modules/loaders/tiff/evas_image_load_tiff.c | 324 + .../evas/src/modules/loaders/wbmp/Makefile.am | 33 + .../evas/src/modules/loaders/wbmp/Makefile.in | 758 ++ .../modules/loaders/wbmp/evas_image_load_wbmp.c | 170 + libraries/evas/src/modules/loaders/xpm/Makefile.am | 37 + libraries/evas/src/modules/loaders/xpm/Makefile.in | 760 ++ .../src/modules/loaders/xpm/evas_image_load_xpm.c | 691 ++ libraries/evas/src/modules/savers/Makefile.am | 33 + libraries/evas/src/modules/savers/Makefile.in | 740 ++ libraries/evas/src/modules/savers/edb/Makefile.am | 32 + libraries/evas/src/modules/savers/edb/Makefile.in | 755 ++ .../src/modules/savers/edb/evas_image_save_edb.c | 48 + libraries/evas/src/modules/savers/eet/Makefile.am | 35 + libraries/evas/src/modules/savers/eet/Makefile.in | 758 ++ .../src/modules/savers/eet/evas_image_save_eet.c | 83 + libraries/evas/src/modules/savers/jpeg/Makefile.am | 34 + libraries/evas/src/modules/savers/jpeg/Makefile.in | 758 ++ .../src/modules/savers/jpeg/evas_image_save_jpeg.c | 156 + libraries/evas/src/modules/savers/png/Makefile.am | 37 + libraries/evas/src/modules/savers/png/Makefile.in | 760 ++ .../src/modules/savers/png/evas_image_save_png.c | 193 + libraries/evas/src/modules/savers/tiff/Makefile.am | 35 + libraries/evas/src/modules/savers/tiff/Makefile.in | 758 ++ .../src/modules/savers/tiff/evas_image_save_tiff.c | 139 + libraries/evas/src/static_deps/Makefile.am | 7 + libraries/evas/src/static_deps/Makefile.in | 735 ++ .../evas/src/static_deps/liblinebreak/AUTHORS | 6 + .../evas/src/static_deps/liblinebreak/ChangeLog | 397 + .../evas/src/static_deps/liblinebreak/LICENCE | 18 + .../src/static_deps/liblinebreak/LineBreak1.sed | 1 + .../src/static_deps/liblinebreak/LineBreak2.sed | 2 + .../evas/src/static_deps/liblinebreak/Makefile.am | 18 + .../evas/src/static_deps/liblinebreak/Makefile.in | 681 ++ libraries/evas/src/static_deps/liblinebreak/NEWS | 37 + libraries/evas/src/static_deps/liblinebreak/README | 86 + .../evas/src/static_deps/liblinebreak/linebreak.c | 737 ++ .../evas/src/static_deps/liblinebreak/linebreak.h | 87 + .../src/static_deps/liblinebreak/linebreakdata.c | 1868 +++ .../static_deps/liblinebreak/linebreakdata1.tmpl | 1 + .../static_deps/liblinebreak/linebreakdata2.tmpl | 7 + .../static_deps/liblinebreak/linebreakdata3.tmpl | 2 + .../src/static_deps/liblinebreak/linebreakdef.c | 139 + .../src/static_deps/liblinebreak/linebreakdef.h | 149 + libraries/evas/src/tests/Makefile.am | 29 + libraries/evas/src/tests/Makefile.in | 693 ++ libraries/evas/src/tests/evas_suite.c | 104 + libraries/evas/src/tests/evas_suite.h | 12 + libraries/evas/src/tests/evas_test_callbacks.c | 135 + libraries/evas/src/tests/evas_test_init.c | 21 + libraries/evas/src/tests/evas_test_text.c | 493 + libraries/evas/src/tests/evas_test_textblock.c | 1973 +++ libraries/evas/src/tests/evas_tests_helpers.h | 40 + 691 files changed, 227159 insertions(+) create mode 100644 libraries/evas/src/Makefile.am create mode 100644 libraries/evas/src/Makefile.in create mode 100644 libraries/evas/src/bin/Makefile.am create mode 100644 libraries/evas/src/bin/Makefile.in create mode 100644 libraries/evas/src/bin/evas_cserve_main.c create mode 100644 libraries/evas/src/bin/evas_cserve_tool.c create mode 100644 libraries/evas/src/examples/Makefile.am create mode 100644 libraries/evas/src/examples/Makefile.in create mode 100644 libraries/evas/src/examples/aspect.edc create mode 100644 libraries/evas/src/examples/cube1.png create mode 100644 libraries/evas/src/examples/enlightenment.png create mode 100644 libraries/evas/src/examples/evas-aspect-hints.c create mode 100644 libraries/evas/src/examples/evas-box.c create mode 100644 libraries/evas/src/examples/evas-buffer-simple.c create mode 100644 libraries/evas/src/examples/evas-events.c create mode 100644 libraries/evas/src/examples/evas-hints.c create mode 100644 libraries/evas/src/examples/evas-images.c create mode 100644 libraries/evas/src/examples/evas-images2.c create mode 100644 libraries/evas/src/examples/evas-init-shutdown.c create mode 100644 libraries/evas/src/examples/evas-map-utils.c create mode 100644 libraries/evas/src/examples/evas-object-manipulation.c create mode 100644 libraries/evas/src/examples/evas-smart-object.c create mode 100644 libraries/evas/src/examples/evas-stacking.c create mode 100644 libraries/evas/src/examples/evas-text.c create mode 100644 libraries/evas/src/examples/im1.png create mode 100644 libraries/evas/src/examples/red.png create mode 100644 libraries/evas/src/lib/Evas.h create mode 100644 libraries/evas/src/lib/Evas_GL.h create mode 100644 libraries/evas/src/lib/Makefile.am create mode 100644 libraries/evas/src/lib/Makefile.in create mode 100644 libraries/evas/src/lib/cache/Makefile.am create mode 100644 libraries/evas/src/lib/cache/Makefile.in create mode 100644 libraries/evas/src/lib/cache/evas_cache.h create mode 100644 libraries/evas/src/lib/cache/evas_cache_engine_image.c create mode 100644 libraries/evas/src/lib/cache/evas_cache_image.c create mode 100644 libraries/evas/src/lib/cache/evas_preload.c create mode 100644 libraries/evas/src/lib/canvas/Makefile.am create mode 100644 libraries/evas/src/lib/canvas/Makefile.in create mode 100644 libraries/evas/src/lib/canvas/evas_async_events.c create mode 100644 libraries/evas/src/lib/canvas/evas_callbacks.c create mode 100644 libraries/evas/src/lib/canvas/evas_clip.c create mode 100644 libraries/evas/src/lib/canvas/evas_data.c create mode 100644 libraries/evas/src/lib/canvas/evas_events.c create mode 100644 libraries/evas/src/lib/canvas/evas_filter.c create mode 100644 libraries/evas/src/lib/canvas/evas_focus.c create mode 100644 libraries/evas/src/lib/canvas/evas_font_dir.c create mode 100644 libraries/evas/src/lib/canvas/evas_gl.c create mode 100644 libraries/evas/src/lib/canvas/evas_key.c create mode 100644 libraries/evas/src/lib/canvas/evas_key_grab.c create mode 100644 libraries/evas/src/lib/canvas/evas_layer.c create mode 100644 libraries/evas/src/lib/canvas/evas_main.c create mode 100644 libraries/evas/src/lib/canvas/evas_map.c create mode 100644 libraries/evas/src/lib/canvas/evas_name.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_box.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_grid.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_image.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_inform.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_intercept.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_line.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_main.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_polygon.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_rectangle.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_smart.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_smart_clipped.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_table.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_text.c create mode 100644 libraries/evas/src/lib/canvas/evas_object_textblock.c create mode 100644 libraries/evas/src/lib/canvas/evas_rectangle.c create mode 100644 libraries/evas/src/lib/canvas/evas_render.c create mode 100644 libraries/evas/src/lib/canvas/evas_smart.c create mode 100644 libraries/evas/src/lib/canvas/evas_stack.c create mode 100644 libraries/evas/src/lib/canvas/evas_stats.c create mode 100644 libraries/evas/src/lib/canvas/evas_touch_point.c create mode 100644 libraries/evas/src/lib/cserve/Makefile.am create mode 100644 libraries/evas/src/lib/cserve/Makefile.in create mode 100644 libraries/evas/src/lib/cserve/evas_cs.h create mode 100644 libraries/evas/src/lib/cserve/evas_cs_client.c create mode 100644 libraries/evas/src/lib/cserve/evas_cs_main.c create mode 100644 libraries/evas/src/lib/cserve/evas_cs_mem.c create mode 100644 libraries/evas/src/lib/cserve/evas_cs_server.c create mode 100644 libraries/evas/src/lib/engines/Makefile.am create mode 100644 libraries/evas/src/lib/engines/Makefile.in create mode 100644 libraries/evas/src/lib/engines/common/Makefile.am create mode 100644 libraries/evas/src/lib/engines/common/Makefile.in create mode 100644 libraries/evas/src/lib/engines/common/evas_blend.h create mode 100644 libraries/evas/src/lib/engines/common/evas_blend_main.c create mode 100644 libraries/evas/src/lib/engines/common/evas_blend_private.h create mode 100644 libraries/evas/src/lib/engines/common/evas_blit_main.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_color.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_color.h create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_colorspace.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_colorspace.h create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_1.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_1.h create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_4.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_4.h create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_8.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_8.h create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_main.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_main.h create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_yuv.c create mode 100644 libraries/evas/src/lib/engines/common/evas_convert_yuv.h create mode 100644 libraries/evas/src/lib/engines/common/evas_cpu.c create mode 100644 libraries/evas/src/lib/engines/common/evas_draw.h create mode 100644 libraries/evas/src/lib/engines/common/evas_draw_main.c create mode 100644 libraries/evas/src/lib/engines/common/evas_font.h create mode 100644 libraries/evas/src/lib/engines/common/evas_font_default_walk.x create mode 100644 libraries/evas/src/lib/engines/common/evas_font_draw.c create mode 100644 libraries/evas/src/lib/engines/common/evas_font_load.c create mode 100644 libraries/evas/src/lib/engines/common/evas_font_main.c create mode 100644 libraries/evas/src/lib/engines/common/evas_font_ot.c create mode 100644 libraries/evas/src/lib/engines/common/evas_font_ot.h create mode 100644 libraries/evas/src/lib/engines/common/evas_font_private.h create mode 100644 libraries/evas/src/lib/engines/common/evas_font_query.c create mode 100644 libraries/evas/src/lib/engines/common/evas_image.h create mode 100644 libraries/evas/src/lib/engines/common/evas_image_data.c create mode 100644 libraries/evas/src/lib/engines/common/evas_image_load.c create mode 100644 libraries/evas/src/lib/engines/common/evas_image_main.c create mode 100644 libraries/evas/src/lib/engines/common/evas_image_private.h create mode 100644 libraries/evas/src/lib/engines/common/evas_image_save.c create mode 100644 libraries/evas/src/lib/engines/common/evas_image_scalecache.c create mode 100644 libraries/evas/src/lib/engines/common/evas_line.h create mode 100644 libraries/evas/src/lib/engines/common/evas_line_main.c create mode 100644 libraries/evas/src/lib/engines/common/evas_map_image.c create mode 100644 libraries/evas/src/lib/engines/common/evas_map_image.h create mode 100644 libraries/evas/src/lib/engines/common/evas_map_image_core.c create mode 100644 libraries/evas/src/lib/engines/common/evas_map_image_internal.c create mode 100644 libraries/evas/src/lib/engines/common/evas_map_image_loop.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_add_main_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend_main_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy_main_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask_main_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul_main_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c create mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub_main_.c create mode 100644 libraries/evas/src/lib/engines/common/evas_pipe.c create mode 100644 libraries/evas/src/lib/engines/common/evas_pipe.h create mode 100644 libraries/evas/src/lib/engines/common/evas_polygon.h create mode 100644 libraries/evas/src/lib/engines/common/evas_polygon_main.c create mode 100644 libraries/evas/src/lib/engines/common/evas_rectangle.h create mode 100644 libraries/evas/src/lib/engines/common/evas_rectangle_main.c create mode 100644 libraries/evas/src/lib/engines/common/evas_regionbuf.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_main.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_main.h create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_sample.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth.h create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_span.c create mode 100644 libraries/evas/src/lib/engines/common/evas_scale_span.h create mode 100644 libraries/evas/src/lib/engines/common/evas_text_utils.c create mode 100644 libraries/evas/src/lib/engines/common/evas_text_utils.h create mode 100644 libraries/evas/src/lib/engines/common/evas_tiler.c create mode 100644 libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c create mode 100644 libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h create mode 100644 libraries/evas/src/lib/engines/common/language/evas_language_utils.c create mode 100644 libraries/evas/src/lib/engines/common/language/evas_language_utils.h create mode 100644 libraries/evas/src/lib/engines/common/language/evas_script_table.h create mode 100644 libraries/evas/src/lib/engines/common_16/Makefile.am create mode 100644 libraries/evas/src/lib/engines/common_16/Makefile.in create mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c create mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_font.c create mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c create mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c create mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_line.c create mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_main.c create mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c create mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c create mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c create mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c create mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c create mode 100644 libraries/evas/src/lib/engines/common_8/Makefile.am create mode 100644 libraries/evas/src/lib/engines/common_8/Makefile.in create mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c create mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_font.c create mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c create mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c create mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_line.c create mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_main.c create mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c create mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c create mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c create mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c create mode 100644 libraries/evas/src/lib/file/Makefile.am create mode 100644 libraries/evas/src/lib/file/Makefile.in create mode 100644 libraries/evas/src/lib/file/evas_module.c create mode 100644 libraries/evas/src/lib/file/evas_module.h create mode 100644 libraries/evas/src/lib/file/evas_path.c create mode 100644 libraries/evas/src/lib/file/evas_path.h create mode 100644 libraries/evas/src/lib/include/Makefile.am create mode 100644 libraries/evas/src/lib/include/Makefile.in create mode 100644 libraries/evas/src/lib/include/evas_blend_ops.h create mode 100644 libraries/evas/src/lib/include/evas_common.h create mode 100644 libraries/evas/src/lib/include/evas_common_soft16.h create mode 100644 libraries/evas/src/lib/include/evas_common_soft8.h create mode 100644 libraries/evas/src/lib/include/evas_inline.x create mode 100644 libraries/evas/src/lib/include/evas_macros.h create mode 100644 libraries/evas/src/lib/include/evas_mmx.h create mode 100644 libraries/evas/src/lib/include/evas_options.h create mode 100644 libraries/evas/src/lib/include/evas_private.h create mode 100644 libraries/evas/src/lib/main.c create mode 100644 libraries/evas/src/modules/Makefile.am create mode 100644 libraries/evas/src/modules/Makefile.in create mode 100644 libraries/evas/src/modules/engines/Makefile.am create mode 100644 libraries/evas/src/modules/engines/Makefile.in create mode 100644 libraries/evas/src/modules/engines/buffer/Evas_Engine_Buffer.h create mode 100644 libraries/evas/src/modules/engines/buffer/Makefile.am create mode 100644 libraries/evas/src/modules/engines/buffer/Makefile.in create mode 100644 libraries/evas/src/modules/engines/buffer/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/buffer/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/buffer/evas_outbuf.c create mode 100644 libraries/evas/src/modules/engines/direct3d/Evas_Engine_Direct3D.h create mode 100644 libraries/evas/src/modules/engines/direct3d/Makefile.am create mode 100644 libraries/evas/src/modules/engines/direct3d/Makefile.in create mode 100644 libraries/evas/src/modules/engines/direct3d/array.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_context.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_context.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_device.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_device.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_image_cache.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_image_cache.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_main.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_object.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_object.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_image.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_image.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_line.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_line.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_rect.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_rect.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_scene.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_scene.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_vertex_buffer_cache.cpp create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_direct3d_vertex_buffer_cache.h create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/direct3d/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/direct3d/ref.h create mode 100644 libraries/evas/src/modules/engines/directfb/Evas_Engine_DirectFB.h create mode 100644 libraries/evas/src/modules/engines/directfb/Makefile.am create mode 100644 libraries/evas/src/modules/engines/directfb/Makefile.in create mode 100644 libraries/evas/src/modules/engines/directfb/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/directfb/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/directfb/polygon.c create mode 100644 libraries/evas/src/modules/engines/fb/Evas_Engine_FB.h create mode 100644 libraries/evas/src/modules/engines/fb/Makefile.am create mode 100644 libraries/evas/src/modules/engines/fb/Makefile.in create mode 100644 libraries/evas/src/modules/engines/fb/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/fb/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/fb/evas_fb.h create mode 100644 libraries/evas/src/modules/engines/fb/evas_fb_main.c create mode 100644 libraries/evas/src/modules/engines/fb/evas_outbuf.c create mode 100644 libraries/evas/src/modules/engines/gl_cocoa/Evas_Engine_GL_Cocoa.h create mode 100644 libraries/evas/src/modules/engines/gl_cocoa/Makefile.am create mode 100644 libraries/evas/src/modules/engines/gl_cocoa/Makefile.in create mode 100644 libraries/evas/src/modules/engines/gl_cocoa/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/gl_cocoa/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/gl_cocoa/evas_gl_cocoa_main.m create mode 100644 libraries/evas/src/modules/engines/gl_common/Makefile.am create mode 100644 libraries/evas/src/modules/engines/gl_common/Makefile.in create mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_common.h create mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_context.c create mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_filter.c create mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_font.c create mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_image.c create mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_line.c create mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_polygon.c create mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_private.h create mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_rectangle.c create mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_shader.c create mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c create mode 100755 libraries/evas/src/modules/engines/gl_common/shader/compile-s3c6410.sh create mode 100755 libraries/evas/src/modules/engines/gl_common/shader/compile-sgx.sh create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_frag_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_frag_s3c6410.asm create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_vert_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_frag_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_frag_s3c6410.asm create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_mask_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_mask_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_vert_bin_s3c6410.h create mode 100755 libraries/evas/src/modules/engines/gl_common/shader/make-c-bin.sh create mode 100755 libraries/evas/src/modules/engines/gl_common/shader/make-c-str.sh create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_frag_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_frag_s3c6410.asm create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_vert_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_frag_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_frag_s3c6410.asm create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_vert_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_s3c6410.asm create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_vert_bin_s3c6410.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.h create mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.shd create mode 100644 libraries/evas/src/modules/engines/gl_sdl/Evas_Engine_GL_SDL.h create mode 100644 libraries/evas/src/modules/engines/gl_sdl/Makefile.am create mode 100644 libraries/evas/src/modules/engines/gl_sdl/Makefile.in create mode 100644 libraries/evas/src/modules/engines/gl_sdl/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/gl_sdl/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/gl_x11/Evas_Engine_GL_X11.h create mode 100644 libraries/evas/src/modules/engines/gl_x11/Makefile.am create mode 100644 libraries/evas/src/modules/engines/gl_x11/Makefile.in create mode 100644 libraries/evas/src/modules/engines/gl_x11/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/gl_x11/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/gl_x11/evas_x_main.c create mode 100644 libraries/evas/src/modules/engines/psl1ght/Evas_Engine_PSL1GHT.h create mode 100644 libraries/evas/src/modules/engines/psl1ght/Makefile.am create mode 100644 libraries/evas/src/modules/engines/psl1ght/Makefile.in create mode 100644 libraries/evas/src/modules/engines/psl1ght/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/psl1ght/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/psl1ght/rsxutil.c create mode 100644 libraries/evas/src/modules/engines/psl1ght/rsxutil.h create mode 100644 libraries/evas/src/modules/engines/software_16/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_16/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_16/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_16_ddraw/Evas_Engine_Software_16_DDraw.h create mode 100644 libraries/evas/src/modules/engines/software_16_ddraw/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_16_ddraw/evas_ddraw_buffer.cpp create mode 100644 libraries/evas/src/modules/engines/software_16_ddraw/evas_ddraw_main.cpp create mode 100644 libraries/evas/src/modules/engines/software_16_ddraw/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_16_ddraw/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/software_16_sdl/Evas_Engine_SDL_16.h create mode 100644 libraries/evas/src/modules/engines/software_16_sdl/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_16_sdl/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_16_sdl/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_16_sdl/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/software_16_wince/Evas_Engine_Software_16_WinCE.h create mode 100644 libraries/evas/src/modules/engines/software_16_wince/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_16_wince/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_16_wince/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_16_wince/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/software_16_wince/evas_wince_ddraw_buffer.cpp create mode 100644 libraries/evas/src/modules/engines/software_16_wince/evas_wince_fb_buffer.c create mode 100644 libraries/evas/src/modules/engines/software_16_wince/evas_wince_gapi_buffer.c create mode 100644 libraries/evas/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c create mode 100644 libraries/evas/src/modules/engines/software_16_x11/Evas_Engine_Software_16_X11.h create mode 100644 libraries/evas/src/modules/engines/software_16_x11/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_16_x11/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_16_x11/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_16_x11/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/software_16_x11/evas_x_buffer.c create mode 100644 libraries/evas/src/modules/engines/software_8/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_8/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_8/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_8_x11/Evas_Engine_Software_8_X11.h create mode 100644 libraries/evas/src/modules/engines/software_8_x11/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_8_x11/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_8_x11/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_8_x11/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/software_8_x11/evas_x_buffer.c create mode 100644 libraries/evas/src/modules/engines/software_ddraw/Evas_Engine_Software_DDraw.h create mode 100644 libraries/evas/src/modules/engines/software_ddraw/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_ddraw/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_buffer.c create mode 100644 libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_main.cpp create mode 100644 libraries/evas/src/modules/engines/software_ddraw/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_ddraw/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/software_ddraw/evas_outbuf.c create mode 100644 libraries/evas/src/modules/engines/software_gdi/Evas_Engine_Software_Gdi.h create mode 100644 libraries/evas/src/modules/engines/software_gdi/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_gdi/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_gdi/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_gdi/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/software_gdi/evas_gdi_buffer.c create mode 100644 libraries/evas/src/modules/engines/software_gdi/evas_gdi_main.c create mode 100644 libraries/evas/src/modules/engines/software_gdi/evas_outbuf.c create mode 100644 libraries/evas/src/modules/engines/software_generic/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_generic/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_generic/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_sdl/Evas_Engine_SDL.h create mode 100644 libraries/evas/src/modules/engines/software_sdl/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_sdl/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_sdl/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_sdl/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/software_x11/Evas_Engine_Software_X11.h create mode 100644 libraries/evas/src/modules/engines/software_x11/Makefile.am create mode 100644 libraries/evas/src/modules/engines/software_x11/Makefile.in create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xcb_buffer.c create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xcb_buffer.h create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xcb_color.c create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xcb_color.h create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xcb_main.c create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xcb_outbuf.c create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xcb_outbuf.h create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xcb_xdefaults.c create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xcb_xdefaults.h create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xlib_buffer.c create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xlib_buffer.h create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xlib_color.c create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xlib_color.h create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xlib_main.c create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c create mode 100644 libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.h create mode 100644 libraries/evas/src/modules/loaders/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/TODO create mode 100644 libraries/evas/src/modules/loaders/bmp/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/bmp/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c create mode 100644 libraries/evas/src/modules/loaders/edb/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/edb/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c create mode 100644 libraries/evas/src/modules/loaders/eet/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/eet/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c create mode 100644 libraries/evas/src/modules/loaders/generic/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/generic/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c create mode 100644 libraries/evas/src/modules/loaders/gif/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/gif/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c create mode 100644 libraries/evas/src/modules/loaders/ico/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/ico/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c create mode 100644 libraries/evas/src/modules/loaders/jpeg/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/jpeg/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c create mode 100644 libraries/evas/src/modules/loaders/pmaps/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/pmaps/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c create mode 100644 libraries/evas/src/modules/loaders/png/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/png/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/png/evas_image_load_png.c create mode 100644 libraries/evas/src/modules/loaders/psd/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/psd/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c create mode 100644 libraries/evas/src/modules/loaders/svg/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/svg/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c create mode 100644 libraries/evas/src/modules/loaders/tga/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/tga/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c create mode 100644 libraries/evas/src/modules/loaders/tiff/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/tiff/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c create mode 100644 libraries/evas/src/modules/loaders/wbmp/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/wbmp/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c create mode 100644 libraries/evas/src/modules/loaders/xpm/Makefile.am create mode 100644 libraries/evas/src/modules/loaders/xpm/Makefile.in create mode 100644 libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c create mode 100644 libraries/evas/src/modules/savers/Makefile.am create mode 100644 libraries/evas/src/modules/savers/Makefile.in create mode 100644 libraries/evas/src/modules/savers/edb/Makefile.am create mode 100644 libraries/evas/src/modules/savers/edb/Makefile.in create mode 100644 libraries/evas/src/modules/savers/edb/evas_image_save_edb.c create mode 100644 libraries/evas/src/modules/savers/eet/Makefile.am create mode 100644 libraries/evas/src/modules/savers/eet/Makefile.in create mode 100644 libraries/evas/src/modules/savers/eet/evas_image_save_eet.c create mode 100644 libraries/evas/src/modules/savers/jpeg/Makefile.am create mode 100644 libraries/evas/src/modules/savers/jpeg/Makefile.in create mode 100644 libraries/evas/src/modules/savers/jpeg/evas_image_save_jpeg.c create mode 100644 libraries/evas/src/modules/savers/png/Makefile.am create mode 100644 libraries/evas/src/modules/savers/png/Makefile.in create mode 100644 libraries/evas/src/modules/savers/png/evas_image_save_png.c create mode 100644 libraries/evas/src/modules/savers/tiff/Makefile.am create mode 100644 libraries/evas/src/modules/savers/tiff/Makefile.in create mode 100644 libraries/evas/src/modules/savers/tiff/evas_image_save_tiff.c create mode 100644 libraries/evas/src/static_deps/Makefile.am create mode 100644 libraries/evas/src/static_deps/Makefile.in create mode 100644 libraries/evas/src/static_deps/liblinebreak/AUTHORS create mode 100644 libraries/evas/src/static_deps/liblinebreak/ChangeLog create mode 100644 libraries/evas/src/static_deps/liblinebreak/LICENCE create mode 100644 libraries/evas/src/static_deps/liblinebreak/LineBreak1.sed create mode 100644 libraries/evas/src/static_deps/liblinebreak/LineBreak2.sed create mode 100644 libraries/evas/src/static_deps/liblinebreak/Makefile.am create mode 100644 libraries/evas/src/static_deps/liblinebreak/Makefile.in create mode 100644 libraries/evas/src/static_deps/liblinebreak/NEWS create mode 100644 libraries/evas/src/static_deps/liblinebreak/README create mode 100644 libraries/evas/src/static_deps/liblinebreak/linebreak.c create mode 100644 libraries/evas/src/static_deps/liblinebreak/linebreak.h create mode 100644 libraries/evas/src/static_deps/liblinebreak/linebreakdata.c create mode 100644 libraries/evas/src/static_deps/liblinebreak/linebreakdata1.tmpl create mode 100644 libraries/evas/src/static_deps/liblinebreak/linebreakdata2.tmpl create mode 100644 libraries/evas/src/static_deps/liblinebreak/linebreakdata3.tmpl create mode 100644 libraries/evas/src/static_deps/liblinebreak/linebreakdef.c create mode 100644 libraries/evas/src/static_deps/liblinebreak/linebreakdef.h create mode 100644 libraries/evas/src/tests/Makefile.am create mode 100644 libraries/evas/src/tests/Makefile.in create mode 100644 libraries/evas/src/tests/evas_suite.c create mode 100644 libraries/evas/src/tests/evas_suite.h create mode 100644 libraries/evas/src/tests/evas_test_callbacks.c create mode 100644 libraries/evas/src/tests/evas_test_init.c create mode 100644 libraries/evas/src/tests/evas_test_text.c create mode 100644 libraries/evas/src/tests/evas_test_textblock.c create mode 100644 libraries/evas/src/tests/evas_tests_helpers.h (limited to 'libraries/evas/src') diff --git a/libraries/evas/src/Makefile.am b/libraries/evas/src/Makefile.am new file mode 100644 index 0000000..c44a82e --- /dev/null +++ b/libraries/evas/src/Makefile.am @@ -0,0 +1,3 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = static_deps lib bin modules tests examples diff --git a/libraries/evas/src/Makefile.in b/libraries/evas/src/Makefile.in new file mode 100644 index 0000000..9b729e1 --- /dev/null +++ b/libraries/evas/src/Makefile.in @@ -0,0 +1,734 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = static_deps lib bin modules tests examples +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/bin/Makefile.am b/libraries/evas/src/bin/Makefile.am new file mode 100644 index 0000000..987e14b --- /dev/null +++ b/libraries/evas/src/bin/Makefile.am @@ -0,0 +1,43 @@ +MAINTAINERCLEANFILES = Makefile.in + +if EVAS_CSERVE + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/lib/cserve \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@FRIBIDI_CFLAGS@ \ +@EET_CFLAGS@ \ +@FONTCONFIG_CFLAGS@ \ +@pthread_cflags@ \ +@PIXMAN_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +bin_PROGRAMS = evas_cserve evas_cserve_tool + +evas_cserve_SOURCES = \ +evas_cserve_main.c + +evas_cserve_LDADD = \ +$(top_builddir)/src/lib/libevas.la \ +@pthread_libs@ \ +@EINA_LIBS@ + +evas_cserve_tool_LDFLAGS = + +evas_cserve_tool_SOURCES = \ +evas_cserve_tool.c + +evas_cserve_tool_LDADD = \ +$(top_builddir)/src/lib/libevas.la \ +@pthread_libs@ \ +@EINA_LIBS@ + +endif diff --git a/libraries/evas/src/bin/Makefile.in b/libraries/evas/src/bin/Makefile.in new file mode 100644 index 0000000..885bfc4 --- /dev/null +++ b/libraries/evas/src/bin/Makefile.in @@ -0,0 +1,750 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@EVAS_CSERVE_TRUE@bin_PROGRAMS = evas_cserve$(EXEEXT) \ +@EVAS_CSERVE_TRUE@ evas_cserve_tool$(EXEEXT) +subdir = src/bin +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am__evas_cserve_SOURCES_DIST = evas_cserve_main.c +@EVAS_CSERVE_TRUE@am_evas_cserve_OBJECTS = evas_cserve_main.$(OBJEXT) +evas_cserve_OBJECTS = $(am_evas_cserve_OBJECTS) +@EVAS_CSERVE_TRUE@evas_cserve_DEPENDENCIES = \ +@EVAS_CSERVE_TRUE@ $(top_builddir)/src/lib/libevas.la +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__evas_cserve_tool_SOURCES_DIST = evas_cserve_tool.c +@EVAS_CSERVE_TRUE@am_evas_cserve_tool_OBJECTS = \ +@EVAS_CSERVE_TRUE@ evas_cserve_tool.$(OBJEXT) +evas_cserve_tool_OBJECTS = $(am_evas_cserve_tool_OBJECTS) +@EVAS_CSERVE_TRUE@evas_cserve_tool_DEPENDENCIES = \ +@EVAS_CSERVE_TRUE@ $(top_builddir)/src/lib/libevas.la +evas_cserve_tool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(evas_cserve_tool_LDFLAGS) $(LDFLAGS) \ + -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(evas_cserve_SOURCES) $(evas_cserve_tool_SOURCES) +DIST_SOURCES = $(am__evas_cserve_SOURCES_DIST) \ + $(am__evas_cserve_tool_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +@EVAS_CSERVE_TRUE@AM_CPPFLAGS = \ +@EVAS_CSERVE_TRUE@-I. \ +@EVAS_CSERVE_TRUE@-I$(top_srcdir)/src/lib \ +@EVAS_CSERVE_TRUE@-I$(top_srcdir)/src/lib/include \ +@EVAS_CSERVE_TRUE@-I$(top_srcdir)/src/lib/cserve \ +@EVAS_CSERVE_TRUE@-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +@EVAS_CSERVE_TRUE@-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +@EVAS_CSERVE_TRUE@-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EVAS_CSERVE_TRUE@@EINA_CFLAGS@ \ +@EVAS_CSERVE_TRUE@@FREETYPE_CFLAGS@ \ +@EVAS_CSERVE_TRUE@@FRIBIDI_CFLAGS@ \ +@EVAS_CSERVE_TRUE@@EET_CFLAGS@ \ +@EVAS_CSERVE_TRUE@@FONTCONFIG_CFLAGS@ \ +@EVAS_CSERVE_TRUE@@pthread_cflags@ \ +@EVAS_CSERVE_TRUE@@PIXMAN_CFLAGS@ + +@EVAS_CSERVE_TRUE@AM_CFLAGS = @WIN32_CFLAGS@ +@EVAS_CSERVE_TRUE@evas_cserve_SOURCES = \ +@EVAS_CSERVE_TRUE@evas_cserve_main.c + +@EVAS_CSERVE_TRUE@evas_cserve_LDADD = \ +@EVAS_CSERVE_TRUE@$(top_builddir)/src/lib/libevas.la \ +@EVAS_CSERVE_TRUE@@pthread_libs@ \ +@EVAS_CSERVE_TRUE@@EINA_LIBS@ + +@EVAS_CSERVE_TRUE@evas_cserve_tool_LDFLAGS = +@EVAS_CSERVE_TRUE@evas_cserve_tool_SOURCES = \ +@EVAS_CSERVE_TRUE@evas_cserve_tool.c + +@EVAS_CSERVE_TRUE@evas_cserve_tool_LDADD = \ +@EVAS_CSERVE_TRUE@$(top_builddir)/src/lib/libevas.la \ +@EVAS_CSERVE_TRUE@@pthread_libs@ \ +@EVAS_CSERVE_TRUE@@EINA_LIBS@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/bin/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +evas_cserve$(EXEEXT): $(evas_cserve_OBJECTS) $(evas_cserve_DEPENDENCIES) + @rm -f evas_cserve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_cserve_OBJECTS) $(evas_cserve_LDADD) $(LIBS) +evas_cserve_tool$(EXEEXT): $(evas_cserve_tool_OBJECTS) $(evas_cserve_tool_DEPENDENCIES) + @rm -f evas_cserve_tool$(EXEEXT) + $(AM_V_CCLD)$(evas_cserve_tool_LINK) $(evas_cserve_tool_OBJECTS) $(evas_cserve_tool_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve_main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve_tool.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/bin/evas_cserve_main.c b/libraries/evas/src/bin/evas_cserve_main.c new file mode 100644 index 0000000..7d4d95a --- /dev/null +++ b/libraries/evas/src/bin/evas_cserve_main.c @@ -0,0 +1,1684 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#ifdef _WIN32 +# include +#endif + +#ifdef BUILD_PTHREAD +#include +#endif + +#include "Evas.h" +#include "evas_cs.h" + +#define D(...) EINA_LOG_DOM_DBG(_evas_cserve_bin_log_dom, __VA_ARGS__) +#ifdef ERR +#undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_cserve_bin_log_dom, __VA_ARGS__) +#ifdef DBG +#undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_cserve_bin_log_dom, __VA_ARGS__) +#ifdef WRN +#undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_cserve_bin_log_dom, __VA_ARGS__) + +#ifdef CSERVE_BIN_DEFAULT_COLOR +#undef CSERVE_BIN_DEFAULT_COLOR +#endif +#define CSERVE_BIN_DEFAULT_COLOR EINA_COLOR_BLUE +// fixme:'s +// +// preload - make it work (both) + +// +// pants! + +typedef struct _Img Img; +typedef struct _Lopt Lopt; +typedef struct _Load_Inf Load_Inf; + +struct _Lopt +{ + int scale_down_by; // if > 1 then use this + double dpi; // if > 0.0 use this + int w, h; // if > 0 use this + struct { + int x, y, w, h; + } region; +}; + +struct _Img +{ + Image_Entry ie; + int ref; + int dref; + int usage; + Mem *mem; + const char *key; + time_t cached; + struct { + const char *file; + const char *key; + time_t modtime; + time_t last_stat; + } file; + struct { + int load1saved, load2saved; + double load1, load2; + } stats; + Lopt load_opts; + struct { + int w, h; + void *data; + Eina_Bool alpha : 1; + } image; + int incache; + LK(lock); + Eina_Bool dead : 1; + Eina_Bool active : 1; + Eina_Bool useless : 1; + Eina_Bool killme : 1; +}; + +struct _Load_Inf +{ + Img *img; + Client *c; +}; + +// config +static int stat_res_interval = 2; + +static time_t t_now = 0; + +static int server_id = 0; + +LK(strshr_freeme_lock); +static int strshr_freeme_count = 0; +static int strshr_freeme_alloc = 0; +static const char **strshr_freeme = NULL; + +static int cache_cleanme = 0; +static Evas_Cache_Image *cache = NULL; + +static Eina_Hash *active_images = NULL; +LK(cache_lock); +static Eina_List *cache_images = NULL; +static int cache_usage = 0; +static int cache_max_usage = 1 * 1024; +static int cache_max_adjust = 0; +static int cache_item_timeout = -1; +static int cache_item_timeout_check = -1; +static Mem *stat_mem = NULL; +static int _evas_cserve_bin_log_dom = -1; +static Eina_List *stat_mems = NULL; + +static void cache_clean(void); + +#ifndef _WIN32 +static double +get_time(void) +{ + struct timeval timev; + + gettimeofday(&timev, NULL); + return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000); +} +#else +static double +get_time(void) +{ + return (double)GetTickCount()/1000.0; +} +#endif + +static int mem_total = 0; +static int mem_free = 0; +static int mem_buffers = 0; +static int mem_cached = 0; + +static void +meminfo_check(void) +{ + FILE *f; + char buf[1024]; + int v; + + f = fopen("/proc/meminfo", "r"); + if (!f) return; + if (!fgets(buf, sizeof(buf), f)) goto done; + v = 0; if (sscanf(buf, "%*s %i %*s", &v) != 1) goto done; + mem_total = v; + if (!fgets(buf, sizeof(buf), f)) goto done; + v = 0; if (sscanf(buf, "%*s %i %*s", &v) != 1) goto done; + mem_free = v; + if (!fgets(buf, sizeof(buf), f)) goto done; + v = 0; if (sscanf(buf, "%*s %i %*s", &v) != 1) goto done; + mem_buffers = v; + if (!fgets(buf, sizeof(buf), f)) goto done; + v = 0; if (sscanf(buf, "%*s %i %*s", &v) != 1) goto done; + mem_cached = v; + done: + fclose(f); +} + +static int stats_dirty = 0; +static int saved_loads = 0; +static double saved_load_time = 0; +static double saved_load_lifetime = 0; + +static int saved_loaddatas = 0; +static double saved_loaddata_time = 0; +static double saved_loaddata_lifetime = 0; + +static int saved_memory = 0; +static int saved_memory_peak = 0; +static int alloced_memory = 0; +static int alloced_memory_peak = 0; +static int real_memory = 0; +static int real_memory_peak = 0; + +static Eina_Bool +stats_hash_image_cb(const Eina_Hash *hash __UNUSED__, + const void *key __UNUSED__, + void *data, void *fdata __UNUSED__) +{ + Img *img = data; + + + saved_load_time += img->stats.load1 * img->stats.load1saved; + saved_loaddata_time += img->stats.load2 * img->stats.load2saved; + if (img->ref > 1) + saved_memory += img->image.w * img->image.h * sizeof(DATA32) * (img->ref - 1); + if (img->mem) + { + alloced_memory += img->image.w * img->image.h * sizeof(DATA32); + real_memory += (((img->image.w * img->image.h * sizeof(DATA32)) + 4095) >> 12) << 12; + } + return 1; +} + +static void +stats_calc(void) +{ + Img *img; + Eina_List *l; + + if (!stats_dirty) return; + stats_dirty = 0; + saved_loads = 0; + saved_load_time = 0; + saved_loaddatas = 0; + saved_loaddata_time = 0; + saved_memory = 0; + alloced_memory = 0; + real_memory = 0; + + if (active_images) + eina_hash_foreach(active_images, stats_hash_image_cb, NULL); + LKL(cache_lock); + EINA_LIST_FOREACH(cache_images, l, img) + { + saved_loads += img->stats.load1saved; + saved_load_time += img->stats.load1 * img->stats.load1saved; + saved_loaddatas += img->stats.load2saved; + saved_loaddata_time += img->stats.load2 * img->stats.load2saved; + if (img->mem) + { + alloced_memory += img->image.w * img->image.h * sizeof(DATA32); + real_memory += (((img->image.w * img->image.h * sizeof(DATA32)) + 4095) >> 12) << 12; + } + } + LKU(cache_lock); + if (saved_memory > saved_memory_peak) + saved_memory_peak = saved_memory; + if (real_memory > real_memory_peak) + real_memory_peak = real_memory; + if (alloced_memory > alloced_memory_peak) + alloced_memory_peak = alloced_memory; +} + +static void +stats_update(void) +{ + stats_dirty = 1; +} + +static void +stats_lifetime_update(Img *img) +{ + saved_load_lifetime += img->stats.load1 * img->stats.load1saved; + saved_loaddata_lifetime += img->stats.load2 * img->stats.load2saved; +} + +static void +stat_clean(Mem *m) +{ + int *ints; + int size, pid, *ids, count, i; + + ints = (int *)m->data; + size = ints[0]; + if (!evas_cserve_mem_resize(m, size)) return; + ints = (int *)m->data; + pid = ints[1]; + count = (size - (2 * sizeof(int))) / sizeof(int); + ids = ints + 2; + for (i = 0; i < count; i++) + evas_cserve_mem_del(pid, ids[i]); +} + +static int +stat_init(Mem *m) +{ + int *ints; + + ints = (int *)m->data; + + if (!evas_cserve_mem_resize(m, 2 * sizeof(int))) return 0; + ints[0] = 2 * sizeof(int); + ints[1] = getpid(); + msync(m->data, 2 * sizeof(int), MS_SYNC | MS_INVALIDATE); + return 1; +} + +static int +stat_update(Mem *m) +{ + Eina_List *l; + Mem *m2; + int *ints, *ids, i; + + ints = (int *)m->data; + ints[0] = (2 * sizeof(int)) + (eina_list_count(stat_mems) * sizeof(int)); + if (!evas_cserve_mem_resize(m, ints[0])) return 0; + ints = (int *)m->data; + ids = ints + 2; + i = 0; + EINA_LIST_FOREACH(stat_mems, l, m2) + { + ids[i] = m2->id; + i++; + } + msync(m->data, ints[0], MS_SYNC | MS_INVALIDATE); + return 1; +} + +static Image_Entry * +_img_alloc(void) +{ + Img *img; + + img = calloc(1, sizeof(Img)); + LKI(img->lock); + return (Image_Entry *)img; +} + +static void +_img_dealloc(Image_Entry *ie) +{ + Img *img = (Img *)ie; + LKD(img->lock); + free(img); +} + +static int +_img_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h) +{ + Img *img = (Img *)ie; + + img->mem = evas_cserve_mem_new(w * h * sizeof(DATA32), NULL); + if (!img->mem) return -1; + img->image.data = img->mem->data + img->mem->offset; + + stat_mems = eina_list_append(stat_mems, img->mem); + stat_update(stat_mem); + return 0; +} + +static void +_img_surface_delete(Image_Entry *ie) +{ + Img *img = (Img *)ie; + + if (!img->mem) return; + + stat_mems = eina_list_remove(stat_mems, img->mem); + stat_update(stat_mem); + + evas_cserve_mem_free(img->mem); + img->mem = NULL; + img->image.data = NULL; +} + +static DATA32 * +_img_surface_pixels(Image_Entry *ie) +{ + Img *img = (Img *)ie; + + return img->image.data; +} + +static int +_img_load(Image_Entry *ie) +{ + return evas_common_load_rgba_image_module_from_file(ie); +} + +static void +_img_unload(Image_Entry *ie __UNUSED__) +{ +} + +static void +_img_dirty_region(Image_Entry *ie __UNUSED__, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__) +{ +} + +static int +_img_dirty(Image_Entry *dst __UNUSED__, const Image_Entry *src __UNUSED__) +{ + return 0; +} + +static int +_img_size_set(Image_Entry *dst __UNUSED__, const Image_Entry *src __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__) +{ + return 0; +} + +static int +_img_copied_data(Image_Entry *ie __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__, DATA32 *image_data __UNUSED__, int alpha __UNUSED__, int cspace __UNUSED__) +{ + return 0; +} + +static int +_img_data(Image_Entry *ie __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__, DATA32 *image_data __UNUSED__, int alpha __UNUSED__, int cspace __UNUSED__) +{ + return 0; +} + +static int +_img_color_space(Image_Entry *ie __UNUSED__, int cspace __UNUSED__) +{ + return 0; +} + +static int +_img_load_data(Image_Entry *ie) +{ + return evas_common_load_rgba_image_data_from_file(ie); +} + +static int +_img_mem_size_get(Image_Entry *ie __UNUSED__) +{ + return 1; +} + +static void +img_init(void) +{ + const Evas_Cache_Image_Func cache_funcs = + { + _img_alloc,//Image_Entry *(*alloc)(void); + _img_dealloc,//void (*dealloc)(Image_Entry *im); + /* The cache provide some helpers for surface manipulation. */ + _img_surface_alloc,//int (*surface_alloc)(Image_Entry *im, unsigned int w, unsigned int h); + _img_surface_delete,//void (*surface_delete)(Image_Entry *im); + _img_surface_pixels,//DATA32 *(*surface_pixels)(Image_Entry *im); + /* The cache is doing the allocation and deallocation, you must just do the rest. */ + _img_load,//int (*constructor)(Image_Entry *im); + _img_unload,//void (*destructor)(Image_Entry *im); + _img_dirty_region,//void (*dirty_region)(Image_Entry *im, unisnged int x, unisnged int y, unisnged int w, unsigned int h); + /* Only called when references > 0. Need to provide a fresh copie of im. */ + /* The destination surface does have a surface, but no allocated pixel data. */ + _img_dirty,//int (*dirty)(Image_Entry *dst, const Image_Entry *src); + /* Only called when references == 1. We will call drop on im'. */ + /* The destination surface does not have any surface. */ + _img_size_set,//int (*size_set)(Image_Entry *dst, const Image_Entry *src, unisnged int w, unisnged int h); + /* The destination surface does not have any surface. */ + _img_copied_data,//int (*copied_data)(Image_Entry *dst, unisnged int w, unisnged int h, DATA32 *image_data, int alpha, int cspace); + /* The destination surface does not have any surface. */ + _img_data,//int (*data)(Image_Entry *dst, unsigned int w, unisgned int h, DATA32 *image_data, int alpha, int cspace); + _img_color_space,//int (*color_space)(Image_Entry *dst, int cspace); + /* This function need to update im->w and im->h. */ + _img_load_data,//int (*load)(Image_Entry *im); + _img_mem_size_get,//int (*mem_size_get)(Image_Entry *im); + NULL,//void (*debug)(const char *context, Image_Entry *im); + }; + + active_images = eina_hash_string_superfast_new(NULL); + cache = evas_cache_image_init(&cache_funcs); + LKI(cache_lock); + LKI(strshr_freeme_lock); +} + +static void +img_shutdown(void) +{ + evas_cache_image_shutdown(cache); + cache = NULL; + // FIXME: shutdown properly + LKD(strshr_freeme_lock); + LKI(cache_lock); +} + +static Img * +img_new(const char *file, const char *key, RGBA_Image_Loadopts *load_opts, const char *bufkey) +{ + Img *img; + struct stat st; + int ret; + Image_Entry *ie; + int err = 0; + double t; + + DBG("... stat %s", file); + ret = stat(file, &st); + if (ret < 0) return NULL; + DBG("... load header"); + t = get_time(); + ie = evas_cache_image_request(cache, file, key, load_opts, &err); + t = get_time() - t; + DBG("... header done"); + if (!ie) return NULL; + DBG("... ie->cache = %p", ie->cache); + img = (Img *)ie; + img->stats.load1 = t; + img->key = eina_stringshare_add(bufkey); + img->file.modtime = st.st_mtime; + img->file.last_stat = t_now; + img->file.file = eina_stringshare_add(file); + if (key) img->file.key = eina_stringshare_add(key); + img->load_opts.scale_down_by = load_opts->scale_down_by; + img->load_opts.dpi = load_opts->dpi; + img->load_opts.w = load_opts->w; + img->load_opts.h = load_opts->h; + img->image.w = ie->w; + img->image.h = ie->h; + img->image.alpha = ie->flags.alpha; + img->ref = 1; + img->active = 1; + img->usage = sizeof(Img) + strlen(img->key) + 1 + + strlen(img->file.file) + 1; + if (img->file.key) img->usage += strlen(img->file.key) + 1; + eina_hash_direct_add(active_images, img->key, img); + return img; +} + +static void +img_loaddata(Img *img) +{ + double t; + + if (img->mem) return; + t = get_time(); + LKL(cache_lock); + evas_cache_image_load_data((Image_Entry *)img); + t = get_time() - t; + img->stats.load2 = t; + if (img->image.data) + msync(img->image.data, img->image.w * img->image.h * sizeof(DATA32), MS_SYNC | MS_INVALIDATE); + if (!img->active) cache_usage -= img->usage; + img->usage += + (4096 * (((img->image.w * img->image.h * sizeof(DATA32)) + 4095) / 4096)) + + sizeof(Mem); + if (!img->active) cache_usage += img->usage; + LKU(cache_lock); + cache_clean(); +} + +static void +img_free(Img *img) +{ + if (img->incache > 0) + { + ERR("EEEEEEEEEEEEEEEEK!"); + ERR("EEEEEEEEEEEEEEEEK! %p '%s' still in cache", + img, img->file.file); + ERR("EEEEEEEEEEEEEEEEK!"); + return; + } + stats_lifetime_update(img); + stats_update(); + + LKL(strshr_freeme_lock); + strshr_freeme_count += 3; + if (strshr_freeme_count > strshr_freeme_alloc) + { + const char **tmp; + + strshr_freeme_alloc += 32; + tmp = realloc(strshr_freeme, strshr_freeme_alloc * sizeof(const char **)); + if (tmp) strshr_freeme = tmp; + else + { + ERR("realloc of strshr_freeme failed for %i items", + strshr_freeme_alloc); + strshr_freeme_alloc -= 32; + strshr_freeme_count -= 3; + return; + } + } + strshr_freeme[strshr_freeme_count - 3] = img->key; + strshr_freeme[strshr_freeme_count - 2] = img->file.file; + strshr_freeme[strshr_freeme_count - 1] = img->file.key; + LKU(strshr_freeme_lock); + + evas_cache_image_drop((Image_Entry *)img); +} + +static void +cache_clean(void) +{ + DBG("... cache clean!!! do"); + LKL(cache_lock); + while ((cache_usage > ((cache_max_usage + cache_max_adjust) * 1024)) && + (cache_images)) + { + Img *img; + Eina_List *l; + + DBG("... clean loop %i > %i", cache_usage, (cache_max_usage + cache_max_adjust) * 1024); + l = eina_list_last(cache_images); // THREAD: called from thread. happens to be safe as it uses no unlocked shared resources + if (!l) break; + img = l->data; + if (!img) break; + LKL(img->lock); + DBG("... REMOVE %p '%s'", img, img->file.file); +#ifdef BUILD_PTHREAD + img->killme = 1; + img->useless = 1; + img->dead = 1; + cache_cleanme++; + LKU(img->lock); +#else + cache_images = eina_list_remove_list(cache_images, l); // FIXME: called from thread + img->incache--; + cache_usage -= img->usage; + DBG("... IMG FREE %p", img); + img_free(img); +#endif + } + LKU(cache_lock); +} + +static void +cache_timeout(time_t t) +{ + Eina_List *l, *l_next; + Img *img; + + if (cache_item_timeout < 0) return; + LKL(cache_lock); + EINA_LIST_FOREACH_SAFE(cache_images, l, l_next, img) + { + LKL(img->lock); + if ((t - img->cached) > cache_item_timeout) + { + cache_images = eina_list_remove_list(cache_images, l); + img->incache--; + cache_usage -= img->usage; + img_free(img); + } + else + LKU(img->lock); + } + LKU(cache_lock); +} + +static void +mem_cache_adjust(void) +{ + int pval = cache_max_adjust; + int max = 0; + int mem_used; + + if (mem_total <= 0) return; + mem_used = mem_total - mem_free - mem_cached - mem_buffers; +#if 0 // this lets the image cache to grow to fill all real free ram, if + // there is any (ie ram unused by disk cache) + if (mem_free < mem_total) + { + cache_max_adjust = mem_free; + return; + } +#endif + + max = ((mem_free + mem_cached + mem_buffers) / 8) - cache_max_usage; + if (max < 0) max = 0; + if (max > cache_max_usage) max = cache_max_usage; + cache_max_adjust = max - cache_max_usage; + + if (cache_max_adjust < -cache_max_usage) + cache_max_adjust = -cache_max_usage; + DBG("... cache_max_adjust = %i", cache_max_adjust); + if (pval != cache_max_adjust) + { + DBG("... cache clean"); + // FIXME lock problem + cache_clean(); + } +} + +static void +img_cache(Img *img) +{ + eina_hash_del(active_images, img->key, img); + if (img->dead) + { + DBG("... img %p '%s' dead", img , img->file.file); + img_free(img); + return; + } + if ((cache_usage + img->usage) > ((cache_max_usage + cache_max_adjust) * 1024)) + { + DBG("... img %p '%s' too big for cache", img , img->file.file); + img_free(img); + return; + } + DBG("... img %p '%s' cached += %i", img , img->file.file, img->usage); + if (img->incache > 0) + { + ERR("EEEEEEEEEEEEEEEEK!"); + ERR("EEEEEEEEEEEEEEEEK! %p '%s' already in cache", + img, img->file.file); + ERR("EEEEEEEEEEEEEEEEK!"); + return; + } + LKL(cache_lock); + cache_images = eina_list_prepend(cache_images, img); + LKU(cache_lock); + img->incache++; + cache_usage += img->usage; + img->active = 0; + img->cached = t_now; + // FIXME: lock problem + if (cache_usage > ((cache_max_usage + cache_max_adjust) * 1024)) + cache_clean(); +} + +static void +img_dead(Img *img) +{ + if (img->active) return; + LKL(cache_lock); + cache_images = eina_list_remove(cache_images, img); + LKU(cache_lock); + img->incache--; + cache_usage -= img->usage; + img_free(img); +} + +static Eina_Bool +img_ok(Img *img) +{ + struct stat st; + int ret; + + if (img->dead) return 0; + if ((t_now > img->file.last_stat) && + ((t_now - img->file.last_stat) < stat_res_interval)) return 1; + img->file.last_stat = t_now; + ret = stat(img->file.file, &st); + img->file.last_stat = t_now; + if (ret < 0) + { + img->dead = 1; + img_dead(img); + return 0; + } + if (st.st_mtime != img->file.modtime) + { + img->dead = 1; + img_dead(img); + return 0; + } + return 1; +} + +static Img * +img_load(const char *file, const char *key, RGBA_Image_Loadopts *load_opts) +{ + Img *img; + char buf[8192]; + Eina_List *l, *l_next; + + if (!file) return NULL; + DBG("... img_load '%s'", file); + if (key) DBG("... ... key '%s'", key); + if (key) + snprintf(buf, sizeof(buf), "%s///::/%s/\001/%i/%1.8f/%ix%i", + file, key, + load_opts->scale_down_by, + load_opts->dpi, + load_opts->w, load_opts->h); + else + snprintf(buf, sizeof(buf), "%s///\001/%i/%1.8f/%ix%i", + file, + load_opts->scale_down_by, + load_opts->dpi, + load_opts->w, load_opts->h); + DBG("... find '%s'", buf); + img = eina_hash_find(active_images, buf); + if ((img) && (img_ok(img))) + { + DBG("... found!"); + img->stats.load1saved++; + img->ref++; + DBG("... stats update"); + stats_update(); + DBG("... return %p", img); + return img; + } + + // FIXME: keep hash of cached images too + LKL(cache_lock); + EINA_LIST_FOREACH_SAFE(cache_images, l, l_next, img) + { + if (!strcmp(img->key, buf)) + { + LKL(img->lock); + if (img_ok(img)) + { + DBG("... found cached"); + cache_images = eina_list_remove_list(cache_images, l); + img->incache--; + cache_usage -= img->usage; + img->active = 1; + img->stats.load1saved++; + img->ref++; + eina_hash_direct_add(active_images, img->key, img); + DBG("... sats update"); + stats_update(); + DBG("... return %p", img); + LKU(img->lock); + LKU(cache_lock); + return img; + } + LKU(img->lock); + } + } + LKU(cache_lock); + DBG("... ned new img"); + return img_new(file, key, load_opts, buf); +} + +static void +img_unload(Img *img) +{ + if (img->ref == 0) + { + ERR("EEEEEEEEEEEEEEEEK!"); + ERR("EEEEEEEEEEEEEEEEK! %p '%s' already @ ref 0", + img, img->file.file); + ERR("EEEEEEEEEEEEEEEEK!"); + return; + } + img->ref--; + DBG("... img ref-- = %i", img->ref); + if (img->ref == 0) + { + DBG("... img cache %p '%s'", img, img->file.file); + img_cache(img); + } +} + +static void +img_unloaddata(Img *img) +{ + DBG("img_unloaddata() %p '%s'", img, img->file.file); + if ((img->dref <= 0) && (img->useless) && (img->mem)) + { + Image_Entry *ie = (Image_Entry *)img; + + DBG("... really do forced unload"); + if (!img->active) cache_usage -= img->usage; + img->usage -= + (4096 * (((img->image.w * img->image.h * sizeof(DATA32)) + 4095) / 4096)) + + sizeof(Mem); + if (!img->active) cache_usage += img->usage; + evas_cserve_mem_free(img->mem); + stat_mems = eina_list_remove(stat_mems, img->mem); + img->mem = NULL; + img->image.data = NULL; + img->dref = 0; + DBG("... done"); + + ie->flags.loaded = 0; + ie->allocated.w = 0; + ie->allocated.h = 0; + } +} + +static void +img_useless(Img *img) +{ + DBG("img_useless() %p", img); + img->useless = 1; + if (img->dref <= 0) img_unloaddata(img); +} + +static void +img_forcedunload(Img *img) +{ + DBG("img_forcedunload() %p", img); + img->dead = 1; + img_unload(img); +} + +static void +img_preload(Img *img) +{ + DBG("img_preload() %p", img); +} + +static void +client_del(void *data, Client *c) +{ + Eina_List *images; + Img *img; + + images = data; + DBG("... CLIENT DEL %i", c->pid); + EINA_LIST_FREE(images, img) + { + DBG("... unloaddata img %p", img); + img_unloaddata(img); + DBG("... unload img %p", img); + img_unload(img); + } +} + +static Eina_Bool +getinfo_hash_image_cb(const Eina_Hash *hash __UNUSED__, + const void *key __UNUSED__, + void *data, void *fdata __UNUSED__) +{ + Img *img = data; + Eina_List **list = fdata; + + *list = eina_list_append(*list, img); + return 1; +} + +#ifdef BUILD_PTHREAD +static void * +load_data_thread(void *data) +{ + Load_Inf *li = data; + Img *img = li->img; + Client *c = li->c; + Op_Loaddata_Reply msg; + + free(li); + LKL(img->lock); + if (img->mem) + { + memset(&msg, 0, sizeof(msg)); + msg.mem.id = img->mem->id; + msg.mem.offset = img->mem->offset; + msg.mem.size = img->mem->size; + DBG("... reply"); + evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); + LKU(c->lock); + return NULL; + } + img_loaddata(img); + memset(&msg, 0, sizeof(msg)); + if (img->mem) + { + msg.mem.id = img->mem->id; + msg.mem.offset = img->mem->offset; + msg.mem.size = img->mem->size; + } + else + msg.mem.id = msg.mem.offset = msg.mem.size = 0; + LKU(img->lock); + DBG("... reply"); + evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); + LKU(c->lock); + return NULL; +} +#endif + +static int +message(void *fdata __UNUSED__, Server *s __UNUSED__, Client *c, int opcode, int size, unsigned char *data) +{ + // copy data into local aligned buffer... in case. + unsigned char *tdata = alloca(size + 16); + memcpy(tdata, data, size); + + t_now = time(NULL); + DBG("message @ %i...", (int)t_now); + switch (opcode) + { + case OP_INIT: + { + Op_Init *rep; + Op_Init msg; + + memset(&msg, 0, sizeof(msg)); + msg.pid = getpid(); + msg.server_id = server_id; + msg.handle = c; + rep = (Op_Init *)tdata; + c->pid = rep->pid; + if (rep->server_id == 1) // 2nd channel conn + { + c->client_main = rep->handle; + } + c->func = client_del; + c->data = NULL; + DBG("OP_INIT %i", c->pid); + DBG("... reply"); + evas_cserve_client_send(c, OP_INIT, sizeof(msg), (unsigned char *)(&msg)); + } + break; + case OP_LOAD: + { + Op_Load *rep; + Op_Load_Reply msg; + Img *img; + RGBA_Image_Loadopts lopt; + char *file = NULL, *key = NULL; + + memset(&lopt, 0, sizeof lopt); + DBG("OP_LOAD %i", c->pid); + rep = (Op_Load *)tdata; + file = (char*) (data + sizeof(Op_Load)); + key = file + strlen(file) + 1; + if (key[0] == 0) key = NULL; + lopt.scale_down_by = rep->lopt.scale_down_by; + lopt.dpi = rep->lopt.dpi; + lopt.w = rep->lopt.w; + lopt.h = rep->lopt.h; + lopt.region.x = rep->lopt.region.x; + lopt.region.y = rep->lopt.region.y; + lopt.region.w = rep->lopt.region.w; + lopt.region.h = rep->lopt.region.h; + DBG("... img_load '%s'", file); + if (key) DBG("'%s'", (char *)key); + else DBG(" '%s'", ""); + DBG(" lopt { %i %1.1f %i %i { %i %i %i %i}}", + lopt.scale_down_by, lopt.dpi, lopt.w, lopt.h, + lopt.region.x, lopt.region.y, lopt.region.w, lopt.region.h); + img = img_load(file, key, &lopt); + DBG("... img_load = %p", img); + if (img) + { + DBG("... add image to client list"); + if (c->client_main) + c->client_main->data = eina_list_append(c->client_main->data, img); + else + c->data = eina_list_append(c->data, img); + } + memset(&msg, 0, sizeof(msg)); + msg.handle = img; + if ((img) && (img->mem)) + { + msg.mem.id = img->mem->id; + msg.mem.offset = img->mem->offset; + msg.mem.size = img->mem->size; + img->stats.load2saved++; + stats_update(); + } + else + msg.mem.id = msg.mem.offset = msg.mem.size = 0; + if (img) + { + msg.image.w = img->image.w; + msg.image.h = img->image.h; + msg.image.alpha = img->image.alpha; + } + DBG("... reply"); + evas_cserve_client_send(c, OP_LOAD, sizeof(msg), (unsigned char *)(&msg)); + } + break; + case OP_UNLOAD: + { + Op_Unload *rep; + Img *img; + + DBG("OP_UNLOAD %i", c->pid); + rep = (Op_Unload *)tdata; + img = rep->handle; + if ((img) && (rep->server_id == server_id)) + { + Eina_Bool doflush = 0; + + DBG("... remove %p from list", img); + if (c->client_main) + c->client_main->data = eina_list_remove(c->client_main->data, img); + else + c->data = eina_list_remove(c->data, img); + DBG("... unload %p", img); + LKL(img->lock); + img->ref++; + img_unload(img); + img->ref--; + if (img->ref == 0) doflush = 1; + LKU(img->lock); + if (doflush) + img_cache(img); + cache_clean(); + } + } + break; + case OP_LOADDATA: + { + Op_Loaddata *rep; + Op_Loaddata_Reply msg; + Img *img; + + DBG("OP_LOADDATA %i", c->pid); + rep = (Op_Loaddata *)tdata; + img = rep->handle; + if ((img) && (rep->server_id == server_id)) + { + if (img->mem) + { + DBG("... load saved - cached %p", img); + img->stats.load2saved++; + stats_update(); + memset(&msg, 0, sizeof(msg)); + if (img->mem) + { + msg.mem.id = img->mem->id; + msg.mem.offset = img->mem->offset; + msg.mem.size = img->mem->size; + } + else + msg.mem.id = msg.mem.offset = msg.mem.size = 0; + DBG("... reply"); + evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); + } + else + { +#ifdef BUILD_PTHREAD + pthread_t tid; + pthread_attr_t attr; + Load_Inf *li; + + DBG("... load data %p", img); + pthread_attr_init(&attr); + li = calloc(1, sizeof(Load_Inf)); + if (li) + { + li->img= img; + li->c = c; + LKL(c->lock); + if (pthread_create(&tid, &attr, load_data_thread, li)) + { + perror("pthread_create()"); + } + else + pthread_detach(tid); + } + pthread_attr_destroy(&attr); +#else + img_loaddata(img); + memset(&msg, 0, sizeof(msg)); + if (img->mem) + { + msg.mem.id = img->mem->id; + msg.mem.offset = img->mem->offset; + msg.mem.size = img->mem->size; + } + else + msg.mem.id = msg.mem.offset = msg.mem.size = 0; + DBG("... reply"); + evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); +#endif + } + } + else + { + msg.mem.id = msg.mem.offset = msg.mem.size = 0; + evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); + } + } + break; + case OP_UNLOADDATA: + { + Op_Unloaddata *rep; + Img *img; + + DBG("OP_UNLOADDATA %i", c->pid); + rep = (Op_Unloaddata *)tdata; + img = rep->handle; + if ((img) && (rep->server_id == server_id)) + { + DBG("... dref--"); + LKL(img->lock); + img->dref--; + if (img->dref < 0) img->dref = 0; + DBG("... unload data %p '%s'", img, img->file.file); + img_unloaddata(img); + LKU(img->lock); + } + } + break; + case OP_USELESSDATA: + { + Op_Unloaddata *rep; + Img *img; + + DBG("OP_USELESSDATA %i", c->pid); + rep = (Op_Unloaddata *)tdata; + img = rep->handle; + if ((img) && (rep->server_id == server_id)) + { + DBG("... dref--"); + LKL(img->lock); + img->dref--; + if (img->dref < 0) img->dref = 0; + DBG("... useless %p", img); + img_useless(img); + LKU(img->lock); + } + } + break; + case OP_PRELOAD: + { + Op_Preload *rep; + Img *img; + + DBG("OP_PRELOAD %i", c->pid); + rep = (Op_Preload *)tdata; + img = rep->handle; + if ((img) && (rep->server_id == server_id)) + { + LKL(img->lock); + if (c->client_main) + c->client_main->data = eina_list_remove(c->client_main->data, img); + else + c->data = eina_list_remove(c->data, img); + // FIXME: preload doesn't work async + img_preload(img); + LKU(img->lock); + } + } + case OP_FORCEDUNLOAD: + { + Op_Forcedunload *rep; + Img *img; + + DBG("OP_FORCEDUNLOAD %i", c->pid); + rep = (Op_Forcedunload *)tdata; + img = rep->handle; + if ((img) && (rep->server_id == server_id)) + { + Eina_Bool doflush = 0; + + LKL(img->lock); + DBG("remove %p from list", img); + if (c->client_main) + c->client_main->data = eina_list_remove(c->client_main->data, img); + else + c->data = eina_list_remove(c->data, img); + DBG("... forced unload now"); + img->ref++; + img_forcedunload(img); + img->ref--; + if (img->ref == 0) doflush = 1; + LKU(img->lock); + if (doflush) + img_cache(img); + cache_clean(); + } + } + break; + case OP_GETCONFIG: + { + Op_Getconfig_Reply msg; + + DBG("OP_GETCONFIG %i", c->pid); + msg.cache_max_usage = cache_max_usage; + msg.cache_item_timeout = cache_item_timeout; + msg.cache_item_timeout_check = cache_item_timeout_check; + DBG("... reply"); + evas_cserve_client_send(c, OP_GETCONFIG, sizeof(msg), (unsigned char *)(&msg)); + } + break; + case OP_SETCONFIG: + { + Op_Setconfig *rep; + + DBG("OP_SETCONFIG %i", c->pid); + rep = (Op_Setconfig *)tdata; + cache_max_usage = rep->cache_max_usage; + cache_item_timeout = rep->cache_item_timeout; + cache_item_timeout_check = rep->cache_item_timeout_check; + DBG("... cache timeout"); + cache_timeout(t_now); + DBG("... cache clean"); + cache_clean(); + } + break; + case OP_GETSTATS: + { + Op_Getstats_Reply msg; + + DBG("OP_GETSTATS %i", c->pid); + stats_calc(); + msg.saved_memory = saved_memory; + msg.wasted_memory = (real_memory - alloced_memory); + msg.saved_memory_peak = saved_memory_peak; + msg.wasted_memory_peak = (real_memory_peak - alloced_memory_peak); + msg.saved_time_image_header_load = saved_load_lifetime + saved_load_time; + msg.saved_time_image_data_load = saved_loaddata_lifetime + saved_loaddata_time; + DBG("... reply"); + evas_cserve_client_send(c, OP_GETSTATS, sizeof(msg), (unsigned char *)(&msg)); + } + break; + case OP_GETINFO: + { + Op_Getinfo_Reply *msg; + int len; + Eina_List *imgs = NULL, *l; + Img *img; + + DBG("OP_GETINFO %i", c->pid); + len = sizeof(Op_Getinfo_Reply); + DBG("... foreach"); + if (active_images) + eina_hash_foreach(active_images, getinfo_hash_image_cb, &imgs); + DBG("... walk foreach list output"); + LKL(cache_lock); + EINA_LIST_FOREACH(cache_images, l, img) + { + imgs = eina_list_append(imgs, img); + } + LKU(cache_lock); + DBG("... walk image cache"); + EINA_LIST_FOREACH(imgs, l, img) + { + len += sizeof(Op_Getinfo_Item); + if (img->file.file) len += strlen(img->file.file); + len++; + if (img->file.key) len += strlen(img->file.key); + len++; + } + DBG("... malloc msg"); + msg = calloc(1, len); + if (msg) + { + unsigned char *p; + + DBG("... init msg"); + p = (unsigned char *)msg; + msg->active.mem_total = 0; + msg->active.count = 0; + msg->cached.mem_total = 0; + msg->cached.count = 0; + p += sizeof(Op_Getinfo_Reply); + DBG("... walk all imgs"); + EINA_LIST_FOREACH(imgs, l, img) + { + Op_Getinfo_Item it; + + LKL(img->lock); + DBG("... img %p", img); + memset(&it, 0, sizeof(Op_Getinfo_Item)); + it.file_key_size = 0; + if (img->file.file) + { + strcpy((char *)p + sizeof(Op_Getinfo_Item) + it.file_key_size, img->file.file); + it.file_key_size += strlen(img->file.file); + } + p[sizeof(Op_Getinfo_Item) + it.file_key_size] = 0; + it.file_key_size += 1; + if (img->file.key) + { + strcpy((char *)p + sizeof(Op_Getinfo_Item) + it.file_key_size, img->file.key); + it.file_key_size += strlen(img->file.key); + } + p[sizeof(Op_Getinfo_Item) + it.file_key_size] = 0; + it.file_key_size += 1; + + it.w = img->image.w; + it.h = img->image.h; + it.file_mod_time = img->file.modtime; + it.file_checked_time = img->file.last_stat; + if (!img->active) + it.cached_time = img->cached; + else + it.cached_time = 0; + it.refcount = img->ref; + it.data_refcount = img->dref; + it.memory_footprint = img->usage; + it.head_load_time = img->stats.load1; + it.data_load_time = img->stats.load2; + it.alpha = img->image.alpha; + if (img->image.data) + it.data_loaded = 1; + else + it.data_loaded = 0; + it.active = img->active; + if (it.active) + { + msg->active.count++; + msg->active.mem_total += img->usage; + } + else + { + msg->cached.count++; + msg->cached.mem_total += img->usage; + } + it.dead = img->dead; + it.useless = img->useless; + DBG("... memcpy %p %p %zu ", + p, &it, sizeof(Op_Getinfo_Item)); + memcpy(p, &it, sizeof(Op_Getinfo_Item)); + DBG("... memcpy done %p", img); + p += sizeof(Op_Getinfo_Item) + it.file_key_size; + LKU(img->lock); + } + DBG("... walk all imgs done"); + msg->active.mem_total = + (msg->active.mem_total + 1023) / 1024; + msg->cached.mem_total = + (msg->cached.mem_total + 1023) / 1024; + DBG("... reply"); + evas_cserve_client_send(c, OP_GETINFO, len, (unsigned char *)msg); + free(msg); + } + else + { + DBG("... reply empty"); + evas_cserve_client_send(c, OP_GETINFO, 0, NULL); + } + DBG("... free imgs list"); + if (imgs) eina_list_free(imgs); + } + break; + default: + DBG("OP_... UNKNOWN??? %i opcode: %i", c->pid, opcode); + break; + } + return 0; +} + +static void +parse_args(int argc, char **argv) +{ + int i; + + for (i = 1; i < argc; i++) + { + if ((!strcmp(argv[i], "-h")) || + (!strcmp(argv[i], "-help")) || + (!strcmp(argv[i], "--help"))) + { + printf("Options:\n" + "\t-h This help\n" + "\t-csize Size of speculative cache (Kb)\n" + "\t-ctime Maximum life of a cached image (seconds)\n" + "\t-ctimecheck Time between checking the cache for timeouts (seconds)\n" + "\t-debug Enable debug logging\n" + "\n"); + exit(0); + } + else if ((!strcmp(argv[i], "-csize")) && (i < (argc - 1))) + { + i++; + cache_max_usage = atoi(argv[i]); + } + else if ((!strcmp(argv[i], "-ctime")) && (i < (argc - 1))) + { + i++; + cache_item_timeout = atoi(argv[i]); + } + else if ((!strcmp(argv[i], "-ctimecheck")) && (i < (argc - 1))) + { + i++; + cache_item_timeout_check = atoi(argv[i]); + } + else if (!strcmp(argv[i], "-debug")) + { + eina_log_level_set(EINA_LOG_LEVEL_DBG); + } + } +} + +static int exit_flag = 0; + +static void +exit_handler(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__) +{ + exit_flag = 1; +} + +static void +pipe_handler(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__) +{ +} + +static void +signal_init(void) +{ + struct sigaction action, old_action; + + action.sa_handler = NULL; + action.sa_sigaction = exit_handler; + action.sa_flags = SA_RESTART | SA_SIGINFO; + sigemptyset(&action.sa_mask); + sigaction(SIGINT, &action, &old_action); + + action.sa_handler = NULL; + action.sa_sigaction = exit_handler; + action.sa_flags = SA_RESTART | SA_SIGINFO; + sigemptyset(&action.sa_mask); + sigaction(SIGTERM, &action, &old_action); + + action.sa_handler = NULL; + action.sa_sigaction = exit_handler; + action.sa_flags = SA_RESTART | SA_SIGINFO; + sigemptyset(&action.sa_mask); + sigaction(SIGQUIT, &action, &old_action); + + action.sa_handler = NULL; + action.sa_sigaction = pipe_handler; + action.sa_flags = SA_RESTART | SA_SIGINFO; + sigemptyset(&action.sa_mask); + sigaction(SIGPIPE, &action, &old_action); + + // SIGUSR1 + // SIGUSR2 + // SIGHUP + + // SIGCHLD + + // SIGSEGV + // SIGILL + // SIGBUS + // SIGFPE + // SIGABRT +} + +static void +signal_shutdown(void) +{ +} + +int +main(int argc, char **argv) +{ + Server *s; + time_t last_check, t, t_next; + pid_t pid; + + t = time(NULL); + pid = getpid(); + t ^= (pid << 24) | (pid << 16) | (pid << 8) | (pid); + srand(t); + server_id = rand(); + + parse_args(argc, argv); + + unsetenv("EVAS_CSERVE"); + + eina_init(); + _evas_cserve_bin_log_dom = eina_log_domain_register + ("evas_cserve_bin", CSERVE_BIN_DEFAULT_COLOR); + if (_evas_cserve_bin_log_dom < 0) + { + EINA_LOG_ERR("impossible to create a log domain."); + eina_shutdown(); + exit(1); + } + + DBG("evas init..."); + evas_init(); + DBG("img init..."); + img_init(); + DBG("signal init..."); + signal_init(); + DBG("cserve add..."); + s = evas_cserve_server_add(); + if (!s) + { + ERR("ERROR: server socket init fail. abort."); + goto error; + } + DBG("mem open (status)..."); + stat_mem = evas_cserve_mem_open(0, 0, "status", sizeof(int), 0); + if (stat_mem) + { + WRN("WARNING: previous evas_cserve left garbage. cleaning up."); + stat_clean(stat_mem); + evas_cserve_mem_close(stat_mem); + stat_mem = NULL; + } + DBG("mem new (status)..."); + stat_mem = evas_cserve_mem_new(sizeof(int), "status"); + if (!stat_mem) + { + ERR("ERROR: cannot create status shmseg. abort."); + goto error; + } + DBG("init status..."); + if (!stat_init(stat_mem)) + { + ERR("cannot init status shmseg. abort."); + evas_cserve_mem_free(stat_mem); + stat_mem = NULL; + goto error; + } + + DBG("cset server message handler..."); + evas_cserve_server_message_handler_set(s, message, NULL); + last_check = time(NULL); + t_next = 0; + if (cache_item_timeout_check > 0) t_next = cache_item_timeout_check; + DBG("LOOP!!! ..."); + for (;;) + { + /* fixme: timeout 0 only her - future use timeouts for timed + * housekeping */ + if (exit_flag) break; + DBG("wait for messages..."); + evas_cserve_server_wait(s, t_next * 1000000); + if (exit_flag) break; + t = time(NULL); + t_next = t - last_check; + if ((cache_item_timeout_check > 0) && + ((t_next) >= cache_item_timeout_check)) + { + DBG("check timeout of items..."); + t_next = cache_item_timeout_check; + + last_check = t; + DBG("cache timeout..."); + cache_timeout(t); + DBG("meminfo check..."); + meminfo_check(); + DBG("mem cache adjust..."); + mem_cache_adjust(); + } + if ((t_next <= 0) && (cache_item_timeout_check > 0)) + t_next = 1; + DBG("sleep for %isec...", (int)t_next); + + LKL(strshr_freeme_lock); + if (strshr_freeme_count > 0) + { + int i; + + for (i = 0; i < strshr_freeme_count; i++) + eina_stringshare_del(strshr_freeme[i]); + strshr_freeme_count = 0; + } + LKU(strshr_freeme_lock); + + LKL(cache_lock); + if (cache_cleanme) + { + Eina_List *l; + Img *img; + Eina_List *kills = NULL; + + EINA_LIST_FOREACH(cache_images, l, img) + { + LKL(img->lock); + if (img->killme) + kills = eina_list_append(kills, img); + LKU(img->lock); + } + while (kills) + { + img = kills->data; + kills = eina_list_remove_list(kills, kills); + LKL(img->lock); + cache_images = eina_list_remove(cache_images, img); + img->incache--; + cache_usage -= img->usage; + DBG("... IMG FREE %p", img); + img_free(img); + } + cache_cleanme = 0; + } + LKU(cache_lock); + } + DBG("end loop..."); + error: + DBG("cleanup..."); + if (stat_mem) + { + DBG("clean mem stat..."); + stat_clean(stat_mem); + } + DBG("signal shutdown..."); + signal_shutdown(); + DBG("img shutdown..."); + img_shutdown(); + if (stat_mem) + { + DBG("free stat mem..."); + evas_cserve_mem_free(stat_mem); + stat_mem = NULL; + } + if (s) + { + DBG("del server..."); + evas_cserve_server_del(s); + } + DBG("evas shutdown..."); + evas_shutdown(); + eina_log_domain_unregister(_evas_cserve_bin_log_dom); + DBG("eina shutdown..."); + eina_shutdown(); + DBG("exit.."); + return 0; +} diff --git a/libraries/evas/src/bin/evas_cserve_tool.c b/libraries/evas/src/bin/evas_cserve_tool.c new file mode 100644 index 0000000..acaa703 --- /dev/null +++ b/libraries/evas/src/bin/evas_cserve_tool.c @@ -0,0 +1,160 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "evas_cs.h" + +int _cserve_tool_log_dom = -1; + +int +main(int argc, char **argv) +{ + int i; + + evas_init(); + if (!evas_cserve_init()) + { + printf("ERROR: Cannot connect to cserve. abort\n"); + exit(-1); + } + + for (i = 1; i < argc; i++) + { + if ((!strcmp(argv[i], "-h")) || + (!strcmp(argv[i], "-help")) || + (!strcmp(argv[i], "--help"))) + { + printf("Options:\n" + "\t-h This help\n" + "\tgetconfig Get configuration values\n" + "\tsetconfig CSIZE CTIME CTIMECHECK Set the config values\n" + "\tgetstats Get current cache statistics\n" + "\tgetinfo Get current cache content info\n" + ); + exit(0); + } + else if ((!strcmp(argv[i], "getconfig"))) + { + Op_Getconfig_Reply config; + + if (!evas_cserve_raw_config_get(&config)) + { + printf("ERROR: cannot fetch config.\n"); + exit(-1); + } + printf("-REPLY-\n"); + printf("csize: %i\n", config.cache_max_usage); + printf("ctime: %i\n", config.cache_item_timeout); + printf("ctimecheck: %i\n", config.cache_item_timeout_check); + printf("-OK-\n"); + } + else if ((!strcmp(argv[i], "setconfig")) && (i < (argc - 3))) + { + Op_Setconfig config; + + i++; + config.cache_max_usage = atoi(argv[i]); + i++; + config.cache_item_timeout = atoi(argv[i]); + i++; + config.cache_item_timeout_check = atoi(argv[i]); + if (!evas_cserve_raw_config_set(&config)) + { + printf("ERROR: cannot set config.\n"); + exit(-1); + } + } + else if ((!strcmp(argv[i], "getstats"))) + { + Op_Getstats_Reply stats; + + if (!evas_cserve_raw_stats_get(&stats)) + { + printf("ERROR: cannot fetch stats.\n"); + exit(-1); + } + printf("-REPLY-\n"); + printf("saved_memory: %i Kb\n", stats.saved_memory / 1024); + printf("wasted_memory: %i Kb\n", stats.wasted_memory / 1024); + printf("saved_memory_peak: %i Kb\n", stats.saved_memory_peak / 1024); + printf("wasted_memory_peak: %i Kb\n", stats.wasted_memory_peak / 1024); + printf("saved_time_image_header_load: %1.3f sec\n", stats.saved_time_image_header_load); + printf("saved_time_image_data_load: %1.3f sec\n", stats.saved_time_image_data_load); + printf("-OK-\n"); + } + else if ((!strcmp(argv[i], "getinfo"))) + { + Op_Getinfo_Reply *info; + unsigned char *p; + int h, j; + + info = evas_cserve_raw_info_get(); + if (!info) + { + printf("ERROR: cannot fetch info.\n"); + exit(-1); + } + j = info->active.count + info->cached.count; + printf("-REPLY-\n"); + printf("active_count: %i\n", info->active.count); + printf("active_memory: %i Kb\n", info->active.mem_total); + printf("cache_count: %i\n", info->cached.count); + printf("cache_memory: %i Kb\n", info->cached.mem_total); + p = (unsigned char *)info; + p += sizeof(Op_Getinfo_Reply); + for (h = 0; h < j; h++) + { + Op_Getinfo_Item it; + char *file, *key, buf[512]; + struct tm *ltm; + + memcpy(&it, p, sizeof(Op_Getinfo_Item)); + file = (char*) (p + sizeof(Op_Getinfo_Item)); + key = file + strlen(file) + 1; + printf("-IMAGE- [#%i]\n", h); + printf(" file : %s\n", file); + printf(" key : %s\n", key); + printf(" size : %i x %i\n", it.w, it.h); + printf(" active : %i\n", (int)it.active); + printf(" memory used: %i bytes (%i Kb)\n", it.memory_footprint, (it.memory_footprint + 1023) / 1024); + printf(" has alpha : %i\n", (int)it.alpha); + printf(" data loaded: %i\n", (int)it.data_loaded); + printf(" dead : %i\n", (int)it.dead); + printf(" useless : %i\n", (int)it.useless); + printf(" image refs : %i\n", it.refcount); + printf(" data refs : %i\n", it.data_refcount); + printf(" header load: %1.5f sec\n", it.head_load_time); + printf(" data load : %1.5f sec\n", it.data_load_time); + if (it.cached_time == 0) + printf(" cached at : N/A\n"); + else + { + ltm = localtime(&(it.cached_time)); + if (ltm) + { + strftime(buf, sizeof(buf), "%Y.%m.%d %T", ltm); + printf(" cached at : %s\n", buf); + } + } + ltm = localtime(&(it.file_mod_time)); + if (ltm) + { + strftime(buf, sizeof(buf), "%Y.%m.%d %T", ltm); + printf(" file mod at: %s\n", buf); + } + ltm = localtime(&(it.file_checked_time)); + if (ltm) + { + strftime(buf, sizeof(buf), "%Y.%m.%d %T", ltm); + printf(" file check : %s\n", buf); + } + p += sizeof(Op_Getinfo_Item) + it.file_key_size; + } + free(info); + printf("-OK-\n"); + } + } + evas_cserve_shutdown(); + evas_shutdown(); + return 0; +} diff --git a/libraries/evas/src/examples/Makefile.am b/libraries/evas/src/examples/Makefile.am new file mode 100644 index 0000000..f748c12 --- /dev/null +++ b/libraries/evas/src/examples/Makefile.am @@ -0,0 +1,149 @@ +MAINTAINERCLEANFILES = Makefile.in + +pkglibdir = $(datadir)/$(PACKAGE)/examples + +#put here all EDCs one needs to the tests +EDCS = aspect.edc + +filesdir = $(datadir)/$(PACKAGE)/examples +files_DATA = + +if BUILD_EXAMPLES + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +-DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@FRIBIDI_CFLAGS@ \ +@EET_CFLAGS@ \ +@FONTCONFIG_CFLAGS@ \ +@pthread_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +pkglib_PROGRAMS = + +if BUILD_ENGINE_BUFFER +AM_CPPFLAGS += -I$(top_srcdir)/src/modules/engines/buffer + +pkglib_PROGRAMS += evas_buffer_simple +evas_buffer_simple_SOURCES = evas-buffer-simple.c +evas_buffer_simple_LDADD = $(top_builddir)/src/lib/libevas.la +endif + +pkglib_PROGRAMS += evas_init_shutdown +evas_init_shutdown_SOURCES = evas-init-shutdown.c +evas_init_shutdown_LDADD = $(top_builddir)/src/lib/libevas.la + +#the ones using ecore_evas follow +AM_CPPFLAGS += @ECORE_EVAS_CFLAGS@ + +pkglib_PROGRAMS += evas_images +evas_images_SOURCES = evas-images.c +evas_images_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ + +pkglib_PROGRAMS += evas_events +evas_events_SOURCES = evas-events.c +evas_events_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ + +pkglib_PROGRAMS += evas_object_manipulation +evas_object_manipulation_SOURCES = evas-object-manipulation.c +evas_object_manipulation_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ + +pkglib_PROGRAMS += evas_hints +evas_hints_SOURCES = evas-hints.c +evas_hints_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ + +pkglib_PROGRAMS += evas_stacking +evas_stacking_SOURCES = evas-stacking.c +evas_stacking_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ + +pkglib_PROGRAMS += evas_images2 +evas_images2_SOURCES = evas-images2.c +evas_images2_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ + +pkglib_PROGRAMS += evas_text +evas_text_SOURCES = evas-text.c +evas_text_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ + +pkglib_PROGRAMS += evas_smart_object +evas_smart_object_SOURCES = evas-smart-object.c +evas_smart_object_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ + +pkglib_PROGRAMS += evas_box +evas_box_SOURCES = evas-box.c +evas_box_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ @EINA_LIBS@ + +#the ones using ecore_evas and edje follow +AM_CPPFLAGS += @EDJE_CFLAGS@ + +pkglib_PROGRAMS += evas_aspect_hints +evas_aspect_hints_DEPS = $(srcdir)/aspect.edc +evas_aspect_hints_SOURCES = evas-aspect-hints.c +evas_aspect_hints_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ @EDJE_LIBS@ + +pkglib_PROGRAMS += evas_map_utils +evas_map_utils_SOURCES = evas-map-utils.c +evas_map_utils_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ + +aspect.edj: ${evas_aspect_hints_DEPS} + +.edc.edj: + $(edje_cc) -v -id $(srcdir) $< $(builddir)/$(@F) + +EDJS = $(EDCS:%.edc=%.edj) + +files_DATA += $(EDJS) + +endif # if BUILD_EXAMPLES + +if INSTALL_EXAMPLES + +#put here additional data when installing examples +files_DATA += $(srcdir)/enlightenment.png \ + $(srcdir)/red.png \ + $(srcdir)/im1.png \ + $(srcdir)/cube1.png + +files_DATA += \ + $(EDCS) \ + $(srcdir)/evas-buffer-simple.c \ + $(srcdir)/evas-init-shutdown.c \ + $(srcdir)/evas-images.c \ + $(srcdir)/evas-images2.c \ + $(srcdir)/evas-object-manipulation.c \ + $(srcdir)/evas-events.c \ + $(srcdir)/evas-aspect-hints.c \ + $(srcdir)/evas-hints.c \ + $(srcdir)/evas-stacking.c \ + $(srcdir)/evas-map-utils.c \ + $(srcdir)/evas-text.c \ + $(srcdir)/evas-smart-object.c \ + $(srcdir)/evas-box.c +endif + +EXTRA_DIST = $(EDCS) \ + $(srcdir)/evas-buffer-simple.c \ + $(srcdir)/evas-init-shutdown.c \ + $(srcdir)/evas-images.c \ + $(srcdir)/evas-images2.c \ + $(srcdir)/evas-object-manipulation.c \ + $(srcdir)/evas-events.c \ + $(srcdir)/evas-aspect-hints.c \ + $(srcdir)/evas-hints.c \ + $(srcdir)/evas-stacking.c \ + $(srcdir)/evas-map-utils.c \ + $(srcdir)/evas-text.c \ + $(srcdir)/evas-smart-object.c \ + $(srcdir)/evas-box.c \ + $(srcdir)/enlightenment.png \ + $(srcdir)/red.png \ + $(srcdir)/im1.png \ + $(srcdir)/cube1.png diff --git a/libraries/evas/src/examples/Makefile.in b/libraries/evas/src/examples/Makefile.in new file mode 100644 index 0000000..5332650 --- /dev/null +++ b/libraries/evas/src/examples/Makefile.in @@ -0,0 +1,983 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@BUILD_EXAMPLES_TRUE@pkglib_PROGRAMS = $(am__EXEEXT_1) \ +@BUILD_EXAMPLES_TRUE@ evas_init_shutdown$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ evas_images$(EXEEXT) evas_events$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ evas_object_manipulation$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ evas_hints$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ evas_stacking$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ evas_images2$(EXEEXT) evas_text$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ evas_smart_object$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ evas_box$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ evas_aspect_hints$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ evas_map_utils$(EXEEXT) +@BUILD_ENGINE_BUFFER_TRUE@@BUILD_EXAMPLES_TRUE@am__append_1 = -I$(top_srcdir)/src/modules/engines/buffer +@BUILD_ENGINE_BUFFER_TRUE@@BUILD_EXAMPLES_TRUE@am__append_2 = evas_buffer_simple +@BUILD_EXAMPLES_TRUE@am__append_3 = $(EDJS) + +#put here additional data when installing examples +@INSTALL_EXAMPLES_TRUE@am__append_4 = $(srcdir)/enlightenment.png \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/red.png $(srcdir)/im1.png \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/cube1.png $(EDCS) \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-buffer-simple.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-init-shutdown.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-images.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-images2.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-object-manipulation.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-events.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-aspect-hints.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-hints.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-stacking.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-map-utils.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-text.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-smart-object.c \ +@INSTALL_EXAMPLES_TRUE@ $(srcdir)/evas-box.c +subdir = src/examples +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@BUILD_ENGINE_BUFFER_TRUE@@BUILD_EXAMPLES_TRUE@am__EXEEXT_1 = evas_buffer_simple$(EXEEXT) +am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)" +PROGRAMS = $(pkglib_PROGRAMS) +am__evas_aspect_hints_SOURCES_DIST = evas-aspect-hints.c +@BUILD_EXAMPLES_TRUE@am_evas_aspect_hints_OBJECTS = \ +@BUILD_EXAMPLES_TRUE@ evas-aspect-hints.$(OBJEXT) +evas_aspect_hints_OBJECTS = $(am_evas_aspect_hints_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_aspect_hints_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__evas_box_SOURCES_DIST = evas-box.c +@BUILD_EXAMPLES_TRUE@am_evas_box_OBJECTS = evas-box.$(OBJEXT) +evas_box_OBJECTS = $(am_evas_box_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_box_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +am__evas_buffer_simple_SOURCES_DIST = evas-buffer-simple.c +@BUILD_ENGINE_BUFFER_TRUE@@BUILD_EXAMPLES_TRUE@am_evas_buffer_simple_OBJECTS = evas-buffer-simple.$(OBJEXT) +evas_buffer_simple_OBJECTS = $(am_evas_buffer_simple_OBJECTS) +@BUILD_ENGINE_BUFFER_TRUE@@BUILD_EXAMPLES_TRUE@evas_buffer_simple_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__evas_events_SOURCES_DIST = evas-events.c +@BUILD_EXAMPLES_TRUE@am_evas_events_OBJECTS = evas-events.$(OBJEXT) +evas_events_OBJECTS = $(am_evas_events_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_events_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +am__evas_hints_SOURCES_DIST = evas-hints.c +@BUILD_EXAMPLES_TRUE@am_evas_hints_OBJECTS = evas-hints.$(OBJEXT) +evas_hints_OBJECTS = $(am_evas_hints_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_hints_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +am__evas_images_SOURCES_DIST = evas-images.c +@BUILD_EXAMPLES_TRUE@am_evas_images_OBJECTS = evas-images.$(OBJEXT) +evas_images_OBJECTS = $(am_evas_images_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_images_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +am__evas_images2_SOURCES_DIST = evas-images2.c +@BUILD_EXAMPLES_TRUE@am_evas_images2_OBJECTS = evas-images2.$(OBJEXT) +evas_images2_OBJECTS = $(am_evas_images2_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_images2_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +am__evas_init_shutdown_SOURCES_DIST = evas-init-shutdown.c +@BUILD_EXAMPLES_TRUE@am_evas_init_shutdown_OBJECTS = \ +@BUILD_EXAMPLES_TRUE@ evas-init-shutdown.$(OBJEXT) +evas_init_shutdown_OBJECTS = $(am_evas_init_shutdown_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_init_shutdown_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +am__evas_map_utils_SOURCES_DIST = evas-map-utils.c +@BUILD_EXAMPLES_TRUE@am_evas_map_utils_OBJECTS = \ +@BUILD_EXAMPLES_TRUE@ evas-map-utils.$(OBJEXT) +evas_map_utils_OBJECTS = $(am_evas_map_utils_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_map_utils_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +am__evas_object_manipulation_SOURCES_DIST = \ + evas-object-manipulation.c +@BUILD_EXAMPLES_TRUE@am_evas_object_manipulation_OBJECTS = \ +@BUILD_EXAMPLES_TRUE@ evas-object-manipulation.$(OBJEXT) +evas_object_manipulation_OBJECTS = \ + $(am_evas_object_manipulation_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_object_manipulation_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +am__evas_smart_object_SOURCES_DIST = evas-smart-object.c +@BUILD_EXAMPLES_TRUE@am_evas_smart_object_OBJECTS = \ +@BUILD_EXAMPLES_TRUE@ evas-smart-object.$(OBJEXT) +evas_smart_object_OBJECTS = $(am_evas_smart_object_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_smart_object_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +am__evas_stacking_SOURCES_DIST = evas-stacking.c +@BUILD_EXAMPLES_TRUE@am_evas_stacking_OBJECTS = \ +@BUILD_EXAMPLES_TRUE@ evas-stacking.$(OBJEXT) +evas_stacking_OBJECTS = $(am_evas_stacking_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_stacking_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +am__evas_text_SOURCES_DIST = evas-text.c +@BUILD_EXAMPLES_TRUE@am_evas_text_OBJECTS = evas-text.$(OBJEXT) +evas_text_OBJECTS = $(am_evas_text_OBJECTS) +@BUILD_EXAMPLES_TRUE@evas_text_DEPENDENCIES = \ +@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libevas.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(evas_aspect_hints_SOURCES) $(evas_box_SOURCES) \ + $(evas_buffer_simple_SOURCES) $(evas_events_SOURCES) \ + $(evas_hints_SOURCES) $(evas_images_SOURCES) \ + $(evas_images2_SOURCES) $(evas_init_shutdown_SOURCES) \ + $(evas_map_utils_SOURCES) $(evas_object_manipulation_SOURCES) \ + $(evas_smart_object_SOURCES) $(evas_stacking_SOURCES) \ + $(evas_text_SOURCES) +DIST_SOURCES = $(am__evas_aspect_hints_SOURCES_DIST) \ + $(am__evas_box_SOURCES_DIST) \ + $(am__evas_buffer_simple_SOURCES_DIST) \ + $(am__evas_events_SOURCES_DIST) $(am__evas_hints_SOURCES_DIST) \ + $(am__evas_images_SOURCES_DIST) \ + $(am__evas_images2_SOURCES_DIST) \ + $(am__evas_init_shutdown_SOURCES_DIST) \ + $(am__evas_map_utils_SOURCES_DIST) \ + $(am__evas_object_manipulation_SOURCES_DIST) \ + $(am__evas_smart_object_SOURCES_DIST) \ + $(am__evas_stacking_SOURCES_DIST) \ + $(am__evas_text_SOURCES_DIST) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +DATA = $(files_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkglibdir = $(datadir)/$(PACKAGE)/examples +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in + +#put here all EDCs one needs to the tests +EDCS = aspect.edc +filesdir = $(datadir)/$(PACKAGE)/examples +files_DATA = $(am__append_3) $(am__append_4) + +#the ones using ecore_evas follow + +#the ones using ecore_evas and edje follow +@BUILD_EXAMPLES_TRUE@AM_CPPFLAGS = -I. -I$(top_srcdir)/src/lib \ +@BUILD_EXAMPLES_TRUE@ -I$(top_srcdir)/src/lib/include \ +@BUILD_EXAMPLES_TRUE@ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ +@BUILD_EXAMPLES_TRUE@ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ +@BUILD_EXAMPLES_TRUE@ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@BUILD_EXAMPLES_TRUE@ -DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" \ +@BUILD_EXAMPLES_TRUE@ @EINA_CFLAGS@ @FREETYPE_CFLAGS@ \ +@BUILD_EXAMPLES_TRUE@ @PIXMAN_CFLAGS@ @FRIBIDI_CFLAGS@ \ +@BUILD_EXAMPLES_TRUE@ @EET_CFLAGS@ @FONTCONFIG_CFLAGS@ \ +@BUILD_EXAMPLES_TRUE@ @pthread_cflags@ $(am__append_1) \ +@BUILD_EXAMPLES_TRUE@ @ECORE_EVAS_CFLAGS@ @EDJE_CFLAGS@ \ +@BUILD_EXAMPLES_TRUE@ $(am__empty) +@BUILD_EXAMPLES_TRUE@AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_ENGINE_BUFFER_TRUE@@BUILD_EXAMPLES_TRUE@evas_buffer_simple_SOURCES = evas-buffer-simple.c +@BUILD_ENGINE_BUFFER_TRUE@@BUILD_EXAMPLES_TRUE@evas_buffer_simple_LDADD = $(top_builddir)/src/lib/libevas.la +@BUILD_EXAMPLES_TRUE@evas_init_shutdown_SOURCES = evas-init-shutdown.c +@BUILD_EXAMPLES_TRUE@evas_init_shutdown_LDADD = $(top_builddir)/src/lib/libevas.la +@BUILD_EXAMPLES_TRUE@evas_images_SOURCES = evas-images.c +@BUILD_EXAMPLES_TRUE@evas_images_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ +@BUILD_EXAMPLES_TRUE@evas_events_SOURCES = evas-events.c +@BUILD_EXAMPLES_TRUE@evas_events_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ +@BUILD_EXAMPLES_TRUE@evas_object_manipulation_SOURCES = evas-object-manipulation.c +@BUILD_EXAMPLES_TRUE@evas_object_manipulation_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ +@BUILD_EXAMPLES_TRUE@evas_hints_SOURCES = evas-hints.c +@BUILD_EXAMPLES_TRUE@evas_hints_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ +@BUILD_EXAMPLES_TRUE@evas_stacking_SOURCES = evas-stacking.c +@BUILD_EXAMPLES_TRUE@evas_stacking_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ +@BUILD_EXAMPLES_TRUE@evas_images2_SOURCES = evas-images2.c +@BUILD_EXAMPLES_TRUE@evas_images2_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ +@BUILD_EXAMPLES_TRUE@evas_text_SOURCES = evas-text.c +@BUILD_EXAMPLES_TRUE@evas_text_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ +@BUILD_EXAMPLES_TRUE@evas_smart_object_SOURCES = evas-smart-object.c +@BUILD_EXAMPLES_TRUE@evas_smart_object_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ +@BUILD_EXAMPLES_TRUE@evas_box_SOURCES = evas-box.c +@BUILD_EXAMPLES_TRUE@evas_box_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ @EINA_LIBS@ +@BUILD_EXAMPLES_TRUE@evas_aspect_hints_DEPS = $(srcdir)/aspect.edc +@BUILD_EXAMPLES_TRUE@evas_aspect_hints_SOURCES = evas-aspect-hints.c +@BUILD_EXAMPLES_TRUE@evas_aspect_hints_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ @EDJE_LIBS@ +@BUILD_EXAMPLES_TRUE@evas_map_utils_SOURCES = evas-map-utils.c +@BUILD_EXAMPLES_TRUE@evas_map_utils_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ +@BUILD_EXAMPLES_TRUE@EDJS = $(EDCS:%.edc=%.edj) +EXTRA_DIST = $(EDCS) \ + $(srcdir)/evas-buffer-simple.c \ + $(srcdir)/evas-init-shutdown.c \ + $(srcdir)/evas-images.c \ + $(srcdir)/evas-images2.c \ + $(srcdir)/evas-object-manipulation.c \ + $(srcdir)/evas-events.c \ + $(srcdir)/evas-aspect-hints.c \ + $(srcdir)/evas-hints.c \ + $(srcdir)/evas-stacking.c \ + $(srcdir)/evas-map-utils.c \ + $(srcdir)/evas-text.c \ + $(srcdir)/evas-smart-object.c \ + $(srcdir)/evas-box.c \ + $(srcdir)/enlightenment.png \ + $(srcdir)/red.png \ + $(srcdir)/im1.png \ + $(srcdir)/cube1.png + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .edc .edj .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/examples/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/examples/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibPROGRAMS: $(pkglib_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-pkglibPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files + +clean-pkglibPROGRAMS: + @list='$(pkglib_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +evas_aspect_hints$(EXEEXT): $(evas_aspect_hints_OBJECTS) $(evas_aspect_hints_DEPENDENCIES) + @rm -f evas_aspect_hints$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_aspect_hints_OBJECTS) $(evas_aspect_hints_LDADD) $(LIBS) +evas_box$(EXEEXT): $(evas_box_OBJECTS) $(evas_box_DEPENDENCIES) + @rm -f evas_box$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_box_OBJECTS) $(evas_box_LDADD) $(LIBS) +evas_buffer_simple$(EXEEXT): $(evas_buffer_simple_OBJECTS) $(evas_buffer_simple_DEPENDENCIES) + @rm -f evas_buffer_simple$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_buffer_simple_OBJECTS) $(evas_buffer_simple_LDADD) $(LIBS) +evas_events$(EXEEXT): $(evas_events_OBJECTS) $(evas_events_DEPENDENCIES) + @rm -f evas_events$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_events_OBJECTS) $(evas_events_LDADD) $(LIBS) +evas_hints$(EXEEXT): $(evas_hints_OBJECTS) $(evas_hints_DEPENDENCIES) + @rm -f evas_hints$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_hints_OBJECTS) $(evas_hints_LDADD) $(LIBS) +evas_images$(EXEEXT): $(evas_images_OBJECTS) $(evas_images_DEPENDENCIES) + @rm -f evas_images$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_images_OBJECTS) $(evas_images_LDADD) $(LIBS) +evas_images2$(EXEEXT): $(evas_images2_OBJECTS) $(evas_images2_DEPENDENCIES) + @rm -f evas_images2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_images2_OBJECTS) $(evas_images2_LDADD) $(LIBS) +evas_init_shutdown$(EXEEXT): $(evas_init_shutdown_OBJECTS) $(evas_init_shutdown_DEPENDENCIES) + @rm -f evas_init_shutdown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_init_shutdown_OBJECTS) $(evas_init_shutdown_LDADD) $(LIBS) +evas_map_utils$(EXEEXT): $(evas_map_utils_OBJECTS) $(evas_map_utils_DEPENDENCIES) + @rm -f evas_map_utils$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_map_utils_OBJECTS) $(evas_map_utils_LDADD) $(LIBS) +evas_object_manipulation$(EXEEXT): $(evas_object_manipulation_OBJECTS) $(evas_object_manipulation_DEPENDENCIES) + @rm -f evas_object_manipulation$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_object_manipulation_OBJECTS) $(evas_object_manipulation_LDADD) $(LIBS) +evas_smart_object$(EXEEXT): $(evas_smart_object_OBJECTS) $(evas_smart_object_DEPENDENCIES) + @rm -f evas_smart_object$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_smart_object_OBJECTS) $(evas_smart_object_LDADD) $(LIBS) +evas_stacking$(EXEEXT): $(evas_stacking_OBJECTS) $(evas_stacking_DEPENDENCIES) + @rm -f evas_stacking$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_stacking_OBJECTS) $(evas_stacking_LDADD) $(LIBS) +evas_text$(EXEEXT): $(evas_text_OBJECTS) $(evas_text_DEPENDENCIES) + @rm -f evas_text$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_text_OBJECTS) $(evas_text_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-aspect-hints.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-box.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-buffer-simple.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-events.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-hints.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-images.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-images2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-init-shutdown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-map-utils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-object-manipulation.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-smart-object.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-stacking.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas-text.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-filesDATA: $(files_DATA) + @$(NORMAL_INSTALL) + test -z "$(filesdir)" || $(MKDIR_P) "$(DESTDIR)$(filesdir)" + @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filesdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(filesdir)" || exit $$?; \ + done + +uninstall-filesDATA: + @$(NORMAL_UNINSTALL) + @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(filesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(filesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pkglibPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-filesDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-filesDATA uninstall-pkglibPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkglibPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-filesDATA \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkglibPROGRAMS \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-filesDATA \ + uninstall-pkglibPROGRAMS + + +@BUILD_EXAMPLES_TRUE@aspect.edj: ${evas_aspect_hints_DEPS} + +@BUILD_EXAMPLES_TRUE@.edc.edj: +@BUILD_EXAMPLES_TRUE@ $(edje_cc) -v -id $(srcdir) $< $(builddir)/$(@F) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/examples/aspect.edc b/libraries/evas/src/examples/aspect.edc new file mode 100644 index 0000000..b8bfb31 --- /dev/null +++ b/libraries/evas/src/examples/aspect.edc @@ -0,0 +1,17 @@ +collections { + group { + name: "main"; + parts { + part { + name: "content"; + mouse_events: 0; + type: SWALLOW; + description { + state: "default" 0.0; + visible: 1; + } + } + } + } +} + diff --git a/libraries/evas/src/examples/cube1.png b/libraries/evas/src/examples/cube1.png new file mode 100644 index 0000000..c2f4fda Binary files /dev/null and b/libraries/evas/src/examples/cube1.png differ diff --git a/libraries/evas/src/examples/enlightenment.png b/libraries/evas/src/examples/enlightenment.png new file mode 100644 index 0000000..aeb836b Binary files /dev/null and b/libraries/evas/src/examples/enlightenment.png differ diff --git a/libraries/evas/src/examples/evas-aspect-hints.c b/libraries/evas/src/examples/evas-aspect-hints.c new file mode 100644 index 0000000..de8ed50 --- /dev/null +++ b/libraries/evas/src/examples/evas-aspect-hints.c @@ -0,0 +1,249 @@ +/** + * Simple Evas example illustrating aspect control hints on objects. + * + * You'll need at least one engine built for it (excluding the buffer + * one) and the png image loader also built. See stdout/stderr for + * output. + * + * You'll also need @b Edje for this one, as it has the only smart + * object implementing aspect control for children. + * + * @verbatim + * gcc -o evas-events evas-events.c `pkg-config --libs --cflags ecore-evas edje` + * @endverbatim + */ + +#ifdef HAVE_CONFIG_H + +#include "config.h" +#endif + +#include +#include +#include +#include +#include + +#define WIDTH 320 +#define HEIGHT 480 + +static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png"; +static const char *edje_file_path = PACKAGE_EXAMPLES_DIR "/aspect.edj"; + +struct test_data +{ + Ecore_Evas *ee; + Evas *canvas; + Evas_Object *bg, *rect, *container, *border; +}; + +static struct test_data d = {0}; + +/* here just to keep our example's window size and background image's + * size in synchrony */ +static void +_canvas_resize_cb(Ecore_Evas *ee) +{ + int w, h; + + ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + evas_object_resize(d.bg, w, h); +} + +static const char * +_get_aspect_name(Evas_Aspect_Control aspect) +{ + switch (aspect) + { + case 0: + return "NONE"; + + case 1: + return "NEITHER"; + + case 2: + return "HORIZONTAL"; + + case 3: + return "VERTICAL"; + + case 4: + return "BOTH"; + + default: + return "INVALID"; + } +} + +static void +_on_keydown(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o, + void *einfo) +{ + const Evas_Modifier *mods; + Evas_Event_Key_Down *ev = einfo; + + mods = evas_key_modifier_get(evas_object_evas_get(o)); + + if (evas_key_modifier_is_set(mods, "Shift") && + strcmp(ev->keyname, "h") == 0) /* print help */ + { + fprintf(stdout, "commands are:\n" + "\tc - cycle aspect control on object\n" + "\th - change horizontal aspect component\n" + "\tv - change vertical aspect component\n" + "\ts - print current object's status\n" + "\tH - print help\n"); + return; + } + + if (strcmp(ev->keyname, "s") == 0) /* get aspect status of the obj */ + { + Evas_Coord w, h; + Evas_Aspect_Control aspect; + + evas_object_size_hint_aspect_get(d.rect, &aspect, &w, &h); + + fprintf(stdout, "Object has aspect %s, with horizontal compontent %d" + " and vertical compontent %d\n", + _get_aspect_name(aspect), w, h); + + return; + } + + if (strcmp(ev->keyname, "c") == 0) /* cycle aspect control on obj */ + { + Evas_Coord w, h; + Evas_Aspect_Control aspect; + + evas_object_size_hint_aspect_get(d.rect, &aspect, &w, &h); + + aspect = (aspect + 1) % 5; + + evas_object_size_hint_aspect_set(d.rect, aspect, w, h); + + fprintf(stdout, "Changing aspect control to %s\n", + _get_aspect_name(aspect)); + + return; + } + + if (strcmp(ev->keyname, "h") == 0) /* change horizontal aspect component */ + { + Evas_Coord w, h; + Evas_Aspect_Control aspect; + + evas_object_size_hint_aspect_get(d.rect, &aspect, &w, &h); + + w = (w + 1) % 3; + + evas_object_size_hint_aspect_set(d.rect, aspect, w, h); + + fprintf(stdout, "Changing horizontal aspect component to %d\n", w); + + return; + } + + if (strcmp(ev->keyname, "v") == 0) /* change vertical aspect component */ + { + Evas_Coord w, h; + Evas_Aspect_Control aspect; + + evas_object_size_hint_aspect_get(d.rect, &aspect, &w, &h); + + h = (h + 1) % 3; + + evas_object_size_hint_aspect_set(d.rect, aspect, w, h); + + fprintf(stdout, "Changing vertical aspect component to %d\n", h); + + return; + } +} + +int +main(void) +{ + Eina_Bool ret; + + if (!ecore_evas_init()) + return EXIT_FAILURE; + + if (!edje_init()) + return EXIT_FAILURE; + + /* this will give you a window with an Evas canvas under the first + * engine available */ + d.ee = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL); + if (!d.ee) + goto error; + + ecore_evas_callback_resize_set(d.ee, _canvas_resize_cb); + ecore_evas_show(d.ee); + + /* the canvas pointer, de facto */ + d.canvas = ecore_evas_get(d.ee); + + d.bg = evas_object_rectangle_add(d.canvas); + evas_object_color_set(d.bg, 255, 255, 255, 255); /* white bg */ + evas_object_move(d.bg, 0, 0); /* at canvas' origin */ + evas_object_resize(d.bg, WIDTH, HEIGHT); /* covers full canvas */ + evas_object_show(d.bg); + + evas_object_focus_set(d.bg, EINA_TRUE); + evas_object_event_callback_add( + d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL); + + d.container = edje_object_add(d.canvas); + ret = edje_object_file_set(d.container, edje_file_path, "main"); + if (!ret) + { + Edje_Load_Error err = edje_object_load_error_get(d.container); + const char *msg = edje_load_error_str(err); + fprintf(stderr, "could not load 'main' from %s: %s", + edje_file_path, msg); + + goto panic; + } + + evas_object_move(d.container, (WIDTH / 4), (HEIGHT / 4)); + evas_object_resize(d.container, (WIDTH / 2), (HEIGHT / 2)); + evas_object_show(d.container); + + d.rect = evas_object_rectangle_add(d.canvas); + evas_object_color_set(d.rect, 0, 0, 255, 255); + evas_object_size_hint_aspect_set(d.rect, EVAS_ASPECT_CONTROL_NONE, 1, 1); + evas_object_show(d.rect); + + edje_object_part_swallow(d.container, "content", d.rect); + evas_object_smart_changed(d.container); + + /* this is a border around the edje object, container of the + * rectangle we are going to experiment with (change its aspect + * hints). this way you can see how their sizes relate */ + d.border = evas_object_image_filled_add(d.canvas); + evas_object_image_file_set(d.border, border_img_path, NULL); + evas_object_image_border_set(d.border, 3, 3, 3, 3); + evas_object_image_border_center_fill_set(d.border, EVAS_BORDER_FILL_NONE); + evas_object_move(d.border, (WIDTH / 4) - 3, (HEIGHT / 4) - 3); + evas_object_resize(d.border, (WIDTH / 2) + 6, (HEIGHT / 2) + 6); + evas_object_show(d.border); + + ecore_main_loop_begin(); + + ecore_evas_free(d.ee); + ecore_evas_shutdown(); + edje_shutdown(); + return 0; + +error: + fprintf(stderr, "you got to have at least one evas engine built and linked" + " up to ecore-evas for this example to run properly.\n"); +panic: + ecore_evas_free(d.ee); + ecore_evas_shutdown(); + edje_shutdown(); + + return -1; +} diff --git a/libraries/evas/src/examples/evas-box.c b/libraries/evas/src/examples/evas-box.c new file mode 100644 index 0000000..13f12cf --- /dev/null +++ b/libraries/evas/src/examples/evas-box.c @@ -0,0 +1,382 @@ +/** + * Simple Evas example illustrating a custom Evas box object + * + * You'll need at least one engine built for it (excluding the buffer + * one). See stdout/stderr for output. + * + * @verbatim + * gcc -o evas-box evas-box.c `pkg-config --libs --cflags evas ecore ecore-evas` + * @endverbatim + */ + +#ifdef HAVE_CONFIG_H + +#include "config.h" +#else +#define PACKAGE_EXAMPLES_DIR "." +#define __UNUSED__ +#endif + +#include +#include + +#include +#include +#include + +#define WIDTH (640) +#define HEIGHT (480) + +static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png"; + +static const char *commands = \ + "commands are:\n" + "\ta - change the box's alignment values\n" + "\tp - change the box's padding values\n" + "\t1 - change the box's layout to horizontal\n" + "\t2 - change the box's layout to vertical\n" + "\t3 - change the box's layout to horizontal homogeneous\n" + "\t4 - change the box's layout to vertical homogeneous\n" + "\t5 - change the box's layout to horizontal maximum size homogeneous\n" + "\t6 - change the box's layout to vertical maximum size homogeneous\n" + "\t7 - change the box's layout to horizontal flow\n" + "\t8 - change the box's layout to vertical flow\n" + "\t9 - change the box's layout to stack\n" + "\t0 - change the box's layout to a custom-made one\n" + "\tCtrl + NUMBER - insert a new child object at that position in the box\n" + "\tShift + NUMBER - remove the child object at that position in the box\n" + "\th - print help\n"; + +struct exemple_data +{ + Ecore_Evas *ee; + Evas *evas; + Evas_Object *bg, *box, *border; +}; + +static struct exemple_data d; + +static void /* custom 'diagonal' layout */ +_custom_layout(Evas_Object *o, + Evas_Object_Box_Data *p, + void *data __UNUSED__) +{ + int x, y, w, h; + int xx, yy, ww, hh; + int count; + Eina_List *l; + Evas_Object_Box_Option *opt; + + evas_object_geometry_get(o, &x, &y, &w, &h); + count = eina_list_count(p->children); + ww = w / (count ? : 1); + hh = h / (count ? : 1); + if (ww < 1) ww = 1; + if (hh < 1) hh = 1; + + xx = x; + yy = y; + EINA_LIST_FOREACH(p->children, l, opt) + { + evas_object_move(opt->obj, xx, yy); + xx += ww; + yy += hh; + } +} + +static Evas_Object * /* new rectangle to be put in the box */ +_new_rectangle_add(Evas *e) +{ + Evas_Object *o; + + o = evas_object_rectangle_add(e); + evas_object_resize(o, 10, 10); + evas_object_color_set(o, 0, 255, 0, 255); + evas_object_show(o); + + return o; +} + +/* use the following commands to interact with this example - 'h' is + * the key for help */ +static void +_on_keydown(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o __UNUSED__, + void *einfo) +{ + Evas_Event_Key_Down *ev = einfo; + const Evas_Modifier *mods = evas_key_modifier_get(evas); + + if (strcmp(ev->keyname, "h") == 0) /* print help */ + { + fprintf(stdout, commands); + return; + } + + if (evas_key_modifier_is_set(mods, "Shift")) + { + int pos; + Eina_Bool ret; + Evas_Object *obj; + Eina_List *children; + + pos = atoi(ev->keyname); + children = evas_object_box_children_get(d.box); + + obj = eina_list_nth(children, pos); + if (!obj) goto list_free; + + ret = evas_object_box_remove_at(d.box, pos); + if (ret) evas_object_del(obj); + +list_free: + eina_list_free(children); + return; + } + + if (evas_key_modifier_is_set(mods, "Control")) + { + Evas_Object *o; + int pos; + pos = atoi(ev->keyname); + o = _new_rectangle_add(d.evas); + if (!evas_object_box_insert_at(d.box, o, pos)) + evas_object_box_append(d.box, o); + return; + } + + if (strcmp(ev->keyname, "a") == 0) + { + double h, v; + + evas_object_box_align_get(d.box, &h, &v); + + if (h == 0.5) + h = v = 1.0; + else if (h == 1.0) + h = v = -1.0; + else if (h == -1.0) + h = v = 0.0; + else if (h == 0.0) + h = v = 0.5; + + evas_object_box_align_set(d.box, h, v); + + fprintf(stdout, "Applying new alignment values (%.1f, %.1f)" + " on the box\n", h, v); + return; + } + + if (strcmp(ev->keyname, "p") == 0) + { + int h, v; + + evas_object_box_padding_get(d.box, &h, &v); + + if (h == 0) + h = v = 50; + else + h = v = 0; + + evas_object_box_padding_set(d.box, h, v); + + fprintf(stdout, "Applying new padding values (%d, %d)" + " on the box\n", h, v); + return; + } + + if (strcmp(ev->keyname, "1") == 0) + { + evas_object_box_layout_set( + d.box, evas_object_box_layout_horizontal, NULL, NULL); + + fprintf(stdout, "Applying '%s' layout on the box\n", "horizontal"); + return; + } + + if (strcmp(ev->keyname, "2") == 0) + { + evas_object_box_layout_set( + d.box, evas_object_box_layout_vertical, NULL, NULL); + + fprintf(stdout, "Applying '%s' layout on the box\n", "vertical"); + return; + } + + if (strcmp(ev->keyname, "3") == 0) + { + evas_object_box_layout_set( + d.box, evas_object_box_layout_homogeneous_horizontal, NULL, + NULL); + + fprintf(stdout, "Applying '%s' layout on the box\n", + "horizontal homogeneous"); + return; + } + + if (strcmp(ev->keyname, "4") == 0) + { + evas_object_box_layout_set( + d.box, evas_object_box_layout_homogeneous_vertical, NULL, NULL); + + fprintf(stdout, "Applying '%s' layout on the box\n", + "vertical homogeneous"); + return; + } + + if (strcmp(ev->keyname, "5") == 0) + { + evas_object_box_layout_set( + d.box, evas_object_box_layout_homogeneous_max_size_horizontal, + NULL, NULL); + + fprintf(stdout, "Applying '%s' layout on the box\n", + "horizontal maximum size homogeneous"); + return; + } + + if (strcmp(ev->keyname, "6") == 0) + { + evas_object_box_layout_set( + d.box, evas_object_box_layout_homogeneous_max_size_vertical, + NULL, NULL); + + fprintf(stdout, "Applying '%s' layout on the box\n", + "vertical maximum size homogeneous"); + return; + } + + if (strcmp(ev->keyname, "7") == 0) + { + evas_object_box_layout_set( + d.box, evas_object_box_layout_flow_horizontal, NULL, NULL); + + fprintf(stdout, "Applying '%s' layout on the box\n", "horizontal flow"); + return; + } + + if (strcmp(ev->keyname, "8") == 0) + { + evas_object_box_layout_set( + d.box, evas_object_box_layout_flow_vertical, NULL, NULL); + + fprintf(stdout, "Applying '%s' layout on the box\n", "vertical flow"); + return; + } + + if (strcmp(ev->keyname, "9") == 0) + { + evas_object_box_layout_set( + d.box, evas_object_box_layout_stack, NULL, NULL); + + fprintf(stdout, "Applying '%s' layout on the box\n", "stack"); + return; + } + + if (strcmp(ev->keyname, "0") == 0) + { + evas_object_box_layout_set(d.box, _custom_layout, NULL, NULL); + + fprintf(stdout, "Applying '%s' layout on the box\n", "CUSTOM"); + return; + } +} + +static void +_on_delete(Ecore_Evas *ee __UNUSED__) +{ + ecore_main_loop_quit(); +} + +static void /* adjust canvas' contents on resizes */ +_canvas_resize_cb(Ecore_Evas *ee) +{ + int w, h; + + ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + + evas_object_resize(d.bg, w, h); + + evas_object_move(d.box, (w / 4), (h / 4)); + evas_object_resize(d.box, (w / 2), (h / 2)); + + evas_object_move(d.border, (w / 4) - 2, (h / 4) - 2); + evas_object_resize(d.border, (w / 2) + 4, (h / 2) + 4); +} + +int +main(void) +{ + Evas_Object *last, *o; + int i; + + srand(time(NULL)); + + if (!ecore_evas_init()) + return EXIT_FAILURE; + + /* this will give you a window with an Evas canvas under the first + * engine available */ + d.ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); + if (!d.ee) + goto panic; + + ecore_evas_callback_delete_request_set(d.ee, _on_delete); + ecore_evas_callback_resize_set(d.ee, _canvas_resize_cb); + ecore_evas_show(d.ee); + + d.evas = ecore_evas_get(d.ee); + + d.bg = evas_object_rectangle_add(d.evas); + evas_object_color_set(d.bg, 255, 255, 255, 255); /* white bg */ + evas_object_show(d.bg); + + evas_object_focus_set(d.bg, EINA_TRUE); + evas_object_event_callback_add( + d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL); + + d.box = evas_object_box_add(d.evas); + evas_object_show(d.box); + + for (i = 1; i <= 5; i++) + { + o = last = evas_object_rectangle_add(d.evas); + evas_object_size_hint_min_set(o, 50, 50); + evas_object_color_set( + o, rand() % 256, rand() % 256, rand() % 256, 255); + evas_object_show(o); + + if (!evas_object_box_append(d.box, o)) + { + fprintf(stderr, "Error appending child object on the box!\n"); + goto error; + } + } + + /* this is a border around the box, container of the rectangles we + * are going to experiment with. this way you can see how the + * container relates to the children */ + d.border = evas_object_image_filled_add(d.evas); + evas_object_image_file_set(d.border, border_img_path, NULL); + evas_object_image_border_set(d.border, 2, 2, 2, 2); + evas_object_image_border_center_fill_set(d.border, EVAS_BORDER_FILL_NONE); + evas_object_show(d.border); + + fprintf(stdout, commands); + + _canvas_resize_cb(d.ee); + ecore_main_loop_begin(); + ecore_evas_shutdown(); + return 0; + +error: + ecore_evas_shutdown(); + return -1; + +panic: + fprintf(stderr, "You got to have at least one evas engine built and linked" + " up to ecore-evas for this example to run properly.\n"); + return -2; +} + diff --git a/libraries/evas/src/examples/evas-buffer-simple.c b/libraries/evas/src/examples/evas-buffer-simple.c new file mode 100644 index 0000000..6676ef1 --- /dev/null +++ b/libraries/evas/src/examples/evas-buffer-simple.c @@ -0,0 +1,228 @@ +/** + * Simple Evas example using the Buffer engine. + * + * You must have Evas compiled with the buffer engine, and have the + * evas-software-buffer pkg-config files installed. + * + * Compile with: + * + * @verbatim + * gcc -o evas-buffer-simple evas-buffer-simple.c `pkg-config --libs --cflags evas evas-software-buffer` + * @endverbatim + * + */ +#include +#include +#include +#include + +#define WIDTH (320) +#define HEIGHT (240) + +/* + * create_canvas(), destroy_canvas() and draw_scene() are support functions. + * + * They are only required to use raw Evas, but for real world usage, + * it is recommended to use ecore and its ecore-evas submodule, that + * provide convenience canvas creators, integration with main loop and + * automatic render of updates (draw_scene()) when system goes back to + * main loop. + */ +static Evas *create_canvas(int width, int height); +static void destroy_canvas(Evas *canvas); +static void draw_scene(Evas *canvas); + +// support function to save scene as PPM image +static void save_scene(Evas *canvas, const char *dest); + +int main(void) +{ + Evas *canvas; + Evas_Object *bg, *r1, *r2, *r3; + + evas_init(); + + // create your canvas + // NOTE: consider using ecore_evas_buffer_new() instead! + canvas = create_canvas(WIDTH, HEIGHT); + if (!canvas) + return -1; + + bg = evas_object_rectangle_add(canvas); + evas_object_color_set(bg, 255, 255, 255, 255); // white bg + evas_object_move(bg, 0, 0); // at origin + evas_object_resize(bg, WIDTH, HEIGHT); // covers full canvas + evas_object_show(bg); + + puts("initial scene, with just background:"); + draw_scene(canvas); + + r1 = evas_object_rectangle_add(canvas); + evas_object_color_set(r1, 255, 0, 0, 255); // 100% opaque red + evas_object_move(r1, 10, 10); + evas_object_resize(r1, 100, 100); + evas_object_show(r1); + + // pay attention to transparency! Evas color values are pre-multiplied by + // alpha, so 50% opaque green is: + // non-premul: r=0, g=255, b=0 a=128 (50% alpha) + // premul: + // r_premul = r * a / 255 = 0 * 128 / 255 = 0 + // g_premul = g * a / 255 = 255 * 128 / 255 = 128 + // b_premul = b * a / 255 = 0 * 128 / 255 = 0 + // + // this 50% green is over a red background, so it will show in the + // final output as yellow (green + red = yellow) + r2 = evas_object_rectangle_add(canvas); + evas_object_color_set(r2, 0, 128, 0, 128); // 50% opaque green + evas_object_move(r2, 10, 10); + evas_object_resize(r2, 50, 50); + evas_object_show(r2); + + r3 = evas_object_rectangle_add(canvas); + evas_object_color_set(r3, 0, 128, 0, 255); // 100% opaque dark green + evas_object_move(r3, 60, 60); + evas_object_resize(r3, 50, 50); + evas_object_show(r3); + + puts("final scene (note updates):"); + draw_scene(canvas); + save_scene(canvas, "/tmp/evas-buffer-simple-render.ppm"); + + // NOTE: use ecore_evas_buffer_new() and here ecore_evas_free() + destroy_canvas(canvas); + + evas_shutdown(); + + return 0; +} + +static Evas *create_canvas(int width, int height) +{ + Evas *canvas; + Evas_Engine_Info_Buffer *einfo; + int method; + void *pixels; + + method = evas_render_method_lookup("buffer"); + if (method <= 0) + { + fputs("ERROR: evas was not compiled with 'buffer' engine!\n", stderr); + return NULL; + } + + canvas = evas_new(); + if (!canvas) + { + fputs("ERROR: could not instantiate new evas canvas.\n", stderr); + return NULL; + } + + evas_output_method_set(canvas, method); + evas_output_size_set(canvas, width, height); + evas_output_viewport_set(canvas, 0, 0, width, height); + + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); + if (!einfo) + { + fputs("ERROR: could not get evas engine info!\n", stderr); + evas_free(canvas); + return NULL; + } + + // ARGB32 is sizeof(int), that is 4 bytes, per pixel + pixels = malloc(width * height * sizeof(int)); + if (!pixels) + { + fputs("ERROR: could not allocate canvas pixels!\n", stderr); + evas_free(canvas); + return NULL; + } + + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; + einfo->info.dest_buffer = pixels; + einfo->info.dest_buffer_row_bytes = width * sizeof(int); + einfo->info.use_color_key = 0; + einfo->info.alpha_threshold = 0; + einfo->info.func.new_update_region = NULL; + einfo->info.func.free_update_region = NULL; + evas_engine_info_set(canvas, (Evas_Engine_Info *)einfo); + + return canvas; +} + +static void destroy_canvas(Evas *canvas) +{ + Evas_Engine_Info_Buffer *einfo; + + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); + if (!einfo) + { + fputs("ERROR: could not get evas engine info!\n", stderr); + evas_free(canvas); + return; + } + + free(einfo->info.dest_buffer); + evas_free(canvas); +} + +static void draw_scene(Evas *canvas) +{ + Eina_List *updates, *n; + Eina_Rectangle *update; + + // render and get the updated rectangles: + updates = evas_render_updates(canvas); + + // informative only here, just print the updated areas: + EINA_LIST_FOREACH(updates, n, update) + printf("UPDATED REGION: pos: %3d, %3d size: %3dx%3d\n", + update->x, update->y, update->w, update->h); + + // free list of updates + evas_render_updates_free(updates); +} + +static void save_scene(Evas *canvas, const char *dest) +{ + Evas_Engine_Info_Buffer *einfo; + const unsigned int *pixels, *pixels_end; + int width, height; + FILE *f; + + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); + if (!einfo) + { + fputs("ERROR: could not get evas engine info!\n", stderr); + return; + } + evas_output_size_get(canvas, &width, &height); + + f = fopen(dest, "wb+"); + if (!f) + { + fprintf(stderr, "ERROR: could not open for writing '%s': %s\n", + dest, strerror(errno)); + return; + } + + pixels = einfo->info.dest_buffer; + pixels_end = pixels + (width * height); + + // PPM P6 format is dead simple to write: + fprintf(f, "P6\n%d %d\n255\n", width, height); + for (; pixels < pixels_end; pixels++) + { + int r, g, b; + + r = ((*pixels) & 0xff0000) >> 16; + g = ((*pixels) & 0x00ff00) >> 8; + b = (*pixels) & 0x0000ff; + + fprintf(f, "%c%c%c", r, g, b); + } + + fclose(f); + printf("saved scene as '%s'\n", dest); +} diff --git a/libraries/evas/src/examples/evas-events.c b/libraries/evas/src/examples/evas-events.c new file mode 100644 index 0000000..28b22ed --- /dev/null +++ b/libraries/evas/src/examples/evas-events.c @@ -0,0 +1,413 @@ +/** + * Simple Evas example illustrating how to interact with canvas' (and + * its objects') events and other canvas operations. + * + * You'll need at least one engine built for it (excluding the buffer + * one) and the png image loader also built. See stdout/stderr for + * output. + * + * @verbatim + * gcc -o evas-events evas-events.c `pkg-config --libs --cflags evas ecore ecore-evas` + * @endverbatim + */ + +#ifdef HAVE_CONFIG_H + +#include "config.h" +#else + +#define PACKAGE_EXAMPLES_DIR "." +#define __UNUSED__ + +#endif + +#include +#include +#include +#include + +#define WIDTH (320) +#define HEIGHT (240) + +static const char *img_path = PACKAGE_EXAMPLES_DIR "/enlightenment.png"; + +static const char *commands = \ + "commands are:\n" + "\ta - toggle animation timer\n" + "\tc - cycle between focus and key grabs for key input\n" + "\td - delete canvas callbacks\n" + "\tf - freeze input for 3 seconds\n" + "\tp - toggle precise point collision detection on image\n" + "\tControl + o - add an obscured rectangle\n" + "\th - print help\n"; + +struct test_data +{ + Ecore_Evas *ee; + Evas *canvas; + Evas_Object *img, *bg; + Ecore_Timer *resize_timer, *freeze_timer; + Eina_Bool obscured, focus; +}; + +static struct test_data d = {0}; + +/* here to keep our example's window size and background image's + * size in synchrony */ +static void +_canvas_resize_cb(Ecore_Evas *ee) +{ + int w, h; + + ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + evas_object_resize(d.bg, w, h); +} + +/* called when our rectangle gets focus */ +static void +_object_focus_in_cb(void *data __UNUSED__, + Evas *e, + void *event_info) +{ + fprintf(stdout, "An object got focused: %s\n", + evas_object_name_get(event_info)); + + fprintf(stdout, "Let's recheck it: %s\n", + evas_object_name_get(evas_focus_get(e))); + + fprintf(stdout, "And again: %s\n", evas_object_focus_get(event_info) ? + "OK!" : "Oops, something is bad."); +} + +/* render flush callback */ +static void +_render_flush_cb(void *data __UNUSED__, + Evas *e __UNUSED__, + void *event_info __UNUSED__) +{ + fprintf(stdout, "Canvas is about to flush its rendering pipeline!\n"); +} + +/* put some action in the canvas */ +static Eina_Bool +_resize_cb(void *data __UNUSED__) +{ + int w, h, cw, ch; + + evas_object_geometry_get(d.img, NULL, NULL, &w, &h); + ecore_evas_geometry_get(d.ee, NULL, NULL, &cw, &ch); + + if (w < cw) + evas_object_resize(d.img, cw, ch); + else + evas_object_resize(d.img, cw / 2, ch / 2); + + return EINA_TRUE; /* re-issue the timer */ +} + +/* let's have our events back */ +static Eina_Bool +_thaw_cb(void *data __UNUSED__) +{ + fprintf(stdout, "Canvas was frozen %d times, now thawing.\n", + evas_event_freeze_get(d.canvas)); + evas_event_thaw(d.canvas); + return EINA_FALSE; /* do not re-issue the timer */ +} + +/* mouse enters the object's area */ +static void +_on_mouse_in(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o __UNUSED__, + void *einfo __UNUSED__) +{ + fprintf(stdout, "Enlightenment logo has had the mouse in.\n"); +} + +static void +_on_mouse_out(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o __UNUSED__, + void *einfo __UNUSED__) +{ + fprintf(stdout, "Enlightenment logo has had the mouse out.\n"); +} /* mouse exits the object's area */ + +/* examine the keys pressed */ +static void +_on_keydown(void *data __UNUSED__, + Evas *evas, + Evas_Object *o __UNUSED__, + void *einfo) +{ + const Evas_Modifier *mods; + Evas_Event_Key_Down *ev = einfo; + + fprintf(stdout, "We've got key input: %s\n", ev->keyname); + fprintf(stdout, "It actually came from %s\n", d.focus ? + "focus" : "key grab"); + + if (strcmp(ev->keyname, "h") == 0) /* print help */ + { + fprintf(stdout, commands); + return; + } + + if (strcmp(ev->keyname, "a") == 0) /* toggle animation timer */ + { + if (d.resize_timer != NULL) + { + fprintf(stdout, "Stopping animation timer\n"); + ecore_timer_del(d.resize_timer); + d.resize_timer = NULL; + } + else + { + fprintf(stdout, "Re-issuing animation timer\n"); + d.resize_timer = ecore_timer_add(2, _resize_cb, NULL); + } + return; + } + + if (strcmp(ev->keyname, "c") == 0) /* cycle between focus and key + * grabs for key input */ + { + Eina_Bool ret; + Evas_Modifier_Mask mask = + evas_key_modifier_mask_get(d.canvas, "Control"); + + fprintf(stdout, "Switching to %s for key input\n", d.focus ? + "key grabs" : "focus"); + + if (d.focus) + { + evas_object_focus_set(d.bg, EINA_FALSE); + fprintf(stdout, "Focused object is now %s\n", + evas_focus_get(d.canvas) ? + "still valid! Something went wrong." : "none."); + + ret = evas_object_key_grab(d.bg, "a", 0, 0, EINA_TRUE); + if (!ret) + { + fprintf(stdout, "Something went wrong with key grabs.\n"); + goto c_end; + } + ret = evas_object_key_grab(d.bg, "c", 0, 0, EINA_TRUE); + if (!ret) + { + fprintf(stdout, "Something went wrong with key grabs.\n"); + goto c_end; + } + ret = evas_object_key_grab(d.bg, "d", 0, 0, EINA_TRUE); + if (!ret) + { + fprintf(stdout, "Something went wrong with key grabs.\n"); + goto c_end; + } + ret = evas_object_key_grab(d.bg, "f", 0, 0, EINA_TRUE); + if (!ret) + { + fprintf(stdout, "Something went wrong with key grabs.\n"); + goto c_end; + } + ret = evas_object_key_grab(d.bg, "p", 0, 0, EINA_TRUE); + if (!ret) + { + fprintf(stdout, "Something went wrong with key grabs.\n"); + goto c_end; + } + ret = evas_object_key_grab(d.bg, "o", mask, 0, EINA_TRUE); + if (!ret) + { + fprintf(stdout, "Something went wrong with key grabs.\n"); + goto c_end; + } + ret = evas_object_key_grab(d.bg, "h", 0, 0, EINA_TRUE); + if (!ret) + { + fprintf(stdout, "Something went wrong with key grabs.\n"); + goto c_end; + } + } + else /* got here by key grabs */ + { + evas_object_key_ungrab(d.bg, "a", 0, 0); + evas_object_key_ungrab(d.bg, "c", 0, 0); + evas_object_key_ungrab(d.bg, "d", 0, 0); + evas_object_key_ungrab(d.bg, "f", 0, 0); + evas_object_key_ungrab(d.bg, "p", 0, 0); + evas_object_key_ungrab(d.bg, "o", mask, 0); + evas_object_key_ungrab(d.bg, "h", 0, 0); + + evas_object_focus_set(d.bg, EINA_TRUE); + } + +c_end: + d.focus = !d.focus; + + return; + } + + if (strcmp(ev->keyname, "d") == 0) /* delete canvas' callbacks */ + { + fprintf(stdout, "Deleting canvas event callbacks\n"); + evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, + _render_flush_cb, NULL); + evas_event_callback_del_full( + evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + _object_focus_in_cb, NULL); + return; + } + + if (strcmp(ev->keyname, "f") == 0) /* freeze input for 3 seconds */ + { + fprintf(stdout, "Freezing input for 3 seconds\n"); + evas_event_freeze(evas); + d.freeze_timer = ecore_timer_add(3, _thaw_cb, NULL); + return; + } + + if (strcmp(ev->keyname, "p") == 0) /* toggle precise point + * collision detection */ + { + Eina_Bool precise = evas_object_precise_is_inside_get(d.img); + + fprintf(stdout, "Toggling precise point collision detection %s on" + " Enlightenment logo\n", precise ? "off" : "on"); + evas_object_precise_is_inside_set(d.img, !precise); + + return; + } + + mods = evas_key_modifier_get(evas); + if (evas_key_modifier_is_set(mods, "Control") && + (strcmp(ev->keyname, "o") == 0)) /* add an obscured + * rectangle to the middle + * of the canvas */ + { + fprintf(stdout, "Toggling obscured rectangle on canvas\n"); + if (!d.obscured) + { + int w, h; + evas_output_viewport_get(evas, NULL, NULL, &w, &h); + evas_obscured_rectangle_add(evas, w / 4, h / 4, w / 2, h / 2); + } + else + { + int w, h; + Eina_Rectangle *rect; + Eina_List *updates, *l; + + evas_output_viewport_get(evas, NULL, NULL, &w, &h); + evas_obscured_clear(evas); + + /* we have to flag a damage region here because + * evas_obscured_clear() doesn't change the canvas' + * state. we'd have to wait for an animation step, for + * example, to get the result, without it */ + evas_damage_rectangle_add(evas, 0, 0, w, h); + + updates = evas_render_updates(evas); + + EINA_LIST_FOREACH(updates, l, rect) + { + fprintf(stdout, "Rectangle (%d, %d, %d, %d) on canvas got a" + " rendering update.\n", rect->x, rect->y, + rect->w, + rect->h); + } + evas_render_updates_free(updates); + } + d.obscured = !d.obscured; + } /* end of obscured region command */ +} + +int +main(void) +{ + int err; + + if (!ecore_evas_init()) + return EXIT_FAILURE; + + /* this will give you a window with an Evas canvas under the first + * engine available */ + d.ee = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL); + if (!d.ee) + goto error; + + ecore_evas_callback_resize_set(d.ee, _canvas_resize_cb); + ecore_evas_show(d.ee); + + /* the canvas pointer, de facto */ + d.canvas = ecore_evas_get(d.ee); + + evas_event_callback_add(d.canvas, EVAS_CALLBACK_RENDER_FLUSH_PRE, + _render_flush_cb, NULL); + if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE) + { + fprintf(stderr, "ERROR: Callback registering failed! Aborting.\n"); + goto panic; + } + + evas_event_callback_add(d.canvas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + _object_focus_in_cb, NULL); + if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE) + { + fprintf(stderr, "ERROR: Callback registering failed! Aborting.\n"); + goto panic; + } /* two canvas event callbacks */ + + d.bg = evas_object_rectangle_add(d.canvas); + evas_object_name_set(d.bg, "our dear rectangle"); + evas_object_color_set(d.bg, 255, 255, 255, 255); /* white bg */ + evas_object_move(d.bg, 0, 0); /* at canvas' origin */ + evas_object_resize(d.bg, WIDTH, HEIGHT); /* covers full canvas */ + evas_object_show(d.bg); + + evas_object_focus_set(d.bg, EINA_TRUE); /* so we get input events */ + d.focus = EINA_TRUE; + + evas_object_event_callback_add( + d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL); + if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE) + { + fprintf(stderr, "ERROR: Callback registering failed! Aborting.\n"); + goto panic; + } + + d.img = evas_object_image_filled_add(d.canvas); + evas_object_image_file_set(d.img, img_path, NULL); + err = evas_object_image_load_error_get(d.img); + if (err != EVAS_LOAD_ERROR_NONE) + { + goto panic; + } + else + { + evas_object_move(d.img, 0, 0); + evas_object_resize(d.img, WIDTH, HEIGHT); + evas_object_show(d.img); + evas_object_event_callback_add( + d.img, EVAS_CALLBACK_MOUSE_IN, _on_mouse_in, NULL); + evas_object_event_callback_add( + d.img, EVAS_CALLBACK_MOUSE_OUT, _on_mouse_out, NULL); + } + + d.resize_timer = ecore_timer_add(2, _resize_cb, NULL); + + fprintf(stdout, commands); + ecore_main_loop_begin(); + + ecore_evas_free(d.ee); + ecore_evas_shutdown(); + return 0; + +error: + fprintf(stderr, "you got to have at least one evas engine built and linked" + " up to ecore-evas for this example to run properly.\n"); +panic: + ecore_evas_shutdown(); + return -1; +} diff --git a/libraries/evas/src/examples/evas-hints.c b/libraries/evas/src/examples/evas-hints.c new file mode 100644 index 0000000..c42444c --- /dev/null +++ b/libraries/evas/src/examples/evas-hints.c @@ -0,0 +1,375 @@ +/** + * Simple Evas example illustrating alignment, minimum size, maximum + * size, padding and weight hints on objects. + * + * To exemplify those hints, whe use the Evas box object, one of the + * managers using size hints to layout its children. + * + * You'll need at least one engine built for it (excluding the buffer + * one) and the png image loader also built. See stdout/stderr for + * output. + * + * @verbatim + * gcc -o evas-events evas-events.c `pkg-config --libs --cflags ecore-evas` + * @endverbatim + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#include +#include +#include + +#define WIDTH 320 +#define HEIGHT 480 + +static const char commands[] = \ + "commands are:\n" + "\tShift + a - change alignment hints on top rectangle\n" + "\tShift + m - change min. size hint on top rectangle\n" + "\tShift + n - change max. size hint on top rectangle\n" + "\tShift + p - change padding hints on top rectangle\n" + "\tShift + w - change weight hints on top rectangle\n\n" + "\tControl + a - change alignment hints on bottom rectangle\n" + "\tControl + m - change min. size hint on bottom rectangle\n" + "\tControl + n - change max. size hint on bottom rectangle\n" + "\tControl + p - change padding hints on bottom rectangle\n" + "\tControl + w - change weight hints on bottom rectangle\n\n" + "\ts - print current hints information\n" + "\th - print help\n"; + +static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png"; + +struct coord_tuple +{ + Evas_Coord w, h; +}; + +struct weight_tuple +{ + double x, y; +}; + +struct padding_tuple +{ + Evas_Coord l, r, t, b; +}; + +struct rect_data +{ + struct coord_tuple *min_ptr; + struct coord_tuple min[4]; + + struct coord_tuple *max_ptr; + struct coord_tuple max[4]; + + struct weight_tuple *align_ptr; + struct weight_tuple align[3]; + + struct weight_tuple *weight_ptr; + struct weight_tuple weight[3]; + + struct padding_tuple *padding_ptr; + struct padding_tuple padding[3]; +}; + +struct test_data +{ + Ecore_Evas *ee; + Evas *canvas; + struct rect_data t_data, b_data; + Evas_Object *bg, *box, *t_rect, *b_rect, *border; +}; + +static struct test_data d = {0}; + +/* here just to keep our example's window size and background image's + * size in synchrony */ +static void +_canvas_resize_cb(Ecore_Evas *ee) +{ + int w, h; + + ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + evas_object_resize(d.bg, w, h); + + evas_object_move(d.box, (w / 4), (h / 4)); + evas_object_resize(d.box, (w / 2), (h / 2)); + + evas_object_move(d.border, (w / 4) - 3, (h / 4) - 3); + evas_object_resize(d.border, (w / 2) + 6, (h / 2) + 6); +} + +static void +_print_rect_stats(Evas_Object *rect) +{ + Evas_Coord w, h, l, r, t, b; + double x, y; + + evas_object_size_hint_align_get(rect, &x, &y); + fprintf(stdout, "\talign hints: h(%f), v(%f)\n", x, y); + + evas_object_size_hint_min_get(rect, &w, &h); + fprintf(stdout, "\tmin. size hints: h(%d), v(%d)\n", w, h); + + evas_object_size_hint_max_get(rect, &w, &h); + fprintf(stdout, "\tmax. size hints: h(%d), v(%d)\n", w, h); + + evas_object_size_hint_padding_get(rect, &l, &r, &t, &b); + fprintf(stdout, "\tpadding hints: l(%d), r(%d), t(%d), b(%d)\n", + l, r, t, b); + + evas_object_size_hint_weight_get(rect, &x, &y); + fprintf(stdout, "\tweight hints: h(%f), v(%f)\n", x, y); +} + +/* use the following commands to interact with this example - 'h' is + * the key for help */ +static void +_on_keydown(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o __UNUSED__, + void *einfo) +{ + Evas_Event_Key_Down *ev = einfo; + struct rect_data *r_data = NULL; + const Evas_Modifier *mods; + Evas_Object *rect = NULL; + const char *name = NULL; + + mods = evas_key_modifier_get(evas); + if (evas_key_modifier_is_set(mods, "Shift")) + { + rect = d.t_rect; + r_data = &d.t_data; + name = "top"; + } + else if (evas_key_modifier_is_set(mods, "Control")) + { + rect = d.b_rect; + r_data = &d.b_data; + name = "bottom"; + } + else if (strcmp(ev->keyname, "h") == 0) /* print help */ + { + fprintf(stdout, commands); + return; + } + else if (strcmp(ev->keyname, "s") == 0) /* get aspect status of the + * rectangles WRT size + * hints */ + { + fprintf(stdout, "Top rectangle:\n"); + _print_rect_stats(d.t_rect); + + fprintf(stdout, "\nBottom rectangle:\n"); + _print_rect_stats(d.b_rect); + + return; + } + + if (!rect) return; + + if (strcmp(ev->keyname, "a") == 0) /* alignment hints */ + { + (r_data->align_ptr)++; + + if ((unsigned) + (((void *)(r_data->align_ptr)) - ((void *)(r_data->align))) >= + sizeof(r_data->align)) + r_data->align_ptr = r_data->align; + + evas_object_size_hint_align_set( + rect, r_data->align_ptr->x, r_data->align_ptr->y); + + fprintf(stdout, "Changing align hints for %s rect. to (%f, %f)\n", + name, r_data->align_ptr->x, r_data->align_ptr->y); + return; + } + + if (strcmp(ev->keyname, "m") == 0) /* min. size hints */ + { + (r_data->min_ptr)++; + + if ((unsigned) + (((void *)(r_data->min_ptr)) - ((void *)(r_data->min))) >= + sizeof(r_data->min)) + r_data->min_ptr = r_data->min; + + evas_object_size_hint_min_set( + rect, r_data->min_ptr->w, r_data->min_ptr->h); + + fprintf(stdout, "Changing min. size hints for %s rect. to (%d, %d)\n", + name, r_data->min_ptr->w, r_data->min_ptr->h); + return; + } + + if (strcmp(ev->keyname, "n") == 0) /* max. size hints */ + { + (r_data->max_ptr)++; + + if ((unsigned) + (((void *)(r_data->max_ptr)) - ((void *)(r_data->max))) >= + sizeof(r_data->max)) + r_data->max_ptr = r_data->max; + + evas_object_size_hint_max_set( + rect, r_data->max_ptr->w, r_data->max_ptr->h); + + fprintf(stdout, "Changing max. size hints for %s rect. to (%d, %d)\n", + name, r_data->max_ptr->w, r_data->max_ptr->h); + return; + } + + if (strcmp(ev->keyname, "p") == 0) /* padding size hints */ + { + (r_data->padding_ptr)++; + + if ((unsigned) + (((void *)(r_data->padding_ptr)) - ((void *)(r_data->padding))) >= + sizeof(r_data->padding)) + r_data->padding_ptr = r_data->padding; + + evas_object_size_hint_padding_set( + rect, r_data->padding_ptr->l, r_data->padding_ptr->r, + r_data->padding_ptr->t, r_data->padding_ptr->b); + + fprintf(stdout, "Changing padding size hints for %s rect." + " to (%d, %d, %d, %d)\n", + name, r_data->padding_ptr->l, r_data->padding_ptr->r, + r_data->padding_ptr->t, r_data->padding_ptr->b); + return; + } + + /* experiment with weights here. keep in mind that, for the box + * object, only if all the children have non zero weights this hint + * will have an effect */ + if (strcmp(ev->keyname, "w") == 0) /* weight hints */ + { + (r_data->weight_ptr)++; + + if ((unsigned) + (((void *)(r_data->weight_ptr)) - ((void *)(r_data->weight))) >= + sizeof(r_data->weight)) + r_data->weight_ptr = r_data->weight; + + evas_object_size_hint_weight_set( + rect, r_data->weight_ptr->x, r_data->weight_ptr->y); + + fprintf(stdout, "Changing weight hints for %s rect. to (%f, %f)\n", + name, r_data->weight_ptr->x, r_data->weight_ptr->y); + return; + } +} + +static void +_on_destroy(Ecore_Evas *ee __UNUSED__) +{ + ecore_main_loop_quit(); +} + +int +main(void) +{ + if (!ecore_evas_init()) + return EXIT_FAILURE; + + /* init values one is going to cycle through while running this + * example */ + struct rect_data init_data = \ + { + .min = {{0, 0}, {30, 30}, {100, 70}, {200, 200}}, + .max = {{0, 0}, {100, 100}, {100, 70}, {300, 300}}, + .align = {{0.0, 0.0}, {0.5, 0.5}, {1.0, 0.5}}, + .weight = {{0.0, 0.0}, {3, 6}, {10, 100}}, + .padding = {{0, 0, 0, 0}, {3, 6, 9, 12}, {10, 20, 0, 30}} + }; + + d.t_data = init_data; + + d.t_data.min_ptr = d.t_data.min + 1; + d.t_data.max_ptr = d.t_data.max + 1; + d.t_data.align_ptr = d.t_data.align; + d.t_data.weight_ptr = d.t_data.weight; + d.t_data.padding_ptr = d.t_data.padding; + + d.b_data = init_data; + + d.b_data.min_ptr = d.b_data.min + 1; + d.b_data.max_ptr = d.b_data.max + 1; + d.b_data.align_ptr = d.b_data.align; + d.b_data.weight_ptr = d.b_data.weight; + d.b_data.padding_ptr = d.b_data.padding; + + /* this will give you a window with an Evas canvas under the first + * engine available */ + d.ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); + if (!d.ee) + goto error; + + ecore_evas_callback_destroy_set(d.ee, _on_destroy); + ecore_evas_callback_resize_set(d.ee, _canvas_resize_cb); + ecore_evas_show(d.ee); + + /* the canvas pointer, de facto */ + d.canvas = ecore_evas_get(d.ee); + + d.bg = evas_object_rectangle_add(d.canvas); + evas_object_color_set(d.bg, 255, 255, 255, 255); /* white bg */ + evas_object_move(d.bg, 0, 0); /* at canvas' origin */ + evas_object_resize(d.bg, WIDTH, HEIGHT); /* covers full canvas */ + evas_object_show(d.bg); + + evas_object_focus_set(d.bg, EINA_TRUE); + evas_object_event_callback_add( + d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL); + + /* Evas box with vertical layout */ + d.box = evas_object_box_add(d.canvas); + evas_object_box_layout_set( + d.box, evas_object_box_layout_vertical, NULL, NULL); + evas_object_show(d.box); + + /* this is a border around the box, container of the rectangles we + * are going to experiment with (changing some size hints). this + * way you can see how the container relates to the children */ + d.border = evas_object_image_filled_add(d.canvas); + evas_object_image_file_set(d.border, border_img_path, NULL); + evas_object_image_border_set(d.border, 3, 3, 3, 3); + evas_object_image_border_center_fill_set(d.border, EVAS_BORDER_FILL_NONE); + evas_object_show(d.border); + + d.t_rect = evas_object_rectangle_add(d.canvas); + evas_object_color_set(d.t_rect, 0, 0, 255, 255); + + evas_object_size_hint_min_set( + d.t_rect, d.t_data.min_ptr->w, d.t_data.min_ptr->h); + evas_object_show(d.t_rect); + evas_object_box_append(d.box, d.t_rect); + + d.b_rect = evas_object_rectangle_add(d.canvas); + evas_object_color_set(d.b_rect, 0, 255, 0, 255); + + evas_object_size_hint_min_set( + d.b_rect, d.b_data.min_ptr->w, d.b_data.min_ptr->h); + evas_object_show(d.b_rect); + evas_object_box_append(d.box, d.b_rect); + + _canvas_resize_cb(d.ee); + + fprintf(stdout, commands); + ecore_main_loop_begin(); + ecore_evas_shutdown(); + return 0; + +error: + fprintf(stderr, "You got to have at least one evas engine built and linked" + " up to ecore-evas for this example to run properly.\n"); + return -1; +} + diff --git a/libraries/evas/src/examples/evas-images.c b/libraries/evas/src/examples/evas-images.c new file mode 100644 index 0000000..a8cf3c4 --- /dev/null +++ b/libraries/evas/src/examples/evas-images.c @@ -0,0 +1,353 @@ +/** + * Simple Evas example illustrating some image objects functions + * + * You'll need at least one engine built for it (excluding the buffer + * one) and the png image loader also built. See stdout/stderr for + * output. + * + * @verbatim + * gcc -o evas-images evas-images.c `pkg-config --libs --cflags evas ecore ecore-evas` + * @endverbatim + */ + +#ifdef HAVE_CONFIG_H + +#include "config.h" +#else + +#define PACKAGE_EXAMPLES_DIR "." +#define __UNUSED__ + +#endif + +#include +#include +#include +#include + +#define WIDTH (320) +#define HEIGHT (240) + +static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png"; +static const char *valid_path = PACKAGE_EXAMPLES_DIR "/enlightenment.png"; +static const char *bogus_path = "/tmp/non-existent-220986.png"; +static const char *commands = \ + "commands are:\n" + "\tx - change image's x fill coordinate\n" + "\ty - change image's y fill coordinate\n" + "\tw - change image's w fill size\n" + "\te - change image's h fill size\n" + "\tf - toggle image filled property (overrides fill)\n" + "\ta - toggle image's alpha channel usage\n" + "\tm - toggle border's smooth scaling\n" + "\tt - change border's thickness\n" + "\tb - change border's center region aspect\n" + "\tc - change border's scaling factor\n" + "\ts - print image's fill property status\n" + "\th - print help\n"; + +struct test_data +{ + Ecore_Evas *ee; + Evas *evas; + Evas_Object *img1, *img2, *bg, *border; +}; + +static struct test_data d = {0}; + +static void +_on_destroy(Ecore_Evas *ee __UNUSED__) +{ + ecore_main_loop_quit(); +} + +/* here just to keep our example's window size and background image's + * size in synchrony */ +static void +_canvas_resize_cb(Ecore_Evas *ee) +{ + int w, h; + + ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + evas_object_resize(d.bg, w, h); +} + +static const char * +_border_fill_mode_to_str(Evas_Border_Fill_Mode mode) +{ + switch (mode) + { + case EVAS_BORDER_FILL_NONE: + return "none"; + + case EVAS_BORDER_FILL_DEFAULT: + return "default"; + + case EVAS_BORDER_FILL_SOLID: + return "solid"; + + default: + return "invalid"; + } +} + +static void +_on_keydown(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o __UNUSED__, + void *einfo) +{ + Evas_Event_Key_Down *ev = einfo; + + if (strcmp(ev->keyname, "h") == 0) /* print help */ + { + fprintf(stdout, commands); + return; + } + + if (strcmp(ev->keyname, "m") == 0) /* toggle border image's smooth scaling */ + { + Eina_Bool smooth_scale = evas_object_image_smooth_scale_get(d.border); + + evas_object_image_smooth_scale_set(d.border, !smooth_scale); + + fprintf(stdout, "Image's border is now %s smooth scaling\n", + smooth_scale ? "without" : "with"); + + return; + } + + if (strcmp(ev->keyname, "t") == 0) /* change border's thickness */ + { + int l, r, t, b; + + evas_object_image_border_get(d.border, &l, &r, &t, &b); + + l = (l + 3) % 9; + r = (r + 3) % 9; + t = (t + 3) % 9; + b = (b + 3) % 9; + + evas_object_image_border_set(d.border, l, r, t, b); + + fprintf(stdout, "Image's border thickness is now %d\n", l); + + return; + } + + if (strcmp(ev->keyname, "c") == 0) /* change border's scaling factor */ + { + double scale = evas_object_image_border_scale_get(d.border); + + scale *= 2; + if (scale > 4.0) scale = 1.0; + + evas_object_image_border_scale_set(d.border, scale); + + fprintf(stdout, "Image's border scaling factor is now %f\n", scale); + + return; + } + + if (strcmp(ev->keyname, "b") == 0) /* change border's center + * region's aspect */ + { + Eina_Bool fill = \ + evas_object_image_border_center_fill_get(d.border); + + fill = (fill + 1) % 3; + + evas_object_image_border_center_fill_set(d.border, fill); + + fprintf(stdout, "Image's border center region aspect is now \"%s\"\n", + _border_fill_mode_to_str(fill)); + + return; + } + + if (strcmp(ev->keyname, "a") == 0) /* toggle alpha channel usage */ + { + Eina_Bool alpha = evas_object_image_alpha_get(d.img1); + + evas_object_image_alpha_set(d.img1, !alpha); + + fprintf(stdout, "Image's alpha channel is now %s\n", + alpha ? "off" : "on"); + + return; + } + + if (strcmp(ev->keyname, "f") == 0) /* toggle filled property */ + { + Eina_Bool filled = evas_object_image_filled_get(d.img1); + + evas_object_image_filled_set(d.img1, !filled); + + fprintf(stdout, "Image's x filled property is now %s\n", + filled ? "off" : "on"); + + return; + } + + if (strcmp(ev->keyname, "x") == 0) /* change x fill coordinate */ + { + Evas_Coord x, y, w, h; + + evas_object_image_fill_get(d.img1, &x, &y, &w, &h); + x = (x + 20) % (WIDTH / 2); + evas_object_image_fill_set(d.img1, x, y, w, h); + + fprintf(stdout, "Image's x fill coordinate changed to %d\n", x); + + return; + } + + if (strcmp(ev->keyname, "y") == 0) /* change y fill coordinate */ + { + Evas_Coord x, y, w, h; + + evas_object_image_fill_get(d.img1, &x, &y, &w, &h); + y = (y + 20) % (HEIGHT / 2); + evas_object_image_fill_set(d.img1, x, y, w, h); + + fprintf(stdout, "Image's y fill coordinate changed to %d\n", y); + + return; + } + + if (strcmp(ev->keyname, "w") == 0) /* change w fill size */ + { + Evas_Coord x, y, w, h; + + evas_object_image_fill_get(d.img1, &x, &y, &w, &h); + if (w == (WIDTH / 4)) w = (WIDTH / 2); + else if (w == WIDTH / 2) w = WIDTH; + else w = (WIDTH / 4); + evas_object_image_fill_set(d.img1, x, y, w, h); + + fprintf(stdout, "Image's w fill size changed to %d\n", w); + + return; + } + + if (strcmp(ev->keyname, "e") == 0) /* change h fill size */ + { + Evas_Coord x, y, w, h; + + evas_object_image_fill_get(d.img1, &x, &y, &w, &h); + if (h == (HEIGHT / 4)) h = (HEIGHT / 2); + else if (h == HEIGHT / 2) h = HEIGHT; + else h = (HEIGHT / 4); + evas_object_image_fill_set(d.img1, x, y, w, h); + + fprintf(stdout, "Image's h fill size changed to %d\n", h); + + return; + } + + if (strcmp(ev->keyname, "s") == 0) /* status */ + { + Evas_Coord x, y, w, h; + + evas_object_image_fill_get(d.img1, &x, &y, &w, &h); + + fprintf(stdout, "Image has fill properties set to: %d, %d, %d, %d\n", + x, y, w, h); + + return; + } +} + +int +main(void) +{ + int err; + + if (!ecore_evas_init()) + return EXIT_FAILURE; + + /* this will give you a window with an Evas canvas under the first + * engine available */ + d.ee = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL); + if (!d.ee) + goto error; + + ecore_evas_callback_destroy_set(d.ee, _on_destroy); + ecore_evas_callback_resize_set(d.ee, _canvas_resize_cb); + ecore_evas_show(d.ee); + + /* the canvas pointer, de facto */ + d.evas = ecore_evas_get(d.ee); + + d.bg = evas_object_rectangle_add(d.evas); + evas_object_color_set(d.bg, 255, 255, 255, 255); /* white bg */ + evas_object_move(d.bg, 0, 0); /* at canvas' origin */ + evas_object_resize(d.bg, WIDTH, HEIGHT); /* covers full canvas */ + evas_object_show(d.bg); + + d.img1 = evas_object_image_add(d.evas); + evas_object_image_file_set(d.img1, valid_path, NULL); + err = evas_object_image_load_error_get(d.img1); + if (err != EVAS_LOAD_ERROR_NONE) + { + fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n", + valid_path, evas_load_error_str(err)); + } + else + { + fprintf(stdout, + "loaded image '%s' with succes! error string is \"%s\"\n", + valid_path, evas_load_error_str(err)); + + evas_object_move(d.img1, 3, 3); + evas_object_image_fill_set(d.img1, 0, 0, WIDTH / 2, HEIGHT / 2); + evas_object_resize(d.img1, WIDTH / 2, HEIGHT / 2); + evas_object_show(d.img1); + + evas_object_focus_set(d.bg, EINA_TRUE); + evas_object_event_callback_add( + d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL); + } + + /* this is a border around the image above, here just to emphasize + * its geometry */ + d.border = evas_object_image_filled_add(d.evas); + evas_object_image_file_set(d.border, border_img_path, NULL); + evas_object_image_border_set(d.border, 3, 3, 3, 3); + evas_object_image_border_center_fill_set(d.border, EVAS_BORDER_FILL_NONE); + + evas_object_move(d.border, 0, 0); + evas_object_resize(d.border, (WIDTH / 2) + 6, (HEIGHT / 2) + 6); + evas_object_show(d.border); + + /* image loading will fail for this one -- unless one cheats and + * puts a valid image on that path */ + d.img2 = evas_object_image_add(d.evas); + evas_object_image_file_set(d.img2, bogus_path, NULL); + err = evas_object_image_load_error_get(d.img2); + if (err != EVAS_LOAD_ERROR_NONE) + { + fprintf(stderr, "could not load image '%s': error string is \"%s\"\n", + bogus_path, evas_load_error_str(err)); + } + else + { + evas_object_move(d.img2, WIDTH / 2, HEIGHT / 2); + evas_object_image_fill_set(d.img2, 0, 0, WIDTH / 2, HEIGHT / 2); + evas_object_resize(d.img2, WIDTH / 2, HEIGHT / 2); + evas_object_show(d.img2); + } + + fprintf(stdout, commands); + ecore_main_loop_begin(); + + ecore_evas_free(d.ee); + ecore_evas_shutdown(); + return 0; + +error: + fprintf(stderr, "you got to have at least one evas engine built and linked" + " up to ecore-evas for this example to run properly.\n"); + ecore_evas_shutdown(); + return -1; +} diff --git a/libraries/evas/src/examples/evas-images2.c b/libraries/evas/src/examples/evas-images2.c new file mode 100644 index 0000000..ba7766c --- /dev/null +++ b/libraries/evas/src/examples/evas-images2.c @@ -0,0 +1,204 @@ +/** + * Simple Evas example illustrating some image objects functions + * + * You'll need at least one engine built for it (excluding the buffer + * one) and the png image loader/saver also built. See stdout/stderr + * for output. + * + * @verbatim + * gcc -o evas-images2 evas-images2.c `pkg-config --libs --cflags evas ecore ecore-evas` + * @endverbatim + */ + +#ifdef HAVE_CONFIG_H + +#include "config.h" +#else + +#define PACKAGE_EXAMPLES_DIR "." +#define __UNUSED__ + +#endif + +#include +#include +#include +#include + +#define WIDTH (320) +#define HEIGHT (240) + +static const char *img_path = PACKAGE_EXAMPLES_DIR "/enlightenment.png"; +static const char *commands = \ + "commands are:\n" + "\tp - change proxy image's source\n" + "\ts - print noise image's stride value\n" + "\ta - save noise image to disk (/tmp dir)\n" + "\th - print help\n"; + +const char *file_path = "/tmp/evas-images2-example.png"; +const char *quality_str = "quality=100"; + +struct test_data +{ + Ecore_Evas *ee; + Evas *evas; + Evas_Object *logo, *noise_img, *proxy_img, *bg; +}; + +static struct test_data d = {0}; + +static void +_on_preloaded(void *data __UNUSED__, + Evas *e __UNUSED__, + Evas_Object *obj __UNUSED__, + void *event_info __UNUSED__) +{ + fprintf(stdout, "Image has been pre-loaded!\n"); +} + +static void +_on_destroy(Ecore_Evas *ee __UNUSED__) +{ + ecore_main_loop_quit(); +} + +/* here just to keep our example's window size and background image's + * size in synchrony */ +static void +_canvas_resize_cb(Ecore_Evas *ee) +{ + int w, h; + + ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + evas_object_resize(d.bg, w, h); +} + +static void +_on_keydown(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o __UNUSED__, + void *einfo) +{ + Evas_Event_Key_Down *ev = einfo; + + if (strcmp(ev->keyname, "h") == 0) /* print help */ + { + fprintf(stdout, commands); + return; + } + + if (strcmp(ev->keyname, "s") == 0) /* print proxy image' stride value */ + { + int stride = evas_object_image_stride_get(d.noise_img); + + fprintf(stdout, "Image has row stride value of %d, which accounts" + " for %d pixels\n", stride, stride / 4); + + return; + } + + if (strcmp(ev->keyname, "p") == 0) /* change proxy's source */ + { + Evas_Object *source = evas_object_image_source_get(d.proxy_img); + + if (source == d.logo) source = d.noise_img; + else source = d.logo; + + evas_object_image_source_set(d.proxy_img, source); + + fprintf(stdout, "Proxy image's source changed\n"); + + return; + } + + if (strcmp(ev->keyname, "a") == 0) /* save noise image to disk */ + { + if (!evas_object_image_save(d.noise_img, file_path, NULL, quality_str)) + fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n", + file_path, quality_str); + else + fprintf(stdout, "Image saved to '%s' (flags '%s'), check it out with " + "an image viewer\n", file_path, quality_str); + + return; + } +} + +int +main(void) +{ + unsigned int i; + unsigned int pixels[(WIDTH / 4) * (HEIGHT / 4)]; + + srand(time(NULL)); + + if (!ecore_evas_init()) + return EXIT_FAILURE; + + /* this will give you a window with an Evas canvas under the first + * engine available */ + d.ee = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL); + if (!d.ee) + goto error; + + ecore_evas_callback_destroy_set(d.ee, _on_destroy); + ecore_evas_callback_resize_set(d.ee, _canvas_resize_cb); + ecore_evas_show(d.ee); + + /* the canvas pointer, de facto */ + d.evas = ecore_evas_get(d.ee); + + d.bg = evas_object_rectangle_add(d.evas); + evas_object_color_set(d.bg, 255, 255, 255, 255); /* white bg */ + evas_object_move(d.bg, 0, 0); /* at canvas' origin */ + evas_object_resize(d.bg, WIDTH, HEIGHT); /* covers full canvas */ + evas_object_show(d.bg); + + evas_object_focus_set(d.bg, EINA_TRUE); + evas_object_event_callback_add( + d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL); + + d.logo = evas_object_image_filled_add(d.evas); + + evas_object_event_callback_add( + d.logo, EVAS_CALLBACK_IMAGE_PRELOADED, _on_preloaded, NULL); + evas_object_image_preload(d.logo, EINA_TRUE); + + evas_object_image_file_set(d.logo, img_path, NULL); + evas_object_resize(d.logo, WIDTH / 2, HEIGHT / 2); + evas_object_show(d.logo); + + /* creating noise image */ + for (i = 0; i < sizeof(pixels) / sizeof(pixels[0]); i++) + pixels[i] = rand(); + + d.noise_img = evas_object_image_add(d.evas); + evas_object_image_size_set(d.noise_img, WIDTH / 4, HEIGHT / 4); + evas_object_image_data_set(d.noise_img, pixels); + evas_object_image_filled_set(d.noise_img, EINA_TRUE); + evas_object_move(d.noise_img, (WIDTH * 3) / 4, 0); + evas_object_resize(d.noise_img, WIDTH / 4, HEIGHT / 4); + evas_object_show(d.noise_img); + fprintf(stdout, "Creating noise image with size %d, %d\n", + WIDTH / 4, HEIGHT / 4); + + d.proxy_img = evas_object_image_filled_add(d.evas); + evas_object_image_source_set(d.proxy_img, d.logo); + evas_object_move(d.proxy_img, WIDTH / 4, HEIGHT / 2); + evas_object_resize(d.proxy_img, WIDTH / 2, HEIGHT / 2); + evas_object_show(d.proxy_img); + + fprintf(stdout, commands); + ecore_main_loop_begin(); + + ecore_evas_free(d.ee); + ecore_evas_shutdown(); + return 0; + +error: + fprintf(stderr, "you got to have at least one evas engine built and linked" + " up to ecore-evas for this example to run properly.\n"); + ecore_evas_shutdown(); + return -1; +} diff --git a/libraries/evas/src/examples/evas-init-shutdown.c b/libraries/evas/src/examples/evas-init-shutdown.c new file mode 100644 index 0000000..a7508d8 --- /dev/null +++ b/libraries/evas/src/examples/evas-init-shutdown.c @@ -0,0 +1,56 @@ +/** + * Simple example illustrating usage of evas_init() and + * evas_shutdown(). Usually one would instantiate a canvas to have + * something useful out of Evas. For an example of this kind, see the + * @ref Example_Evas_Buffer_Simple. + * + * Here, we are just listing the engine Evas was compiled with support + * to. + * + * @verbatim + * gcc -o evas-init-shutdown evas-init-shutdown.c `pkg-config --libs \ + * --cflags evas` + * @endverbatim + * + */ + +#include +#include +#include + +/* + * Simple example illustrating usage of evas_init() and + * evas_shutdown(). Usually one would instantiate a canvas to have + * something useful out of Evas. For an example of this kind, see the + * evas-buffer-simple.c, which requires the buffer engine module + * compiled in Evas. + * + * Here, we are just listing the engine Evas was compiled with support + * to. + */ + +int +main(void) +{ + Eina_List *engine_list, *l; + char *engine_name; + + evas_init(); + + engine_list = evas_render_method_list(); + if (!engine_list) + { + fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n"); + exit(-1); + } + + printf("Available Evas Engines:\n"); + EINA_LIST_FOREACH(engine_list, l, engine_name) + printf("%s\n", engine_name); + + evas_render_method_list_free(engine_list); + + evas_shutdown(); + return 0; + } + diff --git a/libraries/evas/src/examples/evas-map-utils.c b/libraries/evas/src/examples/evas-map-utils.c new file mode 100644 index 0000000..2d15882 --- /dev/null +++ b/libraries/evas/src/examples/evas-map-utils.c @@ -0,0 +1,321 @@ +/* + * gcc -o evas-map-utils evas-map-utils.c `pkg-config --cflags --libs evas ecore ecore-evas` + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#else +#define __UNUSED__ +#endif + +#include +#include + +#include +#include +#include +#include + +#define WIDTH 480 +#define HEIGHT 480 + +typedef struct +{ + Ecore_Evas *ee; + Evas *canvas; + struct { + int r, g, b, a; + } colors[6]; + int colors_index; + int frame; + Eina_Bool alpha : 1; + Eina_Bool smooth : 1; + Eina_Bool backface_culling : 1; + Eina_Bool apply_perspective : 1; + Eina_Bool apply_lighting : 1; +} App_Data; + +static const char *help_string = + "Valid commands:\n" + "\ta - toggle alpha for maps\n" + "\ts - toggle smooth for maps\n" + "\tc - switch map color\n" + "\tb - toggle backface culling\n" + "\tp - toggle perspective\n" + "\tl - toggle lighting\n" + "\th - prints this help\n"; + +static Eina_Bool +_anim_cb(void *data) +{ + App_Data *ad = data; + Evas_Map *m; + const Evas_Map *old_map; + Evas_Object *o; + int r, g, b, a; + int win_w, win_h, img_w, img_h; + Evas_Coord x, y, w, h; + + evas_output_size_get(ad->canvas, &win_w, &win_h); + + m = evas_map_new(4); + evas_map_smooth_set(m, ad->smooth); + evas_map_alpha_set(m, ad->alpha); + + r = ad->colors[ad->colors_index].r; + g = ad->colors[ad->colors_index].g; + b = ad->colors[ad->colors_index].b; + a = ad->colors[ad->colors_index].a; + evas_map_util_points_color_set(m, r, g, b, a); + + o = evas_object_name_find(ad->canvas, "obj1"); + evas_object_geometry_get(o, &x, &y, &w, &h); + + evas_map_util_points_populate_from_object(m, o); + evas_map_util_rotate(m, 3 * ad->frame, x + (w / 2), y + (h / 2)); + evas_object_map_set(o, m); + evas_object_map_enable_set(o, EINA_TRUE); + + o = evas_object_name_find(ad->canvas, "obj2"); + evas_object_geometry_get(o, &x, &y, &w, &h); + evas_object_image_size_get(o, &img_w, &img_h); + + evas_map_util_points_populate_from_object_full(m, o, 100); + evas_map_point_image_uv_set(m, 0, 0, 0); + evas_map_point_image_uv_set(m, 1, img_w, 0); + evas_map_point_image_uv_set(m, 2, img_w, img_h); + evas_map_point_image_uv_set(m, 3, 0, img_h); + evas_map_util_3d_rotate(m, ad->frame * 6, ad->frame * 6, ad->frame * 6, + x + (w / 3), y + 10, 0); + if (ad->apply_lighting) + evas_map_util_3d_lighting(m, win_w / 2, win_h / 2, -100, + 255, 255, 255, 0, 0, 0); + evas_object_map_set(o, m); + evas_object_map_enable_set(o, EINA_TRUE); + + o = evas_object_name_find(ad->canvas, "obj3"); + evas_object_geometry_get(o, &x, &y, &w, &h); + evas_object_image_size_get(o, &img_w, &img_h); + + evas_map_util_points_populate_from_geometry(m, x, y + (h / 2), w, h, -20); + evas_map_point_image_uv_set(m, 0, 0, 0); + evas_map_point_image_uv_set(m, 1, img_w, 0); + evas_map_point_image_uv_set(m, 2, img_w, img_h); + evas_map_point_image_uv_set(m, 3, 0, img_h); + evas_map_util_3d_rotate(m, 20, ad->frame * 6, 0, + x + (w / 2), y + (w / 2), w / 2); + + if (ad->apply_perspective) + evas_map_util_3d_perspective(m, x + (w / 2), y + (h / 2), 0, 256); + if (ad->apply_lighting) + { + Evas_Coord mx, my; + evas_pointer_canvas_xy_get(ad->canvas, &mx, &my); + evas_map_util_3d_lighting(m, mx, my, -256, + 255, 255, 255, 0, 0, 0); + } + if (ad->backface_culling) + { + if (evas_map_util_clockwise_get(m)) + evas_object_show(o); + else + evas_object_hide(o); + } + else + evas_object_show(o); + evas_object_map_set(o, m); + evas_object_map_enable_set(o, EINA_TRUE); + + evas_map_free(m); + + o = evas_object_name_find(ad->canvas, "obj4"); + evas_object_geometry_get(o, &x, &y, &w, &h); + evas_object_image_size_get(evas_object_image_source_get(o), &img_w, &img_h); + + m = evas_map_new(4); + evas_map_point_coord_set(m, 0, x, y + h, 0); + evas_map_point_coord_set(m, 1, x + w, y + h, 0); + evas_map_point_coord_set(m, 2, win_w - 10, win_h - 30, 0); + evas_map_point_coord_set(m, 3, (win_w / 2) + 10, win_h - 30, 0); + evas_map_point_image_uv_set(m, 0, 0, img_h); + evas_map_point_image_uv_set(m, 1, img_w, img_h); + evas_map_point_image_uv_set(m, 2, img_w, 2 * (img_h / 3)); + evas_map_point_image_uv_set(m, 3, 0, 2 * (img_h / 3)); + evas_map_point_color_set(m, 0, 200, 200, 200, 150); + evas_map_point_color_set(m, 1, 200, 200, 200, 150); + evas_map_point_color_set(m, 2, 0, 0, 0, 0); + evas_map_point_color_set(m, 3, 0, 0, 0, 0); + evas_object_map_set(o, m); + evas_object_map_enable_set(o, EINA_TRUE); + + evas_map_free(m); + + ad->frame = (ad->frame + 1) % 60; + + return EINA_TRUE; +} + +static void +_on_keydown(void *data, Evas *e, Evas_Object *o, void *event) +{ + App_Data *ad = data; + Evas_Event_Key_Down *ev = event; + const Evas_Modifier *mods; + + mods = evas_key_modifier_get(ad->canvas); + switch (ev->keyname[0]) + { + case 'a': + ad->alpha = !ad->alpha; + break; + case 's': + ad->smooth = !ad->smooth; + break; + case 'c': + ad->colors_index = (ad->colors_index + 1) % 6; + break; + case 'b': + ad->backface_culling = !ad->backface_culling; + break; + case 'p': + ad->apply_perspective = !ad->apply_perspective; + break; + case 'l': + ad->apply_lighting = !ad->apply_lighting; + break; + case 'h': + puts(help_string); + break; + default: + break; + } +} + +static void +_objs_fit(Evas *e) +{ + Evas_Object *o; + int w, h; + + evas_output_size_get(e, &w, &h); + w /= 2; + h /= 2; + + o = evas_object_name_find(e, "obj1"); + evas_object_move(o, w / 4, h / 4); + evas_object_resize(o, w / 2, h / 2); + + o = evas_object_name_find(e, "obj2"); + evas_object_move(o, 5 * w / 4, h / 4); + evas_object_resize(o, w / 2, h / 2); + + o = evas_object_name_find(e, "obj3"); + evas_object_move(o, w / 4, 5 * h / 4); + evas_object_resize(o, w / 2, h / 2); + + o = evas_object_name_find(e, "obj4_source"); + evas_object_move(o, 5 * w / 4, 5 * h / 4); + evas_object_resize(o, w / 2, h / 2); + + o = evas_object_name_find(e, "obj4"); + evas_object_move(o, 5 * w / 4, 5 * h / 4); + evas_object_resize(o, w / 2, h / 2); +} + +static void +_on_resize(void *data __UNUSED__, Evas *e, Evas_Object *o __UNUSED__, void *event __UNUSED__) +{ + _objs_fit(e); +} + +static void +_on_free(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event __UNUSED__) +{ + ecore_main_loop_quit(); +} + +int +main(void) +{ + Evas_Object *bg, *o, *osrc; + static App_Data d = { + .ee = NULL, + .canvas = NULL, + .colors = { + { 255, 255, 255, 255 }, + { 128, 128, 0, 128 }, + { 255, 0, 0, 255 }, + { 64, 128, 255, 255 }, + { 11, 23, 58, 132 }, + { 0, 0, 0, 255 } + }, + .colors_index = 0, + .frame = 0, + .alpha = EINA_FALSE, + .smooth = EINA_FALSE, + .backface_culling = EINA_FALSE, + .apply_perspective = EINA_TRUE, + .apply_lighting = EINA_TRUE + }; + + if (!ecore_evas_init()) + return EXIT_FAILURE; + + d.ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); + if (!d.ee) + goto error; + + d.canvas = ecore_evas_get(d.ee); + + bg = evas_object_image_filled_add(d.canvas); + evas_object_image_file_set(bg, "cube1.png", NULL); + ecore_evas_object_associate(d.ee, bg, 0); + evas_object_focus_set(bg, EINA_TRUE); + evas_object_move(bg, 0, 0); + evas_object_resize(bg, WIDTH, HEIGHT); + evas_object_show(bg); + + o = evas_object_rectangle_add(d.canvas); + evas_object_name_set(o, "obj1"); + evas_object_color_set(o, 128, 0, 200, 200); + evas_object_show(o); + + o = evas_object_image_filled_add(d.canvas); + evas_object_name_set(o, "obj2"); + evas_object_image_file_set(o, "enlightenment.png", NULL); + evas_object_show(o); + + o = evas_object_image_filled_add(d.canvas); + evas_object_name_set(o, "obj3"); + evas_object_image_file_set(o, "enlightenment.png", NULL); + evas_object_show(o); + + osrc = evas_object_image_filled_add(d.canvas); + evas_object_image_file_set(osrc, "im1.png", NULL); + evas_object_name_set(osrc, "obj4_source"); + evas_object_show(osrc); + + o = evas_object_image_filled_add(d.canvas); + evas_object_image_source_set(o, osrc); + evas_object_name_set(o, "obj4"); + evas_object_show(o); + + _objs_fit(d.canvas); + + evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, &d); + evas_object_event_callback_add(bg, EVAS_CALLBACK_RESIZE, _on_resize, NULL); + evas_object_event_callback_add(bg, EVAS_CALLBACK_FREE, _on_free, NULL); + + ecore_animator_add(_anim_cb, &d); + + ecore_main_loop_begin(); + + ecore_evas_shutdown(); + return 0; + +error: + fprintf(stderr, "you got to have at least one evas engine built and linked" + " up to ecore-evas for this example to run properly.\n"); +panic: + ecore_evas_shutdown(); + return -1; +} diff --git a/libraries/evas/src/examples/evas-object-manipulation.c b/libraries/evas/src/examples/evas-object-manipulation.c new file mode 100644 index 0000000..e9c9442 --- /dev/null +++ b/libraries/evas/src/examples/evas-object-manipulation.c @@ -0,0 +1,235 @@ +/** + * Simple Evas example illustrating basic objects manipulation. + * + * You'll need at least one engine built for it (excluding the buffer + * one) and the png image loader also built. See stdout/stderr for + * output. + * + * @verbatim + * gcc -o evas-object-manipulation evas-object-manipulation.c `pkg-config --libs --cflags ecore evas ecore-evas` + * @endverbatim + */ + +#ifdef HAVE_CONFIG_H + +#include "config.h" +#else + +#define PACKAGE_EXAMPLES_DIR "." +#define __UNUSED__ + +#endif + +#include +#include +#include +#include + +#define WIDTH (320) +#define HEIGHT (240) + +static const char *img_path = PACKAGE_EXAMPLES_DIR "/enlightenment.png"; +static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png"; + +struct test_data +{ + Ecore_Evas *ee; + Evas *canvas; + Evas_Object *img, *bg, *clipper, *clipper_border, *text; +}; + +static struct test_data d = {0}; + +/* here just to keep our example's window size and background image's + * size in synchrony */ +static void +_canvas_resize_cb(Ecore_Evas *ee) +{ + int w, h; + + ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + evas_object_resize(d.bg, w, h); +} + +static void +_on_keydown(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o __UNUSED__, + void *einfo) +{ + Evas_Event_Key_Down *ev = einfo; + + if (strcmp(ev->keyname, "h") == 0) /* print help */ + { + fprintf(stdout, "commands are:\n" + "\to - change clipper's opacity\n" + "\tr - toggle clipper's color between red and white\n" + "\tc - toggle clipper's clipping function\n" + "\tv - toggle clipper's visibility\n"); + return; + } + + if (strcmp(ev->keyname, "o") == 0) /* change clipper's opacity */ + { + int alpha, r, g, b; + + evas_object_color_get(d.clipper, &r, &g, &b, &alpha); + alpha -= 20; + if (alpha < 0) + alpha = 255; + + evas_object_color_set(d.clipper, r, g, b, alpha); + + fprintf(stdout, "Changing clipper's opacity: %d%%\n", + (int)((alpha / 255.0) * 100)); + return; + } + + if (strcmp(ev->keyname, "r") == 0) /* toggle clipper's color + * between red and white */ + { + int alpha, r, g, b; + + fprintf(stdout, "Changing clipper's color to"); + + evas_object_color_get(d.clipper, &r, &g, &b, &alpha); + if (g > 0) + { + fprintf(stdout, "red\n"); + g = b = 0; + } + else + { + fprintf(stdout, "white\n"); + g = b = 255; + } + + evas_object_color_set(d.clipper, r, g, b, alpha); + return; + } + + if (strcmp(ev->keyname, "c") == 0) /* toggle clipper's clipping function */ + { + fprintf(stdout, "Toggling clipping "); + + if (evas_object_clip_get(d.img) == d.clipper) + { + evas_object_clip_unset(d.img); + fprintf(stdout, "off\n"); + } + else + { + evas_object_clip_set(d.img, d.clipper); + fprintf(stdout, "on\n"); + } + return; + } + + if (strcmp(ev->keyname, "v") == 0) /* toggle clipper's visibility */ + { + fprintf(stdout, "Clipper is now "); + + if (evas_object_visible_get(d.clipper)) + { + evas_object_hide(d.clipper); + fprintf(stdout, "hidden\n"); + } + else + { + evas_object_show(d.clipper); + fprintf(stdout, "visible\n"); + } + return; + } +} + +int +main(void) +{ + int err; + + if (!ecore_evas_init()) + return EXIT_FAILURE; + + /* this will give you a window with an Evas canvas under the first + * engine available */ + d.ee = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL); + if (!d.ee) + goto error; + + ecore_evas_callback_resize_set(d.ee, _canvas_resize_cb); + ecore_evas_show(d.ee); + + /* the canvas pointer, de facto */ + d.canvas = ecore_evas_get(d.ee); + + d.bg = evas_object_rectangle_add(d.canvas); + evas_object_name_set(d.bg, "background rectangle"); + evas_object_color_set(d.bg, 255, 255, 255, 255); /* white bg */ + evas_object_move(d.bg, 0, 0); /* at canvas' origin */ + evas_object_resize(d.bg, WIDTH, HEIGHT); /* covers full canvas */ + evas_object_show(d.bg); + + evas_object_focus_set(d.bg, EINA_TRUE); + evas_object_event_callback_add( + d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL); + + d.img = evas_object_image_filled_add(d.canvas); + evas_object_image_file_set(d.img, img_path, NULL); + err = evas_object_image_load_error_get(d.img); + if (err != EVAS_LOAD_ERROR_NONE) + { + goto panic; + } + else + { + evas_object_move(d.img, 0, 0); + evas_object_resize(d.img, WIDTH, HEIGHT); + evas_object_show(d.img); + + fprintf(stdout, "Image object added, type is: %s\n", + evas_object_type_get(d.img)); + } + + /* border on the image's clipper, here just to emphasize its position */ + d.clipper_border = evas_object_image_filled_add(d.canvas); + evas_object_image_file_set(d.clipper_border, border_img_path, NULL); + err = evas_object_image_load_error_get(d.clipper_border); + if (err != EVAS_LOAD_ERROR_NONE) + { + goto panic; + } + else + { + evas_object_image_border_set(d.clipper_border, 3, 3, 3, 3); + evas_object_image_border_center_fill_set( + d.clipper_border, EVAS_BORDER_FILL_NONE); + evas_object_move(d.clipper_border, (WIDTH / 4) - 3, (HEIGHT / 4) - 3); + evas_object_resize( + d.clipper_border, (WIDTH / 2) + 6, (HEIGHT / 2) + 6); + evas_object_show(d.clipper_border); + } + + /* solid white clipper (note that it's the default color for a + * rectangle) - it won't change clippees' colors, then (multiplying + * by 255) */ + d.clipper = evas_object_rectangle_add(d.canvas); + evas_object_move(d.clipper, WIDTH / 4, HEIGHT / 4); + evas_object_resize(d.clipper, WIDTH / 2, HEIGHT / 2); + evas_object_clip_set(d.img, d.clipper); + evas_object_show(d.clipper); + + ecore_main_loop_begin(); + + ecore_evas_free(d.ee); + ecore_evas_shutdown(); + return 0; + +error: + fprintf(stderr, "you got to have at least one evas engine built and linked" + " up to ecore-evas for this example to run properly.\n"); +panic: + ecore_evas_free(d.ee); + ecore_evas_shutdown(); + return -1; +} diff --git a/libraries/evas/src/examples/evas-smart-object.c b/libraries/evas/src/examples/evas-smart-object.c new file mode 100644 index 0000000..8a36b62 --- /dev/null +++ b/libraries/evas/src/examples/evas-smart-object.c @@ -0,0 +1,708 @@ +/** + * Simple Evas example illustrating a custom Evas smart object + * + * You'll need at least one engine built for it (excluding the buffer + * one). See stdout/stderr for output. + * + * @verbatim + * gcc -o evas-smart-object evas-smart-object.c `pkg-config --libs --cflags evas ecore ecore-evas` + * @endverbatim + */ + +#ifdef HAVE_CONFIG_H + +#include "config.h" +#else + +#define PACKAGE_EXAMPLES_DIR "." +#define __UNUSED__ + +#endif + +#include +#include +#include +#include + +#define WIDTH (320) +#define HEIGHT (240) + +static const char *commands = \ + "commands are:\n" + "\tl - insert child rectangle on the left\n" + "\tr - insert child rectangle on the right\n" + "\tw - remove and delete all members from the smart object\n" + "\tright arrow - move smart object to the right\n" + "\tleft arrow - move smart object to the left\n" + "\tup arrow - move smart object up\n" + "\tdown arrow - move smart object down\n" + "\td - decrease smart object's size\n" + "\ti - increase smart object's size\n" + "\tc - change smart object's clipper color\n" + "\th - print help\n"; + +#define WHITE {255, 255, 255, 255} +#define RED {255, 0, 0, 255} +#define GREEN {0, 255, 0, 255} +#define BLUE {0, 0, 255, 255} + +struct test_data +{ + Ecore_Evas *ee; + Evas *evas; + Evas_Object *smt, *bg, *clipper, *rects[2]; +}; + +struct color_tuple +{ + int r, g, b, a; +} clipper_colors[4] = {WHITE, RED, GREEN, BLUE}; +int cur_color = 0; + +static const char * +_index_to_color(int i) +{ + switch (i) + { + case 0: + return "WHITE (default)"; + + case 1: + return "RED"; + + case 2: + return "GREEN"; + + case 3: + return "BLUE"; + + default: + return "other"; + } +} + +static struct test_data d = {0}; +static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png"; + +#define _evas_smart_example_type "Evas_Smart_Example" +#define EVT_CHILDREN_NUMBER_CHANGED "children,changed" + +static const Evas_Smart_Cb_Description _smart_callbacks[] = +{ + {EVT_CHILDREN_NUMBER_CHANGED, "i"}, + {NULL, NULL} +}; + +typedef struct _Evas_Smart_Example_Data Evas_Smart_Example_Data; +/* + * This structure augments clipped smart object's instance data, + * providing extra members required by our example smart object's + * implementation. + */ +struct _Evas_Smart_Example_Data +{ + Evas_Object_Smart_Clipped_Data base; + Evas_Object *children[2], *border; + int child_count; +}; + +#define EVAS_SMART_EXAMPLE_DATA_GET(o, ptr) \ + Evas_Smart_Example_Data * ptr = evas_object_smart_data_get(o) + +#define EVAS_SMART_EXAMPLE_DATA_GET_OR_RETURN(o, ptr) \ + EVAS_SMART_EXAMPLE_DATA_GET(o, ptr); \ + if (!ptr) \ + { \ + fprintf(stderr, "No widget data for object %p (%s)!", \ + o, evas_object_type_get(o)); \ + fflush(stderr); \ + abort(); \ + return; \ + } + +#define EVAS_SMART_EXAMPLE_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ + EVAS_SMART_EXAMPLE_DATA_GET(o, ptr); \ + if (!ptr) \ + { \ + fprintf(stderr, "No widget data for object %p (%s)!", \ + o, evas_object_type_get(o)); \ + fflush(stderr); \ + abort(); \ + return val; \ + } + +EVAS_SMART_SUBCLASS_NEW(_evas_smart_example_type, _evas_smart_example, + Evas_Smart_Class, Evas_Smart_Class, + evas_object_smart_clipped_class_get, _smart_callbacks); + +static void +_on_destroy(Ecore_Evas *ee __UNUSED__) +{ + ecore_main_loop_quit(); +} + +/* here just to keep our example's window size and background image's + * size in synchrony */ +static void +_canvas_resize_cb(Ecore_Evas *ee) +{ + int w, h; + + ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + evas_object_resize(d.bg, w, h); +} + +static void +_on_child_del(void *data, + Evas *evas __UNUSED__, + Evas_Object *o, + void *einfo __UNUSED__) +{ + Evas_Object *example_smart = data; + int index; + + EVAS_SMART_EXAMPLE_DATA_GET(example_smart, priv); + + index = (int)evas_object_data_get(o, "index"); + index--; + + priv->children[index] = NULL; + + evas_object_smart_member_del(o); + evas_object_smart_changed(example_smart); +} + +static void +_evas_smart_example_child_callbacks_unregister(Evas_Object *obj) +{ + evas_object_data_set(obj, "index", NULL); + evas_object_event_callback_del(obj, EVAS_CALLBACK_FREE, _on_child_del); +} + +static void +_evas_smart_example_child_callbacks_register(Evas_Object *o, + Evas_Object *child, + int index) +{ + evas_object_event_callback_add(child, EVAS_CALLBACK_FREE, _on_child_del, o); + evas_object_data_set(child, "index", (void *)(++index)); +} + +/* create and setup a new example smart object's internals */ +static void +_evas_smart_example_smart_add(Evas_Object *o) +{ + EVAS_SMART_DATA_ALLOC(o, Evas_Smart_Example_Data); + + /* this is a border around the smart object's area, delimiting it */ + priv->border = evas_object_image_filled_add(evas_object_evas_get(o)); + evas_object_image_file_set(priv->border, border_img_path, NULL); + evas_object_image_border_set(priv->border, 3, 3, 3, 3); + evas_object_image_border_center_fill_set( + priv->border, EVAS_BORDER_FILL_NONE); + evas_object_smart_member_add(priv->border, o); + + _evas_smart_example_parent_sc->add(o); +} + +static void +_evas_smart_example_smart_del(Evas_Object *o) +{ + EVAS_SMART_EXAMPLE_DATA_GET(o, priv); + + if (priv->children[0]) + { + _evas_smart_example_child_callbacks_unregister(priv->children[0]); + priv->children[0] = NULL; + } + + if (priv->children[1]) + { + _evas_smart_example_child_callbacks_unregister(priv->children[1]); + priv->children[1] = NULL; + } + + _evas_smart_example_parent_sc->del(o); +} + +static void +_evas_smart_example_smart_show(Evas_Object *o) +{ + EVAS_SMART_EXAMPLE_DATA_GET(o, priv); + + if (priv->children[0]) evas_object_show(priv->children[0]); + if (priv->children[1]) evas_object_show(priv->children[1]); + evas_object_show(priv->border); + + _evas_smart_example_parent_sc->show(o); +} + +static void +_evas_smart_example_smart_hide(Evas_Object *o) +{ + EVAS_SMART_EXAMPLE_DATA_GET(o, priv); + + if (priv->children[0]) evas_object_hide(priv->children[0]); + if (priv->children[1]) evas_object_hide(priv->children[1]); + evas_object_hide(priv->border); + + _evas_smart_example_parent_sc->hide(o); +} + +static void +_evas_smart_example_smart_resize(Evas_Object *o, + Evas_Coord w, + Evas_Coord h) +{ + Evas_Coord ow, oh; + evas_object_geometry_get(o, NULL, NULL, &ow, &oh); + if ((ow == w) && (oh == h)) return; + + /* this will trigger recalculation */ + evas_object_smart_changed(o); +} + +/* act on child objects' properties, before rendering */ +static void +_evas_smart_example_smart_calculate(Evas_Object *o) +{ + Evas_Coord x, y, w, h; + + EVAS_SMART_EXAMPLE_DATA_GET_OR_RETURN(o, priv); + evas_object_geometry_get(o, &x, &y, &w, &h); + + evas_object_resize(priv->border, w, h); + evas_object_move(priv->border, x, y); + + if (priv->children[0]) + { + evas_object_move(priv->children[0], x + 3, y + 3); + evas_object_resize(priv->children[0], (w / 2) - 3, (h / 2) - 3); + } + + if (priv->children[1]) + { + evas_object_move(priv->children[1], x + (w / 2), y + (h / 2)); + evas_object_resize(priv->children[1], (w / 2) - 3, (h / 2) - 3); + } +} + +/* setting our smart interface */ +static void +_evas_smart_example_smart_set_user(Evas_Smart_Class *sc) +{ + /* specializing these two */ + sc->add = _evas_smart_example_smart_add; + sc->del = _evas_smart_example_smart_del; + sc->show = _evas_smart_example_smart_show; + sc->hide = _evas_smart_example_smart_hide; + + /* clipped smart object has no hook on resizes or calculations */ + sc->resize = _evas_smart_example_smart_resize; + sc->calculate = _evas_smart_example_smart_calculate; +} + +/* BEGINS example smart object's own interface */ + +/* add a new example smart object to a canvas */ +Evas_Object * +evas_smart_example_add(Evas *evas) +{ + return evas_object_smart_add(evas, _evas_smart_example_smart_class_new()); +} + +static void +_evas_smart_example_remove_do(Evas_Smart_Example_Data *priv, + Evas_Object *child, + int index) +{ + priv->children[index] = NULL; + priv->child_count--; + _evas_smart_example_child_callbacks_unregister(child); + evas_object_smart_member_del(child); +} + +/* remove a child element, return its pointer (or NULL on errors) */ +Evas_Object * +evas_smart_example_remove(Evas_Object *o, + Evas_Object *child) +{ + int index; + + EVAS_SMART_EXAMPLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + if (priv->children[0] != child && priv->children[1] != child) + { + fprintf(stderr, "You are trying to remove something not belonging to" + " the example smart object!\n"); + return NULL; + } + + index = (int)evas_object_data_get(child, "index"); + index--; + + _evas_smart_example_remove_do(priv, child, index); + + evas_object_smart_callback_call( + o, EVT_CHILDREN_NUMBER_CHANGED, (void *)priv->child_count); + evas_object_smart_changed(o); + + return child; +} + +/* set to return any previous object set to the left position of the + * smart object or NULL, if any (or on errors) */ +Evas_Object * +evas_smart_example_set_left(Evas_Object *o, + Evas_Object *child) +{ + Evas_Object *ret = NULL; + + EVAS_SMART_EXAMPLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + if (!child) + return NULL; + + if (priv->children[1] == child) + { + fprintf(stderr, "You mustn't place a child on both slots of" + " the example smart object!\n"); + return NULL; + } + + if (priv->children[0]) + { + if (priv->children[0] != child) + { + ret = priv->children[0]; + _evas_smart_example_remove_do(priv, priv->children[0], 0); + } + else return child; + } + + priv->children[0] = child; + _evas_smart_example_child_callbacks_register(o, child, 0); + evas_object_smart_member_add(child, o); + evas_object_smart_changed(o); + + priv->child_count++; + if (!ret) + { + evas_object_smart_callback_call( + o, EVT_CHILDREN_NUMBER_CHANGED, (void *)priv->child_count); + } + + return ret; +} + +/* set to return any previous object set to the right position of the + * smart object or NULL, if any (or on errors) */ +Evas_Object * +evas_smart_example_set_right(Evas_Object *o, + Evas_Object *child) +{ + Evas_Object *ret = NULL; + + EVAS_SMART_EXAMPLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + if (!child) + return NULL; + + if (priv->children[0] == child) + { + fprintf(stderr, "You mustn't place a child on both slots of" + " the example smart object!\n"); + return NULL; + } + + if (priv->children[1]) + { + if (priv->children[1] != child) + { + ret = priv->children[1]; + _evas_smart_example_remove_do(priv, priv->children[1], 1); + } + else return child; + } + + priv->children[1] = child; + _evas_smart_example_child_callbacks_register(o, child, 1); + evas_object_smart_member_add(child, o); + evas_object_smart_changed(o); + + priv->child_count++; + if (!ret) + { + evas_object_smart_callback_call( + o, EVT_CHILDREN_NUMBER_CHANGED, (void *)priv->child_count); + } + + return ret; +} + +/* END OF example smart object's own interface */ + +static void +_on_keydown(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o __UNUSED__, + void *einfo) +{ + Evas_Event_Key_Down *ev = einfo; + + if (strcmp(ev->keyname, "h") == 0) /* print help */ + { + fprintf(stdout, commands); + return; + } + + if (strcmp(ev->keyname, "w") == 0) /* clear out smart object (WRT members) */ + { + if (d.rects[0]) + { + evas_smart_example_remove(d.smt, d.rects[0]); + evas_object_del(d.rects[0]); + } + if (d.rects[1]) + { + evas_smart_example_remove(d.smt, d.rects[1]); + evas_object_del(d.rects[1]); + } + + memset(d.rects, 0, sizeof(d.rects)); + + fprintf(stdout, "Deleting all members of the smart object.\n"); + + return; + } + + if (strcmp(ev->keyname, "l") == 0) /* insert random colored + * rectangle on the left */ + { + Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev; + evas_object_color_set( + rect, rand() % 255, rand() % 255, rand() % 255, 255); + evas_object_show(rect); + + prev = evas_smart_example_set_left(d.smt, rect); + d.rects[0] = rect; + + fprintf(stdout, "Setting smart object's left spot with a new" + " rectangle.\n"); + fprintf(stdout, "Checking its new smart object parent: %s\n", + evas_object_smart_parent_get(rect) == d.smt ? "OK!" : + "Failure!"); + if (prev) + { + int r, g, b; + + evas_object_color_get(prev, &r, &g, &b, NULL); + fprintf(stdout, "Deleting previous left child," + " which had colors (%d, %d, %d)\n", r, g, b); + evas_object_del(prev); + } + + return; + } + + if (strcmp(ev->keyname, "r") == 0) /* insert random colored + * rectangle on the right */ + { + Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev; + evas_object_color_set( + rect, rand() % 255, rand() % 255, rand() % 255, 255); + evas_object_show(rect); + + prev = evas_smart_example_set_right(d.smt, rect); + d.rects[1] = rect; + + fprintf(stdout, "Setting smart object's right spot with a new" + " rectangle.\n"); + fprintf(stdout, "Checking its new smart object parent: %s\n", + evas_object_smart_parent_get(rect) == d.smt ? "OK!" : + "Failure!"); + if (prev) + { + int r, g, b; + + evas_object_color_get(prev, &r, &g, &b, NULL); + fprintf(stdout, "Deleting previous right child," + " which had colors (%d, %d, %d)\n", r, g, b); + evas_object_del(prev); + } + + return; + } + + /* move smart object along the canvas */ + if (strcmp(ev->keyname, "Right") == 0 || strcmp(ev->keyname, "Left") == 0 || + strcmp(ev->keyname, "Up") == 0 || strcmp(ev->keyname, "Down") == 0) + { + Evas_Coord x, y; + + evas_object_geometry_get(d.smt, &x, &y, NULL, NULL); + + switch (ev->keyname[0]) + { + case 'R': + x += 20; + break; + + case 'L': + x -= 20; + break; + + case 'U': + y -= 20; + break; + + case 'D': + y += 20; + break; + } + + evas_object_move(d.smt, x, y); + + return; + } + + /* increase smart object's size */ + if (strcmp(ev->keyname, "i") == 0) + { + Evas_Coord w, h; + + evas_object_geometry_get(d.smt, NULL, NULL, &w, &h); + + w *= 1.1; + h *= 1.1; + + evas_object_resize(d.smt, w, h); + + return; + } + + /* decrease smart object's size */ + if (strcmp(ev->keyname, "d") == 0) + { + Evas_Coord w, h; + + evas_object_geometry_get(d.smt, NULL, NULL, &w, &h); + + w *= 0.9; + h *= 0.9; + + evas_object_resize(d.smt, w, h); + + return; + } + + /* change smart object's clipper color */ + if (strcmp(ev->keyname, "c") == 0) + { + cur_color = (cur_color + 1) % 4; + + evas_object_color_set( + d.clipper, clipper_colors[cur_color].r, clipper_colors[cur_color].g, + clipper_colors[cur_color].b, clipper_colors[cur_color].a); + + fprintf (stderr, "Changing clipper's color to %s\n", + _index_to_color(cur_color)); + + return; + } +} + +static void /* callback on number of member objects changed */ +_on_example_smart_object_child_num_change(void *data __UNUSED__, + Evas_Object *obj __UNUSED__, + void *event_info) +{ + fprintf(stdout, "Number of child members on our example smart" + " object changed to %d\n", (int)event_info); +} + +int +main(void) +{ + const Evas_Smart_Cb_Description **descriptions; + unsigned int count; + Eina_Bool ret; + + srand(time(NULL)); + + if (!ecore_evas_init()) + return EXIT_FAILURE; + + /* this will give you a window with an Evas canvas under the first + * engine available */ + d.ee = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL); + if (!d.ee) + goto error; + + ecore_evas_callback_destroy_set(d.ee, _on_destroy); + ecore_evas_callback_resize_set(d.ee, _canvas_resize_cb); + ecore_evas_show(d.ee); + + /* the canvas pointer, de facto */ + d.evas = ecore_evas_get(d.ee); + + d.bg = evas_object_rectangle_add(d.evas); + evas_object_color_set(d.bg, 255, 255, 255, 255); + evas_object_move(d.bg, 0, 0); + evas_object_resize(d.bg, WIDTH, HEIGHT); + evas_object_show(d.bg); + + d.smt = evas_smart_example_add(d.evas); + evas_object_move(d.smt, WIDTH / 4, HEIGHT / 4); + evas_object_resize(d.smt, WIDTH / 2, HEIGHT / 2); + evas_object_show(d.smt); + + ret = evas_object_smart_type_check(d.smt, _evas_smart_example_type); + fprintf(stdout, "Adding smart object of type \"%s\" to the canvas: %s.\n", + _evas_smart_example_type, ret ? "success" : "failure"); + + d.clipper = evas_object_smart_clipped_clipper_get(d.smt); + fprintf(stdout, "Checking if clipped smart object's clipper is a " + "\"static\" one: %s\n", evas_object_static_clip_get( + d.clipper) ? "yes" : "no"); + + evas_object_color_set( + d.clipper, clipper_colors[cur_color].r, clipper_colors[cur_color].g, + clipper_colors[cur_color].b, clipper_colors[cur_color].a); + + evas_object_smart_callbacks_descriptions_get( + d.smt, &descriptions, &count, NULL, NULL); + + for (; *descriptions; descriptions++) + { + fprintf(stdout, "We've found a smart callback on the smart object!" + "\n\tname: %s\n\ttype: %s\n", (*descriptions)->name, + (*descriptions)->type); + + if (strcmp((*descriptions)->type, "i")) continue; + /* we know we don't have other types of smart callbacks + * here, just playing with it */ + + /* for now, we know the only one callback is the one + * reporting number of member objects changed on the + * example smart object */ + evas_object_smart_callback_add( + d.smt, (*descriptions)->name, + _on_example_smart_object_child_num_change, NULL); + } + + evas_object_focus_set(d.bg, EINA_TRUE); + evas_object_event_callback_add( + d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL); + + fprintf(stdout, commands); + ecore_main_loop_begin(); + + ecore_evas_free(d.ee); + ecore_evas_shutdown(); + return 0; + +error: + fprintf(stderr, "you got to have at least one evas engine built and linked" + " up to ecore-evas for this example to run properly.\n"); + ecore_evas_shutdown(); + return -1; +} diff --git a/libraries/evas/src/examples/evas-stacking.c b/libraries/evas/src/examples/evas-stacking.c new file mode 100644 index 0000000..49fc819 --- /dev/null +++ b/libraries/evas/src/examples/evas-stacking.c @@ -0,0 +1,329 @@ +/** + * Simple Evas example illustrating objects stacking and + * canvas layers. + * + * You'll need at least one engine built for it (excluding the buffer + * one) and the png image loader also built. See stdout/stderr for + * output. + * + * @verbatim + * gcc -o evas-stacking evas-stacking.c `pkg-config --libs --cflags evas ecore ecore-evas edje` + * @endverbatim + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#else + +#define __UNUSED__ + +#endif + +#include +#include + +#include +#include +#include + +#define WIDTH 320 +#define HEIGHT 320 + +struct test_data +{ + Ecore_Evas *ee; + Evas *canvas; + Evas_Object *bg; + Evas_Object *rects[3]; /* red, green, blue */ + int layers[3]; /* default, below it, above it */ + int cur_rect, cur_layer; +}; + +static struct test_data d = {0}; + +static const char *commands = \ + "commands are:\n" + "\tc - change the target rectangle to operate on\n" + "\ta - stack target rectangle one level above\n" + "\tb - stack target rectangle one level below\n" + "\tt - stack target rectangle up to the top of its layer\n" + "\tm - stack target rectangle down to the bottom of its layer\n" + "\tp - toggle target rectangle's 'pass events' property\n" + "\tr - toggle target rectangle's 'repeat events' property\n" + "\ts - print current stacking information\n" + "\tl - change background rectangle's layer\n" + "\th - print help\n"; + +static void +_on_mouse_down(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o, + void *einfo __UNUSED__) +{ + fprintf(stdout, "Mouse down on rectangle %s!\n", evas_object_name_get(o)); +} + +/* here just to keep our example's window size and background image's + * size in synchrony */ +static void +_canvas_resize_cb(Ecore_Evas *ee) +{ + int w, h; + + ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + evas_object_resize(d.bg, w, h); +} + +/* use the following commands to interact with this example - 'h' is + * the key for help */ +static void +_on_keydown(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o __UNUSED__, + void *einfo) +{ + Evas_Event_Key_Down *ev = einfo; + const char *name = evas_object_name_get(d.rects[d.cur_rect]); + + if (strcmp(ev->keyname, "h") == 0) /* print help */ + { + fprintf(stdout, commands); + return; + } + + if (strcmp(ev->keyname, "s") == 0) /* get status of the + * rectangles WRT size + * hints */ + { + Evas_Object *rect; + + fprintf(stdout, "Order of stacking, from top to bottom, is: "); + + rect = evas_object_top_get(evas); + fprintf(stdout, "%s", evas_object_name_get(rect)); + + rect = evas_object_below_get(rect); + while (rect) + { + fprintf(stdout, ", %s", evas_object_name_get(rect)); + rect = evas_object_below_get(rect); + } + + fprintf(stdout, ".\n"); + + fprintf(stdout, "Current target rectangle is %s\n", + evas_object_name_get(d.rects[d.cur_rect])); + + fprintf(stdout, "Background rectangle's layer is %d\n", + evas_object_layer_get(d.bg)); + + return; + } + + if (strcmp(ev->keyname, "l") == 0) /* change background rectangle's layer */ + { + d.cur_layer = (d.cur_layer + 1) % 3; + evas_object_layer_set(d.bg, d.layers[d.cur_layer]); + + fprintf(stdout, "Changing background rectangle's layer to %d\n", + d.layers[d.cur_layer]); + return; + } + + if (strcmp(ev->keyname, "c") == 0) /* change rectangle to operate on */ + { + d.cur_rect = (d.cur_rect + 1) % 3; + + fprintf(stdout, "Changing target rectangle to the %s one\n", + evas_object_name_get(d.rects[d.cur_rect])); + return; + } + + if (strcmp(ev->keyname, "t") == 0) /* bring target to top */ + { + Evas_Object *neighbour; + + evas_object_raise(d.rects[d.cur_rect]); + + fprintf(stdout, "%s rectangle was re-stacked to the top if its layer\n", + name); + + neighbour = evas_object_below_get(d.rects[d.cur_rect]); + fprintf(stdout, "Below of %s rect is %s\n", name, + neighbour ? evas_object_name_get(neighbour) : "no object"); + return; + } + + if (strcmp(ev->keyname, "m") == 0) /* bring target to bottom */ + { + Evas_Object *neighbour; + + evas_object_lower(d.rects[d.cur_rect]); + + fprintf(stdout, + "%s rectangle was re-stacked to the bottom if its layer\n", + name); + + neighbour = evas_object_below_get(d.rects[d.cur_rect]); + fprintf(stdout, "Below of %s rect is %s\n", name, + neighbour ? evas_object_name_get(neighbour) : "no object"); + return; + } + + if (strcmp(ev->keyname, "p") == 0) /* toggle pass events */ + { + Eina_Bool pass = evas_object_pass_events_get(d.rects[d.cur_rect]); + + evas_object_pass_events_set(d.rects[d.cur_rect], !pass); + + fprintf(stdout, "%s rectangle is now set to%s pass (ignore) events\n", + name, pass ? " NOT" : ""); + + return; + } + + if (strcmp(ev->keyname, "r") == 0) /* toggle repeat events */ + { + Eina_Bool repeat = evas_object_repeat_events_get(d.rects[d.cur_rect]); + + evas_object_repeat_events_set(d.rects[d.cur_rect], !repeat); + + fprintf(stdout, "%s rectangle is now set to%s repeat events\n", + name, repeat ? " NOT" : ""); + + return; + } + + if (strcmp(ev->keyname, "a") == 0) /* stack target above */ + { + Evas_Object *neighbour = evas_object_above_get(d.rects[d.cur_rect]); + + if (!neighbour || (evas_object_layer_get(d.rects[d.cur_rect]) != + evas_object_layer_get(neighbour))) + return; + + evas_object_stack_above(d.rects[d.cur_rect], neighbour); + + fprintf(stdout, "%s rectangle was re-stacked one level above\n", name); + + neighbour = evas_object_above_get(d.rects[d.cur_rect]); + fprintf(stdout, "Above of %s rect is %s\n", name, + neighbour ? evas_object_name_get(neighbour) : "no object"); + + neighbour = evas_object_below_get(d.rects[d.cur_rect]); + fprintf(stdout, "Below of %s rect is %s\n", name, + neighbour ? evas_object_name_get(neighbour) : "no object"); + return; + } + + if (strcmp(ev->keyname, "b") == 0) /* stack target below */ + { + Evas_Object *neighbour = evas_object_below_get(d.rects[d.cur_rect]); + + if (!neighbour || (evas_object_layer_get(d.rects[d.cur_rect]) != + evas_object_layer_get(neighbour))) + return; + + evas_object_stack_below(d.rects[d.cur_rect], neighbour); + + fprintf(stdout, "%s rectangle was re-stacked one level below\n", name); + + neighbour = evas_object_above_get(d.rects[d.cur_rect]); + fprintf(stdout, "Above of %s rect is %s\n", name, + neighbour ? evas_object_name_get(neighbour) : "no object"); + + neighbour = evas_object_below_get(d.rects[d.cur_rect]); + + fprintf(stdout, "Below of %s rect is %s\n", name, + neighbour ? evas_object_name_get(neighbour) : "no object"); + return; + } +} + +static void +_on_destroy(Ecore_Evas *ee __UNUSED__) +{ + ecore_main_loop_quit(); +} + +int +main(void) +{ + if (!ecore_evas_init()) + return EXIT_FAILURE; + + /* this will give you a window with an Evas canvas under the first + * engine available */ + d.ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); + if (!d.ee) + goto error; + + ecore_evas_callback_destroy_set(d.ee, _on_destroy); + ecore_evas_callback_resize_set(d.ee, _canvas_resize_cb); + ecore_evas_show(d.ee); + + /* the canvas pointer, de facto */ + d.canvas = ecore_evas_get(d.ee); + + d.bg = evas_object_rectangle_add(d.canvas); + evas_object_name_set(d.bg, "background"); /* white bg */ + evas_object_color_set(d.bg, 255, 255, 255, 255); + evas_object_move(d.bg, 0, 0); + evas_object_resize(d.bg, WIDTH, HEIGHT); + + d.layers[0] = evas_object_layer_get(d.bg); + d.layers[1] = d.layers[0] - 1; + d.layers[2] = d.layers[0] + 1; + + d.cur_layer = 1; + evas_object_layer_set(d.bg, d.layers[d.cur_layer]); /* let's start with it + * below the default + * layer */ + + evas_object_show(d.bg); + + evas_object_focus_set(d.bg, EINA_TRUE); + evas_object_event_callback_add( + d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL); + + d.rects[2] = evas_object_rectangle_add(d.canvas); + evas_object_name_set(d.rects[2], "blue"); + evas_object_color_set(d.rects[2], 0, 0, 255, 255); + + evas_object_resize(d.rects[2], WIDTH / 2.2, WIDTH / 2.2); + evas_object_move(d.rects[2], WIDTH / 6, WIDTH / 4.5); + evas_object_show(d.rects[2]); + evas_object_event_callback_add( + d.rects[2], EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, NULL); + + d.rects[1] = evas_object_rectangle_add(d.canvas); + evas_object_name_set(d.rects[1], "green"); + evas_object_color_set(d.rects[1], 0, 255, 0, 255); + + evas_object_resize(d.rects[1], WIDTH / 2.2, WIDTH / 2.2); + evas_object_move(d.rects[1], WIDTH / 2.5, WIDTH / 7); + evas_object_show(d.rects[1]); + evas_object_event_callback_add( + d.rects[1], EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, NULL); + + d.rects[0] = evas_object_rectangle_add(d.canvas); + evas_object_name_set(d.rects[0], "red"); + evas_object_color_set(d.rects[0], 255, 0, 0, 255); + + evas_object_resize(d.rects[0], WIDTH / 2.2, WIDTH / 2.2); + evas_object_move(d.rects[0], WIDTH / 3, WIDTH / 2.5); + evas_object_show(d.rects[0]); + evas_object_event_callback_add( + d.rects[0], EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, NULL); + + fprintf(stdout, commands); + ecore_main_loop_begin(); + + ecore_evas_shutdown(); + return 0; + +error: + fprintf(stderr, "you got to have at least one evas engine built and linked" + " up to ecore-evas for this example to run properly.\n"); + return -1; +} diff --git a/libraries/evas/src/examples/evas-text.c b/libraries/evas/src/examples/evas-text.c new file mode 100644 index 0000000..ba55662 --- /dev/null +++ b/libraries/evas/src/examples/evas-text.c @@ -0,0 +1,411 @@ +/** + * Simple Evas example illustrating text objects + * + * You'll need at least one engine built for it (excluding the buffer + * one). See stdout/stderr for output. + * + * @verbatim + * gcc -o evas-text evas-text.c `pkg-config --libs --cflags evas ecore ecore-evas` + * @endverbatim + */ + +#ifdef HAVE_CONFIG_H + +#include "config.h" +#else + +#define PACKAGE_EXAMPLES_DIR "." +#define __UNUSED__ + +#endif + +#include +#include +#include +#include + +#define WIDTH (320) +#define HEIGHT (240) + +#define GREY {190, 190, 190, 255} +#define BLACK {0, 0, 0, 255} +#define WHITE {255, 255, 255, 255} +#define RED {255, 0, 0, 255} +#define GREEN {0, 255, 0, 255} +#define BLUE {0, 0, 255, 255} + +#define POINTER_CYCLE(_ptr, _array) \ + do \ + { \ + if ((unsigned)(((void *)(_ptr)) - ((void *)(_array))) >= \ + sizeof(_array)) \ + _ptr = _array; \ + } \ + while(0) + +static const char *commands = \ + "commands are:\n" + "\tt - change text's current style\n" + "\tz - change text's font size\n" + "\tf - change text's font family\n" + "\tb - change text's base color\n" + "\ts - change text's \'shadow\' color\n" + "\to - change text's \'outline\' color\n" + "\tw - change text's \'glow\' color\n" + "\tg - change text's \'glow 2\' color\n" + "\th - print help\n"; + +static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png"; + +struct color_tuple +{ + int r, g, b, a; +}; + +struct text_preset_data +{ + const char **font_ptr; + const char *font[3]; + + struct color_tuple *text_ptr; + struct color_tuple text[6]; + + struct color_tuple *shadow_ptr; + struct color_tuple shadow[4]; + + struct color_tuple *outline_ptr; + struct color_tuple outline[4]; + + struct color_tuple *glow_ptr; + struct color_tuple glow[4]; + + struct color_tuple *glow2_ptr; + struct color_tuple glow2[4]; +}; + +struct test_data +{ + Ecore_Evas *ee; + Evas *evas; + struct text_preset_data t_data; + Evas_Object *text, *bg, *border; +}; + +static struct test_data d = {0}; + +static void +_on_destroy(Ecore_Evas *ee __UNUSED__) +{ + ecore_main_loop_quit(); +} + +/* here just to keep our example's window size and background image's + * size in synchrony */ +static void +_canvas_resize_cb(Ecore_Evas *ee) +{ + int w, h; + + ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + evas_object_resize(d.bg, w, h); +} + +static const char * +_text_style_type_to_str(Evas_Text_Style_Type mode) +{ + switch (mode) + { + case EVAS_TEXT_STYLE_PLAIN: + return "plain"; + + case EVAS_TEXT_STYLE_SHADOW: + return "shadow"; + + case EVAS_TEXT_STYLE_OUTLINE: + return "outline"; + + case EVAS_TEXT_STYLE_SOFT_OUTLINE: + return "soft outline"; + + case EVAS_TEXT_STYLE_GLOW: + return "glow"; + + case EVAS_TEXT_STYLE_OUTLINE_SHADOW: + return "outline shadow"; + + case EVAS_TEXT_STYLE_FAR_SHADOW: + return "far shadow"; + + case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW: + return "outline soft shadow"; + + case EVAS_TEXT_STYLE_SOFT_SHADOW: + return "soft shadow"; + + case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW: + return "far soft shadow"; + + default: + return "invalid"; + } +} + +static void +_on_keydown(void *data __UNUSED__, + Evas *evas __UNUSED__, + Evas_Object *o __UNUSED__, + void *einfo) +{ + Evas_Event_Key_Down *ev = einfo; + + if (strcmp(ev->keyname, "h") == 0) /* print help */ + { + fprintf(stdout, commands); + return; + } + + if (strcmp(ev->keyname, "t") == 0) /* change text's current style */ + { + Evas_Text_Style_Type type = evas_object_text_style_get(d.text); + + type = (type + 1) % 10; + + evas_object_text_style_set(d.text, type); + + fprintf(stdout, "Changing text's style to \'%s\'\n", + _text_style_type_to_str(type)); + + return; + } + + if (strcmp(ev->keyname, "f") == 0) /* change text's font */ + { + int sz; + + (d.t_data.font_ptr)++; + + evas_object_text_font_get(d.text, NULL, &sz); + + POINTER_CYCLE(d.t_data.font_ptr, d.t_data.font); + + evas_object_text_font_set(d.text, *d.t_data.font_ptr, sz); + + fprintf(stdout, "Changing text's font to %s\n", *d.t_data.font_ptr); + + return; + } + + if (strcmp(ev->keyname, "b") == 0) /* change text's base color */ + { + (d.t_data.text_ptr)++; + + POINTER_CYCLE(d.t_data.text_ptr, d.t_data.text); + + evas_object_color_set( + d.text, d.t_data.text_ptr->r, d.t_data.text_ptr->g, + d.t_data.text_ptr->b, d.t_data.text_ptr->a); + + fprintf(stdout, "Changing base color for text to (%d, %d, %d, %d)\n", + d.t_data.text_ptr->r, d.t_data.text_ptr->g, + d.t_data.text_ptr->b, d.t_data.text_ptr->a); + + return; + } + + if (strcmp(ev->keyname, "g") == 0) /* change text's glow 2 color */ + { + (d.t_data.glow2_ptr)++; + + POINTER_CYCLE(d.t_data.glow2_ptr, d.t_data.glow2); + + evas_object_text_glow2_color_set( + d.text, d.t_data.glow2_ptr->r, d.t_data.glow2_ptr->g, + d.t_data.glow2_ptr->b, d.t_data.glow2_ptr->a); + + fprintf(stdout, "Changing glow 2 color for text to (%d, %d, %d, %d)\n", + d.t_data.glow2_ptr->r, d.t_data.glow2_ptr->g, + d.t_data.glow2_ptr->b, d.t_data.glow2_ptr->a); + + return; + } + + if (strcmp(ev->keyname, "w") == 0) /* change text's glow color */ + { + (d.t_data.glow_ptr)++; + + POINTER_CYCLE(d.t_data.glow_ptr, d.t_data.glow); + + evas_object_text_glow_color_set( + d.text, d.t_data.glow_ptr->r, d.t_data.glow_ptr->g, + d.t_data.glow_ptr->b, d.t_data.glow_ptr->a); + + fprintf(stdout, "Changing glow color for text to (%d, %d, %d, %d)\n", + d.t_data.glow_ptr->r, d.t_data.glow_ptr->g, + d.t_data.glow_ptr->b, d.t_data.glow_ptr->a); + + return; + } + + if (strcmp(ev->keyname, "o") == 0) /* change text's outline color */ + { + (d.t_data.outline_ptr)++; + + POINTER_CYCLE(d.t_data.outline_ptr, d.t_data.outline); + + evas_object_text_outline_color_set( + d.text, d.t_data.outline_ptr->r, d.t_data.outline_ptr->g, + d.t_data.outline_ptr->b, d.t_data.outline_ptr->a); + + fprintf(stdout, "Changing outline color for text to (%d, %d, %d, %d)\n", + d.t_data.outline_ptr->r, d.t_data.outline_ptr->g, + d.t_data.outline_ptr->b, d.t_data.outline_ptr->a); + + return; + } + + if (strcmp(ev->keyname, "s") == 0) /* change text's shadow color */ + { + (d.t_data.shadow_ptr)++; + + POINTER_CYCLE(d.t_data.shadow_ptr, d.t_data.shadow); + + evas_object_text_shadow_color_set( + d.text, d.t_data.shadow_ptr->r, d.t_data.shadow_ptr->g, + d.t_data.shadow_ptr->b, d.t_data.shadow_ptr->a); + + fprintf(stdout, "Changing shadow color for text to (%d, %d, %d, %d)\n", + d.t_data.shadow_ptr->r, d.t_data.shadow_ptr->g, + d.t_data.shadow_ptr->b, d.t_data.shadow_ptr->a); + + return; + } + + if (strcmp(ev->keyname, "z") == 0) /* change text's font size */ + { + const char *font; + int size; + + evas_object_text_font_get(d.text, &font, &size); + + size = (size + 10) % 50; + if (!size) size = 10; + + evas_object_text_font_set(d.text, font, size); + + fprintf(stdout, "Changing text's font size to %d\n", size); + + return; + } +} + +int +main(void) +{ + int size; + const char *font; + + if (!ecore_evas_init()) + return EXIT_FAILURE; + + /* init values one is going to cycle through while running this + * example */ + struct text_preset_data init_data = + { + .font = {"DejaVu", "Courier", "Utopia"}, + .text = {BLACK, WHITE, GREY, RED, GREEN, BLUE}, + .shadow = {WHITE, BLUE, GREEN, RED}, + .outline = {WHITE, RED, GREEN, BLUE}, + .glow = {WHITE, BLUE, GREEN, RED}, + .glow2 = {WHITE, RED, BLUE, GREEN} + }; + + d.t_data = init_data; + d.t_data.font_ptr = d.t_data.font; + d.t_data.text_ptr = d.t_data.text; + d.t_data.glow_ptr = d.t_data.glow; + d.t_data.glow2_ptr = d.t_data.glow2; + d.t_data.outline_ptr = d.t_data.outline; + d.t_data.shadow_ptr = d.t_data.shadow; + + /* this will give you a window with an Evas canvas under the first + * engine available */ + d.ee = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL); + if (!d.ee) + goto error; + + ecore_evas_callback_destroy_set(d.ee, _on_destroy); + ecore_evas_callback_resize_set(d.ee, _canvas_resize_cb); + ecore_evas_show(d.ee); + + /* the canvas pointer, de facto */ + d.evas = ecore_evas_get(d.ee); + + d.bg = evas_object_rectangle_add(d.evas); + evas_object_color_set(d.bg, 255, 255, 255, 255); /* white bg */ + evas_object_move(d.bg, 0, 0); /* at canvas' origin */ + evas_object_resize(d.bg, WIDTH, HEIGHT); /* covers full canvas */ + evas_object_show(d.bg); + + evas_object_focus_set(d.bg, EINA_TRUE); + evas_object_event_callback_add( + d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL); + + d.text = evas_object_text_add(d.evas); + evas_object_text_style_set(d.text, EVAS_TEXT_STYLE_PLAIN); + + /* let the pre-set thingies be enforced */ + evas_object_color_set( + d.text, d.t_data.text_ptr->r, d.t_data.text_ptr->g, + d.t_data.text_ptr->b, d.t_data.text_ptr->a); + + evas_object_text_glow_color_set( + d.text, d.t_data.glow_ptr->r, d.t_data.glow_ptr->g, + d.t_data.glow_ptr->b, d.t_data.glow_ptr->a); + + evas_object_text_glow2_color_set( + d.text, d.t_data.glow2_ptr->r, d.t_data.glow2_ptr->g, + d.t_data.glow2_ptr->b, d.t_data.glow2_ptr->a); + + evas_object_text_outline_color_set( + d.text, d.t_data.outline_ptr->r, d.t_data.outline_ptr->g, + d.t_data.outline_ptr->b, d.t_data.outline_ptr->a); + + evas_object_text_shadow_color_set( + d.text, d.t_data.shadow_ptr->r, d.t_data.shadow_ptr->g, + d.t_data.shadow_ptr->b, d.t_data.shadow_ptr->a); + + evas_object_text_font_set(d.text, *d.t_data.font_ptr, 30); + evas_object_text_text_set(d.text, "sample text"); + + evas_object_resize(d.text, (3 * WIDTH) / 4, HEIGHT / 4); + evas_object_move(d.text, WIDTH / 8, (3 * HEIGHT) / 8); + evas_object_show(d.text); + + evas_object_text_font_get(d.text, &font, &size); + fprintf(stdout, "Adding text object with font %s, size %d\n", font, size); + + /* this is a border around the text object above, here just to + * emphasize its geometry */ + d.border = evas_object_image_filled_add(d.evas); + evas_object_image_file_set(d.border, border_img_path, NULL); + evas_object_image_border_set(d.border, 3, 3, 3, 3); + evas_object_image_border_center_fill_set(d.border, EVAS_BORDER_FILL_NONE); + + evas_object_resize(d.border, ((3 * WIDTH) / 4) + 3, (HEIGHT / 4) + 3); + evas_object_move(d.border, (WIDTH / 8) - 3, ((3 * HEIGHT) / 8) - 3); + evas_object_show(d.border); + + fprintf(stdout, commands); + ecore_main_loop_begin(); + + ecore_evas_free(d.ee); + ecore_evas_shutdown(); + return 0; + +error: + fprintf(stderr, "you got to have at least one evas engine built and linked" + " up to ecore-evas for this example to run properly.\n"); + ecore_evas_shutdown(); + return -1; +} + diff --git a/libraries/evas/src/examples/im1.png b/libraries/evas/src/examples/im1.png new file mode 100644 index 0000000..aa37869 Binary files /dev/null and b/libraries/evas/src/examples/im1.png differ diff --git a/libraries/evas/src/examples/red.png b/libraries/evas/src/examples/red.png new file mode 100644 index 0000000..dd03528 Binary files /dev/null and b/libraries/evas/src/examples/red.png differ diff --git a/libraries/evas/src/lib/Evas.h b/libraries/evas/src/lib/Evas.h new file mode 100644 index 0000000..5898290 --- /dev/null +++ b/libraries/evas/src/lib/Evas.h @@ -0,0 +1,12236 @@ +/** +@mainpage Evas + +@version 1.1 +@date 2000-2011 + +Please see the @ref authors page for contact details. +@link Evas.h Evas API @endlink + +@section toc Table of Contents + +@li @ref intro +@li @ref work +@li @ref compiling +@li @ref install +@li @ref next_steps +@li @ref intro_example + + +@section intro What is Evas? + +Evas is a clean display canvas API for several target display systems +that can draw anti-aliased text, smooth super and sub-sampled scaled +images, alpha-blend objects and much more. + +It abstracts any need to know much about what the characteristics of +your display system are or what graphics calls are used to draw them +and how. It deals on an object level where all you do is create and +manipulate objects in a canvas, set their properties, and the rest is +done for you. + +Evas optimises the rendering pipeline to minimise effort in redrawing +changes made to the canvas and so takes this work out of the +programmers hand, saving a lot of time and energy. + +It's small and lean, designed to work on embedded systems all the way +to large and powerful multi-cpu workstations. It can be compiled to +only have the features you need for your target platform if you so +wish, thus keeping it small and lean. It has several display +back-ends, letting it display on several display systems, making it +portable for cross-device and cross-platform development. + +@subsection intro_not_evas What Evas is not? + +Evas is not a widget set or widget toolkit, however it is their +base. See Elementary (http://docs.enlightenment.org/auto/elementary/) +for a toolkit based on Evas, Edje, Ecore and other Enlightenment +technologies. + +It is not dependent or aware of main loops, input or output +systems. Input should be polled from various sources and fed to +Evas. Similarly, it will not create windows or report windows updates +to your system, rather just drawing the pixels and reporting to the +user the areas that were changed. Of course these operations are quite +common and thus they are ready to use in Ecore, particularly in +Ecore_Evas (http://docs.enlightenment.org/auto/ecore/). + + +@section work How does Evas work? + +Evas is a canvas display library. This is markedly different from most +display and windowing systems as a canvas is structural and is also a +state engine, whereas most display and windowing systems are immediate +mode display targets. Evas handles the logic between a structural +display via its state engine, and controls the target windowing system +in order to produce rendered results of the current canvas' state on +the display. + +Immediate mode display systems retain very little, or no state. A +program will execute a series of commands, as in the pseudo code: + +@verbatim +draw line from position (0, 0) to position (100, 200); + +draw rectangle from position (10, 30) to position (50, 500); + +bitmap_handle = create_bitmap(); +scale bitmap_handle to size 100 x 100; +draw image bitmap_handle at position (10, 30); +@endverbatim + +The series of commands is executed by the windowing system and the +results are displayed on the screen (normally). Once the commands are +executed the display system has little or no idea of how to reproduce +this image again, and so has to be instructed by the application how +to redraw sections of the screen whenever needed. Each successive +command will be executed as instructed by the application and either +emulated by software or sent to the graphics hardware on the device to +be performed. + +The advantage of such a system is that it is simple, and gives a +program tight control over how something looks and is drawn. Given the +increasing complexity of displays and demands by users to have better +looking interfaces, more and more work is needing to be done at this +level by the internals of widget sets, custom display widgets and +other programs. This means more and more logic and display rendering +code needs to be written time and time again, each time the +application needs to figure out how to minimise redraws so that +display is fast and interactive, and keep track of redraw logic. The +power comes at a high-price, lots of extra code and work. Programmers +not very familiar with graphics programming will often make mistakes +at this level and produce code that is sub optimal. Those familiar +with this kind of programming will simply get bored by writing the +same code again and again. + +For example, if in the above scene, the windowing system requires the +application to redraw the area from 0, 0 to 50, 50 (also referred as +"expose event"), then the programmer must calculate manually the +updates and repaint it again: + +@verbatim +Redraw from position (0, 0) to position (50, 50): + +// what was in area (0, 0, 50, 50)? + +// 1. intersection part of line (0, 0) to (100, 200)? + draw line from position (0, 0) to position (25, 50); + +// 2. intersection part of rectangle (10, 30) to (50, 500)? + draw rectangle from position (10, 30) to position (50, 50) + +// 3. intersection part of image at (10, 30), size 100 x 100? + bitmap_subimage = subregion from position (0, 0) to position (40, 20) + draw image bitmap_subimage at position (10, 30); +@endverbatim + +The clever reader might have noticed that, if all elements in the +above scene are opaque, then the system is doing useless paints: part +of the line is behind the rectangle, and part of the rectangle is +behind the image. These useless paints tend to be very costly, as +pixels tend to be 4 bytes in size, thus an overlapping region of 100 x +100 pixels is around 40000 useless writes! The developer could write +code to calculate the overlapping areas and avoid painting then, but +then it should be mixed with the "expose event" handling mentioned +above and quickly one realizes the initially simpler method became +really complex. + +Evas is a structural system in which the programmer creates and +manages display objects and their properties, and as a result of this +higher level state management, the canvas is able to redraw the set of +objects when needed to represent the current state of the canvas. + +For example, the pseudo code: + +@verbatim +line_handle = create_line(); +set line_handle from position (0, 0) to position (100, 200); +show line_handle; + +rectangle_handle = create_rectangle(); +move rectangle_handle to position (10, 30); +resize rectangle_handle to size 40 x 470; +show rectangle_handle; + +bitmap_handle = create_bitmap(); +scale bitmap_handle to size 100 x 100; +move bitmap_handle to position (10, 30); +show bitmap_handle; + +render scene; +@endverbatim + +This may look longer, but when the display needs to be refreshed or +updated, the programmer only moves, resizes, shows, hides etc. the +objects that need to change. The programmer simply thinks at the +object logic level, and the canvas software does the rest of the work +for them, figuring out what actually changed in the canvas since it +was last drawn, how to most efficiently redraw the canvas and its +contents to reflect the current state, and then it can go off and do +the actual drawing of the canvas. + +This lets the programmer think in a more natural way when dealing with +a display, and saves time and effort of working out how to load and +display images, render given the current display system etc. Since +Evas also is portable across different display systems, this also +gives the programmer the ability to have their code ported and +displayed on different display systems with very little work. + +Evas can be seen as a display system that stands somewhere between a +widget set and an immediate mode display system. It retains basic +display logic, but does very little high-level logic such as +scrollbars, sliders, push buttons etc. + + +@section compiling How to compile using Evas ? + +Evas is a library your application links to. The procedure for this is +very simple. You simply have to compile your application with the +appropriate compiler flags that the @c pkg-config script outputs. For +example: + +Compiling C or C++ files into object files: + +@verbatim +gcc -c -o main.o main.c `pkg-config --cflags evas` +@endverbatim + +Linking object files into a binary executable: + +@verbatim +gcc -o my_application main.o `pkg-config --libs evas` +@endverbatim + +You simply have to make sure that @c pkg-config is in your shell's @c +PATH (see the manual page for your appropriate shell) and @c evas.pc +in @c /usr/lib/pkgconfig or its path in the @c PKG_CONFIG_PATH +environment variable. It's that simple to link and use Evas once you +have written your code to use it. + +Since the program is linked to Evas, it is now able to use any +advertised API calls to display graphics in a canvas managed by it, as +well as use the API calls provided to manage data. + +You should make sure you add any extra compile and link flags to your +compile commands that your application may need as well. The above +example is only guaranteed to make Evas add it's own requirements. + + +@section install How is it installed? + +Simple: + +@verbatim +./configure +make +su - +... +make install +@endverbatim + +@section next_steps Next Steps + +After you understood what Evas is and installed it in your system you +should proceed understanding the programming interface for all +objects, then see the specific for the most used elements. We'd +recommend you to take a while to learn Ecore +(http://docs.enlightenment.org/auto/ecore/) and Edje +(http://docs.enlightenment.org/auto/edje/) as they will likely save +you tons of work compared to using just Evas directly. + +Recommended reading: + +@li @ref Evas_Object_Group, where you'll get how to basically + manipulate generic objects lying on an Evas canvas, handle canvas + and object events, etc. +@li @ref Evas_Object_Rectangle, to learn about the most basic object + type on Evas -- the rectangle. +@li @ref Evas_Object_Polygon, to learn how to create polygon elements + on the canvas. +@li @ref Evas_Line_Group, to learn how to create line elements on the + canvas. +@li @ref Evas_Object_Image, to learn about image objects, over which + Evas can do a plethora of operations. +@li @ref Evas_Object_Text, to learn how to create textual elements on + the canvas. +@li @ref Evas_Object_Textblock, to learn how to create multiline + textual elements on the canvas. +@li @ref Evas_Smart_Object_Group and @ref Evas_Smart_Group, to define + new objects that provide @b custom functions to handle clipping, + hiding, moving, resizing, color setting and more. These could + be as simple as a group of objects that move together (see @ref + Evas_Smart_Object_Clipped) up to implementations of what + ends to be a widget, providing some intelligence (thus the name) + to Evas objects -- like a button or check box, for example. + +@section intro_example Introductory Example + +@include evas-buffer-simple.c +*/ + +/** +@page authors Authors +@author Carsten Haitzler +@author Till Adam +@author Steve Ireland +@author Brett Nash +@author Tilman Sauerbeck +@author Corey Donohoe +@author Yuri Hudobin +@author Nathan Ingersoll +@author Willem Monsuwe +@author Jose O Gonzalez +@author Bernhard Nemec +@author Jorge Luis Zapata Muga +@author Cedric Bail +@author Gustavo Sverzut Barbieri +@author Vincent Torri +@author Tim Horton +@author Tom Hacohen +@author Mathieu Taillefumier +@author Iván Briano +@author Gustavo Lima Chaves +@author Samsung Electronics +@author Samsung SAIT +@author Sung W. Park +@author Jiyoun Park +@author Myoungwoon Roy Kim(roy_kim) +@author Thierry el Borgi +@author ChunEon Park +@author Christopher 'devilhorns' Michael +@author Seungsoo Woo + +Please contact to get in +contact with the developers and maintainers. +*/ + +#ifndef _EVAS_H +#define _EVAS_H + +#include + +#include + +#ifdef EAPI +# undef EAPI +#endif + +#ifdef _WIN32 +# ifdef EFL_EVAS_BUILD +# ifdef DLL_EXPORT +# define EAPI __declspec(dllexport) +# else +# define EAPI +# endif /* ! DLL_EXPORT */ +# else +# define EAPI __declspec(dllimport) +# endif /* ! EFL_EVAS_BUILD */ +#else +# ifdef __GNUC__ +# if __GNUC__ >= 4 +# define EAPI __attribute__ ((visibility("default"))) +# else +# define EAPI +# endif +# else +# define EAPI +# endif +#endif /* ! _WIN32 */ + +#ifdef __cplusplus +extern "C" { +#endif + +#define EVAS_VERSION_MAJOR 1 +#define EVAS_VERSION_MINOR 0 + +typedef struct _Evas_Version +{ + int major; + int minor; + int micro; + int revision; +} Evas_Version; + +EAPI extern Evas_Version *evas_version; + +/** + * @file + * @brief These routines are used for Evas library interaction. + * + * @todo check boolean return values and convert to Eina_Bool + * @todo change all api to use EINA_SAFETY_* + * @todo finish api documentation + */ + +/* BiDi exposed stuff */ + /*FIXME: document */ +typedef enum _Evas_BiDi_Direction +{ + EVAS_BIDI_DIRECTION_NATURAL, + EVAS_BIDI_DIRECTION_NEUTRAL = EVAS_BIDI_DIRECTION_NATURAL, + EVAS_BIDI_DIRECTION_LTR, + EVAS_BIDI_DIRECTION_RTL +} Evas_BiDi_Direction; + +/** + * Identifier of callbacks to be set for Evas canvases or Evas + * objects. + * + * The following figure illustrates some Evas callbacks: + * + * @image html evas-callbacks.png + * @image rtf evas-callbacks.png + * @image latex evas-callbacks.eps + * + * @see evas_object_event_callback_add() + * @see evas_event_callback_add() + */ +typedef enum _Evas_Callback_Type +{ + /* + * The following events are only for use with Evas objects, with + * evas_object_event_callback_add(): + */ + EVAS_CALLBACK_MOUSE_IN, /**< Mouse In Event */ + EVAS_CALLBACK_MOUSE_OUT, /**< Mouse Out Event */ + EVAS_CALLBACK_MOUSE_DOWN, /**< Mouse Button Down Event */ + EVAS_CALLBACK_MOUSE_UP, /**< Mouse Button Up Event */ + EVAS_CALLBACK_MOUSE_MOVE, /**< Mouse Move Event */ + EVAS_CALLBACK_MOUSE_WHEEL, /**< Mouse Wheel Event */ + EVAS_CALLBACK_MULTI_DOWN, /**< Multi-touch Down Event */ + EVAS_CALLBACK_MULTI_UP, /**< Multi-touch Up Event */ + EVAS_CALLBACK_MULTI_MOVE, /**< Multi-touch Move Event */ + EVAS_CALLBACK_FREE, /**< Object Being Freed (Called after Del) */ + EVAS_CALLBACK_KEY_DOWN, /**< Key Press Event */ + EVAS_CALLBACK_KEY_UP, /**< Key Release Event */ + EVAS_CALLBACK_FOCUS_IN, /**< Focus In Event */ + EVAS_CALLBACK_FOCUS_OUT, /**< Focus Out Event */ + EVAS_CALLBACK_SHOW, /**< Show Event */ + EVAS_CALLBACK_HIDE, /**< Hide Event */ + EVAS_CALLBACK_MOVE, /**< Move Event */ + EVAS_CALLBACK_RESIZE, /**< Resize Event */ + EVAS_CALLBACK_RESTACK, /**< Restack Event */ + EVAS_CALLBACK_DEL, /**< Object Being Deleted (called before Free) */ + EVAS_CALLBACK_HOLD, /**< Events go on/off hold */ + EVAS_CALLBACK_CHANGED_SIZE_HINTS, /**< Size hints changed event */ + EVAS_CALLBACK_IMAGE_PRELOADED, /**< Image has been preloaded */ + + /* + * The following events are only for use with Evas canvases, with + * evas_event_callback_add(): + */ + EVAS_CALLBACK_CANVAS_FOCUS_IN, /**< Canvas got focus as a whole */ + EVAS_CALLBACK_CANVAS_FOCUS_OUT, /**< Canvas lost focus as a whole */ + EVAS_CALLBACK_RENDER_FLUSH_PRE, /**< Called just before rendering is updated on the canvas target */ + EVAS_CALLBACK_RENDER_FLUSH_POST, /**< Called just after rendering is updated on the canvas target */ + EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, /**< Canvas object got focus */ + EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, /**< Canvas object lost focus */ + + /* + * More Evas object event types - see evas_object_event_callback_add(): + */ + EVAS_CALLBACK_IMAGE_UNLOADED, /**< Image data has been unloaded (by some mechanims in Evas that throw out original image data) */ + + EVAS_CALLBACK_LAST /**< kept as last element/sentinel -- not really an event */ +} Evas_Callback_Type; /**< The types of events triggering a callback */ + +/** + * @def EVAS_CALLBACK_PRIORITY_BEFORE + * Slightly more prioritized than default. + * @since 1.1.0 + */ +#define EVAS_CALLBACK_PRIORITY_BEFORE -100 +/** + * @def EVAS_CALLBACK_PRIORITY_DEFAULT + * Default callback priority level + * @since 1.1.0 + */ +#define EVAS_CALLBACK_PRIORITY_DEFAULT 0 +/** + * @def EVAS_CALLBACK_PRIORITY_AFTER + * Slightly less prioritized than default. + * @since 1.1.0 + */ +#define EVAS_CALLBACK_PRIORITY_AFTER 100 + +/** + * @typedef Evas_Callback_Priority + * + * Callback priority value. Range is -32k - 32k. The lower the number, the + * bigger the priority. + * + * @see EVAS_CALLBACK_PRIORITY_AFTER + * @see EVAS_CALLBACK_PRIORITY_BEFORE + * @see EVAS_CALLBACK_PRIORITY_DEFAULT + * + * @since 1.1.0 + */ +typedef short Evas_Callback_Priority; + +/** + * Flags for Mouse Button events + */ +typedef enum _Evas_Button_Flags +{ + EVAS_BUTTON_NONE = 0, /**< No extra mouse button data */ + EVAS_BUTTON_DOUBLE_CLICK = (1 << 0), /**< This mouse button press was the 2nd press of a double click */ + EVAS_BUTTON_TRIPLE_CLICK = (1 << 1) /**< This mouse button press was the 3rd press of a triple click */ +} Evas_Button_Flags; /**< Flags for Mouse Button events */ + +/** + * Flags for Events + */ +typedef enum _Evas_Event_Flags +{ + EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */ + EVAS_EVENT_FLAG_ON_HOLD = (1 << 0), /**< This event is being delivered but should be put "on hold" until the on hold flag is unset. the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ + EVAS_EVENT_FLAG_ON_SCROLL = (1 << 1) /**< This event flag indicates the event occurs while scrolling; for exameple, DOWN event occurs during scrolling; the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ +} Evas_Event_Flags; /**< Flags for Events */ + +/** + * State of Evas_Coord_Touch_Point + */ +typedef enum _Evas_Touch_Point_State +{ + EVAS_TOUCH_POINT_DOWN, /**< Touch point is pressed down */ + EVAS_TOUCH_POINT_UP, /**< Touch point is released */ + EVAS_TOUCH_POINT_MOVE, /**< Touch point is moved */ + EVAS_TOUCH_POINT_STILL, /**< Touch point is not moved after pressed */ + EVAS_TOUCH_POINT_CANCEL /**< Touch point is calcelled */ +} Evas_Touch_Point_State; + +/** + * Flags for Font Hinting + * @ingroup Evas_Font_Group + */ +typedef enum _Evas_Font_Hinting_Flags +{ + EVAS_FONT_HINTING_NONE, /**< No font hinting */ + EVAS_FONT_HINTING_AUTO, /**< Automatic font hinting */ + EVAS_FONT_HINTING_BYTECODE /**< Bytecode font hinting */ +} Evas_Font_Hinting_Flags; /**< Flags for Font Hinting */ + +/** + * Colorspaces for pixel data supported by Evas + * @ingroup Evas_Object_Image + */ +typedef enum _Evas_Colorspace +{ + EVAS_COLORSPACE_ARGB8888, /**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */ + /* these are not currently supported - but planned for the future */ + EVAS_COLORSPACE_YCBCR422P601_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */ + EVAS_COLORSPACE_YCBCR422P709_PL,/**< YCbCr 4:2:2 Planar, ITU.BT-709 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */ + EVAS_COLORSPACE_RGB565_A5P, /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */ + EVAS_COLORSPACE_GRY8, /**< 8bit grayscale */ + EVAS_COLORSPACE_YCBCR422601_PL, /**< YCbCr 4:2:2, ITU.BT-601 specifications. The data poitned to is just an array of row pointer, pointing to line of Y,Cb,Y,Cr bytes */ + EVAS_COLORSPACE_YCBCR420NV12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb,Cr rows. */ + EVAS_COLORSPACE_YCBCR420TM12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of tiled row pointer, pointing to the Y rows, then the Cb,Cr rows. */ +} Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */ + +/** + * How to pack items into cells in a table. + * @ingroup Evas_Object_Table + * + * @see evas_object_table_homogeneous_set() for an explanation of the funcion of + * each one. + */ +typedef enum _Evas_Object_Table_Homogeneous_Mode +{ + EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, + EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, + EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 +} Evas_Object_Table_Homogeneous_Mode; /**< Table cell pack mode. */ + +typedef struct _Evas_Coord_Rectangle Evas_Coord_Rectangle; /**< A generic rectangle handle */ +typedef struct _Evas_Point Evas_Point; /**< integer point */ + +typedef struct _Evas_Coord_Point Evas_Coord_Point; /**< Evas_Coord point */ +typedef struct _Evas_Coord_Precision_Point Evas_Coord_Precision_Point; /**< Evas_Coord point with sub-pixel precision */ + +typedef struct _Evas_Position Evas_Position; /**< associates given point in Canvas and Output */ +typedef struct _Evas_Precision_Position Evas_Precision_Position; /**< associates given point in Canvas and Output, with sub-pixel precision */ + +/** + * @typedef Evas_Smart_Class + * + * A smart object's @b base class definition + * + * @ingroup Evas_Smart_Group + */ +typedef struct _Evas_Smart_Class Evas_Smart_Class; + +/** + * @typedef Evas_Smart_Cb_Description + * + * A smart object callback description, used to provide introspection + * + * @ingroup Evas_Smart_Group + */ +typedef struct _Evas_Smart_Cb_Description Evas_Smart_Cb_Description; + +/** + * @typedef Evas_Map + * + * An opaque handle to map points + * + * @see evas_map_new() + * @see evas_map_free() + * @see evas_map_dup() + * + * @ingroup Evas_Object_Group_Map + */ +typedef struct _Evas_Map Evas_Map; + +/** + * @typedef Evas + * + * An opaque handle to an Evas canvas. + * + * @see evas_new() + * @see evas_free() + * + * @ingroup Evas_Canvas + */ +typedef struct _Evas Evas; + +/** + * @typedef Evas_Object + * An Evas Object handle. + * @ingroup Evas_Object_Group + */ +typedef struct _Evas_Object Evas_Object; + +typedef void Evas_Performance; /**< An Evas Performance handle */ +typedef struct _Evas_Modifier Evas_Modifier; /**< An opaque type containing information on which modifier keys are registered in an Evas canvas */ +typedef struct _Evas_Lock Evas_Lock; /**< An opaque type containing information on which lock keys are registered in an Evas canvas */ +typedef struct _Evas_Smart Evas_Smart; /**< An Evas Smart Object handle */ +typedef struct _Evas_Native_Surface Evas_Native_Surface; /**< A generic datatype for engine specific native surface information */ + + /** + * @typedef Evas_Video_Surface + * + * A generic datatype for video specific surface information + * @see evas_object_image_video_surface_set + * @see evas_object_image_video_surface_get + * @since 1.1.0 + */ +typedef struct _Evas_Video_Surface Evas_Video_Surface; + +typedef unsigned long long Evas_Modifier_Mask; /**< An Evas modifier mask type */ + +typedef int Evas_Coord; +typedef int Evas_Font_Size; +typedef int Evas_Angle; + +struct _Evas_Coord_Rectangle /**< A rectangle in Evas_Coord */ +{ + Evas_Coord x; /**< top-left x co-ordinate of rectangle */ + Evas_Coord y; /**< top-left y co-ordinate of rectangle */ + Evas_Coord w; /**< width of rectangle */ + Evas_Coord h; /**< height of rectangle */ +}; + +struct _Evas_Point +{ + int x, y; +}; + +struct _Evas_Coord_Point +{ + Evas_Coord x, y; +}; + +struct _Evas_Coord_Precision_Point +{ + Evas_Coord x, y; + double xsub, ysub; +}; + +struct _Evas_Position +{ + Evas_Point output; + Evas_Coord_Point canvas; +}; + +struct _Evas_Precision_Position +{ + Evas_Point output; + Evas_Coord_Precision_Point canvas; +}; + +typedef enum _Evas_Aspect_Control +{ + EVAS_ASPECT_CONTROL_NONE = 0, /**< Preference on scaling unset */ + EVAS_ASPECT_CONTROL_NEITHER = 1, /**< Same effect as unset preference on scaling */ + EVAS_ASPECT_CONTROL_HORIZONTAL = 2, /**< Use all horizontal container space to place an object, using the given aspect */ + EVAS_ASPECT_CONTROL_VERTICAL = 3, /**< Use all vertical container space to place an object, using the given aspect */ + EVAS_ASPECT_CONTROL_BOTH = 4 /**< Use all horizontal @b and vertical container spaces to place an object (never growing it out of those bounds), using the given aspect */ +} Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set() */ + +typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */ +typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */ +typedef struct _Evas_Device Evas_Device; /**< A source device handle - where the event came from */ +typedef struct _Evas_Event_Mouse_Down Evas_Event_Mouse_Down; /**< Event structure for #EVAS_CALLBACK_MOUSE_DOWN event callbacks */ +typedef struct _Evas_Event_Mouse_Up Evas_Event_Mouse_Up; /**< Event structure for #EVAS_CALLBACK_MOUSE_UP event callbacks */ +typedef struct _Evas_Event_Mouse_In Evas_Event_Mouse_In; /**< Event structure for #EVAS_CALLBACK_MOUSE_IN event callbacks */ +typedef struct _Evas_Event_Mouse_Out Evas_Event_Mouse_Out; /**< Event structure for #EVAS_CALLBACK_MOUSE_OUT event callbacks */ +typedef struct _Evas_Event_Mouse_Move Evas_Event_Mouse_Move; /**< Event structure for #EVAS_CALLBACK_MOUSE_MOVE event callbacks */ +typedef struct _Evas_Event_Mouse_Wheel Evas_Event_Mouse_Wheel; /**< Event structure for #EVAS_CALLBACK_MOUSE_WHEEL event callbacks */ +typedef struct _Evas_Event_Multi_Down Evas_Event_Multi_Down; /**< Event structure for #EVAS_CALLBACK_MULTI_DOWN event callbacks */ +typedef struct _Evas_Event_Multi_Up Evas_Event_Multi_Up; /**< Event structure for #EVAS_CALLBACK_MULTI_UP event callbacks */ +typedef struct _Evas_Event_Multi_Move Evas_Event_Multi_Move; /**< Event structure for #EVAS_CALLBACK_MULTI_MOVE event callbacks */ +typedef struct _Evas_Event_Key_Down Evas_Event_Key_Down; /**< Event structure for #EVAS_CALLBACK_KEY_DOWN event callbacks */ +typedef struct _Evas_Event_Key_Up Evas_Event_Key_Up; /**< Event structure for #EVAS_CALLBACK_KEY_UP event callbacks */ +typedef struct _Evas_Event_Hold Evas_Event_Hold; /**< Event structure for #EVAS_CALLBACK_HOLD event callbacks */ + +typedef enum _Evas_Load_Error +{ + EVAS_LOAD_ERROR_NONE = 0, /**< No error on load */ + EVAS_LOAD_ERROR_GENERIC = 1, /**< A non-specific error occurred */ + EVAS_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< File (or file path) does not exist */ + EVAS_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission deinied to an existing file (or path) */ + EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Allocation of resources failure prevented load */ + EVAS_LOAD_ERROR_CORRUPT_FILE = 5, /**< File corrupt (but was detected as a known format) */ + EVAS_LOAD_ERROR_UNKNOWN_FORMAT = 6 /**< File is not a known format */ +} Evas_Load_Error; /**< Evas image load error codes one can get - see evas_load_error_str() too. */ + + +typedef enum _Evas_Alloc_Error +{ + EVAS_ALLOC_ERROR_NONE = 0, /**< No allocation error */ + EVAS_ALLOC_ERROR_FATAL = 1, /**< Allocation failed despite attempts to free up memory */ + EVAS_ALLOC_ERROR_RECOVERED = 2 /**< Allocation succeeded, but extra memory had to be found by freeing up speculative resources */ +} Evas_Alloc_Error; /**< Possible allocation errors returned by evas_alloc_error() */ + +typedef enum _Evas_Fill_Spread +{ + EVAS_TEXTURE_REFLECT = 0, /**< image fill tiling mode - tiling reflects */ + EVAS_TEXTURE_REPEAT = 1, /**< tiling repeats */ + EVAS_TEXTURE_RESTRICT = 2, /**< tiling clamps - range offset ignored */ + EVAS_TEXTURE_RESTRICT_REFLECT = 3, /**< tiling clamps and any range offset reflects */ + EVAS_TEXTURE_RESTRICT_REPEAT = 4, /**< tiling clamps and any range offset repeats */ + EVAS_TEXTURE_PAD = 5 /**< tiling extends with end values */ +} Evas_Fill_Spread; /**< Fill types used for evas_object_image_fill_spread_set() */ + +typedef enum _Evas_Pixel_Import_Pixel_Format +{ + EVAS_PIXEL_FORMAT_NONE = 0, /**< No pixel format */ + EVAS_PIXEL_FORMAT_ARGB32 = 1, /**< ARGB 32bit pixel format with A in the high byte per 32bit pixel word */ + EVAS_PIXEL_FORMAT_YUV420P_601 = 2 /**< YUV 420 Planar format with CCIR 601 color encoding wuth contiguous planes in the order Y, U and V */ +} Evas_Pixel_Import_Pixel_Format; /**< Pixel format for import call. See evas_object_image_pixels_import() */ + +struct _Evas_Pixel_Import_Source +{ + Evas_Pixel_Import_Pixel_Format format; /**< pixel format type ie ARGB32, YUV420P_601 etc. */ + int w, h; /**< width and height of source in pixels */ + void **rows; /**< an array of pointers (size depends on format) pointing to left edge of each scanline */ +}; + +/* magic version number to know what the native surf struct looks like */ +#define EVAS_NATIVE_SURFACE_VERSION 2 + +typedef enum _Evas_Native_Surface_Type +{ + EVAS_NATIVE_SURFACE_NONE, + EVAS_NATIVE_SURFACE_X11, + EVAS_NATIVE_SURFACE_OPENGL +} Evas_Native_Surface_Type; + +struct _Evas_Native_Surface +{ + int version; + Evas_Native_Surface_Type type; + union { + struct { + void *visual; /**< visual of the pixmap to use (Visual) */ + unsigned long pixmap; /**< pixmap id to use (Pixmap) */ + } x11; + struct { + unsigned int texture_id; /**< opengl texture id to use from glGenTextures() */ + unsigned int framebuffer_id; /**< 0 if not a FBO, FBO id otherwise from glGenFramebuffers() */ + unsigned int internal_format; /**< same as 'internalFormat' for glTexImage2D() */ + unsigned int format; /**< same as 'format' for glTexImage2D() */ + unsigned int x, y, w, h; /**< region inside the texture to use (image size is assumed as texture size, with 0, 0 being the top-left and co-ordinates working down to the right and bottom being positive) */ + } opengl; + } data; +}; + +/** + * @def EVAS_VIDEO_SURFACE_VERSION + * Magic version number to know what the video surf struct looks like + * @since 1.1.0 + */ +#define EVAS_VIDEO_SURFACE_VERSION 1 + +typedef void (*Evas_Video_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface); +typedef void (*Evas_Video_Coord_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface, Evas_Coord a, Evas_Coord b); + +struct _Evas_Video_Surface +{ + int version; + + Evas_Video_Coord_Cb move; /**< Move the video surface to this position */ + Evas_Video_Coord_Cb resize; /**< Resize the video surface to that size */ + Evas_Video_Cb show; /**< Show the video overlay surface */ + Evas_Video_Cb hide; /**< Hide the video overlay surface */ + Evas_Video_Cb update_pixels; /**< Please update the Evas_Object_Image pixels when called */ + + Evas_Object *parent; + void *data; +}; + +#define EVAS_LAYER_MIN -32768 /**< bottom-most layer number */ +#define EVAS_LAYER_MAX 32767 /**< top-most layer number */ + +#define EVAS_COLOR_SPACE_ARGB 0 /**< Not used for anything */ +#define EVAS_COLOR_SPACE_AHSV 1 /**< Not used for anything */ +#define EVAS_TEXT_INVALID -1 /**< Not used for anything */ +#define EVAS_TEXT_SPECIAL -2 /**< Not used for anything */ + +#define EVAS_HINT_EXPAND 1.0 /**< Use with evas_object_size_hint_weight_set(), evas_object_size_hint_weight_get(), evas_object_size_hint_expand_set(), evas_object_size_hint_expand_get() */ +#define EVAS_HINT_FILL -1.0 /**< Use with evas_object_size_hint_align_set(), evas_object_size_hint_align_get(), evas_object_size_hint_fill_set(), evas_object_size_hint_fill_get() */ +#define evas_object_size_hint_fill_set evas_object_size_hint_align_set /**< Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align) */ +#define evas_object_size_hint_fill_get evas_object_size_hint_align_get /**< Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align) */ +#define evas_object_size_hint_expand_set evas_object_size_hint_weight_set /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ +#define evas_object_size_hint_expand_get evas_object_size_hint_weight_get /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ + +/** + * How the object should be rendered to output. + * @ingroup Evas_Object_Group_Extras + */ +typedef enum _Evas_Render_Op +{ + EVAS_RENDER_BLEND = 0, /**< default op: d = d*(1-sa) + s */ + EVAS_RENDER_BLEND_REL = 1, /**< d = d*(1 - sa) + s*da */ + EVAS_RENDER_COPY = 2, /**< d = s */ + EVAS_RENDER_COPY_REL = 3, /**< d = s*da */ + EVAS_RENDER_ADD = 4, /**< d = d + s */ + EVAS_RENDER_ADD_REL = 5, /**< d = d + s*da */ + EVAS_RENDER_SUB = 6, /**< d = d - s */ + EVAS_RENDER_SUB_REL = 7, /**< d = d - s*da */ + EVAS_RENDER_TINT = 8, /**< d = d*s + d*(1 - sa) + s*(1 - da) */ + EVAS_RENDER_TINT_REL = 9, /**< d = d*(1 - sa + s) */ + EVAS_RENDER_MASK = 10, /**< d = d*sa */ + EVAS_RENDER_MUL = 11 /**< d = d*s */ +} Evas_Render_Op; /**< How the object should be rendered to output. */ + +typedef enum _Evas_Border_Fill_Mode +{ + EVAS_BORDER_FILL_NONE = 0, /**< Image's center region is @b not to be rendered */ + EVAS_BORDER_FILL_DEFAULT = 1, /**< Image's center region is to be @b blended with objects underneath it, if it has transparency. This is the default behavior for image objects */ + EVAS_BORDER_FILL_SOLID = 2 /**< Image's center region is to be made solid, even if it has transparency on it */ +} Evas_Border_Fill_Mode; /**< How an image's center region (the complement to the border region) should be rendered by Evas */ + +typedef enum _Evas_Image_Scale_Hint +{ + EVAS_IMAGE_SCALE_HINT_NONE = 0, /**< No scale hint at all */ + EVAS_IMAGE_SCALE_HINT_DYNAMIC = 1, /**< Image is being re-scaled over time, thus turning scaling cache @b off for its data */ + EVAS_IMAGE_SCALE_HINT_STATIC = 2 /**< Image is not being re-scaled over time, thus turning scaling cache @b on for its data */ +} Evas_Image_Scale_Hint; /**< How an image's data is to be treated by Evas, with regard to scaling cache */ + +typedef enum _Evas_Image_Animated_Loop_Hint +{ + EVAS_IMAGE_ANIMATED_HINT_NONE = 0, + EVAS_IMAGE_ANIMATED_HINT_LOOP = 1, /**< Image's animation mode is loop like 1->2->3->1->2->3 */ + EVAS_IMAGE_ANIMATED_HINT_PINGPONG = 2 /**< Image's animation mode is pingpong like 1->2->3->2->1-> ... */ +} Evas_Image_Animated_Loop_Hint; + +typedef enum _Evas_Engine_Render_Mode +{ + EVAS_RENDER_MODE_BLOCKING = 0, + EVAS_RENDER_MODE_NONBLOCKING = 1, +} Evas_Engine_Render_Mode; + +typedef enum _Evas_Image_Content_Hint +{ + EVAS_IMAGE_CONTENT_HINT_NONE = 0, /**< No hint at all */ + EVAS_IMAGE_CONTENT_HINT_DYNAMIC = 1, /**< The contents will change over time */ + EVAS_IMAGE_CONTENT_HINT_STATIC = 2 /**< The contents won't change over time */ +} Evas_Image_Content_Hint; /**< How an image's data is to be treated by Evas, for optimization */ + +struct _Evas_Engine_Info /** Generic engine information. Generic info is useless */ +{ + int magic; /**< Magic number */ +}; + +struct _Evas_Event_Mouse_Down /** Mouse button press event */ +{ + int button; /**< Mouse button number that went down (1 - 32) */ + + Evas_Point output; /**< The X/Y location of the cursor */ + Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ + + void *data; + Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ + Evas_Lock *locks; + + Evas_Button_Flags flags; /**< button flags set during the event */ + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +struct _Evas_Event_Mouse_Up /** Mouse button release event */ +{ + int button; /**< Mouse button number that was raised (1 - 32) */ + + Evas_Point output; + Evas_Coord_Point canvas; + + void *data; + Evas_Modifier *modifiers; + Evas_Lock *locks; + + Evas_Button_Flags flags; + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +struct _Evas_Event_Mouse_In /** Mouse enter event */ +{ + int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ + + Evas_Point output; + Evas_Coord_Point canvas; + + void *data; + Evas_Modifier *modifiers; + Evas_Lock *locks; + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +struct _Evas_Event_Mouse_Out /** Mouse leave event */ +{ + int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ + + + Evas_Point output; + Evas_Coord_Point canvas; + + void *data; + Evas_Modifier *modifiers; + Evas_Lock *locks; + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +struct _Evas_Event_Mouse_Move /** Mouse button down event */ +{ + int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ + + Evas_Position cur, prev; + + void *data; + Evas_Modifier *modifiers; + Evas_Lock *locks; + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +struct _Evas_Event_Mouse_Wheel /** Wheel event */ +{ + int direction; /* 0 = default up/down wheel FIXME: more wheel types */ + int z; /* ...,-2,-1 = down, 1,2,... = up */ + + Evas_Point output; + Evas_Coord_Point canvas; + + void *data; + Evas_Modifier *modifiers; + Evas_Lock *locks; + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +struct _Evas_Event_Multi_Down /** Multi button press event */ +{ + int device; /**< Multi device number that went down (1 or more for extra touches) */ + double radius, radius_x, radius_y; + double pressure, angle; + + Evas_Point output; + Evas_Coord_Precision_Point canvas; + + void *data; + Evas_Modifier *modifiers; + Evas_Lock *locks; + + Evas_Button_Flags flags; + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +struct _Evas_Event_Multi_Up /** Multi button release event */ +{ + int device; /**< Multi device number that went up (1 or more for extra touches) */ + double radius, radius_x, radius_y; + double pressure, angle; + + Evas_Point output; + Evas_Coord_Precision_Point canvas; + + void *data; + Evas_Modifier *modifiers; + Evas_Lock *locks; + + Evas_Button_Flags flags; + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +struct _Evas_Event_Multi_Move /** Multi button down event */ +{ + int device; /**< Multi device number that moved (1 or more for extra touches) */ + double radius, radius_x, radius_y; + double pressure, angle; + + Evas_Precision_Position cur; + + void *data; + Evas_Modifier *modifiers; + Evas_Lock *locks; + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +struct _Evas_Event_Key_Down /** Key press event */ +{ + char *keyname; /**< the name string of the key pressed */ + void *data; + Evas_Modifier *modifiers; + Evas_Lock *locks; + + const char *key; /**< The logical key : (eg shift+1 == exclamation) */ + const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */ + const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */ + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +struct _Evas_Event_Key_Up /** Key release event */ +{ + char *keyname; /**< the name string of the key released */ + void *data; + Evas_Modifier *modifiers; + Evas_Lock *locks; + + const char *key; /**< The logical key : (eg shift+1 == exclamation) */ + const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */ + const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */ + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +struct _Evas_Event_Hold /** Hold change event */ +{ + int hold; /**< The hold flag */ + void *data; + + unsigned int timestamp; + Evas_Event_Flags event_flags; + Evas_Device *dev; +}; + +/** + * How the mouse pointer should be handled by Evas. + * + * In the mode #EVAS_OBJECT_POINTER_MODE_AUTOGRAB, when a mouse button + * is pressed down over an object and held, with the mouse pointer + * being moved outside of it, the pointer still behaves as being bound + * to that object, albeit out of its drawing region. When the button + * is released, the event will be fed to the object, that may check if + * the final position is over it or not and do something about it. + * + * In the mode #EVAS_OBJECT_POINTER_MODE_NOGRAB, the pointer will + * always be bound to the object right below it. + * + * @ingroup Evas_Object_Group_Extras + */ +typedef enum _Evas_Object_Pointer_Mode +{ + EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */ + EVAS_OBJECT_POINTER_MODE_NOGRAB /**< pointer always bound to the object right below it */ +} Evas_Object_Pointer_Mode; /**< How the mouse pointer should be handled by Evas. */ + +typedef void (*Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info); /**< Evas smart objects' "smart callback" function signature */ +typedef void (*Evas_Event_Cb) (void *data, Evas *e, void *event_info); /**< Evas event callback function signature */ +typedef Eina_Bool (*Evas_Object_Event_Post_Cb) (void *data, Evas *e); +typedef void (*Evas_Object_Event_Cb) (void *data, Evas *e, Evas_Object *obj, void *event_info); /**< Evas object event callback function signature */ +typedef void (*Evas_Async_Events_Put_Cb)(void *target, Evas_Callback_Type type, void *event_info); + +/** + * @defgroup Evas_Group Top Level Functions + * + * Functions that affect Evas as a whole. + */ + +/** + * Initialize Evas + * + * @return The init counter value. + * + * This function initializes Evas and increments a counter of the + * number of calls to it. It returns the new counter's value. + * + * @see evas_shutdown(). + * + * Most EFL users wouldn't be using this function directly, because + * they wouldn't access Evas directly by themselves. Instead, they + * would be using higher level helpers, like @c ecore_evas_init(). + * See http://docs.enlightenment.org/auto/ecore/. + * + * You should be using this if your use is something like the + * following. The buffer engine is just one of the many ones Evas + * provides. + * + * @dontinclude evas-buffer-simple.c + * @skip int main + * @until return -1; + * And being the canvas creation something like: + * @skip static Evas *create_canvas + * @until evas_output_viewport_set(canvas, + * + * Note that this is code creating an Evas canvas with no usage of + * Ecore helpers at all -- no linkage with Ecore on this scenario, + * thus. Again, this wouldn't be on Evas common usage for most + * developers. See the full @ref Example_Evas_Buffer_Simple "example". + * + * @ingroup Evas_Group + */ +EAPI int evas_init (void); + +/** + * Shutdown Evas + * + * @return Evas' init counter value. + * + * This function finalizes Evas, decrementing the counter of the + * number of calls to the function evas_init(). This new value for the + * counter is returned. + * + * @see evas_init(). + * + * If you were the sole user of Evas, by means of evas_init(), you can + * check if it's being properly shut down by expecting a return value + * of 0. + * + * Example code follows. + * @dontinclude evas-buffer-simple.c + * @skip // NOTE: use ecore_evas_buffer_new + * @until evas_shutdown + * Where that function would contain: + * @skip evas_free(canvas) + * @until evas_free(canvas) + * + * Most users would be using ecore_evas_shutdown() instead, like told + * in evas_init(). See the full @ref Example_Evas_Buffer_Simple + * "example". + * + * @ingroup Evas_Group + */ +EAPI int evas_shutdown (void); + + +/** + * Return if any allocation errors have occurred during the prior function + * @return The allocation error flag + * + * This function will return if any memory allocation errors occurred during, + * and what kind they were. The return value will be one of + * EVAS_ALLOC_ERROR_NONE, EVAS_ALLOC_ERROR_FATAL or EVAS_ALLOC_ERROR_RECOVERED + * with each meaning something different. + * + * EVAS_ALLOC_ERROR_NONE means that no errors occurred at all and the function + * worked as expected. + * + * EVAS_ALLOC_ERROR_FATAL means the function was completely unable to perform + * its job and will have exited as cleanly as possible. The programmer + * should consider this as a sign of very low memory and should try and safely + * recover from the prior functions failure (or try free up memory elsewhere + * and try again after more memory is freed). + * + * EVAS_ALLOC_ERROR_RECOVERED means that an allocation error occurred, but was + * recovered from by evas finding memory of its own it has allocated and + * freeing what it sees as not really usefully allocated memory. What is freed + * may vary. Evas may reduce the resolution of images, free cached images or + * fonts, trhow out pre-rendered data, reduce the complexity of change lists + * etc. Evas and the program will function as per normal after this, but this + * is a sign of low memory, and it is suggested that the program try and + * identify memory it doesn't need, and free it. + * + * Example: + * @code + * extern Evas_Object *object; + * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info); + * + * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, callback, NULL); + * if (evas_alloc_error() == EVAS_ALLOC_ERROR_FATAL) + * { + * fprintf(stderr, "ERROR: Completely unable to attach callback. Must\n"); + * fprintf(stderr, " destroy object now as it cannot be used.\n"); + * evas_object_del(object); + * object = NULL; + * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n"); + * my_memory_cleanup(); + * } + * if (evas_alloc_error() == EVAS_ALLOC_ERROR_RECOVERED) + * { + * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n"); + * my_memory_cleanup(); + * } + * @endcode + * + * @ingroup Evas_Group + */ +EAPI Evas_Alloc_Error evas_alloc_error (void); + + +/** + * @brief Get evas' internal asynchronous events read file descriptor. + * + * @return The canvas' asynchronous events read file descriptor. + * + * Evas' asynchronous events are meant to be dealt with internally, + * i. e., when building stuff to be glued together into the EFL + * infrastructure -- a module, for example. The context which demands + * its use is when calculations need to be done out of the main + * thread, asynchronously, and some action must be performed after + * that. + * + * An example of actual use of this API is for image asynchronous + * preload inside evas. If the canvas was instantiated through + * ecore-evas usage, ecore itself will take care of calling those + * events' processing. + * + * This function returns the read file descriptor where to get the + * asynchronous events of the canvas. Naturally, other mainloops, + * apart from ecore, may make use of it. + * + * @ingroup Evas_Group + */ +EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; + +/** + * @brief Trigger the processing of all events waiting on the file + * descriptor returned by evas_async_events_fd_get(). + * + * @return The number of events processed. + * + * All asynchronous events queued up by evas_async_events_put() are + * processed here. More precisely, the callback functions, informed + * together with other event parameters, when queued, get called (with + * those parameters), in that order. + * + * @ingroup Evas_Group + */ +EAPI int evas_async_events_process (void); + +/** +* Insert asynchronous events on the canvas. + * + * @param target The target to be affected by the events. + * @param type The type of callback function. + * @param event_info Information about the event. + * @param func The callback function pointer. + * + * This is the way, for a routine running outside evas' main thread, + * to report an asynchronous event. A callback function is informed, + * whose call is to happen after evas_async_events_process() is + * called. + * + * @ingroup Evas_Group + */ +EAPI Eina_Bool evas_async_events_put (const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func) EINA_ARG_NONNULL(1, 4); + +/** + * @defgroup Evas_Canvas Canvas Functions + * + * Low level Evas canvas functions. Sub groups will present more high + * level ones, though. + * + * Most of these functions deal with low level Evas actions, like: + * @li create/destroy raw canvases, not bound to any displaying engine + * @li tell a canvas i got focused (in a windowing context, for example) + * @li tell a canvas a region should not be calculated anymore in rendering + * @li tell a canvas to render its contents, immediately + * + * Most users will be using Evas by means of the @c Ecore_Evas + * wrapper, which deals with all the above mentioned issues + * automatically for them. Thus, you'll be looking at this section + * only if you're building low level stuff. + * + * The groups within present you functions that deal with the canvas + * directly, too, and not yet with its @b objects. They are the + * functions you need to use at a minimum to get a working canvas. + * + * Some of the funcions in this group are exemplified @ref + * Example_Evas_Events "here". + */ + +/** + * Creates a new empty evas. + * + * Note that before you can use the evas, you will to at a minimum: + * @li Set its render method with @ref evas_output_method_set . + * @li Set its viewport size with @ref evas_output_viewport_set . + * @li Set its size of the canvas with @ref evas_output_size_set . + * @li Ensure that the render engine is given the correct settings + * with @ref evas_engine_info_set . + * + * This function should only fail if the memory allocation fails + * + * @note this function is very low level. Instead of using it + * directly, consider using the high level functions in + * Ecore_Evas such as @c ecore_evas_new(). See + * http://docs.enlightenment.org/auto/ecore/. + * + * @attention it is recommended that one calls evas_init() before + * creating new canvas. + * + * @return A new uninitialised Evas canvas on success. Otherwise, @c + * NULL. + * @ingroup Evas_Canvas + */ +EAPI Evas *evas_new (void) EINA_WARN_UNUSED_RESULT EINA_MALLOC; + +/** + * Frees the given evas and any objects created on it. + * + * Any objects with 'free' callbacks will have those callbacks called + * in this function. + * + * @param e The given evas. + * + * @ingroup Evas_Canvas + */ +EAPI void evas_free (Evas *e) EINA_ARG_NONNULL(1); + +/** + * Inform to the evas that it got the focus. + * + * @param e The evas to change information. + * @ingroup Evas_Canvas + */ +EAPI void evas_focus_in (Evas *e); + +/** + * Inform to the evas that it lost the focus. + * + * @param e The evas to change information. + * @ingroup Evas_Canvas + */ +EAPI void evas_focus_out (Evas *e); + +/** + * Get the focus state known by the given evas + * + * @param e The evas to query information. + * @ingroup Evas_Canvas + */ +EAPI Eina_Bool evas_focus_state_get (const Evas *e) EINA_PURE; + +/** + * Push the nochange flag up 1 + * + * This tells evas, that while the nochange flag is greater than 0, do not + * mark objects as "changed" when making changes. + * + * @param e The evas to change information. + * @ingroup Evas_Canvas + */ +EAPI void evas_nochange_push (Evas *e); + +/** + * Pop the nochange flag down 1 + * + * This tells evas, that while the nochange flag is greater than 0, do not + * mark objects as "changed" when making changes. + * + * @param e The evas to change information. + * @ingroup Evas_Canvas + */ +EAPI void evas_nochange_pop (Evas *e); + + +/** + * Attaches a specific pointer to the evas for fetching later + * + * @param e The canvas to attach the pointer to + * @param data The pointer to attach + * @ingroup Evas_Canvas + */ +EAPI void evas_data_attach_set (Evas *e, void *data) EINA_ARG_NONNULL(1); + +/** + * Returns the pointer attached by evas_data_attach_set() + * + * @param e The canvas to attach the pointer to + * @return The pointer attached + * @ingroup Evas_Canvas + */ +EAPI void *evas_data_attach_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Add a damage rectangle. + * + * @param e The given canvas pointer. + * @param x The rectangle's left position. + * @param y The rectangle's top position. + * @param w The rectangle's width. + * @param h The rectangle's height. + * + * This is the function by which one tells evas that a part of the + * canvas has to be repainted. + * + * @ingroup Evas_Canvas + */ +EAPI void evas_damage_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1); + +/** + * Add an "obscured region" to an Evas canvas. + * + * @param e The given canvas pointer. + * @param x The rectangle's top left corner's horizontal coordinate. + * @param y The rectangle's top left corner's vertical coordinate + * @param w The rectangle's width. + * @param h The rectangle's height. + * + * This is the function by which one tells an Evas canvas that a part + * of it must not be repainted. The region must be + * rectangular and its coordinates inside the canvas viewport are + * passed in the call. After this call, the region specified won't + * participate in any form in Evas' calculations and actions during + * its rendering updates, having its displaying content frozen as it + * was just after this function took place. + * + * We call it "obscured region" because the most common use case for + * this rendering (partial) freeze is something else (most problaby + * other canvas) being on top of the specified rectangular region, + * thus shading it completely from the user's final scene in a + * display. To avoid unnecessary processing, one should indicate to the + * obscured canvas not to bother about the non-important area. + * + * The majority of users won't have to worry about this funcion, as + * they'll be using just one canvas in their applications, with + * nothing inset or on top of it in any form. + * + * To make this region one that @b has to be repainted again, call the + * function evas_obscured_clear(). + * + * @note This is a very low level function, which most of + * Evas' users wouldn't care about. + * + * @note This function does @b not flag the canvas as having its state + * changed. If you want to re-render it afterwards expecting new + * contents, you have to add "damage" regions yourself (see + * evas_damage_rectangle_add()). + * + * @see evas_obscured_clear() + * @see evas_render_updates() + * + * Example code follows. + * @dontinclude evas-events.c + * @skip add an obscured + * @until evas_obscured_clear(evas); + * + * In that example, pressing the "Ctrl" and "o" keys will impose or + * remove an obscured region in the middle of the canvas. You'll get + * the same contents at the time the key was pressed, if toggling it + * on, until you toggle it off again (make sure the animation is + * running on to get the idea better). See the full @ref + * Example_Evas_Events "example". + * + * @ingroup Evas_Canvas + */ +EAPI void evas_obscured_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1); + +/** + * Remove all "obscured regions" from an Evas canvas. + * + * @param e The given canvas pointer. + * + * This function removes all the rectangles from the obscured regions + * list of the canvas @p e. It takes obscured areas added with + * evas_obscured_rectangle_add() and make them again a regions that @b + * have to be repainted on rendering updates. + * + * @note This is a very low level function, which most of + * Evas' users wouldn't care about. + * + * @note This function does @b not flag the canvas as having its state + * changed. If you want to re-render it afterwards expecting new + * contents, you have to add "damage" regions yourself (see + * evas_damage_rectangle_add()). + * + * @see evas_obscured_rectangle_add() for an example + * @see evas_render_updates() + * + * @ingroup Evas_Canvas + */ +EAPI void evas_obscured_clear (Evas *e) EINA_ARG_NONNULL(1); + +/** + * Force immediate renderization of the given Evas canvas. + * + * @param e The given canvas pointer. + * @return A newly allocated list of updated rectangles of the canvas + * (@c Eina_Rectangle structs). Free this list with + * evas_render_updates_free(). + * + * This function forces an immediate renderization update of the given + * canvas @e. + * + * @note This is a very low level function, which most of + * Evas' users wouldn't care about. One would use it, for example, to + * grab an Evas' canvas update regions and paint them back, using the + * canvas' pixmap, on a displaying system working below Evas. + * + * @note Evas is a stateful canvas. If no operations changing its + * state took place since the last rendering action, you won't see no + * changes and this call will be a no-op. + * + * Example code follows. + * @dontinclude evas-events.c + * @skip add an obscured + * @until d.obscured = !d.obscured; + * + * See the full @ref Example_Evas_Events "example". + * + * @ingroup Evas_Canvas + */ +EAPI Eina_List *evas_render_updates (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Free the rectangles returned by evas_render_updates(). + * + * @param updates The list of updated rectangles of the canvas. + * + * This function removes the region from the render updates list. It + * makes the region doesn't be render updated anymore. + * + * @see evas_render_updates() for an example + * + * @ingroup Evas_Canvas + */ +EAPI void evas_render_updates_free (Eina_List *updates); + +/** + * Force renderization of the given canvas. + * + * @param e The given canvas pointer. + * + * @ingroup Evas_Canvas + */ +EAPI void evas_render (Evas *e) EINA_ARG_NONNULL(1); + +/** + * Update the canvas internal objects but not triggering immediate + * renderization. + * + * @param e The given canvas pointer. + * + * This function updates the canvas internal objects not triggering + * renderization. To force renderization function evas_render() should + * be used. + * + * @see evas_render. + * + * @ingroup Evas_Canvas + */ +EAPI void evas_norender (Evas *e) EINA_ARG_NONNULL(1); + +/** + * Make the canvas discard internally cached data used for rendering. + * + * @param e The given canvas pointer. + * + * This function flushes the arrays of delete, active and render objects. + * Other things it may also discard are: shared memory segments, + * temporary scratch buffers, cached data to avoid re-compute of that data etc. + * + * @ingroup Evas_Canvas + */ +EAPI void evas_render_idle_flush (Evas *e) EINA_ARG_NONNULL(1); + +/** + * Make the canvas discard as much data as possible used by the engine at + * runtime. + * + * @param e The given canvas pointer. + * + * This function will unload images, delete textures and much more, where + * possible. You may also want to call evas_render_idle_flush() immediately + * prior to this to perhaps discard a little more, though evas_render_dump() + * should implicitly delete most of what evas_render_idle_flush() might + * discard too. + * + * @ingroup Evas_Canvas + */ +EAPI void evas_render_dump (Evas *e) EINA_ARG_NONNULL(1); + +/** + * @defgroup Evas_Output_Method Render Engine Functions + * + * Functions that are used to set the render engine for a given + * function, and then get that engine working. + * + * The following code snippet shows how they can be used to + * initialise an evas that uses the X11 software engine: + * @code + * Evas *evas; + * Evas_Engine_Info_Software_X11 *einfo; + * extern Display *display; + * extern Window win; + * + * evas_init(); + * + * evas = evas_new(); + * evas_output_method_set(evas, evas_render_method_lookup("software_x11")); + * evas_output_size_set(evas, 640, 480); + * evas_output_viewport_set(evas, 0, 0, 640, 480); + * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas); + * einfo->info.display = display; + * einfo->info.visual = DefaultVisual(display, DefaultScreen(display)); + * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display)); + * einfo->info.drawable = win; + * einfo->info.depth = DefaultDepth(display, DefaultScreen(display)); + * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo); + * @endcode + * + * @ingroup Evas_Canvas + */ + +/** + * Look up a numeric ID from a string name of a rendering engine. + * + * @param name the name string of an engine + * @return A numeric (opaque) ID for the rendering engine + * @ingroup Evas_Output_Method + * + * This function looks up a numeric return value for the named engine + * in the string @p name. This is a normal C string, NUL byte + * terminated. The name is case sensitive. If the rendering engine is + * available, a numeric ID for that engine is returned that is not + * 0. If the engine is not available, 0 is returned, indicating an + * invalid engine. + * + * The programmer should NEVER rely on the numeric ID of an engine + * unless it is returned by this function. Programs should NOT be + * written accessing render method ID's directly, without first + * obtaining it from this function. + * + * @attention it is mandatory that one calls evas_init() before + * looking up the render method. + * + * Example: + * @code + * int engine_id; + * Evas *evas; + * + * evas_init(); + * + * evas = evas_new(); + * if (!evas) + * { + * fprintf(stderr, "ERROR: Canvas creation failed. Fatal error.\n"); + * exit(-1); + * } + * engine_id = evas_render_method_lookup("software_x11"); + * if (!engine_id) + * { + * fprintf(stderr, "ERROR: Requested rendering engine is absent.\n"); + * exit(-1); + * } + * evas_output_method_set(evas, engine_id); + * @endcode + */ +EAPI int evas_render_method_lookup (const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * List all the rendering engines compiled into the copy of the Evas library + * + * @return A linked list whose data members are C strings of engine names + * @ingroup Evas_Output_Method + * + * Calling this will return a handle (pointer) to an Evas linked + * list. Each node in the linked list will have the data pointer be a + * (char *) pointer to the name string of the rendering engine + * available. The strings should never be modified, neither should the + * list be modified. This list should be cleaned up as soon as the + * program no longer needs it using evas_render_method_list_free(). If + * no engines are available from Evas, NULL will be returned. + * + * Example: + * @code + * Eina_List *engine_list, *l; + * char *engine_name; + * + * engine_list = evas_render_method_list(); + * if (!engine_list) + * { + * fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n"); + * exit(-1); + * } + * printf("Available Evas Engines:\n"); + * EINA_LIST_FOREACH(engine_list, l, engine_name) + * printf("%s\n", engine_name); + * evas_render_method_list_free(engine_list); + * @endcode + */ +EAPI Eina_List *evas_render_method_list (void) EINA_WARN_UNUSED_RESULT; + +/** + * This function should be called to free a list of engine names + * + * @param list The Eina_List base pointer for the engine list to be freed + * @ingroup Evas_Output_Method + * + * When this function is called it will free the engine list passed in + * as @p list. The list should only be a list of engines generated by + * calling evas_render_method_list(). If @p list is NULL, nothing will + * happen. + * + * Example: + * @code + * Eina_List *engine_list, *l; + * char *engine_name; + * + * engine_list = evas_render_method_list(); + * if (!engine_list) + * { + * fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n"); + * exit(-1); + * } + * printf("Available Evas Engines:\n"); + * EINA_LIST_FOREACH(engine_list, l, engine_name) + * printf("%s\n", engine_name); + * evas_render_method_list_free(engine_list); + * @endcode + */ +EAPI void evas_render_method_list_free (Eina_List *list); + + +/** + * Sets the output engine for the given evas. + * + * Once the output engine for an evas is set, any attempt to change it + * will be ignored. The value for @p render_method can be found using + * @ref evas_render_method_lookup . + * + * @param e The given evas. + * @param render_method The numeric engine value to use. + * + * @attention it is mandatory that one calls evas_init() before + * setting the output method. + * + * @ingroup Evas_Output_Method + */ +EAPI void evas_output_method_set (Evas *e, int render_method) EINA_ARG_NONNULL(1); + +/** + * Retrieves the number of the output engine used for the given evas. + * @param e The given evas. + * @return The ID number of the output engine being used. @c 0 is + * returned if there is an error. + * @ingroup Evas_Output_Method + */ +EAPI int evas_output_method_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Retrieves the current render engine info struct from the given evas. + * + * The returned structure is publicly modifiable. The contents are + * valid until either @ref evas_engine_info_set or @ref evas_render + * are called. + * + * This structure does not need to be freed by the caller. + * + * @param e The given evas. + * @return A pointer to the Engine Info structure. @c NULL is returned if + * an engine has not yet been assigned. + * @ingroup Evas_Output_Method + */ +EAPI Evas_Engine_Info *evas_engine_info_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Applies the engine settings for the given evas from the given @c + * Evas_Engine_Info structure. + * + * To get the Evas_Engine_Info structure to use, call @ref + * evas_engine_info_get . Do not try to obtain a pointer to an + * @c Evas_Engine_Info structure in any other way. + * + * You will need to call this function at least once before you can + * create objects on an evas or render that evas. Some engines allow + * their settings to be changed more than once. + * + * Once called, the @p info pointer should be considered invalid. + * + * @param e The pointer to the Evas Canvas + * @param info The pointer to the Engine Info to use + * @return 1 if no error occurred, 0 otherwise + * @ingroup Evas_Output_Method + */ +EAPI Eina_Bool evas_engine_info_set (Evas *e, Evas_Engine_Info *info) EINA_ARG_NONNULL(1); + +/** + * @defgroup Evas_Output_Size Output and Viewport Resizing Functions + * + * Functions that set and retrieve the output and viewport size of an + * evas. + * + * @ingroup Evas_Canvas + */ + +/** + * Sets the output size of the render engine of the given evas. + * + * The evas will render to a rectangle of the given size once this + * function is called. The output size is independent of the viewport + * size. The viewport will be stretched to fill the given rectangle. + * + * The units used for @p w and @p h depend on the engine used by the + * evas. + * + * @param e The given evas. + * @param w The width in output units, usually pixels. + * @param h The height in output units, usually pixels. + * @ingroup Evas_Output_Size + */ +EAPI void evas_output_size_set (Evas *e, int w, int h) EINA_ARG_NONNULL(1); + +/** + * Retrieve the output size of the render engine of the given evas. + * + * The output size is given in whatever the output units are for the + * engine. + * + * If either @p w or @p h is @c NULL, then it is ignored. If @p e is + * invalid, the returned results are undefined. + * + * @param e The given evas. + * @param w The pointer to an integer to store the width in. + * @param h The pointer to an integer to store the height in. + * @ingroup Evas_Output_Size + */ +EAPI void evas_output_size_get (const Evas *e, int *w, int *h) EINA_ARG_NONNULL(1); + +/** + * Sets the output viewport of the given evas in evas units. + * + * The output viewport is the area of the evas that will be visible to + * the viewer. The viewport will be stretched to fit the output + * target of the evas when rendering is performed. + * + * @note The coordinate values do not have to map 1-to-1 with the output + * target. However, it is generally advised that it is done for ease + * of use. + * + * @param e The given evas. + * @param x The top-left corner x value of the viewport. + * @param y The top-left corner y value of the viewport. + * @param w The width of the viewport. Must be greater than 0. + * @param h The height of the viewport. Must be greater than 0. + * @ingroup Evas_Output_Size + */ +EAPI void evas_output_viewport_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + +/** + * Get the render engine's output viewport co-ordinates in canvas units. + * @param e The pointer to the Evas Canvas + * @param x The pointer to a x variable to be filled in + * @param y The pointer to a y variable to be filled in + * @param w The pointer to a width variable to be filled in + * @param h The pointer to a height variable to be filled in + * @ingroup Evas_Output_Size + * + * Calling this function writes the current canvas output viewport + * size and location values into the variables pointed to by @p x, @p + * y, @p w and @p h. On success the variables have the output + * location and size values written to them in canvas units. Any of @p + * x, @p y, @p w or @p h that are NULL will not be written to. If @p e + * is invalid, the results are undefined. + * + * Example: + * @code + * extern Evas *evas; + * Evas_Coord x, y, width, height; + * + * evas_output_viewport_get(evas, &x, &y, &w, &h); + * @endcode + */ +EAPI void evas_output_viewport_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + +/** + * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions + * + * Functions that are used to map coordinates from the canvas to the + * screen or the screen to the canvas. + * + * @ingroup Evas_Canvas + */ + +/** + * Convert/scale an ouput screen co-ordinate into canvas co-ordinates + * + * @param e The pointer to the Evas Canvas + * @param x The screen/output x co-ordinate + * @return The screen co-ordinate translated to canvas unit co-ordinates + * @ingroup Evas_Coord_Mapping_Group + * + * This function takes in a horizontal co-ordinate as the @p x + * parameter and converts it into canvas units, accounting for output + * size, viewport size and location, returning it as the function + * return value. If @p e is invalid, the results are undefined. + * + * Example: + * @code + * extern Evas *evas; + * extern int screen_x; + * Evas_Coord canvas_x; + * + * canvas_x = evas_coord_screen_x_to_world(evas, screen_x); + * @endcode + */ +EAPI Evas_Coord evas_coord_screen_x_to_world (const Evas *e, int x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Convert/scale an ouput screen co-ordinate into canvas co-ordinates + * + * @param e The pointer to the Evas Canvas + * @param y The screen/output y co-ordinate + * @return The screen co-ordinate translated to canvas unit co-ordinates + * @ingroup Evas_Coord_Mapping_Group + * + * This function takes in a vertical co-ordinate as the @p y parameter + * and converts it into canvas units, accounting for output size, + * viewport size and location, returning it as the function return + * value. If @p e is invalid, the results are undefined. + * + * Example: + * @code + * extern Evas *evas; + * extern int screen_y; + * Evas_Coord canvas_y; + * + * canvas_y = evas_coord_screen_y_to_world(evas, screen_y); + * @endcode + */ +EAPI Evas_Coord evas_coord_screen_y_to_world (const Evas *e, int y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Convert/scale a canvas co-ordinate into output screen co-ordinates + * + * @param e The pointer to the Evas Canvas + * @param x The canvas x co-ordinate + * @return The output/screen co-ordinate translated to output co-ordinates + * @ingroup Evas_Coord_Mapping_Group + * + * This function takes in a horizontal co-ordinate as the @p x + * parameter and converts it into output units, accounting for output + * size, viewport size and location, returning it as the function + * return value. If @p e is invalid, the results are undefined. + * + * Example: + * @code + * extern Evas *evas; + * int screen_x; + * extern Evas_Coord canvas_x; + * + * screen_x = evas_coord_world_x_to_screen(evas, canvas_x); + * @endcode + */ +EAPI int evas_coord_world_x_to_screen (const Evas *e, Evas_Coord x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Convert/scale a canvas co-ordinate into output screen co-ordinates + * + * @param e The pointer to the Evas Canvas + * @param y The canvas y co-ordinate + * @return The output/screen co-ordinate translated to output co-ordinates + * @ingroup Evas_Coord_Mapping_Group + * + * This function takes in a vertical co-ordinate as the @p x parameter + * and converts it into output units, accounting for output size, + * viewport size and location, returning it as the function return + * value. If @p e is invalid, the results are undefined. + * + * Example: + * @code + * extern Evas *evas; + * int screen_y; + * extern Evas_Coord canvas_y; + * + * screen_y = evas_coord_world_y_to_screen(evas, canvas_y); + * @endcode + */ +EAPI int evas_coord_world_y_to_screen (const Evas *e, Evas_Coord y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * @defgroup Evas_Pointer_Group Pointer (Mouse) Functions + * + * Functions that deal with the status of the pointer (mouse cursor). + * + * @ingroup Evas_Canvas + */ + +/** + * This function returns the current known pointer co-ordinates + * + * @param e The pointer to the Evas Canvas + * @param x The pointer to an integer to be filled in + * @param y The pointer to an integer to be filled in + * @ingroup Evas_Pointer_Group + * + * This function returns the current known screen/output co-ordinates + * of the mouse pointer and sets the contents of the integers pointed + * to by @p x and @p y to contain these co-ordinates. If @p e is not a + * valid canvas the results of this function are undefined. + * + * Example: + * @code + * extern Evas *evas; + * int mouse_x, mouse_y; + * + * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y); + * printf("Mouse is at screen position %i, %i\n", mouse_x, mouse_y); + * @endcode + */ +EAPI void evas_pointer_output_xy_get (const Evas *e, int *x, int *y) EINA_ARG_NONNULL(1); + +/** + * This function returns the current known pointer co-ordinates + * + * @param e The pointer to the Evas Canvas + * @param x The pointer to a Evas_Coord to be filled in + * @param y The pointer to a Evas_Coord to be filled in + * @ingroup Evas_Pointer_Group + * + * This function returns the current known canvas unit co-ordinates of + * the mouse pointer and sets the contents of the Evas_Coords pointed + * to by @p x and @p y to contain these co-ordinates. If @p e is not a + * valid canvas the results of this function are undefined. + * + * Example: + * @code + * extern Evas *evas; + * Evas_Coord mouse_x, mouse_y; + * + * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y); + * printf("Mouse is at canvas position %f, %f\n", mouse_x, mouse_y); + * @endcode + */ +EAPI void evas_pointer_canvas_xy_get (const Evas *e, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1); + +/** + * Returns a bitmask with the mouse buttons currently pressed, set to 1 + * + * @param e The pointer to the Evas Canvas + * @return A bitmask of the currently depressed buttons on the cavas + * @ingroup Evas_Pointer_Group + * + * Calling this function will return a 32-bit integer with the + * appropriate bits set to 1 that correspond to a mouse button being + * depressed. This limits Evas to a mouse devices with a maximum of 32 + * buttons, but that is generally in excess of any host system's + * pointing device abilities. + * + * A canvas by default begins with no mouse buttons being pressed and + * only calls to evas_event_feed_mouse_down(), + * evas_event_feed_mouse_down_data(), evas_event_feed_mouse_up() and + * evas_event_feed_mouse_up_data() will alter that. + * + * The least significant bit corresponds to the first mouse button + * (button 1) and the most significant bit corresponds to the last + * mouse button (button 32). + * + * If @p e is not a valid canvas, the return value is undefined. + * + * Example: + * @code + * extern Evas *evas; + * int button_mask, i; + * + * button_mask = evas_pointer_button_down_mask_get(evas); + * printf("Buttons currently pressed:\n"); + * for (i = 0; i < 32; i++) + * { + * if ((button_mask & (1 << i)) != 0) printf("Button %i\n", i + 1); + * } + * @endcode + */ +EAPI int evas_pointer_button_down_mask_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Returns whether the mouse pointer is logically inside the canvas + * + * @param e The pointer to the Evas Canvas + * @return An integer that is 1 if the mouse is inside the canvas, 0 otherwise + * @ingroup Evas_Pointer_Group + * + * When this function is called it will return a value of either 0 or + * 1, depending on if evas_event_feed_mouse_in(), + * evas_event_feed_mouse_in_data(), or evas_event_feed_mouse_out(), + * evas_event_feed_mouse_out_data() have been called to feed in a + * mouse enter event into the canvas. + * + * A return value of 1 indicates the mouse is logically inside the + * canvas, and 0 implies it is logically outside the canvas. + * + * A canvas begins with the mouse being assumed outside (0). + * + * If @p e is not a valid canvas, the return value is undefined. + * + * Example: + * @code + * extern Evas *evas; + * + * if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n"); + * else printf("Mouse is out!\n"); + * @endcode + */ +EAPI Eina_Bool evas_pointer_inside_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI void evas_sync(Evas *e) EINA_ARG_NONNULL(1); + +/** + * @defgroup Evas_Canvas_Events Canvas Events + * + * Functions relating to canvas events, which are mainly reports on + * its internal states changing (an object got focused, the rendering + * is updated, etc). + * + * Some of the funcions in this group are exemplified @ref + * Example_Evas_Events "here". + * + * @ingroup Evas_Canvas + */ + +/** + * @addtogroup Evas_Canvas_Events + * @{ + */ + +/** + * Add (register) a callback function to a given canvas event. + * + * @param e Canvas to attach a callback to + * @param type The type of event that will trigger the callback + * @param func The (callback) function to be called when the event is + * triggered + * @param data The data pointer to be passed to @p func + * + * This function adds a function callback to the canvas @p e when the + * event of type @p type occurs on it. The function pointer is @p + * func. + * + * In the event of a memory allocation error during the addition of + * the callback to the canvas, evas_alloc_error() should be used to + * determine the nature of the error, if any, and the program should + * sensibly try and recover. + * + * A callback function must have the ::Evas_Event_Cb prototype + * definition. The first parameter (@p data) in this definition will + * have the same value passed to evas_event_callback_add() as the @p + * data parameter, at runtime. The second parameter @p e is the canvas + * pointer on which the event occurred. The third parameter @p + * event_info is a pointer to a data structure that may or may not be + * passed to the callback, depending on the event type that triggered + * the callback. This is so because some events don't carry extra + * context with them, but others do. + * + * The event type @p type to trigger the function may be one of + * #EVAS_CALLBACK_RENDER_FLUSH_PRE, #EVAS_CALLBACK_RENDER_FLUSH_POST, + * #EVAS_CALLBACK_CANVAS_FOCUS_IN, #EVAS_CALLBACK_CANVAS_FOCUS_OUT, + * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN and + * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT. This determines the kind of + * event that will trigger the callback to be called. Only the last + * two of the event types listed here provide useful event information + * data -- a pointer to the recently focused Evas object. For the + * others the @p event_info pointer is going to be @c NULL. + * + * Example: + * @dontinclude evas-events.c + * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_RENDER_FLUSH_PRE + * @until two canvas event callbacks + * + * Looking to the callbacks registered above, + * @dontinclude evas-events.c + * @skip called when our rectangle gets focus + * @until let's have our events back + * + * we see that the canvas flushes its rendering pipeline + * (#EVAS_CALLBACK_RENDER_FLUSH_PRE) whenever the @c _resize_cb + * routine takes place: it has to redraw that image at a different + * size. Also, the callback on an object being focused comes just + * after we focus it explicitly, on code. + * + * See the full @ref Example_Evas_Events "example". + * + * @note Be careful not to add the same callback multiple times, if + * that's not what you want, because Evas won't check if a callback + * existed before exactly as the one being registered (and thus, call + * it more than once on the event, in this case). This would make + * sense if you passed different functions and/or callback data, only. + */ +EAPI void evas_event_callback_add (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); + +/** + * Add (register) a callback function to a given canvas event with a + * non-default priority set. Except for the priority field, it's exactly the + * same as @ref evas_event_callback_add + * + * @param e Canvas to attach a callback to + * @param type The type of event that will trigger the callback + * @param priority The priority of the callback, lower values called first. + * @param func The (callback) function to be called when the event is + * triggered + * @param data The data pointer to be passed to @p func + * + * @see evas_event_callback_add + * @since 1.1.0 + */ +EAPI void evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 4); + +/** + * Delete a callback function from the canvas. + * + * @param e Canvas to remove a callback from + * @param type The type of event that was triggering the callback + * @param func The function that was to be called when the event was triggered + * @return The data pointer that was to be passed to the callback + * + * This function removes the most recently added callback from the + * canvas @p e which was triggered by the event type @p type and was + * calling the function @p func when triggered. If the removal is + * successful it will also return the data pointer that was passed to + * evas_event_callback_add() when the callback was added to the + * canvas. If not successful NULL will be returned. + * + * Example: + * @code + * extern Evas *e; + * void *my_data; + * void focus_in_callback(void *data, Evas *e, void *event_info); + * + * my_data = evas_event_callback_del(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback); + * @endcode + */ +EAPI void *evas_event_callback_del (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3); + +/** + * Delete (unregister) a callback function registered to a given + * canvas event. + * + * @param e Canvas to remove an event callback from + * @param type The type of event that was triggering the callback + * @param func The function that was to be called when the event was + * triggered + * @param data The data pointer that was to be passed to the callback + * @return The data pointer that was to be passed to the callback + * + * This function removes the first added callback from the + * canvas @p e matching the event type @p type, the registered + * function pointer @p func and the callback data pointer @p data. If + * the removal is successful it will also return the data pointer that + * was passed to evas_event_callback_add() (that will be the same as + * the parameter) when the callback(s) was(were) added to the + * canvas. If not successful @c NULL will be returned. A common use + * would be to remove an exact match of a callback. + * + * Example: + * @dontinclude evas-events.c + * @skip evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, + * @until _object_focus_in_cb, NULL); + * + * See the full @ref Example_Evas_Events "example". + * + * @note For deletion of canvas events callbacks filtering by just + * type and function pointer, user evas_event_callback_del(). + */ +EAPI void *evas_event_callback_del_full (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); + +/** + * Push a callback on the post-event callback stack + * + * @param e Canvas to push the callback on + * @param func The function that to be called when the stack is unwound + * @param data The data pointer to be passed to the callback + * + * Evas has a stack of callbacks that get called after all the callbacks for + * an event have triggered (all the objects it triggers on and al the callbacks + * in each object triggered). When all these have been called, the stack is + * unwond from most recently to least recently pushed item and removed from the + * stack calling the callback set for it. + * + * This is intended for doing reverse logic-like processing, example - when a + * child object that happens to get the event later is meant to be able to + * "steal" functions from a parent and thus on unwind of this stack hav its + * function called first, thus being able to set flags, or return 0 from the + * post-callback that stops all other post-callbacks in the current stack from + * being called (thus basically allowing a child to take control, if the event + * callback prepares information ready for taking action, but the post callback + * actually does the action). + * + */ +EAPI void evas_post_event_callback_push (Evas *e, Evas_Object_Event_Post_Cb func, const void *data); + +/** + * Remove a callback from the post-event callback stack + * + * @param e Canvas to push the callback on + * @param func The function that to be called when the stack is unwound + * + * This removes a callback from the stack added with + * evas_post_event_callback_push(). The first instance of the function in + * the callback stack is removed from being executed when the stack is + * unwound. Further instances may still be run on unwind. + */ +EAPI void evas_post_event_callback_remove (Evas *e, Evas_Object_Event_Post_Cb func); + +/** + * Remove a callback from the post-event callback stack + * + * @param e Canvas to push the callback on + * @param func The function that to be called when the stack is unwound + * @param data The data pointer to be passed to the callback + * + * This removes a callback from the stack added with + * evas_post_event_callback_push(). The first instance of the function and data + * in the callback stack is removed from being executed when the stack is + * unwound. Further instances may still be run on unwind. + */ +EAPI void evas_post_event_callback_remove_full (Evas *e, Evas_Object_Event_Post_Cb func, const void *data); + +/** + * @defgroup Evas_Event_Freezing_Group Input Events Freezing Functions + * + * Functions that deal with the freezing of input event processing of + * an Evas canvas. + * + * There might be scenarios during a graphical user interface + * program's use when the developer whishes the users wouldn't be able + * to deliver input events to this application. It may, for example, + * be the time for it to populate a view or to change some + * layout. Assuming proper behavior with user interaction during this + * exact time would be hard, as things are in a changing state. The + * programmer can then tell the canvas to ignore input events, + * bringing it back to normal behavior when he/she wants. + * + * Some of the funcions in this group are exemplified @ref + * Example_Evas_Events "here". + * + * @ingroup Evas_Canvas_Events + */ + +/** + * @addtogroup Evas_Event_Freezing_Group + * @{ + */ + +/** + * Freeze all input events processing. + * + * @param e The canvas to freeze input events processing on. + * + * This function will indicate to Evas that the canvas @p e is to have + * all input event processing frozen until a matching + * evas_event_thaw() function is called on the same canvas. All events + * of this kind during the freeze will get @b discarded. Every freeze + * call must be matched by a thaw call in order to completely thaw out + * a canvas (i.e. these calls may be nested). The most common use is + * when you don't want the user to interect with your user interface + * when you're populating a view or changing the layout. + * + * Example: + * @dontinclude evas-events.c + * @skip freeze input for 3 seconds + * @until } + * @dontinclude evas-events.c + * @skip let's have our events back + * @until } + * + * See the full @ref Example_Evas_Events "example". + * + * If you run that example, you'll see the canvas ignoring all input + * events for 3 seconds, when the "f" key is pressed. In a more + * realistic code we would be freezing while a toolkit or Edje was + * doing some UI changes, thawing it back afterwards. + */ +EAPI void evas_event_freeze (Evas *e) EINA_ARG_NONNULL(1); + +/** + * Thaw a canvas out after freezing (for input events). + * + * @param e The canvas to thaw out. + * + * This will thaw out a canvas after a matching evas_event_freeze() + * call. If this call completely thaws out a canvas, i.e., there's no + * other unbalanced call to evas_event_freeze(), events will start to + * be processed again, but any "missed" events will @b not be + * evaluated. + * + * See evas_event_freeze() for an example. + */ +EAPI void evas_event_thaw (Evas *e) EINA_ARG_NONNULL(1); + +/** + * Return the freeze count on input events of a given canvas. + * + * @param e The canvas to fetch the freeze count from. + * + * This returns the number of times the canvas has been told to freeze + * input events. It is possible to call evas_event_freeze() multiple + * times, and these must be matched by evas_event_thaw() calls. This + * call allows the program to discover just how many times things have + * been frozen in case it may want to break out of a deep freeze state + * where the count is high. + * + * Example: + * @code + * extern Evas *evas; + * + * while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas); + * @endcode + * + */ +EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * After thaw of a canvas, re-evaluate the state of objects and call callbacks + * + * @param e The canvas to evaluate after a thaw + * + * This is normally called after evas_event_thaw() to re-evaluate mouse + * containment and other states and thus also call callbacks for mouse in and + * out on new objects if the state change demands it. + */ +EAPI void evas_event_thaw_eval (Evas *e) EINA_ARG_NONNULL(1); + +/** + * @} + */ + +/** + * @defgroup Evas_Event_Feeding_Group Input Events Feeding Functions + * + * Functions to tell Evas that input events happened and should be + * processed. + * + * As explained in @ref intro_not_evas, Evas does not know how to poll + * for input events, so the developer should do it and then feed such + * events to the canvas to be processed. This is only required if + * operating Evas directly. Modules such as Ecore_Evas do that for + * you. + * + * Some of the funcions in this group are exemplified @ref + * Example_Evas_Events "here". + * + * @ingroup Evas_Canvas_Events + */ + +/** + * @addtogroup Evas_Event_Feeding_Group + * @{ + */ + +/** + * Mouse down event feed. + * + * @param e The given canvas pointer. + * @param b The button number. + * @param flags The evas button flags. + * @param timestamp The timestamp of the mouse down event. + * @param data The data for canvas. + * + * This function will set some evas properties that is necessary when + * the mouse button is pressed. It prepares information to be treated + * by the callback function. + * + */ +EAPI void evas_event_feed_mouse_down (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + +/** + * Mouse up event feed. + * + * @param e The given canvas pointer. + * @param b The button number. + * @param flags evas button flags. + * @param timestamp The timestamp of the mouse up event. + * @param data The data for canvas. + * + * This function will set some evas properties that is necessary when + * the mouse button is released. It prepares information to be treated + * by the callback function. + * + */ +EAPI void evas_event_feed_mouse_up (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + +/** + * Mouse move event feed. + * + * @param e The given canvas pointer. + * @param x The horizontal position of the mouse pointer. + * @param y The vertical position of the mouse pointer. + * @param timestamp The timestamp of the mouse up event. + * @param data The data for canvas. + * + * This function will set some evas properties that is necessary when + * the mouse is moved from its last position. It prepares information + * to be treated by the callback function. + * + */ +EAPI void evas_event_feed_mouse_move (Evas *e, int x, int y, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + +/** + * Mouse in event feed. + * + * @param e The given canvas pointer. + * @param timestamp The timestamp of the mouse up event. + * @param data The data for canvas. + * + * This function will set some evas properties that is necessary when + * the mouse in event happens. It prepares information to be treated + * by the callback function. + * + */ +EAPI void evas_event_feed_mouse_in (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + +/** + * Mouse out event feed. + * + * @param e The given canvas pointer. + * @param timestamp Timestamp of the mouse up event. + * @param data The data for canvas. + * + * This function will set some evas properties that is necessary when + * the mouse out event happens. It prepares information to be treated + * by the callback function. + * + */ +EAPI void evas_event_feed_mouse_out (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + EAPI void evas_event_feed_multi_down (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data); + EAPI void evas_event_feed_multi_up (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data); + EAPI void evas_event_feed_multi_move (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data); + +/** + * Mouse cancel event feed. + * + * @param e The given canvas pointer. + * @param timestamp The timestamp of the mouse up event. + * @param data The data for canvas. + * + * This function will call evas_event_feed_mouse_up() when a + * mouse cancel event happens. + * + */ +EAPI void evas_event_feed_mouse_cancel (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + +/** + * Mouse wheel event feed. + * + * @param e The given canvas pointer. + * @param direction The wheel mouse direction. + * @param z How much mouse wheel was scrolled up or down. + * @param timestamp The timestamp of the mouse up event. + * @param data The data for canvas. + * + * This function will set some evas properties that is necessary when + * the mouse wheel is scrolled up or down. It prepares information to + * be treated by the callback function. + * + */ +EAPI void evas_event_feed_mouse_wheel (Evas *e, int direction, int z, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + +/** + * Key down event feed + * + * @param e The canvas to thaw out + * @param keyname Name of the key + * @param key The key pressed. + * @param string A String + * @param compose The compose string + * @param timestamp Timestamp of the mouse up event + * @param data Data for canvas. + * + * This function will set some evas properties that is necessary when + * a key is pressed. It prepares information to be treated by the + * callback function. + * + */ +EAPI void evas_event_feed_key_down (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + +/** + * Key up event feed + * + * @param e The canvas to thaw out + * @param keyname Name of the key + * @param key The key released. + * @param string string + * @param compose compose + * @param timestamp Timestamp of the mouse up event + * @param data Data for canvas. + * + * This function will set some evas properties that is necessary when + * a key is released. It prepares information to be treated by the + * callback function. + * + */ +EAPI void evas_event_feed_key_up (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + +/** + * Hold event feed + * + * @param e The given canvas pointer. + * @param hold The hold. + * @param timestamp The timestamp of the mouse up event. + * @param data The data for canvas. + * + * This function makes the object to stop sending events. + * + */ +EAPI void evas_event_feed_hold (Evas *e, int hold, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); + +/** + * Re feed event. + * + * @param e The given canvas pointer. + * @param event_copy the event to refeed + * @param event_type Event type + * + * This function re-feeds the event pointed by event_copy + * + * This function call evas_event_feed_* functions, so it can + * cause havoc if not used wisely. Please use it responsibly. + */ +EAPI void evas_event_refeed_event (Evas *e, void *event_copy, Evas_Callback_Type event_type) EINA_ARG_NONNULL(1); + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @defgroup Evas_Image_Group Image Functions + * + * Functions that deals with images at canvas level. + * + * @ingroup Evas_Canvas + */ + +/** + * @addtogroup Evas_Image_Group + * @{ + */ + +/** + * Flush the image cache of the canvas. + * + * @param e The given evas pointer. + * + * This function flushes image cache of canvas. + * + */ +EAPI void evas_image_cache_flush (Evas *e) EINA_ARG_NONNULL(1); + +/** + * Reload the image cache + * + * @param e The given evas pointer. + * + * This function reloads the image cache of canvas. + * + */ +EAPI void evas_image_cache_reload (Evas *e) EINA_ARG_NONNULL(1); + +/** + * Set the image cache. + * + * @param e The given evas pointer. + * @param size The cache size. + * + * This function sets the image cache of canvas in bytes. + * + */ +EAPI void evas_image_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1); + +/** + * Get the image cache + * + * @param e The given evas pointer. + * + * This function returns the image cache size of canvas in bytes. + * + */ +EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Get the maximum image size evas can possibly handle + * + * @param e The given evas pointer. + * @param maxw Pointer to hold the return value in pixels of the maxumum width + * @param maxh Pointer to hold the return value in pixels of the maximum height + * + * This function returns the larges image or surface size that evas can handle + * in pixels, and if there is one, returns EINA_TRUE. It returns EINA_FALSE + * if no extra constraint on maximum image size exists. You still should + * check the return values of @p maxw and @p maxh as there may still be a + * limit, just a much higher one. + * + * @since 1.1 + */ +EAPI Eina_Bool evas_image_max_size_get (const Evas *e, int *maxw, int *maxh) EINA_ARG_NONNULL(1); + +/** + * @} + */ + +/** + * @defgroup Evas_Font_Group Font Functions + * + * Functions that deals with fonts. + * + * @ingroup Evas_Canvas + */ + +/** + * Changes the font hinting for the given evas. + * + * @param e The given evas. + * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE, + * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. + * @ingroup Evas_Font_Group + */ +EAPI void evas_font_hinting_set (Evas *e, Evas_Font_Hinting_Flags hinting) EINA_ARG_NONNULL(1); + +/** + * Retrieves the font hinting used by the given evas. + * + * @param e The given evas to query. + * @return The hinting in use, one of #EVAS_FONT_HINTING_NONE, + * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. + * @ingroup Evas_Font_Group + */ +EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Checks if the font hinting is supported by the given evas. + * + * @param e The given evas to query. + * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE, + * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. + * @return @c EINA_TRUE if it is supported, @c EINA_FALSE otherwise. + * @ingroup Evas_Font_Group + */ +EAPI Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Force the given evas and associated engine to flush its font cache. + * + * @param e The given evas to flush font cache. + * @ingroup Evas_Font_Group + */ +EAPI void evas_font_cache_flush (Evas *e) EINA_ARG_NONNULL(1); + +/** + * Changes the size of font cache of the given evas. + * + * @param e The given evas to flush font cache. + * @param size The size, in bytes. + * + * @ingroup Evas_Font_Group + */ +EAPI void evas_font_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1); + +/** + * Changes the size of font cache of the given evas. + * + * @param e The given evas to flush font cache. + * @return The size, in bytes. + * + * @ingroup Evas_Font_Group + */ +EAPI int evas_font_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * List of available font descriptions known or found by this evas. + * + * The list depends on Evas compile time configuration, such as + * fontconfig support, and the paths provided at runtime as explained + * in @ref Evas_Font_Path_Group. + * + * @param e The evas instance to query. + * @return a newly allocated list of strings. Do not change the + * strings. Be sure to call evas_font_available_list_free() + * after you're done. + * + * @ingroup Evas_Font_Group + */ +EAPI Eina_List *evas_font_available_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Free list of font descriptions returned by evas_font_dir_available_list(). + * + * @param e The evas instance that returned such list. + * @param available the list returned by evas_font_dir_available_list(). + * + * @ingroup Evas_Font_Group + */ +EAPI void evas_font_available_list_free(Evas *e, Eina_List *available) EINA_ARG_NONNULL(1); + +/** + * @defgroup Evas_Font_Path_Group Font Path Functions + * + * Functions that edit the paths being used to load fonts. + * + * @ingroup Evas_Font_Group + */ + +/** + * Removes all font paths loaded into memory for the given evas. + * @param e The given evas. + * @ingroup Evas_Font_Path_Group + */ +EAPI void evas_font_path_clear (Evas *e) EINA_ARG_NONNULL(1); + +/** + * Appends a font path to the list of font paths used by the given evas. + * @param e The given evas. + * @param path The new font path. + * @ingroup Evas_Font_Path_Group + */ +EAPI void evas_font_path_append (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2); + +/** + * Prepends a font path to the list of font paths used by the given evas. + * @param e The given evas. + * @param path The new font path. + * @ingroup Evas_Font_Path_Group + */ +EAPI void evas_font_path_prepend (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2); + +/** + * Retrieves the list of font paths used by the given evas. + * @param e The given evas. + * @return The list of font paths used. + * @ingroup Evas_Font_Path_Group + */ +EAPI const Eina_List *evas_font_path_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @defgroup Evas_Object_Group Generic Object Functions + * + * Functions that manipulate generic Evas objects. + * + * All Evas displaying units are Evas objects. One handles them all by + * means of the handle ::Evas_Object. Besides Evas treats their + * objects equally, they have @b types, which define their specific + * behavior (and individual API). + * + * Evas comes with a set of built-in object types: + * - rectangle, + * - line, + * - polygon, + * - text, + * - textblock and + * - image. + * + * These functions apply to @b any Evas object, whichever type thay + * may have. + * + * @note The built-in types which are most used are rectangles, text + * and images. In fact, with these ones one can create 2D interfaces + * of arbitrary complexity and EFL makes it easy. + */ + +/** + * @defgroup Evas_Object_Group_Basic Basic Object Manipulation + * + * Methods that are broadly used, like those that change the color, + * clippers and geometry of an Evas object. + * + * An example on the most used functions in this group can be seen @ref + * Example_Evas_Object_Manipulation "here". + * + * For function dealing with stacking, the examples are gathered @ref + * Example_Evas_Stacking "here". + * + * @ingroup Evas_Object_Group + */ + +/** + * @addtogroup Evas_Object_Group_Basic + * @{ + */ + +/** + * Clip one object to another. + * + * @param obj The object to be clipped + * @param clip The object to clip @p obj by + * + * This function will clip the object @p obj to the area occupied by + * the object @p clip. This means the object @p obj will only be + * visible within the area occupied by the clipping object (@p clip). + * + * The color of the object being clipped will be multiplied by the + * color of the clipping one, so the resulting color for the former + * will be RESULT = (OBJ * CLIP) / (255 * 255), per color + * element (red, green, blue and alpha). + * + * Clipping is recursive, so clipping objects may be clipped by + * others, and their color will in term be multiplied. You may @b not + * set up circular clipping lists (i.e. object 1 clips object 2, which + * clips object 1): the behavior of Evas is undefined in this case. + * + * Objects which do not clip others are visible in the canvas as + * normal; those that clip one or more objects become invisible + * themselves, only affecting what they clip. If an object ceases + * to have other objects being clipped by it, it will become visible + * again. + * + * The visibility of an object affects the objects that are clipped by + * it, so if the object clipping others is not shown (as in + * evas_object_show()), the objects clipped by it will not be shown + * either. + * + * If @p obj was being clipped by another object when this function is + * called, it gets implicitly removed from the old clipper's domain + * and is made now to be clipped by its new clipper. + * + * The following figure illustrates some clipping in Evas: + * + * @image html clipping.png + * @image rtf clipping.png + * @image latex clipping.eps + * + * @note At the moment the only objects that can validly be used to + * clip other objects are rectangle objects. All other object + * types are invalid and the result of using them is undefined. The + * clip object @p clip must be a valid object, but can also be @c + * NULL, in which case the effect of this function is the same as + * calling evas_object_clip_unset() on the @p obj object. + * + * Example: + * @dontinclude evas-object-manipulation.c + * @skip solid white clipper (note that it's the default color for a + * @until evas_object_show(d.clipper); + * + * See the full @ref Example_Evas_Object_Manipulation "example". + */ +EAPI void evas_object_clip_set (Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2); + +/** + * Get the object clipping @p obj (if any). + * + * @param obj The object to get the clipper from + * + * This function returns the object clipping @p obj. If @p obj is + * not being clipped at all, @c NULL is returned. The object @p obj + * must be a valid ::Evas_Object. + * + * See also evas_object_clip_set(), evas_object_clip_unset() and + * evas_object_clipees_get(). + * + * Example: + * @dontinclude evas-object-manipulation.c + * @skip if (evas_object_clip_get(d.img) == d.clipper) + * @until return + * + * See the full @ref Example_Evas_Object_Manipulation "example". + */ +EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Disable/cease clipping on a clipped @p obj object. + * + * @param obj The object to cease clipping on + * + * This function disables clipping for the object @p obj, if it was + * already clipped, i.e., its visibility and color get detached from + * the previous clipper. If it wasn't, this has no effect. The object + * @p obj must be a valid ::Evas_Object. + * + * See also evas_object_clip_set() (for an example), + * evas_object_clipees_get() and evas_object_clip_get(). + * + */ +EAPI void evas_object_clip_unset (Evas_Object *obj); + +/** + * Return a list of objects currently clipped by @p obj. + * + * @param obj The object to get a list of clippees from + * @return a list of objects being clipped by @p obj + * + * This returns the internal list handle that contains all objects + * clipped by the object @p obj. If none are clipped by it, the call + * returns @c NULL. This list is only valid until the clip list is + * changed and should be fetched again with another call to + * evas_object_clipees_get() if any objects being clipped by this + * object are unclipped, clipped by a new object, deleted or get the + * clipper deleted. These operations will invalidate the list + * returned, so it should not be used anymore after that point. Any + * use of the list after this may have undefined results, possibly + * leading to crashes. The object @p obj must be a valid + * ::Evas_Object. + * + * See also evas_object_clip_set(), evas_object_clip_unset() and + * evas_object_clip_get(). + * + * Example: + * @code + * extern Evas_Object *obj; + * Evas_Object *clipper; + * + * clipper = evas_object_clip_get(obj); + * if (clipper) + * { + * Eina_List *clippees, *l; + * Evas_Object *obj_tmp; + * + * clippees = evas_object_clipees_get(clipper); + * printf("Clipper clips %i objects\n", eina_list_count(clippees)); + * EINA_LIST_FOREACH(clippees, l, obj_tmp) + * evas_object_show(obj_tmp); + * } + * @endcode + */ +EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Sets or unsets a given object as the currently focused one on its + * canvas. + * + * @param obj The object to be focused or unfocused. + * @param focus @c EINA_TRUE, to set it as focused or @c EINA_FALSE, + * to take away the focus from it. + * + * Changing focus only affects where (key) input events go. There can + * be only one object focused at any time. If @p focus is @c + * EINA_TRUE, @p obj will be set as the currently focused object and + * it will receive all keyboard events that are not exclusive key + * grabs on other objects. + * + * Example: + * @dontinclude evas-events.c + * @skip evas_object_focus_set + * @until evas_object_focus_set + * + * See the full example @ref Example_Evas_Events "here". + * + * @see evas_object_focus_get + * @see evas_focus_get + * @see evas_object_key_grab + * @see evas_object_key_ungrab + */ +EAPI void evas_object_focus_set (Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1); + +/** + * Retrieve whether an object has the focus. + * + * @param obj The object to retrieve focus information from. + * @return @c EINA_TRUE if the object has the focus, @c EINA_FALSE + * otherwise. + * + * If the passed object is the currently focused one, @c EINA_TRUE is + * returned. @c EINA_FALSE is returned, otherwise. + * + * Example: + * @dontinclude evas-events.c + * @skip And again + * @until something is bad + * + * See the full example @ref Example_Evas_Events "here". + * + * @see evas_object_focus_set + * @see evas_focus_get + * @see evas_object_key_grab + * @see evas_object_key_ungrab + */ +EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Sets the layer of the its canvas that the given object will be part + * of. + * + * @param obj The given Evas object. + * @param l The number of the layer to place the object on. + * Must be between #EVAS_LAYER_MIN and #EVAS_LAYER_MAX. + * + * If you don't use this function, you'll be dealing with an @b unique + * layer of objects, the default one. Additional layers are handy when + * you don't want a set of objects to interfere with another set with + * regard to @b stacking. Two layers are completely disjoint in that + * matter. + * + * This is a low-level function, which you'd be using when something + * should be always on top, for example. + * + * @warning Be careful, it doesn't make sense to change the layer of + * smart objects' children. Smart objects have a layer of their own, + * which should contain all their children objects. + * + * @see evas_object_layer_get() + */ +EAPI void evas_object_layer_set (Evas_Object *obj, short l) EINA_ARG_NONNULL(1); + +/** + * Retrieves the layer of its canvas that the given object is part of. + * + * @param obj The given Evas object to query layer from + * @return Number of the its layer + * + * @see evas_object_layer_set() + */ +EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Sets the name of the given Evas object to the given name. + * + * @param obj The given object. + * @param name The given name. + * + * There might be occasions where one would like to name his/her + * objects. + * + * Example: + * @dontinclude evas-events.c + * @skip d.bg = evas_object_rectangle_add(d.canvas); + * @until evas_object_name_set(d.bg, "our dear rectangle"); + * + * See the full @ref Example_Evas_Events "example". + */ +EAPI void evas_object_name_set (Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1); + +/** + * Retrieves the name of the given Evas object. + * + * @param obj The given object. + * @return The name of the object or @c NULL, if no name has been given + * to it. + * + * Example: + * @dontinclude evas-events.c + * @skip fprintf(stdout, "An object got focused: %s\n", + * @until evas_focus_get + * + * See the full @ref Example_Evas_Events "example". + */ +EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Increments object reference count to defer its deletion. + * + * @param obj The given Evas object to reference + * + * This increments the reference count of an object, which if greater + * than 0 will defer deletion by evas_object_del() until all + * references are released back (counter back to 0). References cannot + * go below 0 and unreferencing past that will result in the reference + * count being limited to 0. References are limited to 2^32 - 1 + * for an object. Referencing it more than this will result in it + * being limited to this value. + * + * @see evas_object_unref() + * @see evas_object_del() + * + * @note This is a very simple reference counting mechanism! For + * instance, Evas is not ready to check for pending references on a + * canvas deletion, or things like that. This is useful on scenarios + * where, inside a code block, callbacks exist which would possibly + * delete an object we are operating on afterwards. Then, one would + * evas_object_ref() it on the beginning of the block and + * evas_object_unref() it on the end. It would then be deleted at this + * point, if it should be. + * + * Example: + * @code + * evas_object_ref(obj); + * + * // action here... + * evas_object_smart_callback_call(obj, SIG_SELECTED, NULL); + * // more action here... + * evas_object_unref(obj); + * @endcode + * + * @ingroup Evas_Object_Group_Basic + * @since 1.1.0 + */ +EAPI void evas_object_ref (Evas_Object *obj); + +/** + * Decrements object reference count. + * + * @param obj The given Evas object to unreference + * + * This decrements the reference count of an object. If the object has + * had evas_object_del() called on it while references were more than + * 0, it will be deleted at the time this function is called and puts + * the counter back to 0. See evas_object_ref() for more information. + * + * @see evas_object_ref() (for an example) + * @see evas_object_del() + * + * @ingroup Evas_Object_Group_Basic + * @since 1.1.0 + */ +EAPI void evas_object_unref (Evas_Object *obj); + + +/** + * Marks the given Evas object for deletion (when Evas will free its + * memory). + * + * @param obj The given Evas object. + * + * This call will mark @p obj for deletion, which will take place + * whenever it has no more references to it (see evas_object_ref() and + * evas_object_unref()). + * + * At actual deletion time, which may or may not be just after this + * call, ::EVAS_CALLBACK_DEL and ::EVAS_CALLBACK_FREE callbacks will + * be called. If the object currently had the focus, its + * ::EVAS_CALLBACK_FOCUS_OUT callback will also be called. + * + * @see evas_object_ref() + * @see evas_object_unref() + * + * @ingroup Evas_Object_Group_Basic + */ +EAPI void evas_object_del (Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Move the given Evas object to the given location inside its + * canvas' viewport. + * + * @param obj The given Evas object. + * @param x X position to move the object to, in canvas units. + * @param y Y position to move the object to, in canvas units. + * + * Besides being moved, the object's ::EVAS_CALLBACK_MOVE callback + * will be called. + * + * @note Naturally, newly created objects are placed at the canvas' + * origin: 0, 0. + * + * Example: + * @dontinclude evas-object-manipulation.c + * @skip evas_object_image_border_set(d.clipper_border, 3, 3, 3, 3); + * @until evas_object_show + * + * See the full @ref Example_Evas_Object_Manipulation "example". + * + * @ingroup Evas_Object_Group_Basic + */ +EAPI void evas_object_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); + +/** + * Changes the size of the given Evas object. + * + * @param obj The given Evas object. + * @param w The new width of the Evas object. + * @param h The new height of the Evas object. + * + * Besides being resized, the object's ::EVAS_CALLBACK_RESIZE callback + * will be called. + * + * @note Newly created objects have zeroed dimensions. Then, you most + * probably want to use evas_object_resize() on them after they are + * created. + * + * @note Be aware that resizing an object changes its drawing area, + * but that does imply the object is rescaled! For instance, images + * are filled inside their drawing area using the specifications of + * evas_object_image_fill_set(). Thus to scale the image to match + * exactly your drawing area, you need to change the + * evas_object_image_fill_set() as well. + * + * @note This is more evident in images, but text, textblock, lines + * and polygons will behave similarly. Check their specific APIs to + * know how to achieve your desired behavior. Consider the following + * example: + * + * @code + * // rescale image to fill exactly its area without tiling: + * evas_object_resize(img, w, h); + * evas_object_image_fill_set(img, 0, 0, w, h); + * @endcode + * + * @ingroup Evas_Object_Group_Basic + */ +EAPI void evas_object_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + +/** + * Retrieves the position and (rectangular) size of the given Evas + * object. + * + * @param obj The given Evas object. + * @param x Pointer to an integer in which to store the X coordinate + * of the object. + * @param y Pointer to an integer in which to store the Y coordinate + * of the object. + * @param w Pointer to an integer in which to store the width of the + * object. + * @param h Pointer to an integer in which to store the height of the + * object. + * + * The position, naturally, will be relative to the top left corner of + * the canvas' viewport. + * + * @note Use @c NULL pointers on the geometry components you're not + * interested in: they'll be ignored by the function. + * + * Example: + * @dontinclude evas-events.c + * @skip int w, h, cw, ch; + * @until return + * + * See the full @ref Example_Evas_Events "example". + * + * @ingroup Evas_Object_Group_Basic + */ +EAPI void evas_object_geometry_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + + +/** + * Makes the given Evas object visible. + * + * @param obj The given Evas object. + * + * Besides becoming visible, the object's ::EVAS_CALLBACK_SHOW + * callback will be called. + * + * @see evas_object_hide() for more on object visibility. + * @see evas_object_visible_get() + * + * @ingroup Evas_Object_Group_Basic + */ +EAPI void evas_object_show (Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Makes the given Evas object invisible. + * + * @param obj The given Evas object. + * + * Hidden objects, besides not being shown at all in your canvas, + * won't be checked for changes on the canvas rendering + * process. Furthermore, they will not catch input events. Thus, they + * are much ligher (in processing needs) than an object that is + * invisible due to indirect causes, such as being clipped or out of + * the canvas' viewport. + * + * Besides becoming hidden, @p obj object's ::EVAS_CALLBACK_SHOW + * callback will be called. + * + * @note All objects are created in the hidden state! If you want them + * shown, use evas_object_show() after their creation. + * + * @see evas_object_show() + * @see evas_object_visible_get() + * + * Example: + * @dontinclude evas-object-manipulation.c + * @skip if (evas_object_visible_get(d.clipper)) + * @until return + * + * See the full @ref Example_Evas_Object_Manipulation "example". + * + * @ingroup Evas_Object_Group_Basic + */ +EAPI void evas_object_hide (Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Retrieves whether or not the given Evas object is visible. + * + * @param obj The given Evas object. + * @return @c EINA_TRUE if the object is visible, @c EINA_FALSE + * otherwise. + * + * This retrieves an object's visibily as the one enforced by + * evas_object_show() and evas_object_hide(). + * + * @note The value returned isn't, by any means, influenced by + * clippers covering @obj, it being out of its canvas' viewport or + * stacked below other object. + * + * @see evas_object_show() + * @see evas_object_hide() (for an example) + * + * @ingroup Evas_Object_Group_Basic + */ +EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Sets the general/main color of the given Evas object to the given + * one. + * + * @param obj The given Evas object. + * @param r The red component of the given color. + * @param g The green component of the given color. + * @param b The blue component of the given color. + * @param a The alpha component of the given color. + * + * @see evas_object_color_get() (for an example) + * @note These color values are expected to be premultiplied by @p a. + * + * @ingroup Evas_Object_Group_Basic + */ +EAPI void evas_object_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); + +/** + * Retrieves the general/main color of the given Evas object. + * + * @param obj The given Evas object to retrieve color from. + * @param r Pointer to an integer in which to store the red component + * of the color. + * @param g Pointer to an integer in which to store the green + * component of the color. + * @param b Pointer to an integer in which to store the blue component + * of the color. + * @param a Pointer to an integer in which to store the alpha + * component of the color. + * + * Retrieves the “main” color's RGB component (and alpha channel) + * values, which range from 0 to 255. For the alpha channel, + * which defines the object's transparency level, 0 means totally + * trasparent, while 255 means opaque. These color values are + * premultiplied by the alpha value. + * + * Usually you’ll use this attribute for text and rectangle objects, + * where the “main” color is their unique one. If set for objects + * which themselves have colors, like the images one, those colors get + * modulated by this one. + * + * @note All newly created Evas rectangles get the default color + * values of 255 255 255 255 (opaque white). + * + * @note Use @c NULL pointers on the components you're not interested + * in: they'll be ignored by the function. + * + * Example: + * @dontinclude evas-object-manipulation.c + * @skip int alpha, r, g, b; + * @until return + * + * See the full @ref Example_Evas_Object_Manipulation "example". + * + * @ingroup Evas_Object_Group_Basic + */ +EAPI void evas_object_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); + + +/** + * Retrieves the Evas canvas that the given object lives on. + * + * @param obj The given Evas object. + * @return A pointer to the canvas where the object is on. + * + * This function is most useful at code contexts where you need to + * operate on the canvas but have only the object pointer. + * + * @ingroup Evas_Object_Group_Basic + */ +EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Retrieves the type of the given Evas object. + * + * @param obj The given object. + * @return The type of the object. + * + * For Evas' builtin types, the return strings will be one of: + * - "rectangle", + * - "line", + * - "polygon", + * - "text", + * - "textblock" and + * - "image". + * + * For Evas smart objects (see @ref Evas_Smart_Group), the name of the + * smart class itself is returned on this call. For the built-in smart + * objects, these names are: + * - "EvasObjectSmartClipped", for the clipped smart object + * - "Evas_Object_Box", for the box object and + * - "Evas_Object_Table", for the table object. + * + * Example: + * @dontinclude evas-object-manipulation.c + * @skip d.img = evas_object_image_filled_add(d.canvas); + * @until border on the + * + * See the full @ref Example_Evas_Object_Manipulation "example". + */ +EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Raise @p obj to the top of its layer. + * + * @param obj the object to raise + * + * @p obj will, then, be the highest one in the layer it belongs + * to. Object on other layers won't get touched. + * + * @see evas_object_stack_above() + * @see evas_object_stack_below() + * @see evas_object_lower() + */ +EAPI void evas_object_raise (Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Lower @p obj to the bottom of its layer. + * + * @param obj the object to lower + * + * @p obj will, then, be the lowest one in the layer it belongs + * to. Objects on other layers won't get touched. + * + * @see evas_object_stack_above() + * @see evas_object_stack_below() + * @see evas_object_raise() + */ +EAPI void evas_object_lower (Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Stack @p obj immediately above @p above + * + * @param obj the object to stack + * @param above the object above which to stack + * + * Objects, in a given canvas, are stacked in the order they get added + * to it. This means that, if they overlap, the highest ones will + * cover the lowest ones, in that order. This function is a way to + * change the stacking order for the objects. + * + * This function is intended to be used with objects belonging to + * the same layer in a given canvas, otherwise it will fail (and + * accomplish nothing). + * + * If you have smart objects on your canvas and @p obj is a member of + * one of them, then @p above must also be a member of the same + * smart object. + * + * Similarly, if @p obj is not a member of a smart object, @p above + * must not be either. + * + * @see evas_object_layer_get() + * @see evas_object_layer_set() + * @see evas_object_stack_below() + */ +EAPI void evas_object_stack_above (Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2); + +/** + * Stack @p obj immediately below @p below + * + * @param obj the object to stack + * @param below the object below which to stack + * + * Objects, in a given canvas, are stacked in the order they get added + * to it. This means that, if they overlap, the highest ones will + * cover the lowest ones, in that order. This function is a way to + * change the stacking order for the objects. + * + * This function is intended to be used with objects belonging to + * the same layer in a given canvas, otherwise it will fail (and + * accomplish nothing). + * + * If you have smart objects on your canvas and @p obj is a member of + * one of them, then @p below must also be a member of the same + * smart object. + * + * Similarly, if @p obj is not a member of a smart object, @p below + * must not be either. + * + * @see evas_object_layer_get() + * @see evas_object_layer_set() + * @see evas_object_stack_below() + */ +EAPI void evas_object_stack_below (Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2); + +/** + * Get the Evas object stacked right above @p obj + * + * @param obj an #Evas_Object + * @return the #Evas_Object directly above @p obj, if any, or @c NULL, + * if none + * + * This function will traverse layers in its search, if there are + * objects on layers above the one @p obj is placed at. + * + * @see evas_object_layer_get() + * @see evas_object_layer_set() + * @see evas_object_below_get() + * + */ +EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Get the Evas object stacked right below @p obj + * + * @param obj an #Evas_Object + * @return the #Evas_Object directly below @p obj, if any, or @c NULL, + * if none + * + * This function will traverse layers in its search, if there are + * objects on layers below the one @p obj is placed at. + * + * @see evas_object_layer_get() + * @see evas_object_layer_set() + * @see evas_object_below_get() + */ +EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @} + */ + +/** + * @defgroup Evas_Object_Group_Events Object Events + * + * Objects generate events when they are moved, resized, when their + * visibility change, when they are deleted and so on. These methods + * allow one to be notified about and to handle such events. + * + * Objects also generate events on input (keyboard and mouse), if they + * accept them (are visible, focused, etc). + * + * For each of those events, Evas provides a way for one to register + * callback functions to be issued just after they happen. + * + * The following figure illustrates some Evas (event) callbacks: + * + * @image html evas-callbacks.png + * @image rtf evas-callbacks.png + * @image latex evas-callbacks.eps + * + * Thees events have their values in the #Evas_Callback_Type + * enumeration, which has also ones happening on the canvas level (se + * #Evas_Canvas_Events). + * + * Examples on this group of functions can be found @ref + * Example_Evas_Stacking "here" and @ref Example_Evas_Events "here". + * + * @ingroup Evas_Object_Group + */ + +/** + * @addtogroup Evas_Object_Group_Events + * @{ + */ + +/** + * Add (register) a callback function to a given Evas object event. + * + * @param obj Object to attach a callback to + * @param type The type of event that will trigger the callback + * @param func The function to be called when the event is triggered + * @param data The data pointer to be passed to @p func + * + * This function adds a function callback to an object when the event + * of type @p type occurs on object @p obj. The function is @p func. + * + * In the event of a memory allocation error during addition of the + * callback to the object, evas_alloc_error() should be used to + * determine the nature of the error, if any, and the program should + * sensibly try and recover. + * + * A callback function must have the ::Evas_Object_Event_Cb prototype + * definition. The first parameter (@p data) in this definition will + * have the same value passed to evas_object_event_callback_add() as + * the @p data parameter, at runtime. The second parameter @p e is the + * canvas pointer on which the event occurred. The third parameter is + * a pointer to the object on which event occurred. Finally, the + * fourth parameter @p event_info is a pointer to a data structure + * that may or may not be passed to the callback, depending on the + * event type that triggered the callback. This is so because some + * events don't carry extra context with them, but others do. + * + * The event type @p type to trigger the function may be one of + * #EVAS_CALLBACK_MOUSE_IN, #EVAS_CALLBACK_MOUSE_OUT, + * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP, + * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL, + * #EVAS_CALLBACK_MULTI_DOWN, #EVAS_CALLBACK_MULTI_UP, + * #EVAS_CALLBACK_MULTI_MOVE, #EVAS_CALLBACK_FREE, + * #EVAS_CALLBACK_KEY_DOWN, #EVAS_CALLBACK_KEY_UP, + * #EVAS_CALLBACK_FOCUS_IN, #EVAS_CALLBACK_FOCUS_OUT, + * #EVAS_CALLBACK_SHOW, #EVAS_CALLBACK_HIDE, #EVAS_CALLBACK_MOVE, + * #EVAS_CALLBACK_RESIZE, #EVAS_CALLBACK_RESTACK, #EVAS_CALLBACK_DEL, + * #EVAS_CALLBACK_HOLD, #EVAS_CALLBACK_CHANGED_SIZE_HINTS, + * #EVAS_CALLBACK_IMAGE_PRELOADED or #EVAS_CALLBACK_IMAGE_UNLOADED. + * + * This determines the kind of event that will trigger the callback. + * What follows is a list explaining better the nature of each type of + * event, along with their associated @p event_info pointers: + * + * - #EVAS_CALLBACK_MOUSE_IN: @p event_info is a pointer to an + * #Evas_Event_Mouse_In struct\n\n + * This event is triggered when the mouse pointer enters the area + * (not shaded by other objects) of the object @p obj. This may + * occur by the mouse pointer being moved by + * evas_event_feed_mouse_move() calls, or by the object being shown, + * raised, moved, resized, or other objects being moved out of the + * way, hidden or lowered, whatever may cause the mouse pointer to + * get on top of @p obj, having been on top of another object + * previously. + * + * - #EVAS_CALLBACK_MOUSE_OUT: @p event_info is a pointer to an + * #Evas_Event_Mouse_Out struct\n\n + * This event is triggered exactly like #EVAS_CALLBACK_MOUSE_IN is, + * but it occurs when the mouse pointer exits an object's area. Note + * that no mouse out events will be reported if the mouse pointer is + * implicitly grabbed to an object (mouse buttons are down, having + * been pressed while the pointer was over that object). In these + * cases, mouse out events will be reported once all buttons are + * released, if the mouse pointer has left the object's area. The + * indirect ways of taking off the mouse pointer from an object, + * like cited above, for #EVAS_CALLBACK_MOUSE_IN, also apply here, + * naturally. + * + * - #EVAS_CALLBACK_MOUSE_DOWN: @p event_info is a pointer to an + * #Evas_Event_Mouse_Down struct\n\n + * This event is triggered by a mouse button being pressed while the + * mouse pointer is over an object. If the pointer mode for Evas is + * #EVAS_OBJECT_POINTER_MODE_AUTOGRAB (default), this causes this + * object to passively grab the mouse until all mouse buttons + * have been released: all future mouse events will be reported to + * only this object until no buttons are down. That includes mouse + * move events, mouse in and mouse out events, and further button + * presses. When all buttons are released, event propagation will + * occur as normal (see #Evas_Object_Pointer_Mode). + * + * - #EVAS_CALLBACK_MOUSE_UP: @p event_info is a pointer to an + * #Evas_Event_Mouse_Up struct\n\n + * This event is triggered by a mouse button being released while + * the mouse pointer is over an object's area (or when passively + * grabbed to an object). + * + * - #EVAS_CALLBACK_MOUSE_MOVE: @p event_info is a pointer to an + * #Evas_Event_Mouse_Move struct\n\n + * This event is triggered by the mouse pointer being moved while + * over an object's area (or while passively grabbed to an object). + * + * - #EVAS_CALLBACK_MOUSE_WHEEL: @p event_info is a pointer to an + * #Evas_Event_Mouse_Wheel struct\n\n + * This event is triggered by the mouse wheel being rolled while the + * mouse pointer is over an object (or passively grabbed to an + * object). + * + * - #EVAS_CALLBACK_MULTI_DOWN: @p event_info is a pointer to an + * #Evas_Event_Multi_Down struct + * + * - #EVAS_CALLBACK_MULTI_UP: @p event_info is a pointer to an + * #Evas_Event_Multi_Up struct + * + * - #EVAS_CALLBACK_MULTI_MOVE: @p event_info is a pointer to an + * #Evas_Event_Multi_Move struct + * + * - #EVAS_CALLBACK_FREE: @p event_info is @c NULL \n\n + * This event is triggered just before Evas is about to free all + * memory used by an object and remove all references to it. This is + * useful for programs to use if they attached data to an object and + * want to free it when the object is deleted. The object is still + * valid when this callback is called, but after it returns, there + * is no guarantee on the object's validity. + * + * - #EVAS_CALLBACK_KEY_DOWN: @p event_info is a pointer to an + * #Evas_Event_Key_Down struct\n\n + * This callback is called when a key is pressed and the focus is on + * the object, or a key has been grabbed to a particular object + * which wants to intercept the key press regardless of what object + * has the focus. + * + * - #EVAS_CALLBACK_KEY_UP: @p event_info is a pointer to an + * #Evas_Event_Key_Up struct \n\n + * This callback is called when a key is released and the focus is + * on the object, or a key has been grabbed to a particular object + * which wants to intercept the key release regardless of what + * object has the focus. + * + * - #EVAS_CALLBACK_FOCUS_IN: @p event_info is @c NULL \n\n + * This event is called when an object gains the focus. When it is + * called the object has already gained the focus. + * + * - #EVAS_CALLBACK_FOCUS_OUT: @p event_info is @c NULL \n\n + * This event is triggered when an object loses the focus. When it + * is called the object has already lost the focus. + * + * - #EVAS_CALLBACK_SHOW: @p event_info is @c NULL \n\n + * This event is triggered by the object being shown by + * evas_object_show(). + * + * - #EVAS_CALLBACK_HIDE: @p event_info is @c NULL \n\n + * This event is triggered by an object being hidden by + * evas_object_hide(). + * + * - #EVAS_CALLBACK_MOVE: @p event_info is @c NULL \n\n + * This event is triggered by an object being + * moved. evas_object_move() can trigger this, as can any + * object-specific manipulations that would mean the object's origin + * could move. + * + * - #EVAS_CALLBACK_RESIZE: @p event_info is @c NULL \n\n + * This event is triggered by an object being resized. Resizes can + * be triggered by evas_object_resize() or by any object-specific + * calls that may cause the object to resize. + * + * - #EVAS_CALLBACK_RESTACK: @p event_info is @c NULL \n\n + * This event is triggered by an object being re-stacked. Stacking + * changes can be triggered by + * evas_object_stack_below()/evas_object_stack_above() and others. + * + * - #EVAS_CALLBACK_DEL: @p event_info is @c NULL. + * + * - #EVAS_CALLBACK_HOLD: @p event_info is a pointer to an + * #Evas_Event_Hold struct + * + * - #EVAS_CALLBACK_CHANGED_SIZE_HINTS: @p event_info is @c NULL. + * + * - #EVAS_CALLBACK_IMAGE_PRELOADED: @p event_info is @c NULL. + * + * - #EVAS_CALLBACK_IMAGE_UNLOADED: @p event_info is @c NULL. + * + * @note Be careful not to add the same callback multiple times, if + * that's not what you want, because Evas won't check if a callback + * existed before exactly as the one being registered (and thus, call + * it more than once on the event, in this case). This would make + * sense if you passed different functions and/or callback data, only. + * + * Example: + * @dontinclude evas-events.c + * @skip evas_object_event_callback_add( + * @until } + * + * See the full example @ref Example_Evas_Events "here". + * + */ + EAPI void evas_object_event_callback_add (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); + +/** + * Add (register) a callback function to a given Evas object event with a + * non-default priority set. Except for the priority field, it's exactly the + * same as @ref evas_object_event_callback_add + * + * @param obj Object to attach a callback to + * @param type The type of event that will trigger the callback + * @param priority The priority of the callback, lower values called first. + * @param func The function to be called when the event is triggered + * @param data The data pointer to be passed to @p func + * + * @see evas_object_event_callback_add + * @since 1.1.0 + */ +EAPI void evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 4); + +/** + * Delete a callback function from an object + * + * @param obj Object to remove a callback from + * @param type The type of event that was triggering the callback + * @param func The function that was to be called when the event was triggered + * @return The data pointer that was to be passed to the callback + * + * This function removes the most recently added callback from the + * object @p obj which was triggered by the event type @p type and was + * calling the function @p func when triggered. If the removal is + * successful it will also return the data pointer that was passed to + * evas_object_event_callback_add() when the callback was added to the + * object. If not successful NULL will be returned. + * + * Example: + * @code + * extern Evas_Object *object; + * void *my_data; + * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info); + * + * my_data = evas_object_event_callback_del(object, EVAS_CALLBACK_MOUSE_UP, up_callback); + * @endcode + */ +EAPI void *evas_object_event_callback_del (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3); + +/** + * Delete (unregister) a callback function registered to a given + * Evas object event. + * + * @param obj Object to remove a callback from + * @param type The type of event that was triggering the callback + * @param func The function that was to be called when the event was + * triggered + * @param data The data pointer that was to be passed to the callback + * @return The data pointer that was to be passed to the callback + * + * This function removes the most recently added callback from the + * object @p obj, which was triggered by the event type @p type and was + * calling the function @p func with data @p data, when triggered. If + * the removal is successful it will also return the data pointer that + * was passed to evas_object_event_callback_add() (that will be the + * same as the parameter) when the callback was added to the + * object. In errors, @c NULL will be returned. + * + * @note For deletion of Evas object events callbacks filtering by + * just type and function pointer, user + * evas_object_event_callback_del(). + * + * Example: + * @code + * extern Evas_Object *object; + * void *my_data; + * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info); + * + * my_data = evas_object_event_callback_del_full(object, EVAS_CALLBACK_MOUSE_UP, up_callback, data); + * @endcode + */ +EAPI void *evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); + + +/** + * Set whether an Evas object is to pass (ignore) events. + * + * @param obj the Evas object to operate on + * @param pass whether @p obj is to pass events (@c EINA_TRUE) or not + * (@c EINA_FALSE) + * + * If @p pass is @c EINA_TRUE, it will make events on @p obj to be @b + * ignored. They will be triggered on the @b next lower object (that + * is not set to pass events), instead (see evas_object_below_get()). + * + * If @p pass is @c EINA_FALSE, events will be processed on that + * object as normal. + * + * @see evas_object_pass_events_get() for an example + * @see evas_object_repeat_events_set() + * @see evas_object_propagate_events_set() + * @see evas_object_freeze_events_set() + */ +EAPI void evas_object_pass_events_set (Evas_Object *obj, Eina_Bool pass) EINA_ARG_NONNULL(1); + +/** + * Determine whether an object is set to pass (ignore) events. + * + * @param obj the Evas object to get information from. + * @return pass whether @p obj is set to pass events (@c EINA_TRUE) or not + * (@c EINA_FALSE) + * + * Example: + * @dontinclude evas-stacking.c + * @skip if (strcmp(ev->keyname, "p") == 0) + * @until } + * + * See the full @ref Example_Evas_Stacking "example". + * + * @see evas_object_pass_events_set() + * @see evas_object_repeat_events_get() + * @see evas_object_propagate_events_get() + * @see evas_object_freeze_events_get() + */ +EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set whether an Evas object is to repeat events. + * + * @param obj the Evas object to operate on + * @param repeat whether @p obj is to repeat events (@c EINA_TRUE) or not + * (@c EINA_FALSE) + * + * If @p repeat is @c EINA_TRUE, it will make events on @p obj to also + * be repeated for the @b next lower object in the objects' stack (see + * see evas_object_below_get()). + * + * If @p repeat is @c EINA_FALSE, events occurring on @p obj will be + * processed only on it. + * + * Example: + * @dontinclude evas-stacking.c + * @skip if (strcmp(ev->keyname, "r") == 0) + * @until } + * + * See the full @ref Example_Evas_Stacking "example". + * + * @see evas_object_repeat_events_get() + * @see evas_object_pass_events_set() + * @see evas_object_propagate_events_set() + * @see evas_object_freeze_events_set() + */ +EAPI void evas_object_repeat_events_set (Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1); + +/** + * Determine whether an object is set to repeat events. + * + * @param obj the given Evas object pointer + * @retrieve whether @p obj is set to repeat events (@c EINA_TRUE) + * or not (@c EINA_FALSE) + * + * @see evas_object_repeat_events_set() for an example + * @see evas_object_pass_events_get() + * @see evas_object_propagate_events_get() + * @see evas_object_freeze_events_get() + */ +EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set whether events on a smart object's member should get propagated + * up to its parent. + * + * @param obj the smart object's child to operate on + * @param prop whether to propagate events (@c EINA_TRUE) or not (@c + * EINA_FALSE) + * + * This function has @b no effect if @p obj is not a member of a smart + * object. + * + * If @p prop is @c EINA_TRUE, events occurring on this object will be + * propagated on to the smart object of which @p obj is a member. If + * @p prop is @c EINA_FALSE, events occurring on this object will @b + * not be propagated on to the smart object of which @p obj is a + * member. The default value is @c EINA_TRUE. + * + * @see evas_object_propagate_events_get() + * @see evas_object_repeat_events_set() + * @see evas_object_pass_events_set() + * @see evas_object_freeze_events_set() + */ +EAPI void evas_object_propagate_events_set (Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1); + +/** + * Retrieve whether an Evas object is set to propagate events. + * + * @param obj the given Evas object pointer + * @return whether @p obj is set to propagate events (@c EINA_TRUE) + * or not (@c EINA_FALSE) + * + * @see evas_object_propagate_events_set() + * @see evas_object_repeat_events_get() + * @see evas_object_pass_events_get() + * @see evas_object_freeze_events_get() + */ +EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set whether an Evas object is to freeze (discard) events. + * + * @param obj the Evas object to operate on + * @param pass whether @p obj is to freeze events (@c EINA_TRUE) or not + * (@c EINA_FALSE) + * + * If @p freeze is @c EINA_TRUE, it will make events on @p obj to be @b + * discarded. Unlike evas_object_pass_events_set(), events will not be + * passed to @b next lower object. This API can be used for blocking + * events while @p obj is on transiting. + * + * If @p freeze is @c EINA_FALSE, events will be processed on that + * object as normal. + * + * @see evas_object_freeze_events_get() + * @see evas_object_pass_events_set() + * @see evas_object_repeat_events_set() + * @see evas_object_propagate_events_set() + * @since 1.1.0 + */ +EAPI void evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool freeze) EINA_ARG_NONNULL(1); + +/** + * Determine whether an object is set to freeze (discard) events. + * + * @param obj the Evas object to get information from. + * @return freeze whether @p obj is set to freeze events (@c EINA_TRUE) or + * not (@c EINA_FALSE) + * + * @see evas_object_freeze_events_set() + * @see evas_object_pass_events_get() + * @see evas_object_repeat_events_get() + * @see evas_object_propagate_events_get() + * @since 1.1.0 + */ +EAPI Eina_Bool evas_object_freeze_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @} + */ + +/** + * @defgroup Evas_Object_Group_Map UV Mapping (Rotation, Perspective, 3D...) + * + * Evas allows different transformations to be applied to all kinds of + * objects. These are applied by means of UV mapping. + * + * With UV mapping, one maps points in the source object to a 3D space + * positioning at target. This allows rotation, perspective, scale and + * lots of other effects, depending on the map that is used. + * + * Each map point may carry a multiplier color. If properly + * calculated, these can do shading effects on the object, producing + * 3D effects. + * + * As usual, Evas provides both the raw and easy to use methods. The + * raw methods allow developer to create its maps somewhere else, + * maybe load them from some file format. The easy to use methods, + * calculate the points given some high-level parameters, such as + * rotation angle, ambient light and so on. + * + * @note applying mapping will reduce performance, so use with + * care. The impact on performance depends on engine in + * use. Software is quite optimized, but not as fast as OpenGL. + * + * @section sec-map-points Map points + * @subsection subsec-rotation Rotation + * + * A map consists of a set of points, currently only four are supported. Each + * of these points contains a set of canvas coordinates @c x and @c y that + * can be used to alter the geometry of the mapped object, and a @c z + * coordinate that indicates the depth of that point. This last coordinate + * does not normally affect the map, but it's used by several of the utility + * functions to calculate the right position of the point given other + * parameters. + * + * The coordinates for each point are set with evas_map_point_coord_set(). + * The following image shows a map set to match the geometry of an existing + * object. + * + * @image html map-set-map-points-1.png + * @image rtf map-set-map-points-1.png + * @image latex map-set-map-points-1.eps + * + * This is a common practice, so there are a few functions that help make it + * easier. + * + * evas_map_util_points_populate_from_geometry() sets the coordinates of each + * point in the given map to match the rectangle defined by the function + * parameters. + * + * evas_map_util_points_populate_from_object() and + * evas_map_util_points_populate_from_object_full() both take an object and + * set the map points to match its geometry. The difference between the two + * is that the first function sets the @c z value of all points to 0, while + * the latter receives the value to set in said coordinate as a parameter. + * + * The following lines of code all produce the same result as in the image + * above. + * @code + * evas_map_util_points_populate_from_geometry(m, 100, 100, 200, 200, 0); + * // Assuming o is our original object + * evas_object_move(o, 100, 100); + * evas_object_resize(o, 200, 200); + * evas_map_util_points_populate_from_object(m, o); + * evas_map_util_points_populate_from_object_full(m, o, 0); + * @endcode + * + * Several effects can be applied to an object by simply setting each point + * of the map to the right coordinates. For example, a simulated perspective + * could be achieve as follows. + * + * @image html map-set-map-points-2.png + * @image rtf map-set-map-points-2.png + * @image latex map-set-map-points-2.eps + * + * As said before, the @c z coordinate is unused here so when setting points + * by hand, its value is of no importance. + * + * @image html map-set-map-points-3.png + * @image rtf map-set-map-points-3.png + * @image latex map-set-map-points-3.eps + * + * In all three cases above, setting the map to be used by the object is the + * same. + * @code + * evas_object_map_set(o, m); + * evas_object_map_enable_set(o, EINA_TRUE); + * @endcode + * + * Doing things this way, however, is a lot of work that can be avoided by + * using the provided utility functions, as described in the next section. + * + * @section map-utils Utility functions + * + * Utility functions take an already set up map and alter it to produce a + * specific effect. For example, to rotate an object around its own center + * you would need to take the rotation angle, the coordinates of each corner + * of the object and do all the math to get the new set of coordinates that + * need to tbe set in the map. + * + * Or you can use this code: + * @code + * evas_object_geometry_get(o, &x, &y, &w, &h); + * m = evas_map_new(4); + * evas_map_util_points_populate_from_object(m, o); + * evas_map_util_rotate(m, 45, x + (w / 2), y + (h / 2)); + * evas_object_map_set(o, m); + * evas_object_map_enable_set(o, EINA_TRUE); + * evas_map_free(m); + * @endcode + * + * Which will rotate the object around its center point in a 45 degree angle + * in the clockwise direction, taking it from this + * + * @image html map-rotation-2d-1.png + * @image rtf map-rotation-2d-1.png + * @image latex map-rotation-2d-1.eps + * + * to this + * + * @image html map-rotation-2d-2.png + * @image rtf map-rotation-2d-2.png + * @image latex map-rotation-2d-2.eps + * + * Objects may be rotated around any other point just by setting the last two + * paramaters of the evas_map_util_rotate() function to the right values. A + * circle of roughly the diameter of the object overlaid on each image shows + * where the center of rotation is set for each example. + * + * For example, this code + * @code + * evas_object_geometry_get(o, &x, &y, &w, &h); + * m = evas_map_new(4); + * evas_map_util_points_populate_from_object(m, o); + * evas_map_util_rotate(m, 45, x + w - 20, y + h - 20); + * evas_object_map_set(o, m); + * evas_object_map_enable_set(o, EINA_TRUE); + * evas_map_free(m); + * @endcode + * + * produces something like + * + * @image html map-rotation-2d-3.png + * @image rtf map-rotation-2d-3.png + * @image latex map-rotation-2d-3.eps + * + * And the following + * @code + * evas_output_size_get(evas, &w, &h); + * m = evas_map_new(4); + * evas_map_util_points_populate_from_object(m, o); + * evas_map_util_rotate(m, 45, w, h); + * evas_object_map_set(o, m); + * evas_object_map_enable_set(o, EINA_TRUE); + * evas_map_free(m); + * @endcode + * + * rotates the object around the center of the window + * + * @image html map-rotation-2d-4.png + * @image rtf map-rotation-2d-4.png + * @image latex map-rotation-2d-4.eps + * + * @subsection subsec-3d 3D Maps + * + * Maps can also be used to achieve the effect of 3-dimensionality. When doing + * this, the @c z coordinate of each point counts, with higher values meaning + * the point is further into the screen, and smaller values (negative, usually) + * meaning the point is closwer towards the user. + * + * Thinking in 3D also introduces the concept of back-face of an object. An + * object is said to be facing the user when all its points are placed in a + * clockwise fashion. The next image shows this, with each point showing the + * with which is identified within the map. + * + * @image html map-point-order-face.png + * @image rtf map-point-order-face.png + * @image latex map-point-order-face.eps + * + * Rotating this map around the @c Y axis would leave the order of the points + * in a counter-clockwise fashion, as seen in the following image. + * + * @image html map-point-order-back.png + * @image rtf map-point-order-back.png + * @image latex map-point-order-back.eps + * + * This way we can say that we are looking at the back face of the object. + * This will have stronger implications later when we talk about lighting. + * + * To know if a map is facing towards the user or not it's enough to use + * the evas_map_util_clockwise_get() function, but this is normally done + * after all the other operations are applied on the map. + * + * @subsection subsec-3d-rot 3D rotation and perspective + * + * Much like evas_map_util_rotate(), there's the function + * evas_map_util_3d_rotate() that transforms the map to apply a 3D rotation + * to an object. As in its 2D counterpart, the rotation can be applied around + * any point in the canvas, this time with a @c z coordinate too. The rotation + * can also be around any of the 3 axis. + * + * Starting from this simple setup + * + * @image html map-3d-basic-1.png + * @image rtf map-3d-basic-1.png + * @image latex map-3d-basic-1.eps + * + * and setting maps so that the blue square to rotate on all axis around a + * sphere that uses the object as its center, and the red square to rotate + * around the @c Y axis, we get the following. A simple overlay over the image + * shows the original geometry of each object and the axis around which they + * are being rotated, with the @c Z one not appearing due to being orthogonal + * to the screen. + * + * @image html map-3d-basic-2.png + * @image rtf map-3d-basic-2.png + * @image latex map-3d-basic-2.eps + * + * which doesn't look very real. This can be helped by adding perspective + * to the transformation, which can be simply done by calling + * evas_map_util_3d_perspective() on the map after its position has been set. + * The result in this case, making the vanishing point the center of each + * object: + * + * @image html map-3d-basic-3.png + * @image rtf map-3d-basic-3.png + * @image latex map-3d-basic-3.eps + * + * @section sec-color Color and lighting + * + * Each point in a map can be set to a color, which will be multiplied with + * the objects own color and linearly interpolated in between adjacent points. + * This is done with evas_map_point_color_set() for each point of the map, + * or evas_map_util_points_color_set() to set every point to the same color. + * + * When using 3D effects, colors can be used to improve the looks of them by + * simulating a light source. The evas_map_util_3d_lighting() function makes + * this task easier by taking the coordinates of the light source and its + * color, along with the color of the ambient light. Evas then sets the color + * of each point based on the distance to the light source, the angle with + * which the object is facing the light and the ambient light. Here, the + * orientation of each point as explained before, becomes more important. + * If the map is defined counter-clockwise, the object will be facing away + * from the user and thus become obscured, since no light would be reflecting + * from it. + * + * @image html map-light.png + * @image rtf map-light.png + * @image latex map-light.eps + * @note Object facing the light source + * + * @image html map-light2.png + * @image rtf map-light2.png + * @image latex map-light2.eps + * @note Same object facing away from the user + * + * @section Image mapping + * + * @image html map-uv-mapping-1.png + * @image rtf map-uv-mapping-1.png + * @image latex map-uv-mapping-1.eps + * + * Images need some special handlign when mapped. Evas can easily take care + * of objects and do almost anything with them, but it's completely oblivious + * to the content of images, so each point in the map needs to be told to what + * pixel in the source image it belongs. Failing to do may sometimes result + * in the expected behavior, or it may look like a partial work. + * + * The next image illustrates one possibility of a map being set to an image + * object, without setting the right UV mapping for each point. The objects + * themselves are mapped properly to their new geometry, but the image content + * may not be displayed correctly within the mapped object. + * + * @image html map-uv-mapping-2.png + * @image rtf map-uv-mapping-2.png + * @image latex map-uv-mapping-2.eps + * + * Once Evas knows how to handle the source image within the map, it will + * transform it as needed. This is done with evas_map_point_image_uv_set(), + * which tells the map to which pixel in image it maps. + * + * To match our example images to the maps above all we need is the size of + * each image, which can always be found with evas_object_image_size_get(). + * + * @code + * evas_map_point_image_uv_set(m, 0, 0, 0); + * evas_map_point_image_uv_set(m, 1, 150, 0); + * evas_map_point_image_uv_set(m, 2, 150, 200); + * evas_map_point_image_uv_set(m, 3, 0, 200); + * evas_object_map_set(o, m); + * evas_object_map_enable_set(o, EINA_TRUE); + * + * evas_map_point_image_uv_set(m, 0, 0, 0); + * evas_map_point_image_uv_set(m, 1, 120, 0); + * evas_map_point_image_uv_set(m, 2, 120, 160); + * evas_map_point_image_uv_set(m, 3, 0, 160); + * evas_object_map_set(o2, m); + * evas_object_map_enable_set(o2, EINA_TRUE); + * @endcode + * + * To get + * + * @image html map-uv-mapping-3.png + * @image rtf map-uv-mapping-3.png + * @image latex map-uv-mapping-3.eps + * + * Maps can also be set to use part of an image only, or even map them inverted, + * and combined with evas_object_image_source_set() it can be used to achieve + * more interesting results. + * + * @code + * evas_object_image_size_get(evas_object_image_source_get(o), &w, &h); + * evas_map_point_image_uv_set(m, 0, 0, h); + * evas_map_point_image_uv_set(m, 1, w, h); + * evas_map_point_image_uv_set(m, 2, w, h / 3); + * evas_map_point_image_uv_set(m, 3, 0, h / 3); + * evas_object_map_set(o, m); + * evas_object_map_enable_set(o, EINA_TRUE); + * @endcode + * + * @image html map-uv-mapping-4.png + * @image rtf map-uv-mapping-4.png + * @image latex map-uv-mapping-4.eps + * + * Examples: + * @li @ref Example_Evas_Map_Overview + * + * @ingroup Evas_Object_Group + * + * @{ + */ + +/** + * Enable or disable the map that is set. + * + * Enable or disable the use of map for the object @p obj. + * On enable, the object geometry will be saved, and the new geometry will + * change (position and size) to reflect the map geometry set. + * + * If the object doesn't have a map set (with evas_object_map_set()), the + * initial geometry will be undefined. It is advised to always set a map + * to the object first, and then call this function to enable its use. + * + * @param obj object to enable the map on + * @param enabled enabled state + */ +EAPI void evas_object_map_enable_set (Evas_Object *obj, Eina_Bool enabled); + +/** + * Get the map enabled state + * + * This returns the currently enabled state of the map on the object indicated. + * The default map enable state is off. You can enable and disable it with + * evas_object_map_enable_set(). + * + * @param obj object to get the map enabled state from + * @return the map enabled state + */ +EAPI Eina_Bool evas_object_map_enable_get (const Evas_Object *obj); + +/** + * Set the map source object + * + * This sets the object from which the map is taken - can be any object that + * has map enabled on it. + * + * Currently not implemented. for future use. + * + * @param obj object to set the map source of + * @param src the source object from which the map is taken + */ +EAPI void evas_object_map_source_set (Evas_Object *obj, Evas_Object *src); + +/** + * Get the map source object + * + * @param obj object to set the map source of + * @return the object set as the source + * + * @see evas_object_map_source_set() + */ +EAPI Evas_Object *evas_object_map_source_get (const Evas_Object *obj); + +/** + * Set current object transformation map. + * + * This sets the map on a given object. It is copied from the @p map pointer, + * so there is no need to keep the @p map object if you don't need it anymore. + * + * A map is a set of 4 points which have canvas x, y coordinates per point, + * with an optional z point value as a hint for perspective correction, if it + * is available. As well each point has u and v coordinates. These are like + * "texture coordinates" in OpenGL in that they define a point in the source + * image that is mapped to that map vertex/point. The u corresponds to the x + * coordinate of this mapped point and v, the y coordinate. Note that these + * coordinates describe a bounding region to sample. If you have a 200x100 + * source image and want to display it at 200x100 with proper pixel + * precision, then do: + * + * @code + * Evas_Map *m = evas_map_new(4); + * evas_map_point_coord_set(m, 0, 0, 0, 0); + * evas_map_point_coord_set(m, 1, 200, 0, 0); + * evas_map_point_coord_set(m, 2, 200, 100, 0); + * evas_map_point_coord_set(m, 3, 0, 100, 0); + * evas_map_point_image_uv_set(m, 0, 0, 0); + * evas_map_point_image_uv_set(m, 1, 200, 0); + * evas_map_point_image_uv_set(m, 2, 200, 100); + * evas_map_point_image_uv_set(m, 3, 0, 100); + * evas_object_map_set(obj, m); + * evas_map_free(m); + * @endcode + * + * Note that the map points a uv coordinates match the image geometry. If + * the @p map parameter is NULL, the stored map will be freed and geometry + * prior to enabling/setting a map will be restored. + * + * @param obj object to change transformation map + * @param map new map to use + * + * @see evas_map_new() + */ +EAPI void evas_object_map_set (Evas_Object *obj, const Evas_Map *map); + +/** + * Get current object transformation map. + * + * This returns the current internal map set on the indicated object. It is + * intended for read-only acces and is only valid as long as the object is + * not deleted or the map on the object is not changed. If you wish to modify + * the map and set it back do the following: + * + * @code + * const Evas_Map *m = evas_object_map_get(obj); + * Evas_Map *m2 = evas_map_dup(m); + * evas_map_util_rotate(m2, 30.0, 0, 0); + * evas_object_map_set(obj); + * evas_map_free(m2); + * @endcode + * + * @param obj object to query transformation map. + * @return map reference to map in use. This is an internal data structure, so + * do not modify it. + * + * @see evas_object_map_set() + */ +EAPI const Evas_Map *evas_object_map_get (const Evas_Object *obj); + + +/** + * Populate source and destination map points to match exactly object. + * + * Usually one initialize map of an object to match it's original + * position and size, then transform these with evas_map_util_* + * functions, such as evas_map_util_rotate() or + * evas_map_util_3d_rotate(). The original set is done by this + * function, avoiding code duplication all around. + * + * @param m map to change all 4 points (must be of size 4). + * @param obj object to use unmapped geometry to populate map coordinates. + * @param z Point Z Coordinate hint (pre-perspective transform). This value + * will be used for all four points. + * + * @see evas_map_util_points_populate_from_object() + * @see evas_map_point_coord_set() + * @see evas_map_point_image_uv_set() + */ +EAPI void evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z); + +/** + * Populate source and destination map points to match exactly object. + * + * Usually one initialize map of an object to match it's original + * position and size, then transform these with evas_map_util_* + * functions, such as evas_map_util_rotate() or + * evas_map_util_3d_rotate(). The original set is done by this + * function, avoiding code duplication all around. + * + * Z Point coordinate is assumed as 0 (zero). + * + * @param m map to change all 4 points (must be of size 4). + * @param obj object to use unmapped geometry to populate map coordinates. + * + * @see evas_map_util_points_populate_from_object_full() + * @see evas_map_util_points_populate_from_geometry() + * @see evas_map_point_coord_set() + * @see evas_map_point_image_uv_set() + */ +EAPI void evas_map_util_points_populate_from_object (Evas_Map *m, const Evas_Object *obj); + +/** + * Populate source and destination map points to match given geometry. + * + * Similar to evas_map_util_points_populate_from_object_full(), this + * call takes raw values instead of querying object's unmapped + * geometry. The given width will be used to calculate destination + * points (evas_map_point_coord_set()) and set the image uv + * (evas_map_point_image_uv_set()). + * + * @param m map to change all 4 points (must be of size 4). + * @param x Point X Coordinate + * @param y Point Y Coordinate + * @param w width to use to calculate second and third points. + * @param h height to use to calculate third and fourth points. + * @param z Point Z Coordinate hint (pre-perspective transform). This value + * will be used for all four points. + * + * @see evas_map_util_points_populate_from_object() + * @see evas_map_point_coord_set() + * @see evas_map_point_image_uv_set() + */ +EAPI void evas_map_util_points_populate_from_geometry (Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z); + +/** + * Set color of all points to given color. + * + * This call is useful to reuse maps after they had 3d lightning or + * any other colorization applied before. + * + * @param m map to change the color of. + * @param r red (0 - 255) + * @param g green (0 - 255) + * @param b blue (0 - 255) + * @param a alpha (0 - 255) + * + * @see evas_map_point_color_set() + */ +EAPI void evas_map_util_points_color_set (Evas_Map *m, int r, int g, int b, int a); + +/** + * Change the map to apply the given rotation. + * + * This rotates the indicated map's coordinates around the center coordinate + * given by @p cx and @p cy as the rotation center. The points will have their + * X and Y coordinates rotated clockwise by @p degrees degress (360.0 is a + * full rotation). Negative values for degrees will rotate counter-clockwise + * by that amount. All coordinates are canvas global coordinates. + * + * @param m map to change. + * @param degrees amount of degrees from 0.0 to 360.0 to rotate. + * @param cx rotation's center horizontal position. + * @param cy rotation's center vertical position. + * + * @see evas_map_point_coord_set() + * @see evas_map_util_zoom() + */ +EAPI void evas_map_util_rotate (Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy); + +/** + * Change the map to apply the given zooming. + * + * Like evas_map_util_rotate(), this zooms the points of the map from a center + * point. That center is defined by @p cx and @p cy. The @p zoomx and @p zoomy + * parameters specify how much to zoom in the X and Y direction respectively. + * A value of 1.0 means "don't zoom". 2.0 means "dobule the size". 0.5 is + * "half the size" etc. All coordinates are canvas global coordinates. + * + * @param m map to change. + * @param zoomx horizontal zoom to use. + * @param zoomy vertical zoom to use. + * @param cx zooming center horizontal position. + * @param cy zooming center vertical position. + * + * @see evas_map_point_coord_set() + * @see evas_map_util_rotate() + */ +EAPI void evas_map_util_zoom (Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy); + +/** + * Rotate the map around 3 axes in 3D + * + * This will rotate not just around the "Z" axis as in evas_map_util_rotate() + * (which is a convenience call for those only wanting 2D). This will rotate + * around the X, Y and Z axes. The Z axis points "into" the screen with low + * values at the screen and higher values further away. The X axis runs from + * left to right on the screen and the Y axis from top to bottom. Like with + * evas_map_util_rotate() you provide a center point to rotate around (in 3D). + * + * @param m map to change. + * @param dx amount of degrees from 0.0 to 360.0 to rotate arount X axis. + * @param dy amount of degrees from 0.0 to 360.0 to rotate arount Y axis. + * @param dz amount of degrees from 0.0 to 360.0 to rotate arount Z axis. + * @param cx rotation's center horizontal position. + * @param cy rotation's center vertical position. + * @param cz rotation's center vertical position. + */ +EAPI void evas_map_util_3d_rotate (Evas_Map *m, double dx, double dy, double dz, Evas_Coord cx, Evas_Coord cy, Evas_Coord cz); + +/** + * Perform lighting calculations on the given Map + * + * This is used to apply lighting calculations (from a single light source) + * to a given map. The R, G and B values of each vertex will be modified to + * reflect the lighting based on the lixth point coordinates, the light + * color and the ambient color, and at what angle the map is facing the + * light source. A surface should have its points be declared in a + * clockwise fashion if the face is "facing" towards you (as opposed to + * away from you) as faces have a "logical" side for lighting. + * + * @image html map-light3.png + * @image rtf map-light3.png + * @image latex map-light3.eps + * @note Grey object, no lighting used + * + * @image html map-light4.png + * @image rtf map-light4.png + * @image latex map-light4.eps + * @note Lights out! Every color set to 0 + * + * @image html map-light5.png + * @image rtf map-light5.png + * @image latex map-light5.eps + * @note Ambient light to full black, red light coming from close at the + * bottom-left vertex + * + * @image html map-light6.png + * @image rtf map-light6.png + * @image latex map-light6.eps + * @note Same light as before, but not the light is set to 0 and ambient light + * is cyan + * + * @image html map-light7.png + * @image rtf map-light7.png + * @image latex map-light7.eps + * @note Both lights are on + * + * @image html map-light8.png + * @image rtf map-light8.png + * @image latex map-light8.eps + * @note Both lights again, but this time both are the same color. + * + * @param m map to change. + * @param lx X coordinate in space of light point + * @param ly Y coordinate in space of light point + * @param lz Z coordinate in space of light point + * @param lr light red value (0 - 255) + * @param lg light green value (0 - 255) + * @param lb light blue value (0 - 255) + * @param ar ambient color red value (0 - 255) + * @param ag ambient color green value (0 - 255) + * @param ab ambient color blue value (0 - 255) + */ +EAPI void evas_map_util_3d_lighting (Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, int lr, int lg, int lb, int ar, int ag, int ab); + +/** + * Apply a perspective transform to the map + * + * This applies a given perspective (3D) to the map coordinates. X, Y and Z + * values are used. The px and py points specify the "infinite distance" point + * in the 3D conversion (where all lines converge to like when artists draw + * 3D by hand). The @p z0 value specifis the z value at which there is a 1:1 + * mapping between spatial coorinates and screen coordinates. Any points + * on this z value will not have their X and Y values modified in the transform. + * Those further away (Z value higher) will shrink into the distance, and + * those less than this value will expand and become bigger. The @p foc value + * determines the "focal length" of the camera. This is in reality the distance + * between the camera lens plane itself (at or closer than this rendering + * results are undefined) and the "z0" z value. This allows for some "depth" + * control and @p foc must be greater than 0. + * + * @param m map to change. + * @param px The pespective distance X coordinate + * @param py The pespective distance Y coordinate + * @param z0 The "0" z plane value + * @param foc The focal distance + */ +EAPI void evas_map_util_3d_perspective (Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc); + +/** + * Get the clockwise state of a map + * + * This determines if the output points (X and Y. Z is not used) are + * clockwise or anti-clockwise. This can be used for "back-face culling". This + * is where you hide objects that "face away" from you. In this case objects + * that are not clockwise. + * + * @param m map to query. + * @return 1 if clockwise, 0 otherwise + */ +EAPI Eina_Bool evas_map_util_clockwise_get (Evas_Map *m); + + +/** + * Create map of transformation points to be later used with an Evas object. + * + * This creates a set of points (currently only 4 is supported. no other + * number for @p count will work). That is empty and ready to be modified + * with evas_map calls. + * + * @param count number of points in the map. + * @return a newly allocated map or @c NULL on errors. + * + * @see evas_map_free() + * @see evas_map_dup() + * @see evas_map_point_coord_set() + * @see evas_map_point_image_uv_set() + * @see evas_map_util_points_populate_from_object_full() + * @see evas_map_util_points_populate_from_object() + * + * @see evas_object_map_set() + */ +EAPI Evas_Map *evas_map_new (int count); + +/** + * Set the smoothing for map rendering + * + * This sets smoothing for map rendering. If the object is a type that has + * its own smoothing settings, then both the smooth settings for this object + * and the map must be turned off. By default smooth maps are enabled. + * + * @param m map to modify. Must not be NULL. + * @param enabled enable or disable smooth map rendering + */ +EAPI void evas_map_smooth_set (Evas_Map *m, Eina_Bool enabled); + +/** + * get the smoothing for map rendering + * + * This gets smoothing for map rendering. + * + * @param m map to get the smooth from. Must not be NULL. + */ +EAPI Eina_Bool evas_map_smooth_get (const Evas_Map *m); + +/** + * Set the alpha flag for map rendering + * + * This sets alpha flag for map rendering. If the object is a type that has + * its own alpha settings, then this will take precedence. Only image objects + * have this currently. + * Setting this off stops alpha blending of the map area, and is + * useful if you know the object and/or all sub-objects is 100% solid. + * + * @param m map to modify. Must not be NULL. + * @param enabled enable or disable alpha map rendering + */ +EAPI void evas_map_alpha_set (Evas_Map *m, Eina_Bool enabled); + +/** + * get the alpha flag for map rendering + * + * This gets the alph flag for map rendering. + * + * @param m map to get the alpha from. Must not be NULL. + */ +EAPI Eina_Bool evas_map_alpha_get (const Evas_Map *m); + +/** + * Copy a previously allocated map. + * + * This makes a duplicate of the @p m object and returns it. + * + * @param m map to copy. Must not be NULL. + * @return newly allocated map with the same count and contents as @p m. + */ +EAPI Evas_Map *evas_map_dup (const Evas_Map *m); + +/** + * Free a previously allocated map. + * + * This frees a givem map @p m and all memory associated with it. You must NOT + * free a map returned by evas_object_map_get() as this is internal. + * + * @param m map to free. + */ +EAPI void evas_map_free (Evas_Map *m); + +/** + * Get a maps size. + * + * Returns the number of points in a map. Should be at least 4. + * + * @param m map to get size. + * @return -1 on error, points otherwise. + */ +EAPI int evas_map_count_get (const Evas_Map *m) EINA_CONST; + +/** + * Change the map point's coordinate. + * + * This sets the fixed point's coordinate in the map. Note that points + * describe the outline of a quadrangle and are ordered either clockwise + * or anit-clock-wise. It is suggested to keep your quadrangles concave and + * non-complex, though these polygon modes may work, they may not render + * a desired set of output. The quadrangle will use points 0 and 1 , 1 and 2, + * 2 and 3, and 3 and 0 to describe the edges of the quandrangle. + * + * The X and Y and Z coordinates are in canvas units. Z is optional and may + * or may not be honored in drawing. Z is a hint and does not affect the + * X and Y rendered coordinates. It may be used for calculating fills with + * perspective correct rendering. + * + * Remember all coordinates are canvas global ones like with move and reize + * in evas. + * + * @param m map to change point. Must not be @c NULL. + * @param idx index of point to change. Must be smaller than map size. + * @param x Point X Coordinate + * @param y Point Y Coordinate + * @param z Point Z Coordinate hint (pre-perspective transform) + * + * @see evas_map_util_rotate() + * @see evas_map_util_zoom() + * @see evas_map_util_points_populate_from_object_full() + * @see evas_map_util_points_populate_from_object() + */ +EAPI void evas_map_point_coord_set (Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z); + +/** + * Get the map point's coordinate. + * + * This returns the coordinates of the given point in the map. + * + * @param m map to query point. + * @param idx index of point to query. Must be smaller than map size. + * @param x where to return the X coordinate. + * @param y where to return the Y coordinate. + * @param z where to return the Z coordinate. + */ +EAPI void evas_map_point_coord_get (const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z); + +/** + * Change the map point's U and V texture source point + * + * This sets the U and V coordinates for the point. This determines which + * coordinate in the source image is mapped to the given point, much like + * OpenGL and textures. Notes that these points do select the pixel, but + * are double floating point values to allow for accuracy and sub-pixel + * selection. + * + * @param m map to change the point of. + * @param idx index of point to change. Must be smaller than map size. + * @param u the X coordinate within the image/texture source + * @param v the Y coordinate within the image/texture source + * + * @see evas_map_point_coord_set() + * @see evas_object_map_set() + * @see evas_map_util_points_populate_from_object_full() + * @see evas_map_util_points_populate_from_object() + */ +EAPI void evas_map_point_image_uv_set (Evas_Map *m, int idx, double u, double v); + +/** + * Get the map point's U and V texture source points + * + * This returns the texture points set by evas_map_point_image_uv_set(). + * + * @param m map to query point. + * @param idx index of point to query. Must be smaller than map size. + * @param u where to write the X coordinate within the image/texture source + * @param v where to write the Y coordinate within the image/texture source + */ +EAPI void evas_map_point_image_uv_get (const Evas_Map *m, int idx, double *u, double *v); + +/** + * Set the color of a vertex in the map + * + * This sets the color of the vertex in the map. Colors will be linearly + * interpolated between vertex points through the map. Color will multiply + * the "texture" pixels (like GL_MODULATE in OpenGL). The default color of + * a vertex in a map is white solid (255, 255, 255, 255) which means it will + * have no affect on modifying the texture pixels. + * + * @param m map to change the color of. + * @param idx index of point to change. Must be smaller than map size. + * @param r red (0 - 255) + * @param g green (0 - 255) + * @param b blue (0 - 255) + * @param a alpha (0 - 255) + * + * @see evas_map_util_points_color_set() + * @see evas_map_point_coord_set() + * @see evas_object_map_set() + */ +EAPI void evas_map_point_color_set (Evas_Map *m, int idx, int r, int g, int b, int a); + +/** + * Get the color set on a vertex in the map + * + * This gets the color set by evas_map_point_color_set() on the given vertex + * of the map. + * + * @param m map to get the color of the vertex from. + * @param idx index of point get. Must be smaller than map size. + * @param r pointer to red return + * @param g pointer to green return + * @param b pointer to blue return + * @param a pointer to alpha return (0 - 255) + * + * @see evas_map_point_coord_set() + * @see evas_object_map_set() + */ +EAPI void evas_map_point_color_get (const Evas_Map *m, int idx, int *r, int *g, int *b, int *a); +/** + * @} + */ + +/** + * @defgroup Evas_Object_Group_Size_Hints Size Hints + * + * Objects may carry hints, so that another object that acts as a + * manager (see @ref Evas_Smart_Object_Group) may know how to properly + * position and resize its subordinate objects. The Size Hints provide + * a common interface that is recommended as the protocol for such + * information. + * + * For example, box objects use alignment hints to align its + * lines/columns inside its container, padding hints to set the + * padding between each individual child, etc. + * + * Examples on their usage: + * - @ref Example_Evas_Size_Hints "evas-hints.c" + * - @ref Example_Evas_Aspect_Hints "evas-aspect-hints.c" + * + * @ingroup Evas_Object_Group + */ + +/** + * @addtogroup Evas_Object_Group_Size_Hints + * @{ + */ + +/** + * Retrieves the hints for an object's minimum size. + * + * @param obj The given Evas object to query hints from. + * @param w Pointer to an integer in which to store the minimum width. + * @param h Pointer to an integer in which to store the minimum height. + * + * These are hints on the minimim sizes @p obj should have. This is + * not a size enforcement in any way, it's just a hint that should be + * used whenever appropriate. + * + * @note Use @c NULL pointers on the hint components you're not + * interested in: they'll be ignored by the function. + * + * @see evas_object_size_hint_min_set() for an example + */ +EAPI void evas_object_size_hint_min_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + +/** + * Sets the hints for an object's minimum size. + * + * @param obj The given Evas object to query hints from. + * @param w Integer to use as the minimum width hint. + * @param h Integer to use as the minimum height hint. + * + * This is not a size enforcement in any way, it's just a hint that + * should be used whenever appropriate. + * + * Values @c 0 will be treated as unset hint components, when queried + * by managers. + * + * Example: + * @dontinclude evas-hints.c + * @skip evas_object_size_hint_min_set + * @until return + * + * In this example the minimum size hints change de behavior of an + * Evas box when layouting its children. See the full @ref + * Example_Evas_Size_Hints "example". + * + * @see evas_object_size_hint_min_get() + */ +EAPI void evas_object_size_hint_min_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + +/** + * Retrieves the hints for an object's maximum size. + * + * @param obj The given Evas object to query hints from. + * @param w Pointer to an integer in which to store the maximum width. + * @param h Pointer to an integer in which to store the maximum height. + * + * These are hints on the maximum sizes @p obj should have. This is + * not a size enforcement in any way, it's just a hint that should be + * used whenever appropriate. + * + * @note Use @c NULL pointers on the hint components you're not + * interested in: they'll be ignored by the function. + * + * @see evas_object_size_hint_max_set() + */ +EAPI void evas_object_size_hint_max_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + +/** + * Sets the hints for an object's maximum size. + * + * @param obj The given Evas object to query hints from. + * @param w Integer to use as the maximum width hint. + * @param h Integer to use as the maximum height hint. + * + * This is not a size enforcement in any way, it's just a hint that + * should be used whenever appropriate. + * + * Values @c -1 will be treated as unset hint components, when queried + * by managers. + * + * Example: + * @dontinclude evas-hints.c + * @skip evas_object_size_hint_max_set + * @until return + * + * In this example the maximum size hints change de behavior of an + * Evas box when layouting its children. See the full @ref + * Example_Evas_Size_Hints "example". + * + * @see evas_object_size_hint_max_get() + */ +EAPI void evas_object_size_hint_max_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + +/** + * Retrieves the hints for an object's optimum size. + * + * @param obj The given Evas object to query hints from. + * @param w Pointer to an integer in which to store the requested width. + * @param h Pointer to an integer in which to store the requested height. + * + * These are hints on the optimum sizes @p obj should have. This is + * not a size enforcement in any way, it's just a hint that should be + * used whenever appropriate. + * + * @note Use @c NULL pointers on the hint components you're not + * interested in: they'll be ignored by the function. + * + * @see evas_object_size_hint_request_set() + */ +EAPI void evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + +/** + * Sets the hints for an object's optimum size. + * + * @param obj The given Evas object to query hints from. + * @param w Integer to use as the preferred width hint. + * @param h Integer to use as the preferred height hint. + * + * This is not a size enforcement in any way, it's just a hint that + * should be used whenever appropriate. + * + * Values @c 0 will be treated as unset hint components, when queried + * by managers. + * + * @see evas_object_size_hint_request_get() + */ +EAPI void evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + +/** + * Retrieves the hints for an object's aspect ratio. + * + * @param obj The given Evas object to query hints from. + * @param aspect Returns the policy/type of aspect ratio applied to @p obj. + * @param w Pointer to an integer in which to store the aspect's width + * ratio term. + * @param h Pointer to an integer in which to store the aspect's + * height ratio term. + * + * The different aspect ratio policies are documented in the + * #Evas_Aspect_Control type. A container respecting these size hints + * would @b resize its children accordingly to those policies. + * + * For any policy, if any of the given aspect ratio terms are @c 0, + * the object's container should ignore the aspect and scale @p obj to + * occupy the whole available area. If they are both positive + * integers, that proportion will be respected, under each scaling + * policy. + * + * These images illustrate some of the #Evas_Aspect_Control policies: + * + * @image html any-policy.png + * @image rtf any-policy.png + * @image latex any-policy.eps + * + * @image html aspect-control-none-neither.png + * @image rtf aspect-control-none-neither.png + * @image latex aspect-control-none-neither.eps + * + * @image html aspect-control-both.png + * @image rtf aspect-control-both.png + * @image latex aspect-control-both.eps + * + * @image html aspect-control-horizontal.png + * @image rtf aspect-control-horizontal.png + * @image latex aspect-control-horizontal.eps + * + * This is not a size enforcement in any way, it's just a hint that + * should be used whenever appropriate. + * + * @note Use @c NULL pointers on the hint components you're not + * interested in: they'll be ignored by the function. + * + * Example: + * @dontinclude evas-aspect-hints.c + * @skip if (strcmp(ev->keyname, "c") == 0) + * @until } + * + * See the full @ref Example_Evas_Aspect_Hints "example". + * + * @see evas_object_size_hint_aspect_set() + */ +EAPI void evas_object_size_hint_aspect_get (const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + +/** + * Sets the hints for an object's aspect ratio. + * + * @param obj The given Evas object to query hints from. + * @param aspect The policy/type of aspect ratio to apply to @p obj. + * @param w Integer to use as aspect width ratio term. + * @param h Integer to use as aspect height ratio term. + * + * This is not a size enforcement in any way, it's just a hint that should + * be used whenever appropriate. + * + * If any of the given aspect ratio terms are @c 0, + * the object's container will ignore the aspect and scale @p obj to + * occupy the whole available area, for any given policy. + * + * @see evas_object_size_hint_aspect_get() for more information. + */ +EAPI void evas_object_size_hint_aspect_set (Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + +/** + * Retrieves the hints for on object's alignment. + * + * @param obj The given Evas object to query hints from. + * @param x Pointer to a double in which to store the horizontal + * alignment hint. + * @param y Pointer to a double in which to store the vertical + * alignment hint. + * + * This is not a size enforcement in any way, it's just a hint that + * should be used whenever appropriate. + * + * @note Use @c NULL pointers on the hint components you're not + * interested in: they'll be ignored by the function. + * + * @see evas_object_size_hint_align_set() for more information + */ +EAPI void evas_object_size_hint_align_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); + +/** + * Sets the hints for an object's alignment. + * + * @param obj The given Evas object to query hints from. + * @param x Double, ranging from @c 0.0 to @c 1.0 or with the + * special value #EVAS_HINT_FILL, to use as horizontal alignment hint. + * @param y Double, ranging from @c 0.0 to @c 1.0 or with the + * special value #EVAS_HINT_FILL, to use as vertical alignment hint. + * + * These are hints on how to align an object inside the boundaries + * of a container/manager. Accepted values are in the @c 0.0 to @c + * 1.0 range, with the special value #EVAS_HINT_FILL used to specify + * "justify" or "fill" by some users. In this case, maximum size hints + * should be enforced with higher priority, if they are set. Also, any + * padding hint set on objects should add up to the alignment space on + * the final scene composition. + * + * See documentation of possible users: in Evas, they are the @ref + * Evas_Object_Box "box" and @ref Evas_Object_Table "table" smart + * objects. + * + * For the horizontal component, @c 0.0 means to the left, @c 1.0 + * means to the right. Analogously, for the vertical component, @c 0.0 + * to the top, @c 1.0 means to the bottom. + * + * See the following figure: + * + * @image html alignment-hints.png + * @image rtf alignment-hints.png + * @image latex alignment-hints.eps + * + * This is not a size enforcement in any way, it's just a hint that + * should be used whenever appropriate. + * + * Example: + * @dontinclude evas-hints.c + * @skip evas_object_size_hint_align_set + * @until return + * + * In this example the alignment hints change de behavior of an Evas + * box when layouting its children. See the full @ref + * Example_Evas_Size_Hints "example". + * + * @see evas_object_size_hint_align_get() + * @see evas_object_size_hint_max_set() + * @see evas_object_size_hint_padding_set() + */ +EAPI void evas_object_size_hint_align_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); + +/** + * Retrieves the hints for an object's weight. + * + * @param obj The given Evas object to query hints from. + * @param x Pointer to a double in which to store the horizontal weight. + * @param y Pointer to a double in which to store the vertical weight. + * + * Accepted values are zero or positive values. Some users might use + * this hint as a boolean, but some might consider it as a @b + * proportion, see documentation of possible users, which in Evas are + * the @ref Evas_Object_Box "box" and @ref Evas_Object_Table "table" + * smart objects. + * + * This is not a size enforcement in any way, it's just a hint that + * should be used whenever appropriate. + * + * @note Use @c NULL pointers on the hint components you're not + * interested in: they'll be ignored by the function. + * + * @see evas_object_size_hint_weight_set() for an example + */ +EAPI void evas_object_size_hint_weight_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); + +/** + * Sets the hints for an object's weight. + * + * @param obj The given Evas object to query hints from. + * @param x Nonnegative double value to use as horizontal weight hint. + * @param y Nonnegative double value to use as vertical weight hint. + * + * This is not a size enforcement in any way, it's just a hint that + * should be used whenever appropriate. + * + * This is a hint on how a container object should @b resize a given + * child within its area. Containers may adhere to the simpler logic + * of just expanding the child object's dimensions to fit its own (see + * the #EVAS_HINT_EXPAND helper weight macro) or the complete one of + * taking each child's weight hint as real @b weights to how much of + * its size to allocate for them in each axis. A container is supposed + * to, after @b normalizing the weights of its children (with weight + * hints), distribute the space it has to layout them by those factors + * -- most weighted children get larger in this process than the least + * ones. + * + * Example: + * @dontinclude evas-hints.c + * @skip evas_object_size_hint_weight_set + * @until return + * + * In this example the weight hints change de behavior of an Evas box + * when layouting its children. See the full @ref + * Example_Evas_Size_Hints "example". + * + * @see evas_object_size_hint_weight_get() for more information + */ +EAPI void evas_object_size_hint_weight_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); + +/** + * Retrieves the hints for an object's padding space. + * + * @param obj The given Evas object to query hints from. + * @param l Pointer to an integer in which to store left padding. + * @param r Pointer to an integer in which to store right padding. + * @param t Pointer to an integer in which to store top padding. + * @param b Pointer to an integer in which to store bottom padding. + * + * Padding is extra space an object takes on each of its delimiting + * rectangle sides, in canvas units. This space will be rendered + * transparent, naturally, as in the following figure: + * + * @image html padding-hints.png + * @image rtf padding-hints.png + * @image latex padding-hints.eps + * + * This is not a size enforcement in any way, it's just a hint that + * should be used whenever appropriate. + * + * @note Use @c NULL pointers on the hint components you're not + * interested in: they'll be ignored by the function. + * + * Example: + * @dontinclude evas-hints.c + * @skip evas_object_size_hint_padding_set + * @until return + * + * In this example the padding hints change de behavior of an Evas box + * when layouting its children. See the full @ref + * Example_Evas_Size_Hints "example". + * + * @see evas_object_size_hint_padding_set() + */ +EAPI void evas_object_size_hint_padding_get (const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1); + +/** + * Sets the hints for an object's padding space. + * + * @param obj The given Evas object to query hints from. + * @param l Integer to specify left padding. + * @param r Integer to specify right padding. + * @param t Integer to specify top padding. + * @param b Integer to specify bottom padding. + * + * This is not a size enforcement in any way, it's just a hint that + * should be used whenever appropriate. + * + * @see evas_object_size_hint_padding_get() for more information + */ +EAPI void evas_object_size_hint_padding_set (Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) EINA_ARG_NONNULL(1); + +/** + * @} + */ + +/** + * @defgroup Evas_Object_Group_Extras Extra Object Manipulation + * + * Miscellaneous functions that also apply to any object, but are less + * used or not implemented by all objects. + * + * Examples on this group of functions can be found @ref + * Example_Evas_Stacking "here" and @ref Example_Evas_Events "here". + * + * @ingroup Evas_Object_Group + */ + +/** + * @addtogroup Evas_Object_Group_Extras + * @{ + */ + +/** + * Set an attached data pointer to an object with a given string key. + * + * @param obj The object to attach the data pointer to + * @param key The string key for the data to access it + * @param data The ponter to the data to be attached + * + * This attaches the pointer @p data to the object @p obj, given the + * access string @p key. This pointer will stay "hooked" to the object + * until a new pointer with the same string key is attached with + * evas_object_data_set() or it is deleted with + * evas_object_data_del(). On deletion of the object @p obj, the + * pointers will not be accessible from the object anymore. + * + * You can find the pointer attached under a string key using + * evas_object_data_get(). It is the job of the calling application to + * free any data pointed to by @p data when it is no longer required. + * + * If @p data is @c NULL, the old value stored at @p key will be + * removed but no new value will be stored. This is synonymous with + * calling evas_object_data_del() with @p obj and @p key. + * + * @note This function is very handy when you have data associated + * specifically to an Evas object, being of use only when dealing with + * it. Than you don't have the burden to a pointer to it elsewhere, + * using this family of functions. + * + * Example: + * + * @code + * int *my_data; + * extern Evas_Object *obj; + * + * my_data = malloc(500); + * evas_object_data_set(obj, "name_of_data", my_data); + * printf("The data that was attached was %p\n", evas_object_data_get(obj, "name_of_data")); + * @endcode + */ +EAPI void evas_object_data_set (Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Return an attached data pointer on an Evas object by its given + * string key. + * + * @param obj The object to which the data was attached + * @param key The string key the data was stored under + * @return The data pointer stored, or @c NULL if none was stored + * + * This function will return the data pointer attached to the object + * @p obj, stored using the string key @p key. If the object is valid + * and a data pointer was stored under the given key, that pointer + * will be returned. If this is not the case, @c NULL will be + * returned, signifying an invalid object or a non-existent key. It is + * possible that a @c NULL pointer was stored given that key, but this + * situation is non-sensical and thus can be considered an error as + * well. @c NULL pointers are never stored as this is the return value + * if an error occurs. + * + * Example: + * + * @code + * int *my_data; + * extern Evas_Object *obj; + * + * my_data = evas_object_data_get(obj, "name_of_my_data"); + * if (my_data) printf("Data stored was %p\n", my_data); + * else printf("No data was stored on the object\n"); + * @endcode + */ +EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + +/** + * Delete an attached data pointer from an object. + * + * @param obj The object to delete the data pointer from + * @param key The string key the data was stored under + * @return The original data pointer stored at @p key on @p obj + * + * This will remove the stored data pointer from @p obj stored under + * @p key and return this same pointer, if actually there was data + * there, or @c NULL, if nothing was stored under that key. + * + * Example: + * + * @code + * int *my_data; + * extern Evas_Object *obj; + * + * my_data = evas_object_data_del(obj, "name_of_my_data"); + * @endcode + */ +EAPI void *evas_object_data_del (Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2); + + +/** + * Set pointer behavior. + * + * @param obj + * @param setting desired behavior. + * + * This function has direct effect on event callbacks related to + * mouse. + * + * If @p setting is EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse + * is down at this object, events will be restricted to it as source, + * mouse moves, for example, will be emitted even if outside this + * object area. + * + * If @p setting is EVAS_OBJECT_POINTER_MODE_NOGRAB, then events will + * be emitted just when inside this object area. + * + * The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB. + * + * @ingroup Evas_Object_Group_Extras + */ +EAPI void evas_object_pointer_mode_set (Evas_Object *obj, Evas_Object_Pointer_Mode setting) EINA_ARG_NONNULL(1); + +/** + * Determine how pointer will behave. + * @param obj + * @return pointer behavior. + * @ingroup Evas_Object_Group_Extras + */ +EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Sets whether or not the given Evas object is to be drawn anti-aliased. + * + * @param obj The given Evas object. + * @param anti_alias 1 if the object is to be anti_aliased, 0 otherwise. + * @ingroup Evas_Object_Group_Extras + */ +EAPI void evas_object_anti_alias_set (Evas_Object *obj, Eina_Bool antialias) EINA_ARG_NONNULL(1); + +/** + * Retrieves whether or not the given Evas object is to be drawn anti_aliased. + * @param obj The given Evas object. + * @return @c 1 if the object is to be anti_aliased. @c 0 otherwise. + * @ingroup Evas_Object_Group_Extras + */ +EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Sets the scaling factor for an Evas object. Does not affect all + * objects. + * + * @param obj The given Evas object. + * @param scale The scaling factor. 1.0 means no scaling, + * default size. + * + * This will multiply the object's dimension by the given factor, thus + * altering its geometry (width and height). Useful when you want + * scalable UI elements, possibly at run time. + * + * @note Only text and textblock objects have scaling change + * handlers. Other objects won't change visually on this call. + * + * @see evas_object_scale_get() + * + * @ingroup Evas_Object_Group_Extras + */ +EAPI void evas_object_scale_set (Evas_Object *obj, double scale) EINA_ARG_NONNULL(1); + +/** + * Retrieves the scaling factor for the given Evas object. + * + * @param obj The given Evas object. + * @return The scaling factor. + * + * @ingroup Evas_Object_Group_Extras + * + * @see evas_object_scale_set() + */ +EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Sets the render_op to be used for rendering the Evas object. + * @param obj The given Evas object. + * @param render_op one of the Evas_Render_Op values. + * @ingroup Evas_Object_Group_Extras + */ +EAPI void evas_object_render_op_set (Evas_Object *obj, Evas_Render_Op op) EINA_ARG_NONNULL(1); + +/** + * Retrieves the current value of the operation used for rendering the Evas object. + * @param obj The given Evas object. + * @return one of the enumerated values in Evas_Render_Op. + * @ingroup Evas_Object_Group_Extras + */ +EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set whether to use precise (usually expensive) point collision + * detection for a given Evas object. + * + * @param obj The given object. + * @param precise whether to use precise point collision detection or + * not The default value is false. + * + * Use this function to make Evas treat objects' transparent areas as + * @b not belonging to it with regard to mouse pointer events. By + * default, all of the object's boundary rectangle will be taken in + * account for them. + * + * @warning By using precise point collision detection you'll be + * making Evas more resource intensive. + * + * Example code follows. + * @dontinclude evas-events.c + * @skip if (strcmp(ev->keyname, "p") == 0) + * @until } + * + * See the full example @ref Example_Evas_Events "here". + * + * @see evas_object_precise_is_inside_get() + * @ingroup Evas_Object_Group_Extras + */ + EAPI void evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1); + +/** + * Determine whether an object is set to use precise point collision + * detection. + * + * @param obj The given object. + * @return whether @p obj is set to use precise point collision + * detection or not The default value is false. + * + * @see evas_object_precise_is_inside_set() for an example + * + * @ingroup Evas_Object_Group_Extras + */ + EAPI Eina_Bool evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set a hint flag on the given Evas object that it's used as a "static + * clipper". + * + * @param obj The given object. + * @param is_static_clip @c EINA_TRUE if it's to be used as a static + * clipper, @c EINA_FALSE otherwise + * + * This is a hint to Evas that this object is used as a big static + * clipper and shouldn't be moved with children and otherwise + * considered specially. The default value for new objects is @c + * EINA_FALSE. + * + * @see evas_object_static_clip_get() + * + * @ingroup Evas_Object_Group_Extras + */ + EAPI void evas_object_static_clip_set (Evas_Object *obj, Eina_Bool is_static_clip) EINA_ARG_NONNULL(1); + +/** + * Get the "static clipper" hint flag for a given Evas object. + * + * @param obj The given object. + * @returrn @c EINA_TRUE if it's set as a static clipper, @c + * EINA_FALSE otherwise + * + * @see evas_object_static_clip_set() for more details + * + * @ingroup Evas_Object_Group_Extras + */ + EAPI Eina_Bool evas_object_static_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @} + */ + +/** + * @defgroup Evas_Object_Group_Find Finding Objects + * + * Functions that allows finding objects by their position, name or + * other properties. + * + * @ingroup Evas_Object_Group + */ + +/** + * @addtogroup Evas_Object_Group_Find + * @{ + */ + +/** + * Retrieve the object that currently has focus. + * + * @param e The Evas canvas to query for focused object on. + * @return The object that has focus or @c NULL if there is not one. + * + * Evas can have (at most) one of its objects focused at a time. + * Focused objects will be the ones having key events delivered + * to, which the programmer can act upon by means of + * evas_object_event_callback_add() usage. + * + * @note Most users wouldn't be dealing directly with Evas' focused + * objects. Instead, they would be using a higher level library for + * that (like a toolkit, as Elementary) to handle focus and who's + * receiving input for them. + * + * This call returns the object that currently has focus on the canvas + * @p e or @c NULL, if none. + * + * @see evas_object_focus_set + * @see evas_object_focus_get + * @see evas_object_key_grab + * @see evas_object_key_ungrab + * + * Example: + * @dontinclude evas-events.c + * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + * @until evas_object_focus_set(d.bg, EINA_TRUE); + * @dontinclude evas-events.c + * @skip called when our rectangle gets focus + * @until } + * + * In this example the @c event_info is exactly a pointer to that + * focused rectangle. See the full @ref Example_Evas_Events "example". + * + * @ingroup Evas_Object_Group_Find + */ +EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Retrieves the object on the given evas with the given name. + * @param e The given evas. + * @param name The given name. + * @return If successful, the Evas object with the given name. Otherwise, + * @c NULL. + * @ingroup Evas_Object_Group_Find + */ +EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Retrieve the Evas object stacked at the top of a given position in + * a canvas + * + * @param e A handle to the canvas. + * @param x The horizontal coordinate of the position + * @param y The vertical coordinate of the position + * @param include_pass_events_objects Boolean flag to include or not + * objects which pass events in this calculation + * @param include_hidden_objects Boolean flag to include or not hidden + * objects in this calculation + * @return The Evas object that is over all other objects at the given + * position. + * + * This function will traverse all the layers of the given canvas, + * from top to bottom, querying for objects with areas covering the + * given position. The user can remove from from the query + * objects which are hidden and/or which are set to pass events. + * + * @warning This function will @b skip objects parented by smart + * objects, acting only on the ones at the "top level", with regard to + * object parenting. + */ +EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Retrieve the Evas object stacked at the top at the position of the + * mouse cursor, over a given canvas + * + * @param e A handle to the canvas. + * @return The Evas object that is over all other objects at the mouse + * pointer's position + * + * This function will traverse all the layers of the given canvas, + * from top to bottom, querying for objects with areas covering the + * mouse pointer's position, over @p e. + * + * @warning This function will @b skip objects parented by smart + * objects, acting only on the ones at the "top level", with regard to + * object parenting. + */ +EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Retrieve the Evas object stacked at the top of a given rectangular + * region in a canvas + * + * @param e A handle to the canvas. + * @param x The top left corner's horizontal coordinate for the + * rectangular region + * @param y The top left corner's vertical coordinate for the + * rectangular region + * @param w The width of the rectangular region + * @param h The height of the rectangular region + * @param include_pass_events_objects Boolean flag to include or not + * objects which pass events in this calculation + * @param include_hidden_objects Boolean flag to include or not hidden + * objects in this calculation + * @return The Evas object that is over all other objects at the given + * rectangular region. + * + * This function will traverse all the layers of the given canvas, + * from top to bottom, querying for objects with areas overlapping + * with the given rectangular region inside @p e. The user can remove + * from the query objects which are hidden and/or which are set to + * pass events. + * + * @warning This function will @b skip objects parented by smart + * objects, acting only on the ones at the "top level", with regard to + * object parenting. + */ +EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Retrieve a list of Evas objects lying over a given position in + * a canvas + * + * @param e A handle to the canvas. + * @param x The horizontal coordinate of the position + * @param y The vertical coordinate of the position + * @param include_pass_events_objects Boolean flag to include or not + * objects which pass events in this calculation + * @param include_hidden_objects Boolean flag to include or not hidden + * objects in this calculation + * @return The list of Evas objects that are over the given position + * in @p e + * + * This function will traverse all the layers of the given canvas, + * from top to bottom, querying for objects with areas covering the + * given position. The user can remove from from the query + * objects which are hidden and/or which are set to pass events. + * + * @warning This function will @b skip objects parented by smart + * objects, acting only on the ones at the "top level", with regard to + * object parenting. + */ +EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Eina_List *evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Get the lowest (stacked) Evas object on the canvas @p + * + * @param e a valid canvas pointer + * @return a pointer to the lowest object on it, if any, or @c NULL, + * otherwise + * + * This function will take all populated layers in the canvas into + * account, getting the lowest object for the lowest layer, naturally. + * + * @see evas_object_layer_get() + * @see evas_object_layer_set() + * @see evas_object_below_get() + * @see evas_object_above_get() + * + * @warning This function will @b skip objects parented by smart + * objects, acting only on the ones at the "top level", with regard to + * object parenting. + */ +EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Get the highest (stacked) Evas object on the canvas @p + * + * @param e a valid canvas pointer + * @return a pointer to the highest object on it, if any, or @c NULL, + * otherwise + * + * This function will take all populated layers in the canvas into + * account, getting the highest object for the highest layer, + * naturally. + * + * @see evas_object_layer_get() + * @see evas_object_layer_set() + * @see evas_object_below_get() + * @see evas_object_above_get() + * + * @warning This function will @b skip objects parented by smart + * objects, acting only on the ones at the "top level", with regard to + * object parenting. + */ +EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @} + */ + +/** + * @defgroup Evas_Object_Group_Interceptors Object Method Interceptors + * + * Evas provides a way to intercept method calls. The interceptor + * callback may opt to completely deny the call, or may check and + * change the parameters before continuing. The continuation of an + * intercepted call is done by calling the intercepted call again, + * from inside the interceptor callback. + * + * @ingroup Evas_Object_Group + */ + +/** + * @addtogroup Evas_Object_Group_Interceptors + * @{ + */ + +typedef void (*Evas_Object_Intercept_Show_Cb) (void *data, Evas_Object *obj); +typedef void (*Evas_Object_Intercept_Hide_Cb) (void *data, Evas_Object *obj); +typedef void (*Evas_Object_Intercept_Move_Cb) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y); +typedef void (*Evas_Object_Intercept_Resize_Cb) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h); +typedef void (*Evas_Object_Intercept_Raise_Cb) (void *data, Evas_Object *obj); +typedef void (*Evas_Object_Intercept_Lower_Cb) (void *data, Evas_Object *obj); +typedef void (*Evas_Object_Intercept_Stack_Above_Cb) (void *data, Evas_Object *obj, Evas_Object *above); +typedef void (*Evas_Object_Intercept_Stack_Below_Cb) (void *data, Evas_Object *obj, Evas_Object *above); +typedef void (*Evas_Object_Intercept_Layer_Set_Cb) (void *data, Evas_Object *obj, int l); +typedef void (*Evas_Object_Intercept_Color_Set_Cb) (void *data, Evas_Object *obj, int r, int g, int b, int a); +typedef void (*Evas_Object_Intercept_Clip_Set_Cb) (void *data, Evas_Object *obj, Evas_Object *clip); +typedef void (*Evas_Object_Intercept_Clip_Unset_Cb) (void *data, Evas_Object *obj); + +/** + * Set the callback function that intercepts a show event of a object. + * + * @param obj The given canvas object pointer. + * @param func The given function to be the callback function. + * @param data The data passed to the callback function. + * + * This function sets a callback function to intercepts a show event + * of a canvas object. + * + * @see evas_object_intercept_show_callback_del(). + * + */ +EAPI void evas_object_intercept_show_callback_add (Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Unset the callback function that intercepts a show event of a + * object. + * + * @param obj The given canvas object pointer. + * @param func The given callback function. + * + * This function sets a callback function to intercepts a show event + * of a canvas object. + * + * @see evas_object_intercept_show_callback_add(). + * + */ +EAPI void *evas_object_intercept_show_callback_del (Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) EINA_ARG_NONNULL(1, 2); + +/** + * Set the callback function that intercepts a hide event of a object. + * + * @param obj The given canvas object pointer. + * @param func The given function to be the callback function. + * @param data The data passed to the callback function. + * + * This function sets a callback function to intercepts a hide event + * of a canvas object. + * + * @see evas_object_intercept_hide_callback_del(). + * + */ +EAPI void evas_object_intercept_hide_callback_add (Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Unset the callback function that intercepts a hide event of a + * object. + * + * @param obj The given canvas object pointer. + * @param func The given callback function. + * + * This function sets a callback function to intercepts a hide event + * of a canvas object. + * + * @see evas_object_intercept_hide_callback_add(). + * + */ +EAPI void *evas_object_intercept_hide_callback_del (Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) EINA_ARG_NONNULL(1, 2); + +/** + * Set the callback function that intercepts a move event of a object. + * + * @param obj The given canvas object pointer. + * @param func The given function to be the callback function. + * @param data The data passed to the callback function. + * + * This function sets a callback function to intercepts a move event + * of a canvas object. + * + * @see evas_object_intercept_move_callback_del(). + * + */ +EAPI void evas_object_intercept_move_callback_add (Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Unset the callback function that intercepts a move event of a + * object. + * + * @param obj The given canvas object pointer. + * @param func The given callback function. + * + * This function sets a callback function to intercepts a move event + * of a canvas object. + * + * @see evas_object_intercept_move_callback_add(). + * + */ +EAPI void *evas_object_intercept_move_callback_del (Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) EINA_ARG_NONNULL(1, 2); + + EAPI void evas_object_intercept_resize_callback_add (Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_resize_callback_del (Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_raise_callback_add (Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_raise_callback_del (Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_lower_callback_add (Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_lower_callback_del (Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_stack_above_callback_add (Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_stack_above_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_stack_below_callback_add (Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_stack_below_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_layer_set_callback_add (Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_layer_set_callback_del (Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_color_set_callback_add (Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_color_set_callback_del (Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_clip_set_callback_add (Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_clip_set_callback_del (Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) EINA_ARG_NONNULL(1, 2); + EAPI void evas_object_intercept_clip_unset_callback_add (Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + EAPI void *evas_object_intercept_clip_unset_callback_del (Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) EINA_ARG_NONNULL(1, 2); + +/** + * @} + */ + +/** + * @defgroup Evas_Object_Specific Specific Object Functions + * + * Functions that work on specific objects. + * + */ + +/** + * @defgroup Evas_Object_Rectangle Rectangle Object Functions + * + * @brief Function to create evas rectangle objects. + * + * This function may seem useless given there are no functions to manipulate + * the created rectangle, however the rectangle is actually very useful and can + * be manipulate using the generic @ref Evas_Object_Group + * "evas object functions". + * + * For an example of use of an evas_object_rectangle see @ref + * Example_Evas_Object_Manipulation "here". + * + * @ingroup Evas_Object_Specific + */ + +/** + * Adds a rectangle to the given evas. + * @param e The given evas. + * @return The new rectangle object. + * + * @ingroup Evas_Object_Rectangle + */ +EAPI Evas_Object *evas_object_rectangle_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * @defgroup Evas_Object_Image Image Object Functions + * + * Here are grouped together functions used to create and manipulate + * image objects. They are available to whichever occasion one needs + * complex imagery on a GUI that could not be achieved by the other + * Evas' primitive object types, or to make image manipulations. + * + * Evas will support whichever image file types it was compiled with + * support to (its image loaders) -- check your software packager for + * that information and see + * evas_object_image_extension_can_load_get(). + * + * @section Evas_Object_Image_Basics Image object basics + * + * The most common use of image objects -- to display an image on the + * canvas -- is achieved by a common function triplet: + * @code + * img = evas_object_image_add(canvas); + * evas_object_image_file_set(img, "path/to/img", NULL); + * evas_object_image_fill_set(img, 0, 0, w, h); + * @endcode + * The first function, naturally, is creating the image object. Then, + * one must set an source file on it, so that it knows where to fetch + * image data from. Next, one must set how to fill the image + * object's area with that given pixel data. One could use just a + * sub-region of the original image or even have it tiled repeatedly + * on the image object. For the common case of having the whole source + * image to be displayed on the image object, streched to the + * destination's size, there's also a function helper, to be used + * instead of evas_object_image_fill_set(): + * @code + * evas_object_image_filled_set(img, EINA_TRUE); + * @endcode + * See those functions' documentation for more details. + * + * @section Evas_Object_Image_Scale Scale and resizing + * + * Resizing of image objects will scale their respective source images + * to their areas, if they are set to "fill" the object's area + * (evas_object_image_filled_set()). If the user wants any control on + * the aspect ratio of an image for different sizes, he/she has to + * take care of that themselves. There are functions to make images to + * get loaded scaled (up or down) in memory, already, if the user is + * going to use them at pre-determined sizes and wants to save + * computations. + * + * Evas has even a scale cache, which will take care of caching scaled + * versions of images with more often usage/hits. Finally, one can + * have images being rescaled @b smoothly by Evas (more + * computationally expensive) or not. + * + * @section Evas_Object_Image_Performance Performance hints + * + * When dealing with image objects, there are some tricks to boost the + * performance of your application, if it does intense image loading + * and/or manipulations, as in animations on a UI. + * + * @subsection Evas_Object_Image_Load Load hints + * + * In image viewer applications, for example, the user will be looking + * at a given image, at full size, and will desire that the navigation + * to the adjacent images on his/her album be fluid and fast. Thus, + * while displaying a given image, the program can be on the + * background loading the next and previous imagens already, so that + * displaying them on the sequence is just a matter of repainting the + * screen (and not decoding image data). + * + * Evas addresses this issue with image pre-loading. The code + * for the situation above would be something like the following: + * @code + * prev = evas_object_image_filled_add(canvas); + * evas_object_image_file_set(prev, "/path/to/prev", NULL); + * evas_object_image_preload(prev, EINA_TRUE); + * + * next = evas_object_image_filled_add(canvas); + * evas_object_image_file_set(next, "/path/to/next", NULL); + * evas_object_image_preload(next, EINA_TRUE); + * @endcode + * + * If you're loading images which are too big, consider setting + * previously it's loading size to something smaller, in case you + * won't expose them in real size. It may speed up the loading + * considerably: + * @code + * //to load a scaled down version of the image in memory, if that's + * //the size you'll be displaying it anyway + * evas_object_image_load_scale_down_set(img, zoom); + * + * //optional: if you know you'll be showing a sub-set of the image's + * //pixels, you can avoid loading the complementary data + * evas_object_image_load_region_set(img, x, y, w, h); + * @endcode + * Refer to Elementary's Photocam widget for a high level (smart) + * object which does lots of loading speed-ups for you. + * + * @subsection Evas_Object_Image_Animation Animation hints + * + * If you want to animate image objects on a UI (what you'd get by + * concomitant usage of other libraries, like Ecore and Edje), there + * are also some tips on how to boost the performance of your + * application. If the animation involves resizing of an image (thus, + * re-scaling), you'd better turn off smooth scaling on it @b during + * the animation, turning it back on afterwrads, for less + * computations. Also, in this case you'd better flag the image object + * in question not to cache scaled versions of it: + * @code + * evas_object_image_scale_hint_set(wd->img, EVAS_IMAGE_SCALE_HINT_DYNAMIC); + * + * // resizing takes place in between + * + * evas_object_image_scale_hint_set(wd->img, EVAS_IMAGE_SCALE_HINT_STATIC); + * @endcode + * + * Finally, movement of opaque images through the canvas is less + * expensive than of translucid ones, because of blending + * computations. + * + * @section Evas_Object_Image_Borders Borders + * + * Evas provides facilities for one to specify an image's region to be + * treated specially -- as "borders". This will make those regions be + * treated specially on resizing scales, by keeping their aspect. This + * makes setting frames around other objects on UIs easy. + * See the following figures for a visual explanation:\n + * @htmlonly + * + * Full-size + * @endhtmlonly + * @image rtf image-borders.png + * @image latex image-borders.eps width=\textwidth + * @htmlonly + * + * Full-size + * @endhtmlonly + * @image rtf border-effect.png + * @image latex border-effect.eps width=\textwidth + * + * @section Evas_Object_Image_Manipulation Manipulating pixels + * + * Evas image objects can be used to manipulate raw pixels in many + * ways. The meaning of the data in the pixel arrays will depend on + * the image's color space, be warned (see next section). You can set + * your own data as an image's pixel data, fetch an image's pixel data + * for saving/altering, convert images between different color spaces + * and even advanced operations like setting a native surface as image + * objecs' data. + * + * @section Evas_Object_Image_Color_Spaces Color spaces + * + * Image objects may return or accept "image data" in multiple + * formats. This is based on the color space of an object. Here is a + * rundown on formats: + * + * - #EVAS_COLORSPACE_ARGB8888: + * . + * This pixel format is a linear block of pixels, starting at the + * top-left row by row until the bottom right of the image or pixel + * region. All pixels are 32-bit unsigned int's with the high-byte + * being alpha and the low byte being blue in the format ARGB. Alpha + * may or may not be used by evas depending on the alpha flag of the + * image, but if not used, should be set to 0xff anyway. + * \n\n + * This colorspace uses premultiplied alpha. That means that R, G + * and B cannot exceed A in value. The conversion from + * non-premultiplied colorspace is: + * \n\n + * R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255; + * \n\n + * So 50% transparent blue will be: 0x80000080. This will not be + * "dark" - just 50% transparent. Values are 0 == black, 255 == + * solid or full red, green or blue. + * + * - #EVAS_COLORSPACE_YCBCR422P601_PL: + * . + * This is a pointer-list indirected set of YUV (YCbCr) pixel + * data. This means that the data returned or set is not actual + * pixel data, but pointers TO lines of pixel data. The list of + * pointers will first be N rows of pointers to the Y plane - + * pointing to the first pixel at the start of each row in the Y + * plane. N is the height of the image data in pixels. Each pixel in + * the Y, U and V planes is 1 byte exactly, packed. The next N / 2 + * pointers will point to rows in the U plane, and the next N / 2 + * pointers will point to the V plane rows. U and V planes are half + * the horizontal and vertical resolution of the Y plane. + * \n\n + * Row order is top to bottom and row pixels are stored left to + * right. + * \n\n + * There is a limitation that these images MUST be a multiple of 2 + * pixels in size horizontally or vertically. This is due to the U + * and V planes being half resolution. Also note that this assumes + * the itu601 YUV colorspace specification. This is defined for + * standard television and mpeg streams. HDTV may use the itu709 + * specification. + * \n\n + * Values are 0 to 255, indicating full or no signal in that plane + * respectively. + * + * - #EVAS_COLORSPACE_YCBCR422P709_PL: + * . + * Not implemented yet. + * + * - #EVAS_COLORSPACE_RGB565_A5P: + * . + * In the process of being implemented in 1 engine only. This may + * change. + * \n\n + * This is a pointer to image data for 16-bit half-word pixel data + * in 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue), + * with the high-byte containing red and the low byte containing + * blue, per pixel. This data is packed row by row from the top-left + * to the bottom right. + * \n\n + * If the image has an alpha channel enabled there will be an extra + * alpha plane after the color pixel plane. If not, then this data + * will not exist and should not be accessed in any way. This plane + * is a set of pixels with 1 byte per pixel defining the alpha + * values of all pixels in the image from the top-left to the bottom + * right of the image, row by row. Even though the values of the + * alpha pixels can be 0 to 255, only values 0 through to 32 are + * used, 32 being solid and 0 being transparent. + * \n\n + * RGB values can be 0 to 31 for red and blue and 0 to 63 for green, + * with 0 being black and 31 or 63 being full red, green or blue + * respectively. This colorspace is also pre-multiplied like + * EVAS_COLORSPACE_ARGB8888 so: + * \n\n + * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32; + * + * - #EVAS_COLORSPACE_GRY8: + * . + * The image is just a alpha mask (8 bit's per pixel). This is used + * for alpha masking. + * + * Some examples on this group of functions can be found @ref + * Example_Evas_Images "here". + * + * @ingroup Evas_Object_Specific + */ + +/** + * @addtogroup Evas_Object_Image + * @{ + */ + +typedef void (*Evas_Object_Image_Pixels_Get_Cb) (void *data, Evas_Object *o); + + +/** + * Creates a new image object on the given Evas @p e canvas. + * + * @param e The given canvas. + * @return The created image object handle. + * + * @note If you intend to @b display an image somehow in a GUI, + * besides binding it to a real image file/source (with + * evas_object_image_file_set(), for example), you'll have to tell + * this image object how to fill its space with the pixels it can get + * from the source. See evas_object_image_filled_add(), for a helper + * on the common case of scaling up an image source to the whole area + * of the image object. + * + * @see evas_object_image_fill_set() + * + * Example: + * @code + * img = evas_object_image_add(canvas); + * evas_object_image_file_set(img, "/path/to/img", NULL); + * @endcode + */ +EAPI Evas_Object *evas_object_image_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Creates a new image object that @b automatically scales its bound + * image to the object's area, on both axis. + * + * @param e The given canvas. + * @return The created image object handle. + * + * This is a helper function around evas_object_image_add() and + * evas_object_image_filled_set(). It has the same effect of applying + * those functions in sequence, which is a very common use case. + * + * @note Whenever this object gets resized, the bound image will be + * rescaled, too. + * + * @see evas_object_image_add() + * @see evas_object_image_filled_set() + * @see evas_object_image_fill_set() + */ +EAPI Evas_Object *evas_object_image_filled_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + + +/** + * Sets the data for an image from memory to be loaded + * + * This is the same as evas_object_image_file_set() but the file to be loaded + * may exist at an address in memory (the data for the file, not the filename + * itself). The @p data at the address is copied and stored for future use, so + * no @p data needs to be kept after this call is made. It will be managed and + * freed for you when no longer needed. The @p size is limited to 2 gigabytes + * in size, and must be greater than 0. A NULL @p data pointer is also invalid. + * Set the filename to NULL to reset to empty state and have the image file + * data freed from memory using evas_object_image_file_set(). + * + * The @p format is optional (pass NULL if you don't need/use it). It is used + * to help Evas guess better which loader to use for the data. It may simply + * be the "extension" of the file as it would normally be on disk such as + * "jpg" or "png" or "gif" etc. + * + * @param obj The given image object. + * @param data The image file data address + * @param size The size of the image file data in bytes + * @param format The format of the file (optional), or @c NULL if not needed + * @param key The image key in file, or @c NULL. + */ +EAPI void evas_object_image_memfile_set (Evas_Object *obj, void *data, int size, char *format, char *key) EINA_ARG_NONNULL(1, 2); + +/** + * Set the source file from where an image object must fetch the real + * image data (it may be an Eet file, besides pure image ones). + * + * @param obj The given image object. + * @param file The image file path. + * @param key The image key in @p file (if its an Eet one), or @c + * NULL, otherwise. + * + * If the file supports multiple data stored in it (as Eet files do), + * you can specify the key to be used as the index of the image in + * this file. + * + * Example: + * @code + * img = evas_object_image_add(canvas); + * evas_object_image_file_set(img, "/path/to/img", NULL); + * err = evas_object_image_load_error_get(img); + * if (err != EVAS_LOAD_ERROR_NONE) + * { + * fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n", + * valid_path, evas_load_error_str(err)); + * } + * else + * { + * evas_object_image_fill_set(img, 0, 0, w, h); + * evas_object_resize(img, w, h); + * evas_object_show(img); + * } + * @endcode + */ +EAPI void evas_object_image_file_set (Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1); + +/** + * Retrieve the source file from where an image object is to fetch the + * real image data (it may be an Eet file, besides pure image ones). + * + * @param obj The given image object. + * @param file Location to store the image file path. + * @param key Location to store the image key (if @p file is an Eet + * one). + * + * You must @b not modify the strings on the returned pointers. + * + * @note Use @c NULL pointers on the file components you're not + * interested in: they'll be ignored by the function. + */ +EAPI void evas_object_image_file_get (const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1, 2); + +/** + * Set the dimensions for an image object's border, a region which @b + * won't ever be scaled together with its center. + * + * @param obj The given image object. + * @param l The border's left width. + * @param r The border's right width. + * @param t The border's top width. + * @param b The border's bottom width. + * + * When Evas is rendering, an image source may be scaled to fit the + * size of its image object. This function sets an area from the + * borders of the image inwards which is @b not to be scaled. This + * function is useful for making frames and for widget theming, where, + * for example, buttons may be of varying sizes, but their border size + * must remain constant. + * + * The units used for @p l, @p r, @p t and @p b are canvas units. + * + * @note The border region itself @b may be scaled by the + * evas_object_image_border_scale_set() function. + * + * @note By default, image objects have no borders set, i. e. @c l, @c + * r, @c t and @c b start as @c 0. + * + * See the following figures for visual explanation:\n + * @htmlonly + * + * Full-size + * @endhtmlonly + * @image rtf image-borders.png + * @image latex image-borders.eps width=\textwidth + * @htmlonly + * + * Full-size + * @endhtmlonly + * @image rtf border-effect.png + * @image latex border-effect.eps width=\textwidth + * + * @see evas_object_image_border_get() + * @see evas_object_image_border_center_fill_set() + */ +EAPI void evas_object_image_border_set (Evas_Object *obj, int l, int r, int t, int b) EINA_ARG_NONNULL(1); + +/** + * Retrieve the dimensions for an image object's border, a region + * which @b won't ever be scaled together with its center. + * + * @param obj The given image object. + * @param l Location to store the border's left width in. + * @param r Location to store the border's right width in. + * @param t Location to store the border's top width in. + * @param b Location to store the border's bottom width in. + * + * @note Use @c NULL pointers on the border components you're not + * interested in: they'll be ignored by the function. + * + * See @ref evas_object_image_border_set() for more details. + */ +EAPI void evas_object_image_border_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1); + +/** + * Sets @b how the center part of the given image object (not the + * borders) should be drawn when Evas is rendering it. + * + * @param obj The given image object. + * @param fill Fill mode of the center region of @p obj (a value in + * #Evas_Border_Fill_Mode). + * + * This function sets how the center part of the image object's source + * image is to be drawn, which must be one of the values in + * #Evas_Border_Fill_Mode. By center we mean the complementary part of + * that defined by evas_object_image_border_set(). This one is very + * useful for making frames and decorations. You would most probably + * also be using a filled image (as in evas_object_image_filled_set()) + * to use as a frame. + * + * @see evas_object_image_border_center_fill_get() + */ +EAPI void evas_object_image_border_center_fill_set (Evas_Object *obj, Evas_Border_Fill_Mode fill) EINA_ARG_NONNULL(1); + +/** + * Retrieves @b how the center part of the given image object (not the + * borders) is to be drawn when Evas is rendering it. + * + * @param obj The given image object. + * @return fill Fill mode of the center region of @p obj (a value in + * #Evas_Border_Fill_Mode). + * + * See @ref evas_object_image_fill_set() for more details. + */ +EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set whether the image object's fill property should track the + * object's size. + * + * @param obj The given image object. + * @param setting @c EINA_TRUE, to make the fill property follow + * object size or @c EINA_FALSE, otherwise + * + * If @p setting is @c EINA_TRUE, then every evas_object_resize() will + * @b automatically trigger a call to evas_object_image_fill_set() + * with the that new size (and @c 0, @c 0 as source image's origin), + * so the bound image will fill the whole object's area. + * + * @see evas_object_image_filled_add() + * @see evas_object_image_fill_get() + */ +EAPI void evas_object_image_filled_set (Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1); + +/** + * Retrieve whether the image object's fill property should track the + * object's size. + * + * @param obj The given image object. + * @return @c EINA_TRUE if it is tracking, @c EINA_FALSE, if not (and + * evas_object_fill_set() must be called manually). + * + * @see evas_object_image_filled_set() for more information + */ +EAPI Eina_Bool evas_object_image_filled_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Sets the scaling factor (multiplier) for the borders of an image + * object. + * + * @param obj The given image object. + * @param scale The scale factor (default is @c 1.0 - i.e. no scaling) + * + * @see evas_object_image_border_set() + * @see evas_object_image_border_scale_get() + */ +EAPI void evas_object_image_border_scale_set (Evas_Object *obj, double scale); + +/** + * Retrieves the scaling factor (multiplier) for the borders of an + * image object. + * + * @param obj The given image object. + * @return The scale factor set for its borders + * + * @see evas_object_image_border_set() + * @see evas_object_image_border_scale_set() + */ +EAPI double evas_object_image_border_scale_get (const Evas_Object *obj); + +/** + * Set how to fill an image object's drawing rectangle given the + * (real) image bound to it. + * + * @param obj The given image object to operate on. + * @param x The x coordinate (from the top left corner of the bound + * image) to start drawing from. + * @param y The y coordinate (from the top left corner of the bound + * image) to start drawing from. + * @param w The width the bound image will be displayed at. + * @param h The height the bound image will be displayed at. + * + * Note that if @p w or @p h are smaller than the dimensions of + * @p obj, the displayed image will be @b tiled around the object's + * area. To have only one copy of the bound image drawn, @p x and @p y + * must be 0 and @p w and @p h need to be the exact width and height + * of the image object itself, respectively. + * + * See the following image to better understand the effects of this + * call. On this diagram, both image object and original image source + * have @c a x @c a dimentions and the image itself is a circle, with + * empty space around it: + * + * @image html image-fill.png + * @image rtf image-fill.png + * @image latex image-fill.eps + * + * @warning The default values for the fill parameters are @p x = 0, + * @p y = 0, @p w = 0 and @p h = 0. Thus, if you're not using the + * evas_object_image_filled_add() helper and want your image + * displayed, you'll have to set valid values with this fuction on + * your object. + * + * @note evas_object_image_filled_set() is a helper function which + * will @b override the values set here automatically, for you, in a + * given way. + */ +EAPI void evas_object_image_fill_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); + +/** + * Retrieve how an image object is to fill its drawing rectangle, + * given the (real) image bound to it. + * + * @param obj The given image object. + * @param x Location to store the x coordinate (from the top left + * corner of the bound image) to start drawing from. + * @param y Location to store the y coordinate (from the top left + * corner of the bound image) to start drawing from. + * @param w Location to store the width the bound image is to be + * displayed at. + * @param h Location to store the height the bound image is to be + * displayed at. + * + * @note Use @c NULL pointers on the fill components you're not + * interested in: they'll be ignored by the function. + * + * See @ref evas_object_image_fill_set() for more details. + */ +EAPI void evas_object_image_fill_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + +/** + * Sets the tiling mode for the given evas image object's fill. + * @param obj The given evas image object. + * @param spread One of EVAS_TEXTURE_REFLECT, EVAS_TEXTURE_REPEAT, + * EVAS_TEXTURE_RESTRICT, or EVAS_TEXTURE_PAD. + */ +EAPI void evas_object_image_fill_spread_set (Evas_Object *obj, Evas_Fill_Spread spread) EINA_ARG_NONNULL(1); + +/** + * Retrieves the spread (tiling mode) for the given image object's + * fill. + * + * @param obj The given evas image object. + * @return The current spread mode of the image object. + */ +EAPI Evas_Fill_Spread evas_object_image_fill_spread_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Sets the size of the given image object. + * + * @param obj The given image object. + * @param w The new width of the image. + * @param h The new height of the image. + * + * This function will scale down or crop the image so that it is + * treated as if it were at the given size. If the size given is + * smaller than the image, it will be cropped. If the size given is + * larger, then the image will be treated as if it were in the upper + * left hand corner of a larger image that is otherwise transparent. + */ +EAPI void evas_object_image_size_set (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1); + +/** + * Retrieves the size of the given image object. + * + * @param obj The given image object. + * @param w Location to store the width of the image in, or @c NULL. + * @param h Location to store the height of the image in, or @c NULL. + * + * See @ref evas_object_image_size_set() for more details. + */ +EAPI void evas_object_image_size_get (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1); + +/** + * Retrieves the row stride of the given image object. + * + * @param obj The given image object. + * @return The stride of the image (in bytes). + * + * The row stride is the number of bytes between the start of a row + * and the start of the next row for image data. + */ +EAPI int evas_object_image_stride_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Retrieves a number representing any error that occurred during the + * last loading of the given image object's source image. + * + * @param obj The given image object. + * @return A value giving the last error that occurred. It should be + * one of the #Evas_Load_Error values. #EVAS_LOAD_ERROR_NONE + * is returned if there was no error. + */ +EAPI Evas_Load_Error evas_object_image_load_error_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Sets the raw image data of the given image object. + * + * @param obj The given image object. + * @param data The raw data, or @c NULL. + * + * Note that the raw data must be of the same size (see + * evas_object_image_size_set(), which has to be called @b before this + * one) and colorspace (see evas_object_image_colorspace_set()) of the + * image. If data is @c NULL, the current image data will be + * freed. Naturally, if one does not set an image object's data + * manually, it will still have one, allocated by Evas. + * + * @see evas_object_image_data_get() + */ +EAPI void evas_object_image_data_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1); + +/** + * Get a pointer to the raw image data of the given image object. + * + * @param obj The given image object. + * @param for_writing Whether the data being retrieved will be + * modified (@c EINA_TRUE) or not (@c EINA_FALSE). + * @return The raw image data. + * + * This function returns a pointer to an image object's internal pixel + * buffer, for reading only or read/write. If you request it for + * writing, the image will be marked dirty so that it gets redrawn at + * the next update. + * + * Each time you call this function on an image object, its data + * buffer will have an internal reference counter + * incremented. Decrement it back by using + * evas_object_image_data_set(). This is specially important for the + * directfb Evas engine. + * + * This is best suited for when you want to modify an existing image, + * without changing its dimensions. + * + * @note The contents' formart returned by it depend on the color + * space of the given image object. + * + * @note You may want to use evas_object_image_data_update_add() to + * inform data changes, if you did any. + * + * @see evas_object_image_data_set() + */ +EAPI void *evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Converts the raw image data of the given image object to the + * specified colorspace. + * + * Note that this function does not modify the raw image data. If the + * requested colorspace is the same as the image colorspace nothing is + * done and NULL is returned. You should use + * evas_object_image_colorspace_get() to check the current image + * colorspace. + * + * See @ref evas_object_image_colorspace_get. + * + * @param obj The given image object. + * @param to_cspace The colorspace to which the image raw data will be converted. + * @return data A newly allocated data in the format specified by to_cspace. + */ +EAPI void *evas_object_image_data_convert (Evas_Object *obj, Evas_Colorspace to_cspace) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Replaces the raw image data of the given image object. + * + * @param obj The given image object. + * @param data The raw data to replace. + * + * This function lets the application replace an image object's + * internal pixel buffer with an user-allocated one. For best results, + * you should generally first call evas_object_image_size_set() with + * the width and height for the new buffer. + * + * This call is best suited for when you will be using image data with + * different dimensions than the existing image data, if any. If you + * only need to modify the existing image in some fashion, then using + * evas_object_image_data_get() is probably what you are after. + * + * Note that the caller is responsible for freeing the buffer when + * finished with it, as user-set image data will not be automatically + * freed when the image object is deleted. + * + * See @ref evas_object_image_data_get() for more details. + * + */ +EAPI void evas_object_image_data_copy_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1); + +/** + * Mark a sub-region of the given image object to be redrawn. + * + * @param obj The given image object. + * @param x X-offset of the region to be updated. + * @param y Y-offset of the region to be updated. + * @param w Width of the region to be updated. + * @param h Height of the region to be updated. + * + * This function schedules a particular rectangular region of an image + * object to be updated (redrawn) at the next rendering cycle. + */ +EAPI void evas_object_image_data_update_add (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); + +/** + * Enable or disable alpha channel usage on the given image object. + * + * @param obj The given image object. + * @param has_alpha Whether to use alpha channel (@c EINA_TRUE) data + * or not (@c EINA_FALSE). + * + * This function sets a flag on an image object indicating whether or + * not to use alpha channel data. A value of @c EINA_TRUE makes it use + * alpha channel data, and @c EINA_FALSE makes it ignore that + * data. Note that this has nothing to do with an object's color as + * manipulated by evas_object_color_set(). + * + * @see evas_object_image_alpha_get() + */ +EAPI void evas_object_image_alpha_set (Evas_Object *obj, Eina_Bool has_alpha) EINA_ARG_NONNULL(1); + +/** + * Retrieve whether alpha channel data is being used on the given + * image object. + * + * @param obj The given image object. + * @return Whether the alpha channel data is being used (@c EINA_TRUE) + * or not (@c EINA_FALSE). + * + * This function returns @c EINA_TRUE if the image object's alpha + * channel is being used, or @c EINA_FALSE otherwise. + * + * See @ref evas_object_image_alpha_set() for more details. + */ +EAPI Eina_Bool evas_object_image_alpha_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Sets whether to use high-quality image scaling algorithm on the + * given image object. + * + * @param obj The given image object. + * @param smooth_scale Whether to use smooth scale or not. + * + * When enabled, a higher quality image scaling algorithm is used when + * scaling images to sizes other than the source image's original + * one. This gives better results but is more computationally + * expensive. + * + * @note Image objects get created originally with smooth scaling @b + * on. + * + * @see evas_object_image_smooth_scale_get() + */ +EAPI void evas_object_image_smooth_scale_set (Evas_Object *obj, Eina_Bool smooth_scale) EINA_ARG_NONNULL(1); + +/** + * Retrieves whether the given image object is using high-quality + * image scaling algorithm. + * + * @param obj The given image object. + * @return Whether smooth scale is being used. + * + * See @ref evas_object_image_smooth_scale_set() for more details. + */ +EAPI Eina_Bool evas_object_image_smooth_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Preload an image object's image data in the background + * + * @param obj The given image object. + * @param cancel @c EINA_FALSE will add it the preloading work queue, + * @c EINA_TRUE will remove it (if it was issued before). + * + * This function requests the preload of the data image in the + * background. The work is queued before being processed (because + * there might be other pending requests of this type). + * + * Whenever the image data gets loaded, Evas will call + * #EVAS_CALLBACK_IMAGE_PRELOADED registered callbacks on @p obj (what + * may be immediately, if the data was already preloaded before). + * + * Use @c EINA_TRUE for @p cancel on scenarios where you don't need + * the image data preloaded anymore. + * + * @note Any evas_object_show() call after evas_object_image_preload() + * will make the latter to be @b cancelled, with the loading process + * now taking place @b synchronously (and, thus, blocking the return + * of the former until the image is loaded). It is highly advisable, + * then, that the user preload an image with it being @b hidden, just + * to be shown on the #EVAS_CALLBACK_IMAGE_PRELOADED event's callback. + */ +EAPI void evas_object_image_preload (Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1); + +/** + * Reload an image object's image data. + * + * @param obj The given image object pointer. + * + * This function reloads the image data bound to image object @p obj. + */ +EAPI void evas_object_image_reload (Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Save the given image object's contents to an (image) file. + * + * @param obj The given image object. + * @param file The filename to be used to save the image (extension + * obligatory). + * @param key The image key in the file (if an Eet one), or @c NULL, + * otherwise. + * @param flags String containing the flags to be used (@c NULL for + * none). + * + * The extension suffix on @p file will determine which saver + * module Evas is to use when saving, thus the final file's + * format. If the file supports multiple data stored in it (Eet ones), + * you can specify the key to be used as the index of the image in it. + * + * You can specify some flags when saving the image. Currently + * acceptable flags are @c quality and @c compress. Eg.: @c + * "quality=100 compress=9" + */ +EAPI Eina_Bool evas_object_image_save (const Evas_Object *obj, const char *file, const char *key, const char *flags) EINA_ARG_NONNULL(1, 2); + +/** + * Import pixels from given source to a given canvas image object. + * + * @param obj The given canvas object. + * @param pixels The pixel's source to be imported. + * + * This function imports pixels from a given source to a given canvas image. + * + */ +EAPI Eina_Bool evas_object_image_pixels_import (Evas_Object *obj, Evas_Pixel_Import_Source *pixels) EINA_ARG_NONNULL(1, 2); + +/** + * Set the callback function to get pixels from a canva's image. + * + * @param obj The given canvas pointer. + * @param func The callback function. + * @param data The data pointer to be passed to @a func. + * + * This functions sets a function to be the callback function that get + * pixes from a image of the canvas. + * + */ +EAPI void evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Mark whether the given image object is dirty (needs to be redrawn). + * + * @param obj The given image object. + * @param dirty Whether the image is dirty. + */ +EAPI void evas_object_image_pixels_dirty_set (Evas_Object *obj, Eina_Bool dirty) EINA_ARG_NONNULL(1); + +/** + * Retrieves whether the given image object is dirty (needs to be redrawn). + * + * @param obj The given image object. + * @return Whether the image is dirty. + */ +EAPI Eina_Bool evas_object_image_pixels_dirty_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set the DPI resolution of an image object's source image. + * + * @param obj The given canvas pointer. + * @param dpi The new DPI resolution. + * + * This function sets the DPI resolution of a given loaded canvas + * image. Most useful for the SVG image loader. + * + * @see evas_object_image_load_dpi_get() + */ +EAPI void evas_object_image_load_dpi_set (Evas_Object *obj, double dpi) EINA_ARG_NONNULL(1); + +/** + * Get the DPI resolution of a loaded image object in the canvas. + * + * @param obj The given canvas pointer. + * @return The DPI resolution of the given canvas image. + * + * This function returns the DPI resolution of the given canvas image. + * + * @see evas_object_image_load_dpi_set() for more details + */ +EAPI double evas_object_image_load_dpi_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set the size of a given image object's source image, when loading + * it. + * + * @param obj The given canvas object. + * @param w The new width of the image's load size. + * @param h The new height of the image's load size. + * + * This function sets a new (loading) size for the given canvas + * image. + * + * @see evas_object_image_load_size_get() + */ +EAPI void evas_object_image_load_size_set (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1); + +/** + * Get the size of a given image object's source image, when loading + * it. + * + * @param obj The given image object. + * @param w Where to store the new width of the image's load size. + * @param h Where to store the new height of the image's load size. + * + * @note Use @c NULL pointers on the size components you're not + * interested in: they'll be ignored by the function. + * + * @see evas_object_image_load_size_set() for more details + */ +EAPI void evas_object_image_load_size_get (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1); + +/** + * Set the scale down factor of a given image object's source image, + * when loading it. + * + * @param obj The given image object pointer. + * @param scale_down The scale down factor. + * + * This function sets the scale down factor of a given canvas + * image. Most useful for the SVG image loader. + * + * @see evas_object_image_load_scale_down_get() + */ +EAPI void evas_object_image_load_scale_down_set (Evas_Object *obj, int scale_down) EINA_ARG_NONNULL(1); + +/** + * get the scale down factor of a given image object's source image, + * when loading it. + * + * @param obj The given image object pointer. + * + * @see evas_object_image_load_scale_down_set() for more details + */ +EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Inform a given image object to load a selective region of its + * source image. + * + * @param obj The given image object pointer. + * @param x X-offset of the region to be loaded. + * @param y Y-offset of the region to be loaded. + * @param w Width of the region to be loaded. + * @param h Height of the region to be loaded. + * + * This function is useful when one is not showing all of an image's + * area on its image object. + * + * @note The image loader for the image format in question has to + * support selective region loading in order to this function to take + * effect. + * + * @see evas_object_image_load_region_get() + */ +EAPI void evas_object_image_load_region_set (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); + +/** + * Retrieve the coordinates of a given image object's selective + * (source image) load region. + * + * @param obj The given image object pointer. + * @param x Where to store the X-offset of the region to be loaded. + * @param y Where to store the Y-offset of the region to be loaded. + * @param w Where to store the width of the region to be loaded. + * @param h Where to store the height of the region to be loaded. + * + * @note Use @c NULL pointers on the coordinates you're not interested + * in: they'll be ignored by the function. + * + * @see evas_object_image_load_region_get() + */ +EAPI void evas_object_image_load_region_get (const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1); + +/** + * Define if the orientation information in the image file should be honored. + * + * @param obj The given image object pointer. + * @param enable @p EINA_TRUE means that it should honor the orientation information + * @since 1.1 + */ +EAPI void evas_object_image_load_orientation_set (Evas_Object *obj, Eina_Bool enable) EINA_ARG_NONNULL(1); + +/** + * Get if the orientation information in the image file should be honored. + * + * @param obj The given image object pointer. + * @since 1.1 + */ +EAPI Eina_Bool evas_object_image_load_orientation_get (const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the colorspace of a given image of the canvas. + * + * @param obj The given image object pointer. + * @param cspace The new color space. + * + * This function sets the colorspace of given canvas image. + * + */ +EAPI void evas_object_image_colorspace_set (Evas_Object *obj, Evas_Colorspace cspace) EINA_ARG_NONNULL(1); + +/** + * Get the colorspace of a given image of the canvas. + * + * @param obj The given image object pointer. + * @return The colorspace of the image. + * + * This function returns the colorspace of given canvas image. + * + */ +EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set the native surface of a given image of the canvas + * + * @param obj The given canvas pointer. + * @param surf The new native surface. + * + * This function sets a native surface of a given canvas image. + * + */ +EAPI void evas_object_image_native_surface_set (Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2); + +/** + * Get the native surface of a given image of the canvas + * + * @param obj The given canvas pointer. + * @return The native surface of the given canvas image. + * + * This function returns the native surface of a given canvas image. + * + */ +EAPI Evas_Native_Surface *evas_object_image_native_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set the video surface linked to a given image of the canvas + * + * @param obj The given canvas pointer. + * @param surf The new video surface. + * @since 1.1.0 + * + * This function link a video surface to a given canvas image. + * + */ +EAPI void evas_object_image_video_surface_set (Evas_Object *obj, Evas_Video_Surface *surf) EINA_ARG_NONNULL(1); + +/** + * Get the video surface linekd to a given image of the canvas + * + * @param obj The given canvas pointer. + * @return The video surface of the given canvas image. + * @since 1.1.0 + * + * This function returns the video surface linked to a given canvas image. + * + */ +EAPI const Evas_Video_Surface *evas_object_image_video_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set the scale hint of a given image of the canvas. + * + * @param obj The given image object pointer. + * @param hint The scale hint, a value in + * #Evas_Image_Scale_Hint. + * + * This function sets the scale hint value of the given image object + * in the canvas, which will affect how Evas is to cache scaled + * versions of its original source image. + * + * @see evas_object_image_scale_hint_get() + */ +EAPI void evas_object_image_scale_hint_set (Evas_Object *obj, Evas_Image_Scale_Hint hint) EINA_ARG_NONNULL(1); + +/** + * Get the scale hint of a given image of the canvas. + * + * @param obj The given image object pointer. + * @return The scale hint value set on @p obj, a value in + * #Evas_Image_Scale_Hint. + * + * This function returns the scale hint value of the given image + * object of the canvas. + * + * @see evas_object_image_scale_hint_set() for more details. + */ +EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set the content hint setting of a given image object of the canvas. + * + * @param obj The given canvas pointer. + * @param hint The content hint value, one of the + * #Evas_Image_Content_Hint ones. + * + * This function sets the content hint value of the given image of the + * canvas. For example, if you're on the GL engine and your driver + * implementation supports it, setting this hint to + * #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make it need @b zero copies + * at texture upload time, which is an "expensive" operation. + * + * @see evas_object_image_content_hint_get() + */ +EAPI void evas_object_image_content_hint_set (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1); + +/** + * Get the content hint setting of a given image object of the canvas. + * + * @param obj The given canvas pointer. + * @return hint The content hint value set on it, one of the + * #Evas_Image_Content_Hint ones (#EVAS_IMAGE_CONTENT_HINT_NONE means + * an error). + * + * This function returns the content hint value of the given image of + * the canvas. + * + * @see evas_object_image_content_hint_set() + */ +EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Enable an image to be used as an alpha mask. + * + * This will set any flags, and discard any excess image data not used as an + * alpha mask. + * + * Note there is little point in using a image as alpha mask unless it has an + * alpha channel. + * + * @param obj Object to use as an alpha mask. + * @param ismask Use image as alphamask, must be true. + */ +EAPI void evas_object_image_alpha_mask_set (Evas_Object *obj, Eina_Bool ismask) EINA_ARG_NONNULL(1); + +/** + * Set the source object on an image object to used as a @b proxy. + * + * @param obj Proxy (image) object. + * @param src Source object to use for the proxy. + * @return @c EINA_TRUE on success, @c EINA_FALSE on error. + * + * If an image object is set to behave as a @b proxy, it will mirror + * the rendering contents of a given @b source object in its drawing + * region, without affecting that source in any way. The source must + * be another valid Evas object. Other effects may be applied to the + * proxy, such as a map (see evas_object_map_set()) to create a + * reflection of the original object (for example). + * + * Any existing source object on @p obj will be removed after this + * call. Setting @p src to @c NULL clears the proxy object (not in + * "proxy state" anymore). + * + * @warning You cannot set a proxy as another proxy's source. + * + * @see evas_object_image_source_get() + * @see evas_object_image_source_unset() + */ +EAPI Eina_Bool evas_object_image_source_set (Evas_Object *obj, Evas_Object *src) EINA_ARG_NONNULL(1); + +/** + * Get the current source object of an image object. + * + * @param obj Image object + * @return Source object (if any), or @c NULL, if not in "proxy mode" + * (or on errors). + * + * @see evas_object_image_source_set() for more details + */ +EAPI Evas_Object *evas_object_image_source_get (Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Clear the source object on a proxy image object. + * + * @param obj Image object to clear source of. + * @return @c EINA_TRUE on success, @c EINA_FALSE on error. + * + * This is equivalent to calling evas_object_image_source_set() with a + * @c NULL source. + */ +EAPI Eina_Bool evas_object_image_source_unset (Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Check if a file extension may be supported by @ref Evas_Object_Image. + * + * @param file The file to check + * @return EINA_TRUE if we may be able to opeen it, EINA_FALSE if it's unlikely. + * @since 1.1.0 + * + * If file is a Eina_Stringshare, use directly @ref evas_object_image_extension_can_load_fast_get. + * + * This functions is threadsafe. + */ +EAPI Eina_Bool evas_object_image_extension_can_load_get(const char *file); + +/** + * Check if a file extension may be supported by @ref Evas_Object_Image. + * + * @param file The file to check, it should be an Eina_Stringshare. + * @return EINA_TRUE if we may be able to opeen it, EINA_FALSE if it's unlikely. + * @since 1.1.0 + * + * This functions is threadsafe. + */ +EAPI Eina_Bool evas_object_image_extension_can_load_fast_get(const char *file); + +/** + * Check if an image object can be animated (have multiple frames) + * + * @param obj Image object + * @return whether obj support animation + * + * This returns if the image file of an image object is capable of animation + * such as an animated gif file might. This is only useful to be called once + * the image object file has been set. + * + * Example: + * @code + * extern Evas_Object *obj; + * + * if (evas_object_image_animated_get(obj)) + * { + * int frame_count; + * int loop_count; + * Evas_Image_Animated_Loop_Hint loop_type; + * double duration; + * + * frame_count = evas_object_image_animated_frame_count_get(obj); + * printf("This image has %d frames\n",frame_count); + * + * duration = evas_object_image_animated_frame_duration_get(obj,1,0); + * printf("Frame 1's duration is %f. You had better set object's frame to 2 after this duration using timer\n"); + * + * loop_count = evas_object_image_animated_loop_count_get(obj); + * printf("loop count is %d. You had better run loop %d times\n",loop_count,loop_count); + * + * loop_type = evas_object_image_animated_loop_type_get(obj); + * if (loop_type == EVAS_IMAGE_ANIMATED_HINT_LOOP) + * printf("You had better set frame like 1->2->3->1->2->3...\n"); + * else if (loop_type == EVAS_IMAGE_ANIMATED_HINT_PINGPONG) + * printf("You had better set frame like 1->2->3->2->1->2...\n"); + * else + * printf("Unknown loop type\n"); + * + * evas_object_image_animated_frame_set(obj,1); + * printf("You set image object's frame to 1. You can see frame 1\n"); + * } + * @endcode + * + * @see evas_object_image_animated_get() + * @see evas_object_image_animated_frame_count_get() + * @see evas_object_image_animated_loop_type_get() + * @see evas_object_image_animated_loop_count_get() + * @see evas_object_image_animated_frame_duration_get() + * @see evas_object_image_animated_frame_set() + * @since 1.1.0 + */ +EAPI Eina_Bool evas_object_image_animated_get(const Evas_Object *obj); + +/** + * Get the total number of frames of the image object. + * + * @param obj Image object + * @return The number of frames + * + * This returns total number of frames the image object supports (if animated) + * + * @see evas_object_image_animated_get() + * @see evas_object_image_animated_frame_count_get() + * @see evas_object_image_animated_loop_type_get() + * @see evas_object_image_animated_loop_count_get() + * @see evas_object_image_animated_frame_duration_get() + * @see evas_object_image_animated_frame_set() + * @since 1.1.0 + */ +EAPI int evas_object_image_animated_frame_count_get(const Evas_Object *obj); + +/** + * Get the kind of looping the image object does. + * + * @param obj Image object + * @return Loop type of the image object + * + * This returns the kind of looping the image object wants to do. + * + * If it returns EVAS_IMAGE_ANIMATED_HINT_LOOP, you should display frames in a sequence like: + * 1->2->3->1->2->3->1... + * If it returns EVAS_IMAGE_ANIMATED_HINT_PINGPONG, it is better to + * display frames in a sequence like: 1->2->3->2->1->2->3->1... + * + * The default type is EVAS_IMAGE_ANIMATED_HINT_LOOP. + * + * @see evas_object_image_animated_get() + * @see evas_object_image_animated_frame_count_get() + * @see evas_object_image_animated_loop_type_get() + * @see evas_object_image_animated_loop_count_get() + * @see evas_object_image_animated_frame_duration_get() + * @see evas_object_image_animated_frame_set() + * @since 1.1.0 + */ +EAPI Evas_Image_Animated_Loop_Hint evas_object_image_animated_loop_type_get(const Evas_Object *obj); + +/** + * Get the number times the animation of the object loops. + * + * @param obj Image object + * @return The number of loop of an animated image object + * + * This returns loop count of image. The loop count is the number of times + * the animation will play fully from first to last frame until the animation + * should stop (at the final frame). + * + * If 0 is returned, then looping should happen indefinitely (no limit to + * the number of times it loops). + * + * @see evas_object_image_animated_get() + * @see evas_object_image_animated_frame_count_get() + * @see evas_object_image_animated_loop_type_get() + * @see evas_object_image_animated_loop_count_get() + * @see evas_object_image_animated_frame_duration_get() + * @see evas_object_image_animated_frame_set() + * @since 1.1.0 + */ +EAPI int evas_object_image_animated_loop_count_get(const Evas_Object *obj); + +/** + * Get the duration of a sequence of frames. + * + * @param obj Image object + * @param start_frame The first frame + * @param fram_num Number of frames in the sequence + * + * This returns total duration that the specified sequence of frames should + * take in seconds. + * + * If you set start_frame to 1 and frame_num 0, you get frame 1's duration + * If you set start_frame to 1 and frame_num 1, you get frame 1's duration + + * frame2's duration + * + * @see evas_object_image_animated_get() + * @see evas_object_image_animated_frame_count_get() + * @see evas_object_image_animated_loop_type_get() + * @see evas_object_image_animated_loop_count_get() + * @see evas_object_image_animated_frame_duration_get() + * @see evas_object_image_animated_frame_set() + * @since 1.1.0 + */ +EAPI double evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int fram_num); + +/** + * Set the frame to current frame of an image object + * + * @param obj The given image object. + * @param frame_num The index of current frame + * + * This set image object's current frame to frame_num with 1 being the first + * frame. + * + * @see evas_object_image_animated_get() + * @see evas_object_image_animated_frame_count_get() + * @see evas_object_image_animated_loop_type_get() + * @see evas_object_image_animated_loop_count_get() + * @see evas_object_image_animated_frame_duration_get() + * @see evas_object_image_animated_frame_set() + * @since 1.1.0 + */ +EAPI void evas_object_image_animated_frame_set(Evas_Object *obj, int frame_num); +/** + * @} + */ + +/** + * @defgroup Evas_Object_Text Text Object Functions + * + * Functions that operate on single line, single style text objects. + * + * For multiline and multiple style text, see @ref Evas_Object_Textblock. + * + * See some @ref Example_Evas_Text "examples" on this group of functions. + * + * @ingroup Evas_Object_Specific + */ + +/** + * @addtogroup Evas_Object_Text + * @{ + */ + +/* basic styles (4 bits allocated use 0->10 now, 5 left) */ +#define EVAS_TEXT_STYLE_MASK_BASIC 0xf + +/** + * Text style type creation macro. Use style types on the 's' + * arguments, being 'x' your style variable. + */ +#define EVAS_TEXT_STYLE_BASIC_SET(x, s) \ + do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_BASIC) | (s); } while (0) + +#define EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION (0x7 << 4) + +/** + * Text style type creation macro. This one will impose shadow + * directions on the style type variable -- use the @c + * EVAS_TEXT_STYLE_SHADOW_DIRECTION_* values on 's', incremmentally. + */ +#define EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(x, s) \ + do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) | (s); } while (0) + + typedef enum _Evas_Text_Style_Type + { + EVAS_TEXT_STYLE_PLAIN, /**< plain, standard text */ + EVAS_TEXT_STYLE_SHADOW, /**< text with shadow underneath */ + EVAS_TEXT_STYLE_OUTLINE, /**< text with an outline */ + EVAS_TEXT_STYLE_SOFT_OUTLINE, /**< text with a soft outline */ + EVAS_TEXT_STYLE_GLOW, /**< text with a glow effect */ + EVAS_TEXT_STYLE_OUTLINE_SHADOW, /**< text with both outline and shadow effects */ + EVAS_TEXT_STYLE_FAR_SHADOW, /**< text with (far) shadow underneath */ + EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW, /**< text with outline and soft shadow effects combined */ + EVAS_TEXT_STYLE_SOFT_SHADOW, /**< text with (soft) shadow underneath */ + EVAS_TEXT_STYLE_FAR_SOFT_SHADOW, /**< text with (far soft) shadow underneath */ + + /* OR these to modify shadow direction (3 bits needed) */ + EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4), /**< shadow growing to bottom right */ + EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM = (0x1 << 4), /**< shadow growing to the bottom */ + EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4), /**< shadow growing to bottom left */ + EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT = (0x3 << 4), /**< shadow growing to the left */ + EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4), /**< shadow growing to top left */ + EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP = (0x5 << 4), /**< shadow growing to the top */ + EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4), /**< shadow growing to top right */ + EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT = (0x7 << 4) /**< shadow growing to the right */ + } Evas_Text_Style_Type; /**< Types of styles to be applied on text objects. The @c EVAS_TEXT_STYLE_SHADOW_DIRECTION_* ones are to be ORed together with others imposing shadow, to change shadow's direction */ + +/** + * Creates a new text object on the provided canvas. + * + * @param e The canvas to create the text object on. + * @return @c NULL on error, a pointer to a new text object on + * success. + * + * Text objects are for simple, single line text elements. If you want + * more elaborated text blocks, see @ref Evas_Object_Textblock. + * + * @see evas_object_text_font_source_set() + * @see evas_object_text_font_set() + * @see evas_object_text_text_set() + */ +EAPI Evas_Object *evas_object_text_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Set the font (source) file to be used on a given text object. + * + * @param obj The text object to set font for. + * @param font The font file's path. + * + * This function allows the font file to be explicitly set for a given + * text object, overriding system lookup, which will first occur in + * the given file's contents. + * + * @see evas_object_text_font_get() + */ +EAPI void evas_object_text_font_source_set (Evas_Object *obj, const char *font) EINA_ARG_NONNULL(1); + +/** + * Get the font file's path which is being used on a given text + * object. + * + * @param obj The text object to set font for. + * @param font The font file's path. + * + * @see evas_object_text_font_get() for more details + */ +EAPI const char *evas_object_text_font_source_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set the font family and size on a given text object. + * + * @param obj The text object to set font for. + * @param font The font (family) name. + * @param size The font size, in points. + * + * This function allows the font name and size of a text object to be + * set. The @p font string has to follow fontconfig's convention on + * naming fonts, as it's the underlying lybrary used to query system + * fonts by Evas (see the @c fc-list command's output, on your system, + * to get an idea). + * + * @see evas_object_text_font_get() + * @see evas_object_text_font_source_set() + */ + EAPI void evas_object_text_font_set (Evas_Object *obj, const char *font, Evas_Font_Size size) EINA_ARG_NONNULL(1); + +/** + * Retrieve the font family and size in use on a given text object. + * + * @param obj The evas text object to query for font information. + * @param font A pointer to the location to store the font name in. + * @param size A pointer to the location to store the font size in. + * + * This function allows the font name and size of a text object to be + * queried. Be aware that the font name string is still owned by Evas + * and should @b not have free() called on it by the caller of the + * function. + * + * @see evas_object_text_font_set() + */ +EAPI void evas_object_text_font_get (const Evas_Object *obj, const char **font, Evas_Font_Size *size) EINA_ARG_NONNULL(1); + +/** + * Sets the text string to be displayed by the given text object. + * + * @param obj The text object to set text string on. + * @param text Text string to display on it. + * + * @see evas_object_text_text_get() + */ +EAPI void evas_object_text_text_set (Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1); + +/** + * Retrieves the text string currently being displayed by the given + * text object. + * + * @param obj The given text object. + * @return The text string currently being displayed on it. + * + * @note Do not free() the return value. + * + * @see evas_object_text_text_set() + */ +EAPI const char *evas_object_text_text_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @brief Sets the BiDi delimiters used in the textblock. + * + * BiDi delimiters are use for in-paragraph separation of bidi segments. This + * is useful for example in recipients fields of e-mail clients where bidi + * oddities can occur when mixing rtl and ltr. + * + * @param obj The given text object. + * @param delim A null terminated string of delimiters, e.g ",|". + * @since 1.1.0 + */ +EAPI void evas_object_text_bidi_delimiters_set(Evas_Object *obj, const char *delim); + +/** + * @brief Gets the BiDi delimiters used in the textblock. + * + * BiDi delimiters are use for in-paragraph separation of bidi segments. This + * is useful for example in recipients fields of e-mail clients where bidi + * oddities can occur when mixing rtl and ltr. + * + * @param obj The given text object. + * @return A null terminated string of delimiters, e.g ",|". If empty, returns NULL. + * @since 1.1.0 + */ +EAPI const char *evas_object_text_bidi_delimiters_get(const Evas_Object *obj); + + EAPI Evas_Coord evas_object_text_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Coord evas_object_text_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Coord evas_object_text_max_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Coord evas_object_text_max_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Coord evas_object_text_horiz_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Coord evas_object_text_vert_advance_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Coord evas_object_text_inset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Retrieve position and dimension information of a character within a text @c Evas_Object. + * + * This function is used to obtain the X, Y, width and height of a the character + * located at @p pos within the @c Evas_Object @p obj. @p obj must be a text object + * as created with evas_object_text_add(). Any of the @c Evas_Coord parameters (@p cx, + * @p cy, @p cw, @p ch) may be NULL in which case no value will be assigned to that + * parameter. + * + * @param obj The text object to retrieve position information for. + * @param pos The character position to request co-ordinates for. + * @param cx A pointer to an @c Evas_Coord to store the X value in (can be NULL). + * @param cy A pointer to an @c Evas_Coord to store the Y value in (can be NULL). + * @param cw A pointer to an @c Evas_Coord to store the Width value in (can be NULL). + * @param ch A pointer to an @c Evas_Coord to store the Height value in (can be NULL). + * + * @returns EINA_FALSE on success, EINA_TRUE on error. + */ +EAPI Eina_Bool evas_object_text_char_pos_get (const Evas_Object *obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); + EAPI int evas_object_text_char_coords_get (const Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); + +/** + * Returns the logical position of the last char in the text + * up to the pos given. this is NOT the position of the last char + * because of the possibility of RTL in the text. + */ +EAPI int evas_object_text_last_up_to_pos (const Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); + +/** + * Retrieves the style on use on the given text object. + * + * @param obj the given text object to set style on. + * @return the style type in use. + * + * @see evas_object_text_style_set() for more details. + */ +EAPI Evas_Text_Style_Type evas_object_text_style_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Sets the style to apply on the given text object. + * + * @param obj the given text object to set style on. + * @param type a style type. + * + * Text object styles are one of the values in + * #Evas_Text_Style_Type. Some of those values are combinations of + * more than one style, and some account for the direction of the + * rendering of shadow effects. + * + * @note One may use the helper macros #EVAS_TEXT_STYLE_BASIC_SET and + * #EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value. + * + * The following figure illustrates the text styles: + * + * @image html text-styles.png + * @image rtf text-styles.png + * @image latex text-styles.eps + * + * @see evas_object_text_style_get() + * @see evas_object_text_shadow_color_set() + * @see evas_object_text_outline_color_set() + * @see evas_object_text_glow_color_set() + * @see evas_object_text_glow2_color_set() + */ +EAPI void evas_object_text_style_set (Evas_Object *obj, Evas_Text_Style_Type type) EINA_ARG_NONNULL(1); + +/** + * Sets the shadow color for the given text object. + * + * @param obj The given Evas text object. + * @param r The red component of the given color. + * @param g The green component of the given color. + * @param b The blue component of the given color. + * @param a The alpha component of the given color. + * + * Shadow effects, which are fading colors decorating the text + * underneath it, will just be shown if the object is set to one of + * the following styles: + * + * - #EVAS_TEXT_STYLE_SHADOW + * - #EVAS_TEXT_STYLE_OUTLINE_SHADOW + * - #EVAS_TEXT_STYLE_FAR_SHADOW + * - #EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW + * - #EVAS_TEXT_STYLE_SOFT_SHADOW + * - #EVAS_TEXT_STYLE_FAR_SOFT_SHADOW + * + * One can also change de direction the shadow grows to, with + * evas_object_text_style_set(). + * + * @see evas_object_text_shadow_color_get() + */ +EAPI void evas_object_text_shadow_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); + +/** + * Retrieves the shadow color for the given text object. + * + * @param obj The given Evas text object. + * @param r Pointer to variable to hold the red component of the given + * color. + * @param g Pointer to variable to hold the green component of the + * given color. + * @param b Pointer to variable to hold the blue component of the + * given color. + * @param a Pointer to variable to hold the alpha component of the + * given color. + * + * @note Use @c NULL pointers on the color components you're not + * interested in: they'll be ignored by the function. + * + * @see evas_object_text_shadow_color_set() for more details. + */ +EAPI void evas_object_text_shadow_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); + +/** + * Sets the glow color for the given text object. + * + * @param obj The given Evas text object. + * @param r The red component of the given color. + * @param g The green component of the given color. + * @param b The blue component of the given color. + * @param a The alpha component of the given color. + * + * Glow effects, which are glowing colors decorating the text's + * surroundings, will just be shown if the object is set to the + * #EVAS_TEXT_STYLE_GLOW style. + * + * @note Glow effects are placed from a short distance of the text + * itself, but no touching it. For glowing effects right on the + * borders of the glyphs, see 'glow 2' effects + * (evas_object_text_glow2_color_set()). + * + * @see evas_object_text_glow_color_get() + */ +EAPI void evas_object_text_glow_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); + +/** + * Retrieves the glow color for the given text object. + * + * @param obj The given Evas text object. + * @param r Pointer to variable to hold the red component of the given + * color. + * @param g Pointer to variable to hold the green component of the + * given color. + * @param b Pointer to variable to hold the blue component of the + * given color. + * @param a Pointer to variable to hold the alpha component of the + * given color. + * + * @note Use @c NULL pointers on the color components you're not + * interested in: they'll be ignored by the function. + * + * @see evas_object_text_glow_color_set() for more details. + */ +EAPI void evas_object_text_glow_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); + +/** + * Sets the 'glow 2' color for the given text object. + * + * @param obj The given Evas text object. + * @param r The red component of the given color. + * @param g The green component of the given color. + * @param b The blue component of the given color. + * @param a The alpha component of the given color. + * + * 'Glow 2' effects, which are glowing colors decorating the text's + * (immediate) surroundings, will just be shown if the object is set + * to the #EVAS_TEXT_STYLE_GLOW style. See also + * evas_object_text_glow_color_set(). + * + * @see evas_object_text_glow2_color_get() + */ +EAPI void evas_object_text_glow2_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); + +/** + * Retrieves the 'glow 2' color for the given text object. + * + * @param obj The given Evas text object. + * @param r Pointer to variable to hold the red component of the given + * color. + * @param g Pointer to variable to hold the green component of the + * given color. + * @param b Pointer to variable to hold the blue component of the + * given color. + * @param a Pointer to variable to hold the alpha component of the + * given color. + * + * @note Use @c NULL pointers on the color components you're not + * interested in: they'll be ignored by the function. + * + * @see evas_object_text_glow2_color_set() for more details. + */ +EAPI void evas_object_text_glow2_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); + +/** + * Sets the outline color for the given text object. + * + * @param obj The given Evas text object. + * @param r The red component of the given color. + * @param g The green component of the given color. + * @param b The blue component of the given color. + * @param a The alpha component of the given color. + * + * Outline effects (colored lines around text glyphs) will just be + * shown if the object is set to one of the following styles: + * - #EVAS_TEXT_STYLE_OUTLINE + * - #EVAS_TEXT_STYLE_SOFT_OUTLINE + * - #EVAS_TEXT_STYLE_OUTLINE_SHADOW + * - #EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW + * + * @see evas_object_text_outline_color_get() + */ +EAPI void evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); + +/** + * Retrieves the outline color for the given text object. + * + * @param obj The given Evas text object. + * @param r Pointer to variable to hold the red component of the given + * color. + * @param g Pointer to variable to hold the green component of the + * given color. + * @param b Pointer to variable to hold the blue component of the + * given color. + * @param a Pointer to variable to hold the alpha component of the + * given color. + * + * @note Use @c NULL pointers on the color components you're not + * interested in: they'll be ignored by the function. + * + * @see evas_object_text_outline_color_set() for more details. + */ +EAPI void evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); + +/** + * Gets the text style pad of a text object. + * + * @param obj The given text object. + * @param l The left pad (or @c NULL). + * @param r The right pad (or @c NULL). + * @param t The top pad (or @c NULL). + * @param b The bottom pad (or @c NULL). + * + */ +EAPI void evas_object_text_style_pad_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1); + +/** + * Retrieves the direction of the text currently being displayed in the + * text object. + * @param obj The given evas text object. + * @return the direction of the text + */ +EAPI Evas_BiDi_Direction evas_object_text_direction_get (const Evas_Object *obj) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; + +/** + * @} + */ + +/** + * @defgroup Evas_Object_Textblock Textblock Object Functions + * + * Functions used to create and manipulate textblock objects. Unlike + * @ref Evas_Object_Text, these handle complex text, doing multiple + * styles and multiline text based on HTML-like tags. Of these extra + * features will be heavier on memory and processing cost. + * + * @section Evas_Object_Textblock_Tutorial Textblock Object Tutorial + * + * This part explains about the textblock object's API and proper usage. + * If you want to develop textblock, you should also refer to @ref Evas_Object_Textblock_Internal. + * The main user of the textblock object is the edje entry object in Edje, so + * that's a good place to learn from, but I think this document is more than + * enough, if it's not, please contact me and I'll update it. + * + * @subsection textblock_intro Introduction + * The textblock objects is, as implied, an object that can show big chunks of + * text. Textblock supports many features including: Text formatting, automatic + * and manual text alignment, embedding items (for example icons) and more. + * Textblock has three important parts, the text paragraphs, the format nodes + * and the cursors. + * + * You can use markup to format text, for example: "Big!". + * You can also put more than one style directive in one tag: + * "Big and Red!". + * Please notice that we used "" although the format also included + * color, this is because the first format determines the matching closing tag's + * name. You can also use anonymous tags, like: "Big" which + * just pop any type of format, but it's advised to use the named alternatives + * instead. + * + * @subsection textblock_cursors Textblock Object Cursors + * A textblock Cursor @ref Evas_Textblock_Cursor is data type that represents + * a position in a textblock. Each cursor contains information about the + * paragraph it points to, the position in that paragraph and the object itself. + * Cursors register to textblock objects upon creation, this means that once + * you created a cursor, it belongs to a specific obj and you can't for example + * copy a cursor "into" a cursor of a different object. Registered cursors + * also have the added benefit of updating automatically upon textblock changes, + * this means that if you have a cursor pointing to a specific character, it'll + * still point to it even after you change the whole object completely (as long + * as the char was not deleted), this is not possible without updating, because + * as mentioned, each cursor holds a character position. There are many + * functions that handle cursors, just check out the evas_textblock_cursor* + * functions. For creation and deletion of cursors check out: + * @see evas_object_textblock_cursor_new() + * @see evas_textblock_cursor_free() + * @note Cursors are generally the correct way to handle text in the textblock object, and there are enough functions to do everything you need with them (no need to get big chunks of text and processing them yourself). + * + * @subsection textblock_paragraphs Textblock Object Paragraphs + * The textblock object is made out of text splitted to paragraphs (delimited + * by the paragraph separation character). Each paragraph has many (or none) + * format nodes associated with it which are responsible for the formatting + * of that paragraph. + * + * @subsection textblock_format_nodes Textblock Object Format Nodes + * As explained in @ref textblock_paragraphs each one of the format nodes + * is associated with a paragraph. + * There are two types of format nodes, visible and invisible: + * Visible: formats that a cursor can point to, i.e formats that + * occupy space, for example: newlines, tabs, items and etc. Some visible items + * are made of two parts, in this case, only the opening tag is visible. + * A closing tag (i.e a tag) should NEVER be visible. + * Invisible: formats that don't occupy space, for example: bold and underline. + * Being able to access format nodes is very important for some uses. For + * example, edje uses the "" format to create links in the text (and pop + * popups above them when clicked). For the textblock object a is just a + * formatting instruction (how to color the text), but edje utilizes the access + * to the format nodes to make it do more. + * For more information, take a look at all the evas_textblock_node_format_* + * functions. + * The translation of "" tags to actual format is done according to the + * tags defined in the style, see @ref evas_textblock_style_set + * + * @subsection textblock_special_formats Special Formats + * Textblock supports various format directives that can be used either in + * markup, or by calling @ref evas_object_textblock_format_append or + * @ref evas_object_textblock_format_prepend. In addition to the mentioned + * format directives, textblock allows creating additional format directives + * using "tags" that can be set in the style see @ref evas_textblock_style_set . + * + * Textblock supports the following formats: + * @li font - Font description in fontconfig like format, e.g: "Sans:style=Italic:lang=hi". or "Serif:style=Bold". + * @li font_weight - Overrides the weight defined in "font". E.g: "font_weight=Bold" is the same as "font=:style=Bold". Supported weights: "normal", "thin", "ultralight", "light", "book", "medium", "semibold", "bold", "ultrabold", "black", and "extrablack". + * @li font_style - Overrides the style defined in "font". E.g: "font_style=Italic" is the same as "font=:style=Italic". Supported styles: "normal", "oblique", and "italic". + * @li font_width - Overrides the width defined in "font". E.g: "font_width=Condensed" is the same as "font=:style=Condensed". Supported widths: "normal", "ultracondensed", "extracondensed", "condensed", "semicondensed", "semiexpanded", "expanded", "extraexpanded", and "ultraexpanded". + * @li lang - Overrides the language defined in "font". E.g: "lang=he" is the same as "font=:lang=he". + * @li font_fallbacks - A comma delimited list of fonts to try if finding the main font fails. + * @li font_size - The font size in points. + * @li font_source - The source of the font, e.g an eet file. + * @li color - Text color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". + * @li underline_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". + * @li underline2_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". + * @li outline_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". + * @li shadow_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". + * @li glow_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". + * @li glow2_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". + * @li backing_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". + * @li strikethrough_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". + * @li align - Either "auto" (meaning according to text direction), "left", "right", "center", "middle", a value between 0.0 and 1.0, or a value between 0% to 100%. + * @li valign - Either "top", "bottom", "middle", "center", "baseline", "base", a value between 0.0 and 1.0, or a value between 0% to 100%. + * @li wrap - "word", "char", "mixed", or "none". + * @li left_margin - Either "reset", or a pixel value indicating the margin. + * @li right_margin - Either "reset", or a pixel value indicating the margin. + * @li underline - "on", "off", "single", or "double". + * @li strikethrough - "on" or "off" + * @li backing - "on" or "off" + * @li style - Either "off", "none", "plain", "shadow", "outline", "soft_outline", "outline_shadow", "outline_soft_shadow", "glow", "far_shadow", "soft_shadow", or "far_soft_shadow". + * @li tabstops - Pixel value for tab width. + * @li linesize - Force a line size in pixels. + * @li linerelsize - Either a floating point value or a percentage indicating the wanted size of the line relative to the calculated size. + * @li linegap - Force a line gap in pixels. + * @li linerelgap - Either a floating point value or a percentage indicating the wanted size of the line relative to the calculated size. + * @li item - Creates an empty space that should be filled by an upper layer. Use "size", "abssize", or "relsize". To define the items size, and an optional: vsize=full/ascent to define the item's position in the line. + * @li linefill - Either a float value or percentage indicating how much to fill the line. + * @li ellipsis - Value between 0.0-1.0 to indicate the type of ellipsis, or -1.0 to indicate ellipsis isn't wanted. + * @li password - "on" or "off". This is used to specifically turn replacing chars with the replacement char (i.e password mode) on and off. + * + * + * @todo put here some usage examples + * + * @ingroup Evas_Object_Specific + * + * @{ + */ + + typedef struct _Evas_Textblock_Style Evas_Textblock_Style; + typedef struct _Evas_Textblock_Cursor Evas_Textblock_Cursor; + /** + * @typedef Evas_Object_Textblock_Node_Format + * A format node. + */ + typedef struct _Evas_Object_Textblock_Node_Format Evas_Object_Textblock_Node_Format; + typedef struct _Evas_Textblock_Rectangle Evas_Textblock_Rectangle; + + struct _Evas_Textblock_Rectangle + { + Evas_Coord x, y, w, h; + }; + + typedef enum _Evas_Textblock_Text_Type + { + EVAS_TEXTBLOCK_TEXT_RAW, + EVAS_TEXTBLOCK_TEXT_PLAIN, + EVAS_TEXTBLOCK_TEXT_MARKUP + } Evas_Textblock_Text_Type; + + typedef enum _Evas_Textblock_Cursor_Type + { + EVAS_TEXTBLOCK_CURSOR_UNDER, + EVAS_TEXTBLOCK_CURSOR_BEFORE + } Evas_Textblock_Cursor_Type; + + +/** + * Adds a textblock to the given evas. + * @param e The given evas. + * @return The new textblock object. + */ +EAPI Evas_Object *evas_object_textblock_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + + +/** + * Returns the unescaped version of escape. + * @param escape the string to be escaped + * @return the unescaped version of escape + */ +EAPI const char *evas_textblock_escape_string_get(const char *escape) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Returns the escaped version of the string. + * @param string to escape + * @param len_ret the len of the part of the string that was used. + * @return the escaped string. + */ +EAPI const char *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Return the unescaped version of the string between start and end. + * + * @param escape_start the start of the string. + * @param escape_end the end of the string. + * @return the unescaped version of the range + */ +EAPI const char *evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + + +/** + * Creates a new textblock style. + * @return The new textblock style. + */ +EAPI Evas_Textblock_Style *evas_textblock_style_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC; + +/** + * Destroys a textblock style. + * @param ts The textblock style to free. + */ +EAPI void evas_textblock_style_free(Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1); + +/** + * Sets the style ts to the style passed as text by text. + * Expected a string consisting of many (or none) tag='format' pairs. + * + * @param ts the style to set. + * @param text the text to parse - NOT NULL. + * @return Returns no value. + */ +EAPI void evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) EINA_ARG_NONNULL(1); + +/** + * Return the text of the style ts. + * @param ts the style to get it's text. + * @return the text of the style or null on error. + */ +EAPI const char *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Set the objects style to ts. + * @param obj the Evas object to set the style to. + * @param ts the style to set. + * @return Returns no value. + */ +EAPI void evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1); + +/** + * Return the style of an object. + * @param obj the object to get the style from. + * @return the style of the object. + */ +EAPI const Evas_Textblock_Style *evas_object_textblock_style_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @brief Set the "replacement character" to use for the given textblock object. + * + * @param obj The given textblock object. + * @param ch The charset name. + */ +EAPI void evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch) EINA_ARG_NONNULL(1); + +/** + * @brief Get the "replacement character" for given textblock object. Returns + * NULL if no replacement character is in use. + * + * @param obj The given textblock object + * @return replacement character or @c NULL + */ +EAPI const char *evas_object_textblock_replace_char_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @brief Sets the vertical alignment of text within the textblock object + * as a whole. + * + * Normally alignment is 0.0 (top of object). Values given should be + * between 0.0 and 1.0 (1.0 bottom of object, 0.5 being vertically centered + * etc.). + * + * @param obj The given textblock object. + * @param align A value between 0.0 and 1.0 + * @since 1.1.0 + */ +EAPI void evas_object_textblock_valign_set(Evas_Object *obj, double align); + +/** + * @brief Gets the vertical alignment of a textblock + * + * @param obj The given textblock object. + * @return The elignment set for the object + * @since 1.1.0 + */ +EAPI double evas_object_textblock_valign_get(const Evas_Object *obj); + +/** + * @brief Sets the BiDi delimiters used in the textblock. + * + * BiDi delimiters are use for in-paragraph separation of bidi segments. This + * is useful for example in recipients fields of e-mail clients where bidi + * oddities can occur when mixing rtl and ltr. + * + * @param obj The given textblock object. + * @param delim A null terminated string of delimiters, e.g ",|". + * @since 1.1.0 + */ +EAPI void evas_object_textblock_bidi_delimiters_set(Evas_Object *obj, const char *delim); + +/** + * @brief Gets the BiDi delimiters used in the textblock. + * + * BiDi delimiters are use for in-paragraph separation of bidi segments. This + * is useful for example in recipients fields of e-mail clients where bidi + * oddities can occur when mixing rtl and ltr. + * + * @param obj The given textblock object. + * @return A null terminated string of delimiters, e.g ",|". If empty, returns NULL. + * @since 1.1.0 + */ +EAPI const char *evas_object_textblock_bidi_delimiters_get(const Evas_Object *obj); + +/** + * @brief Sets newline mode. When true, newline character will behave + * as a paragraph separator. + * + * @param obj The given textblock object. + * @param mode EINA_TRUE for legacy mode, EINA_FALSE otherwise. + * @since 1.1.0 + */ +EAPI void evas_object_textblock_legacy_newline_set(Evas_Object *obj, Eina_Bool mode) EINA_ARG_NONNULL(1); + +/** + * @brief Gets newline mode. When true, newline character behaves + * as a paragraph separator. + * + * @param obj The given textblock object. + * @return EINA_TRUE if in legacy mode, EINA_FALSE otherwise. + * @since 1.1.0 + */ +EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Sets the tetxblock's text to the markup text. + * + * @note assumes text does not include the unicode object replacement char (0xFFFC) + * + * @param obj the textblock object. + * @param text the markup text to use. + * @return Return no value. + */ +EAPI void evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1); + +/** + * Prepends markup to the cursor cur. + * + * @note assumes text does not include the unicode object replacement char (0xFFFC) + * + * @param cur the cursor to prepend to. + * @param text the markup text to prepend. + * @return Return no value. + */ +EAPI void evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2); + +/** + * Return the markup of the object. + * + * @param obj the Evas object. + * @return the markup text of the object. + */ +EAPI const char *evas_object_textblock_text_markup_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + + +/** + * Return the object's main cursor. + * + * @param obj the object. + * @return the obj's main cursor. + */ +EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Create a new cursor, associate it to the obj and init it to point + * to the start of the textblock. Association to the object means the cursor + * will be updated when the object will change. + * + * @note if you need speed and you know what you are doing, it's slightly faster to just allocate the cursor yourself and not associate it. (only people developing the actual object, and not users of the object). + * + * @param obj the object to associate to. + * @return the new cursor. + */ +EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_new(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + + +/** + * Free the cursor and unassociate it from the object. + * @note do not use it to free unassociated cursors. + * + * @param cur the cursor to free. + * @return Returns no value. + */ +EAPI void evas_textblock_cursor_free(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + + +/** + * Sets the cursor to the start of the first text node. + * + * @param cur the cursor to update. + * @return Returns no value. + */ +EAPI void evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * sets the cursor to the end of the last text node. + * + * @param cur the cursor to set. + * @return Returns no value. + */ +EAPI void evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Advances to the start of the next text node + * + * @param cur the cursor to update + * @return #EINA_TRUE if it managed to advance a paragraph, #EINA_FALSE otherwise. + */ +EAPI Eina_Bool evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Advances to the end of the previous text node + * + * @param cur the cursor to update + * @return #EINA_TRUE if it managed to advance a paragraph, #EINA_FALSE otherwise. + */ +EAPI Eina_Bool evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Returns the + * + * @param obj The evas, must not be NULL. + * @param anchor the anchor name to get + * @return Returns the list format node corresponding to the anchor, may be null if there are none. + */ +EAPI const Eina_List *evas_textblock_node_format_list_get(const Evas_Object *obj, const char *anchor) EINA_ARG_NONNULL(1, 2); + +/** + * Returns the first format node. + * + * @param obj The evas, must not be NULL. + * @return Returns the first format node, may be null if there are none. + */ +EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_first_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Returns the last format node. + * + * @param obj The evas textblock, must not be NULL. + * @return Returns the first format node, may be null if there are none. + */ +EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_last_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Returns the next format node (after n) + * + * @param n the current format node - not null. + * @return Returns the next format node, may be null. + */ +EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1); + +/** + * Returns the prev format node (after n) + * + * @param n the current format node - not null. + * @return Returns the prev format node, may be null. + */ +EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1); + +/** + * Remove a format node and it's match. i.e, removes a pair. + * Assumes the node is the first part of i.e, this won't work if + * n is a closing tag. + * + * @param obj the Evas object of the textblock - not null. + * @param n the current format node - not null. + */ +EAPI void evas_textblock_node_format_remove_pair(Evas_Object *obj, Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2); + +/** + * Sets the cursor to point to the place where format points to. + * + * @param cur the cursor to update. + * @param n the format node to update according. + * @deprecated duplicate of evas_textblock_cursor_at_format_set + */ +EINA_DEPRECATED EAPI void evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2); + +/** + * Return the format node at the position pointed by cur. + * + * @param cur the position to look at. + * @return the format node if found, NULL otherwise. + * @see evas_textblock_cursor_format_is_visible_get() + */ +EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Get the text format representation of the format node. + * + * @param fmt the format node. + * @return the textual format of the format node. + */ +EAPI const char *evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fnode) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Set the cursor to point to the position of fmt. + * + * @param cur the cursor to update + * @param fmt the format to update according to. + */ +EAPI void evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt) EINA_ARG_NONNULL(1, 2); + +/** + * Check if the current cursor position is a visible format. This way is more + * efficient than evas_textblock_cursor_format_get() to check for the existence + * of a visible format. + * + * @param cur the cursor to look at. + * @return #EINA_TRUE if the cursor points to a visible format, #EINA_FALSE otherwise. + * @see evas_textblock_cursor_format_get() + */ +EAPI Eina_Bool evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Advances to the next format node + * + * @param cur the cursor to be updated. + * @return #EINA_TRUE on success #EINA_FALSE otherwise. + */ +EAPI Eina_Bool evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Advances to the previous format node. + * + * @param cur the cursor to update. + * @return #EINA_TRUE on success #EINA_FALSE otherwise. + */ +EAPI Eina_Bool evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Returns true if the cursor points to a format. + * + * @param cur the cursor to check. + * @return Returns #EINA_TRUE if a cursor points to a format #EINA_FALSE otherwise. + */ +EAPI Eina_Bool evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Advances 1 char forward. + * + * @param cur the cursor to advance. + * @return #EINA_TRUE on success #EINA_FALSE otherwise. + */ +EAPI Eina_Bool evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Advances 1 char backward. + * + * @param cur the cursor to advance. + * @return #EINA_TRUE on success #EINA_FALSE otherwise. + */ +EAPI Eina_Bool evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Go to the first char in the node the cursor is pointing on. + * + * @param cur the cursor to update. + * @return Returns no value. + */ +EAPI void evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Go to the last char in a text node. + * + * @param cur the cursor to update. + * @return Returns no value. + */ +EAPI void evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Go to the start of the current line + * + * @param cur the cursor to update. + * @return Returns no value. + */ +EAPI void evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Go to the end of the current line. + * + * @param cur the cursor to update. + * @return Returns no value. + */ +EAPI void evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Return the current cursor pos. + * + * @param cur the cursor to take the position from. + * @return the position or -1 on error + */ +EAPI int evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set the cursor pos. + * + * @param cur the cursor to be set. + * @param pos the pos to set. + */ +EAPI void evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int pos) EINA_ARG_NONNULL(1); + +/** + * Go to the start of the line passed + * + * @param cur cursor to update. + * @param line numer to set. + * @return #EINA_TRUE on success, #EINA_FALSE on error. + */ +EAPI Eina_Bool evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) EINA_ARG_NONNULL(1); + +/** + * Compare two cursors. + * + * @param cur1 the first cursor. + * @param cur2 the second cursor. + * @return -1 if cur1 < cur2, 0 if cur1 == cur2 and 1 otherwise. + */ +EAPI int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + +/** + * Make cur_dest point to the same place as cur. Does not work if they don't + * point to the same object. + * + * @param cur the source cursor. + * @param cur_dest destination cursor. + * @return Returns no value. + */ +EAPI void evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest) EINA_ARG_NONNULL(1, 2); + + +/** + * Adds text to the current cursor position and set the cursor to *before* + * the start of the text just added. + * + * @param cur the cursor to where to add text at. + * @param _text the text to add. + * @return Returns the len of the text added. + * @see evas_textblock_cursor_text_prepend() + */ +EAPI int evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2); + +/** + * Adds text to the current cursor position and set the cursor to *after* + * the start of the text just added. + * + * @param cur the cursor to where to add text at. + * @param _text the text to add. + * @return Returns the len of the text added. + * @see evas_textblock_cursor_text_append() + */ +EAPI int evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2); + + +/** + * Adds format to the current cursor position. If the format being added is a + * visible format, add it *before* the cursor position, otherwise, add it after. + * This behavior is because visible formats are like characters and invisible + * should be stacked in a way that the last one is added last. + * + * This function works with native formats, that means that style defined + * tags like
won't work here. For those kind of things use markup prepend. + * + * @param cur the cursor to where to add format at. + * @param format the format to add. + * @return Returns true if a visible format was added, false otherwise. + * @see evas_textblock_cursor_format_prepend() + */ + +/** + * Check if the current cursor position points to the terminating null of the + * last paragraph. (shouldn't be allowed to point to the terminating null of + * any previous paragraph anyway. + * + * @param cur the cursor to look at. + * @return #EINA_TRUE if the cursor points to the terminating null, #EINA_FALSE otherwise. + */ +EAPI Eina_Bool evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2); + +/** + * Adds format to the current cursor position. If the format being added is a + * visible format, add it *before* the cursor position, otherwise, add it after. + * This behavior is because visible formats are like characters and invisible + * should be stacked in a way that the last one is added last. + * If the format is visible the cursor is advanced after it. + * + * This function works with native formats, that means that style defined + * tags like
won't work here. For those kind of things use markup prepend. + * + * @param cur the cursor to where to add format at. + * @param format the format to add. + * @return Returns true if a visible format was added, false otherwise. + * @see evas_textblock_cursor_format_prepend() + */ +EAPI Eina_Bool evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2); + +/** + * Delete the character at the location of the cursor. If there's a format + * pointing to this position, delete it as well. + * + * @param cur the cursor pointing to the current location. + * @return Returns no value. + */ +EAPI void evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Delete the range between cur1 and cur2. + * + * @param cur1 one side of the range. + * @param cur2 the second side of the range + * @return Returns no value. + */ +EAPI void evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2) EINA_ARG_NONNULL(1, 2); + + +/** + * Return the text of the paragraph cur points to - returns the text in markup.. + * + * @param cur the cursor pointing to the paragraph. + * @return the text on success, NULL otherwise. + */ +EAPI const char *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Return the length of the paragraph, cheaper the eina_unicode_strlen() + * + * @param cur the position of the paragraph. + * @return the length of the paragraph on success, -1 otehrwise. + */ +EAPI int evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Return the currently visible range. + * + * @param start the start of the range. + * @param end the end of the range. + * @return EINA_TRUE on success. EINA_FALSE otherwise. + * @since 1.1.0 + */ +Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) EINA_ARG_NONNULL(1, 2); + +/** + * Return the format nodes in the range between cur1 and cur2. + * + * @param cur1 one side of the range. + * @param cur2 the other side of the range + * @return the foramt nodes in the range. You have to free it. + * @since 1.1.0 + */ +EAPI Eina_List * evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + +/** + * Return the text in the range between cur1 and cur2 + * + * @param cur1 one side of the range. + * @param cur2 the other side of the range + * @param format The form on which to return the text. Markup - in textblock markup. Plain - UTF8. + * @return the text in the range + * @see elm_entry_markup_to_utf8() + */ +EAPI char *evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + +/** + * Return the content of the cursor. + * + * @param cur the cursor + * @return the text in the range + */ +EAPI char *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + + +/** + * Returns the geometry of the cursor. Depends on the type of cursor requested. + * This should be used instead of char_geometry_get because there are weird + * special cases with BiDi text. + * in '_' cursor mode (i.e a line below the char) it's the same as char_geometry + * get, except for the case of the last char of a line which depends on the + * paragraph direction. + * + * in '|' cursor mode (i.e a line between two chars) it is very varyable. + * For example consider the following visual string: + * "abcCBA" (ABC are rtl chars), a cursor pointing on A should actually draw + * a '|' between the c and the C. + * + * @param cur the cursor. + * @param cx the x of the cursor + * @param cy the y of the cursor + * @param cw the width of the cursor + * @param ch the height of the cursor + * @param dir the direction of the cursor, can be NULL. + * @param ctype the type of the cursor. + * @return line number of the char on success, -1 on error. + */ +EAPI int evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype) EINA_ARG_NONNULL(1); + +/** + * Returns the geometry of the char at cur. + * + * @param cur the position of the char. + * @param cx the x of the char. + * @param cy the y of the char. + * @param cw the w of the char. + * @param ch the h of the char. + * @return line number of the char on success, -1 on error. + */ +EAPI int evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); + +/** + * Returns the geometry of the pen at cur. + * + * @param cur the position of the char. + * @param cpen_x the pen_x of the char. + * @param cy the y of the char. + * @param cadv the adv of the char. + * @param ch the h of the char. + * @return line number of the char on success, -1 on error. + */ +EAPI int evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cpen_x, Evas_Coord *cy, Evas_Coord *cadv, Evas_Coord *ch) EINA_ARG_NONNULL(1); + +/** + * Returns the geometry of the line at cur. + * + * @param cur the position of the line. + * @param cx the x of the line. + * @param cy the y of the line. + * @param cw the width of the line. + * @param ch the height of the line. + * @return line number of the line on success, -1 on error. + */ +EAPI int evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); + +/** + * Set the position of the cursor according to the X and Y coordinates. + * + * @param cur the cursor to set. + * @param x coord to set by. + * @param y coord to set by. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + */ +EAPI Eina_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); + +/** + * Set the cursor position according to the y coord. + * + * @param cur the cur to be set. + * @param y the coord to set by. + * @return the line number found, -1 on error. + */ +EAPI int evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1); + +/** + * Get the geometry of a range. + * + * @param cur1 one side of the range. + * @param cur2 other side of the range. + * @return a list of Rectangles representing the geometry of the range. + */ +EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + EAPI Eina_Bool evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); + + +/** + * Checks if the cursor points to the end of the line. + * + * @param cur the cursor to check. + * @return #EINA_TRUE if true, #EINA_FALSE otherwise. + */ +EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Get the geometry of a line number. + * + * @param obj the object. + * @param line the line number. + * @param cx x coord of the line. + * @param cy y coord of the line. + * @param cw w coord of the line. + * @param ch h coord of the line. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + */ +EAPI Eina_Bool evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); + +/** + * Clear the textblock object. + * @note Does *NOT* free the Evas object itself. + * + * @param obj the object to clear. + * @return nothing. + */ +EAPI void evas_object_textblock_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get the formatted width and height. This calculates the actual size after restricting + * the textblock to the current size of the object. + * The main difference between this and @ref evas_object_textblock_size_native_get + * is that the "native" function does not wrapping into account + * it just calculates the real width of the object if it was placed on an + * infinite canvas, while this function gives the size after wrapping + * according to the size restrictions of the object. + * + * For example for a textblock containing the text: "You shall not pass!" + * with no margins or padding and assuming a monospace font and a size of + * 7x10 char widths (for simplicity) has a native size of 19x1 + * and a formatted size of 5x4. + * + * + * @param obj the Evas object. + * @param w[out] the width of the object. + * @param h[out] the height of the object + * @return Returns no value. + * @see evas_object_textblock_size_native_get + */ +EAPI void evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + +/** + * Get the native width and height. This calculates the actual size without taking account + * the current size of the object. + * The main difference between this and @ref evas_object_textblock_size_formatted_get + * is that the "native" function does not take wrapping into account + * it just calculates the real width of the object if it was placed on an + * infinite canvas, while the "formatted" function gives the size after + * wrapping text according to the size restrictions of the object. + * + * For example for a textblock containing the text: "You shall not pass!" + * with no margins or padding and assuming a monospace font and a size of + * 7x10 char widths (for simplicity) has a native size of 19x1 + * and a formatted size of 5x4. + * + * @param obj the Evas object of the textblock + * @param w[out] the width returned + * @param h[out] the height returned + * @return Returns no value. + */ +EAPI void evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); + EAPI void evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1); +/** + * @} + */ + +/** + * @defgroup Evas_Line_Group Line Object Functions + * + * Functions used to deal with evas line objects. + * + * @ingroup Evas_Object_Specific + * + * @{ + */ + +/** + * Adds a new evas line object to the given evas. + * @param e The given evas. + * @return The new evas line object. + */ +EAPI Evas_Object *evas_object_line_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Sets the coordinates of the end points of the given evas line object. + * @param obj The given evas line object. + * @param x1 The X coordinate of the first point. + * @param y1 The Y coordinate of the first point. + * @param x2 The X coordinate of the second point. + * @param y2 The Y coordinate of the second point. + */ +EAPI void evas_object_line_xy_set (Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2); + +/** + * Retrieves the coordinates of the end points of the given evas line object. + * @param obj The given line object. + * @param x1 Pointer to an integer in which to store the X coordinate of the + * first end point. + * @param y1 Pointer to an integer in which to store the Y coordinate of the + * first end point. + * @param x2 Pointer to an integer in which to store the X coordinate of the + * second end point. + * @param y2 Pointer to an integer in which to store the Y coordinate of the + * second end point. + */ +EAPI void evas_object_line_xy_get (const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2); +/** + * @} + */ + +/** + * @defgroup Evas_Object_Polygon Polygon Object Functions + * + * Functions that operate on evas polygon objects. + * + * Hint: as evas does not provide ellipse, smooth paths or circle, one + * can calculate points and convert these to a polygon. + * + * @ingroup Evas_Object_Specific + * + * @{ + */ + +/** + * Adds a new evas polygon object to the given evas. + * @param e The given evas. + * @return A new evas polygon object. + */ +EAPI Evas_Object *evas_object_polygon_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Adds the given point to the given evas polygon object. + * @param obj The given evas polygon object. + * @param x The X coordinate of the given point. + * @param y The Y coordinate of the given point. + * @ingroup Evas_Polygon_Group + */ +EAPI void evas_object_polygon_point_add (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); + +/** + * Removes all of the points from the given evas polygon object. + * @param obj The given polygon object. + */ +EAPI void evas_object_polygon_points_clear (Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ + +/** + * @defgroup Evas_Smart_Group Smart Functions + * + * Functions that deal with #Evas_Smart structs, creating definition + * (classes) of objects that will have customized behavior for methods + * like evas_object_move(), evas_object_resize(), + * evas_object_clip_set() and others. + * + * These objects will accept the generic methods defined in @ref + * Evas_Object_Group and the extensions defined in @ref + * Evas_Smart_Object_Group. There are a couple of existent smart + * objects in Evas itself (see @ref Evas_Object_Box, @ref + * Evas_Object_Table and @ref Evas_Smart_Object_Clipped). + * + * See also some @ref Example_Evas_Smart_Objects "examples" of this + * group of functions. + */ + +/** + * @addtogroup Evas_Smart_Group + * @{ + */ + +/** + * @def EVAS_SMART_CLASS_VERSION + * + * The version you have to put into the version field in the + * #Evas_Smart_Class struct. Used to safeguard from binaries with old + * smart object intefaces running with newer ones. + * + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_VERSION 4 +/** + * @struct _Evas_Smart_Class + * + * A smart object's @b base class definition + * + * @ingroup Evas_Smart_Group + */ +struct _Evas_Smart_Class +{ + const char *name; /**< the name string of the class */ + int version; + void (*add) (Evas_Object *o); /**< code to be run when adding object to a canvas */ + void (*del) (Evas_Object *o); /**< code to be run when removing object to a canvas */ + void (*move) (Evas_Object *o, Evas_Coord x, Evas_Coord y); /**< code to be run when moving object on a canvas */ + void (*resize) (Evas_Object *o, Evas_Coord w, Evas_Coord h); /**< code to be run when resizing object on a canvas */ + void (*show) (Evas_Object *o); /**< code to be run when showing object on a canvas */ + void (*hide) (Evas_Object *o); /**< code to be run when hiding object on a canvas */ + void (*color_set) (Evas_Object *o, int r, int g, int b, int a); /**< code to be run when setting color of object on a canvas */ + void (*clip_set) (Evas_Object *o, Evas_Object *clip); /**< code to be run when setting clipper of object on a canvas */ + void (*clip_unset) (Evas_Object *o); /**< code to be run when unsetting clipper of object on a canvas */ + void (*calculate) (Evas_Object *o); /**< code to be run when object has rendering updates on a canvas */ + void (*member_add) (Evas_Object *o, Evas_Object *child); /**< code to be run when child member is added to object */ + void (*member_del) (Evas_Object *o, Evas_Object *child); /**< code to be run when child member is removed from object */ + + const Evas_Smart_Class *parent; /**< this class inherits from this parent */ + const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, @c NULL terminated */ + void *interfaces; /**< to be used in a future near you */ + const void *data; +}; + +/** + * @struct _Evas_Smart_Cb_Description + * + * Describes a callback issued by a smart object + * (evas_object_smart_callback_call()), as defined in its smart object + * class. This is particularly useful to explain to end users and + * their code (i.e., introspection) what the parameter @c event_info + * will point to. + * + * @ingroup Evas_Smart_Group + */ +struct _Evas_Smart_Cb_Description +{ + const char *name; /**< callback name ("changed", for example) */ + + /** + * @brief Hint on the type of @c event_info parameter's contents on + * a #Evas_Smart_Cb callback. + * + * The type string uses the pattern similar to + * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures, + * but extended to optionally include variable names within + * brackets preceding types. Example: + * + * @li Structure with two integers: + * @c "(ii)" + * + * @li Structure called 'x' with two integers named 'a' and 'b': + * @c "[x]([a]i[b]i)" + * + * @li Array of integers: + * @c "ai" + * + * @li Array called 'x' of struct with two integers: + * @c "[x]a(ii)" + * + * @note This type string is used as a hint and is @b not validated + * or enforced in any way. Implementors should make the best + * use of it to help bindings, documentation and other users + * of introspection features. + */ + const char *type; +}; + +/** + * @def EVAS_SMART_CLASS_INIT_NULL + * Initializer to zero a whole Evas_Smart_Class structure. + * + * @see EVAS_SMART_CLASS_INIT_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_INIT_NULL {NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} + +/** + * @def EVAS_SMART_CLASS_INIT_VERSION + * Initializer to zero a whole Evas_Smart_Class structure and set version. + * + * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to + * latest EVAS_SMART_CLASS_VERSION. + * + * @see EVAS_SMART_CLASS_INIT_NULL + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_INIT_VERSION {NULL, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} + +/** + * @def EVAS_SMART_CLASS_INIT_NAME_VERSION + * Initializer to zero a whole Evas_Smart_Class structure and set name + * and version. + * + * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to + * latest EVAS_SMART_CLASS_VERSION and name to the specified value. + * + * It will keep a reference to name field as a "const char *", that is, + * name must be available while the structure is used (hint: static or global!) + * and will not be modified. + * + * @see EVAS_SMART_CLASS_INIT_NULL + * @see EVAS_SMART_CLASS_INIT_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_INIT_NAME_VERSION(name) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} + +/** + * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT + * Initializer to zero a whole Evas_Smart_Class structure and set name, + * version and parent class. + * + * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to + * latest EVAS_SMART_CLASS_VERSION, name to the specified value and + * parent class. + * + * It will keep a reference to name field as a "const char *", that is, + * name must be available while the structure is used (hint: static or global!) + * and will not be modified. Similarly, parent reference will be kept. + * + * @see EVAS_SMART_CLASS_INIT_NULL + * @see EVAS_SMART_CLASS_INIT_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT(name, parent) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, NULL, NULL} + +/** + * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS + * Initializer to zero a whole Evas_Smart_Class structure and set name, + * version, parent class and callbacks definition. + * + * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to + * latest EVAS_SMART_CLASS_VERSION, name to the specified value, parent + * class and callbacks at this level. + * + * It will keep a reference to name field as a "const char *", that is, + * name must be available while the structure is used (hint: static or global!) + * and will not be modified. Similarly, parent and callbacks reference + * will be kept. + * + * @see EVAS_SMART_CLASS_INIT_NULL + * @see EVAS_SMART_CLASS_INIT_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS(name, parent, callbacks) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, callbacks, NULL} + +/** + * @def EVAS_SMART_SUBCLASS_NEW + * + * Convenience macro to subclass a given Evas smart class. + * + * @param smart_name The name used for the smart class. e.g: + * @c "Evas_Object_Box". + * @param prefix Prefix used for all variables and functions defined + * and referenced by this macro. + * @param api_type Type of the structure used as API for the smart + * class. Either #Evas_Smart_Class or something derived from it. + * @param parent_type Type of the parent class API. + * @param parent_func Function that gets the parent class. e.g: + * evas_object_box_smart_class_get(). + * @param cb_desc Array of callback descriptions for this smart class. + * + * This macro saves some typing when writing a smart class derived + * from another one. In order to work, the user @b must provide some + * functions adhering to the following guidelines: + * - @_smart_set_user(): the @b internal @c _smart_set + * function (defined by this macro) will call this one, provided by + * the user, after inheriting everything from the parent, which + * should take care of setting the right member functions for + * the class, both overrides and extensions, if any. + * - If this new class should be subclassable as well, a @b public @c + * _smart_set() function is desirable to fill in the class used as + * parent by the children. It's up to the user to provide this + * interface, which will most likely call @_smart_set() to + * get the job done. + * + * After the macro's usage, the following will be defined for use: + * - @_parent_sc: A pointer to the @b parent smart + * class. When calling parent functions from overloaded ones, use + * this global variable. + * - @_smart_class_new(): this function returns the + * #Evas_Smart needed to create smart objects with this class, + * which should be passed to evas_object_smart_add(). + * + * @warning @p smart_name has to be a pointer to a globally available + * string! The smart class created here will just have a pointer set + * to that, and all object instances will depend on it for smart class + * name lookup. + * + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_SUBCLASS_NEW(smart_name, prefix, api_type, parent_type, parent_func, cb_desc) \ + static const parent_type * prefix##_parent_sc = NULL; \ + static void prefix##_smart_set_user(api_type *api); \ + static void prefix##_smart_set(api_type *api) \ + { \ + Evas_Smart_Class *sc; \ + if (!(sc = (Evas_Smart_Class *)api)) \ + return; \ + if (!prefix##_parent_sc) \ + prefix##_parent_sc = parent_func(); \ + evas_smart_class_inherit(sc, (const Evas_Smart_Class *)prefix##_parent_sc); \ + prefix##_smart_set_user(api); \ + } \ + static Evas_Smart * prefix##_smart_class_new(void) \ + { \ + static Evas_Smart *smart = NULL; \ + static api_type api; \ + if (!smart) \ + { \ + Evas_Smart_Class *sc = (Evas_Smart_Class *)&api; \ + memset(&api, 0, sizeof(api_type)); \ + sc->version = EVAS_SMART_CLASS_VERSION; \ + sc->name = smart_name; \ + sc->callbacks = cb_desc; \ + prefix##_smart_set(&api); \ + smart = evas_smart_class_new(sc); \ + } \ + return smart; \ + } + +/** + * @def EVAS_SMART_DATA_ALLOC + * + * Convenience macro to allocate smart data only if needed. + * + * When writing a subclassable smart object, the @c .add() function + * will need to check if the smart private data was already allocated + * by some child object or not. This macro makes it easier to do it. + * + * @note This is an idiom used when one calls the parent's @c. add() + * after the specialized code. Naturally, the parent's base smart data + * has to be contemplated as the specialized one's first member, for + * things to work. + * + * @param o Evas object passed to the @c .add() function + * @param priv_type The type of the data to allocate + * + * @ingroup Evas_Smart_Group + */ +#define EVAS_SMART_DATA_ALLOC(o, priv_type) \ + priv_type *priv; \ + priv = evas_object_smart_data_get(o); \ + if (!priv) { \ + priv = (priv_type *)calloc(1, sizeof(priv_type)); \ + if (!priv) return; \ + evas_object_smart_data_set(o, priv); \ + } + + +/** + * Free an #Evas_Smart struct + * + * @param s the #Evas_Smart struct to free + * + * @warning If this smart handle was created using + * evas_smart_class_new(), the associated #Evas_Smart_Class will not + * be freed. + * + * @note If you're using the #EVAS_SMART_SUBCLASS_NEW schema to create your + * smart object, note that an #Evas_Smart handle will be shared amongst all + * instances of the given smart class, through a static variable. + * Evas will internally count references on #Evas_Smart handles and free them + * when they are not referenced anymore. Thus, this function is of no use + * for Evas users, most probably. + */ +EAPI void evas_smart_free (Evas_Smart *s) EINA_ARG_NONNULL(1); + +/** + * Creates a new #Evas_Smart from a given #Evas_Smart_Class struct + * + * @param sc the smart class definition + * @return a new #Evas_Smart pointer + * + * #Evas_Smart handles are necessary to create new @b instances of + * smart objects belonging to the class described by @p sc. That + * handle will contain, besides the smart class interface definition, + * all its smart callbacks infrastructure set, too. + * + * @note If you are willing to subclass a given smart class to + * construct yours, consider using the #EVAS_SMART_SUBCLASS_NEW macro, + * which will make use of this function automatically for you. + */ +EAPI Evas_Smart *evas_smart_class_new (const Evas_Smart_Class *sc) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Get the #Evas_Smart_Class handle of an #Evas_Smart struct + * + * @param s a valid #Evas_Smart pointer + * @return the #Evas_Smart_Class in it + */ +EAPI const Evas_Smart_Class *evas_smart_class_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * @brief Get the data pointer set on an #Evas_Smart struct + * + * @param s a valid #Evas_Smart handle + * + * This data pointer is set as the data field in the #Evas_Smart_Class + * passed in to evas_smart_class_new(). + */ +EAPI void *evas_smart_data_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Get the smart callbacks known by this #Evas_Smart handle's smart + * class hierarchy. + * + * @param s A valid #Evas_Smart handle. + * @param[out] count Returns the number of elements in the returned + * array. + * @return The array with callback descriptions known by this smart + * class, with its size returned in @a count parameter. It + * should not be modified in any way. If no callbacks are + * known, @c NULL is returned. The array is sorted by event + * names and elements refer to the original values given to + * evas_smart_class_new()'s #Evas_Smart_Class::callbacks + * (pointer to them). + * + * This is likely different from + * evas_object_smart_callbacks_descriptions_get() as it will contain + * the callbacks of @b all this class hierarchy sorted, while the + * direct smart class member refers only to that specific class and + * should not include parent's. + * + * If no callbacks are known, this function returns @c NULL. + * + * The array elements and thus their contents will be @b references to + * original values given to evas_smart_class_new() as + * Evas_Smart_Class::callbacks. + * + * The array is sorted by Evas_Smart_Cb_Description::name. The last + * array element is a @c NULL pointer and is not accounted for in @a + * count. Loop iterations can check any of these size indicators. + * + * @note objects may provide per-instance callbacks, use + * evas_object_smart_callbacks_descriptions_get() to get those + * as well. + * @see evas_object_smart_callbacks_descriptions_get() + */ +EAPI const Evas_Smart_Cb_Description **evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count) EINA_ARG_NONNULL(1, 1); + + +/** + * Find a callback description for the callback named @a name. + * + * @param s The #Evas_Smart where to search for class registered smart + * event callbacks. + * @param name Name of the desired callback, which must @b not be @c + * NULL. The search has a special case for @a name being the + * same pointer as registered with #Evas_Smart_Cb_Description. + * One can use it to avoid excessive use of strcmp(). + * @return A reference to the description if found, or @c NULL, otherwise + * + * @see evas_smart_callbacks_descriptions_get() + */ +EAPI const Evas_Smart_Cb_Description *evas_smart_callback_description_find(const Evas_Smart *s, const char *name) EINA_ARG_NONNULL(1, 2) EINA_PURE; + + +/** + * Sets one class to inherit from the other. + * + * Copy all function pointers, set @c parent to @a parent_sc and copy + * everything after sizeof(Evas_Smart_Class) present in @a parent_sc, + * using @a parent_sc_size as reference. + * + * This is recommended instead of a single memcpy() since it will take + * care to not modify @a sc name, version, callbacks and possible + * other members. + * + * @param sc child class. + * @param parent_sc parent class, will provide attributes. + * @param parent_sc_size size of parent_sc structure, child should be at least + * this size. Everything after @c Evas_Smart_Class size is copied + * using regular memcpy(). + */ +EAPI Eina_Bool evas_smart_class_inherit_full (Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size) EINA_ARG_NONNULL(1, 2); + +/** + * Get the number of users of the smart instance + * + * @param s The Evas_Smart to get the usage count of + * @return The number of uses of the smart instance + * + * This function tells you how many more uses of the smart instance are in + * existence. This should be used before freeing/clearing any of the + * Evas_Smart_Class that was used to create the smart instance. The smart + * instance will refer to data in the Evas_Smart_Class used to create it and + * thus you cannot remove the original data until all users of it are gone. + * When the usage count goes to 0, you can evas_smart_free() the smart + * instance @p s and remove from memory any of the Evas_Smart_Class that + * was used to create the smart instance, if you desire. Removing it from + * memory without doing this will cause problems (crashes, undefined + * behavior etc. etc.), so either never remove the original + * Evas_Smart_Class data from memory (have it be a constant structure and + * data), or use this API call and be very careful. + */ +EAPI int evas_smart_usage_get(const Evas_Smart *s); + + /** + * @def evas_smart_class_inherit + * Easy to use version of evas_smart_class_inherit_full(). + * + * This version will use sizeof(parent_sc), copying everything. + * + * @param sc child class, will have methods copied from @a parent_sc + * @param parent_sc parent class, will provide contents to be copied. + * @return 1 on success, 0 on failure. + * @ingroup Evas_Smart_Group + */ +#define evas_smart_class_inherit(sc, parent_sc) evas_smart_class_inherit_full(sc, parent_sc, sizeof(*parent_sc)) + +/** + * @} + */ + +/** + * @defgroup Evas_Smart_Object_Group Smart Object Functions + * + * Functions dealing with Evas smart objects (instances). + * + * Smart objects are groupings of primitive Evas objects that behave + * as a cohesive group. For instance, a file manager icon may be a + * smart object composed of an image object, a text label and two + * rectangles that appear behind the image and text when the icon is + * selected. As a smart object, the normal Evas object API could be + * used on the icon object. + * + * Besides that, generally smart objects implement a specific + * API, so that users interect with its own custom features. The + * API takes form of explicit exported functions one may call and + * smart callbacks. + * + * @section Evas_Smart_Object_Group_Callbacks Smart events and callbacks + * + * Smart objects can elect events (smart events, from now on) ocurring + * inside of them to be reported back to their users via callback + * functions (smart callbacks). This way, you can extend Evas' own + * object events. They are defined by an event string, which + * identifies them uniquely. There's also a function prototype + * definition for the callback functions: #Evas_Smart_Cb. + * + * When defining an #Evas_Smart_Class, smart object implementors are + * strongly encorauged to properly set the Evas_Smart_Class::callbacks + * callbacks description array, so that the users of the smart object + * can have introspection on its events API at run time. + * + * See some @ref Example_Evas_Smart_Objects "examples" of this group + * of functions. + * + * @see @ref Evas_Smart_Group for class definitions. + */ + +/** + * @addtogroup Evas_Smart_Object_Group + * @{ + */ + +/** + * Instantiates a new smart object described by @p s. + * + * @param e the canvas on which to add the object + * @param s the #Evas_Smart describing the smart object + * @return a new #Evas_Object handle + * + * This is the function one should use when defining the public + * function @b adding an instance of the new smart object to a given + * canvas. It will take care of setting all of its internals to work + * as they should, if the user set things properly, as seem on the + * #EVAS_SMART_SUBCLASS_NEW, for example. + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI Evas_Object *evas_object_smart_add (Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC; + +/** + * Set an Evas object as a member of a given smart object. + * + * @param obj The member object + * @param smart_obj The smart object + * + * Members will automatically be stacked and layered together with the + * smart object. The various stacking functions will operate on + * members relative to the other members instead of the entire canvas, + * since they now live on an exclusive layer (see + * evas_object_stack_above(), for more details). + * + * Any @p smart_obj object's specific implementation of the @c + * member_add() smart function will take place too, naturally. + * + * @see evas_object_smart_member_del() + * @see evas_object_smart_members_get() + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI void evas_object_smart_member_add (Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2); + +/** + * Removes a member object from a given smart object. + * + * @param obj the member object + * @ingroup Evas_Smart_Object_Group + * + * This removes a member object from a smart object, if it was added + * to any. The object will still be on the canvas, but no longer + * associated with whichever smart object it was associated with. + * + * @see evas_object_smart_member_add() for more details + * @see evas_object_smart_members_get() + */ +EAPI void evas_object_smart_member_del (Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Retrieves the list of the member objects of a given Evas smart + * object + * + * @param obj the smart object to get members from + * @return Returns the list of the member objects of @p obj. + * + * The returned list should be freed with @c eina_list_free() when you + * no longer need it. + * + * @see evas_object_smart_member_add() + * @see evas_object_smart_member_del() +*/ +EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Gets the parent smart object of a given Evas object, if it has one. + * + * @param obj the Evas object you want to get the parent smart object + * from + * @return Returns the parent smart object of @a obj or @c NULL, if @a + * obj is not a smart member of any + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI Evas_Object *evas_object_smart_parent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Checks whether a given smart object or any of its smart object + * parents is of a given smart class. + * + * @param obj An Evas smart object to check the type of + * @param type The @b name (type) of the smart class to check for + * @return @c EINA_TRUE, if @a obj or any of its parents is of type @a + * type, @c EINA_FALSE otherwise + * + * If @p obj is not a smart object, this call will fail + * immediately. Otherwise, make sure evas_smart_class_inherit() or its + * sibling functions were used correctly when creating the smart + * object's class, so it has a valid @b parent smart class pointer + * set. + * + * The checks use smart classes names and string + * comparison. There is a version of this same check using + * pointer comparison, since a smart class' name is a single + * string in Evas. + * + * @see evas_object_smart_type_check_ptr() + * @see #EVAS_SMART_SUBCLASS_NEW + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI Eina_Bool evas_object_smart_type_check (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + +/** + * Checks whether a given smart object or any of its smart object + * parents is of a given smart class, using pointer comparison. + * + * @param obj An Evas smart object to check the type of + * @param type The type (name string) to check for. Must be the name + * @return @c EINA_TRUE, if @a obj or any of its parents is of type @a + * type, @c EINA_FALSE otherwise + * + * @see evas_object_smart_type_check() for more details + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI Eina_Bool evas_object_smart_type_check_ptr (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + +/** + * Get the #Evas_Smart from which @p obj smart object was created. + * + * @param obj a smart object + * @return the #Evas_Smart handle or @c NULL, on errors + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI Evas_Smart *evas_object_smart_smart_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Retrieve user data stored on a given smart object. + * + * @param obj The smart object's handle + * @return A pointer to data stored using + * evas_object_smart_data_set(), or @c NULL, if none has been + * set. + * + * @see evas_object_smart_data_set() + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI void *evas_object_smart_data_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Store a pointer to user data for a given smart object. + * + * @param obj The smart object's handle + * @param data A pointer to user data + * + * This data is stored @b independently of the one set by + * evas_object_data_set(), naturally. + * + * @see evas_object_smart_data_get() + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI void evas_object_smart_data_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1); + +/** + * Add (register) a callback function to the smart event specified by + * @p event on the smart object @p obj. + * + * @param obj a smart object + * @param event the event's name string + * @param func the callback function + * @param data user data to be passed to the callback function + * + * Smart callbacks look very similar to Evas callbacks, but are + * implemented as smart object's custom ones. + * + * This function adds a function callback to an smart object when the + * event named @p event occurs in it. The function is @p func. + * + * In the event of a memory allocation error during addition of the + * callback to the object, evas_alloc_error() should be used to + * determine the nature of the error, if any, and the program should + * sensibly try and recover. + * + * A smart callback function must have the ::Evas_Smart_Cb prototype + * definition. The first parameter (@p data) in this definition will + * have the same value passed to evas_object_smart_callback_add() as + * the @p data parameter, at runtime. The second parameter @p obj is a + * handle to the object on which the event occurred. The third + * parameter, @p event_info, is a pointer to data which is totally + * dependent on the smart object's implementation and semantic for the + * given event. + * + * There is an infrastructure for introspection on smart objects' + * events (see evas_smart_callbacks_descriptions_get()), but no + * internal smart objects on Evas implement them yet. + * + * @see @ref Evas_Smart_Object_Group_Callbacks for more details. + * + * @see evas_object_smart_callback_del() + * @ingroup Evas_Smart_Object_Group + */ +EAPI void evas_object_smart_callback_add (Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2, 3); + +/** + * Add (register) a callback function to the smart event specified by + * @p event on the smart object @p obj. Except for the priority field, + * it's exactly the same as @ref evas_object_smart_callback_add + * + * @param obj a smart object + * @param event the event's name string + * @param priority The priority of the callback, lower values called first. + * @param func the callback function + * @param data user data to be passed to the callback function + * + * @see evas_object_smart_callback_add + * @since 1.1.0 + * @ingroup Evas_Smart_Object_Group + */ +EAPI void evas_object_smart_callback_priority_add(Evas_Object *obj, const char *event, Evas_Callback_Priority priority, Evas_Smart_Cb func, const void *data); + +/** + * Delete (unregister) a callback function from the smart event + * specified by @p event on the smart object @p obj. + * + * @param obj a smart object + * @param event the event's name string + * @param func the callback function + * @return the data pointer + * + * This function removes the first added smart callback on the + * object @p obj matching the event name @p event and the registered + * function pointer @p func. If the removal is successful it will also + * return the data pointer that was passed to + * evas_object_smart_callback_add() (that will be the same as the + * parameter) when the callback(s) was(were) added to the canvas. If + * not successful @c NULL will be returned. + * + * @see evas_object_smart_callback_add() for more details. + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI void *evas_object_smart_callback_del (Evas_Object *obj, const char *event, Evas_Smart_Cb func) EINA_ARG_NONNULL(1, 2, 3); + +/** + * Call a given smart callback on the smart object @p obj. + * + * @param obj the smart object + * @param event the event's name string + * @param event_info pointer to an event specific struct or information to + * pass to the callback functions registered on this smart event + * + * This should be called @b internally, from the smart object's own + * code, when some specific event has occurred and the implementor + * wants is to pertain to the object's events API (see @ref + * Evas_Smart_Object_Group_Callbacks). The documentation for the smart + * object should include a list of possible events and what type of @p + * event_info to expect for each of them. Also, when defining an + * #Evas_Smart_Class, smart object implementors are strongly + * encorauged to properly set the Evas_Smart_Class::callbacks + * callbacks description array, so that the users of the smart object + * can have introspection on its events API at run time. + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI void evas_object_smart_callback_call (Evas_Object *obj, const char *event, void *event_info) EINA_ARG_NONNULL(1, 2); + + +/** + * Set an smart object @b instance's smart callbacks descriptions. + * + * @param obj A smart object + * @param descriptions @c NULL terminated array with + * #Evas_Smart_Cb_Description descriptions. Array elements won't be + * modified at run time, but references to them and their contents + * will be made, so this array should be kept alive during the whole + * object's lifetime. + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. + * + * These descriptions are hints to be used by introspection and are + * not enforced in any way. + * + * It will not be checked if instance callbacks descriptions have the + * same name as respective possibly registered in the smart object + * @b class. Both are kept in different arrays and users of + * evas_object_smart_callbacks_descriptions_get() should handle this + * case as they wish. + * + * @note Becase @p descriptions must be @c NULL terminated, and + * because a @c NULL name makes little sense, too, + * Evas_Smart_Cb_Description::name must @b not be @c NULL. + * + * @note While instance callbacks descriptions are possible, they are + * @b not recommended. Use @b class callbacks descriptions + * instead as they make you smart object user's life simpler and + * will use less memory, as descriptions and arrays will be + * shared among all instances. + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI Eina_Bool evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions) EINA_ARG_NONNULL(1); + +/** + * Retrieve an smart object's know smart callback descriptions (both + * instance and class ones). + * + * @param obj The smart object to get callback descriptions from. + * @param class_descriptions Where to store class callbacks + * descriptions array, if any is known. If no descriptions are + * known, @c NULL is returned + * @param class_count Returns how many class callbacks descriptions + * are known. + * @param instance_descriptions Where to store instance callbacks + * descriptions array, if any is known. If no descriptions are + * known, @c NULL is returned. + * @param instance_count Returns how many instance callbacks + * descriptions are known. + * + * This call searchs for registered callback descriptions for both + * instance and class of the given smart object. These arrays will be + * sorted by Evas_Smart_Cb_Description::name and also @c NULL + * terminated, so both @a class_count and @a instance_count can be + * ignored, if the caller wishes so. The terminator @c NULL is not + * counted in these values. + * + * @note If just class descriptions are of interest, try + * evas_smart_callbacks_descriptions_get() instead. + * + * @note Use @c NULL pointers on the descriptions/counters you're not + * interested in: they'll be ignored by the function. + * + * @see evas_smart_callbacks_descriptions_get() + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI void evas_object_smart_callbacks_descriptions_get(const Evas_Object *obj, const Evas_Smart_Cb_Description ***class_descriptions, unsigned int *class_count, const Evas_Smart_Cb_Description ***instance_descriptions, unsigned int *instance_count) EINA_ARG_NONNULL(1); + +/** + * Find callback description for callback called @a name. + * + * @param obj the smart object. + * @param name name of desired callback, must @b not be @c NULL. The + * search have a special case for @a name being the same + * pointer as registered with Evas_Smart_Cb_Description, one + * can use it to avoid excessive use of strcmp(). + * @param class_description pointer to return class description or @c + * NULL if not found. If parameter is @c NULL, no search will + * be done on class descriptions. + * @param instance_description pointer to return instance description + * or @c NULL if not found. If parameter is @c NULL, no search + * will be done on instance descriptions. + * @return reference to description if found, @c NULL if not found. + */ +EAPI void evas_object_smart_callback_description_find(const Evas_Object *obj, const char *name, const Evas_Smart_Cb_Description **class_description, const Evas_Smart_Cb_Description **instance_description) EINA_ARG_NONNULL(1, 2); + + +/** + * Mark smart object as changed, dirty. + * + * @param obj The given Evas smart object + * + * This will flag the given object as needing recalculation, + * forcefully. As an effect, on the next rendering cycle it's @b + * calculate() (see #Evas_Smart_Class) smart function will be called. + * + * @see evas_object_smart_need_recalculate_set(). + * @see evas_object_smart_calculate(). + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI void evas_object_smart_changed (Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set or unset the flag signalling that a given smart object needs to + * get recalculated. + * + * @param obj the smart object + * @param value whether one wants to set (@c EINA_TRUE) or to unset + * (@c EINA_FALSE) the flag. + * + * If this flag is set, then the @c calculate() smart function of @p + * obj will be called, if one is provided, during rendering phase of + * Evas (see evas_render()), after which this flag will be + * automatically unset. + * + * If that smart function is not provided for the given object, this + * flag will be left unchanged. + * + * @note just setting this flag will not make the canvas' whole scene + * dirty, by itself, and evas_render() will have no effect. To + * force that, use evas_object_smart_changed(), that will also + * automatically call this function automatically, with @c + * EINA_TRUE as parameter. + * + * @see evas_object_smart_need_recalculate_get() + * @see evas_object_smart_calculate() + * @see evas_smart_objects_calculate() + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI void evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1); + +/** + * Get the value of the flag signalling that a given smart object needs to + * get recalculated. + * + * @param obj the smart object + * @return if flag is set or not. + * + * @note this flag will be unset during the rendering phase, when the + * @c calculate() smart function is called, if one is provided. + * If it's not provided, then the flag will be left unchanged + * after the rendering phase. + * + * @see evas_object_smart_need_recalculate_set(), for more details + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Call the @b calculate() smart function immediataly on a given smart + * object. + * + * @param obj the smart object's handle + * + * This will force immediate calculations (see #Evas_Smart_Class) + * needed for renderization of this object and, besides, unset the + * flag on it telling it needs recalculation for the next rendering + * phase. + * + * @see evas_object_smart_need_recalculate_set() + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI void evas_object_smart_calculate (Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Call user-provided @c calculate() smart functions and unset the + * flag signalling that the object needs to get recalculated to @b all + * smart objects in the canvas. + * + * @param e The canvas to calculate all smart objects in + * + * @see evas_object_smart_need_recalculate_set() + * + * @ingroup Evas_Smart_Object_Group + */ +EAPI void evas_smart_objects_calculate (Evas *e); + +/** + * This gets the internal counter that counts the number of smart calculations + * + * @param e The canvas to get the calculate counter from + * + * Whenever evas performs smart object calculations on the whole canvas + * it increments a counter by 1. This is the smart object calculate counter + * that this function returns the value of. It starts at the value of 0 and + * will increase (and eventually wrap around to negative values and so on) by + * 1 every time objects are calculated. You can use this counter to ensure + * you dont re-do calculations withint the same calculation generation/run + * if the calculations maybe cause self-feeding effects. + * + * @ingroup Evas_Smart_Object_Group + * @since 1.1 + */ +EAPI int evas_smart_objects_calculate_count_get (const Evas *e); + +/** + * Moves all children objects of a given smart object relative to a + * given offset. + * + * @param obj the smart object. + * @param dx horizontal offset (delta). + * @param dy vertical offset (delta). + * + * This will make each of @p obj object's children to move, from where + * they before, with those delta values (offsets) on both directions. + * + * @note This is most useful on custom smart @c move() functions. + * + * @note Clipped smart objects already make use of this function on + * their @c move() smart function definition. + */ +EAPI void evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) EINA_ARG_NONNULL(1); + +/** + * @} + */ + +/** + * @defgroup Evas_Smart_Object_Clipped Clipped Smart Object + * + * Clipped smart object is a base to construct other smart objects + * based on the concept of having an internal clipper that is applied + * to all children objects. This clipper will control the visibility, + * clipping and color of sibling objects (remember that the clipping + * is recursive, and clipper color modulates the color of its + * clippees). By default, this base will also move children relatively + * to the parent, and delete them when parent is deleted. In other + * words, it is the base for simple object grouping. + * + * See some @ref Example_Evas_Smart_Objects "examples" of this group + * of functions. + * + * @see evas_object_smart_clipped_smart_set() + * + * @ingroup Evas_Smart_Object_Group + */ + +/** + * @addtogroup Evas_Smart_Object_Clipped + * @{ + */ + +/** + * Every subclass should provide this at the beginning of their own + * data set with evas_object_smart_data_set(). + */ + typedef struct _Evas_Object_Smart_Clipped_Data Evas_Object_Smart_Clipped_Data; + struct _Evas_Object_Smart_Clipped_Data + { + Evas_Object *clipper; + Evas *evas; + }; + + +/** + * Get the clipper object for the given clipped smart object. + * + * @param obj the clipped smart object to retrieve associated clipper + * from. + * @return the clipper object. + * + * Use this function if you want to change any of this clipper's + * properties, like colors. + * + * @see evas_object_smart_clipped_smart_add() + */ +EAPI Evas_Object *evas_object_smart_clipped_clipper_get (Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set a given smart class' callbacks so it implements the clipped smart + * object"'s interface. + * + * @param sc The smart class handle to operate on + * + * This call will assign all the required methods of the @p sc + * #Evas_Smart_Class instance to the implementations set for clipped + * smart objects. If one wants to "subclass" it, call this function + * and then override desired values. If one wants to call any original + * method, save it somewhere. Example: + * + * @code + * static Evas_Smart_Class parent_sc = EVAS_SMART_CLASS_INIT_NULL; + * + * static void my_class_smart_add(Evas_Object *o) + * { + * parent_sc.add(o); + * evas_object_color_set(evas_object_smart_clipped_clipper_get(o), + * 255, 0, 0, 255); + * } + * + * Evas_Smart_Class *my_class_new(void) + * { + * static Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("MyClass"); + * if (!parent_sc.name) + * { + * evas_object_smart_clipped_smart_set(&sc); + * parent_sc = sc; + * sc.add = my_class_smart_add; + * } + * return ≻ + * } + * @endcode + * + * Default behavior for each of #Evas_Smart_Class functions on a + * clipped smart object are: + * - @c add: creates a hidden clipper with "infinite" size, to clip + * any incoming members; + * - @c del: delete all children objects; + * - @c move: move all objects relative relatively; + * - @c resize: not defined; + * - @c show: if there are children objects, show clipper; + * - @c hide: hides clipper; + * - @c color_set: set the color of clipper; + * - @c clip_set: set clipper of clipper; + * - @c clip_unset: unset the clipper of clipper; + * + * @note There are other means of assigning parent smart classes to + * child ones, like the #EVAS_SMART_SUBCLASS_NEW macro or the + * evas_smart_class_inherit_full() function. + */ +EAPI void evas_object_smart_clipped_smart_set (Evas_Smart_Class *sc) EINA_ARG_NONNULL(1); + +/** + * Get a pointer to the clipped smart object's class, to use + * for proper inheritance + * + * @see #Evas_Smart_Object_Clipped for more information on this smart + * class + */ +EAPI const Evas_Smart_Class *evas_object_smart_clipped_class_get (void) EINA_CONST; + +/** + * @} + */ + +/** + * @defgroup Evas_Object_Box Box Smart Object + * + * A box is a convenience smart object that packs children inside it + * in @b sequence, using a layouting function specified by the + * user. There are a couple of pre-made layouting functions built-in + * in Evas, all of them using children size hints to define their + * size and alignment inside their cell space. + * + * Examples on this smart object's usage: + * - @ref Example_Evas_Box + * - @ref Example_Evas_Size_Hints + * + * @see @ref Evas_Object_Group_Size_Hints + * + * @ingroup Evas_Smart_Object_Group + */ + +/** + * @addtogroup Evas_Object_Box + * @{ + */ + +/** + * @typedef Evas_Object_Box_Api + * + * Smart class extension, providing extra box object requirements. + * + * @ingroup Evas_Object_Box + */ + typedef struct _Evas_Object_Box_Api Evas_Object_Box_Api; + +/** + * @typedef Evas_Object_Box_Data + * + * Smart object instance data, providing box object requirements. + * + * @ingroup Evas_Object_Box + */ + typedef struct _Evas_Object_Box_Data Evas_Object_Box_Data; + +/** + * @typedef Evas_Object_Box_Option + * + * The base structure for a box option. Box options are a way of + * extending box items properties, which will be taken into account + * for layouting decisions. The box layouting functions provided by + * Evas will only rely on objects' canonical size hints to layout + * them, so the basic box option has @b no (custom) property set. + * + * Users creating their own layouts, but not depending on extra child + * items' properties, would be fine just using + * evas_object_box_layout_set(). But if one desires a layout depending + * on extra child properties, he/she has to @b subclass the box smart + * object. Thus, by using evas_object_box_smart_class_get() and + * evas_object_box_smart_set(), the @c option_new() and @c + * option_free() smart class functions should be properly + * redefined/extended. + * + * Object properties are bound to an integer identifier and must have + * a name string. Their values are open to any data. See the API on + * option properties for more details. + * + * @ingroup Evas_Object_Box + */ + typedef struct _Evas_Object_Box_Option Evas_Object_Box_Option; + +/** + * @typedef Evas_Object_Box_Layout + * + * Function signature for an Evas box object layouting routine. By + * @a o it will be passed the box object in question, by @a priv it will + * be passed the box's internal data and, by @a user_data, it will be + * passed any custom data one could have set to a given box layouting + * function, with evas_object_box_layout_set(). + * + * @ingroup Evas_Object_Box + */ + typedef void (*Evas_Object_Box_Layout) (Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data); + +/** + * @def EVAS_OBJECT_BOX_API_VERSION + * + * Current version for Evas box object smart class, a value which goes + * to _Evas_Object_Box_Api::version. + * + * @ingroup Evas_Object_Box + */ +#define EVAS_OBJECT_BOX_API_VERSION 1 + +/** + * @struct _Evas_Object_Box_Api + * + * This structure should be used by any smart class inheriting from + * the box's one, to provide custom box behavior which could not be + * achieved only by providing a layout function, with + * evas_object_box_layout_set(). + * + * @extends Evas_Smart_Class + * @ingroup Evas_Object_Box + */ + struct _Evas_Object_Box_Api + { + Evas_Smart_Class base; /**< Base smart class struct, need for all smart objects */ + int version; /**< Version of this smart class definition */ + Evas_Object_Box_Option *(*append) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to append child elements in boxes */ + Evas_Object_Box_Option *(*prepend) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to prepend child elements in boxes */ + Evas_Object_Box_Option *(*insert_before) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference); /**< Smart function to insert a child element before another in boxes */ + Evas_Object_Box_Option *(*insert_after) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference); /**< Smart function to insert a child element after another in boxes */ + Evas_Object_Box_Option *(*insert_at) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos); /**< Smart function to insert a child element at a given positon on boxes */ + Evas_Object *(*remove) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to remove a child element from boxes */ + Evas_Object *(*remove_at) (Evas_Object *o, Evas_Object_Box_Data *priv, unsigned int pos); /**< Smart function to remove a child element from boxes, by its position */ + Eina_Bool (*property_set) (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args); /**< Smart function to set a custom property on a box child */ + Eina_Bool (*property_get) (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args); /**< Smart function to retrieve a custom property from a box child */ + const char *(*property_name_get)(Evas_Object *o, int property); /**< Smart function to get the name of a custom property of box children */ + int (*property_id_get) (Evas_Object *o, const char *name); /**< Smart function to get the numerical ID of a custom property of box children */ + Evas_Object_Box_Option *(*option_new) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to create a new box option struct */ + void (*option_free) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt); /**< Smart function to delete a box option struct */ + }; + +/** + * @def EVAS_OBJECT_BOX_API_INIT + * + * Initializer for a whole #Evas_Object_Box_Api structure, with + * @c NULL values on its specific fields. + * + * @param smart_class_init initializer to use for the "base" field + * (#Evas_Smart_Class). + * + * @see EVAS_SMART_CLASS_INIT_NULL + * @see EVAS_SMART_CLASS_INIT_VERSION + * @see EVAS_SMART_CLASS_INIT_NAME_VERSION + * @see EVAS_OBJECT_BOX_API_INIT_NULL + * @see EVAS_OBJECT_BOX_API_INIT_VERSION + * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION + * @ingroup Evas_Object_Box + */ +#define EVAS_OBJECT_BOX_API_INIT(smart_class_init) {smart_class_init, EVAS_OBJECT_BOX_API_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} + +/** + * @def EVAS_OBJECT_BOX_API_INIT_NULL + * + * Initializer to zero out a whole #Evas_Object_Box_Api structure. + * + * @see EVAS_OBJECT_BOX_API_INIT_VERSION + * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION + * @see EVAS_OBJECT_BOX_API_INIT + * @ingroup Evas_Object_Box + */ +#define EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL) + +/** + * @def EVAS_OBJECT_BOX_API_INIT_VERSION + * + * Initializer to zero out a whole #Evas_Object_Box_Api structure and + * set a specific version on it. + * + * This is similar to #EVAS_OBJECT_BOX_API_INIT_NULL, but it will set + * the version field of #Evas_Smart_Class (base field) to the latest + * #EVAS_SMART_CLASS_VERSION. + * + * @see EVAS_OBJECT_BOX_API_INIT_NULL + * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION + * @see EVAS_OBJECT_BOX_API_INIT + * @ingroup Evas_Object_Box + */ +#define EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION) + +/** + * @def EVAS_OBJECT_BOX_API_INIT_NAME_VERSION + * + * Initializer to zero out a whole #Evas_Object_Box_Api structure and + * set its name and version. + * + * This is similar to #EVAS_OBJECT_BOX_API_INIT_NULL, but it will also + * set the version field of #Evas_Smart_Class (base field) to the + * latest #EVAS_SMART_CLASS_VERSION and name it to the specific value. + * + * It will keep a reference to the name field as a "const char *", + * i.e., the name must be available while the structure is + * used (hint: static or global variable!) and must not be modified. + * + * @see EVAS_OBJECT_BOX_API_INIT_NULL + * @see EVAS_OBJECT_BOX_API_INIT_VERSION + * @see EVAS_OBJECT_BOX_API_INIT + * @ingroup Evas_Object_Box + */ +#define EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name)) + +/** + * @struct _Evas_Object_Box_Data + * + * This structure augments clipped smart object's instance data, + * providing extra members required by generic box implementation. If + * a subclass inherits from #Evas_Object_Box_Api, then it may augment + * #Evas_Object_Box_Data to fit its own needs. + * + * @extends Evas_Object_Smart_Clipped_Data + * @ingroup Evas_Object_Box + */ + struct _Evas_Object_Box_Data + { + Evas_Object_Smart_Clipped_Data base; + const Evas_Object_Box_Api *api; + struct { + double h, v; + } align; + struct { + Evas_Coord h, v; + } pad; + Eina_List *children; + struct { + Evas_Object_Box_Layout cb; + void *data; + void (*free_data)(void *data); + } layout; + Eina_Bool layouting : 1; + Eina_Bool children_changed : 1; + }; + + struct _Evas_Object_Box_Option + { + Evas_Object *obj; /**< Pointer to the box child object, itself */ + Eina_Bool max_reached:1; + Eina_Bool min_reached:1; + Evas_Coord alloc_size; + }; /**< #Evas_Object_Box_Option struct fields */ + +/** + * Set the default box @a api struct (Evas_Object_Box_Api) + * with the default values. May be used to extend that API. + * + * @param api The box API struct to set back, most probably with + * overriden fields (on class extensions scenarios) + */ +EAPI void evas_object_box_smart_set (Evas_Object_Box_Api *api) EINA_ARG_NONNULL(1); + +/** + * Get the Evas box smart class, for inheritance purposes. + * + * @return the (canonical) Evas box smart class. + * + * The returned value is @b not to be modified, just use it as your + * parent class. + */ +EAPI const Evas_Object_Box_Api *evas_object_box_smart_class_get (void) EINA_CONST; + +/** + * Set a new layouting function to a given box object + * + * @param o The box object to operate on. + * @param cb The new layout function to set on @p o. + * @param data Data pointer to be passed to @p cb. + * @param free_data Function to free @p data, if need be. + * + * A box layout function affects how a box object displays child + * elements within its area. The list of pre-defined box layouts + * available in Evas is: + * - evas_object_box_layout_horizontal() + * - evas_object_box_layout_vertical() + * - evas_object_box_layout_homogeneous_horizontal() + * - evas_object_box_layout_homogeneous_vertical() + * - evas_object_box_layout_homogeneous_max_size_horizontal() + * - evas_object_box_layout_homogeneous_max_size_vertical() + * - evas_object_box_layout_flow_horizontal() + * - evas_object_box_layout_flow_vertical() + * - evas_object_box_layout_stack() + * + * Refer to each of their documentation texts for details on them. + * + * @note A box layouting function will be triggered by the @c + * 'calculate' smart callback of the box's smart class. + */ +EAPI void evas_object_box_layout_set (Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) EINA_ARG_NONNULL(1, 2); + +/** + * Add a new box object on the provided canvas. + * + * @param evas The canvas to create the box object on. + * @return @c NULL on error, a pointer to a new box object on + * success. + * + * After instantiation, if a box object hasn't its layout function + * set, via evas_object_box_layout_set(), it will have it by default + * set to evas_object_box_layout_horizontal(). The remaining + * properties of the box must be set/retrieved via + * evas_object_box_{h,v}_{align,padding}_{get,set)(). + */ +EAPI Evas_Object *evas_object_box_add (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Add a new box as a @b child of a given smart object. + * + * @param parent The parent smart object to put the new box in. + * @return @c NULL on error, a pointer to a new box object on + * success. + * + * This is a helper function that has the same effect of putting a new + * box object into @p parent by use of evas_object_smart_member_add(). + * + * @see evas_object_box_add() + */ +EAPI Evas_Object *evas_object_box_add_to (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Layout function which sets the box @a o to a (basic) horizontal box + * + * @param o The box object in question + * @param priv The smart data of the @p o + * @param data The data pointer passed on + * evas_object_box_layout_set(), if any + * + * In this layout, the box object's overall behavior is controlled by + * its padding/alignment properties, which are set by the + * evas_object_box_{h,v}_{align,padding}_set() family of + * functions. The size hints of the elements in the box -- set by the + * evas_object_size_hint_{align,padding,weight}_set() functions + * -- also control the way this function works. + * + * \par Box's properties: + * @c align_h controls the horizontal alignment of the child objects + * relative to the containing box. When set to @c 0.0, children are + * aligned to the left. A value of @c 1.0 makes them aligned to the + * right border. Values in between align them proportionally. Note + * that if the size required by the children, which is given by their + * widths and the @c padding_h property of the box, is bigger than the + * their container's width, the children will be displayed out of the + * box's bounds. A negative value of @c align_h makes the box to + * @b justify its children. The padding between them, in this case, is + * corrected so that the leftmost one touches the left border and the + * rightmost one touches the right border (even if they must + * overlap). The @c align_v and @c padding_v properties of the box + * @b don't contribute to its behaviour when this layout is chosen. + * + * \par Child element's properties: + * @c align_x does @b not influence the box's behavior. @c padding_l + * and @c padding_r sum up to the container's horizontal padding + * between elements. The child's @c padding_t, @c padding_b and + * @c align_y properties apply for padding/alignment relative to the + * overall height of the box. Finally, there is the @c weight_x + * property, which, if set to a non-zero value, tells the container + * that the child width is @b not pre-defined. If the container can't + * accommodate all its children, it sets the widths of the ones + * with weights to sizes as small as they can all fit into + * it. If the size required by the children is less than the + * available, the box increases its childrens' (which have weights) + * widths as to fit the remaining space. The @c weight_x property, + * besides telling the element is resizable, gives a @b weight for the + * resizing process. The parent box will try to distribute (or take + * off) widths accordingly to the @b normalized list of weigths: most + * weighted children remain/get larger in this process than the least + * ones. @c weight_y does not influence the layout. + * + * If one desires that, besides having weights, child elements must be + * resized bounded to a minimum or maximum size, those size hints must + * be set, by the evas_object_size_hint_{min,max}_set() + * functions. + */ +EAPI void evas_object_box_layout_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Layout function which sets the box @a o to a (basic) vertical box + * + * This function behaves analogously to + * evas_object_box_layout_horizontal(). The description of its + * behaviour can be derived from that function's documentation. + */ +EAPI void evas_object_box_layout_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Layout function which sets the box @a o to a @b homogeneous + * vertical box + * + * This function behaves analogously to + * evas_object_box_layout_homogeneous_horizontal(). The description + * of its behaviour can be derived from that function's documentation. + */ +EAPI void evas_object_box_layout_homogeneous_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Layout function which sets the box @a o to a @b homogeneous + * horizontal box + * + * @param o The box object in question + * @param priv The smart data of the @p o + * @param data The data pointer passed on + * evas_object_box_layout_set(), if any + * + * In a homogeneous horizontal box, its width is divided @b equally + * between the contained objects. The box's overall behavior is + * controlled by its padding/alignment properties, which are set by + * the evas_object_box_{h,v}_{align,padding}_set() family of + * functions. The size hints the elements in the box -- set by the + * evas_object_size_hint_{align,padding,weight}_set() functions + * -- also control the way this function works. + * + * \par Box's properties: + * @c align_h has no influence on the box for this layout. + * @c padding_h tells the box to draw empty spaces of that size, in + * pixels, between the (equal) child objects's cells. The @c align_v + * and @c padding_v properties of the box don't contribute to its + * behaviour when this layout is chosen. + * + * \par Child element's properties: + * @c padding_l and @c padding_r sum up to the required width of the + * child element. The @c align_x property tells the relative position + * of this overall child width in its allocated cell (@r 0.0 to + * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to + * @c align_x makes the box try to resize this child element to the exact + * width of its cell (respecting the minimum and maximum size hints on + * the child's width and accounting for its horizontal padding + * hints). The child's @c padding_t, @c padding_b and @c align_y + * properties apply for padding/alignment relative to the overall + * height of the box. A value of @c -1.0 to @c align_y makes the box + * try to resize this child element to the exact height of its parent + * (respecting the maximum size hint on the child's height). + */ +EAPI void evas_object_box_layout_homogeneous_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Layout function which sets the box @a o to a maximum size, + * homogeneous horizontal box + * + * @param o The box object in question + * @param priv The smart data of the @p o + * @param data The data pointer passed on + * evas_object_box_layout_set(), if any + * + * In a maximum size, homogeneous horizontal box, besides having cells + * of equal size reserved for the child objects, this size will + * be defined by the size of the @b largest child in the box (in + * width). The box's overall behavior is controlled by its properties, + * which are set by the + * evas_object_box_{h,v}_{align,padding}_set() family of + * functions. The size hints of the elements in the box -- set by the + * evas_object_size_hint_{align,padding,weight}_set() functions + * -- also control the way this function works. + * + * \par Box's properties: + * @c padding_h tells the box to draw empty spaces of that size, in + * pixels, between the child objects's cells. @c align_h controls the + * horizontal alignment of the child objects, relative to the + * containing box. When set to @c 0.0, children are aligned to the + * left. A value of @c 1.0 lets them aligned to the right + * border. Values in between align them proportionally. A negative + * value of @c align_h makes the box to @b justify its children + * cells. The padding between them, in this case, is corrected so that + * the leftmost one touches the left border and the rightmost one + * touches the right border (even if they must overlap). The + * @c align_v and @c padding_v properties of the box don't contribute to + * its behaviour when this layout is chosen. + * + * \par Child element's properties: + * @c padding_l and @c padding_r sum up to the required width of the + * child element. The @c align_x property tells the relative position + * of this overall child width in its allocated cell (@c 0.0 to + * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to + * @c align_x makes the box try to resize this child element to the exact + * width of its cell (respecting the minimun and maximum size hints on + * the child's width and accounting for its horizontal padding + * hints). The child's @c padding_t, @c padding_b and @c align_y + * properties apply for padding/alignment relative to the overall + * height of the box. A value of @c -1.0 to @c align_y makes the box + * try to resize this child element to the exact height of its parent + * (respecting the max hint on the child's height). + */ +EAPI void evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Layout function which sets the box @a o to a maximum size, + * homogeneous vertical box + * + * This function behaves analogously to + * evas_object_box_layout_homogeneous_max_size_horizontal(). The + * description of its behaviour can be derived from that function's + * documentation. + */ +EAPI void evas_object_box_layout_homogeneous_max_size_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Layout function which sets the box @a o to a @b flow horizontal + * box. + * + * @param o The box object in question + * @param priv The smart data of the @p o + * @param data The data pointer passed on + * evas_object_box_layout_set(), if any + * + * In a flow horizontal box, the box's child elements are placed in + * @b rows (think of text as an analogy). A row has as much elements as + * can fit into the box's width. The box's overall behavior is + * controlled by its properties, which are set by the + * evas_object_box_{h,v}_{align,padding}_set() family of + * functions. The size hints of the elements in the box -- set by the + * evas_object_size_hint_{align,padding,weight}_set() functions + * -- also control the way this function works. + * + * \par Box's properties: + * @c padding_h tells the box to draw empty spaces of that size, in + * pixels, between the child objects's cells. @c align_h dictates the + * horizontal alignment of the rows (@c 0.0 to left align them, @c 1.0 + * to right align). A value of @c -1.0 to @c align_h lets the rows + * @b justified horizontally. @c align_v controls the vertical alignment + * of the entire set of rows (@c 0.0 to top, @c 1.0 to bottom). A + * value of @c -1.0 to @c align_v makes the box to @b justify the rows + * vertically. The padding between them, in this case, is corrected so + * that the first row touches the top border and the last one touches + * the bottom border (even if they must overlap). @c padding_v has no + * influence on the layout. + * + * \par Child element's properties: + * @c padding_l and @c padding_r sum up to the required width of the + * child element. The @c align_x property has no influence on the + * layout. The child's @c padding_t and @c padding_b sum up to the + * required height of the child element and is the only means (besides + * row justifying) of setting space between rows. Note, however, that + * @c align_y dictates positioning relative to the largest + * height required by a child object in the actual row. + */ +EAPI void evas_object_box_layout_flow_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Layout function which sets the box @a o to a @b flow vertical box. + * + * This function behaves analogously to + * evas_object_box_layout_flow_horizontal(). The description of its + * behaviour can be derived from that function's documentation. + */ +EAPI void evas_object_box_layout_flow_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Layout function which sets the box @a o to a @b stacking box + * + * @param o The box object in question + * @param priv The smart data of the @p o + * @param data The data pointer passed on + * evas_object_box_layout_set(), if any + * + * In a stacking box, all children will be given the same size -- the + * box's own size -- and they will be stacked one above the other, so + * that the first object in @p o's internal list of child elements + * will be the bottommost in the stack. + * + * \par Box's properties: + * No box properties are used. + * + * \par Child element's properties: + * @c padding_l and @c padding_r sum up to the required width of the + * child element. The @c align_x property tells the relative position + * of this overall child width in its allocated cell (@c 0.0 to + * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to @c + * align_x makes the box try to resize this child element to the exact + * width of its cell (respecting the min and max hints on the child's + * width and accounting for its horizontal padding properties). The + * same applies to the vertical axis. + */ +EAPI void evas_object_box_layout_stack (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Set the alignment of the whole bounding box of contents, for a + * given box object. + * + * @param o The given box object to set alignment from + * @param horizontal The horizontal alignment, in pixels + * @param vertical the vertical alignment, in pixels + * + * This will influence how a box object is to align its bounding box + * of contents within its own area. The values @b must be in the range + * @c 0.0 - @c 1.0, or undefined behavior is expected. For horizontal + * alignment, @c 0.0 means to the left, with @c 1.0 meaning to the + * right. For vertical alignment, @c 0.0 means to the top, with @c 1.0 + * meaning to the bottom. + * + * @note The default values for both alignments is @c 0.5. + * + * @see evas_object_box_align_get() + */ +EAPI void evas_object_box_align_set (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1); + +/** + * Get the alignment of the whole bounding box of contents, for a + * given box object. + * + * @param o The given box object to get alignment from + * @param horizontal Pointer to a variable where to store the + * horizontal alignment + * @param vertical Pointer to a variable where to store the vertical + * alignment + * + * @see evas_object_box_align_set() for more information + */ +EAPI void evas_object_box_align_get (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1); + +/** + * Set the (space) padding between cells set for a given box object. + * + * @param o The given box object to set padding from + * @param horizontal The horizontal padding, in pixels + * @param vertical the vertical padding, in pixels + * + * @note The default values for both padding components is @c 0. + * + * @see evas_object_box_padding_get() + */ +EAPI void evas_object_box_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1); + +/** + * Get the (space) padding between cells set for a given box object. + * + * @param o The given box object to get padding from + * @param horizontal Pointer to a variable where to store the + * horizontal padding + * @param vertical Pointer to a variable where to store the vertical + * padding + * + * @see evas_object_box_padding_set() + */ +EAPI void evas_object_box_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1); + +/** + * Append a new @a child object to the given box object @a o. + * + * @param o The given box object + * @param child A child Evas object to be made a member of @p o + * @return A box option bound to the recently added box item or @c + * NULL, on errors + * + * On success, the @c "child,added" smart event will take place. + * + * @note The actual placing of the item relative to @p o's area will + * depend on the layout set to it. For example, on horizontal layouts + * an item in the end of the box's list of children will appear on its + * right. + * + * @note This call will trigger the box's _Evas_Object_Box_Api::append + * smart function. + */ +EAPI Evas_Object_Box_Option *evas_object_box_append (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); + +/** + * Prepend a new @a child object to the given box object @a o. + * + * @param o The given box object + * @param child A child Evas object to be made a member of @p o + * @return A box option bound to the recently added box item or @c + * NULL, on errors + * + * On success, the @c "child,added" smart event will take place. + * + * @note The actual placing of the item relative to @p o's area will + * depend on the layout set to it. For example, on horizontal layouts + * an item in the beginning of the box's list of children will appear + * on its left. + * + * @note This call will trigger the box's + * _Evas_Object_Box_Api::prepend smart function. + */ +EAPI Evas_Object_Box_Option *evas_object_box_prepend (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); + +/** + * Insert a new @a child object before another existing one, in + * a given box object @a o. + * + * @param o The given box object + * @param child A child Evas object to be made a member of @p o + * @param reference The child object to place this new one before + * @return A box option bound to the recently added box item or @c + * NULL, on errors + * + * On success, the @c "child,added" smart event will take place. + * + * @note This function will fail if @p reference is not a member of @p + * o. + * + * @note The actual placing of the item relative to @p o's area will + * depend on the layout set to it. + * + * @note This call will trigger the box's + * _Evas_Object_Box_Api::insert_before smart function. + */ +EAPI Evas_Object_Box_Option *evas_object_box_insert_before (Evas_Object *o, Evas_Object *child, const Evas_Object *reference) EINA_ARG_NONNULL(1, 2, 3); + +/** + * Insert a new @a child object after another existing one, in + * a given box object @a o. + * + * @param o The given box object + * @param child A child Evas object to be made a member of @p o + * @param reference The child object to place this new one after + * @return A box option bound to the recently added box item or @c + * NULL, on errors + * + * On success, the @c "child,added" smart event will take place. + * + * @note This function will fail if @p reference is not a member of @p + * o. + * + * @note The actual placing of the item relative to @p o's area will + * depend on the layout set to it. + * + * @note This call will trigger the box's + * _Evas_Object_Box_Api::insert_after smart function. + */ +EAPI Evas_Object_Box_Option *evas_object_box_insert_after (Evas_Object *o, Evas_Object *child, const Evas_Object *referente) EINA_ARG_NONNULL(1, 2, 3); + +/** + * Insert a new @a child object at a given position, in a given + * box object @a o. + * + * @param o The given box object + * @param child A child Evas object to be made a member of @p o + * @param pos The numeric position (starting from @c 0) to place the + * new child object at + * @return A box option bound to the recently added box item or @c + * NULL, on errors + * + * On success, the @c "child,added" smart event will take place. + * + * @note This function will fail if the given position is invalid, + * given @p o's internal list of elements. + * + * @note The actual placing of the item relative to @p o's area will + * depend on the layout set to it. + * + * @note This call will trigger the box's + * _Evas_Object_Box_Api::insert_at smart function. + */ +EAPI Evas_Object_Box_Option *evas_object_box_insert_at (Evas_Object *o, Evas_Object *child, unsigned int pos) EINA_ARG_NONNULL(1, 2); + +/** + * Remove a given object from a box object, unparenting it again. + * + * @param o The box object to remove a child object from + * @param child The handle to the child object to be removed + * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise + * + * On removal, you'll get an unparented object again, just as it was + * before you inserted it in the box. The + * _Evas_Object_Box_Api::option_free box smart callback will be called + * automatilly for you and, also, the @c "child,removed" smart event + * will take place. + * + * @note This call will trigger the box's _Evas_Object_Box_Api::remove + * smart function. + */ +EAPI Eina_Bool evas_object_box_remove (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); + +/** + * Remove an object, bound to a given position in a box object, + * unparenting it again. + * + * @param o The box object to remove a child object from + * @param in The numeric position (starting from @c 0) of the child + * object to be removed + * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise + * + * On removal, you'll get an unparented object again, just as it was + * before you inserted it in the box. The @c option_free() box smart + * callback will be called automatilly for you and, also, the + * @c "child,removed" smart event will take place. + * + * @note This function will fail if the given position is invalid, + * given @p o's internal list of elements. + * + * @note This call will trigger the box's + * _Evas_Object_Box_Api::remove_at smart function. + */ +EAPI Eina_Bool evas_object_box_remove_at (Evas_Object *o, unsigned int pos) EINA_ARG_NONNULL(1); + +/** + * Remove @b all child objects from a box object, unparenting them + * again. + * + * @param o The box object to remove a child object from + * @param child The handle to the child object to be removed + * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise + * + * This has the same effect of calling evas_object_box_remove() on + * each of @p o's child objects, in sequence. If, and only if, all + * those calls succeed, so does this one. + */ +EAPI Eina_Bool evas_object_box_remove_all (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1); + +/** + * Get an iterator to walk the list of children of a given box object. + * + * @param o The box to retrieve an items iterator from + * @return An iterator on @p o's child objects, on success, or @c NULL, + * on errors + * + * @note Do @b not remove or delete objects while walking the list. + */ +EAPI Eina_Iterator *evas_object_box_iterator_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Get an accessor (a structure providing random items access) to the + * list of children of a given box object. + * + * @param o The box to retrieve an items iterator from + * @return An accessor on @p o's child objects, on success, or @c NULL, + * on errors + * + * @note Do not remove or delete objects while walking the list. + */ +EAPI Eina_Accessor *evas_object_box_accessor_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Get the list of children objects in a given box object. + * + * @param o The box to retrieve an items list from + * @return A list of @p o's child objects, on success, or @c NULL, + * on errors (or if it has no child objects) + * + * The returned list should be freed with @c eina_list_free() when you + * no longer need it. + * + * @note This is a duplicate of the list kept by the box internally. + * It's up to the user to destroy it when it no longer needs it. + * It's possible to remove objects from the box when walking + * this list, but these removals won't be reflected on it. + */ +EAPI Eina_List *evas_object_box_children_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Get the name of the property of the child elements of the box @a o + * which have @a id as identifier + * + * @param o The box to search child options from + * @param id The numerical identifier of the option being searched, for + * its name + * @return The name of the given property or @c NULL, on errors. + * + * @note This call won't do anything for a canonical Evas box. Only + * users which have @b subclassed it, setting custom box items options + * (see #Evas_Object_Box_Option) on it, would benefit from this + * function. They'd have to implement it and set it to be the + * _Evas_Object_Box_Api::property_name_get smart class function of the + * box, which is originally set to @c NULL. + */ +EAPI const char *evas_object_box_option_property_name_get (Evas_Object *o, int property) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Get the numerical identifier of the property of the child elements + * of the box @a o which have @a name as name string + * + * @param o The box to search child options from + * @param name The name string of the option being searched, for + * its ID + * @return The numerical ID of the given property or @c -1, on + * errors. + * + * @note This call won't do anything for a canonical Evas box. Only + * users which have @b subclassed it, setting custom box items options + * (see #Evas_Object_Box_Option) on it, would benefit from this + * function. They'd have to implement it and set it to be the + * _Evas_Object_Box_Api::property_id_get smart class function of the + * box, which is originally set to @c NULL. + */ +EAPI int evas_object_box_option_property_id_get (Evas_Object *o, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + +/** + * Set a property value (by its given numerical identifier), on a + * given box child element + * + * @param o The box parenting the child element + * @param opt The box option structure bound to the child box element + * to set a property on + * @param id The numerical ID of the given property + * @param ... (List of) actual value(s) to be set for this + * property. It (they) @b must be of the same type the user has + * defined for it (them). + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. + * + * @note This call won't do anything for a canonical Evas box. Only + * users which have @b subclassed it, setting custom box items options + * (see #Evas_Object_Box_Option) on it, would benefit from this + * function. They'd have to implement it and set it to be the + * _Evas_Object_Box_Api::property_set smart class function of the box, + * which is originally set to @c NULL. + * + * @note This function will internally create a variable argument + * list, with the values passed after @p property, and call + * evas_object_box_option_property_vset() with this list and the same + * previous arguments. + */ +EAPI Eina_Bool evas_object_box_option_property_set (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2); + +/** + * Set a property value (by its given numerical identifier), on a + * given box child element -- by a variable argument list + * + * @param o The box parenting the child element + * @param opt The box option structure bound to the child box element + * to set a property on + * @param id The numerical ID of the given property + * @param va_list The variable argument list implementing the value to + * be set for this property. It @b must be of the same type the user has + * defined for it. + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. + * + * This is a variable argument list variant of the + * evas_object_box_option_property_set(). See its documentation for + * more details. + */ +EAPI Eina_Bool evas_object_box_option_property_vset (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2); + +/** + * Get a property's value (by its given numerical identifier), on a + * given box child element + * + * @param o The box parenting the child element + * @param opt The box option structure bound to the child box element + * to get a property from + * @param id The numerical ID of the given property + * @param ... (List of) pointer(s) where to store the value(s) set for + * this property. It (they) @b must point to variable(s) of the same + * type the user has defined for it (them). + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. + * + * @note This call won't do anything for a canonical Evas box. Only + * users which have @b subclassed it, getting custom box items options + * (see #Evas_Object_Box_Option) on it, would benefit from this + * function. They'd have to implement it and get it to be the + * _Evas_Object_Box_Api::property_get smart class function of the + * box, which is originally get to @c NULL. + * + * @note This function will internally create a variable argument + * list, with the values passed after @p property, and call + * evas_object_box_option_property_vget() with this list and the same + * previous arguments. + */ +EAPI Eina_Bool evas_object_box_option_property_get (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2); + +/** + * Get a property's value (by its given numerical identifier), on a + * given box child element -- by a variable argument list + * + * @param o The box parenting the child element + * @param opt The box option structure bound to the child box element + * to get a property from + * @param id The numerical ID of the given property + * @param va_list The variable argument list with pointers to where to + * store the values of this property. They @b must point to variables + * of the same type the user has defined for them. + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. + * + * This is a variable argument list variant of the + * evas_object_box_option_property_get(). See its documentation for + * more details. + */ +EAPI Eina_Bool evas_object_box_option_property_vget (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2); + +/** + * @} + */ + +/** + * @defgroup Evas_Object_Table Table Smart Object. + * + * Convenience smart object that packs children using a tabular + * layout using children size hints to define their size and + * alignment inside their cell space. + * + * @ref tutorial_table shows how to use this Evas_Object. + * + * @see @ref Evas_Object_Group_Size_Hints + * + * @ingroup Evas_Smart_Object_Group + * + * @{ + */ + +/** + * @brief Create a new table. + * + * @param evas Canvas in which table will be added. + */ +EAPI Evas_Object *evas_object_table_add (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * @brief Create a table that is child of a given element @a parent. + * + * @see evas_object_table_add() + */ +EAPI Evas_Object *evas_object_table_add_to (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * @brief Set how this table should layout children. + * + * @todo consider aspect hint and respect it. + * + * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE + * If table does not use homogeneous mode then columns and rows will + * be calculated based on hints of individual cells. This operation + * mode is more flexible, but more complex and heavy to calculate as + * well. @b Weight properties are handled as a boolean expand. Negative + * alignment will be considered as 0.5. This is the default. + * + * @todo @c EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE should balance weight. + * + * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE + * When homogeneous is relative to table the own table size is divided + * equally among children, filling the whole table area. That is, if + * table has @c WIDTH and @c COLUMNS, each cell will get WIDTH / + * COLUMNS pixels. If children have minimum size that is larger + * than this amount (including padding), then it will overflow and be + * aligned respecting the alignment hint, possible overlapping sibling + * cells. @b Weight hint is used as a boolean, if greater than zero it + * will make the child expand in that axis, taking as much space as + * possible (bounded to maximum size hint). Negative alignment will be + * considered as 0.5. + * + * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM + * When homogeneous is relative to item it means the greatest minimum + * cell size will be used. That is, if no element is set to expand, + * the table will have its contents to a minimum size, the bounding + * box of all these children will be aligned relatively to the table + * object using evas_object_table_align_get(). If the table area is + * too small to hold this minimum bounding box, then the objects will + * keep their size and the bounding box will overflow the box area, + * still respecting the alignment. @b Weight hint is used as a + * boolean, if greater than zero it will make that cell expand in that + * axis, toggling the expand mode, which makes the table behave + * much like @b EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE, except that the + * bounding box will overflow and items will not overlap siblings. If + * no minimum size is provided at all then the table will fallback to + * expand mode as well. + */ +EAPI void evas_object_table_homogeneous_set (Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) EINA_ARG_NONNULL(1); + +/** + * Get the current layout homogeneous mode. + * + * @see evas_object_table_homogeneous_set() + */ +EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Set padding between cells. + */ +EAPI void evas_object_table_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1); + +/** + * Get padding between cells. + */ +EAPI void evas_object_table_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1); + +/** + * Set the alignment of the whole bounding box of contents. + */ +EAPI void evas_object_table_align_set (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1); + +/** + * Get alignment of the whole bounding box of contents. + */ +EAPI void evas_object_table_align_get (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1); + +/** + * Sets the mirrored mode of the table. In mirrored mode the table items go + * from right to left instead of left to right. That is, 1,1 is top right, not + * top left. + * + * @param obj The table object. + * @param mirrored the mirrored mode to set + * @since 1.1.0 + */ +EAPI void evas_object_table_mirrored_set (Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1); + +/** + * Gets the mirrored mode of the table. + * + * @param obj The table object. + * @return EINA_TRUE if it's a mirrored table, EINA_FALSE otherwise. + * @since 1.1.0 + * @see evas_object_table_mirrored_set() + */ +EAPI Eina_Bool evas_object_table_mirrored_get (const Evas_Object *o) EINA_ARG_NONNULL(1); + +/** + * Get packing location of a child of table + * + * @param o The given table object. + * @param child The child object to add. + * @param col pointer to store relative-horizontal position to place child. + * @param row pointer to store relative-vertical position to place child. + * @param colspan pointer to store how many relative-horizontal position to use for this child. + * @param rowspan pointer to store how many relative-vertical position to use for this child. + * + * @return 1 on success, 0 on failure. + * @since 1.1.0 + */ +EAPI Eina_Bool evas_object_table_pack_get(Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan); + +/** + * Add a new child to a table object or set its current packing. + * + * @param o The given table object. + * @param child The child object to add. + * @param col relative-horizontal position to place child. + * @param row relative-vertical position to place child. + * @param colspan how many relative-horizontal position to use for this child. + * @param rowspan how many relative-vertical position to use for this child. + * + * @return 1 on success, 0 on failure. + */ +EAPI Eina_Bool evas_object_table_pack (Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(1, 2); + +/** + * Remove child from table. + * + * @note removing a child will immediately call a walk over children in order + * to recalculate numbers of columns and rows. If you plan to remove + * all children, use evas_object_table_clear() instead. + * + * @return 1 on success, 0 on failure. + */ +EAPI Eina_Bool evas_object_table_unpack (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); + +/** + * Faster way to remove all child objects from a table object. + * + * @param o The given table object. + * @param clear if true, it will delete just removed children. + */ +EAPI void evas_object_table_clear (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1); + +/** + * Get the number of columns and rows this table takes. + * + * @note columns and rows are virtual entities, one can specify a table + * with a single object that takes 4 columns and 5 rows. The only + * difference for a single cell table is that paddings will be + * accounted proportionally. + */ +EAPI void evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows) EINA_ARG_NONNULL(1); + +/** + * Get an iterator to walk the list of children for the table. + * + * @note Do not remove or delete objects while walking the list. + */ +EAPI Eina_Iterator *evas_object_table_iterator_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Get an accessor to get random access to the list of children for the table. + * + * @note Do not remove or delete objects while walking the list. + */ +EAPI Eina_Accessor *evas_object_table_accessor_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Get the list of children for the table. + * + * @note This is a duplicate of the list kept by the table internally. + * It's up to the user to destroy it when it no longer needs it. + * It's possible to remove objects from the table when walking this + * list, but these removals won't be reflected on it. + */ +EAPI Eina_List *evas_object_table_children_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Get the child of the table at the given coordinates + * + * @note This does not take into account col/row spanning + */ +EAPI Evas_Object *evas_object_table_child_get (const Evas_Object *o, unsigned short col, unsigned short row) EINA_ARG_NONNULL(1); +/** + * @} + */ + +/** + * @defgroup Evas_Object_Grid Grid Smart Object. + * + * Convenience smart object that packs children under a regular grid + * layout, using their virtual grid location and size to determine + * children's positions inside the grid object's area. + * + * @ingroup Evas_Smart_Object_Group + * @since 1.1.0 + */ + +/** + * @addtogroup Evas_Object_Grid + * @{ + */ + +/** + * Create a new grid. + * + * It's set to a virtual size of 1x1 by default and add children with + * evas_object_grid_pack(). + * @since 1.1.0 + */ +EAPI Evas_Object *evas_object_grid_add (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Create a grid that is child of a given element @a parent. + * + * @see evas_object_grid_add() + * @since 1.1.0 + */ +EAPI Evas_Object *evas_object_grid_add_to (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Set the virtual resolution for the grid + * + * @param o The grid object to modify + * @param w The virtual horizontal size (resolution) in integer units + * @param h The virtual vertical size (resolution) in integer units + * @since 1.1.0 + */ +EAPI void evas_object_grid_size_set (Evas_Object *o, int w, int h) EINA_ARG_NONNULL(1); + +/** + * Get the current virtual resolution + * + * @param o The grid object to query + * @param w A pointer to an integer to store the virtual width + * @param h A pointer to an integer to store the virtual height + * @see evas_object_grid_size_set() + * @since 1.1.0 + */ +EAPI void evas_object_grid_size_get (const Evas_Object *o, int *w, int *h) EINA_ARG_NONNULL(1); + +/** + * Sets the mirrored mode of the grid. In mirrored mode the grid items go + * from right to left instead of left to right. That is, 0,0 is top right, not + * to left. + * + * @param obj The grid object. + * @param mirrored the mirrored mode to set + * @since 1.1.0 + */ +EAPI void evas_object_grid_mirrored_set (Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1); + +/** + * Gets the mirrored mode of the grid. + * + * @param obj The grid object. + * @return EINA_TRUE if it's a mirrored grid, EINA_FALSE otherwise. + * @see evas_object_grid_mirrored_set() + * @since 1.1.0 + */ +EAPI Eina_Bool evas_object_grid_mirrored_get (const Evas_Object *o) EINA_ARG_NONNULL(1); + +/** + * Add a new child to a grid object. + * + * @param o The given grid object. + * @param child The child object to add. + * @param x The virtual x coordinate of the child + * @param y The virtual y coordinate of the child + * @param w The virtual width of the child + * @param h The virtual height of the child + * @return 1 on success, 0 on failure. + * @since 1.1.0 + */ +EAPI Eina_Bool evas_object_grid_pack (Evas_Object *o, Evas_Object *child, int x, int y, int w, int h) EINA_ARG_NONNULL(1, 2); + +/** + * Remove child from grid. + * + * @note removing a child will immediately call a walk over children in order + * to recalculate numbers of columns and rows. If you plan to remove + * all children, use evas_object_grid_clear() instead. + * + * @return 1 on success, 0 on failure. + * @since 1.1.0 + */ +EAPI Eina_Bool evas_object_grid_unpack (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); + +/** + * Faster way to remove all child objects from a grid object. + * + * @param o The given grid object. + * @param clear if true, it will delete just removed children. + * @since 1.1.0 + */ +EAPI void evas_object_grid_clear (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1); + +/** + * Get the pack options for a grid child + * + * Get the pack x, y, width and height in virtual coordinates set by + * evas_object_grid_pack() + * @param o The grid object + * @param child The grid child to query for coordinates + * @param x The pointer to where the x coordinate will be returned + * @param y The pointer to where the y coordinate will be returned + * @param w The pointer to where the width will be returned + * @param h The pointer to where the height will be returned + * @return 1 on success, 0 on failure. + * @since 1.1.0 + */ +EAPI Eina_Bool evas_object_grid_pack_get (Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h); + +/** + * Get an iterator to walk the list of children for the grid. + * + * @note Do not remove or delete objects while walking the list. + * @since 1.1.0 + */ +EAPI Eina_Iterator *evas_object_grid_iterator_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Get an accessor to get random access to the list of children for the grid. + * + * @note Do not remove or delete objects while walking the list. + * @since 1.1.0 + */ +EAPI Eina_Accessor *evas_object_grid_accessor_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * Get the list of children for the grid. + * + * @note This is a duplicate of the list kept by the grid internally. + * It's up to the user to destroy it when it no longer needs it. + * It's possible to remove objects from the grid when walking this + * list, but these removals won't be reflected on it. + * @since 1.1.0 + */ +EAPI Eina_List *evas_object_grid_children_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; + +/** + * @} + */ + +/** + * @defgroup Evas_Cserve Shared Image Cache Server + * + * Evas has an (optional) module which provides client-server + * infrastructure to share bitmaps across multiple processes, + * saving data and processing power. + * + * Be warned that it @b doesn't work when threaded image + * preloading is enabled for Evas, though. + */ + typedef struct _Evas_Cserve_Stats Evas_Cserve_Stats; + typedef struct _Evas_Cserve_Image_Cache Evas_Cserve_Image_Cache; + typedef struct _Evas_Cserve_Image Evas_Cserve_Image; + typedef struct _Evas_Cserve_Config Evas_Cserve_Config; + +/** + * Statistics about the server that shares cached bitmaps. + * @ingroup Evas_Cserve + */ + struct _Evas_Cserve_Stats + { + int saved_memory; /**< current amount of saved memory, in bytes */ + int wasted_memory; /**< current amount of wasted memory, in bytes */ + int saved_memory_peak; /**< peak ammount of saved memory, in bytes */ + int wasted_memory_peak; /**< peak ammount of wasted memory, in bytes */ + double saved_time_image_header_load; /**< time, in seconds, saved in header loads by sharing cached loads instead */ + double saved_time_image_data_load; /**< time, in seconds, saved in data loads by sharing cached loads instead */ + }; + +/** + * A handle of a cache of images shared by a server. + * @ingroup Evas_Cserve + */ + struct _Evas_Cserve_Image_Cache + { + struct { + int mem_total; + int count; + } active, cached; + Eina_List *images; + }; + +/** + * A handle to an image shared by a server. + * @ingroup Evas_Cserve + */ + struct _Evas_Cserve_Image + { + const char *file, *key; + int w, h; + time_t file_mod_time; + time_t file_checked_time; + time_t cached_time; + int refcount; + int data_refcount; + int memory_footprint; + double head_load_time; + double data_load_time; + Eina_Bool alpha : 1; + Eina_Bool data_loaded : 1; + Eina_Bool active : 1; + Eina_Bool dead : 1; + Eina_Bool useless : 1; + }; + +/** + * Configuration that controls the server that shares cached bitmaps. + * @ingroup Evas_Cserve + */ + struct _Evas_Cserve_Config + { + int cache_max_usage; + int cache_item_timeout; + int cache_item_timeout_check; + }; + + +/** + * Retrieves if the system wants to share bitmaps using the server. + * @return @c EINA_TRUE if it wants, @c EINA_FALSE otherwise. + * @ingroup Evas_Cserve + */ +EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; + +/** + * Retrieves if the system is connected to the server used to share + * bitmaps. + * + * @return @c EINA_TRUE if it's connected, @c EINA_FALSE otherwise. + * @ingroup Evas_Cserve + */ +EAPI Eina_Bool evas_cserve_connected_get (void) EINA_WARN_UNUSED_RESULT; + +/** + * Retrieves statistics from a running bitmap sharing server. + * @param stats pointer to structure to fill with statistics about the + * bitmap cache server. + * + * @return @c EINA_TRUE if @p stats were filled with data, + * @c EINA_FALSE otherwise (when @p stats is untouched) + * @ingroup Evas_Cserve + */ +EAPI Eina_Bool evas_cserve_stats_get (Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT; + +/** + * Completely discard/clean a given images cache, thus re-setting it. + * + * @param cache A handle to the given images cache. + */ +EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache) EINA_PURE; + +/** + * Retrieves the current configuration of the Evas image caching + * server. + * + * @param config where to store current image caching server's + * configuration. + * + * @return @c EINA_TRUE if @p config was filled with data, + * @c EINA_FALSE otherwise (when @p config is untouched) + * + * The fields of @p config will be altered to reflect the current + * configuration's values. + * + * @see evas_cserve_config_set() + * + * @ingroup Evas_Cserve + */ +EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE; + +/** + * Changes the configurations of the Evas image caching server. + * + * @param config A bitmap cache configuration handle with fields set + * to desired configuration values. + * @return @c EINA_TRUE if @p config was successfully applied, + * @c EINA_FALSE otherwise. + * + * @see evas_cserve_config_get() + * + * @ingroup Evas_Cserve + */ +EAPI Eina_Bool evas_cserve_config_set (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE; + +/** + * Force the system to disconnect from the bitmap caching server. + * + * @ingroup Evas_Cserve + */ +EAPI void evas_cserve_disconnect (void); + +/** + * @defgroup Evas_Utils General Utilities + * + * Some functions that are handy but are not specific of canvas or + * objects. + */ + +/** + * Converts the given Evas image load error code into a string + * describing it in english. + * + * @param error the error code, a value in ::Evas_Load_Error. + * @return Always returns a valid string. If the given @p error is not + * supported, "Unknown error" is returned. + * + * Mostly evas_object_image_file_set() would be the function setting + * that error value afterwards, but also evas_object_image_load(), + * evas_object_image_save(), evas_object_image_data_get(), + * evas_object_image_data_convert(), evas_object_image_pixels_import() + * and evas_object_image_is_inside(). This function is meant to be + * used in conjunction with evas_object_image_load_error_get(), as in: + * + * Example code: + * @dontinclude evas-load-error-str.c + * @skip img1 = + * @until ecore_main_loop_begin( + * + * Here, being @c valid_path the path to a valid image and @c + * bogus_path a path to a file which does not exist, the two outputs + * of evas_load_error_str() would be (if no other errors occur): + * "No error on load" and "File (or file path) does + * not exist", respectively. See the full @ref + * Example_Evas_Images "example". + * + * @ingroup Evas_Utils + */ +EAPI const char *evas_load_error_str (Evas_Load_Error error); + +/* Evas utility routines for color space conversions */ +/* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 to 1.0 */ +/* rgb color space has r,g,b in the range 0 to 255 */ + +/** + * Convert a given color from HSV to RGB format. + * + * @param h The Hue component of the color. + * @param s The Saturation component of the color. + * @param v The Value component of the color. + * @param r The Red component of the color. + * @param g The Green component of the color. + * @param b The Blue component of the color. + * + * This function converts a given color in HSV color format to RGB + * color format. + * + * @ingroup Evas_Utils + **/ +EAPI void evas_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b); + +/** + * Convert a given color from RGB to HSV format. + * + * @param r The Red component of the color. + * @param g The Green component of the color. + * @param b The Blue component of the color. + * @param h The Hue component of the color. + * @param s The Saturation component of the color. + * @param v The Value component of the color. + * + * This function converts a given color in RGB color format to HSV + * color format. + * + * @ingroup Evas_Utils + **/ +EAPI void evas_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v); + +/* argb color space has a,r,g,b in the range 0 to 255 */ + +/** + * Pre-multiplies a rgb triplet by an alpha factor. + * + * @param a The alpha factor. + * @param r The Red component of the color. + * @param g The Green component of the color. + * @param b The Blue component of the color. + * + * This function pre-multiplies a given rbg triplet by an alpha + * factor. Alpha factor is used to define transparency. + * + * @ingroup Evas_Utils + **/ +EAPI void evas_color_argb_premul (int a, int *r, int *g, int *b); + +/** + * Undo pre-multiplication of a rgb triplet by an alpha factor. + * + * @param a The alpha factor. + * @param r The Red component of the color. + * @param g The Green component of the color. + * @param b The Blue component of the color. + * + * This function undoes pre-multiplication a given rbg triplet by an + * alpha factor. Alpha factor is used to define transparency. + * + * @see evas_color_argb_premul(). + * + * @ingroup Evas_Utils + **/ +EAPI void evas_color_argb_unpremul (int a, int *r, int *g, int *b); + + +/** + * Pre-multiplies data by an alpha factor. + * + * @param data The data value. + * @param len The length value. + * + * This function pre-multiplies a given data by an alpha + * factor. Alpha factor is used to define transparency. + * + * @ingroup Evas_Utils + **/ +EAPI void evas_data_argb_premul (unsigned int *data, unsigned int len); + +/** + * Undo pre-multiplication data by an alpha factor. + * + * @param data The data value. + * @param len The length value. + * + * This function undoes pre-multiplication of a given data by an alpha + * factor. Alpha factor is used to define transparency. + * + * @ingroup Evas_Utils + **/ +EAPI void evas_data_argb_unpremul (unsigned int *data, unsigned int len); + +/* string and font handling */ + +/** + * Gets the next character in the string + * + * Given the UTF-8 string in @p str, and starting byte position in @p pos, + * this function will place in @p decoded the decoded code point at @p pos + * and return the byte index for the next character in the string. + * + * The only boundary check done is that @p pos must be >= 0. Other than that, + * no checks are performed, so passing an index value that's not within the + * length of the string will result in undefined behavior. + * + * @param str The UTF-8 string + * @param pos The byte index where to start + * @param decoded Address where to store the decoded code point. Optional. + * + * @return The byte index of the next character + * + * @ingroup Evas_Utils + */ +EAPI int evas_string_char_next_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1); + +/** + * Gets the previous character in the string + * + * Given the UTF-8 string in @p str, and starting byte position in @p pos, + * this function will place in @p decoded the decoded code point at @p pos + * and return the byte index for the previous character in the string. + * + * The only boundary check done is that @p pos must be >= 1. Other than that, + * no checks are performed, so passing an index value that's not within the + * length of the string will result in undefined behavior. + * + * @param str The UTF-8 string + * @param pos The byte index where to start + * @param decoded Address where to store the decoded code point. Optional. + * + * @return The byte index of the previous character + * + * @ingroup Evas_Utils + */ +EAPI int evas_string_char_prev_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1); + +/** + * Get the length in characters of the string. + * @param str The string to get the length of. + * @return The length in characters (not bytes) + * @ingroup Evas_Utils + */ +EAPI int evas_string_char_len_get (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * @defgroup Evas_Keys Key Input Functions + * + * Functions which feed key events to the canvas. + * + * As explained in @ref intro_not_evas, Evas is @b not aware of input + * systems at all. Then, the user, if using it crudely (evas_new()), + * will have to feed it with input events, so that it can react + * somehow. If, however, the user creates a canvas by means of the + * Ecore_Evas wrapper, it will automatically bind the chosen display + * engine's input events to the canvas, for you. + * + * This group presents the functions dealing with the feeding of key + * events to the canvas. On most of them, one has to reference a given + * key by a name (keyname argument). Those are + * platform dependent symbolic names for the keys. Sometimes + * you'll get the right keyname by simply using an ASCII + * value of the key name, but it won't be like that always. + * + * Typical platforms are Linux frame buffer (Ecore_FB) and X server + * (Ecore_X) when using Evas with Ecore and Ecore_Evas. Please refer + * to your display engine's documentation when using evas through an + * Ecore helper wrapper when you need the keynames. + * + * Example: + * @dontinclude evas-events.c + * @skip mods = evas_key_modifier_get(evas); + * @until { + * + * All the other @c evas_key functions behave on the same manner. See + * the full @ref Example_Evas_Events "example". + * + * @ingroup Evas_Canvas + */ + +/** + * @addtogroup Evas_Keys + * @{ + */ + +/** + * Returns a handle to the list of modifier keys registered in the + * canvas @p e. This is required to check for which modifiers are set + * at a given time with the evas_key_modifier_is_set() function. + * + * @param e The pointer to the Evas canvas + * + * @see evas_key_modifier_add + * @see evas_key_modifier_del + * @see evas_key_modifier_on + * @see evas_key_modifier_off + * @see evas_key_modifier_is_set + * + * @return An ::Evas_Modifier handle to query Evas' keys subsystem + * with evas_key_modifier_is_set(), or @c NULL on error. + */ +EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Returns a handle to the list of lock keys registered in the canvas + * @p e. This is required to check for which locks are set at a given + * time with the evas_key_lock_is_set() function. + * + * @param e The pointer to the Evas canvas + * + * @see evas_key_lock_add + * @see evas_key_lock_del + * @see evas_key_lock_on + * @see evas_key_lock_off + * @see evas_key_lock_is_set + * + * @return An ::Evas_Lock handle to query Evas' keys subsystem with + * evas_key_lock_is_set(), or @c NULL on error. + */ +EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + + +/** + * Checks the state of a given modifier key, at the time of the + * call. If the modifier is set, such as shift being pressed, this + * function returns @c Eina_True. + * + * @param m The current modifiers set, as returned by + * evas_key_modifier_get(). + * @param keyname The name of the modifier key to check status for. + * + * @return @c Eina_True if the modifier key named @p keyname is on, @c + * Eina_False otherwise. + * + * @see evas_key_modifier_add + * @see evas_key_modifier_del + * @see evas_key_modifier_get + * @see evas_key_modifier_on + * @see evas_key_modifier_off + */ +EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + + +/** + * Checks the state of a given lock key, at the time of the call. If + * the lock is set, such as caps lock, this function returns @c + * Eina_True. + * + * @param l The current locks set, as returned by evas_key_lock_get(). + * @param keyname The name of the lock key to check status for. + * + * @return @c Eina_True if the @p keyname lock key is set, @c + * Eina_False otherwise. + * + * @see evas_key_lock_get + * @see evas_key_lock_add + * @see evas_key_lock_del + * @see evas_key_lock_on + * @see evas_key_lock_off + */ +EAPI Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + + +/** + * Adds the @p keyname key to the current list of modifier keys. + * + * @param e The pointer to the Evas canvas + * @param keyname The name of the modifier key to add to the list of + * Evas modifiers. + * + * Modifiers are keys like shift, alt and ctrl, i.e., keys which are + * meant to be pressed together with others, altering the behavior of + * the secondly pressed keys somehow. Evas is so that these keys can + * be user defined. + * + * This call allows custom modifiers to be added to the Evas system at + * run time. It is then possible to set and unset modifier keys + * programmatically for other parts of the program to check and act + * on. Programmers using Evas would check for modifier keys on key + * event callbacks using evas_key_modifier_is_set(). + * + * @see evas_key_modifier_del + * @see evas_key_modifier_get + * @see evas_key_modifier_on + * @see evas_key_modifier_off + * @see evas_key_modifier_is_set + * + * @note If the programmer instantiates the canvas by means of the + * ecore_evas_new() family of helper functions, Ecore will take + * care of registering on it all standard modifiers: "Shift", + * "Control", "Alt", "Meta", "Hyper", "Super". + */ +EAPI void evas_key_modifier_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + +/** + * Removes the @p keyname key from the current list of modifier keys + * on canvas @e. + * + * @param e The pointer to the Evas canvas + * @param keyname The name of the key to remove from the modifiers list. + * + * @see evas_key_modifier_add + * @see evas_key_modifier_get + * @see evas_key_modifier_on + * @see evas_key_modifier_off + * @see evas_key_modifier_is_set + */ +EAPI void evas_key_modifier_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + +/** + * Adds the @p keyname key to the current list of lock keys. + * + * @param e The pointer to the Evas canvas + * @param keyname The name of the key to add to the locks list. + * + * Locks are keys like caps lock, num lock or scroll lock, i.e., keys + * which are meant to be pressed once -- toggling a binary state which + * is bound to it -- and thus altering the behavior of all + * subsequently pressed keys somehow, depending on its state. Evas is + * so that these keys can be defined by the user. + * + * This allows custom locks to be added to the evas system at run + * time. It is then possible to set and unset lock keys + * programmatically for other parts of the program to check and act + * on. Programmers using Evas would check for lock keys on key event + * callbacks using evas_key_lock_is_set(). + * + * @see evas_key_lock_get + * @see evas_key_lock_del + * @see evas_key_lock_on + * @see evas_key_lock_off + * @see evas_key_lock_is_set + * + * @note If the programmer instantiates the canvas by means of the + * ecore_evas_new() family of helper functions, Ecore will take + * care of registering on it all standard lock keys: "Caps_Lock", + * "Num_Lock", "Scroll_Lock". + */ +EAPI void evas_key_lock_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + +/** + * Removes the @p keyname key from the current list of lock keys on + * canvas @e. + * + * @param e The pointer to the Evas canvas + * @param keyname The name of the key to remove from the locks list. + * + * @see evas_key_lock_get + * @see evas_key_lock_add + * @see evas_key_lock_on + * @see evas_key_lock_off + */ +EAPI void evas_key_lock_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + + +/** + * Enables or turns on programmatically the modifier key with name @p + * keyname. + * + * @param e The pointer to the Evas canvas + * @param keyname The name of the modifier to enable. + * + * The effect will be as if the key was pressed for the whole time + * between this call and a matching evas_key_modifier_off(). + * + * @see evas_key_modifier_add + * @see evas_key_modifier_get + * @see evas_key_modifier_off + * @see evas_key_modifier_is_set + */ +EAPI void evas_key_modifier_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + +/** + * Disables or turns off programmatically the modifier key with name + * @p keyname. + * + * @param e The pointer to the Evas canvas + * @param keyname The name of the modifier to disable. + * + * @see evas_key_modifier_add + * @see evas_key_modifier_get + * @see evas_key_modifier_on + * @see evas_key_modifier_is_set + */ +EAPI void evas_key_modifier_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + +/** + * Enables or turns on programmatically the lock key with name @p + * keyname. + * + * @param e The pointer to the Evas canvas + * @param keyname The name of the lock to enable. + * + * The effect will be as if the key was put on its active state after + * this call. + * + * @see evas_key_lock_get + * @see evas_key_lock_add + * @see evas_key_lock_del + * @see evas_key_lock_off + */ +EAPI void evas_key_lock_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + +/** + * Disables or turns off programmatically the lock key with name @p + * keyname. + * + * @param e The pointer to the Evas canvas + * @param keyname The name of the lock to disable. + * + * The effect will be as if the key was put on its inactive state + * after this call. + * + * @see evas_key_lock_get + * @see evas_key_lock_add + * @see evas_key_lock_del + * @see evas_key_lock_on + */ +EAPI void evas_key_lock_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); + + +/** + * Creates a bit mask from the @p keyname @b modifier key. Values + * returned from different calls to it may be ORed together, + * naturally. + * + * @param e The canvas whom to query the bit mask from. + * @param keyname The name of the modifier key to create the mask for. + * + * @returns the bit mask or 0 if the @p keyname key wasn't registered as a + * modifier for canvas @p e. + * + * This function is meant to be using in conjunction with + * evas_object_key_grab()/evas_object_key_ungrab(). Go check their + * documentation for more information. + * + * @see evas_key_modifier_add + * @see evas_key_modifier_get + * @see evas_key_modifier_on + * @see evas_key_modifier_off + * @see evas_key_modifier_is_set + * @see evas_object_key_grab + * @see evas_object_key_ungrab + */ +EAPI Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; + + +/** + * Requests @p keyname key events be directed to @p obj. + * + * @param obj the object to direct @p keyname events to. + * @param keyname the key to request events for. + * @param modifiers a mask of modifiers that must be present to + * trigger the event. + * @param not_modifiers a mask of modifiers that must @b not be present + * to trigger the event. + * @param exclusive request that the @p obj is the only object + * receiving the @p keyname events. + * @return @c EINA_TRUE, if the call succeeded, @c EINA_FALSE otherwise. + * + * Key grabs allow one or more objects to receive key events for + * specific key strokes even if other objects have focus. Whenever a + * key is grabbed, only the objects grabbing it will get the events + * for the given keys. + * + * @p keyname is a platform dependent symbolic name for the key + * pressed (see @ref Evas_Keys for more information). + * + * @p modifiers and @p not_modifiers are bit masks of all the + * modifiers that must and mustn't, respectively, be pressed along + * with @p keyname key in order to trigger this new key + * grab. Modifiers can be things such as Shift and Ctrl as well as + * user defigned types via evas_key_modifier_add(). Retrieve them with + * evas_key_modifier_mask_get() or use @c 0 for empty masks. + * + * @p exclusive will make the given object the only one permitted to + * grab the given key. If given @c EINA_TRUE, subsequent calls on this + * function with different @p obj arguments will fail, unless the key + * is ungrabbed again. + * + * Example code follows. + * @dontinclude evas-events.c + * @skip if (d.focus) + * @until else + * + * See the full example @ref Example_Evas_Events "here". + * + * @see evas_object_key_ungrab + * @see evas_object_focus_set + * @see evas_object_focus_get + * @see evas_focus_get + * @see evas_key_modifier_add + */ +EAPI Eina_Bool evas_object_key_grab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); + +/** + * Removes the grab on @p keyname key events by @p obj. + * + * @param obj the object that has an existing key grab. + * @param keyname the key the grab is set for. + * @param modifiers a mask of modifiers that must be present to + * trigger the event. + * @param not_modifiers a mask of modifiers that must not not be + * present to trigger the event. + * + * Removes a key grab on @p obj if @p keyname, @p modifiers, and @p + * not_modifiers match. + * + * Example code follows. + * @dontinclude evas-events.c + * @skip got here by key grabs + * @until } + * + * See the full example @ref Example_Evas_Events "here". + * + * @see evas_object_key_grab + * @see evas_object_focus_set + * @see evas_object_focus_get + * @see evas_focus_get + */ +EAPI void evas_object_key_ungrab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) EINA_ARG_NONNULL(1, 2); + +/** + * @} + */ + +/** + * @defgroup Evas_Touch_Point_List Touch Point List Functions + * + * Functions to get information of touched points in the Evas. + * + * Evas maintains list of touched points on the canvas. Each point has + * its co-ordinates, id and state. You can get the number of touched + * points and information of each point using evas_touch_point_list + * functions. + * + * @ingroup Evas_Canvas + */ + +/** + * @addtogroup Evas_Touch_Point_List + * @{ + */ + +/** + * Get the number of touched point in the evas. + * + * @param e The pointer to the Evas canvas. + * @return The number of touched point on the evas. + * + * New touched point is added to the list whenever touching the evas + * and point is removed whenever removing touched point from the evas. + * + * Example: + * @code + * extern Evas *evas; + * int count; + * + * count = evas_touch_point_list_count(evas); + * printf("The count of touch points: %i\n", count); + * @endcode + * + * @see evas_touch_point_list_nth_xy_get() + * @see evas_touch_point_list_nth_id_get() + * @see evas_touch_point_list_nth_state_get() + */ +EAPI unsigned int evas_touch_point_list_count(Evas *e) EINA_ARG_NONNULL(1); + +/** + * This function returns the nth touch point's co-ordinates. + * + * @param e The pointer to the Evas canvas. + * @param n The number of the touched point (0 being the first). + * @param x The pointer to a Evas_Coord to be filled in. + * @param y The pointer to a Evas_Coord to be filled in. + * + * Touch point's co-ordinates is updated whenever moving that point + * on the canvas. + * + * Example: + * @code + * extern Evas *evas; + * Evas_Coord x, y; + * + * if (evas_touch_point_list_count(evas)) + * { + * evas_touch_point_nth_xy_get(evas, 0, &x, &y); + * printf("The first touch point's co-ordinate: (%i, %i)\n", x, y); + * } + * @endcode + * + * @see evas_touch_point_list_count() + * @see evas_touch_point_list_nth_id_get() + * @see evas_touch_point_list_nth_state_get() + */ +EAPI void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1); + +/** + * This function returns the @p id of nth touch point. + * + * @param e The pointer to the Evas canvas. + * @param n The number of the touched point (0 being the first). + * @return id of nth touch point, if the call succeeded, -1 otherwise. + * + * The point which comes from Mouse Event has @p id 0 and The point + * which comes from Multi Event has @p id that is same as Multi + * Event's device id. + * + * Example: + * @code + * extern Evas *evas; + * int id; + * + * if (evas_touch_point_list_count(evas)) + * { + * id = evas_touch_point_nth_id_get(evas, 0); + * printf("The first touch point's id: %i\n", id); + * } + * @endcode + * + * @see evas_touch_point_list_count() + * @see evas_touch_point_list_nth_xy_get() + * @see evas_touch_point_list_nth_state_get() + */ +EAPI int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n) EINA_ARG_NONNULL(1); + +/** + * This function returns the @p state of nth touch point. + * + * @param e The pointer to the Evas canvas. + * @param n The number of the touched point (0 being the first). + * @return @p state of nth touch point, if the call succeeded, + * EVAS_TOUCH_POINT_CANCEL otherwise. + * + * The point's @p state is EVAS_TOUCH_POINT_DOWN when pressed, + * EVAS_TOUCH_POINT_STILL when the point is not moved after pressed, + * EVAS_TOUCH_POINT_MOVE when moved at least once after pressed and + * EVAS_TOUCH_POINT_UP when released. + * + * Example: + * @code + * extern Evas *evas; + * Evas_Touch_Point_State state; + * + * if (evas_touch_point_list_count(evas)) + * { + * state = evas_touch_point_nth_state_get(evas, 0); + * printf("The first touch point's state: %i\n", state); + * } + * @endcode + * + * @see evas_touch_point_list_count() + * @see evas_touch_point_list_nth_xy_get() + * @see evas_touch_point_list_nth_id_get() + */ +EAPI Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n) EINA_ARG_NONNULL(1); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libraries/evas/src/lib/Evas_GL.h b/libraries/evas/src/lib/Evas_GL.h new file mode 100644 index 0000000..04bedea --- /dev/null +++ b/libraries/evas/src/lib/Evas_GL.h @@ -0,0 +1,1412 @@ +#ifndef _EVAS_GL_H +#define _EVAS_GL_H + +#include +//#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _Evas_GL Evas_GL; +typedef struct _Evas_GL_Surface Evas_GL_Surface; +typedef struct _Evas_GL_Context Evas_GL_Context; +typedef struct _Evas_GL_Config Evas_GL_Config; +typedef struct _Evas_GL_API Evas_GL_API; +typedef void *Evas_GL_Func; +typedef void *EvasGLImage; + +typedef enum _Evas_GL_Color_Format +{ + EVAS_GL_RGB_888 = 0, + EVAS_GL_RGBA_8888 = 1 +} Evas_GL_Color_Format; + +typedef enum _Evas_GL_Depth_Bits +{ + EVAS_GL_DEPTH_NONE = 0, + EVAS_GL_DEPTH_BIT_8 = 1, + EVAS_GL_DEPTH_BIT_16 = 2, + EVAS_GL_DEPTH_BIT_24 = 3, + EVAS_GL_DEPTH_BIT_32 = 4, +} Evas_GL_Depth_Bits; + +typedef enum _Evas_GL_Stencil_Bits +{ + EVAS_GL_STENCIL_NONE = 0, + EVAS_GL_STENCIL_BIT_1 = 1, + EVAS_GL_STENCIL_BIT_2 = 2, + EVAS_GL_STENCIL_BIT_4 = 3, + EVAS_GL_STENCIL_BIT_8 = 4, + EVAS_GL_STENCIL_BIT_16 = 5, +} Evas_GL_Stencil_Bits; + +struct _Evas_GL_Config +{ + Evas_GL_Color_Format color_format; + Evas_GL_Depth_Bits depth_bits; + Evas_GL_Stencil_Bits stencil_bits; +}; + +#define EVAS_GL_EXTENSIONS 1 + + +/** + * @defgroup Evas_GL Rendering GL on Evas + * + * Functions that are used to do OpenGL rendering on Evas. Evas allows you + * to use OpenGL to render to specially set up image objects (which act as + * render target surfaces). + * + * Below is an illlustrative example of how to use OpenGL to render to an + * object in Evas. + * + * @code +// Simple Evas_GL example +#include +#include +#include +#include + +// GL related data here.. +typedef struct _GLData +{ + Evas_GL_Context *ctx; + Evas_GL_Surface *sfc; + Evas_GL *evasgl; + Evas_GL_API *glapi; + GLuint program; + GLuint vtx_shader; + GLuint fgmt_shader; + Eina_Bool initialized : 1; +} GLData; + +// callbacks we want to handle deletion on the object and updates/draws +static void on_del (void *data, Evas *e, Evas_Object *obj, void *event_info); +static void on_pixels (void *data, Evas_Object *obj); +// demo - animator just to keep ticking over saying to draw the image +static Eina_Bool on_animate (void *data); +// gl stuff +static int init_shaders (GLData *gld); +static GLuint load_shader (GLData *gld, GLenum type, const char *shader_src); + +int +main(int argc, char **argv) +{ + // config for the surface for evas_gl + Evas_GL_Config config = + { + EVAS_GL_RGBA_8888, + EVAS_GL_DEPTH_NONE, + EVAS_GL_STENCIL_NONE + }; + // a size by default + int w = 256, h = 256; + // some variables we will use + Ecore_Evas *ee; + Evas *canvas; + Evas_Object *r1; + Evas_Native_Surface ns; + GLData *gld = NULL; + + // regular low-leve EFL (ecore+ecore-evas) init. elm is simpler + ecore_init(); + ecore_evas_init(); + ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 512, 512); + ecore_evas_title_set(ee, "Ecore_Evas Template"); + canvas = ecore_evas_get(ee); + + // alloc a data struct to hold our relevant gl info in + if (!(gld = calloc(1, sizeof(GLData)))) return 0; + + //-//-//-// THIS IS WHERE GL INIT STUFF HAPPENS (ALA EGL) + //-// + // get the evas gl handle for doing gl things + gld->evasgl = evas_gl_new(canvas); + gld->glapi = evas_gl_api_get(gld->evasgl); + // create a surface and context + gld->sfc = evas_gl_surface_create(gld->evasgl, &config, w, h); + gld->ctx = evas_gl_context_create(gld->evasgl, NULL); + //-// + //-//-//-// END GL INIT BLOB + + // set up the image object. a filled one by default + r1 = evas_object_image_filled_add(canvas); + // attach important data we need to the object using key names. this just + // avoids some global variables and means we can do nice cleanup. you can + // avoid this if you are lazy + evas_object_data_set(r1, "..gld", gld); + // when the object is deleted - call the on_del callback. like the above, + // this is just being clean + evas_object_event_callback_add(r1, EVAS_CALLBACK_DEL, on_del, NULL); + // set up an actual pixel size fot the buffer data. it may be different + // to the output size. any windowing system has something like this, just + // evas has 2 sizes, a pixel size and the output object size + evas_object_image_size_set(r1, w, h); + // set up the native surface info to use the context and surface created + // above + + //-//-//-// THIS IS WHERE GL INIT STUFF HAPPENS (ALA EGL) + //-// + evas_gl_native_surface_get(gld->evasgl, gld->sfc, &ns); + evas_object_image_native_surface_set(r1, &ns); + evas_object_image_pixels_get_callback_set(r1, on_pixels, r1); + //-// + //-//-//-// END GL INIT BLOB + + // move the image object somewhere, resize it and show it. any windowing + // system would need this kind of thing - place a child "window" + evas_object_move(r1, 128, 128); + evas_object_resize(r1, w, h); + evas_object_show(r1); + + // animating - just a demo. as long as you trigger an update on the image + // object via evas_object_image_pixels_dirty_set(). any display system, + // mainloop siztem etc. will have something of this kind unless it's making + // you spin infinitely yourself and invent your own animation mechanism + // + // NOTE: if you delete r1, this animator will keep running trying to access + // r1 so you'd better delete this animator with ecore_animator_del() or + // structure how you do animation differently. you can also attach it like + // evasgl, sfc, etc. etc. if this animator is specific to this object + // only and delete it in the del handler for the obj. + ecore_animator_add(on_animate, r1); + + // finally show the window for the world to see. windowing system generic + ecore_evas_show(ee); + + // begin the mainloop and tick over the animator, handle events etc. + // also windowing system generic + ecore_main_loop_begin(); + + // standard EFL shutdown stuff - generic for most systems, EFL or not + ecore_evas_shutdown(); + ecore_shutdown(); + return 0; +} + +static void +on_del(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + // on delete of our object clean up some things that don't get auto + // celeted for us as they are not intrinsically bound to the image + // object as such (you could use the same context and surface across + // multiple image objects and re-use the evasgl handle too multiple times. + // here we bind them to 1 object only though by doing this. + GLData *gld = evas_object_data_get(obj, "..gld"); + if (!gld) return; + Evas_GL_API *gl = gld->glapi; + + evas_object_data_del(obj, "..gld"); + + // Do a make_current before deleting all the GL stuff. + evas_gl_make_current(gld->evasgl, gld->sfc, gld->ctx); + gl->glDeleteShader(gld->vtx_shader); + gl->glDeleteShader(gld->fgmt_shader); + gl->glDeleteProgram(gld->program); + + evas_gl_surface_destroy(gld->evasgl, gld->sfc); + evas_gl_context_destroy(gld->evasgl, gld->ctx); + evas_gl_free(gld->evasgl); + free(gld); +} + +static void +on_pixels(void *data, Evas_Object *obj) +{ + // get some variable we need from the object data keys + GLData *gld = evas_object_data_get(obj, "..gld"); + if (!gld) return; + Evas_GL_API *gl = gld->glapi; + GLfloat vVertices[] = + { + 0.0f, 0.5f, 0.0f, + -0.5f, -0.5f, 0.0f, + 0.5f, -0.5f, 0.0f + }; + int w, h; + + // get the image size in case it changed with evas_object_image_size_set() + evas_object_image_size_get(obj, &w, &h); + // set up the context and surface as the current one + evas_gl_make_current(gld->evasgl, gld->sfc, gld->ctx); + + if (!gld->initialized) + { + if (!init_shaders(gld)) printf("Error Initializing Shaders\n"); + gld->initialized = EINA_TRUE; + } + + // GL Viewport stuff. you can avoid doing this if viewport is all the + // same as last frame if you want + gl->glViewport(0, 0, w, h); + + // Clear the buffer + gl->glClearColor(1.0, 0.0, 0.0, 1); + gl->glClear(GL_COLOR_BUFFER_BIT); + + // Draw a Triangle + gl->glEnable(GL_BLEND); + + gl->glUseProgram(gld->program); + + gl->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices); + gl->glEnableVertexAttribArray(0); + + gl->glDrawArrays(GL_TRIANGLES, 0, 3); + + // Optional - Flush the GL pipeline + gl->glFlush(); +} + +static Eina_Bool +on_animate(void *data) +{ + // just a demo - animate here whenever an animation tick happens and then + // mark the image as "dirty" meaning it needs an update next time evas + // renders. it will call the pixel get callback then. + evas_object_image_pixels_dirty_set(data, EINA_TRUE); + return EINA_TRUE; // keep looping +} + +static GLuint +load_shader(GLData *gld, GLenum type, const char *shader_src) +{ + Evas_GL_API *gl = gld->glapi; + GLuint shader; + GLint compiled = 0; + + // Create the shader object + if (!(shader = gl->glCreateShader(type))) return 0; + gl->glShaderSource(shader, 1, &shader_src, NULL); + // Compile the shader + gl->glCompileShader(shader); + gl->glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled); + + if (!compiled) + { + GLint len = 0; + + gl->glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &len); + if (len > 1) + { + char *info = malloc(sizeof(char) * len); + + if (info) + { + gl->glGetShaderInfoLog(shader, len, NULL, info); + printf("Error compiling shader:\n" + "%s\n", info); + free(info); + } + } + gl->glDeleteShader(shader); + return 0; + } + return shader; +} + +// Initialize the shader and program object +static int +init_shaders(GLData *gld) +{ + Evas_GL_API *gl = gld->glapi; + const char vShaderStr[] = + "attribute vec4 vPosition; \n" + "void main() \n" + "{ \n" + " gl_Position = vPosition; \n" + "} \n"; + const char fShaderStr[] = + "precision mediump float; \n" + "void main() \n" + "{ \n" + " gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n" + "} \n"; + GLint linked = 0; + + // Load the vertex/fragment shaders + gld->vtx_shader = load_shader(gld, GL_VERTEX_SHADER, vShaderStr); + gld->fgmt_shader = load_shader(gld, GL_FRAGMENT_SHADER, fShaderStr); + + // Create the program object + if (!(gld->program = gl->glCreateProgram())) return 0; + + gl->glAttachShader(gld->program, gld->vtx_shader); + gl->glAttachShader(gld->program, gld->fgmt_shader); + + // Bind vPosition to attribute 0 + gl->glBindAttribLocation(gld->program, 0, "vPosition"); + // Link the program + gl->glLinkProgram(gld->program); + gl->glGetProgramiv(gld->program, GL_LINK_STATUS, &linked); + + if (!linked) + { + GLint len = 0; + + gl->glGetProgramiv(gld->program, GL_INFO_LOG_LENGTH, &len); + if (len > 1) + { + char *info = malloc(sizeof(char) * len); + + if (info) + { + gl->glGetProgramInfoLog(gld->program, len, NULL, info); + printf("Error linking program:\n" + "%s\n", info); + free(info); + } + } + gl->glDeleteProgram(gld->program); + return 0; + } + return 1; +} + * @endcode + * + * @ingroup Evas_Canvas + */ + +/** + * @addtogroup Evas_GL + * @{ + */ + +/** + * Creates a new Evas_GL object and returns a handle for gl rendering on efl. + * + * @param e The given evas canvas OpenGL is to be used on. + * @return The created evas_gl object, or NULl on fasilure. + */ +EAPI Evas_GL *evas_gl_new (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Frees the created Evas_GL object. + * + * @param evas_gl The given Evas_GL object. + */ +EAPI void evas_gl_free (Evas_GL *evas_gl) EINA_ARG_NONNULL(1); + +/** + * Creates and returns new Evas_GL_Surface object for GL Rendering. + * + * @param evas_gl The given Evas_GL object. + * @param config The pixel format and configuration of the rendering surface. + * @param width The width of the surface. + * @param height The height of the surface. + * @return The created GL surface object, or NULL on failure. + */ +EAPI Evas_GL_Surface *evas_gl_surface_create (Evas_GL *evas_gl, Evas_GL_Config *cfg, int w, int h) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1,2); + +/** + * Destroys the created Evas GL Surface. + * + * @param evas_gl The given Evas_GL object. + * @param surf The given GL surface object. + */ +EAPI void evas_gl_surface_destroy (Evas_GL *evas_gl, Evas_GL_Surface *surf) EINA_ARG_NONNULL(1,2); + +/** + * Creates and returns a new Evas GL context object + * + * @param evas_gl The given Evas_GL object. + * @return The created context, or NULL on failure. + */ +EAPI Evas_GL_Context *evas_gl_context_create (Evas_GL *evas_gl, Evas_GL_Context *share_ctx) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Destroys the given Evas GL context object + * + * @param evas_gl The given Evas_GL object. + * @param ctx The given Evas GL context. + */ +EAPI void evas_gl_context_destroy (Evas_GL *evas_gl, Evas_GL_Context *ctx) EINA_ARG_NONNULL(1,2); + +/** + * Sets the given context as a current context for the given surface + * + * @param evas_gl The given Evas_GL object. + * @param surf The given Evas GL surface. + * @param ctx The given Evas GL context. + * @return EINA_TRUE if successful, EINA_FALSE if not. + */ +EAPI Eina_Bool evas_gl_make_current (Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *ctx) EINA_ARG_NONNULL(1,2); + +/** + * Returns a pointer to a static, zero-terminated string describing some aspect of evas_gl. + * + * @param evas_gl The given Evas_GL object. + * @param name Specifies a symbolic constant, one of EVAS_GL_EXTENSIONS... + */ +EAPI const char *evas_gl_string_query (Evas_GL *evas_gl, int name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + +/** + * Returns a GL or the Glue Layer's extension function. + * + * @param evas_gl The given Evas_GL object. + * @param name The name of the function to return. + */ +EAPI Evas_GL_Func evas_gl_proc_address_get (Evas_GL *evas_gl, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1,2) EINA_PURE; + +/** + * Fills in the Native Surface information from the given Evas GL surface. + * + * @param evas_gl The given Evas_GL object. + * @param surf The given Evas GL surface to retrieve the Native Surface info from. + * @param ns The native surface structure that the function fills in. + * @return EINA_TRUE if successful, EINA_FALSE if not. + */ +EAPI Eina_Bool evas_gl_native_surface_get (Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_Native_Surface *ns) EINA_ARG_NONNULL(1,2,3); + +/** + * Get the API for rendering using OpenGL + * + * @param evas_gl The given Eva_GL object. + * @return The API to use. + * + * This returns a structure that contains all the OpenGL functions you can + * use to render in Evas. These functions consist of all the standard + * OpenGL-ES2.0 functions and any extra ones Evas has decided to provide in + * addition. This means that if you have your code ported to OpenGL-ES2.0, + * it will be easy to render to Evas. + * + */ +EAPI Evas_GL_API *evas_gl_api_get (Evas_GL *evas_gl) EINA_ARG_NONNULL(1); + +#if !defined(__gl_h_) && !defined(__gl2_h_) +# define __gl_h_ +# define __gl2_h_ + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/*------------------------------------------------------------------------- + * Data type definitions + *-----------------------------------------------------------------------*/ + +typedef void GLvoid; +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef signed char GLbyte; // Changed khronos_int8_t +typedef short GLshort; +typedef int GLint; +typedef int GLsizei; +typedef unsigned char GLubyte; // Changed khronos_uint8_t +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef float GLfloat; // Changed khronos_float_t +typedef float GLclampf; // Changed khronos_float_t +typedef signed int GLfixed; // Changed khronos_int32_t + +/* GL types for handling large vertex buffer objects */ +typedef signed long int GLintptr; // Changed khronos_intptr_t +typedef signed long int GLsizeiptr; // Changed khronos_ssize_t + +//#if (!defined(__gl2_h_) && !defined(__gl_h_)) + +/* OpenGL ES core versions */ +//#define GL_ES_VERSION_2_0 1 + +/* ClearBufferMask */ +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 + +/* Boolean */ +#define GL_FALSE 0 +#define GL_TRUE 1 + +/* BeginMode */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 + +/* AlphaFunction (not supported in ES20) */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* BlendingFactorDest */ +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 + +/* BlendingFactorSrc */ +/* GL_ZERO */ +/* GL_ONE */ +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +/* GL_SRC_ALPHA */ +/* GL_ONE_MINUS_SRC_ALPHA */ +/* GL_DST_ALPHA */ +/* GL_ONE_MINUS_DST_ALPHA */ + +/* BlendEquationSeparate */ +#define GL_FUNC_ADD 0x8006 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ +#define GL_BLEND_EQUATION_ALPHA 0x883D + +/* BlendSubtract */ +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B + +/* Separate Blend Functions */ +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 + +/* Buffer Objects */ +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 + +#define GL_STREAM_DRAW 0x88E0 +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 + +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 + +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 + +/* CullFaceMode */ +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 + +/* DepthFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* EnableCap */ +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_COVERAGE 0x80A0 + +/* ErrorCode */ +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 + +/* FrontFaceDirection */ +#define GL_CW 0x0900 +#define GL_CCW 0x0901 + +/* GetPName */ +#define GL_LINE_WIDTH 0x0B21 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VIEWPORT 0x0BA2 +#define GL_SCISSOR_BOX 0x0C10 +/* GL_SCISSOR_TEST */ +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +/* GL_POLYGON_OFFSET_FILL */ +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB + +/* GetTextureParameter */ +/* GL_TEXTURE_MAG_FILTER */ +/* GL_TEXTURE_MIN_FILTER */ +/* GL_TEXTURE_WRAP_S */ +/* GL_TEXTURE_WRAP_T */ + +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 + +/* HintMode */ +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* HintTarget */ +#define GL_GENERATE_MIPMAP_HINT 0x8192 + +/* DataType */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C + +/* PixelFormat */ +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A + +/* PixelType */ +/* GL_UNSIGNED_BYTE */ +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 + +/* Shaders */ +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_SHADER_TYPE 0x8B4F +#define GL_DELETE_STATUS 0x8B80 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D + +/* StencilFunction */ +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 + +/* StencilOp */ +/* GL_ZERO */ +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 + +/* StringName */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* TextureMagFilter */ +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 + +/* TextureMinFilter */ +/* GL_NEAREST */ +/* GL_LINEAR */ +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 + +/* TextureParameterName */ +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 + +/* TextureTarget */ +/* GL_TEXTURE_2D */ +#define GL_TEXTURE 0x1702 + +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C + +/* TextureUnit */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 + +/* TextureWrapMode */ +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MIRRORED_REPEAT 0x8370 + +/* Uniform Types */ +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_CUBE 0x8B60 + +/* Vertex Arrays */ +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F + +/* Read Format */ +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B + +/* Shader Source */ +#define GL_COMPILE_STATUS 0x8B81 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_SHADER_COMPILER 0x8DFA + +/* Shader Binary */ +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 + +/* Shader Precision-Specified Types */ +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 + +/* Framebuffer Object. */ +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 + +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGB565 0x8D62 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_STENCIL_INDEX 0x1901 +#define GL_STENCIL_INDEX8 0x8D48 + +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 + +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 + +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 + +#define GL_NONE 0 + +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD + +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 + +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 + +//---------------------------// +// GLES extension defines + +/* GL_OES_compressed_ETC1_RGB8_texture */ +#define GL_ETC1_RGB8_OES 0x8D64 + +/* GL_OES_compressed_paletted_texture */ +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 + +/* GL_OES_depth24 */ +#define GL_DEPTH_COMPONENT24_OES 0x81A6 + +/* GL_OES_depth32 */ +#define GL_DEPTH_COMPONENT32_OES 0x81A7 + +/* GL_OES_get_program_binary */ +#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE +#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF + +/* GL_OES_mapbuffer */ +#define GL_WRITE_ONLY_OES 0x88B9 +#define GL_BUFFER_ACCESS_OES 0x88BB +#define GL_BUFFER_MAPPED_OES 0x88BC +#define GL_BUFFER_MAP_POINTER_OES 0x88BD + +/* GL_OES_packed_depth_stencil */ +#define GL_DEPTH_STENCIL_OES 0x84F9 +#define GL_UNSIGNED_INT_24_8_OES 0x84FA +#define GL_DEPTH24_STENCIL8_OES 0x88F0 + +/* GL_OES_rgb8_rgba8 */ +#define GL_RGB8_OES 0x8051 +#define GL_RGBA8_OES 0x8058 + +/* GL_OES_standard_derivatives */ +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B + +/* GL_OES_stencil1 */ +#define GL_STENCIL_INDEX1_OES 0x8D46 + +/* GL_OES_stencil4 */ +#define GL_STENCIL_INDEX4_OES 0x8D47 + +/* GL_OES_texture_3D */ +#define GL_TEXTURE_WRAP_R_OES 0x8072 +#define GL_TEXTURE_3D_OES 0x806F +#define GL_TEXTURE_BINDING_3D_OES 0x806A +#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 +#define GL_SAMPLER_3D_OES 0x8B5F +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 + +/* GL_OES_texture_float */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_texture_float_linear */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_texture_half_float */ +#define GL_HALF_FLOAT_OES 0x8D61 + +/* GL_OES_texture_half_float_linear */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_texture_npot */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_vertex_half_float */ +/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ + +/* GL_OES_vertex_type_10_10_10_2 */ +#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 +#define GL_INT_10_10_10_2_OES 0x8DF7 + +/*------------------------------------------------------------------------* + * AMD extension tokens + *------------------------------------------------------------------------*/ + +/* GL_AMD_compressed_3DC_texture */ +#define GL_3DC_X_AMD 0x87F9 +#define GL_3DC_XY_AMD 0x87FA + +/* GL_AMD_compressed_ATC_texture */ +#define GL_ATC_RGB_AMD 0x8C92 +#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 +#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE + +/* GL_AMD_performance_monitor */ +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFMON_RESULT_AMD 0x8BC6 + +/* GL_AMD_program_binary_Z400 */ +#define GL_Z400_BINARY_AMD 0x8740 + +/*------------------------------------------------------------------------* + * EXT extension tokens + *------------------------------------------------------------------------*/ + +/* GL_EXT_blend_minmax */ +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 + +/* GL_EXT_discard_framebuffer */ +#define GL_COLOR_EXT 0x1800 +#define GL_DEPTH_EXT 0x1801 +#define GL_STENCIL_EXT 0x1802 + +/* GL_EXT_multi_draw_arrays */ +/* No new tokens introduced by this extension. */ + +/* GL_EXT_read_format_bgra */ +#define GL_BGRA_EXT 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 + +/* GL_EXT_texture_filter_anisotropic */ +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF + +/* GL_EXT_texture_format_BGRA8888 */ +#define GL_BGRA_EXT 0x80E1 + +/* GL_EXT_texture_type_2_10_10_10_REV */ +#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 + +/*------------------------------------------------------------------------* + * IMG extension tokens + *------------------------------------------------------------------------*/ + +/* GL_IMG_program_binary */ +#define GL_SGX_PROGRAM_BINARY_IMG 0x9130 + +/* GL_IMG_read_format */ +#define GL_BGRA_IMG 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 + +/* GL_IMG_shader_binary */ +#define GL_SGX_BINARY_IMG 0x8C0A + +/* GL_IMG_texture_compression_pvrtc */ +#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 +#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 +#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 +#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 + +/*------------------------------------------------------------------------* + * NV extension tokens + *------------------------------------------------------------------------*/ + +/* GL_NV_fence */ +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 + +/*------------------------------------------------------------------------* + * QCOM extension tokens + *------------------------------------------------------------------------*/ + +/* GL_QCOM_driver_control */ +/* No new tokens introduced by this extension. */ + +/* GL_QCOM_extended_get */ +#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 +#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 +#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 +#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 +#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 +#define GL_TEXTURE_TYPE_QCOM 0x8BD7 +#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 +#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 +#define GL_TEXTURE_TARGET_QCOM 0x8BDA +#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB +#define GL_STATE_RESTORE 0x8BDC + +/* GL_QCOM_extended_get2 */ +/* No new tokens introduced by this extension. */ + +/* GL_QCOM_perfmon_global_mode */ +#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 + +/* GL_QCOM_writeonly_rendering */ +#define GL_WRITEONLY_RENDERING_QCOM 0x8823 + +/*------------------------------------------------------------------------* + * End of extension tokens, start of corresponding extension functions + *------------------------------------------------------------------------*/ + +/* EvasGL_KHR_image */ +#define EVAS_GL_NATIVE_PIXMAP 0x30B0 /* evasglCreateImage target */ + +/* EvasGL_KHR_vg_parent_image */ +#define EVAS_VG_PARENT_IMAGE 0x30BA /* evasglCreateImage target */ + +/* EvasGL_KHR_gl_texture_2D_image */ +#define EVAS_GL_TEXTURE_2D 0x30B1 /* evasglCreateImage target */ +#define EVAS_GL_TEXTURE_LEVEL 0x30BC /* evasglCreateImage attribute */ + +/* EvasGL_KHR_gl_texture_cubemap_image */ +#define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 /* evasglCreateImage target */ +#define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 /* evasglCreateImage target */ +#define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 /* evasglCreateImage target */ +#define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 /* evasglCreateImage target */ +#define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 /* evasglCreateImage target */ +#define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 /* evasglCreateImage target */ + +/* EvasGL_KHR_gl_texture_3D_image */ +#define EVAS_GL_TEXTURE_3D 0x30B2 /* evasglCreateImage target */ +#define EVAS_GL_TEXTURE_ZOFFSET 0x30BD /* evasglCreateImage attribute */ + +/* EvasGL_KHR_gl_renderbuffer_image */ +#define EVAS_GL_RENDERBUFFER 0x30B9 /* evasglCreateImage target */ + +#else +# ifndef EVAS_GL_NO_GL_H_CHECK +# error "You may only include either Evas_GL.h OR use your native OpenGL's headers. If you use Evas to do GL, then you cannot use the native gl headers." +# endif +#endif + +#define EVAS_GL_API_VERSION 1 +struct _Evas_GL_API +{ + int version; + + /* version 1: */ + /*------- GLES 2.0 -------*/ + void (*glActiveTexture) (GLenum texture); + void (*glAttachShader) (GLuint program, GLuint shader); + void (*glBindAttribLocation) (GLuint program, GLuint index, const char* name); + void (*glBindBuffer) (GLenum target, GLuint buffer); + void (*glBindFramebuffer) (GLenum target, GLuint framebuffer); + void (*glBindRenderbuffer) (GLenum target, GLuint renderbuffer); + void (*glBindTexture) (GLenum target, GLuint texture); + void (*glBlendColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + void (*glBlendEquation) ( GLenum mode ); + void (*glBlendEquationSeparate) (GLenum modeRGB, GLenum modeAlpha); + void (*glBlendFunc) (GLenum sfactor, GLenum dfactor); + void (*glBlendFuncSeparate) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); + void (*glBufferData) (GLenum target, GLsizeiptr size, const void* data, GLenum usage); + void (*glBufferSubData) (GLenum target, GLintptr offset, GLsizeiptr size, const void* data); + GLenum (*glCheckFramebufferStatus) (GLenum target); + void (*glClear) (GLbitfield mask); + void (*glClearColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + void (*glClearDepthf) (GLclampf depth); + void (*glClearStencil) (GLint s); + void (*glColorMask) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); + void (*glCompileShader) (GLuint shader); + void (*glCompressedTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data); + void (*glCompressedTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data); + void (*glCopyTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); + void (*glCopyTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); + GLuint (*glCreateProgram) (void); + GLuint (*glCreateShader) (GLenum type); + void (*glCullFace) (GLenum mode); + void (*glDeleteBuffers) (GLsizei n, const GLuint* buffers); + void (*glDeleteFramebuffers) (GLsizei n, const GLuint* framebuffers); + void (*glDeleteProgram) (GLuint program); + void (*glDeleteRenderbuffers) (GLsizei n, const GLuint* renderbuffers); + void (*glDeleteShader) (GLuint shader); + void (*glDeleteTextures) (GLsizei n, const GLuint* textures); + void (*glDepthFunc) (GLenum func); + void (*glDepthMask) (GLboolean flag); + void (*glDepthRangef) (GLclampf zNear, GLclampf zFar); + void (*glDetachShader) (GLuint program, GLuint shader); + void (*glDisable) (GLenum cap); + void (*glDisableVertexAttribArray) (GLuint index); + void (*glDrawArrays) (GLenum mode, GLint first, GLsizei count); + void (*glDrawElements) (GLenum mode, GLsizei count, GLenum type, const void* indices); + void (*glEnable) (GLenum cap); + void (*glEnableVertexAttribArray) (GLuint index); + void (*glFinish) (void); + void (*glFlush) (void); + void (*glFramebufferRenderbuffer) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); + void (*glFramebufferTexture2D) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); + void (*glFrontFace) (GLenum mode); + void (*glGenBuffers) (GLsizei n, GLuint* buffers); + void (*glGenerateMipmap) (GLenum target); + void (*glGenFramebuffers) (GLsizei n, GLuint* framebuffers); + void (*glGenRenderbuffers) (GLsizei n, GLuint* renderbuffers); + void (*glGenTextures) (GLsizei n, GLuint* textures); + void (*glGetActiveAttrib) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name); + void (*glGetActiveUniform) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name); + void (*glGetAttachedShaders) (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); + int (*glGetAttribLocation) (GLuint program, const char* name); + void (*glGetBooleanv) (GLenum pname, GLboolean* params); + void (*glGetBufferParameteriv) (GLenum target, GLenum pname, GLint* params); + GLenum (*glGetError) (void); + void (*glGetFloatv) (GLenum pname, GLfloat* params); + void (*glGetFramebufferAttachmentParameteriv) (GLenum target, GLenum attachment, GLenum pname, GLint* params); + void (*glGetIntegerv) (GLenum pname, GLint* params); + void (*glGetProgramiv) (GLuint program, GLenum pname, GLint* params); + void (*glGetProgramInfoLog) (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog); + void (*glGetRenderbufferParameteriv) (GLenum target, GLenum pname, GLint* params); + void (*glGetShaderiv) (GLuint shader, GLenum pname, GLint* params); + void (*glGetShaderInfoLog) (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog); + void (*glGetShaderPrecisionFormat) (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); + void (*glGetShaderSource) (GLuint shader, GLsizei bufsize, GLsizei* length, char* source); + const GLubyte* (*glGetString) (GLenum name); + void (*glGetTexParameterfv) (GLenum target, GLenum pname, GLfloat* params); + void (*glGetTexParameteriv) (GLenum target, GLenum pname, GLint* params); + void (*glGetUniformfv) (GLuint program, GLint location, GLfloat* params); + void (*glGetUniformiv) (GLuint program, GLint location, GLint* params); + int (*glGetUniformLocation) (GLuint program, const char* name); + void (*glGetVertexAttribfv) (GLuint index, GLenum pname, GLfloat* params); + void (*glGetVertexAttribiv) (GLuint index, GLenum pname, GLint* params); + void (*glGetVertexAttribPointerv) (GLuint index, GLenum pname, void** pointer); + void (*glHint) (GLenum target, GLenum mode); + GLboolean (*glIsBuffer) (GLuint buffer); + GLboolean (*glIsEnabled) (GLenum cap); + GLboolean (*glIsFramebuffer) (GLuint framebuffer); + GLboolean (*glIsProgram) (GLuint program); + GLboolean (*glIsRenderbuffer) (GLuint renderbuffer); + GLboolean (*glIsShader) (GLuint shader); + GLboolean (*glIsTexture) (GLuint texture); + void (*glLineWidth) (GLfloat width); + void (*glLinkProgram) (GLuint program); + void (*glPixelStorei) (GLenum pname, GLint param); + void (*glPolygonOffset) (GLfloat factor, GLfloat units); + void (*glReadPixels) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels); + void (*glReleaseShaderCompiler) (void); + void (*glRenderbufferStorage) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); + void (*glSampleCoverage) (GLclampf value, GLboolean invert); + void (*glScissor) (GLint x, GLint y, GLsizei width, GLsizei height); + void (*glShaderBinary) (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length); + void (*glShaderSource) (GLuint shader, GLsizei count, const char** string, const GLint* length); + void (*glStencilFunc) (GLenum func, GLint ref, GLuint mask); + void (*glStencilFuncSeparate) (GLenum face, GLenum func, GLint ref, GLuint mask); + void (*glStencilMask) (GLuint mask); + void (*glStencilMaskSeparate) (GLenum face, GLuint mask); + void (*glStencilOp) (GLenum fail, GLenum zfail, GLenum zpass); + void (*glStencilOpSeparate) (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); + void (*glTexImage2D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels); + void (*glTexParameterf) (GLenum target, GLenum pname, GLfloat param); + void (*glTexParameterfv) (GLenum target, GLenum pname, const GLfloat* params); + void (*glTexParameteri) (GLenum target, GLenum pname, GLint param); + void (*glTexParameteriv) (GLenum target, GLenum pname, const GLint* params); + void (*glTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels); + void (*glUniform1f) (GLint location, GLfloat x); + void (*glUniform1fv) (GLint location, GLsizei count, const GLfloat* v); + void (*glUniform1i) (GLint location, GLint x); + void (*glUniform1iv) (GLint location, GLsizei count, const GLint* v); + void (*glUniform2f) (GLint location, GLfloat x, GLfloat y); + void (*glUniform2fv) (GLint location, GLsizei count, const GLfloat* v); + void (*glUniform2i) (GLint location, GLint x, GLint y); + void (*glUniform2iv) (GLint location, GLsizei count, const GLint* v); + void (*glUniform3f) (GLint location, GLfloat x, GLfloat y, GLfloat z); + void (*glUniform3fv) (GLint location, GLsizei count, const GLfloat* v); + void (*glUniform3i) (GLint location, GLint x, GLint y, GLint z); + void (*glUniform3iv) (GLint location, GLsizei count, const GLint* v); + void (*glUniform4f) (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + void (*glUniform4fv) (GLint location, GLsizei count, const GLfloat* v); + void (*glUniform4i) (GLint location, GLint x, GLint y, GLint z, GLint w); + void (*glUniform4iv) (GLint location, GLsizei count, const GLint* v); + void (*glUniformMatrix2fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); + void (*glUniformMatrix3fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); + void (*glUniformMatrix4fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); + void (*glUseProgram) (GLuint program); + void (*glValidateProgram) (GLuint program); + void (*glVertexAttrib1f) (GLuint indx, GLfloat x); + void (*glVertexAttrib1fv) (GLuint indx, const GLfloat* values); + void (*glVertexAttrib2f) (GLuint indx, GLfloat x, GLfloat y); + void (*glVertexAttrib2fv) (GLuint indx, const GLfloat* values); + void (*glVertexAttrib3f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z); + void (*glVertexAttrib3fv) (GLuint indx, const GLfloat* values); + void (*glVertexAttrib4f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + void (*glVertexAttrib4fv) (GLuint indx, const GLfloat* values); + void (*glVertexAttribPointer) (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr); + void (*glViewport) (GLint x, GLint y, GLsizei width, GLsizei height); + + /*------- GLES 2.0 Extensions -------*/ + // Notice these two names have been changed to fit Evas GL and not EGL! + /* GL_OES_EvasGL_image */ + void (*glEvasGLImageTargetTexture2DOES) (GLenum target, EvasGLImage image); + void (*glEvasGLImageTargetRenderbufferStorageOES) (GLenum target, EvasGLImage image); + + /* GL_OES_get_program_binary */ + void (*glGetProgramBinaryOES) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); + void (*glProgramBinaryOES) (GLuint program, GLenum binaryFormat, const void *binary, GLint length); + /* GL_OES_mapbuffer */ + void* (*glMapBufferOES) (GLenum target, GLenum access); + GLboolean (*glUnmapBufferOES) (GLenum target); + void (*glGetBufferPointervOES) (GLenum target, GLenum pname, void** params); + /* GL_OES_texture_3D */ + void (*glTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels); + void (*glTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels); + void (*glCopyTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); + void (*glCompressedTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data); + void (*glCompressedTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data); + void (*glFramebufferTexture3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); + + /* AMD_performance_monitor */ + void (*glGetPerfMonitorGroupsAMD) (GLint* numGroups, GLsizei groupsSize, GLuint* groups); + void (*glGetPerfMonitorCountersAMD) (GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters); + void (*glGetPerfMonitorGroupStringAMD) (GLuint group, GLsizei bufSize, GLsizei* length, char* groupString); + void (*glGetPerfMonitorCounterStringAMD) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, char* counterString); + void (*glGetPerfMonitorCounterInfoAMD) (GLuint group, GLuint counter, GLenum pname, void* data); + void (*glGenPerfMonitorsAMD) (GLsizei n, GLuint* monitors); + void (*glDeletePerfMonitorsAMD) (GLsizei n, GLuint* monitors); + void (*glSelectPerfMonitorCountersAMD) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList); + void (*glBeginPerfMonitorAMD) (GLuint monitor); + void (*glEndPerfMonitorAMD) (GLuint monitor); + void (*glGetPerfMonitorCounterDataAMD) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten); + + /* GL_EXT_discard_framebuffer */ + void (*glDiscardFramebufferEXT) (GLenum target, GLsizei numAttachments, const GLenum* attachments); + + /* GL_EXT_multi_draw_arrays */ + void (*glMultiDrawArraysEXT) (GLenum mode, GLint* first, GLsizei* count, GLsizei primcount); + void (*glMultiDrawElementsEXT) (GLenum mode, const GLsizei* count, GLenum type, const GLvoid** indices, GLsizei primcount); + + /* GL_NV_fence */ + void (*glDeleteFencesNV) (GLsizei n, const GLuint* fences); + void (*glGenFencesNV) (GLsizei n, GLuint* fences); + GLboolean (*glIsFenceNV) (GLuint fence); + GLboolean (*glTestFenceNV) (GLuint fence); + void (*glGetFenceivNV) (GLuint fence, GLenum pname, GLint* params); + void (*glFinishFenceNV) (GLuint fence); + void (*glSetFenceNV) (GLuint, GLenum); + + /* GL_QCOM_driver_control */ + void (*glGetDriverControlsQCOM) (GLint* num, GLsizei size, GLuint* driverControls); + void (*glGetDriverControlStringQCOM) (GLuint driverControl, GLsizei bufSize, GLsizei* length, char* driverControlString); + void (*glEnableDriverControlQCOM) (GLuint driverControl); + void (*glDisableDriverControlQCOM) (GLuint driverControl); + + /* GL_QCOM_extended_get */ + void (*glExtGetTexturesQCOM) (GLuint* textures, GLint maxTextures, GLint* numTextures); + void (*glExtGetBuffersQCOM) (GLuint* buffers, GLint maxBuffers, GLint* numBuffers); + void (*glExtGetRenderbuffersQCOM) (GLuint* renderbuffers, GLint maxRenderbuffers, GLint* numRenderbuffers); + void (*glExtGetFramebuffersQCOM) (GLuint* framebuffers, GLint maxFramebuffers, GLint* numFramebuffers); + void (*glExtGetTexLevelParameterivQCOM) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint* params); + void (*glExtTexObjectStateOverrideiQCOM) (GLenum target, GLenum pname, GLint param); + void (*glExtGetTexSubImageQCOM) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void* texels); + void (*glExtGetBufferPointervQCOM) (GLenum target, void** params); + + + /* GL_QCOM_extended_get2 */ + void (*glExtGetShadersQCOM) (GLuint* shaders, GLint maxShaders, GLint* numShaders); + void (*glExtGetProgramsQCOM) (GLuint* programs, GLint maxPrograms, GLint* numPrograms); + GLboolean (*glExtIsProgramBinaryQCOM) (GLuint program); + void (*glExtGetProgramBinarySourceQCOM) (GLuint program, GLenum shadertype, char* source, GLint* length); + + //------- EGL Related Extensions -------// + /* EvasGL_KHR_image */ + EvasGLImage (*evasglCreateImage) (int target, void* buffer, int* attrib_list); + void (*evasglDestroyImage) (EvasGLImage image); + + /* future calls will be added down here for expansion */ + /* version 2: */ +}; + + +#ifdef __cplusplus +} +#endif + +#endif +/** + * @} + */ diff --git a/libraries/evas/src/lib/Makefile.am b/libraries/evas/src/lib/Makefile.am new file mode 100644 index 0000000..6b1011a --- /dev/null +++ b/libraries/evas/src/lib/Makefile.am @@ -0,0 +1,261 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = canvas cache cserve file engines include +EVAS_STATIC_MODULE = +EVAS_STATIC_LIBADD = + +if EVAS_STATIC_BUILD_SOFTWARE_GENERIC +SUBDIRS += ../modules/engines/software_generic/ +EVAS_STATIC_MODULE += ../modules/engines/software_generic/libevas_engine_software_generic.la +endif +if EVAS_STATIC_BUILD_BUFFER +SUBDIRS += ../modules/engines/buffer/ +EVAS_STATIC_MODULE += ../modules/engines/buffer/libevas_engine_buffer.la +endif +if EVAS_STATIC_BUILD_DIRECT3D +SUBDIRS += ../modules/engines/direct3d/ +EVAS_STATIC_MODULE += ../modules/engines/direct3d/libevas_engine_direct3d.la +EVAS_STATIC_LIBADD += @evas_engine_direct3d_libs@ +endif +if EVAS_STATIC_BUILD_DIRECTFB +SUBDIRS += ../modules/engines/directfb/ +EVAS_STATIC_MODULE += ../modules/engines/directfb/libevas_engine_directfb.la +EVAS_STATIC_LIBADD += @evas_engine_directfb_libs@ +endif +if EVAS_STATIC_BUILD_FB +SUBDIRS += ../modules/engines/fb/ +EVAS_STATIC_MODULE += ../modules/engines/fb/libevas_engine_fb.la +EVAS_STATIC_LIBADD += @evas_engine_fb_libs@ +endif +if EVAS_STATIC_BUILD_GL_X11 +SUBDIRS += \ + ../modules/engines/gl_common \ + ../modules/engines/gl_x11 +EVAS_STATIC_MODULE += \ + ../modules/engines/gl_x11/libevas_engine_gl_x11.la +EVAS_STATIC_LIBADD += @evas_engine_gl_common_libs@ @evas_engine_gl_xlib_libs@ +endif +if EVAS_STATIC_BUILD_GL_SDL +SUBDIRS += \ + ../modules/engines/gl_common \ + ../modules/engines/gl_sdl +EVAS_STATIC_MODULE += \ + ../modules/engines/gl_sdl/libevas_engine_gl_sdl.la +EVAS_STATIC_LIBADD += @evas_engine_gl_common_libs@ @evas_engine_gl_sdl_libs@ +endif +if EVAS_STATIC_BUILD_PSL1GHT +SUBDIRS += ../modules/engines/psl1ght/ +EVAS_STATIC_MODULE += ../modules/engines/psl1ght/libevas_engine_psl1ght.la +EVAS_STATIC_LIBADD += @evas_engine_psl1ght_libs@ +endif +if EVAS_STATIC_BUILD_SOFTWARE_16 +SUBDIRS += ../modules/engines/software_16/ +EVAS_STATIC_MODULE += ../modules/engines/software_16/libevas_engine_software_16.la +endif +if EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW +SUBDIRS += ../modules/engines/software_16_ddraw/ +EVAS_STATIC_MODULE += ../modules/engines/software_16_ddraw/libevas_engine_software_16_ddraw.la +EVAS_STATIC_LIBADD += @evas_engine_software_16_ddraw_libs@ +endif +if EVAS_STATIC_BUILD_SOFTWARE_16_WINCE +SUBDIRS += ../modules/engines/software_16_wince/ +EVAS_STATIC_MODULE += ../modules/engines/software_16_wince/libevas_engine_software_16_wince.la +EVAS_STATIC_LIBADD += @evas_engine_software_16_wince_libs@ +endif +if EVAS_STATIC_BUILD_SOFTWARE_16_X11 +SUBDIRS += ../modules/engines/software_16_x11/ +EVAS_STATIC_MODULE += ../modules/engines/software_16_x11/libevas_engine_software_16_x11.la +EVAS_STATIC_LIBADD += @evas_engine_software_16_x11_libs@ +endif +if EVAS_STATIC_BUILD_SOFTWARE_8 +SUBDIRS += ../modules/engines/software_8/ +EVAS_STATIC_MODULE += ../modules/engines/software_8/libevas_engine_software_8.la +endif +if EVAS_STATIC_BUILD_SOFTWARE_8_X11 +SUBDIRS += ../modules/engines/software_8_x11/ +EVAS_STATIC_MODULE += ../modules/engines/software_8_x11/libevas_engine_software_8_x11.la +EVAS_STATIC_LIBADD += @evas_engine_software_8_x11_libs@ +endif +if EVAS_STATIC_BUILD_SOFTWARE_SDL +SUBDIRS += \ + ../modules/engines/software_16_sdl/ \ + ../modules/engines/software_sdl/ +EVAS_STATIC_MODULE += \ + ../modules/engines/software_16_sdl/libevas_engine_software_16_sdl.la \ + ../modules/engines/software_sdl/libevas_engine_software_sdl.la +EVAS_STATIC_LIBADD += @SDL_LIBS@ +endif +if EVAS_STATIC_BUILD_SOFTWARE_DDRAW +SUBDIRS += ../modules/engines/software_ddraw/ +EVAS_STATIC_MODULE += ../modules/engines/software_ddraw/libevas_engine_software_ddraw.la +EVAS_STATIC_LIBADD += @evas_engine_software_ddraw_libs@ +endif +if EVAS_STATIC_BUILD_SOFTWARE_GDI +SUBDIRS += ../modules/engines/software_gdi/ +EVAS_STATIC_MODULE += ../modules/engines/software_gdi/libevas_engine_software_gdi.la +EVAS_STATIC_LIBADD += @evas_engine_software_gdi_libs@ +endif +if EVAS_STATIC_BUILD_SOFTWARE_X11 +SUBDIRS += ../modules/engines/software_x11/ +EVAS_STATIC_MODULE += ../modules/engines/software_x11/libevas_engine_software_x11.la +EVAS_STATIC_LIBADD += @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@ +endif +if EVAS_STATIC_BUILD_BMP +SUBDIRS += ../modules/loaders/bmp +EVAS_STATIC_MODULE += ../modules/loaders/bmp/libevas_loader_bmp.la +EVAS_STATIC_LIBADD += @evas_image_loader_bmp_libs@ +endif +if EVAS_STATIC_BUILD_EDB +SUBDIRS += ../modules/savers/edb ../modules/loaders/edb +EVAS_STATIC_MODULE += ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la +EVAS_STATIC_LIBADD += @evas_image_loader_edb_libs@ +endif +if EVAS_STATIC_BUILD_EET +SUBDIRS += ../modules/savers/eet ../modules/loaders/eet +EVAS_STATIC_MODULE += ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la +EVAS_STATIC_LIBADD += @evas_image_loader_eet_libs@ +endif +if EVAS_STATIC_BUILD_GENERIC +SUBDIRS += ../modules/loaders/generic +EVAS_STATIC_MODULE += ../modules/loaders/generic/libevas_loader_generic.la +EVAS_STATIC_LIBADD += @evas_image_loader_generic_libs@ +endif +if EVAS_STATIC_BUILD_GIF +SUBDIRS += ../modules/loaders/gif +EVAS_STATIC_MODULE += ../modules/loaders/gif/libevas_loader_gif.la +EVAS_STATIC_LIBADD += @evas_image_loader_gif_libs@ +endif +if EVAS_STATIC_BUILD_ICO +SUBDIRS += ../modules/loaders/ico +EVAS_STATIC_MODULE += ../modules/loaders/ico/libevas_loader_ico.la +EVAS_STATIC_LIBADD += @evas_image_loader_ico_libs@ +endif +if EVAS_STATIC_BUILD_JPEG +SUBDIRS += ../modules/loaders/jpeg +EVAS_STATIC_MODULE += ../modules/loaders/jpeg/libevas_loader_jpeg.la +if BUILD_SAVER_JPEG +SUBDIRS += ../modules/savers/jpeg +EVAS_STATIC_MODULE += ../modules/savers/jpeg/libevas_saver_jpeg.la +endif +EVAS_STATIC_LIBADD += @evas_image_loader_jpeg_libs@ +endif +if EVAS_STATIC_BUILD_PMAPS +SUBDIRS += ../modules/loaders/pmaps +EVAS_STATIC_MODULE += ../modules/loaders/pmaps/libevas_loader_pmaps.la +EVAS_STATIC_LIBADD += @evas_image_loader_pmaps_libs@ +endif +if EVAS_STATIC_BUILD_PNG +SUBDIRS += ../modules/savers/png ../modules/loaders/png +EVAS_STATIC_MODULE += ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la +EVAS_STATIC_LIBADD += @evas_image_loader_png_libs@ +endif +if EVAS_STATIC_BUILD_PSD +SUBDIRS += ../modules/loaders/psd +EVAS_STATIC_MODULE += ../modules/loaders/psd/libevas_loader_psd.la +EVAS_STATIC_LIBADD += @evas_image_loader_psd_libs@ +endif +if EVAS_STATIC_BUILD_SVG +SUBDIRS += ../modules/loaders/svg +EVAS_STATIC_MODULE += ../modules/loaders/svg/libevas_loader_svg.la +EVAS_STATIC_LIBADD += @evas_image_loader_svg_libs@ +endif +if EVAS_STATIC_BUILD_TGA +SUBDIRS += ../modules/loaders/tga +EVAS_STATIC_MODULE += ../modules/loaders/tga/libevas_loader_tga.la +EVAS_STATIC_LIBADD += @evas_image_loader_tga_libs@ +endif +if EVAS_STATIC_BUILD_TIFF +SUBDIRS += ../modules/savers/tiff ../modules/loaders/tiff +EVAS_STATIC_MODULE += ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la +EVAS_STATIC_LIBADD += @evas_image_loader_tiff_libs@ +endif +if EVAS_STATIC_BUILD_WBMP +SUBDIRS += ../modules/loaders/wbmp +EVAS_STATIC_MODULE += ../modules/loaders/wbmp/libevas_loader_wbmp.la +EVAS_STATIC_LIBADD += @evas_image_loader_wbmp_libs@ +endif +if EVAS_STATIC_BUILD_XPM +SUBDIRS += ../modules/loaders/xpm +EVAS_STATIC_MODULE += ../modules/loaders/xpm/libevas_loader_xpm.la +EVAS_STATIC_LIBADD += @evas_image_loader_xpm_libs@ +endif + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@FRIBIDI_CFLAGS@ \ +@HARFBUZZ_CFLAGS@ \ +@EET_CFLAGS@ \ +@FONTCONFIG_CFLAGS@ \ +@pthread_cflags@ \ +@PIXMAN_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +lib_LTLIBRARIES = libevas.la + +### Evas_GL disabled for 1.1 +#includes_HEADERS = Evas.h Evas_GL.h +includes_HEADERS = Evas.h +includesdir = $(includedir)/evas-@VMAJ@ + +libevas_la_SOURCES = main.c + +if EVAS_CSERVE + +libevas_cserve_la = cserve/libevas_cserve.la + +endif + +libevas_la_LIBADD = \ +canvas/libevas_canvas.la \ +file/libevas_file.la \ +cache/libevas_cache.la \ +$(libevas_cserve_la) \ +engines/common/libevas_engine_common.la \ +@FREETYPE_LIBS@ \ +@FRIBIDI_LIBS@ \ +@HARFBUZZ_LIBS@ \ +@EET_LIBS@ \ +@FONTCONFIG_LIBS@ \ +@pthread_libs@ \ +@EINA_LIBS@ \ +$(EVAS_STATIC_MODULE) \ +$(EVAS_STATIC_LIBADD) \ +@PIXMAN_LIBS@ \ +-lm + +libevas_la_DEPENDENCIES = \ +canvas/libevas_canvas.la \ +file/libevas_file.la \ +cache/libevas_cache.la \ +$(libevas_cserve_la) \ +engines/common/libevas_engine_common.la \ +$(EVAS_STATIC_MODULE) + +if BUILD_ENGINE_SOFTWARE_16 + +libevas_la_LIBADD += engines/common_16/libevas_engine_common_16.la +libevas_la_DEPENDENCIES += engines/common_16/libevas_engine_common_16.la + +endif + +if BUILD_ENGINE_SOFTWARE_8 + +libevas_la_LIBADD += engines/common_8/libevas_engine_common_8.la +libevas_la_DEPENDENCIES += engines/common_8/libevas_engine_common_8.la + +endif + +libevas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ + +### Evas_GL we are still using it in our code, so just don't install it. +EXTRA_DIST=Evas_GL.h + +DIST_SUBDIRS = canvas cache cserve file engines include diff --git a/libraries/evas/src/lib/Makefile.in b/libraries/evas/src/lib/Makefile.in new file mode 100644 index 0000000..87bbaac --- /dev/null +++ b/libraries/evas/src/lib/Makefile.in @@ -0,0 +1,1092 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@am__append_1 = ../modules/engines/software_generic/ +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@am__append_2 = ../modules/engines/software_generic/libevas_engine_software_generic.la +@EVAS_STATIC_BUILD_BUFFER_TRUE@am__append_3 = ../modules/engines/buffer/ +@EVAS_STATIC_BUILD_BUFFER_TRUE@am__append_4 = ../modules/engines/buffer/libevas_engine_buffer.la +@EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_5 = ../modules/engines/direct3d/ +@EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_6 = ../modules/engines/direct3d/libevas_engine_direct3d.la +@EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_7 = @evas_engine_direct3d_libs@ +@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_8 = ../modules/engines/directfb/ +@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_9 = ../modules/engines/directfb/libevas_engine_directfb.la +@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_10 = @evas_engine_directfb_libs@ +@EVAS_STATIC_BUILD_FB_TRUE@am__append_11 = ../modules/engines/fb/ +@EVAS_STATIC_BUILD_FB_TRUE@am__append_12 = ../modules/engines/fb/libevas_engine_fb.la +@EVAS_STATIC_BUILD_FB_TRUE@am__append_13 = @evas_engine_fb_libs@ +@EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_14 = \ +@EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_common \ +@EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_x11 + +@EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_15 = \ +@EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_x11/libevas_engine_gl_x11.la + +@EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_16 = @evas_engine_gl_common_libs@ @evas_engine_gl_xlib_libs@ +@EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_17 = \ +@EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_common \ +@EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_sdl + +@EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_18 = \ +@EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_sdl/libevas_engine_gl_sdl.la + +@EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_19 = @evas_engine_gl_common_libs@ @evas_engine_gl_sdl_libs@ +@EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_20 = ../modules/engines/psl1ght/ +@EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_21 = ../modules/engines/psl1ght/libevas_engine_psl1ght.la +@EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_22 = @evas_engine_psl1ght_libs@ +@EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@am__append_23 = ../modules/engines/software_16/ +@EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@am__append_24 = ../modules/engines/software_16/libevas_engine_software_16.la +@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@am__append_25 = ../modules/engines/software_16_ddraw/ +@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@am__append_26 = ../modules/engines/software_16_ddraw/libevas_engine_software_16_ddraw.la +@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@am__append_27 = @evas_engine_software_16_ddraw_libs@ +@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_28 = ../modules/engines/software_16_wince/ +@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_29 = ../modules/engines/software_16_wince/libevas_engine_software_16_wince.la +@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_30 = @evas_engine_software_16_wince_libs@ +@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_31 = ../modules/engines/software_16_x11/ +@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_32 = ../modules/engines/software_16_x11/libevas_engine_software_16_x11.la +@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_33 = @evas_engine_software_16_x11_libs@ +@EVAS_STATIC_BUILD_SOFTWARE_8_TRUE@am__append_34 = ../modules/engines/software_8/ +@EVAS_STATIC_BUILD_SOFTWARE_8_TRUE@am__append_35 = ../modules/engines/software_8/libevas_engine_software_8.la +@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_36 = ../modules/engines/software_8_x11/ +@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_37 = ../modules/engines/software_8_x11/libevas_engine_software_8_x11.la +@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_38 = @evas_engine_software_8_x11_libs@ +@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@am__append_39 = \ +@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@ ../modules/engines/software_16_sdl/ \ +@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@ ../modules/engines/software_sdl/ + +@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@am__append_40 = \ +@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@ ../modules/engines/software_16_sdl/libevas_engine_software_16_sdl.la \ +@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@ ../modules/engines/software_sdl/libevas_engine_software_sdl.la + +@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@am__append_41 = @SDL_LIBS@ +@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_42 = ../modules/engines/software_ddraw/ +@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_43 = ../modules/engines/software_ddraw/libevas_engine_software_ddraw.la +@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_44 = @evas_engine_software_ddraw_libs@ +@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_45 = ../modules/engines/software_gdi/ +@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_46 = ../modules/engines/software_gdi/libevas_engine_software_gdi.la +@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_47 = @evas_engine_software_gdi_libs@ +@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_48 = ../modules/engines/software_x11/ +@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_49 = ../modules/engines/software_x11/libevas_engine_software_x11.la +@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_50 = @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@ +@EVAS_STATIC_BUILD_BMP_TRUE@am__append_51 = ../modules/loaders/bmp +@EVAS_STATIC_BUILD_BMP_TRUE@am__append_52 = ../modules/loaders/bmp/libevas_loader_bmp.la +@EVAS_STATIC_BUILD_BMP_TRUE@am__append_53 = @evas_image_loader_bmp_libs@ +@EVAS_STATIC_BUILD_EDB_TRUE@am__append_54 = ../modules/savers/edb ../modules/loaders/edb +@EVAS_STATIC_BUILD_EDB_TRUE@am__append_55 = ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la +@EVAS_STATIC_BUILD_EDB_TRUE@am__append_56 = @evas_image_loader_edb_libs@ +@EVAS_STATIC_BUILD_EET_TRUE@am__append_57 = ../modules/savers/eet ../modules/loaders/eet +@EVAS_STATIC_BUILD_EET_TRUE@am__append_58 = ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la +@EVAS_STATIC_BUILD_EET_TRUE@am__append_59 = @evas_image_loader_eet_libs@ +@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_60 = ../modules/loaders/generic +@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_61 = ../modules/loaders/generic/libevas_loader_generic.la +@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_62 = @evas_image_loader_generic_libs@ +@EVAS_STATIC_BUILD_GIF_TRUE@am__append_63 = ../modules/loaders/gif +@EVAS_STATIC_BUILD_GIF_TRUE@am__append_64 = ../modules/loaders/gif/libevas_loader_gif.la +@EVAS_STATIC_BUILD_GIF_TRUE@am__append_65 = @evas_image_loader_gif_libs@ +@EVAS_STATIC_BUILD_ICO_TRUE@am__append_66 = ../modules/loaders/ico +@EVAS_STATIC_BUILD_ICO_TRUE@am__append_67 = ../modules/loaders/ico/libevas_loader_ico.la +@EVAS_STATIC_BUILD_ICO_TRUE@am__append_68 = @evas_image_loader_ico_libs@ +@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_69 = ../modules/loaders/jpeg +@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_70 = ../modules/loaders/jpeg/libevas_loader_jpeg.la +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_71 = ../modules/savers/jpeg +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_72 = ../modules/savers/jpeg/libevas_saver_jpeg.la +@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_73 = @evas_image_loader_jpeg_libs@ +@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_74 = ../modules/loaders/pmaps +@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_75 = ../modules/loaders/pmaps/libevas_loader_pmaps.la +@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_76 = @evas_image_loader_pmaps_libs@ +@EVAS_STATIC_BUILD_PNG_TRUE@am__append_77 = ../modules/savers/png ../modules/loaders/png +@EVAS_STATIC_BUILD_PNG_TRUE@am__append_78 = ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la +@EVAS_STATIC_BUILD_PNG_TRUE@am__append_79 = @evas_image_loader_png_libs@ +@EVAS_STATIC_BUILD_PSD_TRUE@am__append_80 = ../modules/loaders/psd +@EVAS_STATIC_BUILD_PSD_TRUE@am__append_81 = ../modules/loaders/psd/libevas_loader_psd.la +@EVAS_STATIC_BUILD_PSD_TRUE@am__append_82 = @evas_image_loader_psd_libs@ +@EVAS_STATIC_BUILD_SVG_TRUE@am__append_83 = ../modules/loaders/svg +@EVAS_STATIC_BUILD_SVG_TRUE@am__append_84 = ../modules/loaders/svg/libevas_loader_svg.la +@EVAS_STATIC_BUILD_SVG_TRUE@am__append_85 = @evas_image_loader_svg_libs@ +@EVAS_STATIC_BUILD_TGA_TRUE@am__append_86 = ../modules/loaders/tga +@EVAS_STATIC_BUILD_TGA_TRUE@am__append_87 = ../modules/loaders/tga/libevas_loader_tga.la +@EVAS_STATIC_BUILD_TGA_TRUE@am__append_88 = @evas_image_loader_tga_libs@ +@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_89 = ../modules/savers/tiff ../modules/loaders/tiff +@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_90 = ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la +@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_91 = @evas_image_loader_tiff_libs@ +@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_92 = ../modules/loaders/wbmp +@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_93 = ../modules/loaders/wbmp/libevas_loader_wbmp.la +@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_94 = @evas_image_loader_wbmp_libs@ +@EVAS_STATIC_BUILD_XPM_TRUE@am__append_95 = ../modules/loaders/xpm +@EVAS_STATIC_BUILD_XPM_TRUE@am__append_96 = ../modules/loaders/xpm/libevas_loader_xpm.la +@EVAS_STATIC_BUILD_XPM_TRUE@am__append_97 = @evas_image_loader_xpm_libs@ +@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_98 = engines/common_16/libevas_engine_common_16.la +@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_99 = engines/common_16/libevas_engine_common_16.la +@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_100 = engines/common_8/libevas_engine_common_8.la +@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_101 = engines/common_8/libevas_engine_common_8.la +subdir = src/lib +DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_libevas_la_OBJECTS = main.lo +libevas_la_OBJECTS = $(am_libevas_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +libevas_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libevas_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_la_SOURCES) +DIST_SOURCES = $(libevas_la_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +HEADERS = $(includes_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = canvas cache cserve file engines include $(am__append_1) \ + $(am__append_3) $(am__append_5) $(am__append_8) \ + $(am__append_11) $(am__append_14) $(am__append_17) \ + $(am__append_20) $(am__append_23) $(am__append_25) \ + $(am__append_28) $(am__append_31) $(am__append_34) \ + $(am__append_36) $(am__append_39) $(am__append_42) \ + $(am__append_45) $(am__append_48) $(am__append_51) \ + $(am__append_54) $(am__append_57) $(am__append_60) \ + $(am__append_63) $(am__append_66) $(am__append_69) \ + $(am__append_71) $(am__append_74) $(am__append_77) \ + $(am__append_80) $(am__append_83) $(am__append_86) \ + $(am__append_89) $(am__append_92) $(am__append_95) +EVAS_STATIC_MODULE = $(am__append_2) $(am__append_4) $(am__append_6) \ + $(am__append_9) $(am__append_12) $(am__append_15) \ + $(am__append_18) $(am__append_21) $(am__append_24) \ + $(am__append_26) $(am__append_29) $(am__append_32) \ + $(am__append_35) $(am__append_37) $(am__append_40) \ + $(am__append_43) $(am__append_46) $(am__append_49) \ + $(am__append_52) $(am__append_55) $(am__append_58) \ + $(am__append_61) $(am__append_64) $(am__append_67) \ + $(am__append_70) $(am__append_72) $(am__append_75) \ + $(am__append_78) $(am__append_81) $(am__append_84) \ + $(am__append_87) $(am__append_90) $(am__append_93) \ + $(am__append_96) +EVAS_STATIC_LIBADD = $(am__append_7) $(am__append_10) $(am__append_13) \ + $(am__append_16) $(am__append_19) $(am__append_22) \ + $(am__append_27) $(am__append_30) $(am__append_33) \ + $(am__append_38) $(am__append_41) $(am__append_44) \ + $(am__append_47) $(am__append_50) $(am__append_53) \ + $(am__append_56) $(am__append_59) $(am__append_62) \ + $(am__append_65) $(am__append_68) $(am__append_73) \ + $(am__append_76) $(am__append_79) $(am__append_82) \ + $(am__append_85) $(am__append_88) $(am__append_91) \ + $(am__append_94) $(am__append_97) +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@FRIBIDI_CFLAGS@ \ +@HARFBUZZ_CFLAGS@ \ +@EET_CFLAGS@ \ +@FONTCONFIG_CFLAGS@ \ +@pthread_cflags@ \ +@PIXMAN_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +lib_LTLIBRARIES = libevas.la + +### Evas_GL disabled for 1.1 +#includes_HEADERS = Evas.h Evas_GL.h +includes_HEADERS = Evas.h +includesdir = $(includedir)/evas-@VMAJ@ +libevas_la_SOURCES = main.c +@EVAS_CSERVE_TRUE@libevas_cserve_la = cserve/libevas_cserve.la +libevas_la_LIBADD = canvas/libevas_canvas.la file/libevas_file.la \ + cache/libevas_cache.la $(libevas_cserve_la) \ + engines/common/libevas_engine_common.la @FREETYPE_LIBS@ \ + @FRIBIDI_LIBS@ @HARFBUZZ_LIBS@ @EET_LIBS@ @FONTCONFIG_LIBS@ \ + @pthread_libs@ @EINA_LIBS@ $(EVAS_STATIC_MODULE) \ + $(EVAS_STATIC_LIBADD) @PIXMAN_LIBS@ -lm $(am__append_98) \ + $(am__append_100) +libevas_la_DEPENDENCIES = canvas/libevas_canvas.la \ + file/libevas_file.la cache/libevas_cache.la \ + $(libevas_cserve_la) engines/common/libevas_engine_common.la \ + $(EVAS_STATIC_MODULE) $(am__append_99) $(am__append_101) +libevas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ + +### Evas_GL we are still using it in our code, so just don't install it. +EXTRA_DIST = Evas_GL.h +DIST_SUBDIRS = canvas cache cserve file engines include +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas.la: $(libevas_la_OBJECTS) $(libevas_la_DEPENDENCIES) + $(AM_V_CCLD)$(libevas_la_LINK) -rpath $(libdir) $(libevas_la_OBJECTS) $(libevas_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-includesHEADERS + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-includesHEADERS uninstall-libLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/cache/Makefile.am b/libraries/evas/src/lib/cache/Makefile.am new file mode 100644 index 0000000..d417262 --- /dev/null +++ b/libraries/evas/src/lib/cache/Makefile.am @@ -0,0 +1,27 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = -I. \ + -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib/include \ + -DPACKAGE_BIN_DIR=\"$(bindir)\" \ + -DPACKAGE_LIB_DIR=\"$(libdir)\" \ + -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ + @WIN32_CPPFLAGS@ \ + @EVIL_CFLAGS@ \ + @FREETYPE_CFLAGS@ \ + @PIXMAN_CFLAGS@ \ + @EINA_CFLAGS@ \ + @PIXMAN_CFLAGS@ + +noinst_LTLIBRARIES = libevas_cache.la +libevas_cache_la_SOURCES = \ +evas_cache_image.c \ +evas_cache_engine_image.c \ +evas_preload.c + +libevas_cache_la_LIBAD = @EVIL_LIBS@ + +libevas_cache_la_DEPENDENCIES = $(top_builddir)/config.h + +EXTRA_DIST = evas_cache.h diff --git a/libraries/evas/src/lib/cache/Makefile.in b/libraries/evas/src/lib/cache/Makefile.in new file mode 100644 index 0000000..b024731 --- /dev/null +++ b/libraries/evas/src/lib/cache/Makefile.in @@ -0,0 +1,683 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/cache +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libevas_cache_la_LIBADD = +am_libevas_cache_la_OBJECTS = evas_cache_image.lo \ + evas_cache_engine_image.lo evas_preload.lo +libevas_cache_la_OBJECTS = $(am_libevas_cache_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_cache_la_SOURCES) +DIST_SOURCES = $(libevas_cache_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = -I. \ + -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib/include \ + -DPACKAGE_BIN_DIR=\"$(bindir)\" \ + -DPACKAGE_LIB_DIR=\"$(libdir)\" \ + -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ + @WIN32_CPPFLAGS@ \ + @EVIL_CFLAGS@ \ + @FREETYPE_CFLAGS@ \ + @PIXMAN_CFLAGS@ \ + @EINA_CFLAGS@ \ + @PIXMAN_CFLAGS@ + +noinst_LTLIBRARIES = libevas_cache.la +libevas_cache_la_SOURCES = \ +evas_cache_image.c \ +evas_cache_engine_image.c \ +evas_preload.c + +libevas_cache_la_LIBAD = @EVIL_LIBS@ +libevas_cache_la_DEPENDENCIES = $(top_builddir)/config.h +EXTRA_DIST = evas_cache.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/cache/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/cache/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_cache.la: $(libevas_cache_la_OBJECTS) $(libevas_cache_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libevas_cache_la_OBJECTS) $(libevas_cache_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cache_engine_image.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cache_image.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_preload.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/cache/evas_cache.h b/libraries/evas/src/lib/cache/evas_cache.h new file mode 100644 index 0000000..0947a6d --- /dev/null +++ b/libraries/evas/src/lib/cache/evas_cache.h @@ -0,0 +1,175 @@ +#ifndef _EVAS_CACHE_H +#define _EVAS_CACHE_H + + +typedef struct _Evas_Cache_Image Evas_Cache_Image; +typedef struct _Evas_Cache_Image_Func Evas_Cache_Image_Func; +typedef struct _Evas_Cache_Engine_Image Evas_Cache_Engine_Image; +typedef struct _Evas_Cache_Engine_Image_Func Evas_Cache_Engine_Image_Func; + + +struct _Evas_Cache_Image_Func +{ + Image_Entry *(*alloc)(void); + void (*dealloc)(Image_Entry *im); + + /* The cache provide some helpers for surface manipulation. */ + int (*surface_alloc)(Image_Entry *im, unsigned int w, unsigned int h); + void (*surface_delete)(Image_Entry *im); + DATA32 *(*surface_pixels)(Image_Entry *im); + + /* The cache is doing the allocation and deallocation, you must just do the rest. */ + int (*constructor)(Image_Entry *im); /**< return is EVAS_LOAD_ERROR_* or EVAS_LOAD_ERROR_NONE! */ + void (*destructor)(Image_Entry *im); + + void (*dirty_region)(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); + /* Only called when references > 0. Need to provide a fresh copie of im. */ + /* The destination surface does have a surface, but no allocated pixel data. */ + int (*dirty)(Image_Entry *dst, const Image_Entry *src); + /* Only called when references == 1. We will call drop on `im'. */ + /* The destination surface does not have any surface. */ + int (*size_set)(Image_Entry *dst, const Image_Entry *src, unsigned int w, unsigned int h); + + /* The destination surface does not have any surface. */ + int (*copied_data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); + /* The destination surface does not have any surface. */ + int (*data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); + int (*color_space)(Image_Entry *dst, int cspace); + + /* This function need to update im->w and im->h. */ + int (*load)(Image_Entry *im); /**< return is EVAS_LOAD_ERROR_* or EVAS_LOAD_ERROR_NONE! */ + int (*mem_size_get)(Image_Entry *im); + void (*debug)(const char *context, Image_Entry *im); +}; + +struct _Evas_Cache_Image +{ + Evas_Cache_Image_Func func; + + Eina_List *preload; + Eina_List *pending; + + Eina_Inlist *dirty; + + Eina_Inlist *lru; + Eina_Inlist *lru_nodata; + Eina_Hash *inactiv; + Eina_Hash *activ; + void *data; + + int usage; + unsigned int limit; + int references; +#ifdef EVAS_FRAME_QUEUING + LK(lock); +#endif +}; + +struct _Evas_Cache_Engine_Image_Func +{ + /* Must return a char* allocated with eina_stringshare_add. */ + char* (*key)(Image_Entry *im, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); + + Engine_Image_Entry* (*alloc)(void); + void (*dealloc)(Engine_Image_Entry *eim); + + int (*constructor)(Engine_Image_Entry *eim, void* data); + void (*destructor)(Engine_Image_Entry *eim); + + void (*dirty_region)(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h); + /* Only called when references > 0. Need to provide a fresh copie of im. */ + int (*dirty)(Engine_Image_Entry *dst, const Engine_Image_Entry *src); + /* Only called when references == 1. We will call drop on `im'. */ + int (*size_set)(Engine_Image_Entry *dst, const Engine_Image_Entry *src); + + int (*update_data)(Engine_Image_Entry* dst, void* data); + + void (*load)(Engine_Image_Entry *eim, const Image_Entry* im); + int (*mem_size_get)(Engine_Image_Entry *eim); + void (*debug)(const char* context, Engine_Image_Entry *eim); +}; + +struct _Evas_Cache_Engine_Image +{ + Evas_Cache_Engine_Image_Func func; + + Eina_Inlist* dirty; + + Eina_Hash* activ; + Eina_Hash* inactiv; + Eina_Inlist* lru; + + Evas_Cache_Image* parent; + Evas_Cache_Engine_Image* brother; + + int usage; + int limit; + + int references; +}; + + +#ifdef __cplusplus +extern "C" { +#endif + + +EAPI Evas_Cache_Image* evas_cache_image_init(const Evas_Cache_Image_Func *cb); +EAPI void evas_cache_image_shutdown(Evas_Cache_Image *cache); +EAPI Image_Entry* evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); +EAPI void evas_cache_image_drop(Image_Entry *im); +EAPI void evas_cache_image_data_not_needed(Image_Entry *im); +EAPI int evas_cache_image_flush(Evas_Cache_Image *cache); +EAPI void evas_cache_private_set(Evas_Cache_Image *cache, const void *data); +EAPI void* evas_cache_private_get(Evas_Cache_Image *cache); +EAPI void* evas_cache_private_from_image_entry_get(Image_Entry *im); + +EAPI int evas_cache_image_usage_get(Evas_Cache_Image *cache); +EAPI int evas_cache_image_get(Evas_Cache_Image *cache); +EAPI void evas_cache_image_set(Evas_Cache_Image *cache, unsigned int size); + +EAPI Image_Entry* evas_cache_image_alone(Image_Entry *im); +EAPI Image_Entry* evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); +EAPI int evas_cache_image_load_data(Image_Entry *im); +EAPI void evas_cache_image_unload_data(Image_Entry *im); +EAPI Eina_Bool evas_cache_image_is_loaded(Image_Entry *im); +EAPI void evas_cache_image_unload_all(Evas_Cache_Image *cache); +EAPI void evas_cache_image_surface_alloc(Image_Entry *im, unsigned int w, unsigned int h); +EAPI DATA32* evas_cache_image_pixels(Image_Entry *im); +EAPI Image_Entry* evas_cache_image_copied_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); +EAPI Image_Entry* evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); +EAPI void evas_cache_image_colorspace(Image_Entry *im, int cspace); +EAPI Image_Entry* evas_cache_image_empty(Evas_Cache_Image *cache); +EAPI Image_Entry* evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h); + +EAPI Evas_Cache_Engine_Image* evas_cache_engine_image_init(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Image *parent); +EAPI void evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache); + +EAPI int evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache); +EAPI int evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache); +EAPI void evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit); + +EAPI Engine_Image_Entry* evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, void *engine_data, int *error); +EAPI void evas_cache_engine_parent_not_needed(Engine_Image_Entry *eim); +EAPI Engine_Image_Entry* evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void *engine_data); +EAPI void evas_cache_engine_image_drop(Engine_Image_Entry *eim); +EAPI Engine_Image_Entry* evas_cache_engine_image_alone(Engine_Image_Entry *eim, void *data); +EAPI Engine_Image_Entry* evas_cache_engine_image_dirty(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h); +EAPI Engine_Image_Entry* evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data); +EAPI Engine_Image_Entry* evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data); +EAPI void evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void *engine_data); +EAPI Engine_Image_Entry* evas_cache_engine_image_size_set(Engine_Image_Entry *eim, unsigned int w, unsigned int h); + +EAPI void evas_cache_engine_image_load_data(Engine_Image_Entry *eim); + +EAPI void evas_cache_image_preload_data(Image_Entry *im, const void *target); +EAPI void evas_cache_image_preload_cancel(Image_Entry *im, const void *target); + +EAPI void evas_cache_image_wakeup(void); + +#ifdef __cplusplus +} +#endif + + +#endif /* _EVAS_CACHE_H */ diff --git a/libraries/evas/src/lib/cache/evas_cache_engine_image.c b/libraries/evas/src/lib/cache/evas_cache_engine_image.c new file mode 100644 index 0000000..8ae4392 --- /dev/null +++ b/libraries/evas/src/lib/cache/evas_cache_engine_image.c @@ -0,0 +1,699 @@ +#include + +#include "evas_common.h" +#include "evas_private.h" + +static void +_evas_cache_engine_image_make_dirty(Evas_Cache_Engine_Image *cache, + Engine_Image_Entry *eim) +{ + eim->flags.cached = 1; + eim->flags.dirty = 1; + eim->flags.loaded = 1; + eim->flags.activ = 0; + cache->dirty = eina_inlist_prepend(cache->dirty, EINA_INLIST_GET(eim)); +} + +static void +_evas_cache_engine_image_make_active(Evas_Cache_Engine_Image *cache, + Engine_Image_Entry *eim, + const char *key) +{ + eim->flags.cached = 1; + eim->flags.activ = 1; + eim->flags.dirty = 0; + eina_hash_add(cache->activ, key, eim); +} + +static void +_evas_cache_engine_image_make_inactive(Evas_Cache_Engine_Image *cache, + Engine_Image_Entry *eim, + const char *key) +{ + eim->flags.cached = 1; + eim->flags.dirty = 0; + eim->flags.activ = 0; + eina_hash_add(cache->inactiv, key, eim); + cache->lru = eina_inlist_prepend(cache->lru, EINA_INLIST_GET(eim)); + cache->usage += cache->func.mem_size_get(eim); +} + +static void +_evas_cache_engine_image_remove_activ(Evas_Cache_Engine_Image *cache, + Engine_Image_Entry *eim) +{ + if (eim->flags.cached) + { + if (eim->flags.dirty) + { + cache->dirty = eina_inlist_remove(cache->dirty, EINA_INLIST_GET(eim)); + } + else + if (eim->flags.activ) + { + eina_hash_del(cache->activ, eim->cache_key, eim); + } + else + { + cache->usage -= cache->func.mem_size_get(eim); + eina_hash_del(cache->inactiv, eim->cache_key, eim); + cache->lru = eina_inlist_remove(cache->lru, EINA_INLIST_GET(eim)); + } + eim->flags.cached = 0; + eim->flags.dirty = 0; + eim->flags.activ = 0; + } +} + +static Engine_Image_Entry * +_evas_cache_engine_image_alloc(Evas_Cache_Engine_Image *cache, + Image_Entry *ie, + const char *hkey) +{ + Engine_Image_Entry *eim; + + assert(cache); + + if (cache->func.alloc) + eim = cache->func.alloc(); + else + eim = malloc(sizeof (Engine_Image_Entry)); + + if (!eim) goto on_error; + memset(eim, 0, sizeof (Engine_Image_Entry)); + + eim->cache = cache; + if (ie) + { + eim->w = ie->w; + eim->h = ie->h; + eim->src = ie; + eim->flags.need_parent = 1; + } + else + { + eim->w = -1; + eim->h = -1; + eim->flags.need_parent = 0; + eim->src = NULL; + } + + eim->flags.cached = 0; + eim->references = 0; + eim->cache_key = hkey; + + if (hkey) + _evas_cache_engine_image_make_active(cache, eim, hkey); + else + _evas_cache_engine_image_make_dirty(cache, eim); + + return eim; + + on_error: + if (eim) + evas_cache_engine_image_drop(eim); + eina_stringshare_del(hkey); + evas_cache_image_drop(ie); + return NULL; +} + +static void +_evas_cache_engine_image_dealloc(Evas_Cache_Engine_Image *cache, Engine_Image_Entry *eim) +{ + Image_Entry *im; + + if (cache->func.debug) cache->func.debug("delete", eim); + + _evas_cache_engine_image_remove_activ(cache, eim); + + im = eim->src; + cache->func.destructor(eim); + if (im) evas_cache_image_drop(im); + + if (cache->func.dealloc) + { + cache->func.dealloc(eim); + } + else + { + memset(eim, 0, sizeof (Engine_Image_Entry)); + free(eim); + } +} + +EAPI int +evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache) +{ + assert(cache != NULL); + + return cache->usage; +} + +EAPI int +evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache) +{ + assert(cache != NULL); + + return cache->limit; +} + +EAPI void +evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit) +{ + assert(cache != NULL); + + cache->limit = limit; +} + +EAPI Evas_Cache_Engine_Image * +evas_cache_engine_image_init(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Image *parent) +{ + Evas_Cache_Engine_Image *new; + + new = malloc(sizeof (Evas_Cache_Engine_Image)); + if (!new) + return NULL; + + new->func = *cb; + + new->limit = 0; + new->usage = 0; + + new->dirty = NULL; + new->lru = NULL; + new->activ = eina_hash_string_superfast_new(NULL); + new->inactiv = eina_hash_string_superfast_new(NULL); + + new->parent = parent; + parent->references++; + + new->brother = NULL; + + return new; +} + +EAPI Evas_Cache_Engine_Image * +evas_cache_engine_image_dup(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Engine_Image *brother) +{ + Evas_Cache_Engine_Image *new; + + new = calloc(1, sizeof (Evas_Cache_Engine_Image)); + if (!new) + return NULL; + + new->func = brother->func; + +#define ORD(Func) if (cb->Func) new->func.Func = cb->Func; + + ORD(key); + ORD(constructor); + ORD(destructor); + ORD(dirty_region); + ORD(dirty); + ORD(size_set); + ORD(update_data); + ORD(load); + ORD(mem_size_get); + ORD(debug); + +#undef ORD + + new->limit = -1; + new->usage = 0; + new->references = 1; + + new->dirty = NULL; + new->activ = NULL; + + new->parent = brother->parent; + new->parent->references++; + + new->brother = brother; + brother->references++; + + return new; +} + +static Eina_Bool +_evas_cache_engine_image_free_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata) +{ + Eina_List **delete_list = fdata; + + *delete_list = eina_list_prepend(*delete_list, data); + + return EINA_TRUE; +} + +EAPI void +evas_cache_engine_image_flush(Evas_Cache_Engine_Image *cache) +{ + assert(cache != NULL); + + while ((cache->lru) && (cache->limit < cache->usage)) + { + Engine_Image_Entry *eim; + + eim = (Engine_Image_Entry *) cache->lru->last; + _evas_cache_engine_image_dealloc(cache, eim); + } +} + +EAPI void +evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache) +{ + Engine_Image_Entry *eim; + Eina_List *delete_list = NULL; + + assert(cache != NULL); + + if (cache->func.debug) cache->func.debug("shutdown-engine", NULL); + + eina_hash_foreach(cache->inactiv, _evas_cache_engine_image_free_cb, &delete_list); + eina_hash_foreach(cache->activ, _evas_cache_engine_image_free_cb, &delete_list); + + while (delete_list) + { + _evas_cache_engine_image_dealloc(cache, eina_list_data_get(delete_list)); + delete_list = eina_list_remove_list(delete_list, delete_list); + } + + eina_hash_free(cache->inactiv); + eina_hash_free(cache->activ); + + /* This is mad, I am about to destroy image still alive, but we need to prevent leak. */ + while (cache->dirty) + { + eim = (Engine_Image_Entry *) cache->dirty; + _evas_cache_engine_image_dealloc(cache, eim); + } + + + evas_cache_image_shutdown(cache->parent); + if (cache->brother) + evas_cache_engine_image_shutdown(cache->brother); + free(cache); +} + +EAPI Engine_Image_Entry * +evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache, + const char *file, const char *key, + RGBA_Image_Loadopts *lo, void *data, int *error) +{ + Engine_Image_Entry *eim; + Image_Entry *im; + const char *ekey; + + assert(cache != NULL); + + *error = EVAS_LOAD_ERROR_NONE; + + ekey = NULL; + eim = NULL; + + im = evas_cache_image_request(cache->parent, file, key, lo, error); + if (!im) + goto on_error; + + if (cache->func.key) + ekey = cache->func.key(im, file, key, lo, data); + else + ekey = eina_stringshare_add(im->cache_key); + if (!ekey) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto on_error; + } + + eim = eina_hash_find(cache->activ, ekey); + if (eim) + { + evas_cache_image_drop(im); + goto on_ok; + } + + eim = eina_hash_find(cache->inactiv, ekey); + if (eim) + { + _evas_cache_engine_image_remove_activ(cache, eim); + _evas_cache_engine_image_make_active(cache, eim, ekey); + evas_cache_image_drop(im); + goto on_ok; + } + + eim = _evas_cache_engine_image_alloc(cache, im, ekey); + if (!eim) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return NULL; + } + + *error = cache->func.constructor(eim, data); + if (*error != EVAS_LOAD_ERROR_NONE) goto on_error; + if (cache->func.debug) + cache->func.debug("constructor-engine", eim); + + on_ok: + eim->references++; + return eim; + + on_error: + if (!eim) + { + if (im) evas_cache_image_drop(im); + if (ekey) eina_stringshare_del(ekey); + } + else + { + _evas_cache_engine_image_dealloc(cache, eim); + } + + return NULL; +} + +EAPI void +evas_cache_engine_image_drop(Engine_Image_Entry *eim) +{ + Evas_Cache_Engine_Image *cache; + + assert(eim); + assert(eim->cache); + + eim->references--; + cache = eim->cache; + + if (eim->flags.dirty) + { + _evas_cache_engine_image_dealloc(cache, eim); + return ; + } + + if (eim->references == 0) + { + _evas_cache_engine_image_remove_activ(cache, eim); + _evas_cache_engine_image_make_inactive(cache, eim, eim->cache_key); + evas_cache_engine_image_flush(cache); + return ; + } +} + +EAPI Engine_Image_Entry * +evas_cache_engine_image_dirty(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h) +{ + Engine_Image_Entry *eim_dirty = eim; + Image_Entry *im_dirty = NULL; + Image_Entry *im; + Evas_Cache_Engine_Image *cache; + unsigned char alloc_eim; + + assert(eim); + assert(eim->cache); + + cache = eim->cache; + if (!(eim->flags.dirty)) + { + alloc_eim = 0; + + if (eim->flags.need_parent == 1) + { + im = eim->src; + im_dirty = evas_cache_image_dirty(im, x, y, w, h); + + /* If im == im_dirty, this meens that we have only one reference to the eim. */ + if (im != im_dirty) + { + if (eim->references == 1) + { + _evas_cache_engine_image_remove_activ(cache, eim); + _evas_cache_engine_image_make_dirty(cache, eim); + + eim->src = im_dirty; + } + else + alloc_eim = 1; + } + } + else + if (eim->references > 1) + { + alloc_eim = 1; + } + else + { + _evas_cache_engine_image_remove_activ(cache, eim_dirty); + _evas_cache_engine_image_make_dirty(cache, eim_dirty); + } + + if (alloc_eim == 1) + { + int error; + + eim_dirty = _evas_cache_engine_image_alloc(cache, im_dirty, NULL); + if (!eim_dirty) goto on_error; + + eim_dirty->w = eim->w; + eim_dirty->h = eim->h; + eim_dirty->references = 1; + + error = cache->func.dirty(eim_dirty, eim); + if (cache->func.debug) + cache->func.debug("dirty-engine", eim_dirty); + + if (error != 0) goto on_error; + + evas_cache_engine_image_drop(eim); + } + } + + if (cache->func.dirty_region) + cache->func.dirty_region(eim_dirty, x, y, w, h); + if (cache->func.debug) + cache->func.debug("dirty-region-engine", eim_dirty); + + return eim_dirty; + + on_error: + if (eim) evas_cache_engine_image_drop(eim); + if (eim_dirty && eim_dirty != eim) + evas_cache_engine_image_drop(eim_dirty); + else + if (im_dirty) evas_cache_image_drop(im_dirty); + + return NULL; +} + +EAPI Engine_Image_Entry * +evas_cache_engine_image_alone(Engine_Image_Entry *eim, void *data) +{ + Evas_Cache_Engine_Image *cache; + Image_Entry *im; + + + assert(eim); + assert(eim->cache); + + cache = eim->cache; + im = evas_cache_image_alone(eim->src); + if (im != eim->src) + { + eim = _evas_cache_engine_image_alloc(cache, im, NULL); + if (!eim) goto on_error; + + eim->references = 1; + + if (cache->func.constructor(eim, data) != EVAS_LOAD_ERROR_NONE) + goto on_error; + } + /* FIXME */ + return eim; + + on_error: + evas_cache_image_drop(im); + return NULL; +} + +static Engine_Image_Entry * +_evas_cache_engine_image_push_dirty(Evas_Cache_Engine_Image *cache, Image_Entry *im, void *engine_data) +{ + Engine_Image_Entry *eim; + int error; + + eim = _evas_cache_engine_image_alloc(cache, im, NULL); + if (!eim) goto on_error; + eim->references = 1; + + error = cache->func.update_data(eim, engine_data); + if (cache->func.debug) + cache->func.debug("dirty-update_data-engine", eim); + if (error != 0) goto on_error; + + return eim; + + on_error: + if (eim) + evas_cache_engine_image_drop(eim); + return NULL; +} + +EAPI Engine_Image_Entry * +evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data) +{ + Image_Entry *im; + + assert(cache); + + im = evas_cache_image_copied_data(cache->parent, w, h, image_data, alpha, cspace); + + return _evas_cache_engine_image_push_dirty(cache, im, engine_data); +} + +EAPI Engine_Image_Entry * +evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data) +{ + Image_Entry *im; + + assert(cache); + + im = evas_cache_image_data(cache->parent, w, h, image_data, alpha, cspace); + + return _evas_cache_engine_image_push_dirty(cache, im, engine_data); +} + +EAPI Engine_Image_Entry * +evas_cache_engine_image_size_set(Engine_Image_Entry *eim, unsigned int w, unsigned int h) +{ + Evas_Cache_Engine_Image *cache; + Engine_Image_Entry *new; + Image_Entry *im; + const char *hkey; + int error; + + assert(eim); + assert(eim->cache); + assert(eim->references > 0); + + im = NULL; + cache = eim->cache; + + if (eim->flags.need_parent == 1) + { + assert(eim->src); + + if (eim->src->w == w + && eim->src->h == h) + return eim; + + im = evas_cache_image_size_set(eim->src, w, h); + /* FIXME: Good idea to call update_data ? */ + if (im == eim->src) return eim; + eim->src = NULL; + } + + hkey = (eim->references > 1 ) ? eina_stringshare_add(eim->cache_key) : NULL; + + new = _evas_cache_engine_image_alloc(cache, im, hkey); + if (!new) goto on_error; + + new->w = w; + new->h = h; + new->references = 1; + + error = cache->func.size_set(new, eim); + if (error) goto on_error; + + evas_cache_engine_image_drop(eim); + return new; + + on_error: + if (new) + evas_cache_engine_image_drop(new); + else + if (im) + evas_cache_image_drop(im); + evas_cache_engine_image_drop(eim); + + return NULL; +} + +EAPI void +evas_cache_engine_image_load_data(Engine_Image_Entry *eim) +{ + Evas_Cache_Engine_Image *cache; + int size = 0; + + assert(eim); + assert(eim->src); + assert(eim->cache); + + if (eim->flags.loaded) return; + + if (eim->src) + evas_cache_image_load_data(eim->src); + + cache = eim->cache; + if (cache->func.debug) + cache->func.debug("load-engine", eim); + + if (eim->flags.dirty) + size = cache->func.mem_size_get(eim); + cache = eim->cache; + cache->func.load(eim, eim->src); + if (eim->flags.dirty) + cache->usage += cache->func.mem_size_get(eim) - size; + + eim->flags.loaded = 1; +} + +EAPI Engine_Image_Entry * +evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void *engine_data) +{ + Engine_Image_Entry *eim; + Image_Entry *ie; + int error; + + ie = evas_cache_image_empty(cache->parent); + if (!ie) return NULL; + + eim = _evas_cache_engine_image_alloc(cache, ie, NULL); + if (!eim) goto on_error; + eim->references = 1; + + error = cache->func.update_data(eim, engine_data); + if (cache->func.debug) + cache->func.debug("update_data-engine", eim); + + if (error != 0) goto on_error; + + return eim; + + on_error: + if (!eim) + evas_cache_image_drop(ie); + else + evas_cache_engine_image_drop(eim); + + return NULL; +} + +EAPI void +evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void *engine_data) +{ + Evas_Cache_Engine_Image *cache = eim->cache; + + assert(cache); + + cache->func.destructor(eim); + evas_cache_image_colorspace(eim->src, cspace); + cache->func.constructor(eim, engine_data); + if (cache->func.debug) + cache->func.debug("cosntructor-colorspace-engine", eim); +} + +EAPI void +evas_cache_engine_parent_not_needed(Engine_Image_Entry *eim) +{ + assert(eim); + assert(eim->cache); + + eim->flags.need_parent = 0; + evas_cache_image_data_not_needed(eim->src); +} diff --git a/libraries/evas/src/lib/cache/evas_cache_image.c b/libraries/evas/src/lib/cache/evas_cache_image.c new file mode 100644 index 0000000..d52c64e --- /dev/null +++ b/libraries/evas/src/lib/cache/evas_cache_image.c @@ -0,0 +1,1433 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include + +#ifdef HAVE_EVIL +# include +#endif + +#include "evas_common.h" +#include "evas_private.h" + +//#define CACHEDUMP 1 + +#ifdef EVAS_CSERVE +// FIXME: cache server and threaded preload clash badly atm - disable +//#undef BUILD_ASYNC_PRELOAD +#endif + +#ifdef BUILD_ASYNC_PRELOAD +typedef struct _Evas_Cache_Preload Evas_Cache_Preload; + +struct _Evas_Cache_Preload +{ + EINA_INLIST; + Image_Entry *ie; +}; + +static LK(engine_lock); +static LK(wakeup); +static int _evas_cache_mutex_init = 0; + +static Eina_Condition cond_wakeup; + +static void _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target); +#endif + +#define FREESTRC(Var) \ + if (Var) \ + { \ + eina_stringshare_del(Var); \ + Var = NULL; \ + } + +static void _evas_cache_image_dirty_add(Image_Entry *im); +static void _evas_cache_image_dirty_del(Image_Entry *im); +static void _evas_cache_image_activ_add(Image_Entry *im); +static void _evas_cache_image_activ_del(Image_Entry *im); +static void _evas_cache_image_lru_add(Image_Entry *im); +static void _evas_cache_image_lru_del(Image_Entry *im); +static void _evas_cache_image_lru_nodata_add(Image_Entry *im); +static void _evas_cache_image_lru_nodata_del(Image_Entry *im); + +static void +_evas_cache_image_dirty_add(Image_Entry *im) +{ + if (im->flags.dirty) return; + _evas_cache_image_activ_del(im); + _evas_cache_image_lru_del(im); + _evas_cache_image_lru_nodata_del(im); + im->flags.dirty = 1; + im->flags.cached = 1; +#ifdef EVAS_FRAME_QUEUING + LKL(im->cache->lock); +#endif + im->cache->dirty = eina_inlist_prepend(im->cache->dirty, EINA_INLIST_GET(im)); +#ifdef EVAS_FRAME_QUEUING + LKU(im->cache->lock); +#endif + if (im->cache_key) + { + eina_stringshare_del(im->cache_key); + im->cache_key = NULL; + } +} + +static void +_evas_cache_image_dirty_del(Image_Entry *im) +{ + if (!im->flags.dirty) return; + im->flags.dirty = 0; + im->flags.cached = 0; +#ifdef EVAS_FRAME_QUEUING + LKL(im->cache->lock); +#endif + im->cache->dirty = eina_inlist_remove(im->cache->dirty, EINA_INLIST_GET(im)); +#ifdef EVAS_FRAME_QUEUING + LKU(im->cache->lock); +#endif +} + +static void +_evas_cache_image_activ_add(Image_Entry *im) +{ + if (im->flags.activ) return; + _evas_cache_image_dirty_del(im); + _evas_cache_image_lru_del(im); + _evas_cache_image_lru_nodata_del(im); + if (!im->cache_key) return; + im->flags.activ = 1; + im->flags.cached = 1; +#ifdef EVAS_FRAME_QUEUING + LKL(im->cache->lock); +#endif + eina_hash_direct_add(im->cache->activ, im->cache_key, im); +#ifdef EVAS_FRAME_QUEUING + LKU(im->cache->lock); +#endif +} + +static void +_evas_cache_image_activ_del(Image_Entry *im) +{ + if (!im->flags.activ) return; + if (!im->cache_key) return; + im->flags.activ = 0; + im->flags.cached = 0; +#ifdef EVAS_FRAME_QUEUING + LKL(im->cache->lock); +#endif + eina_hash_del(im->cache->activ, im->cache_key, im); +#ifdef EVAS_FRAME_QUEUING + LKU(im->cache->lock); +#endif +} + +static void +_evas_cache_image_lru_add(Image_Entry *im) +{ + if (im->flags.lru) return; + _evas_cache_image_dirty_del(im); + _evas_cache_image_activ_del(im); + _evas_cache_image_lru_nodata_del(im); + if (!im->cache_key) return; + im->flags.lru = 1; + im->flags.cached = 1; +#ifdef EVAS_FRAME_QUEUING + LKL(im->cache->lock); +#endif + eina_hash_direct_add(im->cache->inactiv, im->cache_key, im); + im->cache->lru = eina_inlist_prepend(im->cache->lru, EINA_INLIST_GET(im)); + im->cache->usage += im->cache->func.mem_size_get(im); +#ifdef EVAS_FRAME_QUEUING + LKU(im->cache->lock); +#endif +} + +static void +_evas_cache_image_lru_del(Image_Entry *im) +{ + if (!im->flags.lru) return; + if (!im->cache_key) return; + im->flags.lru = 0; + im->flags.cached = 0; +#ifdef EVAS_FRAME_QUEUING + LKL(im->cache->lock); +#endif + eina_hash_del(im->cache->inactiv, im->cache_key, im); + im->cache->lru = eina_inlist_remove(im->cache->lru, EINA_INLIST_GET(im)); + im->cache->usage -= im->cache->func.mem_size_get(im); +#ifdef EVAS_FRAME_QUEUING + LKU(im->cache->lock); +#endif +} + +static void +_evas_cache_image_lru_nodata_add(Image_Entry *im) +{ + if (im->flags.lru_nodata) return; + _evas_cache_image_dirty_del(im); + _evas_cache_image_activ_del(im); + _evas_cache_image_lru_del(im); + im->flags.lru = 1; + im->flags.cached = 1; +#ifdef EVAS_FRAME_QUEUING + LKL(im->cache->lock); +#endif + im->cache->lru_nodata = eina_inlist_prepend(im->cache->lru_nodata, EINA_INLIST_GET(im)); +#ifdef EVAS_FRAME_QUEUING + LKU(im->cache->lock); +#endif +} + +static void +_evas_cache_image_lru_nodata_del(Image_Entry *im) +{ + if (!im->flags.lru_nodata) return; + im->flags.lru = 0; + im->flags.cached = 0; +#ifdef EVAS_FRAME_QUEUING + LKL(im->cache->lock); +#endif + im->cache->lru_nodata = eina_inlist_remove(im->cache->lru_nodata, EINA_INLIST_GET(im)); +#ifdef EVAS_FRAME_QUEUING + LKU(im->cache->lock); +#endif +} + +static void +_evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie) +{ + if (!ie) return; + if (cache->func.debug) cache->func.debug("deleting", ie); +#ifdef BUILD_ASYNC_PRELOAD + if (ie->flags.delete_me == 1) return; + if (ie->preload) + { + ie->flags.delete_me = 1; + _evas_cache_image_entry_preload_remove(ie, NULL); + return; + } +#endif + + _evas_cache_image_dirty_del(ie); + _evas_cache_image_activ_del(ie); + _evas_cache_image_lru_del(ie); + _evas_cache_image_lru_nodata_del(ie); + + cache->func.destructor(ie); + FREESTRC(ie->cache_key); + FREESTRC(ie->file); + FREESTRC(ie->key); + ie->cache = NULL; + cache->func.surface_delete(ie); + +#ifdef BUILD_ASYNC_PRELOAD + LKD(ie->lock); + LKD(ie->lock_cancel); +#endif +#ifdef EVAS_FRAME_QUEUING + LKD(ie->lock_references); +#endif + cache->func.dealloc(ie); +} + +static Eina_Bool +_timestamp_compare(Image_Timestamp *tstamp, struct stat *st) +{ + if (tstamp->mtime != st->st_mtime) return EINA_FALSE; + if (tstamp->size != st->st_size) return EINA_FALSE; + if (tstamp->ino != st->st_ino) return EINA_FALSE; +#ifdef _STAT_VER_LINUX +#if (defined __USE_MISC && defined st_mtime) + if (tstamp->mtime_nsec != (unsigned long int)st->st_mtim.tv_nsec) + return EINA_FALSE; +#else + if (tstamp->mtime_nsec != (unsigned long int)st->st_mtimensec) + return EINA_FALSE; +#endif +#endif + return EINA_TRUE; +} + +static void +_timestamp_build(Image_Timestamp *tstamp, struct stat *st) +{ + tstamp->mtime = st->st_mtime; + tstamp->size = st->st_size; + tstamp->ino = st->st_ino; +#ifdef _STAT_VER_LINUX +#if (defined __USE_MISC && defined st_mtime) + tstamp->mtime_nsec = (unsigned long int)st->st_mtim.tv_nsec; +#else + tstamp->mtime_nsec = (unsigned long int)st->st_mtimensec; +#endif +#endif +} + +static Image_Entry * +_evas_cache_image_entry_new(Evas_Cache_Image *cache, + const char *hkey, + Image_Timestamp *tstamp, + const char *file, + const char *key, + RGBA_Image_Loadopts *lo, + int *error) +{ + Image_Entry *ie; + + ie = cache->func.alloc(); + if (!ie) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return NULL; + } + ie->cache = cache; + if (hkey) ie->cache_key = eina_stringshare_add(hkey); + ie->flags.need_data = 1; + ie->space = EVAS_COLORSPACE_ARGB8888; + ie->w = -1; + ie->h = -1; + ie->scale = 1; + if (file) ie->file = eina_stringshare_add(file); + if (key) ie->key = eina_stringshare_add(key); + if (tstamp) ie->tstamp = *tstamp; + else memset(&ie->tstamp, 0, sizeof(Image_Timestamp)); + +#ifdef EVAS_FRAME_QUEUING + LKI(ie->lock_references); +#endif +#ifdef BUILD_ASYNC_PRELOAD + LKI(ie->lock); + LKI(ie->lock_cancel); +#endif + + if (lo) ie->load_opts = *lo; + if (ie->file) + { + *error = cache->func.constructor(ie); + if (*error != EVAS_LOAD_ERROR_NONE) + { + _evas_cache_image_entry_delete(cache, ie); + return NULL; + } + } + if (cache->func.debug) cache->func.debug("build", ie); + if (ie->cache_key) _evas_cache_image_activ_add(ie); + else _evas_cache_image_dirty_add(ie); + return ie; +} + +static void +_evas_cache_image_entry_surface_alloc__locked(Evas_Cache_Image *cache, + Image_Entry *ie, + unsigned int wmin, + unsigned int hmin) +{ + if ((ie->allocated.w == wmin) && (ie->allocated.h == hmin)) return; + if (cache->func.surface_alloc(ie, wmin, hmin)) + { + wmin = 0; + hmin = 0; + } + ie->w = wmin; + ie->h = hmin; + ie->allocated.w = wmin; + ie->allocated.h = hmin; +} + +static void +_evas_cache_image_entry_surface_alloc(Evas_Cache_Image *cache, + Image_Entry *ie, int w, int h) +{ + int wmin = w > 0 ? w : 1; + int hmin = h > 0 ? h : 1; +#ifdef BUILD_ASYNC_PRELOAD + LKL(engine_lock); +#endif + _evas_cache_image_entry_surface_alloc__locked(cache, ie, wmin, hmin); +#ifdef BUILD_ASYNC_PRELOAD + LKU(engine_lock); +#endif +} + +#ifdef BUILD_ASYNC_PRELOAD +static void +_evas_cache_image_async_heavy(void *data) +{ + Evas_Cache_Image *cache; + Image_Entry *current; + int error; + int pchannel; + + current = data; + + LKL(current->lock); + pchannel = current->channel; + current->channel++; + cache = current->cache; + + if ((!current->flags.loaded) && + ((Evas_Image_Load_Func*) current->info.module)->threadable) + { + error = cache->func.load(current); + if (cache->func.debug) cache->func.debug("load", current); + current->load_error = error; + if (error != EVAS_LOAD_ERROR_NONE) + { + current->flags.loaded = 0; + _evas_cache_image_entry_surface_alloc(cache, current, + current->w, current->h); + } + else + { + current->flags.loaded = 1; + } + } + current->channel = pchannel; + // check the unload cancel flag + LKL(current->lock_cancel); + if (current->unload_cancel) + { + current->unload_cancel = EINA_FALSE; + cache->func.surface_delete(current); + current->flags.loaded = 0; + current->flags.preload_done = 0; + } + LKU(current->lock_cancel); + LKU(current->lock); +} + +static void +_evas_cache_image_async_end(void *data) +{ + Image_Entry *ie = (Image_Entry *)data; + Evas_Cache_Target *tmp; + + ie->cache->preload = eina_list_remove(ie->cache->preload, ie); + ie->cache->pending = eina_list_remove(ie->cache->pending, ie); + ie->preload = NULL; + ie->flags.preload_done = ie->flags.loaded; + while ((tmp = ie->targets)) + { + evas_object_inform_call_image_preloaded((Evas_Object*) tmp->target); + ie->targets = (Evas_Cache_Target *) + eina_inlist_remove(EINA_INLIST_GET(ie->targets), + EINA_INLIST_GET(ie->targets)); + free(tmp); + } +} + +static void +_evas_cache_image_async_cancel(void *data) +{ + Evas_Cache_Image *cache = NULL; + Image_Entry *ie = (Image_Entry *)data; + + ie->preload = NULL; + ie->cache->pending = eina_list_remove(ie->cache->pending, ie); + if ((ie->flags.delete_me) || (ie->flags.dirty)) + { + ie->flags.delete_me = 0; + _evas_cache_image_entry_delete(ie->cache, ie); + return; + } + if (ie->flags.loaded) _evas_cache_image_async_end(ie); +#ifdef EVAS_FRAME_QUEUING + LKL(ie->lock_references); +#endif + if (ie->references == 0) + { + _evas_cache_image_lru_add(ie); + cache = ie->cache; + } +#ifdef EVAS_FRAME_QUEUING + LKU(ie->lock_references); +#endif + if (cache) evas_cache_image_flush(cache); +} + +// note - preload_add assumes a target is ONLY added ONCE to the image +// entry. make sure you only add once, or remove first, then add +static int +_evas_cache_image_entry_preload_add(Image_Entry *ie, const void *target) +{ + Evas_Cache_Target *tg; + + if (ie->flags.preload_done) return 0; + + tg = malloc(sizeof (Evas_Cache_Target)); + if (!tg) return 0; + + tg->target = target; + ie->targets = (Evas_Cache_Target *) + eina_inlist_append(EINA_INLIST_GET(ie->targets), EINA_INLIST_GET(tg)); + if (!ie->preload) + { + ie->cache->preload = eina_list_append(ie->cache->preload, ie); + ie->flags.pending = 0; + ie->preload = evas_preload_thread_run(_evas_cache_image_async_heavy, + _evas_cache_image_async_end, + _evas_cache_image_async_cancel, + ie); + } + return 1; +} + +static void +_evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target) +{ + if (target) + { + Evas_Cache_Target *tg; + + EINA_INLIST_FOREACH(ie->targets, tg) + { + if (tg->target == target) + { + // FIXME: No callback when we cancel only for one target ? + ie->targets = (Evas_Cache_Target *) + eina_inlist_remove(EINA_INLIST_GET(ie->targets), + EINA_INLIST_GET(tg)); + free(tg); + break; + } + } + } + else + { + Evas_Cache_Target *tg; + + while (ie->targets) + { + tg = ie->targets; + ie->targets = (Evas_Cache_Target *) + eina_inlist_remove(EINA_INLIST_GET(ie->targets), + EINA_INLIST_GET(tg)); + free(tg); + } + } + + if ((!ie->targets) && (ie->preload) && (!ie->flags.pending)) + { + ie->cache->preload = eina_list_remove(ie->cache->preload, ie); + ie->cache->pending = eina_list_append(ie->cache->pending, ie); + ie->flags.pending = 1; + evas_preload_thread_cancel(ie->preload); + } +} +#endif + +EAPI int +evas_cache_image_usage_get(Evas_Cache_Image *cache) +{ + return cache->usage; +} + +EAPI int +evas_cache_image_get(Evas_Cache_Image *cache) +{ + return cache->limit; +} + +EAPI void +evas_cache_image_set(Evas_Cache_Image *cache, unsigned int limit) +{ +#ifdef EVAS_FRAME_QUEUING + LKL(cache->lock); +#endif + if (cache->limit == limit) + { +#ifdef EVAS_FRAME_QUEUING + LKU(cache->lock); +#endif + return; + } + cache->limit = limit; +#ifdef EVAS_FRAME_QUEUING + LKU(cache->lock); +#endif + evas_cache_image_flush(cache); +} + +EAPI Evas_Cache_Image * +evas_cache_image_init(const Evas_Cache_Image_Func *cb) +{ + Evas_Cache_Image *cache; + +#ifdef BUILD_ASYNC_PRELOAD + if (_evas_cache_mutex_init++ == 0) + { + LKI(engine_lock); + LKI(wakeup); + eina_condition_new(&cond_wakeup, &wakeup); + } +#endif + + cache = calloc(1, sizeof(Evas_Cache_Image)); + if (!cache) return NULL; + cache->func = *cb; + cache->inactiv = eina_hash_string_superfast_new(NULL); + cache->activ = eina_hash_string_superfast_new(NULL); + cache->references = 1; +#ifdef EVAS_FRAME_QUEUING + LKI(cache->lock); +#endif + return cache; +} + +static Eina_Bool +_evas_cache_image_free_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata) +{ + Eina_List **delete_list = fdata; + *delete_list = eina_list_prepend(*delete_list, data); + return EINA_TRUE; +} + +EAPI void +evas_cache_image_shutdown(Evas_Cache_Image *cache) +{ + Eina_List *delete_list; + Image_Entry *im; + +#ifdef EVAS_FRAME_QUEUING + LKL(cache->lock); +#endif + cache->references--; + if (cache->references != 0) + { +#ifdef EVAS_FRAME_QUEUING + LKU(cache->lock); +#endif + return; + } +#ifdef EVAS_FRAME_QUEUING + /* Release and destroy lock early ! */ + LKU(cache->lock); + LKD(cache->lock); +#endif + +#ifdef BUILD_ASYNC_PRELOAD + EINA_LIST_FREE(cache->preload, im) + { + /* By doing that we are protecting us from destroying image when the cache is no longer available. */ + im->flags.delete_me = 1; + _evas_cache_image_entry_preload_remove(im, NULL); + } + evas_async_events_process(); +#endif + while (cache->lru) + { + im = (Image_Entry *)cache->lru; + _evas_cache_image_entry_delete(cache, im); + } + while (cache->lru_nodata) + { + im = (Image_Entry *)cache->lru_nodata; + _evas_cache_image_entry_delete(cache, im); + } + /* This is mad, I am about to destroy image still alive, but we need to prevent leak. */ + while (cache->dirty) + { + im = (Image_Entry *)cache->dirty; + _evas_cache_image_entry_delete(cache, im); + } + delete_list = NULL; + eina_hash_foreach(cache->activ, _evas_cache_image_free_cb, &delete_list); + while (delete_list) + { + _evas_cache_image_entry_delete(cache, eina_list_data_get(delete_list)); + delete_list = eina_list_remove_list(delete_list, delete_list); + } + +#ifdef BUILD_ASYNC_PRELOAD + /* Now wait for all pending image to die */ + while (cache->pending) + { + evas_async_events_process(); + LKL(wakeup); + // the lazy bum who did eain threads and converted this code + // didn't bother to worry about Eina_Lock being a different type + // to a pthread mutex. + if (cache->pending) eina_condition_wait(&cond_wakeup); + LKU(wakeup); + } +#endif + eina_hash_free(cache->activ); + eina_hash_free(cache->inactiv); + free(cache); + +#ifdef BUILD_ASYNC_PRELOAD + if (--_evas_cache_mutex_init == 0) + { + eina_condition_free(&cond_wakeup); + LKD(engine_lock); + LKD(wakeup); + } +#endif +} + +EAPI Image_Entry * +evas_cache_image_request(Evas_Cache_Image *cache, const char *file, + const char *key, RGBA_Image_Loadopts *lo, int *error) +{ + const char *ckey = "(null)"; + char *hkey; + Image_Entry *im; + Evas_Image_Load_Opts prevent = { 0, 0.0, 0, 0, 0, { 0, 0, 0, 0 }, EINA_FALSE }; + size_t size; + int stat_done = 0, stat_failed = 0; + size_t file_length; + size_t key_length; + struct stat st; + Image_Timestamp tstamp; + + if ((!file) || ((!file) && (!key))) + { + *error = EVAS_LOAD_ERROR_GENERIC; + return NULL; + } + + /* generate hkey from file+key+load opts */ + file_length = strlen(file); + key_length = key ? strlen(key) : 6; + size = file_length + key_length + 132; + hkey = alloca(sizeof (char) * size); + memcpy(hkey, file, file_length); + size = file_length; + memcpy(hkey + size, "//://", 5); + size += 5; + if (key) ckey = key; + memcpy(hkey + size, ckey, key_length); + size += key_length; + if ((!lo) || + (lo && + (lo->scale_down_by == 0) && + (lo->dpi == 0.0) && + ((lo->w == 0) || (lo->h == 0)) && + ((lo->region.w == 0) || (lo->region.h == 0)) && + (lo->orientation == 0) + )) + { + lo = &prevent; + } + else + { + memcpy(hkey + size, "//@/", 4); + size += 4; + size += eina_convert_xtoa(lo->scale_down_by, hkey + size); + hkey[size] = '/'; + size += 1; + size += eina_convert_dtoa(lo->dpi, hkey + size); + hkey[size] = '/'; + size += 1; + size += eina_convert_xtoa(lo->w, hkey + size); + hkey[size] = 'x'; + size += 1; + size += eina_convert_xtoa(lo->h, hkey + size); + hkey[size] = '/'; + size += 1; + size += eina_convert_xtoa(lo->region.x, hkey + size); + hkey[size] = '+'; + size += 1; + size += eina_convert_xtoa(lo->region.y, hkey + size); + hkey[size] = '.'; + size += 1; + size += eina_convert_xtoa(lo->region.w, hkey + size); + hkey[size] = 'x'; + size += 1; + size += eina_convert_xtoa(lo->region.h, hkey + size); + + if (lo->orientation) + { + hkey[size] = '/'; + size += 1; + hkey[size] = 'o'; + size += 1; + } + } + hkey[size] = '\0'; + + /* find image by key in active hash */ +#ifdef EVAS_FRAME_QUEUING + LKL(cache->lock); +#endif + im = eina_hash_find(cache->activ, hkey); +#ifdef EVAS_FRAME_QUEUING + LKU(cache->lock); +#endif + if (im) + { + int ok = 1; + + stat_done = 1; + if (stat(file, &st) < 0) + { + stat_failed = 1; + ok = 0; + } + else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0; + if (ok) goto on_ok; + /* image we found doesn't match what's on disk (stat info wise) + * so dirty the active cache entry so we never find it again. this + * also implicitly guarantees that we only have 1 active copy + * of an image at a given key. we wither find it and keep re-reffing + * it or we dirty it and get it out */ + _evas_cache_image_dirty_add(im); + im = NULL; + } + + /* find image by key in inactive/lru hash */ +#ifdef EVAS_FRAME_QUEUING + LKL(cache->lock); +#endif + im = eina_hash_find(cache->inactiv, hkey); +#ifdef EVAS_FRAME_QUEUING + LKU(cache->lock); +#endif + if (im) + { + int ok = 1; + + if (!stat_done) + { + stat_done = 1; + if (stat(file, &st) < 0) + { + stat_failed = 1; + ok = 0; + } + else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0; + } + else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0; + + if (ok) + { + /* remove from lru and make it active again */ + _evas_cache_image_lru_del(im); + _evas_cache_image_activ_add(im); + goto on_ok; + } + /* as avtive cache find - if we match in lru and its invalid, dirty */ + _evas_cache_image_dirty_add(im); + im = NULL; + } + if (stat_failed) goto on_stat_error; + + if (!stat_done) + { + if (stat(file, &st) < 0) goto on_stat_error; + } + _timestamp_build(&tstamp, &st); + im = _evas_cache_image_entry_new(cache, hkey, &tstamp, file, key, + lo, error); + if (!im) goto on_stat_error; + if (cache->func.debug) cache->func.debug("request", im); + + on_ok: + *error = EVAS_LOAD_ERROR_NONE; +#ifdef EVAS_FRAME_QUEUING + LKL(im->lock_references); +#endif + im->references++; +#ifdef EVAS_FRAME_QUEUING + LKU(im->lock_references); +#endif + return im; + + on_stat_error: +#ifndef _WIN32 + if ((errno == ENOENT) || (errno == ENOTDIR) || + (errno == ENAMETOOLONG) || (errno == ELOOP)) +#else + if (errno == ENOENT) +#endif + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; +#ifndef _WIN32 + else if ((errno == ENOMEM) || (errno == EOVERFLOW)) +#else + else if (errno == ENOMEM) +#endif + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else if (errno == EACCES) + *error = EVAS_LOAD_ERROR_PERMISSION_DENIED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + + if (im) _evas_cache_image_entry_delete(cache, im); + return NULL; +} + +EAPI void +evas_cache_image_drop(Image_Entry *im) +{ + Evas_Cache_Image *cache; + int references; + +#ifdef EVAS_FRAME_QUEUING + LKL(im->lock_references); +#endif + im->references--; + if (im->references < 0) im->references = 0; + references = im->references; +#ifdef EVAS_FRAME_QUEUING + LKU(im->lock_references); +#endif + + cache = im->cache; + + if (references == 0) + { +#ifdef EVAS_FRAME_QUEUING + LKL(im->ref_fq_add); + LKL(im->ref_fq_del); + if (im->ref_fq[0] != im->ref_fq[1]) + { + LKU(im->ref_fq_add); + LKU(im->ref_fq_del); + return; + } + LKU(im->ref_fq_add); + LKU(im->ref_fq_del); +#endif + +#ifdef BUILD_ASYNC_PRELOAD + if (im->preload) + { + _evas_cache_image_entry_preload_remove(im, NULL); + return; + } +#endif + + if (im->flags.dirty) + { + _evas_cache_image_entry_delete(cache, im); + return; + } + _evas_cache_image_lru_add(im); + if (cache) evas_cache_image_flush(cache); + } +} + +EAPI void +evas_cache_image_data_not_needed(Image_Entry *im) +{ + Evas_Cache_Image *cache; + int references; + + /* FIXME: no one uses this api... well evas_cache_engine_parent_not_needed() + * does, but nothing uses that! */ + cache = im->cache; +#ifdef EVAS_FRAME_QUEUING + LKL(im->lock_references); +#endif + references = im->references; +#ifdef EVAS_FRAME_QUEUING + LKU(im->lock_references); +#endif + if (references > 1) return; + if ((im->flags.dirty) || (!im->flags.need_data)) return; + _evas_cache_image_lru_nodata_add(im); +} + +EAPI Image_Entry * +evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h) +{ + Image_Entry *im_dirty = im; + Evas_Cache_Image *cache; + int references; + + cache = im->cache; + if (!(im->flags.dirty)) + { +#ifdef EVAS_FRAME_QUEUING + LKL(im->lock_references); +#endif + references = im->references; +#ifdef EVAS_FRAME_QUEUING + LKU(im->lock_references); +#endif +#ifndef EVAS_CSERVE + // if ref 1 also copy if using shared cache as its read-only + if (references == 1) im_dirty = im; + else +#endif + { + int error; + + im_dirty = + evas_cache_image_copied_data(cache, im->w, im->h, + evas_cache_image_pixels(im), + im->flags.alpha, im->space); + if (!im_dirty) goto on_error; + if (cache->func.debug) cache->func.debug("dirty-src", im); + error = cache->func.dirty(im_dirty, im); + if (cache->func.debug) cache->func.debug("dirty-out", im_dirty); +#ifdef EVAS_FRAME_QUEUING + LKL(im_dirty->lock_references); +#endif + im_dirty->references = 1; +#ifdef EVAS_FRAME_QUEUING + LKU(im_dirty->lock_references); +#endif + evas_cache_image_drop(im); + } + _evas_cache_image_dirty_add(im_dirty); + } + + if (cache->func.debug) cache->func.debug("dirty-region", im_dirty); + if (cache->func.dirty_region) + cache->func.dirty_region(im_dirty, x, y, w, h); + return im_dirty; + +on_error: + if (im_dirty) _evas_cache_image_entry_delete(cache, im_dirty); + evas_cache_image_drop(im); + return NULL; +} + +EAPI Image_Entry * +evas_cache_image_alone(Image_Entry *im) +{ + Evas_Cache_Image *cache; + Image_Entry *im_dirty = im; + int references; + + cache = im->cache; +#ifdef EVAS_FRAME_QUEUING + LKL(im->lock_references); +#endif + references = im->references; +#ifdef EVAS_FRAME_QUEUING + LKU(im->lock_references); +#endif + + if (references <= 1) + { + if (!im->flags.dirty) _evas_cache_image_dirty_add(im); + } + else + { + int error; + + im_dirty = evas_cache_image_copied_data(cache, im->w, im->h, + evas_cache_image_pixels(im), + im->flags.alpha, + im->space); + if (!im_dirty) goto on_error; + if (cache->func.debug) cache->func.debug("dirty-src", im); + error = cache->func.dirty(im_dirty, im); + if (cache->func.debug) cache->func.debug("dirty-out", im_dirty); +#ifdef EVAS_FRAME_QUEUING + LKL(im_dirty->lock_references); +#endif + im_dirty->references = 1; +#ifdef EVAS_FRAME_QUEUING + LKU(im_dirty->lock_references); +#endif + evas_cache_image_drop(im); + } + return im_dirty; + +on_error: + if (im_dirty) _evas_cache_image_entry_delete(cache, im_dirty); + evas_cache_image_drop(im); + return NULL; +} + +EAPI Image_Entry * +evas_cache_image_copied_data(Evas_Cache_Image *cache, + unsigned int w, unsigned int h, + DATA32 *image_data, int alpha, int cspace) +{ + Image_Entry *im; + + if ((cspace == EVAS_COLORSPACE_YCBCR422P601_PL) || + (cspace == EVAS_COLORSPACE_YCBCR422P709_PL) || + (cspace == EVAS_COLORSPACE_YCBCR422601_PL)) + w &= ~0x1; + + im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); + if (!im) return NULL; + im->space = cspace; + im->flags.alpha = alpha; + _evas_cache_image_entry_surface_alloc(cache, im, w, h); + if (cache->func.copied_data(im, w, h, image_data, alpha, cspace) != 0) + { + _evas_cache_image_entry_delete(cache, im); + return NULL; + } +#ifdef EVAS_FRAME_QUEUING + LKL(im->lock_references); +#endif + im->references = 1; +#ifdef EVAS_FRAME_QUEUING + LKU(im->lock_references); +#endif + if (cache->func.debug) cache->func.debug("copied-data", im); + return im; +} + +EAPI Image_Entry * +evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace) +{ + Image_Entry *im; + + if ((cspace == EVAS_COLORSPACE_YCBCR422P601_PL) || + (cspace == EVAS_COLORSPACE_YCBCR422P709_PL) || + (cspace == EVAS_COLORSPACE_YCBCR422601_PL)) + w &= ~0x1; + + im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); + if (!im) return NULL; + im->w = w; + im->h = h; + im->flags.alpha = alpha; + if (cache->func.data(im, w, h, image_data, alpha, cspace) != 0) + { + _evas_cache_image_entry_delete(cache, im); + return NULL; + } +#ifdef EVAS_FRAME_QUEUING + LKL(im->lock_references); +#endif + im->references = 1; +#ifdef EVAS_FRAME_QUEUING + LKU(im->lock_references); +#endif + if (cache->func.debug) cache->func.debug("data", im); + return im; +} + +EAPI void +evas_cache_image_surface_alloc(Image_Entry *im, unsigned int w, unsigned int h) +{ + Evas_Cache_Image *cache = im->cache; + + if ((im->space == EVAS_COLORSPACE_YCBCR422P601_PL) || + (im->space == EVAS_COLORSPACE_YCBCR422P709_PL) || + (im->space == EVAS_COLORSPACE_YCBCR422601_PL)) + w &= ~0x1; + + _evas_cache_image_entry_surface_alloc(cache, im, w, h); + if (cache->func.debug) cache->func.debug("surface-alloc", im); +} + +EAPI Image_Entry * +evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h) +{ + Evas_Cache_Image *cache; + Image_Entry *im2 = NULL; + int error; + + if ((im->space == EVAS_COLORSPACE_YCBCR422P601_PL) || + (im->space == EVAS_COLORSPACE_YCBCR422P709_PL) || + (im->space == EVAS_COLORSPACE_YCBCR422601_PL)) + w &= ~0x1; + if ((im->w == w) && (im->h == h)) return im; + + cache = im->cache; + im2 = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, &error); + if (!im2) goto on_error; + + im2->flags.alpha = im->flags.alpha; + im2->space = im->space; + im2->load_opts = im->load_opts; + _evas_cache_image_entry_surface_alloc(cache, im2, w, h); + error = cache->func.size_set(im2, im, w, h); + if (error != 0) goto on_error; +#ifdef EVAS_FRAME_QUEUING + LKL(im2->lock_references); +#endif + im2->references = 1; +#ifdef EVAS_FRAME_QUEUING + LKU(im2->lock_references); +#endif + evas_cache_image_drop(im); + if (cache->func.debug) cache->func.debug("size_set", im2); + return im2; + + on_error: + if (im2) _evas_cache_image_entry_delete(cache, im2); + evas_cache_image_drop(im); + return NULL; +} + +EAPI int +evas_cache_image_load_data(Image_Entry *im) +{ +#ifdef BUILD_ASYNC_PRELOAD + Eina_Bool preload = EINA_FALSE; +#endif + int error = EVAS_LOAD_ERROR_NONE; + + if ((im->flags.loaded) && (!im->flags.animated)) return error; +#ifdef BUILD_ASYNC_PRELOAD + if (im->preload) + { + preload = EINA_TRUE; + if (!im->flags.pending) + { + im->cache->preload = eina_list_remove(im->cache->preload, im); + im->cache->pending = eina_list_append(im->cache->pending, im); + im->flags.pending = 1; + evas_preload_thread_cancel(im->preload); + } + evas_async_events_process(); + LKL(wakeup); + while (im->preload) + { + eina_condition_wait(&cond_wakeup); + LKU(wakeup); + evas_async_events_process(); + LKL(wakeup); + } + LKU(wakeup); + } + + if ((im->flags.loaded) && (!im->flags.animated)) return error; + LKL(im->lock); +#endif + im->flags.in_progress = EINA_TRUE; + error = im->cache->func.load(im); + im->flags.in_progress = EINA_FALSE; +#ifdef BUILD_ASYNC_PRELOAD + LKU(im->lock); +#endif + im->flags.loaded = 1; + if (im->cache->func.debug) im->cache->func.debug("load", im); + if (error != EVAS_LOAD_ERROR_NONE) + { + _evas_cache_image_entry_surface_alloc(im->cache, im, im->w, im->h); + im->flags.loaded = 0; + } +#ifdef BUILD_ASYNC_PRELOAD + if (preload) _evas_cache_image_async_end(im); +#endif + return error; +} + +EAPI void +evas_cache_image_unload_data(Image_Entry *im) +{ + if (im->flags.in_progress) return; + evas_cache_image_preload_cancel(im, NULL); +#ifdef BUILD_ASYNC_PRELOAD + LKL(im->lock_cancel); + if (LKT(im->lock) == EINA_FALSE) /* can't get image lock - busy async load */ + { + im->unload_cancel = EINA_TRUE; + LKU(im->lock_cancel); + return; + } + LKU(im->lock_cancel); +#endif + if ((!im->flags.loaded) || (!im->file) || (!im->info.module) || + (im->flags.dirty)) + { +#ifdef BUILD_ASYNC_PRELOAD + LKU(im->lock); +#endif + return; + } + im->cache->func.destructor(im); +#ifdef BUILD_ASYNC_PRELOAD + LKU(im->lock); +#endif + //FIXME: imagedataunload - inform owners +} + +static Eina_Bool +_evas_cache_image_unload_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, __UNUSED__ void *fdata) +{ + evas_cache_image_unload_data(data); + return EINA_TRUE; +} + +EAPI void +evas_cache_image_unload_all(Evas_Cache_Image *cache) +{ + Image_Entry *im; + + EINA_INLIST_FOREACH(cache->lru, im) evas_cache_image_unload_data(im); + EINA_INLIST_FOREACH(cache->lru_nodata, im) evas_cache_image_unload_data(im); + eina_hash_foreach(cache->activ, _evas_cache_image_unload_cb, NULL); + eina_hash_foreach(cache->inactiv, _evas_cache_image_unload_cb, NULL); +} + +EAPI Eina_Bool +evas_cache_image_is_loaded(Image_Entry *im) +{ + if (im->flags.loaded) return EINA_TRUE; + return EINA_FALSE; +} + +EAPI void +evas_cache_image_preload_data(Image_Entry *im, const void *target) +{ +#ifdef BUILD_ASYNC_PRELOAD + RGBA_Image *img = (RGBA_Image *)im; + + if ((im->flags.loaded) && (img->image.data)) + { + evas_object_inform_call_image_preloaded((Evas_Object *)target); + return; + } + im->flags.loaded = 0; + if (!_evas_cache_image_entry_preload_add(im, target)) + evas_object_inform_call_image_preloaded((Evas_Object *)target); +#else + evas_cache_image_load_data(im); + evas_object_inform_call_image_preloaded((Evas_Object *)target); +#endif +} + +EAPI void +evas_cache_image_preload_cancel(Image_Entry *im, const void *target) +{ +#ifdef BUILD_ASYNC_PRELOAD + if (!target) return; + _evas_cache_image_entry_preload_remove(im, target); +#else + (void)im; +#endif +} + +#ifdef CACHEDUMP +static int total = 0; + +static void +_dump_img(Image_Entry *im, const char *type) +{ + total += im->cache->func.mem_size_get(im); + printf("%s: %4i: %4ib, %4ix%4i alloc[%4ix%4i] [%s] [%s]\n", + type, + im->references, + im->cache->func.mem_size_get(im), + im->w, im->h, im->allocated.w, im->allocated.h, + im->file, im->key); +} + +static Eina_Bool +_dump_cache_active(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata __UNUSED__) +{ + Image_Entry *im = data; + _dump_img(im, "ACTIVE"); + return EINA_TRUE; +} + +static void +_dump_cache(Evas_Cache_Image *cache) +{ + Image_Entry *im; + + printf("--CACHE DUMP----------------------------------------------------\n"); + printf("cache: %ikb / %ikb\n", + cache->usage / 1024, + cache->limit / 1024); + printf("................................................................\n"); + total = 0; + EINA_INLIST_FOREACH(cache->lru_nodata, im) + _dump_img(im, "NODATA"); + EINA_INLIST_FOREACH(cache->lru, im) + _dump_img(im, "DATA "); + printf("tot: %i\n" + "usg: %i\n", + total, + cache->usage); + eina_hash_foreach(cache->activ, _dump_cache_active, NULL); +} +#endif + +EAPI int +evas_cache_image_flush(Evas_Cache_Image *cache) +{ +#ifdef CACHEDUMP + _dump_cache(cache); +#endif + if (cache->limit == (unsigned int)-1) return -1; + + while ((cache->lru) && (cache->limit < (unsigned int)cache->usage)) + { + Image_Entry *im; + + im = (Image_Entry *)cache->lru->last; + _evas_cache_image_entry_delete(cache, im); + } + + while ((cache->lru_nodata) && (cache->limit < (unsigned int)cache->usage)) + { + Image_Entry *im; + + im = (Image_Entry *) cache->lru_nodata->last; + _evas_cache_image_lru_nodata_del(im); + cache->func.surface_delete(im); + im->flags.loaded = 0; + } + + return cache->usage; +} + +EAPI Image_Entry * +evas_cache_image_empty(Evas_Cache_Image *cache) +{ + Image_Entry *im; + + im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); + if (!im) return NULL; +#ifdef EVAS_FRAME_QUEUING + LKL(im->lock_references); +#endif + im->references = 1; +#ifdef EVAS_FRAME_QUEUING + LKU(im->lock_references); +#endif + return im; +} + +EAPI void +evas_cache_image_colorspace(Image_Entry *im, int cspace) +{ + if (im->space == cspace) return; + im->space = cspace; + im->cache->func.color_space(im, cspace); +} + +EAPI void * +evas_cache_private_from_image_entry_get(Image_Entry *im) +{ + return (void *)im->cache->data; +} + +EAPI void * +evas_cache_private_get(Evas_Cache_Image *cache) +{ + return cache->data; +} + +EAPI void +evas_cache_private_set(Evas_Cache_Image *cache, const void *data) +{ + cache->data = (void *)data; +} + +EAPI DATA32 * +evas_cache_image_pixels(Image_Entry *im) +{ + return im->cache->func.surface_pixels(im); +} + +EAPI void +evas_cache_image_wakeup(void) +{ +#ifdef BUILD_ASYNC_PRELOAD + if (_evas_cache_mutex_init > 0) + eina_condition_broadcast(&cond_wakeup); +#endif +} diff --git a/libraries/evas/src/lib/cache/evas_preload.c b/libraries/evas/src/lib/cache/evas_preload.c new file mode 100644 index 0000000..6e0412a --- /dev/null +++ b/libraries/evas/src/lib/cache/evas_preload.c @@ -0,0 +1,264 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef HAVE_EVIL +# include +#endif + +#ifdef BUILD_ASYNC_PRELOAD +# include +# ifdef __linux__ +# include +# endif +#endif + +#include "evas_common.h" +#include "evas_private.h" +#include "Evas.h" + +#ifdef BUILD_ASYNC_PRELOAD + +static int _threads_max = 0; + +typedef struct _Evas_Preload_Pthread_Worker Evas_Preload_Pthread_Worker; +typedef struct _Evas_Preload_Pthread_Data Evas_Preload_Pthread_Data; + +typedef void (*_evas_preload_pthread_func)(void *data); + +struct _Evas_Preload_Pthread_Worker +{ + EINA_INLIST; + + _evas_preload_pthread_func func_heavy; + _evas_preload_pthread_func func_end; + _evas_preload_pthread_func func_cancel; + void *data; + Eina_Bool cancel : 1; +}; + +struct _Evas_Preload_Pthread_Data +{ + pthread_t thread; +}; + +static int _threads_count = 0; +static Evas_Preload_Pthread_Worker *_workers = NULL; + +static LK(_mutex); + +static void +_evas_preload_thread_end(void *data) +{ + Evas_Preload_Pthread_Data *pth = data; + Evas_Preload_Pthread_Data *p = NULL; + + if (pthread_join(pth->thread, (void **)&p) == 0) free(p); + else return; + eina_threads_shutdown(); +} + +static void +_evas_preload_thread_done(void *target __UNUSED__, Evas_Callback_Type type __UNUSED__, void *event_info) +{ + Evas_Preload_Pthread_Worker *work = event_info; + if (work->cancel) + { + if (work->func_cancel) work->func_cancel(work->data); + } + else + work->func_end(work->data); + + free(work); +} + +static void * +_evas_preload_thread_worker(void *data) +{ + Evas_Preload_Pthread_Data *pth = data; + Evas_Preload_Pthread_Worker *work; + + eina_sched_prio_drop(); + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); +on_error: + for (;;) + { + LKL(_mutex); + if (!_workers) + { + LKU(_mutex); + break; + } + + work = _workers; + _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers), + EINA_INLIST_GET(_workers)), + Evas_Preload_Pthread_Worker); + LKU(_mutex); + + if (work->func_heavy) work->func_heavy(work->data); + evas_async_events_put(pth, 0, work, _evas_preload_thread_done); + } + + LKL(_mutex); + if (_workers) + { + LKU(_mutex); + goto on_error; + } + _threads_count--; + LKU(_mutex); + + // dummy worker to wake things up + work = malloc(sizeof(Evas_Preload_Pthread_Worker)); + if (!work) return NULL; + + work->data = pth; + work->func_heavy = NULL; + work->func_end = (_evas_preload_pthread_func) _evas_preload_thread_end; + work->func_cancel = NULL; + work->cancel = EINA_FALSE; + + evas_async_events_put(pth, 0, work, _evas_preload_thread_done); + return pth; +} +#endif + +void +_evas_preload_thread_init(void) +{ +#ifdef BUILD_ASYNC_PRELOAD + _threads_max = eina_cpu_count(); + if (_threads_max < 1) _threads_max = 1; + + LKI(_mutex); +#endif +} + +void +_evas_preload_thread_shutdown(void) +{ + /* FIXME: If function are still running in the background, should we kill them ? */ +#ifdef BUILD_ASYNC_PRELOAD + Evas_Preload_Pthread_Worker *work; + + /* Force processing of async events. */ + evas_async_events_process(); + LKL(_mutex); + while (_workers) + { + work = _workers; + _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers), + EINA_INLIST_GET(_workers)), + Evas_Preload_Pthread_Worker); + if (work->func_cancel) work->func_cancel(work->data); + free(work); + } + LKU(_mutex); + + LKD(_mutex); +#endif +} + +Evas_Preload_Pthread * +evas_preload_thread_run(void (*func_heavy) (void *data), + void (*func_end) (void *data), + void (*func_cancel) (void *data), + const void *data) +{ +#ifdef BUILD_ASYNC_PRELOAD + Evas_Preload_Pthread_Worker *work; + Evas_Preload_Pthread_Data *pth; + + work = malloc(sizeof(Evas_Preload_Pthread_Worker)); + if (!work) + { + func_cancel((void *)data); + return NULL; + } + + work->func_heavy = func_heavy; + work->func_end = func_end; + work->func_cancel = func_cancel; + work->cancel = EINA_FALSE; + work->data = (void *)data; + + LKL(_mutex); + _workers = (Evas_Preload_Pthread_Worker *)eina_inlist_append(EINA_INLIST_GET(_workers), EINA_INLIST_GET(work)); + if (_threads_count == _threads_max) + { + LKU(_mutex); + return (Evas_Preload_Pthread *)work; + } + LKU(_mutex); + + /* One more thread could be created. */ + pth = malloc(sizeof(Evas_Preload_Pthread_Data)); + if (!pth) goto on_error; + + eina_threads_init(); + + if (pthread_create(&pth->thread, NULL, _evas_preload_thread_worker, pth) == 0) + { + LKL(_mutex); + _threads_count++; + LKU(_mutex); + return (Evas_Preload_Pthread*)work; + } + + eina_threads_shutdown(); + + on_error: + LKL(_mutex); + if (_threads_count == 0) + { + LKU(_mutex); + if (work->func_cancel) work->func_cancel(work->data); + free(work); + return NULL; + } + LKU(_mutex); + return NULL; +#else + /* + If no thread and as we don't want to break app that rely on this + facility, we will lock the interface until we are done. + */ + func_heavy((void *)data); + func_end((void *)data); + return (void *)1; +#endif +} + +Eina_Bool +evas_preload_thread_cancel(Evas_Preload_Pthread *thread) +{ +#ifdef BUILD_ASYNC_PRELOAD + Evas_Preload_Pthread_Worker *work; + + if (!thread) return EINA_TRUE; + LKL(_mutex); + EINA_INLIST_FOREACH(_workers, work) + { + if (work == (Evas_Preload_Pthread_Worker *)thread) + { + _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers), + EINA_INLIST_GET(work)), + Evas_Preload_Pthread_Worker); + LKU(_mutex); + if (work->func_cancel) work->func_cancel(work->data); + free(work); + return EINA_TRUE; + } + } + LKU(_mutex); + + /* Delay the destruction */ + work = (Evas_Preload_Pthread_Worker *)thread; + work->cancel = EINA_TRUE; + return EINA_FALSE; +#else + return EINA_TRUE; +#endif +} diff --git a/libraries/evas/src/lib/canvas/Makefile.am b/libraries/evas/src/lib/canvas/Makefile.am new file mode 100644 index 0000000..79544aa --- /dev/null +++ b/libraries/evas/src/lib/canvas/Makefile.am @@ -0,0 +1,68 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/lib/cserve \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@WIN32_CPPFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@EET_CFLAGS@ \ +@FONTCONFIG_CFLAGS@ \ +@EVAS_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@PIXMAN_CFLAGS@ + +noinst_LTLIBRARIES = libevas_canvas.la +libevas_canvas_la_SOURCES = \ +evas_callbacks.c \ +evas_clip.c \ +evas_data.c \ +evas_events.c \ +evas_filter.c \ +evas_focus.c \ +evas_key.c \ +evas_key_grab.c \ +evas_layer.c \ +evas_main.c \ +evas_name.c \ +evas_object_image.c \ +evas_object_main.c \ +evas_object_inform.c \ +evas_object_intercept.c \ +evas_object_line.c \ +evas_object_polygon.c \ +evas_object_rectangle.c \ +evas_object_smart.c \ +evas_object_smart_clipped.c \ +evas_object_box.c \ +evas_object_table.c \ +evas_object_text.c \ +evas_object_textblock.c \ +evas_object_grid.c \ +evas_font_dir.c \ +evas_rectangle.c \ +evas_render.c \ +evas_smart.c \ +evas_stack.c \ +evas_async_events.c \ +evas_stats.c \ +evas_touch_point.c \ +evas_map.c \ +evas_gl.c + +#evas_object_textgrid.c + +libevas_canvas_la_LIBADD = @EVAS_LIBS@ @EVIL_LIBS@ + +if EVAS_USE_LINEBREAK +AM_CPPFLAGS += @LINEBREAK_CFLAGS@ +libevas_canvas_la_LIBADD += @LINEBREAK_LIBS@ +endif + +clean-local: + rm -rf *.gcno diff --git a/libraries/evas/src/lib/canvas/Makefile.in b/libraries/evas/src/lib/canvas/Makefile.in new file mode 100644 index 0000000..0b4e15d --- /dev/null +++ b/libraries/evas/src/lib/canvas/Makefile.in @@ -0,0 +1,760 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@EVAS_USE_LINEBREAK_TRUE@am__append_1 = @LINEBREAK_CFLAGS@ +@EVAS_USE_LINEBREAK_TRUE@am__append_2 = @LINEBREAK_LIBS@ +subdir = src/lib/canvas +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +libevas_canvas_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am_libevas_canvas_la_OBJECTS = evas_callbacks.lo evas_clip.lo \ + evas_data.lo evas_events.lo evas_filter.lo evas_focus.lo \ + evas_key.lo evas_key_grab.lo evas_layer.lo evas_main.lo \ + evas_name.lo evas_object_image.lo evas_object_main.lo \ + evas_object_inform.lo evas_object_intercept.lo \ + evas_object_line.lo evas_object_polygon.lo \ + evas_object_rectangle.lo evas_object_smart.lo \ + evas_object_smart_clipped.lo evas_object_box.lo \ + evas_object_table.lo evas_object_text.lo \ + evas_object_textblock.lo evas_object_grid.lo evas_font_dir.lo \ + evas_rectangle.lo evas_render.lo evas_smart.lo evas_stack.lo \ + evas_async_events.lo evas_stats.lo evas_touch_point.lo \ + evas_map.lo evas_gl.lo +libevas_canvas_la_OBJECTS = $(am_libevas_canvas_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_canvas_la_SOURCES) +DIST_SOURCES = $(libevas_canvas_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = -I. -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib/include -I$(top_srcdir)/src/lib/cserve \ + -DPACKAGE_BIN_DIR=\"$(bindir)\" \ + -DPACKAGE_LIB_DIR=\"$(libdir)\" \ + -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" @WIN32_CPPFLAGS@ \ + @FREETYPE_CFLAGS@ @EET_CFLAGS@ @FONTCONFIG_CFLAGS@ \ + @EVAS_CFLAGS@ @EINA_CFLAGS@ @EVIL_CFLAGS@ @PIXMAN_CFLAGS@ \ + $(am__append_1) +noinst_LTLIBRARIES = libevas_canvas.la +libevas_canvas_la_SOURCES = \ +evas_callbacks.c \ +evas_clip.c \ +evas_data.c \ +evas_events.c \ +evas_filter.c \ +evas_focus.c \ +evas_key.c \ +evas_key_grab.c \ +evas_layer.c \ +evas_main.c \ +evas_name.c \ +evas_object_image.c \ +evas_object_main.c \ +evas_object_inform.c \ +evas_object_intercept.c \ +evas_object_line.c \ +evas_object_polygon.c \ +evas_object_rectangle.c \ +evas_object_smart.c \ +evas_object_smart_clipped.c \ +evas_object_box.c \ +evas_object_table.c \ +evas_object_text.c \ +evas_object_textblock.c \ +evas_object_grid.c \ +evas_font_dir.c \ +evas_rectangle.c \ +evas_render.c \ +evas_smart.c \ +evas_stack.c \ +evas_async_events.c \ +evas_stats.c \ +evas_touch_point.c \ +evas_map.c \ +evas_gl.c + + +#evas_object_textgrid.c +libevas_canvas_la_LIBADD = @EVAS_LIBS@ @EVIL_LIBS@ $(am__append_2) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/canvas/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/canvas/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_canvas.la: $(libevas_canvas_la_OBJECTS) $(libevas_canvas_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libevas_canvas_la_OBJECTS) $(libevas_canvas_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_async_events.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_callbacks.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_clip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_data.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_events.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_filter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_focus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_dir.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_key.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_key_grab.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_layer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_map.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_name.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_box.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_grid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_image.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_inform.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_intercept.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_line.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_polygon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_rectangle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_smart.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_smart_clipped.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_table.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_text.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_textblock.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_rectangle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_render.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_smart.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_stack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_stats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_touch_point.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-local clean-noinstLTLIBRARIES ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +clean-local: + rm -rf *.gcno + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/canvas/evas_async_events.c b/libraries/evas/src/lib/canvas/evas_async_events.c new file mode 100644 index 0000000..bd2e3a8 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_async_events.c @@ -0,0 +1,173 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef BUILD_ASYNC_EVENTS + +# ifndef _MSC_VER +# include +# endif +# include +# include + +#endif + +#include "evas_common.h" +#include "evas_private.h" + +#ifdef BUILD_ASYNC_EVENTS + +static int _fd_write = -1; +static int _fd_read = -1; + +static int _init_evas_event = 0; + +typedef struct _Evas_Event_Async Evas_Event_Async; + +struct _Evas_Event_Async +{ + const void *target; + void *event_info; + Evas_Async_Events_Put_Cb func; + Evas_Callback_Type type; +}; + +int +evas_async_events_init(void) +{ + int filedes[2]; + + _init_evas_event++; + if (_init_evas_event > 1) return _init_evas_event; + + if (pipe(filedes) == -1) + { + _init_evas_event = 0; + return 0; + } + + _fd_read = filedes[0]; + _fd_write = filedes[1]; + + fcntl(_fd_read, F_SETFL, O_NONBLOCK); + + return _init_evas_event; +} + +int +evas_async_events_shutdown(void) +{ + _init_evas_event--; + if (_init_evas_event > 0) return _init_evas_event; + + close(_fd_read); + close(_fd_write); + _fd_read = -1; + _fd_write = -1; + + return _init_evas_event; +} + +#endif + +EAPI int +evas_async_events_fd_get(void) +{ +#ifdef BUILD_ASYNC_EVENTS + return _fd_read; +#else + return -1; +#endif +} + +EAPI int +evas_async_events_process(void) +{ +#ifdef BUILD_ASYNC_EVENTS + Evas_Event_Async *ev; + int check; + int count = 0; + + if (_fd_read == -1) return 0; + + do + { + check = read(_fd_read, &ev, sizeof (Evas_Event_Async *)); + + if (check == sizeof (Evas_Event_Async *)) + { + if (ev->func) ev->func((void *)ev->target, ev->type, ev->event_info); + free(ev); + count++; + } + } + while (check > 0); + + evas_cache_image_wakeup(); + + if (check < 0) + { + switch (errno) + { + case EBADF: + case EINVAL: + case EIO: + case EISDIR: + _fd_read = -1; + } + } + + return count; +#else + return 0; +#endif +} + +EAPI Eina_Bool +evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func) +{ +#ifdef BUILD_ASYNC_EVENTS + Evas_Event_Async *ev; + ssize_t check; + Eina_Bool result = EINA_FALSE; + + if (!func) return 0; + if (_fd_write == -1) return 0; + + ev = calloc(1, sizeof (Evas_Event_Async)); + if (!ev) return 0; + + ev->func = func; + ev->target = target; + ev->type = type; + ev->event_info = event_info; + + do + { + check = write(_fd_write, &ev, sizeof (Evas_Event_Async*)); + } + while ((check != sizeof (Evas_Event_Async*)) && + ((errno == EINTR) || (errno == EAGAIN))); + + evas_cache_image_wakeup(); + + if (check == sizeof (Evas_Event_Async*)) + result = EINA_TRUE; + else + { + switch (errno) + { + case EBADF: + case EINVAL: + case EIO: + case EPIPE: + _fd_write = -1; + } + } + + return result; +#else + func((void*) target, type, event_info); + return EINA_TRUE; +#endif +} diff --git a/libraries/evas/src/lib/canvas/evas_callbacks.c b/libraries/evas/src/lib/canvas/evas_callbacks.c new file mode 100644 index 0000000..33b93bc --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_callbacks.c @@ -0,0 +1,534 @@ +#include "evas_common.h" +#include "evas_private.h" + +static void evas_object_event_callback_clear(Evas_Object *obj); +static void evas_event_callback_clear(Evas *e); +int _evas_event_counter = 0; + +EVAS_MEMPOOL(_mp_fn); +EVAS_MEMPOOL(_mp_cb); +EVAS_MEMPOOL(_mp_pc); + +void +_evas_post_event_callback_call(Evas *e) +{ + Evas_Post_Callback *pc; + int skip = 0; + + if (e->delete_me) return; + _evas_walk(e); + EINA_LIST_FREE(e->post_events, pc) + { + if ((!skip) && (!e->delete_me) && (!pc->delete_me)) + { + if (!pc->func((void*)pc->data, e)) skip = 1; + } + EVAS_MEMPOOL_FREE(_mp_pc, pc); + } + _evas_unwalk(e); +} + +void +_evas_post_event_callback_free(Evas *e) +{ + Evas_Post_Callback *pc; + + EINA_LIST_FREE(e->post_events, pc) + { + EVAS_MEMPOOL_FREE(_mp_pc, pc); + } + _evas_unwalk(e); +} + +void +evas_event_callback_list_post_free(Eina_Inlist **list) +{ + Eina_Inlist *l; + + /* MEM OK */ + for (l = *list; l;) + { + Evas_Func_Node *fn; + + fn = (Evas_Func_Node *)l; + l = l->next; + if (fn->delete_me) + { + *list = eina_inlist_remove(*list, EINA_INLIST_GET(fn)); + EVAS_MEMPOOL_FREE(_mp_fn, fn); + } + } +} + +static void +evas_object_event_callback_clear(Evas_Object *obj) +{ + if (!obj->callbacks) return; + if (!obj->callbacks->deletions_waiting) return; + obj->callbacks->deletions_waiting = 0; + evas_event_callback_list_post_free(&obj->callbacks->callbacks); + if (!obj->callbacks->callbacks) + { + EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks); + obj->callbacks = NULL; + } +} + +static void +evas_event_callback_clear(Evas *e) +{ + if (!e->callbacks) return; + if (!e->callbacks->deletions_waiting) return; + e->callbacks->deletions_waiting = 0; + evas_event_callback_list_post_free(&e->callbacks->callbacks); + if (!e->callbacks->callbacks) + { + EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks); + e->callbacks = NULL; + } +} + +void +evas_object_event_callback_all_del(Evas_Object *obj) +{ + Evas_Func_Node *fn; + + if (!obj->callbacks) return; + EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) + fn->delete_me = 1; +} + +void +evas_object_event_callback_cleanup(Evas_Object *obj) +{ + /* MEM OK */ + if (!obj->callbacks) return; + evas_event_callback_list_post_free(&obj->callbacks->callbacks); + EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks); + obj->callbacks = NULL; +} + +void +evas_event_callback_all_del(Evas *e) +{ + Evas_Func_Node *fn; + + if (!e->callbacks) return; + EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) + fn->delete_me = 1; +} + +void +evas_event_callback_cleanup(Evas *e) +{ + /* MEM OK */ + if (!e->callbacks) return; + evas_event_callback_list_post_free(&e->callbacks->callbacks); + EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks); + e->callbacks = NULL; +} + +void +evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info) +{ + Eina_Inlist **l_mod = NULL, *l; + + _evas_walk(e); + if (e->callbacks) + { + l_mod = &e->callbacks->callbacks; + e->callbacks->walking_list++; + for (l = *l_mod; l; l = l->next) + { + Evas_Func_Node *fn; + + fn = (Evas_Func_Node *)l; + if ((fn->type == type) && (!fn->delete_me)) + { + Evas_Event_Cb func = fn->func; + if (func) + func(fn->data, e, event_info); + } + if (e->delete_me) break; + } + e->callbacks->walking_list--; + if (!e->callbacks->walking_list) + { + evas_event_callback_clear(e); + l_mod = NULL; + } + } + _evas_unwalk(e); +} + +void +evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info) +{ + /* MEM OK */ + Eina_Inlist **l_mod = NULL, *l; + Evas_Button_Flags flags = EVAS_BUTTON_NONE; + Evas *e; + + if ((obj->delete_me) || (!obj->layer)) return; + if ((obj->last_event == _evas_event_counter) && + (obj->last_event_type == type)) return; + obj->last_event = _evas_event_counter; + obj->last_event_type = type; + if (!(e = obj->layer->evas)) return; + + _evas_walk(e); + if (obj->callbacks) + { + l_mod = &obj->callbacks->callbacks; + switch (type) + { + case EVAS_CALLBACK_MOUSE_DOWN: + { + Evas_Event_Mouse_Down *ev = event_info; + + flags = ev->flags; + if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) + { + if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1)) + ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); + } + obj->last_mouse_down_counter = e->last_mouse_down_counter; + break; + } + case EVAS_CALLBACK_MOUSE_UP: + { + Evas_Event_Mouse_Up *ev = event_info; + + flags = ev->flags; + if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) + { + if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1)) + ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); + } + obj->last_mouse_up_counter = e->last_mouse_up_counter; + break; + } + default: + break; + } + obj->callbacks->walking_list++; + for (l = *l_mod; l; l = l->next) + { + Evas_Func_Node *fn; + + fn = (Evas_Func_Node *)l; + if ((fn->type == type) && (!fn->delete_me)) + { + Evas_Object_Event_Cb func = fn->func; + if (func) + func(fn->data, obj->layer->evas, obj, event_info); + } + if (obj->delete_me) break; + } + obj->callbacks->walking_list--; + if (!obj->callbacks->walking_list) + { + evas_object_event_callback_clear(obj); + l_mod = NULL; + } + + if (type == EVAS_CALLBACK_MOUSE_DOWN) + { + Evas_Event_Mouse_Down *ev = event_info; + ev->flags = flags; + } + else if (type == EVAS_CALLBACK_MOUSE_UP) + { + Evas_Event_Mouse_Up *ev = event_info; + ev->flags = flags; + } + } + + if (!((obj->no_propagate) && (l_mod) && (*l_mod))) + { + if (!obj->no_propagate) + { + if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) && + (type <= EVAS_CALLBACK_KEY_UP)) + evas_object_event_callback_call(obj->smart.parent, type, event_info); + } + } + _evas_unwalk(e); +} + +static int +_callback_priority_cmp(const void *_a, const void *_b) +{ + const Evas_Func_Node *a, *b; + a = EINA_INLIST_CONTAINER_GET(_a, Evas_Func_Node); + b = EINA_INLIST_CONTAINER_GET(_b, Evas_Func_Node); + if (a->priority < b->priority) + return -1; + else + return 1; +} + +EAPI void +evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) +{ + evas_object_event_callback_priority_add(obj, type, + EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); +} + +EAPI void +evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data) +{ + /* MEM OK */ + Evas_Func_Node *fn; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + + if (!func) return; + + if (!obj->callbacks) + { + EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 512, ); + obj->callbacks = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Callbacks); + if (!obj->callbacks) return; + EVAS_MEMPOOL_PREP(_mp_cb, obj->callbacks, Evas_Callbacks); + } + + EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); + fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); + if (!fn) return; + EVAS_MEMPOOL_PREP(_mp_fn, fn, Evas_Func_Node); + fn->func = func; + fn->data = (void *)data; + fn->type = type; + fn->priority = priority; + + obj->callbacks->callbacks = + eina_inlist_sorted_insert(obj->callbacks->callbacks, EINA_INLIST_GET(fn), + _callback_priority_cmp); +} + +EAPI void * +evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) +{ + /* MEM OK */ + Evas_Func_Node *fn; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + + if (!func) return NULL; + + if (!obj->callbacks) return NULL; + + EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) + { + if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) + { + void *tmp; + + tmp = fn->data; + fn->delete_me = 1; + obj->callbacks->deletions_waiting = 1; + if (!obj->callbacks->walking_list) + evas_object_event_callback_clear(obj); + return tmp; + } + } + return NULL; +} + +EAPI void * +evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) +{ + /* MEM OK */ + Evas_Func_Node *fn; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + + if (!func) return NULL; + + if (!obj->callbacks) return NULL; + + EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) + { + if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) + { + void *tmp; + + tmp = fn->data; + fn->delete_me = 1; + obj->callbacks->deletions_waiting = 1; + if (!obj->callbacks->walking_list) + evas_object_event_callback_clear(obj); + return tmp; + } + } + return NULL; +} + +EAPI void +evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) +{ + evas_event_callback_priority_add(e, type, EVAS_CALLBACK_PRIORITY_DEFAULT, + func, data); +} + +EAPI void +evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data) +{ + /* MEM OK */ + Evas_Func_Node *fn; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (!func) return; + + if (!e->callbacks) + { + EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 512, ); + e->callbacks = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Callbacks); + if (!e->callbacks) return; + EVAS_MEMPOOL_PREP(_mp_cb, e->callbacks, Evas_Callbacks); + } + + EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); + fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); + if (!fn) return; + EVAS_MEMPOOL_PREP(_mp_fn, fn, Evas_Func_Node); + fn->func = func; + fn->data = (void *)data; + fn->type = type; + fn->priority = priority; + + e->callbacks->callbacks = eina_inlist_sorted_insert(e->callbacks->callbacks, + EINA_INLIST_GET(fn), _callback_priority_cmp); +} + +EAPI void * +evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) +{ + /* MEM OK */ + Evas_Func_Node *fn; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + + if (!func) return NULL; + + if (!e->callbacks) return NULL; + + EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) + { + if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) + { + void *data; + + data = fn->data; + fn->delete_me = 1; + e->callbacks->deletions_waiting = 1; + if (!e->callbacks->walking_list) + evas_event_callback_clear(e); + return data; + } + } + return NULL; +} + +EAPI void * +evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) +{ + /* MEM OK */ + Evas_Func_Node *fn; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + + if (!func) return NULL; + + if (!e->callbacks) return NULL; + + EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) + { + if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) + { + void *tmp; + + tmp = fn->data; + fn->delete_me = 1; + e->callbacks->deletions_waiting = 1; + if (!e->callbacks->walking_list) + evas_event_callback_clear(e); + return tmp; + } + } + return NULL; +} + +EAPI void +evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data) +{ + Evas_Post_Callback *pc; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, ); + pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback); + if (!pc) return; + EVAS_MEMPOOL_PREP(_mp_pc, pc, Evas_Post_Callback); + if (e->delete_me) return; + + pc->func = func; + pc->data = data; + e->post_events = eina_list_prepend(e->post_events, pc); +} + +EAPI void +evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func) +{ + Evas_Post_Callback *pc; + Eina_List *l; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + EINA_LIST_FOREACH(e->post_events, l, pc) + { + if (pc->func == func) + { + pc->delete_me = 1; + return; + } + } +} + +EAPI void +evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, const void *data) +{ + Evas_Post_Callback *pc; + Eina_List *l; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + EINA_LIST_FOREACH(e->post_events, l, pc) + { + if ((pc->func == func) && (pc->data == data)) + { + pc->delete_me = 1; + return; + } + } +} diff --git a/libraries/evas/src/lib/canvas/evas_clip.c b/libraries/evas/src/lib/canvas/evas_clip.c new file mode 100644 index 0000000..1ae2f73 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_clip.c @@ -0,0 +1,321 @@ +#include "evas_common.h" +#include "evas_private.h" + +void +evas_object_clip_dirty(Evas_Object *obj) +{ + Eina_List *l; + Evas_Object *data; + + if (obj->cur.cache.clip.dirty) return ; + + obj->cur.cache.clip.dirty = 1; + EINA_LIST_FOREACH(obj->clip.clipees, l, data) + evas_object_clip_dirty(data); +} + +void +evas_object_recalc_clippees(Evas_Object *obj) +{ + Eina_List *l; + Evas_Object *data; + + if (obj->cur.cache.clip.dirty) + { + evas_object_clip_recalc(obj); + EINA_LIST_FOREACH(obj->clip.clipees, l, data) + evas_object_recalc_clippees(data); + } +} + +int +evas_object_clippers_was_visible(Evas_Object *obj) +{ + if (obj->prev.visible) + { + if (obj->prev.clipper) + return evas_object_clippers_is_visible(obj->prev.clipper); + return 1; + } + return 0; +} + +/* aaaaargh (pirate voice) ... notes! + * + * we have a big problem until now that's gone undetected... until yesterday. + * that problem involves clips and maps and smart objects. hooray! 3 of the + * more complex bits of evas - and maps and smart objects being one of the + * nastiest ones. + * + * what is the problem? when a clip crosses a map boundary. that is to say + * that when the clipper and clippee are not within the child tree of the + * mapped object. in this case "bad stuff" happens. basically as clips are + * then used to render objects, but they no longer apply as you'd expect as + * the map transfomr the objects to-be-clipped separately from the objects + * that clip them and this whole relationship is broken by maps. it somehow + * managed to not break with the advent of smart objects. lucky me... but + * maps killed it. now... what do we do? that is a good question. detect + * such a broken link and "turn off clipping" in that event - sure. but this + * isn't going to be cheap as ANY addition or deletion of a map to an object + * or any change in clipper of an object or any change in smart object + * membership needs to walk the obj tree both up and down from the changed + * object and probably walk entire object trees to find these and mark them. + * thats silly-expensive and i was about to fix it that way but it has since + * dawned on me that that is just going to kill performance in some critical + * areas like during object setup and manipulation, as well as teardown. + * + * aaaaagh! best for now is to document this as a "don't do it damnit!" thing + * and have the apps avoid it. but even then - how to do this? this is not + * easy. everywhere i turn so far i come up to either expensive operations, + * breaks in logic, or nasty re-work of apps or4 the whole concept of clipping, + * smart objects and maps... and that will have to wait for evas 2.0 + * + * the below does clip fixups etc. in the even a clip spans a map boundary. + * not pretty, but necessary. + */ + +#define MAP_ACROSS 1 +static void +evas_object_child_map_across_mark(Evas_Object *obj, Evas_Object *map_obj, Eina_Bool force) +{ +#ifdef MAP_ACROSS + if ((obj->cur.map_parent != map_obj) || force) + { + obj->cur.map_parent = map_obj; + obj->cur.cache.clip.dirty = 1; + evas_object_clip_recalc(obj); + if (obj->smart.smart) + { + Evas_Object *obj2; + + EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) + { + // if obj has its own map - skip it. already done + if ((obj2->cur.map) && (obj2->cur.usemap)) continue; + evas_object_child_map_across_mark(obj2, map_obj, force); + } + } + else if (obj->clip.clipees) + { + Eina_List *l; + Evas_Object *obj2; + + EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) + evas_object_child_map_across_mark(obj2, map_obj, force); + } + } +#endif +} + +void +evas_object_clip_across_check(Evas_Object *obj) +{ +#ifdef MAP_ACROSS + if (!obj->cur.clipper) return; + if (obj->cur.clipper->cur.map_parent != obj->cur.map_parent) + evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1); +#endif +} + +void +evas_object_clip_across_clippees_check(Evas_Object *obj) +{ +#ifdef MAP_ACROSS + Eina_List *l; + Evas_Object *obj2; + + if (!obj->clip.clipees) return; +// schloooooooooooow: +// evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1); +// buggy: + evas_object_child_map_across_mark(obj, obj->cur.map_parent, 0); + if (obj->cur.cache.clip.dirty) + { + EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) + evas_object_clip_across_clippees_check(obj2); + } +#endif +} + +// this function is called on an object when map is enabled or disabled on it +// thus creating a "map boundary" at that point. +// +// FIXME: flip2 test broken in elm - might be show/hide of clips +void +evas_object_mapped_clip_across_mark(Evas_Object *obj) +{ +#ifdef MAP_ACROSS + if ((obj->cur.map) && (obj->cur.usemap)) + evas_object_child_map_across_mark(obj, obj, 0); + else + { + if (obj->smart.parent) + evas_object_child_map_across_mark + (obj, obj->smart.parent->cur.map_parent, 0); + else + evas_object_child_map_across_mark(obj, NULL, 0); + } +#endif +} + +/* public functions */ +extern const char *o_rect_type; + +EAPI void +evas_object_clip_set(Evas_Object *obj, Evas_Object *clip) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!clip) + { + evas_object_clip_unset(obj); + return; + } + MAGIC_CHECK(clip, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->cur.clipper == clip) return; + if (obj == clip) return; + if (evas_object_intercept_call_clip_set(obj, clip)) return; + // illegal to set anything but a rect as a clip + if (clip->type != o_rect_type) + { + ERR("For now a clip on other object than a rectangle is disabled"); + return; + } + if (obj->smart.smart) + { + if (obj->smart.smart->smart_class->clip_set) + obj->smart.smart->smart_class->clip_set(obj, clip); + } + if (obj->cur.clipper) + { + /* unclip */ + obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj); + if (!obj->cur.clipper->clip.clipees) + { + obj->cur.clipper->cur.have_clipees = 0; + if (obj->cur.clipper->cur.visible) + evas_damage_rectangle_add(obj->cur.clipper->layer->evas, + obj->cur.clipper->cur.geometry.x, + obj->cur.clipper->cur.geometry.y, + obj->cur.clipper->cur.geometry.w, + obj->cur.clipper->cur.geometry.h); + } + evas_object_change(obj->cur.clipper); + evas_object_change(obj); + obj->cur.clipper = NULL; + } + /* clip me */ + if ((!clip->clip.clipees) && (clip->cur.visible)) + { + /* Basically it just went invisible */ + clip->changed = 1; + clip->layer->evas->changed = 1; + evas_damage_rectangle_add(clip->layer->evas, + clip->cur.geometry.x, clip->cur.geometry.y, + clip->cur.geometry.w, clip->cur.geometry.h); + } + obj->cur.clipper = clip; + clip->clip.clipees = eina_list_append(clip->clip.clipees, obj); + if (clip->clip.clipees) clip->cur.have_clipees = 1; + + /* If it's NOT a rectangle set the mask bits too */ + /* FIXME: Optmz ths chck */ + if (strcmp(evas_object_type_get(clip),"rectangle") == 0) + obj->cur.mask = NULL; + else + { + void *engdata; + obj->cur.mask = clip; + engdata = clip->func->engine_data_get(clip); + /* FIXME: Images only */ + clip->layer->evas->engine.func->image_mask_create( + clip->layer->evas->engine.data.output, + engdata); + } + evas_object_change(clip); + evas_object_change(obj); + evas_object_clip_dirty(obj); + evas_object_recalc_clippees(obj); + if ((!obj->smart.smart) && + (!((obj->cur.map) && (obj->cur.usemap)))) + { + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1)) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + evas_object_clip_across_check(obj); +} + +EAPI Evas_Object * +evas_object_clip_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + return obj->cur.clipper; +} + +EAPI void +evas_object_clip_unset(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!obj->cur.clipper) return; + /* unclip */ + if (evas_object_intercept_call_clip_unset(obj)) return; + if (obj->smart.smart) + { + if (obj->smart.smart->smart_class->clip_unset) + obj->smart.smart->smart_class->clip_unset(obj); + } + if (obj->cur.clipper) + { + obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj); + if (!obj->cur.clipper->clip.clipees) + { + obj->cur.clipper->cur.have_clipees = 0; + if (obj->cur.clipper->cur.visible) + evas_damage_rectangle_add(obj->cur.clipper->layer->evas, + obj->cur.clipper->cur.geometry.x, + obj->cur.clipper->cur.geometry.y, + obj->cur.clipper->cur.geometry.w, + obj->cur.clipper->cur.geometry.h); + } + evas_object_change(obj->cur.clipper); + } + obj->cur.clipper = NULL; + evas_object_change(obj); + evas_object_clip_dirty(obj); + evas_object_recalc_clippees(obj); + if ((!obj->smart.smart) && + (!((obj->cur.map) && (obj->cur.usemap)))) + { + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1)) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + evas_object_clip_across_check(obj); +} + +EAPI const Eina_List * +evas_object_clipees_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + return obj->clip.clipees; +} diff --git a/libraries/evas/src/lib/canvas/evas_data.c b/libraries/evas/src/lib/canvas/evas_data.c new file mode 100644 index 0000000..3ac9d63 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_data.c @@ -0,0 +1,72 @@ +#include "evas_common.h" +#include "evas_private.h" + + +EAPI void +evas_object_data_set(Evas_Object *obj, const char *key, const void *data) +{ + Evas_Data_Node *node; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!key) return; + + evas_object_data_del(obj, key); + if (!data) return; + node = malloc(sizeof(Evas_Data_Node) + strlen(key) + 1); + node->key = (char *)node + sizeof(Evas_Data_Node); + strcpy(node->key, key); + node->data = (void *)data; + obj->data.elements = eina_list_prepend(obj->data.elements, node); +} + +EAPI void * +evas_object_data_get(const Evas_Object *obj, const char *key) +{ + Eina_List *l; + Evas_Data_Node *node; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!key) return NULL; + + EINA_LIST_FOREACH(obj->data.elements, l, node) + { + if (!strcmp(node->key, key)) + { + Eina_List *lst; + lst = obj->data.elements; + lst = eina_list_promote_list(lst, l); + ((Evas_Object *)obj)->data.elements = lst; + return node->data; + } + } + return NULL; +} + +EAPI void * +evas_object_data_del(Evas_Object *obj, const char *key) +{ + Eina_List *l; + Evas_Data_Node *node; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!key) return NULL; + EINA_LIST_FOREACH(obj->data.elements, l, node) + { + if (!strcmp(node->key, key)) + { + void *data; + + data = node->data; + obj->data.elements = eina_list_remove_list(obj->data.elements, l); + free(node); + return data; + } + } + return NULL; +} diff --git a/libraries/evas/src/lib/canvas/evas_events.c b/libraries/evas/src/lib/canvas/evas_events.c new file mode 100644 index 0000000..99ecf8c --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_events.c @@ -0,0 +1,1602 @@ +#include "evas_common.h" +#include "evas_private.h" + +static void +_evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_Bool mouse_grabbed) +{ + if (obj->smart.parent) + _evas_event_havemap_adjust(obj->smart.parent, x, y, mouse_grabbed); + + if ((!obj->cur.usemap) || (!obj->cur.map) || (!obj->cur.map->count == 4)) + return; + + evas_map_coords_get(obj->cur.map, *x, *y, x, y, mouse_grabbed); + *x += obj->cur.geometry.x; + *y += obj->cur.geometry.y; +} + +static Eina_List * +_evas_event_object_list_in_get(Evas *e, Eina_List *in, + const Eina_Inlist *list, Evas_Object *stop, + int x, int y, int *no_rep) +{ + Evas_Object *obj; + if (!list) return in; + EINA_INLIST_REVERSE_FOREACH(list, obj) + { + if (obj == stop) + { + *no_rep = 1; + return in; + } + if (evas_event_passes_through(obj)) continue; + if ((obj->cur.visible) && (obj->delete_me == 0) && + (!obj->clip.clipees) && + (evas_object_clippers_is_visible(obj))) + { + if (obj->smart.smart) + { + int norep = 0; + int inside; + + if (((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4))) + { + inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); + if (inside) + { + if (!evas_map_coords_get(obj->cur.map, x, y, + &(obj->cur.map->mx), + &(obj->cur.map->my), 0)) + { + inside = 0; + } + else + { + in = _evas_event_object_list_in_get + (e, in, + evas_object_smart_members_get_direct(obj), + stop, + obj->cur.geometry.x + obj->cur.map->mx, + obj->cur.geometry.y + obj->cur.map->my, &norep); + } + } + } + else + { + in = _evas_event_object_list_in_get + (e, in, evas_object_smart_members_get_direct(obj), + stop, x, y, &norep); + } + if (norep) + { + if (!obj->repeat_events) *no_rep = 1; + return in; + } + } + else + { + int inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); + + if (((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4))) + { + if ((inside) && (!evas_map_coords_get(obj->cur.map, x, y, + &(obj->cur.map->mx), + &(obj->cur.map->my), 0))) + { + inside = 0; + } + } + + if (inside && ((!obj->precise_is_inside) || + (evas_object_is_inside(obj, x, y)))) + { + if (!evas_event_freezes_through(obj)) + in = eina_list_append(in, obj); + if (!obj->repeat_events) + { + *no_rep = 1; + return in; + } + } + } + } + } + *no_rep = 0; + return in; +} + +Eina_List * +evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y) +{ + Evas_Layer *lay; + Eina_List *in = NULL; + + if ((!e->layers) || (e->events_frozen > 0)) return NULL; + EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay) + { + int norep = 0; + in = _evas_event_object_list_in_get(e, in, + EINA_INLIST_GET(lay->objects), + stop, x, y, &norep); + if (norep) return in; + } + return in; +} + +static Eina_List * +evas_event_list_copy(Eina_List *list) +{ + Eina_List *l, *new_l = NULL; + const void *data; + + EINA_LIST_FOREACH(list, l, data) + new_l = eina_list_append(new_l, data); + return new_l; +} +/* public functions */ + +EAPI void +evas_event_freeze(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + e->events_frozen++; +} + +EAPI void +evas_event_thaw(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + e->events_frozen--; + if (e->events_frozen == 0) + { + Evas_Layer *lay; + + EINA_INLIST_FOREACH((EINA_INLIST_GET(e->layers)), lay) + { + Evas_Object *obj; + + EINA_INLIST_FOREACH(lay->objects, obj) + { + evas_object_clip_recalc(obj); + evas_object_recalc_clippees(obj); + } + } + } + if (e->events_frozen < 0) + evas_debug_generic(" Thaw of events when already thawed!!!\n"); +} + +EAPI int +evas_event_freeze_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + return e->events_frozen; +} + +EAPI void +evas_event_thaw_eval(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + if (e->events_frozen != 0) return; + + evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, + e->last_timestamp, NULL); +} + +EAPI void +evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) +{ + Eina_List *l, *copy; + Evas_Event_Mouse_Down ev; + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if ((b < 1) || (b > 32)) return; + + e->pointer.button |= (1 << (b - 1)); + + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + + _evas_object_event_new(); + + ev.button = b; + ev.output.x = e->pointer.x; + ev.output.y = e->pointer.y; + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.flags = flags; + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + _evas_walk(e); + /* append new touch point to the touch point list */ + _evas_touch_point_append(e, 0, e->pointer.x, e->pointer.y); + /* If this is the first finger down, i.e no other fingers pressed, + * get a new event list, otherwise, keep the current grabbed list. */ + if (e->pointer.mouse_grabbed == 0) + { + Eina_List *ins = evas_event_objects_event_list(e, + NULL, + e->pointer.x, + e->pointer.y); + /* free our old list of ins */ + e->pointer.object.in = eina_list_free(e->pointer.object.in); + /* and set up the new one */ + e->pointer.object.in = ins; + } + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) + { + obj->mouse_grabbed++; + e->pointer.mouse_grabbed++; + } + } + EINA_LIST_FOREACH(copy, l, obj) + { + if (obj->delete_me) continue; + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); + + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev); + if (e->delete_me) break; + } + if (copy) eina_list_free(copy); + e->last_mouse_down_counter++; + _evas_post_event_callback_call(e); + /* update touch point's state to EVAS_TOUCH_POINT_STILL */ + _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_STILL); + _evas_unwalk(e); +} + +static int +_post_up_handle(Evas *e, unsigned int timestamp, const void *data) +{ + Eina_List *l, *copy, *ins, *ll; + Evas_Event_Mouse_Out ev; + Evas_Object *obj; + int post_called = 0; + + _evas_object_event_new(); + + ev.buttons = e->pointer.button; + ev.output.x = e->pointer.x; + ev.output.y = e->pointer.y; + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + /* get new list of ins */ + ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y); + /* go thru old list of in objects */ + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, ll, obj) + { + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); + if ((!eina_list_data_find(ins, obj)) || + (!e->pointer.inside)) + { + if (obj->mouse_in) + { + obj->mouse_in = 0; + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); + } + } + if (e->delete_me) break; + } + _evas_post_event_callback_call(e); + + if (copy) copy = eina_list_free(copy); + if (e->pointer.inside) + { + Evas_Event_Mouse_In ev_in; + Evas_Object *obj_itr; + + _evas_object_event_new(); + + ev_in.buttons = e->pointer.button; + ev_in.output.x = e->pointer.x; + ev_in.output.y = e->pointer.y; + ev_in.canvas.x = e->pointer.x; + ev_in.canvas.y = e->pointer.y; + ev_in.data = (void *)data; + ev_in.modifiers = &(e->modifiers); + ev_in.locks = &(e->locks); + ev_in.timestamp = timestamp; + ev_in.event_flags = EVAS_EVENT_FLAG_NONE; + + EINA_LIST_FOREACH(ins, l, obj_itr) + { + ev_in.canvas.x = e->pointer.x; + ev_in.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj_itr, &ev_in.canvas.x, &ev_in.canvas.y, obj_itr->mouse_grabbed); + if (!eina_list_data_find(e->pointer.object.in, obj_itr)) + { + if (!obj_itr->mouse_in) + { + obj_itr->mouse_in = 1; + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in); + } + } + if (e->delete_me) break; + } + post_called = 1; + _evas_post_event_callback_call(e); + } + else + { + ins = eina_list_free(ins); + } + + if (e->pointer.mouse_grabbed == 0) + { + /* free our old list of ins */ + eina_list_free(e->pointer.object.in); + /* and set up the new one */ + e->pointer.object.in = ins; + } + else + { + /* free our cur ins */ + eina_list_free(ins); + } + if (e->pointer.inside) + evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data); + return post_called; +} + +EAPI void +evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) +{ + Eina_List *l, *copy; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if ((b < 1) || (b > 32)) return; + + e->pointer.button &= ~(1 << (b - 1)); + + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + + { + Evas_Event_Mouse_Up ev; + Evas_Object *obj; + + _evas_object_event_new(); + + ev.button = b; + ev.output.x = e->pointer.x; + ev.output.y = e->pointer.y; + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.flags = flags; + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + _evas_walk(e); + /* update released touch point */ + _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_UP); + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); + if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) && + (obj->mouse_grabbed > 0)) + { + obj->mouse_grabbed--; + e->pointer.mouse_grabbed--; + } + if (!obj->delete_me) + { + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev); + } + if (e->delete_me) break; + } + if (copy) copy = eina_list_free(copy); + e->last_mouse_up_counter++; + _evas_post_event_callback_call(e); + } + + if (e->pointer.mouse_grabbed == 0) + { + _post_up_handle(e, timestamp, data); + } + + if (e->pointer.mouse_grabbed < 0) + { + ERR("BUG? e->pointer.mouse_grabbed (=%d) < 0!", + e->pointer.mouse_grabbed); + } + /* remove released touch point from the touch point list */ + _evas_touch_point_remove(e, 0); + + _evas_unwalk(e); +} + +EAPI void +evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data) +{ + int i; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (e->events_frozen > 0) return; + + _evas_walk(e); + for (i = 0; i < 32; i++) + { + if ((e->pointer.button & (1 << i))) + evas_event_feed_mouse_up(e, i + 1, 0, timestamp, data); + } + _evas_unwalk(e); +} + +EAPI void +evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestamp, const void *data) +{ + Eina_List *l, *copy; + Evas_Event_Mouse_Wheel ev; + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + + _evas_object_event_new(); + + ev.direction = direction; + ev.z = z; + ev.output.x = e->pointer.x; + ev.output.y = e->pointer.y; + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + ev.data = (void *) data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + _evas_walk(e); + copy = evas_event_list_copy(e->pointer.object.in); + + EINA_LIST_FOREACH(copy, l, obj) + { + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); + if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev); + if (e->delete_me) break; + } + if (copy) copy = eina_list_free(copy); + _evas_post_event_callback_call(e); + + _evas_unwalk(e); +} + +EAPI void +evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const void *data) +{ + int px, py; +//// Evas_Coord pcx, pcy; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + px = e->pointer.x; + py = e->pointer.y; +//// pcx = e->pointer.canvas_x; +//// pcy = e->pointer.canvas_y; + + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + + e->pointer.x = x; + e->pointer.y = y; +//// e->pointer.canvas_x = x; +//// e->pointer.canvas_y = y; +//// e->pointer.canvas_x = evas_coord_screen_x_to_world(e, x); +//// e->pointer.canvas_y = evas_coord_screen_y_to_world(e, y); + if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return; + _evas_walk(e); + /* update moved touch point */ + if ((px != x) || (py != y)) + _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_MOVE); + /* if our mouse button is grabbed to any objects */ + if (e->pointer.mouse_grabbed > 0) + { + /* go thru old list of in objects */ + Eina_List *outs = NULL; + Eina_List *l, *copy; + + { + Evas_Event_Mouse_Move ev; + Evas_Object *obj; + + _evas_object_event_new(); + + ev.buttons = e->pointer.button; + ev.cur.output.x = e->pointer.x; + ev.cur.output.y = e->pointer.y; + ev.cur.canvas.x = e->pointer.x; + ev.cur.canvas.y = e->pointer.y; + ev.prev.output.x = px; + ev.prev.output.y = py; + ev.prev.canvas.x = px; + ev.prev.canvas.y = py; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + ev.cur.canvas.x = e->pointer.x; + ev.cur.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, + &ev.cur.canvas.y, + obj->mouse_grabbed); + if ((e->events_frozen <= 0) && + (evas_object_clippers_is_visible(obj) || + obj->mouse_grabbed) && + (!evas_event_passes_through(obj)) && + (!evas_event_freezes_through(obj)) && + (!obj->clip.clipees)) + { + if ((px != x) || (py != y)) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev); + } + else + outs = eina_list_append(outs, obj); + if (e->delete_me) break; + } + _evas_post_event_callback_call(e); + } + { + Evas_Event_Mouse_Out ev; + + _evas_object_event_new(); + + ev.buttons = e->pointer.button; + ev.output.x = e->pointer.x; + ev.output.y = e->pointer.y; + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + if (copy) eina_list_free(copy); + while (outs) + { + Evas_Object *obj; + + obj = outs->data; + outs = eina_list_remove(outs, obj); + if ((obj->mouse_grabbed == 0) && (!e->delete_me)) + { + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); + e->pointer.object.in = eina_list_remove(e->pointer.object.in, obj); + if (obj->mouse_in) + { + obj->mouse_in = 0; + if (!obj->delete_me) + { + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); + } + } + } + } + _evas_post_event_callback_call(e); + } + } + else + { + Eina_List *ins; + Eina_List *l, *copy; + Evas_Event_Mouse_Move ev; + Evas_Event_Mouse_Out ev2; + Evas_Event_Mouse_In ev3; + Evas_Object *obj; + + _evas_object_event_new(); + + ev.buttons = e->pointer.button; + ev.cur.output.x = e->pointer.x; + ev.cur.output.y = e->pointer.y; + ev.cur.canvas.x = e->pointer.x; + ev.cur.canvas.y = e->pointer.y; + ev.prev.output.x = px; + ev.prev.output.y = py; + ev.prev.canvas.x = px; + ev.prev.canvas.y = py; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + ev2.buttons = e->pointer.button; + ev2.output.x = e->pointer.x; + ev2.output.y = e->pointer.y; + ev2.canvas.x = e->pointer.x; + ev2.canvas.y = e->pointer.y; + ev2.data = (void *)data; + ev2.modifiers = &(e->modifiers); + ev2.locks = &(e->locks); + ev2.timestamp = timestamp; + ev2.event_flags = EVAS_EVENT_FLAG_NONE; + + ev3.buttons = e->pointer.button; + ev3.output.x = e->pointer.x; + ev3.output.y = e->pointer.y; + ev3.canvas.x = e->pointer.x; + ev3.canvas.y = e->pointer.y; + ev3.data = (void *)data; + ev3.modifiers = &(e->modifiers); + ev3.locks = &(e->locks); + ev3.timestamp = timestamp; + ev3.event_flags = EVAS_EVENT_FLAG_NONE; + + /* get all new in objects */ + ins = evas_event_objects_event_list(e, NULL, x, y); + /* go thru old list of in objects */ + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + /* if its under the pointer and its visible and its in the new */ + /* in list */ + // FIXME: i don't think we need this + // evas_object_clip_recalc(obj); + if ((e->events_frozen <= 0) && + evas_object_is_in_output_rect(obj, x, y, 1, 1) && + (evas_object_clippers_is_visible(obj) || + obj->mouse_grabbed) && + eina_list_data_find(ins, obj) && + (!evas_event_passes_through(obj)) && + (!evas_event_freezes_through(obj)) && + (!obj->clip.clipees) && + ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y)) + ) + { + if ((px != x) || (py != y)) + { + ev.cur.canvas.x = e->pointer.x; + ev.cur.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev); + } + } + /* otherwise it has left the object */ + else + { + if (obj->mouse_in) + { + obj->mouse_in = 0; + ev2.canvas.x = e->pointer.x; + ev2.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2); + } + } + if (e->delete_me) break; + } + _evas_post_event_callback_call(e); + + _evas_object_event_new(); + + if (copy) copy = eina_list_free(copy); + /* go thru our current list of ins */ + EINA_LIST_FOREACH(ins, l, obj) + { + ev3.canvas.x = e->pointer.x; + ev3.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev3.canvas.x, &ev3.canvas.y, obj->mouse_grabbed); + /* if its not in the old list of ins send an enter event */ + if (!eina_list_data_find(e->pointer.object.in, obj)) + { + if (!obj->mouse_in) + { + obj->mouse_in = 1; + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3); + } + } + if (e->delete_me) break; + } + if (e->pointer.mouse_grabbed == 0) + { + /* free our old list of ins */ + eina_list_free(e->pointer.object.in); + /* and set up the new one */ + e->pointer.object.in = ins; + } + else + { + /* free our cur ins */ + eina_list_free(ins); + } + _evas_post_event_callback_call(e); + } + _evas_unwalk(e); +} + +EAPI void +evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) +{ + Eina_List *ins; + Eina_List *l; + Evas_Event_Mouse_In ev; + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + e->pointer.inside = 1; + + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + + if (e->pointer.mouse_grabbed != 0) return; + + _evas_object_event_new(); + + ev.buttons = e->pointer.button; + ev.output.x = e->pointer.x; + ev.output.y = e->pointer.y; + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + _evas_walk(e); + /* get new list of ins */ + ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y); + EINA_LIST_FOREACH(ins, l, obj) + { + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); + if (!eina_list_data_find(e->pointer.object.in, obj)) + { + if (!obj->mouse_in) + { + obj->mouse_in = 1; + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev); + } + } + if (e->delete_me) break; + } + /* free our old list of ins */ + e->pointer.object.in = eina_list_free(e->pointer.object.in); + /* and set up the new one */ + e->pointer.object.in = ins; + _evas_post_event_callback_call(e); + evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data); + _evas_unwalk(e); +} + +EAPI void +evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) +{ + Evas_Event_Mouse_Out ev; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + e->pointer.inside = 0; + + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + + _evas_object_event_new(); + + ev.buttons = e->pointer.button; + ev.output.x = e->pointer.x; + ev.output.y = e->pointer.y; + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + _evas_walk(e); + /* if our mouse button is grabbed to any objects */ + if (e->pointer.mouse_grabbed == 0) + { + /* go thru old list of in objects */ + Eina_List *l, *copy; + Evas_Object *obj; + + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + ev.canvas.x = e->pointer.x; + ev.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); + if (obj->mouse_in) + { + obj->mouse_in = 0; + if (!obj->delete_me) + { + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); + } + } + if (e->delete_me) break; + } + if (copy) copy = eina_list_free(copy); + /* free our old list of ins */ + e->pointer.object.in = eina_list_free(e->pointer.object.in); + _evas_post_event_callback_call(e); + } + _evas_unwalk(e); +} + +EAPI void +evas_event_feed_multi_down(Evas *e, + int d, int x, int y, + double rad, double radx, double rady, + double pres, double ang, + double fx, double fy, + Evas_Button_Flags flags, unsigned int timestamp, + const void *data) +{ + Eina_List *l, *copy; + Evas_Event_Multi_Down ev; + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + + _evas_object_event_new(); + + ev.device = d; + ev.output.x = x; + ev.output.y = y; + ev.canvas.x = x; + ev.canvas.y = y; + ev.radius = rad; + ev.radius_x = radx; + ev.radius_y = rady; + ev.pressure = pres; + ev.angle = ang; + ev.canvas.xsub = fx; + ev.canvas.ysub = fy; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.flags = flags; + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + _evas_walk(e); + /* append new touch point to the touch point list */ + _evas_touch_point_append(e, d, x, y); + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) + { + obj->mouse_grabbed++; + e->pointer.mouse_grabbed++; + } + } + EINA_LIST_FOREACH(copy, l, obj) + { + ev.canvas.x = x; + ev.canvas.y = y; + ev.canvas.xsub = fx; + ev.canvas.ysub = fy; + _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); + if (x != ev.canvas.x) + ev.canvas.xsub = ev.canvas.x; // fixme - lost precision + if (y != ev.canvas.y) + ev.canvas.ysub = ev.canvas.y; // fixme - lost precision + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev); + if (e->delete_me) break; + } + if (copy) eina_list_free(copy); + _evas_post_event_callback_call(e); + /* update touch point's state to EVAS_TOUCH_POINT_STILL */ + _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_STILL); + _evas_unwalk(e); +} + +EAPI void +evas_event_feed_multi_up(Evas *e, + int d, int x, int y, + double rad, double radx, double rady, + double pres, double ang, + double fx, double fy, + Evas_Button_Flags flags, unsigned int timestamp, + const void *data) +{ + Eina_List *l, *copy; + Evas_Event_Multi_Up ev; + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + + _evas_object_event_new(); + + ev.device = d; + ev.output.x = x; + ev.output.y = y; + ev.canvas.x = x; + ev.canvas.y = y; + ev.radius = rad; + ev.radius_x = radx; + ev.radius_y = rady; + ev.pressure = pres; + ev.angle = ang; + ev.canvas.xsub = fx; + ev.canvas.ysub = fy; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.flags = flags; + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + _evas_walk(e); + /* update released touch point */ + _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_UP); + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + ev.canvas.x = x; + ev.canvas.y = y; + ev.canvas.xsub = fx; + ev.canvas.ysub = fy; + _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); + if (x != ev.canvas.x) + ev.canvas.xsub = ev.canvas.x; // fixme - lost precision + if (y != ev.canvas.y) + ev.canvas.ysub = ev.canvas.y; // fixme - lost precision + if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) && + (obj->mouse_grabbed > 0)) + { + obj->mouse_grabbed--; + e->pointer.mouse_grabbed--; + } + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev); + if (e->delete_me) break; + } + if (copy) copy = eina_list_free(copy); + if ((e->pointer.mouse_grabbed == 0) && !_post_up_handle(e, timestamp, data)) + _evas_post_event_callback_call(e); + /* remove released touch point from the touch point list */ + _evas_touch_point_remove(e, d); + _evas_unwalk(e); +} + +EAPI void +evas_event_feed_multi_move(Evas *e, + int d, int x, int y, + double rad, double radx, double rady, + double pres, double ang, + double fx, double fy, + unsigned int timestamp, const void *data) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + + if (!e->pointer.inside) return; + + _evas_walk(e); + /* update moved touch point */ + _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_MOVE); + /* if our mouse button is grabbed to any objects */ + if (e->pointer.mouse_grabbed > 0) + { + /* go thru old list of in objects */ + Eina_List *l, *copy; + Evas_Event_Multi_Move ev; + Evas_Object *obj; + + _evas_object_event_new(); + + ev.device = d; + ev.cur.output.x = x; + ev.cur.output.y = y; + ev.cur.canvas.x = x; + ev.cur.canvas.y = y; + ev.radius = rad; + ev.radius_x = radx; + ev.radius_y = rady; + ev.pressure = pres; + ev.angle = ang; + ev.cur.canvas.xsub = fx; + ev.cur.canvas.ysub = fy; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + if ((e->events_frozen <= 0) && + (evas_object_clippers_is_visible(obj) || obj->mouse_grabbed) && + (!evas_event_passes_through(obj)) && + (!evas_event_freezes_through(obj)) && + (!obj->clip.clipees)) + { + ev.cur.canvas.x = x; + ev.cur.canvas.y = y; + ev.cur.canvas.xsub = fx; + ev.cur.canvas.ysub = fy; + _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); + if (x != ev.cur.canvas.x) + ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision + if (y != ev.cur.canvas.y) + ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev); + } + if (e->delete_me) break; + } + _evas_post_event_callback_call(e); + } + else + { + Eina_List *ins; + Eina_List *l, *copy; + Evas_Event_Multi_Move ev; + Evas_Object *obj; + + _evas_object_event_new(); + + ev.device = d; + ev.cur.output.x = x; + ev.cur.output.y = y; + ev.cur.canvas.x = x; + ev.cur.canvas.y = y; + ev.radius = rad; + ev.radius_x = radx; + ev.radius_y = rady; + ev.pressure = pres; + ev.angle = ang; + ev.cur.canvas.xsub = fx; + ev.cur.canvas.ysub = fy; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + /* get all new in objects */ + ins = evas_event_objects_event_list(e, NULL, x, y); + /* go thru old list of in objects */ + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + /* if its under the pointer and its visible and its in the new */ + /* in list */ + // FIXME: i don't think we need this + // evas_object_clip_recalc(obj); + if ((e->events_frozen <= 0) && + evas_object_is_in_output_rect(obj, x, y, 1, 1) && + (evas_object_clippers_is_visible(obj) || + obj->mouse_grabbed) && + eina_list_data_find(ins, obj) && + (!evas_event_passes_through(obj)) && + (!evas_event_freezes_through(obj)) && + (!obj->clip.clipees) && + ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y)) + ) + { + ev.cur.canvas.x = x; + ev.cur.canvas.y = y; + ev.cur.canvas.xsub = fx; + ev.cur.canvas.ysub = fy; + _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); + if (x != ev.cur.canvas.x) + ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision + if (y != ev.cur.canvas.y) + ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev); + } + if (e->delete_me) break; + } + if (copy) copy = eina_list_free(copy); + if (e->pointer.mouse_grabbed == 0) + { + /* free our old list of ins */ + eina_list_free(e->pointer.object.in); + /* and set up the new one */ + e->pointer.object.in = ins; + } + else + { + /* free our cur ins */ + eina_list_free(ins); + } + _evas_post_event_callback_call(e); + } + _evas_unwalk(e); +} + +EAPI void +evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (!keyname) return; + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + _evas_walk(e); + + Evas_Event_Key_Down ev; + Eina_Bool exclusive; + + _evas_object_event_new(); + + exclusive = EINA_FALSE; + ev.keyname = (char *)keyname; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.key = key; + ev.string = string; + ev.compose = compose; + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + if (e->grabs) + { + Eina_List *l; + Evas_Key_Grab *g; + + e->walking_grabs++; + EINA_LIST_FOREACH(e->grabs, l, g) + { + if (g->just_added) + { + g->just_added = EINA_FALSE; + continue; + } + if (g->delete_me) continue; + if (((e->modifiers.mask & g->modifiers) || + (g->modifiers == e->modifiers.mask)) && + (!strcmp(keyname, g->keyname))) + { + if (!(e->modifiers.mask & g->not_modifiers)) + { + if (e->events_frozen <= 0 && + !evas_event_freezes_through(g->object)) + evas_object_event_callback_call(g->object, + EVAS_CALLBACK_KEY_DOWN, + &ev); + if (g->exclusive) exclusive = EINA_TRUE; + } + } + if (e->delete_me) break; + } + e->walking_grabs--; + if (e->walking_grabs <= 0) + { + while (e->delete_grabs > 0) + { + e->delete_grabs--; + for (l = e->grabs; l;) + { + g = eina_list_data_get(l); + l = eina_list_next(l); + if (g->delete_me) + evas_key_grab_free(g->object, g->keyname, g->modifiers, + g->not_modifiers); + } + } + } + } + if ((e->focused) && (!exclusive)) + { + if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) + evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_DOWN, + &ev); + } + _evas_post_event_callback_call(e); + _evas_unwalk(e); +} + +EAPI void +evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + if (!keyname) return; + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + _evas_walk(e); + + Evas_Event_Key_Up ev; + Eina_Bool exclusive; + + _evas_object_event_new(); + + exclusive = EINA_FALSE; + ev.keyname = (char *)keyname; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.key = key; + ev.string = string; + ev.compose = compose; + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + if (e->grabs) + { + Eina_List *l; + Evas_Key_Grab *g; + + e->walking_grabs++; + EINA_LIST_FOREACH(e->grabs, l, g) + { + if (g->just_added) + { + g->just_added = EINA_FALSE; + continue; + } + if (g->delete_me) continue; + if (((e->modifiers.mask & g->modifiers) || + (g->modifiers == e->modifiers.mask)) && + (!((e->modifiers.mask & g->not_modifiers) || + (g->not_modifiers == ~e->modifiers.mask))) && + (!strcmp(keyname, g->keyname))) + { + if (e->events_frozen <= 0 && + !evas_event_freezes_through(g->object)) + evas_object_event_callback_call(g->object, + EVAS_CALLBACK_KEY_UP, &ev); + if (g->exclusive) exclusive = EINA_TRUE; + } + if (e->delete_me) break; + } + e->walking_grabs--; + if (e->walking_grabs <= 0) + { + while (e->delete_grabs > 0) + { + Eina_List *ll, *l_next; + Evas_Key_Grab *gr; + + e->delete_grabs--; + EINA_LIST_FOREACH_SAFE(e->grabs, ll, l_next, gr) + { + if (gr->delete_me) + evas_key_grab_free(gr->object, gr->keyname, + gr->modifiers, gr->not_modifiers); + } + } + } + } + if ((e->focused) && (!exclusive)) + { + if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) + evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_UP, + &ev); + } + _evas_post_event_callback_call(e); + _evas_unwalk(e); +} + +EAPI void +evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data) +{ + Eina_List *l, *copy; + Evas_Event_Hold ev; + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (e->events_frozen > 0) return; + e->last_timestamp = timestamp; + + _evas_object_event_new(); + + ev.hold = hold; + ev.data = (void *)data; + ev.timestamp = timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + + _evas_walk(e); + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) + evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev); + if (e->delete_me) break; + } + if (copy) copy = eina_list_free(copy); + _evas_post_event_callback_call(e); + _evas_unwalk(e); + _evas_object_event_new(); +} + +EAPI void +evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool freeze) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + + freeze = !!freeze; + if (obj->freeze_events == freeze) return; + obj->freeze_events = freeze; + evas_object_smart_member_cache_invalidate(obj, EINA_FALSE, EINA_TRUE); + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1) && + ((!obj->precise_is_inside) || + (evas_object_is_inside(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y)))) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); +} + +EAPI Eina_Bool +evas_object_freeze_events_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + return obj->freeze_events; +} + +EAPI void +evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + pass = !!pass; + if (obj->pass_events == pass) return; + obj->pass_events = pass; + evas_object_smart_member_cache_invalidate(obj, EINA_TRUE, EINA_FALSE); + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1) && + ((!obj->precise_is_inside) || + (evas_object_is_inside(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y)))) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); +} + +EAPI Eina_Bool +evas_object_pass_events_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + return obj->pass_events; +} + +EAPI void +evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + repeat = !!repeat; + if (obj->repeat_events == repeat) return; + obj->repeat_events = repeat; + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1) && + ((!obj->precise_is_inside) || + (evas_object_is_inside(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y)))) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); +} + +EAPI Eina_Bool +evas_object_repeat_events_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + return obj->repeat_events; +} + +EAPI void +evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + obj->no_propagate = !prop; +} + +EAPI Eina_Bool +evas_object_propagate_events_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + return !(obj->no_propagate); +} + +EAPI void +evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + obj->pointer_mode = setting; +} + +EAPI Evas_Object_Pointer_Mode +evas_object_pointer_mode_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EVAS_OBJECT_POINTER_MODE_AUTOGRAB; + MAGIC_CHECK_END(); + return obj->pointer_mode; +} + +EAPI void +evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type) +{ + switch(event_type) + { + case EVAS_CALLBACK_MOUSE_IN: + { + Evas_Event_Mouse_In *ev = event_copy; + evas_event_feed_mouse_in(e, ev->timestamp, ev->data); + break; + } + case EVAS_CALLBACK_MOUSE_OUT: + { + Evas_Event_Mouse_Out *ev = event_copy; + evas_event_feed_mouse_out(e, ev->timestamp, ev->data); + break; + } + case EVAS_CALLBACK_MOUSE_DOWN: + { + Evas_Event_Mouse_Down *ev = event_copy; + evas_event_feed_mouse_down(e, ev->button, ev->flags, ev-> timestamp, ev->data); + break; + } + case EVAS_CALLBACK_MOUSE_UP: + { + Evas_Event_Mouse_Up *ev = event_copy; + evas_event_feed_mouse_up(e, ev->button, ev->flags, ev-> timestamp, ev->data); + break; + } + case EVAS_CALLBACK_MOUSE_MOVE: + { + Evas_Event_Mouse_Move *ev = event_copy; + evas_event_feed_mouse_move(e, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp, ev->data); + break; + } + case EVAS_CALLBACK_MOUSE_WHEEL: + { + Evas_Event_Mouse_Wheel *ev = event_copy; + evas_event_feed_mouse_wheel(e, ev->direction, ev-> z, ev->timestamp, ev->data); + break; + } + case EVAS_CALLBACK_MULTI_DOWN: + { + Evas_Event_Multi_Down *ev = event_copy; + evas_event_feed_multi_down(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); + break; + } + case EVAS_CALLBACK_MULTI_UP: + { + Evas_Event_Multi_Up *ev = event_copy; + evas_event_feed_multi_up(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); + break; + } + case EVAS_CALLBACK_MULTI_MOVE: + { + Evas_Event_Multi_Move *ev = event_copy; + evas_event_feed_multi_move(e, ev->device, ev->cur.canvas.x, ev->cur.canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->cur.canvas.xsub, ev->cur.canvas.ysub, ev->timestamp, ev->data); + break; + } + case EVAS_CALLBACK_KEY_DOWN: + { + Evas_Event_Key_Down *ev = event_copy; + evas_event_feed_key_down(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); + break; + } + case EVAS_CALLBACK_KEY_UP: + { + Evas_Event_Key_Up *ev = event_copy; + evas_event_feed_key_up(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); + break; + } + default: /* All non-input events are not handeled */ + break; + } +} diff --git a/libraries/evas/src/lib/canvas/evas_filter.c b/libraries/evas/src/lib/canvas/evas_filter.c new file mode 100644 index 0000000..6194ec2 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_filter.c @@ -0,0 +1,1427 @@ +/* + * Filter implementation for evas + */ + +#if 0 // filtering disabled +typedef enum +{ + /** Apply any filter effects to this object (Default) */ + EVAS_FILTER_MODE_OBJECT, + /** Filter all objects beneath this object on the canvas */ + EVAS_FILTER_MODE_BELOW, +} Evas_Filter_Mode; +typedef enum +{ + /** No filter: Default */ + EVAS_FILTER_NONE, + /** A blur filter. Params are quality (float), and radius (int). */ + EVAS_FILTER_BLUR, + /** Negates the colors of an image. Also called solarize */ + EVAS_FILTER_INVERT, + EVAS_FILTER_SOLARIZE = EVAS_FILTER_INVERT, + /** Makes a sepia version of the image. */ + EVAS_FILTER_SEPIA, + /** Makes a greyscale version of the image. Params are 'red', + * 'green', 'blue' (all floats) which must add to 1. The defaults are + * 0.3, 0.59 and 0.11 which approximates human vision. Setting 'all' + * sets rgb to the same value. */ + EVAS_FILTER_GREYSCALE, + EVAS_FILTER_GRAYSCALE = EVAS_FILTER_GREYSCALE, + /** Brighten (or darken) image. Param 'adjust' float (-1.0 to 1.0) + * amount to adjust. */ + EVAS_FILTER_BRIGHTNESS, + /** Enhance contrast on image. Param 'adjust' float (-1.0 to 1.0) + * amount to adjust. */ + EVAS_FILTER_CONTRAST, + + EVAS_FILTER_LAST = EVAS_FILTER_CONTRAST +} Evas_Filter; + +/** + * Set the filter mode for an object. + * + * There are two valid filtering modes currently: + * - EVAS_FILTER_MODE_OBJECT: which applies the filter to the object itself + * - EVAS_FILTER_MODE_BELOW: which makes the object invisible and filters + * what is below the object. + * + * The default filter mode is EVAS_FILTER_MODE_OBJECT. + * + * @param o Object to set filter mode on. + * @param mode Mode to set. + * @return EINA_TRUE on success, EINA_FALSE otherwise. + */ + EAPI Eina_Bool evas_object_filter_mode_set (Evas_Object *o, Evas_Filter_Mode mode); + +/** + * Get the current filtering mode for an object. + * + * By default all objects are in object filtering mode, even if no filter is + * set. + * + * @param o Object to get filter mode of. + * @return Filter mode (default EVAS_FILTER_MODE_OBJECT) + */ + EAPI Evas_Filter_Mode evas_object_filter_mode_get (Evas_Object *o); + +/** + * Set the current filter type. + * + * This sets the filter type, whether a blur, color filter or some other type + * of filter. This is normally the only filter call necessary, although some + * filters require additional parameters. + * + * If the object has a filter already, and existing parameters will be + * cleared. + * + * Setting the blur to EVAS_FILTER_NONE removes any filter. + * + * @param o Object to set the filter on. + * @param filter Filter to set. + * @return EINA_TRUE On success + */ + EAPI Eina_Bool evas_object_filter_set (Evas_Object *o, Evas_Filter filter); + +/** + * Get the current filter. + * + * @param o Object to get filter of. + * @return The filter if set, or EVAS_FILTER_NONE. + */ + EAPI Evas_Filter evas_object_filter_get (Evas_Object *o); + +/** + * Set an integer parameter of a filter. + * + * This sets an integer parameter of a filter, if such parameter is known to + * the filter. Note that some parameters may actually set multiple fields. + * The individual filters define the specific parameters available. + * + * It should be noted that filter parameters are lost after the filter type + * changes, so set the filter type, then the parameters. + * + * @param o Object to set parameter on. + * @param param Name of parameter to set. + * @param val Value to set. + * @return EINA_TRUE if at least one parameter was set, EINA_FALSE + * otherwise. + */ + EAPI Eina_Bool evas_object_filter_param_int_set (Evas_Object *o, const char *param, int val); + +/** + * Get an integer value parameter from a filter. + * + * Gets the first matching parameter for a filter. Note there is no way to + * later fields if they do not have their own accessor name. + * + * Also note that there is no way to tell the difference between a -1 as a + * value, and the error code. Ask your filter writer to use a different + * range. + * + * @param o The object. + * @Param param Name of the parameter to get. + * @return The value, or -1 on error. + */ + EAPI int evas_object_filter_param_int_get (Evas_Object *o, const char *param); + +/** + * Set a string parameter on a filter + * + * Currently unimplemented as no filters use this yet + */ + EAPI Eina_Bool evas_object_filter_param_str_set (Evas_Object *o, const char *param, const char *val); + +/** + * Get a string parameter from a filter + * + * Currently unimplemented as no filters use this yet + */ + EAPI const char *evas_object_filter_param_str_get (Evas_Object *o, const char *param); + +/** + * Set an object parameter on a filter + * + * Currently unimplemented as no filters use this yet + */ + EAPI Eina_Bool evas_object_filter_param_obj_set (Evas_Object *o, const char *param, Evas_Object *val); + +/** + * get an object parameter from a filter + * + * Currently unimplemented as no filters use this yet + */ + EAPI Evas_Object *evas_object_filter_param_obj_get (Evas_Object *o, const char *param); + +/** + * Set a float parameter of a filter. + * + * This is the same as evas_object_filter_param_int_set(), but for floating + * point values. + * + * @param o Object to set value on. + * @param param Name of the parameter to set. + * @param EINA_TRUE if at least one parameter was set, EINA_FALSE otherwise. + */ + EAPI Eina_Bool evas_object_filter_param_float_set(Evas_Object *o, const char *param, double val); + +/** + * Get a float parameter of a filter. + * + * This is the same as evas_object_filter_param_int_get(), but for floating + * point values. + * + * @param o Object to set value on. + * @param param Name of the parameter to set. + * @return The value, or -1 on error. + */ + EAPI double evas_object_filter_param_float_get(Evas_Object *o, const char *param); + +#include // offsetof + +#include "evas_common.h" +#include "evas_private.h" + +#include +/* disable neon - even after fixes: + * Error: ARM register expected -- vdup.u32 q14,$0xff000000' + * not going to fix now +#ifdef BUILD_NEON +# define BUILD_NEON0 1 +#else +# define BUILD_NEON0 0 +#endif +*/ + +#define BUILD_NEON0 0 + +typedef struct Evas_Filter_Info_Blur +{ + double quality; + int radius; +} Evas_Filter_Info_Blur; + +typedef struct Evas_Filter_Info_GreyScale +{ + double r,g,b; +} Evas_Filter_Info_GreyScale; + +typedef struct Evas_Filter_Info_Brightness +{ + double adjust; +} Evas_Filter_Info_Brightness; + +typedef struct Evas_Filter_Info_Contrast +{ + double adjust; +} Evas_Filter_Info_Contrast; + +typedef int (*Filter_Size_FN)(Evas_Filter_Info *,int,int,int*,int*,Eina_Bool); +typedef uint8_t *(*Key_FN)(const Evas_Filter_Info *, uint32_t *); + +struct fieldinfo +{ + const char *field; + int type; + size_t offset; +}; + +struct filterinfo +{ + Evas_Software_Filter_Fn filter; + const size_t datasize; + Filter_Size_FN sizefn; + Key_FN keyfn; + Eina_Bool alwaysalpha; +}; + +enum +{ + TYPE_INT, + TYPE_FLOAT +}; + +static int blur_size_get(Evas_Filter_Info*, int, int, int *, int *, Eina_Bool); +static uint8_t *gaussian_key_get(const Evas_Filter_Info *, uint32_t *); + +static Eina_Bool gaussian_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*); +static Eina_Bool negation_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*); +static Eina_Bool sepia_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*); +static Eina_Bool greyscale_filter(Evas_Filter_Info*, RGBA_Image*, RGBA_Image*); +static Eina_Bool brightness_filter(Evas_Filter_Info*, RGBA_Image*, RGBA_Image*); +static Eina_Bool contrast_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*); + +struct filterinfo filterinfo[] = +{ + /* None */ + { NULL, 0, NULL, NULL, EINA_FALSE}, + /* Blur */ + { gaussian_filter, sizeof(Evas_Filter_Info_Blur), blur_size_get, gaussian_key_get, EINA_TRUE }, + /* Negation */ + { negation_filter, 0, NULL, NULL, EINA_FALSE }, + /* Sepia */ + { sepia_filter, 0, NULL, NULL, EINA_FALSE }, + /* Greyscale */ + { greyscale_filter, sizeof(Evas_Filter_Info_GreyScale), NULL, NULL, EINA_FALSE }, + /* Brightness */ + { brightness_filter, sizeof(Evas_Filter_Info_Brightness), NULL, NULL, EINA_FALSE }, + /* Contrast */ + { contrast_filter, sizeof(Evas_Filter_Info_Contrast), NULL, NULL, EINA_FALSE}, +}; + + +static struct fieldinfo blurfields[] = +{ + { "quality", TYPE_FLOAT, offsetof(Evas_Filter_Info_Blur, quality) }, + { "radius", TYPE_INT, offsetof(Evas_Filter_Info_Blur, radius) }, + { NULL, 0, 0 }, +}; + +static struct fieldinfo greyfields[] = +{ + { "red", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, r) }, + { "green", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, g) }, + { "blue", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, b) }, + + { "all", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, r) }, + { "all", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, g) }, + { "all", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, b) }, + { NULL, 0, 0 }, +}; + +static struct fieldinfo brightnessfields[] = +{ + { "adjust", TYPE_FLOAT, offsetof(Evas_Filter_Info_Brightness, adjust) }, + { NULL, 0, 0 }, +}; + +static struct fieldinfo contrastfields[] = +{ + { "adjust", TYPE_FLOAT, offsetof(Evas_Filter_Info_Contrast, adjust) }, + { NULL, 0, 0 }, +}; + +static struct fieldinfo *filterfields[] = +{ + NULL, + blurfields, + NULL, + NULL, + greyfields, + brightnessfields, + contrastfields, +}; + +static Evas_Filter_Info *filter_alloc(Evas_Object *o); + +EAPI Eina_Bool +evas_object_filter_mode_set(Evas_Object *o, Evas_Filter_Mode mode) +{ + Evas_Filter_Info *info; + + MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + + if ((mode != EVAS_FILTER_MODE_OBJECT) && (mode != EVAS_FILTER_MODE_BELOW)) + return EINA_FALSE; + + if (!o->filter) + { + filter_alloc(o); + } + if (!o->filter) return EINA_FALSE; + info = o->filter; + + if (info->mode == mode) return EINA_TRUE; /* easy case */ + info->mode = mode; + info->dirty = 1; + return EINA_TRUE; +} + +EAPI Evas_Filter_Mode +evas_object_filter_mode_get(Evas_Object *o) +{ + MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); + return EVAS_FILTER_MODE_OBJECT; + MAGIC_CHECK_END(); + + if (!o->filter) return EVAS_FILTER_MODE_OBJECT; + return o->filter->mode; +} + +EAPI Eina_Bool +evas_object_filter_set(Evas_Object *o, Evas_Filter filter) +{ + Evas_Filter_Info *info; + struct filterinfo *finfo; + + MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + + /* force filter to be signed: else gcc complains, but enums may always be + * signed */ + if (((int)filter < (int)EVAS_FILTER_NONE) || (filter > EVAS_FILTER_LAST)) + return EINA_FALSE; + + /* Don't alloc on no-op */ + if (!o-filter && filter == EVAS_FILTER_NONE) return EINA_TRUE; + + if (!o->filter) filter_alloc(o); + if (!o->filter) return EINA_FALSE; + + info = o->filter; + + if (info->filter == filter) return EINA_TRUE; + + finfo = filterinfo + filter; + info->filter = filter; + info->dirty = 1; + if (info->data) + { + if (info->data_free) + info->data_free(info->data); + else + free(info->data); + } + info->datalen = finfo->datasize; + if (finfo->datasize) + { + info->data = calloc(1, finfo->datasize); + if (!info->data) + { + o->filter = EVAS_FILTER_NONE; + return EINA_FALSE; + } + } + else + info->data = NULL; + info->data_free = NULL; + + return EINA_TRUE; +} + +EAPI Evas_Filter +evas_object_filter_get(Evas_Object *o) +{ + MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); + return EVAS_FILTER_NONE; + MAGIC_CHECK_END(); + + if (!o->filter) return EVAS_FILTER_NONE; + return o->filter->filter; +} + +EAPI Eina_Bool +evas_object_filter_param_int_set(Evas_Object *o, const char *param, int val) +{ + char *data; + const struct fieldinfo *fields; + Eina_Bool found; + int i; + + MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + + if ((!o->filter) || (!o->filter->data)) return EINA_FALSE; + + fields = filterfields[o->filter->filter]; + data = o->filter->data; + found = EINA_FALSE; + for (i = 0; fields[i].field; i++) + { + if (!strcmp(fields[i].field, param)) + { + if (fields[i].type != TYPE_INT) continue; + *(int *)(data + fields[i].offset) = val; + o->filter->dirty = 1; + evas_object_change(o); + found = EINA_TRUE; + } + } + return found; +} + +EAPI int +evas_object_filter_param_int_get(Evas_Object *o, const char *param) +{ + char *data; + const struct fieldinfo *fields; + int val; + int i; + + MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); + return -1; + MAGIC_CHECK_END(); + + if ((!o->filter) || (!o->filter->data)) return -1; + + fields = filterfields[o->filter->filter]; + if (!fields) return -1; + data = o->filter->data; + + for (i = 0; fields[i].field; i++) + { + if (!strcmp(fields[i].field, param)) + { + if (fields[i].type != TYPE_INT) continue; + val = *(int *)(data + fields[i].offset); + return val; + } + } + return -1; +} + +EAPI Eina_Bool +evas_object_filter_param_str_set(Evas_Object *o __UNUSED__, + const char *param __UNUSED__, + const char *val __UNUSED__) +{ + return EINA_FALSE; +} + +EAPI const char * +evas_object_filter_param_str_get(Evas_Object *o __UNUSED__, + const char *param __UNUSED__) +{ + return NULL; +} + +EAPI Eina_Bool +evas_object_filter_param_obj_set(Evas_Object *o __UNUSED__, + const char *param __UNUSED__, + Evas_Object *val __UNUSED__) +{ + return EINA_FALSE; +} + +EAPI Evas_Object * +evas_object_filter_param_obj_get(Evas_Object *o __UNUSED__, + const char *param __UNUSED__) +{ + return NULL; +} + +EAPI Eina_Bool +evas_object_filter_param_float_set(Evas_Object *o, const char *param, + double val) +{ + char *data; + const struct fieldinfo *fields; + int i; + Eina_Bool rv; + + MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + + if ((!o->filter) || (!o->filter->data)) return EINA_FALSE; + + rv = EINA_FALSE; + fields = filterfields[o->filter->filter]; + if (!fields) return EINA_FALSE; + + data = o->filter->data; + + for (i = 0; fields[i].field; i++) + { + if (!strcmp(fields[i].field, param)) + { + if (fields[i].type != TYPE_FLOAT) continue; + *(double *)(data + fields[i].offset) = val; + o->filter->dirty = 1; + o->changed = 1; + evas_object_change(o); + rv = EINA_TRUE; + } + } + return rv; +} + +EAPI double +evas_object_filter_param_float_get(Evas_Object *o, const char *param) +{ + char *data; + const struct fieldinfo *fields; + double val; + int i; + + MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); + return -1; + MAGIC_CHECK_END(); + + if ((!o->filter) || (!o->filter->data)) return -1; + + fields = filterfields[o->filter->filter]; + if (!fields) return -1; + data = o->filter->data; + + for (i = 0; fields[i].field; i++) + { + if (!strcmp(fields[i].field, param)) + { + if (fields[i].type != TYPE_FLOAT) continue; + val = *(double *)(data + fields[i].offset); + return val; + } + } + return -1; +} + + + + + +/* + * Internal call + */ +int +evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh, + int *outw, int *outh, Eina_Bool inv) +{ + if (!info) return -1; + if ((!outw) && (!outh)) return 0; + + if (filterinfo[info->filter].sizefn) + return filterinfo[info->filter].sizefn(info, inw, inh, outw, outh, inv); + + if (outw) *outw = inw; + if (outh) *outh = inh; + return 0; +} + +Eina_Bool +evas_filter_always_alpha(Evas_Filter_Info *info) +{ + if (!info) return EINA_FALSE; + return filterinfo[info->filter].alwaysalpha; +} + +/* + * Another internal call: + * Given a filterinfo, generate a unique key for it + * + * For simple filters, it's just the filter type. + * for more complex filters, it's the type, with it's params. + * + * Note management of the key data is up to the caller, that is it should + * probably be freed after use. + * + * Note the automatic fallback generation places the single byte at the end so + * the memcpy will be aligned. Micro-optimisations FTW! + * + * @param info Filter info to generate from + * @param len Length of the buffer returned. + * @return key Key buffer + */ +uint8_t * +evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp) +{ + struct filterinfo *finfo; + uint8_t *key; + int len; + + if (!info) return NULL; + + finfo = filterinfo + info->filter; + if (finfo->keyfn) return finfo->keyfn(info, lenp); + + len = 1 + finfo->datasize; + key = malloc(len); + if (!key) return NULL; + if (finfo->datasize) memcpy(key, info->data, finfo->datasize); + key[finfo->datasize] = info->filter; + if (lenp) *lenp = len; + return key; +} + +Evas_Software_Filter_Fn +evas_filter_software_get(Evas_Filter_Info *info) +{ + return filterinfo[info->filter].filter; +} + +void +evas_filter_free(Evas_Object *o) +{ + if (!o->filter) return; + if (o->filter->key) free(o->filter->key); + free(o->filter); + o->filter = NULL; +} + + + + +/* + * Private calls + */ +static Evas_Filter_Info * +filter_alloc(Evas_Object *o) +{ + Evas_Filter_Info *info; + + if (!o) return NULL; + info = calloc(1,sizeof(struct Evas_Filter_Info)); + if (!info) return NULL; + info->dirty = 1; + info->filter = EVAS_FILTER_NONE; + info->mode = EVAS_FILTER_MODE_OBJECT; + info->datalen = 0; + + o->filter = info; + + return info; +} + +static int +blur_size_get(Evas_Filter_Info *info, int inw, int inh, int *outw, int *outh, + Eina_Bool inv) +{ + Evas_Filter_Info_Blur *blur = info->data; + + if (inv) + { + if (outw) *outw = MAX(inw - (blur->radius * 2), 0); + if (outh) *outh = MAX(inh - (blur->radius * 2), 0); + } + else + { + if (outw) *outw = inw + (blur->radius * 2); + if (outh) *outh = inh + (blur->radius * 2); + } + return 0; +} + +/* + * Generate a key for the Gaussian generator. + * + * The size is: + * - 1 byte for the type (blur) + * - 1 byte for the quality (0-1 -> 0-255) + * - 2 bytes for radius (max is 508 anyway) + * + * @param info Filter info + * @param len Length of the returned buffer + * @return new buffer + */ +static uint8_t * +gaussian_key_get(const Evas_Filter_Info *info, uint32_t *lenp) +{ + struct Evas_Filter_Info_Blur *blur; + uint8_t *key; + + if ((!info) || (!info->data)) return NULL; + blur = info->data; + + if (lenp) *lenp = 4; + key = malloc(4); + if (!key) return NULL; + key[0] = EVAS_FILTER_BLUR; + key[1] = blur->quality * 255; + key[2] = blur->radius >> 8; + key[3] = blur->radius; + + return key; +} + + + + + + + + + + + + + + + + + + + +/** + * Software implementations + */ +#define all(OP, A, R, G, B, W, I) \ + do { \ + A OP A_VAL(I) * W; \ + R OP R_VAL(I) * W; \ + G OP G_VAL(I) * W; \ + B OP B_VAL(I) * W; \ + } while (0) +#define wavg(x,n) (((x) / (n)) & 0xff) +#define wavgd(x,n) ((uint32_t)((x) / (n)) & 0xff) + +typedef int (*FilterH)(int, uint32_t *, int, uint32_t *); +typedef int (*FilterV)(int, uint32_t *, int, int, uint32_t *); + +static int gaussian_filter_h(int rad, uint32_t *in, int w, uint32_t *out); +static int gaussian_filter_h64(int rad, uint32_t *in, int w, uint32_t *out); +static int gaussian_filter_hd(int rad, uint32_t *in, int w, uint32_t *out); +static int gaussian_filter_v(int rad, uint32_t *in, int h, int skip, uint32_t *out); +static int gaussian_filter_v64(int rad, uint32_t *in, int h, int skip, uint32_t *out); +static int gaussian_filter_vd(int rad, uint32_t *in, int h, int skip, uint32_t *out); +static const uint32_t *gaussian_row_get(int row, int *npoints, uint32_t *weight); +static const uint64_t *gaussian_row_get64(int row, int *npoints, uint64_t *weight); +static const double *gaussian_row_getd(int row, int *npoints, double *weight); + +static Eina_Bool +gaussian_filter(Evas_Filter_Info *filter, RGBA_Image *src, RGBA_Image *dst) +{ + int i; + uint32_t nw, nh; + uint32_t *in, *tmp, *out; + FilterV filter_v = gaussian_filter_v; + FilterH filter_h = gaussian_filter_h; + Evas_Filter_Info_Blur *blur; + int w, h; + + blur = filter->data; + + /* Use 64 bit version if we are going to overflow */ + if (blur->radius > 508) /** too big for doubles: Bail out */ + return EINA_FALSE; + else if (blur->radius > 28) + { + filter_v = gaussian_filter_vd; + filter_h = gaussian_filter_hd; + } + else if (blur->radius > 12) + { + filter_v = gaussian_filter_v64; + filter_h = gaussian_filter_h64; + } + + w = src->cache_entry.w; + h = src->cache_entry.h; + in = src->image.data; + + if (!in) return EINA_FALSE; + + nw = w + (2 * blur->radius); + nh = h + (2 * blur->radius); + + out = dst->image.data; + if (!out) return EINA_FALSE; + tmp = malloc(nw * h * sizeof(uint32_t)); + + for (i = 0; i < h; i++) + filter_h(blur->radius,in + (i * w), w, tmp + (i * nw)); + + for (i = 0; i < (int)nw; i++) + filter_v(blur->radius,tmp + i, h, nw, out + i); + + free(tmp); + return EINA_TRUE; +} + +/* Blur only horizontally */ +static int +gaussian_filter_h(int rad, uint32_t *in, int w, uint32_t *out) +{ + const uint32_t *points; + int npoints = 0; + uint32_t weight = 0; + int i = 0, k = 0; + uint32_t r, g, b, a; + + /* Get twice the radius: even rows have 1 element */ + points = gaussian_row_get(rad * 2, &npoints, &weight); + for (i = -rad; i < (w + rad); i++) + { + r = g = b = a = 0; + for (k = -rad; k <= rad; k++) + { + if ((k + i) < 0) continue; + if ((k + i) >= w) continue; + all(+=, a, r, g, b, points[k + rad], in + k + i); + } + *(out) = ARGB_JOIN(wavg(a, weight), + wavg(r, weight), + wavg(g, weight), + wavg(b, weight)); + out++; + } + return 0; +} + +/* Blur only horizontally */ +static int +gaussian_filter_hd(int rad, uint32_t *in, int w, uint32_t *out) +{ + const double *points; + int npoints = 0; + double weight = 0.0; + int i = 0, k = 0; + double r, g, b, a; + + /* Get twice the radius: even rows have 1 element */ + points = gaussian_row_getd(rad * 2, &npoints, &weight); + for (i = -rad; i < (w + rad); i++) + { + r = g = b = a = 0; + for (k = -rad; k <= rad; k++) + { + if ((k + i) < 0) continue; + if ((k + i) >= w) continue; + all(+=, a, r, g, b, points[k + rad], in + k + i); + } + *(out) = ARGB_JOIN(wavgd(a, weight), + wavgd(r, weight), + wavgd(g, weight), + wavgd(b, weight)); + out++; + } + return 0; +} + + +/* Blur only horizontally */ +static int +gaussian_filter_h64(int rad, uint32_t *in, int w, uint32_t *out) +{ + const uint64_t *points; + int npoints = 0; + uint64_t weight = 0; + int i = 0, k = 0; + uint64_t r, g, b, a; + + /* Get twice the radius: even rows have 1 element */ + points = gaussian_row_get64(rad * 2, &npoints, &weight); + for (i = -rad ; i < w + rad; i ++){ + r = g = b = a = 0; + for (k = -rad ; k <= rad ; k ++){ + if ((k + i) < 0) continue; + if ((k + i) >= w) continue; + all(+=, a, r, g, b, points[k + rad], in + k + i); + } + *(out) = ARGB_JOIN(wavg(a, weight), + wavg(r, weight), + wavg(g, weight), + wavg(b, weight)); + out++; + } + return 0; +} + +static int +gaussian_filter_v(int rad, uint32_t *in, int h, int skip, uint32_t *out) +{ + const uint32_t *points; + int npoints = 0; + uint32_t weight = 0; + int i = 0, k = 0; + uint32_t r, g, b, a; + + /* Get twice the radius: even rows have 1 element */ + points = gaussian_row_get(rad * 2, &npoints, &weight); + weight = 0; + for (i = 0; i < npoints; i++) weight += points[i]; + + for (i = -rad; i < (h + rad); i++) + { + r = g = b = a = 0; + for (k = -rad; k <= rad; k++) + { + if ((k + i) < 0) continue; + if ((k + i) >= h) continue; + all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i))); + } + *(out) = ARGB_JOIN(wavg(a, weight), + wavg(r, weight), + wavg(g, weight), + wavg(b, weight)); + out += skip; + } + return 0; +} + +static int +gaussian_filter_v64(int rad, uint32_t *in, int h, int skip, uint32_t *out) +{ + const uint64_t *points; + int npoints = 0; + uint64_t weight; + int i = 0, k = 0; + uint64_t r, g, b, a; + + /* Get twice the radius: even rows have 1 element */ + points = gaussian_row_get64(rad * 2, &npoints, &weight); + weight = 0; + for (i = 0; i < npoints; i++) weight += points[i]; + + for (i = -rad; i < (h + rad); i++) + { + r = g = b = a = 0; + for (k = -rad ; k <= rad ; k++) + { + if ((k + i) < 0) continue; + if ((k + i) >= h) continue; + all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i))); + } + *(out) = ARGB_JOIN(wavg(a, weight), + wavg(r, weight), + wavg(g, weight), + wavg(b, weight)); + out += skip; + } + return 0; +} + +static int +gaussian_filter_vd(int rad, uint32_t *in, int h, int skip, uint32_t *out) +{ + const double *points; + int npoints = 0; + double weight = 0.0; + int i = 0, k = 0; + double r, g, b, a; + + /* Get twice the radius: even rows have 1 element */ + points = gaussian_row_getd(rad * 2, &npoints, &weight); + weight = 0; + for (i = 0 ; i < npoints ; i ++) weight += points[i]; + + for (i = -rad ; i < h + rad; i ++) + { + r = g = b = a = 0; + for (k = -rad ; k <= rad ; k ++) + { + if ((k + i) < 0) continue; + if ((k + i) >= h) continue; + all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i))); + } + *(out) = ARGB_JOIN(wavgd(a, weight), + wavgd(r, weight), + wavgd(g, weight), + wavgd(b, weight)); + out += skip; + } + return 0; +} + +static const uint32_t * +gaussian_row_get(int row, int *npoints, uint32_t *weight) +{ + static uint32_t *points = NULL; + static int last = -1; + static uint32_t lastweight = -1; + int c, k; + + if (row < 0) return NULL; + + if (npoints) *npoints = row + 1; + + if (last == row) + { + if (weight) *weight = lastweight; + return points; + } + if (points) free(points); + + points = malloc((row + 1) * sizeof(uint32_t)); + if (!points) + { + last = -1; + return NULL; + } + last = row; + + c = 1; + for (k = 0; k <= row; k++) + { + points[k] = c; + c = c * (row - k) / (k + 1); + } + + for (k = 0, lastweight = 0; k <= row; k++) lastweight += points[k]; + if (weight) *weight = lastweight; + return points; +} + +static const uint64_t * +gaussian_row_get64(int row, int *npoints, uint64_t *weight) +{ + static uint64_t *points = NULL; + static int last = -1; + static uint64_t lastweight = -1; + uint64_t c; + int k; + + if (row < 0) return NULL; + + if (npoints) *npoints = row + 1; + if (last == row) + { + if (weight) *weight = lastweight; + return points; + } + if (points) free(points); + + points = malloc((row + 1) * sizeof(uint64_t)); + if (!points) + { + last = -1; + return NULL; + } + last = row; + + c = 1; + for (k = 0; k <= row; k++) + { + points[k] = c; + c = c * (row - k) / (k + 1); + } + + for (k = 0, lastweight = 0; k <= row; k ++) lastweight += points[k]; + if (weight) *weight = lastweight; + + return points; +} + +static const double * +gaussian_row_getd(int row, int *npoints, double *weight) +{ + static double *points = NULL; + static int last = -1; + static double lastweight = -1; + double c; + int k; + + if (row < 0) return NULL; + + if (last == row) + { + if (weight) *weight = lastweight; + return points; + } + + if (points) free(points); + points = malloc((row + 1) * sizeof(double)); + if (!points) + { + last = -1; + return NULL; + } + last = row; + + if (npoints) *npoints = row + 1; + + c = 1; + for (k = 0; k <= row; k++) + { + points[k] = c; + c = c * (row - k) / (k + 1); + } + + for (k = 0, lastweight = 0; k <= row; k++) lastweight += points[k]; + if (weight) *weight = lastweight; + + return points; +} + +#if BUILD_NEON0 +static Eina_Bool +negation_filter_neon(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst) +{ + uint32_t tmp; + + if (src->cache_entry.flags.alpha) + { + // FIXME: not implemented + } + else + { + /* No alpha */ +#define AP "NEG_FILTER_NA" + asm volatile ( + + ".fpu neon \n\t" + "vdup.u32 q14, $0xff000000 \n\t" + "vmvn.u32 q15, q1 \n\t" + + // fixme: do check for small loops + AP"loopinit: \n\t" + "sub %[tmp], %[e], #31 \n\t" + + AP"loop: \n\t" + "vldm %[s]!, {d0,d1,d2,d3} \n\t" + "vand q2, q0, q15 \n\t" + "vand q3, q1, q15 \n\t" + "vand q4, q0, q14 \n\t" + "vand q5, q1, q14 \n\t" + // fixme: can i do this with xor + "cmp %[tmp], %[s] \n\t" + + "vmvn q6, q2 \n\t" + "vmvn q7, q3 \n\t" + + "vorr q0, q6,q4 \n\t" + "vorr q1, q7,q5 \n\t" + + "vstm %[d]!, {d0,d1,d2,d3} \n\t" + + "bhi "AP"loop \n\t" + + : // no out + : // input + [e] "r" (src->image.data+ src->cache_entry.w*src->cache_entry.h), + [s] "r" (src->image.data), + [tmp] "r" (tmp), + [d] "r" (dst->image.data) + : "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q14", "q15", + "memory" + ); +#undef AP + } + return EINA_TRUE; +} +#endif + +static Eina_Bool +negation_filter(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst) +{ + uint32_t *in, *out; + int i,j; + int w,h; + uint32_t a; + uint8_t r,g,b; + +#if BUILD_NEON0 + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON) && + (!src->cache_entry.flags.alpha)) + return negation_filter_neon(info, src, dst); +#endif + + in = src->image.data; + out = dst->image.data; + w = src->cache_entry.w; + h = src->cache_entry.h; + + if (src->cache_entry.flags.alpha) + { + for (i = 0; i < h; i++) + { + for (j = 0; j < w; j++) + { + a = A_VAL(in); + r = R_VAL(in); + g = G_VAL(in); + b = B_VAL(in); + *out = ARGB_JOIN(a, a - r, a - g, a - b); + out++; + in++; + } + } + } + else + { + for (i = 0; i < h; i++) + { + for (j = 0; j < w; j++) + { + a = A_VAL(in); + r = R_VAL(in); + g = G_VAL(in); + b = B_VAL(in); + *out = ARGB_JOIN(a, ~r, ~g, ~b); + out++; + in++; + } + } + } + return EINA_TRUE; + info = NULL; +} + +static Eina_Bool +sepia_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst) +{ + uint32_t *in, *out; + int i, j; + int w, h; + uint32_t a, r, g, b, nr, ng, nb; + + in = src->image.data; + out = dst->image.data; + w = src->cache_entry.w; + h = src->cache_entry.h; + + for (i = 0; i < h; i++) + { + for (j = 0; j < w; j++) + { + a = A_VAL(in); + r = R_VAL(in); + g = G_VAL(in); + b = B_VAL(in); + nr = ((uint32_t)((r * 0.393) + (g * 0.769) + (b * 0.189))); + ng = ((uint32_t)((r * 0.349) + (g * 0.686) + (b * 0.168))); + nb = ((uint32_t)((r * 0.272) + (g * 0.534) + (b * 0.131))); + if (nr > 255) nr = 255; + if (ng > 255) ng = 255; + if (nb > 255) nb = 255; + *out = ARGB_JOIN(a, nr, ng, nb); + out++; + in++; + } + } + + return EINA_TRUE; + +} + +static Eina_Bool +greyscale_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst) +{ + uint32_t *in, *out; + int i, j; + int w, h; + uint32_t cur; + uint32_t a, r, g, b; + + in = src->image.data; + out = dst->image.data; + w = src->cache_entry.w; + h = src->cache_entry.h; + + if (src->cache_entry.flags.alpha) + { + for (i = 0; i < h; i++) + { + for (j = 0; j < w; j++) + { + a = A_VAL(in); + r = R_VAL(in); + g = G_VAL(in); + b = B_VAL(in); + cur = (r * 0.3) + (g * 0.59) + (b * 0.11); + *out = ARGB_JOIN(a, r, g, b); + out++; + in++; + } + } + } + else + { + for (i = 0 ; i < h ; i ++) + { + for (j = 0; j < w ; j ++) + { + r = R_VAL(in); + g = G_VAL(in); + b = B_VAL(in); + cur = r * 0.3 + g * 0.59 + b * 0.11; + *out = ARGB_JOIN(255, r, g, b); + out++; + in++; + } + } + } + return EINA_TRUE; +} + +static Eina_Bool +brightness_filter(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst) +{ + uint32_t *in, *out; + int i, j; + int w, h; + int a,r,g,b; + int delta; + int adjdelta; + Evas_Filter_Info_Brightness *bness; + + in = src->image.data; + out = dst->image.data; + w = src->cache_entry.w; + h = src->cache_entry.h; + bness = info->data; + + delta = bness->adjust * 255; + if (delta > 255) + delta = 255; + else if (delta < -255) + delta = -255; + + /* Note we could optimise the -255, 0 and 255 cases, but why would people + * be doing that */ + if (delta >= 0) + { + for (i = 0; i < h; i++) + { + for (j = 0; j < w; j++) + { + a = A_VAL(in); + r = R_VAL(in); + g = G_VAL(in); + b = B_VAL(in); + adjdelta = (a * delta) >> 8; + r = MIN(r + adjdelta, a); + g = MIN(g + adjdelta, a); + b = MIN(b + adjdelta, a); + *out = ARGB_JOIN(a, r ,g, b); + out++; + in++; + } + } + } + else + { + /* Delta negative */ + for (i = 0; i < h; i++) + { + for (j = 0; j < w; j++) + { + a = A_VAL(in); + r = R_VAL(in); + g = G_VAL(in); + b = B_VAL(in); + adjdelta = (a * delta) >> 8; + r = MAX(r + adjdelta, 0); + g = MAX(g + adjdelta, 0); + b = MAX(b + adjdelta, 0); + *out = ARGB_JOIN(a, r ,g, b); + out++; + in++; + } + } + } + + return EINA_TRUE; + +} + +static Eina_Bool +contrast_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst) +{ + uint32_t *in, *out; + int i, j; + int w, h; + + in = src->image.data; + out = dst->image.data; + w = src->cache_entry.w; + h = src->cache_entry.h; + + for (i = 0; i < h; i++) + { + for (j = 0; j < w; j++) + { + // FIXME: not even implemented + out++; + in++; + } + } + + return EINA_TRUE; + +} +#endif + +/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/lib/canvas/evas_focus.c b/libraries/evas/src/lib/canvas/evas_focus.c new file mode 100644 index 0000000..a1a3bca --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_focus.c @@ -0,0 +1,59 @@ +#include "evas_common.h" +#include "evas_private.h" + +/* private calls */ + +/* local calls */ + +/* public calls */ + +EAPI void +evas_object_focus_set(Evas_Object *obj, Eina_Bool focus) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + + _evas_object_event_new(); + + if (focus) + { + if (obj->focused) goto end; + if (obj->layer->evas->focused) + evas_object_focus_set(obj->layer->evas->focused, 0); + obj->focused = 1; + obj->layer->evas->focused = obj; + evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL); + evas_event_callback_call(obj->layer->evas, + EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, obj); + } + else + { + if (!obj->focused) goto end; + obj->focused = 0; + obj->layer->evas->focused = NULL; + evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL); + evas_event_callback_call(obj->layer->evas, + EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, obj); + } + end: + _evas_post_event_callback_call(obj->layer->evas); +} + +EAPI Eina_Bool +evas_object_focus_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + return obj->focused; +} + +EAPI Evas_Object * +evas_focus_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + return e->focused; +} diff --git a/libraries/evas/src/lib/canvas/evas_font_dir.c b/libraries/evas/src/lib/canvas/evas_font_dir.c new file mode 100644 index 0000000..e97f7f7 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_font_dir.c @@ -0,0 +1,1349 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef HAVE_EVIL +# include +#endif + +#ifdef BUILD_FONT_LOADER_EET +#include +#endif + +#ifdef HAVE_FONTCONFIG +#include +#endif + +#include "evas_common.h" +#include "evas_private.h" + +/* font dir cache */ +static Eina_Hash *font_dirs = NULL; +static Eina_List *fonts_cache = NULL; +static Eina_List *fonts_zero = NULL; + +typedef struct _Fndat Fndat; + +struct _Fndat +{ + Evas_Font_Description *fdesc; + const char *source; + Evas_Font_Size size; + Evas_Font_Set *font; + int ref; + Font_Rend_Flags wanted_rend; + +#ifdef HAVE_FONTCONFIG + FcFontSet *set; + FcPattern *p_nm; +#endif +}; + +/* private methods for font dir cache */ +static Eina_Bool font_cache_dir_free(const Eina_Hash *hash, const void *key, void *data, void *fdata); +static Evas_Font_Dir *object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd); +static Evas_Font *object_text_font_cache_font_find_x(Evas_Font_Dir *fd, char *font); +static Evas_Font *object_text_font_cache_font_find_file(Evas_Font_Dir *fd, char *font); +static Evas_Font *object_text_font_cache_font_find_alias(Evas_Font_Dir *fd, char *font); +static Evas_Font *object_text_font_cache_font_find(Evas_Font_Dir *fd, char *font); +static Evas_Font_Dir *object_text_font_cache_dir_add(char *dir); +static void object_text_font_cache_dir_del(char *dir, Evas_Font_Dir *fd); +static int evas_object_text_font_string_parse(char *buffer, char dest[14][256]); + +#ifdef HAVE_FONTCONFIG +static int fc_init = 0; +#endif + +void +evas_font_dir_cache_free(void) +{ + if (!font_dirs) return; + + eina_hash_foreach(font_dirs, font_cache_dir_free, NULL); + eina_hash_free(font_dirs); + font_dirs = NULL; + +#ifdef HAVE_FONTCONFIG +/* this is bad i got a: + * fccache.c:512: FcCacheFini: Assertion fcCacheChains[i] == ((void *)0)' failed. + * + * all i can do for now is shut this puppy down. butthat breaks, so disable + * it as in reality - there is little reason to care about the memory not + * being freed etc. + * + * fc_init--; + * if (fc_init == 0) FcFini(); + */ +#endif +} + +const char * +evas_font_dir_cache_find(char *dir, char *font) +{ + Evas_Font_Dir *fd = NULL; + + if (!font_dirs) font_dirs = eina_hash_string_superfast_new(NULL); + else fd = eina_hash_find(font_dirs, dir); + fd = object_text_font_cache_dir_update(dir, fd); + if (fd) + { + Evas_Font *fn; + + fn = object_text_font_cache_font_find(fd, font); + if (fn) + { + return fn->path; + } + } + return NULL; +} + +static Eina_List * +evas_font_set_get(const char *name) +{ + Eina_List *fonts = NULL; + char *p; + + p = strchr(name, ','); + if (!p) + { + fonts = eina_list_append(fonts, eina_stringshare_add(name)); + } + else + { + const char *pp; + char *nm; + + pp = name; + while (p) + { + nm = alloca(p - pp + 1); + strncpy(nm, pp, p - pp); + nm[p - pp] = 0; + fonts = eina_list_append(fonts, eina_stringshare_add(nm)); + pp = p + 1; + p = strchr(pp, ','); + if (!p) fonts = eina_list_append(fonts, eina_stringshare_add(pp)); + } + } + return fonts; +} + +void +evas_fonts_zero_free(Evas *evas) +{ + Fndat *fd; + + EINA_LIST_FREE(fonts_zero, fd) + { + if (fd->fdesc) evas_font_desc_unref(fd->fdesc); + if (fd->source) eina_stringshare_del(fd->source); + evas->engine.func->font_free(evas->engine.data.output, fd->font); +#ifdef HAVE_FONTCONFIG + if (fd->set) FcFontSetDestroy(fd->set); + if (fd->p_nm) FcPatternDestroy(fd->p_nm); +#endif + free(fd); + } +} + +void +evas_fonts_zero_presure(Evas *evas) +{ + Fndat *fd; + + while (fonts_zero + && eina_list_count(fonts_zero) > 4) /* 4 is arbitrary */ + { + fd = eina_list_data_get(fonts_zero); + + if (fd->ref != 0) break; + fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero); + + if (fd->fdesc) evas_font_desc_unref(fd->fdesc); + if (fd->source) eina_stringshare_del(fd->source); + evas->engine.func->font_free(evas->engine.data.output, fd->font); +#ifdef HAVE_FONTCONFIG + if (fd->set) FcFontSetDestroy(fd->set); + if (fd->p_nm) FcPatternDestroy(fd->p_nm); +#endif + free(fd); + + if (eina_list_count(fonts_zero) < 5) break; + } +} + +void +evas_font_free(Evas *evas, void *font) +{ + Eina_List *l; + Fndat *fd; + + EINA_LIST_FOREACH(fonts_cache, l, fd) + { + if (fd->font == font) + { + fd->ref--; + if (fd->ref == 0) + { + fonts_cache = eina_list_remove_list(fonts_cache, l); + fonts_zero = eina_list_append(fonts_zero, fd); + } + break; + } + } + while (fonts_zero + && eina_list_count(fonts_zero) > 42) /* 42 is arbitrary */ + { + fd = eina_list_data_get(fonts_zero); + + if (fd->ref != 0) break; + fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero); + + if (fd->fdesc) evas_font_desc_unref(fd->fdesc); + if (fd->source) eina_stringshare_del(fd->source); + evas->engine.func->font_free(evas->engine.data.output, fd->font); +#ifdef HAVE_FONTCONFIG + if (fd->set) FcFontSetDestroy(fd->set); + if (fd->p_nm) FcPatternDestroy(fd->p_nm); +#endif + free(fd); + + if (eina_list_count(fonts_zero) < 43) break; + } +} + +static void +evas_font_init(void) +{ + static int done = 0; + if (done) return; + done = 1; +#ifdef HAVE_FONTCONFIG + fc_init++; + if (fc_init == 1) + { + FcInit(); + FcConfigEnableHome(1); + } +#endif +} + +#ifdef HAVE_FONTCONFIG +static Evas_Font_Set * +evas_load_fontconfig(Evas *evas, FcFontSet *set, int size, + Font_Rend_Flags wanted_rend) +{ + Evas_Font_Set *font = NULL; + int i; + + /* Do loading for all in family */ + for (i = 0; i < set->nfont; i++) + { + FcValue filename; + + FcPatternGet(set->fonts[i], FC_FILE, 0, &filename); + + if (font) + evas->engine.func->font_add(evas->engine.data.output, font, (char *)filename.u.s, size, wanted_rend); + else + font = evas->engine.func->font_load(evas->engine.data.output, (char *)filename.u.s, size, wanted_rend); + } + + return font; +} +#endif + +#ifdef HAVE_FONTCONFIG +/* In sync with Evas_Font_Style, Evas_Font_Weight and Evas_Font_Width */ +static int _fc_slant_map[] = +{ + FC_SLANT_ROMAN, + FC_SLANT_OBLIQUE, + FC_SLANT_ITALIC +}; + +static int _fc_weight_map[] = +{ + FC_WEIGHT_NORMAL, + FC_WEIGHT_THIN, + FC_WEIGHT_ULTRALIGHT, + FC_WEIGHT_LIGHT, + FC_WEIGHT_BOOK, + FC_WEIGHT_MEDIUM, + FC_WEIGHT_SEMIBOLD, + FC_WEIGHT_BOLD, + FC_WEIGHT_ULTRABOLD, + FC_WEIGHT_BLACK, + FC_WEIGHT_EXTRABLACK +}; + +# ifdef FC_WIDTH +static int _fc_width_map[] = +{ + FC_WIDTH_NORMAL, + FC_WIDTH_ULTRACONDENSED, + FC_WIDTH_EXTRACONDENSED, + FC_WIDTH_CONDENSED, + FC_WIDTH_SEMICONDENSED, + FC_WIDTH_SEMIEXPANDED, + FC_WIDTH_EXPANDED, + FC_WIDTH_EXTRAEXPANDED, + FC_WIDTH_ULTRAEXPANDED +}; +# endif + +#endif + +struct _Style_Map +{ + const char *name; + int type; +}; +typedef struct _Style_Map Style_Map; + +static Style_Map _style_width_map[] = +{ + {"normal", EVAS_FONT_WIDTH_NORMAL}, + {"ultracondensed", EVAS_FONT_WIDTH_ULTRACONDENSED}, + {"extracondensed", EVAS_FONT_WIDTH_EXTRACONDENSED}, + {"condensed", EVAS_FONT_WIDTH_CONDENSED}, + {"semicondensed", EVAS_FONT_WIDTH_SEMICONDENSED}, + {"semiexpanded", EVAS_FONT_WIDTH_SEMIEXPANDED}, + {"expanded", EVAS_FONT_WIDTH_EXPANDED}, + {"extraexpanded", EVAS_FONT_WIDTH_EXTRAEXPANDED}, + {"ultraexpanded", EVAS_FONT_WIDTH_ULTRAEXPANDED}, +}; + +static Style_Map _style_weight_map[] = +{ + {"normal", EVAS_FONT_WEIGHT_NORMAL}, + {"thin", EVAS_FONT_WEIGHT_THIN}, + {"ultralight", EVAS_FONT_WEIGHT_ULTRALIGHT}, + {"light", EVAS_FONT_WEIGHT_LIGHT}, + {"book", EVAS_FONT_WEIGHT_BOOK}, + {"medium", EVAS_FONT_WEIGHT_MEDIUM}, + {"semibold", EVAS_FONT_WEIGHT_SEMIBOLD}, + {"bold", EVAS_FONT_WEIGHT_BOLD}, + {"ultrabold", EVAS_FONT_WEIGHT_ULTRABOLD}, + {"black", EVAS_FONT_WEIGHT_BLACK}, + {"extrablack", EVAS_FONT_WEIGHT_EXTRABLACK} +}; + +static Style_Map _style_slant_map[] = +{ + {"normal", EVAS_FONT_SLANT_NORMAL}, + {"oblique", EVAS_FONT_SLANT_OBLIQUE}, + {"italic", EVAS_FONT_SLANT_ITALIC} +}; + +#define _STYLE_MAP_LEN(x) (sizeof(x) / sizeof(*(x))) +/** + * @internal + * Find a certain attribute from the map in the style. + * @return the index of the found one. + */ +static int +_evas_font_style_find_internal(const char *style, const char *style_end, + Style_Map _map[], size_t map_len) +{ + size_t i; + while (style < style_end) + { + for (i = 0 ; i < map_len ; i++) + { + size_t len; + const char *cur = _map[i].name; + len = strlen(cur); + if (!strncasecmp(style, cur, len) && + (!cur[len] || (cur[len] == ' '))) + { + return _map[i].type; + } + } + style = strchr(style, ' '); + if (!style) + break; + + while (*style && (*style == ' ')) + style++; + } + return 0; +} + +int +evas_font_style_find(const char *start, const char *end, + Evas_Font_Style style) +{ +#define _RET_STYLE(x) \ + return _evas_font_style_find_internal(start, end, \ + _style_##x##_map, _STYLE_MAP_LEN(_style_##x##_map)); + switch (style) + { + case EVAS_FONT_STYLE_SLANT: + _RET_STYLE(slant); + case EVAS_FONT_STYLE_WEIGHT: + _RET_STYLE(weight); + case EVAS_FONT_STYLE_WIDTH: + _RET_STYLE(width); + default: + return 0; + } +#undef _RET_STYLE +} + +void +evas_font_desc_unref(Evas_Font_Description *fdesc) +{ + if (--(fdesc->ref) == 0) + { + eina_stringshare_del(fdesc->name); + eina_stringshare_del(fdesc->fallbacks); + eina_stringshare_del(fdesc->lang); + free(fdesc); + } +} + +Evas_Font_Description * +evas_font_desc_ref(Evas_Font_Description *fdesc) +{ + fdesc->ref++; + return fdesc; +} + +Evas_Font_Description * +evas_font_desc_new(void) +{ + Evas_Font_Description *fdesc; + fdesc = calloc(1, sizeof(*fdesc)); + fdesc->ref = 1; + fdesc->is_new = EINA_TRUE; + + return fdesc; +} + +Evas_Font_Description * +evas_font_desc_dup(const Evas_Font_Description *fdesc) +{ + Evas_Font_Description *new; + new = evas_font_desc_new(); + memcpy(new, fdesc, sizeof(*new)); + new->ref = 1; + new->is_new = EINA_TRUE; + new->name = eina_stringshare_ref(new->name); + + return new; +} + +int +evas_font_desc_cmp(const Evas_Font_Description *a, + const Evas_Font_Description *b) +{ + /* FIXME: Do actual comparison, i.e less than and bigger than. */ + return !((a->name == b->name) && (a->weight == b->weight) && + (a->slant == b->slant) && (a->width == b->width) && + (a->lang == b->lang)); +} + +void +evas_font_name_parse(Evas_Font_Description *fdesc, const char *name) +{ + const char *end; + + end = strchr(name, ':'); + if (!end) + eina_stringshare_replace(&(fdesc->name), name); + else + eina_stringshare_replace_length(&(fdesc->name), name, end - name); + + while (end) + { + const char *tend; + name = end; + end = strchr(end + 1, ':'); + if (!end) + tend = name + strlen(name); + else + tend = end; + + if (!strncmp(name, ":style=", 7)) + { +#define _SET_STYLE(x) \ + fdesc->x = _evas_font_style_find_internal(name + 7, tend, \ + _style_##x##_map, _STYLE_MAP_LEN(_style_##x##_map)); + _SET_STYLE(slant); + _SET_STYLE(weight); + _SET_STYLE(width); +#undef _SET_STYLE + } + else if (!strncmp(name, ":lang=", 6)) + { + const char *tmp = name + 6; + eina_stringshare_replace_length(&(fdesc->lang), tmp, tend - tmp); + } + } +} + +void * +evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size) +{ +#ifdef HAVE_FONTCONFIG + FcPattern *p_nm = NULL; + FcFontSet *set = NULL; +#endif + + Evas_Font_Set *font = NULL; + Eina_List *fonts, *l; + Fndat *fd; + char *nm; + Font_Rend_Flags wanted_rend = 0; + + if (!fdesc) return NULL; + fdesc->is_new = EINA_FALSE; + + if (fdesc->slant != EVAS_FONT_SLANT_NORMAL) + wanted_rend |= FONT_REND_SLANT; + if (fdesc->weight == EVAS_FONT_WEIGHT_BOLD) + wanted_rend |= FONT_REND_WEIGHT; + + evas_font_init(); + + EINA_LIST_FOREACH(fonts_cache, l, fd) + { + if (!evas_font_desc_cmp(fdesc, fd->fdesc)) + { + if (((!source) && (!fd->source)) || + ((source) && (fd->source) && (!strcmp(source, fd->source)))) + { + if ((size == fd->size) && + (wanted_rend == fd->wanted_rend)) + { + fonts_cache = eina_list_promote_list(fonts_cache, l); + fd->ref++; + return fd->font; + } +#ifdef HAVE_FONTCONFIG + else if (fd->set && fd->p_nm) + { + font = evas_load_fontconfig(evas, fd->set, size, + wanted_rend); + goto on_find; + } +#endif + } + } + } + + EINA_LIST_FOREACH(fonts_zero, l, fd) + { + if (!evas_font_desc_cmp(fdesc, fd->fdesc)) + { + if (((!source) && (!fd->source)) || + ((source) && (fd->source) && (!strcmp(source, fd->source)))) + { + if ((size == fd->size) && + (wanted_rend == fd->wanted_rend)) + { + fonts_zero = eina_list_remove_list(fonts_zero, l); + fonts_cache = eina_list_prepend(fonts_cache, fd); + fd->ref++; + return fd->font; + } +#ifdef HAVE_FONTCONFIG + else if (fd->set && fd->p_nm) + { + font = evas_load_fontconfig(evas, fd->set, size, + wanted_rend); + goto on_find; + } +#endif + } + } + } + + fonts = evas_font_set_get(fdesc->name); + EINA_LIST_FOREACH(fonts, l, nm) /* Load each font in append */ + { + if (l == fonts || !font) /* First iteration OR no font */ + { +#ifdef BUILD_FONT_LOADER_EET + if (source) /* Load Font from "eet" source */ + { + Eet_File *ef; + char *fake_name; + + fake_name = evas_file_path_join(source, nm); + if (fake_name) + { + font = evas->engine.func->font_load(evas->engine.data.output, fake_name, size, wanted_rend); + if (!font) /* Load from fake name failed, probably not cached */ + { + /* read original!!! */ + ef = eet_open(source, EET_FILE_MODE_READ); + if (ef) + { + void *fdata; + int fsize = 0; + + fdata = eet_read(ef, nm, &fsize); + if ((fdata) && (fsize > 0)) + { + font = evas->engine.func->font_memory_load(evas->engine.data.output, fake_name, size, fdata, fsize, wanted_rend); + free(fdata); + } + eet_close(ef); + } + } + free(fake_name); + } + } + if (!font) /* Source load failed */ + { +#endif + if (evas_file_path_is_full_path((char *)nm)) /* Try filename */ + font = evas->engine.func->font_load(evas->engine.data.output, (char *)nm, size, wanted_rend); + else /* search font path */ + { + Eina_List *ll; + char *dir; + + EINA_LIST_FOREACH(evas->font_path, ll, dir) + { + const char *f_file; + + f_file = evas_font_dir_cache_find(dir, (char *)nm); + if (f_file) + { + font = evas->engine.func->font_load(evas->engine.data.output, f_file, size, wanted_rend); + if (font) break; + } + } + } +#ifdef BUILD_FONT_LOADER_EET + } +#endif + } + else /* Base font loaded, append others */ + { +#ifdef BUILD_FONT_LOADER_EET + void *ok = NULL; + + if (source) + { + Eet_File *ef; + char *fake_name; + + fake_name = evas_file_path_join(source, nm); + if (fake_name) + { + /* FIXME: make an engine func */ + if (!evas->engine.func->font_add(evas->engine.data.output, font, fake_name, size, wanted_rend)) + { + /* read original!!! */ + ef = eet_open(source, EET_FILE_MODE_READ); + if (ef) + { + void *fdata; + int fsize = 0; + + fdata = eet_read(ef, nm, &fsize); + if ((fdata) && (fsize > 0)) + { + ok = evas->engine.func->font_memory_add(evas->engine.data.output, font, fake_name, size, fdata, fsize, wanted_rend); + free(fdata); + } + eet_close(ef); + } + } + else + ok = (void *)1; + free(fake_name); + } + } + if (!ok) + { +#endif + if (evas_file_path_is_full_path((char *)nm)) + evas->engine.func->font_add(evas->engine.data.output, font, (char *)nm, size, wanted_rend); + else + { + Eina_List *ll; + char *dir; + + EINA_LIST_FOREACH(evas->font_path, ll, dir) + { + const char *f_file; + + f_file = evas_font_dir_cache_find(dir, (char *)nm); + if (f_file) + { + if (evas->engine.func->font_add(evas->engine.data.output, font, f_file, size, wanted_rend)) + break; + } + } + } +#ifdef BUILD_FONT_LOADER_EET + } +#endif + } + eina_stringshare_del(nm); + } + fonts = eina_list_free(fonts); + +#ifdef HAVE_FONTCONFIG + if (!font) /* Search using fontconfig */ + { + FcResult res; + + p_nm = FcPatternBuild (NULL, + FC_WEIGHT, FcTypeInteger, _fc_weight_map[fdesc->weight], + FC_SLANT, FcTypeInteger, _fc_slant_map[fdesc->slant], +#ifdef FC_WIDTH + FC_WIDTH, FcTypeInteger, _fc_width_map[fdesc->width], +#endif + NULL); + FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) fdesc->name); + + /* Handle font fallbacks */ + if (fdesc->fallbacks) + { + while (1) + { + const char *start, *end; + start = fdesc->fallbacks; + end = strchr(start, ','); + if (end) + { + char *tmp = alloca((end - start) + 1); + strncpy(tmp, start, end - start); + tmp[end - start] = 0; + FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) tmp); + } + else + { + FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) start); + break; + } + } + } + + if (fdesc->lang) + FcPatternAddString (p_nm, FC_LANG, (FcChar8 *) fdesc->lang); + + FcConfigSubstitute(NULL, p_nm, FcMatchPattern); + FcDefaultSubstitute(p_nm); + + /* do matching */ + set = FcFontSort(NULL, p_nm, FcTrue, NULL, &res); + if (!set) + { + ERR("No fontconfig font matches '%s'. It was the last resource, no font found!", fdesc->name); + FcPatternDestroy(p_nm); + p_nm = NULL; + } + else + { + font = evas_load_fontconfig(evas, set, size, wanted_rend); + } + } +#endif + +#ifdef HAVE_FONTCONFIG + on_find: +#endif + fd = calloc(1, sizeof(Fndat)); + if (fd) + { + fd->fdesc = evas_font_desc_ref(fdesc); + if (source) fd->source = eina_stringshare_add(source); + fd->font = font; + fd->wanted_rend = wanted_rend; + fd->size = size; + fd->ref = 1; + fonts_cache = eina_list_prepend(fonts_cache, fd); +#ifdef HAVE_FONTCONFIG + fd->set = set; + fd->p_nm = p_nm; +#endif + } + + if (font) + evas->engine.func->font_hinting_set(evas->engine.data.output, font, + evas->hinting); + return font; +} + +void +evas_font_load_hinting_set(Evas *evas, void *font, int hinting) +{ + evas->engine.func->font_hinting_set(evas->engine.data.output, font, + hinting); +} + +Eina_List * +evas_font_dir_available_list(const Evas *evas) +{ + Eina_List *l; + Eina_List *ll; + Eina_List *available = NULL; + char *dir; + +#ifdef HAVE_FONTCONFIG + /* Add font config fonts */ + FcPattern *p; + FcFontSet *set = NULL; + FcObjectSet *os; + int i; + + evas_font_init(); + + p = FcPatternCreate(); + os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL); + + if (p && os) set = FcFontList(NULL, p, os); + + if (p) FcPatternDestroy(p); + if (os) FcObjectSetDestroy(os); + + if (set) + { + for (i = 0; i < set->nfont; i++) + { + char *font; + + font = (char *)FcNameUnparse(set->fonts[i]); + available = eina_list_append(available, eina_stringshare_add(font)); + free(font); + } + + FcFontSetDestroy(set); + } +#endif + + /* Add fonts in evas font_path*/ + if (!evas->font_path) + return available; + + if (!font_dirs) font_dirs = eina_hash_string_superfast_new(NULL); + + EINA_LIST_FOREACH(evas->font_path, l, dir) + { + Evas_Font_Dir *fd; + + fd = eina_hash_find(font_dirs, dir); + fd = object_text_font_cache_dir_update(dir, fd); + if (fd && fd->aliases) + { + Evas_Font_Alias *fa; + + EINA_LIST_FOREACH(fd->aliases, ll, fa) + available = eina_list_append(available, eina_stringshare_add((char *)fa->alias)); + } + } + + return available; +} + +void +evas_font_dir_available_list_free(Eina_List *available) +{ + while (available) + { + eina_stringshare_del(available->data); + available = eina_list_remove(available, available->data); + } +} + +/* private stuff */ +static Eina_Bool +font_cache_dir_free(const Eina_Hash *hash __UNUSED__, const void *key, void *data, void *fdata __UNUSED__) +{ + object_text_font_cache_dir_del((char *) key, data); + return 1; +} + +static Evas_Font_Dir * +object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd) +{ + DATA64 mt; + char *tmp; + + if (fd) + { + mt = evas_file_modified_time(dir); + if (mt != fd->dir_mod_time) + { + object_text_font_cache_dir_del(dir, fd); + eina_hash_del(font_dirs, dir, fd); + } + else + { + tmp = evas_file_path_join(dir, "fonts.dir"); + if (tmp) + { + mt = evas_file_modified_time(tmp); + free(tmp); + if (mt != fd->fonts_dir_mod_time) + { + object_text_font_cache_dir_del(dir, fd); + eina_hash_del(font_dirs, dir, fd); + } + else + { + tmp = evas_file_path_join(dir, "fonts.alias"); + if (tmp) + { + mt = evas_file_modified_time(tmp); + free(tmp); + } + if (mt != fd->fonts_alias_mod_time) + { + object_text_font_cache_dir_del(dir, fd); + eina_hash_del(font_dirs, dir, fd); + } + else + return fd; + } + } + } + } + return object_text_font_cache_dir_add(dir); +} + +static Evas_Font * +object_text_font_cache_font_find_x(Evas_Font_Dir *fd, char *font) +{ + Eina_List *l; + char font_prop[14][256]; + int num; + Evas_Font *fn; + + num = evas_object_text_font_string_parse(font, font_prop); + if (num != 14) return NULL; + EINA_LIST_FOREACH(fd->fonts, l, fn) + { + if (fn->type == 1) + { + int i; + int match = 0; + + for (i = 0; i < 14; i++) + { + if ((font_prop[i][0] == '*') && (font_prop[i][1] == 0)) + match++; + else + { + if (!strcasecmp(font_prop[i], fn->x.prop[i])) match++; + else break; + } + } + if (match == 14) return fn; + } + } + return NULL; +} + +static Evas_Font * +object_text_font_cache_font_find_file(Evas_Font_Dir *fd, char *font) +{ + Eina_List *l; + Evas_Font *fn; + + EINA_LIST_FOREACH(fd->fonts, l, fn) + { + if (fn->type == 0) + { + if (!strcasecmp(font, fn->simple.name)) return fn; + } + } + return NULL; +} + +static Evas_Font * +object_text_font_cache_font_find_alias(Evas_Font_Dir *fd, char *font) +{ + Eina_List *l; + Evas_Font_Alias *fa; + + EINA_LIST_FOREACH(fd->aliases, l, fa) + if (!strcasecmp(fa->alias, font)) return fa->fn; + return NULL; +} + +static Evas_Font * +object_text_font_cache_font_find(Evas_Font_Dir *fd, char *font) +{ + Evas_Font *fn; + + fn = eina_hash_find(fd->lookup, font); + if (fn) return fn; + fn = object_text_font_cache_font_find_alias(fd, font); + if (!fn) fn = object_text_font_cache_font_find_x(fd, font); + if (!fn) fn = object_text_font_cache_font_find_file(fd, font); + if (!fn) return NULL; + eina_hash_add(fd->lookup, font, fn); + return fn; +} + +static Evas_Font_Dir * +object_text_font_cache_dir_add(char *dir) +{ + Evas_Font_Dir *fd; + char *tmp, *tmp2; + Eina_List *fdir; + Evas_Font *fn; + + fd = calloc(1, sizeof(Evas_Font_Dir)); + if (!fd) return NULL; + fd->lookup = eina_hash_string_superfast_new(NULL); + + eina_hash_add(font_dirs, dir, fd); + + /* READ fonts.alias, fonts.dir and directory listing */ + + /* fonts.dir */ + tmp = evas_file_path_join(dir, "fonts.dir"); + if (tmp) + { + FILE *f; + + f = fopen(tmp, "rb"); + if (f) + { + int num; + char fname[4096], fdef[4096]; + + if (fscanf(f, "%i\n", &num) != 1) goto cant_read; + /* read font lines */ + while (fscanf(f, "%4090s %[^\n]\n", fname, fdef) == 2) + { + char font_prop[14][256]; + int i; + + /* skip comments */ + if ((fdef[0] == '!') || (fdef[0] == '#')) continue; + /* parse font def */ + num = evas_object_text_font_string_parse((char *)fdef, font_prop); + if (num == 14) + { + fn = calloc(1, sizeof(Evas_Font)); + if (fn) + { + fn->type = 1; + for (i = 0; i < 14; i++) + fn->x.prop[i] = eina_stringshare_add(font_prop[i]); + tmp2 = evas_file_path_join(dir, fname); + if (tmp2) + { + fn->path = eina_stringshare_add(tmp2); + free(tmp2); + } + fd->fonts = eina_list_append(fd->fonts, fn); + } + } + } + cant_read: ; + fclose(f); + } + free(tmp); + } + + /* directoy listing */ + fdir = evas_file_path_list(dir, "*.ttf", 0); + while (fdir) + { + tmp = evas_file_path_join(dir, fdir->data); + if (tmp) + { + fn = calloc(1, sizeof(Evas_Font)); + if (fn) + { + char *p; + + fn->type = 0; + tmp2 = alloca(strlen(fdir->data) + 1); + strcpy(tmp2, fdir->data); + p = strrchr(tmp2, '.'); + if (p) *p = 0; + fn->simple.name = eina_stringshare_add(tmp2); + tmp2 = evas_file_path_join(dir, fdir->data); + if (tmp2) + { + fn->path = eina_stringshare_add(tmp2); + free(tmp2); + } + fd->fonts = eina_list_append(fd->fonts, fn); + } + free(tmp); + } + free(fdir->data); + fdir = eina_list_remove(fdir, fdir->data); + } + + /* fonts.alias */ + tmp = evas_file_path_join(dir, "fonts.alias"); + if (tmp) + { + FILE *f; + + f = fopen(tmp, "rb"); + if (f) + { + char fname[4096], fdef[4096]; + + /* read font alias lines */ + while (fscanf(f, "%4090s %[^\n]\n", fname, fdef) == 2) + { + Evas_Font_Alias *fa; + + /* skip comments */ + if ((fname[0] == '!') || (fname[0] == '#')) continue; + fa = calloc(1, sizeof(Evas_Font_Alias)); + if (fa) + { + fa->alias = eina_stringshare_add(fname); + fa->fn = object_text_font_cache_font_find_x(fd, fdef); + if ((!fa->alias) || (!fa->fn)) + { + if (fa->alias) eina_stringshare_del(fa->alias); + free(fa); + } + else + fd->aliases = eina_list_append(fd->aliases, fa); + } + } + fclose(f); + } + free(tmp); + } + + fd->dir_mod_time = evas_file_modified_time(dir); + tmp = evas_file_path_join(dir, "fonts.dir"); + if (tmp) + { + fd->fonts_dir_mod_time = evas_file_modified_time(tmp); + free(tmp); + } + tmp = evas_file_path_join(dir, "fonts.alias"); + if (tmp) + { + fd->fonts_alias_mod_time = evas_file_modified_time(tmp); + free(tmp); + } + + return fd; +} + +static void +object_text_font_cache_dir_del(char *dir __UNUSED__, Evas_Font_Dir *fd) +{ + if (fd->lookup) eina_hash_free(fd->lookup); + while (fd->fonts) + { + Evas_Font *fn; + int i; + + fn = fd->fonts->data; + fd->fonts = eina_list_remove(fd->fonts, fn); + for (i = 0; i < 14; i++) + { + if (fn->x.prop[i]) eina_stringshare_del(fn->x.prop[i]); + } + if (fn->simple.name) eina_stringshare_del(fn->simple.name); + if (fn->path) eina_stringshare_del(fn->path); + free(fn); + } + while (fd->aliases) + { + Evas_Font_Alias *fa; + + fa = fd->aliases->data; + fd->aliases = eina_list_remove(fd->aliases, fa); + if (fa->alias) eina_stringshare_del(fa->alias); + free(fa); + } + free(fd); +} + +static int +evas_object_text_font_string_parse(char *buffer, char dest[14][256]) +{ + char *p; + int n, m, i; + + n = 0; + m = 0; + p = buffer; + if (p[0] != '-') return 0; + i = 1; + while (p[i]) + { + dest[n][m] = p[i]; + if ((p[i] == '-') || (m == 255)) + { + dest[n][m] = 0; + n++; + m = -1; + } + i++; + m++; + if (n == 14) return n; + } + dest[n][m] = 0; + n++; + return n; +} + +EAPI void +evas_font_path_clear(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + while (e->font_path) + { + eina_stringshare_del(e->font_path->data); + e->font_path = eina_list_remove(e->font_path, e->font_path->data); + } +} + +EAPI void +evas_font_path_append(Evas *e, const char *path) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (!path) return; + e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path)); +} + +EAPI void +evas_font_path_prepend(Evas *e, const char *path) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (!path) return; + e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path)); +} + +EAPI const Eina_List * +evas_font_path_list(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + return e->font_path; +} + +static void +evas_font_object_rehint(Evas_Object *obj) +{ + if (obj->smart.smart) + { + EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj) + evas_font_object_rehint(obj); + } + else + { + if (!strcmp(obj->type, "text")) + _evas_object_text_rehint(obj); + if (!strcmp(obj->type, "textblock")) + _evas_object_textblock_rehint(obj); + } +} + +EAPI void +evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting) +{ + Evas_Layer *lay; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + if (e->hinting == hinting) return; + e->hinting = hinting; + + EINA_INLIST_FOREACH(e->layers, lay) + { + Evas_Object *obj; + + EINA_INLIST_FOREACH(lay->objects, obj) + evas_font_object_rehint(obj); + } +} + +EAPI Evas_Font_Hinting_Flags +evas_font_hinting_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return EVAS_FONT_HINTING_BYTECODE; + MAGIC_CHECK_END(); + return e->hinting; +} + +EAPI Eina_Bool +evas_font_hinting_can_hint(const Evas *e, Evas_Font_Hinting_Flags hinting) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + if (e->engine.func->font_hinting_can_hint) + return e->engine.func->font_hinting_can_hint(e->engine.data.output, + hinting); + return EINA_FALSE; +} + +EAPI void +evas_font_cache_flush(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + e->engine.func->font_cache_flush(e->engine.data.output); +} + +EAPI void +evas_font_cache_set(Evas *e, int size) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (size < 0) size = 0; + e->engine.func->font_cache_set(e->engine.data.output, size); +} + +EAPI int +evas_font_cache_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + + return e->engine.func->font_cache_get(e->engine.data.output); +} + +EAPI Eina_List * +evas_font_available_list(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + + return evas_font_dir_available_list(e); +} + +EAPI void +evas_font_available_list_free(Evas *e, Eina_List *available) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + evas_font_dir_available_list_free(available); +} + diff --git a/libraries/evas/src/lib/canvas/evas_gl.c b/libraries/evas/src/lib/canvas/evas_gl.c new file mode 100644 index 0000000..47bb583 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_gl.c @@ -0,0 +1,245 @@ +/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ +#include "evas_common.h" +#include "evas_private.h" +#include "Evas_GL.h" + +struct _Evas_GL +{ + DATA32 magic; + Evas *evas; + + Eina_List *contexts; + Eina_List *surfaces; +}; + +struct _Evas_GL_Context +{ + void *data; +}; + +struct _Evas_GL_Surface +{ + void *data; +}; + +EAPI Evas_GL * +evas_gl_new(Evas *e) +{ + Evas_GL *evas_gl; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + + evas_gl = calloc(1, sizeof(Evas_GL)); + if (!evas_gl) return NULL; + + evas_gl->magic = MAGIC_EVAS_GL; + evas_gl->evas = e; + + return evas_gl; +} + +EAPI void +evas_gl_free(Evas_GL *evas_gl) +{ + MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); + return; + MAGIC_CHECK_END(); + + + // Delete undeleted surfaces + while (evas_gl->surfaces) + evas_gl_surface_destroy(evas_gl, evas_gl->surfaces->data); + + // Delete undeleted contexts + while (evas_gl->contexts) + evas_gl_context_destroy(evas_gl, evas_gl->contexts->data); + + evas_gl->magic = 0; + free(evas_gl); +} + +EAPI Evas_GL_Surface * +evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int height) +{ + Evas_GL_Surface *surf; + + MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); + return NULL; + MAGIC_CHECK_END(); + + if (!config) + { + ERR("Invalid Config\n"); + return NULL; + } + + surf = calloc(1, sizeof(Evas_GL_Surface)); + + surf->data = evas_gl->evas->engine.func->gl_surface_create(evas_gl->evas->engine.data.output, config, width, height); + + if (!surf->data) + { + ERR("Failed creating a surface from the engine\n"); + free(surf); + return NULL; + } + + // Keep track of the surface creations + evas_gl->surfaces = eina_list_prepend(evas_gl->surfaces, surf); + + return surf; +} + +EAPI void +evas_gl_surface_destroy(Evas_GL *evas_gl, Evas_GL_Surface *surf) +{ + // Magic + MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); + return; + MAGIC_CHECK_END(); + + if (!surf) + { + ERR("Trying to destroy a NULL surface pointer!\n"); + return; + } + + // Call Engine's Surface Destroy + evas_gl->evas->engine.func->gl_surface_destroy(evas_gl->evas->engine.data.output, surf->data); + + // Remove it from the list + evas_gl->surfaces = eina_list_remove(evas_gl->surfaces, surf); + + // Delete the object + free(surf); + surf = NULL; +} + +EAPI Evas_GL_Context * +evas_gl_context_create(Evas_GL *evas_gl, Evas_GL_Context *share_ctx) +{ + Evas_GL_Context *ctx; + + // Magic + MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); + return NULL; + MAGIC_CHECK_END(); + + // Allocate a context object + ctx = calloc(1, sizeof(Evas_GL_Context)); + if (!ctx) + { + ERR("Unable to create a Evas_GL_Context object\n"); + return NULL; + } + + // Call engine->gl_create_context + if (share_ctx) + { + ctx->data = evas_gl->evas->engine.func->gl_context_create(evas_gl->evas->engine.data.output, share_ctx->data); + } + else + { + ctx->data = evas_gl->evas->engine.func->gl_context_create(evas_gl->evas->engine.data.output, NULL); + } + + // Set a few variables + if (!ctx->data) + { + ERR("Failed creating a context from the engine\n"); + free(ctx); + return NULL; + } + + // Keep track of the context creations + evas_gl->contexts = eina_list_prepend(evas_gl->contexts, ctx); + + return ctx; + +} + +EAPI void +evas_gl_context_destroy(Evas_GL *evas_gl, Evas_GL_Context *ctx) +{ + + MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); + return; + MAGIC_CHECK_END(); + + if (!ctx) + { + ERR("Trying to destroy a NULL context pointer!\n"); + return; + } + + // Call Engine's destroy + evas_gl->evas->engine.func->gl_context_destroy(evas_gl->evas->engine.data.output, ctx->data); + + // Remove it from the list + evas_gl->contexts = eina_list_remove(evas_gl->contexts, ctx); + + // Delete the object + free(ctx); + ctx = NULL; +} + +EAPI Eina_Bool +evas_gl_make_current(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *ctx) +{ + Eina_Bool ret; + + MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); + return EINA_FALSE; + MAGIC_CHECK_END(); + + if ((!surf) || (!ctx)) + ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(evas_gl->evas->engine.data.output, NULL, NULL); + else + ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(evas_gl->evas->engine.data.output, surf->data, ctx->data); + + return ret; +} + +EAPI const char * +evas_gl_string_query(Evas_GL *evas_gl, int name) +{ + MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); + return EINA_FALSE; + MAGIC_CHECK_END(); + + return (const char *)evas_gl->evas->engine.func->gl_string_query(evas_gl->evas->engine.data.output, name); +} + +EAPI Evas_GL_Func +evas_gl_proc_address_get(Evas_GL *evas_gl, const char *name) +{ + MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); + return EINA_FALSE; + MAGIC_CHECK_END(); + + return (Evas_GL_Func)evas_gl->evas->engine.func->gl_proc_address_get(evas_gl->evas->engine.data.output, name); +} + +EAPI Eina_Bool +evas_gl_native_surface_get(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_Native_Surface *ns) +{ + MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); + return EINA_FALSE; + MAGIC_CHECK_END(); + + return (Eina_Bool)evas_gl->evas->engine.func->gl_native_surface_get(evas_gl->evas->engine.data.output, surf->data, ns); +} + + +EAPI Evas_GL_API * +evas_gl_api_get(Evas_GL *evas_gl) +{ + MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); + return NULL; + MAGIC_CHECK_END(); + + return (Evas_GL_API*)evas_gl->evas->engine.func->gl_api_get(evas_gl->evas->engine.data.output); + +} diff --git a/libraries/evas/src/lib/canvas/evas_key.c b/libraries/evas/src/lib/canvas/evas_key.c new file mode 100644 index 0000000..f74ef34 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_key.c @@ -0,0 +1,245 @@ +#include "evas_common.h" +#include "evas_private.h" + +/* private calls */ + +static int +evas_key_modifier_number(const Evas_Modifier *m, const char *keyname) +{ + int i; + + for (i = 0; i < m->mod.count; i++) + { + if (!strcmp(m->mod.list[i], keyname)) return i; + } + return -1; +} + +static int +evas_key_lock_number(const Evas_Lock *l, const char *keyname) +{ + int i; + + for (i = 0; i < l->lock.count; i++) + { + if (!strcmp(l->lock.list[i], keyname)) return i; + } + return -1; +} + +/* local calls */ + +/* public calls */ + +EAPI const Evas_Modifier * +evas_key_modifier_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + return &(e->modifiers); +} + +EAPI const Evas_Lock * +evas_key_lock_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + return &(e->locks); +} + +EAPI Eina_Bool +evas_key_modifier_is_set(const Evas_Modifier *m, const char *keyname) +{ + Evas_Modifier_Mask num; + int n; + + if (!m) return 0; + if (!keyname) return 0; + n = evas_key_modifier_number(m, keyname); + if (n < 0) return 0; + num = (Evas_Modifier_Mask)n; + num = 1 << num; + if (m->mask & num) return 1; + return 0; +} + +EAPI Eina_Bool +evas_key_lock_is_set(const Evas_Lock *l, const char *keyname) +{ + Evas_Modifier_Mask num; + int n; + + if (!l) return 0; + if (!keyname) return 0; + n = evas_key_lock_number(l, keyname); + if (n < 0) return 0; + num = (Evas_Modifier_Mask)n; + num = 1 << num; + if (l->mask & num) return 1; + return 0; +} + +EAPI void +evas_key_modifier_add(Evas *e, const char *keyname) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + if (!keyname) return; + if (e->modifiers.mod.count >= 64) return; + evas_key_modifier_del(e, keyname); + e->modifiers.mod.count++; + e->modifiers.mod.list = realloc(e->modifiers.mod.list, e->modifiers.mod.count * sizeof(char *)); + e->modifiers.mod.list[e->modifiers.mod.count - 1] = strdup(keyname); + e->modifiers.mask = 0; +} + +EAPI void +evas_key_modifier_del(Evas *e, const char *keyname) +{ + int i; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + if (!keyname) return; + for (i = 0; i < e->modifiers.mod.count; i++) + { + if (!strcmp(e->modifiers.mod.list[i], keyname)) + { + int j; + + free(e->modifiers.mod.list[i]); + e->modifiers.mod.count--; + for (j = i; j < e->modifiers.mod.count; j++) + e->modifiers.mod.list[j] = e->modifiers.mod.list[j + 1]; + e->modifiers.mask = 0; + return; + } + } +} + +EAPI void +evas_key_lock_add(Evas *e, const char *keyname) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + if (!keyname) return; + if (e->locks.lock.count >= 64) return; + evas_key_lock_del(e, keyname); + e->locks.lock.count++; + e->locks.lock.list = realloc(e->locks.lock.list, e->locks.lock.count * sizeof(char *)); + e->locks.lock.list[e->locks.lock.count - 1] = strdup(keyname); + e->locks.mask = 0; +} + +EAPI void +evas_key_lock_del(Evas *e, const char *keyname) +{ + int i; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + if (!keyname) return; + e->locks.mask = 0; + for (i = 0; i < e->locks.lock.count; i++) + { + if (!strcmp(e->locks.lock.list[i], keyname)) + { + int j; + + free(e->locks.lock.list[i]); + e->locks.lock.count--; + for (j = i; j < e->locks.lock.count; j++) + e->locks.lock.list[j] = e->locks.lock.list[j + 1]; + e->locks.mask = 0; + return; + } + } +} + +EAPI void +evas_key_modifier_on(Evas *e, const char *keyname) +{ + Evas_Modifier_Mask num; + int n; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + n = (Evas_Modifier_Mask)evas_key_modifier_number(&(e->modifiers), keyname); + if (n < 0) return; + num = (Evas_Modifier_Mask)n; + num = 1 << num; + e->modifiers.mask |= num; +} + +EAPI void +evas_key_modifier_off(Evas *e, const char *keyname) +{ + Evas_Modifier_Mask num; + int n; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + n = evas_key_modifier_number(&(e->modifiers), keyname); + if (n < 0) return; + num = (Evas_Modifier_Mask)n; + num = 1 << num; + e->modifiers.mask &= ~num; +} + +EAPI void +evas_key_lock_on(Evas *e, const char *keyname) +{ + Evas_Modifier_Mask num; + int n; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + n = evas_key_lock_number(&(e->locks), keyname); + if (n < 0) return; + num = (Evas_Modifier_Mask)n; + num = 1 << num; + e->locks.mask |= num; +} + +EAPI void +evas_key_lock_off(Evas *e, const char *keyname) +{ + Evas_Modifier_Mask num; + int n; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + n = evas_key_lock_number(&(e->locks), keyname); + if (n < 0) return; + num = (Evas_Modifier_Mask)n; + num = 1 << num; + e->locks.mask &= ~num; +} + +/* errr need to add key grabbing/ungrabbing calls - missing modifier stuff. */ + +EAPI Evas_Modifier_Mask +evas_key_modifier_mask_get(const Evas *e, const char *keyname) +{ + Evas_Modifier_Mask num; + int n; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + if (!keyname) return 0; + n = evas_key_modifier_number(&(e->modifiers), keyname); + if (n < 0) return 0; + num = (Evas_Modifier_Mask)n; + return 1 << num; +} diff --git a/libraries/evas/src/lib/canvas/evas_key_grab.c b/libraries/evas/src/lib/canvas/evas_key_grab.c new file mode 100644 index 0000000..3fc2172 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_key_grab.c @@ -0,0 +1,179 @@ +#include "evas_common.h" +#include "evas_private.h" + +/* private calls */ + +/* FIXME: this is not optimal, but works. i should have a hash of keys per */ +/* Evas and then a linked lists of grabs for that key and what */ +/* modifiers/not_modifers they use */ + +static Evas_Key_Grab *evas_key_grab_new (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive); +static Evas_Key_Grab *evas_key_grab_find (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive); + +static Evas_Key_Grab * +evas_key_grab_new(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) +{ + /* MEM OK */ + Evas_Key_Grab *g; + + g = evas_mem_calloc(sizeof(Evas_Key_Grab)); + if (!g) return NULL; + g->object = obj; + g->modifiers = modifiers; + g->not_modifiers = not_modifiers; + g->exclusive = exclusive; + g->keyname = strdup(keyname); + if (obj->layer->evas->walking_grabs) + g->just_added = EINA_TRUE; + if (!g->keyname) + { + if (!evas_mem_free(strlen(keyname) + 1)) + { + free(g); + return NULL; + } + g->keyname = strdup(keyname); + if (!g->keyname) + { + free(g); + return NULL; + } + } + g->object->grabs = eina_list_append(g->object->grabs, g); + if (eina_error_get()) + { + MERR_BAD(); + evas_mem_free(sizeof(Eina_List)); + g->object->grabs = eina_list_append(g->object->grabs, g); + if (eina_error_get()) + { + MERR_FATAL(); + free(g->keyname); + free(g); + return NULL; + } + } + obj->layer->evas->grabs = eina_list_append(obj->layer->evas->grabs, g); + if (eina_error_get()) + { + MERR_BAD(); + evas_mem_free(sizeof(Eina_List)); + obj->layer->evas->grabs = eina_list_append(obj->layer->evas->grabs, g); + if (eina_error_get()) + { + MERR_FATAL(); + g->object->grabs = eina_list_remove(g->object->grabs, g); + free(g->keyname); + free(g); + return NULL; + } + } + return g; +} + +static Evas_Key_Grab * +evas_key_grab_find(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) +{ + /* MEM OK */ + Eina_List *l; + Evas_Key_Grab *g; + + EINA_LIST_FOREACH(obj->layer->evas->grabs, l, g) + { + if ((g->modifiers == modifiers) && + (g->not_modifiers == not_modifiers) && + (!strcmp(g->keyname, keyname))) + { + if ((exclusive) || (obj == g->object)) return g; + } + } + return NULL; +} + +/* local calls */ + +void +evas_object_grabs_cleanup(Evas_Object *obj) +{ + if (obj->layer->evas->walking_grabs) + { + Eina_List *l; + Evas_Key_Grab *g; + + EINA_LIST_FOREACH(obj->grabs, l, g) + g->delete_me = EINA_TRUE; + } + else + { + while (obj->grabs) + { + Evas_Key_Grab *g = obj->grabs->data; + if (g->keyname) free(g->keyname); + free(g); + obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, + g); + obj->grabs = eina_list_remove(obj->grabs, g); + } + } +} + +void +evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) +{ + /* MEM OK */ + Evas_Key_Grab *g; + + g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, 0); + if (!g) return; + g->object->grabs = eina_list_remove(g->object->grabs, g); + obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, g); + if (g->keyname) free(g->keyname); + free(g); +} + +/* public calls */ + +EAPI Eina_Bool +evas_object_key_grab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) +{ + /* MEM OK */ + Evas_Key_Grab *g; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + if (!keyname) return EINA_FALSE; + if (exclusive) + { + g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, + exclusive); + if (g) return EINA_FALSE; + } + g = evas_key_grab_new(obj, keyname, modifiers, not_modifiers, exclusive); + if (!g) return EINA_FALSE; + return EINA_TRUE; +} + +EAPI void +evas_object_key_ungrab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) +{ + /* MEM OK */ + Evas_Key_Grab *g; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!keyname) return; + g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, 0); + if (!g) return; + if (g->object->layer->evas->walking_grabs) + { + if (!g->delete_me) + { + g->object->layer->evas->delete_grabs++; + g->delete_me = EINA_TRUE; + } + } + else + evas_key_grab_free(g->object, keyname, modifiers, not_modifiers); +} diff --git a/libraries/evas/src/lib/canvas/evas_layer.c b/libraries/evas/src/lib/canvas/evas_layer.c new file mode 100644 index 0000000..54e9907 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_layer.c @@ -0,0 +1,193 @@ +#include "evas_common.h" +#include "evas_private.h" + +static void _evas_layer_free(Evas_Layer *lay); + +void +evas_object_inject(Evas_Object *obj, Evas *e) +{ + Evas_Layer *lay; + + if (obj->in_layer) return; + lay = evas_layer_find(e, obj->cur.layer); + if (!lay) + { + lay = evas_layer_new(e); + lay->layer = obj->cur.layer; + evas_layer_add(lay); + } + lay->objects = (Evas_Object *)eina_inlist_append(EINA_INLIST_GET(lay->objects), EINA_INLIST_GET(obj)); + lay->usage++; + obj->layer = lay; + obj->in_layer = 1; +} + +void +evas_object_release(Evas_Object *obj, int clean_layer) +{ + if (!obj->in_layer) return; + obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj)); + obj->layer->usage--; + if (clean_layer) + { + if (obj->layer->usage <= 0) + { + evas_layer_del(obj->layer); + _evas_layer_free(obj->layer); + } + } + obj->layer = NULL; + obj->in_layer = 0; +} + +Evas_Layer * +evas_layer_new(Evas *e) +{ + Evas_Layer *lay; + + lay = calloc(1, sizeof(Evas_Layer)); + if (!lay) return NULL; + lay->evas = e; + return lay; +} + +static void +_evas_layer_free(Evas_Layer *lay) +{ + free(lay); +} + +void +evas_layer_pre_free(Evas_Layer *lay) +{ + Evas_Object *obj; + + EINA_INLIST_FOREACH(lay->objects, obj) + { + if ((!obj->smart.parent) && (!obj->delete_me)) + evas_object_del(obj); + } +} + +void +evas_layer_free_objects(Evas_Layer *lay) +{ + while (lay->objects) + { + Evas_Object *obj; + + obj = (Evas_Object *)lay->objects; + evas_object_free(obj, 0); + } +} + +void +evas_layer_clean(Evas *e) +{ + Evas_Layer *tmp; + + while (e->layers) + { + tmp = e->layers; + evas_layer_del(tmp); + _evas_layer_free(tmp); + } +} + +Evas_Layer * +evas_layer_find(Evas *e, short layer_num) +{ + Evas_Layer *layer; + + EINA_INLIST_FOREACH(e->layers, layer) + { + if (layer->layer == layer_num) return layer; + } + return NULL; +} + +void +evas_layer_add(Evas_Layer *lay) +{ + Evas_Layer *layer; + + EINA_INLIST_FOREACH(lay->evas->layers, layer) + { + if (layer->layer > lay->layer) + { + lay->evas->layers = (Evas_Layer *)eina_inlist_prepend_relative(EINA_INLIST_GET(lay->evas->layers), + EINA_INLIST_GET(lay), + EINA_INLIST_GET(layer)); + return; + } + } + lay->evas->layers = (Evas_Layer *)eina_inlist_append(EINA_INLIST_GET(lay->evas->layers), EINA_INLIST_GET(lay)); +} + +void +evas_layer_del(Evas_Layer *lay) +{ + Evas *e; + + e = lay->evas; + e->layers = (Evas_Layer *)eina_inlist_remove(EINA_INLIST_GET(e->layers), EINA_INLIST_GET(lay)); +} + +/* public functions */ + +EAPI void +evas_object_layer_set(Evas_Object *obj, short l) +{ + Evas *e; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) return; + if (evas_object_intercept_call_layer_set(obj, l)) return; + if (obj->smart.parent) return; + if (obj->cur.layer == l) + { + evas_object_raise(obj); + return; + } + e = obj->layer->evas; + evas_object_release(obj, 1); + obj->cur.layer = l; + evas_object_inject(obj, e); + obj->restack = 1; + evas_object_change(obj); + if (obj->clip.clipees) + { + evas_object_inform_call_restack(obj); + return; + } + evas_object_change(obj); + if (!obj->smart.smart) + { + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1) && + obj->cur.visible) + if (eina_list_data_find(obj->layer->evas->pointer.object.in, obj)) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + evas_object_inform_call_restack(obj); +} + +EAPI short +evas_object_layer_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + if (obj->smart.parent) + { + return obj->smart.parent->cur.layer; + } + return obj->cur.layer; +} diff --git a/libraries/evas/src/lib/canvas/evas_main.c b/libraries/evas/src/lib/canvas/evas_main.c new file mode 100644 index 0000000..0a37b2c --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_main.c @@ -0,0 +1,671 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_cs.h" + +#ifdef LKDEBUG +EAPI Eina_Bool lockdebug = EINA_FALSE; +EAPI int lockmax = 0; +#endif + +static int _evas_init_count = 0; +int _evas_log_dom_global = -1; +EAPI int +evas_init(void) +{ + if (++_evas_init_count != 1) + return _evas_init_count; + +#ifdef LKDEBUG + if (getenv("EVAS_LOCK_DEBUG")) + { + lockdebug = EINA_TRUE; + lockmax = atoi(getenv("EVAS_LOCK_DEBUG")); + } +#endif + +#ifdef HAVE_EVIL + if (!evil_init()) + return --_evas_init_count; +#endif + + if (!eina_init()) + goto shutdown_evil; + + _evas_log_dom_global = eina_log_domain_register + ("evas_main", EVAS_DEFAULT_LOG_COLOR); + if (_evas_log_dom_global < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + goto shutdown_eina; + } + + evas_module_init(); +#ifdef BUILD_ASYNC_EVENTS + if (!evas_async_events_init()) + goto shutdown_module; +#endif +#ifdef EVAS_CSERVE + if (getenv("EVAS_CSERVE")) evas_cserve_init(); +#endif +#ifdef BUILD_ASYNC_PRELOAD + _evas_preload_thread_init(); +#endif +#ifdef EVAS_FRAME_QUEUING + evas_common_frameq_init(); +#endif + + return _evas_init_count; + +#ifdef BUILD_ASYNC_EVENTS + shutdown_module: + evas_module_shutdown(); + eina_log_domain_unregister(_evas_log_dom_global); +#endif + shutdown_eina: + eina_shutdown(); + shutdown_evil: +#ifdef HAVE_EVIL + evil_shutdown(); +#endif + + return --_evas_init_count; +} + +EAPI int +evas_shutdown(void) +{ + if (--_evas_init_count != 0) + return _evas_init_count; + +#ifdef EVAS_FRAME_QUEUING + if (evas_common_frameq_enabled()) + { + evas_common_frameq_finish(); + evas_common_frameq_destroy(); + } +#endif +#ifdef BUILD_ASYNC_EVENTS + _evas_preload_thread_shutdown(); +#endif +#ifdef EVAS_CSERVE + if (getenv("EVAS_CSERVE")) evas_cserve_shutdown(); +#endif +#ifdef BUILD_ASYNC_EVENTS + evas_async_events_shutdown(); +#endif + evas_font_dir_cache_free(); + evas_common_shutdown(); + evas_module_shutdown(); + eina_log_domain_unregister(_evas_log_dom_global); + eina_shutdown(); +#ifdef HAVE_EVIL + evil_shutdown(); +#endif + + return _evas_init_count; +} + + +EAPI Evas * +evas_new(void) +{ + Evas *e; + + e = calloc(1, sizeof(Evas)); + if (!e) return NULL; + + e->magic = MAGIC_EVAS; + e->output.render_method = RENDER_METHOD_INVALID; + e->viewport.w = 1; + e->viewport.h = 1; + e->hinting = EVAS_FONT_HINTING_BYTECODE; + e->name_hash = eina_hash_string_superfast_new(NULL); + eina_clist_init(&e->calc_list); + eina_clist_init(&e->calc_done); + +#define EVAS_ARRAY_SET(E, Array) \ + eina_array_step_set(&E->Array, sizeof (E->Array), 4096); + + EVAS_ARRAY_SET(e, delete_objects); + EVAS_ARRAY_SET(e, active_objects); + EVAS_ARRAY_SET(e, restack_objects); + EVAS_ARRAY_SET(e, render_objects); + EVAS_ARRAY_SET(e, pending_objects); + EVAS_ARRAY_SET(e, obscuring_objects); + EVAS_ARRAY_SET(e, temporary_objects); + EVAS_ARRAY_SET(e, calculate_objects); + EVAS_ARRAY_SET(e, clip_changes); + +#undef EVAS_ARRAY_SET + + return e; +} + +EAPI void +evas_free(Evas *e) +{ + Eina_Rectangle *r; + Evas_Coord_Touch_Point *touch_point; + Evas_Layer *lay; + int i; + int del; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + +#ifdef EVAS_FRAME_QUEUING + evas_common_frameq_flush(); +#endif + + if (e->walking_list == 0) evas_render_idle_flush(e); + + if (e->walking_list > 0) return; + + if (e->callbacks) + { + if (e->callbacks->deletions_waiting) return; + + e->callbacks->deletions_waiting = 0; + evas_event_callback_list_post_free(&e->callbacks->callbacks); + if (!e->callbacks->callbacks) + { + free(e->callbacks); + e->callbacks = NULL; + } + + _evas_post_event_callback_free(e); + } + + del = 1; + e->walking_list++; + e->cleanup = 1; + while (del) + { + del = 0; + EINA_INLIST_FOREACH(e->layers, lay) + { + Evas_Object *o; + + evas_layer_pre_free(lay); + + EINA_INLIST_FOREACH(lay->objects, o) + { + if ((o->callbacks) && (o->callbacks->walking_list)) + { + /* Defer free */ + e->delete_me = 1; + e->walking_list--; + return; + } + if (!o->delete_me) + del = 1; + } + } + } + EINA_INLIST_FOREACH(e->layers, lay) + evas_layer_free_objects(lay); + evas_layer_clean(e); + + e->walking_list--; + + evas_font_path_clear(e); + e->pointer.object.in = eina_list_free(e->pointer.object.in); + + if (e->name_hash) eina_hash_free(e->name_hash); + e->name_hash = NULL; + + EINA_LIST_FREE(e->damages, r) + eina_rectangle_free(r); + EINA_LIST_FREE(e->obscures, r) + eina_rectangle_free(r); + + evas_fonts_zero_free(e); + + evas_event_callback_all_del(e); + evas_event_callback_cleanup(e); + + if (e->engine.func) + { + e->engine.func->context_free(e->engine.data.output, e->engine.data.context); + e->engine.func->output_free(e->engine.data.output); + e->engine.func->info_free(e, e->engine.info); + } + + for (i = 0; i < e->modifiers.mod.count; i++) + free(e->modifiers.mod.list[i]); + if (e->modifiers.mod.list) free(e->modifiers.mod.list); + + for (i = 0; i < e->locks.lock.count; i++) + free(e->locks.lock.list[i]); + if (e->locks.lock.list) free(e->locks.lock.list); + + if (e->engine.module) evas_module_unref(e->engine.module); + + eina_array_flush(&e->delete_objects); + eina_array_flush(&e->active_objects); + eina_array_flush(&e->restack_objects); + eina_array_flush(&e->render_objects); + eina_array_flush(&e->pending_objects); + eina_array_flush(&e->obscuring_objects); + eina_array_flush(&e->temporary_objects); + eina_array_flush(&e->calculate_objects); + eina_array_flush(&e->clip_changes); + + EINA_LIST_FREE(e->touch_points, touch_point) + free(touch_point); + + e->magic = 0; + free(e); +} + +EAPI void +evas_output_method_set(Evas *e, int render_method) +{ + Evas_Module *em; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + /* if our engine to set it to is invalid - abort */ + if (render_method == RENDER_METHOD_INVALID) return; + /* if the engine is already set up - abort */ + if (e->output.render_method != RENDER_METHOD_INVALID) return; + /* Request the right engine. */ + em = evas_module_engine_get(render_method); + if (!em) return ; + if (em->id_engine != render_method) return; + if (!evas_module_load(em)) return; + + /* set the correct render */ + e->output.render_method = render_method; + e->engine.func = (em->functions); + evas_module_use(em); + if (e->engine.module) evas_module_unref(e->engine.module); + e->engine.module = em; + evas_module_ref(em); + /* get the engine info struct */ + if (e->engine.func->info) e->engine.info = e->engine.func->info(e); + return; +} + +EAPI int +evas_output_method_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return RENDER_METHOD_INVALID; + MAGIC_CHECK_END(); + + return e->output.render_method; +} + +EAPI Evas_Engine_Info * +evas_engine_info_get(const Evas *e) +{ + Evas_Engine_Info *info; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + + if (!e->engine.info) return NULL; + + info = e->engine.info; + ((Evas *)e)->engine.info_magic = info->magic; + + return info; +} + +EAPI Eina_Bool +evas_engine_info_set(Evas *e, Evas_Engine_Info *info) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return EINA_FALSE; + MAGIC_CHECK_END(); + if (!info) return EINA_FALSE; + if (info != e->engine.info) return EINA_FALSE; + if (info->magic != e->engine.info_magic) return EINA_FALSE; + return (Eina_Bool)e->engine.func->setup(e, info); +} + +EAPI void +evas_output_size_set(Evas *e, int w, int h) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if ((w == e->output.w) && (h == e->output.h)) return; + if (w < 1) w = 1; + if (h < 1) h = 1; + +#ifdef EVAS_FRAME_QUEUING + evas_common_frameq_flush(); +#endif + + e->output.w = w; + e->output.h = h; + e->output.changed = 1; + e->output_validity++; + e->changed = 1; + evas_render_invalidate(e); +} + +EAPI void +evas_output_size_get(const Evas *e, int *w, int *h) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + if (w) *w = 0; + if (h) *h = 0; + return; + MAGIC_CHECK_END(); + + if (w) *w = e->output.w; + if (h) *h = e->output.h; +} + +EAPI void +evas_output_viewport_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if ((x == e->viewport.x) && (y == e->viewport.y) && + (w == e->viewport.w) && (h == e->viewport.h)) return; + if (w <= 0) return; + if (h <= 0) return; + if ((x != 0) || (y != 0)) + { + ERR("Compat error. viewport x,y != 0,0 not supported"); + x = 0; + y = 0; + } + e->viewport.x = x; + e->viewport.y = y; + e->viewport.w = w; + e->viewport.h = h; + e->viewport.changed = 1; + e->output_validity++; + e->changed = 1; +} + +EAPI void +evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = 0; + if (h) *h = 0; + return; + MAGIC_CHECK_END(); + + if (x) *x = e->viewport.x; + if (y) *y = e->viewport.y; + if (w) *w = e->viewport.w; + if (h) *h = e->viewport.h; +} + +EAPI Evas_Coord +evas_coord_screen_x_to_world(const Evas *e, int x) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + if (e->output.w == e->viewport.w) return e->viewport.x + x; + return (long long)e->viewport.x + (((long long)x * (long long)e->viewport.w) / (long long)e->output.w); +} + +EAPI Evas_Coord +evas_coord_screen_y_to_world(const Evas *e, int y) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + if (e->output.h == e->viewport.h) return e->viewport.y + y; + return (long long)e->viewport.y + (((long long)y * (long long)e->viewport.h) / (long long)e->output.h); +} + +EAPI int +evas_coord_world_x_to_screen(const Evas *e, Evas_Coord x) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + if (e->output.w == e->viewport.w) return x - e->viewport.x; + return (int)((((long long)x - (long long)e->viewport.x) * (long long)e->output.w) / (long long)e->viewport.w); +} + +EAPI int +evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + if (e->output.h == e->viewport.h) return y - e->viewport.y; + return (int)((((long long)y - (long long)e->viewport.y) * (long long)e->output.h) / (long long)e->viewport.h); +} + +EAPI int +evas_render_method_lookup(const char *name) +{ + Evas_Module *em; + + if (!name) return RENDER_METHOD_INVALID; + /* search on the engines list for the name */ + em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name); + if (!em) return RENDER_METHOD_INVALID; + + return em->id_engine; +} + +EAPI Eina_List * +evas_render_method_list(void) +{ + return evas_module_engine_list(); +} + +EAPI void +evas_render_method_list_free(Eina_List *list) +{ + eina_list_free(list); +} + +EAPI Eina_Bool +evas_object_image_extension_can_load_get(const char *file) +{ + const char *tmp; + Eina_Bool result; + + tmp = eina_stringshare_add(file); + result = evas_common_extension_can_load_get(tmp); + eina_stringshare_del(tmp); + + return result; +} + +EAPI Eina_Bool +evas_object_image_extension_can_load_fast_get(const char *file) +{ + return evas_common_extension_can_load_get(file); +} + +EAPI void +evas_pointer_output_xy_get(const Evas *e, int *x, int *y) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + if (x) *x = 0; + if (y) *y = 0; + return; + MAGIC_CHECK_END(); + if (x) *x = e->pointer.x; + if (y) *y = e->pointer.y; +} + +EAPI void +evas_pointer_canvas_xy_get(const Evas *e, Evas_Coord *x, Evas_Coord *y) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + if (x) *x = 0; + if (y) *y = 0; + return; + MAGIC_CHECK_END(); + if (x) *x = e->pointer.x; + if (y) *y = e->pointer.y; +} + +EAPI int +evas_pointer_button_down_mask_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + return (int)e->pointer.button; +} + +EAPI Eina_Bool +evas_pointer_inside_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + return (int)e->pointer.inside; +} + +EAPI void +evas_data_attach_set(Evas *e, void *data) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + e->attach_data = data; +} + +EAPI void * +evas_data_attach_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + return e->attach_data; +} + +EAPI void +evas_focus_in(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + if (e->focus) return; + e->focus = 1; + evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_IN, NULL); +} + +EAPI void +evas_focus_out(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + if (!e->focus) return; + e->focus = 0; + evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_OUT, NULL); +} + +EAPI Eina_Bool +evas_focus_state_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + return e->focus; +} + +EAPI void +evas_nochange_push(Evas *e) +{ + e->nochange++; +} + +EAPI void +evas_nochange_pop(Evas *e) +{ + e->nochange--; +} + +void +_evas_walk(Evas *e) +{ + e->walking_list++; +} + +void +_evas_unwalk(Evas *e) +{ + e->walking_list--; + if ((e->walking_list == 0) && (e->delete_me)) evas_free(e); +} + +EAPI const char * +evas_load_error_str(Evas_Load_Error error) +{ + switch (error) + { + case EVAS_LOAD_ERROR_NONE: + return "No error on load"; + case EVAS_LOAD_ERROR_GENERIC: + return "A non-specific error occurred"; + case EVAS_LOAD_ERROR_DOES_NOT_EXIST: + return "File (or file path) does not exist"; + case EVAS_LOAD_ERROR_PERMISSION_DENIED: + return "Permission deinied to an existing file (or path)"; + case EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED: + return "Allocation of resources failure prevented load"; + case EVAS_LOAD_ERROR_CORRUPT_FILE: + return "File corrupt (but was detected as a known format)"; + case EVAS_LOAD_ERROR_UNKNOWN_FORMAT: + return "File is not a known format"; + default: + return "Unknown error"; + } +} + +EAPI void +evas_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b) +{ + evas_common_convert_color_hsv_to_rgb(h, s, v, r, g, b); +} + +EAPI void +evas_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v) +{ + evas_common_convert_color_rgb_to_hsv(r, g, b, h, s, v); +} + +EAPI void +evas_color_argb_premul(int a, int *r, int *g, int *b) +{ + evas_common_convert_color_argb_premul(a, r, g, b); +} + +EAPI void +evas_color_argb_unpremul(int a, int *r, int *g, int *b) +{ + evas_common_convert_color_argb_unpremul(a, r, g, b); +} + +EAPI void +evas_data_argb_premul(unsigned int *data, unsigned int len) +{ + if (!data || (len < 1)) return; + evas_common_convert_argb_premul(data, len); +} + +EAPI void +evas_data_argb_unpremul(unsigned int *data, unsigned int len) +{ + if (!data || (len < 1)) return; + evas_common_convert_argb_unpremul(data, len); +} diff --git a/libraries/evas/src/lib/canvas/evas_map.c b/libraries/evas/src/lib/canvas/evas_map.c new file mode 100644 index 0000000..fca8b3a --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_map.c @@ -0,0 +1,1031 @@ +#include "evas_common.h" +#include "evas_private.h" +#include + +static void +_evas_map_calc_geom_change(Evas_Object *obj) +{ + int is, was = 0, pass = 0; + + evas_object_change(obj); + evas_object_clip_dirty(obj); + if (obj->layer->evas->events_frozen <= 0) + { + evas_object_recalc_clippees(obj); + if (!pass) + { + if (!obj->smart.smart) + { + is = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + if ((is ^ was) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + } + } + evas_object_inform_call_move(obj); + evas_object_inform_call_resize(obj); +} + +static void +_evas_map_calc_map_geometry(Evas_Object *obj) +{ + Evas_Coord x1, x2, y1, y2; + const Evas_Map_Point *p, *p_end; + Eina_Bool ch = EINA_FALSE; + + if (!obj->cur.map) return; + + // WARN: Do not merge below code to SLP until it is fixed. + // It has an infinite loop bug. + if (obj->prev.map) + { + // FIXME: this causes an infinite loop somewhere... hard to debug + if (obj->prev.map->count == obj->cur.map->count) + { + const Evas_Map_Point *p2; + + p = obj->cur.map->points; + p_end = p + obj->cur.map->count; + p2 = obj->prev.map->points; + + for (; p < p_end; p++, p2++) + { + if ((p->a != p2->a) || + (p->r != p2->r) || + (p->g != p2->g) || + (p->b != p2->b)) + { + ch = 1; + break; + } + if ((p->x != p2->x) || + (p->y != p2->y) || + (p->z != p2->z)) + { + ch = 1; + break; + } + } + } + else + ch = 1; + } + else + ch = 1; + + p = obj->cur.map->points; + p_end = p + obj->cur.map->count; + x1 = lround(p->x); + x2 = lround(p->x); + y1 = lround(p->y); + y2 = lround(p->y); + p++; + for (; p < p_end; p++) + { + if (p->x < x1) x1 = p->x; + if (p->x > x2) x2 = p->x; + if (p->y < y1) y1 = p->y; + if (p->y > y2) y2 = p->y; + } +// this causes clip-out bugs now mapped objs canbe opaque!!! +// // add 1 pixel of fuzz around the map region to ensure updates are correct +// x1 -= 1; y1 -= 1; +// x2 += 1; y2 += 1; + if (obj->cur.map->normal_geometry.x != x1) ch = 1; + if (obj->cur.map->normal_geometry.y != y1) ch = 1; + if (obj->cur.map->normal_geometry.w != (x2 - x1)) ch = 1; + if (obj->cur.map->normal_geometry.h != (y2 - y1)) ch = 1; + obj->cur.map->normal_geometry.x = x1; + obj->cur.map->normal_geometry.y = y1; + obj->cur.map->normal_geometry.w = (x2 - x1); + obj->cur.map->normal_geometry.h = (y2 - y1); + if (ch) _evas_map_calc_geom_change(obj); +} + +static inline Evas_Map * +_evas_map_new(int count) +{ + int i; + int alloc; + Evas_Map *m; + + /* Adjust allocation such that: at least 4 points, and always an even + * number: this allows the software engine to work efficiently */ + alloc = (count < 4) ? 4 : count; + if (alloc & 0x1) alloc ++; + + m = calloc(1, sizeof(Evas_Map) + (alloc * sizeof(Evas_Map_Point))); + if (!m) return NULL; + m->count = count; + m->persp.foc = 0; + m->alpha = 1; + m->smooth = 1; + m->magic = MAGIC_MAP; + for (i = 0; i < count; i++) + { + m->points[i].r = 255; + m->points[i].g = 255; + m->points[i].b = 255; + m->points[i].a = 255; + } + return m; +} + +static inline Eina_Bool +_evas_map_copy(Evas_Map *dst, const Evas_Map *src) +{ + if (dst->count != src->count) + { + ERR("cannot copy map of different sizes: dst=%i, src=%i", dst->count, src->count); + return EINA_FALSE; + } + memcpy(dst->points, src->points, src->count * sizeof(Evas_Map_Point)); + dst->smooth = src->smooth; + dst->alpha = src->alpha; + dst->persp = src->persp; + return EINA_TRUE; +} + +static inline Evas_Map * +_evas_map_dup(const Evas_Map *orig) +{ + Evas_Map *copy = _evas_map_new(orig->count); + if (!copy) return NULL; + memcpy(copy->points, orig->points, orig->count * sizeof(Evas_Map_Point)); + copy->smooth = orig->smooth; + copy->alpha = orig->alpha; + copy->persp = orig->persp; + return copy; +} + +static inline void +_evas_map_free(Evas_Object *obj, Evas_Map *m) +{ + if (obj) + { + if (m->surface) + obj->layer->evas->engine.func->image_map_surface_free + (obj->layer->evas->engine.data.output, m->surface); + } + m->magic = 0; + free(m); +} + +/****************************************************************************/ +/* util functions for manipulating maps, so you don't need to know the math */ +/****************************************************************************/ +static inline void +_evas_map_util_points_populate(Evas_Map *m, const Evas_Coord x, const Evas_Coord y, const Evas_Coord w, const Evas_Coord h, const Evas_Coord z) +{ + Evas_Map_Point *p = m->points; + int i; + + p[0].x = x; + p[0].y = y; + p[0].z = z; + p[0].u = 0.0; + p[0].v = 0.0; + + p[1].x = x + w; + p[1].y = y; + p[1].z = z; + p[1].u = w; + p[1].v = 0.0; + + p[2].x = x + w; + p[2].y = y + h; + p[2].z = z; + p[2].u = w; + p[2].v = h; + + p[3].x = x; + p[3].y = y + h; + p[3].z = z; + p[3].u = 0.0; + p[3].v = h; + + for (i = 0; i < 4; i++) + { + p[i].px = p[i].x; + p[i].py = p[i].y; + } +} + +Eina_Bool +evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, + Evas_Coord *mx, Evas_Coord *my, int grab) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return EINA_FALSE; + MAGIC_CHECK_END(); + + int i, j, edges, edge[m->count][2], douv; + Evas_Coord xe[2]; + double u[2] = { 0.0, 0.0 }; + double v[2] = { 0.0, 0.0 }; + + if (m->count < 4) return 0; + // FIXME need to handle grab mode and extrapolte coords outside + // map + if (grab) + { + Evas_Coord ymin, ymax; + + ymin = m->points[0].y; + ymax = m->points[0].y; + for (i = 1; i < m->count; i++) + { + if (m->points[i].y < ymin) ymin = m->points[i].y; + else if (m->points[i].y > ymax) ymax = m->points[i].y; + } + if (y <= ymin) y = ymin + 1; + if (y >= ymax) y = ymax - 1; + } + edges = 0; + for (i = 0; i < m->count; i++) + { + j = (i + 1) % m->count; + if ((m->points[i].y <= y) && (m->points[j].y > y)) + { + edge[edges][0] = i; + edge[edges][1] = j; + edges++; + } + else if ((m->points[j].y <= y) && (m->points[i].y > y)) + { + edge[edges][0] = j; + edge[edges][1] = i; + edges++; + } + } + douv = 0; + if ((mx) || (my)) douv = 1; + for (i = 0; i < (edges - 1); i+= 2) + { + Evas_Coord yp, yd; + + j = i + 1; + yd = m->points[edge[i][1]].y - m->points[edge[i][0]].y; + if (yd > 0) + { + yp = y - m->points[edge[i][0]].y; + xe[0] = m->points[edge[i][1]].x - m->points[edge[i][0]].x; + xe[0] = m->points[edge[i][0]].x + ((xe[0] * yp) / yd); + if (douv) + { + u[0] = m->points[edge[i][1]].u - m->points[edge[i][0]].u; + u[0] = m->points[edge[i][0]].u + ((u[0] * yp) / yd); + v[0] = m->points[edge[i][1]].v - m->points[edge[i][0]].v; + v[0] = m->points[edge[i][0]].v + ((v[0] * yp) / yd); + } + } + else + { + xe[0] = m->points[edge[i][0]].x; + if (douv) + { + u[0] = m->points[edge[i][0]].u; + v[0] = m->points[edge[i][0]].v; + } + } + yd = m->points[edge[j][1]].y - m->points[edge[j][0]].y; + if (yd > 0) + { + yp = y - m->points[edge[j][0]].y; + xe[1] = m->points[edge[j][1]].x - m->points[edge[j][0]].x; + xe[1] = m->points[edge[j][0]].x + ((xe[1] * yp) / yd); + if (douv) + { + u[1] = m->points[edge[j][1]].u - m->points[edge[j][0]].u; + u[1] = m->points[edge[j][0]].u + ((u[1] * yp) / yd); + v[1] = m->points[edge[j][1]].v - m->points[edge[j][0]].v; + v[1] = m->points[edge[j][0]].v + ((v[1] * yp) / yd); + } + } + else + { + xe[1] = m->points[edge[j][0]].x; + if (douv) + { + u[1] = m->points[edge[j][0]].u; + v[1] = m->points[edge[j][0]].v; + } + } + if (xe[0] > xe[1]) + { + int ti; + + ti = xe[0]; xe[0] = xe[1]; xe[1] = ti; + if (douv) + { + double td; + + td = u[0]; u[0] = u[1]; u[1] = td; + td = v[0]; v[0] = v[1]; v[1] = td; + } + } + if ((x >= xe[0]) && (x < xe[1])) + { + if (douv) + { + if (mx) + *mx = u[0] + (((x - xe[0]) * (u[1] - u[0])) / + (xe[1] - xe[0])); + if (my) + *my = v[0] + (((x - xe[0]) * (v[1] - v[0])) / + (xe[1] - xe[0])); + } + return EINA_TRUE; + } + if (grab) + { + if (douv) + { + if (mx) + *mx = u[0] + (((x - xe[0]) * (u[1] - u[0])) / + (xe[1] - xe[0])); + if (my) + *my = v[0] + (((x - xe[0]) * (v[1] - v[0])) / + (xe[1] - xe[0])); + } + return EINA_TRUE; + } + } + return EINA_FALSE; +} + +Eina_Bool +evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y) +{ + return evas_map_coords_get(m, x, y, NULL, NULL, 0); +} + +EAPI void +evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + + enabled = !!enabled; + if (obj->cur.usemap == enabled) return; + obj->cur.usemap = enabled; + if (enabled) + { + if (!obj->cur.map) + obj->cur.map = _evas_map_new(4); + evas_object_mapped_clip_across_mark(obj); +// obj->cur.map->normal_geometry = obj->cur.geometry; + } + else + { + if (obj->cur.map) + { + _evas_map_calc_geom_change(obj); + evas_object_mapped_clip_across_mark(obj); + //FIXME: Since the last frame is not updated when map is + //disabled, afterimage problem is happened in s/w rendering. + //Need to find out the fundamental reason then fix it. + evas_damage_rectangle_add(obj->layer->evas, + 0, + 0, + obj->layer->evas->output.w, + obj->layer->evas->output.h); + } + } + _evas_map_calc_map_geometry(obj); + /* This is a bit heavy handed, but it fixes the case of same geometry, but + * changed colour or UV settings. */ + evas_object_change(obj); +} + +EAPI Eina_Bool +evas_object_map_enable_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + return obj->cur.usemap; +} + + +EAPI void +evas_object_map_source_set(Evas_Object *obj, Evas_Object *src) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + (void)src; /* method still needs to be implemented. */ +} + +EAPI Evas_Object * +evas_object_map_source_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + return NULL; +} + +EAPI void +evas_object_map_set(Evas_Object *obj, const Evas_Map *map) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + + if (!map) + { + if (obj->cur.map) + { + if (obj->cur.map->surface) + { + obj->layer->evas->engine.func->image_map_surface_free + (obj->layer->evas->engine.data.output, + obj->cur.map->surface); + obj->cur.map->surface = NULL; + } + obj->prev.geometry = obj->cur.map->normal_geometry; + if (!obj->prev.map) + { + _evas_map_free(obj, obj->cur.map); + obj->cur.map = NULL; + evas_object_mapped_clip_across_mark(obj); + return; + } + _evas_map_free(obj, obj->cur.map); + obj->cur.map = NULL; + if (!obj->cur.usemap) _evas_map_calc_geom_change(obj); + else _evas_map_calc_map_geometry(obj); + if (obj->cur.usemap) + { + evas_object_mapped_clip_across_mark(obj); + //FIXME: Since the last frame is not updated when map is + //disabled, afterimage problem is happened in s/w + //rendering. Need to find out the fundamental reason + //then fix it. + evas_damage_rectangle_add(obj->layer->evas, + 0, + 0, + obj->layer->evas->output.w, + obj->layer->evas->output.h); + } + } + return; + } + + if ((obj->cur.map) && (obj->cur.map->count == map->count)) + { + Evas_Map *omap = obj->cur.map; + obj->cur.map = _evas_map_new(map->count); + memcpy(obj->cur.map, omap, sizeof(Evas_Map) + (map->count * sizeof(Evas_Map_Point))); + _evas_map_copy(obj->cur.map, map); + if (obj->prev.map == omap) obj->prev.map = NULL; + free(omap); + } + else + { + if (obj->cur.map) evas_map_free(obj->cur.map); + obj->cur.map = _evas_map_dup(map); + if (obj->cur.usemap) + evas_object_mapped_clip_across_mark(obj); + } + _evas_map_calc_map_geometry(obj); +} + +EAPI const Evas_Map * +evas_object_map_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + + return obj->cur.map; +} + +EAPI Evas_Map * +evas_map_new(int count) +{ + if (count != 4) + { + ERR("map point count (%i) != 4 is unsupported!", count); + return NULL; + } + + return _evas_map_new(count); +} + +EAPI void +evas_map_smooth_set(Evas_Map *m, Eina_Bool enabled) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + m->smooth = enabled; +} + +EAPI Eina_Bool +evas_map_smooth_get(const Evas_Map *m) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return EINA_FALSE; + MAGIC_CHECK_END(); + + return m->smooth; +} + +EAPI void +evas_map_alpha_set(Evas_Map *m, Eina_Bool enabled) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + m->alpha = enabled; +} + +EAPI Eina_Bool +evas_map_alpha_get(const Evas_Map *m) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return EINA_FALSE; + MAGIC_CHECK_END(); + + return m->alpha; +} + +EAPI Evas_Map * +evas_map_dup(const Evas_Map *m) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return NULL; + MAGIC_CHECK_END(); + + return _evas_map_dup(m); +} + +EAPI void +evas_map_free(Evas_Map *m) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + _evas_map_free(NULL, m); +} + +EAPI int +evas_map_count_get(const Evas_Map *m) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return -1; + MAGIC_CHECK_END(); + + return m->count; +} + +EAPI void +evas_map_point_coord_set(Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + Evas_Map_Point *p; + + if (idx >= m->count) return; + p = m->points + idx; + p->x = p->px = x; + p->y = p->py = y; + p->z = z; +} + +EAPI void +evas_map_point_coord_get(const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + goto error; + MAGIC_CHECK_END(); + + const Evas_Map_Point *p; + + if (idx >= m->count) goto error; + p = m->points + idx; + if (x) *x = p->x; + if (y) *y = p->y; + if (z) *z = p->z; + return; + + error: + if (x) *x = 0; + if (y) *y = 0; + if (z) *z = 0; +} + +EAPI void +evas_map_point_image_uv_set(Evas_Map *m, int idx, double u, double v) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + Evas_Map_Point *p; + + if (idx >= m->count) return; + p = m->points + idx; + p->u = u; + p->v = v; +} + +EAPI void +evas_map_point_image_uv_get(const Evas_Map *m, int idx, double *u, double *v) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + goto error; + MAGIC_CHECK_END(); + + const Evas_Map_Point *p; + + if (idx >= m->count) goto error; + p = m->points + idx; + if (u) *u = p->u; + if (v) *v = p->v; + return; + + error: + if (u) *u = 0.0; + if (v) *v = 0.0; +} + +EAPI void +evas_map_point_color_set(Evas_Map *m, int idx, int r, int g, int b, int a) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + Evas_Map_Point *p; + + if (idx >= m->count) return; + p = m->points + idx; + p->r = r; + p->g = g; + p->b = b; + p->a = a; +} + +EAPI void +evas_map_point_color_get(const Evas_Map *m, int idx, int *r, int *g, int *b, int *a) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + const Evas_Map_Point *p; + + if (idx >= m->count) return; + p = m->points + idx; + if (r) *r = p->r; + if (g) *g = p->g; + if (b) *b = p->b; + if (a) *a = p->a; +} + +EAPI void +evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + + if (m->count != 4) + { + ERR("map has count=%d where 4 was expected.", m->count); + return; + } + _evas_map_util_points_populate(m, obj->cur.geometry.x, obj->cur.geometry.y, + obj->cur.geometry.w, obj->cur.geometry.h, z); +} + +EAPI void +evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *obj) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + + if (m->count != 4) + { + ERR("map has count=%d where 4 was expected.", m->count); + return; + } + _evas_map_util_points_populate(m, obj->cur.geometry.x, obj->cur.geometry.y, + obj->cur.geometry.w, obj->cur.geometry.h, 0); +} + +EAPI void +evas_map_util_points_populate_from_geometry(Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + if (m->count != 4) + { + ERR("map has count=%d where 4 was expected.", m->count); + return; + } + _evas_map_util_points_populate(m, x, y, w, h, z); +} + +EAPI void +evas_map_util_points_color_set(Evas_Map *m, int r, int g, int b, int a) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + Evas_Map_Point *p, *p_end; + + p = m->points; + p_end = p + m->count; + for (; p < p_end; p++) + { + p->r = r; + p->g = g; + p->b = b; + p->a = a; + } +} + +EAPI void +evas_map_util_rotate(Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + double r = (degrees * M_PI) / 180.0; + Evas_Map_Point *p, *p_end; + + p = m->points; + p_end = p + m->count; + + for (; p < p_end; p++) + { + double x, y, xx, yy; + + x = p->x - cx; + y = p->y - cy; + + xx = x * cos(r); + yy = x * sin(r); + x = xx - (y * sin(r)); + y = yy + (y * cos(r)); + + p->px = p->x = x + cx; + p->py = p->y = y + cy; + } +} + +EAPI void +evas_map_util_zoom(Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + Evas_Map_Point *p, *p_end; + + p = m->points; + p_end = p + m->count; + + for (; p < p_end; p++) + { + double x, y; + + x = p->x - cx; + y = p->y - cy; + + x = (((double)x) * zoomx); + y = (((double)y) * zoomy); + + p->px = p->x = x + cx; + p->py = p->y = y + cy; + } +} + +EAPI void +evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz, + Evas_Coord cx, Evas_Coord cy, Evas_Coord cz) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + double rz = (dz * M_PI) / 180.0; + double rx = (dx * M_PI) / 180.0; + double ry = (dy * M_PI) / 180.0; + Evas_Map_Point *p, *p_end; + + p = m->points; + p_end = p + m->count; + + for (; p < p_end; p++) + { + double x, y, z, xx, yy, zz; + + x = p->x - cx; + y = p->y - cy; + z = p->z - cz; + + if (rz != 0.0) + { + xx = x * cos(rz); + yy = x * sin(rz); + x = xx - (y * sin(rz)); + y = yy + (y * cos(rz)); + } + + if (ry != 0.0) + { + xx = x * cos(ry); + zz = x * sin(ry); + x = xx - (z * sin(ry)); + z = zz + (z * cos(ry)); + } + + if (rx != 0.0) + { + zz = z * cos(rx); + yy = z * sin(rx); + z = zz - (y * sin(rx)); + y = yy + (y * cos(rx)); + } + + p->px = p->x = x + cx; + p->py = p->y = y + cy; + p->z = z + cz; + } +} + +EAPI void +evas_map_util_3d_lighting(Evas_Map *m, + Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, + int lr, int lg, int lb, int ar, int ag, int ab) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + int i; + + for (i = 0; i < m->count; i++) + { + double x, y, z; + double nx, ny, nz, x1, y1, z1, x2, y2, z2, ln, br; + int h, j, mr, mg, mb; + + x = m->points[i].x; + y = m->points[i].y; + z = m->points[i].z; + // calc normal + h = (i - 1 + 4) % 4 + (i & ~0x3); // prev point + j = (i + 1) % 4 + (i & ~0x3); // next point + + x1 = m->points[h].x - x; + y1 = m->points[h].y - y; + z1 = m->points[h].z - z; + + x2 = m->points[j].x - x; + y2 = m->points[j].y - y; + z2 = m->points[j].z - z; + nx = (y1 * z2) - (z1 * y2); + ny = (z1 * x2) - (x1 * z2); + nz = (x1 * y2) - (y1 * x2); + + ln = (nx * nx) + (ny * ny) + (nz * nz); + ln = sqrt(ln); + + if (ln != 0.0) + { + nx /= ln; + ny /= ln; + nz /= ln; + } + + // calc point -> light vector + x = lx - x; + y = ly - y; + z = lz - z; + + ln = (x * x) + (y * y) + (z * z); + ln = sqrt(ln); + + if (ln != 0.0) + { + x /= ln; + y /= ln; + z /= ln; + } + + // brightness - tan (0.0 -> 1.0 brightness really) + br = (nx * x) + (ny * y) + (nz * z); + if (br < 0.0) br = 0.0; + + mr = ar + ((lr - ar) * br); + mg = ag + ((lg - ag) * br); + mb = ab + ((lb - ab) * br); + if (m->points[i].a != 255) + { + mr = (mr * m->points[i].a) / 255; + mg = (mg * m->points[i].a) / 255; + mb = (mb * m->points[i].a) / 255; + } + m->points[i].r = (m->points[i].r * mr) / 255; + m->points[i].g = (m->points[i].g * mg) / 255; + m->points[i].b = (m->points[i].b * mb) / 255; + } +} + +EAPI void +evas_map_util_3d_perspective(Evas_Map *m, + Evas_Coord px, Evas_Coord py, + Evas_Coord z0, Evas_Coord foc) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return; + MAGIC_CHECK_END(); + + Evas_Map_Point *p, *p_end; + + p = m->points; + p_end = p + m->count; + + m->persp.px = px; + m->persp.py = py; + m->persp.z0 = z0; + m->persp.foc = foc; + + if (foc <= 0) return; + + for (; p < p_end; p++) + { + double x, y, zz; + + x = p->x - px; + y = p->y - py; + + zz = ((p->z - z0) + foc); + + if (zz > 0) + { + x = (x * foc) / zz; + y = (y * foc) / zz; + } + + p->x = px + x; + p->y = py + y; + } +} + +EAPI Eina_Bool +evas_map_util_clockwise_get(Evas_Map *m) +{ + MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); + return EINA_FALSE; + MAGIC_CHECK_END(); + + int i, j, k, count; + long long c; + + if (m->count < 3) return EINA_FALSE; + + count = 0; + for (i = 0; i < m->count; i++) + { + j = (i + 1) % m->count; + k = (i + 2) % m->count; + c = + ((m->points[j].x - m->points[i].x) * + (m->points[k].y - m->points[j].y)) + - + ((m->points[j].y - m->points[i].y) * + (m->points[k].x - m->points[j].x)); + if (c < 0) count--; + else if (c > 0) count++; + } + if (count > 0) return EINA_TRUE; + return EINA_FALSE; +} diff --git a/libraries/evas/src/lib/canvas/evas_name.c b/libraries/evas/src/lib/canvas/evas_name.c new file mode 100644 index 0000000..c42f941 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_name.c @@ -0,0 +1,40 @@ +#include "evas_common.h" +#include "evas_private.h" + +EAPI void +evas_object_name_set(Evas_Object *obj, const char *name) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->name) + { + eina_hash_del(obj->layer->evas->name_hash, obj->name, obj); + free(obj->name); + } + if (!name) obj->name = NULL; + else + { + obj->name = strdup(name); + eina_hash_add(obj->layer->evas->name_hash, obj->name, obj); + } +} + +EAPI const char * +evas_object_name_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + return obj->name; +} + +EAPI Evas_Object * +evas_object_name_find(const Evas *e, const char *name) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + if (!name) return NULL; + return (Evas_Object *)eina_hash_find(e->name_hash, name); +} diff --git a/libraries/evas/src/lib/canvas/evas_object_box.c b/libraries/evas/src/lib/canvas/evas_object_box.c new file mode 100644 index 0000000..ab2f222 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_box.c @@ -0,0 +1,2128 @@ +#include "evas_common.h" + +#ifdef _WIN32_WCE +# undef remove +#endif + +typedef struct _Evas_Object_Box_Iterator Evas_Object_Box_Iterator; +typedef struct _Evas_Object_Box_Accessor Evas_Object_Box_Accessor; + +struct _Evas_Object_Box_Iterator +{ + Eina_Iterator iterator; + + Eina_Iterator *real_iterator; + const Evas_Object *box; +}; + +struct _Evas_Object_Box_Accessor +{ + Eina_Accessor accessor; + + Eina_Accessor *real_accessor; + const Evas_Object *box; +}; + +#define _evas_object_box_type "Evas_Object_Box" +#define SIG_CHILD_ADDED "child,added" +#define SIG_CHILD_REMOVED "child,removed" + +static const Evas_Smart_Cb_Description _signals[] = +{ + {SIG_CHILD_ADDED, ""}, + {SIG_CHILD_REMOVED, ""}, + {NULL, NULL} +}; + + +static void _sizing_eval(Evas_Object *obj); + +#define EVAS_OBJECT_BOX_DATA_GET(o, ptr) \ + Evas_Object_Box_Data *ptr = evas_object_smart_data_get(o) + +#define EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, ptr) \ + EVAS_OBJECT_BOX_DATA_GET(o, ptr); \ + if (!ptr) \ + { \ + CRIT("no widget data for object %p (%s)", \ + o, evas_object_type_get(o)); \ + fflush(stderr); \ + abort(); \ + return; \ +} + +#define EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ + EVAS_OBJECT_BOX_DATA_GET(o, ptr); \ + if (!ptr) \ + { \ + CRIT("no widget data for object %p (%s)", \ + o, evas_object_type_get(o)); \ + fflush(stderr); \ + abort(); \ + return val; \ + } + +EVAS_SMART_SUBCLASS_NEW(_evas_object_box_type, _evas_object_box, + Evas_Object_Box_Api, Evas_Smart_Class, + evas_object_smart_clipped_class_get, NULL) + +static Eina_Bool +_evas_object_box_iterator_next(Evas_Object_Box_Iterator *it, void **data) +{ + Evas_Object_Box_Option *opt; + + if (!eina_iterator_next(it->real_iterator, (void **)&opt)) + return EINA_FALSE; + if (data) *data = opt->obj; + return EINA_TRUE; +} + +static Evas_Object * +_evas_object_box_iterator_get_container(Evas_Object_Box_Iterator *it) +{ + return (Evas_Object *)it->box; +} + +static void +_evas_object_box_iterator_free(Evas_Object_Box_Iterator *it) +{ + eina_iterator_free(it->real_iterator); + free(it); +} + +static Eina_Bool +_evas_object_box_accessor_get_at(Evas_Object_Box_Accessor *it, unsigned int idx, void **data) +{ + Evas_Object_Box_Option *opt = NULL; + + if (!eina_accessor_data_get(it->real_accessor, idx, (void *)&opt)) + return EINA_FALSE; + if (data) *data = opt->obj; + return EINA_TRUE; +} + +static Evas_Object * +_evas_object_box_accessor_get_container(Evas_Object_Box_Accessor *it) +{ + return (Evas_Object *)it->box; +} + +static void +_evas_object_box_accessor_free(Evas_Object_Box_Accessor *it) +{ + eina_accessor_free(it->real_accessor); + free(it); +} + +static void +_on_child_resize(void *data, Evas *evas __UNUSED__, Evas_Object *o __UNUSED__, void *einfo __UNUSED__) +{ + Evas_Object *box = data; + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(box, priv); + if (!priv->layouting) evas_object_smart_changed(box); +} + +static void +_on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *o, void *einfo __UNUSED__) +{ + const Evas_Object_Box_Api *api; + Evas_Object *box = data; + + EVAS_OBJECT_BOX_DATA_GET(box, priv); + api = priv->api; + + if ((!api) || (!api->remove)) + { + ERR("no api->remove"); + return; + } + + if (!api->remove(box, priv, o)) + ERR("child removal failed"); + evas_object_smart_changed(box); +} + +static void +_on_child_hints_changed(void *data, Evas *evas __UNUSED__, Evas_Object *o __UNUSED__, void *einfo __UNUSED__) +{ + Evas_Object *box = data; + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(box, priv); + if (!priv->layouting) evas_object_smart_changed(box); +} + +static void +_on_hints_changed(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *o , void *einfo __UNUSED__) +{ + _sizing_eval(o); +} + +static Evas_Object_Box_Option * +_evas_object_box_option_new(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) +{ + Evas_Object_Box_Option *opt; + const Evas_Object_Box_Api *api; + + api = priv->api; + if ((!api) || (!api->option_new)) + { + ERR("no api->option_new"); + return NULL; + } + + opt = api->option_new(o, priv, child); + if (!opt) + { + ERR("option_new failed"); + return NULL; + } + + return opt; +} + +static void +_evas_object_box_child_callbacks_unregister(Evas_Object *obj) +{ + evas_object_event_callback_del + (obj, EVAS_CALLBACK_RESIZE, _on_child_resize); + evas_object_event_callback_del + (obj, EVAS_CALLBACK_FREE, _on_child_del); + evas_object_event_callback_del + (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed); +} + +static Evas_Object_Box_Option * +_evas_object_box_option_callbacks_register(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt) +{ + const Evas_Object_Box_Api *api; + Evas_Object *obj = opt->obj; + + api = priv->api; + + if ((!api) || (!api->option_free)) + { + WRN("api->option_free not set (may cause memory leaks, segfaults)"); + return NULL; + } + + evas_object_event_callback_add + (obj, EVAS_CALLBACK_RESIZE, _on_child_resize, o); + evas_object_event_callback_add + (obj, EVAS_CALLBACK_FREE, _on_child_del, o); + evas_object_event_callback_add + (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o); + + return opt; +} + +static Evas_Object_Box_Option * +_evas_object_box_option_new_default(Evas_Object *o __UNUSED__, Evas_Object_Box_Data *priv __UNUSED__, Evas_Object *child) +{ + Evas_Object_Box_Option *opt; + + opt = (Evas_Object_Box_Option *)malloc(sizeof(*opt)); + if (!opt) + return NULL; + + opt->obj = child; + + return opt; +} + +static void +_evas_object_box_option_free_default(Evas_Object *o __UNUSED__, Evas_Object_Box_Data *priv __UNUSED__, Evas_Object_Box_Option *opt) +{ + free(opt); +} + +static Evas_Object_Box_Option * +_evas_object_box_append_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) +{ + Evas_Object_Box_Option *opt; + + opt = _evas_object_box_option_new(o, priv, child); + if (!opt) + return NULL; + + priv->children = eina_list_append(priv->children, opt); + priv->children_changed = EINA_TRUE; + evas_object_smart_callback_call(o, SIG_CHILD_ADDED, opt); + + return opt; +} + +static Evas_Object_Box_Option * +_evas_object_box_prepend_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) +{ + Evas_Object_Box_Option *opt; + + opt = _evas_object_box_option_new(o, priv, child); + if (!opt) + return NULL; + + priv->children = eina_list_prepend(priv->children, opt); + priv->children_changed = EINA_TRUE; + evas_object_smart_callback_call(o, SIG_CHILD_ADDED, opt); + + return opt; +} + +static Evas_Object_Box_Option * +_evas_object_box_insert_before_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference) +{ + Eina_List *l; + Evas_Object_Box_Option *opt; + + EINA_LIST_FOREACH(priv->children, l, opt) + { + if (opt->obj == reference) + { + Evas_Object_Box_Option *new_opt; + + new_opt = _evas_object_box_option_new(o, priv, child); + if (!new_opt) + return NULL; + + priv->children = eina_list_prepend_relative + (priv->children, new_opt, opt); + priv->children_changed = EINA_TRUE; + evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); + return new_opt; + } + } + + return NULL; +} + +static Evas_Object_Box_Option * +_evas_object_box_insert_after_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference) +{ + Eina_List *l; + Evas_Object_Box_Option *opt; + + EINA_LIST_FOREACH(priv->children, l, opt) + { + if (opt->obj == reference) + { + Evas_Object_Box_Option *new_opt; + + new_opt = _evas_object_box_option_new(o, priv, child); + if (!new_opt) + return NULL; + + priv->children = eina_list_append_relative + (priv->children, new_opt, opt); + priv->children_changed = EINA_TRUE; + evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); + return new_opt; + } + } + + return NULL; +} + +static Evas_Object_Box_Option * +_evas_object_box_insert_at_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos) +{ + Eina_List *l; + unsigned int i; + + if ((pos == 0) && (eina_list_count(priv->children) == 0)) + { + Evas_Object_Box_Option *new_opt; + + new_opt = _evas_object_box_option_new(o, priv, child); + if (!new_opt) + return NULL; + + priv->children = eina_list_prepend(priv->children, new_opt); + priv->children_changed = EINA_TRUE; + evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); + return new_opt; + } + + for (l = priv->children, i = 0; l; l = l->next, i++) + { + Evas_Object_Box_Option *opt = l->data; + + if (i == pos) + { + Evas_Object_Box_Option *new_opt; + + new_opt = _evas_object_box_option_new(o, priv, child); + if (!new_opt) + return NULL; + + priv->children = eina_list_prepend_relative + (priv->children, new_opt, opt); + priv->children_changed = EINA_TRUE; + evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); + return new_opt; + } + } + + return NULL; +} + +static Evas_Object * +_evas_object_box_remove_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) +{ + const Evas_Object_Box_Api *api; + Evas_Object_Box_Option *opt; + Eina_List *l; + + api = priv->api; + + if ((!api) || (!api->option_free)) + { + ERR("api->option_free not set (may cause memory leaks, segfaults)"); + return NULL; + } + + EINA_LIST_FOREACH(priv->children, l, opt) + { + Evas_Object *obj = opt->obj; + + if (obj == child) + { + priv->children = eina_list_remove(priv->children, opt); + api->option_free(o, priv, opt); + priv->children_changed = EINA_TRUE; + evas_object_smart_callback_call(o, SIG_CHILD_REMOVED, obj); + + return obj; + } + } + + return NULL; +} + +static Evas_Object * +_evas_object_box_remove_at_default(Evas_Object *o, Evas_Object_Box_Data *priv, unsigned int pos) +{ + const Evas_Object_Box_Api *api; + Eina_List *node; + Evas_Object_Box_Option *opt; + Evas_Object *obj; + + api = priv->api; + + if ((!api) || (!api->option_free)) + { + WRN("api->option_free not set (may cause memory leaks, segfaults)"); + return NULL; + } + + node = eina_list_nth_list(priv->children, pos); + if (!node) + { + ERR("No item to be removed at position %d", pos); + return NULL; + } + + opt = node->data; + obj = opt->obj; + + priv->children = eina_list_remove_list(priv->children, node); + api->option_free(o, priv, opt); + priv->children_changed = EINA_TRUE; + evas_object_smart_callback_call(o, SIG_CHILD_REMOVED, obj); + return obj; +} + +static void +_evas_object_box_smart_add(Evas_Object *o) +{ + Evas_Object_Box_Data *priv; + + priv = evas_object_smart_data_get(o); + if (!priv) + { + const Evas_Smart *smart; + const Evas_Smart_Class *sc; + + priv = (Evas_Object_Box_Data *)calloc(1, sizeof(*priv)); + if (!priv) + { + ERR("Could not allocate object private data."); + return; + } + + smart = evas_object_smart_smart_get(o); + sc = evas_smart_class_get(smart); + priv->api = (const Evas_Object_Box_Api *)sc; + + evas_object_smart_data_set(o, priv); + } + _evas_object_box_parent_sc->add(o); + + + evas_object_event_callback_add + (o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_hints_changed, o); + priv->children = NULL; + priv->align.h = 0.5; + priv->align.v = 0.5; + priv->pad.h = 0; + priv->pad.v = 0; + priv->layout.cb = evas_object_box_layout_horizontal; + priv->layout.data = NULL; + priv->layout.free_data = NULL; +} + +static void +_evas_object_box_smart_del(Evas_Object *o) +{ + const Evas_Object_Box_Api *api; + Eina_List *l; + + EVAS_OBJECT_BOX_DATA_GET(o, priv); + + api = priv->api; + if ((!api) || (!api->option_free)) + { + WRN("api->option_free not set (may cause memory leaks, segfaults)"); + return; + } + + l = priv->children; + while (l) + { + Evas_Object_Box_Option *opt = l->data; + + _evas_object_box_child_callbacks_unregister(opt->obj); + api->option_free(o, priv, opt); + l = eina_list_remove_list(l, l); + } + + if (priv->layout.data && priv->layout.free_data) + priv->layout.free_data(priv->layout.data); + + _evas_object_box_parent_sc->del(o); +} + +static void +_evas_object_box_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h) +{ + Evas_Coord ow, oh; + evas_object_geometry_get(o, NULL, NULL, &ow, &oh); + if ((ow == w) && (oh == h)) return; + evas_object_smart_changed(o); +} + +static void +_evas_object_box_smart_calculate(Evas_Object *o) +{ + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); + if (priv->layout.cb) + { + priv->layouting = 1; + priv->layout.cb(o, priv, priv->layout.data); + priv->layouting = 0; + priv->children_changed = EINA_FALSE; + } + else + ERR("No layout function set for %p box.", o); +} + +static void +_evas_object_box_smart_set_user(Evas_Object_Box_Api *api) +{ + api->base.add = _evas_object_box_smart_add; + api->base.del = _evas_object_box_smart_del; + api->base.resize = _evas_object_box_smart_resize; + api->base.calculate = _evas_object_box_smart_calculate; + api->base.callbacks = _signals; + + api->append = _evas_object_box_append_default; + api->prepend = _evas_object_box_prepend_default; + api->insert_before = _evas_object_box_insert_before_default; + api->insert_after = _evas_object_box_insert_after_default; + api->insert_at = _evas_object_box_insert_at_default; + api->remove = _evas_object_box_remove_default; + api->remove_at = _evas_object_box_remove_at_default; + api->option_new = _evas_object_box_option_new_default; + api->option_free = _evas_object_box_option_free_default; +} + +EAPI Evas_Object * +evas_object_box_add(Evas *evas) +{ + return evas_object_smart_add(evas, _evas_object_box_smart_class_new()); +} + +EAPI Evas_Object * +evas_object_box_add_to(Evas_Object *parent) +{ + Evas *evas; + Evas_Object *o; + + evas = evas_object_evas_get(parent); + o = evas_object_box_add(evas); + evas_object_smart_member_add(o, parent); + return o; +} + +EAPI void +evas_object_box_smart_set(Evas_Object_Box_Api *api) +{ + if (!api) + return; + _evas_object_box_smart_set(api); +} + +EAPI const Evas_Object_Box_Api * +evas_object_box_smart_class_get(void) +{ + static Evas_Object_Box_Api _sc = + EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(_evas_object_box_type); + static const Evas_Object_Box_Api *class = NULL; + + if (class) + return class; + + evas_object_box_smart_set(&_sc); + class = &_sc; + + return class; +} + +EAPI void +evas_object_box_layout_set(Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) +{ + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); + + if ((priv->layout.cb == cb) && (priv->layout.data == data) && + (priv->layout.free_data == free_data)) + return; + + if (priv->layout.data && priv->layout.free_data) + priv->layout.free_data(priv->layout.data); + + priv->layout.cb = cb; + priv->layout.data = (void *)data; + priv->layout.free_data = free_data; + evas_object_smart_changed(o); +} + +static void +_fixed_point_divide_and_decompose_integer(int dividend, int divisor, int *int_part, int *frac_part) +{ + int quotient = (long long)(dividend << 16) / divisor; + *frac_part = quotient & 0xffff; + *int_part = quotient >> 16; +} + +static void +_layout_dimension_change_min_max_cell_bound(int dim, int *new_dim, int min_d, int max_d, int cell_sz) +{ + if (dim > cell_sz) + { + if ((min_d != 0) && (cell_sz < min_d)) + *new_dim = min_d; + else + *new_dim = cell_sz; + } + else + { + if ((max_d != -1) && (cell_sz > max_d)) + *new_dim = max_d; + else + *new_dim = cell_sz; + } +} + +static void +_layout_set_offset_and_expand_dimension_space_max_bounded(int dim, int *new_dim, int space_sz, int max_dim, int *offset, double align, int pad_before, int pad_after) +{ + if (align >= 0.0) + { + *new_dim = dim; + *offset = (space_sz - (dim + pad_before + pad_after)) * align + + pad_before; + } + else + { + if ((max_dim != -1) && (space_sz > max_dim)) + { + *new_dim = max_dim; + *offset = (space_sz - (max_dim + pad_before + pad_after)) * 0.5 + + pad_before; + } + else + { + *new_dim = space_sz; + *offset = 0; + } + } +} + +static void +_layout_set_offset_and_change_dimension_min_max_cell_bounded(int dim, int *new_dim, int min_dim, int max_dim, int cell_sz, int *offset, double align, int pad_before, int pad_after) +{ + if (align >= 0.0) + { + *new_dim = dim; + *offset = + (cell_sz - (dim + pad_before + pad_after)) * align + pad_before; + } + else + { + *offset = pad_before; + _layout_dimension_change_min_max_cell_bound + (dim, new_dim, min_dim, max_dim, cell_sz - pad_before - pad_after); + } +} + +static void +_sizing_eval(Evas_Object *obj) +{ + Evas_Coord minw, minh, maxw, maxh; + Evas_Coord w, h; + + evas_object_size_hint_min_get(obj, &minw, &minh); + evas_object_size_hint_max_get(obj, &maxw, &maxh); + evas_object_geometry_get(obj, NULL, NULL, &w, &h); + + if (w < minw) w = minw; + if (h < minh) h = minh; + if ((maxw >= 0) && (w > maxw)) w = maxw; + if ((maxh >= 0) && (h > maxh)) h = maxh; + + evas_object_resize(obj, w, h); +} + +static int +_evas_object_box_layout_horizontal_weight_apply(Evas_Object_Box_Data *priv, Evas_Object_Box_Option **objects, int n_objects, int remaining, int weight_total) +{ + int rem_diff = 0; + int i; + + for (i = 0; i < n_objects; i++) + { + Evas_Object_Box_Option *opt = objects[i]; + Evas_Object *o = opt->obj; + int h; + + evas_object_geometry_get(o, NULL, NULL, NULL, &h); + + if (remaining <= 0) + { + int min_w; + + evas_object_size_hint_min_get(o, &min_w, NULL); + evas_object_resize(o, min_w, h); + } + else + { + double normal_weight, weight_x; + int target_size; + int max_w; + + evas_object_size_hint_weight_get(o, &weight_x, NULL); + normal_weight = weight_x / weight_total; + target_size = (int)((double)remaining * normal_weight); + + evas_object_size_hint_max_get(o, &max_w, NULL); + if ((max_w != -1) && (target_size > max_w)) + { + evas_object_resize(o, max_w, h); + rem_diff += max_w; + objects[i] = objects[n_objects - 1]; + weight_total -= weight_x; + n_objects--; + return _evas_object_box_layout_horizontal_weight_apply + (priv, objects, n_objects, remaining - rem_diff, + weight_total); + } + else + { + evas_object_resize(o, target_size, h); + rem_diff += target_size; + } + } + } + + return remaining - rem_diff; +} + +EAPI void +evas_object_box_layout_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) +{ + int pad_inc = 0, sub_pixel = 0; + int req_w, global_pad, remaining, top_h = 0; + double weight_total = 0.0; + int weight_use = 0; + int x, y, w, h; + int n_children; + Evas_Object_Box_Option *opt; + Evas_Object_Box_Option **objects; + Eina_List *l; + + n_children = eina_list_count(priv->children); + if (!n_children) + return; + + objects = (Evas_Object_Box_Option **)alloca(sizeof(Evas_Object_Box_Option *) * n_children); + if (!objects) + return; + + evas_object_geometry_get(o, &x, &y, &w, &h); + global_pad = priv->pad.h; + req_w = global_pad * (n_children - 1); + + EINA_LIST_FOREACH(priv->children, l, opt) + { + int padding_l, padding_r; + double weight_x; + + _sizing_eval(opt->obj); + evas_object_size_hint_weight_get(opt->obj, &weight_x, NULL); + evas_object_size_hint_padding_get + (opt->obj, &padding_l, &padding_r, NULL, NULL); + req_w += padding_l + padding_r; + + if (!weight_x) + { + int child_w; + + evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, NULL); + req_w += child_w; + } + else + { + objects[weight_use] = opt; + weight_use++; + weight_total += weight_x; + } + } + + remaining = w - req_w; + + if (weight_use) + remaining = _evas_object_box_layout_horizontal_weight_apply + (priv, objects, weight_use, remaining, weight_total); + + if (priv->align.h >= 0.0) + x += remaining * priv->align.h; + else if (n_children == 1) + x += remaining / 2; + else + { /* justified */ + _fixed_point_divide_and_decompose_integer + (remaining, n_children - 1, &global_pad, &pad_inc); + global_pad += priv->pad.h; + } + + EINA_LIST_FOREACH(priv->children, l, opt) + { + int child_w, child_h, max_h, new_h, off_x, off_y; + int padding_l, padding_r, padding_t, padding_b; + double align_y; + + evas_object_size_hint_align_get(opt->obj, NULL, &align_y); + evas_object_size_hint_padding_get + (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); + evas_object_size_hint_max_get(opt->obj, NULL, &max_h); + + evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); + + off_x = padding_l; + new_h = child_h; + if (new_h > top_h) top_h = new_h; + + _layout_set_offset_and_expand_dimension_space_max_bounded + (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b); + + if (new_h != child_h) + evas_object_resize(opt->obj, child_w, new_h); + evas_object_move(opt->obj, x + off_x, y + off_y); + + x += child_w + padding_l + padding_r + global_pad; + sub_pixel += pad_inc; + if (sub_pixel >= 1 << 16) + { + x++; + sub_pixel -= 1 << 16; + } + } + + evas_object_size_hint_min_set(o, req_w, top_h); +} + +static int +_evas_object_box_layout_vertical_weight_apply(Evas_Object_Box_Data *priv, Evas_Object_Box_Option **objects, int n_objects, int remaining, int weight_total) +{ + int rem_diff = 0; + int i; + + for (i = 0; i < n_objects; i++) + { + Evas_Object_Box_Option *opt = objects[i]; + Evas_Object *o = opt->obj; + int w; + + evas_object_geometry_get(o, NULL, NULL, &w, NULL); + + if (remaining <= 0) + { + int min_h; + + evas_object_size_hint_min_get(o, NULL, &min_h); + evas_object_resize(o, w, min_h); + } + else + { + double normal_weight, weight_y; + int target_size; + int max_h; + + evas_object_size_hint_weight_get(o, NULL, &weight_y); + normal_weight = weight_y / weight_total; + target_size = (int)((double)remaining * normal_weight); + + evas_object_size_hint_max_get(o, NULL, &max_h); + if ((max_h != -1) && (target_size > max_h)) + { + evas_object_resize(o, w, max_h); + rem_diff += max_h; + objects[i] = objects[n_objects - 1]; + weight_total -= weight_y; + n_objects--; + return _evas_object_box_layout_vertical_weight_apply + (priv, objects, n_objects, remaining - rem_diff, + weight_total); + } + else + { + evas_object_resize(o, w, target_size); + rem_diff += target_size; + } + } + } + + return remaining - rem_diff; +} + +EAPI void +evas_object_box_layout_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) +{ + int pad_inc = 0, sub_pixel = 0; + int req_h, global_pad, remaining, top_w = 0; + double weight_total = 0.0; + int weight_use = 0; + int x, y, w, h; + int n_children; + Evas_Object_Box_Option *opt; + Evas_Object_Box_Option **objects; + Eina_List *l; + + n_children = eina_list_count(priv->children); + if (!n_children) + return; + + objects = (Evas_Object_Box_Option **)alloca(sizeof(Evas_Object_Box_Option *) * n_children); + if (!objects) + return; + + evas_object_geometry_get(o, &x, &y, &w, &h); + global_pad = priv->pad.v; + req_h = global_pad * (n_children - 1); + + EINA_LIST_FOREACH(priv->children, l, opt) + { + int padding_t, padding_b; + double weight_y; + + _sizing_eval(opt->obj); + evas_object_size_hint_weight_get(opt->obj, NULL, &weight_y); + evas_object_size_hint_padding_get + (opt->obj, NULL, NULL, &padding_t, &padding_b); + req_h += padding_t + padding_b; + + if (!weight_y) + { + int child_h; + + evas_object_geometry_get(opt->obj, NULL, NULL, NULL, &child_h); + req_h += child_h; + } + else + { + objects[weight_use] = opt; + weight_use++; + weight_total += weight_y; + } + } + + remaining = h - req_h; + + if (weight_use) + remaining = _evas_object_box_layout_vertical_weight_apply + (priv, objects, weight_use, remaining, weight_total); + + if (priv->align.v >= 0.0) + y += remaining * priv->align.v; + else if (n_children == 1) + y += remaining / 2; + else + { /* justified */ + _fixed_point_divide_and_decompose_integer + (remaining, n_children - 1, &global_pad, &pad_inc); + global_pad += priv->pad.v; + } + + EINA_LIST_FOREACH(priv->children, l, opt) + { + int child_w, child_h, max_w, new_w, off_x, off_y; + int padding_l, padding_r, padding_t, padding_b; + double align_x; + + evas_object_size_hint_align_get(opt->obj, &align_x, NULL); + evas_object_size_hint_padding_get + (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); + evas_object_size_hint_max_get(opt->obj, &max_w, NULL); + + evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); + + off_y = padding_t; + new_w = child_w; + + _layout_set_offset_and_expand_dimension_space_max_bounded + (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r); + + if (new_w > top_w) top_w = new_w; + + if (new_w != child_w) + evas_object_resize(opt->obj, new_w, child_h); + evas_object_move(opt->obj, x + off_x, y + off_y); + + y += child_h + padding_t + padding_b + global_pad; + sub_pixel += pad_inc; + if (sub_pixel >= 1 << 16) + { + y++; + sub_pixel -= 1 << 16; + } + } + + evas_object_size_hint_min_set(o, top_w, req_h); +} + +EAPI void +evas_object_box_layout_homogeneous_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) +{ + int cell_sz, share, inc; + int sub_pixel = 0; + int x, y, w, h; + int n_children; + Evas_Object_Box_Option *opt; + Eina_List *l; + + n_children = eina_list_count(priv->children); + if (!n_children) + return; + + evas_object_geometry_get(o, &x, &y, &w, &h); + + share = w - priv->pad.h * (n_children - 1); + _fixed_point_divide_and_decompose_integer + (share, n_children, &cell_sz, &inc); + + EINA_LIST_FOREACH(priv->children, l, opt) + { + int child_w, child_h, max_h, min_w, max_w, new_w, new_h, off_x, off_y; + int padding_l, padding_r, padding_t, padding_b; + double align_x, align_y; + + evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); + evas_object_size_hint_padding_get + (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); + evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); + evas_object_size_hint_min_get(opt->obj, &min_w, NULL); + + _sizing_eval(opt->obj); + evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); + + new_w = child_w; + new_h = child_h; + + _layout_set_offset_and_expand_dimension_space_max_bounded + (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b); + + _layout_set_offset_and_change_dimension_min_max_cell_bounded + (child_w, &new_w, min_w, max_w, cell_sz, &off_x, align_x, + padding_l, padding_r); + + if ((new_w != child_w) || (new_h != child_h)) + evas_object_resize(opt->obj, new_w, new_h); + evas_object_move(opt->obj, x + off_x, y + off_y); + + x += cell_sz + priv->pad.h; + sub_pixel += inc; + if (sub_pixel >= 1 << 16) + { + x++; + sub_pixel -= 1 << 16; + } + } + + evas_object_size_hint_min_set(o, w, h); +} + +EAPI void +evas_object_box_layout_homogeneous_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) +{ + int cell_sz, share, inc; + int sub_pixel = 0; + int x, y, w, h; + int n_children; + Evas_Object_Box_Option *opt; + Eina_List *l; + + n_children = eina_list_count(priv->children); + if (!n_children) + return; + + evas_object_geometry_get(o, &x, &y, &w, &h); + + share = h - priv->pad.v * (n_children - 1); + _fixed_point_divide_and_decompose_integer + (share, n_children, &cell_sz, &inc); + + EINA_LIST_FOREACH(priv->children, l, opt) + { + int child_w, child_h, max_w, min_h, max_h, new_w, new_h, off_x, off_y; + int padding_l, padding_r, padding_t, padding_b; + double align_x, align_y; + + evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); + evas_object_size_hint_padding_get + (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); + evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); + evas_object_size_hint_min_get(opt->obj, NULL, &min_h); + + _sizing_eval(opt->obj); + evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); + new_w = child_w; + new_h = child_h; + + _layout_set_offset_and_expand_dimension_space_max_bounded + (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r); + + _layout_set_offset_and_change_dimension_min_max_cell_bounded + (child_h, &new_h, min_h, max_h, cell_sz, &off_y, align_y, + padding_t, padding_b); + + if ((new_w != child_w) || (new_h != child_h)) + evas_object_resize(opt->obj, new_w, new_h); + evas_object_move(opt->obj, x + off_x, y + off_y); + + y += cell_sz + priv->pad.v; + sub_pixel += inc; + if (sub_pixel >= 1 << 16) + { + y++; + sub_pixel -= 1 << 16; + } + } + + evas_object_size_hint_min_set(o, w, h); +} + +EAPI void +evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) +{ + int remaining, global_pad, pad_inc = 0, sub_pixel = 0; + int cell_sz = 0; + int x, y, w, h; + int top_h = 0; + int n_children; + Evas_Object_Box_Option *opt; + Eina_List *l; + + n_children = eina_list_count(priv->children); + if (!n_children) + return; + + evas_object_geometry_get(o, &x, &y, &w, &h); + + EINA_LIST_FOREACH(priv->children, l, opt) + { + int child_w, padding_l, padding_r; + + _sizing_eval(opt->obj); + evas_object_size_hint_padding_get + (opt->obj, &padding_l, &padding_r, NULL, NULL); + evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, NULL); + if (child_w + padding_l + padding_r > cell_sz) + cell_sz = child_w + padding_l + padding_r; + } + + global_pad = priv->pad.h; + remaining = w - n_children * cell_sz - global_pad * (n_children - 1); + + if (priv->align.h >= 0.0) + x += remaining * priv->align.h; + else if (n_children == 1) + x += remaining / 2; + else + { /* justified */ + _fixed_point_divide_and_decompose_integer + (remaining, n_children - 1, &global_pad, &pad_inc); + global_pad += priv->pad.h; + } + + EINA_LIST_FOREACH(priv->children, l, opt) + { + int child_w, child_h, min_w, max_w, max_h, new_w, new_h, off_x, off_y; + int padding_l, padding_r, padding_t, padding_b; + double align_x, align_y; + + evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); + evas_object_size_hint_padding_get + (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); + evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); + evas_object_size_hint_min_get(opt->obj, &min_w, NULL); + + evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); + + new_w = child_w; + new_h = child_h; + if (new_h > top_h) top_h = new_h; + + _layout_set_offset_and_expand_dimension_space_max_bounded + (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b); + + _layout_set_offset_and_change_dimension_min_max_cell_bounded + (child_w, &new_w, min_w, max_w, cell_sz, &off_x, align_x, + padding_l, padding_r); + + if ((new_w != child_w) || (new_h != child_h)) + evas_object_resize(opt->obj, new_w, new_h); + evas_object_move(opt->obj, x + off_x, y + off_y); + + x += cell_sz + global_pad; + sub_pixel += pad_inc; + if (sub_pixel >= 1 << 16) + { + x++; + sub_pixel -= 1 << 16; + } + } + + evas_object_size_hint_min_set(o, x, top_h); +} + +EAPI void +evas_object_box_layout_homogeneous_max_size_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) +{ + int remaining, global_pad, pad_inc = 0, sub_pixel = 0; + int cell_sz = 0; + int x, y, w, h; + int top_w = 0; + int n_children; + Evas_Object_Box_Option *opt; + Eina_List *l; + + n_children = eina_list_count(priv->children); + if (!n_children) + return; + + evas_object_geometry_get(o, &x, &y, &w, &h); + + EINA_LIST_FOREACH(priv->children, l, opt) + { + int child_h, padding_t, padding_b; + + _sizing_eval(opt->obj); + evas_object_size_hint_padding_get + (opt->obj, NULL, NULL, &padding_t, &padding_b); + evas_object_geometry_get(opt->obj, NULL, NULL, NULL, &child_h); + if (child_h + padding_t + padding_b > cell_sz) + cell_sz = child_h + padding_t + padding_b; + } + + global_pad = priv->pad.v; + remaining = h - n_children * cell_sz - global_pad * (n_children - 1); + + if (priv->align.v >= 0.0) + y += remaining * priv->align.v; + else if (n_children == 1) + y += remaining / 2; + else + { /* justified */ + _fixed_point_divide_and_decompose_integer + (remaining, n_children - 1, &global_pad, &pad_inc); + global_pad += priv->pad.v; + } + + EINA_LIST_FOREACH(priv->children, l, opt) + { + int child_w, child_h, max_h, min_h, max_w, new_w, new_h, off_x, off_y; + int padding_l, padding_r, padding_t, padding_b; + double align_x, align_y; + + evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); + evas_object_size_hint_padding_get + (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); + evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); + evas_object_size_hint_min_get(opt->obj, NULL, &min_h); + + evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); + + new_w = child_w; + new_h = child_h; + if (new_w > top_w) top_w = new_w; + + _layout_set_offset_and_expand_dimension_space_max_bounded + (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r); + + _layout_set_offset_and_change_dimension_min_max_cell_bounded + (child_h, &new_h, min_h, max_h, cell_sz, &off_y, align_y, + padding_t, padding_b); + + if ((new_w != child_w) || (new_h != child_h)) + evas_object_resize(opt->obj, new_w, new_h); + evas_object_move(opt->obj, x + off_x, y + off_y); + + y += cell_sz + global_pad; + sub_pixel += pad_inc; + if (sub_pixel >= 1 << 16) + { + y++; + sub_pixel -= 1 << 16; + } + } + + evas_object_size_hint_min_set(o, top_w, y); +} + +static void +_evas_object_box_layout_flow_horizontal_row_info_collect(Evas_Object_Box_Data *priv, int box_w, int *row_count, int *row_max_h, int *row_break, int *row_width, int *off_y_ret, int *max_h_ret) +{ + int i, remain_w = box_w, start_i = 0; + int off_y = 0, max_h = 0, n_rows = 0; + Eina_List *l; + + for (i = 0, l = priv->children; l; i++, l = l->next) + { + Evas_Object_Box_Option *opt = l->data; + int padding_l, padding_r, padding_t, padding_b; + int child_w, child_h, off_x = 0; + + evas_object_size_hint_padding_get + (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); + + _sizing_eval(opt->obj); + evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); + + child_w += padding_l + padding_r + priv->pad.h; + child_h += padding_t + padding_b; + + remain_w -= child_w; + if (remain_w + priv->pad.h >= 0) + { /* continue "line" */ + if (child_h > max_h) + max_h = child_h; + + off_x += child_w; + row_width[n_rows] += child_w; + } + else + { /* break line */ + if (i == start_i) + { /* obj goes to actual line */ + max_h = child_h; + row_width[n_rows] = child_w; + } + else + { /* obj goes to next line */ + row_max_h[n_rows] = max_h; + row_break[n_rows] = i - 1; + n_rows++; + + off_x = child_w; + off_y += max_h; + max_h = child_h; + + row_width[n_rows] = child_w; + start_i = i; + + remain_w = box_w - off_x; + } + } + } + + row_break[n_rows] = i - 1; + row_max_h[n_rows] = max_h; + + *row_count = n_rows; + *off_y_ret = off_y; + *max_h_ret = max_h; +} + +EAPI void +evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) +{ + int n_children, v_justify; + int r, row_count = 0; + int min_w = 0, min_h = 0; + int max_h, inc_y; + int remain_y, i; + int x, y, w, h; + Eina_List *l; + int *row_max_h; + int *row_break; + int *row_width; + int offset_y; + + n_children = eina_list_count(priv->children); + if (!n_children) + return; + + /* *per row* arrays */ + row_max_h = (int *)alloca(sizeof(int) * n_children); + if (!row_max_h) + return; + row_break = (int *)alloca(sizeof(int) * n_children); + if (!row_break) + return; + row_width = (int *)alloca(sizeof(int) * n_children); + if (!row_width) + return; + + memset(row_width, 0, sizeof(row_width)); + + evas_object_geometry_get(o, &x, &y, &w, &h); + + _evas_object_box_layout_flow_horizontal_row_info_collect + (priv, w, &row_count, row_max_h, row_break, row_width, &offset_y, &max_h); + + inc_y = 0; + v_justify = 0; + remain_y = h - (offset_y + max_h); + + if (remain_y > 0) + { + if (priv->align.v >= 0.0) + inc_y = priv->align.v * remain_y; + else if (row_count == 0) + y += remain_y / 2; + else /* y-justified */ + inc_y = remain_y / row_count; + } + + inc_y += priv->pad.v; + + for (i = 0, r = 0, l = priv->children; r <= row_count; r++) + { + int row_justify = 0, just_inc = 0, sub_pixel = 0; + int row_size, remain_x; + + row_size = row_break[r] - i; + remain_x = (w - row_width[r]); + + if (priv->align.h < 0.0) + { + if (row_size == 0) + x += remain_x / 2; + else + _fixed_point_divide_and_decompose_integer + (remain_x, row_size, &row_justify, &just_inc); + } + + row_justify += priv->pad.h; + + for (; i <= row_break[r]; i++, l = l->next) + { + Evas_Object_Box_Option *opt = l->data; + int off_x, off_y, y_remain; + int padding_l, padding_r; + int child_w, child_h; + double align_y; + + evas_object_size_hint_align_get(opt->obj, NULL, &align_y); + evas_object_size_hint_padding_get + (opt->obj, &padding_l, &padding_r, NULL, NULL); + + evas_object_geometry_get + (opt->obj, NULL, NULL, &child_w, &child_h); + + y_remain = row_max_h[r] - child_h; + + off_x = padding_l; + if (priv->align.h >= 0.0) + off_x += remain_x * priv->align.h; + off_y = y_remain * align_y; + + evas_object_move(opt->obj, x + off_x, y + off_y); + + x += child_w + padding_l + padding_r + row_justify; + + sub_pixel += just_inc; + if (sub_pixel >= 1 << 16) + { + x++; + sub_pixel -= 1 << 16; + } + } + + evas_object_geometry_get(o, &x, NULL, NULL, NULL); + if (min_w < row_width[r]) + min_w = row_width[r]; + min_h += row_max_h[r]; + y += row_max_h[r] + inc_y; + } + + evas_object_size_hint_min_set(o, min_w, min_h); +} + +static void +_evas_object_box_layout_flow_vertical_col_info_collect(Evas_Object_Box_Data *priv, int box_h, int *col_count, int *col_max_w, int *col_break, int *col_height, int *off_x_ret, int *max_w_ret) +{ + int i, remain_h = box_h, start_i = 0; + int off_x = 0, max_w = 0, n_cols = 0; + Eina_List *l; + + for (i = 0, l = priv->children; l; i++, l = l->next) + { + Evas_Object_Box_Option *opt = l->data; + int padding_l, padding_r, padding_t, padding_b; + int child_w, child_h, off_y = 0; + + evas_object_size_hint_padding_get + (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); + + _sizing_eval(opt->obj); + evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); + + child_w += padding_l + padding_r; + child_h += padding_t + padding_b + priv->pad.v; + + remain_h -= child_h; + if (remain_h + priv->pad.v >= 0) + { /* continue "col" */ + if (child_w > max_w) + max_w = child_w; + + off_y += child_h; + col_height[n_cols] += child_h; + } + else + { + /* break col */ + if (i == start_i) + { /* obj goes to actual col */ + max_w = child_w; + col_height[n_cols] = child_h; + } + else + { /* obj goes to next col */ + col_max_w[n_cols] = max_w; + col_break[n_cols] = i - 1; + n_cols++; + + off_x += max_w; + off_y = child_h; + max_w = child_w; + + col_height[n_cols] = child_h; + start_i = i; + + remain_h = box_h - off_y; + } + } + } + + col_break[n_cols] = i - 1; + col_max_w[n_cols] = max_w; + + *col_count = n_cols; + *off_x_ret = off_x; + *max_w_ret = max_w; +} + +EAPI void +evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) +{ + int n_children; + int c, col_count; + int min_w = 0, min_h = 0; + int max_w, inc_x; + int remain_x, i; + int x, y, w, h; + Eina_List *l; + int *col_max_w; + int *col_break; + int *col_height; + int offset_x; + + n_children = eina_list_count(priv->children); + if (!n_children) + return; + + /* *per col* arrays */ + col_max_w = (int *)alloca(sizeof(int) * n_children); + if (!col_max_w) + return; + col_break = (int *)alloca(sizeof(int) * n_children); + if (!col_break) + return; + col_height = (int *)alloca(sizeof(int) * n_children); + if (!col_height) + return; + + memset(col_height, 0, sizeof(col_height)); + + evas_object_geometry_get(o, &x, &y, &w, &h); + + _evas_object_box_layout_flow_vertical_col_info_collect + (priv, h, &col_count, col_max_w, col_break, col_height, &offset_x, &max_w); + + inc_x = 0; + remain_x = w - (offset_x + max_w); + + if (remain_x > 0) + { + if (priv->align.h >= 0) + inc_x = priv->align.h * remain_x; + else if (col_count == 0) + x += remain_x / 2; + else /* x-justified */ + inc_x = remain_x / col_count; + } + + inc_x += priv->pad.h; + + for (i = 0, c = 0, l = priv->children; c <= col_count; c++) + { + int col_justify = 0, just_inc = 0, sub_pixel = 0; + int col_size, remain_y; + + col_size = col_break[c] - i; + remain_y = (h - col_height[c]); + + if (priv->align.v < 0.0) + { + if (col_size == 0) + y += remain_y / 2; + else + _fixed_point_divide_and_decompose_integer + (remain_y, col_size, &col_justify, &just_inc); + } + + col_justify += priv->pad.v; + + for (; i <= col_break[c]; i++, l = l->next) + { + Evas_Object_Box_Option *opt = l->data; + int off_x, off_y, x_remain; + int padding_t, padding_b; + int child_w, child_h; + double align_x; + + evas_object_size_hint_align_get(opt->obj, &align_x, NULL); + evas_object_size_hint_padding_get + (opt->obj, NULL, NULL, &padding_t, &padding_b); + + evas_object_geometry_get + (opt->obj, NULL, NULL, &child_w, &child_h); + + x_remain = col_max_w[c] - child_w; + + off_x = x_remain * align_x; + off_y = padding_t; + if (priv->align.v >= 0.0) + off_y += remain_y * priv->align.v; + + evas_object_move(opt->obj, x + off_x, y + off_y); + + y += child_h + padding_t + padding_b + col_justify; + + sub_pixel += just_inc; + if (sub_pixel >= 1 << 16) + { + y++; + sub_pixel -= 1 << 16; + } + } + + evas_object_geometry_get(o, NULL, &y, NULL, NULL); + min_w += col_max_w[c]; + if (min_h < col_height[c]) + min_h = col_height[c]; + x += col_max_w[c] + inc_x; + } + + evas_object_size_hint_min_set(o, min_w, min_h); +} + +EAPI void +evas_object_box_layout_stack(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) +{ + Eina_List *l; + Evas_Coord ox, oy, ow, oh; + Evas_Coord top_w = 0, top_h = 0; + Evas_Object_Box_Option *opt; + Evas_Object *old_child = NULL; + + evas_object_geometry_get(o, &ox, &oy, &ow, &oh); + + EINA_LIST_FOREACH(priv->children, l, opt) + { + Evas_Object *child = opt->obj; + Evas_Coord max_w, max_h, min_w, min_h, pad_l, pad_r, pad_t, pad_b, + child_w, child_h, new_w, new_h, off_x, off_y; + double align_x, align_y; + + evas_object_size_hint_align_get(child, &align_x, &align_y); + evas_object_size_hint_padding_get + (child, &pad_l, &pad_r, &pad_t, &pad_b); + evas_object_size_hint_max_get(child, &max_w, &max_h); + evas_object_size_hint_min_get(child, &min_w, &min_h); + + _sizing_eval(opt->obj); + evas_object_geometry_get(child, NULL, NULL, &child_w, &child_h); + new_w = child_w; + new_h = child_h; + if (new_w > top_w) top_w = new_w; + if (new_h > top_h) top_h = new_h; + + _layout_set_offset_and_change_dimension_min_max_cell_bounded + (child_w, &new_w, min_w, max_w, ow, &off_x, align_x, pad_l, pad_r); + _layout_set_offset_and_change_dimension_min_max_cell_bounded + (child_h, &new_h, min_h, max_h, oh, &off_y, align_y, pad_t, pad_b); + + if ((new_w != child_w) || (new_h != child_h)) + evas_object_resize(child, new_w, new_h); + evas_object_move(child, ox + off_x, oy + off_y); + + if (old_child) + evas_object_stack_above(child, old_child); + old_child = child; + } + + evas_object_size_hint_min_set(o, top_w, top_h); +} + +EAPI void +evas_object_box_align_set(Evas_Object *o, double horizontal, double vertical) +{ + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); + if (priv->align.h == horizontal && priv->align.v == vertical) + return; + priv->align.h = horizontal; + priv->align.v = vertical; + evas_object_smart_changed(o); +} + +EAPI void +evas_object_box_align_get(const Evas_Object *o, double *horizontal, double *vertical) +{ + EVAS_OBJECT_BOX_DATA_GET(o, priv); + if (priv) + { + if (horizontal) *horizontal = priv->align.h; + if (vertical) *vertical = priv->align.v; + } + else + { + if (horizontal) *horizontal = 0.5; + if (vertical) *vertical = 0.5; + } +} + +EAPI void +evas_object_box_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) +{ + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); + if (priv->pad.h == horizontal && priv->pad.v == vertical) + return; + priv->pad.h = horizontal; + priv->pad.v = vertical; + evas_object_smart_changed(o); +} + +EAPI void +evas_object_box_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) +{ + EVAS_OBJECT_BOX_DATA_GET(o, priv); + if (priv) + { + if (horizontal) *horizontal = priv->pad.h; + if (vertical) *vertical = priv->pad.v; + } + else + { + if (horizontal) *horizontal = 0; + if (vertical) *vertical = 0; + } +} + +EAPI Evas_Object_Box_Option * +evas_object_box_append(Evas_Object *o, Evas_Object *child) +{ + Evas_Object_Box_Option *opt; + const Evas_Object_Box_Api *api; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); + if (!child) + return NULL; + + api = priv->api; + if ((!api) || (!api->append)) + return NULL; + + opt = api->append(o, priv, child); + + if (opt) + { + evas_object_smart_member_add(child, o); + evas_object_smart_changed(o); + return _evas_object_box_option_callbacks_register(o, priv, opt); + } + + return NULL; +} + +EAPI Evas_Object_Box_Option * +evas_object_box_prepend(Evas_Object *o, Evas_Object *child) +{ + Evas_Object_Box_Option *opt; + const Evas_Object_Box_Api *api; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); + if (!child) + return NULL; + + api = priv->api; + if ((!api) || (!api->prepend)) + return NULL; + + opt = api->prepend(o, priv, child); + + if (opt) + { + evas_object_smart_member_add(child, o); + evas_object_smart_changed(o); + return _evas_object_box_option_callbacks_register(o, priv, opt); + } + + return NULL; +} + +EAPI Evas_Object_Box_Option * +evas_object_box_insert_before(Evas_Object *o, Evas_Object *child, const Evas_Object *reference) +{ + Evas_Object_Box_Option *opt; + const Evas_Object_Box_Api *api; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); + if (!child) + return NULL; + + api = priv->api; + if ((!api) || (!api->insert_before)) + return NULL; + + opt = api->insert_before(o, priv, child, reference); + + if (opt) + { + evas_object_smart_member_add(child, o); + evas_object_smart_changed(o); + return _evas_object_box_option_callbacks_register(o, priv, opt); + } + + return NULL; +} + +EAPI Evas_Object_Box_Option * +evas_object_box_insert_after(Evas_Object *o, Evas_Object *child, const Evas_Object *reference) +{ + Evas_Object_Box_Option *opt; + const Evas_Object_Box_Api *api; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + if (!child) + return NULL; + + api = priv->api; + if ((!api) || (!api->insert_after)) + return NULL; + + opt = api->insert_after(o, priv, child, reference); + + if (opt) + { + evas_object_smart_member_add(child, o); + evas_object_smart_changed(o); + return _evas_object_box_option_callbacks_register(o, priv, opt); + } + + return NULL; +} + +EAPI Evas_Object_Box_Option * +evas_object_box_insert_at(Evas_Object *o, Evas_Object *child, unsigned int pos) +{ + Evas_Object_Box_Option *opt; + const Evas_Object_Box_Api *api; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); + if (!child) + return NULL; + + api = priv->api; + if ((!api) || (!api->insert_at)) + return NULL; + + opt = api->insert_at(o, priv, child, pos); + + if (opt) + { + evas_object_smart_member_add(child, o); + evas_object_smart_changed(o); + return _evas_object_box_option_callbacks_register(o, priv, opt); + } + + return NULL; +} + +EAPI Eina_Bool +evas_object_box_remove(Evas_Object *o, Evas_Object *child) +{ + const Evas_Object_Box_Api *api; + Evas_Object *obj; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); + if (!child) return EINA_FALSE; + + api = priv->api; + if ((!api) || (!api->remove)) + return 0; + + obj = api->remove(o, priv, child); + + if (obj) + { + _evas_object_box_child_callbacks_unregister(obj); + evas_object_smart_member_del(obj); + evas_object_smart_changed(o); + return EINA_TRUE; + } + + return EINA_FALSE; +} + +EAPI Eina_Bool +evas_object_box_remove_at(Evas_Object *o, unsigned int pos) +{ + const Evas_Object_Box_Api *api; + Evas_Object *obj; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); + api = priv->api; + if ((!api) || (!api->remove_at)) return EINA_FALSE; + + obj = api->remove_at(o, priv, pos); + + if (obj) + { + _evas_object_box_child_callbacks_unregister(obj); + evas_object_smart_member_del(obj); + evas_object_smart_changed(o); + return EINA_TRUE; + } + + return EINA_FALSE; +} + +EAPI Eina_Bool +evas_object_box_remove_all(Evas_Object *o, Eina_Bool clear) +{ + const Evas_Object_Box_Api *api; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); + + api = priv->api; + if ((!api) || (!api->remove)) return EINA_FALSE; + + evas_object_smart_changed(o); + + while (priv->children) + { + Evas_Object_Box_Option *opt = priv->children->data; + Evas_Object *obj; + + obj = api->remove(o, priv, opt->obj); + if (obj) + { + _evas_object_box_child_callbacks_unregister(obj); + evas_object_smart_member_del(obj); + if (clear) + evas_object_del(obj); + } + else return EINA_FALSE; + } + + return EINA_TRUE; +} + +EAPI Eina_Iterator * +evas_object_box_iterator_new(const Evas_Object *o) +{ + Evas_Object_Box_Iterator *it; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + if (!priv->children) return NULL; + + it = calloc(1, sizeof(Evas_Object_Box_Iterator)); + if (!it) return NULL; + + EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); + + it->real_iterator = eina_list_iterator_new(priv->children); + it->box = o; + + it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_box_iterator_next); + it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_box_iterator_get_container); + it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_box_iterator_free); + + return &it->iterator; +} + +EAPI Eina_Accessor * +evas_object_box_accessor_new(const Evas_Object *o) +{ + Evas_Object_Box_Accessor *it; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + if (!priv->children) return NULL; + + it = calloc(1, sizeof(Evas_Object_Box_Accessor)); + if (!it) return NULL; + + EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR); + + it->real_accessor = eina_list_accessor_new(priv->children); + it->box = o; + + it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_box_accessor_get_at); + it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_box_accessor_get_container); + it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_box_accessor_free); + + return &it->accessor; +} + +EAPI Eina_List * +evas_object_box_children_get(const Evas_Object *o) +{ + Eina_List *new_list = NULL, *l; + Evas_Object_Box_Option *opt; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + EINA_LIST_FOREACH(priv->children, l, opt) + new_list = eina_list_append(new_list, opt->obj); + + return new_list; +} + +EAPI const char * +evas_object_box_option_property_name_get(Evas_Object *o, int property) +{ + const Evas_Object_Box_Api *api; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + if (property < 0) + return NULL; + + api = priv->api; + if ((!api) || (!api->property_name_get)) + return NULL; + + return api->property_name_get(o, property); +} + +EAPI int +evas_object_box_option_property_id_get(Evas_Object *o, const char *name) +{ + const Evas_Object_Box_Api *api; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, -1); + + if (!name) + return -1; + + api = priv->api; + if ((!api) || (!api->property_id_get)) + return -1; + + return api->property_id_get(o, name); +} + +EAPI Eina_Bool +evas_object_box_option_property_set(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) +{ + Eina_Bool ret; + va_list args; + + va_start(args, property); + ret = evas_object_box_option_property_vset(o, opt, property, args); + va_end(args); + + return ret; +} + + +EAPI Eina_Bool +evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) +{ + const Evas_Object_Box_Api *api; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); + + if (!opt) return EINA_FALSE; + + api = priv->api; + if ((!api) || (!api->property_set)) + return EINA_FALSE; + + if (!api->property_set(o, opt, property, args)) + return EINA_FALSE; + + evas_object_smart_changed(o); + return EINA_TRUE; +} + +EAPI Eina_Bool +evas_object_box_option_property_get(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) +{ + Eina_Bool ret; + va_list args; + + va_start(args, property); + ret = evas_object_box_option_property_vget(o, opt, property, args); + va_end(args); + + return ret; +} + +EAPI Eina_Bool +evas_object_box_option_property_vget(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) +{ + const Evas_Object_Box_Api *api; + + EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); + + if (!opt) return EINA_FALSE; + + api = priv->api; + if ((!api) || (!api->property_get)) + return EINA_FALSE; + + return api->property_get(o, opt, property, args); +} diff --git a/libraries/evas/src/lib/canvas/evas_object_grid.c b/libraries/evas/src/lib/canvas/evas_object_grid.c new file mode 100644 index 0000000..ac96f04 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_grid.c @@ -0,0 +1,465 @@ +#include +#include "evas_common.h" + +typedef struct _Evas_Object_Grid_Data Evas_Object_Grid_Data; +typedef struct _Evas_Object_Grid_Option Evas_Object_Grid_Option; +typedef struct _Evas_Object_Grid_Iterator Evas_Object_Grid_Iterator; +typedef struct _Evas_Object_Grid_Accessor Evas_Object_Grid_Accessor; + +struct _Evas_Object_Grid_Option +{ + Evas_Object *obj; + Eina_List *l; + int x, y, w, h; +}; + +struct _Evas_Object_Grid_Data +{ + Evas_Object_Smart_Clipped_Data base; + Eina_List *children; + struct { + int w, h; + } size; + Eina_Bool is_mirrored : 1; +}; + +struct _Evas_Object_Grid_Iterator +{ + Eina_Iterator iterator; + + Eina_Iterator *real_iterator; + const Evas_Object *grid; +}; + +struct _Evas_Object_Grid_Accessor +{ + Eina_Accessor accessor; + + Eina_Accessor *real_accessor; + const Evas_Object *grid; +}; + +#define EVAS_OBJECT_GRID_DATA_GET(o, ptr) \ + Evas_Object_Grid_Data *ptr = evas_object_smart_data_get(o) + +#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \ + EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ + if (!ptr) \ + { \ + CRIT("no widget data for object %p (%s)", \ + o, evas_object_type_get(o)); \ + abort(); \ + return; \ + } + +#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ + EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ + if (!ptr) \ + { \ + CRIT("No widget data for object %p (%s)", \ + o, evas_object_type_get(o)); \ + abort(); \ + return val; \ + } + +static const char EVAS_OBJECT_GRID_OPTION_KEY[] = "|EvGd"; + +static Eina_Bool +_evas_object_grid_iterator_next(Evas_Object_Grid_Iterator *it, void **data) +{ + Evas_Object_Grid_Option *opt; + + if (!eina_iterator_next(it->real_iterator, (void **)&opt)) + return EINA_FALSE; + if (data) *data = opt->obj; + return EINA_TRUE; +} + +static Evas_Object * +_evas_object_grid_iterator_get_container(Evas_Object_Grid_Iterator *it) +{ + return (Evas_Object *)it->grid; +} + +static void +_evas_object_grid_iterator_free(Evas_Object_Grid_Iterator *it) +{ + eina_iterator_free(it->real_iterator); + free(it); +} + +static Eina_Bool +_evas_object_grid_accessor_get_at(Evas_Object_Grid_Accessor *it, unsigned int idx, void **data) +{ + Evas_Object_Grid_Option *opt = NULL; + + if (!eina_accessor_data_get(it->real_accessor, idx, (void **)&opt)) + return EINA_FALSE; + if (data) *data = opt->obj; + return EINA_TRUE; +} + +static Evas_Object * +_evas_object_grid_accessor_get_container(Evas_Object_Grid_Accessor *it) +{ + return (Evas_Object *)it->grid; +} + +static void +_evas_object_grid_accessor_free(Evas_Object_Grid_Accessor *it) +{ + eina_accessor_free(it->real_accessor); + free(it); +} + +static Evas_Object_Grid_Option * +_evas_object_grid_option_get(Evas_Object *o) +{ + return evas_object_data_get(o, EVAS_OBJECT_GRID_OPTION_KEY); +} + +static void +_evas_object_grid_option_set(Evas_Object *o, const Evas_Object_Grid_Option *opt) +{ + evas_object_data_set(o, EVAS_OBJECT_GRID_OPTION_KEY, opt); +} + +static Evas_Object_Grid_Option * +_evas_object_grid_option_del(Evas_Object *o) +{ + return evas_object_data_del(o, EVAS_OBJECT_GRID_OPTION_KEY); +} + +static void +_on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *child, void *einfo __UNUSED__) +{ + Evas_Object *grid = data; + evas_object_grid_unpack(grid, child); +} + +static void +_evas_object_grid_child_connect(Evas_Object *o, Evas_Object *child) +{ + evas_object_event_callback_add + (child, EVAS_CALLBACK_DEL, _on_child_del, o); +} + +static void +_evas_object_grid_child_disconnect(Evas_Object *o, Evas_Object *child) +{ + evas_object_event_callback_del_full + (child, EVAS_CALLBACK_DEL, _on_child_del, o); +} + +EVAS_SMART_SUBCLASS_NEW("Evas_Object_Grid", _evas_object_grid, + Evas_Smart_Class, Evas_Smart_Class, + evas_object_smart_clipped_class_get, NULL) + +static void +_evas_object_grid_smart_add(Evas_Object *o) +{ + EVAS_SMART_DATA_ALLOC(o, Evas_Object_Grid_Data) + + priv->size.w = 100; + priv->size.h = 100; + + _evas_object_grid_parent_sc->add(o); +} + +static void +_evas_object_grid_smart_del(Evas_Object *o) +{ + EVAS_OBJECT_GRID_DATA_GET(o, priv); + Eina_List *l; + + l = priv->children; + while (l) + { + Evas_Object_Grid_Option *opt = l->data; + _evas_object_grid_child_disconnect(o, opt->obj); + _evas_object_grid_option_del(opt->obj); + free(opt); + l = eina_list_remove_list(l, l); + } + _evas_object_grid_parent_sc->del(o); +} + +static void +_evas_object_grid_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h) +{ + Evas_Coord ow, oh; + evas_object_geometry_get(o, NULL, NULL, &ow, &oh); + if ((ow == w) && (oh == h)) return; + evas_object_smart_changed(o); +} + +static void +_evas_object_grid_smart_calculate(Evas_Object *o) +{ + Eina_List *l; + Evas_Object_Grid_Option *opt; + Evas_Coord x, y, w, h, vw, vh, t; + Eina_Bool mirror; + + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv); + if (!priv) return; + if (!priv->children) return; + evas_object_geometry_get(o, &x, &y, &w, &h); + mirror = priv->is_mirrored; + vw = priv->size.w; + vh = priv->size.h; + EINA_LIST_FOREACH(priv->children, l, opt) + { + Evas_Coord x1, y1, x2, y2; + + x1 = x + ((w * opt->x) / vw); + y1 = y + ((h * opt->y) / vh); + x2 = x + ((w * (opt->x + opt->w)) / vw); + y2 = y + ((h * (opt->y + opt->h)) / vh); + if (mirror) + { + t = x1; x1 = x2; x2 = t; + t = y1; y1 = y2; y2 = t; + } + evas_object_move(opt->obj, x1, y1); + evas_object_resize(opt->obj, x2 - x1, y2 - y1); + } +} + +static void +_evas_object_grid_smart_set_user(Evas_Smart_Class *sc) +{ + sc->add = _evas_object_grid_smart_add; + sc->del = _evas_object_grid_smart_del; + sc->resize = _evas_object_grid_smart_resize; + sc->calculate = _evas_object_grid_smart_calculate; +} + +EAPI Evas_Object * +evas_object_grid_add(Evas *evas) +{ + return evas_object_smart_add(evas, _evas_object_grid_smart_class_new()); +} + +EAPI Evas_Object * +evas_object_grid_add_to(Evas_Object *parent) +{ + Evas *evas; + Evas_Object *o; + + evas = evas_object_evas_get(parent); + o = evas_object_grid_add(evas); + evas_object_smart_member_add(o, parent); + return o; +} + +EAPI void +evas_object_grid_size_set(Evas_Object *o, int w, int h) +{ + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv); + if ((priv->size.w == w) && (priv->size.h == h)) return; + priv->size.w = w; + priv->size.h = h; + evas_object_smart_changed(o); +} + +EAPI void +evas_object_grid_size_get(const Evas_Object *o, int *w, int *h) +{ + if (w) *w = 0; + if (h) *h = 0; + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv); + if (w) *w = priv->size.w; + if (h) *h = priv->size.h; +} + +EAPI Eina_Bool +evas_object_grid_pack(Evas_Object *o, Evas_Object *child, int x, int y, int w, int h) +{ + Evas_Object_Grid_Option *opt; + Eina_Bool newobj = EINA_FALSE; + + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0); + + opt = _evas_object_grid_option_get(child); + if (!opt) + { + opt = malloc(sizeof(*opt)); + if (!opt) + { + ERR("could not allocate grid option data."); + return EINA_FALSE; + } + newobj = EINA_TRUE; + } + + opt->x = x; + opt->y = y; + opt->w = w; + opt->h = h; + + if (newobj) + { + opt->obj = child; + priv->children = eina_list_append(priv->children, opt); + opt->l = eina_list_last(priv->children); + _evas_object_grid_option_set(child, opt); + evas_object_smart_member_add(child, o); + _evas_object_grid_child_connect(o, child); + } + // FIXME: we could keep a changed list + evas_object_smart_changed(o); + return EINA_TRUE; +} + +static void +_evas_object_grid_remove_opt(Evas_Object_Grid_Data *priv, Evas_Object_Grid_Option *opt) +{ + priv->children = eina_list_remove_list(priv->children, opt->l); + opt->l = NULL; +} + +EAPI Eina_Bool +evas_object_grid_unpack(Evas_Object *o, Evas_Object *child) +{ + Evas_Object_Grid_Option *opt; + + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0); + + if (o != evas_object_smart_parent_get(child)) + { + ERR("cannot unpack child from incorrect grid!"); + return EINA_FALSE; + } + + opt = _evas_object_grid_option_del(child); + if (!opt) + { + ERR("cannot unpack child with no packing option!"); + return EINA_FALSE; + } + + _evas_object_grid_child_disconnect(o, child); + _evas_object_grid_remove_opt(priv, opt); + evas_object_smart_member_del(child); + free(opt); + return EINA_TRUE; +} + +EAPI void +evas_object_grid_clear(Evas_Object *o, Eina_Bool clear) +{ + Evas_Object_Grid_Option *opt; + + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv); + + EINA_LIST_FREE(priv->children, opt) + { + _evas_object_grid_child_disconnect(o, opt->obj); + _evas_object_grid_option_del(opt->obj); + evas_object_smart_member_del(opt->obj); + if (clear) + evas_object_del(opt->obj); + free(opt); + } +} + +EAPI Eina_Bool +evas_object_grid_pack_get(Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h) +{ + Evas_Object_Grid_Option *opt; + + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = 0; + if (h) *h = 0; + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0); + opt = _evas_object_grid_option_get(child); + if (!opt) return 0; + if (x) *x = opt->x; + if (y) *y = opt->y; + if (w) *w = opt->w; + if (h) *h = opt->h; + return 1; +} + +EAPI Eina_Iterator * +evas_object_grid_iterator_new(const Evas_Object *o) +{ + Evas_Object_Grid_Iterator *it; + + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + if (!priv->children) return NULL; + + it = calloc(1, sizeof(Evas_Object_Grid_Iterator)); + if (!it) return NULL; + + EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); + + it->real_iterator = eina_list_iterator_new(priv->children); + it->grid = o; + + it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_grid_iterator_next); + it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_grid_iterator_get_container); + it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_grid_iterator_free); + + return &it->iterator; +} + +EAPI Eina_Accessor * +evas_object_grid_accessor_new(const Evas_Object *o) +{ + Evas_Object_Grid_Accessor *it; + + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + if (!priv->children) return NULL; + + it = calloc(1, sizeof(Evas_Object_Grid_Accessor)); + if (!it) return NULL; + + EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR); + + it->real_accessor = eina_list_accessor_new(priv->children); + it->grid = o; + + it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_grid_accessor_get_at); + it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_grid_accessor_get_container); + it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_grid_accessor_free); + + return &it->accessor; +} + +EAPI Eina_List * +evas_object_grid_children_get(const Evas_Object *o) +{ + Eina_List *new_list = NULL, *l; + Evas_Object_Grid_Option *opt; + + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + EINA_LIST_FOREACH(priv->children, l, opt) + new_list = eina_list_append(new_list, opt->obj); + + return new_list; +} + +EAPI Eina_Bool +evas_object_grid_mirrored_get(const Evas_Object *obj) +{ + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(obj, priv, EINA_FALSE); + return priv->is_mirrored; +} + +EAPI void +evas_object_grid_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) +{ + EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(obj, priv); + mirrored = !!mirrored; + if (priv->is_mirrored != mirrored) + { + priv->is_mirrored = mirrored; + _evas_object_grid_smart_calculate(obj); + } +} diff --git a/libraries/evas/src/lib/canvas/evas_object_image.c b/libraries/evas/src/lib/canvas/evas_object_image.c new file mode 100644 index 0000000..7f757a6 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_image.c @@ -0,0 +1,3895 @@ +#include +#include +#include +#include +#include + +#include "evas_common.h" +#include "evas_private.h" +#include "../engines/common/evas_convert_color.h" +#include "../engines/common/evas_convert_colorspace.h" +#include "../engines/common/evas_convert_yuv.h" + +#define VERBOSE_PROXY_ERROR 1 + +/* private magic number for image objects */ +static const char o_type[] = "image"; + +/* private struct for rectangle object internal data */ +typedef struct _Evas_Object_Image Evas_Object_Image; + +struct _Evas_Object_Image +{ + DATA32 magic; + + struct { + int spread; + Evas_Coord_Rectangle fill; + struct { + short w, h, stride; + } image; + struct { + short l, r, t, b; + unsigned char fill; + double scale; + } border; + + Evas_Object *source; + Evas_Map *defmap; + const char *file; + const char *key; + int frame; + Evas_Colorspace cspace; + + unsigned char smooth_scale : 1; + unsigned char has_alpha :1; + unsigned char opaque :1; + unsigned char opaque_valid :1; + } cur, prev; + + int pixels_checked_out; + int load_error; + Eina_List *pixel_updates; + + struct { + unsigned char scale_down_by; + double dpi; + short w, h; + struct { + short x, y, w, h; + } region; + Eina_Bool orientation : 1; + } load_opts; + + struct { + Evas_Object_Image_Pixels_Get_Cb get_pixels; + void *get_pixels_data; + } func; + + Evas_Video_Surface video; + + const char *tmpf; + int tmpf_fd; + + Evas_Image_Scale_Hint scale_hint; + Evas_Image_Content_Hint content_hint; + + void *engine_data; + + unsigned char changed : 1; + unsigned char dirty_pixels : 1; + unsigned char filled : 1; + unsigned char proxyrendering : 1; + unsigned char preloading : 1; + unsigned char video_rendering : 1; + unsigned char video_surface : 1; + unsigned char video_visible : 1; + unsigned char created : 1; +}; + +/* private methods for image objects */ +static void evas_object_image_unload(Evas_Object *obj, Eina_Bool dirty); +static void evas_object_image_load(Evas_Object *obj); +static Evas_Coord evas_object_image_figure_x_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret); +static Evas_Coord evas_object_image_figure_y_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret); + +static void evas_object_image_init(Evas_Object *obj); +static void *evas_object_image_new(void); +static void evas_object_image_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); +static void evas_object_image_free(Evas_Object *obj); +static void evas_object_image_render_pre(Evas_Object *obj); +static void evas_object_image_render_post(Evas_Object *obj); + +static unsigned int evas_object_image_id_get(Evas_Object *obj); +static unsigned int evas_object_image_visual_id_get(Evas_Object *obj); +static void *evas_object_image_engine_data_get(Evas_Object *obj); + +static int evas_object_image_is_opaque(Evas_Object *obj); +static int evas_object_image_was_opaque(Evas_Object *obj); +static int evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +static int evas_object_image_has_opaque_rect(Evas_Object *obj); +static int evas_object_image_get_opaque_rect(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); +static int evas_object_image_can_map(Evas_Object *obj); + +static void *evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace); +static void evas_object_image_filled_resize_listener(void *data, Evas *e, Evas_Object *obj, void *einfo); + +static void _proxy_unset(Evas_Object *proxy); +static void _proxy_set(Evas_Object *proxy, Evas_Object *src); +static void _proxy_error(Evas_Object *proxy, void *context, void *output, void *surface, int x, int y); + +static void _cleanup_tmpf(Evas_Object *obj); + +static const Evas_Object_Func object_func = +{ + /* methods (compulsory) */ + evas_object_image_free, + evas_object_image_render, + evas_object_image_render_pre, + evas_object_image_render_post, + evas_object_image_id_get, + evas_object_image_visual_id_get, + evas_object_image_engine_data_get, + /* these are optional. NULL = nothing */ + NULL, + NULL, + NULL, + NULL, + evas_object_image_is_opaque, + evas_object_image_was_opaque, + evas_object_image_is_inside, + NULL, + NULL, + NULL, + evas_object_image_has_opaque_rect, + evas_object_image_get_opaque_rect, + evas_object_image_can_map +}; + +EVAS_MEMPOOL(_mp_obj); + +static void +_evas_object_image_cleanup(Evas_Object *obj, Evas_Object_Image *o) +{ + if ((o->preloading) && (o->engine_data)) + { + o->preloading = 0; + obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, + o->engine_data, + obj); + } + if (o->tmpf) _cleanup_tmpf(obj); + if (o->cur.source) _proxy_unset(obj); +} + +EAPI Evas_Object * +evas_object_image_add(Evas *e) +{ + Evas_Object *obj; + Evas_Object_Image *o; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + obj = evas_object_new(e); + evas_object_image_init(obj); + evas_object_inject(obj, e); + o = (Evas_Object_Image *)(obj->object_data); + o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get(obj->layer->evas->engine.data.output, + o->engine_data); + return obj; +} + +EAPI Evas_Object * +evas_object_image_filled_add(Evas *e) +{ + Evas_Object *obj; + obj = evas_object_image_add(e); + evas_object_image_filled_set(obj, 1); + return obj; +} + +static void +_cleanup_tmpf(Evas_Object *obj) +{ + Evas_Object_Image *o; + + o = (Evas_Object_Image *)(obj->object_data); + if (!o->tmpf) return; +#ifdef __linux__ +#else + unlink(o->tmpf); +#endif + if (o->tmpf_fd >= 0) close(o->tmpf_fd); + eina_stringshare_del(o->tmpf); + o->tmpf_fd = -1; + o->tmpf = NULL; +} + +static void +_create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__) +{ + Evas_Object_Image *o; + char buf[4096]; + void *dst; + int fd = -1; + + o = (Evas_Object_Image *)(obj->object_data); +#ifdef __linux__ + snprintf(buf, sizeof(buf), "/dev/shm/.evas-tmpf-%i-%p-%i-XXXXXX", + (int)getpid(), data, (int)size); + fd = mkstemp(buf); +#endif + if (fd < 0) + { + snprintf(buf, sizeof(buf), "/tmp/.evas-tmpf-%i-%p-%i-XXXXXX", + (int)getpid(), data, (int)size); + fd = mkstemp(buf); + } + if (fd < 0) return; + if (ftruncate(fd, size) < 0) + { + unlink(buf); + close(fd); + return; + } + unlink(buf); + + eina_mmap_safety_enabled_set(EINA_TRUE); + + dst = mmap(NULL, size, + PROT_READ | PROT_WRITE, + MAP_SHARED, + fd, 0); + if (dst == MAP_FAILED) + { + close(fd); + return; + } + o->tmpf_fd = fd; +#ifdef __linux__ + snprintf(buf, sizeof(buf), "/proc/%li/fd/%i", (long)getpid(), fd); +#endif + o->tmpf = eina_stringshare_add(buf); + memcpy(dst, data, size); + munmap(dst, size); +} + +EAPI void +evas_object_image_memfile_set(Evas_Object *obj, void *data, int size, char *format, char *key) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + _cleanup_tmpf(obj); + evas_object_image_file_set(obj, NULL, NULL); + // invalidate the cache effectively + evas_object_image_alpha_set(obj, !o->cur.has_alpha); + evas_object_image_alpha_set(obj, !o->cur.has_alpha); + + if ((size < 1) || (!data)) return; + + _create_tmpf(obj, data, size, format); + evas_object_image_file_set(obj, o->tmpf, key); + if (!o->engine_data) + { + ERR("unable to load '%s' from memory", o->tmpf); + _cleanup_tmpf(obj); + return; + } +} + +EAPI void +evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key) +{ + Evas_Object_Image *o; + Evas_Image_Load_Opts lo; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if ((o->tmpf) && (file != o->tmpf)) _cleanup_tmpf(obj); + if ((o->cur.file) && (file) && (!strcmp(o->cur.file, file))) + { + if ((!o->cur.key) && (!key)) + return; + if ((o->cur.key) && (key) && (!strcmp(o->cur.key, key))) + return; + } +/* + * WTF? why cancel a null image preload? this is just silly (tm) + if (!o->engine_data) + obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, + o->engine_data, + obj); + */ + if (o->cur.source) _proxy_unset(obj); + if (o->cur.file) eina_stringshare_del(o->cur.file); + if (o->cur.key) eina_stringshare_del(o->cur.key); + if (file) o->cur.file = eina_stringshare_add(file); + else o->cur.file = NULL; + if (key) o->cur.key = eina_stringshare_add(key); + else o->cur.key = NULL; + o->prev.file = NULL; + o->prev.key = NULL; + if (o->engine_data) + { + if (o->preloading) + { + o->preloading = 0; + obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, + o->engine_data, + obj); + } + obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, + o->engine_data); + } + o->load_error = EVAS_LOAD_ERROR_NONE; + lo.scale_down_by = o->load_opts.scale_down_by; + lo.dpi = o->load_opts.dpi; + lo.w = o->load_opts.w; + lo.h = o->load_opts.h; + lo.region.x = o->load_opts.region.x; + lo.region.y = o->load_opts.region.y; + lo.region.w = o->load_opts.region.w; + lo.region.h = o->load_opts.region.h; + lo.orientation = o->load_opts.orientation; + o->engine_data = obj->layer->evas->engine.func->image_load(obj->layer->evas->engine.data.output, + o->cur.file, + o->cur.key, + &o->load_error, + &lo); + if (o->engine_data) + { + int w, h; + int stride; + + obj->layer->evas->engine.func->image_size_get(obj->layer->evas->engine.data.output, + o->engine_data, &w, &h); + if (obj->layer->evas->engine.func->image_stride_get) + obj->layer->evas->engine.func->image_stride_get(obj->layer->evas->engine.data.output, + o->engine_data, &stride); + else + stride = w * 4; + o->cur.has_alpha = obj->layer->evas->engine.func->image_alpha_get(obj->layer->evas->engine.data.output, + o->engine_data); + o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get(obj->layer->evas->engine.data.output, + o->engine_data); + o->cur.image.w = w; + o->cur.image.h = h; + o->cur.image.stride = stride; + } + else + { + if (o->load_error == EVAS_LOAD_ERROR_NONE) + o->load_error = EVAS_LOAD_ERROR_GENERIC; + o->cur.has_alpha = 1; + o->cur.cspace = EVAS_COLORSPACE_ARGB8888; + o->cur.image.w = 0; + o->cur.image.h = 0; + o->cur.image.stride = 0; + } + o->changed = 1; + evas_object_change(obj); +} + +EAPI void +evas_object_image_file_get(const Evas_Object *obj, const char **file, const char **key) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (file) *file = NULL; + if (key) *key = NULL; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + if (file) *file = NULL; + if (key) *key = NULL; + return; + MAGIC_CHECK_END(); + if (file) *file = o->cur.file; + if (key) *key = o->cur.key; +} + +EAPI Eina_Bool +evas_object_image_source_set(Evas_Object *obj, Evas_Object *src) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + o = obj->object_data; + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return EINA_FALSE; + MAGIC_CHECK_END(); + + if (src == obj) return EINA_FALSE; + if (o->cur.source == src) return EINA_TRUE; + + _evas_object_image_cleanup(obj, o); + /* Kill the image if any */ + if (o->cur.file || o->cur.key) + evas_object_image_file_set(obj, NULL, NULL); + + if (src) + { + _proxy_set(obj, src); + } + + return EINA_TRUE; +} + + +EAPI Evas_Object * +evas_object_image_source_get(Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = obj->object_data; + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return NULL; + MAGIC_CHECK_END(); + + return o->cur.source; +} + +EAPI Eina_Bool +evas_object_image_source_unset(Evas_Object *obj) +{ + return evas_object_image_source_set(obj, NULL); +} + +EAPI void +evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (l < 0) l = 0; + if (r < 0) r = 0; + if (t < 0) t = 0; + if (b < 0) b = 0; + if ((o->cur.border.l == l) && + (o->cur.border.r == r) && + (o->cur.border.t == t) && + (o->cur.border.b == b)) return; + o->cur.border.l = l; + o->cur.border.r = r; + o->cur.border.t = t; + o->cur.border.b = b; + o->cur.opaque_valid = 0; + o->changed = 1; + evas_object_change(obj); +} + +EAPI void +evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (l) *l = 0; + if (r) *r = 0; + if (t) *t = 0; + if (b) *b = 0; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + if (l) *l = 0; + if (r) *r = 0; + if (t) *t = 0; + if (b) *b = 0; + return; + MAGIC_CHECK_END(); + if (l) *l = o->cur.border.l; + if (r) *r = o->cur.border.r; + if (t) *t = o->cur.border.t; + if (b) *b = o->cur.border.b; +} + +EAPI void +evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border_Fill_Mode fill) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (fill == o->cur.border.fill) return; + o->cur.border.fill = fill; + o->changed = 1; + evas_object_change(obj); +} + +EAPI Evas_Border_Fill_Mode +evas_object_image_border_center_fill_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 0; + MAGIC_CHECK_END(); + return o->cur.border.fill; +} + +EAPI void +evas_object_image_filled_set(Evas_Object *obj, Eina_Bool setting) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + + setting = !!setting; + if (o->filled == setting) return; + + o->filled = setting; + if (!o->filled) + evas_object_event_callback_del(obj, EVAS_CALLBACK_RESIZE, evas_object_image_filled_resize_listener); + else + { + Evas_Coord w, h; + + evas_object_geometry_get(obj, NULL, NULL, &w, &h); + evas_object_image_fill_set(obj, 0, 0, w, h); + + evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, evas_object_image_filled_resize_listener, NULL); + } +} + +EAPI Eina_Bool +evas_object_image_filled_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 0; + MAGIC_CHECK_END(); + + return o->filled; +} + +EAPI void +evas_object_image_border_scale_set(Evas_Object *obj, double scale) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (scale == o->cur.border.scale) return; + o->cur.border.scale = scale; + o->changed = 1; + evas_object_change(obj); +} + +EAPI double +evas_object_image_border_scale_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 1.0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 1.0; + MAGIC_CHECK_END(); + return o->cur.border.scale; +} + +EAPI void +evas_object_image_fill_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) +{ + Evas_Object_Image *o; + + if (w < 0) w = -w; + if (h < 0) h = -h; + if (w == 0) return; + if (h == 0) return; + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if ((o->cur.fill.x == x) && + (o->cur.fill.y == y) && + (o->cur.fill.w == w) && + (o->cur.fill.h == h)) return; + o->cur.fill.x = x; + o->cur.fill.y = y; + o->cur.fill.w = w; + o->cur.fill.h = h; + o->cur.opaque_valid = 0; + o->changed = 1; + evas_object_change(obj); +} + +EAPI void +evas_object_image_fill_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = 0; + if (h) *h = 0; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = 0; + if (h) *h = 0; + return; + MAGIC_CHECK_END(); + if (x) *x = o->cur.fill.x; + if (y) *y = o->cur.fill.y; + if (w) *w = o->cur.fill.w; + if (h) *h = o->cur.fill.h; +} + + +EAPI void +evas_object_image_fill_spread_set(Evas_Object *obj, Evas_Fill_Spread spread) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (spread == (Evas_Fill_Spread)o->cur.spread) return; + o->cur.spread = spread; + o->changed = 1; + evas_object_change(obj); +} + +EAPI Evas_Fill_Spread +evas_object_image_fill_spread_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EVAS_TEXTURE_REPEAT; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return EVAS_TEXTURE_REPEAT; + MAGIC_CHECK_END(); + return (Evas_Fill_Spread)o->cur.spread; +} + +EAPI void +evas_object_image_size_set(Evas_Object *obj, int w, int h) +{ + Evas_Object_Image *o; + int stride = 0; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + _evas_object_image_cleanup(obj, o); + if (w < 1) w = 1; + if (h < 1) h = 1; + if (w > 32768) return; + if (h > 32768) return; + if ((w == o->cur.image.w) && + (h == o->cur.image.h)) return; + o->cur.image.w = w; + o->cur.image.h = h; + if (o->engine_data) + o->engine_data = obj->layer->evas->engine.func->image_size_set(obj->layer->evas->engine.data.output, + o->engine_data, + w, h); + else + o->engine_data = obj->layer->evas->engine.func->image_new_from_copied_data + (obj->layer->evas->engine.data.output, w, h, NULL, o->cur.has_alpha, + o->cur.cspace); + + if (o->engine_data) + { + if (obj->layer->evas->engine.func->image_scale_hint_set) + obj->layer->evas->engine.func->image_scale_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->scale_hint); + if (obj->layer->evas->engine.func->image_content_hint_set) + obj->layer->evas->engine.func->image_content_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->content_hint); + if (obj->layer->evas->engine.func->image_stride_get) + obj->layer->evas->engine.func->image_stride_get + (obj->layer->evas->engine.data.output, + o->engine_data, &stride); + else + stride = w * 4; + } + else + stride = w * 4; + o->cur.image.stride = stride; + +/* FIXME - in engine call above + if (o->engine_data) + o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, + o->engine_data, + o->cur.has_alpha); +*/ + EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); + o->changed = 1; + evas_object_change(obj); +} + +EAPI void +evas_object_image_size_get(const Evas_Object *obj, int *w, int *h) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (w) *w = 0; + if (h) *h = 0; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + if (w) *w = 0; + if (h) *h = 0; + return; + MAGIC_CHECK_END(); + if (w) *w = o->cur.image.w; + if (h) *h = o->cur.image.h; +} + +EAPI int +evas_object_image_stride_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 0; + MAGIC_CHECK_END(); + return o->cur.image.stride; +} + +EAPI Evas_Load_Error +evas_object_image_load_error_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 0; + MAGIC_CHECK_END(); + return o->load_error; +} + +EAPI void * +evas_object_image_data_convert(Evas_Object *obj, Evas_Colorspace to_cspace) +{ + Evas_Object_Image *o; + DATA32 *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return NULL; + MAGIC_CHECK_END(); + if ((o->preloading) && (o->engine_data)) + { + o->preloading = 0; + obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, + o->engine_data, + obj); + } + if (!o->engine_data) return NULL; + if (o->video_surface) + o->video.update_pixels(o->video.data, obj, &o->video); + if (o->cur.cspace == to_cspace) return NULL; + data = NULL; + o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, + o->engine_data, + 0, + &data, + &o->load_error); + return evas_object_image_data_convert_internal(o, data, to_cspace); +} + +EAPI void +evas_object_image_data_set(Evas_Object *obj, void *data) +{ + Evas_Object_Image *o; + void *p_data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + _evas_object_image_cleanup(obj, o); +#ifdef EVAS_FRAME_QUEUING + if (o->engine_data) + evas_common_pipe_op_image_flush(o->engine_data); +#endif + p_data = o->engine_data; + if (data) + { + if (o->engine_data) + o->engine_data = obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output, + o->engine_data, + data); + else + o->engine_data = obj->layer->evas->engine.func->image_new_from_data(obj->layer->evas->engine.data.output, + o->cur.image.w, + o->cur.image.h, + data, + o->cur.has_alpha, + o->cur.cspace); + if (o->engine_data) + { + int stride = 0; + + if (obj->layer->evas->engine.func->image_scale_hint_set) + obj->layer->evas->engine.func->image_scale_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->scale_hint); + if (obj->layer->evas->engine.func->image_content_hint_set) + obj->layer->evas->engine.func->image_content_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->content_hint); + if (obj->layer->evas->engine.func->image_stride_get) + obj->layer->evas->engine.func->image_stride_get + (obj->layer->evas->engine.data.output, + o->engine_data, &stride); + else + stride = o->cur.image.w * 4; + o->cur.image.stride = stride; + } + } + else + { + if (o->engine_data) + obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, + o->engine_data); + o->load_error = EVAS_LOAD_ERROR_NONE; + o->cur.image.w = 0; + o->cur.image.h = 0; + o->cur.image.stride = 0; + o->engine_data = NULL; + } +/* FIXME - in engine call above + if (o->engine_data) + o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, + o->engine_data, + o->cur.has_alpha); +*/ + if (o->pixels_checked_out > 0) o->pixels_checked_out--; + if (p_data != o->engine_data) + { + EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); + o->pixels_checked_out = 0; + } + o->changed = 1; + evas_object_change(obj); +} + +EAPI void * +evas_object_image_data_get(const Evas_Object *obj, Eina_Bool for_writing) +{ + Evas_Object_Image *o; + DATA32 *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return NULL; + MAGIC_CHECK_END(); + if (!o->engine_data) return NULL; +#ifdef EVAS_FRAME_QUEUING + evas_common_pipe_op_image_flush(o->engine_data); +#endif + + data = NULL; + if (obj->layer->evas->engine.func->image_scale_hint_set) + obj->layer->evas->engine.func->image_scale_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->scale_hint); + if (obj->layer->evas->engine.func->image_content_hint_set) + obj->layer->evas->engine.func->image_content_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->content_hint); + o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, + o->engine_data, + for_writing, + &data, + &o->load_error); + + /* if we fail to get engine_data, we have to return NULL */ + if (!o->engine_data) return NULL; + + if (o->engine_data) + { + int stride = 0; + + if (obj->layer->evas->engine.func->image_stride_get) + obj->layer->evas->engine.func->image_stride_get + (obj->layer->evas->engine.data.output, + o->engine_data, &stride); + else + stride = o->cur.image.w * 4; + o->cur.image.stride = stride; + } + o->pixels_checked_out++; + if (for_writing) + { + EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); + } + + return data; +} + +EAPI void +evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return ; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return ; + MAGIC_CHECK_END(); + if (!o->engine_data) + { + o->preloading = 1; + evas_object_inform_call_image_preloaded(obj); + return; + } + // FIXME: if already busy preloading, then dont request again until + // preload done + if (cancel) + { + if (o->preloading) + { + o->preloading = 0; + obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, + o->engine_data, + obj); + } + } + else + { + if (!o->preloading) + { + o->preloading = 1; + obj->layer->evas->engine.func->image_data_preload_request(obj->layer->evas->engine.data.output, + o->engine_data, + obj); + } + } +} + +EAPI void +evas_object_image_data_copy_set(Evas_Object *obj, void *data) +{ + Evas_Object_Image *o; + + if (!data) return; + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + _evas_object_image_cleanup(obj, o); + if ((o->cur.image.w <= 0) || + (o->cur.image.h <= 0)) return; + if (o->engine_data) + obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, + o->engine_data); + o->engine_data = obj->layer->evas->engine.func->image_new_from_copied_data(obj->layer->evas->engine.data.output, + o->cur.image.w, + o->cur.image.h, + data, + o->cur.has_alpha, + o->cur.cspace); + if (o->engine_data) + { + int stride = 0; + + o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, + o->engine_data, + o->cur.has_alpha); + if (obj->layer->evas->engine.func->image_scale_hint_set) + obj->layer->evas->engine.func->image_scale_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->scale_hint); + if (obj->layer->evas->engine.func->image_content_hint_set) + obj->layer->evas->engine.func->image_content_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->content_hint); + if (obj->layer->evas->engine.func->image_stride_get) + obj->layer->evas->engine.func->image_stride_get + (obj->layer->evas->engine.data.output, + o->engine_data, &stride); + else + stride = o->cur.image.w * 4; + o->cur.image.stride = stride; + } + o->pixels_checked_out = 0; + EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); +} + +EAPI void +evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h) +{ + Evas_Object_Image *o; + Eina_Rectangle *r; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, o->cur.image.w, o->cur.image.h); + if ((w <= 0) || (h <= 0)) return; + NEW_RECT(r, x, y, w, h); + if (r) o->pixel_updates = eina_list_append(o->pixel_updates, r); + o->changed = 1; + evas_object_change(obj); +} + +EAPI void +evas_object_image_alpha_set(Evas_Object *obj, Eina_Bool has_alpha) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if ((o->preloading) && (o->engine_data)) + { + o->preloading = 0; + obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, + o->engine_data, + obj); + } + if (((has_alpha) && (o->cur.has_alpha)) || + ((!has_alpha) && (!o->cur.has_alpha))) + return; + o->cur.has_alpha = has_alpha; + if (o->engine_data) + { + int stride = 0; + +#ifdef EVAS_FRAME_QUEUING + evas_common_pipe_op_image_flush(o->engine_data); +#endif + o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, + o->engine_data, + o->cur.has_alpha); + if (obj->layer->evas->engine.func->image_scale_hint_set) + obj->layer->evas->engine.func->image_scale_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->scale_hint); + if (obj->layer->evas->engine.func->image_content_hint_set) + obj->layer->evas->engine.func->image_content_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->content_hint); + if (obj->layer->evas->engine.func->image_stride_get) + obj->layer->evas->engine.func->image_stride_get + (obj->layer->evas->engine.data.output, + o->engine_data, &stride); + else + stride = o->cur.image.w * 4; + o->cur.image.stride = stride; + } + evas_object_image_data_update_add(obj, 0, 0, o->cur.image.w, o->cur.image.h); + EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); +} + + +EAPI Eina_Bool +evas_object_image_alpha_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 0; + MAGIC_CHECK_END(); + return o->cur.has_alpha; +} + +EAPI void +evas_object_image_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth_scale) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (((smooth_scale) && (o->cur.smooth_scale)) || + ((!smooth_scale) && (!o->cur.smooth_scale))) + return; + o->cur.smooth_scale = smooth_scale; + o->changed = 1; + evas_object_change(obj); +} + +EAPI Eina_Bool +evas_object_image_smooth_scale_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 0; + MAGIC_CHECK_END(); + return o->cur.smooth_scale; +} + +EAPI void +evas_object_image_reload(Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if ((o->preloading) && (o->engine_data)) + { + o->preloading = 0; + obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, + o->engine_data, + obj); + } + if ((!o->cur.file) || + (o->pixels_checked_out > 0)) return; + if (o->engine_data) + o->engine_data = obj->layer->evas->engine.func->image_dirty_region(obj->layer->evas->engine.data.output, o->engine_data, 0, 0, o->cur.image.w, o->cur.image.h); + evas_object_image_unload(obj, 1); + evas_object_inform_call_image_unloaded(obj); + evas_object_image_load(obj); + o->prev.file = NULL; + o->prev.key = NULL; + o->changed = 1; + evas_object_change(obj); +} + +EAPI Eina_Bool +evas_object_image_save(const Evas_Object *obj, const char *file, const char *key, const char *flags) +{ + Evas_Object_Image *o; + DATA32 *data = NULL; + int quality = 80, compress = 9, ok = 0; + RGBA_Image *im; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 0; + MAGIC_CHECK_END(); + + if (!o->engine_data) return 0; + o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, + o->engine_data, + 0, + &data, + &o->load_error); + if (flags) + { + char *p, *pp; + char *tflags; + + tflags = alloca(strlen(flags) + 1); + strcpy(tflags, flags); + p = tflags; + while (p) + { + pp = strchr(p, ' '); + if (pp) *pp = 0; + sscanf(p, "quality=%i", &quality); + sscanf(p, "compress=%i", &compress); + if (pp) p = pp + 1; + else break; + } + } + im = (RGBA_Image*) evas_cache_image_data(evas_common_image_cache_get(), + o->cur.image.w, + o->cur.image.h, + data, + o->cur.has_alpha, + EVAS_COLORSPACE_ARGB8888); + if (im) + { + if (o->cur.cspace == EVAS_COLORSPACE_ARGB8888) + im->image.data = data; + else + im->image.data = evas_object_image_data_convert_internal(o, + data, + EVAS_COLORSPACE_ARGB8888); + if (im->image.data) + { + ok = evas_common_save_image_to_file(im, file, key, quality, compress); + + if (o->cur.cspace != EVAS_COLORSPACE_ARGB8888) + free(im->image.data); + } + + evas_cache_image_drop(&im->cache_entry); + } + return ok; +} + +EAPI Eina_Bool +evas_object_image_pixels_import(Evas_Object *obj, Evas_Pixel_Import_Source *pixels) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 0; + MAGIC_CHECK_END(); + _evas_object_image_cleanup(obj, o); + if ((pixels->w != o->cur.image.w) || (pixels->h != o->cur.image.h)) return 0; + switch (pixels->format) + { +#if 0 + case EVAS_PIXEL_FORMAT_ARGB32: + { + if (o->engine_data) + { + DATA32 *image_pixels = NULL; + + o->engine_data = + obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, + o->engine_data, + 1, + &image_pixels, + &o->load_error); +/* FIXME: need to actualyl support this */ +/* memcpy(image_pixels, pixels->rows, o->cur.image.w * o->cur.image.h * 4);*/ + if (o->engine_data) + o->engine_data = + obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output, + o->engine_data, + image_pixels); + if (o->engine_data) + o->engine_data = + obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, + o->engine_data, + o->cur.has_alpha); + o->changed = 1; + evas_object_change(obj); + } + } + break; +#endif +#ifdef BUILD_CONVERT_YUV + case EVAS_PIXEL_FORMAT_YUV420P_601: + { + if (o->engine_data) + { + DATA32 *image_pixels = NULL; + + o->engine_data = + obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, + o->engine_data, + 1, + &image_pixels, + &o->load_error); + if (image_pixels) + evas_common_convert_yuv_420p_601_rgba((DATA8 **) pixels->rows, + (DATA8 *) image_pixels, + o->cur.image.w, + o->cur.image.h); + if (o->engine_data) + o->engine_data = + obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output, + o->engine_data, + image_pixels); + if (o->engine_data) + o->engine_data = + obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, + o->engine_data, + o->cur.has_alpha); + o->changed = 1; + evas_object_change(obj); + } + } + break; +#endif + default: + return 0; + break; + } + return 1; +} + +EAPI void +evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + o->func.get_pixels = func; + o->func.get_pixels_data = data; +} + +EAPI void +evas_object_image_pixels_dirty_set(Evas_Object *obj, Eina_Bool dirty) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (dirty) o->dirty_pixels = 1; + else o->dirty_pixels = 0; + o->changed = 1; + evas_object_change(obj); +} + +EAPI Eina_Bool +evas_object_image_pixels_dirty_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 0; + MAGIC_CHECK_END(); + if (o->dirty_pixels) return 1; + return 0; +} + +EAPI void +evas_object_image_load_dpi_set(Evas_Object *obj, double dpi) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (dpi == o->load_opts.dpi) return; + o->load_opts.dpi = dpi; + if (o->cur.file) + { + evas_object_image_unload(obj, 0); + evas_object_inform_call_image_unloaded(obj); + evas_object_image_load(obj); + o->changed = 1; + evas_object_change(obj); + } +} + +EAPI double +evas_object_image_load_dpi_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0.0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 0.0; + MAGIC_CHECK_END(); + return o->load_opts.dpi; +} + +EAPI void +evas_object_image_load_size_set(Evas_Object *obj, int w, int h) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if ((o->load_opts.w == w) && (o->load_opts.h == h)) return; + o->load_opts.w = w; + o->load_opts.h = h; + if (o->cur.file) + { + evas_object_image_unload(obj, 0); + evas_object_inform_call_image_unloaded(obj); + evas_object_image_load(obj); + o->changed = 1; + evas_object_change(obj); + } +} + +EAPI void +evas_object_image_load_size_get(const Evas_Object *obj, int *w, int *h) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (w) *w = o->load_opts.w; + if (h) *h = o->load_opts.h; +} + +EAPI void +evas_object_image_load_scale_down_set(Evas_Object *obj, int scale_down) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (o->load_opts.scale_down_by == scale_down) return; + o->load_opts.scale_down_by = scale_down; + if (o->cur.file) + { + evas_object_image_unload(obj, 0); + evas_object_inform_call_image_unloaded(obj); + evas_object_image_load(obj); + o->changed = 1; + evas_object_change(obj); + } +} + +EAPI int +evas_object_image_load_scale_down_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return 0; + MAGIC_CHECK_END(); + return o->load_opts.scale_down_by; +} + +EAPI void +evas_object_image_load_region_set(Evas_Object *obj, int x, int y, int w, int h) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if ((o->load_opts.region.x == x) && (o->load_opts.region.y == y) && + (o->load_opts.region.w == w) && (o->load_opts.region.h == h)) return; + o->load_opts.region.x = x; + o->load_opts.region.y = y; + o->load_opts.region.w = w; + o->load_opts.region.h = h; + if (o->cur.file) + { + evas_object_image_unload(obj, 0); + evas_object_inform_call_image_unloaded(obj); + evas_object_image_load(obj); + o->changed = 1; + evas_object_change(obj); + } +} + +EAPI void +evas_object_image_load_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (x) *x = o->load_opts.region.x; + if (y) *y = o->load_opts.region.y; + if (w) *w = o->load_opts.region.w; + if (h) *h = o->load_opts.region.h; +} + +EAPI void +evas_object_image_load_orientation_set(Evas_Object *obj, Eina_Bool enable) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + o->load_opts.orientation = !!enable; +} + +EAPI Eina_Bool +evas_object_image_load_orientation_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return EINA_FALSE; + MAGIC_CHECK_END(); + return o->load_opts.orientation; +} + +EAPI void +evas_object_image_colorspace_set(Evas_Object *obj, Evas_Colorspace cspace) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + + _evas_object_image_cleanup(obj, o); +#ifdef EVAS_FRAME_QUEUING + if ((Evas_Colorspace)o->cur.cspace != cspace) + { + if (o->engine_data) + evas_common_pipe_op_image_flush(o->engine_data); + } +#endif + + o->cur.cspace = cspace; + if (o->engine_data) + obj->layer->evas->engine.func->image_colorspace_set(obj->layer->evas->engine.data.output, + o->engine_data, + cspace); +} + +EAPI Evas_Colorspace +evas_object_image_colorspace_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EVAS_COLORSPACE_ARGB8888; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return EVAS_COLORSPACE_ARGB8888; + MAGIC_CHECK_END(); + return o->cur.cspace; +} + +EAPI void +evas_object_image_video_surface_set(Evas_Object *obj, Evas_Video_Surface *surf) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + _evas_object_image_cleanup(obj, o); + if (o->video_surface) + { + o->video_surface = 0; + obj->layer->evas->video_objects = eina_list_remove(obj->layer->evas->video_objects, obj); + } + + if (surf) + { + if (surf->version != EVAS_VIDEO_SURFACE_VERSION) return ; + + if (!surf->update_pixels || + !surf->move || + !surf->resize || + !surf->hide || + !surf->show) + return ; + + o->created = EINA_TRUE; + o->video_surface = 1; + o->video = *surf; + + obj->layer->evas->video_objects = eina_list_append(obj->layer->evas->video_objects, obj); + } + else + { + o->video_surface = 0; + o->video.update_pixels = NULL; + o->video.move = NULL; + o->video.resize = NULL; + o->video.hide = NULL; + o->video.show = NULL; + o->video.data = NULL; + } +} + +EAPI const Evas_Video_Surface * +evas_object_image_video_surface_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return NULL; + MAGIC_CHECK_END(); + if (!o->video_surface) return NULL; + return &o->video; +} + +EAPI void +evas_object_image_native_surface_set(Evas_Object *obj, Evas_Native_Surface *surf) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + _evas_object_image_cleanup(obj, o); + if (!obj->layer->evas->engine.func->image_native_set) return; + if ((surf) && + ((surf->version < 2) || + (surf->version > EVAS_NATIVE_SURFACE_VERSION))) return; + o->engine_data = + obj->layer->evas->engine.func->image_native_set(obj->layer->evas->engine.data.output, + o->engine_data, + surf); +} + +EAPI Evas_Native_Surface * +evas_object_image_native_surface_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return NULL; + MAGIC_CHECK_END(); + if (!obj->layer->evas->engine.func->image_native_get) return NULL; + return obj->layer->evas->engine.func->image_native_get(obj->layer->evas->engine.data.output, + o->engine_data); +} + +EAPI void +evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (o->scale_hint == hint) return; +#ifdef EVAS_FRAME_QUEUING + if (o->engine_data) + evas_common_pipe_op_image_flush(o->engine_data); +#endif + o->scale_hint = hint; + if (o->engine_data) + { + int stride = 0; + + if (obj->layer->evas->engine.func->image_scale_hint_set) + obj->layer->evas->engine.func->image_scale_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->scale_hint); + if (obj->layer->evas->engine.func->image_stride_get) + obj->layer->evas->engine.func->image_stride_get + (obj->layer->evas->engine.data.output, + o->engine_data, &stride); + else + stride = o->cur.image.w * 4; + o->cur.image.stride = stride; + } +} + +EAPI Evas_Image_Scale_Hint +evas_object_image_scale_hint_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EVAS_IMAGE_SCALE_HINT_NONE; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return EVAS_IMAGE_SCALE_HINT_NONE; + MAGIC_CHECK_END(); + return o->scale_hint; +} + +EAPI void +evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hint) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + if (o->content_hint == hint) return; +#ifdef EVAS_FRAME_QUEUING + if (o->engine_data) + evas_common_pipe_op_image_flush(o->engine_data); +#endif + o->content_hint = hint; + if (o->engine_data) + { + int stride = 0; + + if (obj->layer->evas->engine.func->image_content_hint_set) + obj->layer->evas->engine.func->image_content_hint_set + (obj->layer->evas->engine.data.output, + o->engine_data, o->content_hint); + if (obj->layer->evas->engine.func->image_stride_get) + obj->layer->evas->engine.func->image_stride_get + (obj->layer->evas->engine.data.output, + o->engine_data, &stride); + else + stride = o->cur.image.w * 4; + o->cur.image.stride = stride; + } +} + +EAPI void +evas_object_image_alpha_mask_set(Evas_Object *obj, Eina_Bool ismask) +{ + Evas_Object_Image *o; + + if (!ismask) return; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + + /* Convert to A8 if not already */ + + /* done */ + +} + +#define FRAME_MAX 1024 +EAPI Evas_Image_Content_Hint +evas_object_image_content_hint_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EVAS_IMAGE_CONTENT_HINT_NONE; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return EVAS_IMAGE_CONTENT_HINT_NONE; + MAGIC_CHECK_END(); + return o->content_hint; +} + +/* animated feature */ +EAPI Eina_Bool +evas_object_image_animated_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return EINA_FALSE; + MAGIC_CHECK_END(); + + if (obj->layer->evas->engine.func->image_animated_get) + return obj->layer->evas->engine.func->image_animated_get(obj->layer->evas->engine.data.output, o->engine_data); + return EINA_FALSE; +} + +EAPI int +evas_object_image_animated_frame_count_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return -1; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return -1; + MAGIC_CHECK_END(); + + if (!evas_object_image_animated_get(obj)) return -1; + if (obj->layer->evas->engine.func->image_animated_frame_count_get) + return obj->layer->evas->engine.func->image_animated_frame_count_get(obj->layer->evas->engine.data.output, o->engine_data); + return -1; +} + +EAPI Evas_Image_Animated_Loop_Hint +evas_object_image_animated_loop_type_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EVAS_IMAGE_ANIMATED_HINT_NONE; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return EVAS_IMAGE_ANIMATED_HINT_NONE; + MAGIC_CHECK_END(); + + if (!evas_object_image_animated_get(obj)) return EVAS_IMAGE_ANIMATED_HINT_NONE; + + if (obj->layer->evas->engine.func->image_animated_loop_type_get) + return obj->layer->evas->engine.func->image_animated_loop_type_get(obj->layer->evas->engine.data.output, o->engine_data); + return EVAS_IMAGE_ANIMATED_HINT_NONE; +} + +EAPI int +evas_object_image_animated_loop_count_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return -1; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return -1; + MAGIC_CHECK_END(); + + if (!evas_object_image_animated_get(obj)) return -1; + + if (obj->layer->evas->engine.func->image_animated_loop_count_get) + return obj->layer->evas->engine.func->image_animated_loop_count_get(obj->layer->evas->engine.data.output, o->engine_data); + return -1; +} + +EAPI double +evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int frame_num) +{ + Evas_Object_Image *o; + int frame_count = 0; + + if (start_frame < 1) return -1; + if (frame_num < 0) return -1; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return -1; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return -1; + MAGIC_CHECK_END(); + + if (!evas_object_image_animated_get(obj)) return -1; + + if (!obj->layer->evas->engine.func->image_animated_frame_count_get) return -1; + + frame_count = obj->layer->evas->engine.func->image_animated_frame_count_get(obj->layer->evas->engine.data.output, o->engine_data); + + if ((start_frame + frame_num) > frame_count) return -1; + if (obj->layer->evas->engine.func->image_animated_frame_duration_get) + return obj->layer->evas->engine.func->image_animated_frame_duration_get(obj->layer->evas->engine.data.output, o->engine_data, start_frame, frame_num); + return -1; +} + +EAPI void +evas_object_image_animated_frame_set(Evas_Object *obj, int frame_index) +{ + Evas_Object_Image *o; + int frame_count = 0; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + + if (!o->cur.file) return; + if (o->cur.frame == frame_index) return; + + if (!evas_object_image_animated_get(obj)) return; + + frame_count = evas_object_image_animated_frame_count_get(obj); + + /* limit the size of frame to FRAME_MAX */ + if ((frame_count > FRAME_MAX) || (frame_count < 0) || (frame_index > frame_count)) + return; + + if (!obj->layer->evas->engine.func->image_animated_frame_set) return; + if (!obj->layer->evas->engine.func->image_animated_frame_set(obj->layer->evas->engine.data.output, o->engine_data, frame_index)) + return; + + o->prev.frame = o->cur.frame; + o->cur.frame = frame_index; + + o->changed = 1; + evas_object_change(obj); + +} + +EAPI void +evas_image_cache_flush(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + e->engine.func->image_cache_flush(e->engine.data.output); +} + +EAPI void +evas_image_cache_reload(Evas *e) +{ + Evas_Layer *layer; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + evas_image_cache_flush(e); + EINA_INLIST_FOREACH(e->layers, layer) + { + Evas_Object *obj; + + EINA_INLIST_FOREACH(layer->objects, obj) + { + Evas_Object_Image *o; + + o = (Evas_Object_Image *)(obj->object_data); + if (o->magic == MAGIC_OBJ_IMAGE) + { + evas_object_image_unload(obj, 1); + evas_object_inform_call_image_unloaded(obj); + } + } + } + evas_image_cache_flush(e); + EINA_INLIST_FOREACH(e->layers, layer) + { + Evas_Object *obj; + + EINA_INLIST_FOREACH(layer->objects, obj) + { + Evas_Object_Image *o; + + o = (Evas_Object_Image *)(obj->object_data); + if (o->magic == MAGIC_OBJ_IMAGE) + { + evas_object_image_load(obj); + o->changed = 1; + evas_object_change(obj); + } + } + } + evas_image_cache_flush(e); +} + +EAPI void +evas_image_cache_set(Evas *e, int size) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if (size < 0) size = 0; + e->engine.func->image_cache_set(e->engine.data.output, size); +} + +EAPI int +evas_image_cache_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + + return e->engine.func->image_cache_get(e->engine.data.output); +} + +EAPI Eina_Bool +evas_image_max_size_get(const Evas *e, int *maxw, int *maxh) +{ + int w = 0, h = 0; + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return EINA_FALSE; + MAGIC_CHECK_END(); + + if (maxw) *maxw = 0xffff; + if (maxh) *maxh = 0xffff; + if (!e->engine.func->image_max_size_get) return EINA_FALSE; + e->engine.func->image_max_size_get(e->engine.data.output, &w, &h); + if (maxw) *maxw = w; + if (maxh) *maxh = h; + return EINA_TRUE; +} + +/* all nice and private */ +static void +_proxy_unset(Evas_Object *proxy) +{ + Evas_Object_Image *o; + + o = proxy->object_data; + if (!o->cur.source) return; + + o->cur.source->proxy.proxies = eina_list_remove(o->cur.source->proxy.proxies, proxy); + + o->cur.source = NULL; + if (o->cur.defmap) + { + evas_map_free(o->cur.defmap); + o->cur.defmap = NULL; + } +} + + +static void +_proxy_set(Evas_Object *proxy, Evas_Object *src) +{ + Evas_Object_Image *o; + + o = proxy->object_data; + + evas_object_image_file_set(proxy, NULL, NULL); + + o->cur.source = src; + + src->proxy.proxies = eina_list_append(src->proxy.proxies, proxy); + src->proxy.redraw = EINA_TRUE; +} + +/* Some moron just set a proxy on a proxy. + * Give them some pixels. A random color + */ +static void +_proxy_error(Evas_Object *proxy, void *context, void *output, void *surface, + int x, int y) +{ + Evas_Func *func; + int r = rand() % 255; + int g = rand() % 255; + int b = rand() % 255; + + /* XXX: Eina log error or something I'm sure + * If it bugs you, just fix it. Don't tell me */ + if (VERBOSE_PROXY_ERROR) printf("Err: Argh! Recursive proxies.\n"); + + func = proxy->layer->evas->engine.func; + func->context_color_set(output, context, r, g, b, 255); + func->context_multiplier_unset(output, context); + func->context_render_op_set(output, context, proxy->cur.render_op); + func->rectangle_draw(output, context, surface, proxy->cur.geometry.x + x, + proxy->cur.geometry.y + y, + proxy->cur.geometry.w, + proxy->cur.geometry.h); + return; +} + +/* +static void +_proxy_subrender_recurse(Evas_Object *obj, Evas_Object *clip, void *output, void *surface, void *ctx, int x, int y) +{ + Evas_Object *obj2; + Evas *e = obj->layer->evas; + + if (obj->clip.clipees) return; + if (!obj->cur.visible) return; + if ((!clip) || (clip != obj->cur.clipper)) + { + if (!obj->cur.cache.clip.visible) return; + if ((obj->cur.cache.clip.a == 0) && + (obj->cur.render_op == EVAS_RENDER_BLEND)) return; + } + if ((obj->func->is_visible) && (!obj->func->is_visible(obj))) return; + + if (!obj->pre_render_done) + obj->func->render_pre(obj); + ctx = e->engine.func->context_new(output); + if (obj->smart.smart) + { + EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) + { + _proxy_subrender_recurse(obj2, clip, output, surface, ctx, x, y); + } + } + else + { + obj->func->render(obj, output, ctx, surface, x, y); + } + e->engine.func->context_free(output, ctx); +} +*/ + +/** + * Render the source object when a proxy is set. + * + * Used to force a draw if necessary, else just makes sures it's available. + */ +static void +_proxy_subrender(Evas *e, Evas_Object *source) +{ + void *ctx; +/* Evas_Object *obj2, *clip;*/ + int w, h; + + if (!source) return; + + w = source->cur.geometry.w; + h = source->cur.geometry.h; + + source->proxy.redraw = EINA_FALSE; + + /* We need to redraw surface then */ + if ((source->proxy.surface) && + ((source->proxy.w != w) || (source->proxy.h != h))) + { + e->engine.func->image_map_surface_free(e->engine.data.output, + source->proxy.surface); + source->proxy.surface = NULL; + } + + /* FIXME: Hardcoded alpha 'on' */ + /* FIXME (cont): Should see if the object has alpha */ + if (!source->proxy.surface) + { + source->proxy.surface = e->engine.func->image_map_surface_new + (e->engine.data.output, w, h, 1); + source->proxy.w = w; + source->proxy.h = h; + } + + ctx = e->engine.func->context_new(e->engine.data.output); + e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 0, 0, 0); + e->engine.func->context_render_op_set(e->engine.data.output, ctx, EVAS_RENDER_COPY); + e->engine.func->rectangle_draw(e->engine.data.output, ctx, + source->proxy.surface, 0, 0, w, h); + e->engine.func->context_free(e->engine.data.output, ctx); + + ctx = e->engine.func->context_new(e->engine.data.output); + evas_render_mapped(e, source, ctx, source->proxy.surface, + -source->cur.geometry.x, + -source->cur.geometry.y, + 1, 0, 0, e->output.w, e->output.h); + e->engine.func->context_free(e->engine.data.output, ctx); + source->proxy.surface = e->engine.func->image_dirty_region + (e->engine.data.output, source->proxy.surface, 0, 0, w, h); +/* + ctx = e->engine.func->context_new(e->engine.data.output); + if (source->smart.smart) + { + clip = evas_object_smart_clipped_clipper_get(source); + EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(source), obj2) + { + _proxy_subrender_recurse(obj2, clip, e->engine.data.output, + source->proxy.surface, + ctx, + -source->cur.geometry.x, + -source->cur.geometry.y); + } + } + else + { + if (!source->pre_render_done) + source->func->render_pre(source); + source->func->render(source, e->engine.data.output, ctx, + source->proxy.surface, + -source->cur.geometry.x, + -source->cur.geometry.y); + } + + e->engine.func->context_free(e->engine.data.output, ctx); + source->proxy.surface = e->engine.func->image_dirty_region + (e->engine.data.output, source->proxy.surface, 0, 0, w, h); + */ +} + +#if 0 // filtering disabled +/* + * + * Note that this is similar to proxy_subrender_recurse. It should be + * possible to merge I guess + */ +static void +image_filter_draw_under_recurse(Evas *e, Evas_Object *obj, Evas_Object *stop, + void *output, void *ctx, void *surface, + int x, int y) +{ + Evas_Object *obj2; + + if (obj->clip.clipees) return; + /* FIXME: Doing bounding box test */ + if (!evas_object_is_in_output_rect(obj, stop->cur.geometry.x, + stop->cur.geometry.y, + stop->cur.geometry.w, + stop->cur.geometry.h)) + return; + + if (!evas_object_is_visible(obj)) return; + obj->pre_render_done = 1; + ctx = e->engine.func->context_new(output); + + if (obj->smart.smart) + { + EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) + { + if (obj2 == stop) return; + image_filter_draw_under_recurse(e, obj2, stop, output, surface, + ctx, x, y); + } + } + else + obj->func->render(obj, output, ctx, surface, x ,y); + e->engine.func->context_free(output, ctx); +} + +/* + * Draw all visible objects intersecting an object which are _beneath_ it. + */ +static void +image_filter_draw_under(Evas *e, Evas_Object *stop, void *output, void *ctx, void *surface, int dx, int dy) +{ + Evas_Layer *lay; + int x, y; + + x = stop->cur.geometry.x - dx; + y = stop->cur.geometry.y - dy; + + EINA_INLIST_FOREACH(e->layers, lay) + { + Evas_Object *obj; + EINA_INLIST_FOREACH(lay->objects, obj) + { + if (obj->delete_me) continue; + if (obj == stop) return; + /* FIXME: Do bounding box check */ + image_filter_draw_under_recurse(e, obj, stop, output, ctx, + surface, -x, -y); + } + } + e->engine.func->image_dirty_region(output, surface, 0, 0, 300, 300); + e->engine.func->output_flush(output); +} + +/* + * Update the filtered object. + * + * Creates a new context, and renders stuff (filtered) onto that. + */ +Filtered_Image * +image_filter_update(Evas *e, Evas_Object *obj, void *src, int imagew, int imageh, int *outw, int *outh) +{ + int w, h; + void *ctx; + Evas_Filter_Info *info; + void *surface; + Eina_Bool alpha; + + info = obj->filter; + + if (info->mode == EVAS_FILTER_MODE_BELOW) + { + w = obj->cur.geometry.w; + h = obj->cur.geometry.h; + evas_filter_get_size(info, w, h, &imagew, &imageh, EINA_TRUE); + alpha = EINA_FALSE; + } + else + { + evas_filter_get_size(info, imagew, imageh, &w, &h, EINA_FALSE); + alpha = e->engine.func->image_alpha_get(e->engine.data.output, src); + } + + /* Certain filters may make alpha images anyway */ + if (alpha == EINA_FALSE) alpha = evas_filter_always_alpha(info); + + surface = e->engine.func->image_map_surface_new(e->engine.data.output, w, h, + alpha); + + if (info->mode == EVAS_FILTER_MODE_BELOW) + { + void *subsurface; + int disw, dish; + int dx, dy; + disw = obj->cur.geometry.w; + dish = obj->cur.geometry.h; + dx = (imagew - w) >> 1; + dy = (imageh - h) >> 1; + subsurface = e->engine.func->image_map_surface_new + (e->engine.data.output, imagew, imageh, 1); + ctx = e->engine.func->context_new(e->engine.data.output); + e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 255, 0, 255); + e->engine.func->context_render_op_set(e->engine.data.output, ctx, EVAS_RENDER_COPY); + e->engine.func->rectangle_draw(e->engine.data.output, ctx, + subsurface, 0, 0, imagew, imageh); + + image_filter_draw_under(e, obj, e->engine.data.output, ctx, + subsurface, dx, dy); + + e->engine.func->context_free(e->engine.data.output, ctx); + + ctx = e->engine.func->context_new(e->engine.data.output); + + e->engine.func->image_draw_filtered(e->engine.data.output, + ctx, surface, subsurface, info); + + e->engine.func->context_free(e->engine.data.output, ctx); + + e->engine.func->image_map_surface_free(e->engine.data.output, + subsurface); + } + else + { + ctx = e->engine.func->context_new(e->engine.data.output); + e->engine.func->image_draw_filtered(e->engine.data.output, + ctx, surface, src, info); + e->engine.func->context_free(e->engine.data.output, ctx); + } + + e->engine.func->image_dirty_region(e->engine.data.output, surface, + 0, 0, w, h); + if (outw) *outw = w; + if (outh) *outh = h; + return e->engine.func->image_filtered_save(src, surface, + obj->filter->key, + obj->filter->len); +} +#endif + +static void +evas_object_image_unload(Evas_Object *obj, Eina_Bool dirty) +{ + Evas_Object_Image *o; + + o = (Evas_Object_Image *)(obj->object_data); + + if ((!o->cur.file) || + (o->pixels_checked_out > 0)) return; + if (dirty) + { + if (o->engine_data) + o->engine_data = obj->layer->evas->engine.func->image_dirty_region + (obj->layer->evas->engine.data.output, + o->engine_data, + 0, 0, + o->cur.image.w, o->cur.image.h); + } + if (o->engine_data) + { + if (o->preloading) + { + o->preloading = 0; + obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, + o->engine_data, + obj); + } + obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, + o->engine_data); + } + o->engine_data = NULL; + o->load_error = EVAS_LOAD_ERROR_NONE; + o->cur.has_alpha = 1; + o->cur.cspace = EVAS_COLORSPACE_ARGB8888; + o->cur.image.w = 0; + o->cur.image.h = 0; + o->cur.image.stride = 0; +} + +static void +evas_object_image_load(Evas_Object *obj) +{ + Evas_Object_Image *o; + Evas_Image_Load_Opts lo; + + o = (Evas_Object_Image *)(obj->object_data); + if (o->engine_data) return; + + lo.scale_down_by = o->load_opts.scale_down_by; + lo.dpi = o->load_opts.dpi; + lo.w = o->load_opts.w; + lo.h = o->load_opts.h; + lo.region.x = o->load_opts.region.x; + lo.region.y = o->load_opts.region.y; + lo.region.w = o->load_opts.region.w; + lo.region.h = o->load_opts.region.h; + lo.orientation = o->load_opts.orientation; + o->engine_data = obj->layer->evas->engine.func->image_load + (obj->layer->evas->engine.data.output, + o->cur.file, + o->cur.key, + &o->load_error, + &lo); + if (o->engine_data) + { + int w, h; + int stride = 0; + + obj->layer->evas->engine.func->image_size_get + (obj->layer->evas->engine.data.output, + o->engine_data, &w, &h); + if (obj->layer->evas->engine.func->image_stride_get) + obj->layer->evas->engine.func->image_stride_get + (obj->layer->evas->engine.data.output, + o->engine_data, &stride); + else + stride = w * 4; + o->cur.has_alpha = obj->layer->evas->engine.func->image_alpha_get + (obj->layer->evas->engine.data.output, + o->engine_data); + o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get + (obj->layer->evas->engine.data.output, + o->engine_data); + o->cur.image.w = w; + o->cur.image.h = h; + o->cur.image.stride = stride; + } + else + { + o->load_error = EVAS_LOAD_ERROR_GENERIC; + } +} + +static Evas_Coord +evas_object_image_figure_x_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret) +{ + Evas_Coord w; + + w = ((size * obj->layer->evas->output.w) / + (Evas_Coord)obj->layer->evas->viewport.w); + if (size <= 0) size = 1; + if (start > 0) + { + while (start - size > 0) start -= size; + } + else if (start < 0) + { + while (start < 0) start += size; + } + start = ((start * obj->layer->evas->output.w) / + (Evas_Coord)obj->layer->evas->viewport.w); + *size_ret = w; + return start; +} + +static Evas_Coord +evas_object_image_figure_y_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret) +{ + Evas_Coord h; + + h = ((size * obj->layer->evas->output.h) / + (Evas_Coord)obj->layer->evas->viewport.h); + if (size <= 0) size = 1; + if (start > 0) + { + while (start - size > 0) start -= size; + } + else if (start < 0) + { + while (start < 0) start += size; + } + start = ((start * obj->layer->evas->output.h) / + (Evas_Coord)obj->layer->evas->viewport.h); + *size_ret = h; + return start; +} + +static void +evas_object_image_init(Evas_Object *obj) +{ + /* alloc image ob, setup methods and default values */ + obj->object_data = evas_object_image_new(); + /* set up default settings for this kind of object */ + obj->cur.color.r = 255; + obj->cur.color.g = 255; + obj->cur.color.b = 255; + obj->cur.color.a = 255; + obj->cur.geometry.x = 0; + obj->cur.geometry.y = 0; + obj->cur.geometry.w = 0; + obj->cur.geometry.h = 0; + obj->cur.layer = 0; + obj->cur.anti_alias = 0; + obj->cur.render_op = EVAS_RENDER_BLEND; + /* set up object-specific settings */ + obj->prev = obj->cur; + /* set up methods (compulsory) */ + obj->func = &object_func; + obj->type = o_type; +} + +static void * +evas_object_image_new(void) +{ + Evas_Object_Image *o; + + /* alloc obj private data */ + EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_image", Evas_Object_Image, 256, NULL); + o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Image); + if (!o) return NULL; + EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Image); + o->magic = MAGIC_OBJ_IMAGE; + o->cur.fill.w = 0; + o->cur.fill.h = 0; + o->cur.smooth_scale = 1; + o->cur.border.fill = 1; + o->cur.border.scale = 1.0; + o->cur.cspace = EVAS_COLORSPACE_ARGB8888; + o->cur.spread = EVAS_TEXTURE_REPEAT; + o->cur.opaque_valid = 0; + o->cur.source = NULL; + o->prev = o->cur; + o->tmpf_fd = -1; + return o; +} + +static void +evas_object_image_free(Evas_Object *obj) +{ + Evas_Object_Image *o; + Eina_Rectangle *r; + + /* frees private object data. very simple here */ + o = (Evas_Object_Image *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return; + MAGIC_CHECK_END(); + /* free obj */ + _cleanup_tmpf(obj); + if (o->cur.file) eina_stringshare_del(o->cur.file); + if (o->cur.key) eina_stringshare_del(o->cur.key); + if (o->cur.source) _proxy_unset(obj); + if (o->engine_data) + { + if (o->preloading) + { + o->preloading = 0; + obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, + o->engine_data, + obj); + } + obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, + o->engine_data); + } + if (o->video_surface) + { + o->video_surface = 0; + obj->layer->evas->video_objects = eina_list_remove(obj->layer->evas->video_objects, obj); + } + o->engine_data = NULL; + o->magic = 0; + EINA_LIST_FREE(o->pixel_updates, r) + eina_rectangle_free(r); + EVAS_MEMPOOL_FREE(_mp_obj, o); +} + +static void +evas_object_image_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) +{ + Evas_Object_Image *o; + int imagew, imageh, uvw, uvh; + void *pixels; + + /* render object to surface with context, and offset by x,y */ + o = (Evas_Object_Image *)(obj->object_data); + + if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1)) + return; /* no error message, already printed in pre_render */ + + /* Proxy sanity */ + if (o->proxyrendering) + { + _proxy_error(obj, context, output, surface, x, y); + return; + } + + /* We are displaying the overlay */ + if (o->video_visible) + { + /* Create a transparent rectangle */ + obj->layer->evas->engine.func->context_color_set(output, + context, + 0, 0, 0, 0); + obj->layer->evas->engine.func->context_multiplier_unset(output, + context); + obj->layer->evas->engine.func->context_render_op_set(output, context, + EVAS_RENDER_COPY); + obj->layer->evas->engine.func->rectangle_draw(output, + context, + surface, + obj->cur.geometry.x + x, + obj->cur.geometry.y + y, + obj->cur.geometry.w, + obj->cur.geometry.h); + + return ; + } + + obj->layer->evas->engine.func->context_color_set(output, + context, + 255, 255, 255, 255); + + if ((obj->cur.cache.clip.r == 255) && + (obj->cur.cache.clip.g == 255) && + (obj->cur.cache.clip.b == 255) && + (obj->cur.cache.clip.a == 255)) + { + obj->layer->evas->engine.func->context_multiplier_unset(output, + context); + } + else + obj->layer->evas->engine.func->context_multiplier_set(output, + context, + obj->cur.cache.clip.r, + obj->cur.cache.clip.g, + obj->cur.cache.clip.b, + obj->cur.cache.clip.a); + + obj->layer->evas->engine.func->context_render_op_set(output, context, + obj->cur.render_op); + + if (!o->cur.source) + { + pixels = o->engine_data; + imagew = o->cur.image.w; + imageh = o->cur.image.h; + uvw = imagew; + uvh = imageh; + } + else if (o->cur.source->proxy.surface && !o->cur.source->proxy.redraw) + { + pixels = o->cur.source->proxy.surface; + imagew = o->cur.source->proxy.w; + imageh = o->cur.source->proxy.h; + uvw = imagew; + uvh = imageh; + } + else if (o->cur.source->type == o_type && + ((Evas_Object_Image *)o->cur.source->object_data)->engine_data) + { + Evas_Object_Image *oi; + oi = o->cur.source->object_data; + pixels = oi->engine_data; + imagew = oi->cur.image.w; + imageh = oi->cur.image.h; + uvw = o->cur.source->cur.geometry.w; + uvh = o->cur.source->cur.geometry.h; + } + else + { + o->proxyrendering = 1; + _proxy_subrender(obj->layer->evas, o->cur.source); + pixels = o->cur.source->proxy.surface; + imagew = o->cur.source->proxy.w; + imageh = o->cur.source->proxy.h; + uvw = imagew; + uvh = imageh; + o->proxyrendering = 0; + } + +#if 0 // filtering disabled + /* Now check/update filter */ + if (obj->filter && obj->filter->filter) + { + Filtered_Image *fi = NULL; + //printf("%p has filter: %s\n", obj,obj->filter->dirty?"dirty":"clean"); + if (obj->filter->dirty) + { + if (obj->filter->mode != EVAS_FILTER_MODE_BELOW) + { + uint32_t len; + uint8_t *key; + + if (obj->filter->key) free(obj->filter->key); + obj->filter->key = NULL; + obj->filter->len = 0; + key = evas_filter_key_get(obj->filter, &len); + if (key) + { + obj->filter->key = key; + obj->filter->len = len; + fi = obj->layer->evas->engine.func->image_filtered_get + (o->engine_data, key, len); + if (obj->filter->cached && fi != obj->filter->cached) + { + obj->layer->evas->engine.func->image_filtered_free + (o->engine_data, obj->filter->cached); + obj->filter->cached = NULL; + } + } + } + else if (obj->filter->cached) + { + obj->layer->evas->engine.func->image_filtered_free + (o->engine_data, obj->filter->cached); + } + if (!fi) + fi = image_filter_update(obj->layer->evas, obj, pixels, + imagew, imageh, &imagew, &imageh); + pixels = fi->image; + obj->filter->dirty = 0; + obj->filter->cached = fi; + } + else + { + fi = obj->filter->cached; + pixels = fi->image; + } + } +#endif + + if (pixels) + { + Evas_Coord idw, idh, idx, idy; + int ix, iy, iw, ih; + + if (o->dirty_pixels) + { + if (o->func.get_pixels) + { + o->func.get_pixels(o->func.get_pixels_data, obj); + if (o->engine_data != pixels) + pixels = o->engine_data; + o->engine_data = obj->layer->evas->engine.func->image_dirty_region + (obj->layer->evas->engine.data.output, o->engine_data, + 0, 0, o->cur.image.w, o->cur.image.h); + } + o->dirty_pixels = 0; + } + if ((obj->cur.map) && (obj->cur.map->count > 3) && (obj->cur.usemap)) + { + const Evas_Map_Point *p, *p_end; + RGBA_Map_Point pts[obj->cur.map->count], *pt; + + p = obj->cur.map->points; + p_end = p + obj->cur.map->count; + pt = pts; + + pts[0].px = obj->cur.map->persp.px << FP; + pts[0].py = obj->cur.map->persp.py << FP; + pts[0].foc = obj->cur.map->persp.foc << FP; + pts[0].z0 = obj->cur.map->persp.z0 << FP; + // draw geom +x +y + for (; p < p_end; p++, pt++) + { + pt->x = (lround(p->x) + x) * FP1; + pt->y = (lround(p->y) + y) * FP1; + pt->z = (lround(p->z) ) * FP1; + pt->fx = p->px; + pt->fy = p->py; + pt->fz = p->z; + pt->u = ((lround(p->u) * imagew) / uvw) * FP1; + pt->v = ((lround(p->v) * imageh) / uvh) * FP1; + if (pt->u < 0) pt->u = 0; + else if (pt->u > (imagew * FP1)) pt->u = (imagew * FP1); + if (pt->v < 0) pt->v = 0; + else if (pt->v > (imageh * FP1)) pt->v = (imageh * FP1); + pt->col = ARGB_JOIN(p->a, p->r, p->g, p->b); + } + if (obj->cur.map->count & 0x1) + { + pts[obj->cur.map->count] = pts[obj->cur.map->count -1]; + } + + obj->layer->evas->engine.func->image_map_draw + (output, context, surface, pixels, obj->cur.map->count, + pts, o->cur.smooth_scale | obj->cur.map->smooth, 0); + } + else + { + obj->layer->evas->engine.func->image_scale_hint_set(output, + pixels, + o->scale_hint); + /* This is technically a bug here: If the value is recreated + * (which is returned)it may be a new object, however exactly 0 + * of all the evas engines do this. */ + obj->layer->evas->engine.func->image_border_set(output, pixels, + o->cur.border.l, o->cur.border.r, + o->cur.border.t, o->cur.border.b); + idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw); + idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh); + if (idw < 1) idw = 1; + if (idh < 1) idh = 1; + if (idx > 0) idx -= idw; + if (idy > 0) idy -= idh; + while ((int)idx < obj->cur.geometry.w) + { + Evas_Coord ydy; + int dobreak_w = 0; + + ydy = idy; + ix = idx; + if ((o->cur.fill.w == obj->cur.geometry.w) && + (o->cur.fill.x == 0)) + { + dobreak_w = 1; + iw = obj->cur.geometry.w; + } + else + iw = ((int)(idx + idw)) - ix; + while ((int)idy < obj->cur.geometry.h) + { + int dobreak_h = 0; + + iy = idy; + if ((o->cur.fill.h == obj->cur.geometry.h) && + (o->cur.fill.y == 0)) + { + ih = obj->cur.geometry.h; + dobreak_h = 1; + } + else + ih = ((int)(idy + idh)) - iy; + if ((o->cur.border.l == 0) && + (o->cur.border.r == 0) && + (o->cur.border.t == 0) && + (o->cur.border.b == 0) && + (o->cur.border.fill != 0)) + obj->layer->evas->engine.func->image_draw(output, + context, + surface, + pixels, + 0, 0, + imagew, + imageh, + obj->cur.geometry.x + ix + x, + obj->cur.geometry.y + iy + y, + iw, ih, + o->cur.smooth_scale); + else + { + int inx, iny, inw, inh, outx, outy, outw, outh; + int bl, br, bt, bb, bsl, bsr, bst, bsb; + int imw, imh, ox, oy; + + ox = obj->cur.geometry.x + ix + x; + oy = obj->cur.geometry.y + iy + y; + imw = imagew; + imh = imageh; + bl = o->cur.border.l; + br = o->cur.border.r; + bt = o->cur.border.t; + bb = o->cur.border.b; + if ((bl + br) > iw) + { + bl = iw / 2; + br = iw - bl; + } + if ((bl + br) > imw) + { + bl = imw / 2; + br = imw - bl; + } + if ((bt + bb) > ih) + { + bt = ih / 2; + bb = ih - bt; + } + if ((bt + bb) > imh) + { + bt = imh / 2; + bb = imh - bt; + } + if (o->cur.border.scale != 1.0) + { + bsl = ((double)bl * o->cur.border.scale); + bsr = ((double)br * o->cur.border.scale); + bst = ((double)bt * o->cur.border.scale); + bsb = ((double)bb * o->cur.border.scale); + } + else + { + bsl = bl; bsr = br; bst = bt; bsb = bb; + } + // #-- + // | + inx = 0; iny = 0; + inw = bl; inh = bt; + outx = ox; outy = oy; + outw = bsl; outh = bst; + obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); + // .## + // | + inx = bl; iny = 0; + inw = imw - bl - br; inh = bt; + outx = ox + bsl; outy = oy; + outw = iw - bsl - bsr; outh = bst; + obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); + // --# + // | + inx = imw - br; iny = 0; + inw = br; inh = bt; + outx = ox + iw - bsr; outy = oy; + outw = bsr; outh = bst; + obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); + // .-- + // # + inx = 0; iny = bt; + inw = bl; inh = imh - bt - bb; + outx = ox; outy = oy + bst; + outw = bsl; outh = ih - bst - bsb; + obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); + // .--. + // |##| + if (o->cur.border.fill > EVAS_BORDER_FILL_NONE) + { + inx = bl; iny = bt; + inw = imw - bl - br; inh = imh - bt - bb; + outx = ox + bsl; outy = oy + bst; + outw = iw - bsl - bsr; outh = ih - bst - bsb; + if ((o->cur.border.fill == EVAS_BORDER_FILL_SOLID) && + (obj->cur.cache.clip.a == 255) && + (obj->cur.render_op == EVAS_RENDER_BLEND)) + { + obj->layer->evas->engine.func->context_render_op_set(output, context, + EVAS_RENDER_COPY); + obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); + obj->layer->evas->engine.func->context_render_op_set(output, context, + obj->cur.render_op); + } + else + obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); + } + // --. + // # + inx = imw - br; iny = bt; + inw = br; inh = imh - bt - bb; + outx = ox + iw - bsr; outy = oy + bst; + outw = bsr; outh = ih - bst - bsb; + obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); + // | + // #-- + inx = 0; iny = imh - bb; + inw = bl; inh = bb; + outx = ox; outy = oy + ih - bsb; + outw = bsl; outh = bsb; + obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); + // | + // .## + inx = bl; iny = imh - bb; + inw = imw - bl - br; inh = bb; + outx = ox + bsl; outy = oy + ih - bsb; + outw = iw - bsl - bsr; outh = bsb; + obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); + // | + // --# + inx = imw - br; iny = imh - bb; + inw = br; inh = bb; + outx = ox + iw - bsr; outy = oy + ih - bsb; + outw = bsr; outh = bsb; + obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); + } + idy += idh; + if (dobreak_h) break; + } + idx += idw; + idy = ydy; + if (dobreak_w) break; + } + } + } +} + +static void +evas_object_image_render_pre(Evas_Object *obj) +{ + Evas_Object_Image *o; + int is_v = 0, was_v = 0; + Evas *e; + + /* dont pre-render the obj twice! */ + if (obj->pre_render_done) return; + obj->pre_render_done = 1; + /* pre-render phase. this does anything an object needs to do just before */ + /* rendering. this could mean loading the image data, retrieving it from */ + /* elsewhere, decoding video etc. */ + /* then when this is done the object needs to figure if it changed and */ + /* if so what and where and add the appropriate redraw rectangles */ + o = (Evas_Object_Image *)(obj->object_data); + e = obj->layer->evas; + + if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1)) + { + ERR("%p has invalid fill size: %dx%d. Ignored", + obj, o->cur.fill.w, o->cur.fill.h); + return; + } + + /* if someone is clipping this obj - go calculate the clipper */ + if (obj->cur.clipper) + { + if (obj->cur.cache.clip.dirty) + evas_object_clip_recalc(obj->cur.clipper); + obj->cur.clipper->func->render_pre(obj->cur.clipper); + } + /* Proxy: Do it early */ + if (o->cur.source && + (o->cur.source->proxy.redraw || o->cur.source->changed)) + { + /* XXX: Do I need to sort out the map here? */ + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + goto done; + } + + /* now figure what changed and add draw rects */ + /* if it just became visible or invisible */ + is_v = evas_object_is_visible(obj); + was_v = evas_object_was_visible(obj); + if (is_v != was_v) + { + evas_object_render_pre_visible_change(&e->clip_changes, obj, is_v, was_v); + if (!o->pixel_updates) goto done; + } + if ((obj->cur.map != obj->prev.map) || + (obj->cur.usemap != obj->prev.usemap)) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + goto done; + } + /* it's not visible - we accounted for it appearing or not so just abort */ + if (!is_v) goto done; + /* clipper changed this is in addition to anything else for obj */ + evas_object_render_pre_clipper_change(&e->clip_changes, obj); + /* if we restacked (layer or just within a layer) and don't clip anyone */ + if (obj->restack) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + if (!o->pixel_updates) goto done; + } + /* if it changed color */ + if ((obj->cur.color.r != obj->prev.color.r) || + (obj->cur.color.g != obj->prev.color.g) || + (obj->cur.color.b != obj->prev.color.b) || + (obj->cur.color.a != obj->prev.color.a)) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + if (!o->pixel_updates) goto done; + } + /* if it changed render op */ + if (obj->cur.render_op != obj->prev.render_op) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + if (!o->pixel_updates) goto done; + } + /* if it changed anti_alias */ + if (obj->cur.anti_alias != obj->prev.anti_alias) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + if (!o->pixel_updates) goto done; + } + if (o->changed) + { + if (((o->cur.file) && (!o->prev.file)) || + ((!o->cur.file) && (o->prev.file)) || + ((o->cur.key) && (!o->prev.key)) || + ((!o->cur.key) && (o->prev.key)) + ) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + if (!o->pixel_updates) goto done; + } + if ((o->cur.image.w != o->prev.image.w) || + (o->cur.image.h != o->prev.image.h) || + (o->cur.has_alpha != o->prev.has_alpha) || + (o->cur.cspace != o->prev.cspace) || + (o->cur.smooth_scale != o->prev.smooth_scale)) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + if (!o->pixel_updates) goto done; + } + if ((o->cur.border.l != o->prev.border.l) || + (o->cur.border.r != o->prev.border.r) || + (o->cur.border.t != o->prev.border.t) || + (o->cur.border.b != o->prev.border.b) || + (o->cur.border.fill != o->prev.border.fill) || + (o->cur.border.scale != o->prev.border.scale)) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + if (!o->pixel_updates) goto done; + } + if (o->dirty_pixels) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + if (!o->pixel_updates) goto done; + } + if (o->cur.frame != o->prev.frame) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + if (!o->pixel_updates) goto done; + } + + } + /* if it changed geometry - and obviously not visibility or color */ + /* calculate differences since we have a constant color fill */ + /* we really only need to update the differences */ +#if 0 // XXX: maybe buggy? + if (((obj->cur.geometry.x != obj->prev.geometry.x) || + (obj->cur.geometry.y != obj->prev.geometry.y) || + (obj->cur.geometry.w != obj->prev.geometry.w) || + (obj->cur.geometry.h != obj->prev.geometry.h)) && + (o->cur.fill.w == o->prev.fill.w) && + (o->cur.fill.h == o->prev.fill.h) && + ((o->cur.fill.x + obj->cur.geometry.x) == (o->prev.fill.x + obj->prev.geometry.x)) && + ((o->cur.fill.y + obj->cur.geometry.y) == (o->prev.fill.y + obj->prev.geometry.y)) && + (!o->pixel_updates) + ) + { + evas_rects_return_difference_rects(&e->clip_changes, + obj->cur.geometry.x, + obj->cur.geometry.y, + obj->cur.geometry.w, + obj->cur.geometry.h, + obj->prev.geometry.x, + obj->prev.geometry.y, + obj->prev.geometry.w, + obj->prev.geometry.h); + if (!o->pixel_updates) goto done; + } +#endif + if (((obj->cur.geometry.x != obj->prev.geometry.x) || + (obj->cur.geometry.y != obj->prev.geometry.y) || + (obj->cur.geometry.w != obj->prev.geometry.w) || + (obj->cur.geometry.h != obj->prev.geometry.h)) + ) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + if (!o->pixel_updates) goto done; + } + if (o->changed) + { + if ((o->cur.fill.x != o->prev.fill.x) || + (o->cur.fill.y != o->prev.fill.y) || + (o->cur.fill.w != o->prev.fill.w) || + (o->cur.fill.h != o->prev.fill.h)) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + if (!o->pixel_updates) goto done; + } + if (o->pixel_updates) + { + if ((o->cur.border.l == 0) && + (o->cur.border.r == 0) && + (o->cur.border.t == 0) && + (o->cur.border.b == 0) && + (o->cur.image.w > 0) && + (o->cur.image.h > 0) && + (!((obj->cur.map) && (obj->cur.usemap)))) + { + Eina_Rectangle *rr; + + EINA_LIST_FREE(o->pixel_updates, rr) + { + Evas_Coord idw, idh, idx, idy; + int x, y, w, h; + + e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, rr->x, rr->y, rr->w, rr->h); + + idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw); + idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh); + + if (idw < 1) idw = 1; + if (idh < 1) idh = 1; + if (idx > 0) idx -= idw; + if (idy > 0) idy -= idh; + while (idx < obj->cur.geometry.w) + { + Evas_Coord ydy; + + ydy = idy; + x = idx; + w = ((int)(idx + idw)) - x; + while (idy < obj->cur.geometry.h) + { + Eina_Rectangle r; + + y = idy; + h = ((int)(idy + idh)) - y; + + r.x = ((rr->x - 1) * w) / o->cur.image.w; + r.y = ((rr->y - 1) * h) / o->cur.image.h; + r.w = ((rr->w + 2) * w) / o->cur.image.w; + r.h = ((rr->h + 2) * h) / o->cur.image.h; + r.x += obj->cur.geometry.x + x; + r.y += obj->cur.geometry.y + y; + RECTS_CLIP_TO_RECT(r.x, r.y, r.w, r.h, + obj->cur.cache.clip.x, obj->cur.cache.clip.y, + obj->cur.cache.clip.w, obj->cur.cache.clip.h); + evas_add_rect(&e->clip_changes, r.x, r.y, r.w, r.h); + idy += h; + } + idx += idw; + idy = ydy; + } + eina_rectangle_free(rr); + } + goto done; + } + else + { + Eina_Rectangle *r; + + EINA_LIST_FREE(o->pixel_updates, r) + eina_rectangle_free(r); + e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, 0, 0, o->cur.image.w, o->cur.image.h); + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + goto done; + } + } + } +#if 0 // filtering disabled + if (obj->filter && obj->filter->dirty) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); + } +#endif + /* it obviously didn't change - add a NO obscure - this "unupdates" this */ + /* area so if there were updates for it they get wiped. don't do it if we */ + /* aren't fully opaque and we are visible */ + if (evas_object_is_visible(obj) && + evas_object_is_opaque(obj)) + { + Evas_Coord x, y, w, h; + + x = obj->cur.cache.clip.x; + y = obj->cur.cache.clip.y; + w = obj->cur.cache.clip.w; + h = obj->cur.cache.clip.h; + if (obj->cur.clipper) + { + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->cur.clipper->cur.cache.clip.x, + obj->cur.clipper->cur.cache.clip.y, + obj->cur.clipper->cur.cache.clip.w, + obj->cur.clipper->cur.cache.clip.h); + } + e->engine.func->output_redraws_rect_del(e->engine.data.output, + x, y, w, h); + } + done: + evas_object_render_pre_effect_updates(&e->clip_changes, obj, is_v, was_v); +} + +static void +evas_object_image_render_post(Evas_Object *obj) +{ + Evas_Object_Image *o; + Eina_Rectangle *r; + + /* this moves the current data to the previous state parts of the object */ + /* in whatever way is safest for the object. also if we don't need object */ + /* data anymore we can free it if the object deems this is a good idea */ + o = (Evas_Object_Image *)(obj->object_data); + /* remove those pesky changes */ + evas_object_clip_changes_clean(obj); + EINA_LIST_FREE(o->pixel_updates, r) + eina_rectangle_free(r); + /* move cur to prev safely for object data */ + obj->prev = obj->cur; + o->prev = o->cur; + o->changed = 0; + /* FIXME: copy strings across */ +} + +static unsigned int evas_object_image_id_get(Evas_Object *obj) +{ + Evas_Object_Image *o; + + o = (Evas_Object_Image *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_IMAGE; +} + +static unsigned int evas_object_image_visual_id_get(Evas_Object *obj) +{ + Evas_Object_Image *o; + + o = (Evas_Object_Image *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_IMAGE; +} + +static void *evas_object_image_engine_data_get(Evas_Object *obj) +{ + Evas_Object_Image *o; + + o = (Evas_Object_Image *)(obj->object_data); + if (!o) return NULL; + return o->engine_data; +} + +static int +evas_object_image_is_opaque(Evas_Object *obj) +{ + Evas_Object_Image *o; + + /* this returns 1 if the internal object data implies that the object is */ + /* currently fully opaque over the entire rectangle it occupies */ + o = (Evas_Object_Image *)(obj->object_data); +/* disable caching due tyo maps screwing with this + o->cur.opaque_valid = 0; + if (o->cur.opaque_valid) + { + if (!o->cur.opaque) return 0; + } + else +*/ + { + o->cur.opaque = 0; +/* disable caching */ +/* o->cur.opaque_valid = 1; */ + if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1)) + return o->cur.opaque; + if (((o->cur.border.l != 0) || + (o->cur.border.r != 0) || + (o->cur.border.t != 0) || + (o->cur.border.b != 0)) && + (!o->cur.border.fill)) return o->cur.opaque; + if (!o->engine_data) return o->cur.opaque; + o->cur.opaque = 1; + } + // FIXME: use proxy + if (o->cur.source) + { + o->cur.opaque = evas_object_is_opaque(o->cur.source); + return o->cur.opaque; /* FIXME: Should go poke at the object */ + } + if (o->cur.has_alpha) + { + o->cur.opaque = 0; + return o->cur.opaque; + } + if ((obj->cur.map) && (obj->cur.usemap)) + { + Evas_Map *m = obj->cur.map; + + if ((m->points[0].a == 255) && + (m->points[1].a == 255) && + (m->points[2].a == 255) && + (m->points[3].a == 255)) + { + if ( + ((m->points[0].x == m->points[3].x) && + (m->points[1].x == m->points[2].x) && + (m->points[0].y == m->points[1].y) && + (m->points[2].y == m->points[3].y)) + || + ((m->points[0].x == m->points[1].x) && + (m->points[2].x == m->points[3].x) && + (m->points[0].y == m->points[3].y) && + (m->points[1].y == m->points[2].y)) + ) + { + if ((m->points[0].x == obj->cur.geometry.x) && + (m->points[0].y == obj->cur.geometry.y) && + (m->points[2].x == (obj->cur.geometry.x + obj->cur.geometry.w)) && + (m->points[2].y == (obj->cur.geometry.y + obj->cur.geometry.h))) + return o->cur.opaque; + } + } + o->cur.opaque = 0; + return o->cur.opaque; + } + if (obj->cur.render_op == EVAS_RENDER_COPY) return o->cur.opaque; + return o->cur.opaque; +} + +static int +evas_object_image_was_opaque(Evas_Object *obj) +{ + Evas_Object_Image *o; + + /* this returns 1 if the internal object data implies that the object was */ + /* previously fully opaque over the entire rectangle it occupies */ + o = (Evas_Object_Image *)(obj->object_data); + if (o->prev.opaque_valid) + { + if (!o->prev.opaque) return 0; + } + else + { + o->prev.opaque = 0; + o->prev.opaque_valid = 1; + if ((o->prev.fill.w < 1) || (o->prev.fill.h < 1)) + return 0; + if (((o->prev.border.l != 0) || + (o->prev.border.r != 0) || + (o->prev.border.t != 0) || + (o->prev.border.b != 0)) && + (!o->prev.border.fill)) return 0; + if (!o->engine_data) return 0; + o->prev.opaque = 1; + } + // FIXME: use proxy + if (o->prev.source) return 0; /* FIXME: Should go poke at the object */ + if (obj->prev.usemap) return 0; + if (obj->prev.render_op == EVAS_RENDER_COPY) return 1; + if (o->prev.has_alpha) return 0; + if (obj->prev.render_op != EVAS_RENDER_BLEND) return 0; + return 1; +} + +static int +evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) +{ + Evas_Object_Image *o; + DATA32 *data; + int w, h, stride, iw, ih; + int a; + + o = (Evas_Object_Image *)(obj->object_data); + + x -= obj->cur.cache.clip.x; + y -= obj->cur.cache.clip.y; + w = obj->cur.cache.clip.w; + h = obj->cur.cache.clip.h; + iw = o->cur.image.w; + ih = o->cur.image.h; + + if ((x < 0) || (y < 0) || (x >= w) || (y >= h)) return 0; + if (!o->cur.has_alpha) return 1; + + // FIXME: proxy needs to be honored + if (obj->cur.map) + { + x = obj->cur.map->mx; + y = obj->cur.map->my; + } + else + { + int bl, br, bt, bb, bsl, bsr, bst, bsb; + + bl = o->cur.border.l; + br = o->cur.border.r; + bt = o->cur.border.t; + bb = o->cur.border.b; + if ((bl + br) > iw) + { + bl = iw / 2; + br = iw - bl; + } + if ((bl + br) > iw) + { + bl = iw / 2; + br = iw - bl; + } + if ((bt + bb) > ih) + { + bt = ih / 2; + bb = ih - bt; + } + if ((bt + bb) > ih) + { + bt = ih / 2; + bb = ih - bt; + } + if (o->cur.border.scale != 1.0) + { + bsl = ((double)bl * o->cur.border.scale); + bsr = ((double)br * o->cur.border.scale); + bst = ((double)bt * o->cur.border.scale); + bsb = ((double)bb * o->cur.border.scale); + } + else + { + bsl = bl; bsr = br; bst = bt; bsb = bb; + } + + w = o->cur.fill.w; + h = o->cur.fill.h; + x -= o->cur.fill.x; + y -= o->cur.fill.y; + x %= w; + y %= h; + + if (x < 0) x += w; + if (y < 0) y += h; + + if (o->cur.border.fill != EVAS_BORDER_FILL_DEFAULT) + { + if ((x > bsl) && (x < (w - bsr)) && + (y > bst) && (y < (h - bsb))) + { + if (o->cur.border.fill == EVAS_BORDER_FILL_SOLID) return 1; + return 0; + } + } + + if (x < bsl) x = (x * bl) / bsl; + else if (x > (w - bsr)) x = iw - (((w - x) * br) / bsr); + else if ((bsl + bsr) < w) x = bl + (((x - bsl) * (iw - bl - br)) / (w - bsl - bsr)); + else return 1; + + if (y < bst) y = (y * bt) / bst; + else if (y > (h - bsb)) y = ih - (((h - y) * bb) / bsb); + else if ((bst + bsb) < h) y = bt + (((y - bst) * (ih - bt - bb)) / (h - bst - bsb)); + else return 1; + } + + if (x < 0) x = 0; + if (y < 0) y = 0; + if (x >= iw) x = iw - 1; + if (y >= ih) y = ih - 1; + + stride = o->cur.image.stride; + + o->engine_data = obj->layer->evas->engine.func->image_data_get + (obj->layer->evas->engine.data.output, + o->engine_data, + 0, + &data, + &o->load_error); + if (!data) + return 0; + + switch (o->cur.cspace) + { + case EVAS_COLORSPACE_ARGB8888: + data = ((DATA32*)(data) + ((y * (stride >> 2)) + x)); + a = (*((DATA32*)(data)) >> 24) & 0xff; + break; + case EVAS_COLORSPACE_RGB565_A5P: + data = (void*) ((DATA16*)(data) + (h * (stride >> 1))); + data = (void*) ((DATA8*)(data) + ((y * (stride >> 1)) + x)); + a = (*((DATA8*)(data))) & 0x1f; + break; + default: + return 1; + break; + } + + return (a != 0); +} + +static int +evas_object_image_has_opaque_rect(Evas_Object *obj) +{ + Evas_Object_Image *o; + + o = (Evas_Object_Image *)(obj->object_data); + if ((obj->cur.map) && (obj->cur.usemap)) return 0; + if (((o->cur.border.l | o->cur.border.r | o->cur.border.t | o->cur.border.b) != 0) && + (o->cur.border.fill == EVAS_BORDER_FILL_SOLID) && + (obj->cur.render_op == EVAS_RENDER_BLEND) && + (obj->cur.cache.clip.a == 255) && + (o->cur.fill.x == 0) && + (o->cur.fill.y == 0) && + (o->cur.fill.w == obj->cur.geometry.w) && + (o->cur.fill.h == obj->cur.geometry.h) + ) return 1; + return 0; +} + +static int +evas_object_image_get_opaque_rect(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +{ + Evas_Object_Image *o; + + o = (Evas_Object_Image *)(obj->object_data); + if (o->cur.border.scale == 1.0) + { + *x = obj->cur.geometry.x + o->cur.border.l; + *y = obj->cur.geometry.y + o->cur.border.t; + *w = obj->cur.geometry.w - (o->cur.border.l + o->cur.border.r); + if (*w < 0) *w = 0; + *h = obj->cur.geometry.h - (o->cur.border.t + o->cur.border.b); + if (*h < 0) *h = 0; + } + else + { + *x = obj->cur.geometry.x + (o->cur.border.l * o->cur.border.scale); + *y = obj->cur.geometry.y + (o->cur.border.t * o->cur.border.scale); + *w = obj->cur.geometry.w - ((o->cur.border.l * o->cur.border.scale) + (o->cur.border.r * o->cur.border.scale)); + if (*w < 0) *w = 0; + *h = obj->cur.geometry.h - ((o->cur.border.t * o->cur.border.scale) + (o->cur.border.b * o->cur.border.scale)); + if (*h < 0) *h = 0; + } + return 1; +} + +static int +evas_object_image_can_map(Evas_Object *obj __UNUSED__) +{ + return 1; +} + +static void * +evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace) +{ + void *out = NULL; + + if (!data) + return NULL; + + switch (o->cur.cspace) + { + case EVAS_COLORSPACE_ARGB8888: + out = evas_common_convert_argb8888_to(data, + o->cur.image.w, + o->cur.image.h, + o->cur.image.stride >> 2, + o->cur.has_alpha, + to_cspace); + break; + case EVAS_COLORSPACE_RGB565_A5P: + out = evas_common_convert_rgb565_a5p_to(data, + o->cur.image.w, + o->cur.image.h, + o->cur.image.stride >> 1, + o->cur.has_alpha, + to_cspace); + break; + case EVAS_COLORSPACE_YCBCR422601_PL: + fprintf(stderr, "EVAS_COLORSPACE_YCBCR422601_PL:\n"); + out = evas_common_convert_yuv_422_601_to(data, + o->cur.image.w, + o->cur.image.h, + to_cspace); + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + out = evas_common_convert_yuv_422P_601_to(data, + o->cur.image.w, + o->cur.image.h, + to_cspace); + break; + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + out = evas_common_convert_yuv_420_601_to(data, + o->cur.image.w, + o->cur.image.h, + to_cspace); + break; + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + out = evas_common_convert_yuv_420T_601_to(data, + o->cur.image.w, + o->cur.image.h, + to_cspace); + break; + default: + fprintf(stderr, "unknow colorspace: %i\n", o->cur.cspace); + break; + } + + return out; +} + +static void +evas_object_image_filled_resize_listener(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *einfo __UNUSED__) +{ + Evas_Coord w, h; + Evas_Object_Image *o; + + o = obj->object_data; + evas_object_geometry_get(obj, NULL, NULL, &w, &h); + evas_object_image_fill_set(obj, 0, 0, w, h); +} + + +Eina_Bool +_evas_object_image_preloading_get(const Evas_Object *obj) +{ + Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); + if (!o) return EINA_FALSE; + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return EINA_FALSE; + MAGIC_CHECK_END(); + return o->preloading; +} + +void +_evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading) +{ + Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); + o->preloading = preloading; +} + +void +_evas_object_image_preloading_check(Evas_Object *obj) +{ + Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); + if (obj->layer->evas->engine.func->image_load_error_get) + o->load_error = obj->layer->evas->engine.func->image_load_error_get + (obj->layer->evas->engine.data.output, o->engine_data); +} + +Evas_Object * +_evas_object_image_video_parent_get(Evas_Object *obj) +{ + Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); + + return o->video_surface ? o->video.parent : NULL; +} + +void +_evas_object_image_video_overlay_show(Evas_Object *obj) +{ + Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); + + if (obj->cur.cache.clip.x != obj->prev.cache.clip.x || + obj->cur.cache.clip.y != obj->prev.cache.clip.y || + o->created || !o->video_visible) + o->video.move(o->video.data, obj, &o->video, obj->cur.cache.clip.x, obj->cur.cache.clip.y); + if (obj->cur.cache.clip.w != obj->prev.cache.clip.w || + obj->cur.cache.clip.h != obj->prev.cache.clip.h || + o->created || !o->video_visible) + o->video.resize(o->video.data, obj, &o->video, obj->cur.cache.clip.w, obj->cur.cache.clip.h); + if (!o->video_visible || o->created) + { + o->video.show(o->video.data, obj, &o->video); + } + else + { + /* Cancel dirty on the image */ + Eina_Rectangle *r; + + o->dirty_pixels = 0; + EINA_LIST_FREE(o->pixel_updates, r) + eina_rectangle_free(r); + } + o->video_visible = EINA_TRUE; + o->created = EINA_FALSE; +} + +void +_evas_object_image_video_overlay_hide(Evas_Object *obj) +{ + Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); + + if (o->video_visible || o->created) + o->video.hide(o->video.data, obj, &o->video); + if (evas_object_is_visible(obj)) + o->video.update_pixels(o->video.data, obj, &o->video); + o->video_visible = EINA_FALSE; + o->created = EINA_FALSE; +} + +/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/lib/canvas/evas_object_inform.c b/libraries/evas/src/lib/canvas/evas_object_inform.c new file mode 100644 index 0000000..bc09eb9 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_inform.c @@ -0,0 +1,79 @@ +#include "evas_common.h" +#include "evas_private.h" + +/* local calls */ + +void +evas_object_inform_call_show(Evas_Object *obj) +{ + _evas_object_event_new(); + + evas_object_event_callback_call(obj, EVAS_CALLBACK_SHOW, NULL); + _evas_post_event_callback_call(obj->layer->evas); +} + +void +evas_object_inform_call_hide(Evas_Object *obj) +{ + _evas_object_event_new(); + + evas_object_event_callback_call(obj, EVAS_CALLBACK_HIDE, NULL); + _evas_post_event_callback_call(obj->layer->evas); +} + +void +evas_object_inform_call_move(Evas_Object *obj) +{ + _evas_object_event_new(); + + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOVE, NULL); + _evas_post_event_callback_call(obj->layer->evas); +} + +void +evas_object_inform_call_resize(Evas_Object *obj) +{ + _evas_object_event_new(); + + evas_object_event_callback_call(obj, EVAS_CALLBACK_RESIZE, NULL); + _evas_post_event_callback_call(obj->layer->evas); +} + +void +evas_object_inform_call_restack(Evas_Object *obj) +{ + _evas_object_event_new(); + + evas_object_event_callback_call(obj, EVAS_CALLBACK_RESTACK, NULL); + _evas_post_event_callback_call(obj->layer->evas); +} + +void +evas_object_inform_call_changed_size_hints(Evas_Object *obj) +{ + _evas_object_event_new(); + + evas_object_event_callback_call(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL); + _evas_post_event_callback_call(obj->layer->evas); +} + +void +evas_object_inform_call_image_preloaded(Evas_Object *obj) +{ + if (!_evas_object_image_preloading_get(obj)) return; + _evas_object_image_preloading_check(obj); + _evas_object_image_preloading_set(obj, 0); + _evas_object_event_new(); + + evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL); + _evas_post_event_callback_call(obj->layer->evas); +} + +void +evas_object_inform_call_image_unloaded(Evas_Object *obj) +{ + _evas_object_event_new(); + + evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL); + _evas_post_event_callback_call(obj->layer->evas); +} diff --git a/libraries/evas/src/lib/canvas/evas_object_intercept.c b/libraries/evas/src/lib/canvas/evas_object_intercept.c new file mode 100644 index 0000000..c3e5e24 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_intercept.c @@ -0,0 +1,625 @@ +#include "evas_common.h" +#include "evas_private.h" + +/* local calls */ + +static void evas_object_intercept_init(Evas_Object *obj); +static void evas_object_intercept_deinit(Evas_Object *obj); + +static void +evas_object_intercept_init(Evas_Object *obj) +{ + /* MEM OK */ + if (!obj->interceptors) + obj->interceptors = evas_mem_calloc(sizeof(Evas_Intercept_Func)); +} + +static void +evas_object_intercept_deinit(Evas_Object *obj) +{ + /* MEM OK */ + if (!obj->interceptors) return; + if ((obj->interceptors->show.func) || + (obj->interceptors->hide.func) || + (obj->interceptors->move.func) || + (obj->interceptors->resize.func) || + (obj->interceptors->raise.func) || + (obj->interceptors->lower.func) || + (obj->interceptors->stack_above.func) || + (obj->interceptors->stack_below.func) || + (obj->interceptors->layer_set.func) || + (obj->interceptors->color_set.func) || + (obj->interceptors->clip_set.func) || + (obj->interceptors->clip_unset.func)) + return; + free(obj->interceptors); + obj->interceptors = NULL; +} + +/* private calls */ + +void +evas_object_intercept_cleanup(Evas_Object *obj) +{ + /* MEM OK */ + if (obj->interceptors) free(obj->interceptors); +} + +int +evas_object_intercept_call_show(Evas_Object *obj) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->show.func); + if (obj->interceptors->show.func) + obj->interceptors->show.func(obj->interceptors->show.data, obj); + obj->intercepted = 0; + return ret; +} + +int +evas_object_intercept_call_hide(Evas_Object *obj) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->hide.func); + if (obj->interceptors->hide.func) + obj->interceptors->hide.func(obj->interceptors->hide.data, obj); + obj->intercepted = 0; + return ret; +} + +int +evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->move.func); + if (obj->interceptors->move.func) + obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y); + obj->intercepted = 0; + return ret; +} + +int +evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->resize.func); + if (obj->interceptors->resize.func) + obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h); + obj->intercepted = 0; + return ret; +} + +int +evas_object_intercept_call_raise(Evas_Object *obj) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->raise.func); + if (obj->interceptors->raise.func) + obj->interceptors->raise.func(obj->interceptors->raise.data, obj); + obj->intercepted = 0; + return ret; +} + +int +evas_object_intercept_call_lower(Evas_Object *obj) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->lower.func); + if (obj->interceptors->lower.func) + obj->interceptors->lower.func(obj->interceptors->lower.data, obj); + obj->intercepted = 0; + return ret; +} + +int +evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->stack_above.func); + if (obj->interceptors->stack_above.func) + obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above); + obj->intercepted = 0; + return ret; +} + +int +evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->stack_below.func); + if (obj->interceptors->stack_below.func) + obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below); + obj->intercepted = 0; + return ret; +} + +int +evas_object_intercept_call_layer_set(Evas_Object *obj, int l) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->layer_set.func); + if (obj->interceptors->layer_set.func) + obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l); + obj->intercepted = 0; + return ret; +} + +int +evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->color_set.func); + if (obj->interceptors->color_set.func) + obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a); + obj->intercepted = 0; + return ret; +} + +int +evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->clip_set.func); + if (obj->interceptors->clip_set.func) + obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip); + obj->intercepted = 0; + return ret; +} + +int +evas_object_intercept_call_clip_unset(Evas_Object *obj) +{ + /* MEM OK */ + int ret; + + if (!obj->interceptors) return 0; + if (obj->intercepted) return 0; + obj->intercepted = 1; + ret = !!(obj->interceptors->clip_unset.func); + if (obj->interceptors->clip_unset.func) + obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj); + obj->intercepted = 0; + return ret; +} + +/* public calls */ + +EAPI void +evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) +{ + /* MEM OK */ + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->show.func = func; + obj->interceptors->show.data = (void *)data; +} + +EAPI void * +evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->show.func = NULL; + data = obj->interceptors->show.data; + obj->interceptors->show.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} + +EAPI void +evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) +{ + /* MEM OK */ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->hide.func = func; + obj->interceptors->hide.data = (void *)data; +} + +EAPI void * +evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->hide.func = NULL; + data = obj->interceptors->hide.data; + obj->interceptors->hide.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} + +EAPI void +evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) +{ + /* MEM OK */ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->move.func = func; + obj->interceptors->move.data = (void *)data; +} + +EAPI void * +evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->move.func = NULL; + data = obj->interceptors->move.data; + obj->interceptors->move.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} + +EAPI void +evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data) +{ + /* MEM OK */ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->resize.func = func; + obj->interceptors->resize.data = (void *)data; +} + +EAPI void * +evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->resize.func = NULL; + data = obj->interceptors->resize.data; + obj->interceptors->resize.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} + +EAPI void +evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data) +{ + /* MEM OK */ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->raise.func = func; + obj->interceptors->raise.data = (void *)data; +} + +EAPI void * +evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->raise.func = NULL; + data = obj->interceptors->raise.data; + obj->interceptors->raise.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} + +EAPI void +evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data) +{ + /* MEM OK */ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->lower.func = func; + obj->interceptors->lower.data = (void *)data; +} + +EAPI void * +evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->lower.func = NULL; + data = obj->interceptors->lower.data; + obj->interceptors->lower.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} + +EAPI void +evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data) +{ + /* MEM OK */ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->stack_above.func = func; + obj->interceptors->stack_above.data = (void *)data; +} + +EAPI void * +evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->stack_above.func = NULL; + data = obj->interceptors->stack_above.data; + obj->interceptors->stack_above.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} + +EAPI void +evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data) +{ + /* MEM OK */ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->stack_below.func = func; + obj->interceptors->stack_below.data = (void *)data; +} + +EAPI void * +evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->stack_below.func = NULL; + data = obj->interceptors->stack_below.data; + obj->interceptors->stack_below.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} + +EAPI void +evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data) +{ + /* MEM OK */ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->layer_set.func = func; + obj->interceptors->layer_set.data = (void *)data; +} + +EAPI void * +evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->layer_set.func = NULL; + data = obj->interceptors->layer_set.data; + obj->interceptors->layer_set.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} + +EAPI void +evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data) +{ + /* MEM OK */ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->color_set.func = func; + obj->interceptors->color_set.data = (void *)data; +} + +EAPI void * +evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->color_set.func = NULL; + data = obj->interceptors->color_set.data; + obj->interceptors->color_set.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} + +EAPI void +evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data) +{ + /* MEM OK */ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->clip_set.func = func; + obj->interceptors->clip_set.data = (void *)data; +} + +EAPI void * +evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->clip_set.func = NULL; + data = obj->interceptors->clip_set.data; + obj->interceptors->clip_set.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} + +EAPI void +evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data) +{ + /* MEM OK */ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (!func) return; + evas_object_intercept_init(obj); + if (!obj->interceptors) return; + obj->interceptors->clip_unset.func = func; + obj->interceptors->clip_unset.data = (void *)data; +} + +EAPI void * +evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) +{ + /* MEM OK */ + void *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!func) return NULL; + if (!obj->interceptors) return NULL; + obj->interceptors->clip_unset.func = NULL; + data = obj->interceptors->clip_unset.data; + obj->interceptors->clip_unset.data = NULL; + evas_object_intercept_deinit(obj); + return data; +} diff --git a/libraries/evas/src/lib/canvas/evas_object_line.c b/libraries/evas/src/lib/canvas/evas_object_line.c new file mode 100644 index 0000000..b09a6e2 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_line.c @@ -0,0 +1,461 @@ +#include "evas_common.h" +#include "evas_private.h" + +/* private magic number for line objects */ +static const char o_type[] = "line"; + +/* private struct for line object internal data */ +typedef struct _Evas_Object_Line Evas_Object_Line; + +struct _Evas_Object_Line +{ + DATA32 magic; + struct { + struct { + int x1, y1, x2, y2; + struct { + Evas_Coord w, h; + } object; + } cache; + Evas_Coord x1, y1, x2, y2; + } cur, prev; + + void *engine_data; + + char changed : 1; +}; + +/* private methods for line objects */ +static void evas_object_line_init(Evas_Object *obj); +static void *evas_object_line_new(void); +static void evas_object_line_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); +static void evas_object_line_free(Evas_Object *obj); +static void evas_object_line_render_pre(Evas_Object *obj); +static void evas_object_line_render_post(Evas_Object *obj); + +static unsigned int evas_object_line_id_get(Evas_Object *obj); +static unsigned int evas_object_line_visual_id_get(Evas_Object *obj); +static void *evas_object_line_engine_data_get(Evas_Object *obj); + +static int evas_object_line_is_opaque(Evas_Object *obj); +static int evas_object_line_was_opaque(Evas_Object *obj); +static int evas_object_line_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +static int evas_object_line_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +static void evas_object_line_coords_recalc(Evas_Object *obj); + +static const Evas_Object_Func object_func = +{ + /* methods (compulsory) */ + evas_object_line_free, + evas_object_line_render, + evas_object_line_render_pre, + evas_object_line_render_post, + evas_object_line_id_get, + evas_object_line_visual_id_get, + evas_object_line_engine_data_get, + /* these are optional. NULL = nothing */ + NULL, + NULL, + NULL, + NULL, + evas_object_line_is_opaque, + evas_object_line_was_opaque, + evas_object_line_is_inside, + evas_object_line_was_inside, + evas_object_line_coords_recalc, + NULL, + NULL, + NULL, + NULL +}; + +/* the actual api call to add a rect */ +/* it has no other api calls as all properties are standard */ + +EVAS_MEMPOOL(_mp_obj); + +EAPI Evas_Object * +evas_object_line_add(Evas *e) +{ + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + obj = evas_object_new(e); + evas_object_line_init(obj); + evas_object_inject(obj, e); + return obj; +} + +EAPI void +evas_object_line_xy_set(Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2) +{ + Evas_Object_Line *o; + Evas_Coord min_x, max_x, min_y, max_y; + int is, was = 0; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Line *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE); + return; + MAGIC_CHECK_END(); + if ((x1 == o->cur.x1) && (y1 == o->cur.y1) && + (x2 == o->cur.x2) && (y2 == o->cur.y2)) return; + if (obj->layer->evas->events_frozen <= 0) + { + if (!evas_event_passes_through(obj) && + !evas_event_freezes_through(obj)) + was = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + 1, 1); + } + if (x1 < x2) + { + min_x = x1; + max_x = x2; + } + else + { + min_x = x2; + max_x = x1; + } + if (y1 < y2) + { + min_y = y1; + max_y = y2; + } + else + { + min_y = y2; + max_y = y1; + } + obj->cur.geometry.x = min_x; + obj->cur.geometry.y = min_y; + obj->cur.geometry.w = max_x - min_x + 2; + obj->cur.geometry.h = max_y - min_y + 2; +//// obj->cur.cache.geometry.validity = 0; + o->cur.x1 = x1 - min_x; + o->cur.y1 = y1 - min_y; + o->cur.x2 = x2 - min_x; + o->cur.y2 = y2 - min_y; + o->changed = 1; + evas_object_change(obj); + evas_object_coords_recalc(obj); + evas_object_clip_dirty(obj); + if (obj->layer->evas->events_frozen <= 0) + { + is = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + if (!evas_event_passes_through(obj) && + !evas_event_freezes_through(obj)) + { + if ((is ^ was) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + } + evas_object_inform_call_move(obj); + evas_object_inform_call_resize(obj); +} + +EAPI void +evas_object_line_xy_get(const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2) +{ + Evas_Object_Line *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (x1) *x1 = 0; + if (y1) *y1 = 0; + if (x2) *x2 = 0; + if (y2) *y2 = 0; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Line *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE); + if (x1) *x1 = 0; + if (y1) *y1 = 0; + if (x2) *x2 = 0; + if (y2) *y2 = 0; + return; + MAGIC_CHECK_END(); + if (x1) *x1 = obj->cur.geometry.x + o->cur.x1; + if (y1) *y1 = obj->cur.geometry.y + o->cur.y1; + if (x2) *x2 = obj->cur.geometry.x + o->cur.x2; + if (y2) *y2 = obj->cur.geometry.y + o->cur.y2; +} + +/* all nice and private */ +static void +evas_object_line_init(Evas_Object *obj) +{ + /* alloc image ob, setup methods and default values */ + obj->object_data = evas_object_line_new(); + /* set up default settings for this kind of object */ + obj->cur.color.r = 255; + obj->cur.color.g = 255; + obj->cur.color.b = 255; + obj->cur.color.a = 255; + obj->cur.geometry.x = 0; + obj->cur.geometry.y = 0; + obj->cur.geometry.w = 0; + obj->cur.geometry.h = 0; + obj->cur.layer = 0; + obj->cur.anti_alias = 1; + obj->cur.render_op = EVAS_RENDER_BLEND; + /* set up object-specific settings */ + obj->prev = obj->cur; + /* set up methods (compulsory) */ + obj->func = &object_func; + obj->type = o_type; +} + +static void * +evas_object_line_new(void) +{ + Evas_Object_Line *o; + + /* alloc obj private data */ + EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_line", Evas_Object_Line, 16, NULL); + o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Line); + if (!o) return NULL; + EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Line); + o->magic = MAGIC_OBJ_LINE; + o->cur.x1 = 0; + o->cur.y1 = 0; + o->cur.x2 = 31; + o->cur.y2 = 31; + o->prev = o->cur; + return o; +} + +static void +evas_object_line_free(Evas_Object *obj) +{ + Evas_Object_Line *o; + + /* frees private object data. very simple here */ + o = (Evas_Object_Line *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE); + return; + MAGIC_CHECK_END(); + /* free obj */ + o->magic = 0; + EVAS_MEMPOOL_FREE(_mp_obj, o); +} + +static void +evas_object_line_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) +{ + Evas_Object_Line *o; + + /* render object to surface with context, and offxet by x,y */ + o = (Evas_Object_Line *)(obj->object_data); + obj->layer->evas->engine.func->context_color_set(output, + context, + obj->cur.cache.clip.r, + obj->cur.cache.clip.g, + obj->cur.cache.clip.b, + obj->cur.cache.clip.a); + obj->layer->evas->engine.func->context_multiplier_unset(output, + context); + obj->layer->evas->engine.func->context_anti_alias_set(output, context, + obj->cur.anti_alias); + obj->layer->evas->engine.func->context_render_op_set(output, context, + obj->cur.render_op); + obj->layer->evas->engine.func->line_draw(output, + context, + surface, + o->cur.cache.x1 + x, + o->cur.cache.y1 + y, + o->cur.cache.x2 + x, + o->cur.cache.y2 + y); +} + +static void +evas_object_line_render_pre(Evas_Object *obj) +{ + Evas_Object_Line *o; + int is_v, was_v; + + /* dont pre-render the obj twice! */ + if (obj->pre_render_done) return; + obj->pre_render_done = 1; + /* pre-render phase. this does anything an object needs to do just before */ + /* rendering. this could mean loading the image data, retrieving it from */ + /* elsewhere, decoding video etc. */ + /* then when this is done the object needs to figure if it changed and */ + /* if so what and where and add the appropriate redraw lines */ + o = (Evas_Object_Line *)(obj->object_data); + /* if someone is clipping this obj - go calculate the clipper */ + if (obj->cur.clipper) + { + if (obj->cur.cache.clip.dirty) + evas_object_clip_recalc(obj->cur.clipper); + obj->cur.clipper->func->render_pre(obj->cur.clipper); + } + /* now figure what changed and add draw rects */ + /* if it just became visible or invisible */ + is_v = evas_object_is_visible(obj); + was_v = evas_object_was_visible(obj); + if (is_v != was_v) + { + evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); + goto done; + } + if ((obj->cur.map != obj->prev.map) || + (obj->cur.usemap != obj->prev.usemap)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* it's not visible - we accounted for it appearing or not so just abort */ + if (!is_v) goto done; + /* clipper changed this is in addition to anything else for obj */ + evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); + /* if we restacked (layer or just within a layer) */ + if (obj->restack) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed anti_alias */ + if (obj->cur.anti_alias != obj->prev.anti_alias) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed render op */ + if (obj->cur.render_op != obj->prev.render_op) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed color */ + if ((obj->cur.color.r != obj->prev.color.r) || + (obj->cur.color.g != obj->prev.color.g) || + (obj->cur.color.b != obj->prev.color.b) || + (obj->cur.color.a != obj->prev.color.a)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed geometry - and obviously not visibility or color */ + /* calculate differences since we have a constant color fill */ + /* we really only need to update the differences */ + if ((obj->cur.geometry.x != obj->prev.geometry.x) || + (obj->cur.geometry.y != obj->prev.geometry.y) || + (obj->cur.geometry.w != obj->prev.geometry.w) || + (obj->cur.geometry.h != obj->prev.geometry.h) || + ((o->changed) && + ((o->cur.x1 != o->prev.x1) || + (o->cur.y1 != o->prev.y1) || + (o->cur.x2 != o->prev.x2) || + (o->cur.y2 != o->prev.y2))) + ) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + done: + evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); +} + +static void +evas_object_line_render_post(Evas_Object *obj) +{ + Evas_Object_Line *o; + + /* this moves the current data to the previous state parts of the object */ + /* in whatever way is safest for the object. also if we don't need object */ + /* data anymore we can free it if the object deems this is a good idea */ + o = (Evas_Object_Line *)(obj->object_data); + /* remove those pesky changes */ + evas_object_clip_changes_clean(obj); + /* move cur to prev safely for object data */ + obj->prev = obj->cur; + o->prev = o->cur; + o->changed = 0; +} + +static unsigned int evas_object_line_id_get(Evas_Object *obj) +{ + Evas_Object_Line *o; + + o = (Evas_Object_Line *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_LINE; +} + +static unsigned int evas_object_line_visual_id_get(Evas_Object *obj) +{ + Evas_Object_Line *o; + + o = (Evas_Object_Line *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_SHAPE; +} + +static void *evas_object_line_engine_data_get(Evas_Object *obj) +{ + Evas_Object_Line *o; + + o = (Evas_Object_Line *)(obj->object_data); + if (!o) return NULL; + return o->engine_data; +} + +static int +evas_object_line_is_opaque(Evas_Object *obj __UNUSED__) +{ + /* this returns 1 if the internal object data implies that the object is */ + /* currently fully opaque over the entire line it occupies */ + return 0; +} + +static int +evas_object_line_was_opaque(Evas_Object *obj __UNUSED__) +{ + /* this returns 1 if the internal object data implies that the object was */ + /* previously fully opaque over the entire line it occupies */ + return 0; +} + +static int +evas_object_line_is_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__) +{ + /* this returns 1 if the canvas co-ordinates are inside the object based */ + /* on object private data. not much use for rects, but for polys, images */ + /* and other complex objects it might be */ + return 1; +} + +static int +evas_object_line_was_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__) +{ + /* this returns 1 if the canvas co-ordinates were inside the object based */ + /* on object private data. not much use for rects, but for polys, images */ + /* and other complex objects it might be */ + return 1; +} + +static void +evas_object_line_coords_recalc(Evas_Object *obj) +{ + Evas_Object_Line *o; + + o = (Evas_Object_Line *)(obj->object_data); + o->cur.cache.x1 = obj->cur.geometry.x + o->cur.x1; + o->cur.cache.y1 = obj->cur.geometry.y + o->cur.y1; + o->cur.cache.x2 = obj->cur.geometry.x + o->cur.x2; + o->cur.cache.y2 = obj->cur.geometry.y + o->cur.y2; + o->cur.cache.object.w = obj->cur.geometry.w; + o->cur.cache.object.h = obj->cur.geometry.h; +} diff --git a/libraries/evas/src/lib/canvas/evas_object_main.c b/libraries/evas/src/lib/canvas/evas_object_main.c new file mode 100644 index 0000000..3eaded9 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_main.c @@ -0,0 +1,1319 @@ +#include "evas_common.h" +#include "evas_private.h" + +EVAS_MEMPOOL(_mp_obj); +EVAS_MEMPOOL(_mp_sh); + +static Eina_Inlist * +get_layer_objects(Evas_Layer *l) +{ + if ((!l) || (!l->objects)) return NULL; + return (EINA_INLIST_GET(l->objects)); +} + +/* evas internal stuff */ +Evas_Object * +evas_object_new(Evas *e __UNUSED__) +{ + Evas_Object *obj; + + EVAS_MEMPOOL_INIT(_mp_obj, "evas_object", Evas_Object, 512, NULL); + obj = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object); + if (!obj) return NULL; + EVAS_MEMPOOL_PREP(_mp_obj, obj, Evas_Object); + + obj->magic = MAGIC_OBJ; + obj->cur.scale = 1.0; + obj->prev.scale = 1.0; + + return obj; +} + +void +evas_object_free(Evas_Object *obj, int clean_layer) +{ + int was_smart_child = 0; + +#if 0 // filtering disabled + evas_filter_free(obj); +#endif + if (!strcmp(obj->type, "image")) evas_object_image_video_surface_set(obj, NULL); + evas_object_map_set(obj, NULL); + evas_object_grabs_cleanup(obj); + evas_object_intercept_cleanup(obj); + if (obj->smart.parent) was_smart_child = 1; + evas_object_smart_cleanup(obj); + obj->func->free(obj); + if (!was_smart_child) evas_object_release(obj, clean_layer); + if (obj->clip.clipees) + eina_list_free(obj->clip.clipees); + evas_object_clip_changes_clean(obj); + evas_object_event_callback_all_del(obj); + evas_object_event_callback_cleanup(obj); + while (obj->data.elements) + { + Evas_Data_Node *node; + + node = obj->data.elements->data; + obj->data.elements = eina_list_remove(obj->data.elements, node); + free(node); + } + obj->magic = 0; + if (obj->size_hints) + { + EVAS_MEMPOOL_FREE(_mp_sh, obj->size_hints); + } + EVAS_MEMPOOL_FREE(_mp_obj, obj); +} + +void +evas_object_change(Evas_Object *obj) +{ + Eina_List *l; + Evas_Object *obj2; + Eina_Bool movch = 0; + + if (obj->layer->evas->nochange) + { +// printf("nochange %p\n", obj); + return; + } +// else +// printf("ch %p\n", obj); + obj->layer->evas->changed = 1; + if (obj->changed_move) + { + movch = 1; + obj->changed_move = 0; + if (!obj->changed_nomove) obj->changed_move_only = 1; + if (obj->changed) return; + } + else + { + obj->changed_move_only = 0; + obj->changed_nomove = 1; + if (obj->changed) return; + } +// obj->changed = 1; + evas_render_object_recalc(obj); + /* set changed flag on all objects this one clips too */ + if (!((movch) && (obj->is_static_clip))) + { + EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) evas_object_change(obj2); + } + EINA_LIST_FOREACH(obj->proxy.proxies, l, obj2) + { + evas_object_change(obj2); + } + if (obj->smart.parent) evas_object_change(obj->smart.parent); +} + +void +evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v) +{ + if (obj->smart.smart) return ; + if (is_v == was_v) return ; + if (is_v) + { + evas_add_rect(rects, + obj->cur.cache.clip.x, + obj->cur.cache.clip.y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); + } + else + { + evas_add_rect(rects, + obj->prev.cache.clip.x, + obj->prev.cache.clip.y, + obj->prev.cache.clip.w, + obj->prev.cache.clip.h); + } +} + +void +evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj) +{ + if (obj->smart.smart) return ; + if (obj->cur.clipper == obj->prev.clipper) return ; + if ((obj->cur.clipper) && (obj->prev.clipper)) + { + /* get difference rects between clippers */ + evas_rects_return_difference_rects(rects, + obj->cur.clipper->cur.cache.clip.x, + obj->cur.clipper->cur.cache.clip.y, + obj->cur.clipper->cur.cache.clip.w, + obj->cur.clipper->cur.cache.clip.h, + obj->prev.clipper->prev.cache.clip.x, + obj->prev.clipper->prev.cache.clip.y, + obj->prev.clipper->prev.cache.clip.w, + obj->prev.clipper->prev.cache.clip.h); + } + else if (obj->cur.clipper) + { + evas_rects_return_difference_rects(rects, + obj->cur.geometry.x, + obj->cur.geometry.y, + obj->cur.geometry.w, + obj->cur.geometry.h, +//// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x, +//// obj->cur.cache.geometry.y, +//// obj->cur.cache.geometry.w, +//// obj->cur.cache.geometry.h, + obj->cur.clipper->cur.cache.clip.x, + obj->cur.clipper->cur.cache.clip.y, + obj->cur.clipper->cur.cache.clip.w, + obj->cur.clipper->cur.cache.clip.h); + } + else if (obj->prev.clipper) + { + evas_rects_return_difference_rects(rects, + obj->prev.geometry.x, + obj->prev.geometry.y, + obj->prev.geometry.w, + obj->prev.geometry.h, +//// rl = evas_rects_return_difference_rects(obj->prev.cache.geometry.x, +//// obj->prev.cache.geometry.y, +//// obj->prev.cache.geometry.w, +//// obj->prev.cache.geometry.h, + obj->prev.clipper->prev.cache.clip.x, + obj->prev.clipper->prev.cache.clip.y, + obj->prev.clipper->prev.cache.clip.w, + obj->prev.clipper->prev.cache.clip.h); + } +} + +void +evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj) +{ + evas_add_rect(rects, + obj->cur.cache.clip.x, + obj->cur.cache.clip.y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); + evas_add_rect(rects, + obj->prev.cache.clip.x, + obj->prev.cache.clip.y, + obj->prev.cache.clip.w, + obj->prev.cache.clip.h); +/* + evas_add_rect(rects, + obj->cur.geometry.x, + obj->cur.geometry.y, + obj->cur.geometry.w, + obj->cur.geometry.h); +//// obj->cur.cache.geometry.x, +//// obj->cur.cache.geometry.y, +//// obj->cur.cache.geometry.w, +//// obj->cur.cache.geometry.h); + evas_add_rect(rects, + obj->prev.geometry.x, + obj->prev.geometry.y, + obj->prev.geometry.w, + obj->prev.geometry.h); +//// obj->prev.cache.geometry.x, +//// obj->prev.cache.geometry.y, +//// obj->prev.cache.geometry.w, +//// obj->prev.cache.geometry.h); +*/ +} + +void +evas_object_clip_changes_clean(Evas_Object *obj) +{ + Eina_Rectangle *r; + + EINA_LIST_FREE(obj->clip.changes, r) eina_rectangle_free(r); +} + +void +evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v) +{ + Eina_Rectangle *r; + Evas_Object *clipper; + Eina_List *l; + unsigned int i; + Eina_Array_Iterator it; + int x, y, w, h; + + if (obj->smart.smart) goto end; + /* FIXME: was_v isn't used... why? */ + was_v = 0; + if (!obj->clip.clipees) + { + EINA_ARRAY_ITER_NEXT(rects, i, r, it) + { + /* get updates and clip to current clip */ + x = r->x; + y = r->y; + w = r->w; + h = r->h; + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->cur.cache.clip.x, + obj->cur.cache.clip.y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); + if ((w > 0) && (h > 0)) + obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output, + x, y, w, h); + /* get updates and clip to previous clip */ + x = r->x; + y = r->y; + w = r->w; + h = r->h; + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->prev.cache.clip.x, + obj->prev.cache.clip.y, + obj->prev.cache.clip.w, + obj->prev.cache.clip.h); + if ((w > 0) && (h > 0)) + obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output, + x, y, w, h); + } + /* if the object is actually visible, take any parent clip changes */ + if (is_v) + { + clipper = obj->cur.clipper; + while (clipper) + { + EINA_LIST_FOREACH(clipper->clip.changes, l, r) + { + /* get updates and clip to current clip */ + x = r->x; y = r->y; w = r->w; h = r->h; + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->cur.cache.clip.x, + obj->cur.cache.clip.y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); + if ((w > 0) && (h > 0)) + obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output, + x, y, w, h); + /* get updates and clip to previous clip */ + x = r->x; y = r->y; w = r->w; h = r->h; + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->prev.cache.clip.x, + obj->prev.cache.clip.y, + obj->prev.cache.clip.w, + obj->prev.cache.clip.h); + if ((w > 0) && (h > 0)) + obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output, + x, y, w, h); + } + clipper = clipper->cur.clipper; + } + } + } + else + { + evas_object_clip_changes_clean(obj); + EINA_ARRAY_ITER_NEXT(rects, i, r, it) + obj->clip.changes = eina_list_append(obj->clip.changes, r); + eina_array_clean(rects); + } + + end: + EINA_ARRAY_ITER_NEXT(rects, i, r, it) + eina_rectangle_free(r); + eina_array_clean(rects); +} + +int +evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h) +{ + if (obj->smart.smart) return 0; + /* assumes coords have been recalced */ + if ((RECTS_INTERSECT(x, y, w, h, + obj->prev.cache.clip.x, + obj->prev.cache.clip.y, + obj->prev.cache.clip.w, + obj->prev.cache.clip.h))) + return 1; + return 0; +} + +int +evas_object_was_opaque(Evas_Object *obj) +{ + if (obj->smart.smart) return 0; + if (obj->prev.cache.clip.a == 255) + { + if (obj->func->was_opaque) + return obj->func->was_opaque(obj); + return 1; + } + return 0; +} + +int +evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) +{ + if (obj->smart.smart) return 0; + if (obj->func->is_inside) + return obj->func->is_inside(obj, x, y); + return 0; +} + +int +evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) +{ + if (obj->smart.smart) return 0; + if (obj->func->was_inside) + return obj->func->was_inside(obj, x, y); + return 0; +} +/* routines apps will call */ + +EAPI void +evas_object_ref(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + obj->ref++; + if (obj->ref == 0) obj->ref--; +} + +EAPI void +evas_object_unref(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->ref == 0) return; + obj->ref--; + if ((obj->del_ref) && (obj->ref == 0)) evas_object_del(obj); +} + +EAPI void +evas_object_del(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + + if (obj->delete_me) return; + + if (obj->ref > 0) + { + obj->del_ref = 1; + return; + } +#ifdef EVAS_FRAME_QUEUING + evas_common_frameq_flush(); +#endif + + evas_object_hide(obj); + if (obj->focused) + { + obj->focused = 0; + obj->layer->evas->focused = NULL; + _evas_object_event_new(); + evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL); + _evas_post_event_callback_call(obj->layer->evas); + } + _evas_object_event_new(); + evas_object_event_callback_call(obj, EVAS_CALLBACK_DEL, NULL); + _evas_post_event_callback_call(obj->layer->evas); + if (obj->mouse_grabbed > 0) + obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; + if ((obj->mouse_in) || (obj->mouse_grabbed > 0)) + obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj); + obj->mouse_grabbed = 0; + obj->mouse_in = 0; + if (obj->name) evas_object_name_set(obj, NULL); + if (!obj->layer) + { + evas_object_free(obj, 1); + return; + } + obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; + obj->mouse_grabbed = 0; + obj->mouse_in = 0; + evas_object_grabs_cleanup(obj); + while (obj->clip.clipees) + evas_object_clip_unset(obj->clip.clipees->data); + while (obj->proxy.proxies) + evas_object_image_source_unset(obj->proxy.proxies->data); + if (obj->cur.clipper) evas_object_clip_unset(obj); + if (obj->smart.smart) evas_object_smart_del(obj); + evas_object_map_set(obj, NULL); + _evas_object_event_new(); + evas_object_event_callback_call(obj, EVAS_CALLBACK_FREE, NULL); + _evas_post_event_callback_call(obj->layer->evas); + evas_object_smart_cleanup(obj); + obj->delete_me = 1; + evas_object_change(obj); +} + +EAPI void +evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) +{ + int is, was = 0, pass = 0, freeze = 0; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) return; + if (evas_object_intercept_call_move(obj, x, y)) return; + if (obj->doing.in_move > 0) + { + WRN("evas_object_move() called on object %p when in the middle of moving the same object", obj); + return; + } + if ((obj->cur.geometry.x == x) && (obj->cur.geometry.y == y)) return; + if (obj->layer->evas->events_frozen <= 0) + { + pass = evas_event_passes_through(obj); + freeze = evas_event_freezes_through(obj); + if ((!pass) && (!freeze)) + was = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + } + obj->doing.in_move++; + if (obj->smart.smart) + { + if (obj->smart.smart->smart_class->move) + obj->smart.smart->smart_class->move(obj, x, y); + } + obj->cur.geometry.x = x; + obj->cur.geometry.y = y; +//// obj->cur.cache.geometry.validity = 0; + obj->changed_move = 1; + evas_object_change(obj); + evas_object_clip_dirty(obj); + obj->doing.in_move--; + if (obj->layer->evas->events_frozen <= 0) + { + evas_object_recalc_clippees(obj); + if (!pass) + { + if (!obj->smart.smart) + { + is = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + if ((is ^ was) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + } + } + evas_object_inform_call_move(obj); +} + +EAPI void +evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) +{ + int is, was = 0, pass = 0, freeze =0; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) return; + if (w < 0) w = 0; if (h < 0) h = 0; + if (evas_object_intercept_call_resize(obj, w, h)) return; + if (obj->doing.in_resize > 0) + { + WRN("evas_object_resize() called on object %p when in the middle of resizing the same object", obj); + return; + } + if ((obj->cur.geometry.w == w) && (obj->cur.geometry.h == h)) return; + if (obj->layer->evas->events_frozen <= 0) + { + pass = evas_event_passes_through(obj); + freeze = evas_event_freezes_through(obj); + if ((!pass) && (!freeze)) + was = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + } + obj->doing.in_resize++; + if (obj->smart.smart) + { + if (obj->smart.smart->smart_class->resize) + obj->smart.smart->smart_class->resize(obj, w, h); + } + obj->cur.geometry.w = w; + obj->cur.geometry.h = h; +//// obj->cur.cache.geometry.validity = 0; + evas_object_change(obj); + evas_object_clip_dirty(obj); + obj->doing.in_resize--; + /* NB: evas_object_recalc_clippees was here previously ( < 08/07/2009) */ + if (obj->layer->evas->events_frozen <= 0) + { + /* NB: If this creates glitches on screen then move to above position */ + evas_object_recalc_clippees(obj); + + // if (obj->func->coords_recalc) obj->func->coords_recalc(obj); + if (!pass) + { + if (!obj->smart.smart) + { + is = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + if ((is ^ was) && (obj->cur.visible)) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + } + } + evas_object_inform_call_resize(obj); +} + +EAPI void +evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; + return; + MAGIC_CHECK_END(); + if (obj->delete_me) + { + if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; + return; + } + if (x) *x = obj->cur.geometry.x; + if (y) *y = obj->cur.geometry.y; + if (w) *w = obj->cur.geometry.w; + if (h) *h = obj->cur.geometry.h; +} + +static void +_evas_object_size_hint_alloc(Evas_Object *obj) +{ + if (obj->size_hints) return; + + EVAS_MEMPOOL_INIT(_mp_sh, "evas_size_hints", Evas_Size_Hints, 512, ); + obj->size_hints = EVAS_MEMPOOL_ALLOC(_mp_sh, Evas_Size_Hints); + if (!obj->size_hints) return; + EVAS_MEMPOOL_PREP(_mp_sh, obj->size_hints, Evas_Size_Hints); + obj->size_hints->max.w = -1; + obj->size_hints->max.h = -1; + obj->size_hints->align.x = 0.5; + obj->size_hints->align.y = 0.5; +} + +EAPI void +evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (w) *w = 0; if (h) *h = 0; + return; + MAGIC_CHECK_END(); + if ((!obj->size_hints) || obj->delete_me) + { + if (w) *w = 0; if (h) *h = 0; + return; + } + if (w) *w = obj->size_hints->min.w; + if (h) *h = obj->size_hints->min.h; +} + +EAPI void +evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) + return; + _evas_object_size_hint_alloc(obj); + if ((obj->size_hints->min.w == w) && (obj->size_hints->min.h == h)) return; + obj->size_hints->min.w = w; + obj->size_hints->min.h = h; + + evas_object_inform_call_changed_size_hints(obj); +} + +EAPI void +evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (w) *w = -1; if (h) *h = -1; + return; + MAGIC_CHECK_END(); + if ((!obj->size_hints) || obj->delete_me) + { + if (w) *w = -1; if (h) *h = -1; + return; + } + if (w) *w = obj->size_hints->max.w; + if (h) *h = obj->size_hints->max.h; +} + +EAPI void +evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) + return; + _evas_object_size_hint_alloc(obj); + if ((obj->size_hints->max.w == w) && (obj->size_hints->max.h == h)) return; + obj->size_hints->max.w = w; + obj->size_hints->max.h = h; + + evas_object_inform_call_changed_size_hints(obj); +} + +EAPI void +evas_object_size_hint_request_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (w) *w = 0; if (h) *h = 0; + return; + MAGIC_CHECK_END(); + if ((!obj->size_hints) || obj->delete_me) + { + if (w) *w = 0; if (h) *h = 0; + return; + } + if (w) *w = obj->size_hints->request.w; + if (h) *h = obj->size_hints->request.h; +} + +EAPI void +evas_object_size_hint_request_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) + return; + _evas_object_size_hint_alloc(obj); + if ((obj->size_hints->request.w == w) && (obj->size_hints->request.h == h)) return; + obj->size_hints->request.w = w; + obj->size_hints->request.h = h; + + evas_object_inform_call_changed_size_hints(obj); +} + +EAPI void +evas_object_size_hint_aspect_get(const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE; + if (w) *w = 0; if (h) *h = 0; + return; + MAGIC_CHECK_END(); + if ((!obj->size_hints) || obj->delete_me) + { + if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE; + if (w) *w = 0; if (h) *h = 0; + return; + } + if (aspect) *aspect = obj->size_hints->aspect.mode; + if (w) *w = obj->size_hints->aspect.size.w; + if (h) *h = obj->size_hints->aspect.size.h; +} + +EAPI void +evas_object_size_hint_aspect_set(Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) + return; + _evas_object_size_hint_alloc(obj); + if ((obj->size_hints->aspect.mode == aspect) && (obj->size_hints->aspect.size.w == w) && (obj->size_hints->aspect.size.h == h)) return; + obj->size_hints->aspect.mode = aspect; + obj->size_hints->aspect.size.w = w; + obj->size_hints->aspect.size.h = h; + + evas_object_inform_call_changed_size_hints(obj); +} + +EAPI void +evas_object_size_hint_align_get(const Evas_Object *obj, double *x, double *y) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (x) *x = 0.5; if (y) *y = 0.5; + return; + MAGIC_CHECK_END(); + if ((!obj->size_hints) || obj->delete_me) + { + if (x) *x = 0.5; if (y) *y = 0.5; + return; + } + if (x) *x = obj->size_hints->align.x; + if (y) *y = obj->size_hints->align.y; +} + +EAPI void +evas_object_size_hint_align_set(Evas_Object *obj, double x, double y) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) + return; + _evas_object_size_hint_alloc(obj); + if ((obj->size_hints->align.x == x) && (obj->size_hints->align.y == y)) return; + obj->size_hints->align.x = x; + obj->size_hints->align.y = y; + + evas_object_inform_call_changed_size_hints(obj); +} + +EAPI void +evas_object_size_hint_weight_get(const Evas_Object *obj, double *x, double *y) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (x) *x = 0.0; if (y) *y = 0.0; + return; + MAGIC_CHECK_END(); + if ((!obj->size_hints) || obj->delete_me) + { + if (x) *x = 0.0; if (y) *y = 0.0; + return; + } + if (x) *x = obj->size_hints->weight.x; + if (y) *y = obj->size_hints->weight.y; +} + +EAPI void +evas_object_size_hint_weight_set(Evas_Object *obj, double x, double y) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) + return; + _evas_object_size_hint_alloc(obj); + if ((obj->size_hints->weight.x == x) && (obj->size_hints->weight.y == y)) return; + obj->size_hints->weight.x = x; + obj->size_hints->weight.y = y; + + evas_object_inform_call_changed_size_hints(obj); +} + +EAPI void +evas_object_size_hint_padding_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (l) *l = 0; if (r) *r = 0; + if (t) *t = 0; if (b) *b = 0; + return; + MAGIC_CHECK_END(); + if ((!obj->size_hints) || obj->delete_me) + { + if (l) *l = 0; if (r) *r = 0; + if (t) *t = 0; if (b) *b = 0; + return; + } + if (l) *l = obj->size_hints->padding.l; + if (r) *r = obj->size_hints->padding.r; + if (t) *t = obj->size_hints->padding.t; + if (b) *b = obj->size_hints->padding.b; +} + +EAPI void +evas_object_size_hint_padding_set(Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) + return; + _evas_object_size_hint_alloc(obj); + if ((obj->size_hints->padding.l == l) && (obj->size_hints->padding.r == r) && (obj->size_hints->padding.t == t) && (obj->size_hints->padding.b == b)) return; + obj->size_hints->padding.l = l; + obj->size_hints->padding.r = r; + obj->size_hints->padding.t = t; + obj->size_hints->padding.b = b; + + evas_object_inform_call_changed_size_hints(obj); +} + +EAPI void +evas_object_show(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) return; + if (evas_object_intercept_call_show(obj)) return; + if (obj->smart.smart) + { + if (obj->smart.smart->smart_class->show) + obj->smart.smart->smart_class->show(obj); + } + if (obj->cur.visible) + { + return; + } + obj->cur.visible = 1; + evas_object_change(obj); + evas_object_clip_dirty(obj); + if (obj->layer->evas->events_frozen <= 0) + { + evas_object_clip_across_clippees_check(obj); + evas_object_recalc_clippees(obj); + if ((!evas_event_passes_through(obj)) && + (!evas_event_freezes_through(obj))) + { + if (!obj->smart.smart) + { + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1)) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + } + } + evas_object_inform_call_show(obj); +} + +EAPI void +evas_object_hide(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) return; + if (evas_object_intercept_call_hide(obj)) return; + if (obj->smart.smart) + { + if (obj->smart.smart->smart_class->hide) + obj->smart.smart->smart_class->hide(obj); + } + if (!obj->cur.visible) + { + return; + } + obj->cur.visible = 0; + evas_object_change(obj); + evas_object_clip_dirty(obj); + if (obj->layer->evas->events_frozen <= 0) + { + evas_object_clip_across_clippees_check(obj); + evas_object_recalc_clippees(obj); + if ((!evas_event_passes_through(obj)) && + (!evas_event_freezes_through(obj))) + { + if ((!obj->smart.smart) || + ((obj->cur.map) && (obj->cur.map->count == 4) && (obj->cur.usemap))) + { + if (!obj->mouse_grabbed) + { + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1)) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } +/* this is at odds to handling events when an obj is moved out of the mouse + * ore resized out or clipped out. if mouse is grabbed - regardless of + * visibility, mouse move events should keep happening and mouse up. + * for better or worse it's at least consistent. + if (obj->delete_me) return; + if (obj->mouse_grabbed > 0) + obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; + if ((obj->mouse_in) || (obj->mouse_grabbed > 0)) + obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj); + obj->mouse_grabbed = 0; + if (obj->layer->evas->events_frozen > 0) + { + obj->mouse_in = 0; + return; + } + if (obj->mouse_in) + { + Evas_Event_Mouse_Out ev; + + _evas_object_event_new(); + + obj->mouse_in = 0; + ev.buttons = obj->layer->evas->pointer.button; + ev.output.x = obj->layer->evas->pointer.x; + ev.output.y = obj->layer->evas->pointer.y; + ev.canvas.x = obj->layer->evas->pointer.x; + ev.canvas.y = obj->layer->evas->pointer.y; + ev.data = NULL; + ev.modifiers = &(obj->layer->evas->modifiers); + ev.locks = &(obj->layer->evas->locks); + ev.timestamp = obj->layer->evas->last_timestamp; + ev.event_flags = EVAS_EVENT_FLAG_NONE; + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); + _evas_post_event_callback_call(obj->layer->evas); + } + */ + } + } + } + else + { +/* + if (obj->mouse_grabbed > 0) + obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; + if ((obj->mouse_in) || (obj->mouse_grabbed > 0)) + obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj); + obj->mouse_grabbed = 0; + obj->mouse_in = 0; + */ + } + evas_object_inform_call_hide(obj); +} + +EAPI Eina_Bool +evas_object_visible_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + if (obj->delete_me) return 0; + return obj->cur.visible; +} + +EAPI void +evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) return; + if (r > 255) r = 255; if (r < 0) r = 0; + if (g > 255) g = 255; if (g < 0) g = 0; + if (b > 255) b = 255; if (b < 0) b = 0; + if (a > 255) a = 255; if (a < 0) a = 0; + if (evas_object_intercept_call_color_set(obj, r, g, b, a)) return; + if (obj->smart.smart) + { + if (obj->smart.smart->smart_class->color_set) + obj->smart.smart->smart_class->color_set(obj, r, g, b, a); + } + if ((obj->cur.color.r == r) && + (obj->cur.color.g == g) && + (obj->cur.color.b == b) && + (obj->cur.color.a == a)) return; + obj->cur.color.r = r; + obj->cur.color.g = g; + obj->cur.color.b = b; + evas_object_clip_dirty(obj); + if ((obj->cur.color.a == 0) && (a == 0) && (obj->cur.render_op == EVAS_RENDER_BLEND)) return; + obj->cur.color.a = a; + evas_object_change(obj); +} + +EAPI void +evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; + return; + MAGIC_CHECK_END(); + if (obj->delete_me) + { + if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; + return; + } + if (r) *r = obj->cur.color.r; + if (g) *g = obj->cur.color.g; + if (b) *b = obj->cur.color.b; + if (a) *a = obj->cur.color.a; +} + +EAPI void +evas_object_anti_alias_set(Evas_Object *obj, Eina_Bool anti_alias) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) return; + anti_alias = !!anti_alias; + if (obj->cur.anti_alias == anti_alias)return; + obj->cur.anti_alias = anti_alias; + evas_object_change(obj); +} + +EAPI Eina_Bool +evas_object_anti_alias_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + if (obj->delete_me) return 0; + return obj->cur.anti_alias; +} + +EAPI void +evas_object_scale_set(Evas_Object *obj, double scale) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) return; + if (obj->cur.scale == scale) return; + obj->cur.scale = scale; + evas_object_change(obj); + if (obj->func->scale_update) obj->func->scale_update(obj); +} + +EAPI double +evas_object_scale_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + if (obj->delete_me) return 1.0; + return obj->cur.scale; +} + +EAPI void +evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op render_op) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj->delete_me) return; + if ((Evas_Render_Op)obj->cur.render_op == render_op) + return; + obj->cur.render_op = render_op; + evas_object_change(obj); +} + +EAPI Evas_Render_Op +evas_object_render_op_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + if (obj->delete_me) return EVAS_RENDER_BLEND; + return obj->cur.render_op; +} + +EAPI Evas * +evas_object_evas_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (obj->delete_me) return NULL; + return obj->layer->evas; +} + +EAPI Evas_Object * +evas_object_top_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) +{ + Evas_Layer *lay; + int xx, yy; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + xx = x; + yy = y; +//// xx = evas_coord_world_x_to_screen(e, x); +//// yy = evas_coord_world_y_to_screen(e, y); + EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay) + { + Evas_Object *obj; + + EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj) + { + if (obj->delete_me) continue; + if ((!include_pass_events_objects) && + (evas_event_passes_through(obj))) continue; + if ((!include_hidden_objects) && (!obj->cur.visible)) continue; + evas_object_clip_recalc(obj); + if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) && + (!obj->clip.clipees)) + return obj; + } + } + return NULL; +} + +EAPI Evas_Object * +evas_object_top_at_pointer_get(const Evas *e) +{ + return evas_object_top_at_xy_get(e, e->pointer.x, e->pointer.y, EINA_TRUE, + EINA_TRUE); +} + +EAPI Evas_Object * +evas_object_top_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) +{ + Evas_Layer *lay; + int xx, yy, ww, hh; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + xx = x; + yy = y; + ww = w; + hh = h; +//// xx = evas_coord_world_x_to_screen(e, x); +//// yy = evas_coord_world_y_to_screen(e, y); +//// ww = evas_coord_world_x_to_screen(e, w); +//// hh = evas_coord_world_y_to_screen(e, h); + if (ww < 1) ww = 1; + if (hh < 1) hh = 1; + EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay) + { + Evas_Object *obj; + + EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj) + { + if (obj->delete_me) continue; + if ((!include_pass_events_objects) && + (evas_event_passes_through(obj))) continue; + if ((!include_hidden_objects) && (!obj->cur.visible)) continue; + evas_object_clip_recalc(obj); + if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) && + (!obj->clip.clipees)) + return obj; + } + } + return NULL; +} + +EAPI Eina_List * +evas_objects_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) +{ + Eina_List *in = NULL; + Evas_Layer *lay; + int xx, yy; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + xx = x; + yy = y; +//// xx = evas_coord_world_x_to_screen(e, x); +//// yy = evas_coord_world_y_to_screen(e, y); + EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay) + { + Evas_Object *obj; + + EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj) + { + if (obj->delete_me) continue; + if ((!include_pass_events_objects) && + (evas_event_passes_through(obj))) continue; + if ((!include_hidden_objects) && (!obj->cur.visible)) continue; + evas_object_clip_recalc(obj); + if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) && + (!obj->clip.clipees)) + in = eina_list_prepend(in, obj); + } + } + return in; +} + +/** + * Retrieves the objects in the given rectangle region + * @param e The given evas object. + * @param x The horizontal coordinate. + * @param y The vertical coordinate. + * @param w The width size. + * @param h The height size. + * @param include_pass_events_objects Boolean Flag to include or not pass events objects + * @param include_hidden_objects Boolean Flag to include or not hidden objects + * @return The list of evas object in the rectangle region. + * + */ +EAPI Eina_List * +evas_objects_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) +{ + Eina_List *in = NULL; + Evas_Layer *lay; + int xx, yy, ww, hh; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + xx = x; + yy = y; + ww = w; + hh = h; +//// xx = evas_coord_world_x_to_screen(e, x); +//// yy = evas_coord_world_y_to_screen(e, y); +//// ww = evas_coord_world_x_to_screen(e, w); +//// hh = evas_coord_world_y_to_screen(e, h); + if (ww < 1) ww = 1; + if (hh < 1) hh = 1; + EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay) + { + Evas_Object *obj; + + EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj) + { + if (obj->delete_me) continue; + if ((!include_pass_events_objects) && + (evas_event_passes_through(obj))) continue; + if ((!include_hidden_objects) && (!obj->cur.visible)) continue; + evas_object_clip_recalc(obj); + if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) && + (!obj->clip.clipees)) + in = eina_list_prepend(in, obj); + } + } + return in; +} + +EAPI const char * +evas_object_type_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (obj->delete_me) return ""; + return obj->type; +} + +EAPI void +evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + obj->precise_is_inside = precise; +} + +EAPI Eina_Bool +evas_object_precise_is_inside_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + return obj->precise_is_inside; +} + +EAPI void +evas_object_static_clip_set(Evas_Object *obj, Eina_Bool is_static_clip) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + obj->is_static_clip = is_static_clip; +} + +EAPI Eina_Bool +evas_object_static_clip_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + return obj->is_static_clip; +} + diff --git a/libraries/evas/src/lib/canvas/evas_object_polygon.c b/libraries/evas/src/lib/canvas/evas_object_polygon.c new file mode 100644 index 0000000..cbc1802 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_polygon.c @@ -0,0 +1,554 @@ +#include "evas_common.h" +#include "evas_private.h" + +/* private magic number for polygon objects */ +static const char o_type[] = "polygon"; + +/* private struct for line object internal data */ +typedef struct _Evas_Object_Polygon Evas_Object_Polygon; +typedef struct _Evas_Polygon_Point Evas_Polygon_Point; + +struct _Evas_Object_Polygon +{ + DATA32 magic; + Eina_List *points; + void *engine_data; + struct { + int x, y; + } offset; + Evas_Coord_Rectangle geometry; + char changed : 1; +}; + +struct _Evas_Polygon_Point +{ + Evas_Coord x, y; +}; + +/* private methods for polygon objects */ +static void evas_object_polygon_init(Evas_Object *obj); +static void *evas_object_polygon_new(void); +static void evas_object_polygon_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); +static void evas_object_polygon_free(Evas_Object *obj); +static void evas_object_polygon_render_pre(Evas_Object *obj); +static void evas_object_polygon_render_post(Evas_Object *obj); + +static unsigned int evas_object_polygon_id_get(Evas_Object *obj); +static unsigned int evas_object_polygon_visual_id_get(Evas_Object *obj); +static void *evas_object_polygon_engine_data_get(Evas_Object *obj); + +static int evas_object_polygon_is_opaque(Evas_Object *obj); +static int evas_object_polygon_was_opaque(Evas_Object *obj); +static int evas_object_polygon_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +static int evas_object_polygon_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); + +static const Evas_Object_Func object_func = +{ + /* methods (compulsory) */ + evas_object_polygon_free, + evas_object_polygon_render, + evas_object_polygon_render_pre, + evas_object_polygon_render_post, + evas_object_polygon_id_get, + evas_object_polygon_visual_id_get, + evas_object_polygon_engine_data_get, + /* these are optional. NULL = nothing */ + NULL, + NULL, + NULL, + NULL, + evas_object_polygon_is_opaque, + evas_object_polygon_was_opaque, + evas_object_polygon_is_inside, + evas_object_polygon_was_inside, + NULL, + NULL, + NULL, + NULL, + NULL +}; + +/* the actual api call to add a rect */ +/* it has no other api calls as all properties are standard */ + +EVAS_MEMPOOL(_mp_obj); + +EAPI Evas_Object * +evas_object_polygon_add(Evas *e) +{ + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + obj = evas_object_new(e); + evas_object_polygon_init(obj); + evas_object_inject(obj, e); + return obj; +} + +EAPI void +evas_object_polygon_point_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y) +{ + Evas_Object_Polygon *o; + Evas_Polygon_Point *p; + Evas_Coord min_x, max_x, min_y, max_y; + int is, was = 0; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Polygon *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON); + return; + MAGIC_CHECK_END(); + + if (obj->layer->evas->events_frozen <= 0) + { + if (!evas_event_passes_through(obj) && + !evas_event_freezes_through(obj)) + was = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + 1, 1); + } + if (!o->points) + { + o->offset.x = obj->cur.geometry.x; + o->offset.y = obj->cur.geometry.y; + } + else + { + /* Update all points and take offset into account. */ + Eina_List *over; + + EINA_LIST_FOREACH(o->points, over, p) + { + p->x += o->offset.x; + p->y += o->offset.y; + } + } + + p = malloc(sizeof(Evas_Polygon_Point)); + if (!p) return; + p->x = x + o->offset.x; + p->y = y + o->offset.y; + + if (!o->points) + { + obj->cur.geometry.x = p->x; + obj->cur.geometry.y = p->y; + obj->cur.geometry.w = 2; + obj->cur.geometry.h = 2; + } + else + { + if (p->x < obj->cur.geometry.x) min_x = p->x; + else min_x = obj->cur.geometry.x; + if (p->x > (obj->cur.geometry.x + obj->cur.geometry.w - 2)) + max_x = p->x; + else max_x = obj->cur.geometry.x + obj->cur.geometry.w - 2; + if (p->y < obj->cur.geometry.y) min_y = p->y; + else min_y = obj->cur.geometry.y; + if (p->y > (obj->cur.geometry.y + obj->cur.geometry.h - 2)) + max_y = p->y; + else max_y = obj->cur.geometry.y + obj->cur.geometry.h - 2; + obj->cur.geometry.x = min_x; + obj->cur.geometry.y = min_y; + obj->cur.geometry.w = max_x - min_x + 2; + obj->cur.geometry.h = max_y - min_y + 2; + } + o->points = eina_list_append(o->points, p); + + o->geometry = obj->cur.geometry; + o->offset.x = 0; + o->offset.y = 0; + + //// obj->cur.cache.geometry.validity = 0; + o->changed = EINA_TRUE; + evas_object_change(obj); + evas_object_clip_dirty(obj); + evas_object_coords_recalc(obj); + if (obj->layer->evas->events_frozen <= 0) + { + is = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + if (!evas_event_passes_through(obj) && + !evas_event_freezes_through(obj) ) + { + if ((is ^ was) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + } + evas_object_inform_call_move(obj); + evas_object_inform_call_resize(obj); +} + +EAPI void +evas_object_polygon_points_clear(Evas_Object *obj) +{ + Evas_Object_Polygon *o; + int is, was; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Polygon *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON); + return; + MAGIC_CHECK_END(); + was = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + while (o->points) + { + free(o->points->data); + o->points = eina_list_remove(o->points, o->points->data); + } + obj->cur.geometry.x = 0; + obj->cur.geometry.y = 0; + obj->cur.geometry.w = 0; + obj->cur.geometry.h = 0; + //// obj->cur.cache.geometry.validity = 0; + o->changed = EINA_TRUE; + evas_object_change(obj); + evas_object_clip_dirty(obj); + evas_object_coords_recalc(obj); + is = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + if ((is || was) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + evas_object_inform_call_move(obj); + evas_object_inform_call_resize(obj); +} + +/* all nice and private */ +static void +evas_object_polygon_init(Evas_Object *obj) +{ + /* alloc image ob, setup methods and default values */ + obj->object_data = evas_object_polygon_new(); + /* set up default settings for this kind of object */ + obj->cur.color.r = 255; + obj->cur.color.g = 255; + obj->cur.color.b = 255; + obj->cur.color.a = 255; + obj->cur.geometry.x = 0; + obj->cur.geometry.y = 0; + obj->cur.geometry.w = 0; + obj->cur.geometry.h = 0; + obj->cur.layer = 0; + /* set up object-specific settings */ + obj->prev = obj->cur; + /* set up methods (compulsory) */ + obj->func = &object_func; + obj->type = o_type; +} + +static void * +evas_object_polygon_new(void) +{ + Evas_Object_Polygon *o; + + /* alloc obj private data */ + EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_polygon", Evas_Object_Polygon, 32, NULL); + o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Polygon); + if (!o) return NULL; + EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Polygon); + o->magic = MAGIC_OBJ_POLYGON; + return o; +} + +static void +evas_object_polygon_free(Evas_Object *obj) +{ + Evas_Object_Polygon *o; + + /* frees private object data. very simple here */ + o = (Evas_Object_Polygon *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON); + return; + MAGIC_CHECK_END(); + /* free obj */ + while (o->points) + { + free(o->points->data); + o->points = eina_list_remove(o->points, o->points->data); + } + o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output, + obj->layer->evas->engine.data.context, + o->engine_data); + o->magic = 0; + EVAS_MEMPOOL_FREE(_mp_obj, o); +} + +static void +evas_object_polygon_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) +{ + Evas_Object_Polygon *o; + Eina_List *l; + Evas_Polygon_Point *p; + + /* render object to surface with context, and offxet by x,y */ + o = (Evas_Object_Polygon *)(obj->object_data); + obj->layer->evas->engine.func->context_color_set(output, + context, + obj->cur.cache.clip.r, + obj->cur.cache.clip.g, + obj->cur.cache.clip.b, + obj->cur.cache.clip.a); + obj->layer->evas->engine.func->context_multiplier_unset(output, + context); + obj->layer->evas->engine.func->context_render_op_set(output, context, + obj->cur.render_op); + if (o->changed) + { + o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output, + obj->layer->evas->engine.data.context, + o->engine_data); + EINA_LIST_FOREACH(o->points, l, p) + { + //px = evas_coord_world_x_to_screen(obj->layer->evas, p->x); + //py = evas_coord_world_y_to_screen(obj->layer->evas, p->y); + o->engine_data = obj->layer->evas->engine.func->polygon_point_add(obj->layer->evas->engine.data.output, + obj->layer->evas->engine.data.context, + o->engine_data, + p->x, p->y); + } + } + + if (o->engine_data) + obj->layer->evas->engine.func->polygon_draw(output, + context, + surface, + o->engine_data, + o->offset.x + x, o->offset.y + y); +} + +static void +evas_object_polygon_render_pre(Evas_Object *obj) +{ + Evas_Object_Polygon *o; + int is_v, was_v; + + /* dont pre-render the obj twice! */ + if (obj->pre_render_done) return; + obj->pre_render_done = 1; + /* pre-render phase. this does anything an object needs to do just before */ + /* rendering. this could mean loading the image data, retrieving it from */ + /* elsewhere, decoding video etc. */ + /* then when this is done the object needs to figure if it changed and */ + /* if so what and where and add the appropriate redraw lines */ + o = (Evas_Object_Polygon *)(obj->object_data); + /* if someone is clipping this obj - go calculate the clipper */ + if (obj->cur.clipper) + { + if (obj->cur.cache.clip.dirty) + evas_object_clip_recalc(obj->cur.clipper); + obj->cur.clipper->func->render_pre(obj->cur.clipper); + } + /* now figure what changed and add draw rects */ + /* if it just became visible or invisible */ + is_v = evas_object_is_visible(obj); + was_v = evas_object_was_visible(obj); + if (is_v != was_v) + { + evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); + goto done; + } + if ((obj->cur.map != obj->prev.map) || + (obj->cur.usemap != obj->prev.usemap)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* it's not visible - we accounted for it appearing or not so just abort */ + if (!is_v) goto done; + /* clipper changed this is in addition to anything else for obj */ + evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); + /* if we restacked (layer or just within a layer) */ + if (obj->restack) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed render op */ + if (obj->cur.render_op != obj->prev.render_op) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed color */ + if ((obj->cur.color.r != obj->prev.color.r) || + (obj->cur.color.g != obj->prev.color.g) || + (obj->cur.color.b != obj->prev.color.b) || + (obj->cur.color.a != obj->prev.color.a)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed geometry - and obviously not visibility or color */ + /* calculate differences since we have a constant color fill */ + /* we really only need to update the differences */ + if ((obj->cur.geometry.x != obj->prev.geometry.x) || + (obj->cur.geometry.y != obj->prev.geometry.y) || + (obj->cur.geometry.w != obj->prev.geometry.w) || + (obj->cur.geometry.h != obj->prev.geometry.h) || + (o->changed)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + done: + if ((obj->cur.geometry.x != obj->prev.geometry.x) || + (obj->cur.geometry.y != obj->prev.geometry.y)) + { + if (!o->changed) + { + o->offset.x += obj->cur.geometry.x - obj->prev.geometry.x; + o->offset.y += obj->cur.geometry.y - obj->prev.geometry.y; + } + else + { + o->offset.x += obj->cur.geometry.x - o->geometry.x; + o->offset.y += obj->cur.geometry.y - o->geometry.y; + } + } + evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); +} + +static void +evas_object_polygon_render_post(Evas_Object *obj) +{ + Evas_Object_Polygon *o; + + /* this moves the current data to the previous state parts of the object */ + /* in whatever way is safest for the object. also if we don't need object */ + /* data anymore we can free it if the object deems this is a good idea */ + o = (Evas_Object_Polygon *)(obj->object_data); + /* remove those pesky changes */ + evas_object_clip_changes_clean(obj); + /* move cur to prev safely for object data */ + obj->prev = obj->cur; + o->changed = 0; +} + +static unsigned int evas_object_polygon_id_get(Evas_Object *obj) +{ + Evas_Object_Polygon *o; + + o = (Evas_Object_Polygon *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_POLYGON; +} + +static unsigned int evas_object_polygon_visual_id_get(Evas_Object *obj) +{ + Evas_Object_Polygon *o; + + o = (Evas_Object_Polygon *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_SHAPE; +} + +static void *evas_object_polygon_engine_data_get(Evas_Object *obj) +{ + Evas_Object_Polygon *o; + + o = (Evas_Object_Polygon *)(obj->object_data); + if (!o) return NULL; + return o->engine_data; +} + +static int +evas_object_polygon_is_opaque(Evas_Object *obj __UNUSED__) +{ + /* this returns 1 if the internal object data implies that the object is */ + /* currently fully opaque over the entire line it occupies */ + return 0; +} + +static int +evas_object_polygon_was_opaque(Evas_Object *obj __UNUSED__) +{ + /* this returns 1 if the internal object data implies that the object was */ + /* previously fully opaque over the entire line it occupies */ + return 0; +} + +/* We count the number of edges a "ray" 90 degs upwards from our point + * intersects with. If it's even, we are outside of the polygon, if it's odd, + * we are inside of it. */ +static int +evas_object_polygon_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) +{ + Evas_Object_Polygon *o; + int num_edges = 0; /* Number of edges we crossed */ + Eina_List *itr; + Evas_Polygon_Point *p; + + o = (Evas_Object_Polygon *)(obj->object_data); + if (!o) return 0; + if (!o->points) return 0; + + /* Adjust X and Y according to current geometry */ + x -= o->offset.x; + y -= o->offset.y; + + if (eina_list_count(o->points) == 1) + { + p = eina_list_data_get(o->points); + return ((p->x == x) && (p->y == y)); + } + + EINA_LIST_FOREACH(o->points, itr, p) + { + Evas_Coord line_y; + Eina_List *next = eina_list_next(itr); + Evas_Polygon_Point *p_next; + /* Get the next, or if there's no next, take the first */ + if (next) + { + p_next = eina_list_data_get(next); + } + else + { + p_next = eina_list_data_get(o->points); + } + + /* Make sure that we are directly below the edge, + * and that p->x != p_next->x */ + if (((p->x < p_next->x) && (p->x <= x) && (x < p_next->x)) || + ((p->x > p_next->x) && (p_next->x < x) && (x <= p->x))) + { + line_y = ((double) (p->y - p_next->y) / + (double) (p->x - p_next->x)) * + (x - p_next->x) + p_next->y; + /* We crossed that edge if the line is directly above us */ + if (line_y < y) + num_edges++; + } + } + + /* Return true if num_edges is odd */ + return ((num_edges % 2) == 1); +} + +static int +evas_object_polygon_was_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__) +{ + /* this returns 1 if the canvas co-ordinates were inside the object based */ + /* on object private data. not much use for rects, but for polys, images */ + /* and other complex objects it might be */ + return 1; +} diff --git a/libraries/evas/src/lib/canvas/evas_object_rectangle.c b/libraries/evas/src/lib/canvas/evas_object_rectangle.c new file mode 100644 index 0000000..36678e7 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_rectangle.c @@ -0,0 +1,387 @@ +#include "evas_common.h" +#include "evas_private.h" + +/* private magic number for rectangle objects */ +static const char o_type[] = "rectangle"; + +const char *o_rect_type = o_type; + +/* private struct for rectangle object internal data */ +typedef struct _Evas_Object_Rectangle Evas_Object_Rectangle; + +struct _Evas_Object_Rectangle +{ + DATA32 magic; + void *engine_data; +}; + +/* private methods for rectangle objects */ +static void evas_object_rectangle_init(Evas_Object *obj); +static void *evas_object_rectangle_new(void); +static void evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); +static void evas_object_rectangle_free(Evas_Object *obj); +static void evas_object_rectangle_render_pre(Evas_Object *obj); +static void evas_object_rectangle_render_post(Evas_Object *obj); + +static unsigned int evas_object_rectangle_id_get(Evas_Object *obj); +static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *obj); +static void *evas_object_rectangle_engine_data_get(Evas_Object *obj); + +static int evas_object_rectangle_is_opaque(Evas_Object *obj); +static int evas_object_rectangle_was_opaque(Evas_Object *obj); + +#if 0 /* usless calls for a rect object. much more useful for images etc. */ +static void evas_object_rectangle_store(Evas_Object *obj); +static void evas_object_rectangle_unstore(Evas_Object *obj); +static int evas_object_rectangle_is_visible(Evas_Object *obj); +static int evas_object_rectangle_was_visible(Evas_Object *obj); +static int evas_object_rectangle_is_inside(Evas_Object *obj, double x, double y); +static int evas_object_rectangle_was_inside(Evas_Object *obj, double x, double y); +#endif + +static const Evas_Object_Func object_func = +{ + /* methods (compulsory) */ + evas_object_rectangle_free, + evas_object_rectangle_render, + evas_object_rectangle_render_pre, + evas_object_rectangle_render_post, + evas_object_rectangle_id_get, + evas_object_rectangle_visual_id_get, + evas_object_rectangle_engine_data_get, + /* these are optional. NULL = nothing */ + NULL, + NULL, + NULL, + NULL, + evas_object_rectangle_is_opaque, + evas_object_rectangle_was_opaque, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL +}; + +/* the actual api call to add a rect */ +/* it has no other api calls as all properties are standard */ + +EVAS_MEMPOOL(_mp_obj); + +EAPI Evas_Object * +evas_object_rectangle_add(Evas *e) +{ + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + obj = evas_object_new(e); + evas_object_rectangle_init(obj); + evas_object_inject(obj, e); + return obj; +} + +/* all nice and private */ +static void +evas_object_rectangle_init(Evas_Object *obj) +{ + /* alloc image ob, setup methods and default values */ + obj->object_data = evas_object_rectangle_new(); + /* set up default settings for this kind of object */ + obj->cur.color.r = 255; + obj->cur.color.g = 255; + obj->cur.color.b = 255; + obj->cur.color.a = 255; + obj->cur.geometry.x = 0; + obj->cur.geometry.y = 0; + obj->cur.geometry.w = 0; + obj->cur.geometry.h = 0; + obj->cur.layer = 0; + obj->cur.render_op = EVAS_RENDER_BLEND; + /* set up object-specific settings */ + obj->prev = obj->cur; + /* set up methods (compulsory) */ + obj->func = &object_func; + obj->type = o_type; +} + +static void * +evas_object_rectangle_new(void) +{ + Evas_Object_Rectangle *o; + + /* alloc obj private data */ + EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_rectangle", Evas_Object_Rectangle, 256, NULL); + o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Rectangle); + if (!o) return NULL; + EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Rectangle); + o->magic = MAGIC_OBJ_RECTANGLE; + return o; +} + +static void +evas_object_rectangle_free(Evas_Object *obj) +{ + Evas_Object_Rectangle *o; + + /* frees private object data. very simple here */ + o = (Evas_Object_Rectangle *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Rectangle, MAGIC_OBJ_RECTANGLE); + return; + MAGIC_CHECK_END(); + /* free obj */ + o->magic = 0; + EVAS_MEMPOOL_FREE(_mp_obj, o); +} + +static void +evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) +{ + /* render object to surface with context, and offxet by x,y */ + obj->layer->evas->engine.func->context_color_set(output, + context, + obj->cur.cache.clip.r, + obj->cur.cache.clip.g, + obj->cur.cache.clip.b, + obj->cur.cache.clip.a); + obj->layer->evas->engine.func->context_multiplier_unset(output, + context); + obj->layer->evas->engine.func->context_render_op_set(output, context, + obj->cur.render_op); + obj->layer->evas->engine.func->rectangle_draw(output, + context, + surface, + obj->cur.geometry.x + x, + obj->cur.geometry.y + y, + obj->cur.geometry.w, + obj->cur.geometry.h); +//// obj->cur.cache.geometry.x + x, +//// obj->cur.cache.geometry.y + y, +//// obj->cur.cache.geometry.w, +//// obj->cur.cache.geometry.h); +} + +static void +evas_object_rectangle_render_pre(Evas_Object *obj) +{ + int is_v, was_v; + + /* dont pre-render the obj twice! */ + if (obj->pre_render_done) return; + obj->pre_render_done = 1; + /* pre-render phase. this does anything an object needs to do just before */ + /* rendering. this could mean loading the image data, retrieving it from */ + /* elsewhere, decoding video etc. */ + /* then when this is done the object needs to figure if it changed and */ + /* if so what and where and add the appropriate redraw rectangles */ + /* if someone is clipping this obj - go calculate the clipper */ + if (obj->cur.clipper) + { + if (obj->cur.cache.clip.dirty) + evas_object_clip_recalc(obj->cur.clipper); + obj->cur.clipper->func->render_pre(obj->cur.clipper); + } + /* now figure what changed and add draw rects */ + /* if it just became visible or invisible */ + is_v = evas_object_is_visible(obj); + was_v = evas_object_was_visible(obj); + if (!(is_v | was_v)) goto done; + if (is_v != was_v) + { + evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); + goto done; + } + if ((obj->cur.map != obj->prev.map) || + (obj->cur.usemap != obj->prev.usemap)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* it's not visible - we accounted for it appearing or not so just abort */ + if (!is_v) goto done; + /* clipper changed this is in addition to anything else for obj */ + evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); + /* if we restacked (layer or just within a layer) and don't clip anyone */ + if ((obj->restack) && (!obj->clip.clipees)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed render op */ + if (obj->cur.render_op != obj->prev.render_op) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed color */ + if ((obj->cur.color.r != obj->prev.color.r) || + (obj->cur.color.g != obj->prev.color.g) || + (obj->cur.color.b != obj->prev.color.b) || + (obj->cur.color.a != obj->prev.color.a)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed geometry - and obviously not visibility or color */ + /* calculate differences since we have a constant color fill */ + /* we really only need to update the differences */ + if ((obj->cur.geometry.x != obj->prev.geometry.x) || + (obj->cur.geometry.y != obj->prev.geometry.y) || + (obj->cur.geometry.w != obj->prev.geometry.w) || + (obj->cur.geometry.h != obj->prev.geometry.h)) + { + evas_rects_return_difference_rects(&obj->layer->evas->clip_changes, + obj->cur.geometry.x, + obj->cur.geometry.y, + obj->cur.geometry.w, + obj->cur.geometry.h, + obj->prev.geometry.x, + obj->prev.geometry.y, + obj->prev.geometry.w, + obj->prev.geometry.h); +//// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x, +//// obj->cur.cache.geometry.y, +//// obj->cur.cache.geometry.w, +//// obj->cur.cache.geometry.h, +//// obj->prev.cache.geometry.x, +//// obj->prev.cache.geometry.y, +//// obj->prev.cache.geometry.w, +//// obj->prev.cache.geometry.h); + goto done; + } + /* it obviously didn't change - add a NO obscure - this "unupdates" this */ + /* area so if there were updates for it they get wiped. don't do it if we */ + /* arent fully opaque and we are visible */ + /* + if (evas_object_is_visible(obj) && + evas_object_is_opaque(obj) && + (!obj->clip.clipees)) + obj->layer->evas->engine.func->output_redraws_rect_del(obj->layer->evas->engine.data.output, + obj->cur.cache.clip.x, + obj->cur.cache.clip.y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); + */ + done: + evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); +} + +static void +evas_object_rectangle_render_post(Evas_Object *obj) +{ + + /* this moves the current data to the previous state parts of the object */ + /* in whatever way is safest for the object. also if we don't need object */ + /* data anymore we can free it if the object deems this is a good idea */ + /* remove those pesky changes */ + evas_object_clip_changes_clean(obj); + /* move cur to prev safely for object data */ + obj->prev = obj->cur; +} + +static int +evas_object_rectangle_is_opaque(Evas_Object *obj) +{ + /* this returns 1 if the internal object data implies that the object is */ + /* currently fully opaque over the entire rectangle it occupies */ + if ((obj->cur.map) && (obj->cur.usemap)) return 0; + if (obj->cur.render_op == EVAS_RENDER_COPY) + return 1; + if (obj->cur.render_op != EVAS_RENDER_BLEND) + return 0; + return 1; +} + +static int +evas_object_rectangle_was_opaque(Evas_Object *obj) +{ + /* this returns 1 if the internal object data implies that the object was */ + /* previously fully opaque over the entire rectangle it occupies */ + if (obj->prev.render_op == EVAS_RENDER_COPY) + return 1; + if (obj->prev.render_op != EVAS_RENDER_BLEND) + return 0; + return 1; +} + +static unsigned int evas_object_rectangle_id_get(Evas_Object *obj) +{ + Evas_Object_Rectangle *o; + + o = (Evas_Object_Rectangle *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_RECTANGLE; +} + +static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *obj) +{ + Evas_Object_Rectangle *o; + + o = (Evas_Object_Rectangle *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_SHAPE; +} + +static void *evas_object_rectangle_engine_data_get(Evas_Object *obj) +{ + Evas_Object_Rectangle *o; + + o = (Evas_Object_Rectangle *)(obj->object_data); + if (!o) return NULL; + return o->engine_data; +} + + +#if 0 /* usless calls for a rect object. much more useful for images etc. */ +static void +evas_object_rectangle_store(Evas_Object *obj) +{ + /* store... nothing for rectangle objects... it's a bit silly */ + /* but for others that may have expensive caluclations to do to */ + /* generate the object data, hint that they might want to be pre-calced */ + /* once and stored */ +} + +static void +evas_object_rectangle_unstore(Evas_Object *obj) +{ + /* store... nothing for rectangle objects... it's a bit silly */ +} + +static int +evas_object_rectangle_is_visible(Evas_Object *obj) +{ + /* this returns 1 if the internal object data would imply that it is */ + /* visible (ie drawing it draws something. this is not to do with events */ + return 1; +} + +static int +evas_object_rectangle_was_visible(Evas_Object *obj) +{ + /* this returns 1 if the internal object data would imply that it was */ + /* visible (ie drawing it draws something. this is not to do with events */ + return 1; +} + +static int +evas_object_rectangle_is_inside(Evas_Object *obj, double x, double y) +{ + /* this returns 1 if the canvas co-ordinates are inside the object based */ + /* on object private data. not much use for rects, but for polys, images */ + /* and other complex objects it might be */ + return 1; +} + +static int +evas_object_rectangle_was_inside(Evas_Object *obj, double x, double y) +{ + /* this returns 1 if the canvas co-ordinates were inside the object based */ + /* on object private data. not much use for rects, but for polys, images */ + /* and other complex objects it might be */ + return 1; +} +#endif diff --git a/libraries/evas/src/lib/canvas/evas_object_smart.c b/libraries/evas/src/lib/canvas/evas_object_smart.c new file mode 100644 index 0000000..a7dfcdf --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_smart.c @@ -0,0 +1,920 @@ +#include "evas_common.h" +#include "evas_private.h" + +typedef struct _Evas_Object_Smart Evas_Object_Smart; +typedef struct _Evas_Smart_Callback Evas_Smart_Callback; + +struct _Evas_Object_Smart +{ + DATA32 magic; + void *engine_data; + void *data; + Eina_List *callbacks; + Eina_Inlist *contained; + Evas_Smart_Cb_Description_Array callbacks_descriptions; + int walking_list; + Eina_Bool deletions_waiting : 1; + Eina_Bool need_recalculate : 1; +}; + +struct _Evas_Smart_Callback +{ + const char *event; + Evas_Smart_Cb func; + void *func_data; + Evas_Callback_Priority priority; + char delete_me : 1; +}; + +/* private methods for smart objects */ +static void evas_object_smart_callbacks_clear(Evas_Object *obj); +static void evas_object_smart_init(Evas_Object *obj); +static void *evas_object_smart_new(void); +static void evas_object_smart_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); +static void evas_object_smart_free(Evas_Object *obj); +static void evas_object_smart_render_pre(Evas_Object *obj); +static void evas_object_smart_render_post(Evas_Object *obj); + +static unsigned int evas_object_smart_id_get(Evas_Object *obj); +static unsigned int evas_object_smart_visual_id_get(Evas_Object *obj); +static void *evas_object_smart_engine_data_get(Evas_Object *obj); + +static const Evas_Object_Func object_func = +{ + /* methods (compulsory) */ + evas_object_smart_free, + evas_object_smart_render, + evas_object_smart_render_pre, + evas_object_smart_render_post, + evas_object_smart_id_get, + evas_object_smart_visual_id_get, + evas_object_smart_engine_data_get, + /* these are optional. NULL = nothing */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL +}; + +EVAS_MEMPOOL(_mp_obj); +EVAS_MEMPOOL(_mp_cb); + +/* public funcs */ +EAPI void +evas_object_smart_data_set(Evas_Object *obj, void *data) +{ + Evas_Object_Smart *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return; + MAGIC_CHECK_END(); + o->data = data; +} + +EAPI void * +evas_object_smart_data_get(const Evas_Object *obj) +{ + Evas_Object_Smart *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + if (!o) return NULL; + return o->data; +} + +EAPI Evas_Smart * +evas_object_smart_smart_get(const Evas_Object *obj) +{ + Evas_Object_Smart *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return NULL; + MAGIC_CHECK_END(); + return obj->smart.smart; +} + +EAPI void +evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj) +{ + Evas_Object_Smart *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + MAGIC_CHECK(smart_obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(smart_obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return; + MAGIC_CHECK_END(); + + if (obj->delete_me) + { + CRIT("Adding deleted object %p to smart obj %p", obj, smart_obj); + abort(); + return; + } + if (smart_obj->delete_me) + { + CRIT("Adding object %p to deleted smart obj %p", obj, smart_obj); + abort(); + return; + } + if (!smart_obj->layer) + { + CRIT("No evas surface associated with smart object (%p)", smart_obj); + abort(); + return; + } + if ((obj->layer && smart_obj->layer) && + (obj->layer->evas != smart_obj->layer->evas)) + { + CRIT("Adding object %p from Evas (%p) from another Evas (%p)", obj, obj->layer->evas, smart_obj->layer->evas); + abort(); + return; + } + + if (obj->smart.parent == smart_obj) return; + + if (obj->smart.parent) evas_object_smart_member_del(obj); + + evas_object_release(obj, 1); + obj->layer = smart_obj->layer; + obj->cur.layer = obj->layer->layer; + obj->layer->usage++; + obj->smart.parent = smart_obj; + o->contained = eina_inlist_append(o->contained, EINA_INLIST_GET(obj)); + evas_object_smart_member_cache_invalidate(obj, EINA_TRUE, EINA_TRUE); + obj->restack = 1; + evas_object_change(obj); + evas_object_mapped_clip_across_mark(obj); + if (smart_obj->smart.smart->smart_class->member_add) + smart_obj->smart.smart->smart_class->member_add(smart_obj, obj); +} + +EAPI void +evas_object_smart_member_del(Evas_Object *obj) +{ + Evas_Object_Smart *o; + Evas_Object *smart_obj; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + + if (!obj->smart.parent) return; + + smart_obj = obj->smart.parent; + if (smart_obj->smart.smart->smart_class->member_del) + smart_obj->smart.smart->smart_class->member_del(smart_obj, obj); + + o = (Evas_Object_Smart *)(obj->smart.parent->object_data); + o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(obj)); + obj->smart.parent = NULL; + evas_object_smart_member_cache_invalidate(obj, EINA_TRUE, EINA_TRUE); + obj->layer->usage--; + obj->cur.layer = obj->layer->layer; + evas_object_inject(obj, obj->layer->evas); + obj->restack = 1; + evas_object_change(obj); + evas_object_mapped_clip_across_mark(obj); +} + +EAPI Evas_Object * +evas_object_smart_parent_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + + return obj->smart.parent; +} + +EAPI Eina_Bool +evas_object_smart_type_check(const Evas_Object *obj, const char *type) +{ + const Evas_Smart_Class *sc; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + + if (!obj->smart.smart) + return EINA_FALSE; + sc = obj->smart.smart->smart_class; + while (sc) + { + if (!strcmp(sc->name, type)) + return EINA_TRUE; + sc = sc->parent; + } + + return EINA_FALSE; +} + +EAPI Eina_Bool +evas_object_smart_type_check_ptr(const Evas_Object *obj, const char *type) +{ + const Evas_Smart_Class *sc; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + + if (!obj->smart.smart) + return EINA_FALSE; + sc = obj->smart.smart->smart_class; + while (sc) + { + if (sc->name == type) + return EINA_TRUE; + sc = sc->parent; + } + + return EINA_FALSE; +} + +EAPI Eina_List * +evas_object_smart_members_get(const Evas_Object *obj) +{ + Evas_Object_Smart *o; + Eina_List *members; + Eina_Inlist *member; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return NULL; + MAGIC_CHECK_END(); + + members = NULL; + for (member = o->contained; member; member = member->next) + members = eina_list_append(members, member); + + return members; +} + +const Eina_Inlist * +evas_object_smart_members_get_direct(const Evas_Object *obj) +{ + Evas_Object_Smart *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return NULL; + MAGIC_CHECK_END(); + return o->contained; +} + +void +_evas_object_smart_members_all_del(Evas_Object *obj) +{ + Evas_Object_Smart *o = (Evas_Object_Smart *)(obj->object_data); + while (o->contained) + evas_object_del((Evas_Object *)(o->contained)); +} + +EAPI Evas_Object * +evas_object_smart_add(Evas *e, Evas_Smart *s) +{ + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); + return NULL; + MAGIC_CHECK_END(); + + obj = evas_object_new(e); + if (!obj) return NULL; + obj->smart.smart = s; + obj->type = s->smart_class->name; + evas_object_smart_init(obj); + evas_object_inject(obj, e); + + evas_object_smart_use(s); + + if (s->smart_class->add) s->smart_class->add(obj); + + return obj; +} + +static int +_callback_priority_cmp(const void *_a, const void *_b) +{ + const Evas_Smart_Callback *a, *b; + a = (const Evas_Smart_Callback *) _a; + b = (const Evas_Smart_Callback *) _b; + if (a->priority < b->priority) + return -1; + else + return 1; +} + +EAPI void +evas_object_smart_callback_add(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) +{ + evas_object_smart_callback_priority_add(obj, event, + EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); +} + +EAPI void +evas_object_smart_callback_priority_add(Evas_Object *obj, const char *event, Evas_Callback_Priority priority, Evas_Smart_Cb func, const void *data) +{ + Evas_Object_Smart *o; + Evas_Smart_Callback *cb; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return; + MAGIC_CHECK_END(); + if (!event) return; + if (!func) return; + EVAS_MEMPOOL_INIT(_mp_cb, "evas_smart_callback", Evas_Smart_Callback, 512, ); + cb = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Smart_Callback); + if (!cb) return; + EVAS_MEMPOOL_PREP(_mp_cb, cb, Evas_Smart_Callback); + cb->event = eina_stringshare_add(event); + cb->func = func; + cb->func_data = (void *)data; + cb->priority = priority; + o->callbacks = eina_list_sorted_insert(o->callbacks, _callback_priority_cmp, + cb); +} + +EAPI void * +evas_object_smart_callback_del(Evas_Object *obj, const char *event, Evas_Smart_Cb func) +{ + Evas_Object_Smart *o; + Eina_List *l; + Evas_Smart_Callback *cb; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return NULL; + MAGIC_CHECK_END(); + if (!event) return NULL; + EINA_LIST_FOREACH(o->callbacks, l, cb) + { + if ((!strcmp(cb->event, event)) && (cb->func == func)) + { + void *data; + + data = cb->func_data; + cb->delete_me = 1; + o->deletions_waiting = 1; + evas_object_smart_callbacks_clear(obj); + return data; + } + } + return NULL; +} + +EAPI void +evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event_info) +{ + Evas_Object_Smart *o; + Eina_List *l; + Evas_Smart_Callback *cb; + const char *strshare; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return; + MAGIC_CHECK_END(); + if (!event) return; + if (obj->delete_me) return; + o->walking_list++; + strshare = eina_stringshare_add(event); + EINA_LIST_FOREACH(o->callbacks, l, cb) + { + if (!cb->delete_me) + { + if (cb->event == strshare) + cb->func(cb->func_data, obj, event_info); + } + if (obj->delete_me) + break; + } + eina_stringshare_del(strshare); + o->walking_list--; + evas_object_smart_callbacks_clear(obj); +} + +EAPI Eina_Bool +evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions) +{ + const Evas_Smart_Cb_Description *d; + Evas_Object_Smart *o; + unsigned int i, count = 0; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return EINA_FALSE; + MAGIC_CHECK_END(); + + if ((!descriptions) || (!descriptions->name)) + { + evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0); + return EINA_TRUE; + } + + for (count = 0, d = descriptions; d->name; d++) + count++; + + evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, count); + if (count == 0) return EINA_TRUE; + + for (i = 0, d = descriptions; i < count; d++, i++) + o->callbacks_descriptions.array[i] = d; + + evas_smart_cb_descriptions_fix(&o->callbacks_descriptions); + + return EINA_TRUE; +} + +EAPI void +evas_object_smart_callbacks_descriptions_get(const Evas_Object *obj, const Evas_Smart_Cb_Description ***class_descriptions, unsigned int *class_count, const Evas_Smart_Cb_Description ***instance_descriptions, unsigned int *instance_count) +{ + Evas_Object_Smart *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (class_descriptions) *class_descriptions = NULL; + if (class_count) *class_count = 0; + if (instance_descriptions) *instance_descriptions = NULL; + if (instance_count) *instance_count = 0; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + if (class_descriptions) *class_descriptions = NULL; + if (class_count) *class_count = 0; + if (instance_descriptions) *instance_descriptions = NULL; + if (instance_count) *instance_count = 0; + return; + MAGIC_CHECK_END(); + + if (class_descriptions) + *class_descriptions = obj->smart.smart->callbacks.array; + if (class_count) + *class_count = obj->smart.smart->callbacks.size; + + if (instance_descriptions) + *instance_descriptions = o->callbacks_descriptions.array; + if (instance_count) + *instance_count = o->callbacks_descriptions.size; +} + +EAPI void +evas_object_smart_callback_description_find(const Evas_Object *obj, const char *name, const Evas_Smart_Cb_Description **class_description, const Evas_Smart_Cb_Description **instance_description) +{ + Evas_Object_Smart *o; + + if (!name) + { + if (class_description) *class_description = NULL; + if (instance_description) *instance_description = NULL; + return; + } + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (class_description) *class_description = NULL; + if (instance_description) *instance_description = NULL; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + if (class_description) *class_description = NULL; + if (instance_description) *instance_description = NULL; + return; + MAGIC_CHECK_END(); + + if (class_description) + *class_description = evas_smart_cb_description_find + (&obj->smart.smart->callbacks, name); + + if (instance_description) + *instance_description = evas_smart_cb_description_find + (&o->callbacks_descriptions, name); +} + +EAPI void +evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) +{ + Evas_Object_Smart *o; + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = obj->object_data; + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return; + MAGIC_CHECK_END(); + + // XXX: do i need this? + if (obj->delete_me) return; + + /* remove this entry from calc_list or processed list */ + if (eina_clist_element_is_linked(&obj->calc_entry)) + eina_clist_remove(&obj->calc_entry); + + value = !!value; + if (value) + eina_clist_add_tail(&obj->layer->evas->calc_list, &obj->calc_entry); + else + eina_clist_add_tail(&obj->layer->evas->calc_done, &obj->calc_entry); + + if (o->need_recalculate == value) return; + + if (obj->recalculate_cycle > 254) + { + ERR("Object %p is not stable during recalc loop", obj); + return; + } + if (obj->layer->evas->in_smart_calc) obj->recalculate_cycle++; + o->need_recalculate = value; +} + +EAPI Eina_Bool +evas_object_smart_need_recalculate_get(const Evas_Object *obj) +{ + Evas_Object_Smart *o; + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + o = obj->object_data; + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return EINA_FALSE; + MAGIC_CHECK_END(); + + return o->need_recalculate; +} + +EAPI void +evas_object_smart_calculate(Evas_Object *obj) +{ + Evas_Object_Smart *o; + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = obj->object_data; + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return; + MAGIC_CHECK_END(); + + if (!obj->smart.smart->smart_class->calculate) + return; + + o->need_recalculate = 0; + obj->smart.smart->smart_class->calculate(obj); +} + +EAPI void +evas_smart_objects_calculate(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + evas_call_smarts_calculate(e); +} + +EAPI int +evas_smart_objects_calculate_count_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + return e->smart_calc_count; +} + +/** + * Call calculate() on all smart objects that need_recalculate. + * + * @internal + */ +void +evas_call_smarts_calculate(Evas *e) +{ + Eina_Clist *elem; + Evas_Object *obj; + +// printf("+CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALC-----------v\n"); + evas_event_freeze(e); + e->in_smart_calc++; + + while (NULL != (elem = eina_clist_head(&e->calc_list))) + { + Evas_Object_Smart *o; + + /* move the item to the processed list */ + obj = EINA_CLIST_ENTRY(elem, Evas_Object, calc_entry); + eina_clist_remove(&obj->calc_entry); + if (obj->delete_me) continue; + eina_clist_add_tail(&e->calc_done, &obj->calc_entry); + + o = obj->object_data; + + if (o->need_recalculate) + { + o->need_recalculate = 0; + obj->smart.smart->smart_class->calculate(obj); + } + } + + while (NULL != (elem = eina_clist_head(&e->calc_done))) + { + obj = EINA_CLIST_ENTRY(elem, Evas_Object, calc_entry); + obj->recalculate_cycle = 0; + eina_clist_remove(&obj->calc_entry); + } + + e->in_smart_calc--; + if (e->in_smart_calc == 0) e->smart_calc_count++; + evas_event_thaw(e); + evas_event_thaw_eval(e); +} + +EAPI void +evas_object_smart_changed(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + evas_object_change(obj); + evas_object_smart_need_recalculate_set(obj, 1); +} + +/* internal calls */ +static void +evas_object_smart_callbacks_clear(Evas_Object *obj) +{ + Evas_Object_Smart *o; + Eina_List *l; + Evas_Smart_Callback *cb; + + o = (Evas_Object_Smart *)(obj->object_data); + + if (o->walking_list) return; + if (!o->deletions_waiting) return; + for (l = o->callbacks; l;) + { + cb = eina_list_data_get(l); + l = eina_list_next(l); + if (cb->delete_me) + { + o->callbacks = eina_list_remove(o->callbacks, cb); + if (cb->event) eina_stringshare_del(cb->event); + EVAS_MEMPOOL_FREE(_mp_cb, cb); + } + } +} + +void +evas_object_smart_del(Evas_Object *obj) +{ + Evas_Smart *s; + + if (obj->delete_me) return; + s = obj->smart.smart; + if ((s) && (s->smart_class->del)) s->smart_class->del(obj); + if (obj->smart.parent) evas_object_smart_member_del(obj); + if (s) evas_object_smart_unuse(s); +} + +void +evas_object_smart_cleanup(Evas_Object *obj) +{ + Evas_Object_Smart *o; + + if (obj->smart.parent) + evas_object_smart_member_del(obj); + + o = (Evas_Object_Smart *)(obj->object_data); + if (o->magic == MAGIC_OBJ_SMART) + { + if (obj->calc_entry.next) + eina_clist_remove(&obj->calc_entry); + + while (o->contained) + evas_object_smart_member_del((Evas_Object *)o->contained); + + while (o->callbacks) + { + Evas_Smart_Callback *cb = o->callbacks->data; + o->callbacks = eina_list_remove(o->callbacks, cb); + if (cb->event) eina_stringshare_del(cb->event); + EVAS_MEMPOOL_FREE(_mp_cb, cb); + } + + evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0); + o->data = NULL; + } + + obj->smart.parent = NULL; + obj->smart.smart = NULL; +} + +void +evas_object_smart_member_cache_invalidate(Evas_Object *obj, + Eina_Bool pass_events, + Eina_Bool freeze_events) +{ + Evas_Object_Smart *o; + Evas_Object *member; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + + if (pass_events) + obj->parent_cache.pass_events_valid = EINA_FALSE; + if (freeze_events) + obj->parent_cache.freeze_events_valid = EINA_FALSE; + + o = obj->object_data; + if (o->magic != MAGIC_OBJ_SMART) return; + + EINA_INLIST_FOREACH(o->contained, member) + evas_object_smart_member_cache_invalidate(member, + pass_events, + freeze_events); +} + +void +evas_object_smart_member_raise(Evas_Object *member) +{ + Evas_Object_Smart *o; + + o = (Evas_Object_Smart *)(member->smart.parent->object_data); + o->contained = eina_inlist_demote(o->contained, EINA_INLIST_GET(member)); +} + +void +evas_object_smart_member_lower(Evas_Object *member) +{ + Evas_Object_Smart *o; + + o = (Evas_Object_Smart *)(member->smart.parent->object_data); + o->contained = eina_inlist_promote(o->contained, EINA_INLIST_GET(member)); +} + +void +evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other) +{ + Evas_Object_Smart *o; + + o = (Evas_Object_Smart *)(member->smart.parent->object_data); + o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member)); + o->contained = eina_inlist_append_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other)); +} + +void +evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other) +{ + Evas_Object_Smart *o; + + o = (Evas_Object_Smart *)(member->smart.parent->object_data); + o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member)); + o->contained = eina_inlist_prepend_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other)); +} + +/* all nice and private */ +static void +evas_object_smart_init(Evas_Object *obj) +{ + /* alloc smart obj, setup methods and default values */ + obj->object_data = evas_object_smart_new(); + /* set up default settings for this kind of object */ + obj->cur.color.r = 255; + obj->cur.color.g = 255; + obj->cur.color.b = 255; + obj->cur.color.a = 255; + obj->cur.geometry.x = 0; + obj->cur.geometry.y = 0; + obj->cur.geometry.w = 0; + obj->cur.geometry.h = 0; + obj->cur.layer = 0; + /* set up object-specific settings */ + obj->prev = obj->cur; + /* set up methods (compulsory) */ + obj->func = &object_func; +} + +static void * +evas_object_smart_new(void) +{ + Evas_Object_Smart *o; + + /* alloc obj private data */ + EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_smart", Evas_Object_Smart, 256, NULL); + o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Smart); + if (!o) return NULL; + EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Smart); + o->magic = MAGIC_OBJ_SMART; + return o; +} + +static void +evas_object_smart_free(Evas_Object *obj) +{ + Evas_Object_Smart *o; + + /* frees private object data. very simple here */ + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return; + MAGIC_CHECK_END(); + /* free obj */ + o->magic = 0; + EVAS_MEMPOOL_FREE(_mp_obj, o); +} + +static void +evas_object_smart_render(Evas_Object *obj __UNUSED__, void *output __UNUSED__, void *context __UNUSED__, void *surface __UNUSED__, int x __UNUSED__, int y __UNUSED__) +{ + return; +} + +static void +evas_object_smart_render_pre(Evas_Object *obj) +{ + if (obj->pre_render_done) return; + if ((obj->cur.map != obj->prev.map) || + (obj->cur.usemap != obj->prev.usemap)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } +done: + obj->pre_render_done = 1; +} + +static void +evas_object_smart_render_post(Evas_Object *obj) +{ + obj->prev = obj->cur; +} + +static unsigned int evas_object_smart_id_get(Evas_Object *obj) +{ + Evas_Object_Smart *o; + + o = (Evas_Object_Smart *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_SMART; +} + +static unsigned int evas_object_smart_visual_id_get(Evas_Object *obj) +{ + Evas_Object_Smart *o; + + o = (Evas_Object_Smart *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_CONTAINER; +} + +static void *evas_object_smart_engine_data_get(Evas_Object *obj) +{ + Evas_Object_Smart *o; + + o = (Evas_Object_Smart *)(obj->object_data); + if (!o) return NULL; + return o->engine_data; +} diff --git a/libraries/evas/src/lib/canvas/evas_object_smart_clipped.c b/libraries/evas/src/lib/canvas/evas_object_smart_clipped.c new file mode 100644 index 0000000..9b9fa6d --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_smart_clipped.c @@ -0,0 +1,183 @@ +#include "evas_common.h" +#include "evas_private.h" + +#define CSO_DATA_GET_OR_RETURN(obj, ptr) \ + Evas_Object_Smart_Clipped_Data *ptr = evas_object_smart_data_get(obj); \ + if (!ptr) return; + +EAPI void +evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) +{ + const Eina_Inlist *lst; + Evas_Object *child; + + if ((dx == 0) && (dy == 0)) + return; + + lst = evas_object_smart_members_get_direct(obj); + EINA_INLIST_FOREACH(lst, child) + { + Evas_Coord orig_x, orig_y; + +// shortcut as we are in evas +// evas_object_geometry_get(child, &orig_x, &orig_y, NULL, NULL); + if (child->delete_me) continue; + if (child->is_static_clip) continue; + orig_x = child->cur.geometry.x; + orig_y = child->cur.geometry.y; + evas_object_move(child, orig_x + dx, orig_y + dy); + } +} + +EAPI Evas_Object * +evas_object_smart_clipped_clipper_get(Evas_Object *obj) +{ + Evas_Object_Smart_Clipped_Data *cso = evas_object_smart_data_get(obj); + if (!cso) + return NULL; + + return cso->clipper; +} + +static void +evas_object_smart_clipped_smart_add(Evas_Object *obj) +{ + Evas_Object_Smart_Clipped_Data *cso; + Evas_Object *clipper; + + cso = evas_object_smart_data_get(obj); + if (!cso) + cso = calloc(1, sizeof(*cso)); /* users can provide it or realloc() later */ + + cso->evas = evas_object_evas_get(obj); + clipper = evas_object_rectangle_add(cso->evas); + evas_object_static_clip_set(clipper, 1); + cso->clipper = NULL; + evas_object_smart_member_add(clipper, obj); + cso->clipper = clipper; + evas_object_color_set(cso->clipper, 255, 255, 255, 255); + evas_object_move(cso->clipper, -100000, -100000); + evas_object_resize(cso->clipper, 200000, 200000); + evas_object_pass_events_set(cso->clipper, 1); + evas_object_hide(cso->clipper); /* show when have something clipped to it */ + + evas_object_smart_data_set(obj, cso); +} + +static void +evas_object_smart_clipped_smart_del(Evas_Object *obj) +{ + CSO_DATA_GET_OR_RETURN(obj, cso); + + if (cso->clipper) + { + Evas_Object *clipper = cso->clipper; + cso->clipper = NULL; + evas_object_del(clipper); + } + + _evas_object_smart_members_all_del(obj); + + free(cso); + evas_object_smart_data_set(obj, NULL); +} + +static void +evas_object_smart_clipped_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) +{ + Evas_Coord orig_x, orig_y; + + evas_object_geometry_get(obj, &orig_x, &orig_y, NULL, NULL); + evas_object_smart_move_children_relative(obj, x - orig_x, y - orig_y); +} + +static void +evas_object_smart_clipped_smart_show(Evas_Object *obj) +{ + CSO_DATA_GET_OR_RETURN(obj, cso); + if (evas_object_clipees_get(cso->clipper)) + evas_object_show(cso->clipper); /* just show if clipper being used */ +} + +static void +evas_object_smart_clipped_smart_hide(Evas_Object *obj) +{ + CSO_DATA_GET_OR_RETURN(obj, cso); + evas_object_hide(cso->clipper); +} + +static void +evas_object_smart_clipped_smart_color_set(Evas_Object *obj, int r, int g, int b, int a) +{ + CSO_DATA_GET_OR_RETURN(obj, cso); + evas_object_color_set(cso->clipper, r, g, b, a); +} + +static void +evas_object_smart_clipped_smart_clip_set(Evas_Object *obj, Evas_Object *clip) +{ + CSO_DATA_GET_OR_RETURN(obj, cso); + evas_object_clip_set(cso->clipper, clip); +} + +static void +evas_object_smart_clipped_smart_clip_unset(Evas_Object *obj) +{ + CSO_DATA_GET_OR_RETURN(obj, cso); + evas_object_clip_unset(cso->clipper); +} + +static void +evas_object_smart_clipped_smart_member_add(Evas_Object *obj, Evas_Object *member) +{ + CSO_DATA_GET_OR_RETURN(obj, cso); + if (!cso->clipper) + return; + evas_object_clip_set(member, cso->clipper); + if (evas_object_visible_get(obj)) + evas_object_show(cso->clipper); +} + +static void +evas_object_smart_clipped_smart_member_del(Evas_Object *obj, Evas_Object *member) +{ + CSO_DATA_GET_OR_RETURN(obj, cso); + if (!cso->clipper) + return; + evas_object_clip_unset(member); + if (!evas_object_clipees_get(cso->clipper)) + evas_object_hide(cso->clipper); +} + +EAPI void +evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc) +{ + if (!sc) + return; + + sc->add = evas_object_smart_clipped_smart_add; + sc->del = evas_object_smart_clipped_smart_del; + sc->move = evas_object_smart_clipped_smart_move; + sc->show = evas_object_smart_clipped_smart_show; + sc->hide = evas_object_smart_clipped_smart_hide; + sc->color_set = evas_object_smart_clipped_smart_color_set; + sc->clip_set = evas_object_smart_clipped_smart_clip_set; + sc->clip_unset = evas_object_smart_clipped_smart_clip_unset; + sc->calculate = NULL; + sc->member_add = evas_object_smart_clipped_smart_member_add; + sc->member_del = evas_object_smart_clipped_smart_member_del; +} + +EAPI const Evas_Smart_Class * +evas_object_smart_clipped_class_get(void) +{ + static Evas_Smart_Class _sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("EvasObjectSmartClipped"); + static const Evas_Smart_Class *class = NULL; + + if (class) + return class; + + evas_object_smart_clipped_smart_set(&_sc); + class = &_sc; + return class; +} diff --git a/libraries/evas/src/lib/canvas/evas_object_table.c b/libraries/evas/src/lib/canvas/evas_object_table.c new file mode 100644 index 0000000..6e28fce --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_table.c @@ -0,0 +1,1373 @@ +#include +#include "evas_common.h" + +typedef struct _Evas_Object_Table_Data Evas_Object_Table_Data; +typedef struct _Evas_Object_Table_Option Evas_Object_Table_Option; +typedef struct _Evas_Object_Table_Cache Evas_Object_Table_Cache; +typedef struct _Evas_Object_Table_Iterator Evas_Object_Table_Iterator; +typedef struct _Evas_Object_Table_Accessor Evas_Object_Table_Accessor; + +struct _Evas_Object_Table_Option +{ + Evas_Object *obj; + unsigned short col, row, colspan, rowspan, end_col, end_row; + struct { + Evas_Coord w, h; + } min, max; + struct { + double h, v; + } align; + struct { + Evas_Coord l, r, t, b; + } pad; + Eina_Bool expand_h : 1; /* XXX required? */ + Eina_Bool expand_v : 1; /* XXX required? */ + Eina_Bool fill_h : 1; + Eina_Bool fill_v : 1; +}; + +struct _Evas_Object_Table_Cache +{ + struct { + struct { + double h, v; + } weights; + struct { + int h, v; + } expands; + struct { + Evas_Coord w, h; + } min; + } total; + struct { + double *h, *v; + } weights; + struct { + Evas_Coord *h, *v; + } sizes; + struct { + Eina_Bool *h, *v; + } expands; + double ___pad; // padding to make sure doubles at end can be aligned +}; + +struct _Evas_Object_Table_Data +{ + Evas_Object_Smart_Clipped_Data base; + Eina_List *children; + struct { + Evas_Coord h, v; + } pad; + struct { + double h, v; + } align; + struct { + int cols, rows; + } size; + Evas_Object_Table_Cache *cache; + Evas_Object_Table_Homogeneous_Mode homogeneous; + Eina_Bool hints_changed : 1; + Eina_Bool expand_h : 1; + Eina_Bool expand_v : 1; + Eina_Bool is_mirrored : 1; +}; + +struct _Evas_Object_Table_Iterator +{ + Eina_Iterator iterator; + + Eina_Iterator *real_iterator; + const Evas_Object *table; +}; + +struct _Evas_Object_Table_Accessor +{ + Eina_Accessor accessor; + + Eina_Accessor *real_accessor; + const Evas_Object *table; +}; + +#define EVAS_OBJECT_TABLE_DATA_GET(o, ptr) \ + Evas_Object_Table_Data *ptr = evas_object_smart_data_get(o) + +#define EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, ptr) \ + EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \ + if (!ptr) \ + { \ + CRIT("no widget data for object %p (%s)", \ + o, evas_object_type_get(o)); \ + abort(); \ + return; \ +} + +#define EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ + EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \ + if (!ptr) \ + { \ + CRIT("No widget data for object %p (%s)", \ + o, evas_object_type_get(o)); \ + abort(); \ + return val; \ + } + +static const char EVAS_OBJECT_TABLE_OPTION_KEY[] = "|EvTb"; + +static Eina_Bool +_evas_object_table_iterator_next(Evas_Object_Table_Iterator *it, void **data) +{ + Evas_Object_Table_Option *opt; + + if (!eina_iterator_next(it->real_iterator, (void **)&opt)) + return EINA_FALSE; + if (data) *data = opt->obj; + return EINA_TRUE; +} + +static Evas_Object * +_evas_object_table_iterator_get_container(Evas_Object_Table_Iterator *it) +{ + return (Evas_Object *)it->table; +} + +static void +_evas_object_table_iterator_free(Evas_Object_Table_Iterator *it) +{ + eina_iterator_free(it->real_iterator); + free(it); +} + +static Eina_Bool +_evas_object_table_accessor_get_at(Evas_Object_Table_Accessor *it, unsigned int idx, void **data) +{ + Evas_Object_Table_Option *opt = NULL; + + if (!eina_accessor_data_get(it->real_accessor, idx, (void **)&opt)) + return EINA_FALSE; + if (data) *data = opt->obj; + return EINA_TRUE; +} + +static Evas_Object * +_evas_object_table_accessor_get_container(Evas_Object_Table_Accessor *it) +{ + return (Evas_Object *)it->table; +} + +static void +_evas_object_table_accessor_free(Evas_Object_Table_Accessor *it) +{ + eina_accessor_free(it->real_accessor); + free(it); +} + +static Evas_Object_Table_Cache * +_evas_object_table_cache_alloc(int cols, int rows) +{ + Evas_Object_Table_Cache *cache; + int size; + + size = sizeof(Evas_Object_Table_Cache) + + ((cols + rows) * + (sizeof(double) + sizeof(Evas_Coord) + sizeof(Eina_Bool))); + cache = malloc(size); + if (!cache) + { + ERR("Could not allocate table cache %dx%d (%d bytes): %s", + cols, rows, size, strerror(errno)); + return NULL; + } + + cache->weights.h = (double *)(cache + 1); + cache->weights.v = (double *)(cache->weights.h + cols); + cache->sizes.h = (Evas_Coord *)(cache->weights.v + rows); + cache->sizes.v = (Evas_Coord *)(cache->sizes.h + cols); + cache->expands.h = (Eina_Bool *)(cache->sizes.v + rows); + cache->expands.v = (Eina_Bool *)(cache->expands.h + cols); + + return cache; +} + +static void +_evas_object_table_cache_free(Evas_Object_Table_Cache *cache) +{ + free(cache); +} + +static void +_evas_object_table_cache_reset(Evas_Object_Table_Data *priv) +{ + Evas_Object_Table_Cache *c = priv->cache; + int size; + + c->total.expands.v = 0; + c->total.expands.h = 0; + c->total.min.w = 0; + c->total.min.h = 0; + + size = ((priv->size.rows + priv->size.cols) * + (sizeof(double) + sizeof(Evas_Coord) + sizeof(Eina_Bool))); + memset(c + 1, 0, size); +} + +static void +_evas_object_table_cache_invalidate(Evas_Object_Table_Data *priv) +{ + priv->hints_changed = 1; + if (priv->cache) + { + _evas_object_table_cache_free(priv->cache); + priv->cache = NULL; + } +} + +static Evas_Object_Table_Option * +_evas_object_table_option_get(Evas_Object *o) +{ + return evas_object_data_get(o, EVAS_OBJECT_TABLE_OPTION_KEY); +} + +static void +_evas_object_table_option_set(Evas_Object *o, const Evas_Object_Table_Option *opt) +{ + evas_object_data_set(o, EVAS_OBJECT_TABLE_OPTION_KEY, opt); +} + +static Evas_Object_Table_Option * +_evas_object_table_option_del(Evas_Object *o) +{ + return evas_object_data_del(o, EVAS_OBJECT_TABLE_OPTION_KEY); +} + +static void +_on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *child, void *einfo __UNUSED__) +{ + Evas_Object *table = data; + evas_object_table_unpack(table, child); +} + +static void +_on_child_hints_changed(void *data, Evas *evas __UNUSED__, Evas_Object *child __UNUSED__, void *einfo __UNUSED__) +{ + Evas_Object *table = data; + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(table, priv); + _evas_object_table_cache_invalidate(priv); + evas_object_smart_changed(table); +} + +static void +_evas_object_table_child_connect(Evas_Object *o, Evas_Object *child) +{ + evas_object_event_callback_add + (child, EVAS_CALLBACK_DEL, _on_child_del, o); + evas_object_event_callback_add + (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o); +} + +static void +_evas_object_table_child_disconnect(Evas_Object *o, Evas_Object *child) +{ + evas_object_event_callback_del_full + (child, EVAS_CALLBACK_DEL, _on_child_del, o); + evas_object_event_callback_del_full + (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o); +} + +static void +_evas_object_table_calculate_cell(const Evas_Object_Table_Option *opt, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +{ + Evas_Coord cw, ch; + + *w -= opt->pad.l + opt->pad.r; + if (*w < opt->min.w) + cw = opt->min.w; + else if ((opt->max.w > -1) && (*w > opt->max.w)) + cw = opt->max.w; + else if (opt->fill_h) + cw = *w; + else + cw = opt->min.w; + + *h -= opt->pad.t + opt->pad.b; + if (*h < opt->min.h) + ch = opt->min.h; + else if ((opt->max.h > -1) && (*h > opt->max.h)) + ch = opt->max.h; + else if (opt->fill_v) + ch = *h; + else + ch = opt->min.h; + + *x += opt->pad.l; + if (cw != *w) + { + *x += (*w - cw) * opt->align.h; + *w = cw; + } + + *y += opt->pad.t; + if (ch != *h) + { + *y += (*h - ch) * opt->align.v; + *h = ch; + } +} + +static void +_evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv) +{ + Eina_List *l; + Evas_Object_Table_Option *opt; + Evas_Coord minw, minh, o_minw, o_minh; + Eina_Bool expand_h, expand_v; + + o_minw = 0; + o_minh = 0; + minw = 0; + minh = 0; + expand_h = 0; + expand_v = 0; + + EINA_LIST_FOREACH(priv->children, l, opt) + { + Evas_Object *child = opt->obj; + Evas_Coord child_minw, child_minh, cell_minw, cell_minh; + double weightw, weighth; + + evas_object_size_hint_min_get(child, &opt->min.w, &opt->min.h); + evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h); + evas_object_size_hint_padding_get + (child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b); + evas_object_size_hint_align_get(child, &opt->align.h, &opt->align.v); + evas_object_size_hint_weight_get(child, &weightw, &weighth); + + child_minw = opt->min.w + opt->pad.l + opt->pad.r; + child_minh = opt->min.h + opt->pad.t + opt->pad.b; + + cell_minw = (child_minw + opt->colspan - 1) / opt->colspan; + cell_minh = (child_minh + opt->rowspan - 1) / opt->rowspan; + + opt->expand_h = 0; + if ((weightw > 0.0) && + ((opt->max.w < 0) || + ((opt->max.w > -1) && (opt->min.w < opt->max.w)))) + { + opt->expand_h = 1; + expand_h = 1; + } + + opt->expand_v = 0; + if ((weighth > 0.0) && + ((opt->max.h < 0) || + ((opt->max.h > -1) && (opt->min.h < opt->max.h)))) + { + opt->expand_v = 1; + expand_v = 1; + } + + opt->fill_h = 0; + if (opt->align.h < 0.0) + { + opt->align.h = 0.5; + opt->fill_h = 1; + } + opt->fill_v = 0; + if (opt->align.v < 0.0) + { + opt->align.v = 0.5; + opt->fill_v = 1; + } + + /* greatest mininum values, with paddings */ + if (minw < cell_minw) + minw = cell_minw; + if (minh < cell_minh) + minh = cell_minh; + /* greatest mininum values, without paddings */ + if (o_minw < opt->min.w) + o_minw = opt->min.w; + if (o_minh < opt->min.h) + o_minh = opt->min.h; + } + + if (priv->homogeneous == EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM) + { + if (o_minw < 1) + { + ERR("homogeneous table based on item size but no " + "horizontal mininum size specified! Using expand."); + expand_h = 1; + } + if (o_minh < 1) + { + ERR("homogeneous table based on item size but no " + "vertical mininum size specified! Using expand."); + expand_v = 1; + } + } + + minw = priv->size.cols * (minw + priv->pad.h) - priv->pad.h; + minh = priv->size.rows * (minh + priv->pad.v) - priv->pad.v; + + priv->hints_changed = 0; + priv->expand_h = expand_h; + priv->expand_v = expand_v; + + if ((minw > 0 ) || (minh > 0)) + evas_object_size_hint_min_set(o, minw, minh); + + // XXX hint max? +} + +static void +_evas_object_table_calculate_layout_homogeneous_sizes_item(const Evas_Object *o, const Evas_Object_Table_Data *priv, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +{ + Evas_Coord minw, minh; + Eina_Bool expand_h, expand_v; + + evas_object_size_hint_min_get(o, &minw, &minh); + expand_h = priv->expand_h; + expand_v = priv->expand_v; + + if (*w < minw) + expand_h = 0; + if (!expand_h) + { + *x += (*w - minw) * priv->align.h; + *w = minw; + } + + if (*h < minh) + expand_v = 0; + if (!expand_v) + { + *y += (*h - minh) * priv->align.v; + *h = minh; + } +} + +static void +_evas_object_table_calculate_layout_homogeneous_sizes(const Evas_Object *o, const Evas_Object_Table_Data *priv, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h, Evas_Coord *cellw, Evas_Coord *cellh) +{ + evas_object_geometry_get(o, x, y, w, h); + if (priv->homogeneous == EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM) + _evas_object_table_calculate_layout_homogeneous_sizes_item + (o, priv, x, y, w, h); + + *cellw = (*w + priv->size.cols - 1) / priv->size.cols; + *cellh = (*h + priv->size.rows - 1) / priv->size.rows; +} + +static void +_evas_object_table_calculate_layout_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv) +{ + Evas_Coord x = 0, y = 0, w = 0, h = 0, ww, hh, cellw = 0, cellh = 0; + Eina_List *l; + Evas_Object_Table_Option *opt; + + _evas_object_table_calculate_layout_homogeneous_sizes + (o, priv, &x, &y, &w, &h, &cellw, &cellh); + + ww = w - ((priv->size.cols - 1) * priv->pad.h); + hh = h - ((priv->size.rows - 1) * priv->pad.v); + + if (ww < 0) ww = 0; + if (ww < 0) ww = 0; + + EINA_LIST_FOREACH(priv->children, l, opt) + { + Evas_Object *child = opt->obj; + Evas_Coord cx, cy, cw, ch, cox, coy, cow, coh; + + cx = x + ((opt->col * ww) / priv->size.cols); + cw = x + (((opt->col + opt->colspan) * ww) / priv->size.cols) - cx; + cy = y + ((opt->row * hh) / priv->size.rows); + ch = y + (((opt->row + opt->rowspan) * hh) / priv->size.rows) - cy; + + cx += (opt->col) * priv->pad.h; + cy += (opt->row) * priv->pad.v; + + cox = cx; + coy = cy; + cow = cw; + coh = ch; + + _evas_object_table_calculate_cell(opt, &cx, &cy, &cw, &ch); + if (cw > cow) + { + cx = cox; + cw = cow; + } + if (ch > coh) + { + cy = coy; + ch = coh; + } + + if (priv->is_mirrored) + { + evas_object_move(opt->obj, x + w - (cx - x + cw), cy); + } + else + { + evas_object_move(child, cx, cy); + } + evas_object_resize(child, cw, ch); + } +} + +static void +_evas_object_table_smart_calculate_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv) +{ + if (priv->hints_changed) + _evas_object_table_calculate_hints_homogeneous(o, priv); + _evas_object_table_calculate_layout_homogeneous(o, priv); +} + +static int +_evas_object_table_count_expands(const Eina_Bool *expands, int start, int end) +{ + const Eina_Bool *itr = expands + start, *itr_end = expands + end; + int count = 0; + + for (; itr < itr_end; itr++) + { + if (*itr) + count++; + } + + return count; +} + +static Evas_Coord +_evas_object_table_sum_sizes(const Evas_Coord *sizes, int start, int end) +{ + const Evas_Coord *itr = sizes + start, *itr_end = sizes + end; + Evas_Coord sum = 0; + + for (; itr < itr_end; itr++) + sum += *itr; + + return sum; +} + +static void +_evas_object_table_sizes_calc_noexpand(Evas_Coord *sizes, int start, int end, Evas_Coord space) +{ + Evas_Coord *itr = sizes + start, *itr_end = sizes + end - 1; + Evas_Coord step; + int units; + + /* XXX move to fixed point math and spread errors among cells */ + units = end - start; + step = space / units; + for (; itr < itr_end; itr++) + *itr += step; + + *itr += space - step * (units - 1); +} + +static void +_evas_object_table_sizes_calc_expand(Evas_Coord *sizes, int start, int end, Evas_Coord space, const Eina_Bool *expands, int expand_count, double *weights, double weighttot) +{ + Evas_Coord *itr = sizes + start, *itr_end = sizes + end; + const Eina_Bool *itr_expand = expands + start; + Evas_Coord step = 0, last_space = 0; + int total = 0, i = start; + + /* XXX move to fixed point math and spread errors among cells */ + if (weighttot > 0.0) + { + step = space / expand_count; + last_space = space - step * (expand_count - 1); + } + + for (; itr < itr_end; itr++, itr_expand++, i++) + { + if (weighttot <= 0.0) + { + if (*itr_expand) + { + expand_count--; + if (expand_count > 0) + *itr += step; + else + { + *itr += last_space; + break; + } + } + } + else + { + if (*itr_expand) + { + expand_count--; + if (expand_count > 0) + { + step = (weights[i] / weighttot) * space; + *itr += step; + total += step; + } + else + { + *itr += space - total; + break; + } + } + } + } +} + +static void +_evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Data *priv) +{ + Evas_Object_Table_Option *opt; + Evas_Object_Table_Cache *c; + Eina_List *l; + double totweightw = 0.0, totweighth = 0.0; + int i; + + if (!priv->cache) + { + priv->cache = _evas_object_table_cache_alloc + (priv->size.cols, priv->size.rows); + if (!priv->cache) + return; + } + c = priv->cache; + _evas_object_table_cache_reset(priv); + + /* cache interesting data */ + memset(c->expands.h, 1, priv->size.cols); + memset(c->expands.v, 1, priv->size.rows); + memset(c->weights.h, 0, priv->size.cols); + memset(c->weights.v, 0, priv->size.rows); + EINA_LIST_FOREACH(priv->children, l, opt) + { + Evas_Object *child = opt->obj; + double weightw, weighth; + + evas_object_size_hint_min_get(child, &opt->min.w, &opt->min.h); + evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h); + evas_object_size_hint_padding_get + (child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b); + evas_object_size_hint_align_get(child, &opt->align.h, &opt->align.v); + evas_object_size_hint_weight_get(child, &weightw, &weighth); + + opt->expand_h = 0; + if ((weightw > 0.0) && + ((opt->max.w < 0) || + ((opt->max.w > -1) && (opt->min.w < opt->max.w)))) + opt->expand_h = 1; + + opt->expand_v = 0; + if ((weighth > 0.0) && + ((opt->max.h < 0) || + ((opt->max.h > -1) && (opt->min.h < opt->max.h)))) + opt->expand_v = 1; + + opt->fill_h = 0; + if (opt->align.h < 0.0) + { + opt->align.h = 0.5; + opt->fill_h = 1; + } + opt->fill_v = 0; + if (opt->align.v < 0.0) + { + opt->align.v = 0.5; + opt->fill_v = 1; + } + + if (!opt->expand_h) + memset(c->expands.h + opt->col, 0, opt->colspan); + else + { + for (i = opt->col; i < opt->col + opt->colspan; i++) + c->weights.h[i] += (weightw / (double)opt->colspan); + } + if (!opt->expand_v) + memset(c->expands.v + opt->row, 0, opt->rowspan); + else + { + for (i = opt->row; i < opt->row + opt->rowspan; i++) + c->weights.v[i] += (weighth / (double)opt->rowspan); + } + } + for (i = 0; i < priv->size.cols; i++) totweightw += c->weights.h[i]; + for (i = 0; i < priv->size.rows; i++) totweighth += c->weights.v[i]; + + /* calculate sizes for each row and column */ + EINA_LIST_FOREACH(priv->children, l, opt) + { + Evas_Coord tot, need; + + /* handle horizontal */ + tot = _evas_object_table_sum_sizes(c->sizes.h, opt->col, opt->end_col); + need = opt->min.w + opt->pad.l + opt->pad.r; + if (tot < need) + { + Evas_Coord space = need - tot; + int count; + + count = _evas_object_table_count_expands + (c->expands.h, opt->col, opt->end_col); + + if (count > 0) + _evas_object_table_sizes_calc_expand + (c->sizes.h, opt->col, opt->end_col, space, + c->expands.h, count, c->weights.h, totweightw); + else + _evas_object_table_sizes_calc_noexpand + (c->sizes.h, opt->col, opt->end_col, space); + } + + /* handle vertical */ + tot = _evas_object_table_sum_sizes(c->sizes.v, opt->row, opt->end_row); + need = opt->min.h + opt->pad.t + opt->pad.b; + if (tot < opt->min.h) + { + Evas_Coord space = need - tot; + int count; + + count = _evas_object_table_count_expands + (c->expands.v, opt->row, opt->end_row); + + if (count > 0) + _evas_object_table_sizes_calc_expand + (c->sizes.v, opt->row, opt->end_row, space, + c->expands.v, count, c->weights.v, totweighth); + else + _evas_object_table_sizes_calc_noexpand + (c->sizes.v, opt->row, opt->end_row, space); + } + } + + c->total.weights.h = totweightw; + c->total.weights.v = totweighth; + + c->total.expands.h = _evas_object_table_count_expands + (c->expands.h, 0, priv->size.cols); + c->total.expands.v = _evas_object_table_count_expands + (c->expands.v, 0, priv->size.rows); + + c->total.min.w = _evas_object_table_sum_sizes + (c->sizes.h, 0, priv->size.cols); + c->total.min.h = _evas_object_table_sum_sizes + (c->sizes.v, 0, priv->size.rows); + + c->total.min.w += priv->pad.h * (priv->size.cols - 1); + c->total.min.h += priv->pad.v * (priv->size.rows - 1); + + if ((c->total.min.w > 0) || (c->total.min.h > 0)) + evas_object_size_hint_min_set(o, c->total.min.w, c->total.min.h); + + // XXX hint max? +} + +static void +_evas_object_table_calculate_layout_regular(Evas_Object *o, Evas_Object_Table_Data *priv) +{ + Evas_Object_Table_Option *opt; + Evas_Object_Table_Cache *c; + Eina_List *l; + Evas_Coord *cols = NULL, *rows = NULL; + Evas_Coord x, y, w, h; + + evas_object_geometry_get(o, &x, &y, &w, &h); + c = priv->cache; + + /* handle horizontal */ + if ((c->total.expands.h <= 0) || (c->total.min.w >= w)) + { + x += (w - c->total.min.w) * priv->align.h; + w = c->total.min.w; + cols = c->sizes.h; + } + else + { + int size = priv->size.cols * sizeof(Evas_Coord); + cols = malloc(size); + if (!cols) + { + ERR("Could not allocate temp columns (%d bytes): %s", + size, strerror(errno)); + goto end; + } + memcpy(cols, c->sizes.h, size); + _evas_object_table_sizes_calc_expand + (cols, 0, priv->size.cols, w - c->total.min.w, + c->expands.h, c->total.expands.h, c->weights.h, c->total.weights.h); + } + + /* handle vertical */ + if ((c->total.expands.v <= 0) || (c->total.min.h >= h)) + { + y += (h - c->total.min.h) * priv->align.v; + h = c->total.min.h; + rows = c->sizes.v; + } + else + { + int size = priv->size.rows * sizeof(Evas_Coord); + rows = malloc(size); + if (!rows) + { + ERR("could not allocate temp rows (%d bytes): %s", + size, strerror(errno)); + goto end; + } + memcpy(rows, c->sizes.v, size); + _evas_object_table_sizes_calc_expand + (rows, 0, priv->size.rows, h - c->total.min.h, + c->expands.v, c->total.expands.v, c->weights.v, c->total.weights.v); + } + + EINA_LIST_FOREACH(priv->children, l, opt) + { + Evas_Object *child = opt->obj; + Evas_Coord cx, cy, cw, ch; + + cx = x + opt->col * (priv->pad.h); + cx += _evas_object_table_sum_sizes(cols, 0, opt->col); + cw = _evas_object_table_sum_sizes(cols, opt->col, opt->end_col); + + cy = y + opt->row * (priv->pad.v); + cy += _evas_object_table_sum_sizes(rows, 0, opt->row); + ch = _evas_object_table_sum_sizes(rows, opt->row, opt->end_row); + + _evas_object_table_calculate_cell(opt, &cx, &cy, &cw, &ch); + + if (priv->is_mirrored) + { + evas_object_move(opt->obj, x + w - (cx - x + cw), cy); + } + else + { + evas_object_move(child, cx, cy); + } + evas_object_resize(child, cw, ch); + } + + end: + if (cols != c->sizes.h) + { + if (cols) free(cols); + } + if (rows != c->sizes.v) + { + if (rows) free(rows); + } +} + +static void +_evas_object_table_smart_calculate_regular(Evas_Object *o, Evas_Object_Table_Data *priv) +{ + if (priv->hints_changed) + _evas_object_table_calculate_hints_regular(o, priv); + _evas_object_table_calculate_layout_regular(o, priv); +} + +EVAS_SMART_SUBCLASS_NEW("Evas_Object_Table", _evas_object_table, + Evas_Smart_Class, Evas_Smart_Class, + evas_object_smart_clipped_class_get, NULL) + +static void +_evas_object_table_smart_add(Evas_Object *o) +{ + EVAS_SMART_DATA_ALLOC(o, Evas_Object_Table_Data) + + priv->pad.h = 0; + priv->pad.v = 0; + priv->align.h = 0.5; + priv->align.v = 0.5; + priv->size.cols = 0; + priv->size.rows = 0; + priv->cache = NULL; + priv->homogeneous = EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE; + priv->hints_changed = 1; + priv->expand_h = 0; + priv->expand_v = 0; + + _evas_object_table_parent_sc->add(o); +} + +static void +_evas_object_table_smart_del(Evas_Object *o) +{ + EVAS_OBJECT_TABLE_DATA_GET(o, priv); + Eina_List *l; + + l = priv->children; + while (l) + { + Evas_Object_Table_Option *opt = l->data; + _evas_object_table_child_disconnect(o, opt->obj); + _evas_object_table_option_del(opt->obj); + free(opt); + l = eina_list_remove_list(l, l); + } + + if (priv->cache) + { + _evas_object_table_cache_free(priv->cache); + priv->cache = NULL; + } + + _evas_object_table_parent_sc->del(o); +} + +static void +_evas_object_table_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h) +{ + Evas_Coord ow, oh; + evas_object_geometry_get(o, NULL, NULL, &ow, &oh); + if ((ow == w) && (oh == h)) return; + evas_object_smart_changed(o); +} + +static void +_evas_object_table_smart_calculate(Evas_Object *o) +{ + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); + + if ((priv->size.cols < 1) || (priv->size.rows < 1)) + { + DBG("Nothing to do: cols=%d, rows=%d", + priv->size.cols, priv->size.rows); + return; + } + + if (priv->homogeneous) + _evas_object_table_smart_calculate_homogeneous(o, priv); + else + _evas_object_table_smart_calculate_regular(o, priv); +} + +static void +_evas_object_table_smart_set_user(Evas_Smart_Class *sc) +{ + sc->add = _evas_object_table_smart_add; + sc->del = _evas_object_table_smart_del; + sc->resize = _evas_object_table_smart_resize; + sc->calculate = _evas_object_table_smart_calculate; +} + +EAPI Evas_Object * +evas_object_table_add(Evas *evas) +{ + return evas_object_smart_add(evas, _evas_object_table_smart_class_new()); +} + +EAPI Evas_Object * +evas_object_table_add_to(Evas_Object *parent) +{ + Evas *evas; + Evas_Object *o; + + evas = evas_object_evas_get(parent); + o = evas_object_table_add(evas); + evas_object_smart_member_add(o, parent); + return o; +} + +EAPI void +evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) +{ + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); + if (priv->homogeneous == homogeneous) + return; + priv->homogeneous = homogeneous; + _evas_object_table_cache_invalidate(priv); + evas_object_smart_changed(o); +} + +EAPI Evas_Object_Table_Homogeneous_Mode +evas_object_table_homogeneous_get(const Evas_Object *o) +{ + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); + return priv->homogeneous; +} + +EAPI void +evas_object_table_align_set(Evas_Object *o, double horizontal, double vertical) +{ + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); + if (priv->align.h == horizontal && priv->align.v == vertical) + return; + priv->align.h = horizontal; + priv->align.v = vertical; + evas_object_smart_changed(o); +} + +EAPI void +evas_object_table_align_get(const Evas_Object *o, double *horizontal, double *vertical) +{ + EVAS_OBJECT_TABLE_DATA_GET(o, priv); + if (priv) + { + if (horizontal) *horizontal = priv->align.h; + if (vertical) *vertical = priv->align.v; + } + else + { + if (horizontal) *horizontal = 0.5; + if (vertical) *vertical = 0.5; + } +} + +EAPI void +evas_object_table_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) +{ + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); + if (priv->pad.h == horizontal && priv->pad.v == vertical) + return; + priv->pad.h = horizontal; + priv->pad.v = vertical; + _evas_object_table_cache_invalidate(priv); + evas_object_smart_changed(o); +} + +EAPI void +evas_object_table_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) +{ + EVAS_OBJECT_TABLE_DATA_GET(o, priv); + if (priv) + { + if (horizontal) *horizontal = priv->pad.h; + if (vertical) *vertical = priv->pad.v; + } + else + { + if (horizontal) *horizontal = 0; + if (vertical) *vertical = 0; + } +} + +EAPI Eina_Bool +evas_object_table_pack_get(Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan) +{ + Evas_Object_Table_Option *opt; + + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); + opt = _evas_object_table_option_get(child); + if (!opt) + { + if (col) *col = 0; + if (row) *row = 0; + if (colspan) *colspan = 0; + if (rowspan) *rowspan = 0; + return EINA_FALSE; + } + if (col) *col = opt->col; + if (row) *row = opt->row; + if (colspan) *colspan = opt->colspan; + if (rowspan) *rowspan = opt->rowspan; + return EINA_TRUE; +} + +EAPI Eina_Bool +evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) +{ + Evas_Object_Table_Option *opt; + + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); + + if (rowspan < 1) + { + ERR("rowspan < 1"); + return EINA_FALSE; + } + if (colspan < 1) + { + ERR("colspan < 1"); + return EINA_FALSE; + } + + opt = _evas_object_table_option_get(child); + if (!opt) + { + opt = malloc(sizeof(*opt)); + if (!opt) + { + ERR("could not allocate table option data."); + return EINA_FALSE; + } + } + + opt->obj = child; + opt->col = col; + opt->row = row; + opt->colspan = colspan; + opt->rowspan = rowspan; + opt->end_col = col + colspan; + opt->end_row = row + rowspan; + + if (evas_object_smart_parent_get(child) == o) + { + Eina_Bool need_shrink = EINA_FALSE; + + if (priv->size.cols < opt->end_col) + priv->size.cols = opt->end_col; + else + need_shrink = EINA_TRUE; + if (priv->size.rows < opt->end_row) + priv->size.rows = opt->end_row; + else + need_shrink = EINA_TRUE; + + if (need_shrink) + { + Eina_List *l; + Evas_Object_Table_Option *opt2; + int max_row = 0, max_col = 0; + + EINA_LIST_FOREACH(priv->children, l, opt2) + { + if (max_col < opt2->end_col) max_col = opt2->end_col; + if (max_row < opt2->end_row) max_row = opt2->end_row; + } + priv->size.cols = max_col; + priv->size.rows = max_row; + } + } + else + { + opt->min.w = 0; + opt->min.h = 0; + opt->max.w = 0; + opt->max.h = 0; + opt->align.h = 0.5; + opt->align.v = 0.5; + opt->pad.l = 0; + opt->pad.r = 0; + opt->pad.t = 0; + opt->pad.b = 0; + opt->expand_h = 0; + opt->expand_v = 0; + + priv->children = eina_list_append(priv->children, opt); + + if (priv->size.cols < opt->end_col) + priv->size.cols = opt->end_col; + if (priv->size.rows < opt->end_row) + priv->size.rows = opt->end_row; + + _evas_object_table_option_set(child, opt); + evas_object_smart_member_add(child, o); + _evas_object_table_child_connect(o, child); + } + _evas_object_table_cache_invalidate(priv); + evas_object_smart_changed(o); + return EINA_TRUE; +} + +static void +_evas_object_table_remove_opt(Evas_Object_Table_Data *priv, Evas_Object_Table_Option *opt) +{ + Eina_List *l; + int max_row, max_col, was_greatest; + + max_row = 0; + max_col = 0; + was_greatest = 0; + l = priv->children; + while (l) + { + Evas_Object_Table_Option *cur_opt = l->data; + + if (cur_opt != opt) + { + if (max_col < cur_opt->end_col) + max_col = cur_opt->end_col; + if (max_row < cur_opt->end_row) + max_row = cur_opt->end_row; + + l = l->next; + } + else + { + Eina_List *tmp = l->next; + priv->children = eina_list_remove_list(priv->children, l); + + if ((priv->size.cols > opt->end_col) && + (priv->size.rows > opt->end_row)) + break; + else + { + was_greatest = 1; + l = tmp; + } + } + } + + if (was_greatest) + { + priv->size.cols = max_col; + priv->size.rows = max_row; + } +} + +EAPI Eina_Bool +evas_object_table_unpack(Evas_Object *o, Evas_Object *child) +{ + Evas_Object_Table_Option *opt; + + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); + + if (o != evas_object_smart_parent_get(child)) + { + ERR("cannot unpack child from incorrect table!"); + return EINA_FALSE; + } + + opt = _evas_object_table_option_del(child); + if (!opt) + { + ERR("cannot unpack child with no packing option!"); + return EINA_FALSE; + } + + _evas_object_table_child_disconnect(o, child); + _evas_object_table_remove_opt(priv, opt); + evas_object_smart_member_del(child); + free(opt); + _evas_object_table_cache_invalidate(priv); + evas_object_smart_changed(o); + + return EINA_TRUE; +} + +EAPI void +evas_object_table_clear(Evas_Object *o, Eina_Bool clear) +{ + Evas_Object_Table_Option *opt; + + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); + + EINA_LIST_FREE(priv->children, opt) + { + _evas_object_table_child_disconnect(o, opt->obj); + _evas_object_table_option_del(opt->obj); + evas_object_smart_member_del(opt->obj); + if (clear) + evas_object_del(opt->obj); + free(opt); + } + priv->size.cols = 0; + priv->size.rows = 0; + _evas_object_table_cache_invalidate(priv); + evas_object_smart_changed(o); +} + +EAPI void +evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows) +{ + EVAS_OBJECT_TABLE_DATA_GET(o, priv); + if (priv) + { + if (cols) *cols = priv->size.cols; + if (rows) *rows = priv->size.rows; + } + else + { + if (cols) *cols = -1; + if (rows) *rows = -1; + } +} + +EAPI Eina_Iterator * +evas_object_table_iterator_new(const Evas_Object *o) +{ + Evas_Object_Table_Iterator *it; + + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + if (!priv->children) return NULL; + + it = calloc(1, sizeof(Evas_Object_Table_Iterator)); + if (!it) return NULL; + + EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); + + it->real_iterator = eina_list_iterator_new(priv->children); + it->table = o; + + it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_table_iterator_next); + it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_table_iterator_get_container); + it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_table_iterator_free); + + return &it->iterator; +} + +EAPI Eina_Accessor * +evas_object_table_accessor_new(const Evas_Object *o) +{ + Evas_Object_Table_Accessor *it; + + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + if (!priv->children) return NULL; + + it = calloc(1, sizeof(Evas_Object_Table_Accessor)); + if (!it) return NULL; + + EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR); + + it->real_accessor = eina_list_accessor_new(priv->children); + it->table = o; + + it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_table_accessor_get_at); + it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_table_accessor_get_container); + it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_table_accessor_free); + + return &it->accessor; +} + +EAPI Eina_List * +evas_object_table_children_get(const Evas_Object *o) +{ + Eina_List *new_list = NULL, *l; + Evas_Object_Table_Option *opt; + + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + EINA_LIST_FOREACH(priv->children, l, opt) + new_list = eina_list_append(new_list, opt->obj); + + return new_list; +} + +Evas_Object * +evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned short row) +{ + Eina_List *l; + Evas_Object_Table_Option *opt; + + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); + + EINA_LIST_FOREACH(priv->children, l, opt) + if (opt->col == col && opt->row == row) + return opt->obj; + return NULL; +} + +EAPI Eina_Bool +evas_object_table_mirrored_get(const Evas_Object *obj) +{ + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(obj, priv, EINA_FALSE); + + return priv->is_mirrored; +} + +EAPI void +evas_object_table_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) +{ + EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(obj, priv); + if (priv->is_mirrored != mirrored) + { + priv->is_mirrored = mirrored; + _evas_object_table_smart_calculate(obj); + } +} diff --git a/libraries/evas/src/lib/canvas/evas_object_text.c b/libraries/evas/src/lib/canvas/evas_object_text.c new file mode 100644 index 0000000..6c30fcc --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_text.c @@ -0,0 +1,1943 @@ +#include "evas_common.h" /* Includes evas_bidi_utils stuff. */ +#include "evas_private.h" + +/* save typing */ +#define ENFN obj->layer->evas->engine.func +#define ENDT obj->layer->evas->engine.data.output + +/* private magic number for text objects */ +static const char o_type[] = "text"; + +/* private struct for text object internal data */ +typedef struct _Evas_Object_Text Evas_Object_Text; +typedef struct _Evas_Object_Text_Item Evas_Object_Text_Item; + +struct _Evas_Object_Text +{ + DATA32 magic; + + struct { + const char *utf8_text; /* The text exposed to the API */ + const char *font; + Evas_Font_Description *fdesc; + const char *source; + Evas_Font_Size size; + struct { + unsigned char r, g, b, a; + } outline, shadow, glow, glow2; + + unsigned char style; + } cur, prev; + + float ascent, descent; + float max_ascent, max_descent; + Evas_BiDi_Paragraph_Props *bidi_par_props; + const char *bidi_delimiters; + Evas_Object_Text_Item *items; + + Evas_Font_Set *font; + + char changed : 1; +}; + +struct _Evas_Object_Text_Item +{ + EINA_INLIST; + + size_t text_pos; + size_t visual_pos; + Evas_Text_Props text_props; + Evas_Coord x, w, h, adv; +}; + +/* private methods for text objects */ +static void evas_object_text_init(Evas_Object *obj); +static void *evas_object_text_new(void); +static void evas_object_text_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); +static void evas_object_text_free(Evas_Object *obj); +static void evas_object_text_render_pre(Evas_Object *obj); +static void evas_object_text_render_post(Evas_Object *obj); + +static unsigned int evas_object_text_id_get(Evas_Object *obj); +static unsigned int evas_object_text_visual_id_get(Evas_Object *obj); +static void *evas_object_text_engine_data_get(Evas_Object *obj); + +static int evas_object_text_is_opaque(Evas_Object *obj); +static int evas_object_text_was_opaque(Evas_Object *obj); + +static void evas_object_text_scale_update(Evas_Object *obj); +static void _evas_object_text_recalc(Evas_Object *obj); + +static const Evas_Object_Func object_func = +{ + /* methods (compulsory) */ + evas_object_text_free, + evas_object_text_render, + evas_object_text_render_pre, + evas_object_text_render_post, + evas_object_text_id_get, + evas_object_text_visual_id_get, + evas_object_text_engine_data_get, + /* these are optional. NULL = nothing */ + NULL, + NULL, + NULL, + NULL, + evas_object_text_is_opaque, + evas_object_text_was_opaque, + NULL, + NULL, + NULL, + evas_object_text_scale_update, + NULL, + NULL, + NULL +}; + +/* the actual api call to add a rect */ +/* it has no other api calls as all properties are standard */ + +EVAS_MEMPOOL(_mp_obj); + +static int +_evas_object_text_char_coords_get(const Evas_Object *obj, + const Evas_Object_Text *o, + size_t pos, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +{ + Evas_Object_Text_Item *it; + + EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) + { + if ((it->text_pos <= pos) && + (pos < (it->text_pos + it->text_props.text_len))) + { + int ret; + ret = ENFN->font_char_coords_get(ENDT, o->font, + &it->text_props, pos - it->text_pos, x, y, w, h); + if (x) *x += it->x; + return ret; + } + } + return 0; +} + +static void +_evas_object_text_item_clean(Evas_Object_Text_Item *it) +{ + evas_common_text_props_content_unref(&it->text_props); +} + +static void +_evas_object_text_items_clear(Evas_Object_Text *o) +{ + Evas_Object_Text_Item *it; + + while (o->items) + { + it = o->items; + o->items = (Evas_Object_Text_Item *) eina_inlist_remove( + EINA_INLIST_GET(o->items), + EINA_INLIST_GET(it)); + _evas_object_text_item_clean(it); + free(it); + } +} + +#ifdef BIDI_SUPPORT +static int +_evas_object_text_it_compare_logical(const void *_it1, const void *_it2) +{ + const Evas_Object_Text_Item *it1 = _it1, *it2 = _it2; + if (it1->text_pos < it2->text_pos) + return -1; + else if (it1->text_pos == it2->text_pos) + return 0; + else + return 1; + +} +#endif + +static int +_evas_object_text_last_up_to_pos(const Evas_Object *obj, + const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy) +{ + Evas_Object_Text_Item *it; + +#ifdef BIDI_SUPPORT + /*FIXME: not very efficient, sort the items arrays. */ + /* Reorder if it's a bidi text */ + if (o->bidi_par_props) + { + Eina_List *logical_it = NULL; + Evas_Object_Text_Item *i; + Eina_List *itr; + Evas_Coord x = 0; + /* Insert all to the logical list */ + EINA_INLIST_FOREACH(o->items, i) + { + logical_it = eina_list_sorted_insert(logical_it, + _evas_object_text_it_compare_logical, i); + } + EINA_LIST_FOREACH(logical_it, itr, it) + { + if ((x <= cx) && (cx < x + it->adv)) + { + return it->text_pos + ENFN->font_last_up_to_pos(ENDT, + o->font, + &it->text_props, + cx - x, + cy); + } + x += it->adv; + } + eina_list_free(logical_it); + } + else +#endif + { + EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) + { + if ((it->x <= cx) && (cx < it->x + it->adv)) + { + return it->text_pos + ENFN->font_last_up_to_pos(ENDT, + o->font, + &it->text_props, + cx - it->x, + cy); + } + } + } + return -1; +} + +static int +_evas_object_text_char_at_coords(const Evas_Object *obj, + const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy, + Evas_Coord *rx, Evas_Coord *ry, Evas_Coord *rw, Evas_Coord *rh) +{ + Evas_Object_Text_Item *it; + + EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) + { + if ((it->x <= cx) && (cx < it->x + it->adv)) + { + return it->text_pos + ENFN->font_char_at_coords_get(ENDT, + o->font, + &it->text_props, + cx - it->x, + cy, + rx, ry, + rw, rh); + } + } + return -1; +} + +static Evas_Coord +_evas_object_text_horiz_advance_get(const Evas_Object *obj, + const Evas_Object_Text *o) +{ + Evas_Object_Text_Item *it; + Evas_Coord adv; + (void) obj; + + adv = 0; + EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) + { + adv += it->adv; + } + return adv; +} + +static Evas_Coord +_evas_object_text_vert_advance_get(const Evas_Object *obj __UNUSED__, + const Evas_Object_Text *o) +{ + return o->max_ascent + o->max_descent; +} + +EAPI Evas_Object * +evas_object_text_add(Evas *e) +{ + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + obj = evas_object_new(e); + evas_object_text_init(obj); + evas_object_inject(obj, e); + return obj; +} + +EAPI void +evas_object_text_font_source_set(Evas_Object *obj, const char *font_source) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return; + MAGIC_CHECK_END(); + + if ((o->cur.source) && (font_source) && + (!strcmp(o->cur.source, font_source))) + return; + /* + if (o->cur.source) eina_stringshare_del(o->cur.source); + if (font_source) o->cur.source = eina_stringshare_add(font_source); + else o->cur.source = NULL; + */ + eina_stringshare_replace(&o->cur.source, font_source); +} + +EAPI const char * +evas_object_text_font_source_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return NULL; + MAGIC_CHECK_END(); + return o->cur.source; +} + +EAPI void +evas_object_text_font_set(Evas_Object *obj, const char *font, Evas_Font_Size size) +{ + Evas_Object_Text *o; + int is, was = 0, pass = 0, freeze = 0; + Evas_Font_Description *fdesc; + + if ((!font) || (size <= 0)) return; + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return; + MAGIC_CHECK_END(); + + fdesc = evas_font_desc_new(); + evas_font_name_parse(fdesc, font); + if (o->cur.fdesc && !evas_font_desc_cmp(fdesc, o->cur.fdesc) && + (size == o->cur.size)) + { + evas_font_desc_unref(fdesc); + return; + } + + if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc); + o->cur.fdesc = fdesc; + + o->cur.size = size; + eina_stringshare_replace(&o->cur.font, font); + o->prev.font = NULL; + + if (obj->layer->evas->events_frozen <= 0) + { + pass = evas_event_passes_through(obj); + freeze = evas_event_freezes_through(obj); + if ((!pass) && (!freeze)) + was = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + } + +#ifdef EVAS_FRAME_QUEUING + if (o->font) + evas_common_pipe_op_text_flush((RGBA_Font *) o->font); +#endif + + /* DO IT */ + if (o->font) + { + evas_font_free(obj->layer->evas, o->font); + o->font = NULL; + } + + o->font = evas_font_load(obj->layer->evas, o->cur.fdesc, o->cur.source, + (int)(((double) o->cur.size) * obj->cur.scale)); + if (o->font) + { + o->ascent = ENFN->font_ascent_get(ENDT, o->font); + o->descent = ENFN->font_descent_get(ENDT, o->font); + o->max_ascent = ENFN->font_max_ascent_get(ENDT, o->font); + o->max_descent = ENFN->font_max_descent_get(ENDT, o->font); + } + else + { + o->ascent = 0; + o->descent = 0; + o->max_ascent = 0; + o->max_descent = 0; + } + _evas_object_text_recalc(obj); + o->changed = 1; + evas_object_change(obj); + evas_object_clip_dirty(obj); + evas_object_coords_recalc(obj); + if (obj->layer->evas->events_frozen <= 0) + { + if ((!pass) && (!freeze)) + { + is = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + 1, 1); + if ((is ^ was) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + } + evas_object_inform_call_resize(obj); +} + +EAPI void +evas_object_text_font_get(const Evas_Object *obj, const char **font, Evas_Font_Size *size) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (font) *font = ""; + if (size) *size = 0; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + if (font) *font = ""; + if (size) *size = 0; + return; + MAGIC_CHECK_END(); + if (font) *font = o->cur.font; + if (size) *size = o->cur.size; +} + + +/** + * @internal + * Create a new text layout item from the string and the format. + * + * @param c the context to work on - Not NULL. + * @param fmt the format to use. + * @param str the string to use. + */ +static Evas_Object_Text_Item * +_evas_object_text_item_new(Evas_Object *obj, Evas_Object_Text *o, + Evas_Font_Instance *fi, const Eina_Unicode *str, Evas_Script_Type script, + size_t pos, size_t visual_pos, size_t len) +{ + Evas_Object_Text_Item *it; + + it = calloc(1, sizeof(Evas_Object_Text_Item)); + it->text_pos = pos; + it->visual_pos = visual_pos; + evas_common_text_props_bidi_set(&it->text_props, o->bidi_par_props, + it->text_pos); + evas_common_text_props_script_set(&it->text_props, script); + + if (fi) + { + ENFN->font_text_props_info_create(ENDT, + fi, str + pos, &it->text_props, + o->bidi_par_props, it->text_pos, len); + + ENFN->font_string_size_get(ENDT, + o->font, + &it->text_props, + &it->w, &it->h); + it->adv = ENFN->font_h_advance_get(ENDT, o->font, + &it->text_props); + } + o->items = (Evas_Object_Text_Item *) + eina_inlist_append(EINA_INLIST_GET(o->items), EINA_INLIST_GET(it)); + return it; +} + +/** + * @internal + * Orders o->items according to the visual position. + * + * @param obj the evas object + * @param o the text object + */ +static void +_evas_object_text_item_order(Evas_Object *obj, Evas_Object_Text *o) +{ + (void) obj; +#ifdef BIDI_SUPPORT + /*FIXME: not very efficient, sort the items arrays. */ + /* Reorder if it's a bidi text */ + if (o->bidi_par_props) + { + Evas_Object_Text_Item *i, *j, *min; + i = o->items; + while (i) + { + min = i; + EINA_INLIST_FOREACH(i, j) + { + if (j->visual_pos < min->visual_pos) + { + min = j; + } + } + if (min != i) + { + o->items = (Evas_Object_Text_Item *) eina_inlist_remove(EINA_INLIST_GET(o->items), EINA_INLIST_GET(min)); + o->items = (Evas_Object_Text_Item *) eina_inlist_prepend_relative(EINA_INLIST_GET(o->items), EINA_INLIST_GET(min), EINA_INLIST_GET(i)); + } + + i = (Evas_Object_Text_Item *) EINA_INLIST_GET(min)->next; + } + } +#endif + + /* calculate the positions according to the order. */ + { + Evas_Object_Text_Item *it = o->items; + Evas_Coord x = 0; + + while (it) + { + it->x = x; + x += it->adv; + it = (Evas_Object_Text_Item *) EINA_INLIST_GET(it)->next; + } + } +} + +/** + * @internal + * Populates o->items with the items of the text according to text + * + * @param obj the evas object + * @param o the text object + * @param text the text to layout + */ +static void +_evas_object_text_layout(Evas_Object *obj, Evas_Object_Text *o, const Eina_Unicode *text) +{ + EvasBiDiStrIndex *v_to_l = NULL; + size_t pos, visual_pos; + int len = eina_unicode_strlen(text), par_len; +#ifdef BIDI_SUPPORT + int *segment_idxs = NULL; + if (o->bidi_delimiters) + segment_idxs = evas_bidi_segment_idxs_get(text, o->bidi_delimiters); + evas_bidi_paragraph_props_unref(o->bidi_par_props); + o->bidi_par_props = evas_bidi_paragraph_props_get(text, len, segment_idxs); + evas_bidi_props_reorder_line(NULL, 0, len, o->bidi_par_props, &v_to_l); + if (segment_idxs) free(segment_idxs); +#endif + visual_pos = pos = 0; + + par_len = len; + while (len > 0) + { + Evas_Font_Instance *script_fi = NULL; + int script_len = len, tmp_cut; + Evas_Script_Type script; + tmp_cut = evas_common_language_script_end_of_run_get( + text + pos, + o->bidi_par_props, + pos, len); + if (tmp_cut > 0) + script_len = tmp_cut; + + script = evas_common_language_script_type_get(text, script_len); + + while (script_len > 0) + { + Evas_Font_Instance *cur_fi = NULL; + int run_len = script_len; + if (o->font) + { + run_len = ENFN->font_run_end_get(ENDT, + o->font, &script_fi, &cur_fi, + script, text + pos, script_len); + } +#ifdef BIDI_SUPPORT + visual_pos = evas_bidi_position_logical_to_visual( + v_to_l, par_len, pos); +#else + visual_pos = pos; +#endif + _evas_object_text_item_new(obj, o, cur_fi, text, script, + pos, visual_pos, run_len); + + pos += run_len; + script_len -= run_len; + len -= run_len; + } + } + + _evas_object_text_item_order(obj, o); + + if (v_to_l) free(v_to_l); +} + + +EAPI void +evas_object_text_text_set(Evas_Object *obj, const char *_text) +{ + Evas_Object_Text *o; + int is, was, len; + Eina_Unicode *text; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return; + MAGIC_CHECK_END(); + + if ((o->cur.utf8_text) && (_text) && (!strcmp(o->cur.utf8_text, _text))) + return; + text = eina_unicode_utf8_to_unicode(_text, &len); + + if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING); + was = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + /* DO II */ + /*Update bidi_props*/ + + if (o->items) _evas_object_text_items_clear(o); + + if ((text) && (*text)) + { + _evas_object_text_layout(obj, o, text); + eina_stringshare_replace(&o->cur.utf8_text, _text); + o->prev.utf8_text = NULL; + } + else + { + eina_stringshare_replace(&o->cur.utf8_text, NULL); + } + if (text) + { + free(text); + text = NULL; + } + _evas_object_text_recalc(obj); + o->changed = 1; + evas_object_change(obj); + evas_object_clip_dirty(obj); + evas_object_coords_recalc(obj); + is = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + if ((is || was) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + evas_object_inform_call_resize(obj); + if (text) free(text); +} + +EAPI void +evas_object_text_bidi_delimiters_set(Evas_Object *obj, const char *delim) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return; + MAGIC_CHECK_END(); + + eina_stringshare_replace(&o->bidi_delimiters, delim); +} + +EAPI const char * +evas_object_text_bidi_delimiters_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return NULL; + MAGIC_CHECK_END(); + + return o->bidi_delimiters; +} + + +EAPI const char * +evas_object_text_text_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return NULL; + MAGIC_CHECK_END(); + return o->cur.utf8_text; +} + +EAPI Evas_BiDi_Direction +evas_object_text_direction_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EVAS_BIDI_DIRECTION_NEUTRAL; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return EVAS_BIDI_DIRECTION_NEUTRAL; + MAGIC_CHECK_END(); + if (o->items) + { + return o->items->text_props.bidi.dir; + } + return EVAS_BIDI_DIRECTION_NEUTRAL; +} + +EAPI Evas_Coord +evas_object_text_ascent_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return 0; + MAGIC_CHECK_END(); + return o->ascent; +} + +EAPI Evas_Coord +evas_object_text_descent_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return 0; + MAGIC_CHECK_END(); + return o->descent; +} + +EAPI Evas_Coord +evas_object_text_max_ascent_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return 0; + MAGIC_CHECK_END(); + return o->max_ascent; +} + +EAPI Evas_Coord +evas_object_text_max_descent_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return 0; + MAGIC_CHECK_END(); + return o->max_descent; +} + +EAPI Evas_Coord +evas_object_text_inset_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return 0; + MAGIC_CHECK_END(); + if (!o->font) return 0; + if (!o->items) return 0; + return ENFN->font_inset_get(ENDT, o->font, &o->items->text_props); +} + +EAPI Evas_Coord +evas_object_text_horiz_advance_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return 0; + MAGIC_CHECK_END(); + if (!o->font) return 0; + if (!o->items) return 0; + return _evas_object_text_horiz_advance_get(obj, o); +} + +EAPI Evas_Coord +evas_object_text_vert_advance_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return 0; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return 0; + MAGIC_CHECK_END(); + if (!o->font) return 0; + if (!o->items) return o->ascent + o->descent; + return _evas_object_text_vert_advance_get(obj, o); +} + +EAPI Eina_Bool +evas_object_text_char_pos_get(const Evas_Object *obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) +{ + Evas_Object_Text *o; + int l = 0, r = 0, t = 0, b = 0; + int ret, x = 0, y = 0, w = 0, h = 0; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return EINA_FALSE; + MAGIC_CHECK_END(); + if (!o->font) return EINA_FALSE; + if (!o->items || (pos < 0)) return EINA_FALSE; + ret = _evas_object_text_char_coords_get(obj, o, (size_t) pos, + &x, &y, &w, &h); + evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); + y += o->max_ascent - t; + x -= l; + if (x < 0) + { + w += x; + x = 0; + } + if ((x + w) > obj->cur.geometry.w) w = obj->cur.geometry.w - x; + if (w < 0) w = 0; + if (y < 0) + { + h += y; + y = 0; + } + if ((y + h) > obj->cur.geometry.h) h = obj->cur.geometry.h - y; + if (h < 0) h = 0; + if (cx) *cx = x; + if (cy) *cy = y; + if (cw) *cw = w + l + r; + if (ch) *ch = h + t + b; + return ret; +} + + +EAPI int +evas_object_text_last_up_to_pos(const Evas_Object *obj, Evas_Coord x, Evas_Coord y) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return -1; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return -1; + MAGIC_CHECK_END(); + if (!o->font) return -1; + if (!o->items) return -1; + return _evas_object_text_last_up_to_pos(obj, o, x, y - o->max_ascent); +} + +EAPI int +evas_object_text_char_coords_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) +{ + Evas_Object_Text *o; + int l = 0, r = 0, t = 0, b = 0; + int ret, rx = 0, ry = 0, rw = 0, rh = 0; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return -1; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return -1; + MAGIC_CHECK_END(); + if (!o->font) return -1; + if (!o->items) return -1; + ret = _evas_object_text_char_at_coords(obj, o, x, y - o->max_ascent, + &rx, &ry, &rw, &rh); + evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); + ry += o->max_ascent - t; + rx -= l; + if (rx < 0) + { + rw += rx; + rx = 0; + } + if ((rx + rw) > obj->cur.geometry.w) rw = obj->cur.geometry.w - rx; + if (rw < 0) rw = 0; + if (ry < 0) + { + rh += ry; + ry = 0; + } + if ((ry + rh) > obj->cur.geometry.h) rh = obj->cur.geometry.h - ry; + if (rh < 0) rh = 0; + if (cx) *cx = rx; + if (cy) *cy = ry; + if (cw) *cw = rw + l + r; + if (ch) *ch = rh + t + b; + return ret; +} + +EAPI void +evas_object_text_style_set(Evas_Object *obj, Evas_Text_Style_Type style) +{ + Evas_Object_Text *o; + int pl = 0, pr = 0, pt = 0, pb = 0, l = 0, r = 0, t = 0, b = 0; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return; + MAGIC_CHECK_END(); + if (o->cur.style == style) return; + evas_text_style_pad_get(o->cur.style, &pl, &pr, &pt, &pb); + o->cur.style = style; + evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); + if (o->items) + obj->cur.geometry.w += (l - pl) + (r - pr); + else + obj->cur.geometry.w = 0; + obj->cur.geometry.h += (t - pt) + (b - pb); + evas_object_change(obj); + evas_object_clip_dirty(obj); +} + +EAPI Evas_Text_Style_Type +evas_object_text_style_get(const Evas_Object *obj) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EVAS_TEXT_STYLE_PLAIN; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return EVAS_TEXT_STYLE_PLAIN; + MAGIC_CHECK_END(); + return o->cur.style; +} + +EAPI void +evas_object_text_shadow_color_set(Evas_Object *obj, int r, int g, int b, int a) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return; + MAGIC_CHECK_END(); + if ((o->cur.shadow.r == r) && (o->cur.shadow.g == g) && + (o->cur.shadow.b == b) && (o->cur.shadow.a == a)) + return; + o->cur.shadow.r = r; + o->cur.shadow.g = g; + o->cur.shadow.b = b; + o->cur.shadow.a = a; + o->changed = 1; + evas_object_change(obj); +} + +EAPI void +evas_object_text_shadow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (r) *r = 0; + if (g) *g = 0; + if (b) *b = 0; + if (a) *a = 0; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + if (r) *r = 0; + if (g) *g = 0; + if (b) *b = 0; + if (a) *a = 0; + return; + MAGIC_CHECK_END(); + if (r) *r = o->cur.shadow.r; + if (g) *g = o->cur.shadow.g; + if (b) *b = o->cur.shadow.b; + if (a) *a = o->cur.shadow.a; +} + +EAPI void +evas_object_text_glow_color_set(Evas_Object *obj, int r, int g, int b, int a) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return; + MAGIC_CHECK_END(); + if ((o->cur.glow.r == r) && (o->cur.glow.g == g) && + (o->cur.glow.b == b) && (o->cur.glow.a == a)) + return; + o->cur.glow.r = r; + o->cur.glow.g = g; + o->cur.glow.b = b; + o->cur.glow.a = a; + o->changed = 1; + evas_object_change(obj); +} + +EAPI void +evas_object_text_glow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (r) *r = 0; + if (g) *g = 0; + if (b) *b = 0; + if (a) *a = 0; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + if (r) *r = 0; + if (g) *g = 0; + if (b) *b = 0; + if (a) *a = 0; + return; + MAGIC_CHECK_END(); + if (r) *r = o->cur.glow.r; + if (g) *g = o->cur.glow.g; + if (b) *b = o->cur.glow.b; + if (a) *a = o->cur.glow.a; +} + +EAPI void +evas_object_text_glow2_color_set(Evas_Object *obj, int r, int g, int b, int a) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return; + MAGIC_CHECK_END(); + if ((o->cur.glow2.r == r) && (o->cur.glow2.g == g) && + (o->cur.glow2.b == b) && (o->cur.glow2.a == a)) + return; + o->cur.glow2.r = r; + o->cur.glow2.g = g; + o->cur.glow2.b = b; + o->cur.glow2.a = a; + o->changed = 1; + evas_object_change(obj); +} + +EAPI void +evas_object_text_glow2_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (r) *r = 0; + if (g) *g = 0; + if (b) *b = 0; + if (a) *a = 0; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + if (r) *r = 0; + if (g) *g = 0; + if (b) *b = 0; + if (a) *a = 0; + return; + MAGIC_CHECK_END(); + if (r) *r = o->cur.glow2.r; + if (g) *g = o->cur.glow2.g; + if (b) *b = o->cur.glow2.b; + if (a) *a = o->cur.glow2.a; +} + +EAPI void +evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return; + MAGIC_CHECK_END(); + if ((o->cur.outline.r == r) && (o->cur.outline.g == g) && + (o->cur.outline.b == b) && (o->cur.outline.a == a)) + return; + o->cur.outline.r = r; + o->cur.outline.g = g; + o->cur.outline.b = b; + o->cur.outline.a = a; + o->changed = 1; + evas_object_change(obj); +} + +EAPI void +evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) +{ + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (r) *r = 0; + if (g) *g = 0; + if (b) *b = 0; + if (a) *a = 0; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + if (r) *r = 0; + if (g) *g = 0; + if (b) *b = 0; + if (a) *a = 0; + return; + MAGIC_CHECK_END(); + if (r) *r = o->cur.outline.r; + if (g) *g = o->cur.outline.g; + if (b) *b = o->cur.outline.b; + if (a) *a = o->cur.outline.a; +} + +EAPI void +evas_object_text_style_pad_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) +{ + int sl = 0, sr = 0, st = 0, sb = 0; + Evas_Object_Text *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + if (l) *l = 0; + if (r) *r = 0; + if (t) *t = 0; + if (b) *b = 0; + return; + MAGIC_CHECK_END(); + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + if (l) *l = 0; + if (r) *r = 0; + if (t) *t = 0; + if (b) *b = 0; + return; + MAGIC_CHECK_END(); + /* use temps to be certain we have initialized values */ + evas_text_style_pad_get(o->cur.style, &sl, &sr, &st, &sb); + if (l) *l = sl; + if (r) *r = sr; + if (t) *t = st; + if (b) *b = sb; +} + + + + +EAPI int +evas_string_char_next_get(const char *str, int pos, int *decoded) +{ + int p, d; + + if (decoded) *decoded = 0; + if ((!str) || (pos < 0)) return 0; + p = pos; + d = eina_unicode_utf8_get_next(str, &p); + if (decoded) *decoded = d; + return p; +} + +EAPI int +evas_string_char_prev_get(const char *str, int pos, int *decoded) +{ + int p, d; + + if (decoded) *decoded = 0; + if ((!str) || (pos < 1)) return 0; + p = pos; + d = eina_unicode_utf8_get_prev(str, &p); + if (decoded) *decoded = d; + return p; +} + +EAPI int +evas_string_char_len_get(const char *str) +{ + if (!str) return 0; + return eina_unicode_utf8_get_len(str); +} + +void +evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b) +{ + int sl = 0, sr = 0, st = 0, sb = 0; + + /* Don't calc anything if there's no style. */ + if (style != EVAS_TEXT_STYLE_PLAIN) + { + int shad_sz = 0, shad_dst = 0, out_sz = 0; + int dx = 0, minx = 0, maxx = 0; + int dy = 0, miny = 0, maxy = 0; + Eina_Bool have_shadow = EINA_FALSE; + + switch (style & EVAS_TEXT_STYLE_MASK_BASIC) + { + case EVAS_TEXT_STYLE_SHADOW: + shad_dst = 1; + have_shadow = EINA_TRUE; + break; + case EVAS_TEXT_STYLE_OUTLINE_SHADOW: + case EVAS_TEXT_STYLE_FAR_SHADOW: + shad_dst = 2; + out_sz = 1; + have_shadow = EINA_TRUE; + break; + case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW: + shad_dst = 1; + shad_sz = 2; + out_sz = 1; + have_shadow = EINA_TRUE; + break; + case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW: + shad_dst = 2; + shad_sz = 2; + have_shadow = EINA_TRUE; + break; + case EVAS_TEXT_STYLE_SOFT_SHADOW: + shad_dst = 1; + shad_sz = 2; + have_shadow = EINA_TRUE; + break; + case EVAS_TEXT_STYLE_GLOW: + case EVAS_TEXT_STYLE_SOFT_OUTLINE: + out_sz = 2; + break; + case EVAS_TEXT_STYLE_OUTLINE: + out_sz = 1; + break; + default: + break; + } + + minx = -out_sz; + maxx = out_sz; + miny = -out_sz; + maxy = out_sz; + if (have_shadow) + { + int shx1, shx2, shy1, shy2; + switch (style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) + { + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT: + dx = 1; + dy = 1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM: + dx = 0; + dy = 1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT: + dx = -1; + dy = 1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT: + dx = -1; + dy = 0; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT: + dx = -1; + dy = -1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP: + dx = 0; + dy = -1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT: + dx = 1; + dy = -1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT: + dx = 1; + dy = 0; + default: + break; + } + shx1 = dx * shad_dst; + shx1 -= shad_sz; + shx2 = dx * shad_dst; + shx2 += shad_sz; + if (shx1 < minx) minx = shx1; + if (shx2 > maxx) maxx = shx2; + + shy1 = dy * shad_dst; + shy1 -= shad_sz; + shy2 = dy * shad_dst; + shy2 += shad_sz; + if (shy1 < miny) miny = shy1; + if (shy2 > maxy) maxy = shy2; + } + + if (l) sl = *l; + if (r) sr = *r; + if (t) st = *t; + if (b) sb = *b; + + if (sr < maxx) sr = maxx; + if (sl < -minx) sl = -minx; + if (sb < maxy) sb = maxy; + if (st < -miny) st = -miny; + } + + if (l) *l = sl; + if (r) *r = sr; + if (t) *t = st; + if (b) *b = sb; +} + +/* all nice and private */ +static void +evas_object_text_init(Evas_Object *obj) +{ + /* alloc text ob, setup methods and default values */ + obj->object_data = evas_object_text_new(); + /* set up default settings for this kind of object */ + obj->cur.color.r = 255; + obj->cur.color.g = 255; + obj->cur.color.b = 255; + obj->cur.color.a = 255; + obj->cur.geometry.x = 0; + obj->cur.geometry.y = 0; + obj->cur.geometry.w = 0; + obj->cur.geometry.h = 0; + obj->cur.layer = 0; + /* set up object-specific settings */ + obj->prev = obj->cur; + /* set up methods (compulsory) */ + obj->func = &object_func; + obj->type = o_type; +} + +static void * +evas_object_text_new(void) +{ + Evas_Object_Text *o; + + /* alloc obj private data */ + EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_text", Evas_Object_Text, 128, NULL); + o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Text); + if (!o) return NULL; + EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Text); + o->magic = MAGIC_OBJ_TEXT; + o->prev = o->cur; +#ifdef BIDI_SUPPORT + o->bidi_par_props = evas_bidi_paragraph_props_new(); +#endif + return o; +} + +static void +evas_object_text_free(Evas_Object *obj) +{ + Evas_Object_Text *o; + + /* frees private object data. very simple here */ + o = (Evas_Object_Text *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); + return; + MAGIC_CHECK_END(); + /* free obj */ + if (o->items) _evas_object_text_items_clear(o); + if (o->cur.utf8_text) eina_stringshare_del(o->cur.utf8_text); + if (o->cur.font) eina_stringshare_del(o->cur.font); + if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc); + if (o->cur.source) eina_stringshare_del(o->cur.source); + if (o->font) evas_font_free(obj->layer->evas, o->font); +#ifdef BIDI_SUPPORT + evas_bidi_paragraph_props_unref(o->bidi_par_props); +#endif + o->magic = 0; + EVAS_MEMPOOL_FREE(_mp_obj, o); +} + +static void +evas_object_text_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) +{ + int i, j; + Evas_Object_Text *o; + Evas_Object_Text_Item *it; + const char vals[5][5] = + { + {0, 1, 2, 1, 0}, + {1, 3, 4, 3, 1}, + {2, 4, 5, 4, 2}, + {1, 3, 4, 3, 1}, + {0, 1, 2, 1, 0} + }; + int sl = 0, st = 0; + int shad_dst, shad_sz, dx, dy, haveshad; + + /* render object to surface with context, and offxet by x,y */ + o = (Evas_Object_Text *)(obj->object_data); + evas_text_style_pad_get(o->cur.style, &sl, NULL, &st, NULL); + ENFN->context_multiplier_unset(output, context); + ENFN->context_render_op_set(output, context, obj->cur.render_op); + /* FIXME: This clipping is just until we fix inset handling correctly. */ + ENFN->context_clip_clip(output, context, + obj->cur.geometry.x + x, + obj->cur.geometry.y + y, + obj->cur.geometry.w, + obj->cur.geometry.h); +/* + ENFN->context_color_set(output, + context, + 230, 160, 30, 100); + ENFN->rectangle_draw(output, + context, + surface, + obj->cur.geometry.x + x, + obj->cur.geometry.y + y, + obj->cur.geometry.w, + obj->cur.geometry.h); + */ +#define COLOR_ONLY_SET(object, sub, col) \ + ENFN->context_color_set(output, context, \ + object->sub.col.r, \ + object->sub.col.g, \ + object->sub.col.b, \ + object->sub.col.a); + +#define COLOR_SET(object, sub, col) \ + if (obj->cur.clipper)\ + ENFN->context_color_set(output, context, \ + ((int)object->sub.col.r * ((int)obj->cur.clipper->cur.cache.clip.r + 1)) >> 8, \ + ((int)object->sub.col.g * ((int)obj->cur.clipper->cur.cache.clip.g + 1)) >> 8, \ + ((int)object->sub.col.b * ((int)obj->cur.clipper->cur.cache.clip.b + 1)) >> 8, \ + ((int)object->sub.col.a * ((int)obj->cur.clipper->cur.cache.clip.a + 1)) >> 8); \ + else\ + ENFN->context_color_set(output, context, \ + object->sub.col.r, \ + object->sub.col.g, \ + object->sub.col.b, \ + object->sub.col.a); + +#define COLOR_SET_AMUL(object, sub, col, amul) \ + if (obj->cur.clipper) \ + ENFN->context_color_set(output, context, \ + (((int)object->sub.col.r) * ((int)obj->cur.clipper->cur.cache.clip.r) * (amul)) / 65025, \ + (((int)object->sub.col.g) * ((int)obj->cur.clipper->cur.cache.clip.g) * (amul)) / 65025, \ + (((int)object->sub.col.b) * ((int)obj->cur.clipper->cur.cache.clip.b) * (amul)) / 65025, \ + (((int)object->sub.col.a) * ((int)obj->cur.clipper->cur.cache.clip.a) * (amul)) / 65025); \ + else \ + ENFN->context_color_set(output, context, \ + (((int)object->sub.col.r) * (amul)) / 255, \ + (((int)object->sub.col.g) * (amul)) / 255, \ + (((int)object->sub.col.b) * (amul)) / 255, \ + (((int)object->sub.col.a) * (amul)) / 255); + +#define DRAW_TEXT(ox, oy) \ + if ((o->font) && (it->text_props.len > 0)) \ + ENFN->font_draw(output, \ + context, \ + surface, \ + o->font, \ + obj->cur.geometry.x + x + sl + ox + it->x, \ + obj->cur.geometry.y + y + st + oy + \ + (int) \ + (((o->max_ascent * obj->cur.geometry.h) / obj->cur.geometry.h) - 0.5), \ + obj->cur.geometry.w, \ + obj->cur.geometry.h, \ + obj->cur.geometry.w, \ + obj->cur.geometry.h, \ + &it->text_props); + + /* shadows */ + shad_dst = shad_sz = dx = dy = haveshad = 0; + switch (o->cur.style & EVAS_TEXT_STYLE_MASK_BASIC) + { + case EVAS_TEXT_STYLE_SHADOW: + case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW: + shad_dst = 1; + haveshad = 1; + break; + case EVAS_TEXT_STYLE_OUTLINE_SHADOW: + case EVAS_TEXT_STYLE_FAR_SHADOW: + shad_dst = 2; + haveshad = 1; + break; + case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW: + shad_dst = 2; + shad_sz = 2; + haveshad = 1; + break; + case EVAS_TEXT_STYLE_SOFT_SHADOW: + shad_dst = 1; + shad_sz = 2; + haveshad = 1; + break; + default: + break; + } + if (haveshad) + { + if (shad_dst > 0) + { + switch (o->cur.style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) + { + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT: + dx = 1; + dy = 1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM: + dx = 0; + dy = 1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT: + dx = -1; + dy = 1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT: + dx = -1; + dy = 0; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT: + dx = -1; + dy = -1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP: + dx = 0; + dy = -1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT: + dx = 1; + dy = -1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT: + dx = 1; + dy = 0; + default: + break; + } + dx *= shad_dst; + dy *= shad_dst; + } + } + EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) + { + /* Shadows */ + if (haveshad) + { + switch (shad_sz) + { + case 0: + COLOR_SET(o, cur, shadow); + DRAW_TEXT(dx, dy); + break; + case 2: + for (j = 0; j < 5; j++) + { + for (i = 0; i < 5; i++) + { + if (vals[i][j] != 0) + { + COLOR_SET_AMUL(o, cur, shadow, vals[i][j] * 50); + DRAW_TEXT(i - 2 + dx, j - 2 + dy); + } + } + } + break; + default: + break; + } + } + + /* glows */ + if (o->cur.style == EVAS_TEXT_STYLE_GLOW) + { + for (j = 0; j < 5; j++) + { + for (i = 0; i < 5; i++) + { + if (vals[i][j] != 0) + { + COLOR_SET_AMUL(o, cur, glow, vals[i][j] * 50); + DRAW_TEXT(i - 2, j - 2); + } + } + } + COLOR_SET(o, cur, glow2); + DRAW_TEXT(-1, 0); + DRAW_TEXT(1, 0); + DRAW_TEXT(0, -1); + DRAW_TEXT(0, 1); + } + + /* outlines */ + if ((o->cur.style == EVAS_TEXT_STYLE_OUTLINE) || + (o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SHADOW) || + (o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW)) + { + COLOR_SET(o, cur, outline); + DRAW_TEXT(-1, 0); + DRAW_TEXT(1, 0); + DRAW_TEXT(0, -1); + DRAW_TEXT(0, 1); + } + else if (o->cur.style == EVAS_TEXT_STYLE_SOFT_OUTLINE) + { + for (j = 0; j < 5; j++) + { + for (i = 0; i < 5; i++) + { + if (((i != 2) || (j != 2)) && (vals[i][j] != 0)) + { + COLOR_SET_AMUL(o, cur, outline, vals[i][j] * 50); + DRAW_TEXT(i - 2, j - 2); + } + } + } + } + + /* normal text */ + COLOR_ONLY_SET(obj, cur.cache, clip); + DRAW_TEXT(0, 0); + } +} + +static void +evas_object_text_render_pre(Evas_Object *obj) +{ + Evas_Object_Text *o; + int is_v, was_v; + + /* dont pre-render the obj twice! */ + if (obj->pre_render_done) return; + obj->pre_render_done = 1; + /* pre-render phase. this does anything an object needs to do just before + rendering. This could mean loading the image data, retrieving it from + elsewhere, decoding video etc. + Then when this is done the object needs to figure if it changed and + if so what and where and add the appropriate redraw rectangles */ + o = (Evas_Object_Text *)(obj->object_data); + /* if someone is clipping this obj - go calculate the clipper */ + if (obj->cur.clipper) + { + if (obj->cur.cache.clip.dirty) + evas_object_clip_recalc(obj->cur.clipper); + obj->cur.clipper->func->render_pre(obj->cur.clipper); + } + /* now figure what changed and add draw rects + if it just became visible or invisible */ + is_v = evas_object_is_visible(obj); + was_v = evas_object_was_visible(obj); + if (is_v != was_v) + { + evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, + obj, is_v, was_v); + goto done; + } + if ((obj->cur.map != obj->prev.map) || + (obj->cur.usemap != obj->prev.usemap)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + obj); + goto done; + } + /* its not visible - we accounted for it appearing or not so just abort */ + if (!is_v) goto done; + /* clipper changed this is in addition to anything else for obj */ + evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); + /* if we restacked (layer or just within a layer) and dont clip anyone */ + if (obj->restack) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + obj); + goto done; + } + /* if it changed color */ + if ((obj->cur.color.r != obj->prev.color.r) || + (obj->cur.color.g != obj->prev.color.g) || + (obj->cur.color.b != obj->prev.color.b) || + (obj->cur.color.a != obj->prev.color.a)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + obj); + goto done; + } + /* if it changed geometry - and obviously not visibility or color + calculate differences since we have a constant color fill + we really only need to update the differences */ + if ((obj->cur.geometry.x != obj->prev.geometry.x) || + (obj->cur.geometry.y != obj->prev.geometry.y) || + (obj->cur.geometry.w != obj->prev.geometry.w) || + (obj->cur.geometry.h != obj->prev.geometry.h)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + obj); + goto done; + } + if (obj->cur.render_op != obj->prev.render_op) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + obj); + goto done; + } + if (obj->cur.scale != obj->prev.scale) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + obj); + goto done; + } + if (o->changed) + { + if ((o->cur.size != o->prev.size) || + ((o->cur.font != o->prev.font)) || + ((o->cur.utf8_text != o->prev.utf8_text)) || + ((o->cur.style != o->prev.style)) || + ((o->cur.shadow.r != o->prev.shadow.r)) || + ((o->cur.shadow.g != o->prev.shadow.g)) || + ((o->cur.shadow.b != o->prev.shadow.b)) || + ((o->cur.shadow.a != o->prev.shadow.a)) || + ((o->cur.outline.r != o->prev.outline.r)) || + ((o->cur.outline.g != o->prev.outline.g)) || + ((o->cur.outline.b != o->prev.outline.b)) || + ((o->cur.outline.a != o->prev.outline.a)) || + ((o->cur.glow.r != o->prev.glow.r)) || + ((o->cur.glow.g != o->prev.glow.g)) || + ((o->cur.glow.b != o->prev.glow.b)) || + ((o->cur.glow.a != o->prev.glow.a)) || + ((o->cur.glow2.r != o->prev.glow2.r)) || + ((o->cur.glow2.g != o->prev.glow2.g)) || + ((o->cur.glow2.b != o->prev.glow2.b)) || + ((o->cur.glow2.a != o->prev.glow2.a))) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, + obj); + goto done; + } + } + done: + evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, + obj, is_v, was_v); +} + +static void +evas_object_text_render_post(Evas_Object *obj) +{ + Evas_Object_Text *o; + + /* this moves the current data to the previous state parts of the object + in whatever way is safest for the object. also if we don't need object + data anymore we can free it if the object deems this is a good idea */ + o = (Evas_Object_Text *)(obj->object_data); + /* remove those pesky changes */ + evas_object_clip_changes_clean(obj); + /* move cur to prev safely for object data */ + obj->prev = obj->cur; + o->prev = o->cur; + o->changed = 0; +} + +static unsigned int +evas_object_text_id_get(Evas_Object *obj) +{ + Evas_Object_Text *o; + + o = (Evas_Object_Text *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_TEXT; +} + +static unsigned int +evas_object_text_visual_id_get(Evas_Object *obj) +{ + Evas_Object_Text *o; + + o = (Evas_Object_Text *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_SHAPE; +} + +static void * +evas_object_text_engine_data_get(Evas_Object *obj) +{ + Evas_Object_Text *o; + + o = (Evas_Object_Text *)(obj->object_data); + if (!o) return NULL; + return o->font; +} + +static int +evas_object_text_is_opaque(Evas_Object *obj __UNUSED__) +{ + /* this returns 1 if the internal object data implies that the object is + currently fully opaque over the entire gradient it occupies */ + return 0; +} + +static int +evas_object_text_was_opaque(Evas_Object *obj __UNUSED__) +{ + /* this returns 1 if the internal object data implies that the object was + currently fully opaque over the entire gradient it occupies */ + return 0; +} + +static void +evas_object_text_scale_update(Evas_Object *obj) +{ + Evas_Object_Text *o; + int size; + const char *font; + + o = (Evas_Object_Text *)(obj->object_data); + font = eina_stringshare_add(o->cur.font); + size = o->cur.size; + if (o->cur.font) eina_stringshare_del(o->cur.font); + o->cur.font = NULL; + o->prev.font = NULL; + o->cur.size = 0; + o->prev.size = 0; + evas_object_text_font_set(obj, font, size); +} + +void +_evas_object_text_rehint(Evas_Object *obj) +{ + Evas_Object_Text *o; + int is, was; + + o = (Evas_Object_Text *)(obj->object_data); + if (!o->font) return; +#ifdef EVAS_FRAME_QUEUING + evas_common_pipe_op_text_flush((RGBA_Font *) o->font); +#endif + evas_font_load_hinting_set(obj->layer->evas, o->font, + obj->layer->evas->hinting); + was = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + /* DO II */ + _evas_object_text_recalc(obj); + o->changed = 1; + evas_object_change(obj); + evas_object_clip_dirty(obj); + evas_object_coords_recalc(obj); + is = evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, 1, 1); + if ((is || was) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + evas_object_inform_call_resize(obj); +} + +static void +_evas_object_text_recalc(Evas_Object *obj) +{ + Evas_Object_Text *o; + Eina_Unicode *text = NULL; + o = (Evas_Object_Text *)(obj->object_data); + + if (o->items) _evas_object_text_items_clear(o); + if (o->cur.utf8_text) + text = eina_unicode_utf8_to_unicode(o->cur.utf8_text, + NULL); + + if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING); + + _evas_object_text_layout(obj, o, text); + + if (text) free(text); + + if ((o->font) && (o->items)) + { + int w, h; + int l = 0, r = 0, t = 0, b = 0; + + w = _evas_object_text_horiz_advance_get(obj, o); + h = _evas_object_text_vert_advance_get(obj, o); + evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); + obj->cur.geometry.w = w + l + r; + obj->cur.geometry.h = h + t + b; +//// obj->cur.cache.geometry.validity = 0; + } + else + { + int t = 0, b = 0; + + evas_text_style_pad_get(o->cur.style, NULL, NULL, &t, &b); + obj->cur.geometry.w = 0; + obj->cur.geometry.h = o->max_ascent + o->max_descent + t + b; +//// obj->cur.cache.geometry.validity = 0; + } +} + diff --git a/libraries/evas/src/lib/canvas/evas_object_textblock.c b/libraries/evas/src/lib/canvas/evas_object_textblock.c new file mode 100644 index 0000000..7941a45 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_object_textblock.c @@ -0,0 +1,9569 @@ +/** + * @internal + * @section Evas_Object_Textblock_Internal Internal Textblock Object Tutorial + * + * This explains the internal design of the Evas Textblock Object, it's assumed + * that the reader of this section has already read @ref Evas_Object_Textblock_Tutorial "Textblock's usage docs.". + * + * @subsection textblock_internal_intro Introduction + * There are two main parts to the textblock object, the first being the node + * system, and the second being the layout system. The former is just an + * internal representation of the markup text, while the latter is the internal + * visual representation of the text (i.e positioning, sizing, fonts and etc). + * + * @subsection textblock_nodes The Nodes system + * The nodes mechanism consists of two main data types: + * ::Evas_Object_Textblock_Node_Text and ::Evas_Object_Textblock_Node_Format + * the former is for Text nodes and the latter is for format nodes. + * There's always at least one text node, even if there are only formats. + * + * @subsection textblock_nodes_text Text nodes + * Each text node is essentially a paragraph, it includes an @ref Eina_UStrbuf + * that stores the actual paragraph text, a utf8 string to store the paragraph + * text in utf8 (which is not used internally at all), A pointer to it's + * main @ref textblock_nodes_format_internal "Format Node" and the paragraph's + * @ref evas_bidi_props "BiDi properties". The pointer to the format node may be + * NULL if there's no format node anywhere before the end of the text node, + * not even in previous text nodes. If not NULL, it points to the first format + * node pointing to text inside of the text node, or if there is none, it points + * to the previous's text nodes format node. Each paragraph has a format node + * representing a paragraph separator pointing to it's last position except + * for the last paragraph, which has no such constraint. This constraint + * happens because text nodes are paragraphs and paragraphs are delimited by + * paragraph separators. + * + * @subsection textblock_nodes_format_internal Format Nodes - Internal + * Each format node stores a group of format information, for example the + * markup: \ will all be inserted + * inside the same format node, altohugh it consists of different formatting + * commands. + * Each node has a pointer to it's text node, this pointer is NEVER NULL, even + * if there's only one format, and no text, a text node is created. Each format + * node includes an offset from the last format node of the same text node. For + * example, the markup "012" will create two format nodes, the first + * having an offset of 1 and the second an offset of 2. Each format node also + * includes a @ref Eina_Strbuf that includes the textual representation of the + * format, and a boolean stating if the format is a visible format or not, see + * @ref textblock_nodes_format_visible + * + * @subsection textblock_nodes_format_visible Visible Format Nodes + * There are two types of format nodes, visible and invisible. They are the same + * in every way, except for the representation in the text node. While invisible + * format nodes have no representation in the text node, the visible ones do. + * The Uniceode object replacement character (0xFFFC) is inserted to every place + * a visible format node points to. This makes it very easy to treat visible + * formats as items in the text, both for BiDi purposes and cursor handling + * purposes. + * Here are a few example visible an invisible formats: + * Visible: newline char, tab, paragraph separator and an embedded item. + * Invisible: setting the color, font or alignment of the text. + * + * @subsection textblock_layout The layout system + * @todo write @ref textblock_layout + */ +#include + +#include "evas_common.h" +#include "evas_private.h" + +#ifdef HAVE_LINEBREAK +#include "linebreak.h" +#endif + +/* save typing */ +#define ENFN obj->layer->evas->engine.func +#define ENDT obj->layer->evas->engine.data.output + +/* private magic number for textblock objects */ +static const char o_type[] = "textblock"; + +/* The char to be inserted instead of visible formats */ +#define EVAS_TEXTBLOCK_REPLACEMENT_CHAR 0xFFFC +#define _PARAGRAPH_SEPARATOR 0x2029 +#define EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(ch) \ + (((ch) == EVAS_TEXTBLOCK_REPLACEMENT_CHAR) || \ + ((ch) == '\n') || \ + ((ch) == '\t') || \ + ((ch) == _PARAGRAPH_SEPARATOR)) + +/* private struct for textblock object internal data */ +/** + * @internal + * @typedef Evas_Object_Textblock + * The actual textblock object. + */ +typedef struct _Evas_Object_Textblock Evas_Object_Textblock; +/** + * @internal + * @typedef Evas_Object_Style_Tag + * The structure used for finding style tags. + */ +typedef struct _Evas_Object_Style_Tag Evas_Object_Style_Tag; +/** + * @internal + * @typedef Evas_Object_Textblock_Node_Text + * A text node. + */ +typedef struct _Evas_Object_Textblock_Node_Text Evas_Object_Textblock_Node_Text; +/* + * Defined in Evas.h +typedef struct _Evas_Object_Textblock_Node_Format Evas_Object_Textblock_Node_Format; +*/ + +/** + * @internal + * @typedef Evas_Object_Textblock_Paragraph + * A layouting paragraph. + */ +typedef struct _Evas_Object_Textblock_Paragraph Evas_Object_Textblock_Paragraph; +/** + * @internal + * @typedef Evas_Object_Textblock_Line + * A layouting line. + */ +typedef struct _Evas_Object_Textblock_Line Evas_Object_Textblock_Line; +/** + * @internal + * @typedef Evas_Object_Textblock_Item + * A layouting item. + */ +typedef struct _Evas_Object_Textblock_Item Evas_Object_Textblock_Item; +/** + * @internal + * @typedef Evas_Object_Textblock_Item + * A layouting text item. + */ +typedef struct _Evas_Object_Textblock_Text_Item Evas_Object_Textblock_Text_Item; +/** + * @internal + * @typedef Evas_Object_Textblock_Format_Item + * A layouting format item. + */ +typedef struct _Evas_Object_Textblock_Format_Item Evas_Object_Textblock_Format_Item; +/** + * @internal + * @typedef Evas_Object_Textblock_Format + * A textblock format. + */ +typedef struct _Evas_Object_Textblock_Format Evas_Object_Textblock_Format; + +/** + * @internal + * @def IS_AT_END(ti, ind) + * Return true if ind is at the end of the text item, false otherwise. + */ +#define IS_AT_END(ti, ind) (ind == ti->text_props.text_len) + +/** + * @internal + * @def MOVE_PREV_UNTIL(limit, ind) + * This decrements ind as long as ind > limit. + */ +#define MOVE_PREV_UNTIL(limit, ind) \ + do \ + { \ + if ((limit) < (ind)) \ + (ind)--; \ + } \ + while (0) + +/** + * @internal + * @def MOVE_NEXT_UNTIL(limit, ind) + * This increments ind as long as ind < limit + */ +#define MOVE_NEXT_UNTIL(limit, ind) \ + do \ + { \ + if ((ind) < (limit)) \ + (ind)++; \ + } \ + while (0) + +/** + * @internal + * @def GET_ITEM_TEXT(ti) + * Returns a const reference to the text of the ti (not null terminated). + */ +#define GET_ITEM_TEXT(ti) \ + (((ti)->parent.text_node) ? \ + (eina_ustrbuf_string_get((ti)->parent.text_node->unicode) + \ + (ti)->parent.text_pos) : EINA_UNICODE_EMPTY_STRING) +/** + * @internal + * @def _FORMAT_IS_CLOSER_OF(base, closer, closer_len) + * Returns true if closer is the closer of base. + */ +#define _FORMAT_IS_CLOSER_OF(base, closer, closer_len) \ + (!strncmp(base + 1, closer, closer_len) && \ + (!base[closer_len + 1] || \ + (base[closer_len + 1] == '=') || \ + _is_white(base[closer_len + 1]))) + +/*FIXME: document the structs and struct items. */ +struct _Evas_Object_Style_Tag +{ + EINA_INLIST; + char *tag; + char *replace; + size_t tag_len; + size_t replace_len; +}; + +struct _Evas_Object_Textblock_Node_Text +{ + EINA_INLIST; + Eina_UStrbuf *unicode; + char *utf8; + Evas_Object_Textblock_Node_Format *format_node; + Evas_Object_Textblock_Paragraph *par; + Eina_Bool dirty : 1; + Eina_Bool is_new : 1; +}; + +struct _Evas_Object_Textblock_Node_Format +{ + EINA_INLIST; + const char *format; + const char *orig_format; + Evas_Object_Textblock_Node_Text *text_node; + size_t offset; + unsigned char anchor : 2; + Eina_Bool visible : 1; + Eina_Bool format_change : 1; + Eina_Bool is_new : 1; +}; + +#define ANCHOR_NONE 0 +#define ANCHOR_A 1 +#define ANCHOR_ITEM 2 + +/** + * @internal + * @def _NODE_TEXT(x) + * A convinience macro for casting to a text node. + */ +#define _NODE_TEXT(x) ((Evas_Object_Textblock_Node_Text *) (x)) +/** + * @internal + * @def _NODE_FORMAT(x) + * A convinience macro for casting to a format node. + */ +#define _NODE_FORMAT(x) ((Evas_Object_Textblock_Node_Format *) (x)) +/** + * @internal + * @def _ITEM(x) + * A convinience macro for casting to a generic item. + */ +#define _ITEM(x) ((Evas_Object_Textblock_Item *) (x)) +/** + * @internal + * @def _ITEM_TEXT(x) + * A convinience macro for casting to a text item. + */ +#define _ITEM_TEXT(x) ((Evas_Object_Textblock_Text_Item *) (x)) +/** + * @internal + * @def _ITEM_FORMAT(x) + * A convinience macro for casting to a format item. + */ +#define _ITEM_FORMAT(x) ((Evas_Object_Textblock_Format_Item *) (x)) + +struct _Evas_Object_Textblock_Paragraph +{ + EINA_INLIST; + Evas_Object_Textblock_Line *lines; + Evas_Object_Textblock_Node_Text *text_node; + Eina_List *logical_items; + Evas_BiDi_Paragraph_Props *bidi_props; /* Only valid during layout */ + Evas_BiDi_Direction direction; + Evas_Coord y, w, h; + int line_no; + Eina_Bool is_bidi : 1; + Eina_Bool visible : 1; + Eina_Bool rendered : 1; +}; + +struct _Evas_Object_Textblock_Line +{ + EINA_INLIST; + Evas_Object_Textblock_Item *items; + Evas_Object_Textblock_Paragraph *par; + Evas_Coord x, y, w, h; + int baseline; + int line_no; +}; + +typedef enum _Evas_Textblock_Item_Type +{ + EVAS_TEXTBLOCK_ITEM_TEXT, + EVAS_TEXTBLOCK_ITEM_FORMAT, +} Evas_Textblock_Item_Type; + +struct _Evas_Object_Textblock_Item +{ + EINA_INLIST; + Evas_Textblock_Item_Type type; + Evas_Object_Textblock_Node_Text *text_node; + Evas_Object_Textblock_Format *format; + size_t text_pos; +#ifdef BIDI_SUPPORT + size_t visual_pos; +#endif + Evas_Coord adv, x, w, h; + Eina_Bool merge : 1; /* Indicates whether this + item should merge to the + previous item or not */ + Eina_Bool visually_deleted : 1; + /* Indicates whether this + item is used in the visual + layout or not. */ +}; + +struct _Evas_Object_Textblock_Text_Item +{ + Evas_Object_Textblock_Item parent; + Evas_Text_Props text_props; + Evas_Coord inset; + Evas_Coord x_adjustment; /* Used to indicate by how + much we adjusted sizes */ +}; + +struct _Evas_Object_Textblock_Format_Item +{ + Evas_Object_Textblock_Item parent; + Evas_BiDi_Direction bidi_dir; + const char *item; + int y; + unsigned char vsize : 2; + unsigned char size : 2; + Eina_Bool formatme : 1; +}; + +struct _Evas_Object_Textblock_Format +{ + Evas_Object_Textblock_Node_Format *fnode; + double halign; + double valign; + struct { + Evas_Font_Description *fdesc; + const char *source; + Evas_Font_Set *font; + Evas_Font_Size size; + } font; + struct { + struct { + unsigned char r, g, b, a; + } normal, underline, underline2, underline_dash, outline, shadow, glow, glow2, backing, + strikethrough; + } color; + struct { + int l, r; + } margin; + int ref; + int tabstops; + int linesize; + int linegap; + int underline_dash_width; + int underline_dash_gap; + double linerelsize; + double linerelgap; + double linefill; + double ellipsis; + unsigned char style; + Eina_Bool wrap_word : 1; + Eina_Bool wrap_char : 1; + Eina_Bool wrap_mixed : 1; + Eina_Bool underline : 1; + Eina_Bool underline2 : 1; + Eina_Bool underline_dash : 1; + Eina_Bool strikethrough : 1; + Eina_Bool backing : 1; + Eina_Bool password : 1; + Eina_Bool halign_auto : 1; +}; + +struct _Evas_Textblock_Style +{ + const char *style_text; + char *default_tag; + Evas_Object_Style_Tag *tags; + Eina_List *objects; + Eina_Bool delete_me : 1; +}; + +struct _Evas_Textblock_Cursor +{ + Evas_Object *obj; + size_t pos; + Evas_Object_Textblock_Node_Text *node; +}; + +/* Size of the index array */ +#define TEXTBLOCK_PAR_INDEX_SIZE 10 +struct _Evas_Object_Textblock +{ + DATA32 magic; + Evas_Textblock_Style *style; + Evas_Textblock_Cursor *cursor; + Eina_List *cursors; + Evas_Object_Textblock_Node_Text *text_nodes; + Evas_Object_Textblock_Node_Format *format_nodes; + + int num_paragraphs; + Evas_Object_Textblock_Paragraph *paragraphs; + Evas_Object_Textblock_Paragraph *par_index[TEXTBLOCK_PAR_INDEX_SIZE]; + + Evas_Object_Textblock_Text_Item *ellip_ti; + Eina_List *anchors_a; + Eina_List *anchors_item; + int last_w, last_h; + struct { + int l, r, t, b; + } style_pad; + double valign; + char *markup_text; + void *engine_data; + const char *repch; + const char *bidi_delimiters; + struct { + int w, h; + Eina_Bool valid : 1; + } formatted, native; + Eina_Bool redraw : 1; + Eina_Bool changed : 1; + Eina_Bool content_changed : 1; + Eina_Bool format_changed : 1; + Eina_Bool have_ellipsis : 1; + Eina_Bool legacy_newline : 1; +}; + +/* private methods for textblock objects */ +static void evas_object_textblock_init(Evas_Object *obj); +static void *evas_object_textblock_new(void); +static void evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); +static void evas_object_textblock_free(Evas_Object *obj); +static void evas_object_textblock_render_pre(Evas_Object *obj); +static void evas_object_textblock_render_post(Evas_Object *obj); + +static unsigned int evas_object_textblock_id_get(Evas_Object *obj); +static unsigned int evas_object_textblock_visual_id_get(Evas_Object *obj); +static void *evas_object_textblock_engine_data_get(Evas_Object *obj); + +static int evas_object_textblock_is_opaque(Evas_Object *obj); +static int evas_object_textblock_was_opaque(Evas_Object *obj); + +static void evas_object_textblock_coords_recalc(Evas_Object *obj); + +static void evas_object_textblock_scale_update(Evas_Object *obj); + +static const Evas_Object_Func object_func = +{ + /* methods (compulsory) */ + evas_object_textblock_free, + evas_object_textblock_render, + evas_object_textblock_render_pre, + evas_object_textblock_render_post, + evas_object_textblock_id_get, + evas_object_textblock_visual_id_get, + evas_object_textblock_engine_data_get, + /* these are optional. NULL = nothing */ + NULL, + NULL, + NULL, + NULL, + evas_object_textblock_is_opaque, + evas_object_textblock_was_opaque, + NULL, + NULL, + evas_object_textblock_coords_recalc, + evas_object_textblock_scale_update, + NULL, + NULL, + NULL +}; + +/* the actual api call to add a textblock */ + +#define TB_HEAD() \ + Evas_Object_Textblock *o; \ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); \ + return; \ + MAGIC_CHECK_END(); \ + o = (Evas_Object_Textblock *)(obj->object_data); \ + MAGIC_CHECK(o, Evas_Object_Textblock, MAGIC_OBJ_TEXTBLOCK); \ + return; \ + MAGIC_CHECK_END(); + +#define TB_HEAD_RETURN(x) \ + Evas_Object_Textblock *o; \ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); \ + return (x); \ + MAGIC_CHECK_END(); \ + o = (Evas_Object_Textblock *)(obj->object_data); \ + MAGIC_CHECK(o, Evas_Object_Textblock, MAGIC_OBJ_TEXTBLOCK); \ + return (x); \ + MAGIC_CHECK_END(); + + + +static Eina_Bool _evas_textblock_cursor_is_at_the_end(const Evas_Textblock_Cursor *cur); +static void _evas_textblock_node_text_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *n); +static void _evas_textblock_node_text_remove_formats_between(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *n, int start, int end); +static Evas_Object_Textblock_Node_Format *_evas_textblock_cursor_node_format_before_or_at_pos_get(const Evas_Textblock_Cursor *cur); +static size_t _evas_textblock_node_format_pos_get(const Evas_Object_Textblock_Node_Format *fmt); +static void _evas_textblock_node_format_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Format *n, int visual_adjustment); +static void _evas_textblock_node_format_free(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Format *n); +static void _evas_textblock_node_text_free(Evas_Object_Textblock_Node_Text *n); +static void _evas_textblock_changed(Evas_Object_Textblock *o, Evas_Object *obj); +static void _evas_textblock_invalidate_all(Evas_Object_Textblock *o); +static void _evas_textblock_cursors_update_offset(const Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Text *n, size_t start, int offset); +static void _evas_textblock_cursors_set_node(Evas_Object_Textblock *o, const Evas_Object_Textblock_Node_Text *n, Evas_Object_Textblock_Node_Text *new_node); + +/* styles */ +/** + * @internal + * Clears the textblock style passed except for the style_text which is replaced. + * @param ts The ts to be cleared. Must not be NULL. + * @param style_text the style's text. + */ +static void +_style_replace(Evas_Textblock_Style *ts, const char *style_text) +{ + eina_stringshare_replace(&ts->style_text, style_text); + if (ts->default_tag) free(ts->default_tag); + while (ts->tags) + { + Evas_Object_Style_Tag *tag; + + tag = (Evas_Object_Style_Tag *)ts->tags; + ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); + free(tag->tag); + free(tag->replace); + free(tag); + } + ts->default_tag = NULL; + ts->tags = NULL; +} + +/** + * @internal + * Clears the textblock style passed. + * @param ts The ts to be cleared. Must not be NULL. + */ +static void +_style_clear(Evas_Textblock_Style *ts) +{ + _style_replace(ts, NULL); +} + +/** + * @internal + * Searches inside the tags stored in the style for the tag matching s. + * @param ts The ts to be cleared. Must not be NULL. + * @param s The tag to be matched. + * @param tag_len the length of the tag string. + * @param[out] replace_len The length of the replcaement found. - Must not be NULL. + * @return The replacement string found. + */ +static inline const char * +_style_match_tag(Evas_Textblock_Style *ts, const char *s, size_t tag_len, size_t *replace_len) +{ + Evas_Object_Style_Tag *tag; + + EINA_INLIST_FOREACH(ts->tags, tag) + { + if (tag->tag_len != tag_len) continue; + if (!strncmp(tag->tag, s, tag_len)) + { + *replace_len = tag->replace_len; + return tag->replace; + } + } + *replace_len = 0; + return NULL; +} + +/** + * @internal + * Clears all the nodes (text and format) of the textblock object. + * @param obj The evas object, must not be NULL. + */ +static void +_nodes_clear(const Evas_Object *obj) +{ + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + while (o->text_nodes) + { + Evas_Object_Textblock_Node_Text *n; + + n = o->text_nodes; + o->text_nodes = _NODE_TEXT(eina_inlist_remove( + EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(n))); + _evas_textblock_node_text_free(n); + } + while (o->format_nodes) + { + Evas_Object_Textblock_Node_Format *n; + + n = o->format_nodes; + o->format_nodes = _NODE_FORMAT(eina_inlist_remove(EINA_INLIST_GET(o->format_nodes), EINA_INLIST_GET(n))); + _evas_textblock_node_format_free(o, n); + } +} + +/** + * @internal + * Unrefs and frees (if needed) a textblock format. + * @param obj The Evas_Object, Must not be NULL. + * @param fmt the format to be cleaned, must not be NULL. + */ +static void +_format_unref_free(const Evas_Object *obj, Evas_Object_Textblock_Format *fmt) +{ + fmt->ref--; + if (fmt->ref > 0) return; + if (fmt->font.fdesc) evas_font_desc_unref(fmt->font.fdesc); + if (fmt->font.source) eina_stringshare_del(fmt->font.source); + evas_font_free(obj->layer->evas, fmt->font.font); + free(fmt); +} + +/** + * @internal + * Free a layout item + * @param obj The evas object, must not be NULL. + * @param ln the layout line on which the item is in, must not be NULL. + * @param it the layout item to be freed + */ +static void +_item_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln, Evas_Object_Textblock_Item *it) +{ + if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); + + evas_common_text_props_content_unref(&ti->text_props); + } + else + { + Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it); + + if (fi->item) eina_stringshare_del(fi->item); + } + _format_unref_free(obj, it->format); + if (ln) + { + ln->items = (Evas_Object_Textblock_Item *) eina_inlist_remove( + EINA_INLIST_GET(ln->items), EINA_INLIST_GET(ln->items)); + } + free(it); +} + +/** + * @internal + * Free a layout line. + * @param obj The evas object, must not be NULL. + * @param ln the layout line to be freed, must not be NULL. + */ +static void +_line_free(Evas_Object_Textblock_Line *ln) +{ + /* Items are freed from the logical list, except for the ellip item */ + if (ln) free(ln); +} + +/* table of html escapes (that i can find) this should be ordered with the + * most common first as it's a linear search to match - no hash for this. + * + * these are stored as one large string and one additional array that + * contains the offsets to the tokens for space efficiency. + */ +/** + * @internal + * @var escape_strings[] + * This string consists of NULL terminated pairs of strings, the first of + * every pair is an escape and the second is the value of the escape. + */ +static const char escape_strings[] = +/* most common escaped stuff */ +""\0" "\x22\0" +"&\0" "\x26\0" +"<\0" "\x3c\0" +">\0" "\x3e\0" +/* all the rest */ +" \0" "\xc2\xa0\0" +"¡\0" "\xc2\xa1\0" +"¢\0" "\xc2\xa2\0" +"£\0" "\xc2\xa3\0" +"¤\0" "\xc2\xa4\0" +"¥\0" "\xc2\xa5\0" +"¦\0" "\xc2\xa6\0" +"§\0" "\xc2\xa7\0" +"¨\0" "\xc2\xa8\0" +"©\0" "\xc2\xa9\0" +"ª\0" "\xc2\xaa\0" +"«\0" "\xc2\xab\0" +"¬\0" "\xc2\xac\0" +"®\0" "\xc2\xae\0" +"¯\0" "\xc2\xaf\0" +"°\0" "\xc2\xb0\0" +"±\0" "\xc2\xb1\0" +"²\0" "\xc2\xb2\0" +"³\0" "\xc2\xb3\0" +"´\0" "\xc2\xb4\0" +"µ\0" "\xc2\xb5\0" +"¶\0" "\xc2\xb6\0" +"·\0" "\xc2\xb7\0" +"¸\0" "\xc2\xb8\0" +"¹\0" "\xc2\xb9\0" +"º\0" "\xc2\xba\0" +"»\0" "\xc2\xbb\0" +"¼\0" "\xc2\xbc\0" +"½\0" "\xc2\xbd\0" +"¾\0" "\xc2\xbe\0" +"¿\0" "\xc2\xbf\0" +"À\0" "\xc3\x80\0" +"Á\0" "\xc3\x81\0" +"Â\0" "\xc3\x82\0" +"Ã\0" "\xc3\x83\0" +"Ä\0" "\xc3\x84\0" +"Å\0" "\xc3\x85\0" +"&Aelig;\0" "\xc3\x86\0" +"Ç\0" "\xc3\x87\0" +"È\0" "\xc3\x88\0" +"É\0" "\xc3\x89\0" +"Ê\0" "\xc3\x8a\0" +"Ë\0" "\xc3\x8b\0" +"Ì\0" "\xc3\x8c\0" +"Í\0" "\xc3\x8d\0" +"Î\0" "\xc3\x8e\0" +"Ï\0" "\xc3\x8f\0" +"&Eth;\0" "\xc3\x90\0" +"Ñ\0" "\xc3\x91\0" +"Ò\0" "\xc3\x92\0" +"Ó\0" "\xc3\x93\0" +"Ô\0" "\xc3\x94\0" +"Õ\0" "\xc3\x95\0" +"Ö\0" "\xc3\x96\0" +"×\0" "\xc3\x97\0" +"Ø\0" "\xc3\x98\0" +"Ù\0" "\xc3\x99\0" +"Ú\0" "\xc3\x9a\0" +"Û\0" "\xc3\x9b\0" +"Ý\0" "\xc3\x9d\0" +"&Thorn;\0" "\xc3\x9e\0" +"ß\0" "\xc3\x9f\0" +"à\0" "\xc3\xa0\0" +"á\0" "\xc3\xa1\0" +"â\0" "\xc3\xa2\0" +"ã\0" "\xc3\xa3\0" +"ä\0" "\xc3\xa4\0" +"å\0" "\xc3\xa5\0" +"æ\0" "\xc3\xa6\0" +"ç\0" "\xc3\xa7\0" +"è\0" "\xc3\xa8\0" +"é\0" "\xc3\xa9\0" +"ê\0" "\xc3\xaa\0" +"ë\0" "\xc3\xab\0" +"ì\0" "\xc3\xac\0" +"í\0" "\xc3\xad\0" +"î\0" "\xc3\xae\0" +"ï\0" "\xc3\xaf\0" +"ð\0" "\xc3\xb0\0" +"ñ\0" "\xc3\xb1\0" +"ò\0" "\xc3\xb2\0" +"ó\0" "\xc3\xb3\0" +"ô\0" "\xc3\xb4\0" +"õ\0" "\xc3\xb5\0" +"ö\0" "\xc3\xb6\0" +"÷\0" "\xc3\xb7\0" +"ø\0" "\xc3\xb8\0" +"ù\0" "\xc3\xb9\0" +"ú\0" "\xc3\xba\0" +"û\0" "\xc3\xbb\0" +"ü\0" "\xc3\xbc\0" +"ý\0" "\xc3\xbd\0" +"þ\0" "\xc3\xbe\0" +"ÿ\0" "\xc3\xbf\0" +"α\0" "\xce\x91\0" +"β\0" "\xce\x92\0" +"γ\0" "\xce\x93\0" +"δ\0" "\xce\x94\0" +"ε\0" "\xce\x95\0" +"ζ\0" "\xce\x96\0" +"η\0" "\xce\x97\0" +"θ\0" "\xce\x98\0" +"ι\0" "\xce\x99\0" +"κ\0" "\xce\x9a\0" +"λ\0" "\xce\x9b\0" +"μ\0" "\xce\x9c\0" +"ν\0" "\xce\x9d\0" +"ξ\0" "\xce\x9e\0" +"ο\0" "\xce\x9f\0" +"π\0" "\xce\xa0\0" +"ρ\0" "\xce\xa1\0" +"σ\0" "\xce\xa3\0" +"τ\0" "\xce\xa4\0" +"υ\0" "\xce\xa5\0" +"φ\0" "\xce\xa6\0" +"χ\0" "\xce\xa7\0" +"ψ\0" "\xce\xa8\0" +"ω\0" "\xce\xa9\0" +"…\0" "\xe2\x80\xa6\0" +"€\0" "\xe2\x82\xac\0" +"←\0" "\xe2\x86\x90\0" +"↑\0" "\xe2\x86\x91\0" +"→\0" "\xe2\x86\x92\0" +"↓\0" "\xe2\x86\x93\0" +"↔\0" "\xe2\x86\x94\0" +"←\0" "\xe2\x87\x90\0" +"→\0" "\xe2\x87\x92\0" +"∀\0" "\xe2\x88\x80\0" +"∃\0" "\xe2\x88\x83\0" +"∇\0" "\xe2\x88\x87\0" +"∏\0" "\xe2\x88\x8f\0" +"∑\0" "\xe2\x88\x91\0" +"∧\0" "\xe2\x88\xa7\0" +"∨\0" "\xe2\x88\xa8\0" +"∫\0" "\xe2\x88\xab\0" +"≠\0" "\xe2\x89\xa0\0" +"≡\0" "\xe2\x89\xa1\0" +"⊕\0" "\xe2\x8a\x95\0" +"⊥\0" "\xe2\x8a\xa5\0" +"†\0" "\xe2\x80\xa0\0" +"‡\0" "\xe2\x80\xa1\0" +"•\0" "\xe2\x80\xa2\0" +; + +EVAS_MEMPOOL(_mp_obj); + +/** + * @internal + * Checks if a char is a whitespace. + * @param c the unicode codepoint. + * @return EINA_TRUE if the unicode codepoint is a whitespace, EINA_FALSE otherwise. + */ +static Eina_Bool +_is_white(Eina_Unicode c) +{ + /* + * unicode list of whitespace chars + * + * 0009..000D .. + * 0020 SPACE + * 0085 + * 00A0 NO-BREAK SPACE + * 1680 OGHAM SPACE MARK + * 180E MONGOLIAN VOWEL SEPARATOR + * 2000..200A EN QUAD..HAIR SPACE + * 2028 LINE SEPARATOR + * 2029 PARAGRAPH SEPARATOR + * 202F NARROW NO-BREAK SPACE + * 205F MEDIUM MATHEMATICAL SPACE + * 3000 IDEOGRAPHIC SPACE + */ + if ( + (c == 0x20) || + ((c >= 0x9) && (c <= 0xd)) || + (c == 0x85) || + (c == 0xa0) || + (c == 0x1680) || + (c == 0x180e) || + ((c >= 0x2000) && (c <= 0x200a)) || + (c == 0x2028) || + (c == 0x2029) || + (c == 0x202f) || + (c == 0x205f) || + (c == 0x3000) + ) + return EINA_TRUE; + return EINA_FALSE; +} + +/** + * @internal + * Prepends the text between s and p to the main cursor of the object. + * + * @param cur the cursor to prepend to. + * @param[in] s start of the string + * @param[in] p end of the string + */ +static void +_prepend_text_run(Evas_Textblock_Cursor *cur, const char *s, const char *p) +{ + if ((s) && (p > s)) + { + char *ts; + + ts = alloca(p - s + 1); + strncpy(ts, s, p - s); + ts[p - s] = 0; + evas_textblock_cursor_text_prepend(cur, ts); + } +} + + +/** + * @internal + * Returns the numeric value of HEX chars for example for ch = 'A' + * the function will return 10. + * + * @param ch The HEX char. + * @return numeric value of HEX. + */ +static int +_hex_string_get(char ch) +{ + if ((ch >= '0') && (ch <= '9')) return (ch - '0'); + else if ((ch >= 'A') && (ch <= 'F')) return (ch - 'A' + 10); + else if ((ch >= 'a') && (ch <= 'f')) return (ch - 'a' + 10); + return 0; +} + +/** + * @internal + * Parses a string of one of the formas: + * 1. "#RRGGBB" + * 2. "#RRGGBBAA" + * 3. "#RGB" + * 4. "#RGBA" + * To the rgba values. + * + * @param[in] str The string to parse - NOT NULL. + * @param[out] r The Red value - NOT NULL. + * @param[out] g The Green value - NOT NULL. + * @param[out] b The Blue value - NOT NULL. + * @param[out] a The Alpha value - NOT NULL. + */ +static void +_format_color_parse(const char *str, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a) +{ + int slen; + + slen = strlen(str); + *r = *g = *b = *a = 0; + + if (slen == 7) /* #RRGGBB */ + { + *r = (_hex_string_get(str[1]) << 4) | (_hex_string_get(str[2])); + *g = (_hex_string_get(str[3]) << 4) | (_hex_string_get(str[4])); + *b = (_hex_string_get(str[5]) << 4) | (_hex_string_get(str[6])); + *a = 0xff; + } + else if (slen == 9) /* #RRGGBBAA */ + { + *r = (_hex_string_get(str[1]) << 4) | (_hex_string_get(str[2])); + *g = (_hex_string_get(str[3]) << 4) | (_hex_string_get(str[4])); + *b = (_hex_string_get(str[5]) << 4) | (_hex_string_get(str[6])); + *a = (_hex_string_get(str[7]) << 4) | (_hex_string_get(str[8])); + } + else if (slen == 4) /* #RGB */ + { + *r = _hex_string_get(str[1]); + *r = (*r << 4) | *r; + *g = _hex_string_get(str[2]); + *g = (*g << 4) | *g; + *b = _hex_string_get(str[3]); + *b = (*b << 4) | *b; + *a = 0xff; + } + else if (slen == 5) /* #RGBA */ + { + *r = _hex_string_get(str[1]); + *r = (*r << 4) | *r; + *g = _hex_string_get(str[2]); + *g = (*g << 4) | *g; + *b = _hex_string_get(str[3]); + *b = (*b << 4) | *b; + *a = _hex_string_get(str[4]); + *a = (*a << 4) | *a; + } + *r = (*r * *a) / 255; + *g = (*g * *a) / 255; + *b = (*b * *a) / 255; +} + +/* The refcount for the formats. */ +static int format_refcount = 0; +/* Holders for the stringshares */ +static const char *fontstr = NULL; +static const char *font_fallbacksstr = NULL; +static const char *font_sizestr = NULL; +static const char *font_sourcestr = NULL; +static const char *font_weightstr = NULL; +static const char *font_stylestr = NULL; +static const char *font_widthstr = NULL; +static const char *langstr = NULL; +static const char *colorstr = NULL; +static const char *underline_colorstr = NULL; +static const char *underline2_colorstr = NULL; +static const char *underline_dash_colorstr = NULL; +static const char *outline_colorstr = NULL; +static const char *shadow_colorstr = NULL; +static const char *glow_colorstr = NULL; +static const char *glow2_colorstr = NULL; +static const char *backing_colorstr = NULL; +static const char *strikethrough_colorstr = NULL; +static const char *alignstr = NULL; +static const char *valignstr = NULL; +static const char *wrapstr = NULL; +static const char *left_marginstr = NULL; +static const char *right_marginstr = NULL; +static const char *underlinestr = NULL; +static const char *strikethroughstr = NULL; +static const char *backingstr = NULL; +static const char *stylestr = NULL; +static const char *tabstopsstr = NULL; +static const char *linesizestr = NULL; +static const char *linerelsizestr = NULL; +static const char *linegapstr = NULL; +static const char *linerelgapstr = NULL; +static const char *itemstr = NULL; +static const char *linefillstr = NULL; +static const char *ellipsisstr = NULL; +static const char *passwordstr = NULL; +static const char *underline_dash_widthstr = NULL; +static const char *underline_dash_gapstr = NULL; + +/** + * @internal + * Init the format strings. + */ +static void +_format_command_init(void) +{ + if (format_refcount == 0) + { + fontstr = eina_stringshare_add("font"); + font_fallbacksstr = eina_stringshare_add("font_fallbacks"); + font_sizestr = eina_stringshare_add("font_size"); + font_sourcestr = eina_stringshare_add("font_source"); + font_weightstr = eina_stringshare_add("font_weight"); + font_stylestr = eina_stringshare_add("font_style"); + font_widthstr = eina_stringshare_add("font_width"); + langstr = eina_stringshare_add("lang"); + colorstr = eina_stringshare_add("color"); + underline_colorstr = eina_stringshare_add("underline_color"); + underline2_colorstr = eina_stringshare_add("underline2_color"); + underline_dash_colorstr = eina_stringshare_add("underline_dash_color"); + outline_colorstr = eina_stringshare_add("outline_color"); + shadow_colorstr = eina_stringshare_add("shadow_color"); + glow_colorstr = eina_stringshare_add("glow_color"); + glow2_colorstr = eina_stringshare_add("glow2_color"); + backing_colorstr = eina_stringshare_add("backing_color"); + strikethrough_colorstr = eina_stringshare_add("strikethrough_color"); + alignstr = eina_stringshare_add("align"); + valignstr = eina_stringshare_add("valign"); + wrapstr = eina_stringshare_add("wrap"); + left_marginstr = eina_stringshare_add("left_margin"); + right_marginstr = eina_stringshare_add("right_margin"); + underlinestr = eina_stringshare_add("underline"); + strikethroughstr = eina_stringshare_add("strikethrough"); + backingstr = eina_stringshare_add("backing"); + stylestr = eina_stringshare_add("style"); + tabstopsstr = eina_stringshare_add("tabstops"); + linesizestr = eina_stringshare_add("linesize"); + linerelsizestr = eina_stringshare_add("linerelsize"); + linegapstr = eina_stringshare_add("linegap"); + linerelgapstr = eina_stringshare_add("linerelgap"); + itemstr = eina_stringshare_add("item"); + linefillstr = eina_stringshare_add("linefill"); + ellipsisstr = eina_stringshare_add("ellipsis"); + passwordstr = eina_stringshare_add("password"); + underline_dash_widthstr = eina_stringshare_add("underline_dash_width"); + underline_dash_gapstr = eina_stringshare_add("underline_dash_gap"); + } + format_refcount++; +} + +/** + * @internal + * Shutdown the format strings. + */ +static void +_format_command_shutdown(void) +{ + if (--format_refcount > 0) return; + + eina_stringshare_del(fontstr); + eina_stringshare_del(font_fallbacksstr); + eina_stringshare_del(font_sizestr); + eina_stringshare_del(font_sourcestr); + eina_stringshare_del(font_weightstr); + eina_stringshare_del(font_stylestr); + eina_stringshare_del(font_widthstr); + eina_stringshare_del(langstr); + eina_stringshare_del(colorstr); + eina_stringshare_del(underline_colorstr); + eina_stringshare_del(underline2_colorstr); + eina_stringshare_del(underline_dash_colorstr); + eina_stringshare_del(outline_colorstr); + eina_stringshare_del(shadow_colorstr); + eina_stringshare_del(glow_colorstr); + eina_stringshare_del(glow2_colorstr); + eina_stringshare_del(backing_colorstr); + eina_stringshare_del(strikethrough_colorstr); + eina_stringshare_del(alignstr); + eina_stringshare_del(valignstr); + eina_stringshare_del(wrapstr); + eina_stringshare_del(left_marginstr); + eina_stringshare_del(right_marginstr); + eina_stringshare_del(underlinestr); + eina_stringshare_del(strikethroughstr); + eina_stringshare_del(backingstr); + eina_stringshare_del(stylestr); + eina_stringshare_del(tabstopsstr); + eina_stringshare_del(linesizestr); + eina_stringshare_del(linerelsizestr); + eina_stringshare_del(linegapstr); + eina_stringshare_del(linerelgapstr); + eina_stringshare_del(itemstr); + eina_stringshare_del(linefillstr); + eina_stringshare_del(ellipsisstr); + eina_stringshare_del(passwordstr); + eina_stringshare_del(underline_dash_widthstr); + eina_stringshare_del(underline_dash_gapstr); +} + +/** + * @internal + * Copies str to dst while removing the \\ char, i.e unescape the escape sequences. + * + * @param[out] dst the destination string - Should not be NULL. + * @param[in] src the source string - Should not be NULL. + */ +static void +_format_clean_param(char *dst, const char *src) +{ + const char *ss; + char *ds; + + ds = dst; + for (ss = src; *ss; ss++, ds++) + { + if ((*ss == '\\') && *(ss + 1)) ss++; + *ds = *ss; + } + *ds = 0; +} + +/** + * @internal + * Parses the cmd and parameter and adds the parsed format to fmt. + * + * @param obj the evas object - should not be NULL. + * @param fmt The format to populate - should not be NULL. + * @param[in] cmd the command to process, should be stringshared. + * @param[in] param the parameter of the command. + */ +static void +_format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char *cmd, const char *param) +{ + int len; + char *tmp_param; + + len = strlen(param); + tmp_param = alloca(len + 1); + + _format_clean_param(tmp_param, param); + + /* If we are changing the font, create the fdesc. */ + if ((cmd == font_weightstr) || (cmd == font_widthstr) || + (cmd == font_stylestr) || (cmd == langstr) || + (cmd == fontstr) || (cmd == font_fallbacksstr)) + { + if (!fmt->font.fdesc) + { + fmt->font.fdesc = evas_font_desc_new(); + } + else if (!fmt->font.fdesc->is_new) + { + Evas_Font_Description *old = fmt->font.fdesc; + fmt->font.fdesc = evas_font_desc_dup(fmt->font.fdesc); + if (old) evas_font_desc_unref(old); + } + } + + + if (cmd == fontstr) + { + evas_font_name_parse(fmt->font.fdesc, tmp_param); + } + else if (cmd == font_fallbacksstr) + { + eina_stringshare_replace(&(fmt->font.fdesc->fallbacks), tmp_param); + } + else if (cmd == font_sizestr) + { + int v; + + v = atoi(tmp_param); + if (v != fmt->font.size) + { + fmt->font.size = v; + } + } + else if (cmd == font_sourcestr) + { + if ((!fmt->font.source) || + ((fmt->font.source) && (strcmp(fmt->font.source, tmp_param)))) + { + if (fmt->font.source) eina_stringshare_del(fmt->font.source); + fmt->font.source = eina_stringshare_add(tmp_param); + } + } + else if (cmd == font_weightstr) + { + fmt->font.fdesc->weight = evas_font_style_find(tmp_param, + tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_WEIGHT); + } + else if (cmd == font_stylestr) + { + fmt->font.fdesc->slant = evas_font_style_find(tmp_param, + tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_SLANT); + } + else if (cmd == font_widthstr) + { + fmt->font.fdesc->width = evas_font_style_find(tmp_param, + tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_WIDTH); + } + else if (cmd == langstr) + { + eina_stringshare_replace(&(fmt->font.fdesc->lang), tmp_param); + } + else if (cmd == colorstr) + _format_color_parse(tmp_param, + &(fmt->color.normal.r), &(fmt->color.normal.g), + &(fmt->color.normal.b), &(fmt->color.normal.a)); + else if (cmd == underline_colorstr) + _format_color_parse(tmp_param, + &(fmt->color.underline.r), &(fmt->color.underline.g), + &(fmt->color.underline.b), &(fmt->color.underline.a)); + else if (cmd == underline2_colorstr) + _format_color_parse(tmp_param, + &(fmt->color.underline2.r), &(fmt->color.underline2.g), + &(fmt->color.underline2.b), &(fmt->color.underline2.a)); + else if (cmd == underline_dash_colorstr) + _format_color_parse(tmp_param, + &(fmt->color.underline_dash.r), &(fmt->color.underline_dash.g), + &(fmt->color.underline_dash.b), &(fmt->color.underline_dash.a)); + else if (cmd == outline_colorstr) + _format_color_parse(tmp_param, + &(fmt->color.outline.r), &(fmt->color.outline.g), + &(fmt->color.outline.b), &(fmt->color.outline.a)); + else if (cmd == shadow_colorstr) + _format_color_parse(tmp_param, + &(fmt->color.shadow.r), &(fmt->color.shadow.g), + &(fmt->color.shadow.b), &(fmt->color.shadow.a)); + else if (cmd == glow_colorstr) + _format_color_parse(tmp_param, + &(fmt->color.glow.r), &(fmt->color.glow.g), + &(fmt->color.glow.b), &(fmt->color.glow.a)); + else if (cmd == glow2_colorstr) + _format_color_parse(tmp_param, + &(fmt->color.glow2.r), &(fmt->color.glow2.g), + &(fmt->color.glow2.b), &(fmt->color.glow2.a)); + else if (cmd == backing_colorstr) + _format_color_parse(tmp_param, + &(fmt->color.backing.r), &(fmt->color.backing.g), + &(fmt->color.backing.b), &(fmt->color.backing.a)); + else if (cmd == strikethrough_colorstr) + _format_color_parse(tmp_param, + &(fmt->color.strikethrough.r), &(fmt->color.strikethrough.g), + &(fmt->color.strikethrough.b), &(fmt->color.strikethrough.a)); + else if (cmd == alignstr) + { + if (!strcmp(tmp_param, "auto")) + { + fmt->halign_auto = EINA_TRUE; + } + else + { + if (!strcmp(tmp_param, "middle")) fmt->halign = 0.5; + else if (!strcmp(tmp_param, "center")) fmt->halign = 0.5; + else if (!strcmp(tmp_param, "left")) fmt->halign = 0.0; + else if (!strcmp(tmp_param, "right")) fmt->halign = 1.0; + else + { + char *endptr = NULL; + double val = strtod(tmp_param, &endptr); + if (endptr) + { + while (*endptr && _is_white(*endptr)) + endptr++; + if (*endptr == '%') + val /= 100.0; + } + fmt->halign = val; + if (fmt->halign < 0.0) fmt->halign = 0.0; + else if (fmt->halign > 1.0) fmt->halign = 1.0; + } + fmt->halign_auto = EINA_FALSE; + } + } + else if (cmd == valignstr) + { + if (!strcmp(tmp_param, "top")) fmt->valign = 0.0; + else if (!strcmp(tmp_param, "middle")) fmt->valign = 0.5; + else if (!strcmp(tmp_param, "center")) fmt->valign = 0.5; + else if (!strcmp(tmp_param, "bottom")) fmt->valign = 1.0; + else if (!strcmp(tmp_param, "baseline")) fmt->valign = -1.0; + else if (!strcmp(tmp_param, "base")) fmt->valign = -1.0; + else + { + char *endptr = NULL; + double val = strtod(tmp_param, &endptr); + if (endptr) + { + while (*endptr && _is_white(*endptr)) + endptr++; + if (*endptr == '%') + val /= 100.0; + } + fmt->valign = val; + if (fmt->valign < 0.0) fmt->valign = 0.0; + else if (fmt->valign > 1.0) fmt->valign = 1.0; + } + } + else if (cmd == wrapstr) + { + if (!strcmp(tmp_param, "word")) + { + fmt->wrap_word = 1; + fmt->wrap_char = fmt->wrap_mixed = 0; + } + else if (!strcmp(tmp_param, "char")) + { + fmt->wrap_word = fmt->wrap_mixed = 0; + fmt->wrap_char = 1; + } + else if (!strcmp(tmp_param, "mixed")) + { + fmt->wrap_word = fmt->wrap_char = 0; + fmt->wrap_mixed = 1; + } + else + { + fmt->wrap_word = fmt->wrap_mixed = fmt->wrap_char = 0; + } + } + else if (cmd == left_marginstr) + { + if (!strcmp(tmp_param, "reset")) + fmt->margin.l = 0; + else + { + if (tmp_param[0] == '+') + fmt->margin.l += atoi(&(tmp_param[1])); + else if (tmp_param[0] == '-') + fmt->margin.l -= atoi(&(tmp_param[1])); + else + fmt->margin.l = atoi(tmp_param); + if (fmt->margin.l < 0) fmt->margin.l = 0; + } + } + else if (cmd == right_marginstr) + { + if (!strcmp(tmp_param, "reset")) + fmt->margin.r = 0; + else + { + if (tmp_param[0] == '+') + fmt->margin.r += atoi(&(tmp_param[1])); + else if (tmp_param[0] == '-') + fmt->margin.r -= atoi(&(tmp_param[1])); + else + fmt->margin.r = atoi(tmp_param); + if (fmt->margin.r < 0) fmt->margin.r = 0; + } + } + else if (cmd == underlinestr) + { + if (!strcmp(tmp_param, "off")) + { + fmt->underline = 0; + fmt->underline2 = 0; + } + else if ((!strcmp(tmp_param, "on")) || + (!strcmp(tmp_param, "single"))) + { + fmt->underline = 1; + fmt->underline2 = 0; + } + else if (!strcmp(tmp_param, "double")) + { + fmt->underline = 1; + fmt->underline2 = 1; + } + else if (!strcmp(tmp_param, "dashed")) + fmt->underline_dash = 1; + } + else if (cmd == strikethroughstr) + { + if (!strcmp(tmp_param, "off")) + fmt->strikethrough = 0; + else if (!strcmp(tmp_param, "on")) + fmt->strikethrough = 1; + } + else if (cmd == backingstr) + { + if (!strcmp(tmp_param, "off")) + fmt->backing = 0; + else if (!strcmp(tmp_param, "on")) + fmt->backing = 1; + } + else if (cmd == stylestr) + { + char *p1, *p2, *p, *pp; + + p1 = alloca(len + 1); + *p1 = 0; + p2 = alloca(len + 1); + *p2 = 0; + /* no comma */ + if (!strstr(tmp_param, ",")) p1 = tmp_param; + else + { + /* split string "str1,str2" into p1 and p2 (if we have more than + * 1 str2 eg "str1,str2,str3,str4" then we don't care. p2 just + * ends up being the last one as right now it's only valid to have + * 1 comma and 2 strings */ + pp = p1; + for (p = tmp_param; *p; p++) + { + if (*p == ',') + { + *pp = 0; + pp = p2; + continue; + } + *pp = *p; + pp++; + } + *pp = 0; + } + if (!strcmp(p1, "off")) fmt->style = EVAS_TEXT_STYLE_PLAIN; + else if (!strcmp(p1, "none")) fmt->style = EVAS_TEXT_STYLE_PLAIN; + else if (!strcmp(p1, "plain")) fmt->style = EVAS_TEXT_STYLE_PLAIN; + else if (!strcmp(p1, "shadow")) fmt->style = EVAS_TEXT_STYLE_SHADOW; + else if (!strcmp(p1, "outline")) fmt->style = EVAS_TEXT_STYLE_OUTLINE; + else if (!strcmp(p1, "soft_outline")) fmt->style = EVAS_TEXT_STYLE_SOFT_OUTLINE; + else if (!strcmp(p1, "outline_shadow")) fmt->style = EVAS_TEXT_STYLE_OUTLINE_SHADOW; + else if (!strcmp(p1, "outline_soft_shadow")) fmt->style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW; + else if (!strcmp(p1, "glow")) fmt->style = EVAS_TEXT_STYLE_GLOW; + else if (!strcmp(p1, "far_shadow")) fmt->style = EVAS_TEXT_STYLE_FAR_SHADOW; + else if (!strcmp(p1, "soft_shadow")) fmt->style = EVAS_TEXT_STYLE_SOFT_SHADOW; + else if (!strcmp(p1, "far_soft_shadow")) fmt->style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW; + else fmt->style = EVAS_TEXT_STYLE_PLAIN; + + if (*p2) + { + if (!strcmp(p2, "bottom_right")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT); + else if (!strcmp(p2, "bottom")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM); + else if (!strcmp(p2, "bottom_left")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT); + else if (!strcmp(p2, "left")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT); + else if (!strcmp(p2, "top_left")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT); + else if (!strcmp(p2, "top")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP); + else if (!strcmp(p2, "top_right")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT); + else if (!strcmp(p2, "right")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT); + else EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT); + } + } + else if (cmd == tabstopsstr) + { + fmt->tabstops = atoi(tmp_param); + if (fmt->tabstops < 1) fmt->tabstops = 1; + } + else if (cmd == linesizestr) + { + fmt->linesize = atoi(tmp_param); + fmt->linerelsize = 0.0; + } + else if (cmd == linerelsizestr) + { + char *endptr = NULL; + double val = strtod(tmp_param, &endptr); + if (endptr) + { + while (*endptr && _is_white(*endptr)) + endptr++; + if (*endptr == '%') + { + fmt->linerelsize = val / 100.0; + fmt->linesize = 0; + if (fmt->linerelsize < 0.0) fmt->linerelsize = 0.0; + } + } + } + else if (cmd == linegapstr) + { + fmt->linegap = atoi(tmp_param); + fmt->linerelgap = 0.0; + } + else if (cmd == linerelgapstr) + { + char *endptr = NULL; + double val = strtod(tmp_param, &endptr); + if (endptr) + { + while (*endptr && _is_white(*endptr)) + endptr++; + if (*endptr == '%') + { + fmt->linerelgap = val / 100.0; + fmt->linegap = 0; + if (fmt->linerelgap < 0.0) fmt->linerelgap = 0.0; + } + } + } + else if (cmd == itemstr) + { + // itemstr == replacement object items in textblock - inline imges + // for example + } + else if (cmd == linefillstr) + { + char *endptr = NULL; + double val = strtod(tmp_param, &endptr); + if (endptr) + { + while (*endptr && _is_white(*endptr)) + endptr++; + if (*endptr == '%') + { + fmt->linefill = val / 100.0; + if (fmt->linefill < 0.0) fmt->linefill = 0.0; + } + } + } + else if (cmd == ellipsisstr) + { + char *endptr = NULL; + fmt->ellipsis = strtod(tmp_param, &endptr); + if ((fmt->ellipsis < 0.0) || (fmt->ellipsis > 1.0)) + fmt->ellipsis = -1.0; + else + { + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + o->have_ellipsis = 1; + } + } + else if (cmd == passwordstr) + { + if (!strcmp(tmp_param, "off")) + fmt->password = 0; + else if (!strcmp(tmp_param, "on")) + fmt->password = 1; + } + else if (cmd == underline_dash_widthstr) + { + fmt->underline_dash_width = atoi(tmp_param); + if (fmt->underline_dash_width <= 0) fmt->underline_dash_width = 1; + } + else if (cmd == underline_dash_gapstr) + { + fmt->underline_dash_gap = atoi(tmp_param); + if (fmt->underline_dash_gap <= 0) fmt->underline_dash_gap = 1; + } +} + +/** + * @internal + * Returns #EINA_TRUE if the item is a format parameter, #EINA_FALSE otherwise. + * + * @param[in] item the item to check - Not NULL. + */ +static Eina_Bool +_format_is_param(const char *item) +{ + if (strchr(item, '=')) return EINA_TRUE; + return EINA_FALSE; +} + +/** + * @internal + * Parse the format item and populate key and val with the stringshares that + * corrospond to the formats parsed. + * It expects item to be of the structure: + * "key=val" + * + * @param[in] item the item to parse - Not NULL. + * @param[out] key where to store the key at - Not NULL. + * @param[out] val where to store the value at - Not NULL. + */ +static void +_format_param_parse(const char *item, const char **key, const char **val) +{ + const char *start, *end, *quote; + + start = strchr(item, '='); + *key = eina_stringshare_add_length(item, start - item); + start++; /* Advance after the '=' */ + /* If we can find a quote, our new delimiter is a quote, not a space. */ + if ((quote = strchr(start, '\''))) + { + start = quote + 1; + end = strchr(start, '\''); + } + else + { + end = strchr(start, ' '); + } + + /* Null terminate before the spaces */ + if (end) + { + *val = eina_stringshare_add_length(start, end - start); + } + else + { + *val = eina_stringshare_add(start); + } +} + +/** + * @internal + * This function parses the format passed in *s and advances s to point to the + * next format item, while returning the current one as the return value. + * @param s The current and returned position in the format string. + * @return the current item parsed from the string. + */ +static const char * +_format_parse(const char **s) +{ + const char *p; + const char *s1 = NULL, *s2 = NULL; + Eina_Bool quote = EINA_FALSE;; + + p = *s; + if (*p == 0) return NULL; + for (;;) + { + if (!s1) + { + if (*p != ' ') s1 = p; + if (*p == 0) break; + } + else if (!s2) + { + if (*p == '\'') + { + quote = !quote; + } + + if ((p > *s) && (p[-1] != '\\') && (!quote)) + { + if (*p == ' ') s2 = p; + } + if (*p == 0) s2 = p; + } + p++; + if (s1 && s2) + { + *s = s2; + return s1; + } + } + *s = p; + return NULL; +} + +/** + * @internal + * Parse the format str and populate fmt with the formats found. + * + * @param obj The evas object - Not NULL. + * @param[out] fmt The format to populate - Not NULL. + * @param[in] str the string to parse.- Not NULL. + */ +static void +_format_fill(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char *str) +{ + const char *s; + const char *item; + + s = str; + + /* get rid of anything +s or -s off the start of the string */ + while ((*s == ' ') || (*s == '+') || (*s == '-')) s++; + + while ((item = _format_parse(&s))) + { + if (_format_is_param(item)) + { + const char *key = NULL, *val = NULL; + + _format_param_parse(item, &key, &val); + _format_command(obj, fmt, key, val); + eina_stringshare_del(key); + eina_stringshare_del(val); + } + else + { + /* immediate - not handled here */ + } + } +} + +/** + * @internal + * Duplicate a format and return the duplicate. + * + * @param obj The evas object - Not NULL. + * @param[in] fmt The format to duplicate - Not NULL. + * @return the copy of the format. + */ +static Evas_Object_Textblock_Format * +_format_dup(Evas_Object *obj, const Evas_Object_Textblock_Format *fmt) +{ + Evas_Object_Textblock_Format *fmt2; + + fmt2 = calloc(1, sizeof(Evas_Object_Textblock_Format)); + memcpy(fmt2, fmt, sizeof(Evas_Object_Textblock_Format)); + fmt2->ref = 1; + fmt2->font.fdesc = evas_font_desc_ref(fmt->font.fdesc); + + if (fmt->font.source) fmt2->font.source = eina_stringshare_add(fmt->font.source); + + /* FIXME: just ref the font here... */ + fmt2->font.font = evas_font_load(obj->layer->evas, fmt2->font.fdesc, + fmt2->font.source, (int)(((double) fmt2->font.size) * obj->cur.scale)); + return fmt2; +} + + + + +/** + * @internal + * @typedef Ctxt + * + * A pack of information that needed to be passed around in the layout engine, + * packed for easier access. + */ +typedef struct _Ctxt Ctxt; + +struct _Ctxt +{ + Evas_Object *obj; + Evas_Object_Textblock *o; + + Evas_Object_Textblock_Paragraph *paragraphs; + Evas_Object_Textblock_Paragraph *par; + Evas_Object_Textblock_Line *ln; + + + Eina_List *format_stack; + Evas_Object_Textblock_Format *fmt; + + int x, y; + int w, h; + int wmax, hmax; + int maxascent, maxdescent; + int marginl, marginr; + int line_no; + int underline_extend; + int have_underline, have_underline2; + double align, valign; + Eina_Bool align_auto : 1; + Eina_Bool width_changed : 1; +}; + +static void _layout_text_add_logical_item(Ctxt *c, Evas_Object_Textblock_Text_Item *ti, Eina_List *rel); +static void _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti); +static void _layout_do_format(const Evas_Object *obj, Ctxt *c, Evas_Object_Textblock_Format **_fmt, Evas_Object_Textblock_Node_Format *n, int *style_pad_l, int *style_pad_r, int *style_pad_t, int *style_pad_b, Eina_Bool create_item); +/** + * @internal + * Adjust the ascent/descent of the format and context. + * + * @param maxascent The ascent to update - Not NUL. + * @param maxdescent The descent to update - Not NUL. + * @param fmt The format to adjust - NOT NULL. + */ +static void +_layout_format_ascent_descent_adjust(const Evas_Object *obj, + Evas_Coord *maxascent, Evas_Coord *maxdescent, + Evas_Object_Textblock_Format *fmt) +{ + int ascent, descent; + + if (fmt->font.font) + { + // ascent = c->ENFN->font_max_ascent_get(c->ENDT, fmt->font.font); + // descent = c->ENFN->font_max_descent_get(c->ENDT, fmt->font.font); + ascent = ENFN->font_ascent_get(ENDT, fmt->font.font); + descent = ENFN->font_descent_get(ENDT, fmt->font.font); + if (fmt->linesize > 0) + { + if ((ascent + descent) < fmt->linesize) + { + ascent = ((fmt->linesize * ascent) / (ascent + descent)); + descent = fmt->linesize - ascent; + } + } + else if (fmt->linerelsize > 0.0) + { + descent = descent * fmt->linerelsize; + ascent = ascent * fmt->linerelsize; + } + descent += fmt->linegap; + descent += ((ascent + descent) * fmt->linerelgap); + if (*maxascent < ascent) *maxascent = ascent; + if (*maxdescent < descent) *maxdescent = descent; + if (fmt->linefill > 0.0) + { + int dh; + + dh = obj->cur.geometry.h - (*maxascent + *maxdescent); + if (dh < 0) dh = 0; + dh = fmt->linefill * dh; + *maxdescent += dh / 2; + *maxascent += dh - (dh / 2); + // FIXME: set flag that says "if heigh changes - reformat" + } + } +} + +/** + * @internal + * Create a new line using the info from the format and update the format + * and context. + * + * @param c The context to work on - Not NULL. + * @param fmt The format to use info from - NOT NULL. + */ +static void +_layout_line_new(Ctxt *c, Evas_Object_Textblock_Format *fmt) +{ + c->ln = calloc(1, sizeof(Evas_Object_Textblock_Line)); + c->align = fmt->halign; + c->align_auto = fmt->halign_auto; + c->marginl = fmt->margin.l; + c->marginr = fmt->margin.r; + c->par->lines = (Evas_Object_Textblock_Line *)eina_inlist_append(EINA_INLIST_GET(c->par->lines), EINA_INLIST_GET(c->ln)); + c->x = 0; + c->maxascent = c->maxdescent = 0; + c->ln->line_no = -1; + c->ln->par = c->par; +} + +static inline Evas_Object_Textblock_Paragraph * +_layout_find_paragraph_by_y(Evas_Object_Textblock *o, Evas_Coord y) +{ + Evas_Object_Textblock_Paragraph *start, *par; + int i; + + start = o->paragraphs; + + for (i = 0 ; i < TEXTBLOCK_PAR_INDEX_SIZE ; i++) + { + if (!o->par_index[i] || (o->par_index[i]->y > y)) + { + break; + } + start = o->par_index[i]; + } + + EINA_INLIST_FOREACH(start, par) + { + if ((par->y <= y) && (y < par->y + par->h)) + return par; + } + + return NULL; +} + +static inline Evas_Object_Textblock_Paragraph * +_layout_find_paragraph_by_line_no(Evas_Object_Textblock *o, int line_no) +{ + Evas_Object_Textblock_Paragraph *start, *par; + int i; + + start = o->paragraphs; + + for (i = 0 ; i < TEXTBLOCK_PAR_INDEX_SIZE ; i++) + { + if (!o->par_index[i] || (o->par_index[i]->line_no > line_no)) + { + break; + } + start = o->par_index[i]; + } + + EINA_INLIST_FOREACH(start, par) + { + Evas_Object_Textblock_Paragraph *npar = + (Evas_Object_Textblock_Paragraph *) EINA_INLIST_GET(par)->next; + if ((par->line_no <= line_no) && + (!npar || (line_no < npar->line_no))) + return par; + } + + return NULL; +} +/* End of rbtree index functios */ + +/** + * @internal + * Create a new layout paragraph. + * If c->par is not NULL, the paragraph is appended/prepended according + * to the append parameter. If it is NULL, the paragraph is appended at + * the end of the list. + * + * @param c The context to work on - Not NULL. + * @param n the associated text node + * @param append true to append, false to prpend. + */ +static void +_layout_paragraph_new(Ctxt *c, Evas_Object_Textblock_Node_Text *n, + Eina_Bool append) +{ + Evas_Object_Textblock_Paragraph *rel_par = c->par; + c->par = calloc(1, sizeof(Evas_Object_Textblock_Paragraph)); + if (append || !rel_par) + c->paragraphs = (Evas_Object_Textblock_Paragraph *) + eina_inlist_append_relative(EINA_INLIST_GET(c->paragraphs), + EINA_INLIST_GET(c->par), + EINA_INLIST_GET(rel_par)); + else + c->paragraphs = (Evas_Object_Textblock_Paragraph *) + eina_inlist_prepend_relative(EINA_INLIST_GET(c->paragraphs), + EINA_INLIST_GET(c->par), + EINA_INLIST_GET(rel_par)); + + c->ln = NULL; + c->par->text_node = n; + if (n) + n->par = c->par; + c->par->line_no = -1; + c->par->visible = 1; + c->o->num_paragraphs++; +} + +#ifdef BIDI_SUPPORT +/** + * @internal + * Update bidi paragraph props. + * + * @param par The paragraph to update + */ +static inline void +_layout_update_bidi_props(const Evas_Object_Textblock *o, + Evas_Object_Textblock_Paragraph *par) +{ + if (par->text_node) + { + const Eina_Unicode *text; + int *segment_idxs = NULL; + text = eina_ustrbuf_string_get(par->text_node->unicode); + + if (o->bidi_delimiters) + segment_idxs = evas_bidi_segment_idxs_get(text, o->bidi_delimiters); + + evas_bidi_paragraph_props_unref(par->bidi_props); + par->bidi_props = evas_bidi_paragraph_props_get(text, + eina_ustrbuf_length_get(par->text_node->unicode), + segment_idxs); + par->direction = EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(par->bidi_props) ? + EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR; + par->is_bidi = !!par->bidi_props; + if (segment_idxs) free(segment_idxs); + } +} +#endif + + +/** + * @internal + * Free the visual lines in the paragraph (logical items are kept) + */ +static void +_paragraph_clear(const Evas_Object *obj __UNUSED__, + Evas_Object_Textblock_Paragraph *par) +{ + while (par->lines) + { + Evas_Object_Textblock_Line *ln; + + ln = (Evas_Object_Textblock_Line *) par->lines; + par->lines = (Evas_Object_Textblock_Line *)eina_inlist_remove(EINA_INLIST_GET(par->lines), EINA_INLIST_GET(par->lines)); + _line_free(ln); + } +} + +/** + * @internal + * Free the layout paragraph and all of it's lines and logical items. + */ +static void +_paragraph_free(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *par) +{ + Evas_Object_Textblock *o; + o = (Evas_Object_Textblock *)(obj->object_data); + _paragraph_clear(obj, par); + + { + Eina_List *i, *i_prev; + Evas_Object_Textblock_Item *it; + EINA_LIST_FOREACH_SAFE(par->logical_items, i, i_prev, it) + { + _item_free(obj, NULL, it); + } + eina_list_free(par->logical_items); + } +#ifdef BIDI_SUPPORT + if (par->bidi_props) + evas_bidi_paragraph_props_unref(par->bidi_props); +#endif + /* If we are the active par of the text node, set to NULL */ + if (par->text_node && (par->text_node->par == par)) + par->text_node->par = NULL; + + o->num_paragraphs--; + + free(par); +} + +/** + * @internal + * Clear all the paragraphs from the inlist pars. + * + * @param obj the evas object - Not NULL. + * @param pars the paragraphs to clean - Not NULL. + */ +static void +_paragraphs_clear(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *pars) +{ + Evas_Object_Textblock_Paragraph *par; + + EINA_INLIST_FOREACH(EINA_INLIST_GET(pars), par) + { + _paragraph_clear(obj, par); + } +} + +/** + * @internal + * Free the paragraphs from the inlist pars, the difference between this and + * _paragraphs_clear is that the latter keeps the logical items and the par + * items, while the former frees them as well. + * + * @param obj the evas object - Not NULL. + * @param pars the paragraphs to clean - Not NULL. + */ +static void +_paragraphs_free(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *pars) +{ + Evas_Object_Textblock *o; + o = (Evas_Object_Textblock *)(obj->object_data); + + o->num_paragraphs = 0; + + while (pars) + { + Evas_Object_Textblock_Paragraph *par; + + par = (Evas_Object_Textblock_Paragraph *) pars; + pars = (Evas_Object_Textblock_Paragraph *)eina_inlist_remove(EINA_INLIST_GET(pars), EINA_INLIST_GET(par)); + _paragraph_free(obj, par); + } +} + +/** + * @internal + * Push fmt to the format stack, if fmt is NULL, will fush a default item. + * + * @param c the context to work on - Not NULL. + * @param fmt the format to push. + * @see _layout_format_pop() + */ +static Evas_Object_Textblock_Format * +_layout_format_push(Ctxt *c, Evas_Object_Textblock_Format *fmt, + Evas_Object_Textblock_Node_Format *fnode) +{ + if (fmt) + { + fmt = _format_dup(c->obj, fmt); + c->format_stack = eina_list_prepend(c->format_stack, fmt); + fmt->fnode = fnode; + } + else + { + fmt = calloc(1, sizeof(Evas_Object_Textblock_Format)); + c->format_stack = eina_list_prepend(c->format_stack, fmt); + fmt->ref = 1; + fmt->halign = 0.0; + fmt->halign_auto = EINA_TRUE; + fmt->valign = -1.0; + fmt->style = EVAS_TEXT_STYLE_PLAIN; + fmt->tabstops = 32; + fmt->linesize = 0; + fmt->linerelsize = 0.0; + fmt->linegap = 0; + fmt->underline_dash_width = 6; + fmt->underline_dash_gap = 2; + fmt->linerelgap = 0.0; + fmt->password = 1; + } + return fmt; +} + +/** + * @internal + * Pop fmt to the format stack, if there's something in the stack free fmt + * and set it to point to the next item instead, else return fmt. + * + * @param c the context to work on - Not NULL. + * @param format - the text of the format to free (assured to start with '-'). + * @return the next format in the stack, or format if there's none. + * @see _layout_format_push() + */ +static Evas_Object_Textblock_Format * +_layout_format_pop(Ctxt *c, const char *format) +{ + Evas_Object_Textblock_Format *fmt = eina_list_data_get(c->format_stack); + + if ((c->format_stack) && (c->format_stack->next)) + { + Eina_List *redo_nodes = NULL; + format++; /* Skip the '-' */ + + /* Generic pop, should just pop. */ + if (((format[0] == ' ') && !format[1]) || + !format[0]) + { + _format_unref_free(c->obj, fmt); + c->format_stack = + eina_list_remove_list(c->format_stack, c->format_stack); + } + else + { + size_t len = strlen(format); + Eina_List *i, *i_next; + /* Remove only the matching format. */ + EINA_LIST_FOREACH_SAFE(c->format_stack, i, i_next, fmt) + { + /* Stop when we reach the base item */ + if (!i_next) + break; + + c->format_stack = + eina_list_remove_list(c->format_stack, c->format_stack); + + /* Make sure the ending tag matches the starting tag. + * I.e whole of the ending tag matches the start of the + * starting tag, and the starting tag's next char is either + * NULL or white. Skip the starting '+'. */ + if (_FORMAT_IS_CLOSER_OF( + fmt->fnode->orig_format, format, len)) + { + _format_unref_free(c->obj, fmt); + break; + } + else + { + redo_nodes = eina_list_prepend(redo_nodes, fmt->fnode); + _format_unref_free(c->obj, fmt); + } + } + } + + /* Redo all the nodes needed to be redone */ + { + Evas_Object_Textblock_Node_Format *fnode; + Eina_List *i, *i_next; + + EINA_LIST_FOREACH_SAFE(redo_nodes, i, i_next, fnode) + { + /* FIXME: Actually do something with the new acquired padding, + * the can be different and affect our padding! */ + Evas_Coord style_pad_l, style_pad_r, style_pad_t, style_pad_b; + style_pad_l = style_pad_r = style_pad_t = style_pad_b = 0; + redo_nodes = eina_list_remove_list(redo_nodes, i); + fmt = eina_list_data_get(c->format_stack); + _layout_do_format(c->obj, c, &fmt, fnode, + &style_pad_l, &style_pad_r, + &style_pad_t, &style_pad_b, EINA_FALSE); + } + } + + fmt = eina_list_data_get(c->format_stack); + } + return fmt; +} + +/** + * @internal + * Parse item and fill fmt with the item. + * + * @param c the context to work on - Not NULL. + * @param fmt the format to fill - not null. + */ +static void +_layout_format_value_handle(Ctxt *c, Evas_Object_Textblock_Format *fmt, const char *item) +{ + const char *key = NULL, *val = NULL; + + _format_param_parse(item, &key, &val); + if ((key) && (val)) _format_command(c->obj, fmt, key, val); + if (key) eina_stringshare_del(key); + if (val) eina_stringshare_del(val); + c->align = fmt->halign; + c->align_auto = fmt->halign_auto; + c->marginl = fmt->margin.l; + c->marginr = fmt->margin.r; +} + +#define VSIZE_FULL 0 +#define VSIZE_ASCENT 1 + +#define SIZE 0 +#define SIZE_ABS 1 +#define SIZE_REL 2 + +/** + * @internal + * Get the current line's alignment from the context. + * + * @param c the context to work on - Not NULL. + */ +static inline double +_layout_line_align_get(Ctxt *c) +{ +#ifdef BIDI_SUPPORT + if (c->align_auto && c->ln) + { + if (c->ln->items && c->ln->items->text_node && + (c->ln->par->direction == EVAS_BIDI_DIRECTION_RTL)) + { + /* Align right*/ + return 1.0; + } + else + { + /* Align left */ + return 0.0; + } + } +#endif + return c->align; +} + +#ifdef BIDI_SUPPORT +/** + * @internal + * Reorder the items in visual order + * + * @param line the line to reorder + */ +static void +_layout_line_reorder(Evas_Object_Textblock_Line *line) +{ + /*FIXME: do it a bit more efficient - not very efficient ATM. */ + Evas_Object_Textblock_Item *it; + EvasBiDiStrIndex *v_to_l = NULL; + Evas_Coord x; + size_t start, end; + size_t len; + + if (line->items && line->items->text_node && + line->par->bidi_props) + { + Evas_BiDi_Paragraph_Props *props; + props = line->par->bidi_props; + start = end = line->items->text_pos; + + /* Find the first and last positions in the line */ + + EINA_INLIST_FOREACH(line->items, it) + { + if (it->text_pos < start) + { + start = it->text_pos; + } + else + { + int tlen; + tlen = (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? + _ITEM_TEXT(it)->text_props.text_len : 1; + if (it->text_pos + tlen > end) + { + end = it->text_pos + tlen; + } + } + } + + len = end - start; + evas_bidi_props_reorder_line(NULL, start, len, props, &v_to_l); + + /* Update visual pos */ + { + Evas_Object_Textblock_Item *i; + i = line->items; + while (i) + { + i->visual_pos = evas_bidi_position_logical_to_visual( + v_to_l, len, i->text_pos - start); + i = (Evas_Object_Textblock_Item *) EINA_INLIST_GET(i)->next; + } + } + + /*FIXME: not very efficient, sort the items arrays. Anyhow, should only + * reorder if it's a bidi paragraph */ + { + Evas_Object_Textblock_Item *i, *j, *min; + i = line->items; + while (i) + { + min = i; + EINA_INLIST_FOREACH(i, j) + { + if (j->visual_pos < min->visual_pos) + { + min = j; + } + } + if (min != i) + { + line->items = (Evas_Object_Textblock_Item *) eina_inlist_remove(EINA_INLIST_GET(line->items), EINA_INLIST_GET(min)); + line->items = (Evas_Object_Textblock_Item *) eina_inlist_prepend_relative(EINA_INLIST_GET(line->items), EINA_INLIST_GET(min), EINA_INLIST_GET(i)); + } + + i = (Evas_Object_Textblock_Item *) EINA_INLIST_GET(min)->next; + } + } + } + + if (v_to_l) free(v_to_l); + x = 0; + EINA_INLIST_FOREACH(line->items, it) + { + it->x = x; + x += it->adv; + } +} +#endif + +/* FIXME: doc */ +static void +_layout_calculate_format_item_size(const Evas_Object *obj, + const Evas_Object_Textblock_Format_Item *fi, + Evas_Coord *maxascent, Evas_Coord *maxdescent, + Evas_Coord *_y, Evas_Coord *_w, Evas_Coord *_h) +{ + /* Adjust sizes according to current line height/scale */ + Evas_Coord w, h; + const char *p, *s; + + s = fi->item; + w = fi->parent.w; + h = fi->parent.h; + switch (fi->size) + { + case SIZE: + p = strstr(s, " size="); + if (p) + { + p += 6; + if (sscanf(p, "%ix%i", &w, &h) == 2) + { + w = w * obj->cur.scale; + h = h * obj->cur.scale; + } + } + break; + case SIZE_REL: + p = strstr((char *) s, " relsize="); + p += 9; + if (sscanf(p, "%ix%i", &w, &h) == 2) + { + int sz = 1; + if (fi->vsize == VSIZE_FULL) + { + sz = *maxdescent + *maxascent; + } + else if (fi->vsize == VSIZE_ASCENT) + { + sz = *maxascent; + } + w = (w * sz) / h; + h = sz; + } + break; + case SIZE_ABS: + /* Nothing to do */ + default: + break; + } + + switch (fi->size) + { + case SIZE: + case SIZE_ABS: + switch (fi->vsize) + { + case VSIZE_FULL: + if (h > (*maxdescent + *maxascent)) + { + *maxascent += h - (*maxdescent + *maxascent); + *_y = -*maxascent; + } + else + *_y = -(h - *maxdescent); + break; + case VSIZE_ASCENT: + if (h > *maxascent) + { + *maxascent = h; + *_y = -h; + } + else + *_y = -h; + break; + default: + break; + } + break; + case SIZE_REL: + switch (fi->vsize) + { + case VSIZE_FULL: + case VSIZE_ASCENT: + *_y = -*maxascent; + break; + default: + break; + } + break; + default: + break; + } + + *_w = w; + *_h = h; +} + +/** + * @internal + * Order the items in the line, update it's properties and update it's + * corresponding paragraph. + * + * @param c the context to work on - Not NULL. + * @param fmt the format to use. + * @param add_line true if we should create a line, false otherwise. + */ +static void +_layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt) +{ + Evas_Object_Textblock_Item *it; + Evas_Coord x = 0; + + /* If there are no text items yet, calc ascent/descent + * according to the current format. */ + if (c->maxascent + c->maxdescent == 0) + _layout_format_ascent_descent_adjust(c->obj, &c->maxascent, + &c->maxdescent, fmt); + + /* Adjust all the item sizes according to the final line size, + * and update the x positions of all the items of the line. */ + EINA_INLIST_FOREACH(c->ln->items, it) + { + if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + { + Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it); + if (!fi->formatme) goto loop_advance; + _layout_calculate_format_item_size(c->obj, fi, &c->maxascent, + &c->maxdescent, &fi->y, &fi->parent.w, &fi->parent.h); + fi->parent.adv = fi->parent.w; + } + +loop_advance: + it->x = x; + x += it->adv; + + if ((it->x + it->adv) > c->ln->w) c->ln->w = it->x + it->adv; + } + + c->ln->y = (c->y - c->par->y) + c->o->style_pad.t; + c->ln->h = c->maxascent + c->maxdescent; + c->ln->baseline = c->maxascent; + if (c->have_underline2) + { + if (c->maxdescent < 4) c->underline_extend = 4 - c->maxdescent; + } + else if (c->have_underline) + { + if (c->maxdescent < 2) c->underline_extend = 2 - c->maxdescent; + } + c->ln->line_no = c->line_no - c->ln->par->line_no; + c->line_no++; + c->y += c->maxascent + c->maxdescent; + if (c->w >= 0) + { + c->ln->x = c->marginl + c->o->style_pad.l + + ((c->w - c->ln->w - + c->o->style_pad.l - c->o->style_pad.r - + c->marginl - c->marginr) * _layout_line_align_get(c)); + } + else + { + c->ln->x = c->marginl + c->o->style_pad.l; + } + + c->par->h = c->ln->y + c->ln->h; + if (c->ln->w > c->par->w) + c->par->w = c->ln->w; + + { + Evas_Coord new_wmax = c->ln->w + + c->marginl + c->marginr - (c->o->style_pad.l + c->o->style_pad.r); + if (new_wmax > c->wmax) + c->wmax = new_wmax; + } +} + +/** + * @internal + * Create a new line and append it to the lines in the context. + * + * @param c the context to work on - Not NULL. + * @param fmt the format to use. + * @param add_line true if we should create a line, false otherwise. + */ +static void +_layout_line_advance(Ctxt *c, Evas_Object_Textblock_Format *fmt) +{ + _layout_line_finalize(c, fmt); + _layout_line_new(c, fmt); +} + +/** + * @internal + * Create a new text layout item from the string and the format. + * + * @param c the context to work on - Not NULL. + * @param fmt the format to use. + * @param str the string to use. + * @param len the length of the string. + */ +static Evas_Object_Textblock_Text_Item * +_layout_text_item_new(Ctxt *c __UNUSED__, Evas_Object_Textblock_Format *fmt) +{ + Evas_Object_Textblock_Text_Item *ti; + + ti = calloc(1, sizeof(Evas_Object_Textblock_Text_Item)); + ti->parent.format = fmt; + ti->parent.format->ref++; + ti->parent.type = EVAS_TEXTBLOCK_ITEM_TEXT; + return ti; +} + +/** + * @internal + * Return the cutoff of the text in the text item. + * + * @param c the context to work on - Not NULL. + * @param fmt the format to use. - Not NULL. + * @param it the item to check - Not null. + * @return -1 if there is no cutoff (either because there is really none, + * or because of an error), cutoff index on success. + */ +static int +_layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt, + const Evas_Object_Textblock_Text_Item *ti) +{ + if (fmt->font.font) + { + Evas_Coord x; + x = c->w - c->o->style_pad.l - c->o->style_pad.r - c->marginl - + c->marginr - c->x - ti->x_adjustment; + if (x < 0) + x = 0; + return c->ENFN->font_last_up_to_pos(c->ENDT, fmt->font.font, + &ti->text_props, x, 0); + } + return -1; +} + +/** + * @internal + * Split before cut, and strip if str[cut - 1] is a whitespace. + * + * @param c the context to work on - Not NULL. + * @param ti the item to cut - not null. + * @param lti the logical list item of the item. + * @param cut the cut index. + * @return the second (newly created) item. + */ +static Evas_Object_Textblock_Text_Item * +_layout_item_text_split_strip_white(Ctxt *c, + Evas_Object_Textblock_Text_Item *ti, Eina_List *lti, size_t cut) +{ + const Eina_Unicode *ts; + Evas_Object_Textblock_Text_Item *new_ti = NULL, *white_ti = NULL; + + ts = GET_ITEM_TEXT(ti); + + if (!IS_AT_END(ti, cut) && (ti->text_props.text_len > 0)) + { + new_ti = _layout_text_item_new(c, ti->parent.format); + new_ti->parent.text_node = ti->parent.text_node; + new_ti->parent.text_pos = ti->parent.text_pos + cut; + new_ti->parent.merge = EINA_TRUE; + + evas_common_text_props_split(&ti->text_props, + &new_ti->text_props, cut); + _layout_text_add_logical_item(c, new_ti, lti); + } + + /* Strip the previous white if needed */ + if ((cut >= 1) && _is_white(ts[cut - 1]) && (ti->text_props.text_len > 0)) + { + if (cut - 1 > 0) + { + size_t white_cut = cut - 1; + white_ti = _layout_text_item_new(c, ti->parent.format); + white_ti->parent.text_node = ti->parent.text_node; + white_ti->parent.text_pos = ti->parent.text_pos + white_cut; + white_ti->parent.merge = EINA_TRUE; + white_ti->parent.visually_deleted = EINA_TRUE; + + evas_common_text_props_split(&ti->text_props, + &white_ti->text_props, white_cut); + _layout_text_add_logical_item(c, white_ti, lti); + } + else + { + /* Mark this one as the visually deleted. */ + ti->parent.visually_deleted = EINA_TRUE; + } + } + + if (new_ti || white_ti) + { + _text_item_update_sizes(c, ti); + } + return new_ti; +} + +/** + * @internal + * Merge item2 into item1 and free item2. + * + * @param c the context to work on - Not NULL. + * @param item1 the item to copy to + * @param item2 the item to copy from + */ +static void +_layout_item_merge_and_free(Ctxt *c, + Evas_Object_Textblock_Text_Item *item1, + Evas_Object_Textblock_Text_Item *item2) +{ + evas_common_text_props_merge(&item1->text_props, + &item2->text_props); + + _text_item_update_sizes(c, item1); + + item1->parent.merge = EINA_FALSE; + item1->parent.visually_deleted = EINA_FALSE; + + _item_free(c->obj, NULL, _ITEM(item2)); +} + +/** + * @internal + * Calculates an item's size. + * + * @param c the context + * @param it the item itself. + */ +static void +_text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti) +{ + int tw, th, inset, advw; + const Evas_Object_Textblock_Format *fmt = ti->parent.format; + int shad_sz = 0, shad_dst = 0, out_sz = 0; + int dx = 0, minx = 0, maxx = 0, shx1, shx2; + + tw = th = 0; + if (fmt->font.font) + c->ENFN->font_string_size_get(c->ENDT, fmt->font.font, + &ti->text_props, &tw, &th); + inset = 0; + if (fmt->font.font) + inset = c->ENFN->font_inset_get(c->ENDT, fmt->font.font, + &ti->text_props); + advw = 0; + if (fmt->font.font) + advw = c->ENFN->font_h_advance_get(c->ENDT, fmt->font.font, + &ti->text_props); + + + /* These adjustments are calculated and thus heavily linked to those in + * textblock_render!!! Don't change one without the other. */ + + switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_BASIC) + { + case EVAS_TEXT_STYLE_SHADOW: + shad_dst = 1; + break; + case EVAS_TEXT_STYLE_OUTLINE_SHADOW: + case EVAS_TEXT_STYLE_FAR_SHADOW: + shad_dst = 2; + out_sz = 1; + break; + case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW: + shad_dst = 1; + shad_sz = 2; + out_sz = 1; + break; + case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW: + shad_dst = 2; + shad_sz = 2; + break; + case EVAS_TEXT_STYLE_SOFT_SHADOW: + shad_dst = 1; + shad_sz = 2; + break; + case EVAS_TEXT_STYLE_GLOW: + case EVAS_TEXT_STYLE_SOFT_OUTLINE: + out_sz = 2; + break; + case EVAS_TEXT_STYLE_OUTLINE: + out_sz = 1; + break; + default: + break; + } + switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) + { + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT: + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT: + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT: + dx = -1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT: + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT: + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT: + dx = 1; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP: + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM: + default: + dx = 0; + break; + } + minx = -out_sz; + maxx = out_sz; + shx1 = dx * shad_dst; + shx1 -= shad_sz; + shx2 = dx * shad_dst; + shx2 += shad_sz; + if (shx1 < minx) minx = shx1; + if (shx2 > maxx) maxx = shx2; + inset += -minx; + ti->x_adjustment = maxx - minx; + + ti->inset = inset; + ti->parent.w = tw + ti->x_adjustment; + ti->parent.h = th; + ti->parent.adv = advw; + ti->parent.x = 0; +} + +/** + * @internal + * Adds the item to the list, updates the item's properties (e.g, x,w,h) + * + * @param c the context + * @param it the item itself. + * @param rel item ti will be appened after, NULL = last. + */ +static void +_layout_text_add_logical_item(Ctxt *c, Evas_Object_Textblock_Text_Item *ti, + Eina_List *rel) +{ + _text_item_update_sizes(c, ti); + + c->par->logical_items = eina_list_append_relative_list( + c->par->logical_items, ti, rel); +} + +/** + * @internal + * Appends the text from node n starting at start ending at off to the layout. + * It uses the fmt for the formatting. + * + * @param c the current context- NOT NULL. + * @param fmt the format to use. + * @param n the text node. - Not null. + * @param start the start position. - in range. + * @param off the offset - start + offset in range. if offset is -1, it'll add everything to the end of the string if offset = 0 it'll return with doing nothing. + * @param repch a replacement char to print instead of the original string, for example, * when working with passwords. + */ +static void +_layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Textblock_Node_Text *n, int start, int off, const char *repch) +{ + const Eina_Unicode *str = EINA_UNICODE_EMPTY_STRING; + const Eina_Unicode *tbase; + Evas_Object_Textblock_Text_Item *ti; + size_t cur_len = 0; + Eina_Unicode urepch = 0; + + /* prepare a working copy of the string, either filled by the repch or + * filled with the true values */ + if (n) + { + int len; + int orig_off = off; + + /* Figure out if we want to bail, work with an empty string, + * or continue with a slice of the passed string */ + len = eina_ustrbuf_length_get(n->unicode); + if (off == 0) return; + else if (off < 0) off = len - start; + + if (start < 0) + { + start = 0; + } + else if ((start == 0) && (off == 0) && (orig_off == -1)) + { + /* Special case that means that we need to add an empty + * item */ + str = EINA_UNICODE_EMPTY_STRING; + goto skip; + } + else if ((start >= len) || (start + off > len)) + { + return; + } + + /* If we work with a replacement char, create a string which is the same + * but with replacement chars instead of regular chars. */ + if ((fmt->password) && (repch) && (eina_ustrbuf_length_get(n->unicode))) + { + int i, ind; + Eina_Unicode *ptr; + + tbase = str = ptr = alloca((off + 1) * sizeof(Eina_Unicode)); + ind = 0; + urepch = eina_unicode_utf8_get_next(repch, &ind); + for (i = 0 ; i < off; ptr++, i++) + *ptr = urepch; + *ptr = 0; + } + /* Use the string, just cut the relevant parts */ + else + { + str = eina_ustrbuf_string_get(n->unicode) + start; + } + + cur_len = off; + } + +skip: + tbase = str; + + /* If there's no parent text node, only create an empty item */ + if (!n) + { + ti = _layout_text_item_new(c, fmt); + ti->parent.text_node = NULL; + ti->parent.text_pos = 0; + _layout_text_add_logical_item(c, ti, NULL); + + return; + } + + while (cur_len > 0) + { + Evas_Font_Instance *script_fi = NULL; + int script_len, tmp_cut; + Evas_Script_Type script; + + script_len = cur_len; + + tmp_cut = evas_common_language_script_end_of_run_get(str, + c->par->bidi_props, start + str - tbase, script_len); + if (tmp_cut > 0) + { + script_len = tmp_cut; + } + cur_len -= script_len; + + script = evas_common_language_script_type_get(str, script_len); + + + while (script_len > 0) + { + Evas_Font_Instance *cur_fi = NULL; + int run_len = script_len; + ti = _layout_text_item_new(c, fmt); + ti->parent.text_node = n; + ti->parent.text_pos = start + str - tbase; + + if (ti->parent.format->font.font) + { + run_len = c->ENFN->font_run_end_get(c->ENDT, + ti->parent.format->font.font, &script_fi, &cur_fi, + script, str, script_len); + } + + evas_common_text_props_bidi_set(&ti->text_props, + c->par->bidi_props, ti->parent.text_pos); + evas_common_text_props_script_set(&ti->text_props, script); + + if (cur_fi) + { + c->ENFN->font_text_props_info_create(c->ENDT, + cur_fi, str, &ti->text_props, c->par->bidi_props, + ti->parent.text_pos, run_len); + } + str += run_len; + script_len -= run_len; + + _layout_text_add_logical_item(c, ti, NULL); + } + } +} + +/** + * @internal + * Add a format item from the format node n and the item item. + * + * @param c the current context- NOT NULL. + * @param n the source format node - not null. + * @param item the format text. + * + * @return the new format item. + */ +static Evas_Object_Textblock_Format_Item * +_layout_format_item_add(Ctxt *c, Evas_Object_Textblock_Node_Format *n, const char *item, Evas_Object_Textblock_Format *fmt) +{ + Evas_Object_Textblock_Format_Item *fi; + + fi = calloc(1, sizeof(Evas_Object_Textblock_Format_Item)); + fi->item = eina_stringshare_add(item); + fi->parent.type = EVAS_TEXTBLOCK_ITEM_FORMAT; + fi->parent.format = fmt; + fi->parent.format->ref++; + c->par->logical_items = eina_list_append(c->par->logical_items, fi); + if (n) + { + fi->parent.text_node = n->text_node; + /* FIXME: make it more efficient */ + fi->parent.text_pos = _evas_textblock_node_format_pos_get(n); +#ifdef BIDI_SUPPORT + fi->bidi_dir = (evas_bidi_is_rtl_char( + c->par->bidi_props, + 0, + fi->parent.text_pos)) ? + EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR; +#else + fi->bidi_dir = EVAS_BIDI_DIRECTION_LTR; +#endif + } + return fi; +} + +/** + * @internal + * Should be call after we finish filling a format. + * FIXME: doc. + */ +static void +_format_finalize(Evas_Object *obj, Evas_Object_Textblock_Format *fmt) +{ + void *of; + + of = fmt->font.font; + + fmt->font.font = evas_font_load(obj->layer->evas, fmt->font.fdesc, + fmt->font.source, (int)(((double) fmt->font.size) * obj->cur.scale)); + if (of) evas_font_free(obj->layer->evas, of); +} + +/** + * @internal + * Returns true if the item is a tab + * @def _IS_TAB(item) + */ +#define _IS_TAB(item) \ + (!strcmp(item, "\t") || !strcmp(item, "\\t")) +/** + * @internal + * Returns true if the item is a line spearator, false otherwise + * @def _IS_LINE_SEPARATOR(item) + */ +#define _IS_LINE_SEPARATOR(item) \ + (!strcmp(item, "\n") || !strcmp(item, "\\n")) +/** + * @internal + * Returns true if the item is a paragraph separator, false otherwise + * @def _IS_PARAGRAPH_SEPARATOR(item) + */ +#define _IS_PARAGRAPH_SEPARATOR(o, item) \ + (!strcmp(item, "ps") || \ + (o->legacy_newline && _IS_LINE_SEPARATOR(item))) /* Paragraph separator */ + +/** + * @internal + * Handles a format by processing a format node. It returns the relevant format + * through _fmt and updates the padding through style_pad_*. If needed, + * it creates a format item. + * + * @param obj the evas object - NOT NULL. + * @param c the current context- NOT NULL. + * @param _fmt the format that holds the result. + * @param n the source format node - not null. + * @param style_pad_l the pad to update. + * @param style_pad_r the pad to update. + * @param style_pad_t the pad to update. + * @param style_pad_b the pad to update. + * @param create_item Create a new format item if true, only process otherwise. + */ +static void +_layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c, + Evas_Object_Textblock_Format **_fmt, Evas_Object_Textblock_Node_Format *n, + int *style_pad_l, int *style_pad_r, int *style_pad_t, int *style_pad_b, + Eina_Bool create_item) +{ + Evas_Object_Textblock_Format *fmt = *_fmt; + /* FIXME: comment the algo */ + + const char *s; + const char *item; + int handled = 0; + + s = n->format; + if (!strncmp(s, "+ item ", 7)) + { + // one of: + // item size=20x10 href=name + // item relsize=20x10 href=name + // item abssize=20x10 href=name + // + // optional arguments: + // vsize=full + // vsize=ascent + // + // size == item size (modifies line size) - can be multiplied by + // scale factor + // relsize == relative size (height is current font height, width + // modified accordingly keeping aspect) + // abssize == absolute size (modifies line size) - never mulitplied by + // scale factor + // href == name of item - to be found and matched later and used for + // positioning + Evas_Object_Textblock_Format_Item *fi; + int w = 1, h = 1; + int vsize = 0, size = 0; + char *p; + + // don't care + //href = strstr(s, " href="); + p = strstr(s, " vsize="); + if (p) + { + p += 7; + if (!strncmp(p, "full", 4)) vsize = VSIZE_FULL; + else if (!strncmp(p, "ascent", 6)) vsize = VSIZE_ASCENT; + } + p = strstr(s, " size="); + if (p) + { + p += 6; + if (sscanf(p, "%ix%i", &w, &h) == 2) + { + /* this is handled somewhere else because it depends + * on the current scaling factor of the object which + * may change and break because the results of this + * function are cached */ + size = SIZE; + } + } + else + { + p = strstr(s, " absize="); + if (p) + { + p += 8; + if (sscanf(p, "%ix%i", &w, &h) == 2) + { + size = SIZE_ABS; + } + } + else + { + p = strstr(s, " relsize="); + if (p) + { + /* this is handled somewhere else because it depends + * on the line it resides in, which is not defined + * at this point and will change anyway, which will + * break because the results of this function are + * cached */ + size = SIZE_REL; + } + } + } + + if (create_item) + { + fi = _layout_format_item_add(c, n, s, fmt); + fi->vsize = vsize; + fi->size = size; + fi->formatme = 1; + /* For formats items it's usually + the same, we don't handle the + special cases yet. */ + fi->parent.w = fi->parent.adv = w; + fi->parent.h = h; + } + /* Not sure if it's the best handling, but will do it for now. */ + fmt = _layout_format_push(c, fmt, n); + handled = 1; + } + + if (!handled) + { + Eina_Bool push_fmt = EINA_FALSE; + if (s[0] == '+') + { + fmt = _layout_format_push(c, fmt, n); + s++; + push_fmt = EINA_TRUE; + } + else if (s[0] == '-') + { + fmt = _layout_format_pop(c, n->orig_format); + s++; + } + while ((item = _format_parse(&s))) + { + if (_format_is_param(item)) + { + /* Only handle it if it's a push format, otherwise, + * don't let overwrite the format stack.. */ + if (push_fmt) + { + _layout_format_value_handle(c, fmt, item); + } + } + else if (create_item) + { + if ((_IS_PARAGRAPH_SEPARATOR(c->o, item)) || + (_IS_LINE_SEPARATOR(item))) + { + Evas_Object_Textblock_Format_Item *fi; + + fi = _layout_format_item_add(c, n, item, fmt); + + fi->parent.w = fi->parent.adv = 0; + } + else if ((!strcmp(item, "\t")) || (!strcmp(item, "\\t"))) + { + Evas_Object_Textblock_Format_Item *fi; + + fi = _layout_format_item_add(c, n, item, fmt); + fi->parent.w = fi->parent.adv = fmt->tabstops; + fi->formatme = 1; + } + } + } + _format_finalize(c->obj, fmt); + } + + { + Evas_Coord pad_l, pad_r, pad_t, pad_b; + pad_l = pad_r = pad_t = pad_b = 0; + evas_text_style_pad_get(fmt->style, &pad_l, &pad_r, &pad_t, &pad_b); + if (pad_l > *style_pad_l) *style_pad_l = pad_l; + if (pad_r > *style_pad_r) *style_pad_r = pad_r; + if (pad_t > *style_pad_t) *style_pad_t = pad_t; + if (pad_b > *style_pad_b) *style_pad_b = pad_b; + } + + if (fmt->underline2) + c->have_underline2 = 1; + else if (fmt->underline || fmt->underline_dash) + c->have_underline = 1; + *_fmt = fmt; +} + +static void +_layout_update_par(Ctxt *c) +{ + Evas_Object_Textblock_Paragraph *last_par; + last_par = (Evas_Object_Textblock_Paragraph *) + EINA_INLIST_GET(c->par)->prev; + if (last_par) + { + c->par->y = last_par->y + last_par->h; + } + else + { + c->par->y = 0; + } +} + +/* -1 means no wrap */ +static int +_layout_get_charwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, + const Evas_Object_Textblock_Text_Item *ti, size_t line_start, + const char *breaks) +{ + int wrap; + size_t uwrap; + size_t len = eina_ustrbuf_length_get(ti->parent.text_node->unicode); + /* Currently not being used, because it doesn't contain relevant + * information */ + (void) breaks; + + { + wrap = _layout_text_cutoff_get(c, fmt, ti); + if (wrap < 0) + return -1; + uwrap = (size_t) wrap + ti->parent.text_pos; + } + + + if (uwrap == line_start) + { + uwrap = ti->parent.text_pos + + (size_t) evas_common_text_props_cluster_next(&ti->text_props, wrap); + } + if ((uwrap <= line_start) || (uwrap > len)) + return -1; + + return uwrap; +} + +/* -1 means no wrap */ +#ifdef HAVE_LINEBREAK + +/* Allow break means: if we can break after the current char */ +#define ALLOW_BREAK(i) \ + (breaks[i] <= LINEBREAK_ALLOWBREAK) + +#else + +#define ALLOW_BREAK(i) \ + (_is_white(str[i])) + +#endif +static int +_layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, + const Evas_Object_Textblock_Text_Item *ti, Eina_Bool mixed_wrap, + size_t line_start, const char *breaks) +{ + Eina_Bool wrap_after = EINA_FALSE; + size_t wrap; + size_t orig_wrap; + const Eina_Unicode *str = eina_ustrbuf_string_get( + ti->parent.text_node->unicode); + int item_start = ti->parent.text_pos; + size_t len = eina_ustrbuf_length_get(ti->parent.text_node->unicode); +#ifndef HAVE_LINEBREAK + /* Not used without liblinebreak ATM. */ + (void) breaks; +#endif + + { + int swrap = -1; + swrap = _layout_text_cutoff_get(c, fmt, ti); + /* Avoiding too small textblocks to even contain one char. + * FIXME: This can cause breaking inside ligatures. */ + + if (swrap < 0) + return -1; + + orig_wrap = wrap = swrap + item_start; + } + + if (wrap > line_start) + { + /* The wrapping point found is the first char of the next string + the rest works on the last char of the previous string. + If it's a whitespace, then it's ok, and no need to go back + because we'll remove it anyway. */ + if (!_is_white(str[wrap])) + MOVE_PREV_UNTIL(line_start, wrap); + /* If there's a breakable point inside the text, scan backwards until + * we find it */ + while (wrap > line_start) + { + if (ALLOW_BREAK(wrap)) + break; + wrap--; + } + + if ((wrap > line_start) || + ((wrap == line_start) && (ALLOW_BREAK(wrap)) && (wrap < len))) + { + /* We found a suitable wrapping point, break here. */ + MOVE_NEXT_UNTIL(len, wrap); + return wrap; + } + else + { + if (mixed_wrap) + { + return ((orig_wrap >= line_start) && (orig_wrap < len)) ? + ((int) orig_wrap) : -1; + } + else + { + /* Scan forward to find the next wrapping point */ + wrap = orig_wrap; + wrap_after = EINA_TRUE; + } + } + } + + /* If we need to find the position after the cutting point */ + if ((wrap == line_start) || (wrap_after)) + { + if (mixed_wrap) + { + return _layout_get_charwrap(c, fmt, ti, + line_start, breaks); + } + else + { + while (wrap < len) + { + if (ALLOW_BREAK(wrap)) + break; + wrap++; + } + + + if ((wrap < len) && (wrap > line_start)) + { + MOVE_NEXT_UNTIL(len, wrap); + return wrap; + } + else + { + return -1; + } + } + } + + return -1; +} + +/* -1 means no wrap */ +static int +_layout_get_wordwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, + const Evas_Object_Textblock_Text_Item *ti, size_t line_start, + const char *breaks) +{ + return _layout_get_word_mixwrap_common(c, fmt, ti, EINA_FALSE, line_start, + breaks); +} + +/* -1 means no wrap */ +static int +_layout_get_mixedwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, + const Evas_Object_Textblock_Text_Item *ti, size_t line_start, + const char *breaks) +{ + return _layout_get_word_mixwrap_common(c, fmt, ti, EINA_TRUE, line_start, + breaks); +} + +/* Should be moved inside _layout_ellipsis_item_new once we fix the hack in + * textblock render */ +static const Eina_Unicode _ellip_str[2] = { 0x2026, '\0' }; + +static Evas_Object_Textblock_Text_Item * +_layout_ellipsis_item_new(Ctxt *c, const Evas_Object_Textblock_Item *cur_it) +{ + Evas_Object_Textblock_Text_Item *ellip_ti; + Evas_Script_Type script; + Evas_Font_Instance *script_fi = NULL, *cur_fi; + size_t len = 1; /* The length of _ellip_str */ + + /* We can free it here, cause there's only one ellipsis item per tb. */ + if (c->o->ellip_ti) _item_free(c->obj, NULL, _ITEM(c->o->ellip_ti)); + c->o->ellip_ti = ellip_ti = _layout_text_item_new(c, + eina_list_data_get(eina_list_last(c->format_stack))); + ellip_ti->parent.text_node = cur_it->text_node; + ellip_ti->parent.text_pos = cur_it->text_pos; + script = evas_common_language_script_type_get(_ellip_str, len); + + evas_common_text_props_bidi_set(&ellip_ti->text_props, + c->par->bidi_props, ellip_ti->parent.text_pos); + evas_common_text_props_script_set (&ellip_ti->text_props, script); + + if (ellip_ti->parent.format->font.font) + { + /* It's only 1 char anyway, we don't need the run end. */ + (void) c->ENFN->font_run_end_get(c->ENDT, + ellip_ti->parent.format->font.font, &script_fi, &cur_fi, + script, _ellip_str, len); + + c->ENFN->font_text_props_info_create(c->ENDT, + cur_fi, _ellip_str, &ellip_ti->text_props, + c->par->bidi_props, ellip_ti->parent.text_pos, len); + } + + _text_item_update_sizes(c, ellip_ti); + + if (cur_it->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + ellip_ti->parent.text_pos += _ITEM_TEXT(cur_it)->text_props.text_len + - 1; + } + else + { + ellip_ti->parent.text_pos++; + } + + return ellip_ti; +} + +/** + * @internel + * Handle ellipsis + */ +static inline void +_layout_handle_ellipsis(Ctxt *c, Evas_Object_Textblock_Item *it, Eina_List *i) +{ + Evas_Object_Textblock_Text_Item *ellip_ti; + Evas_Object_Textblock_Item *last_it; + Evas_Coord save_cx; + int wrap; + ellip_ti = _layout_ellipsis_item_new(c, it); + last_it = it; + + save_cx = c->x; + c->w -= ellip_ti->parent.w; + + if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); + + wrap = _layout_text_cutoff_get(c, last_it->format, ti); + if ((wrap > 0) && !IS_AT_END(ti, (size_t) wrap)) + { + _layout_item_text_split_strip_white(c, ti, i, wrap); + } + else if ((wrap == 0) && (c->ln->items)) + { + last_it = _ITEM(EINA_INLIST_GET(c->ln->items)->last); + } + } + else if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + { + /* We don't want to add this format item. */ + last_it = NULL; + } + + c->x = save_cx; + c->w += ellip_ti->parent.w; + /* If we should add this item, do it */ + if (last_it == it) + { + c->ln->items = (Evas_Object_Textblock_Item *) + eina_inlist_append(EINA_INLIST_GET(c->ln->items), + EINA_INLIST_GET(it)); + if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + { + Evas_Object_Textblock_Format_Item *fi; + fi = _ITEM_FORMAT(it); + fi->y = c->y; + } + } + c->ln->items = (Evas_Object_Textblock_Item *) + eina_inlist_append(EINA_INLIST_GET(c->ln->items), + EINA_INLIST_GET(_ITEM(ellip_ti))); + _layout_line_finalize(c, ellip_ti->parent.format); +} + +#ifdef BIDI_SUPPORT +static void +_layout_paragraph_reorder_lines(Evas_Object_Textblock_Paragraph *par) +{ + Evas_Object_Textblock_Line *ln; + + EINA_INLIST_FOREACH(EINA_INLIST_GET(par->lines), ln) + { + _layout_line_reorder(ln); + } +} +#endif + +static void +_layout_paragraph_render(Evas_Object_Textblock *o, + Evas_Object_Textblock_Paragraph *par) +{ + if (par->rendered) + return; + par->rendered = EINA_TRUE; + +#ifdef BIDI_SUPPORT + if (par->is_bidi) + { + _layout_update_bidi_props(o, par); + _layout_paragraph_reorder_lines(par); + /* Clear the bidi props because we don't need them anymore. */ + if (par->bidi_props) + { + evas_bidi_paragraph_props_unref(par->bidi_props); + par->bidi_props = NULL; + } + } +#endif +} + +/* 0 means go ahead, 1 means break without an error, 2 means + * break with an error, should probably clean this a bit (enum/macro) + * FIXME ^ */ +static int +_layout_par(Ctxt *c) +{ + Evas_Object_Textblock_Item *it; + Eina_List *i; + int ret = 0; + int wrap = -1; + char *line_breaks = NULL; + + if (!c->par->logical_items) + return 2; + + /* We want to show it. */ + c->par->visible = 1; + + /* Check if we need to skip this paragraph because it's already layouted + * correctly, and mark handled nodes as dirty. */ + c->par->line_no = c->line_no; + + if (c->par->text_node) + { + /* Skip this paragraph if width is the same, there is no ellipsis + * and we aren't just calculating. */ + if (!c->par->text_node->is_new && !c->par->text_node->dirty && + !c->width_changed && c->par->lines && + !c->o->have_ellipsis) + { + Evas_Object_Textblock_Line *ln; + /* Update c->line_no */ + ln = (Evas_Object_Textblock_Line *) + EINA_INLIST_GET(c->par->lines)->last; + if (ln) + c->line_no = c->par->line_no + ln->line_no + 1; + return 0; + } + c->par->text_node->dirty = EINA_FALSE; + c->par->text_node->is_new = EINA_FALSE; + c->par->rendered = EINA_FALSE; + + /* Merge back and clear the paragraph */ + { + Eina_List *itr, *itr_next; + Evas_Object_Textblock_Item *ititr, *prev_it = NULL; + _paragraph_clear(c->obj, c->par); + EINA_LIST_FOREACH_SAFE(c->par->logical_items, itr, itr_next, ititr) + { + if (ititr->merge && prev_it && + (prev_it->type == EVAS_TEXTBLOCK_ITEM_TEXT) && + (ititr->type == EVAS_TEXTBLOCK_ITEM_TEXT)) + { + _layout_item_merge_and_free(c, _ITEM_TEXT(prev_it), + _ITEM_TEXT(ititr)); + c->par->logical_items = + eina_list_remove_list(c->par->logical_items, itr); + } + else + { + prev_it = ititr; + } + } + } + } + + c->y = c->par->y; + + it = _ITEM(eina_list_data_get(c->par->logical_items)); + _layout_line_new(c, it->format); + /* We walk on our own because we want to be able to add items from + * inside the list and then walk them on the next iteration. */ + for (i = c->par->logical_items ; i ; ) + { + int adv_line = 0; + int redo_item = 0; + it = _ITEM(eina_list_data_get(i)); + /* Skip visually deleted items */ + if (it->visually_deleted) + { + i = eina_list_next(i); + continue; + } + + if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); + _layout_format_ascent_descent_adjust(c->obj, &c->maxascent, + &c->maxdescent, ti->parent.format); + } + else + { + Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it); + if (fi->formatme) + { + /* If there are no text items yet, calc ascent/descent + * according to the current format. */ + if (c->maxascent + c->maxdescent == 0) + _layout_format_ascent_descent_adjust(c->obj, &c->maxascent, + &c->maxdescent, it->format); + + _layout_calculate_format_item_size(c->obj, fi, &c->maxascent, + &c->maxdescent, &fi->y, &fi->parent.w, &fi->parent.h); + fi->parent.adv = fi->parent.w; + } + } + + + /* Check if we need to wrap, i.e the text is bigger than the width, + or we already found a wrap point. */ + if ((c->w >= 0) && + (((c->x + it->adv) > + (c->w - c->o->style_pad.l - c->o->style_pad.r - + c->marginl - c->marginr)) || (wrap > 0))) + { + /* Handle ellipsis here. If we don't have more width left + * and no height left, or no more width left and no wrapping. */ + if ((it->format->ellipsis == 1.0) && (c->h >= 0) && + ((2 * it->h + c->y > + c->h - c->o->style_pad.t - c->o->style_pad.b) || + (!it->format->wrap_word && !it->format->wrap_char && + !it->format->wrap_mixed))) + { + _layout_handle_ellipsis(c, it, i); + ret = 1; + goto end; + } + /* If we want to wrap and it's worth checking for wrapping + * (i.e there's actually text). */ + else if ((it->format->wrap_word || it->format->wrap_char || + it->format->wrap_mixed) && it->text_node) + { + if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + { + /* Don't wrap if it's the only item */ + if (c->ln->items) + { + /*FIXME: I should handle format correctly, + i.e verify we are allowed to break here */ + _layout_line_advance(c, it->format); + wrap = -1; + } + } + else + { + Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); + size_t line_start; + +#ifdef HAVE_LINEBREAK + /* If we haven't calculated the linebreaks yet, + * do */ + if (!line_breaks) + { + /* Only relevant in those cases */ + if (it->format->wrap_word || it->format->wrap_mixed) + { + const char *lang; + lang = (it->format->font.fdesc) ? + it->format->font.fdesc->lang : ""; + size_t len = + eina_ustrbuf_length_get( + it->text_node->unicode); + line_breaks = malloc(len); + set_linebreaks_utf32((const utf32_t *) + eina_ustrbuf_string_get( + it->text_node->unicode), + len, lang, line_breaks); + } + } +#endif + if (c->ln->items) + line_start = c->ln->items->text_pos; + else + line_start = ti->parent.text_pos; + + adv_line = 1; + /* If we don't already have a wrap point from before */ + if (wrap < 0) + { + if (it->format->wrap_word) + wrap = _layout_get_wordwrap(c, it->format, ti, + line_start, line_breaks); + else if (it->format->wrap_char) + wrap = _layout_get_charwrap(c, it->format, ti, + line_start, line_breaks); + else if (it->format->wrap_mixed) + wrap = _layout_get_mixedwrap(c, it->format, ti, + line_start, line_breaks); + else + wrap = -1; + } + + /* If it's before the item, rollback and apply. + if it's in the item, cut. + If it's after the item, delay the cut */ + if (wrap > 0) + { + size_t uwrap = (size_t) wrap; + if (uwrap < ti->parent.text_pos) + { + /* Rollback latest additions, and cut that + item */ + i = eina_list_prev(i); + it = eina_list_data_get(i); + while (uwrap < it->text_pos) + { + c->ln->items = _ITEM( + eina_inlist_remove( + EINA_INLIST_GET(c->ln->items), + EINA_INLIST_GET(it))); + i = eina_list_prev(i); + it = eina_list_data_get(i); + } + c->x = it->x; + c->ln->items = _ITEM( + eina_inlist_remove( + EINA_INLIST_GET(c->ln->items), + EINA_INLIST_GET(it))); + continue; + } + /* If it points to the end, it means the previous + * char is a whitespace we should remove, so this + * is a wanted cutting point. */ + else if (uwrap > ti->parent.text_pos + + ti->text_props.text_len) + wrap = -1; /* Delay the cut in a smart way + i.e use the item_pos as the line_start, because + there's already no cut before*/ + else + wrap -= ti->parent.text_pos; /* Cut here */ + } + + if (wrap > 0) + { + _layout_item_text_split_strip_white(c, ti, i, wrap); + } + else if (wrap == 0) + { + /* Should wrap before the item */ + adv_line = 0; + redo_item = 1; + _layout_line_advance(c, it->format); + } + /* Reset wrap */ + wrap = -1; + } + } + } + + if (!redo_item && !it->visually_deleted) + { + c->ln->items = (Evas_Object_Textblock_Item *) + eina_inlist_append(EINA_INLIST_GET(c->ln->items), + EINA_INLIST_GET(it)); + if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + { + Evas_Object_Textblock_Format_Item *fi; + fi = _ITEM_FORMAT(it); + fi->y = c->y; + /* If it's a newline, and we are not in newline compat + * mode, or we are in newline compat mode, and this is + * not used as a paragraph separator, advance */ + if (fi->item && _IS_LINE_SEPARATOR(fi->item) && + (!c->o->legacy_newline || + eina_list_next(i))) + { + adv_line = 1; + } + } + c->x += it->adv; + i = eina_list_next(i); + } + if (adv_line) + { + /* Each line is according to the first item in it, and here + * i is already the next item (or the current if we redo it) */ + if (i) + { + it = _ITEM(eina_list_data_get(i)); + } + _layout_line_advance(c, it->format); + } + } + if (c->ln->items) + { + /* Here 'it' is the last format used */ + _layout_line_finalize(c, it->format); + } + +end: +#ifdef HAVE_LINEBREAK + if (line_breaks) + free(line_breaks); +#endif + + return ret; +} + +/** + * @internal + * Invalidate text nodes according to format changes + * This goes through all the new format changes and marks the text nodes + * that should be invalidated because of format changes. + * + * @param c the working context. + */ +static inline void +_format_changes_invalidate_text_nodes(Ctxt *c) +{ + Evas_Object_Textblock_Node_Format *fnode = c->o->format_nodes; + Evas_Object_Textblock_Node_Text *start_n = NULL; + Eina_List *fstack = NULL; + int balance = 0; + while (fnode) + { + if (fnode->is_new) + { + const char *fstr = fnode->orig_format; + /* balance < 0 means we gave up and everything should be + * invalidated */ + if (*fstr == '+') + { + balance++; + if (!fstack) + start_n = fnode->text_node; + fstack = eina_list_prepend(fstack, fnode); + } + else if (*fstr == '-') + { + size_t fstr_len; + /* Skip the '-' */ + fstr++; + fstr_len = strlen(fstr); + /* Generic popper, just pop */ + if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]) + { + fstack = eina_list_remove_list(fstack, fstack); + balance--; + } + /* Find the matching format and pop it, if the matching format + * is out format, i.e the last one, pop and break. */ + else + { + Eina_List *i; + Evas_Object_Textblock_Node_Format *fnode2; + EINA_LIST_FOREACH(fstack, i, fnode2) + { + if (_FORMAT_IS_CLOSER_OF( + fnode2->orig_format, fstr, fstr_len)) + { + fstack = eina_list_remove_list(fstack, i); + break; + } + } + balance--; + } + + if (!fstack) + { + Evas_Object_Textblock_Node_Text *f_tnode = + fnode->text_node; + while (start_n) + { + start_n->dirty = EINA_TRUE; + if (start_n == f_tnode) + break; + start_n = + _NODE_TEXT(EINA_INLIST_GET(start_n)->next); + } + start_n = NULL; + } + } + else if (!fnode->visible) + balance = -1; + + if (balance < 0) + { + /* if we don't already have a starting point, use the + * current paragraph. */ + if (!start_n) + start_n = fnode->text_node; + break; + } + } + fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); + } + + if (balance != 0) + { + while (start_n) + { + start_n->dirty = EINA_TRUE; + start_n = _NODE_TEXT(EINA_INLIST_GET(start_n)->next); + } + } +} + + +/** FIXME: Document */ +static void +_layout_pre(Ctxt *c, int *style_pad_l, int *style_pad_r, int *style_pad_t, + int *style_pad_b) +{ + Evas_Object *obj = c->obj; + Evas_Object_Textblock *o = c->o; + /* Mark text nodes as dirty if format have changed. */ + if (c->o->format_changed) + { + _format_changes_invalidate_text_nodes(c); + } + + if (o->content_changed) + { + Evas_Object_Textblock_Node_Text *n; + c->o->have_ellipsis = 0; + c->par = c->paragraphs = o->paragraphs; + /* Go through all the text nodes to create the logical layout */ + EINA_INLIST_FOREACH(c->o->text_nodes, n) + { + Evas_Object_Textblock_Node_Format *fnode; + size_t start; + int off; + + /* If it's not a new paragraph, either update it or skip it. + * Remove all the paragraphs that were deleted */ + if (!n->is_new) + { + /* Remove all the deleted paragraphs at this point */ + while (c->par->text_node != n) + { + Evas_Object_Textblock_Paragraph *tmp_par = + (Evas_Object_Textblock_Paragraph *) + EINA_INLIST_GET(c->par)->next; + + c->paragraphs = (Evas_Object_Textblock_Paragraph *) + eina_inlist_remove(EINA_INLIST_GET(c->paragraphs), + EINA_INLIST_GET(c->par)); + _paragraph_free(obj, c->par); + + c->par = tmp_par; + } + + /* If it's dirty, remove and recreate, if it's clean, + * skip to the next. */ + if (n->dirty) + { + Evas_Object_Textblock_Paragraph *prev_par = c->par; + + _layout_paragraph_new(c, n, EINA_TRUE); + + c->paragraphs = (Evas_Object_Textblock_Paragraph *) + eina_inlist_remove(EINA_INLIST_GET(c->paragraphs), + EINA_INLIST_GET(prev_par)); + _paragraph_free(obj, prev_par); + } + else + { + c->par = (Evas_Object_Textblock_Paragraph *) + EINA_INLIST_GET(c->par)->next; + + /* Update the format stack according to the node's + * formats */ + fnode = n->format_node; + while (fnode && (fnode->text_node == n)) + { + /* Only do this if this actually changes format */ + if (fnode->format_change) + _layout_do_format(obj, c, &c->fmt, fnode, + style_pad_l, style_pad_r, + style_pad_t, style_pad_b, EINA_FALSE); + fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); + } + continue; + } + } + else + { + /* If it's a new paragraph, just add it. */ + _layout_paragraph_new(c, n, EINA_FALSE); + } + +#ifdef BIDI_SUPPORT + _layout_update_bidi_props(c->o, c->par); +#endif + + /* For each text node to thorugh all of it's format nodes + * append text from the start to the offset of the next format + * using the last format got. if needed it also creates format + * items this is the core algorithm of the layout mechanism. + * Skip the unicode replacement chars when there are because + * we don't want to print them. */ + fnode = n->format_node; + start = off = 0; + while (fnode && (fnode->text_node == n)) + { + off += fnode->offset; + /* No need to skip on the first run, or a non-visible one */ + _layout_text_append(c, c->fmt, n, start, off, o->repch); + _layout_do_format(obj, c, &c->fmt, fnode, style_pad_l, + style_pad_r, style_pad_t, style_pad_b, EINA_TRUE); + if ((c->have_underline2) || (c->have_underline)) + { + if (*style_pad_b < c->underline_extend) + *style_pad_b = c->underline_extend; + c->have_underline = 0; + c->have_underline2 = 0; + c->underline_extend = 0; + } + start += off; + if (fnode->visible) + { + off = -1; + start++; + } + else + { + off = 0; + } + fnode->is_new = EINA_FALSE; + fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); + } + _layout_text_append(c, c->fmt, n, start, -1, o->repch); +#ifdef BIDI_SUPPORT + /* Clear the bidi props because we don't need them anymore. */ + if (c->par->bidi_props) + { + evas_bidi_paragraph_props_unref(c->par->bidi_props); + c->par->bidi_props = NULL; + } +#endif + c->par = (Evas_Object_Textblock_Paragraph *) + EINA_INLIST_GET(c->par)->next; + } + + /* Delete the rest of the layout paragraphs */ + while (c->par) + { + Evas_Object_Textblock_Paragraph *tmp_par = + (Evas_Object_Textblock_Paragraph *) + EINA_INLIST_GET(c->par)->next; + + c->paragraphs = (Evas_Object_Textblock_Paragraph *) + eina_inlist_remove(EINA_INLIST_GET(c->paragraphs), + EINA_INLIST_GET(c->par)); + _paragraph_free(obj, c->par); + + c->par = tmp_par; + } + o->paragraphs = c->paragraphs; + c->par = NULL; + } + +} + +/** + * @internal + * Create the layout from the nodes. + * + * @param obj the evas object - NOT NULL. + * @param calc_only true if should only calc sizes false if should also create the layout.. It assumes native size is being calculated, doesn't support formatted size atm. + * @param w the object's w, -1 means no wrapping (i.e infinite size) + * @param h the object's h, -1 means inifinte size. + * @param w_ret the object's calculated w. + * @param h_ret the object's calculated h. + */ +static void +_layout(const Evas_Object *obj, int w, int h, int *w_ret, int *h_ret) +{ + Evas_Object_Textblock *o; + Ctxt ctxt, *c; + int style_pad_l = 0, style_pad_r = 0, style_pad_t = 0, style_pad_b = 0; + + /* setup context */ + o = (Evas_Object_Textblock *)(obj->object_data); + c = &ctxt; + c->obj = (Evas_Object *)obj; + c->o = o; + c->paragraphs = c->par = NULL; + c->format_stack = NULL; + c->fmt = NULL; + c->x = c->y = 0; + c->w = w; + c->h = h; + c->wmax = c->hmax = 0; + c->maxascent = c->maxdescent = 0; + c->marginl = c->marginr = 0; + c->have_underline = 0; + c->have_underline2 = 0; + c->underline_extend = 0; + c->line_no = 0; + c->align = 0.0; + c->align_auto = EINA_TRUE; + c->ln = NULL; + c->width_changed = (obj->cur.geometry.w != o->last_w); + + /* Start of logical layout creation */ + /* setup default base style */ + if ((c->o->style) && (c->o->style->default_tag)) + { + c->fmt = _layout_format_push(c, NULL, NULL); + _format_fill(c->obj, c->fmt, c->o->style->default_tag); + _format_finalize(c->obj, c->fmt); + } + if (!c->fmt) + { + if (w_ret) *w_ret = 0; + if (h_ret) *h_ret = 0; + return; + } + + _layout_pre(c, &style_pad_l, &style_pad_r, &style_pad_t, &style_pad_b); + c->paragraphs = o->paragraphs; + + /* If there are no paragraphs, create the minimum needed, + * if the last paragraph has no lines/text, create that as well */ + if (!c->paragraphs) + { + _layout_paragraph_new(c, NULL, EINA_TRUE); + o->paragraphs = c->paragraphs; + } + c->par = (Evas_Object_Textblock_Paragraph *) + EINA_INLIST_GET(c->paragraphs)->last; + if (!c->par->logical_items) + { + Evas_Object_Textblock_Text_Item *ti; + ti = _layout_text_item_new(c, c->fmt); + ti->parent.text_node = c->par->text_node; + ti->parent.text_pos = 0; + _layout_text_add_logical_item(c, ti, NULL); + } + + /* End of logical layout creation */ + + /* Start of visual layout creation */ + { + Evas_Object_Textblock_Paragraph *last_vis_par = NULL; + int par_index_step = o->num_paragraphs / TEXTBLOCK_PAR_INDEX_SIZE; + int par_count = 1; /* Force it to take the first one */ + int par_index_pos = 0; + + if (par_index_step == 0) par_index_step = 1; + + /* Clear all of the index */ + memset(o->par_index, 0, sizeof(o->par_index)); + + EINA_INLIST_FOREACH(c->paragraphs, c->par) + { + _layout_update_par(c); + + /* Break if we should stop here. */ + if (_layout_par(c)) + { + last_vis_par = c->par; + break; + } + + if ((par_index_pos < TEXTBLOCK_PAR_INDEX_SIZE) && (--par_count == 0)) + { + par_count = par_index_step; + + o->par_index[par_index_pos++] = c->par; + } + } + + /* Mark all the rest of the paragraphs as invisible */ + if (c->par) + { + c->par = (Evas_Object_Textblock_Paragraph *) + EINA_INLIST_GET(c->par)->next; + while (c->par) + { + c->par->visible = 0; + c->par = (Evas_Object_Textblock_Paragraph *) + EINA_INLIST_GET(c->par)->next; + } + } + + /* Get the last visible paragraph in the layout */ + if (!last_vis_par && c->paragraphs) + last_vis_par = (Evas_Object_Textblock_Paragraph *) + EINA_INLIST_GET(c->paragraphs)->last; + + if (last_vis_par) + c->hmax = last_vis_par->y + last_vis_par->h; + } + + /* Clean the rest of the format stack */ + while (c->format_stack) + { + c->fmt = c->format_stack->data; + c->format_stack = eina_list_remove_list(c->format_stack, c->format_stack); + _format_unref_free(c->obj, c->fmt); + } + + if (w_ret) *w_ret = c->wmax; + if (h_ret) *h_ret = c->hmax; + + /* Vertically align the textblock */ + if ((o->valign > 0.0) && (c->h > c->hmax)) + { + Evas_Coord adjustment = (c->h - c->hmax) * o->valign; + Evas_Object_Textblock_Paragraph *par; + EINA_INLIST_FOREACH(c->paragraphs, par) + { + par->y += adjustment; + } + } + + if ((o->style_pad.l != style_pad_l) || (o->style_pad.r != style_pad_r) || + (o->style_pad.t != style_pad_t) || (o->style_pad.b != style_pad_b)) + { + o->style_pad.l = style_pad_l; + o->style_pad.r = style_pad_r; + o->style_pad.t = style_pad_t; + o->style_pad.b = style_pad_b; + _paragraphs_clear(obj, c->paragraphs); + _layout(obj, w, h, w_ret, h_ret); + } +} + +/* + * @internal + * Relayout the object according to current object size. + * + * @param obj the evas object - NOT NULL. + */ +static void +_relayout(const Evas_Object *obj) +{ + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + _layout(obj, obj->cur.geometry.w, obj->cur.geometry.h, + &o->formatted.w, &o->formatted.h); + o->formatted.valid = 1; + o->last_w = obj->cur.geometry.w; + o->last_h = obj->cur.geometry.h; + o->changed = 0; + o->content_changed = 0; + o->format_changed = EINA_FALSE; + o->redraw = 1; +} + +/** + * @internal + * Find the layout item and line that match the text node and position passed. + * + * @param obj the evas object - NOT NULL. + * @param n the text node - Not null. + * @param pos the position to look for - valid. + * @param[out] lnr the line found - not null. + * @param[out] tir the item found - not null. + * @see _find_layout_format_item_line_match() + */ +static void +_find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node_Text *n, int pos, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Item **itr) +{ + Evas_Object_Textblock_Paragraph *found_par; + Evas_Object_Textblock_Line *ln; + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + if (!o->formatted.valid) _relayout(obj); + + found_par = n->par; + if (found_par) + { + _layout_paragraph_render(o, found_par); + EINA_INLIST_FOREACH(found_par->lines, ln) + { + Evas_Object_Textblock_Item *it; + + EINA_INLIST_FOREACH(ln->items, it) + { + /* FIXME: p should be size_t, same goes for pos */ + int p = (int) it->text_pos; + + if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + Evas_Object_Textblock_Text_Item *ti = + _ITEM_TEXT(it); + + p += (int) ti->text_props.text_len; + } + else + { + p++; + } + + if (((pos >= (int) it->text_pos) && (pos < p))) + { + *lnr = ln; + *itr = it; + return; + } + else if (p == pos) + { + *lnr = ln; + *itr = it; + } + } + } + } +} + +/** + * @internal + * Return the line number 'line'. + * + * @param obj the evas object - NOT NULL. + * @param line the line to find + * @return the line of line number or NULL if no line found. + */ +static Evas_Object_Textblock_Line * +_find_layout_line_num(const Evas_Object *obj, int line) +{ + Evas_Object_Textblock_Paragraph *par; + Evas_Object_Textblock_Line *ln; + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + + par = _layout_find_paragraph_by_line_no(o, line); + if (par) + { + _layout_paragraph_render(o, par); + EINA_INLIST_FOREACH(par->lines, ln) + { + if (par->line_no + ln->line_no == line) return ln; + } + } + return NULL; +} + +EAPI Evas_Object * +evas_object_textblock_add(Evas *e) +{ + Evas_Object *obj; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + obj = evas_object_new(e); + evas_object_textblock_init(obj); + evas_object_inject(obj, e); + return obj; +} + +EAPI Evas_Textblock_Style * +evas_textblock_style_new(void) +{ + Evas_Textblock_Style *ts; + + ts = calloc(1, sizeof(Evas_Textblock_Style)); + return ts; +} + +EAPI void +evas_textblock_style_free(Evas_Textblock_Style *ts) +{ + if (!ts) return; + if (ts->objects) + { + ts->delete_me = 1; + return; + } + _style_clear(ts); + free(ts); +} + +EAPI void +evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) +{ + Eina_List *l; + Evas_Object *obj; + + if (!ts) return; + /* If the style wasn't really changed, abort. */ + if ((!ts->style_text && !text) || + (ts->style_text && text && !strcmp(text, ts->style_text))) + return; + + EINA_LIST_FOREACH(ts->objects, l, obj) + { + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + _evas_textblock_invalidate_all(o); + _evas_textblock_changed(o, obj); + } + + _style_replace(ts, text); + + if (ts->style_text) + { + // format MUST be KEY='VALUE'[KEY='VALUE']... + const char *p; + const char *key_start, *key_stop, *val_start, *val_stop; + + key_start = key_stop = val_start = val_stop = NULL; + p = ts->style_text; + while (*p) + { + if (!key_start) + { + if (!isspace(*p)) + key_start = p; + } + else if (!key_stop) + { + if ((*p == '=') || (isspace(*p))) + key_stop = p; + } + else if (!val_start) + { + if (((*p) == '\'') && (*(p + 1))) + val_start = p + 1; + } + else if (!val_stop) + { + if (((*p) == '\'') && (p > ts->style_text) && (p[-1] != '\\')) + val_stop = p; + } + if ((key_start) && (key_stop) && (val_start) && (val_stop)) + { + char *tags, *replaces; + Evas_Object_Style_Tag *tag; + size_t tag_len = key_stop - key_start; + size_t replace_len = val_stop - val_start; + + tags = malloc(tag_len + 1); + if (tags) + { + memcpy(tags, key_start, tag_len); + tags[tag_len] = 0; + } + + replaces = malloc(replace_len + 1); + if (replaces) + { + memcpy(replaces, val_start, replace_len); + replaces[replace_len] = 0; + } + if ((tags) && (replaces)) + { + if (!strcmp(tags, "DEFAULT")) + { + ts->default_tag = replaces; + free(tags); + } + else + { + tag = calloc(1, sizeof(Evas_Object_Style_Tag)); + if (tag) + { + tag->tag = tags; + tag->replace = replaces; + tag->tag_len = tag_len; + tag->replace_len = replace_len; + ts->tags = (Evas_Object_Style_Tag *)eina_inlist_append(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); + } + else + { + free(tags); + free(replaces); + } + } + } + else + { + if (tags) free(tags); + if (replaces) free(replaces); + } + key_start = key_stop = val_start = val_stop = NULL; + } + p++; + } + } +} + +EAPI const char * +evas_textblock_style_get(const Evas_Textblock_Style *ts) +{ + if (!ts) return NULL; + return ts->style_text; +} + +/* textblock styles */ +EAPI void +evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) +{ + TB_HEAD(); + if (ts == o->style) return; + if ((ts) && (ts->delete_me)) return; + if (o->style) + { + Evas_Textblock_Style *old_ts; + if (o->markup_text) + { + free(o->markup_text); + o->markup_text = NULL; + } + + old_ts = o->style; + old_ts->objects = eina_list_remove(old_ts->objects, obj); + if ((old_ts->delete_me) && (!old_ts->objects)) + evas_textblock_style_free(old_ts); + } + if (ts) + { + ts->objects = eina_list_append(ts->objects, obj); + } + o->style = ts; + + _evas_textblock_invalidate_all(o); + _evas_textblock_changed(o, obj); +} + +EAPI const Evas_Textblock_Style * +evas_object_textblock_style_get(const Evas_Object *obj) +{ + TB_HEAD_RETURN(NULL); + return o->style; +} + +EAPI void +evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch) +{ + TB_HEAD(); + if (o->repch) eina_stringshare_del(o->repch); + if (ch) o->repch = eina_stringshare_add(ch); + else o->repch = NULL; + _evas_textblock_invalidate_all(o); + _evas_textblock_changed(o, obj); +} + +EAPI void +evas_object_textblock_legacy_newline_set(Evas_Object *obj, Eina_Bool mode) +{ + TB_HEAD(); + if (o->legacy_newline == mode) + return; + + o->legacy_newline = mode; + /* FIXME: Should recreate all the textnodes... For now, it's just + * for new text inserted. */ +} + +EAPI Eina_Bool +evas_object_textblock_legacy_newline_get(const Evas_Object *obj) +{ + TB_HEAD_RETURN(EINA_FALSE); + return o->legacy_newline; +} + +EAPI void +evas_object_textblock_valign_set(Evas_Object *obj, double align) +{ + TB_HEAD(); + if (align < 0.0) align = 0.0; + else if (align > 1.0) align = 1.0; + if (o->valign == align) return; + o->valign = align; + _evas_textblock_changed(o, obj); +} + +EAPI double +evas_object_textblock_valign_get(const Evas_Object *obj) +{ + TB_HEAD_RETURN(0.0); + return o->valign; +} + +EAPI void +evas_object_textblock_bidi_delimiters_set(Evas_Object *obj, const char *delim) +{ + TB_HEAD(); + eina_stringshare_replace(&o->bidi_delimiters, delim); +} + +EAPI const char * +evas_object_textblock_bidi_delimiters_get(const Evas_Object *obj) +{ + TB_HEAD_RETURN(NULL); + return o->bidi_delimiters; +} + +EAPI const char * +evas_object_textblock_replace_char_get(Evas_Object *obj) +{ + TB_HEAD_RETURN(NULL); + return o->repch; +} + +/** + * @internal + * Advance p_buff to point after the end of the string. It's used with the + * @ref escaped_strings[] variable. + * + * @param p_buff the pointer to the current string. + */ +static inline void +_escaped_advance_after_end_of_string(const char **p_buf) +{ + while (**p_buf != 0) (*p_buf)++; + (*p_buf)++; +} + +/** + * @internal + * Advance p_buff to point after the end of the string. It's used with the + * @ref escaped_strings[] variable. Also chec if matches. + * FIXME: doc. + * + * @param p_buff the pointer to the current string. + */ +static inline int +_escaped_is_eq_and_advance(const char *s, const char *s_end, + const char **p_m, const char *m_end) +{ + Eina_Bool reached_end; + for (;((s < s_end) && (*p_m < m_end)); s++, (*p_m)++) + { + if (*s != **p_m) + { + _escaped_advance_after_end_of_string(p_m); + return 0; + } + } + + reached_end = !**p_m; + if (*p_m < m_end) + _escaped_advance_after_end_of_string(p_m); + + return ((s == s_end) && reached_end); +} + +/** + * @internal + * + * @param s the string to match + */ +static inline const char * +_escaped_char_match(const char *s, int *adv) +{ + const char *map_itr, *map_end, *mc, *sc; + + map_itr = escape_strings; + map_end = map_itr + sizeof(escape_strings); + + while (map_itr < map_end) + { + const char *escape; + int match; + + escape = map_itr; + _escaped_advance_after_end_of_string(&map_itr); + if (map_itr >= map_end) break; + + mc = map_itr; + sc = s; + match = 1; + while ((*mc) && (*sc)) + { + if ((unsigned char)*sc < (unsigned char)*mc) return NULL; + if (*sc != *mc) match = 0; + mc++; + sc++; + } + if (match) + { + *adv = mc - map_itr; + return escape; + } + _escaped_advance_after_end_of_string(&map_itr); + } + return NULL; +} + +/** + * @internal + * FIXME: TBD. + * + * @param s the string to match + */ +static inline const char * +_escaped_char_get(const char *s, const char *s_end) +{ + /* Handle numeric escape codes. */ + if (s[1] == '#') + { + static char utf8_escape[7]; /* Support up to 6 bytes utf8 */ + char ustr[10]; + Eina_Unicode uchar[2] = { 0, 0 }; + char *utf8_char; + size_t len = 0; + int base = 10; + s += 2; /* Skip "&#" */ + + if (tolower(*s) == 'x') + { + s++; + base = 16; + } + + len = s_end - s; + if (len >= sizeof(ustr) + 1) + len = sizeof(ustr); + + memcpy(ustr, s, len); + ustr[len] = '\0'; + uchar[0] = strtol(ustr, NULL, base); + + if (uchar[0] == 0) + return NULL; + + utf8_char = eina_unicode_unicode_to_utf8(uchar, NULL); + strcpy(utf8_escape, utf8_char); + free(utf8_char); + + return utf8_escape; + } + else + { + const char *map_itr, *map_end; + + map_itr = escape_strings; + map_end = map_itr + sizeof(escape_strings); + + while (map_itr < map_end) + { + if (_escaped_is_eq_and_advance(s, s_end, &map_itr, map_end)) + return map_itr; + if (map_itr < map_end) + _escaped_advance_after_end_of_string(&map_itr); + } + } + + return NULL; +} + +EAPI const char * +evas_textblock_escape_string_get(const char *escape) +{ + /* & -> & */ + return _escaped_char_get(escape, escape + strlen(escape)); +} + +EAPI const char * +evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end) +{ + return _escaped_char_get(escape_start, escape_end); +} + +EAPI const char * +evas_textblock_string_escape_get(const char *string, int *len_ret) +{ + /* & -> & */ + return _escaped_char_match(string, len_ret); +} + +/** + * @internal + * Appends the escaped char beteewn s and s_end to the curosr + * + * + * @param s the start of the string + * @param s_end the end of the string. + */ +static inline void +_append_escaped_char(Evas_Textblock_Cursor *cur, const char *s, + const char *s_end) +{ + const char *escape; + + escape = _escaped_char_get(s, s_end); + if (escape) + evas_textblock_cursor_text_append(cur, escape); +} + +/** + * @internal + * prepends the escaped char beteewn s and s_end to the curosr + * + * + * @param s the start of the string + * @param s_end the end of the string. + */ +static inline void +_prepend_escaped_char(Evas_Textblock_Cursor *cur, const char *s, + const char *s_end) +{ + const char *escape; + + escape = _escaped_char_get(s, s_end); + if (escape) + evas_textblock_cursor_text_prepend(cur, escape); +} + + +EAPI void +evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) +{ + TB_HEAD(); + if ((text != o->markup_text) && (o->markup_text)) + { + free(o->markup_text); + o->markup_text = NULL; + } + _nodes_clear(obj); + if (!o->style) + { + if (text != o->markup_text) + { + if (text) o->markup_text = strdup(text); + } + return; + } + evas_textblock_cursor_paragraph_first(o->cursor); + + evas_object_textblock_text_markup_prepend(o->cursor, text); + /* Point all the cursors to the starrt */ + { + Eina_List *l; + Evas_Textblock_Cursor *data; + + evas_textblock_cursor_paragraph_first(o->cursor); + EINA_LIST_FOREACH(o->cursors, l, data) + evas_textblock_cursor_paragraph_first(data); + } +} + +EAPI void +evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text) +{ + Evas_Object *obj = cur->obj; + TB_HEAD(); + if (text) + { + char *s, *p; + char *tag_start, *tag_end, *esc_start, *esc_end; + + tag_start = tag_end = esc_start = esc_end = NULL; + p = (char *)text; + s = p; + /* This loop goes through all of the mark up text until it finds format + * tags, escape sequences or the terminating NULL. When it finds either + * of those, it appends the text found up until that point to the textblock + * proccesses whatever found. It repeats itself until the termainating + * NULL is reached. */ + for (;;) + { + /* If we got to the end of string or just finished/started tag + * or escape sequence handling. */ + if ((*p == 0) || + (tag_end) || (esc_end) || + (tag_start) || (esc_start)) + { + if (tag_end) + { + /* If we reached to a tag ending, analyze the tag */ + char *ttag; + size_t ttag_len = tag_end - tag_start; + + + ttag = malloc(ttag_len + 1); + if (ttag) + { + memcpy(ttag, tag_start, ttag_len); + ttag[ttag_len] = 0; + evas_textblock_cursor_format_prepend(cur, ttag); + free(ttag); + } + tag_start = tag_end = NULL; + } + else if (esc_end) + { + _prepend_escaped_char(cur, esc_start, esc_end + 1); + esc_start = esc_end = NULL; + } + else if (*p == 0) + { + _prepend_text_run(cur, s, p); + s = NULL; + } + if (*p == 0) + break; + } + if (*p == '<') + { + if (!esc_start) + { + /* Append the text prior to this to the textblock and mark + * the start of the tag */ + tag_start = p; + tag_end = NULL; + _prepend_text_run(cur, s, p); + s = NULL; + } + } + else if (*p == '>') + { + if (tag_start) + { + tag_end = p + 1; + s = p + 1; + } + } + else if (*p == '&') + { + if (!tag_start) + { + /* Append the text prior to this to the textblock and mark + * the start of the escape sequence */ + esc_start = p; + esc_end = NULL; + _prepend_text_run(cur, s, p); + s = NULL; + } + } + else if (*p == ';') + { + if (esc_start) + { + esc_end = p; + s = p + 1; + } + } + /* Unicode object replcament char */ + else if (!strncmp("\xEF\xBF\xBC", p, 3)) + { + /*FIXME: currently just remove them, maybe do something + * fancier in the future, atm it breaks if this char + * is inside <> */ + _prepend_text_run(cur, s, p); + p += 2; /* it's also advanced later in this loop need +3 + * in total*/ + s = p + 1; /* One after the end of the replacement char */ + } + p++; + } + } + _evas_textblock_changed(o, obj); +} + + +/** + * @internal + * An helper function to markup get. Appends the format from fnode to the strbugf txt. + * + * @param o the textblock object. + * @param txt the strbuf to append to. + * @param fnode the format node to process. + */ +static void +_markup_get_format_append(Evas_Object_Textblock *o __UNUSED__, Eina_Strbuf *txt, Evas_Object_Textblock_Node_Format *fnode) +{ + eina_strbuf_append_char(txt, '<'); + { + const char *s; + int pop = 0; + + // FIXME: need to escape + s = fnode->orig_format; + if (*s == '-') pop = 1; + while ((*s == ' ') || (*s == '+') || (*s == '-')) s++; + if (pop) eina_strbuf_append_char(txt, '/'); + eina_strbuf_append(txt, s); + } + eina_strbuf_append_char(txt, '>'); +} + +/** + * @internal + * An helper function to markup get. Appends the text in text. + * + * @param txt the strbuf to append to. + * @param text the text to process. + */ +static void +_markup_get_text_append(Eina_Strbuf *txt, const Eina_Unicode *text) +{ + char *p = eina_unicode_unicode_to_utf8(text, NULL); + char *base = p; + while (*p) + { + const char *escape; + int adv; + + escape = _escaped_char_match(p, &adv); + if (escape) + { + p += adv; + eina_strbuf_append(txt, escape); + } + else + { + eina_strbuf_append_char(txt, *p); + p++; + } + } + free(base); +} +EAPI const char * +evas_object_textblock_text_markup_get(const Evas_Object *obj) +{ + Evas_Object_Textblock_Node_Text *n; + Eina_Strbuf *txt = NULL; + + TB_HEAD_RETURN(NULL); + if (o->markup_text) return(o->markup_text); + txt = eina_strbuf_new(); + EINA_INLIST_FOREACH(o->text_nodes, n) + { + Evas_Object_Textblock_Node_Format *fnode; + Eina_Unicode *text_base, *text; + int off; + + /* For each text node to thorugh all of it's format nodes + * append text from the start to the offset of the next format + * using the last format got. if needed it also creates format items + * this is the core algorithm of the layout mechanism. + * Skip the unicode replacement chars when there are because + * we don't want to print them. */ + text_base = text = + eina_unicode_strndup(eina_ustrbuf_string_get(n->unicode), + eina_ustrbuf_length_get(n->unicode)); + fnode = n->format_node; + off = 0; + while (fnode && (fnode->text_node == n)) + { + Eina_Unicode tmp_ch; + off += fnode->offset; + /* No need to skip on the first run */ + tmp_ch = text[off]; + text[off] = 0; /* Null terminate the part of the string */ + _markup_get_text_append(txt, text); + _markup_get_format_append(o, txt, fnode); + text[off] = tmp_ch; /* Restore the char */ + text += off; + if (fnode->visible) + { + off = -1; + text++; + } + else + { + off = 0; + } + fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); + } + /* Add the rest, skip replacement */ + _markup_get_text_append(txt, text); + free(text_base); + } + + + o->markup_text = eina_strbuf_string_steal(txt); + eina_strbuf_free(txt); + return o->markup_text; +} + +/* cursors */ + +/** + * @internal + * Merge the current node with the next, no need to remove PS, already + * not there. + * + * @param o the text block object. + * @param to merge into to. + */ +static void +_evas_textblock_nodes_merge(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *to) +{ + Evas_Object_Textblock_Node_Format *itr; + Evas_Object_Textblock_Node_Format *pnode; + Evas_Object_Textblock_Node_Text *from; + const Eina_Unicode *text; + int to_len, len; + + if (!to) return; + from = _NODE_TEXT(EINA_INLIST_GET(to)->next); + + to_len = eina_ustrbuf_length_get(to->unicode); + text = eina_ustrbuf_string_get(from->unicode); + len = eina_ustrbuf_length_get(from->unicode); + eina_ustrbuf_append_length(to->unicode, text, len); + + itr = from->format_node; + if (itr && (itr->text_node == from)) + { + pnode = _NODE_FORMAT(EINA_INLIST_GET(itr)->prev); + if (pnode && (pnode->text_node == to)) + { + itr->offset += to_len - _evas_textblock_node_format_pos_get(pnode); + } + else + { + itr->offset += to_len; + } + } + + while (itr && (itr->text_node == from)) + { + itr->text_node = to; + itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next); + } + if (!to->format_node || (to->format_node->text_node != to)) + { + to->format_node = from->format_node; + } + + /* When it comes to how we handle it, merging is like removing both nodes + * and creating a new one, se we need to do the needed cleanups. */ + if (to->par) + to->par->text_node = NULL; + to->par = NULL; + + to->is_new = EINA_TRUE; + + _evas_textblock_cursors_set_node(o, from, to); + _evas_textblock_node_text_remove(o, from); +} + +/** + * @internal + * Merge the current node with the next, no need to remove PS, already + * not there. + * + * @param cur the cursor that points to the current node + */ +static void +_evas_textblock_cursor_nodes_merge(Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock_Node_Text *nnode; + Evas_Object_Textblock *o; + int len; + if (!cur) return; + + len = eina_ustrbuf_length_get(cur->node->unicode); + + o = (Evas_Object_Textblock *)(cur->obj->object_data); + nnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->next); + _evas_textblock_nodes_merge(o, cur->node); + _evas_textblock_cursors_update_offset(cur, nnode, 0, len); + _evas_textblock_cursors_set_node(o, nnode, cur->node); + if (nnode == o->cursor->node) + { + o->cursor->node = cur->node; + o->cursor->pos += len; + } +} + +/** + * @internal + * Return the format at a specific position. + * + * @param cur the cursor to the position. + * @return the format node at the specific position or NULL if not found. + */ +static Evas_Object_Textblock_Node_Format * +_evas_textblock_cursor_node_format_at_pos_get(const Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock_Node_Format *node; + Evas_Object_Textblock_Node_Format *itr; + int position = 0; + + if (!cur->node) return NULL; + + node = cur->node->format_node; + if (!node) return NULL; + /* If there is no exclusive format node to this paragraph return the + * previous's node */ + /* Find the main format node */ + EINA_INLIST_FOREACH(node, itr) + { + if (itr->text_node != cur->node) + { + return NULL; + } + if ((position + itr->offset) == cur->pos) + { + return itr; + } + position += itr->offset; + } + return NULL; +} + +/** + * @internal + * Return the last format node at the position of the format node n. + * + * @param n a format node at the position. + * @return the last format node at the position of n. + */ +static Evas_Object_Textblock_Node_Format * +_evas_textblock_node_format_last_at_off(const Evas_Object_Textblock_Node_Format *n) +{ + const Evas_Object_Textblock_Node_Format *nnode; + const Evas_Object_Textblock_Node_Text *tnode; + if (!n) return NULL; + nnode = n; + tnode = n->text_node; + do + { + n = nnode; + nnode = _NODE_FORMAT(EINA_INLIST_GET(nnode)->next); + } + while (nnode && (nnode->text_node == tnode) && (nnode->offset == 0)); + + return (Evas_Object_Textblock_Node_Format *) n; +} + +/** + * @internal + * Returns the visible format at a specific location. + * + * @param n a format at the specific position. + * @return the format node at the specific position or NULL if not found. + */ +static Evas_Object_Textblock_Node_Format * +_evas_textblock_node_visible_at_pos_get(const Evas_Object_Textblock_Node_Format *n) +{ + const Evas_Object_Textblock_Node_Format *nnode; + if (!n) return NULL; + /* The visible format is the last one, because it inserts a replacement + * char that advances the next formats. */ + + nnode = n; + do + { + n = nnode; + if (n->visible) return (Evas_Object_Textblock_Node_Format *) n; + nnode = _NODE_FORMAT(EINA_INLIST_GET(nnode)->next); + } + while (nnode && (nnode->offset == 0)); + + return NULL; +} + +/** + * @internal + * Return the last format that applies to a specific cursor or at the specific + * position the cursor points to. This means either a cursor at or before the + * position of the cursor in the text node is returned or the previous's text + * node's format node. + * + * @param cur the position to look at. + * @return the format node found. + */ +static Evas_Object_Textblock_Node_Format * +_evas_textblock_cursor_node_format_before_or_at_pos_get(const Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock_Node_Format *node, *pitr = NULL; + Evas_Object_Textblock_Node_Format *itr; + size_t position = 0; + + if (!cur->node) return NULL; + + node = cur->node->format_node; + if (!node) return NULL; + /* If there is no exclusive format node to this paragraph return the + * previous's node */ + if (node->text_node != cur->node) + { + return node; + } + else if (node->offset > cur->pos) + { + return _NODE_FORMAT(EINA_INLIST_GET(node)->prev); + } + /* Find the main format node */ + pitr = _NODE_FORMAT(EINA_INLIST_GET(node)->prev); + EINA_INLIST_FOREACH(node, itr) + { + if ((itr->text_node != cur->node) || + ((position + itr->offset) > cur->pos)) + { + return pitr; + } + else if ((position + itr->offset) == cur->pos) + { + return itr; + } + pitr = itr; + position += itr->offset; + } + return pitr; +} + +/** + * @internal + * Find the layout item and line that match the cursor. + * + * @param cur the cursor we are currently at. - NOT NULL. + * @param[out] lnr the line found - not null. + * @param[out] itr the item found - not null. + * @return EINA_TRUE if we matched the previous format, EINA_FALSE otherwise. + */ +static Eina_Bool +_find_layout_item_match(const Evas_Textblock_Cursor *cur, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Item **itr) +{ + Evas_Textblock_Cursor cur2; + Eina_Bool previous_format = EINA_FALSE; + + cur2.obj = cur->obj; + evas_textblock_cursor_copy(cur, &cur2); + if (cur2.pos > 0) + { + cur2.pos--; + } + + if (_evas_textblock_cursor_is_at_the_end(cur) && + evas_textblock_cursor_format_is_visible_get(&cur2)) + { + _find_layout_item_line_match(cur2.obj, cur2.node, cur2.pos, lnr, itr); + previous_format = EINA_TRUE; + } + else + { + _find_layout_item_line_match(cur->obj, cur->node, cur->pos, lnr, itr); + } + return previous_format; +} + +EAPI Evas_Textblock_Cursor * +evas_object_textblock_cursor_get(const Evas_Object *obj) +{ + TB_HEAD_RETURN(NULL); + return o->cursor; +} + +EAPI Evas_Textblock_Cursor * +evas_object_textblock_cursor_new(const Evas_Object *obj) +{ + Evas_Textblock_Cursor *cur; + + TB_HEAD_RETURN(NULL); + cur = calloc(1, sizeof(Evas_Textblock_Cursor)); + cur->obj = (Evas_Object *) obj; + cur->node = o->text_nodes; + cur->pos = 0; + + o->cursors = eina_list_append(o->cursors, cur); + return cur; +} + +EAPI void +evas_textblock_cursor_free(Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock *o; + + if (!cur) return; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + if (cur == o->cursor) return; + o->cursors = eina_list_remove(o->cursors, cur); + free(cur); +} + +EAPI Eina_Bool +evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) +{ + if (!cur || !cur->node) return EINA_FALSE; + if (evas_textblock_cursor_format_is_visible_get(cur)) return EINA_TRUE; + return (_evas_textblock_cursor_node_format_at_pos_get(cur)) ? + EINA_TRUE : EINA_FALSE; +} + +EAPI const Eina_List * +evas_textblock_node_format_list_get(const Evas_Object *obj, const char *anchor) +{ + TB_HEAD_RETURN(NULL); + if (!strcmp(anchor, "a")) + return o->anchors_a; + else if (!strcmp(anchor, "item")) + return o->anchors_item; + + return NULL; +} + +EAPI const Evas_Object_Textblock_Node_Format * +evas_textblock_node_format_first_get(const Evas_Object *obj) +{ + TB_HEAD_RETURN(NULL); + return o->format_nodes; +} + +EAPI const Evas_Object_Textblock_Node_Format * +evas_textblock_node_format_last_get(const Evas_Object *obj) +{ + TB_HEAD_RETURN(NULL); + if (o->format_nodes) + { + return _NODE_FORMAT(EINA_INLIST_GET(o->format_nodes)->last); + } + return NULL; +} + +EAPI const Evas_Object_Textblock_Node_Format * +evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n) +{ + return _NODE_FORMAT(EINA_INLIST_GET(n)->next); +} + +EAPI const Evas_Object_Textblock_Node_Format * +evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n) +{ + return _NODE_FORMAT(EINA_INLIST_GET(n)->prev); +} + +EAPI void +evas_textblock_node_format_remove_pair(Evas_Object *obj, + Evas_Object_Textblock_Node_Format *n) +{ + Evas_Object_Textblock_Node_Text *tnode1; + Evas_Object_Textblock_Node_Format *fmt, *found_node = NULL; + Eina_List *fstack = NULL; + TB_HEAD(); + + if (!n) return; + + fmt = n; + + do + { + const char *fstr = fmt->orig_format; + + if (fstr && (*fstr == '+')) + { + fstack = eina_list_prepend(fstack, fmt); + } + else if (fstr && (*fstr == '-')) + { + size_t fstr_len; + /* Skip the '-' */ + fstr++; + fstr_len = strlen(fstr); + /* Generic popper, just pop */ + if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]) + { + fstack = eina_list_remove_list(fstack, fstack); + if (!fstack) + { + found_node = fmt; + goto found; + } + } + /* Find the matching format and pop it, if the matching format + * is out format, i.e the last one, pop and break. */ + else + { + Eina_List *i; + Evas_Object_Textblock_Node_Format *fnode; + EINA_LIST_FOREACH(fstack, i, fnode) + { + if (_FORMAT_IS_CLOSER_OF( + fnode->orig_format, fstr, fstr_len)) + { + /* Last one, this is our item! */ + if (!eina_list_next(i)) + { + found_node = fmt; + goto found; + } + fstack = eina_list_remove_list(fstack, i); + break; + } + } + } + } + + fmt = _NODE_FORMAT(EINA_INLIST_GET(fmt)->next); + } + while (fmt && fstack); + +found: + + fstack = eina_list_free(fstack); + + if (n->visible) + { + size_t ind = _evas_textblock_node_format_pos_get(n); + const char *format = n->format; + Evas_Textblock_Cursor cur; + cur.obj = obj; + + eina_ustrbuf_remove(n->text_node->unicode, ind, ind + 1); + if (format && _IS_PARAGRAPH_SEPARATOR(o, format)) + { + evas_textblock_cursor_at_format_set(&cur, n); + _evas_textblock_cursor_nodes_merge(&cur); + } + _evas_textblock_cursors_update_offset(&cur, n->text_node, ind, -1); + } + tnode1 = n->text_node; + _evas_textblock_node_format_remove(o, n, 0); + if (found_node && (found_node != n)) + { + Evas_Object_Textblock_Node_Text *tnode2; + tnode2 = found_node->text_node; + /* found_node can never be visible! (it's the closing format) */ + _evas_textblock_node_format_remove(o, found_node, 0); + + /* FIXME: Should be unified in the layout, for example, added to a list + * that checks this kind of removals. But until then, this is very fast + * and works. */ + /* Mark all the text nodes in between the removed formats as dirty. */ + while (tnode1) + { + tnode1->dirty = EINA_TRUE; + if (tnode1 == tnode2) + break; + tnode1 = + _NODE_TEXT(EINA_INLIST_GET(tnode1)->next); + } + } + + _evas_textblock_changed(o, obj); +} + +EAPI void +evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock *o; + if (!cur) return; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + cur->node = o->text_nodes; + cur->pos = 0; + +} + +EAPI void +evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Node_Text *node; + + if (!cur) return; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + node = o->text_nodes; + if (node) + { + node = _NODE_TEXT(EINA_INLIST_GET(node)->last); + cur->node = node; + cur->pos = 0; + + evas_textblock_cursor_paragraph_char_last(cur); + } + else + { + cur->node = NULL; + cur->pos = 0; + + } +} + +EAPI Eina_Bool +evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur) +{ + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + /* If there is a current text node, return the next text node (if exists) + * otherwise, just return False. */ + if (cur->node) + { + Evas_Object_Textblock_Node_Text *nnode; + nnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->next); + if (nnode) + { + cur->node = nnode; + cur->pos = 0; + + return EINA_TRUE; + } + } + return EINA_FALSE; +} + +EAPI Eina_Bool +evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock_Node_Text *node; + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + /* If the current node is a text node, just get the prev if any, + * if it's a format, get the current text node out of the format and return + * the prev text node if any. */ + node = cur->node; + /* If there is a current text node, return the prev text node + * (if exists) otherwise, just return False. */ + if (node) + { + Evas_Object_Textblock_Node_Text *pnode; + pnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->prev); + if (pnode) + { + cur->node = pnode; + evas_textblock_cursor_paragraph_char_last(cur); + return EINA_TRUE; + } + } + return EINA_FALSE; +} + +EAPI void +evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n) +{ + evas_textblock_cursor_at_format_set(cur, n); +} + +EAPI Eina_Bool +evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock_Node_Format *node; + + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + /* If the current node is a format node, just get the next if any, + * if it's a text, get the current format node out of the text and return + * the next format node if any. */ + node = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur); + node = _evas_textblock_node_format_last_at_off(node); + if (!node) + { + if (cur->node->format_node) + { + cur->pos = _evas_textblock_node_format_pos_get(node); + return EINA_TRUE; + } + } + /* If there is a current text node, return the next format node (if exists) + * otherwise, just return False. */ + else + { + Evas_Object_Textblock_Node_Format *nnode; + nnode = _NODE_FORMAT(EINA_INLIST_GET(node)->next); + if (nnode) + { + cur->node = nnode->text_node; + cur->pos = _evas_textblock_node_format_pos_get(nnode); + + return EINA_TRUE; + } + } + return EINA_FALSE; +} + +EAPI Eina_Bool +evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) +{ + const Evas_Object_Textblock_Node_Format *node; + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + node = evas_textblock_cursor_format_get(cur); + if (!node) + { + node = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur); + if (node) + { + cur->node = node->text_node; + cur->pos = _evas_textblock_node_format_pos_get(node); + + return EINA_TRUE; + } + } + /* If there is a current text node, return the next text node (if exists) + * otherwise, just return False. */ + if (node) + { + Evas_Object_Textblock_Node_Format *pnode; + pnode = _NODE_FORMAT(EINA_INLIST_GET(node)->prev); + if (pnode) + { + cur->node = pnode->text_node; + cur->pos = _evas_textblock_node_format_pos_get(pnode); + + return EINA_TRUE; + } + } + return EINA_FALSE; +} + +EAPI Eina_Bool +evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) +{ + int ind; + const Eina_Unicode *text; + + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + + ind = cur->pos; + text = eina_ustrbuf_string_get(cur->node->unicode); + if (text[ind]) ind++; + /* Only allow pointing a null if it's the last paragraph. + * because we don't have a PS there. */ + if (text[ind]) + { + cur->pos = ind; + return EINA_TRUE; + } + else + { + if (!evas_textblock_cursor_paragraph_next(cur)) + { + /* If we already were at the end, that means we don't have + * where to go next we should return FALSE */ + if (cur->pos == (size_t) ind) + return EINA_FALSE; + + cur->pos = ind; + return EINA_TRUE; + } + else + { + return EINA_TRUE; + } + } +} + +EAPI Eina_Bool +evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur) +{ + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + + if (cur->pos != 0) + { + cur->pos--; + return EINA_TRUE; + } + return evas_textblock_cursor_paragraph_prev(cur); +} + +EAPI void +evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur) +{ + if (!cur) return; + cur->pos = 0; + +} + +EAPI void +evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur) +{ + int ind; + + if (!cur) return; + if (!cur->node) return; + ind = eina_ustrbuf_length_get(cur->node->unicode); + /* If it's not the last paragraph, go back one, because we want to point + * to the PS, not the NULL */ + if (EINA_INLIST_GET(cur->node)->next) + ind--; + + if (ind >= 0) + cur->pos = ind; + else + cur->pos = 0; + +} + +EAPI void +evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Line *ln = NULL; + Evas_Object_Textblock_Item *it = NULL; + + if (!cur) return; + if (!cur->node) return; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + if (!o->formatted.valid) _relayout(cur->obj); + + _find_layout_item_match(cur, &ln, &it); + + if (!ln) return; + if (ln->items) + { + Evas_Object_Textblock_Item *i; + it = ln->items; + EINA_INLIST_FOREACH(ln->items, i) + { + if (it->text_pos > i->text_pos) + { + it = i; + } + } + } + if (it) + { + cur->pos = it->text_pos; + cur->node = it->text_node; + } +} + +EAPI void +evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Line *ln = NULL; + Evas_Object_Textblock_Item *it = NULL; + + if (!cur) return; + if (!cur->node) return; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + if (!o->formatted.valid) _relayout(cur->obj); + + _find_layout_item_match(cur, &ln, &it); + + if (!ln) return; + if (ln->items) + { + Evas_Object_Textblock_Item *i; + it = ln->items; + EINA_INLIST_FOREACH(ln->items, i) + { + if (it->text_pos < i->text_pos) + { + it = i; + } + } + } + if (it) + { + size_t ind; + + cur->node = it->text_node; + cur->pos = it->text_pos; + if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + ind = _ITEM_TEXT(it)->text_props.text_len - 1; + if (!IS_AT_END(_ITEM_TEXT(it), ind)) ind++; + cur->pos += ind; + } + else if (!EINA_INLIST_GET(ln)->next && !EINA_INLIST_GET(ln->par)->next) + { + cur->pos++; + } + } +} + +/** + * @internal + * checks if a format (as a string) is visible/changes format and sets the + * fnode properties accordingly. + * + * @param fnode the format node + * @param s the string. + */ +static void +_evas_textblock_format_is_visible(Evas_Object_Textblock_Node_Format *fnode, + const char *s) +{ + const char *item; + Eina_Bool is_opener = EINA_TRUE; + + fnode->visible = fnode->format_change = EINA_FALSE; + fnode->anchor = ANCHOR_NONE; + if (!s) return; + + if (s[0] == '+' || s[0] == '-') + { + is_opener = (s[0] == '+'); + s++; + fnode->format_change = EINA_TRUE; + } + + while ((item = _format_parse(&s))) + { + int itlen = s - item; + /* We care about all of the formats even after a - except for + * item which we don't care after a - because it's just a standard + * closing */ + if ((!strncmp(item, "\n", itlen) || !strncmp(item, "\\n", itlen)) || + (!strncmp(item, "\t", itlen) || !strncmp(item, "\\t", itlen)) || + (!strncmp(item, "ps", itlen) && (itlen >= 2)) || + (!strncmp(item, "item", itlen) && (itlen >= 4) && is_opener)) + { + fnode->visible = EINA_TRUE; + } + + if (is_opener && !strncmp(item, "a", itlen)) + { + fnode->anchor = ANCHOR_A; + } + else if (is_opener && !strncmp(item, "item", itlen) && (itlen >= 4)) + { + fnode->anchor = ANCHOR_ITEM; + } + } +} + +/** + * Sets the cursor to the position of where the fmt points to. + * + * @param cur the cursor to update. + * @param fmt the format to set according to. + * @return nothing. + */ +static void __UNUSED__ +_evas_textblock_cursor_node_text_at_format(Evas_Textblock_Cursor *cur, Evas_Object_Textblock_Node_Format *fmt) +{ + Evas_Object_Textblock_Node_Text *text; + Evas_Object_Textblock_Node_Format *base_format; + Evas_Object_Textblock_Node_Format *itr; + size_t position = 0; + + if (!cur || !fmt) return; + /* Find the main format node */ + text = fmt->text_node; + cur->node = text; + base_format = text->format_node; + EINA_INLIST_FOREACH(base_format, itr) + { + if (itr == fmt) + { + break; + } + position += itr->offset; + } + cur->pos = position; + +} + + +/** + * @internal + * Remove pairs of + and - formats and also remove formats without + or - + * i.e formats that pair to themselves. Only removes invisible formats + * that pair themselves, if you want to remove invisible formats that pair + * themselves, please first change fmt->visible to EINA_FALSE. + * + * @param o the textblock object. + * @param fmt the current format. + */ +static void +_evas_textblock_node_format_remove_matching(Evas_Object_Textblock *o, + Evas_Object_Textblock_Node_Format *fmt) +{ + Evas_Object_Textblock_Node_Text *tnode; + Eina_List *formats = NULL; + size_t offset = 0; + + if (!fmt) return; + + tnode = fmt->text_node; + + do + { + Evas_Object_Textblock_Node_Format *nnode; + const char *fstr = fmt->orig_format; + + nnode = _NODE_FORMAT(EINA_INLIST_GET(fmt)->next); + if (nnode) + { + offset = nnode->offset; + } + + + if (fstr && (*fstr == '+')) + { + formats = eina_list_prepend(formats, fmt); + } + else if (fstr && (*fstr == '-')) + { + Evas_Object_Textblock_Node_Format *fnode; + size_t fstr_len; + /* Skip the '-' */ + fstr++; + fstr_len = strlen(fstr); + /* Generic popper, just pop */ + if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]) + { + fnode = eina_list_data_get(formats); + formats = eina_list_remove_list(formats, formats); + _evas_textblock_node_format_remove(o, fnode, 0); + _evas_textblock_node_format_remove(o, fmt, 0); + } + /* Find the matching format and pop it, if the matching format + * is our format, i.e the last one, pop and break. */ + else + { + Eina_List *i, *next; + EINA_LIST_FOREACH_SAFE(formats, i, next, fnode) + { + if (_FORMAT_IS_CLOSER_OF( + fnode->orig_format, fstr, fstr_len)) + { + fnode = eina_list_data_get(i); + formats = eina_list_remove_list(formats, i); + _evas_textblock_node_format_remove(o, fnode, 0); + _evas_textblock_node_format_remove(o, fmt, 0); + break; + } + } + } + } + else if (!fmt->visible) + { + _evas_textblock_node_format_remove(o, fmt, 0); + } + fmt = nnode; + } + while (fmt && (offset == 0) && (fmt->text_node == tnode)); + eina_list_free(formats); +} +/** + * @internal + * Add the offset (may be negative) to the first node after fmt which is + * pointing to the text node tnode or to o->format_nodes if fmt is null + * and it points to tnode. + * + * @param o the textblock object. + * @param tnode the text node the format should point to. + * @param fmt the current format. + * @param offset the offest to add (may be negative). + */ +static void +_evas_textblock_node_format_adjust_offset(Evas_Object_Textblock *o, + Evas_Object_Textblock_Node_Text *tnode, + Evas_Object_Textblock_Node_Format *fmt, int offset) +{ + if (fmt) + { + fmt = _NODE_FORMAT(EINA_INLIST_GET(fmt)->next); + } + else + { + fmt = o->format_nodes; + } + if (fmt && (tnode == fmt->text_node)) + { + fmt->offset += offset; + } +} + +/** + * @internal + * Removes a format node updating the offset of the next format node and the + * text nodes pointing to this node. + * + * @param o the textblock object. + * @param n the fromat node to remove + */ +static void +_evas_textblock_node_format_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Format *n, int visible_adjustment) +{ + /* Update the text nodes about the change */ + { + Evas_Object_Textblock_Node_Format *nnode; + nnode = _NODE_FORMAT(EINA_INLIST_GET(n)->next); + /* If there's a next node that belongs to the same text node + * and the curret node was the main one, advance the format node */ + if (nnode && (nnode->text_node == n->text_node)) + { + if (nnode->text_node->format_node == n) + { + nnode->text_node->format_node = nnode; + } + } + else + { + Evas_Object_Textblock_Node_Text *tnode; + /* If there's no next one update the text nodes */ + nnode = _NODE_FORMAT(EINA_INLIST_GET(n)->prev); + tnode = n->text_node; + /* Even if it's not the current text_node's main node + * it can still be the next's. */ + if (tnode && (tnode->format_node != n)) + { + tnode = _NODE_TEXT(EINA_INLIST_GET(tnode)->next); + } + while (tnode && (tnode->format_node == n)) + { + tnode->format_node = nnode; + tnode = _NODE_TEXT(EINA_INLIST_GET(tnode)->next); + } + } + } + _evas_textblock_node_format_adjust_offset(o, n->text_node, n, + n->offset - visible_adjustment); + + o->format_nodes = _NODE_FORMAT(eina_inlist_remove( + EINA_INLIST_GET(o->format_nodes), EINA_INLIST_GET(n))); + _evas_textblock_node_format_free(o, n); +} + +/** + * @internal + * Sets all the offsets of the format nodes between start and end in the text + * node n to 0 and sets visibility to EINA_FALSE. + * If end == -1 end means the end of the string. + * Assumes there is a prev node or the current node will be preserved. + * + * @param n the text node the positinos refer to. + * @param start the start of where to delete from. + * @param end the end of the section to delete, if end == -1 it means the end of the string. + * @returns #EINA_TRUE if removed a PS, false otherwise. + */ +static Eina_Bool +_evas_textblock_node_text_adjust_offsets_to_start(Evas_Object_Textblock *o, + Evas_Object_Textblock_Node_Text *n, size_t start, int end) +{ + Evas_Object_Textblock_Node_Format *last_node, *itr; + Evas_Object_Textblock_Node_Text *new_node; + int use_end = 1; + int delta = 0; + int first = 1; + int update_format_node; + size_t pos = 0; + int orig_end; + + itr = n->format_node; + if (!itr || (itr->text_node != n)) return EINA_FALSE; + + orig_end = end; + if ((end < 0) || ((size_t) end == eina_ustrbuf_length_get(n->unicode))) + { + use_end = 0; + } + else if (end > 0) + { + /* We don't want the last one */ + end--; + } + + /* If we are not removing the text node, all should stay in this text + * node, otherwise, everything should move to the previous node */ + if ((start == 0) && !use_end) + { + new_node = _NODE_TEXT(EINA_INLIST_GET(n)->prev); + if (!new_node) + { + new_node = n; + } + } + else + { + new_node = n; + } + + /* Find the first node after start */ + while (itr && (itr->text_node == n)) + { + pos += itr->offset; + if (pos >= start) + { + break; + } + itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next); + } + + if (!itr || (itr->text_node != n)) + { + return EINA_FALSE; + } + + update_format_node = ((itr == n->format_node) && (new_node != n)); + delta = orig_end - pos; + itr->offset -= pos - start; + + while (itr && (itr->text_node == n)) + { + last_node = itr; + itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next); + + if (!first) + { + pos += last_node->offset; + } + + /* start is negative when this gets relevant */ + if (use_end && (pos > (size_t) end)) + { + last_node->offset -= delta; + break; + } + + delta = orig_end - pos; + if (!first) + { + last_node->offset = 0; + } + else + { + first = 0; + } + last_node->visible = EINA_FALSE; + + if (!itr || (itr && (itr->text_node != n))) + { + /* Remove the PS, and return since it's the end of the node */ + if (_IS_PARAGRAPH_SEPARATOR(o, last_node->format)) + { + _evas_textblock_node_format_remove(o, last_node, 0); + return EINA_TRUE; + } + + } + last_node->text_node = new_node; + if (update_format_node) + { + n->format_node = last_node; + } + } + + return EINA_FALSE; +} + +/** + * @internal + * Removes all the format nodes between start and end in the text node n. + * This function updates the offset of the next format node and the + * text nodes pointing to it. if end == -1 end means the end of the string. + * + * @param o the textblock object. + * @param n the text node the positinos refer to. + * @param start the start of where to delete from. + * @param end the end of the section to delete, if end == -1 it means the end of the string. + */ +static void +_evas_textblock_node_text_remove_formats_between(Evas_Object_Textblock *o, + Evas_Object_Textblock_Node_Text *n, int start, int end) +{ + Evas_Object_Textblock_Node_Format *itr; + int use_end = 1; + int offset = end - start; + itr = n->format_node; + + if (itr) + start -= itr->offset; + if (offset < 0) offset = 0; + if (end < 0) use_end = 0; + while (itr && (itr->text_node == n)) + { + Evas_Object_Textblock_Node_Format *nnode; + int tmp_offset = 0; + + /* start is negative when this gets relevant */ + if ((offset + start < 0) && use_end) + { + break; + } + nnode = _NODE_FORMAT(EINA_INLIST_GET(itr)->next); + if (nnode) + { + tmp_offset = nnode->offset; + } + if (start <= 0) + { + /* Don't do visible adjustments because we are removing the visual + * chars anyway and taking those into account */ + _evas_textblock_node_format_remove(o, itr, 0); + } + start -= tmp_offset; + itr = nnode; + } +} + +/** + * @internal + * Returns the first format in the range between start and end in the textblock + * n. + * + * @param o the textblock object. + * @param n the text node the positinos refer to. + * @param start the start of where to delete from. + * @param end the end of the section to delete, if end == -1 it means the end of the string. + */ +static Evas_Object_Textblock_Node_Format * +_evas_textblock_node_text_get_first_format_between( + Evas_Object_Textblock_Node_Text *n, int start, int end) +{ + Evas_Object_Textblock_Node_Format *itr; + int use_end = 1; + itr = n->format_node; + if (end < 0) use_end = 0; + while (itr && (itr->text_node == n)) + { + start -= itr->offset; + end -= itr->offset; + if ((end <= 0) && use_end) + { + break; + } + if (start <= 0) + { + return itr; + } + itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next); + } + return NULL; +} + +/** + * Removes a text node and the corresponding format nodes. + * + * @param o the textblock objec.t + * @param n the node to remove. + */ +static void +_evas_textblock_node_text_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *n) +{ + _evas_textblock_node_text_adjust_offsets_to_start(o, n, 0, -1); + + o->text_nodes = _NODE_TEXT(eina_inlist_remove( + EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(n))); + _evas_textblock_node_text_free(n); +} + +/** + * @internal + * Return the position where the formats starts at. + * + * @param fmt the format to return the position of. + * @return the position of the format in the text node it points to. + */ +static size_t +_evas_textblock_node_format_pos_get(const Evas_Object_Textblock_Node_Format *fmt) +{ + Evas_Object_Textblock_Node_Text *text; + Evas_Object_Textblock_Node_Format *base_format; + Evas_Object_Textblock_Node_Format *itr; + size_t position = 0; + + if (!fmt) return 0; + /* Find the main format node */ + text = fmt->text_node; + base_format = text->format_node; + EINA_INLIST_FOREACH(base_format, itr) + { + if (itr == fmt) + { + break; + } + position += itr->offset; + } + return position + fmt->offset; +} + +EAPI int +evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Node_Text *n; + size_t npos = 0; + + if (!cur) return -1; + if (!cur->node) return 0; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + n = o->text_nodes; + while (n != cur->node) + { + npos += eina_ustrbuf_length_get(n->unicode); + n = _NODE_TEXT(EINA_INLIST_GET(n)->next); + } + return npos + cur->pos; +} + +EAPI void +evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int _pos) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Node_Text *n; + size_t pos; + + if (!cur) return; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + + if (_pos < 0) + { + pos = 0; + } + else + { + pos = (size_t) _pos; + } + + n = o->text_nodes; + while (n && (pos >= eina_ustrbuf_length_get(n->unicode))) + { + pos -= eina_ustrbuf_length_get(n->unicode); + n = _NODE_TEXT(EINA_INLIST_GET(n)->next); + } + + if (n) + { + cur->node = n; + cur->pos = pos; + } + else if (o->text_nodes) + { + /* In case we went pass the last node, we need to put the cursor + * at the absolute end. */ + Evas_Object_Textblock_Node_Text *last_n; + + last_n = _NODE_TEXT(EINA_INLIST_GET(o->text_nodes)->last); + pos = eina_ustrbuf_length_get(last_n->unicode); + + cur->node = last_n; + cur->pos = pos; + } + +} + +EAPI Eina_Bool +evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Line *ln; + Evas_Object_Textblock_Item *it; + + if (!cur) return EINA_FALSE; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + if (!o->formatted.valid) _relayout(cur->obj); + + ln = _find_layout_line_num(cur->obj, line); + if (!ln) return EINA_FALSE; + it = (Evas_Object_Textblock_Item *)ln->items; + if (it) + { + cur->pos = it->text_pos; + cur->node = it->text_node; + } + else + { + cur->pos = 0; + + cur->node = o->text_nodes; + } + return EINA_TRUE; +} + +EAPI int +evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) +{ + Eina_Inlist *l1, *l2; + + if (!cur1) return 0; + if (!cur2) return 0; + if (cur1->obj != cur2->obj) return 0; + if ((!cur1->node) || (!cur2->node)) return 0; + if (cur1->node == cur2->node) + { + if (cur1->pos < cur2->pos) return -1; /* cur1 < cur2 */ + else if (cur1->pos > cur2->pos) return 1; /* cur2 < cur1 */ + return 0; + } + for (l1 = EINA_INLIST_GET(cur1->node), + l2 = EINA_INLIST_GET(cur1->node); (l1) || (l2);) + { + if (l1 == EINA_INLIST_GET(cur2->node)) return 1; /* cur2 < cur 1 */ + else if (l2 == EINA_INLIST_GET(cur2->node)) return -1; /* cur1 < cur 2 */ + else if (!l1) return -1; /* cur1 < cur 2 */ + else if (!l2) return 1; /* cur2 < cur 1 */ + l1 = l1->prev; + l2 = l2->next; + } + return 0; +} + +EAPI void +evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest) +{ + if (!cur) return; + if (!cur_dest) return; + if (cur->obj != cur_dest->obj) return; + cur_dest->pos = cur->pos; + cur_dest->node = cur->node; + +} + + +/* text controls */ +/** + * @internal + * Free a text node. Shouldn't be used usually, it's better to use + * @ref _evas_textblock_node_text_remove for most cases . + * + * @param n the text node to free + * @see _evas_textblock_node_text_remove + */ +static void +_evas_textblock_node_text_free(Evas_Object_Textblock_Node_Text *n) +{ + if (!n) return; + eina_ustrbuf_free(n->unicode); + if (n->utf8) + free(n->utf8); + if (n->par) + n->par->text_node = NULL; + free(n); +} + +/** + * @internal + * Create a new text node + * + * @return the new text node. + */ +static Evas_Object_Textblock_Node_Text * +_evas_textblock_node_text_new(void) +{ + Evas_Object_Textblock_Node_Text *n; + + n = calloc(1, sizeof(Evas_Object_Textblock_Node_Text)); + n->unicode = eina_ustrbuf_new(); + /* We want to layout each paragraph at least once. */ + n->dirty = EINA_TRUE; + n->is_new = EINA_TRUE; + + return n; +} + +/** + * @internal + * Break a paragraph. This does not add a PS but only splits the paragraph + * where a ps was just added! + * + * @param cur the cursor to break at. + * @param fnode the format node of the PS just added. + * @return Returns no value. + */ +static void +_evas_textblock_cursor_break_paragraph(Evas_Textblock_Cursor *cur, + Evas_Object_Textblock_Node_Format *fnode) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Node_Text *n; + + if (!cur) return; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + + n = _evas_textblock_node_text_new(); + o->text_nodes = _NODE_TEXT(eina_inlist_append_relative( + EINA_INLIST_GET(o->text_nodes), + EINA_INLIST_GET(n), + EINA_INLIST_GET(cur->node))); + /* Handle text and format changes. */ + if (cur->node) + { + Evas_Object_Textblock_Node_Format *nnode; + size_t len, start; + const Eina_Unicode *text; + + /* If there was a format node in the delete range, + * make it our format and update the text_node fields, + * otherwise, use the paragraph separator + * of the previous paragraph. */ + nnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); + if (nnode && (nnode->text_node == cur->node)) + { + n->format_node = nnode; + nnode->offset--; /* We don't have to take the replacement char + into account anymore */ + while (nnode && (nnode->text_node == cur->node)) + { + nnode->text_node = n; + nnode = _NODE_FORMAT(EINA_INLIST_GET(nnode)->next); + } + } + else + { + n->format_node = fnode; + } + + /* cur->pos now points to the PS, move after. */ + start = cur->pos + 1; + len = eina_ustrbuf_length_get(cur->node->unicode) - start; + if (len > 0) + { + text = eina_ustrbuf_string_get(cur->node->unicode); + eina_ustrbuf_append_length(n->unicode, text + start, len); + eina_ustrbuf_remove(cur->node->unicode, start, start + len); + cur->node->dirty = EINA_TRUE; + } + } + else + { + fnode = o->format_nodes; + if (fnode) + { + fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->last); + } + n->format_node = fnode; + } +} + +/** + * @internal + * Set the node and offset of all the curs after cur. + * + * @param cur the cursor. + * @param n the current textblock node. + * @param new_node the new node to set. + */ +static void +_evas_textblock_cursors_set_node(Evas_Object_Textblock *o, + const Evas_Object_Textblock_Node_Text *n, + Evas_Object_Textblock_Node_Text *new_node) +{ + Eina_List *l; + Evas_Textblock_Cursor *data; + + if (n == o->cursor->node) + { + o->cursor->pos = 0; + o->cursor->node = new_node; + } + EINA_LIST_FOREACH(o->cursors, l, data) + { + if (n == data->node) + { + data->pos = 0; + data->node = new_node; + } + } +} + +/** + * @internal + * Update the offset of all the cursors after cur. + * + * @param cur the cursor. + * @param n the current textblock node. + * @param start the starting pos. + * @param offset how much to adjust (can be negative). + */ +static void +_evas_textblock_cursors_update_offset(const Evas_Textblock_Cursor *cur, + const Evas_Object_Textblock_Node_Text *n, + size_t start, int offset) +{ + Eina_List *l; + Evas_Textblock_Cursor *data; + Evas_Object_Textblock *o; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + + if (cur != o->cursor) + { + if ((n == o->cursor->node) && + (o->cursor->pos > start)) + { + if ((offset < 0) && (o->cursor->pos <= (size_t) (-1 * offset))) + { + o->cursor->pos = 0; + } + else + { + o->cursor->pos += offset; + } + } + } + EINA_LIST_FOREACH(o->cursors, l, data) + { + if (data != cur) + { + if ((n == data->node) && + (data->pos > start)) + { + if ((offset < 0) && (data->pos <= (size_t) (-1 * offset))) + { + data->pos = 0; + } + else + { + data->pos += offset; + } + } + else if (!data->node) + { + data->node = o->text_nodes; + data->pos = 0; + } + } + } +} + +/** + * @internal + * Mark that the textblock has changed. + * + * @param o the textblock object. + * @param obj the evas object. + */ +static void +_evas_textblock_changed(Evas_Object_Textblock *o, Evas_Object *obj) +{ + o->formatted.valid = 0; + o->native.valid = 0; + o->content_changed = 1; + if (o->markup_text) + { + free(o->markup_text); + o->markup_text = NULL; + } + + evas_object_change(obj); +} + +static void +_evas_textblock_invalidate_all(Evas_Object_Textblock *o) +{ + Evas_Object_Textblock_Node_Text *n; + + EINA_INLIST_FOREACH(o->text_nodes, n) + { + n->dirty = EINA_TRUE; + } +} + +EAPI int +evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *_text) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Node_Text *n; + Evas_Object_Textblock_Node_Format *fnode = NULL; + Eina_Unicode *text; + int len = 0; + + if (!cur) return 0; + text = eina_unicode_utf8_to_unicode(_text, &len); + o = (Evas_Object_Textblock *)(cur->obj->object_data); + + n = cur->node; + if (n) + { + Evas_Object_Textblock_Node_Format *nnode; + fnode = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur); + fnode = _evas_textblock_node_format_last_at_off(fnode); + /* find the node after the current in the same paragraph + * either we find one and then take the next, or we try to get + * the first for the paragraph which must be after our position */ + if (fnode) + { + if (!evas_textblock_cursor_format_is_visible_get(cur)) + { + nnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); + if (nnode && (nnode->text_node == n)) + { + fnode = nnode; + } + else + { + fnode = NULL; + } + } + } + else + { + fnode = n->format_node; + } + } + else if (o->text_nodes) + { + n = cur->node = o->text_nodes; + cur->pos = 0; + } + else + { + n = _evas_textblock_node_text_new(); + o->text_nodes = _NODE_TEXT(eina_inlist_append( + EINA_INLIST_GET(o->text_nodes), + EINA_INLIST_GET(n))); + cur->node = n; + } + + eina_ustrbuf_insert_length(n->unicode, text, len, cur->pos); + /* Advance the formats */ + if (fnode && (fnode->text_node == cur->node)) + fnode->offset += len; + + /* Update all the cursors after our position. */ + _evas_textblock_cursors_update_offset(cur, cur->node, cur->pos, len); + + _evas_textblock_changed(o, cur->obj); + n->dirty = EINA_TRUE; + free(text); + + if (!o->cursor->node) + o->cursor->node = o->text_nodes; + return len; +} + +EAPI int +evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *_text) +{ + int len; + /*append is essentially prepend without advancing */ + len = evas_textblock_cursor_text_append(cur, _text); + cur->pos += len; /*Advance */ + return len; +} + +/** + * @internal + * Free a format node + * + * @param o the textblock object + * @param n the format node to free + */ +static void +_evas_textblock_node_format_free(Evas_Object_Textblock *o, + Evas_Object_Textblock_Node_Format *n) +{ + if (!n) return; + eina_stringshare_del(n->format); + eina_stringshare_del(n->orig_format); + if (n->anchor == ANCHOR_ITEM) + o->anchors_item = eina_list_remove(o->anchors_item, n); + else if (n->anchor == ANCHOR_A) + o->anchors_a = eina_list_remove(o->anchors_a, n); + free(n); +} + +/** + * @internal + * Create a new format node. + * + * @param format the text to create the format node from. + * @param o the textblock object. + * @return Returns the new format node + */ +static Evas_Object_Textblock_Node_Format * +_evas_textblock_node_format_new(Evas_Object_Textblock *o, const char *_format) +{ + Evas_Object_Textblock_Node_Format *n; + const char *format = _format; + + n = calloc(1, sizeof(Evas_Object_Textblock_Node_Format)); + /* Create orig_format and format */ + if (format[0] == '<') + { + const char *match; + size_t format_len; + size_t replace_len; + + format++; /* Advance after '<' */ + format_len = strlen(format); + if (format[format_len - 1] == '>') + format_len--; /* We don't care about '>' */ + + match = _style_match_tag(o->style, format, format_len, &replace_len); + if (match) + { + if ((match[0] == '+') || (match[0] == '-')) + { + char *norm_format; + norm_format = malloc(format_len + 2 + 1); + memcpy(norm_format, match, 2); + memcpy(norm_format + 2, format, format_len); + norm_format[format_len + 2] = '\0'; + n->orig_format = + eina_stringshare_add_length(norm_format, format_len + 2); + free(norm_format); + } + else + { + n->orig_format = + eina_stringshare_add_length(format, format_len); + } + n->format = eina_stringshare_add(match); + } + else + { + char *norm_format; + + norm_format = malloc(format_len + 2 + 1); + if (norm_format) + { + if (format[0] == '/') + { + memcpy(norm_format, "- ", 2); + memcpy(norm_format + 2, format + 1, format_len - 1); + norm_format[format_len + 2 - 1] = '\0'; + } + else + { + memcpy(norm_format, "+ ", 2); + memcpy(norm_format + 2, format, format_len); + norm_format[format_len + 2] = '\0'; + } + n->orig_format = eina_stringshare_add(norm_format); + free(norm_format); + } + n->format = eina_stringshare_ref(n->orig_format); + } + } + /* Just use as is, it's a special format. */ + else + { + n->orig_format = eina_stringshare_add(format); + n->format = eina_stringshare_ref(n->orig_format); + } + + format = n->format; + + _evas_textblock_format_is_visible(n, format); + if (n->anchor == ANCHOR_A) + { + o->anchors_a = eina_list_append(o->anchors_a, n); + } + else if (n->anchor == ANCHOR_ITEM) + { + o->anchors_item = eina_list_append(o->anchors_item, n); + } + n->is_new = EINA_TRUE; + + return n; +} + +static Eina_Bool +_evas_textblock_cursor_is_at_the_end(const Evas_Textblock_Cursor *cur) +{ + const Eina_Unicode *text; + + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + text = eina_ustrbuf_string_get(cur->node->unicode); + return ((text[cur->pos] == 0) && (!EINA_INLIST_GET(cur->node)->next)) ? + EINA_TRUE : EINA_FALSE; +} + +EAPI Eina_Bool +evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Node_Format *n; + Eina_Bool is_visible; + + if (!cur) return EINA_FALSE; + if ((!format) || (format[0] == 0)) return EINA_FALSE; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + /* We should always have at least one text node */ + if (!o->text_nodes) + { + evas_textblock_cursor_text_prepend(cur, ""); + } + + n = _evas_textblock_node_format_new(o, format); + is_visible = n->visible; + format = n->format; + if (!cur->node) + { + o->format_nodes = _NODE_FORMAT(eina_inlist_append( + EINA_INLIST_GET(o->format_nodes), + EINA_INLIST_GET(n))); + cur->pos = 0; + n->text_node = (EINA_INLIST_GET(n)->prev) ? + _NODE_FORMAT(EINA_INLIST_GET(n)->prev)->text_node : + o->text_nodes; + cur->node = n->text_node; + } + else + { + Evas_Object_Textblock_Node_Format *fmt; + fmt = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur); + n->text_node = cur->node; + if (!fmt) + { + o->format_nodes = _NODE_FORMAT(eina_inlist_prepend( + EINA_INLIST_GET(o->format_nodes), + EINA_INLIST_GET(n))); + n->offset = cur->pos; + } + else + { + if (evas_textblock_cursor_format_is_visible_get(cur)) + { + o->format_nodes = _NODE_FORMAT(eina_inlist_prepend_relative( + EINA_INLIST_GET(o->format_nodes), + EINA_INLIST_GET(n), + EINA_INLIST_GET(fmt) + )); + n->offset = fmt->offset; + if (fmt->text_node->format_node == fmt) + { + fmt->text_node->format_node = n; + } + } + else + { + fmt = _evas_textblock_node_format_last_at_off(fmt); + o->format_nodes = _NODE_FORMAT(eina_inlist_append_relative( + EINA_INLIST_GET(o->format_nodes), + EINA_INLIST_GET(n), + EINA_INLIST_GET(fmt) + )); + if (fmt->text_node != cur->node) + { + n->offset = cur->pos; + } + else + { + n->offset = cur->pos - + _evas_textblock_node_format_pos_get(fmt); + } + } + } + /* Adjust differently if we insert a format char */ + if (is_visible) + { + _evas_textblock_node_format_adjust_offset(o, cur->node, n, + -(n->offset - 1)); + } + else + { + _evas_textblock_node_format_adjust_offset(o, cur->node, n, + -n->offset); + } + + if (!fmt || (fmt->text_node != cur->node)) + { + cur->node->format_node = n; + } + } + if (is_visible && cur->node) + { + Eina_Unicode insert_char; + /* Insert a visual representation according to the type of the + format */ + if (_IS_PARAGRAPH_SEPARATOR(o, format)) + insert_char = _PARAGRAPH_SEPARATOR; + else if (_IS_LINE_SEPARATOR(format)) + insert_char = '\n'; + else if (_IS_TAB(format)) + insert_char = '\t'; + else + insert_char = EVAS_TEXTBLOCK_REPLACEMENT_CHAR; + + eina_ustrbuf_insert_char(cur->node->unicode, insert_char, cur->pos); + + /* Advance all the cursors after our cursor */ + _evas_textblock_cursors_update_offset(cur, cur->node, cur->pos, 1); + if (_IS_PARAGRAPH_SEPARATOR(o, format)) + { + _evas_textblock_cursor_break_paragraph(cur, n); + } + else + { + /* Handle visible format nodes here */ + cur->node->dirty = EINA_TRUE; + n->is_new = EINA_FALSE; + } + } + else + { + o->format_changed = EINA_TRUE; + } + + _evas_textblock_changed(o, cur->obj); + + if (!o->cursor->node) + o->cursor->node = o->text_nodes; + return is_visible; +} + +EAPI Eina_Bool +evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format) +{ + Eina_Bool is_visible; + /* append is essentially prepend without advancing */ + is_visible = evas_textblock_cursor_format_append(cur, format); + if (is_visible) + { + /* Advance after the replacement char */ + evas_textblock_cursor_char_next(cur); + } + + return is_visible; +} + + +EAPI void +evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Node_Text *n, *n2; + const Eina_Unicode *text; + int chr, ind, ppos; + + if (!cur || !cur->node) return; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + n = cur->node; + + text = eina_ustrbuf_string_get(n->unicode); + ind = cur->pos; + if (text[ind]) + chr = text[ind++]; + else + chr = 0; + + if (chr == 0) return; + ppos = cur->pos; + eina_ustrbuf_remove(n->unicode, cur->pos, ind); + /* Remove a format node if needed, and remove the char only if the + * fmt node is not visible */ + { + Eina_Bool should_merge = EINA_FALSE; + Evas_Object_Textblock_Node_Format *fmt, *fmt2; + fmt = _evas_textblock_cursor_node_format_at_pos_get(cur); + if (fmt) + { + const char *format = NULL; + Evas_Object_Textblock_Node_Format *last_fmt; + /* If there's a PS it must be the last become it delimits paragraphs */ + last_fmt = _evas_textblock_node_format_last_at_off(fmt); + format = last_fmt->format; + if (format && _IS_PARAGRAPH_SEPARATOR(o, format)) + { + /* If it was a paragraph separator, we should merge the + * current with the next, there must be a next. */ + should_merge = EINA_TRUE; + } + /* If a singnular, mark as invisible, so we'll delete it. */ + if (!format || ((*format != '+') && (*format != '-'))) + { + last_fmt->visible = EINA_FALSE; + } + } + + fmt2 = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur); + fmt2 = _evas_textblock_node_format_last_at_off(fmt2); + _evas_textblock_node_format_adjust_offset(o, cur->node, fmt2, + -(ind - cur->pos)); + + if (should_merge) + { + _evas_textblock_cursor_nodes_merge(cur); + } + + _evas_textblock_node_format_remove_matching(o, fmt); + } + + if (cur->pos == eina_ustrbuf_length_get(n->unicode)) + { + n2 = _NODE_TEXT(EINA_INLIST_GET(n)->next); + if (n2) + { + cur->node = n2; + cur->pos = 0; + } + } + + _evas_textblock_cursors_update_offset(cur, n, ppos, -(ind - ppos)); + _evas_textblock_changed(o, cur->obj); + cur->node->dirty = EINA_TRUE; +} + +EAPI void +evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2) +{ + Evas_Object_Textblock_Node_Format *fnode = NULL; + Evas_Object_Textblock *o; + Evas_Object_Textblock_Node_Text *n1, *n2; + Eina_Bool should_merge = EINA_FALSE, reset_cursor = EINA_FALSE; + + if (!cur1 || !cur1->node) return; + if (!cur2 || !cur2->node) return; + if (cur1->obj != cur2->obj) return; + o = (Evas_Object_Textblock *)(cur1->obj->object_data); + if (evas_textblock_cursor_compare(cur1, cur2) > 0) + { + Evas_Textblock_Cursor *tc; + + tc = cur1; + cur1 = cur2; + cur2 = tc; + } + n1 = cur1->node; + n2 = cur2->node; + if ((evas_textblock_cursor_compare(o->cursor, cur1) >= 0) && + (evas_textblock_cursor_compare(cur2, o->cursor) >= 0)) + { + reset_cursor = EINA_TRUE; + } + + + if (n1 == n2) + { + if ((cur1->pos == 0) && + (cur2->pos == eina_ustrbuf_length_get(n1->unicode))) + { + _evas_textblock_node_text_remove_formats_between(o, n1, 0, -1); + } + else + { + should_merge = _evas_textblock_node_text_adjust_offsets_to_start(o, + n1, cur1->pos, cur2->pos); + } + eina_ustrbuf_remove(n1->unicode, cur1->pos, cur2->pos); + _evas_textblock_cursors_update_offset(cur1, cur1->node, cur1->pos, - (cur2->pos - cur1->pos)); + } + else + { + Evas_Object_Textblock_Node_Text *n; + int len; + _evas_textblock_node_text_adjust_offsets_to_start(o, n1, cur1->pos, -1); + n = _NODE_TEXT(EINA_INLIST_GET(n1)->next); + /* Remove all the text nodes between */ + while (n && (n != n2)) + { + Evas_Object_Textblock_Node_Text *nnode; + + nnode = _NODE_TEXT(EINA_INLIST_GET(n)->next); + _evas_textblock_cursors_set_node(o, n, n1); + _evas_textblock_node_text_remove(o, n); + n = nnode; + } + should_merge = _evas_textblock_node_text_adjust_offsets_to_start(o, n2, + 0, cur2->pos); + + /* Remove the formats and the strings in the first and last nodes */ + len = eina_ustrbuf_length_get(n1->unicode); + eina_ustrbuf_remove(n1->unicode, cur1->pos, len); + eina_ustrbuf_remove(n2->unicode, 0, cur2->pos); + /* Merge the nodes because we removed the PS */ + _evas_textblock_cursors_update_offset(cur1, cur1->node, cur1->pos, + - cur1->pos); + _evas_textblock_cursors_update_offset(cur2, cur2->node, 0, - cur2->pos); + _evas_textblock_nodes_merge(o, n1); + } + fnode = _evas_textblock_cursor_node_format_at_pos_get(cur1); + + if (should_merge) + { + /* We call this function instead of the cursor one because we already + * updated the cursors */ + _evas_textblock_nodes_merge(o, n1); + } + _evas_textblock_node_format_remove_matching(o, fnode); + + evas_textblock_cursor_copy(cur1, cur2); + if (reset_cursor) + evas_textblock_cursor_copy(cur1, o->cursor); + + _evas_textblock_changed(o, cur1->obj); + n1->dirty = n2->dirty = EINA_TRUE; +} + + +EAPI char * +evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) +{ + const Eina_Unicode *ustr; + Eina_Unicode buf[2]; + char *s; + if (!cur || !cur->node) return NULL; + if (evas_textblock_cursor_format_is_visible_get(cur)) + { + size_t len; + const char *fstr; + char *ret; + int pop = 0; + fstr = evas_textblock_node_format_text_get( + _evas_textblock_node_visible_at_pos_get( + evas_textblock_cursor_format_get(cur))); + + if (!fstr) + return NULL; + + if (*fstr == '-') pop = 1; + while ((*fstr == ' ') || (*fstr == '+') || (*fstr == '-')) fstr++; + len = strlen(fstr); + + { + char *tmp; + if (pop) + { + ret = tmp = malloc(len + 3 + 1); /* and the null */ + memcpy(tmp, " and the null */ + *tmp = '<'; + tmp++; + } + memcpy(tmp, fstr, len); + memcpy(tmp + len, ">", 2); /* Including the null */ + } + + return ret; + } + + ustr = eina_ustrbuf_string_get(cur->node->unicode); + buf[0] = ustr[cur->pos]; + buf[1] = 0; + s = eina_unicode_unicode_to_utf8(buf, NULL); + + return s; +} + +static char * +_evas_textblock_cursor_range_text_markup_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *_cur2) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Node_Text *tnode; + Eina_Strbuf *buf; + Evas_Textblock_Cursor *cur2; + buf = eina_strbuf_new(); + + if (!cur1 || !cur1->node) return NULL; + if (!_cur2 || !_cur2->node) return NULL; + if (cur1->obj != _cur2->obj) return NULL; + o = (Evas_Object_Textblock *)(cur1->obj->object_data); + if (evas_textblock_cursor_compare(cur1, _cur2) > 0) + { + const Evas_Textblock_Cursor *tc; + + tc = cur1; + cur1 = _cur2; + _cur2 = tc; + } + /* Work on a local copy of the cur */ + cur2 = alloca(sizeof(Evas_Textblock_Cursor)); + cur2->obj = _cur2->obj; + evas_textblock_cursor_copy(_cur2, cur2); + + /* Parse the text between the cursors. */ + for (tnode = cur1->node ; tnode ; + tnode = _NODE_TEXT(EINA_INLIST_GET(tnode)->next)) + { + Evas_Object_Textblock_Node_Format *fnode; + Eina_Unicode *text_base, *text; + int off = 0; + + text_base = text = + eina_unicode_strndup(eina_ustrbuf_string_get(tnode->unicode), + eina_ustrbuf_length_get(tnode->unicode)); + if (tnode == cur2->node) + { + fnode = _evas_textblock_node_text_get_first_format_between(tnode, + cur1->pos, cur2->pos); + } + else if (tnode == cur1->node) + { + fnode = _evas_textblock_node_text_get_first_format_between(tnode, + cur1->pos, -1); + } + else + { + fnode = _evas_textblock_node_text_get_first_format_between(tnode, + 0, -1); + } + /* Init the offset so the first one will count starting from cur1->pos + * and not the previous format node */ + if (tnode == cur1->node) + { + if (fnode) + { + off = _evas_textblock_node_format_pos_get(fnode) - + cur1->pos - fnode->offset; + } + text += cur1->pos; + } + else + { + off = 0; + } + while (fnode && (fnode->text_node == tnode)) + { + Eina_Unicode tmp_ch; + off += fnode->offset; + if ((tnode == cur2->node) && + ((size_t) (text - text_base + off) >= cur2->pos)) + { + break; + } + /* No need to skip on the first run */ + tmp_ch = text[off]; + text[off] = 0; /* Null terminate the part of the string */ + _markup_get_text_append(buf, text); + _markup_get_format_append(o, buf, fnode); + text[off] = tmp_ch; /* Restore the char */ + text += off; + if (fnode->visible) + { + off = -1; + text++; + } + else + { + off = 0; + } + fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); + } + /* If we got to the last node, stop and add the rest outside */ + if (cur2->node == tnode) + { + /* Add the rest, skip replacement */ + /* Don't go past the second cursor pos */ + text_base[cur2->pos] = '\0'; + _markup_get_text_append(buf, text); + free(text_base); + break; + } + else + { + /* Add the rest, skip replacement */ + _markup_get_text_append(buf, text); + free(text_base); + } + } + /* return the string */ + { + char *ret; + ret = eina_strbuf_string_steal(buf); + eina_strbuf_free(buf); + return ret; + } +} + +static char * +_evas_textblock_cursor_range_text_plain_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *_cur2) +{ + Eina_UStrbuf *buf; + Evas_Object_Textblock_Node_Text *n1, *n2; + Evas_Textblock_Cursor *cur2; + + buf = eina_ustrbuf_new(); + + if (!cur1 || !cur1->node) return NULL; + if (!_cur2 || !_cur2->node) return NULL; + if (cur1->obj != _cur2->obj) return NULL; + if (evas_textblock_cursor_compare(cur1, _cur2) > 0) + { + const Evas_Textblock_Cursor *tc; + + tc = cur1; + cur1 = _cur2; + _cur2 = tc; + } + n1 = cur1->node; + n2 = _cur2->node; + /* Work on a local copy of the cur */ + cur2 = alloca(sizeof(Evas_Textblock_Cursor)); + cur2->obj = _cur2->obj; + evas_textblock_cursor_copy(_cur2, cur2); + + + if (n1 == n2) + { + const Eina_Unicode *tmp; + tmp = eina_ustrbuf_string_get(n1->unicode); + eina_ustrbuf_append_length(buf, tmp + cur1->pos, cur2->pos - cur1->pos); + } + else + { + const Eina_Unicode *tmp; + tmp = eina_ustrbuf_string_get(n1->unicode); + eina_ustrbuf_append(buf, tmp + cur1->pos); + n1 = _NODE_TEXT(EINA_INLIST_GET(n1)->next); + while (n1 != n2) + { + tmp = eina_ustrbuf_string_get(n1->unicode); + eina_ustrbuf_append_length(buf, tmp, + eina_ustrbuf_length_get(n1->unicode)); + n1 = _NODE_TEXT(EINA_INLIST_GET(n1)->next); + } + tmp = eina_ustrbuf_string_get(n2->unicode); + eina_ustrbuf_append_length(buf, tmp, cur2->pos); + } + + /* Free and return */ + { + char *ret; + ret = eina_unicode_unicode_to_utf8(eina_ustrbuf_string_get(buf), NULL); + eina_ustrbuf_free(buf); + return ret; + } +} + +EAPI Eina_List * +evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) +{ + Evas_Object *obj = cur1->obj; + Eina_List *ret = NULL; + Evas_Object_Textblock_Node_Text *n1, *n2; + Evas_Object_Textblock_Node_Format *first, *last; + TB_HEAD_RETURN(NULL); + if (!cur1 || !cur1->node) return NULL; + if (!cur2 || !cur2->node) return NULL; + if (cur1->obj != cur2->obj) return NULL; + if (evas_textblock_cursor_compare(cur1, cur2) > 0) + { + const Evas_Textblock_Cursor *tc; + + tc = cur1; + cur1 = cur2; + cur2 = tc; + } + n1 = cur1->node; + n2 = cur2->node; + + /* FIXME: Change first and last getting to format_before_or_at_pos_get */ + + last = n2->format_node; + + /* If n2->format_node is NULL, we don't have formats in the tb/range. */ + if (!last) + return NULL; + /* If the found format is on our text node, we should go to the last + * one, otherwise, the one we found is good enough. */ + if (last->text_node == n2) + { + Evas_Object_Textblock_Node_Format *fnode = last; + while (fnode && (fnode->text_node == n2)) + { + last = fnode; + fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); + } + } + + /* If the first format node is within the range (i.e points to n1) or if + * we have other formats in the range, go through them */ + first = n1->format_node; + if ((first->text_node == n1) || (first != last)) + { + Evas_Object_Textblock_Node_Format *fnode = first; + /* Go to the first one in the range */ + if (first->text_node != n1) + { + first = _NODE_FORMAT(EINA_INLIST_GET(first)->next); + } + + while (fnode) + { + ret = eina_list_append(ret, fnode); + if (fnode == last) + break; + fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); + } + } + + return ret; + +} + +EAPI char * +evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format) +{ + if (format == EVAS_TEXTBLOCK_TEXT_MARKUP) + return _evas_textblock_cursor_range_text_markup_get(cur1, cur2); + else if (format == EVAS_TEXTBLOCK_TEXT_PLAIN) + return _evas_textblock_cursor_range_text_plain_get(cur1, cur2); + else + return NULL; /* Not yet supported */ +} + +EAPI const char * +evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) +{ + Evas_Textblock_Cursor cur1, cur2; + if (!cur) return NULL; + if (!cur->node) return NULL; + if (cur->node->utf8) + { + free(cur->node->utf8); + } + cur1.obj = cur2.obj = cur->obj; + cur1.node = cur2.node = cur->node; + evas_textblock_cursor_paragraph_char_first(&cur1); + evas_textblock_cursor_paragraph_char_last(&cur2); + + cur->node->utf8 = evas_textblock_cursor_range_text_get(&cur1, &cur2, + EVAS_TEXTBLOCK_TEXT_MARKUP); + return cur->node->utf8; +} + +EAPI int +evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) +{ + int len; + if (!cur) return -1; + if (!cur->node) return -1; + len = eina_ustrbuf_length_get(cur->node->unicode); + + if (EINA_INLIST_GET(cur->node)->next) + return len - 1; /* Remove the paragraph separator */ + else + return len; +} + +EAPI const Evas_Object_Textblock_Node_Format * +evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) +{ + if (!cur) return NULL; + if (!cur->node) return NULL; + return _evas_textblock_cursor_node_format_at_pos_get(cur); +} + +EAPI const char * +evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fmt) +{ + if (!fmt) return NULL; + return fmt->orig_format; +} + +EAPI void +evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt) +{ + if (!fmt || !cur) return; + cur->node = fmt->text_node; + cur->pos = _evas_textblock_node_format_pos_get(fmt); +} + +EAPI Eina_Bool +evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) +{ + const Eina_Unicode *text; + + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + text = eina_ustrbuf_string_get(cur->node->unicode); + return EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(text[cur->pos]); +} + +EAPI int +evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype) +{ + int ret = -1; + const Evas_Textblock_Cursor *dir_cur; + Evas_Textblock_Cursor cur2; + Evas_Object_Textblock *o; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + if (!o->formatted.valid) _relayout(cur->obj); + + dir_cur = cur; + if (ctype == EVAS_TEXTBLOCK_CURSOR_UNDER) + { + ret = evas_textblock_cursor_pen_geometry_get(cur, cx, cy, cw, ch); + } + else if (ctype == EVAS_TEXTBLOCK_CURSOR_BEFORE) + { + /* In the case of a "before cursor", we should get the coordinates + * of just after the previous char (which in bidi text may not be + * just before the current char). */ + Evas_Coord x, y, h, w; + Evas_Object_Textblock_Node_Format *fmt; + + /* If it's at the end of the line, we want to get the position, not + * the position of the previous */ + if ((cur->pos > 0) && !_evas_textblock_cursor_is_at_the_end(cur)) + { + Eina_Bool before_char = EINA_FALSE; + cur2.obj = cur->obj; + evas_textblock_cursor_copy(cur, &cur2); + evas_textblock_cursor_char_prev(&cur2); + + fmt = _evas_textblock_cursor_node_format_at_pos_get(&cur2); + + if (!fmt || !_IS_LINE_SEPARATOR(fmt->format)) + { + dir_cur = &cur2; + before_char = EINA_FALSE; + } + else + { + before_char = EINA_TRUE; + } + ret = evas_textblock_cursor_pen_geometry_get( + dir_cur, &x, &y, &w, &h); +#ifdef BIDI_SUPPORT + /* Adjust if the char is an rtl char */ + if (ret >= 0) + { + Eina_Bool is_rtl = EINA_FALSE; + if (dir_cur->node->par->is_bidi) + { + Evas_Object_Textblock_Line *ln; + Evas_Object_Textblock_Item *it; + _find_layout_item_match(dir_cur, &ln, &it); + if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) && + (_ITEM_TEXT(it)->text_props.bidi.dir == + EVAS_BIDI_DIRECTION_RTL)) + is_rtl = EINA_TRUE; + else if ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) && + (_ITEM_FORMAT(it)->bidi_dir == + EVAS_BIDI_DIRECTION_RTL)) + is_rtl = EINA_TRUE; + } + + if ((!before_char && is_rtl) || + (before_char && !is_rtl)) + { + /* Just don't advance the width */ + w = 0; + } + } +#endif + } + else if (cur->pos == 0) + { + ret = evas_textblock_cursor_pen_geometry_get( + dir_cur, &x, &y, &w, &h); +#ifdef BIDI_SUPPORT + Eina_Bool is_rtl = EINA_FALSE; + if (dir_cur->node && dir_cur->node->par->is_bidi) + { + Evas_Object_Textblock_Line *ln; + Evas_Object_Textblock_Item *it; + _find_layout_item_match(dir_cur, &ln, &it); + if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) && + (_ITEM_TEXT(it)->text_props.bidi.dir == + EVAS_BIDI_DIRECTION_RTL)) + is_rtl = EINA_TRUE; + else if ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) && + (_ITEM_FORMAT(it)->bidi_dir == + EVAS_BIDI_DIRECTION_RTL)) + is_rtl = EINA_TRUE; + } + + /* Adjust if the char is an rtl char */ + if ((ret >= 0) && (!is_rtl)) + { + /* Just don't advance the width */ + w = 0; + } +#endif + } + else + { + ret = evas_textblock_cursor_pen_geometry_get( + dir_cur, &x, &y, &w, &h); + } + if (ret >= 0) + { + if (cx) *cx = x + w; + if (cy) *cy = y; + if (cw) *cw = 0; + if (ch) *ch = h; + } + } + + if (dir && dir_cur && dir_cur->node) + { +#ifdef BIDI_SUPPORT + Eina_Bool is_rtl = EINA_FALSE; + if (dir_cur->node->par->is_bidi) + { + Evas_Object_Textblock_Line *ln; + Evas_Object_Textblock_Item *it; + _find_layout_item_match(dir_cur, &ln, &it); + if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) && + (_ITEM_TEXT(it)->text_props.bidi.dir == + EVAS_BIDI_DIRECTION_RTL)) + is_rtl = EINA_TRUE; + else if ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) && + (_ITEM_FORMAT(it)->bidi_dir == + EVAS_BIDI_DIRECTION_RTL)) + is_rtl = EINA_TRUE; + } + + if (_evas_textblock_cursor_is_at_the_end(dir_cur) && (dir_cur->pos > 0)) + { + *dir = (is_rtl) ? + EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR; + } + else if (dir_cur->pos > 0) + { + *dir = (is_rtl) ? + EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR; + } + else +#endif + { + *dir = EVAS_BIDI_DIRECTION_LTR; + } + } + return ret; +} + +/** + * @internal + * Returns the geometry/pen position (depending on query_func) of the char + * at pos. + * + * @param cur the position of the char. + * @param query_func the query function to use. + * @param cx the x of the char (or pen_x in the case of pen position). + * @param cy the y of the char. + * @param cw the w of the char (or advance in the case pen position). + * @param ch the h of the char. + * @return line number of the char on success, -1 on error. + */ +static int +_evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch), const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Line *ln = NULL; + Evas_Object_Textblock_Item *it = NULL; + Evas_Object_Textblock_Text_Item *ti = NULL; + Evas_Object_Textblock_Format_Item *fi = NULL; + int x = 0, y = 0, w = 0, h = 0; + int pos; + Eina_Bool previous_format; + + if (!cur) return -1; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + if (!o->formatted.valid) _relayout(cur->obj); + + if (!cur->node) + { + if (!o->text_nodes) + { + if (!o->paragraphs) return -1; + ln = o->paragraphs->lines; + if (!ln) return -1; + if (cx) *cx = ln->x; + if (cy) *cy = ln->par->y + ln->y; + if (cw) *cw = ln->w; + if (ch) *ch = ln->h; + return ln->par->line_no + ln->line_no; + } + else + return -1; + } + + previous_format = _find_layout_item_match(cur, &ln, &it); + if (!it) + { + return -1; + } + if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + ti = _ITEM_TEXT(it); + } + else + { + fi = _ITEM_FORMAT(it); + } + + if (ln && ti) + { + pos = cur->pos - ti->parent.text_pos; + + if (pos < 0) pos = 0; + if (ti->parent.format->font.font) + { + query_func(cur->ENDT, + ti->parent.format->font.font, + &ti->text_props, + pos, + &x, &y, &w, &h); + } + + x += ln->x + _ITEM(ti)->x; + + if (x < ln->x) + { + x = ln->x; + } + y = ln->par->y + ln->y; + h = ln->h; + } + else if (ln && fi) + { + if (previous_format) + { + if (_IS_LINE_SEPARATOR(fi->item)) + { + x = 0; + y = ln->par->y + ln->y + ln->h; + } + else + { +#ifdef BIDI_SUPPORT + if (ln->par->direction == EVAS_BIDI_DIRECTION_RTL) + { + x = ln->x; + } + else +#endif + { + x = ln->x + ln->w; + } + y = ln->par->y + ln->y; + } + w = 0; + h = ln->h; + } + else + { + x = ln->x + _ITEM(fi)->x; + y = ln->par->y + ln->y; + w = _ITEM(fi)->w; + h = ln->h; + } + } + else + { + return -1; + } + if (cx) *cx = x; + if (cy) *cy = y; + if (cw) *cw = w; + if (ch) *ch = h; + return ln->par->line_no + ln->line_no; +} + +EAPI int +evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) +{ + return _evas_textblock_cursor_char_pen_geometry_common_get( + cur->ENFN->font_char_coords_get, cur, cx, cy, cw, ch); +} + +EAPI int +evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) +{ + return _evas_textblock_cursor_char_pen_geometry_common_get( + cur->ENFN->font_pen_coords_get, cur, cx, cy, cw, ch); +} + +EAPI int +evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Line *ln = NULL; + Evas_Object_Textblock_Item *it = NULL; + int x, y, w, h; + + if (!cur) return -1; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + if (!o->formatted.valid) _relayout(cur->obj); + if (!cur->node) + { + ln = o->paragraphs->lines; + } + else + { + _find_layout_item_match(cur, &ln, &it); + } + if (!ln) return -1; + x = ln->x; + y = ln->par->y + ln->y; + w = ln->w; + h = ln->h; + if (cx) *cx = x; + if (cy) *cy = y; + if (cw) *cw = w; + if (ch) *ch = h; + return ln->par->line_no + ln->line_no; +} + +EAPI Eina_Bool +evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) +{ + Evas *e; + Evas_Coord cy, ch; + Evas_Object *obj = start->obj; + TB_HEAD_RETURN(EINA_FALSE); + e = evas_object_evas_get(obj); + cy = 0 - obj->cur.geometry.y; + ch = e->viewport.h; + evas_textblock_cursor_line_coord_set(start, cy); + evas_textblock_cursor_line_coord_set(end, cy + ch); + evas_textblock_cursor_line_char_last(end); + + return EINA_TRUE; +} + +EAPI Eina_Bool +evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Paragraph *found_par; + Evas_Object_Textblock_Line *ln; + Evas_Object_Textblock_Item *it = NULL; + + if (!cur) return EINA_FALSE; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + if (!o->formatted.valid) _relayout(cur->obj); + x += o->style_pad.l; + y += o->style_pad.t; + + found_par = _layout_find_paragraph_by_y(o, y); + if (found_par) + { + _layout_paragraph_render(o, found_par); + EINA_INLIST_FOREACH(found_par->lines, ln) + { + if (ln->par->y + ln->y > y) break; + if ((ln->par->y + ln->y <= y) && ((ln->par->y + ln->y + ln->h) > y)) + { + /* If before or after the line, go to start/end according + * to paragraph direction. */ + if (x < ln->x) + { + cur->pos = ln->items->text_pos; + cur->node = found_par->text_node; + if (found_par->direction == EVAS_BIDI_DIRECTION_RTL) + { + evas_textblock_cursor_line_char_last(cur); + } + else + { + evas_textblock_cursor_line_char_first(cur); + } + return EINA_TRUE; + } + else if (x >= ln->x + ln->w) + { + cur->pos = ln->items->text_pos; + cur->node = found_par->text_node; + if (found_par->direction == EVAS_BIDI_DIRECTION_RTL) + { + evas_textblock_cursor_line_char_first(cur); + } + else + { + evas_textblock_cursor_line_char_last(cur); + } + return EINA_TRUE; + } + + EINA_INLIST_FOREACH(ln->items, it) + { + if (((it->x + ln->x) <= x) && (((it->x + ln->x) + it->adv) > x)) + { + if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + int pos; + int cx, cy, cw, ch; + Evas_Object_Textblock_Text_Item *ti; + ti = _ITEM_TEXT(it); + + pos = -1; + if (ti->parent.format->font.font) + pos = cur->ENFN->font_char_at_coords_get( + cur->ENDT, + ti->parent.format->font.font, + &ti->text_props, + x - it->x - ln->x, 0, + &cx, &cy, &cw, &ch); + if (pos < 0) + return EINA_FALSE; + cur->pos = pos + it->text_pos; + cur->node = it->text_node; + return EINA_TRUE; + } + else + { + Evas_Object_Textblock_Format_Item *fi; + fi = _ITEM_FORMAT(it); + cur->pos = fi->parent.text_pos; + cur->node = found_par->text_node; + return EINA_TRUE; + } + } + } + } + } + } + else if (o->paragraphs && (y >= o->paragraphs->y + o->formatted.h)) + { + /* If we are after the last paragraph, use the last position in the + * text. */ + evas_textblock_cursor_paragraph_last(cur); + return EINA_TRUE; + } + else if (o->paragraphs && (y < o->paragraphs->y)) + { + evas_textblock_cursor_paragraph_first(cur); + return EINA_TRUE; + } + + return EINA_FALSE; +} + +EAPI int +evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Paragraph *found_par; + Evas_Object_Textblock_Line *ln; + + if (!cur) return -1; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + if (!o->formatted.valid) _relayout(cur->obj); + y += o->style_pad.t; + + found_par = _layout_find_paragraph_by_y(o, y); + + if (found_par) + { + _layout_paragraph_render(o, found_par); + EINA_INLIST_FOREACH(found_par->lines, ln) + { + if (ln->par->y + ln->y > y) break; + if ((ln->par->y + ln->y <= y) && ((ln->par->y + ln->y + ln->h) > y)) + { + evas_textblock_cursor_line_set(cur, ln->par->line_no + + ln->line_no); + return ln->par->line_no + ln->line_no; + } + } + } + else if (o->paragraphs && (y >= o->paragraphs->y + o->formatted.h)) + { + int line_no = 0; + /* If we are after the last paragraph, use the last position in the + * text. */ + evas_textblock_cursor_paragraph_last(cur); + if (cur->node && cur->node->par) + { + line_no = cur->node->par->line_no; + if (cur->node->par->lines) + { + line_no += ((Evas_Object_Textblock_Line *) + EINA_INLIST_GET(cur->node->par->lines)->last)->line_no; + } + } + return line_no; + } + else if (o->paragraphs && (y < o->paragraphs->y)) + { + int line_no = 0; + evas_textblock_cursor_paragraph_first(cur); + if (cur->node && cur->node->par) + { + line_no = cur->node->par->line_no; + } + return line_no; + } + return -1; +} + +/** + * @internal + * Updates x and w according to the text direction, position in text and + * if it's a special case switch + * + * @param ti the text item we are working on + * @param x the current x (we get) and the x we return + * @param w the current w (we get) and the w we return + * @param start if this is the first item or not + * @param switch_items toogles item switching (rtl cases) + */ +static void +_evas_textblock_range_calc_x_w(const Evas_Object_Textblock_Item *it, + Evas_Coord *x, Evas_Coord *w, Eina_Bool start, Eina_Bool switch_items) +{ + if ((start && !switch_items) || (!start && switch_items)) + { +#ifdef BIDI_SUPPORT + if (((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) && + _ITEM_TEXT(it)->text_props.bidi.dir == EVAS_BIDI_DIRECTION_RTL) + || + ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) && + _ITEM_FORMAT(it)->bidi_dir == EVAS_BIDI_DIRECTION_RTL)) + { + *w = *x + *w; + *x = 0; + } + else +#endif + { + *w = it->adv - *x; + } + } + else + { +#ifdef BIDI_SUPPORT + if (((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) && + _ITEM_TEXT(it)->text_props.bidi.dir == EVAS_BIDI_DIRECTION_RTL) + || + ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) && + _ITEM_FORMAT(it)->bidi_dir == EVAS_BIDI_DIRECTION_RTL)) + { + *x = *x + *w; + *w = it->adv - *x; + } + else +#endif + { + *w = *x; + *x = 0; + } + } + +} + +/** + * @internal + * Returns the geometry of the range in line ln. Cur1 is the start cursor, + * cur2 is the end cursor, NULL means from the start or to the end accordingly. + * Assumes that ln is valid, and that at least one of cur1 and cur2 is not NULL. + * + * @param ln the line to work on. + * @param cur1 the start cursor + * @param cur2 the end cursor + * @return Returns the geometry of the range + */ +static Eina_List * +_evas_textblock_cursor_range_in_line_geometry_get( + const Evas_Object_Textblock_Line *ln, const Evas_Textblock_Cursor *cur1, + const Evas_Textblock_Cursor *cur2) +{ + Evas_Object_Textblock_Item *it; + Evas_Object_Textblock_Item *it1, *it2; + Eina_List *rects = NULL; + Evas_Textblock_Rectangle *tr; + size_t start, end; + Eina_Bool switch_items; + const Evas_Textblock_Cursor *cur; + + cur = (cur1) ? cur1 : cur2; + + if (!cur) return NULL; + + /* Find the first and last items */ + it1 = it2 = NULL; + start = end = 0; + EINA_INLIST_FOREACH(ln->items, it) + { + size_t item_len; + item_len = (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? + _ITEM_TEXT(it)->text_props.text_len + : 1; + if ((!cur1 || (cur1->pos < it->text_pos + item_len)) && + (!cur2 || (cur2->pos >= it->text_pos))) + { + if (!it1) + { + it1 = it; + start = item_len; /* start stores the first item_len */ + } + it2 = it; + end = item_len; /* end stores the last item_len */ + } + } + + /* If we couldn't find even one item, return */ + if (!it1) return NULL; + + /* If the first item is logically before or equal the second item + * we have to set start and end differently than in the other case */ + if (it1->text_pos <= it2->text_pos) + { + start = (cur1) ? (cur1->pos - it1->text_pos) : 0; + end = (cur2) ? (cur2->pos - it2->text_pos) : end; + switch_items = EINA_FALSE; + } + else + { + start = (cur2) ? (cur2->pos - it1->text_pos) : start; + end = (cur1) ? (cur1->pos - it2->text_pos) : 0; + switch_items = EINA_TRUE; + } + + /* IMPORTANT: Don't use cur1/cur2 past this point (because they probably + * don't make sense anymore. That's why there are start and end), + * unless you know what you are doing */ + + /* Special case when they share the same item and it's a text item */ + if ((it1 == it2) && (it1->type == EVAS_TEXTBLOCK_ITEM_TEXT)) + { + Evas_Coord x1, w1, x2, w2; + Evas_Coord x, w, y, h; + Evas_Object_Textblock_Text_Item *ti; + int ret = 0; + + ti = _ITEM_TEXT(it1); + if (ti->parent.format->font.font) + { + ret = cur->ENFN->font_pen_coords_get(cur->ENDT, + ti->parent.format->font.font, + &ti->text_props, + start, + &x1, &y, &w1, &h); + } + if (!ret) + { + return NULL; + } + ret = cur->ENFN->font_pen_coords_get(cur->ENDT, + ti->parent.format->font.font, + &ti->text_props, + end, + &x2, &y, &w2, &h); + if (!ret) + { + return NULL; + } + + /* Make x2 the one on the right */ + if (x2 < x1) + { + Evas_Coord tmp; + tmp = x1; + x1 = x2; + x2 = tmp; + + tmp = w1; + w1 = w2; + w2 = tmp; + } + +#ifdef BIDI_SUPPORT + if (ti->text_props.bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + x = x1 + w1; + w = x2 + w2 - x; + } + else +#endif + { + x = x1; + w = x2 - x1; + } + if (w > 0) + { + tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); + rects = eina_list_append(rects, tr); + tr->x = ln->x + it1->x + x; + tr->y = ln->par->y + ln->y; + tr->h = ln->h; + tr->w = w; + } + } + else if (it1 != it2) + { + /* Get the middle items */ + Evas_Coord min_x, max_x; + Evas_Coord x, w; + it = _ITEM(EINA_INLIST_GET(it1)->next); + min_x = max_x = it->x; + + if (it1->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + Evas_Coord y, h; + Evas_Object_Textblock_Text_Item *ti; + int ret; + ti = _ITEM_TEXT(it1); + + ret = cur->ENFN->font_pen_coords_get(cur->ENDT, + ti->parent.format->font.font, + &ti->text_props, + start, + &x, &y, &w, &h); + if (!ret) + { + /* BUG! Skip the first item */ + x = w = 0; + } + else + { + _evas_textblock_range_calc_x_w(it1, &x, &w, EINA_TRUE, + switch_items); + } + } + else + { + x = 0; + w = it1->w; + _evas_textblock_range_calc_x_w(it1, &x, &w, EINA_TRUE, + switch_items); + } + if (w > 0) + { + tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); + rects = eina_list_append(rects, tr); + tr->x = ln->x + it1->x + x; + tr->y = ln->par->y + ln->y; + tr->h = ln->h; + tr->w = w; + } + + while (it && (it != it2)) + { + max_x = it->x + it->adv; + it = (Evas_Object_Textblock_Item *) EINA_INLIST_GET(it)->next; + } + if (min_x != max_x) + { + tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); + rects = eina_list_append(rects, tr); + tr->x = ln->x + min_x; + tr->y = ln->par->y + ln->y; + tr->h = ln->h; + tr->w = max_x - min_x; + } + if (it2->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + Evas_Coord y, h; + Evas_Object_Textblock_Text_Item *ti; + int ret; + ti = _ITEM_TEXT(it2); + + ret = cur->ENFN->font_pen_coords_get(cur->ENDT, + ti->parent.format->font.font, + &ti->text_props, + end, + &x, &y, &w, &h); + if (!ret) + { + /* BUG! skip the last item */ + x = w = 0; + } + else + { + _evas_textblock_range_calc_x_w(it2, &x, &w, EINA_FALSE, + switch_items); + } + } + else + { + x = 0; + w = it2->w; + _evas_textblock_range_calc_x_w(it2, &x, &w, EINA_FALSE, + switch_items); + } + if (w > 0) + { + tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); + rects = eina_list_append(rects, tr); + tr->x = ln->x + it2->x + x; + tr->y = ln->par->y + ln->y; + tr->h = ln->h; + tr->w = w; + } + } + return rects; +} + +EAPI Eina_List * +evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Line *ln1, *ln2; + Evas_Object_Textblock_Item *it1, *it2; + Eina_List *rects = NULL; + Evas_Textblock_Rectangle *tr; + + if (!cur1 || !cur1->node) return NULL; + if (!cur2 || !cur2->node) return NULL; + if (cur1->obj != cur2->obj) return NULL; + o = (Evas_Object_Textblock *)(cur1->obj->object_data); + if (!o->formatted.valid) _relayout(cur1->obj); + if (evas_textblock_cursor_compare(cur1, cur2) > 0) + { + const Evas_Textblock_Cursor *tc; + + tc = cur1; + cur1 = cur2; + cur2 = tc; + } + + ln1 = ln2 = NULL; + it1 = it2 = NULL; + _find_layout_item_match(cur1, &ln1, &it1); + if (!ln1 || !it1) return NULL; + _find_layout_item_match(cur2, &ln2, &it2); + if (!ln2 || !it2) return NULL; + + if (ln1 == ln2) + { + rects = _evas_textblock_cursor_range_in_line_geometry_get(ln1, + cur1, cur2); + } + else + { + Evas_Object_Textblock_Line *plni, *lni; + Eina_List *rects2 = NULL; + /* Handle the first line */ + rects = _evas_textblock_cursor_range_in_line_geometry_get(ln1, + cur1, NULL); + + /* Handle the lines between the first and the last line */ + lni = (Evas_Object_Textblock_Line *) EINA_INLIST_GET(ln1)->next; + if (!lni && (ln1->par != ln2->par)) + { + lni = ((Evas_Object_Textblock_Paragraph *) + EINA_INLIST_GET(ln1->par)->next)->lines; + } + while (lni && (lni != ln2)) + { + tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); + rects = eina_list_append(rects, tr); + tr->x = lni->x; + tr->y = lni->par->y + lni->y; + tr->h = lni->h; + tr->w = lni->w; + plni = lni; + lni = (Evas_Object_Textblock_Line *) EINA_INLIST_GET(lni)->next; + if (!lni && (plni->par != ln2->par)) + { + lni = ((Evas_Object_Textblock_Paragraph *) + EINA_INLIST_GET(plni->par)->next)->lines; + } + } + rects2 = _evas_textblock_cursor_range_in_line_geometry_get(ln2, + NULL, cur2); + rects = eina_list_merge(rects, rects2); + } + return rects; +} + +EAPI Eina_Bool +evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Line *ln = NULL; + Evas_Object_Textblock_Format_Item *fi; + Evas_Object_Textblock_Item *it = NULL; + Evas_Coord x, y, w, h; + + if (!cur || !evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE; + o = (Evas_Object_Textblock *)(cur->obj->object_data); + if (!o->formatted.valid) _relayout(cur->obj); + if (!evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE; + _find_layout_item_line_match(cur->obj, cur->node, cur->pos, &ln, &it); + fi = _ITEM_FORMAT(it); + if ((!ln) || (!fi)) return EINA_FALSE; + x = ln->x + fi->parent.x; + y = ln->par->y + ln->y + ln->baseline + fi->y; + w = fi->parent.w; + h = fi->parent.h; + if (cx) *cx = x; + if (cy) *cy = y; + if (cw) *cw = w; + if (ch) *ch = h; + return EINA_TRUE; +} + +EAPI Eina_Bool +evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) +{ + Eina_Bool ret = EINA_FALSE; + Evas_Textblock_Cursor cur2; + if (!cur) return EINA_FALSE; + + cur2.obj = cur->obj; + evas_textblock_cursor_copy(cur, &cur2); + evas_textblock_cursor_line_char_last(&cur2); + if (cur2.pos == cur->pos) + { + ret = EINA_TRUE; + } + return ret; +} + +/* general controls */ +EAPI Eina_Bool +evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) +{ + Evas_Object_Textblock_Line *ln; + + TB_HEAD_RETURN(0); + ln = _find_layout_line_num(obj, line); + if (!ln) return EINA_FALSE; + if (cx) *cx = ln->x; + if (cy) *cy = ln->par->y + ln->y; + if (cw) *cw = ln->w; + if (ch) *ch = ln->h; + return EINA_TRUE; +} + +EAPI void +evas_object_textblock_clear(Evas_Object *obj) +{ + Eina_List *l; + Evas_Textblock_Cursor *cur; + + TB_HEAD(); + if (o->paragraphs) + { + _paragraphs_free(obj, o->paragraphs); + o->paragraphs = NULL; + } + + _nodes_clear(obj); + o->cursor->node = NULL; + o->cursor->pos = 0; + EINA_LIST_FOREACH(o->cursors, l, cur) + { + cur->node = NULL; + cur->pos = 0; + + } + _evas_textblock_changed(o, obj); +} + +EAPI void +evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) +{ + TB_HEAD(); + if (!o->formatted.valid) _relayout(obj); + if (w) *w = o->formatted.w; + if (h) *h = o->formatted.h; +} + +static void +_size_native_calc_line_finalize(const Evas_Object *obj, Eina_List *items, + Evas_Coord *ascent, Evas_Coord *descent, Evas_Coord *w) +{ + Evas_Object_Textblock_Item *it; + Eina_List *i; + + it = eina_list_data_get(items); + /* If there are no text items yet, calc ascent/descent + * according to the current format. */ + if (it && (*ascent + *descent == 0)) + _layout_format_ascent_descent_adjust(obj, ascent, descent, it->format); + + *w = 0; + /* Adjust all the item sizes according to the final line size, + * and update the x positions of all the items of the line. */ + EINA_LIST_FOREACH(items, i, it) + { + if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + { + Evas_Coord fw, fh, fy; + + Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it); + if (!fi->formatme) goto loop_advance; + _layout_calculate_format_item_size(obj, fi, ascent, + descent, &fy, &fw, &fh); + } + +loop_advance: + *w += it->adv; + } +} + +/* FIXME: doc */ +static void +_size_native_calc_paragraph_size(const Evas_Object *obj, + const Evas_Object_Textblock *o, + const Evas_Object_Textblock_Paragraph *par, + Evas_Coord *_w, Evas_Coord *_h) +{ + Eina_List *i; + Evas_Object_Textblock_Item *it; + Eina_List *line_items = NULL; + Evas_Coord w = 0, y = 0, wmax = 0, h = 0, ascent = 0, descent = 0; + + EINA_LIST_FOREACH(par->logical_items, i, it) + { + line_items = eina_list_append(line_items, it); + if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + { + Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it); + if (fi->item && (_IS_LINE_SEPARATOR(fi->item) || + _IS_PARAGRAPH_SEPARATOR(o, fi->item))) + { + _size_native_calc_line_finalize(obj, line_items, &ascent, + &descent, &w); + + if (ascent + descent > h) + h = ascent + descent; + + y += h; + if (w > wmax) + wmax = w; + h = 0; + ascent = descent = 0; + line_items = eina_list_free(line_items); + } + else + { + Evas_Coord fw, fh, fy; + /* If there are no text items yet, calc ascent/descent + * according to the current format. */ + if (it && (ascent + descent == 0)) + _layout_format_ascent_descent_adjust(obj, &ascent, + &descent, it->format); + + _layout_calculate_format_item_size(obj, fi, &ascent, + &descent, &fy, &fw, &fh); + } + } + else + { + _layout_format_ascent_descent_adjust(obj, &ascent, + &descent, it->format); + } + } + + _size_native_calc_line_finalize(obj, line_items, &ascent, &descent, &w); + + line_items = eina_list_free(line_items); + + /* Do the last addition */ + if (ascent + descent > h) + h = ascent + descent; + + if (w > wmax) + wmax = w; + + *_h = y + h; + *_w = wmax; +} + +EAPI void +evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) +{ + TB_HEAD(); + if (!o->native.valid) + { + Evas_Coord wmax = 0, hmax = 0; + Evas_Object_Textblock_Paragraph *par; + /* We just want the layout objects to update, should probably + * split that. */ + if (!o->formatted.valid) _relayout(obj); + EINA_INLIST_FOREACH(o->paragraphs, par) + { + Evas_Coord tw, th; + _size_native_calc_paragraph_size(obj, o, par, &tw, &th); + if (tw > wmax) + wmax = tw; + hmax += th; + } + + o->native.w = wmax; + o->native.h = hmax; + + o->native.valid = 1; + o->content_changed = 0; + o->format_changed = EINA_FALSE; + } + if (w) *w = o->native.w; + if (h) *h = o->native.h; +} + +EAPI void +evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) +{ + TB_HEAD(); + if (!o->formatted.valid) _relayout(obj); + if (l) *l = o->style_pad.l; + if (r) *r = o->style_pad.r; + if (t) *t = o->style_pad.t; + if (b) *b = o->style_pad.b; +} + +/** @internal + * FIXME: DELETE ME! DELETE ME! + * This is an ugly workaround to get around the fact that + * evas_object_textblock_coords_recalc isn't really called when it's supposed + * to. When that bug is fixed please remove this. */ +static void +_workaround_object_coords_recalc(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +{ + evas_object_textblock_coords_recalc(obj); +} + +/* all nice and private */ +static void +evas_object_textblock_init(Evas_Object *obj) +{ + Evas_Object_Textblock *o; +#ifdef HAVE_LINEBREAK + static Eina_Bool linebreak_init = EINA_FALSE; + if (!linebreak_init) + { + linebreak_init = EINA_TRUE; + init_linebreak(); + } +#endif + + /* alloc image ob, setup methods and default values */ + obj->object_data = evas_object_textblock_new(); + /* set up default settings for this kind of object */ + obj->cur.color.r = 255; + obj->cur.color.g = 255; + obj->cur.color.b = 255; + obj->cur.color.a = 255; + obj->cur.geometry.x = 0.0; + obj->cur.geometry.y = 0.0; + obj->cur.geometry.w = 0.0; + obj->cur.geometry.h = 0.0; + obj->cur.layer = 0; + /* set up object-specific settings */ + obj->prev = obj->cur; + /* set up methods (compulsory) */ + obj->func = &object_func; + obj->type = o_type; + + o = (Evas_Object_Textblock *)(obj->object_data); + o->cursor->obj = obj; + o->legacy_newline = EINA_TRUE; + evas_object_event_callback_priority_add(obj, EVAS_CALLBACK_RESIZE, -1000, + _workaround_object_coords_recalc, NULL); +} + +static void * +evas_object_textblock_new(void) +{ + Evas_Object_Textblock *o; + + /* alloc obj private data */ + EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_textblock", Evas_Object_Textblock, 64, NULL); + o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Textblock); + if (!o) return NULL; + EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Textblock); + o->magic = MAGIC_OBJ_TEXTBLOCK; + o->cursor = calloc(1, sizeof(Evas_Textblock_Cursor)); + _format_command_init(); + return o; +} + +static void +evas_object_textblock_free(Evas_Object *obj) +{ + Evas_Object_Textblock *o; + + evas_object_textblock_clear(obj); + evas_object_textblock_style_set(obj, NULL); + o = (Evas_Object_Textblock *)(obj->object_data); + free(o->cursor); + while (o->cursors) + { + Evas_Textblock_Cursor *cur; + + cur = (Evas_Textblock_Cursor *)o->cursors->data; + o->cursors = eina_list_remove_list(o->cursors, o->cursors); + free(cur); + } + if (o->repch) eina_stringshare_del(o->repch); + if (o->ellip_ti) _item_free(obj, NULL, _ITEM(o->ellip_ti)); + o->magic = 0; + EVAS_MEMPOOL_FREE(_mp_obj, o); + _format_command_shutdown(); +} + + +static void +evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) +{ + Evas_Object_Textblock_Paragraph *par, *start = NULL; + Evas_Object_Textblock_Line *ln; + Evas_Object_Textblock *o; + int i, j; + int cx, cy, cw, ch, clip; + const char vals[5][5] = + { + {0, 1, 2, 1, 0}, + {1, 3, 4, 3, 1}, + {2, 4, 5, 4, 2}, + {1, 3, 4, 3, 1}, + {0, 1, 2, 1, 0} + }; + + /* render object to surface with context, and offxet by x,y */ + o = (Evas_Object_Textblock *)(obj->object_data); + obj->layer->evas->engine.func->context_multiplier_unset(output, + context); + /* FIXME: This clipping is just until we fix inset handling correctly. */ + ENFN->context_clip_clip(output, context, + obj->cur.geometry.x + x, + obj->cur.geometry.y + y, + obj->cur.geometry.w, + obj->cur.geometry.h); + clip = ENFN->context_clip_get(output, context, &cx, &cy, &cw, &ch); + /* If there are no paragraphs and thus there are no lines, + * there's nothing left to do. */ + if (!o->paragraphs) return; + +#define ITEM_WALK() \ + EINA_INLIST_FOREACH(start, par) \ + { \ + if (!par->visible) continue; \ + if (clip) \ + { \ + if ((obj->cur.geometry.y + y + par->y + par->h) < (cy - 20)) \ + continue; \ + if ((obj->cur.geometry.y + y + par->y) > (cy + ch + 20)) \ + break; \ + } \ + _layout_paragraph_render(o, par); \ + EINA_INLIST_FOREACH(par->lines, ln) \ + { \ + Evas_Object_Textblock_Item *itr; \ + \ + if (clip) \ + { \ + if ((obj->cur.geometry.y + y + par->y + ln->y + ln->h) < (cy - 20)) \ + continue; \ + if ((obj->cur.geometry.y + y + par->y + ln->y) > (cy + ch + 20)) \ + break; \ + } \ + EINA_INLIST_FOREACH(ln->items, itr) \ + { \ + Evas_Coord yoff; \ + yoff = ln->baseline; \ + if (itr->format->valign != -1.0) \ + { \ + yoff += itr->format->valign * (ln->h - itr->h); \ + } \ + if (clip) \ + { \ + if ((obj->cur.geometry.x + x + ln->x + itr->x + itr->w) < (cx - 20)) \ + continue; \ + if ((obj->cur.geometry.x + x + ln->x + itr->x) > (cx + cw + 20)) \ + break; \ + } \ + if ((ln->x + itr->x + itr->w) <= 0) continue; \ + if (ln->x + itr->x > obj->cur.geometry.w) break; \ + do + +#define ITEM_WALK_END() \ + while (0); \ + } \ + } \ + } \ + do {} while(0) +#define COLOR_SET(col) \ + ENFN->context_color_set(output, context, \ + (obj->cur.cache.clip.r * ti->parent.format->color.col.r) / 255, \ + (obj->cur.cache.clip.g * ti->parent.format->color.col.g) / 255, \ + (obj->cur.cache.clip.b * ti->parent.format->color.col.b) / 255, \ + (obj->cur.cache.clip.a * ti->parent.format->color.col.a) / 255); +#define COLOR_SET_AMUL(col, amul) \ + ENFN->context_color_set(output, context, \ + (obj->cur.cache.clip.r * ti->parent.format->color.col.r * (amul)) / 65025, \ + (obj->cur.cache.clip.g * ti->parent.format->color.col.g * (amul)) / 65025, \ + (obj->cur.cache.clip.b * ti->parent.format->color.col.b * (amul)) / 65025, \ + (obj->cur.cache.clip.a * ti->parent.format->color.col.a * (amul)) / 65025); +#define DRAW_TEXT(ox, oy) \ + if (ti->parent.format->font.font) ENFN->font_draw(output, context, surface, ti->parent.format->font.font, \ + obj->cur.geometry.x + ln->x + ti->parent.x + x + (ox), \ + obj->cur.geometry.y + ln->par->y + ln->y + yoff + y + (oy), \ + ti->parent.w, ti->parent.h, ti->parent.w, ti->parent.h, \ + &ti->text_props); + + /* backing */ +#define DRAW_RECT(ox, oy, ow, oh, or, og, ob, oa) \ + do \ + { \ + ENFN->context_color_set(output, \ + context, \ + (obj->cur.cache.clip.r * or) / 255, \ + (obj->cur.cache.clip.g * og) / 255, \ + (obj->cur.cache.clip.b * ob) / 255, \ + (obj->cur.cache.clip.a * oa) / 255); \ + ENFN->rectangle_draw(output, \ + context, \ + surface, \ + obj->cur.geometry.x + ln->x + x + (ox), \ + obj->cur.geometry.y + ln->par->y + ln->y + y + (oy), \ + (ow), \ + (oh)); \ + } \ + while (0) + +#define DRAW_FORMAT_DASHED(oname, oy, oh, dw, dp) \ + do \ + { \ + if (itr->format->oname) \ + { \ + unsigned char _or, _og, _ob, _oa; \ + int _ind, _dx = 0, _dn, _dr; \ + _or = itr->format->color.oname.r; \ + _og = itr->format->color.oname.g; \ + _ob = itr->format->color.oname.b; \ + _oa = itr->format->color.oname.a; \ + if (!EINA_INLIST_GET(itr)->next) \ + { \ + _dn = itr->w / (dw + dp); \ + _dr = itr->w % (dw + dp); \ + } \ + else \ + { \ + _dn = itr->adv / (dw + dp); \ + _dr = itr->adv % (dw + dp); \ + } \ + if (_dr > dw) _dr = dw; \ + for (_ind = 0 ; _ind < _dn ; _ind++) \ + { \ + DRAW_RECT(itr->x + _dx, oy, dw, oh, _or, _og, _ob, _oa); \ + _dx += dw + dp; \ + } \ + DRAW_RECT(itr->x + _dx, oy, _dr, oh, _or, _og, _ob, _oa); \ + } \ + } \ + while (0) + +#define DRAW_FORMAT(oname, oy, oh) \ + do \ + { \ + if (itr->format->oname) \ + { \ + unsigned char _or, _og, _ob, _oa; \ + _or = itr->format->color.oname.r; \ + _og = itr->format->color.oname.g; \ + _ob = itr->format->color.oname.b; \ + _oa = itr->format->color.oname.a; \ + if (!EINA_INLIST_GET(itr)->next) \ + { \ + DRAW_RECT(itr->x, oy, itr->w, oh, _or, _og, _ob, _oa); \ + } \ + else \ + { \ + DRAW_RECT(itr->x, oy, itr->adv, oh, _or, _og, _ob, _oa); \ + } \ + } \ + } \ + while (0) + + { + Evas_Coord look_for_y = 0 - (obj->cur.geometry.y + y); + if (clip) + { + Evas_Coord tmp_lfy = cy - (obj->cur.geometry.y + y); + if (tmp_lfy > look_for_y) + look_for_y = tmp_lfy; + } + + if (look_for_y >= 0) + start = _layout_find_paragraph_by_y(o, look_for_y); + + if (!start) + start = o->paragraphs; + } + + ITEM_WALK() + { + DRAW_FORMAT(backing, 0, ln->h); + } + ITEM_WALK_END(); + + /* There are size adjustments that depend on the styles drawn here back + * in "_text_item_update_sizes" should not modify one without the other. */ + + /* prepare everything for text draw */ + + /* shadows */ + ITEM_WALK() + { + int shad_dst, shad_sz, dx, dy, haveshad; + Evas_Object_Textblock_Text_Item *ti; + ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL; + if (!ti) continue; + + shad_dst = shad_sz = dx = dy = haveshad = 0; + switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_BASIC) + { + case EVAS_TEXT_STYLE_SHADOW: + case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW: + shad_dst = 1; + haveshad = 1; + break; + case EVAS_TEXT_STYLE_OUTLINE_SHADOW: + case EVAS_TEXT_STYLE_FAR_SHADOW: + shad_dst = 2; + haveshad = 1; + break; + case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW: + shad_dst = 2; + shad_sz = 2; + haveshad = 1; + break; + case EVAS_TEXT_STYLE_SOFT_SHADOW: + shad_dst = 1; + shad_sz = 2; + haveshad = 1; + break; + default: + break; + } + if (haveshad) + { + if (shad_dst > 0) + { + switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) + { + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT: + dx = 1; + dy = 1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM: + dx = 0; + dy = 1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT: + dx = -1; + dy = 1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT: + dx = -1; + dy = 0; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT: + dx = -1; + dy = -1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP: + dx = 0; + dy = -1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT: + dx = 1; + dy = -1; + break; + case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT: + dx = 1; + dy = 0; + default: + break; + } + dx *= shad_dst; + dy *= shad_dst; + } + switch (shad_sz) + { + case 0: + COLOR_SET(shadow); + DRAW_TEXT(dx, dy); + break; + case 2: + for (j = 0; j < 5; j++) + { + for (i = 0; i < 5; i++) + { + if (vals[i][j] != 0) + { + COLOR_SET_AMUL(shadow, vals[i][j] * 50); + DRAW_TEXT(i - 2 + dx, j - 2 + dy); + } + } + } + break; + default: + break; + } + } + } + ITEM_WALK_END(); + + /* glows */ + ITEM_WALK() + { + Evas_Object_Textblock_Text_Item *ti; + ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL; + if (!ti) continue; + + if (ti->parent.format->style == EVAS_TEXT_STYLE_GLOW) + { + for (j = 0; j < 5; j++) + { + for (i = 0; i < 5; i++) + { + if (vals[i][j] != 0) + { + COLOR_SET_AMUL(glow, vals[i][j] * 50); + DRAW_TEXT(i - 2, j - 2); + } + } + } + COLOR_SET(glow2); + DRAW_TEXT(-1, 0); + DRAW_TEXT(1, 0); + DRAW_TEXT(0, -1); + DRAW_TEXT(0, 1); + } + } + ITEM_WALK_END(); + + /* outlines */ + ITEM_WALK() + { + Evas_Object_Textblock_Text_Item *ti; + ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL; + if (!ti) continue; + + if ((ti->parent.format->style == EVAS_TEXT_STYLE_OUTLINE) || + (ti->parent.format->style == EVAS_TEXT_STYLE_OUTLINE_SHADOW) || + (ti->parent.format->style == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW)) + { + COLOR_SET(outline); + DRAW_TEXT(-1, 0); + DRAW_TEXT(1, 0); + DRAW_TEXT(0, -1); + DRAW_TEXT(0, 1); + } + else if (ti->parent.format->style == EVAS_TEXT_STYLE_SOFT_OUTLINE) + { + for (j = 0; j < 5; j++) + { + for (i = 0; i < 5; i++) + { + if (((i != 2) || (j != 2)) && (vals[i][j] != 0)) + { + COLOR_SET_AMUL(outline, vals[i][j] * 50); + DRAW_TEXT(i - 2, j - 2); + } + } + } + } + } + ITEM_WALK_END(); + + /* normal text and lines */ + ITEM_WALK() + { + Evas_Object_Textblock_Text_Item *ti; + ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL; + /* NORMAL TEXT */ + if (ti) + { + COLOR_SET(normal); + DRAW_TEXT(0, 0); + } + + /* STRIKETHROUGH */ + DRAW_FORMAT(strikethrough, (ln->h / 2), 1); + + /* UNDERLINE */ + DRAW_FORMAT(underline, ln->baseline + 1, 1); + + /* UNDERLINE DASHED */ + DRAW_FORMAT_DASHED(underline_dash, ln->baseline + 1, 1, + ti->parent.format->underline_dash_width, + ti->parent.format->underline_dash_gap); + + /* UNDERLINE2 */ + DRAW_FORMAT(underline2, ln->baseline + 3, 1); + } + ITEM_WALK_END(); +} + +static void +evas_object_textblock_render_pre(Evas_Object *obj) +{ + Evas_Object_Textblock *o; + int is_v, was_v; + + /* dont pre-render the obj twice! */ + if (obj->pre_render_done) return; + obj->pre_render_done = 1; + /* pre-render phase. this does anything an object needs to do just before */ + /* rendering. this could mean loading the image data, retrieving it from */ + /* elsewhere, decoding video etc. */ + /* then when this is done the object needs to figure if it changed and */ + /* if so what and where and add the appropriate redraw textblocks */ + o = (Evas_Object_Textblock *)(obj->object_data); + if ((o->changed) || (o->content_changed) || (o->format_changed) || + ((obj->cur.geometry.w != o->last_w) || + (((o->valign != 0.0) || (o->have_ellipsis)) && + (obj->cur.geometry.h != o->last_h)))) + { + _relayout(obj); + o->redraw = 0; + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + is_v = evas_object_is_visible(obj); + was_v = evas_object_was_visible(obj); + goto done; + } + if (o->redraw) + { + o->redraw = 0; + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + is_v = evas_object_is_visible(obj); + was_v = evas_object_was_visible(obj); + goto done; + } + /* if someone is clipping this obj - go calculate the clipper */ + if (obj->cur.clipper) + { + if (obj->cur.cache.clip.dirty) + evas_object_clip_recalc(obj->cur.clipper); + obj->cur.clipper->func->render_pre(obj->cur.clipper); + } + /* now figure what changed and add draw rects */ + /* if it just became visible or invisible */ + is_v = evas_object_is_visible(obj); + was_v = evas_object_was_visible(obj); + if (is_v != was_v) + { + evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); + goto done; + } + if ((obj->cur.map != obj->prev.map) || + (obj->cur.usemap != obj->prev.usemap)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* it's not visible - we accounted for it appearing or not so just abort */ + if (!is_v) goto done; + /* clipper changed this is in addition to anything else for obj */ + evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); + /* if we restacked (layer or just within a layer) and don't clip anyone */ + if (obj->restack) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed color */ + if ((obj->cur.color.r != obj->prev.color.r) || + (obj->cur.color.g != obj->prev.color.g) || + (obj->cur.color.b != obj->prev.color.b) || + (obj->cur.color.a != obj->prev.color.a)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + /* if it changed geometry - and obviously not visibility or color */ + /* calculate differences since we have a constant color fill */ + /* we really only need to update the differences */ + if ((obj->cur.geometry.x != obj->prev.geometry.x) || + (obj->cur.geometry.y != obj->prev.geometry.y) || + (obj->cur.geometry.w != obj->prev.geometry.w) || + (obj->cur.geometry.h != obj->prev.geometry.h)) + { + evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); + goto done; + } + done: + evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); +} + +static void +evas_object_textblock_render_post(Evas_Object *obj) +{ +/* Evas_Object_Textblock *o; */ + + /* this moves the current data to the previous state parts of the object */ + /* in whatever way is safest for the object. also if we don't need object */ + /* data anymore we can free it if the object deems this is a good idea */ +/* o = (Evas_Object_Textblock *)(obj->object_data); */ + /* remove those pesky changes */ + evas_object_clip_changes_clean(obj); + /* move cur to prev safely for object data */ + obj->prev = obj->cur; +/* o->prev = o->cur; */ +/* o->changed = 0; */ +} + +static unsigned int evas_object_textblock_id_get(Evas_Object *obj) +{ + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_TEXTBLOCK; +} + +static unsigned int evas_object_textblock_visual_id_get(Evas_Object *obj) +{ + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + if (!o) return 0; + return MAGIC_OBJ_CUSTOM; +} + +static void *evas_object_textblock_engine_data_get(Evas_Object *obj) +{ + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + if (!o) return NULL; + return o->engine_data; +} + +static int +evas_object_textblock_is_opaque(Evas_Object *obj __UNUSED__) +{ + /* this returns 1 if the internal object data implies that the object is */ + /* currently fulyl opque over the entire gradient it occupies */ + return 0; +} + +static int +evas_object_textblock_was_opaque(Evas_Object *obj __UNUSED__) +{ + /* this returns 1 if the internal object data implies that the object was */ + /* currently fulyl opque over the entire gradient it occupies */ + return 0; +} + +static void +evas_object_textblock_coords_recalc(Evas_Object *obj) +{ + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + if ((obj->cur.geometry.w != o->last_w) || + (((o->valign != 0.0) || (o->have_ellipsis)) && + (obj->cur.geometry.h != o->last_h))) + { + o->formatted.valid = 0; + o->changed = 1; + } +} + +static void +evas_object_textblock_scale_update(Evas_Object *obj) +{ + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + _evas_textblock_invalidate_all(o); + _evas_textblock_changed(o, obj); +} + +void +_evas_object_textblock_rehint(Evas_Object *obj) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Paragraph *par; + Evas_Object_Textblock_Line *ln; + + o = (Evas_Object_Textblock *)(obj->object_data); + EINA_INLIST_FOREACH(o->paragraphs, par) + { + EINA_INLIST_FOREACH(par->lines, ln) + { + Evas_Object_Textblock_Item *it; + + EINA_INLIST_FOREACH(ln->items, it) + { + if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); + if (ti->parent.format->font.font) + { +#ifdef EVAS_FRAME_QUEUING + evas_common_pipe_op_text_flush((RGBA_Font *) ti->parent.format->font.font); +#endif + evas_font_load_hinting_set(obj->layer->evas, + ti->parent.format->font.font, + obj->layer->evas->hinting); + } + } + } + } + } + _evas_textblock_invalidate_all(o); + _evas_textblock_changed(o, obj); +} + +/** + * @} + */ + +#ifdef HAVE_TESTS +/* return EINA_FALSE on error, used in unit_testing */ +EAPI Eina_Bool +_evas_textblock_check_item_node_link(Evas_Object *obj) +{ + Evas_Object_Textblock *o; + Evas_Object_Textblock_Paragraph *par; + Evas_Object_Textblock_Line *ln; + Evas_Object_Textblock_Item *it; + + o = (Evas_Object_Textblock *)(obj->object_data); + if (!o) return EINA_FALSE; + + if (!o->formatted.valid) _relayout(obj); + + EINA_INLIST_FOREACH(o->paragraphs, par) + { + EINA_INLIST_FOREACH(par->lines, ln) + { + EINA_INLIST_FOREACH(ln->items, it) + { + if (it->text_node != par->text_node) + return EINA_FALSE; + } + } + } + return EINA_TRUE; +} + +EAPI int +_evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n) +{ + return n->offset; +} +#endif + +#if 0 +/* Good for debugging */ +void +pfnode(Evas_Object_Textblock_Node_Format *n) +{ + printf("Format Node: %p\n", n); + printf("next = %p, prev = %p, last = %p\n", EINA_INLIST_GET(n)->next, EINA_INLIST_GET(n)->prev, EINA_INLIST_GET(n)->last); + printf("text_node = %p, offset = %u, visible = %d\n", n->text_node, n->offset, n->visible); + printf("'%s'\n", eina_strbuf_string_get(n->format)); +} + +void +ptnode(Evas_Object_Textblock_Node_Text *n) +{ + printf("Text Node: %p\n", n); + printf("next = %p, prev = %p, last = %p\n", EINA_INLIST_GET(n)->next, EINA_INLIST_GET(n)->prev, EINA_INLIST_GET(n)->last); + printf("format_node = %p\n", n->format_node); + printf("'%ls'\n", eina_ustrbuf_string_get(n->unicode)); +} + +void +pitem(Evas_Object_Textblock_Item *it) +{ + Evas_Object_Textblock_Text_Item *ti; + Evas_Object_Textblock_Format_Item *fi; + printf("Item: %p\n", it); + printf("Type: %s (%d)\n", (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? + "TEXT" : "FORMAT", it->type); + printf("Text pos: %d Visual pos: %d\n", it->text_pos, +#ifdef BIDI_SUPPORT + it->visual_pos +#else + it->text_pos +#endif + ); + printf("Coords: x = %d w = %d adv = %d\n", (int) it->x, (int) it->w, + (int) it->adv); + if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) + { + ti = _ITEM_TEXT(it); + printf("Text: '%*ls'\n", ti->text_props.text_len, GET_ITEM_TEXT(ti)); + } + else + { + fi = _ITEM_FORMAT(it); + printf("Format: '%s'\n", fi->item); + } +} + +void +ppar(Evas_Object_Textblock_Paragraph *par) +{ + Evas_Object_Textblock_Item *it; + Eina_List *i; + EINA_LIST_FOREACH(par->logical_items, i, it) + { + printf("***********************\n"); + pitem(it); + } +} + +#endif + diff --git a/libraries/evas/src/lib/canvas/evas_rectangle.c b/libraries/evas/src/lib/canvas/evas_rectangle.c new file mode 100644 index 0000000..da6b701 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_rectangle.c @@ -0,0 +1,98 @@ +#include "evas_common.h" +#include "evas_private.h" + +void +evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh) +{ + if (!RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh)) + { + evas_add_rect(rects, x, y, w, h); + evas_add_rect(rects, xx, yy, ww, hh); + } + else + { + int pt_x[4], pt_y[4], i, j; + + if (x < xx) + { + pt_x[0] = x; + pt_x[1] = xx; + } + else + { + pt_x[0] = xx; + pt_x[1] = x; + } + if ((x + w) < (xx + ww)) + { + pt_x[2] = x + w; + pt_x[3] = xx + ww; + } + else + { + pt_x[2] = xx + ww; + pt_x[3] = x + w; + } + if (y < yy) + { + pt_y[0] = y; + pt_y[1] = yy; + } + else + { + pt_y[0] = yy; + pt_y[1] = y; + } + if ((y + h) < (yy + hh)) + { + pt_y[2] = y + h; + pt_y[3] = yy + hh; + } + else + { + pt_y[2] = yy + hh; + pt_y[3] = y + h; + } + for (j = 0; j < 3; j++) + { + for (i = 0; i < 3; i++) + { + int intsec1, intsec2; + int tx, ty, tw, th; + + tx = pt_x[i]; + ty = pt_y[j]; + tw = pt_x[i + 1] - pt_x[i]; + th = pt_y[j + 1] - pt_y[j]; + + intsec1 = (RECTS_INTERSECT(tx, ty, tw, th, x, y, w, h)); + intsec2 = (RECTS_INTERSECT(tx, ty, tw, th, xx, yy, ww, hh)); + if (intsec1 ^ intsec2) + { + evas_add_rect(rects, tx, ty, tw, th); + } + } + } +/* if (tmp.count > 0) */ +/* { */ +/* unsigned int i; */ + +/* for (i = 0; i < tmp.count; ++i) */ +/* { */ +/* if ((tmp.array[i].w > 0) && (tmp.array[i].h > 0)) */ +/* { */ +/* int intsec1, intsec2; */ + +/* intsec1 = (RECTS_INTERSECT(tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h, x, y, w, h)); */ +/* intsec2 = (RECTS_INTERSECT(tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h, xx, yy, ww, hh)); */ +/* if (intsec1 ^ intsec2) */ +/* { */ +/* evas_add_rect(rects, tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h); */ +/* } */ +/* } */ +/* } */ +/* free(tmp.array); */ +/* } */ + + } +} diff --git a/libraries/evas/src/lib/canvas/evas_render.c b/libraries/evas/src/lib/canvas/evas_render.c new file mode 100644 index 0000000..0abee97 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_render.c @@ -0,0 +1,1866 @@ +#include "evas_common.h" +#include "evas_private.h" +#include + +// debug rendering +/* #define REND_DGB 1 */ +/* #define STDOUT_DBG 1 */ + +#ifdef REND_DGB +static FILE *dbf = NULL; + +static void +rend_dbg(const char *txt) +{ + if (!dbf) + { +#ifdef STDOUT_DBG + dbf = stdout; +#else + dbf = fopen("EVAS-RENDER-DEBUG.log", "w"); +#endif + if (!dbf) return; + } + fputs(txt, dbf); + fflush(dbf); +} +#define RD(args...) \ + { \ + char __tmpbuf[4096]; \ + \ + snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \ + rend_dbg(__tmpbuf); \ + } +#define RDI(xxxx) \ + { \ + char __tmpbuf[4096]; int __tmpi; \ + for (__tmpi = 0; __tmpi < xxxx; __tmpi++) \ + __tmpbuf[__tmpi] = ' '; \ + __tmpbuf[__tmpi] = 0; \ + rend_dbg(__tmpbuf); \ + } +#else +#define RD(args...) +#define RDI(x) +#endif + +static Eina_List * +evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char do_draw); + +EAPI void +evas_damage_rectangle_add(Evas *e, int x, int y, int w, int h) +{ + Eina_Rectangle *r; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + NEW_RECT(r, x, y, w, h); + if (!r) return; + e->damages = eina_list_append(e->damages, r); + e->changed = 1; +} + +EAPI void +evas_obscured_rectangle_add(Evas *e, int x, int y, int w, int h) +{ + Eina_Rectangle *r; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + NEW_RECT(r, x, y, w, h); + if (!r) return; + e->obscures = eina_list_append(e->obscures, r); +} + +EAPI void +evas_obscured_clear(Evas *e) +{ + Eina_Rectangle *r; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + EINA_LIST_FREE(e->obscures, r) + { + eina_rectangle_free(r); + } +} + +static Eina_Bool +_evas_render_has_map(Evas_Object *obj) +{ + return ((!((obj->func->can_map) && (obj->func->can_map(obj)))) && + ((obj->cur.map) && (obj->cur.usemap))); + // return ((obj->cur.map) && (obj->cur.usemap)); +} + +static Eina_Bool +_evas_render_had_map(Evas_Object *obj) +{ + return ((obj->prev.map) && (obj->prev.usemap)); + // return ((!obj->cur.map) && (obj->prev.usemap)); +} + +static Eina_Bool +_evas_render_is_relevant(Evas_Object *obj) +{ + return ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) || + (evas_object_was_visible(obj) && (!obj->prev.have_clipees))); +} + +static Eina_Bool +_evas_render_can_render(Evas_Object *obj) +{ + return (evas_object_is_visible(obj) && (!obj->cur.have_clipees)); +} + +static void +_evas_render_prev_cur_clip_cache_add(Evas *e, Evas_Object *obj) +{ + e->engine.func->output_redraws_rect_add(e->engine.data.output, + obj->prev.cache.clip.x, + obj->prev.cache.clip.y, + obj->prev.cache.clip.w, + obj->prev.cache.clip.h); + e->engine.func->output_redraws_rect_add(e->engine.data.output, + obj->cur.cache.clip.x, + obj->cur.cache.clip.y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); +} + +static void +_evas_render_cur_clip_cache_del(Evas *e, Evas_Object *obj) +{ + Evas_Coord x, y, w, h; + + x = obj->cur.cache.clip.x; + y = obj->cur.cache.clip.y; + w = obj->cur.cache.clip.w; + h = obj->cur.cache.clip.h; + if (obj->cur.clipper) + { + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->cur.clipper->cur.cache.clip.x, + obj->cur.clipper->cur.cache.clip.y, + obj->cur.clipper->cur.cache.clip.w, + obj->cur.clipper->cur.cache.clip.h); + } + e->engine.func->output_redraws_rect_del(e->engine.data.output, + x, y, w, h); +} + +static void +_evas_render_phase1_direct(Evas *e, + Eina_Array *active_objects, + Eina_Array *restack_objects __UNUSED__, + Eina_Array *delete_objects __UNUSED__, + Eina_Array *render_objects) +{ + unsigned int i; + Eina_List *l; + Evas_Object *proxy; + + RD(" [--- PHASE 1 DIRECT\n"); + for (i = 0; i < active_objects->count; i++) + { + Evas_Object *obj; + + obj = eina_array_data_get(active_objects, i); + if (obj->changed) + { + /* Flag need redraw on proxy too */ + evas_object_clip_recalc(obj); + if (obj->proxy.proxies) + { + EINA_LIST_FOREACH(obj->proxy.proxies, l, proxy) + proxy->proxy.redraw = 1; + } + } + } + for (i = 0; i < render_objects->count; i++) + { + Evas_Object *obj; + + obj = eina_array_data_get(render_objects, i); + RD(" OBJ [%p] changed %i\n", obj, obj->changed); + if (obj->changed) + { + /* Flag need redraw on proxy too */ + evas_object_clip_recalc(obj); + obj->func->render_pre(obj); + if (obj->proxy.proxies) + { + obj->proxy.redraw = 1; + EINA_LIST_FOREACH(obj->proxy.proxies, l, proxy) + { + proxy->func->render_pre(proxy); + _evas_render_prev_cur_clip_cache_add(e, proxy); + } + } + else if (obj->proxy.redraw) + { + _evas_render_prev_cur_clip_cache_add(e, obj); + } + if (obj->pre_render_done) + { + RD(" pre-render-done smart:%p|%p [%p, %i] | [%p, %i] has_map:%i had_map:%i\n", + obj->smart.smart, + evas_object_smart_members_get_direct(obj), + obj->cur.map, obj->cur.usemap, + obj->prev.map, obj->prev.usemap, + _evas_render_has_map(obj), + _evas_render_had_map(obj)); + if ((obj->smart.smart) && + (_evas_render_has_map(obj))) + { + RD(" has map + smart\n"); + _evas_render_prev_cur_clip_cache_add(e, obj); + } + } + else if (_evas_render_had_map(obj)) + { + RD(" no pre-render done\n"); + _evas_render_prev_cur_clip_cache_add(e, obj); + } + } + else + { + if (obj->smart.smart) + { + // obj->func->render_pre(obj); + } + else if ((obj->rect_del) || + (evas_object_is_opaque(obj) && evas_object_is_visible(obj))) + { + RD(" rect del\n"); + _evas_render_cur_clip_cache_del(e, obj); + } + } + } + RD(" ---]\n"); +} + +static Eina_Bool +_evas_render_phase1_object_process(Evas *e, Evas_Object *obj, + Eina_Array *active_objects, + Eina_Array *restack_objects, + Eina_Array *delete_objects, + Eina_Array *render_objects, + int restack, int map, + int *redraw_all +#ifdef REND_DGB + , int level +#endif + ) +{ + Eina_Bool clean_them = EINA_FALSE; + Evas_Object *obj2; + int is_active; + Eina_Bool hmap; + + obj->rect_del = 0; + obj->render_pre = 0; + +#ifndef EVAS_FRAME_QUEUING + /* because of clip objects - delete 2 cycles later */ + if (obj->delete_me == 2) +#else + if (obj->delete_me == evas_common_frameq_get_frameq_sz() + 2) +#endif + eina_array_push(delete_objects, obj); + else if (obj->delete_me != 0) obj->delete_me++; + /* If the object will be removed, we should not cache anything during this run. */ + if (obj->delete_me != 0) clean_them = EINA_TRUE; + + /* build active object list */ + evas_object_clip_recalc(obj); + is_active = evas_object_is_active(obj); + obj->is_active = is_active; + + RDI(level); + RD(" [--- PROCESS [%p] '%s' active = %i, del = %i | %i %i %ix%i\n", obj, obj->type, is_active, obj->delete_me, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h); + if ((is_active) || (obj->delete_me != 0)) + eina_array_push(active_objects, obj); + +#ifdef REND_DGB + if (!is_active) + { + RDI(level); + RD(" [%p] vis: %i, cache.clip.vis: %i cache.clip.a: %i [%p]\n", obj, obj->cur.visible, obj->cur.cache.clip.visible, obj->cur.cache.clip.a, obj->func->is_visible); + } +#endif + + map = _evas_render_has_map(obj); + hmap = _evas_render_had_map(obj); + + if ((restack) && (!map)) + { + if (!obj->changed) + { + eina_array_push(&e->pending_objects, obj); + obj->changed = 1; + } + obj->restack = 1; + clean_them = EINA_TRUE; + } + + if (map) + { + RDI(level); + RD(" obj mapped\n"); + if (obj->changed) + { + if (map != hmap) + { + *redraw_all = 1; + } + evas_object_clip_recalc(obj); + if ((obj->restack) && + (is_active) && (!obj->clip.clipees) && + ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) || + (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) + { + eina_array_push(render_objects, obj); + _evas_render_prev_cur_clip_cache_add(e, obj); + obj->render_pre = 1; + } + else if ((is_active) && (!obj->clip.clipees) && + ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) || + (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) + { + eina_array_push(render_objects, obj); + _evas_render_prev_cur_clip_cache_add(e, obj); + obj->render_pre = 1; + } + } + return clean_them; + } + else if (_evas_render_had_map(obj)) + { + RDI(level); + RD(" had map - restack objs\n"); + // eina_array_push(restack_objects, obj); + _evas_render_prev_cur_clip_cache_add(e, obj); + if (obj->changed) + { + if (hmap) + { + if (!map) + { + if ((obj->cur.map) && (obj->cur.usemap)) map = 1; + } + } + if (map != hmap) + { + *redraw_all = 1; + } + } + } + + /* handle normal rendering. this object knows how to handle maps */ + if (obj->changed) + { + if (obj->smart.smart) + { + RDI(level); + RD(" changed + smart - render ok\n"); + eina_array_push(render_objects, obj); + obj->render_pre = 1; + EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) + { + _evas_render_phase1_object_process(e, obj2, + active_objects, + restack_objects, + delete_objects, + render_objects, + obj->restack, + map, + redraw_all +#ifdef REND_DGB + , level + 1 +#endif + ); + } + } + else + { + if ((is_active) && (!obj->clip.clipees) && + _evas_render_is_relevant(obj)) + { + RDI(level); + RD(" relevant + active\n"); + if (obj->restack) + eina_array_push(restack_objects, obj); + else + { + eina_array_push(render_objects, obj); + obj->render_pre = 1; + } + } + else + { + RDI(level); + RD(" skip - not smart, not active or clippees or not relevant\n"); + } + } + } + else + { + RD(" not changed... [%i] -> (%i %i %p %i) [%i]\n", + evas_object_is_visible(obj), + obj->cur.visible, obj->cur.cache.clip.visible, obj->smart.smart, obj->cur.cache.clip.a, + evas_object_was_visible(obj)); + if ((!obj->clip.clipees) && (obj->delete_me == 0) && + (_evas_render_can_render(obj) || + (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) + { + if (obj->smart.smart) + { + RDI(level); + RD(" smart + visible/was visible + not clip\n"); + eina_array_push(render_objects, obj); + obj->render_pre = 1; + EINA_INLIST_FOREACH + (evas_object_smart_members_get_direct(obj), obj2) + { + _evas_render_phase1_object_process(e, obj2, + active_objects, + restack_objects, + delete_objects, + render_objects, + restack, map, + redraw_all +#ifdef REND_DGB + , level + 1 +#endif + ); + } + } + else + { + if (evas_object_is_opaque(obj) && + evas_object_is_visible(obj)) + { + RDI(level); + RD(" opaque + visible\n"); + eina_array_push(render_objects, obj); + obj->rect_del = 1; + } + else if (evas_object_is_visible(obj)) + { + RDI(level); + RD(" visible\n"); + eina_array_push(render_objects, obj); + obj->render_pre = 1; + } + else + { + RDI(level); + RD(" skip\n"); + } + } + } + /* + else if (obj->smart.smart) + { + RDI(level); + RD(" smart + mot visible/was visible\n"); + eina_array_push(render_objects, obj); + obj->render_pre = 1; + EINA_INLIST_FOREACH + (evas_object_smart_members_get_direct(obj), obj2) + { + _evas_render_phase1_object_process(e, obj2, + active_objects, + restack_objects, + delete_objects, + render_objects, + restack, map, + redraw_all +#ifdef REND_DGB +, level + 1 +#endif +); +} +} + */ +} +if (!is_active) obj->restack = 0; +RDI(level); +RD(" ---]\n"); +return clean_them; +} + +static Eina_Bool +_evas_render_phase1_process(Evas *e, + Eina_Array *active_objects, + Eina_Array *restack_objects, + Eina_Array *delete_objects, + Eina_Array *render_objects, + int *redraw_all) +{ + Evas_Layer *lay; + Eina_Bool clean_them = EINA_FALSE; + + RD(" [--- PHASE 1\n"); + EINA_INLIST_FOREACH(e->layers, lay) + { + Evas_Object *obj; + + EINA_INLIST_FOREACH(lay->objects, obj) + { + clean_them |= _evas_render_phase1_object_process + (e, obj, active_objects, restack_objects, delete_objects, + render_objects, 0, 0, redraw_all +#ifdef REND_DGB + , 1 +#endif + ); + } + } + RD(" ---]\n"); + return clean_them; +} + +static void +_evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *e) +{ + unsigned int i; + + for (i = 0; i < pending_objects->count; ++i) + { + Evas_Object *obj; + int is_active, ok = 0; + + obj = eina_array_data_get(pending_objects, i); + + if (!obj->layer) goto clean_stuff; + + evas_object_clip_recalc(obj); + is_active = evas_object_is_active(obj); + + if ((!is_active) && (!obj->is_active) && (!obj->render_pre) && + (!obj->rect_del)) + { + ok = 1; + goto clean_stuff; + } + + if (obj->is_active == is_active) + { + if (obj->changed) + { + if (obj->smart.smart) + { + if (obj->render_pre || obj->rect_del) ok = 1; + } + else + if ((is_active) && (obj->restack) && (!obj->clip.clipees) && + (_evas_render_can_render(obj) || + (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) + { + if (!(obj->render_pre || obj->rect_del)) ok = 1; + } + else + if (is_active && (!obj->clip.clipees) && + (_evas_render_can_render(obj) || + (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) + { + if (obj->render_pre || obj->rect_del) ok = 1; + } + } + else + { + if ((!obj->clip.clipees) && (obj->delete_me == 0) && + (!obj->cur.have_clipees || (evas_object_was_visible(obj) && (!obj->prev.have_clipees))) + && evas_object_is_opaque(obj) && evas_object_is_visible(obj)) + { + if (obj->rect_del || obj->smart.smart) ok = 1; + } + } + } + +clean_stuff: + if (!ok) + { + eina_array_clean(&e->active_objects); + eina_array_clean(&e->render_objects); + eina_array_clean(&e->restack_objects); + eina_array_clean(&e->delete_objects); + e->invalidate = 1; + return ; + } + } +} + +Eina_Bool +pending_change(void *data, void *gdata __UNUSED__) +{ + Evas_Object *obj; + + obj = data; + if (obj->delete_me) return EINA_FALSE; + if (obj->pre_render_done) + { + RD(" OBJ [%p] pending change %i -> 0, pre %i\n", obj, obj->changed, obj->pre_render_done); + obj->pre_render_done = 0; + //// FIXME: this wipes out changes + obj->changed = 0; + obj->changed_move_only = 0; + obj->changed_nomove = 0; + obj->changed_move = 0; + } + return obj->changed ? EINA_TRUE : EINA_FALSE; +} +/* + static void + unchange(Evas_Object *obj) + { + Evas_Object *obj2; + + if (!obj->changed) return; + obj->changed = 0; + obj->changed_move_only = 0; + obj->changed_nomove = 0; + obj->changed_move = 0; + EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) + { + unchange(obj2); + } + } + + static int + chlist(Evas_Object *obj, int i) + { + Evas_Object *obj2; + int j; + int ret = 0; + + if (!obj->changed) return 0; + for (j = 0; j < i; j++) printf(" "); + printf("ch2 %p %s %i [%i %i %ix%i] v %i/%i [r%i] %p\n", obj, + obj->type, + obj->changed_move_only, + obj->cur.geometry.x, + obj->cur.geometry.y, + obj->cur.geometry.w, + obj->cur.geometry.h, + obj->cur.visible, + obj->prev.visible, + obj->restack, + obj->clip.clipees); + EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) + { + if (obj2->changed) + ret |= chlist(obj2, i + 1); + } + } + */ +static Eina_Bool +_evas_render_can_use_overlay(Evas *e, Evas_Object *obj) +{ + Eina_Rectangle *r; + Evas_Object *tmp; + Eina_List *alphas = NULL; + Eina_List *opaques = NULL; + Evas_Object *video_parent = NULL; + Eina_Rectangle zone; + Evas_Coord xc1, yc1, xc2, yc2; + unsigned int i; + Eina_Bool nooverlay; + + video_parent = _evas_object_image_video_parent_get(obj); + + /* Check if any one is the stack make this object mapped */ + tmp = obj; + while (tmp && !_evas_render_has_map(tmp)) + tmp = tmp->smart.parent; + + if (tmp && _evas_render_has_map(tmp)) return EINA_FALSE; /* we are mapped, we can't be an overlay */ + + if (!evas_object_is_visible(obj)) return EINA_FALSE; /* no need to update the overlay if it's not visible */ + + /* If any recoloring of the surface is needed, n overlay to */ + if ((obj->cur.cache.clip.r != 255) || + (obj->cur.cache.clip.g != 255) || + (obj->cur.cache.clip.b != 255) || + (obj->cur.cache.clip.a != 255)) + return EINA_FALSE; + + /* Check presence of transparent object on top of the video object */ + EINA_RECTANGLE_SET(&zone, + obj->cur.cache.clip.x, + obj->cur.cache.clip.y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); + + for (i = e->active_objects.count - 1; i > 0; i--) + { + Eina_Rectangle self; + Eina_Rectangle *match; + Evas_Object *current; + Eina_List *l; + int xm1, ym1, xm2, ym2; + + current = eina_array_data_get(&e->active_objects, i); + + /* Did we find the video object in the stack ? */ + if (current == video_parent || current == obj) + break; + + EINA_RECTANGLE_SET(&self, + current->cur.cache.clip.x, + current->cur.cache.clip.y, + current->cur.cache.clip.w, + current->cur.cache.clip.h); + + /* This doesn't cover the area of the video object, so don't bother with that object */ + if (!eina_rectangles_intersect(&zone, &self)) + continue ; + + xc1 = current->cur.cache.clip.x; + yc1 = current->cur.cache.clip.y; + xc2 = current->cur.cache.clip.x + current->cur.cache.clip.w; + yc2 = current->cur.cache.clip.y + current->cur.cache.clip.h; + + if (evas_object_is_visible(current) && + (!current->clip.clipees) && + (current->cur.visible) && + (!current->delete_me) && + (current->cur.cache.clip.visible) && + (!current->smart.smart)) + { + Eina_Bool included = EINA_FALSE; + + if (evas_object_is_opaque(current) || + ((current->func->has_opaque_rect) && + (current->func->has_opaque_rect(current)))) + { + /* The object is opaque */ + + /* Check if the opaque object is inside another opaque object */ + EINA_LIST_FOREACH(opaques, l, match) + { + xm1 = match->x; + ym1 = match->y; + xm2 = match->x + match->w; + ym2 = match->y + match->h; + + /* Both object are included */ + if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2) + { + included = EINA_TRUE; + break; + } + } + + /* Not included yet */ + if (!included) + { + Eina_List *ln; + Evas_Coord xn2, yn2; + + r = eina_rectangle_new(current->cur.cache.clip.x, current->cur.cache.clip.y, + current->cur.cache.clip.w, current->cur.cache.clip.h); + + opaques = eina_list_append(opaques, r); + + xn2 = r->x + r->w; + yn2 = r->y + r->h; + + /* Remove all the transparent object that are covered by the new opaque object */ + EINA_LIST_FOREACH_SAFE(alphas, l, ln, match) + { + xm1 = match->x; + ym1 = match->y; + xm2 = match->x + match->w; + ym2 = match->y + match->h; + + if (xm1 >= r->x && ym1 >= r->y && xm2 <= xn2 && ym2 <= yn2) + { + /* The new rectangle is over some transparent object, + so remove the transparent object */ + alphas = eina_list_remove_list(alphas, l); + } + } + } + } + else + { + /* The object has some transparency */ + + /* Check if the transparent object is inside any other transparent object */ + EINA_LIST_FOREACH(alphas, l, match) + { + xm1 = match->x; + ym1 = match->y; + xm2 = match->x + match->w; + ym2 = match->y + match->h; + + /* Both object are included */ + if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2) + { + included = EINA_TRUE; + break; + } + } + + /* If not check if it is inside any opaque one */ + if (!included) + { + EINA_LIST_FOREACH(opaques, l, match) + { + xm1 = match->x; + ym1 = match->y; + xm2 = match->x + match->w; + ym2 = match->y + match->h; + + /* Both object are included */ + if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2) + { + included = EINA_TRUE; + break; + } + } + } + + /* No inclusion at all, so add it */ + if (!included) + { + r = eina_rectangle_new(current->cur.cache.clip.x, current->cur.cache.clip.y, + current->cur.cache.clip.w, current->cur.cache.clip.h); + + alphas = eina_list_append(alphas, r); + } + } + } + } + + /* If there is any pending transparent object, then no overlay */ + nooverlay = !!eina_list_count(alphas); + + EINA_LIST_FREE(alphas, r) + eina_rectangle_free(r); + EINA_LIST_FREE(opaques, r) + eina_rectangle_free(r); + + if (nooverlay) + return EINA_FALSE; + + return EINA_TRUE; +} + +Eina_Bool +evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, + int off_x, int off_y, int mapped, + int ecx, int ecy, int ecw, int ech +#ifdef REND_DGB + , int level +#endif + ) +{ + void *ctx; + Evas_Object *obj2; + Eina_Bool clean_them = EINA_FALSE; + + evas_object_clip_recalc(obj); + RDI(level); + RD(" { evas_render_mapped(%p, %p, %p, %p, %i, %i, %i, %i)\n", e, obj, context, surface, off_x, off_y, mapped, level); + if (mapped) + { + if ((!evas_object_is_visible(obj)) || (obj->clip.clipees) || + (obj->cur.have_clipees)) + { + RDI(level); + RD(" }\n"); + return clean_them; + } + } + else if (!(((evas_object_is_active(obj) && (!obj->clip.clipees) && + (_evas_render_can_render(obj)))) + )) + { + RDI(level); + RD(" }\n"); + return clean_them; + } + + // set render_pre - for child objs that may not have gotten it. + obj->pre_render_done = 1; + RD(" Hasmap: %p (%d) %p %d -> %d\n",obj->func->can_map, + obj->func->can_map ? obj->func->can_map(obj): -1, + obj->cur.map, obj->cur.usemap, + _evas_render_has_map(obj)); + if (_evas_render_has_map(obj)) + { + const Evas_Map_Point *p, *p_end; + RGBA_Map_Point pts[4], *pt; + int sw, sh; + int changed = 0, rendered = 0; + + clean_them = EINA_TRUE; + + sw = obj->cur.geometry.w; + sh = obj->cur.geometry.h; + RDI(level); + RD(" mapped obj: %ix%i\n", sw, sh); + if ((sw <= 0) || (sh <= 0)) + { + RDI(level); + RD(" }\n"); + return clean_them; + } + + pts[0].px = obj->cur.map->persp.px << FP; + pts[0].py = obj->cur.map->persp.py << FP; + pts[0].foc = obj->cur.map->persp.foc << FP; + pts[0].z0 = obj->cur.map->persp.z0 << FP; + + p = obj->cur.map->points; + p_end = p + obj->cur.map->count; + pt = pts; + for (; p < p_end; p++, pt++) + { + pt->x = (lround(p->x) + off_x) * FP1; + pt->y = (lround(p->y) + off_y) * FP1; + pt->z = (lround(p->z) ) * FP1; + pt->fx = p->px; + pt->fy = p->py; + pt->fz = p->z; + pt->u = lround(p->u) * FP1; + pt->v = lround(p->v) * FP1; + if (pt->u < 0) pt->u = 0; + else if (pt->u > (sw * FP1)) pt->u = (sw * FP1); + if (pt->v < 0) pt->v = 0; + else if (pt->v > (sh * FP1)) pt->v = (sh * FP1); + pt->col = ARGB_JOIN(p->a, p->r, p->g, p->b); + } + /* Copy last for software engine */ + if (obj->cur.map->count & 0x1) + { + pts[obj->cur.map->count] = pts[obj->cur.map->count - 1]; + } + + + if (obj->cur.map->surface) + { + if ((obj->cur.map->surface_w != sw) || + (obj->cur.map->surface_h != sh)) + { + RDI(level); + RD(" new surf: %ix%i\n", sw, sh); + obj->layer->evas->engine.func->image_map_surface_free + (e->engine.data.output, obj->cur.map->surface); + obj->cur.map->surface = NULL; + } + } + if (!obj->cur.map->surface) + { + obj->cur.map->surface_w = sw; + obj->cur.map->surface_h = sh; + + obj->cur.map->surface = + obj->layer->evas->engine.func->image_map_surface_new + (e->engine.data.output, obj->cur.map->surface_w, + obj->cur.map->surface_h, + obj->cur.map->alpha); + RDI(level); + RD(" fisrt surf: %ix%i\n", sw, sh); + changed = 1; + } + if (obj->smart.smart) + { + Evas_Object *o2; + + EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), o2) + { + if (!evas_object_is_visible(o2) && + !evas_object_was_visible(o2)) + { + o2->changed = 0; + o2->changed_move_only = 0; + o2->changed_nomove = 0; + o2->changed_move = 0; + continue; + } + if (o2->changed) + { + // chlist(o2, 0); + changed = 1; + o2->changed = 0; + o2->changed_move_only = 0; + o2->changed_nomove = 0; + o2->changed_move = 0; + break; + } + } + // unchange(obj); + obj->changed = 0; + obj->changed_move_only = 0; + obj->changed_nomove = 0; + obj->changed_move = 0; + } + else + { + if (obj->changed) + { + changed = 1; + obj->changed = 0; + obj->changed_move_only = 0; + obj->changed_nomove = 0; + obj->changed_move = 0; + } + } + + // clear surface before re-render + if ((changed) && (obj->cur.map->surface)) + { + int off_x2, off_y2; + + RDI(level); + RD(" children redraw\n"); + // FIXME: calculate "changes" within map surface and only clear + // and re-render those + if (obj->cur.map->alpha) + { + ctx = e->engine.func->context_new(e->engine.data.output); + e->engine.func->context_color_set + (e->engine.data.output, ctx, 0, 0, 0, 0); + e->engine.func->context_render_op_set + (e->engine.data.output, ctx, EVAS_RENDER_COPY); + e->engine.func->rectangle_draw(e->engine.data.output, + ctx, + obj->cur.map->surface, + 0, 0, + obj->cur.map->surface_w, + obj->cur.map->surface_h); + e->engine.func->context_free(e->engine.data.output, ctx); + } + ctx = e->engine.func->context_new(e->engine.data.output); + off_x2 = -obj->cur.geometry.x; + off_y2 = -obj->cur.geometry.y; + if (obj->smart.smart) + { + EINA_INLIST_FOREACH + (evas_object_smart_members_get_direct(obj), obj2) + { + clean_them |= evas_render_mapped(e, obj2, ctx, + obj->cur.map->surface, + off_x2, off_y2, 1, + ecx, ecy, ecw, ech +#ifdef REND_DGB + , level + 1 +#endif + ); + } + } + else + { + int x = 0, y = 0, w = 0, h = 0; + + w = obj->cur.map->surface_w; + h = obj->cur.map->surface_h; + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->cur.geometry.x + off_x2, + obj->cur.geometry.y + off_y2, + obj->cur.geometry.w, + obj->cur.geometry.h); + + e->engine.func->context_clip_set(e->engine.data.output, + ctx, x, y, w, h); + obj->func->render(obj, e->engine.data.output, ctx, + obj->cur.map->surface, off_x2, off_y2); + } + e->engine.func->context_free(e->engine.data.output, ctx); + rendered = 1; + } + + RDI(level); + RD(" draw map\n"); + + if (rendered) + { + obj->cur.map->surface = e->engine.func->image_dirty_region + (e->engine.data.output, obj->cur.map->surface, + 0, 0, obj->cur.map->surface_w, obj->cur.map->surface_h); + } + e->engine.func->context_clip_unset(e->engine.data.output, + e->engine.data.context); + if (obj->cur.map->surface) + { + if (obj->smart.smart) + { + if (obj->cur.clipper) + { + int x, y, w, h; + Evas_Object *tobj; + + obj->cur.cache.clip.dirty = 1; + tobj = obj->cur.map_parent; + obj->cur.map_parent = obj->cur.clipper->cur.map_parent; + evas_object_clip_recalc(obj); + obj->cur.map_parent = tobj; + x = obj->cur.cache.clip.x; + y = obj->cur.cache.clip.y; + w = obj->cur.cache.clip.w; + h = obj->cur.cache.clip.h; + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->cur.clipper->cur.cache.clip.x, + obj->cur.clipper->cur.cache.clip.y, + obj->cur.clipper->cur.cache.clip.w, + obj->cur.clipper->cur.cache.clip.h); + e->engine.func->context_clip_set(e->engine.data.output, + e->engine.data.context, + x + off_x, y + off_y, w, h); + } + } + else + { + if (obj->cur.clipper) + { + int x, y, w, h; + + evas_object_clip_recalc(obj); + x = obj->cur.cache.clip.x; + y = obj->cur.cache.clip.y; + w = obj->cur.cache.clip.w; + h = obj->cur.cache.clip.h; + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->cur.clipper->cur.cache.clip.x, + obj->cur.clipper->cur.cache.clip.y, + obj->cur.clipper->cur.cache.clip.w, + obj->cur.clipper->cur.cache.clip.h); + e->engine.func->context_clip_set(e->engine.data.output, + e->engine.data.context, + x + off_x, y + off_y, w, h); + } + } + } + if (surface == e->engine.data.output) + e->engine.func->context_clip_clip(e->engine.data.output, + e->engine.data.context, + ecx, ecy, ecw, ech); + if (obj->cur.cache.clip.visible) + obj->layer->evas->engine.func->image_map_draw + (e->engine.data.output, e->engine.data.context, surface, + obj->cur.map->surface, obj->cur.map->count, pts, + obj->cur.map->smooth, 0); + // FIXME: needs to cache these maps and + // keep them only rendering updates + // obj->layer->evas->engine.func->image_map_surface_free + // (e->engine.data.output, obj->cur.map->surface); + // obj->cur.map->surface = NULL; + } + else + { + if (mapped) + { + RDI(level); + RD(" draw child of mapped obj\n"); + ctx = e->engine.func->context_new(e->engine.data.output); + if (obj->smart.smart) + { + EINA_INLIST_FOREACH + (evas_object_smart_members_get_direct(obj), obj2) + { + clean_them |= evas_render_mapped(e, obj2, ctx, + surface, + off_x, off_y, 1, + ecx, ecy, ecw, ech +#ifdef REND_DGB + , level + 1 +#endif + ); + } + } + else + { + if (!obj->cur.map) + { + int x, y, w, h; + + RDI(level); + + x = obj->cur.cache.clip.x + off_x; + y = obj->cur.cache.clip.y + off_y; + w = obj->cur.cache.clip.w; + h = obj->cur.cache.clip.h; + + if (obj->cur.clipper) + { + if (_evas_render_has_map(obj)) + evas_object_clip_recalc(obj); + + RD(" clipper: %i %i %ix%i\n", + obj->cur.clipper->cur.cache.clip.x + off_x, + obj->cur.clipper->cur.cache.clip.y + off_y, + obj->cur.clipper->cur.cache.clip.w, + obj->cur.clipper->cur.cache.clip.h); + + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->cur.clipper->cur.cache.clip.x + off_x, + obj->cur.clipper->cur.cache.clip.y + off_y, + obj->cur.clipper->cur.cache.clip.w, + obj->cur.clipper->cur.cache.clip.h); + } + + RD(" clip: %i %i %ix%i [%i %i %ix%i]\n", + obj->cur.cache.clip.x + off_x, + obj->cur.cache.clip.y + off_y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h, + obj->cur.geometry.x + off_x, + obj->cur.geometry.y + off_y, + obj->cur.geometry.w, + obj->cur.geometry.h); + e->engine.func->context_clip_set(e->engine.data.output, + ctx, x, y, w, h); + } + else + { + RDI(level); + RD(" noclip\n"); + } + obj->func->render(obj, e->engine.data.output, ctx, + surface, off_x, off_y); + /* + obj->layer->evas->engine.func->context_color_set(e->engine.data.output, + ctx, + 0, 30, 0, 30); + obj->layer->evas->engine.func->rectangle_draw(e->engine.data.output, + ctx, + surface, + 0, 0, 9999, 9999); + */ + } + e->engine.func->context_free(e->engine.data.output, ctx); + } + else + { + if (obj->cur.clipper) + { + int x, y, w, h; + + if (_evas_render_has_map(obj)) + evas_object_clip_recalc(obj); + x = obj->cur.cache.clip.x; + y = obj->cur.cache.clip.y; + w = obj->cur.cache.clip.w; + h = obj->cur.cache.clip.h; + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->cur.clipper->cur.cache.clip.x, + obj->cur.clipper->cur.cache.clip.y, + obj->cur.clipper->cur.cache.clip.w, + obj->cur.clipper->cur.cache.clip.h); + e->engine.func->context_clip_set(e->engine.data.output, + e->engine.data.context, + x + off_x, y + off_y, w, h); + e->engine.func->context_clip_clip(e->engine.data.output, + e->engine.data.context, + ecx, ecy, ecw, ech); + } + + RDI(level); + RD(" draw normal obj\n"); + obj->func->render(obj, e->engine.data.output, context, surface, + off_x, off_y); + } + } + RDI(level); + RD(" }\n"); + + return clean_them; +} + +static void +_evas_render_cutout_add(Evas *e, Evas_Object *obj, int off_x, int off_y) +{ + if (evas_object_is_opaque(obj)) + { + Evas_Coord cox, coy, cow, coh; + + cox = obj->cur.cache.clip.x; + coy = obj->cur.cache.clip.y; + cow = obj->cur.cache.clip.w; + coh = obj->cur.cache.clip.h; + if ((obj->cur.map) && (obj->cur.usemap)) + { + Evas_Object *oo; + + oo = obj; + while (oo->cur.clipper) + { + if ((oo->cur.clipper->cur.map_parent + != oo->cur.map_parent) && + (!((oo->cur.map) && (oo->cur.usemap)))) + break; + RECTS_CLIP_TO_RECT(cox, coy, cow, coh, + oo->cur.geometry.x, + oo->cur.geometry.y, + oo->cur.geometry.w, + oo->cur.geometry.h); + oo = oo->cur.clipper; + } + } + e->engine.func->context_cutout_add + (e->engine.data.output, e->engine.data.context, + cox + off_x, coy + off_y, cow, coh); + } + else + { + if (obj->func->get_opaque_rect) + { + Evas_Coord obx, oby, obw, obh; + + obj->func->get_opaque_rect(obj, &obx, &oby, &obw, &obh); + if ((obw > 0) && (obh > 0)) + { + obx += off_x; + oby += off_y; + RECTS_CLIP_TO_RECT(obx, oby, obw, obh, + obj->cur.cache.clip.x + off_x, + obj->cur.cache.clip.y + off_y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); + e->engine.func->context_cutout_add + (e->engine.data.output, e->engine.data.context, + obx, oby, obw, obh); + } + } + } +} + +static Eina_List * +evas_render_updates_internal(Evas *e, + unsigned char make_updates, + unsigned char do_draw) +{ + Evas_Object *obj; + Eina_List *updates = NULL; + Eina_List *ll; + void *surface; + Eina_Bool clean_them = EINA_FALSE; + Eina_Bool alpha; + Eina_Rectangle *r; + int ux, uy, uw, uh; + int cx, cy, cw, ch; + unsigned int i, j; + int haveup = 0; + int redraw_all = 0; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + if (!e->changed) return NULL; + + evas_call_smarts_calculate(e); + + RD("[--- RENDER EVAS (size: %ix%i)\n", e->viewport.w, e->viewport.h); + + /* Check if the modified object mean recalculating every thing */ + if (!e->invalidate) + _evas_render_check_pending_objects(&e->pending_objects, e); + + /* phase 1. add extra updates for changed objects */ + if (e->invalidate || e->render_objects.count <= 0) + clean_them = _evas_render_phase1_process(e, + &e->active_objects, + &e->restack_objects, + &e->delete_objects, + &e->render_objects, + &redraw_all); + + /* phase 1.5. check if the video should be inlined or stay in their overlay */ + alpha = e->engine.func->canvas_alpha_get(e->engine.data.output, + e->engine.data.context); + + EINA_LIST_FOREACH(e->video_objects, ll, obj) + { + /* we need the surface to be transparent to display the underlying overlay */ + if (alpha && _evas_render_can_use_overlay(e, obj)) + _evas_object_image_video_overlay_show(obj); + else + _evas_object_image_video_overlay_hide(obj); + } + + + /* phase 1.8. pre render for proxy */ + _evas_render_phase1_direct(e, &e->active_objects, &e->restack_objects, + &e->delete_objects, &e->render_objects); + + /* phase 2. force updates for restacks */ + for (i = 0; i < e->restack_objects.count; ++i) + { + obj = eina_array_data_get(&e->restack_objects, i); + obj->func->render_pre(obj); + _evas_render_prev_cur_clip_cache_add(e, obj); + } + eina_array_clean(&e->restack_objects); + /* phase 3. add exposes */ + EINA_LIST_FREE(e->damages, r) + { + e->engine.func->output_redraws_rect_add(e->engine.data.output, + r->x, r->y, r->w, r->h); + eina_rectangle_free(r); + } + /* phase 4. output & viewport changes */ + if (e->viewport.changed) + { + e->engine.func->output_redraws_rect_add(e->engine.data.output, + 0, 0, + e->output.w, e->output.h); + } + if (e->output.changed) + { + e->engine.func->output_resize(e->engine.data.output, + e->output.w, e->output.h); + e->engine.func->output_redraws_rect_add(e->engine.data.output, + 0, 0, + e->output.w, e->output.h); + } + if ((e->output.w != e->viewport.w) || (e->output.h != e->viewport.h)) + { + ERR("viewport size != output size!"); + } + if (redraw_all) + { + e->engine.func->output_redraws_rect_add(e->engine.data.output, + 0, 0, + e->output.w, e->output.h); + } + /* phase 5. add obscures */ + EINA_LIST_FOREACH(e->obscures, ll, r) + { + e->engine.func->output_redraws_rect_del(e->engine.data.output, + r->x, r->y, r->w, r->h); + } + /* build obscure objects list of active objects that obscure */ + for (i = 0; i < e->active_objects.count; ++i) + { + obj = eina_array_data_get(&e->active_objects, i); + if (UNLIKELY((evas_object_is_opaque(obj) || + ((obj->func->has_opaque_rect) && + (obj->func->has_opaque_rect(obj)))) && + evas_object_is_visible(obj) && + (!obj->clip.clipees) && + (obj->cur.visible) && + (!obj->delete_me) && + (obj->cur.cache.clip.visible) && + (!obj->smart.smart))) + /* obscuring_objects = eina_list_append(obscuring_objects, obj); */ + eina_array_push(&e->obscuring_objects, obj); + } + + /* save this list */ + /* obscuring_objects_orig = obscuring_objects; */ + /* obscuring_objects = NULL; */ + /* phase 6. go thru each update rect and render objects in it*/ + if (do_draw) + { + unsigned int offset = 0; + + while ((surface = + e->engine.func->output_redraws_next_update_get + (e->engine.data.output, + &ux, &uy, &uw, &uh, + &cx, &cy, &cw, &ch))) + { + int off_x, off_y; + + RD(" [--- UPDATE %i %i %ix%i\n", ux, uy, uw, uh); + if (make_updates) + { + Eina_Rectangle *rect; + + NEW_RECT(rect, ux, uy, uw, uh); + if (rect) + updates = eina_list_append(updates, rect); + } + haveup = 1; + off_x = cx - ux; + off_y = cy - uy; + /* build obscuring objects list (in order from bottom to top) */ + for (i = 0; i < e->obscuring_objects.count; ++i) + { + obj = (Evas_Object *)eina_array_data_get + (&e->obscuring_objects, i); + if (evas_object_is_in_output_rect(obj, ux, uy, uw, uh)) + { + eina_array_push(&e->temporary_objects, obj); + + /* reset the background of the area if needed (using cutout and engine alpha flag to help) */ + if (alpha) + _evas_render_cutout_add(e, obj, off_x, off_y); + } + } + if (alpha) + { + e->engine.func->context_clip_set(e->engine.data.output, + e->engine.data.context, + ux + off_x, uy + off_y, uw, uh); + e->engine.func->context_color_set(e->engine.data.output, + e->engine.data.context, + 0, 0, 0, 0); + e->engine.func->context_multiplier_unset + (e->engine.data.output, e->engine.data.context); + e->engine.func->context_render_op_set(e->engine.data.output, + e->engine.data.context, + EVAS_RENDER_COPY); + e->engine.func->rectangle_draw(e->engine.data.output, + e->engine.data.context, + surface, + cx, cy, cw, ch); + e->engine.func->context_cutout_clear(e->engine.data.output, + e->engine.data.context); + e->engine.func->context_clip_unset(e->engine.data.output, + e->engine.data.context); + } + /* render all object that intersect with rect */ + for (i = 0; i < e->active_objects.count; ++i) + { + obj = eina_array_data_get(&e->active_objects, i); + + /* if it's in our outpout rect and it doesn't clip anything */ + RD(" OBJ: [%p] '%s' %i %i %ix%i\n", obj, obj->type, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h); + if ((evas_object_is_in_output_rect(obj, ux, uy, uw, uh) || + (obj->smart.smart)) && + (!obj->clip.clipees) && + (obj->cur.visible) && + (!obj->delete_me) && + (obj->cur.cache.clip.visible) && + // (!obj->smart.smart) && + ((obj->cur.color.a > 0 || obj->cur.render_op != EVAS_RENDER_BLEND))) + { + int x, y, w, h; + + RD(" DRAW (vis: %i, a: %i, clipees: %p\n", obj->cur.visible, obj->cur.color.a, obj->clip.clipees); + if ((e->temporary_objects.count > offset) && + (eina_array_data_get(&e->temporary_objects, offset) == obj)) + offset++; + x = cx; y = cy; w = cw; h = ch; + if (((w > 0) && (h > 0)) || (obj->smart.smart)) + { + if (!obj->smart.smart) + { + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->cur.cache.clip.x + off_x, + obj->cur.cache.clip.y + off_y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); + } + if (obj->cur.mask) + e->engine.func->context_mask_set(e->engine.data.output, + e->engine.data.context, + obj->cur.mask->func->engine_data_get(obj->cur.mask), + obj->cur.mask->cur.geometry.x + off_x, + obj->cur.mask->cur.geometry.y + off_y, + obj->cur.mask->cur.geometry.w, + obj->cur.mask->cur.geometry.h); + else + e->engine.func->context_mask_unset(e->engine.data.output, + e->engine.data.context); + if (obj->cur.clipper) + e->engine.func->context_clip_set(e->engine.data.output, + e->engine.data.context, + x, y, w, h); + else + e->engine.func->context_clip_unset(e->engine.data.output, + e->engine.data.context); +#if 1 /* FIXME: this can slow things down... figure out optimum... coverage */ + for (j = offset; j < e->temporary_objects.count; ++j) + { + Evas_Object *obj2; + + obj2 = (Evas_Object *)eina_array_data_get + (&e->temporary_objects, j); + _evas_render_cutout_add(e, obj2, off_x, off_y); + } +#endif + e->engine.func->context_clip_set(e->engine.data.output, + e->engine.data.context, + x, y, w, h); + clean_them |= evas_render_mapped(e, obj, e->engine.data.context, + surface, off_x, off_y, 0, + cx, cy, cw, ch +#ifdef REND_DGB + , 1 +#endif + ); + e->engine.func->context_cutout_clear(e->engine.data.output, + e->engine.data.context); + } + } + } + /* punch rect out */ + e->engine.func->output_redraws_next_update_push(e->engine.data.output, + surface, + ux, uy, uw, uh); + /* free obscuring objects list */ + eina_array_clean(&e->temporary_objects); + RD(" ---]\n"); + } + /* flush redraws */ + if (haveup) + { + evas_event_callback_call(e, EVAS_CALLBACK_RENDER_FLUSH_PRE, NULL); + e->engine.func->output_flush(e->engine.data.output); + evas_event_callback_call(e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL); + } + } + /* clear redraws */ + e->engine.func->output_redraws_clear(e->engine.data.output); + /* and do a post render pass */ + for (i = 0; i < e->active_objects.count; ++i) + { + obj = eina_array_data_get(&e->active_objects, i); + obj->pre_render_done = 0; + RD(" OBJ [%p] post... %i %i\n", obj, obj->changed, do_draw); + if ((obj->changed) && (do_draw)) + { + RD(" OBJ [%p] post... func1\n", obj); + obj->func->render_post(obj); + obj->restack = 0; + obj->changed = 0; + obj->changed_move_only = 0; + obj->changed_nomove = 0; + obj->changed_move = 0; + } + else if ((obj->cur.map != obj->prev.map) || + (obj->cur.usemap != obj->prev.usemap)) + { + RD(" OBJ [%p] post... func2\n", obj); + obj->func->render_post(obj); + obj->restack = 0; + obj->changed = 0; + obj->changed_move_only = 0; + obj->changed_nomove = 0; + obj->changed_move = 0; + } + /* moved to other pre-process phase 1 + if (obj->delete_me == 2) + { + delete_objects = eina_list_append(delete_objects, obj); + } + else if (obj->delete_me != 0) obj->delete_me++; + */ + } + /* free our obscuring object list */ + eina_array_clean(&e->obscuring_objects); + + /* If some object are still marked as changed, do not remove + them from the pending list. */ + eina_array_remove(&e->pending_objects, pending_change, NULL); + + for (i = 0; i < e->render_objects.count; ++i) + { + obj = eina_array_data_get(&e->render_objects, i); + obj->pre_render_done = 0; + } + + /* delete all objects flagged for deletion now */ + for (i = 0; i < e->delete_objects.count; ++i) + { + obj = eina_array_data_get(&e->delete_objects, i); + evas_object_free(obj, 1); + } + eina_array_clean(&e->delete_objects); + + e->changed = 0; + e->viewport.changed = 0; + e->output.changed = 0; + e->invalidate = 0; + + /* If their are some object to restack or some object to delete, + * it's useless to keep the render object list around. */ + if (clean_them) + { + eina_array_clean(&e->active_objects); + eina_array_clean(&e->render_objects); + eina_array_clean(&e->restack_objects); + eina_array_clean(&e->delete_objects); + eina_array_clean(&e->obscuring_objects); + e->invalidate = 1; + } + + evas_module_clean(); + + RD("---]\n"); + + return updates; +} + +EAPI void +evas_render_updates_free(Eina_List *updates) +{ + Eina_Rectangle *r; + + EINA_LIST_FREE(updates, r) + eina_rectangle_free(r); +} + +EAPI Eina_List * +evas_render_updates(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + +#ifdef EVAS_FRAME_QUEUING + evas_common_frameq_flush_ready (); +#endif + + if (!e->changed) return NULL; + return evas_render_updates_internal(e, 1, 1); +} + +EAPI void +evas_render(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + +#ifdef EVAS_FRAME_QUEUING + evas_common_frameq_flush_ready (); +#endif + + if (!e->changed) return; + evas_render_updates_internal(e, 0, 1); +} + +EAPI void +evas_norender(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + // if (!e->changed) return; + evas_render_updates_internal(e, 0, 0); +} + +EAPI void +evas_render_idle_flush(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + evas_fonts_zero_presure(e); + + if ((e->engine.func) && (e->engine.func->output_idle_flush) && + (e->engine.data.output)) + e->engine.func->output_idle_flush(e->engine.data.output); + + eina_array_flush(&e->delete_objects); + eina_array_flush(&e->active_objects); + eina_array_flush(&e->restack_objects); + eina_array_flush(&e->render_objects); + eina_array_flush(&e->clip_changes); + + e->invalidate = 1; +} + +EAPI void +evas_sync(Evas *e) +{ +#ifdef EVAS_FRAME_QUEUING + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + evas_common_frameq_flush(); +#else + (void) e; +#endif +} + +static void +_evas_render_dump_map_surfaces(Evas_Object *obj) +{ + if ((obj->cur.map) && obj->cur.map->surface) + { + obj->layer->evas->engine.func->image_map_surface_free + (obj->layer->evas->engine.data.output, obj->cur.map->surface); + obj->cur.map->surface = NULL; + } + + if (obj->smart.smart) + { + Evas_Object *obj2; + + EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) + _evas_render_dump_map_surfaces(obj2); + } +} + +EAPI void +evas_render_dump(Evas *e) +{ + Evas_Layer *lay; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + EINA_INLIST_FOREACH(e->layers, lay) + { + Evas_Object *obj; + + EINA_INLIST_FOREACH(lay->objects, obj) + { + if ((obj->type) && (!strcmp(obj->type, "image"))) + evas_object_inform_call_image_unloaded(obj); + _evas_render_dump_map_surfaces(obj); + } + } + if ((e->engine.func) && (e->engine.func->output_dump) && + (e->engine.data.output)) + e->engine.func->output_dump(e->engine.data.output); +} + +void +evas_render_invalidate(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + eina_array_clean(&e->active_objects); + eina_array_clean(&e->render_objects); + + eina_array_flush(&e->restack_objects); + eina_array_flush(&e->delete_objects); + + e->invalidate = 1; +} + +void +evas_render_object_recalc(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + +#ifndef EVAS_FRAME_QUEUING + if ((!obj->changed) && (obj->delete_me < 2)) +#else + if ((!obj->changed)) +#endif + { + Evas *e; + + e = obj->layer->evas; + if ((!e) || (e->cleanup)) return; +#ifdef EVAS_FRAME_QUEUING + if (obj->delete_me >= evas_common_frameq_get_frameq_sz() + 2) return; +#endif + eina_array_push(&e->pending_objects, obj); + obj->changed = 1; + } +} + +/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/lib/canvas/evas_smart.c b/libraries/evas/src/lib/canvas/evas_smart.c new file mode 100644 index 0000000..0cfba05 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_smart.c @@ -0,0 +1,266 @@ +#include "evas_common.h" +#include "evas_private.h" + + +static void _evas_smart_class_callbacks_create(Evas_Smart *s); + +/* all public */ + +EAPI void +evas_smart_free(Evas_Smart *s) +{ + MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); + return; + MAGIC_CHECK_END(); + s->delete_me = 1; + if (s->usage > 0) return; + if (s->class_allocated) free((void *)s->smart_class); + free(s->callbacks.array); + free(s); +} + +EAPI Evas_Smart * +evas_smart_class_new(const Evas_Smart_Class *sc) +{ + Evas_Smart *s; + + if (!sc) return NULL; + + /* api does not match abi! for now refuse as we only have 1 version */ + if (sc->version != EVAS_SMART_CLASS_VERSION) return NULL; + + s = evas_mem_calloc(sizeof(Evas_Smart)); + if (!s) return NULL; + + s->magic = MAGIC_SMART; + + s->smart_class = sc; + _evas_smart_class_callbacks_create(s); + + return s; +} + +EAPI const Evas_Smart_Class * +evas_smart_class_get(const Evas_Smart *s) +{ + MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); + return NULL; + MAGIC_CHECK_END(); + return s->smart_class; +} + +EAPI void * +evas_smart_data_get(const Evas_Smart *s) +{ + MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); + return NULL; + MAGIC_CHECK_END(); + return (void *)s->smart_class->data; +} + +EAPI const Evas_Smart_Cb_Description ** +evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count) +{ + MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); + if (count) *count = 0; + return NULL; + MAGIC_CHECK_END(); + + if (count) *count = s->callbacks.size; + return s->callbacks.array; +} + +EAPI const Evas_Smart_Cb_Description * +evas_smart_callback_description_find(const Evas_Smart *s, const char *name) +{ + if (!name) return NULL; + MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); + return NULL; + MAGIC_CHECK_END(); + return evas_smart_cb_description_find(&s->callbacks, name); +} + +EAPI Eina_Bool +evas_smart_class_inherit_full(Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size) +{ + unsigned int off; + + /* api does not match abi! for now refuse as we only have 1 version */ + if (parent_sc->version != EVAS_SMART_CLASS_VERSION) return EINA_FALSE; + +#define _CP(m) sc->m = parent_sc->m + _CP(add); + _CP(del); + _CP(move); + _CP(resize); + _CP(show); + _CP(hide); + _CP(color_set); + _CP(clip_set); + _CP(clip_unset); + _CP(calculate); + _CP(member_add); + _CP(member_del); +#undef _CP + + sc->parent = parent_sc; + + off = sizeof(Evas_Smart_Class); + if (parent_sc_size == off) return EINA_TRUE; + + memcpy(((char *)sc) + off, ((char *)parent_sc) + off, parent_sc_size - off); + return EINA_TRUE; +} + +EAPI int +evas_smart_usage_get(const Evas_Smart *s) +{ + MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); + return 0; + MAGIC_CHECK_END(); + return s->usage; +} + + +/* internal funcs */ +void +evas_object_smart_use(Evas_Smart *s) +{ + s->usage++; +} + +void +evas_object_smart_unuse(Evas_Smart *s) +{ + s->usage--; + if ((s->usage <= 0) && (s->delete_me)) evas_smart_free(s); +} + +Eina_Bool +evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) +{ + void *tmp; + + if (size == a->size) + return EINA_TRUE; + + if (size == EINA_FALSE) + { + free(a->array); + a->array = NULL; + a->size = 0; + return EINA_TRUE; + } + + tmp = realloc(a->array, (size + 1) * sizeof(Evas_Smart_Cb_Description *)); + if (tmp) + { + a->array = tmp; + a->size = size; + a->array[size] = NULL; + return EINA_TRUE; + } + else + { + ERR("realloc failed!"); + return EINA_FALSE; + } +} + +static int +_evas_smart_cb_description_cmp_sort(const void *p1, const void *p2) +{ + const Evas_Smart_Cb_Description **a = (const Evas_Smart_Cb_Description **)p1; + const Evas_Smart_Cb_Description **b = (const Evas_Smart_Cb_Description **)p2; + return strcmp((*a)->name, (*b)->name); +} + +void +evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a) +{ + unsigned int i, j; + + if (!a) + { + ERR("no array to fix!"); + return; + } + + qsort(a->array, a->size, sizeof(Evas_Smart_Cb_Description *), + _evas_smart_cb_description_cmp_sort); + + DBG("%u callbacks", a->size); + if (a->size) + DBG("%s [type=%s]", a->array[0]->name, a->array[0]->type); + + for (i = 0, j = 1; j < a->size; j++) + { + const Evas_Smart_Cb_Description *cur, *prev; + + cur = a->array[j]; + prev = a->array[i]; + + DBG("%s [type=%s]", cur->name, cur->type); + + if (strcmp(cur->name, prev->name) != 0) + { + i++; + if (i != j) + a->array[i] = a->array[j]; + } + else + { + if (strcmp(cur->type, prev->type) == 0) + WRN("duplicated smart callback description" + " with name '%s' and type '%s'", cur->name, cur->type); + else + ERR("callback descriptions named '%s' differ" + " in type, keeping '%s', ignoring '%s'", + cur->name, prev->type, cur->type); + } + } + + evas_smart_cb_descriptions_resize(a, i + 1); +} + +static void +_evas_smart_class_callbacks_create(Evas_Smart *s) +{ + const Evas_Smart_Class *sc; + unsigned int n = 0; + + for (sc = s->smart_class; sc; sc = sc->parent) + { + const Evas_Smart_Cb_Description *d; + for (d = sc->callbacks; d && d->name; d++) + n++; + } + + if (n == 0) return; + if (!evas_smart_cb_descriptions_resize(&s->callbacks, n)) return; + for (n = 0, sc = s->smart_class; sc; sc = sc->parent) + { + const Evas_Smart_Cb_Description *d; + for (d = sc->callbacks; d && d->name; d++) + s->callbacks.array[n++] = d; + } + evas_smart_cb_descriptions_fix(&s->callbacks); +} + +static int +_evas_smart_cb_description_cmp_search(const void *p1, const void *p2) +{ + const char *name = p1; + const Evas_Smart_Cb_Description **v = (const Evas_Smart_Cb_Description **)p2; + /* speed up string shares searches (same pointers) */ + if (name == (*v)->name) return 0; + return strcmp(name, (*v)->name); +} + +const Evas_Smart_Cb_Description * +evas_smart_cb_description_find(const Evas_Smart_Cb_Description_Array *a, const char *name) +{ + if (!a->array) return NULL; + return bsearch(name, a->array, a->size, sizeof(Evas_Smart_Cb_Description *), + _evas_smart_cb_description_cmp_search); +} diff --git a/libraries/evas/src/lib/canvas/evas_stack.c b/libraries/evas/src/lib/canvas/evas_stack.c new file mode 100644 index 0000000..a8dec0d --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_stack.c @@ -0,0 +1,391 @@ +#include "evas_common.h" +#include "evas_private.h" + +static Evas_Object * +evas_object_above_get_internal(const Evas_Object *obj) +{ + if ((EINA_INLIST_GET(obj))->next) + return (Evas_Object *)((EINA_INLIST_GET(obj))->next); + else + { + if ((EINA_INLIST_GET(((Evas_Object*)(obj))->layer))->next) + { + Evas_Layer *l; + + l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->next); + return l->objects; + } + } + return NULL; +} + +static Evas_Object * +evas_object_below_get_internal(const Evas_Object *obj) +{ + if ((EINA_INLIST_GET(obj))->prev) + return (Evas_Object *)((EINA_INLIST_GET(obj))->prev); + else + { + if ((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev) + { + Evas_Layer *l; + + l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev); + return (Evas_Object *)((EINA_INLIST_GET((l->objects)))->last); + } + } + return NULL; +} + +EAPI void +evas_object_raise(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (evas_object_intercept_call_raise(obj)) return; + if (!((EINA_INLIST_GET(obj))->next)) + { + evas_object_inform_call_restack(obj); + return; + } + if (obj->smart.parent) + evas_object_smart_member_raise(obj); + else + { + if (obj->in_layer) + obj->layer->objects = (Evas_Object *)eina_inlist_demote(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj)); + } + if (obj->clip.clipees) + { + evas_object_inform_call_restack(obj); + return; + } + if (obj->layer) evas_render_invalidate(obj->layer->evas); + obj->restack = EINA_TRUE; + evas_object_change(obj); + evas_object_inform_call_restack(obj); + if (obj->layer->evas->events_frozen > 0) return; + if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj))) + { + if (!obj->smart.smart) + { + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + 1, 1) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + } +} + +EAPI void +evas_object_lower(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (evas_object_intercept_call_lower(obj)) return; + if (!((EINA_INLIST_GET(obj))->prev)) + { + evas_object_inform_call_restack(obj); + return; + } + if (obj->smart.parent) + evas_object_smart_member_lower(obj); + else + { + if (obj->in_layer) + obj->layer->objects = (Evas_Object *)eina_inlist_promote(EINA_INLIST_GET(obj->layer->objects), + EINA_INLIST_GET(obj)); + } + if (obj->clip.clipees) + { + evas_object_inform_call_restack(obj); + return; + } + if (obj->layer) evas_render_invalidate(obj->layer->evas); + obj->restack = EINA_TRUE; + evas_object_change(obj); + evas_object_inform_call_restack(obj); + if (obj->layer->evas->events_frozen > 0) return; + if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj))) + { + if (!obj->smart.smart) + { + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + 1, 1) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + } +} + +EAPI void +evas_object_stack_above(Evas_Object *obj, Evas_Object *above) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + MAGIC_CHECK(above, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj == above) return; + if (evas_object_intercept_call_stack_above(obj, above)) return; + if (!above) + { + evas_object_raise(obj); + return; + } + if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above)) + { + evas_object_inform_call_restack(obj); + return; + } + if (obj->smart.parent) + { + if (obj->smart.parent != above->smart.parent) + { + ERR("BITCH! evas_object_stack_above(), %p not inside same smart as %p!", obj, above); + return; + } + evas_object_smart_member_stack_above(obj, above); + } + else + { + if (above->smart.parent) + { + ERR("BITCH! evas_object_stack_above(), %p stack above %p, but above has smart parent, obj does not", obj, above); + return; + } + if (obj->layer != above->layer) + { + ERR("BITCH! evas_object_stack_above(), %p stack above %p, not matching layers", obj, above); + return; + } + if (obj->in_layer) + { + obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), + EINA_INLIST_GET(obj)); + obj->layer->objects = (Evas_Object *)eina_inlist_append_relative(EINA_INLIST_GET(obj->layer->objects), + EINA_INLIST_GET(obj), + EINA_INLIST_GET(above)); + } + } + if (obj->clip.clipees) + { + evas_object_inform_call_restack(obj); + return; + } + if (obj->layer) evas_render_invalidate(obj->layer->evas); + obj->restack = EINA_TRUE; + evas_object_change(obj); + evas_object_inform_call_restack(obj); + if (obj->layer->evas->events_frozen > 0) return; + if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj))) + { + if (!obj->smart.smart) + { + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + 1, 1) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + } +} + +EAPI void +evas_object_stack_below(Evas_Object *obj, Evas_Object *below) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + MAGIC_CHECK(below, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + if (obj == below) return; + if (evas_object_intercept_call_stack_below(obj, below)) return; + if (!below) + { + evas_object_lower(obj); + return; + } + if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below)) + { + evas_object_inform_call_restack(obj); + return; + } + if (obj->smart.parent) + { + if (obj->smart.parent != below->smart.parent) + { + ERR("BITCH! evas_object_stack_below(), %p not inside same smart as %p!", obj, below); + return; + } + evas_object_smart_member_stack_below(obj, below); + } + else + { + if (below->smart.parent) + { + ERR("BITCH! evas_object_stack_below(), %p stack below %p, but below has smart parent, obj does not", obj, below); + return; + } + if (obj->layer != below->layer) + { + ERR("BITCH! evas_object_stack_below(), %p stack below %p, not matching layers", obj, below); + return; + } + if (obj->in_layer) + { + obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), + EINA_INLIST_GET(obj)); + obj->layer->objects = (Evas_Object *)eina_inlist_prepend_relative(EINA_INLIST_GET(obj->layer->objects), + EINA_INLIST_GET(obj), + EINA_INLIST_GET(below)); + } + } + if (obj->clip.clipees) + { + evas_object_inform_call_restack(obj); + return; + } + if (obj->layer) evas_render_invalidate(obj->layer->evas); + obj->restack = EINA_TRUE; + evas_object_change(obj); + evas_object_inform_call_restack(obj); + if (obj->layer->evas->events_frozen > 0) return; + if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj))) + { + if (!obj->smart.smart) + { + if (evas_object_is_in_output_rect(obj, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + 1, 1) && obj->cur.visible) + evas_event_feed_mouse_move(obj->layer->evas, + obj->layer->evas->pointer.x, + obj->layer->evas->pointer.y, + obj->layer->evas->last_timestamp, + NULL); + } + } +} + +EAPI Evas_Object * +evas_object_above_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (obj->smart.parent) + { + do + { + obj = (Evas_Object *)((EINA_INLIST_GET(obj))->next); + if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj; + } + while (obj); + return NULL; + } + obj = evas_object_above_get_internal(obj); + while (obj) + { + if (!obj->delete_me) return (Evas_Object *)obj; + obj = evas_object_above_get_internal(obj); + } + return NULL; +} + +EAPI Evas_Object * +evas_object_below_get(const Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (obj->smart.parent) + { + do + { + obj = (Evas_Object *)((EINA_INLIST_GET(obj))->prev); + if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj; + } + while (obj); + return NULL; + } + obj = evas_object_below_get_internal(obj); + while (obj) + { + if (!obj->delete_me) return (Evas_Object *)obj; + obj = evas_object_below_get_internal(obj); + } + return NULL; +} + + + +EAPI Evas_Object * +evas_object_bottom_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + if (e->layers) + { + Evas_Object *obj; + + obj = e->layers->objects; + while (obj) + { + if (!obj->delete_me) return obj; + obj = evas_object_above_get_internal(obj); + } + } + return NULL; +} + +EAPI Evas_Object * +evas_object_top_get(const Evas *e) +{ + Evas_Object *obj = NULL; + Eina_Inlist *list; + Evas_Layer *layer; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return NULL; + MAGIC_CHECK_END(); + + list = EINA_INLIST_GET(e->layers); + if (!list) return NULL; + + layer = (Evas_Layer *) list->last; + if (!layer) return NULL; + + list = EINA_INLIST_GET(layer->objects); + if (!list) return NULL; + + obj = (Evas_Object *) list->last; + if (!obj) return NULL; + + while (obj) + { + if (!obj->delete_me) return obj; + obj = evas_object_below_get_internal(obj); + } + + return obj; +} diff --git a/libraries/evas/src/lib/canvas/evas_stats.c b/libraries/evas/src/lib/canvas/evas_stats.c new file mode 100644 index 0000000..cfb1a84 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_stats.c @@ -0,0 +1,185 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_cs.h" + +EAPI Eina_Bool +evas_cserve_want_get(void) +{ +#ifdef EVAS_CSERVE + return evas_cserve_use_get(); +#endif + return 0; +} + +EAPI Eina_Bool +evas_cserve_connected_get(void) +{ +#ifdef EVAS_CSERVE + return evas_cserve_have_get(); +#endif + return 0; +} + +EAPI Eina_Bool +evas_cserve_stats_get(Evas_Cserve_Stats *stats) +{ +#ifdef EVAS_CSERVE + Op_Getstats_Reply st; + + if (!evas_cserve_raw_stats_get(&st)) return 0; + if (!stats) return 1; + stats->saved_memory = st.saved_memory; + stats->wasted_memory = st.wasted_memory; + stats->saved_memory_peak = st.saved_memory_peak; + stats->wasted_memory_peak = st.wasted_memory_peak; + stats->saved_time_image_header_load = st.saved_time_image_header_load; + stats->saved_time_image_data_load = st.saved_time_image_data_load; + // may expand this in future + return 1; +#else + (void) stats; + return 0; +#endif +} + +EAPI Eina_Bool +evas_cserve_image_cache_contents_get(Evas_Cserve_Image_Cache *cache) +{ +#ifdef EVAS_CSERVE + Op_Getinfo_Reply *info; + unsigned char *p; + int i, j; + + if (!(info = evas_cserve_raw_info_get())) return 0; + if (!cache) + { + free(info); + return 1; + } + cache->active.mem_total = info->active.mem_total; + cache->active.count = info->active.count; + cache->cached.mem_total = info->cached.mem_total; + cache->cached.count = info->cached.count; + cache->images = NULL; + j = info->active.count + info->cached.count; + p = (unsigned char *)info; + p += sizeof(Op_Getinfo_Reply); + for (i = 0; i < j; i++) + { + Evas_Cserve_Image *im; + Op_Getinfo_Item it; + char *file, *key; + + memcpy(&it, p, sizeof(Op_Getinfo_Item)); + file = (char*) (p + sizeof(Op_Getinfo_Item)); + key = file + strlen(file) + 1; + im = calloc(1, sizeof(Evas_Cserve_Image)); + if (!im) continue; + if (file[0] != 0) + { + file = (char *)eina_stringshare_add(file); + if (!file) + { + free(im); + continue; + } + } + else + file = NULL; + if (key[0] != 0) + { + key = (char *)eina_stringshare_add(key); + if (!key) + { + if (file) eina_stringshare_del(file); + free(im); + continue; + } + } + else key = NULL; + cache->images = eina_list_append(cache->images, im); + im->file = file; + im->key = key; + im->w = it.w; + im->h = it.h; + im->cached_time = it.cached_time; + im->file_mod_time = it.file_mod_time; + im->file_checked_time = it.file_checked_time; + im->refcount = it.refcount; + im->data_refcount = it.data_refcount; + im->memory_footprint = it.memory_footprint; + im->head_load_time = it.head_load_time; + im->data_load_time = it.data_load_time; + im->active = it.active; + im->alpha = it.alpha; + im->data_loaded = it.data_loaded; + im->dead = it.dead; + im->useless = it.useless; + } + free(info); + return 1; +#else + (void) cache; + return 0; +#endif +} + +EAPI void +evas_cserve_image_cache_contents_clean(Evas_Cserve_Image_Cache *cache) +{ +#ifdef EVAS_CSERVE + Evas_Cserve_Image *im; + + EINA_LIST_FREE(cache->images, im) + { + if (im->file) eina_stringshare_del(im->file); + if (im->key) eina_stringshare_del(im->key); + free(im); + } +#else + (void) cache; +#endif +} + +EAPI Eina_Bool +evas_cserve_config_get(Evas_Cserve_Config *config) +{ +#ifdef EVAS_CSERVE + Op_Getconfig_Reply conf; + + if (!evas_cserve_raw_config_get(&conf)) return 0; + if (!config) return 1; + config->cache_max_usage = conf.cache_max_usage; + config->cache_item_timeout = conf.cache_item_timeout; + config->cache_item_timeout_check = conf.cache_item_timeout_check; + return 1; +#else + (void) config; + return 0; +#endif +} + +EAPI Eina_Bool +evas_cserve_config_set(const Evas_Cserve_Config *config) +{ +#ifdef EVAS_CSERVE + Op_Setconfig conf; + + if (!config) return 1; + conf.cache_max_usage = config->cache_max_usage; + conf.cache_item_timeout = config->cache_item_timeout; + conf.cache_item_timeout_check = config->cache_item_timeout_check; + return evas_cserve_raw_config_set(&conf); +#else + (void) config; + return 0; +#endif +} + +EAPI void +evas_cserve_disconnect(void) +{ +#ifdef EVAS_CSERVE + evas_cserve_discon(); +#endif +} diff --git a/libraries/evas/src/lib/canvas/evas_touch_point.c b/libraries/evas/src/lib/canvas/evas_touch_point.c new file mode 100644 index 0000000..bdea73f --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_touch_point.c @@ -0,0 +1,110 @@ +#include "evas_common.h" +#include "evas_private.h" + +void +_evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y) +{ + Evas_Coord_Touch_Point *point; + + /* create new Evas_Coord_Touch_Point */ + point = (Evas_Coord_Touch_Point *)calloc(1, sizeof(Evas_Coord_Touch_Point)); + point->x = x; + point->y = y; + point->id = id; + point->state = EVAS_TOUCH_POINT_DOWN; + e->touch_points = eina_list_append(e->touch_points, point); +} + +void +_evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state) +{ + Eina_List *l; + Evas_Coord_Touch_Point *point = NULL; + + EINA_LIST_FOREACH(e->touch_points, l, point) + { + if (point->id == id) + { + point->x = x; + point->y = y; + point->state = state; + break; + } + } +} + +void +_evas_touch_point_remove(Evas *e, int id) +{ + Eina_List *l; + Evas_Coord_Touch_Point *point = NULL; + + EINA_LIST_FOREACH(e->touch_points, l, point) + { + if (point->id == id) + { + e->touch_points = eina_list_remove(e->touch_points, point); + free(point); + break; + } + } +} + +EAPI unsigned int +evas_touch_point_list_count(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + return eina_list_count(e->touch_points); +} + +EAPI void +evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y) +{ + Evas_Coord_Touch_Point *point = NULL; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + if (x) *x = 0; + if (y) *y = 0; + return; + MAGIC_CHECK_END(); + + point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); + if (!point) + { + if (x) *x = 0; + if (y) *y = 0; + return; + } + if (x) *x = point->x; + if (y) *y = point->y; +} + +EAPI int +evas_touch_point_list_nth_id_get(Evas *e, unsigned int n) +{ + Evas_Coord_Touch_Point *point = NULL; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return -1; + MAGIC_CHECK_END(); + + point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); + if (!point) return -1; + return point->id; +} + +EAPI Evas_Touch_Point_State +evas_touch_point_list_nth_state_get(Evas *e, unsigned int n) +{ + Evas_Coord_Touch_Point *point = NULL; + + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return EVAS_TOUCH_POINT_CANCEL; + MAGIC_CHECK_END(); + + point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); + if (!point) return EVAS_TOUCH_POINT_CANCEL; + return point->state; +} diff --git a/libraries/evas/src/lib/cserve/Makefile.am b/libraries/evas/src/lib/cserve/Makefile.am new file mode 100644 index 0000000..6ff6e2a --- /dev/null +++ b/libraries/evas/src/lib/cserve/Makefile.am @@ -0,0 +1,32 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/lib/cserve \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@FRIBIDI_CFLAGS@ \ +@EET_CFLAGS@ \ +@FONTCONFIG_CFLAGS@ \ +@pthread_cflags@ \ +@PIXMAN_CFLAGS@ + +if EVAS_CSERVE + +noinst_LTLIBRARIES = libevas_cserve.la + +endif + +libevas_cserve_la_SOURCES = \ +evas_cs.h \ +evas_cs_main.c \ +evas_cs_server.c \ +evas_cs_client.c \ +evas_cs_mem.c + +libevas_cserve_la_LIBADD = @EINA_LIBS@ -lrt diff --git a/libraries/evas/src/lib/cserve/Makefile.in b/libraries/evas/src/lib/cserve/Makefile.in new file mode 100644 index 0000000..74b5ff9 --- /dev/null +++ b/libraries/evas/src/lib/cserve/Makefile.in @@ -0,0 +1,688 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/cserve +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libevas_cserve_la_DEPENDENCIES = +am_libevas_cserve_la_OBJECTS = evas_cs_main.lo evas_cs_server.lo \ + evas_cs_client.lo evas_cs_mem.lo +libevas_cserve_la_OBJECTS = $(am_libevas_cserve_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@EVAS_CSERVE_TRUE@am_libevas_cserve_la_rpath = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_cserve_la_SOURCES) +DIST_SOURCES = $(libevas_cserve_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/lib/cserve \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@FRIBIDI_CFLAGS@ \ +@EET_CFLAGS@ \ +@FONTCONFIG_CFLAGS@ \ +@pthread_cflags@ \ +@PIXMAN_CFLAGS@ + +@EVAS_CSERVE_TRUE@noinst_LTLIBRARIES = libevas_cserve.la +libevas_cserve_la_SOURCES = \ +evas_cs.h \ +evas_cs_main.c \ +evas_cs_server.c \ +evas_cs_client.c \ +evas_cs_mem.c + +libevas_cserve_la_LIBADD = @EINA_LIBS@ -lrt +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/cserve/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/cserve/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_cserve.la: $(libevas_cserve_la_OBJECTS) $(libevas_cserve_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_cserve_la_rpath) $(libevas_cserve_la_OBJECTS) $(libevas_cserve_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_client.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_mem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_server.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/cserve/evas_cs.h b/libraries/evas/src/lib/cserve/evas_cs.h new file mode 100644 index 0000000..73bbaed --- /dev/null +++ b/libraries/evas/src/lib/cserve/evas_cs.h @@ -0,0 +1,285 @@ +#ifndef EVAS_CS_H +#define EVAS_CS_H 1 + +#ifdef EVAS_CSERVE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "evas_common.h" +#include "evas_private.h" + +#ifdef EAPI +# undef EAPI +#endif + +#ifdef _WIN32 +# ifdef EFL_EVAS_BUILD +# ifdef DLL_EXPORT +# define EAPI __declspec(dllexport) +# else +# define EAPI +# endif /* ! DLL_EXPORT */ +# else +# define EAPI __declspec(dllimport) +# endif /* ! EFL_EVAS_BUILD */ +#else +# ifdef __GNUC__ +# if __GNUC__ >= 4 +# define EAPI __attribute__ ((visibility("default"))) +# else +# define EAPI +# endif +# else +# define EAPI +# endif +#endif /* ! _WIN32 */ + +#define LENGTH_OF_SOCKADDR_UN(s) (strlen((s)->sun_path) + (size_t)(((struct sockaddr_un *)NULL)->sun_path)) + +typedef struct _Server Server; +typedef struct _Client Client; +typedef struct _Mem Mem; + +struct _Server +{ + char *socket_path; + Eina_List *clients; + int (*func) (void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *data); + void *data; + pid_t pid; + int server_id; + // for channel 2; + struct { + int fd; + int req_from, req_to; + } ch[2]; + void *main_handle; +}; + +struct _Client +{ + Server *server; + unsigned char *buf; + Client *client_main; + int bufsize, bufalloc; + int fd; + unsigned char *inbuf; + int inbufsize, inbufalloc; + unsigned char dead : 1; + void (*func) (void *fdata, Client *c); + void *data; + pid_t pid; + int req_from, req_to; + LK(lock); +}; + +struct _Mem +{ + unsigned char *data; + char *name; + int fd; + int id; + int offset; + int size; + int ref; + Eina_Bool write : 1; +}; + +//// for comms +enum +{ + OP_NOP, // 0 + + OP_INIT, // 1 + OP_LOAD, // 2 + OP_UNLOAD, // 3 + OP_LOADDATA, // 4 + OP_UNLOADDATA, // 5 + OP_USELESSDATA, // 6 + OP_PRELOAD, // 7 + OP_FORCEDUNLOAD, // 8 + + OP_GETCONFIG, // 9 + OP_SETCONFIG, // 10 + OP_GETSTATS, // 11 + OP_GETINFO, // 12 + + OP_INVALID // 13 +}; + +typedef struct +{ + pid_t pid; + int server_id; + void *handle; +} Op_Init; +typedef struct +{ + struct { + int scale_down_by; + double dpi; + int w, h; + struct { + int x, y, w, h; + } region; + Eina_Bool orientation; + } lopt; +} Op_Load; // +"file""key" +typedef struct +{ + void *handle; + int server_id; + struct { + int id; + int offset; + int size; + } mem; + struct { + int w, h; + Eina_Bool alpha : 1; + } image; +} Op_Load_Reply; +typedef struct +{ + void *handle; + int server_id; +} Op_Unload; +typedef struct +{ + void *handle; + int server_id; +} Op_Unloaddata; +typedef struct +{ + void *handle; + int server_id; +} Op_Loaddata; +typedef struct +{ + struct { + int id; + int offset; + int size; + } mem; +} Op_Loaddata_Reply; +typedef struct +{ + void *handle; + int server_id; +} Op_Preload; +typedef struct +{ + void *handle; + struct { + int id; + int offset; + int size; + } mem; +} Op_Preload_Reply; +typedef struct +{ + void *handle; + int server_id; +} Op_Forcedunload; +typedef struct +{ + int cache_max_usage; + int cache_item_timeout; + int cache_item_timeout_check; +} Op_Getconfig_Reply; +typedef struct +{ + int cache_max_usage; + int cache_item_timeout; + int cache_item_timeout_check; +} Op_Setconfig; +typedef struct +{ + int saved_memory; + int wasted_memory; + int saved_memory_peak; + int wasted_memory_peak; + double saved_time_image_header_load; + double saved_time_image_data_load; +} Op_Getstats_Reply; +typedef struct +{ + struct { + int mem_total; + int count; + } active, cached; +} Op_Getinfo_Reply; // + N active Info Items + N cached items +typedef struct +{ + int file_key_size; + int w, h; + time_t file_mod_time; + time_t file_checked_time; + time_t cached_time; + int refcount; + int data_refcount; + int memory_footprint; + double head_load_time; + double data_load_time; + Eina_Bool alpha : 1; + Eina_Bool data_loaded : 1; + Eina_Bool active : 1; + Eina_Bool dead : 1; + Eina_Bool useless : 1; +} Op_Getinfo_Item; // + "file""key" + + +// for clients to connect to cserve +EAPI Eina_Bool evas_cserve_init(void); +EAPI int evas_cserve_use_get(void); +EAPI Eina_Bool evas_cserve_have_get(void); +EAPI void evas_cserve_shutdown(void); +EAPI void evas_cserve_discon(void); +EAPI Eina_Bool evas_cserve_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt); +EAPI Eina_Bool evas_cserve_image_data_load(Image_Entry *ie); +EAPI void evas_cserve_image_unload(Image_Entry *ie); +EAPI void evas_cserve_image_useless(Image_Entry *ie); +EAPI void evas_cserve_image_free(Image_Entry *ie); +EAPI Eina_Bool evas_cserve_raw_config_get(Op_Getconfig_Reply *config); +EAPI Eina_Bool evas_cserve_raw_config_set(Op_Setconfig *config); +EAPI Eina_Bool evas_cserve_raw_stats_get(Op_Getstats_Reply *stats); +EAPI Op_Getinfo_Reply *evas_cserve_raw_info_get(void); + +// for the server +EAPI Server *evas_cserve_server_add(void); +EAPI void evas_cserve_server_del(Server *s); +EAPI void evas_cserve_client_send(Client *c, int opcode, int size, unsigned char *data); +EAPI void evas_cserve_server_message_handler_set(Server *s, int (*func) (void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *data), void *data); +EAPI void evas_cserve_server_wait(Server *s, int timeout); + +//// for memory +// for server +EAPI Mem *evas_cserve_mem_new(int size, const char *name); +EAPI void evas_cserve_mem_free(Mem *m); + +// for client +EAPI Mem *evas_cserve_mem_open(int pid, int id, const char *name, int size, int do_write); +EAPI void evas_cserve_mem_close(Mem *m); + +// for both +EAPI Eina_Bool evas_cserve_mem_resize(Mem *m, int size); +EAPI void evas_cserve_mem_del(int pid, int id); + +#endif + +#endif diff --git a/libraries/evas/src/lib/cserve/evas_cs_client.c b/libraries/evas/src/lib/cserve/evas_cs_client.c new file mode 100644 index 0000000..b24848d --- /dev/null +++ b/libraries/evas/src/lib/cserve/evas_cs_client.c @@ -0,0 +1,528 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include "evas_cs.h" + +#ifdef EVAS_CSERVE + +static Server *cserve = NULL; +static int csrve_init = 0; +static int connect_num = 0; +static int cserve_discon = 0; + +static void +pipe_handler(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__) +{ +} + +static void +pipe_handle(int push) +{ + static struct sigaction old_action; + struct sigaction action; + + if (push) + { + action.sa_handler = NULL; + action.sa_sigaction = pipe_handler; + action.sa_flags = SA_RESTART | SA_SIGINFO; + sigemptyset(&action.sa_mask); + sigaction(SIGPIPE, &action, &old_action); + } + else + { + sigaction(SIGPIPE, &old_action, &action); + } +} + +static Server * +server_connect(void) +{ + Server *s; + char buf[PATH_MAX]; + int curstate = 0; + struct sockaddr_un socket_unix; + int socket_unix_len; + + s = calloc(1, sizeof(Server)); + if (!s) return NULL; + s->ch[0].fd = -1; + s->ch[1].fd = -1; + snprintf(buf, sizeof(buf), "/tmp/.evas-cserve-%x", getuid()); + s->socket_path = strdup(buf); + if (!s->socket_path) + { + free(s); + return NULL; + } + s->ch[0].fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (s->ch[0].fd < 0) goto error; + if (fcntl(s->ch[0].fd, F_SETFD, FD_CLOEXEC) < 0) goto error; + if (setsockopt(s->ch[0].fd, SOL_SOCKET, SO_REUSEADDR, &curstate, sizeof(curstate)) < 0) + goto error; + socket_unix.sun_family = AF_UNIX; + strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path)); + socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix); + if (connect(s->ch[0].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) goto error; + + s->ch[1].fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (s->ch[1].fd < 0) goto error; + if (fcntl(s->ch[1].fd, F_SETFD, FD_CLOEXEC) < 0) goto error; + if (setsockopt(s->ch[1].fd, SOL_SOCKET, SO_REUSEADDR, &curstate, sizeof(curstate)) < 0) + goto error; + socket_unix.sun_family = AF_UNIX; + strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path)); + socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix); + if (connect(s->ch[1].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) goto error; + + return s; + error: + if (s->ch[0].fd >= 0) close(s->ch[0].fd); + if (s->ch[1].fd >= 0) close(s->ch[1].fd); + free(s->socket_path); + free(s); + return NULL; +} + +static void +server_disconnect(Server *s) +{ + close(s->ch[0].fd); + close(s->ch[1].fd); + free(s->socket_path); + free(s); +} + +static int +server_send(Server *s, int channel, int opcode, int size, unsigned char *data) +{ + int ints[3]; + int num; + + pipe_handle(1); + ints[0] = size; + ints[1] = opcode; + s->ch[channel].req_to++; + ints[2] = s->ch[channel].req_to; + num = write(s->ch[channel].fd, ints, (sizeof(int) * 3)); + if (num < 0) + { + pipe_handle(0); + if (cserve) server_disconnect(cserve); + cserve = NULL; + return 0; + } + num = write(s->ch[channel].fd, data, size); + if (num < 0) + { + pipe_handle(0); + if (cserve) server_disconnect(cserve); + cserve = NULL; + return 0; + } + pipe_handle(0); + return 1; +} + +static unsigned char * +server_read(Server *s, int channel, int *opcode, int *size) +{ + int ints[3], num, left; + unsigned char *data; + + num = read(s->ch[channel].fd, ints, sizeof(int) * 3); + if (num != (sizeof(int) * 3)) + { + if (cserve) server_disconnect(cserve); + cserve = NULL; + return NULL; + } + *size = ints[0]; + *opcode = ints[1]; + if ((*size < 0) || (*size > (1024 * 1024))) return NULL; + if (ints[2] != (s->ch[channel].req_from + 1)) + { + ERR("EEK! sequence number mismatch from serer with pid: %i. " + "---- num %i is not 1 more than %i" + , + s->pid, ints[2], s->ch[channel].req_from); + return NULL; + } + s->ch[channel].req_from++; + data = malloc(*size); + if (!data) return NULL; + num = read(s->ch[channel].fd, data, *size); + if (num < 0) + { + free(data); + return NULL; + } + left = *size - num; + while (left > 0) + { + num = read(s->ch[channel].fd, data + (*size - left), left); + if (num < 0) + { + free(data); + return NULL; + } + left -= num; + } + return data; +} + +static int +server_init(Server *s) +{ + Op_Init msg, *rep; + int opcode; + int size; + + msg.pid = getpid(); + msg.server_id = 0; + msg.handle = NULL; + if (!server_send(s, 0, OP_INIT, sizeof(msg), (unsigned char *)(&msg))) + return 0; + rep = (Op_Init *)server_read(s, 0, &opcode, &size); + if ((rep) && (opcode == OP_INIT) && (size == sizeof(Op_Init))) + { + s->pid = rep->pid; + s->server_id = rep->server_id; + s->main_handle = rep->handle; + connect_num++; + msg.pid = getpid(); + msg.server_id = 1; + msg.handle = rep->handle; + free(rep); + if (!server_send(s, 1, OP_INIT, sizeof(msg), (unsigned char *)(&msg))) + return 0; + rep = (Op_Init *)server_read(s, 1, &opcode, &size); + if ((rep) && (opcode == OP_INIT) && (size == sizeof(Op_Init))) + { + free(rep); + return 1; + } + if (rep) free(rep); + return 0; + } + if (rep) free(rep); + return 0; +} + +EAPI Eina_Bool +evas_cserve_init(void) +{ + csrve_init++; + if (cserve) return 1; + cserve = server_connect(); + if (!cserve) return 0; + if (!server_init(cserve)) + { + if (cserve) server_disconnect(cserve); + cserve = NULL; + return 0; + } + return 1; +} + +EAPI int +evas_cserve_use_get(void) +{ + return csrve_init; +} + +EAPI Eina_Bool +evas_cserve_have_get(void) +{ + if (cserve) return 1; + return 0; +} + +EAPI void +evas_cserve_shutdown(void) +{ + csrve_init--; + if (csrve_init > 0) return; + if (!cserve) return; + server_disconnect(cserve); + cserve = NULL; +} + +EAPI void +evas_cserve_discon(void) +{ + if (cserve) + { + server_disconnect(cserve); + cserve = NULL; + cserve_discon = 1; + } +} + +static void +server_reinit(void) +{ + if (cserve) return; + if (cserve_discon) return; + cserve = server_connect(); + if (cserve) + { + if (!server_init(cserve)) + { + if (cserve) server_disconnect(cserve); + cserve = NULL; + } + } +} + +EAPI Eina_Bool +evas_cserve_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt) +{ + Op_Load msg; + Op_Load_Reply *rep; + unsigned char *buf; + char fbuf[PATH_MAX], wdb[PATH_MAX]; + int flen, klen; + int opcode; + int size; + + if (csrve_init > 0) server_reinit(); + else return 0; + if (!cserve) return 0; + if (!key) key = ""; + memset(&msg, 0, sizeof(msg)); + msg.lopt.scale_down_by = lopt->scale_down_by; + msg.lopt.dpi = lopt->dpi; + msg.lopt.w = lopt->w; + msg.lopt.h = lopt->h; + msg.lopt.region.x = lopt->region.x; + msg.lopt.region.y = lopt->region.y; + msg.lopt.region.w = lopt->region.w; + msg.lopt.region.h = lopt->region.h; + msg.lopt.orientation = lopt->orientation; + if (file[0] != '/') + { + if (getcwd(wdb, sizeof(wdb))) + { + snprintf(fbuf, sizeof(buf), "%s/%s", wdb, file); + file = fbuf; + } + } + if (!realpath(file, wdb)) file = wdb; + flen = strlen(file) + 1; + klen = strlen(key) + 1; + buf = malloc(sizeof(msg) + flen + klen); + if (!buf) return 0; + memcpy(buf, &msg, sizeof(msg)); + memcpy(buf + sizeof(msg), file, flen); + memcpy(buf + sizeof(msg) + flen, key, klen); + if (!server_send(cserve, ie->channel, OP_LOAD, + sizeof(msg) + flen + klen, + buf)) + { + free(buf); + return 0; + } + free(buf); + if (!cserve) return 0; + rep = (Op_Load_Reply *)server_read(cserve, ie->channel, &opcode, &size); + if ((rep) && (opcode == OP_LOAD) && (size == sizeof(Op_Load_Reply))) + { + ie->w = rep->image.w; + ie->h = rep->image.h; + ie->flags.alpha = rep->image.alpha; + ie->data1 = rep->handle; + } + if (rep) free(rep); + if (!ie->data1) return 0; + ie->connect_num = connect_num; + if (cserve) + ie->server_id = cserve->server_id; + return 1; +} + +EAPI Eina_Bool +evas_cserve_image_data_load(Image_Entry *ie) +{ + Op_Loaddata msg; + Op_Loaddata_Reply *rep; + int opcode; + int size; + if (csrve_init > 0) server_reinit(); + else return 0; + if (!cserve) return 0; + if (!ie->data1) return 0; + if (cserve->server_id != ie->server_id) + { + ie->data1 = NULL; + if (!evas_cserve_image_load(ie, ie->file, ie->key, &(ie->load_opts))) + return 0; + } + if (ie->connect_num != connect_num) return 0; + memset(&msg, 0, sizeof(msg)); + msg.handle = ie->data1; + msg.server_id = cserve->server_id; + if (!server_send(cserve, ie->channel, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg))) + return 0; + if (!cserve) return 0; + rep = (Op_Loaddata_Reply *)server_read(cserve, ie->channel, &opcode, &size); + if ((rep) && (opcode == OP_LOADDATA) && (size == sizeof(Op_Loaddata_Reply))) + { + if (rep->mem.size <= 0) + { + free(rep); + return 0; + } + ie->data2 = evas_cserve_mem_open(cserve->pid, rep->mem.id, NULL, rep->mem.size, 0); + free(rep); + return 1; + } + if (rep) free(rep); + return 0; +} + +EAPI void +evas_cserve_image_free(Image_Entry *ie) +{ + Op_Unload msg; + + if (csrve_init > 0) server_reinit(); + else return; + if (!cserve) return; + if (!ie->data1) return; + memset(&msg, 0, sizeof(msg)); + msg.handle = ie->data1; + msg.server_id = cserve->server_id; + if (ie->data2) evas_cserve_image_unload(ie); + if (cserve) + { + if (ie->connect_num == connect_num) + { + if (ie->server_id == cserve->server_id) + server_send(cserve, ie->channel, OP_UNLOAD, sizeof(msg), (unsigned char *)(&msg)); + } + } + ie->data1 = NULL; + ie->data2 = NULL; +} + +EAPI void +evas_cserve_image_unload(Image_Entry *ie) +{ + Op_Unloaddata msg; + + if (csrve_init > 0) server_reinit(); + else return; + if (!cserve) return; + if (!ie->data1) return; + if (ie->connect_num != connect_num) return; + memset(&msg, 0, sizeof(msg)); + msg.handle = ie->data1; + msg.server_id = cserve->server_id; + if (ie->data2) evas_cserve_mem_close(ie->data2); + ie->data2 = NULL; + if (ie->connect_num == connect_num) + { + if (ie->server_id == cserve->server_id) + server_send(cserve, ie->channel, OP_UNLOADDATA, sizeof(msg), (unsigned char *)(&msg)); + } +} + +EAPI void +evas_cserve_image_useless(Image_Entry *ie) +{ + Op_Unloaddata msg; + + if (csrve_init > 0) server_reinit(); + else return; + if (!cserve) return; + if (!ie->data1) return; + if (ie->connect_num != connect_num) return; + memset(&msg, 0, sizeof(msg)); + msg.handle = ie->data1; + msg.server_id = cserve->server_id; + if (ie->data2) evas_cserve_mem_close(ie->data2); + ie->data2 = NULL; + if (ie->connect_num == connect_num) + { + if (ie->server_id == cserve->server_id) + server_send(cserve, ie->channel, OP_USELESSDATA, sizeof(msg), (unsigned char *)(&msg)); + } +} + +EAPI Eina_Bool +evas_cserve_raw_config_get(Op_Getconfig_Reply *config) +{ + Op_Getconfig_Reply *rep; + int opcode; + int size; + if (csrve_init > 0) server_reinit(); + else return 0; + if (!cserve) return 0; + if (!server_send(cserve, 0, OP_GETCONFIG, 0, NULL)) return 0; + rep = (Op_Getconfig_Reply *)server_read(cserve, 0, &opcode, &size); + if ((rep) && (opcode == OP_GETCONFIG) && (size == sizeof(Op_Getconfig_Reply))) + { + memcpy(config, rep, sizeof(Op_Getconfig_Reply)); + free(rep); + return 1; + } + if (rep) free(rep); + return 0; +} + +EAPI Eina_Bool +evas_cserve_raw_config_set(Op_Setconfig *config) +{ + if (csrve_init > 0) server_reinit(); + else return 0; + if (!cserve) return 0; + if (!server_send(cserve, 0, OP_SETCONFIG, sizeof(Op_Setconfig), (unsigned char *)config)) return 0; + return 1; +} + +EAPI Eina_Bool +evas_cserve_raw_stats_get(Op_Getstats_Reply *stats) +{ + Op_Getstats_Reply *rep; + int opcode; + int size; + if (csrve_init > 0) server_reinit(); + else return 0; + if (!cserve) return 0; + if (!server_send(cserve, 0, OP_GETSTATS, 0, NULL)) return 0; + rep = (Op_Getstats_Reply *)server_read(cserve, 0, &opcode, &size); + if ((rep) && (opcode == OP_GETSTATS) && (size == sizeof(Op_Getstats_Reply))) + { + memcpy(stats, rep, sizeof(Op_Getstats_Reply)); + free(rep); + return 1; + } + if (rep) free(rep); + return 0; +} + +EAPI Op_Getinfo_Reply * +evas_cserve_raw_info_get(void) +{ + Op_Getinfo_Reply *rep; + int opcode; + int size; + if (csrve_init > 0) server_reinit(); + else return NULL; + if (!cserve) return NULL; + if (!server_send(cserve, 0, OP_GETINFO, 0, NULL)) return NULL; + rep = (Op_Getinfo_Reply *)server_read(cserve, 0, &opcode, &size); + if ((rep) && (opcode == OP_GETINFO) && + (size >= (int)sizeof(Op_Getinfo_Reply))) + { + return rep; + } + if (rep) free(rep); + return NULL; +} + +#endif diff --git a/libraries/evas/src/lib/cserve/evas_cs_main.c b/libraries/evas/src/lib/cserve/evas_cs_main.c new file mode 100644 index 0000000..e8282aa --- /dev/null +++ b/libraries/evas/src/lib/cserve/evas_cs_main.c @@ -0,0 +1,9 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "evas_cs.h" + +#ifdef EVAS_CSERVE + +#endif diff --git a/libraries/evas/src/lib/cserve/evas_cs_mem.c b/libraries/evas/src/lib/cserve/evas_cs_mem.c new file mode 100644 index 0000000..15edf93 --- /dev/null +++ b/libraries/evas/src/lib/cserve/evas_cs_mem.c @@ -0,0 +1,168 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "evas_cs.h" + +#ifdef EVAS_CSERVE + +EAPI Mem * +evas_cserve_mem_new(int size, const char *name) +{ + Mem *m; + static int id = 0; + char buf[PATH_MAX]; + + m = calloc(1, sizeof(Mem)); + if (!m) return NULL; + if (name) + snprintf(buf, sizeof(buf), "/evas-shm-%x.%s", getuid(), name); + else + { + id++; + snprintf(buf, sizeof(buf), "/evas-shm-%x.%x.%x", getuid(), getpid(), id); + } + m->id = id; + m->offset = 0; + m->name = strdup(buf); + if (!m->name) + { + free(m); + return NULL; + } + m->size = size; + m->fd = shm_open(m->name, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); + if (m->fd < 0) + { + free(m->name); + free(m); + return NULL; + } + if (ftruncate(m->fd, m->size) < 0) + { + shm_unlink(m->name); + close(m->fd); + free(m->name); + free(m); + return NULL; + } + + eina_mmap_safety_enabled_set(EINA_TRUE); + + m->data = mmap(NULL, m->size, PROT_READ | PROT_WRITE, MAP_SHARED, m->fd, 0); + if (m->data == MAP_FAILED) + { + shm_unlink(m->name); + close(m->fd); + free(m->name); + free(m); + return NULL; + } + m->ref = 1; + m->write = 1; + return m; +} + +EAPI void +evas_cserve_mem_free(Mem *m) +{ + shm_unlink(m->name); + munmap(m->data, m->size); + close(m->fd); + free(m->name); + free(m); +} + +EAPI Mem * +evas_cserve_mem_open(int pid, int id, const char *name, int size, int do_write) +{ + Mem *m; + char buf[PATH_MAX]; + + m = calloc(1, sizeof(Mem)); + if (!m) return NULL; + if (name) + snprintf(buf, sizeof(buf), "/evas-shm-%x.%s", getuid(), name); + else + snprintf(buf, sizeof(buf), "/evas-shm-%x.%x.%x", getuid(), pid, id); + m->name = strdup(buf); + if (!m->name) + { + free(m); + return NULL; + } + m->size = size; + if (do_write) + m->fd = shm_open(m->name, O_RDWR, S_IRUSR | S_IWUSR); + else + m->fd = shm_open(m->name, O_RDONLY, S_IRUSR); + if (m->fd < 0) + { + free(m->name); + free(m); + return NULL; + } + m->write = do_write; + + eina_mmap_safety_enabled_set(EINA_TRUE); + + if (do_write) + m->data = mmap(NULL, m->size, PROT_READ | PROT_WRITE, MAP_SHARED, m->fd, 0); + else + m->data = mmap(NULL, m->size, PROT_READ, MAP_SHARED, m->fd, 0); + if (m->data == MAP_FAILED) + { + close(m->fd); + free(m->name); + free(m); + return NULL; + } + m->ref = 1; + return m; +} + +EAPI void +evas_cserve_mem_close(Mem *m) +{ + munmap(m->data, m->size); + close(m->fd); + free(m->name); + free(m); +} + +EAPI Eina_Bool +evas_cserve_mem_resize(Mem *m, int size) +{ + if (m->size == size) return 1; + if (m->write) + { + if (ftruncate(m->fd, size) < 0) return 0; + munmap(m->data, m->size); + eina_mmap_safety_enabled_set(EINA_TRUE); + m->data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, m->fd, 0); + } + else + { + munmap(m->data, m->size); + eina_mmap_safety_enabled_set(EINA_TRUE); + m->data = mmap(NULL, size, PROT_READ, MAP_SHARED, m->fd, 0); + } + if (m->data == MAP_FAILED) + { + m->data = NULL; + return 0; + } + m->size = size; + return 1; +} + +EAPI void +evas_cserve_mem_del(int pid, int id) +{ + char buf[PATH_MAX]; + + snprintf(buf, sizeof(buf), "/evas-shm-%x.%x.%x", getuid(), pid, id); + shm_unlink(buf); +} + +#endif diff --git a/libraries/evas/src/lib/cserve/evas_cs_server.c b/libraries/evas/src/lib/cserve/evas_cs_server.c new file mode 100644 index 0000000..3b5d8b9 --- /dev/null +++ b/libraries/evas/src/lib/cserve/evas_cs_server.c @@ -0,0 +1,380 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "evas_cs.h" + +#ifdef EVAS_CSERVE + +EAPI Server * +evas_cserve_server_add(void) +{ + Server *s; + char buf[PATH_MAX]; + struct sockaddr_un socket_unix; + struct linger lin; + mode_t pmode; + int socket_unix_len; + + s = calloc(1, sizeof(Server)); + if (!s) return NULL; + s->ch[0].fd = -1; + snprintf(buf, sizeof(buf), "/tmp/.evas-cserve-%x", getuid()); + s->socket_path = strdup(buf); + if (!s->socket_path) + { + free(s); + return NULL; + } + pmode = umask(~(S_IRUSR | S_IWUSR)); + start: + s->ch[0].fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (s->ch[0].fd < 0) goto error; + if (fcntl(s->ch[0].fd, F_SETFL, O_NONBLOCK) < 0) goto error; + if (fcntl(s->ch[0].fd, F_SETFD, FD_CLOEXEC) < 0) goto error; + lin.l_onoff = 1; + lin.l_linger = 0; + if (setsockopt(s->ch[0].fd, SOL_SOCKET, SO_LINGER, &lin, sizeof(struct linger)) < 0) + goto error; + socket_unix.sun_family = AF_UNIX; + strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path)); + socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix); + if (bind(s->ch[0].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) + { + if ((connect(s->ch[0].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) && + (unlink(s->socket_path) >= 0)) + { + close(s->ch[0].fd); + goto start; + } + else + goto error; + } + if (listen(s->ch[0].fd, 4096) < 0) goto error; + umask(pmode); + return s; + error: + umask(pmode); + if (s->ch[0].fd >= 0) close(s->ch[0].fd); + free(s->socket_path); + free(s); + return NULL; +} + +EAPI void +evas_cserve_server_del(Server *s) +{ + Client *c; + + EINA_LIST_FREE(s->clients, c) + { + LKL(c->lock); + close(c->fd); + if (c->buf) free(c->buf); + if (c->inbuf) free(c->inbuf); + LKD(c->lock); + free(c); + } + close(s->ch[0].fd); + unlink(s->socket_path); + free(s->socket_path); + free(s); +} + +static void +server_accept(Server *s) +{ + Client *c; + int new_fd; + struct sockaddr_in incoming; + size_t size_in; + + size_in = sizeof(struct sockaddr_in); + new_fd = accept(s->ch[0].fd, (struct sockaddr *)&incoming, (socklen_t *)&size_in); + if (new_fd < 0) return; + fcntl(new_fd, F_SETFL, O_NONBLOCK); + fcntl(new_fd, F_SETFD, FD_CLOEXEC); + c = calloc(1, sizeof(Client)); + if (!c) + { + close(new_fd); + return; + } + c->server = s; + c->fd = new_fd; + LKI(c->lock); + s->clients = eina_list_append(s->clients, c); +} + +static void +client_flush(Client *c) +{ + int num; + + num = write(c->fd, c->buf, c->bufsize); + if (num < 0) + { + c->dead = 1; + return; + } + if (num < c->bufsize) + { + unsigned char *buf; + + buf = malloc(c->bufsize - num); + if (buf) + { + memcpy(buf, c->buf + num, c->bufsize - num); + free(c->buf); + c->bufsize = c->bufsize - num; + c->bufalloc = c->bufsize; + c->buf = buf; + } + } + else + { + free(c->buf); + c->buf = NULL; + c->bufsize = 0; + c->bufalloc = 0; + } +} + +static void +client_buf_add(Client *c, unsigned char *data, int size) +{ + int newsize; + unsigned char *buf; + + newsize = c->bufsize + size; + if (newsize > c->bufalloc) + { + c->bufalloc = newsize + 16384; + buf = realloc(c->buf, c->bufalloc); + if (buf) c->buf = buf; + else return; + } + memcpy(c->buf + c->bufsize, data, size); + c->bufsize += size; +} + +static void +client_write(Client *c, unsigned char *data, int size) +{ + int num; + + if (!c->buf) + { + num = write(c->fd, data, size); + if (num != size) + client_buf_add(c, data + num, size - num); + } + else + { + client_buf_add(c, data, size); + } +} + +EAPI void +evas_cserve_client_send(Client *c, int opcode, int size, unsigned char *data) +{ + unsigned char *data2; + int *ints; + + data2 = malloc(size + (sizeof(int) * 3)); + if (!data2) return; + ints = (int *)data2; + ints[0] = size; + ints[1] = opcode; +// LKL(c->lock); + c->req_to++; + ints[2] = c->req_to; + memcpy(data2 + (sizeof(int) * 3), data, size); + client_write(c, data2, size + (sizeof(int) * 3)); +// LKU(c->lock); + free(data2); +} + +static void +server_message_handle(Server *s, Client *c, int opcode, int size, unsigned char *data) +{ + if (s->func) s->func(s->data, s, c, opcode, size, data); +} + +EAPI void +evas_cserve_server_message_handler_set(Server *s, int (*func) (void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *data), void *data) +{ + s->func = func; + s->data = data; +} + +static int +server_parse(Server *s, Client *c) +{ + int *ints; + unsigned char *data, *newbuf; + + if (c->inbufsize < (int)sizeof(int)) return 0; + ints = (int *)((c->inbuf)); + if ((ints[0] < 0) || (ints[0] > (1024 * 1024))) + return 0; + if (c->inbufsize < (ints[0] + ((int)sizeof(int) * 3))) + { + return 0; + } + data = c->inbuf + (sizeof(int) * 3); + if (ints[2] != (c->req_from + 1)) + { + ERR("EEK! sequence number mismatch from client with pid: %i." + "---- num %i is not 1 more than %i" + , + c->pid, ints[2], c->req_from); + return 0; + } + c->req_from++; + server_message_handle(s, c, ints[1], ints[0], data); + c->inbufalloc -= ints[0] + (sizeof(int) * 3); + if (c->inbufalloc == 0) + { + free(c->inbuf); + c->inbuf = NULL; + c->inbufsize = 0; + return 0; + } + newbuf = malloc(c->inbufalloc); + if (!newbuf) + { + c->inbufalloc += ints[0] + (sizeof(int) * 3); + /* fixme - bad situation */ + return 0; + } + memcpy(newbuf, c->inbuf + ints[0] + (sizeof(int) * 3), c->inbufalloc); + c->inbufsize -= ints[0] + (sizeof(int) * 3); + free(c->inbuf); + c->inbuf = newbuf; + return 1; +} + +static void +server_data(Server *s, Client *c, unsigned char *data, int size) +{ + if (!c->inbuf) + { + c->inbuf = malloc(size); + if (c->inbuf) + { + memcpy(c->inbuf, data, size); + c->inbufalloc = size; + c->inbufsize = size; + } + else + { + /* fixme - bad situation */ + return; + } + } + else + { + int size2; + + size2 = c->inbufsize + size; + if (size2 > c->inbufalloc) + { + unsigned char *newbuf; + + c->inbufalloc = size2; + newbuf = realloc(c->inbuf, c->inbufalloc); + if (newbuf) c->inbuf = newbuf; + else size2 = 0; + } + if (size2 > 0) + { + memcpy(c->inbuf + c->inbufsize, data, size); + c->inbufsize = size2; + } + else + { + /* fixme - bad situation */ + return; + } + } + while (server_parse(s, c)); +} + +EAPI void +evas_cserve_server_wait(Server *s, int timeout) +{ + fd_set rset, wset, xset; + int maxfd; + int ret; + struct timeval to; + Eina_List *l, *dead = NULL; + Client *c; + + maxfd = 0; + FD_ZERO(&rset); + FD_ZERO(&wset); + FD_ZERO(&xset); + FD_SET(s->ch[0].fd, &rset); + if (s->ch[0].fd > maxfd) maxfd = s->ch[0].fd; + EINA_LIST_FOREACH(s->clients, l, c) + { + FD_SET(c->fd, &rset); + if (c->buf) + FD_SET(c->fd, &wset); + if (c->fd > maxfd) maxfd = c->fd; + } + if (timeout > 0) + { + to.tv_sec = timeout / 1000000; + to.tv_usec = timeout % 1000000; + ret = select(maxfd + 1, &rset, &wset, &xset, &to); + } + else + ret = select(maxfd + 1, &rset, &wset, &xset, NULL); + if (ret < 1) return; + + EINA_LIST_FOREACH(s->clients, l, c) + { + if (c->dead) continue; + if (FD_ISSET(c->fd, &rset)) + { + unsigned char buf[16384]; + int num; + + errno = 0; + num = read(c->fd, buf, sizeof(buf)); + if (num <= 0) + { + c->dead = 1; + dead = eina_list_append(dead, c); + } + else if (num > 0) + { + server_data(s, c, buf, num); + } + } + else if (FD_ISSET(c->fd, &wset)) + { + client_flush(c); + if (c->dead) dead = eina_list_append(dead, c); + } + } + if (FD_ISSET(s->ch[0].fd, &rset)) + { + server_accept(s); + } + EINA_LIST_FREE(dead, c) + { + LKL(c->lock); + if (c->func) c->func(c->data, c); + s->clients = eina_list_remove(s->clients, c); + close(c->fd); + if (c->buf) free(c->buf); + if (c->inbuf) free(c->inbuf); + LKD(c->lock); + free(c); + } +} + +#endif diff --git a/libraries/evas/src/lib/engines/Makefile.am b/libraries/evas/src/lib/engines/Makefile.am new file mode 100644 index 0000000..0e7706c --- /dev/null +++ b/libraries/evas/src/lib/engines/Makefile.am @@ -0,0 +1,16 @@ + +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = common + +if BUILD_ENGINE_SOFTWARE_16 + +SUBDIRS += common_16 + +endif + +if BUILD_ENGINE_SOFTWARE_8 + +SUBDIRS += common_8 + +endif diff --git a/libraries/evas/src/lib/engines/Makefile.in b/libraries/evas/src/lib/engines/Makefile.in new file mode 100644 index 0000000..12e28c1 --- /dev/null +++ b/libraries/evas/src/lib/engines/Makefile.in @@ -0,0 +1,736 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_1 = common_16 +@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_2 = common_8 +subdir = src/lib/engines +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = common common_16 common_8 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = common $(am__append_1) $(am__append_2) +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/engines/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/Makefile.am b/libraries/evas/src/lib/engines/common/Makefile.am new file mode 100644 index 0000000..9c9918d --- /dev/null +++ b/libraries/evas/src/lib/engines/common/Makefile.am @@ -0,0 +1,118 @@ + +SUBDIRS = evas_op_add evas_op_blend evas_op_copy evas_op_mask evas_op_mul evas_op_sub + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = -I. \ + -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib/cserve \ + -I$(top_srcdir)/src/lib/include \ + -DPACKAGE_BIN_DIR=\"$(bindir)\" \ + -DPACKAGE_LIB_DIR=\"$(libdir)\" \ + -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ + @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ + @PIXMAN_CFLAGS@ \ + @EET_CFLAGS@ @pthread_cflags@ \ + @WIN32_CFLAGS@ @EINA_CFLAGS@ \ + @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ + @PIXMAN_CFLAGS@ + +noinst_LTLIBRARIES = libevas_engine_common.la +libevas_engine_common_la_SOURCES = \ +evas_op_copy_main_.c \ +evas_op_blend_main_.c \ +evas_op_add_main_.c \ +evas_op_sub_main_.c \ +evas_op_mask_main_.c \ +evas_op_mul_main_.c \ +evas_blend_main.c \ +evas_blit_main.c \ +evas_convert_color.c \ +evas_convert_colorspace.c \ +evas_convert_gry_1.c \ +evas_convert_gry_4.c \ +evas_convert_gry_8.c \ +evas_convert_main.c \ +evas_convert_rgb_16.c \ +evas_convert_rgb_24.c \ +evas_convert_rgb_32.c \ +evas_convert_rgb_8.c \ +evas_convert_grypal_6.c \ +evas_convert_yuv.c \ +evas_cpu.c \ +evas_draw_main.c \ +evas_font_draw.c \ +evas_font_load.c \ +evas_font_main.c \ +evas_font_query.c \ +evas_image_load.c \ +evas_image_save.c \ +evas_image_main.c \ +evas_image_data.c \ +evas_image_scalecache.c \ +evas_line_main.c \ +evas_polygon_main.c \ +evas_rectangle_main.c \ +evas_scale_main.c \ +evas_scale_sample.c \ +evas_scale_smooth.c \ +evas_scale_span.c \ +evas_tiler.c \ +evas_regionbuf.c \ +evas_pipe.c \ +language/evas_bidi_utils.c \ +language/evas_language_utils.c \ +evas_text_utils.c \ +evas_font_ot.c \ +evas_map_image.c \ +evas_map_image.h + +EXTRA_DIST = \ +evas_blend.h \ +evas_blend_private.h \ +evas_convert_color.h \ +evas_convert_colorspace.h \ +evas_convert_gry_1.h \ +evas_convert_gry_4.h \ +evas_convert_gry_8.h \ +evas_convert_grypal_6.h \ +evas_convert_main.h \ +evas_convert_rgb_16.h \ +evas_convert_rgb_24.h \ +evas_convert_rgb_32.h \ +evas_convert_rgb_8.h \ +evas_convert_yuv.h \ +evas_draw.h \ +evas_font.h \ +evas_font_default_walk.x \ +evas_font_private.h \ +evas_image.h \ +evas_image_private.h \ +evas_line.h \ +evas_polygon.h \ +evas_rectangle.h \ +evas_scale_main.h \ +evas_scale_smooth.h \ +evas_scale_smooth_scaler.c \ +evas_scale_smooth_scaler_down.c \ +evas_scale_smooth_scaler_downx.c \ +evas_scale_smooth_scaler_downx_downy.c \ +evas_scale_smooth_scaler_downy.c \ +evas_scale_smooth_scaler_noscale.c \ +evas_scale_smooth_scaler_up.c \ +evas_scale_span.h \ +evas_pipe.h \ +language/evas_bidi_utils.h \ +language/evas_language_utils.h \ +language/evas_script_table.h \ +evas_text_utils.h \ +evas_font_ot.h \ +evas_map_image_internal.c \ +evas_map_image_core.c \ +evas_map_image_loop.c + +libevas_engine_common_la_DEPENDENCIES = \ +$(top_builddir)/config.h + +libevas_engine_common_la_LIBADD = \ +evas_op_blend/libevas_engine_common_op_blend_master_sse3.la diff --git a/libraries/evas/src/lib/engines/common/Makefile.in b/libraries/evas/src/lib/engines/common/Makefile.in new file mode 100644 index 0000000..b0162df --- /dev/null +++ b/libraries/evas/src/lib/engines/common/Makefile.in @@ -0,0 +1,1005 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/engines/common +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +am_libevas_engine_common_la_OBJECTS = evas_op_copy_main_.lo \ + evas_op_blend_main_.lo evas_op_add_main_.lo \ + evas_op_sub_main_.lo evas_op_mask_main_.lo \ + evas_op_mul_main_.lo evas_blend_main.lo evas_blit_main.lo \ + evas_convert_color.lo evas_convert_colorspace.lo \ + evas_convert_gry_1.lo evas_convert_gry_4.lo \ + evas_convert_gry_8.lo evas_convert_main.lo \ + evas_convert_rgb_16.lo evas_convert_rgb_24.lo \ + evas_convert_rgb_32.lo evas_convert_rgb_8.lo \ + evas_convert_grypal_6.lo evas_convert_yuv.lo evas_cpu.lo \ + evas_draw_main.lo evas_font_draw.lo evas_font_load.lo \ + evas_font_main.lo evas_font_query.lo evas_image_load.lo \ + evas_image_save.lo evas_image_main.lo evas_image_data.lo \ + evas_image_scalecache.lo evas_line_main.lo \ + evas_polygon_main.lo evas_rectangle_main.lo evas_scale_main.lo \ + evas_scale_sample.lo evas_scale_smooth.lo evas_scale_span.lo \ + evas_tiler.lo evas_regionbuf.lo evas_pipe.lo \ + evas_bidi_utils.lo evas_language_utils.lo evas_text_utils.lo \ + evas_font_ot.lo evas_map_image.lo +libevas_engine_common_la_OBJECTS = \ + $(am_libevas_engine_common_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_common_la_SOURCES) +DIST_SOURCES = $(libevas_engine_common_la_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +SUBDIRS = evas_op_add evas_op_blend evas_op_copy evas_op_mask evas_op_mul evas_op_sub +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = -I. \ + -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib/cserve \ + -I$(top_srcdir)/src/lib/include \ + -DPACKAGE_BIN_DIR=\"$(bindir)\" \ + -DPACKAGE_LIB_DIR=\"$(libdir)\" \ + -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ + @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ + @PIXMAN_CFLAGS@ \ + @EET_CFLAGS@ @pthread_cflags@ \ + @WIN32_CFLAGS@ @EINA_CFLAGS@ \ + @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ + @PIXMAN_CFLAGS@ + +noinst_LTLIBRARIES = libevas_engine_common.la +libevas_engine_common_la_SOURCES = \ +evas_op_copy_main_.c \ +evas_op_blend_main_.c \ +evas_op_add_main_.c \ +evas_op_sub_main_.c \ +evas_op_mask_main_.c \ +evas_op_mul_main_.c \ +evas_blend_main.c \ +evas_blit_main.c \ +evas_convert_color.c \ +evas_convert_colorspace.c \ +evas_convert_gry_1.c \ +evas_convert_gry_4.c \ +evas_convert_gry_8.c \ +evas_convert_main.c \ +evas_convert_rgb_16.c \ +evas_convert_rgb_24.c \ +evas_convert_rgb_32.c \ +evas_convert_rgb_8.c \ +evas_convert_grypal_6.c \ +evas_convert_yuv.c \ +evas_cpu.c \ +evas_draw_main.c \ +evas_font_draw.c \ +evas_font_load.c \ +evas_font_main.c \ +evas_font_query.c \ +evas_image_load.c \ +evas_image_save.c \ +evas_image_main.c \ +evas_image_data.c \ +evas_image_scalecache.c \ +evas_line_main.c \ +evas_polygon_main.c \ +evas_rectangle_main.c \ +evas_scale_main.c \ +evas_scale_sample.c \ +evas_scale_smooth.c \ +evas_scale_span.c \ +evas_tiler.c \ +evas_regionbuf.c \ +evas_pipe.c \ +language/evas_bidi_utils.c \ +language/evas_language_utils.c \ +evas_text_utils.c \ +evas_font_ot.c \ +evas_map_image.c \ +evas_map_image.h + +EXTRA_DIST = \ +evas_blend.h \ +evas_blend_private.h \ +evas_convert_color.h \ +evas_convert_colorspace.h \ +evas_convert_gry_1.h \ +evas_convert_gry_4.h \ +evas_convert_gry_8.h \ +evas_convert_grypal_6.h \ +evas_convert_main.h \ +evas_convert_rgb_16.h \ +evas_convert_rgb_24.h \ +evas_convert_rgb_32.h \ +evas_convert_rgb_8.h \ +evas_convert_yuv.h \ +evas_draw.h \ +evas_font.h \ +evas_font_default_walk.x \ +evas_font_private.h \ +evas_image.h \ +evas_image_private.h \ +evas_line.h \ +evas_polygon.h \ +evas_rectangle.h \ +evas_scale_main.h \ +evas_scale_smooth.h \ +evas_scale_smooth_scaler.c \ +evas_scale_smooth_scaler_down.c \ +evas_scale_smooth_scaler_downx.c \ +evas_scale_smooth_scaler_downx_downy.c \ +evas_scale_smooth_scaler_downy.c \ +evas_scale_smooth_scaler_noscale.c \ +evas_scale_smooth_scaler_up.c \ +evas_scale_span.h \ +evas_pipe.h \ +language/evas_bidi_utils.h \ +language/evas_language_utils.h \ +language/evas_script_table.h \ +evas_text_utils.h \ +evas_font_ot.h \ +evas_map_image_internal.c \ +evas_map_image_core.c \ +evas_map_image_loop.c + +libevas_engine_common_la_DEPENDENCIES = \ +$(top_builddir)/config.h + +libevas_engine_common_la_LIBADD = \ +evas_op_blend/libevas_engine_common_op_blend_master_sse3.la + +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/engines/common/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_common.la: $(libevas_engine_common_la_OBJECTS) $(libevas_engine_common_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libevas_engine_common_la_OBJECTS) $(libevas_engine_common_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_bidi_utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_blend_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_blit_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_color.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_colorspace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_grypal_6.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_16.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_24.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_yuv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cpu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_draw_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_draw.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_load.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_ot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_query.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_data.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_save.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_scalecache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_language_utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_line_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_map_image.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_add_main_.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_blend_main_.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_copy_main_.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_mask_main_.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_mul_main_.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_sub_main_.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_pipe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_polygon_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_rectangle_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_regionbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_sample.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_smooth.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_span.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_text_utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_tiler.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +evas_bidi_utils.lo: language/evas_bidi_utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT evas_bidi_utils.lo -MD -MP -MF $(DEPDIR)/evas_bidi_utils.Tpo -c -o evas_bidi_utils.lo `test -f 'language/evas_bidi_utils.c' || echo '$(srcdir)/'`language/evas_bidi_utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/evas_bidi_utils.Tpo $(DEPDIR)/evas_bidi_utils.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='language/evas_bidi_utils.c' object='evas_bidi_utils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o evas_bidi_utils.lo `test -f 'language/evas_bidi_utils.c' || echo '$(srcdir)/'`language/evas_bidi_utils.c + +evas_language_utils.lo: language/evas_language_utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT evas_language_utils.lo -MD -MP -MF $(DEPDIR)/evas_language_utils.Tpo -c -o evas_language_utils.lo `test -f 'language/evas_language_utils.c' || echo '$(srcdir)/'`language/evas_language_utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/evas_language_utils.Tpo $(DEPDIR)/evas_language_utils.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='language/evas_language_utils.c' object='evas_language_utils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o evas_language_utils.lo `test -f 'language/evas_language_utils.c' || echo '$(srcdir)/'`language/evas_language_utils.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(LTLIBRARIES) +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_blend.h b/libraries/evas/src/lib/engines/common/evas_blend.h new file mode 100644 index 0000000..1a98f3f --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_blend.h @@ -0,0 +1,8 @@ +#ifndef _EVAS_BLEND_H +#define _EVAS_BLEND_H + + +EAPI void evas_common_blend_init (void); + + +#endif /* _EVAS_BLEND_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_blend_main.c b/libraries/evas/src/lib/engines/common/evas_blend_main.c new file mode 100644 index 0000000..4aadd02 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_blend_main.c @@ -0,0 +1,325 @@ +#include "evas_common.h" +#include "evas_blend_private.h" + +#if defined BUILD_MMX || defined BUILD_SSE +#include "evas_mmx.h" +#endif + +const DATA32 ALPHA_255 = 255; +const DATA32 ALPHA_256 = 256; + +static void +_composite_span_nothing(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d __UNUSED__, int l __UNUSED__) +{ +} + +static void +_composite_pt_nothing(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d __UNUSED__) +{ +} + +static RGBA_Gfx_Compositor * +evas_gfx_compositor_get(unsigned char op) +{ + RGBA_Gfx_Compositor *comp; + + switch (op) + { + case _EVAS_RENDER_BLEND: + comp = evas_common_gfx_compositor_blend_get(); + break; + case _EVAS_RENDER_BLEND_REL: + comp = evas_common_gfx_compositor_blend_rel_get(); + break; + case _EVAS_RENDER_COPY: + comp = evas_common_gfx_compositor_copy_get(); + break; + case _EVAS_RENDER_COPY_REL: + comp = evas_common_gfx_compositor_copy_rel_get(); + break; +/* + case _EVAS_RENDER_ADD: + comp = evas_common_gfx_compositor_add_get(); + break; + case _EVAS_RENDER_ADD_REL: + comp = evas_common_gfx_compositor_add_rel_get(); + break; + case _EVAS_RENDER_SUB: + comp = evas_common_gfx_compositor_sub_get(); + break; + case _EVAS_RENDER_SUB_REL: + comp = evas_common_gfx_compositor_sub_rel_get(); + break; +*/ + case _EVAS_RENDER_MASK: + comp = evas_common_gfx_compositor_mask_get(); + break; + case _EVAS_RENDER_MUL: + comp = evas_common_gfx_compositor_mul_get(); + break; + default: + comp = evas_common_gfx_compositor_blend_get(); + break; + } + return comp; +} + +EAPI void +evas_common_blend_init(void) +{ + static int gfx_initialised = 0; + static int mmx = 0; + static int sse = 0; + static int sse2 = 0; + RGBA_Gfx_Compositor *comp; + + if (gfx_initialised) return; + gfx_initialised = 1; + + evas_common_cpu_can_do(&mmx, &sse, &sse2); + + comp = evas_common_gfx_compositor_copy_get(); + if (comp) comp->init(); + comp = evas_common_gfx_compositor_copy_rel_get(); + if (comp) comp->init(); + + comp = evas_common_gfx_compositor_blend_get(); + if (comp) comp->init(); + comp = evas_common_gfx_compositor_blend_rel_get(); + if (comp) comp->init(); + +/* + comp = evas_common_gfx_compositor_add_get(); + if (comp) comp->init(); + comp = evas_common_gfx_compositor_add_rel_get(); + if (comp) comp->init(); + comp = evas_common_gfx_compositor_sub_get(); + if (comp) comp->init(); + comp = evas_common_gfx_compositor_sub_rel_get(); + if (comp) comp->init(); +*/ + comp = evas_common_gfx_compositor_mask_get(); + if (comp) comp->init(); + + comp = evas_common_gfx_compositor_mul_get(); + if (comp) comp->init(); +} + +void +evas_common_blend_shutdown(void) +{ + RGBA_Gfx_Compositor *comp; + + comp = evas_common_gfx_compositor_copy_get(); + if (comp) comp->shutdown(); + comp = evas_common_gfx_compositor_copy_rel_get(); + if (comp) comp->shutdown(); + + comp = evas_common_gfx_compositor_blend_get(); + if (comp) comp->shutdown(); + comp = evas_common_gfx_compositor_blend_rel_get(); + if (comp) comp->shutdown(); + +/* + comp = evas_common_gfx_compositor_add_get(); + if (comp) comp->shutdown(); + comp = evas_common_gfx_compositor_add_rel_get(); + if (comp) comp->shutdown(); + comp = evas_common_gfx_compositor_sub_get(); + if (comp) comp->shutdown(); + comp = evas_common_gfx_compositor_sub_rel_get(); + if (comp) comp->shutdown(); +*/ + comp = evas_common_gfx_compositor_mask_get(); + if (comp) comp->shutdown(); + + comp = evas_common_gfx_compositor_mul_get(); + if (comp) comp->shutdown(); +} + + +RGBA_Gfx_Func +evas_common_gfx_func_composite_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels, int op) +{ + RGBA_Gfx_Compositor *comp; + RGBA_Gfx_Func func = NULL; + + if (src && (!src->cache_entry.flags.alpha)) + { + if (op == _EVAS_RENDER_BLEND) + op = _EVAS_RENDER_COPY; + if (op == _EVAS_RENDER_BLEND_REL) + op = _EVAS_RENDER_COPY_REL; + } + comp = evas_gfx_compositor_get(op); + if (comp) + func = comp->composite_pixel_span_get(src, dst, pixels); + if (func) + return func; + return _composite_span_nothing; +} + +RGBA_Gfx_Func +evas_common_gfx_func_composite_color_span_get(DATA32 col, RGBA_Image *dst, int pixels, int op) +{ + RGBA_Gfx_Compositor *comp; + RGBA_Gfx_Func func = NULL; + + if ((col & 0xff000000) == 0xff000000) + { + if (op == _EVAS_RENDER_BLEND) + op = _EVAS_RENDER_COPY; + if (op == EVAS_RENDER_BLEND_REL) + op = _EVAS_RENDER_COPY_REL; + } + + comp = evas_gfx_compositor_get(op); + if (comp) + func = comp->composite_color_span_get(col, dst, pixels); + if (func) + return func; + return _composite_span_nothing; +} + +RGBA_Gfx_Func +evas_common_gfx_func_composite_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels, int op) +{ + RGBA_Gfx_Compositor *comp; + RGBA_Gfx_Func func = NULL; + + if ((src && (!src->cache_entry.flags.alpha)) && ((col & 0xff000000) == 0xff000000)) + { + if (op == _EVAS_RENDER_BLEND) + op = _EVAS_RENDER_COPY; + if (op == _EVAS_RENDER_BLEND_REL) + op = _EVAS_RENDER_COPY_REL; + } + + comp = evas_gfx_compositor_get(op); + if (comp) + func = comp->composite_pixel_color_span_get(src, col, dst, pixels); + if (func) + return func; + return _composite_span_nothing; +} + +RGBA_Gfx_Func +evas_common_gfx_func_composite_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels, int op) +{ + RGBA_Gfx_Compositor *comp; + RGBA_Gfx_Func func = NULL; + + comp = evas_gfx_compositor_get(op); + if (comp) + func = comp->composite_mask_color_span_get(col, dst, pixels); + if (func) + return func; + return _composite_span_nothing; +} + +RGBA_Gfx_Func +evas_common_gfx_func_composite_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels, int op) +{ + RGBA_Gfx_Compositor *comp; + RGBA_Gfx_Func func = NULL; + + comp = evas_gfx_compositor_get(op); + if (comp) + func = comp->composite_pixel_mask_span_get(src, dst, pixels); + if (func) + return func; + return _composite_span_nothing; +} + +RGBA_Gfx_Pt_Func +evas_common_gfx_func_composite_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst, int op) +{ + RGBA_Gfx_Compositor *comp; + RGBA_Gfx_Pt_Func func = NULL; + + if (!src_flags.alpha) + { + if (op == _EVAS_RENDER_BLEND) + op = _EVAS_RENDER_COPY; + if (op == _EVAS_RENDER_BLEND_REL) + op = _EVAS_RENDER_COPY_REL; + } + comp = evas_gfx_compositor_get(op); + if (comp) + func = comp->composite_pixel_pt_get(src_flags, dst); + if (func) + return func; + return _composite_pt_nothing; +} + +RGBA_Gfx_Pt_Func +evas_common_gfx_func_composite_color_pt_get(DATA32 col, RGBA_Image *dst, int op) +{ + RGBA_Gfx_Compositor *comp; + RGBA_Gfx_Pt_Func func = NULL; + + if ((col & 0xff000000) == 0xff000000) + { + if (op == _EVAS_RENDER_BLEND) + op = _EVAS_RENDER_COPY; + if (op == EVAS_RENDER_BLEND_REL) + op = _EVAS_RENDER_COPY_REL; + } + + comp = evas_gfx_compositor_get(op); + if (comp) + func = comp->composite_color_pt_get(col, dst); + if (func) + return func; + return _composite_pt_nothing; +} + +RGBA_Gfx_Pt_Func +evas_common_gfx_func_composite_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst, int op) +{ + RGBA_Gfx_Compositor *comp; + RGBA_Gfx_Pt_Func func = NULL; + + if ((!src_flags.alpha) && ((col & 0xff000000) == 0xff000000)) + { + if (op == _EVAS_RENDER_BLEND) + op = _EVAS_RENDER_COPY; + if (op == _EVAS_RENDER_BLEND_REL) + op = _EVAS_RENDER_COPY_REL; + } + + comp = evas_gfx_compositor_get(op); + if (comp) + func = comp->composite_pixel_color_pt_get(src_flags, col, dst); + if (func) + return func; + return _composite_pt_nothing; +} + +RGBA_Gfx_Pt_Func +evas_common_gfx_func_composite_mask_color_pt_get(DATA32 col, RGBA_Image *dst, int op) +{ + RGBA_Gfx_Compositor *comp; + RGBA_Gfx_Pt_Func func = NULL; + + comp = evas_gfx_compositor_get(op); + if (comp) + func = comp->composite_mask_color_pt_get(col, dst); + if (func) + return func; + return _composite_pt_nothing; +} + +RGBA_Gfx_Pt_Func +evas_common_gfx_func_composite_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst, int op) +{ + RGBA_Gfx_Compositor *comp; + RGBA_Gfx_Pt_Func func = NULL; + + comp = evas_gfx_compositor_get(op); + if (comp) + func = comp->composite_pixel_mask_pt_get(src_flags, dst); + if (func) + return func; + return _composite_pt_nothing; +} diff --git a/libraries/evas/src/lib/engines/common/evas_blend_private.h b/libraries/evas/src/lib/engines/common/evas_blend_private.h new file mode 100644 index 0000000..1d14951 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_blend_private.h @@ -0,0 +1,31 @@ +#ifndef _EVAS_BLEND_PRIVATE_H +#define _EVAS_BLEND_PRIVATE_H + + +RGBA_Gfx_Compositor *evas_common_gfx_compositor_blend_get (void); +RGBA_Gfx_Compositor *evas_common_gfx_compositor_blend_rel_get (void); +RGBA_Gfx_Compositor *evas_common_gfx_compositor_copy_get (void); +RGBA_Gfx_Compositor *evas_common_gfx_compositor_copy_rel_get (void); +RGBA_Gfx_Compositor *evas_common_gfx_compositor_add_get (void); +RGBA_Gfx_Compositor *evas_common_gfx_compositor_add_rel_get (void); +/* +RGBA_Gfx_Compositor *evas_common_gfx_compositor_sub_get(void); +RGBA_Gfx_Compositor *evas_common_gfx_compositor_sub_rel_get(void); +*/ +RGBA_Gfx_Compositor *evas_common_gfx_compositor_mask_get (void); +RGBA_Gfx_Compositor *evas_common_gfx_compositor_mul_get (void); + +RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_span_get (RGBA_Image *src, RGBA_Image *dst, int pixels, int op); +RGBA_Gfx_Func evas_common_gfx_func_composite_color_span_get (DATA32 col, RGBA_Image *dst, int pixels, int op); +RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_color_span_get (RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels, int op); +RGBA_Gfx_Func evas_common_gfx_func_composite_mask_color_span_get (DATA32 col, RGBA_Image *dst, int pixels, int op); +RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_mask_span_get (RGBA_Image *src, RGBA_Image *dst, int pixels, int op); + +RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op); +RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_color_pt_get (DATA32 col, RGBA_Image *dst, int op); +RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_color_pt_get (Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst, int op); +RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_mask_color_pt_get (DATA32 col, RGBA_Image *dst, int op); +RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_mask_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op); + + +#endif /* _EVAS_BLEND_PRIVATE_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_blit_main.c b/libraries/evas/src/lib/engines/common/evas_blit_main.c new file mode 100644 index 0000000..4c077b3 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_blit_main.c @@ -0,0 +1,700 @@ +#include "evas_common.h" + +#if defined BUILD_MMX || defined BUILD_SSE +#include "evas_mmx.h" +#endif + +#define ALIGN_FIX + +static void evas_common_copy_pixels_c (DATA32 *src, DATA32 *dst, int len); +static void evas_common_copy_pixels_mmx (DATA32 *src, DATA32 *dst, int len); +static void evas_common_copy_pixels_mmx2 (DATA32 *src, DATA32 *dst, int len); +static void evas_common_copy_pixels_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len); + +#ifdef BUILD_NEON +static void evas_common_copy_pixels_neon (DATA32 *src, DATA32 *dst, int len); +static void evas_common_copy_pixels_rev_neon (DATA32 *src, DATA32 *dst, int len); +#endif + +static void evas_common_copy_pixels_rev_c (DATA32 *src, DATA32 *dst, int len); +static void evas_common_copy_pixels_rev_mmx (DATA32 *src, DATA32 *dst, int len); +static void evas_common_copy_pixels_rev_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len); + +static void evas_common_copy_rev_pixels_c (DATA32 *src, DATA32 *dst, int len); + + +EAPI void +evas_common_blit_init(void) +{ +} + +EAPI void +evas_common_blit_rectangle(const RGBA_Image *src, RGBA_Image *dst, int src_x, int src_y, int w, int h, int dst_x, int dst_y) +{ + int y; + Gfx_Func_Copy func; + DATA32 *src_ptr, *dst_ptr; + + /* clip clip clip */ + if (w <= 0) return; + if (src_x + w > (int)src->cache_entry.w) w = src->cache_entry.w - src_x; + if (w <= 0) return; + if (src_x < 0) + { + dst_x -= src_x; + w += src_x; + src_x = 0; + } + if (w <= 0) return; + + if (h <= 0) return; + if (src_y + h > (int)src->cache_entry.h) h = src->cache_entry.h - src_y; + if (h <= 0) return; + if (src_y < 0) + { + dst_y -= src_y; + h += src_y; + src_y = 0; + } + if (h <= 0) return; + + if (w <= 0) return; + if (dst_x + w > (int)dst->cache_entry.w) w = dst->cache_entry.w - dst_x; + if (w <= 0) return; + if (dst_x < 0) + { + src_x -= dst_x; + w += dst_x; + dst_x = 0; + } + if (w <= 0) return; + + if (h <= 0) return; + if (dst_y + h > (int)dst->cache_entry.h) h = dst->cache_entry.h - dst_y; + if (h <= 0) return; + if (dst_y < 0) + { + src_y -= dst_y; + h += dst_y; + dst_y = 0; + } + if (h <= 0) return; + + if (dst == src) + { + /* src after dst - go forward */ + if (((src_y * src->cache_entry.w) + src_x) > ((dst_y * dst->cache_entry.w) + dst_x)) + { + func = evas_common_draw_func_copy_get(w, 0); + for (y = 0; y < h; y++) + { + src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x; + dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x; + func(src_ptr, dst_ptr, w); + } + } + /* reverse */ + else + { + func = evas_common_draw_func_copy_get(w, 1); + for (y = h - 1; y >= 0; y--) + { + src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x; + dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x; + func(src_ptr, dst_ptr, w); + } + } + } + else + { + func = evas_common_draw_func_copy_get(w, 0); + for (y = 0; y < h; y++) + { + src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x; + dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x; + func(src_ptr, dst_ptr, w); + } + } +} + +/****************************************************************************/ + +static void +evas_common_copy_rev_pixels_c(DATA32 *src, DATA32 *dst, int len) +{ + DATA32 *dst_end = dst + len; + + src += len - 1; + while (dst < dst_end) *dst++ = *src--; +} + + +#ifdef BUILD_NEON +static void +evas_common_copy_pixels_rev_neon(DATA32 *src, DATA32 *dst, int len) +{ + uint32_t *tmp = (void *)37; +#define AP "evas_common_copy_rev_pixels_neon_" + asm volatile ( + ".fpu neon \n\t" + // Can we do 32 byte? + "andS %[tmp], %[d], $0x1f \n\t" + "beq "AP"quadstart \n\t" + + // Can we do at least 16 byte? + "andS %[tmp], %[d], $0x4 \n\t" + "beq "AP"dualstart \n\t" + + // Only once + AP"singleloop: \n\t" + "sub %[s], #4 \n\t" + "vld1.32 d0[0], [%[s]] \n\t" + "vst1.32 d0[0], [%[d]]! \n\t" + + // Up to 3 times + AP"dualstart: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #31 \n\t" + "blt "AP"loopout \n\t" + + "andS %[tmp], %[d], $0x1f \n\t" + "beq "AP"quadstart \n\t" + + AP"dualloop: \n\t" + "sub %[s], #8 \n\t" + "vldm %[s], {d0} \n\t" + "vrev64.32 d1, d0 \n\t" + "vstm %[d]!, {d1} \n\t" + + "andS %[tmp], %[d], $0x1f \n\t" + "bne "AP"dualloop \n\t" + + + AP"quadstart: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #32 \n\t" + "blt "AP"loopout \n\t" + + "sub %[tmp],%[e],#32 \n\t" + + AP "quadloop: \n\t" + "sub %[s], #32 \n\t" + "vldm %[s], {d0,d1,d2,d3} \n\t" + + "vrev64.32 d7,d0 \n\t" + "vrev64.32 d6,d1 \n\t" + "vrev64.32 d5,d2 \n\t" + "vrev64.32 d4,d3 \n\t" + + "vstm %[d]!, {d4,d5,d6,d7} \n\t" + + "cmp %[tmp], %[d] \n\t" + "bhi "AP"quadloop \n\t" + + + AP "loopout: \n\t" + "cmp %[d], %[e] \n\t" + "beq "AP"done \n\t" + "sub %[tmp],%[e], %[d] \n\t" + "cmp %[tmp],$0x04 \n\t" + "beq "AP"singleloop2 \n\t" + + AP "dualloop2: \n\t" + "sub %[tmp],%[e],$0x7 \n\t" + AP "dualloop2int: \n\t" + "sub %[s], #8 \n\t" + "vldm %[s], {d0} \n\t" + "vrev64.32 d1,d0 \n\t" + "vstm %[d]!, {d1} \n\t" + + "cmp %[tmp], %[d] \n\t" + "bhi "AP"dualloop2int \n\t" + + // Single ?? + "cmp %[e], %[d] \n\t" + "beq "AP"done \n\t" + + AP "singleloop2: \n\t" + "sub %[s], #4 \n\t" + "vld1.32 d0[0], [%[s]] \n\t" + "vst1.32 d0[0], [%[d]] \n\t" + + AP "done:\n\t" + + : // No output regs + // Input + : [s] "r" (src + len), [e] "r" (dst + len), [d] "r" (dst),[tmp] "r" (tmp) + // Clobbered + : "q0","q1","q2","q3","0","1","memory" + ); +#undef AP + +} +#endif + + +#ifdef BUILD_C +static void +evas_common_copy_pixels_c(DATA32 *src, DATA32 *dst, int len) +{ + DATA32 *dst_end = dst + len; + + while (dst < dst_end) *dst++ = *src++; +} +#endif + +#ifdef BUILD_MMX +static void +evas_common_copy_pixels_mmx(DATA32 *src, DATA32 *dst, int len) +{ // XXX cppcheck: [./src/lib/engines/common/evas_blit_main.c:248]: (error) Invalid number of character ({). Can't process file. + // so... wtf? what's wrong with this { ? or anytrhing surrounding it? + DATA32 *dst_end, *dst_end_pre; +#ifdef ALIGN_FIX + intptr_t src_align; + intptr_t dst_align; + + src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */ + dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */ + + if ((src_align != dst_align) || + ((src_align & 0x3) != 0)) + { +#ifdef BUILD_C + evas_common_copy_pixels_c(src, dst, len); + return; + } +#endif + + while ((src_align > 0) && (len > 0)) + { + *dst++ = *src++; + len--; + src_align -= sizeof(DATA32); + } +#endif /* ALIGN_FIX */ + + dst_end = dst + len; + dst_end_pre = dst + ((len / 16) * 16); + + while (dst < dst_end_pre) + { + MOVE_16DWORDS_MMX(src, dst); + src += 16; + dst += 16; + } + while (dst < dst_end) *dst++ = *src++; +} +#endif + +#ifdef BUILD_MMX +static void +evas_common_copy_pixels_mmx2(DATA32 *src, DATA32 *dst, int len) +{ + DATA32 *dst_end, *dst_end_pre; +#ifdef ALIGN_FIX + intptr_t src_align; + intptr_t dst_align; + + src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */ + dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */ + + if ((src_align != dst_align) || + ((src_align & 0x3) != 0)) + { +#ifdef BUILD_C + evas_common_copy_pixels_c(src, dst, len); +#endif + return; + } + + while ((src_align > 0) && (len > 0)) + { + *dst++ = *src++; + len--; + src_align -= sizeof(DATA32); + } +#endif + + dst_end = dst + len; + dst_end_pre = dst + ((len / 16) * 16); + + while (dst < dst_end_pre) + { + MOVE_16DWORDS_MMX(src, dst); + src += 16; + dst += 16; + } + while (dst < dst_end) *dst++ = *src++; +} +#endif + +#ifdef BUILD_NEON +static void +evas_common_copy_pixels_neon(DATA32 *src, DATA32 *dst, int len){ + uint32_t *e,*tmp = (void *)37; + e = dst + len; +#define AP "evas_common_copy_pixels_neon_" + asm volatile ( + ".fpu neon \n\t" + // Can we do 32 byte? + "andS %[tmp], %[d], $0x1f \n\t" + "beq "AP"quadstart \n\t" + + // Can we do at least 16 byte? + "andS %[tmp], %[d], $0x4 \n\t" + "beq "AP"dualstart \n\t" + + // Only once + AP"singleloop: \n\t" + "vld1.32 d0[0], [%[s]]! \n\t" + "vst1.32 d0[0], [%[d]]! \n\t" + + // Up to 3 times + AP"dualstart: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #31 \n\t" + "blt "AP"loopout \n\t" + + "andS %[tmp], %[d], $0x1f \n\t" + "beq "AP"quadstart \n\t" + + AP"dualloop: \n\t" + "vldm %[s]!, {d0} \n\t" + "vstm %[d]!, {d0} \n\t" + + "andS %[tmp], %[d], $0x1f \n\t" + "bne "AP"dualloop \n\t" + + + AP"quadstart: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #64 \n\t" + "blt "AP"loopout \n\t" + + "sub %[tmp],%[e],#63 \n\t" + + AP "quadloop: \n\t" + "vldm %[s]!, {d0,d1,d2,d3} \n\t" + "vldm %[s]!, {d4,d5,d6,d7} \n\t" + "vstm %[d]!, {d0,d1,d2,d3} \n\t" + "vstm %[d]!, {d4,d5,d6,d7} \n\t" + + "cmp %[tmp], %[d] \n\t" + "bhi "AP"quadloop \n\t" + + + AP "loopout: \n\t" + "cmp %[d], %[e] \n\t" + "beq "AP"done \n\t" + "sub %[tmp],%[e], %[d] \n\t" + "cmp %[tmp],$0x04 \n\t" + "beq "AP"singleloop2 \n\t" + + AP "dualloop2: \n\t" + "sub %[tmp],%[e],$0x7 \n\t" + AP "dualloop2int: \n\t" + "vldm %[s]!, {d0} \n\t" + "vstm %[d]!, {d0} \n\t" + + "cmp %[tmp], %[d] \n\t" + "bhi "AP"dualloop2int \n\t" + + // Single ?? + "cmp %[e], %[d] \n\t" + "beq "AP"done \n\t" + + AP "singleloop2: \n\t" + "vld1.32 d0[0], [%[s]] \n\t" + "vst1.32 d0[0], [%[d]] \n\t" + + AP "done:\n\t" + + : // No output regs + // Input + : [s] "r" (src), [e] "r" (e), [d] "r" (dst),[tmp] "r" (tmp) + // Clobbered + : "q0","q1","q2","q3","memory" + ); +#undef AP + +} +#endif /* BUILD_NEON */ + +#ifdef BUILD_SSE +static void +evas_common_copy_pixels_sse(DATA32 *src, DATA32 *dst, int len) +{ + DATA32 *src_ptr, *dst_ptr, *dst_end_ptr; + + dst_end_ptr = dst + len; + dst_end_ptr -= 15; + src_ptr = src; + dst_ptr = dst; + while (dst_ptr < dst_end_ptr) + { + MOVE_16DWORDS_MMX2(src_ptr, dst_ptr); + src_ptr+=16; + dst_ptr+=16; + } + dst_end_ptr = dst + len; + while (dst_ptr < dst_end_ptr) + { + *dst_ptr = *src_ptr; + src_ptr++; + dst_ptr++; + } +#if 0 +#ifdef ALIGN_FIX + int src_align; + int dst_align; + + src_align = (int)src & 0x3f; /* 64 byte alignment */ + dst_align = (int)dst & 0x3f; /* 64 byte alignment */ + + if ((src_align != dst_align) || + ((src_align & 0x3) != 0)) + { +#ifdef BUILD_C + evas_common_copy_pixels_c(src, dst, len); +#endif + return; + } + + while ((src_align > 0) && (len > 0)) + { + *dst = *src; + dst++; + src++; + len--; + src_align -= sizeof(DATA32); + } +#endif /* ALIGN_FIX */ + + src_ptr = src; + dst_ptr = dst; + dst_end_ptr = dst + len; + dst_end_ptr_pre = dst + ((len / 16) * 16); + + while (dst_ptr < dst_end_ptr_pre) + { + prefetch(&src_ptr[16]); + MOVE_16DWORDS_MMX(src_ptr, dst_ptr); + src_ptr+=16; + dst_ptr+=16; + } + while (dst_ptr < dst_end_ptr) + { + *dst_ptr = *src_ptr; + src_ptr++; + dst_ptr++; + } +#endif +} +#endif + +/****************************************************************************/ + +#ifdef BUILD_C +static void +evas_common_copy_pixels_rev_c(DATA32 *src, DATA32 *dst, int len) +{ + DATA32 *dst_end; + + src = src + len - 1; + dst_end = dst - 1; + dst = dst + len - 1; + + while (dst > dst_end) *dst-- = *src--; +} +#endif + +#ifdef BUILD_MMX +static void +evas_common_copy_pixels_rev_mmx(DATA32 *src, DATA32 *dst, int len) +{ + DATA32 *dst_end, *dst_end_pre; + + if (len >= 16) + { + src = src + len - 16; + dst_end = dst; + dst_end_pre = dst + len - ((len / 16) * 16); + dst = dst + len - 16; + + while (dst >= dst_end_pre) + { + MOVE_16DWORDS_MMX(src, dst); + src -= 16; + dst -= 16; + } + src += 15; + dst += 15; + while (dst >= dst_end) + *dst-- = *src--; + } + else + { + src = src + len - 1; + dst_end = dst - 1; + dst = dst + len - 1; + while (dst > dst_end) + *dst-- = *src--; + } +} +#endif + +#ifdef BUILD_SSE +static void +evas_common_copy_pixels_rev_sse(DATA32 *src, DATA32 *dst, int len) +{ + DATA32 *src_ptr, *dst_ptr, *dst_end_ptr, *dst_end_ptr_pre; + + src_ptr = src + len - 16; + dst_ptr = dst + len - 16; + dst_end_ptr = dst; + dst_end_ptr_pre = dst + len - ((len / 16) * 16); + + if (len >= 16) + { + while (dst_ptr >= dst_end_ptr_pre) + { + prefetch(&src_ptr[-16]); + MOVE_10DWORDS_MMX(src_ptr, dst_ptr); + src_ptr -= 16; + dst_ptr -= 16; + } + src_ptr += 15; + dst_ptr += 15; + while (dst_ptr >= dst_end_ptr) + { + *dst_ptr = *src_ptr; + src_ptr--; + dst_ptr--; + } + } + else + { + src_ptr = src + len - 1; + dst_ptr = dst + len - 1; + while (dst_ptr >= dst_end_ptr) + { + *dst_ptr = *src_ptr; + src_ptr--; + dst_ptr--; + } + } +} +#endif + + +Gfx_Func_Copy +evas_common_draw_func_copy_get(int pixels, int reverse) +{ + if (reverse == -1) + return evas_common_copy_rev_pixels_c; + if (reverse) + { +#ifdef BUILD_SSE + if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) + return evas_common_copy_pixels_rev_sse; +#endif +#ifdef BUILD_MMX +# ifdef BUILD_SSE + else +# endif + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + return evas_common_copy_pixels_rev_mmx; +#endif +#ifdef BUILD_NEON +# if defined(BUILD_SSE) || defined(BUILD_MMX) + else +# endif + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) + return evas_common_copy_pixels_rev_neon; +#endif + +#ifdef BUILD_C +# if defined(BUILD_MMX) || defined(BUILD_NEON) + else +# endif + return evas_common_copy_pixels_rev_c; +#endif + } + else + { +#if 1 + +# ifdef BUILD_MMX +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) +# endif + return evas_common_copy_pixels_mmx2; +# ifdef BUILD_SSE + else +# endif +#endif +#ifdef BUILD_SSE +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 64 * 64)) +# endif + return evas_common_copy_pixels_sse; +# ifdef BUILD_MMX + else +# endif +#endif +# ifdef BUILD_NEON +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) +# endif + return evas_common_copy_pixels_neon; +# ifdef BUILD_SSE + else +# endif +#endif +#ifdef BUILD_MMX +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) +# endif + return evas_common_copy_pixels_mmx; +# ifdef BUILD_C + else +# endif +#endif +#ifdef BUILD_C + return evas_common_copy_pixels_c; +#endif + +#else + +# ifdef BUILD_SSE + if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) + return evas_common_copy_pixels_sse; +# ifdef BUILD_MMX + else +# endif +#endif +#ifdef BUILD_MMX +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) +# endif + return evas_common_copy_pixels_mmx2; +# ifdef BUILD_C + else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) +# endif + return evas_common_copy_pixels_mmx; +# ifdef BUILD_C + else +# endif +#endif +#ifdef BUILD_C + return evas_common_copy_pixels_c; +#endif + +#endif + } +#ifdef BUILD_C + return evas_common_copy_pixels_c; +#else + return NULL; +#endif +} diff --git a/libraries/evas/src/lib/engines/common/evas_convert_color.c b/libraries/evas/src/lib/engines/common/evas_convert_color.c new file mode 100644 index 0000000..70a9e90 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_color.c @@ -0,0 +1,246 @@ +#include "evas_common.h" +#include "evas_convert_color.h" + + +EAPI DATA32 +evas_common_convert_argb_premul(DATA32 *data, unsigned int len) +{ + DATA32 *de = data + len; + DATA32 nas = 0; + + while (data < de) + { + DATA32 a = 1 + (*data >> 24); + + *data = (*data & 0xff000000) + + (((((*data) >> 8) & 0xff) * a) & 0xff00) + + (((((*data) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff); + data++; + + if ((a == 1) || (a == 256)) + nas++; + } + + return nas; +} + +EAPI void +evas_common_convert_argb_unpremul(DATA32 *data, unsigned int len) +{ + DATA32 *de = data + len; + + while (data < de) + { + DATA32 a = (*data >> 24); + + if ((a > 0) && (a < 255)) + *data = ARGB_JOIN(a, + (R_VAL(data) * 255) / a, + (G_VAL(data) * 255) / a, + (B_VAL(data) * 255) / a); + data++; + } + +} + +EAPI void +evas_common_convert_color_argb_premul(int a, int *r, int *g, int *b) +{ + a++; + if (r) { *r = (a * *r) >> 8; } + if (g) { *g = (a * *g) >> 8; } + if (b) { *b = (a * *b) >> 8; } +} + +EAPI void +evas_common_convert_color_argb_unpremul(int a, int *r, int *g, int *b) +{ + if (!a) return; + if (r) { *r = (255 * *r) / a; } + if (g) { *g = (255 * *g) / a; } + if (b) { *b = (255 * *b) / a; } +} + +EAPI void +evas_common_convert_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b) +{ + int i; + float f; + + v *= 255; + if (s == 0) + { + if (r) *r = v; + if (g) *g = v; + if (b) *b = v; + return; + } + + h /= 60; + i = h; + f = h - i; + + s *= v; + f *= s; + s = v - s; + + switch (i) + { + case 1: + if (r) *r = v - f; if (g) *g = v; if (b) *b = s; + return; + case 2: + if (r) *r = s; if (g) *g = v; if (b) *b = s + f; + return; + case 3: + if (r) *r = s; if (g) *g = v - f; if (b) *b = v; + return; + case 4: + if (r) *r = s + f; if (g) *g = s; if (b) *b = v; + return; + case 5: + if (r) *r = v; if (g) *g = s; if (b) *b = v - f; + return; + default: + if (r) *r = v; if (g) *g = s + f; if (b) *b = s; + break; + } +} + +EAPI void +evas_common_convert_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v) +{ + int max, min, d = r - g; + + //set min to MIN(g,r) + d = (d & (~(d >> 8))); + min = r - d; + //set max to MAX(g,r) + max = g + d; + + //set min to MIN(b,min) + d = min - b; + min -= (d & (~(d >> 8))); + + //set max to MAX(max,b) + d = b - max; + max += (d & (~(d >> 8))); + + d = max - min; + + if (v) *v = (max / 255.0); + if (!max || !d) + { + if (s) *s = 0; + if (h) *h = 0; + return; + } + + if (s) *s = (d / (float)max); + if (r == max) + { + if (h) + { + *h = 60 * ((g - b) / (float)d); + if (*h < 0) *h += 360; + } + return; + } + if (g == max) + { + if (h) + { + *h = 120 + (60 * ((b - r) / (float)d)); + if (*h < 0) *h += 360; + } + return; + } + if (h) + { + *h = 240 + (60 * ((r - g) / (float)d)); + if (*h < 0) *h += 360; + } +} + +EAPI void +evas_common_convert_color_hsv_to_rgb_int(int h, int s, int v, int *r, int *g, int *b) +{ + int i, f; + + if (!s) + { + *r = *g = *b = v; + return; + } + + i = h / 255; + f = h - (i * 255); + s = (v * s) / 255; + f = (s * f) / 255; + s = v - s; + + switch (i) + { + case 1: + *r = v - f; *g = v; *b = s; + return; + case 2: + *r = s; *g = v; *b = s + f; + return; + case 3: + *r = s; *g = v - f; *b = v; + return; + case 4: + *r = s + f; *g = s; *b = v; + return; + case 5: + *r = v; *g = s; *b = v - f; + return; + default: + *r = v; *g = s + f; *b = s; + break; + } +} + +EAPI void +evas_common_convert_color_rgb_to_hsv_int(int r, int g, int b, int *h, int *s, int *v) +{ + int min, max, d = r - g; + + d = (d & (~(d >> 8))); + min = r - d; + max = g + d; + + d = min - b; + min -= (d & (~(d >> 8))); + + d = b - max; + max += (d & (~(d >> 8))); + + d = max - min; + + *v = max; + if (!max) + { + *s = *h = 0; + return; + } + + *s = ((d * 255) / max); + + if (r == max) + { + *h = (((g - b) * 255) / d); + if (*h < 0) *h += 1530; + return; + } + if (g == max) + { + *h = 510 + (((b - r) * 255) / d); + if (*h < 0) *h += 1530; + return; + } + *h = 1020 + (((r - g) * 255) / d); + if (*h < 0) *h += 1530; + +} diff --git a/libraries/evas/src/lib/engines/common/evas_convert_color.h b/libraries/evas/src/lib/engines/common/evas_convert_color.h new file mode 100644 index 0000000..0224879 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_color.h @@ -0,0 +1,16 @@ +#ifndef _EVAS_CONVERT_COLOR_H +#define _EVAS_CONVERT_COLOR_H + + +EAPI DATA32 evas_common_convert_argb_premul (DATA32 *src, unsigned int len); +EAPI void evas_common_convert_argb_unpremul (DATA32 *src, unsigned int len); +EAPI void evas_common_convert_color_argb_premul (int a, int *r, int *g, int *b); +EAPI void evas_common_convert_color_argb_unpremul (int a, int *r, int *g, int *b); + +EAPI void evas_common_convert_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b); +EAPI void evas_common_convert_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v); +EAPI void evas_common_convert_color_hsv_to_rgb_int (int h, int s, int v, int *r, int *g, int *b); +EAPI void evas_common_convert_color_rgb_to_hsv_int (int r, int g, int b, int *h, int *s, int *v); + + +#endif /* _EVAS_CONVERT_COLOR_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_colorspace.c b/libraries/evas/src/lib/engines/common/evas_convert_colorspace.c new file mode 100644 index 0000000..013c2e7 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_colorspace.c @@ -0,0 +1,186 @@ +#include "evas_common.h" +#include "evas_convert_colorspace.h" + +#define CONVERT_RGB_565_TO_RGB_888(s) \ + (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \ + ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \ + ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000))) + +#define CONVERT_A5P_TO_A8(s) \ + ((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) + +#define CONVERT_ARGB_8888_TO_A_8(s) ((s) >> 24) + + +static inline void * +evas_common_convert_argb8888_to_rgb565_a5p(void *data __UNUSED__, int w __UNUSED__, int h __UNUSED__, int stride __UNUSED__, Eina_Bool has_alpha __UNUSED__) +{ + return NULL; +} + +static inline void * +evas_common_convert_rgb565_a5p_to_argb8888(void *data, int w, int h, int stride, Eina_Bool has_alpha) +{ + DATA16 *src, *end; + DATA32 *ret, *dst; + + src = data; + end = src + (stride * h); + ret = malloc(w * h * sizeof(DATA32)); + + dst = ret; + if (has_alpha) + { + DATA8 *alpha; + + alpha = (DATA8 *)end; + for (; src < end; src++, alpha++, dst++) + *dst = (CONVERT_A5P_TO_A8(*alpha) << 24) | + CONVERT_RGB_565_TO_RGB_888(*src); + } + else + { + for (; src < end; src++, dst++) + *dst = CONVERT_RGB_565_TO_RGB_888(*src); + } + return ret; +} + +static inline void * +evas_common_convert_argb8888_to_a8(void *data, int w, int h, int stride, Eina_Bool has_alpha) +{ + uint32_t *src, *end; + uint8_t *ret, *dst; + + src = data; + end = src + (stride * h); + ret = malloc(w * h); + if (!ret) return NULL; + + if (!has_alpha) + { + return memset(ret, 0xff, w * h); + } + + dst = ret; + for ( ; src < end ; src++, dst++) + *dst = CONVERT_ARGB_8888_TO_A_8(*src); + return ret; +} + + + +EAPI void * +evas_common_convert_argb8888_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace) +{ + switch (cspace) + { + case EVAS_COLORSPACE_RGB565_A5P: + return evas_common_convert_argb8888_to_rgb565_a5p(data, w, h, stride, has_alpha); + default: + break; + } + return NULL; +} + +EAPI void * +evas_common_convert_rgb565_a5p_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace) +{ + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + return evas_common_convert_rgb565_a5p_to_argb8888(data, w, h, stride, has_alpha); + default: + break; + } + return NULL; +} + +EAPI void * +evas_common_convert_yuv_422_601_to(void *data, int w, int h, Evas_Colorspace cspace) +{ + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + { + void *dst; + + fprintf(stderr, "to argb888\n"); + + dst = malloc(sizeof (unsigned int) * w * h); + if (!dst) return NULL; + + evas_common_convert_yuv_422_601_rgba(data, dst, w, h); + return dst; + } + default: + break; + } + return NULL; +} + +EAPI void * +evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace) +{ + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + { + void *dst; + + dst = malloc(sizeof (unsigned int) * w * h); + if (!dst) return NULL; + + evas_common_convert_yuv_420p_601_rgba(data, dst, w, h); + break; + } + default: + break; + } + return NULL; +} + +EAPI void * +evas_common_convert_yuv_420_601_to(void *data, int w, int h, Evas_Colorspace cspace) +{ + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + { + void *dst; + + dst = malloc(sizeof (unsigned int) * w * h); + if (!dst) return NULL; + + evas_common_convert_yuv_420_601_rgba(data, dst, w, h); + break; + } + default: + break; + } + return NULL; +} + +EAPI void * +evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace) +{ + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + { + void *dst; + + dst = malloc(sizeof (unsigned int) * w * h); + if (!dst) return NULL; + + evas_common_convert_yuv_420_601_rgba(data, dst, w, h); + break; + } + default: + break; + } + return NULL; +} + + +/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_colorspace.h b/libraries/evas/src/lib/engines/common/evas_convert_colorspace.h new file mode 100644 index 0000000..f3bec78 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_colorspace.h @@ -0,0 +1,12 @@ +#ifndef _EVAS_CONVERT_COLORSPACE_H +#define _EVAS_CONVERT_COLORSPACE_H + + +EAPI void *evas_common_convert_argb8888_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace); +EAPI void *evas_common_convert_rgb565_a5p_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace); +EAPI void *evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace); +EAPI void *evas_common_convert_yuv_422_601_to (void *data, int w, int h, Evas_Colorspace cspace); +EAPI void *evas_common_convert_yuv_420_601_to (void *data, int w, int h, Evas_Colorspace cspace); +EAPI void *evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace); + +#endif /* _EVAS_CONVERT_COLORSPACE_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_1.c b/libraries/evas/src/lib/engines/common/evas_convert_gry_1.c new file mode 100644 index 0000000..45e16ee --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_1.c @@ -0,0 +1,6 @@ +#include "evas_common.h" +#include "evas_convert_gry_1.h" + +#ifdef BUILD_CONVERT_1_GRY_1 +void evas_common_convert_rgba_to_1bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_1.h b/libraries/evas/src/lib/engines/common/evas_convert_gry_1.h new file mode 100644 index 0000000..38d6776 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_1.h @@ -0,0 +1,9 @@ +#ifndef _EVAS_CONVERT_GRY_1_H +#define _EVAS_CONVERT_GRY_1_H + + +void evas_common_convert_rgba_to_1bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + + + +#endif /* _EVAS_CONVERT_GRY_1_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_4.c b/libraries/evas/src/lib/engines/common/evas_convert_gry_4.c new file mode 100644 index 0000000..2fa7ee3 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_4.c @@ -0,0 +1,10 @@ +#include "evas_common.h" +#include "evas_convert_gry_4.h" + +#ifdef BUILD_CONVERT_4_GRY_4 +void evas_common_convert_rgba_to_4bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){} +#endif + +#ifdef BUILD_CONVERT_4_GRY_1 +void evas_common_convert_rgba_to_4bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_4.h b/libraries/evas/src/lib/engines/common/evas_convert_gry_4.h new file mode 100644 index 0000000..1614359 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_4.h @@ -0,0 +1,9 @@ +#ifndef _EVAS_CONVERT_GRY_4_H +#define _EVAS_CONVERT_GRY_4_H + + +void evas_common_convert_rgba_to_4bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_4bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + + +#endif /* _EVAS_CONVERT_GRY_4_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_8.c b/libraries/evas/src/lib/engines/common/evas_convert_gry_8.c new file mode 100644 index 0000000..9bc5ca7 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_8.c @@ -0,0 +1,78 @@ +#include "evas_common.h" +#include "evas_convert_gry_8.h" + +#ifdef USE_DITHER_44 +extern const DATA8 _evas_dither_44[4][4]; +#endif +#ifdef USE_DITHER_128128 +extern const DATA8 _evas_dither_128128[128][128]; +#endif + +#ifdef BUILD_CONVERT_8_GRY_1 +void evas_common_convert_rgba_to_8bpp_gry_256_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + DATA8 r, g, b; + DATA32 gry8; + + dst_ptr = (DATA8 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + r = (R_VAL(src_ptr)); + g = (G_VAL(src_ptr)); + b = (B_VAL(src_ptr)); + + // Y = 0.299 * R + 0.587 * G + 0.114 * B; + gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16; + + *dst_ptr = gry8; + + CONVERT_LOOP_END_ROT_0(); +} +#endif + +#ifdef BUILD_CONVERT_8_GRY_4 +void evas_common_convert_rgba_to_8bpp_gry_64_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){} +#endif + +#ifdef BUILD_CONVERT_8_GRY_16 +void evas_common_convert_rgba_to_8bpp_gry_16_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + DATA8 r, g, b; + DATA32 gry8; + DATA8 dith; + + dst_ptr = (DATA8 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + + r = (R_VAL(src_ptr)); + g = (G_VAL(src_ptr)); + b = (B_VAL(src_ptr)); + + // Y = 0.299 * R + 0.587 * G + 0.114 * B; + gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16; + + if (((gry8 - gry8 * 255 / 4) >= dith) && (gry8 < 0x07)) gry8++; + + *dst_ptr = gry8; + + CONVERT_LOOP_END_ROT_0(); +} +#endif + +#ifdef BUILD_CONVERT_8_GRY_64 +void evas_common_convert_rgba_to_8bpp_gry_4_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){} +#endif + +#ifdef BUILD_CONVERT_8_GRY_256 +void evas_common_convert_rgba_to_8bpp_gry_1_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_8.h b/libraries/evas/src/lib/engines/common/evas_convert_gry_8.h new file mode 100644 index 0000000..d70f59d --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_8.h @@ -0,0 +1,12 @@ +#ifndef _EVAS_CONVERT_GRY_8_H +#define _EVAS_CONVERT_GRY_8_H + + +void evas_common_convert_rgba_to_8bpp_gry_256_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_8bpp_gry_64_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_8bpp_gry_16_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_8bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_8bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + + +#endif /* _EVAS_CONVERT_GRY_8_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c b/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c new file mode 100644 index 0000000..2351fda --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c @@ -0,0 +1,23 @@ +#include "evas_common.h" +#include "evas_convert_grypal_6.h" + +#ifdef BUILD_CONVERT_8_GRAYSCALE_64 +void evas_common_convert_rgba_to_8bpp_pal_gray64(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + DATA8 Y; + + dst_ptr = dst; + CONVERT_LOOP_START_ROT_0(); + + /* RGB -> YUV conversion */ + Y = ((R_VAL(src_ptr) * 76) + + (G_VAL(src_ptr) * 151) + + (B_VAL(src_ptr) * 29)) >> 10; + *dst_ptr = pal[Y]; + + CONVERT_LOOP_END_ROT_0(); +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h b/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h new file mode 100644 index 0000000..5f839c2 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h @@ -0,0 +1,6 @@ +#ifndef _EVAS_CONVERT_GRY_4_H +#define _EVAS_CONVERT_GRY_4_H + +void evas_common_convert_rgba_to_8bpp_pal_gray64 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + +#endif /* _EVAS_CONVERT_GRY_4_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_main.c b/libraries/evas/src/lib/engines/common/evas_convert_main.c new file mode 100644 index 0000000..da19f9c --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_main.c @@ -0,0 +1,632 @@ +#include "evas_common.h" +#include "evas_convert_rgb_8.h" +#include "evas_convert_rgb_16.h" +#include "evas_convert_rgb_24.h" +#include "evas_convert_rgb_32.h" +#include "evas_convert_grypal_6.h" +#include "evas_convert_gry_8.h" +#include "evas_convert_yuv.h" + +#ifdef USE_DITHER_44 + +const DATA8 _evas_dither_44[4][4] = +{ + { 0, 8, 2, 10}, + {12, 4, 14, 6}, + { 3, 11, 1, 9}, + {15, 7, 13, 5} +}; + +#endif + +#ifdef USE_DITHER_128128 + +const DATA8 _evas_dither_128128[128][128] = +{ + { 0, 41, 23, 5, 17, 39, 7, 15, 62, 23, 40, 51, 31, 47, 9, 32, 52, 27, 57, 25, 6, 61, 27, 52, 37, 7, 40, 63, 18, 36, 10, 42, 25, 62, 45, 34, 20, 42, 37, 14, 35, 29, 50, 10, 61, 2, 40, 8, 37, 12, 58, 22, 5, 41, 10, 39, 0, 60, 11, 46, 2, 55, 38, 17, 36, 59, 13, 54, 37, 56, 8, 29, 16, 13, 63, 22, 41, 55, 7, 20, 49, 14, 23, 55, 37, 23, 19, 36, 15, 49, 23, 63, 30, 14, 38, 27, 53, 13, 22, 41, 19, 31, 7, 19, 50, 30, 49, 16, 3, 32, 56, 40, 29, 34, 8, 48, 19, 45, 4, 51, 12, 46, 35, 49, 16, 42, 12, 62 }, + { 30, 57, 36, 54, 47, 34, 52, 27, 43, 4, 28, 7, 17, 36, 62, 13, 44, 7, 18, 48, 33, 21, 44, 14, 30, 47, 12, 33, 5, 55, 31, 58, 13, 30, 4, 17, 52, 10, 60, 26, 46, 0, 39, 27, 42, 22, 47, 25, 60, 32, 9, 38, 48, 17, 59, 30, 49, 18, 34, 25, 51, 19, 5, 48, 21, 8, 28, 46, 1, 32, 41, 19, 54, 47, 37, 18, 28, 11, 44, 30, 39, 56, 2, 33, 8, 42, 61, 28, 58, 8, 46, 9, 41, 4, 58, 7, 21, 48, 59, 10, 52, 14, 42, 57, 12, 25, 7, 53, 42, 24, 11, 50, 17, 59, 42, 2, 36, 60, 32, 17, 63, 29, 21, 7, 59, 32, 24, 39 }, + { 22, 8, 16, 32, 3, 25, 13, 57, 18, 45, 58, 39, 55, 20, 5, 42, 23, 34, 63, 1, 51, 10, 58, 4, 60, 23, 53, 27, 44, 21, 3, 48, 8, 50, 43, 54, 27, 32, 5, 55, 21, 58, 12, 53, 6, 36, 14, 50, 17, 29, 53, 15, 24, 52, 7, 36, 13, 42, 4, 53, 9, 35, 61, 26, 56, 32, 49, 15, 62, 23, 6, 60, 2, 31, 4, 48, 58, 38, 15, 61, 5, 25, 47, 28, 50, 15, 7, 40, 3, 32, 33, 52, 25, 50, 35, 42, 61, 3, 28, 36, 23, 63, 4, 33, 46, 62, 36, 23, 60, 6, 54, 28, 4, 37, 23, 55, 25, 8, 42, 54, 14, 6, 56, 38, 19, 52, 4, 46 }, + { 48, 53, 43, 12, 45, 63, 30, 37, 9, 34, 21, 1, 25, 47, 29, 58, 3, 54, 15, 39, 29, 17, 38, 35, 20, 43, 1, 49, 15, 59, 29, 39, 22, 35, 16, 23, 1, 47, 39, 18, 8, 44, 25, 31, 57, 19, 63, 4, 45, 3, 42, 61, 1, 31, 45, 20, 57, 29, 62, 21, 32, 41, 14, 44, 3, 39, 5, 34, 10, 43, 51, 35, 23, 52, 40, 10, 21, 1, 53, 18, 51, 43, 12, 62, 18, 54, 26, 51, 20, 57, 14, 1, 62, 16, 11, 18, 32, 39, 17, 44, 1, 48, 26, 37, 18, 2, 51, 14, 28, 45, 35, 18, 57, 13, 47, 11, 51, 20, 2, 39, 31, 47, 25, 1, 50, 11, 60, 7 }, + { 18, 28, 1, 56, 21, 10, 51, 2, 46, 54, 14, 61, 11, 50, 13, 38, 19, 31, 45, 9, 55, 24, 47, 5, 54, 9, 62, 11, 35, 8, 51, 14, 57, 6, 63, 40, 58, 14, 51, 28, 62, 34, 15, 48, 1, 41, 30, 35, 55, 21, 34, 11, 49, 37, 8, 52, 4, 23, 15, 43, 1, 58, 11, 23, 53, 16, 55, 26, 58, 18, 27, 12, 45, 14, 25, 63, 42, 33, 27, 35, 9, 31, 21, 38, 1, 44, 34, 12, 48, 38, 21, 44, 29, 47, 26, 53, 1, 46, 54, 8, 59, 29, 11, 55, 22, 41, 33, 20, 39, 1, 48, 9, 44, 32, 5, 62, 29, 44, 57, 23, 10, 58, 34, 43, 15, 37, 26, 33 }, + { 51, 38, 59, 24, 35, 42, 19, 60, 5, 32, 41, 26, 43, 33, 7, 53, 48, 11, 59, 23, 42, 2, 61, 30, 16, 40, 32, 24, 56, 41, 19, 33, 37, 26, 47, 9, 31, 22, 2, 45, 9, 54, 4, 37, 21, 52, 11, 23, 7, 57, 16, 25, 55, 18, 63, 27, 46, 39, 56, 10, 50, 37, 29, 47, 19, 63, 24, 9, 46, 2, 39, 60, 9, 57, 30, 7, 49, 11, 59, 3, 45, 57, 5, 60, 29, 22, 5, 60, 30, 9, 59, 18, 40, 6, 57, 36, 30, 12, 24, 34, 15, 40, 52, 6, 49, 9, 58, 4, 63, 12, 26, 61, 22, 53, 38, 16, 35, 14, 28, 50, 42, 17, 5, 28, 62, 20, 54, 12 }, + { 26, 6, 31, 15, 49, 6, 38, 27, 22, 49, 16, 56, 2, 62, 30, 21, 0, 36, 28, 6, 49, 32, 13, 52, 26, 50, 19, 46, 3, 26, 62, 0, 53, 12, 29, 3, 53, 41, 60, 24, 38, 13, 58, 16, 43, 9, 59, 39, 46, 28, 44, 40, 2, 33, 13, 41, 16, 6, 47, 31, 26, 17, 57, 6, 38, 0, 42, 36, 29, 52, 20, 31, 48, 0, 34, 56, 20, 36, 23, 54, 14, 41, 24, 37, 10, 55, 46, 25, 16, 45, 36, 4, 55, 23, 15, 8, 50, 62, 5, 56, 44, 20, 13, 28, 59, 31, 24, 47, 31, 52, 37, 17, 40, 0, 26, 49, 3, 60, 7, 33, 0, 61, 53, 40, 8, 45, 2, 41 }, + { 16, 63, 43, 4, 61, 24, 56, 13, 53, 8, 36, 12, 24, 41, 16, 46, 60, 26, 52, 39, 14, 57, 21, 37, 0, 45, 7, 59, 38, 17, 43, 10, 45, 20, 61, 43, 19, 11, 33, 17, 50, 32, 23, 61, 28, 49, 26, 0, 18, 51, 5, 60, 22, 58, 29, 0, 59, 34, 19, 62, 3, 52, 7, 44, 30, 59, 13, 50, 15, 62, 7, 17, 38, 22, 44, 15, 40, 4, 47, 28, 33, 17, 49, 16, 51, 40, 10, 56, 0, 53, 13, 49, 28, 38, 60, 21, 43, 19, 37, 27, 3, 51, 34, 39, 0, 45, 15, 43, 10, 21, 3, 55, 8, 33, 59, 10, 41, 18, 52, 24, 46, 20, 30, 13, 58, 22, 36, 57 }, + { 50, 34, 11, 47, 29, 17, 44, 0, 33, 63, 28, 46, 52, 5, 57, 10, 42, 18, 4, 63, 20, 8, 44, 10, 56, 34, 14, 29, 5, 54, 23, 59, 32, 49, 7, 34, 49, 27, 56, 0, 42, 7, 46, 3, 40, 6, 54, 32, 62, 13, 36, 10, 47, 8, 35, 49, 24, 51, 12, 40, 22, 35, 60, 12, 22, 51, 33, 4, 40, 25, 43, 55, 5, 54, 12, 61, 26, 51, 8, 62, 0, 53, 7, 63, 2, 32, 19, 34, 42, 24, 31, 63, 2, 10, 45, 33, 0, 48, 9, 61, 22, 47, 8, 62, 18, 56, 7, 54, 27, 57, 46, 30, 50, 19, 45, 30, 56, 36, 22, 47, 11, 38, 3, 51, 32, 48, 18, 9 }, + { 0, 21, 40, 19, 52, 9, 37, 48, 20, 40, 3, 18, 27, 38, 35, 22, 31, 56, 13, 35, 46, 28, 60, 40, 27, 18, 61, 50, 41, 30, 7, 36, 2, 25, 16, 57, 5, 15, 47, 29, 55, 19, 30, 52, 15, 34, 20, 12, 43, 30, 20, 54, 25, 44, 53, 12, 38, 5, 55, 27, 48, 15, 33, 27, 45, 8, 19, 28, 56, 11, 33, 49, 18, 36, 29, 2, 45, 16, 39, 19, 31, 43, 27, 35, 20, 52, 26, 6, 61, 11, 41, 17, 29, 51, 20, 56, 25, 32, 41, 17, 53, 31, 25, 14, 42, 23, 35, 16, 38, 6, 34, 12, 15, 62, 6, 21, 13, 1, 63, 9, 55, 27, 43, 25, 14, 4, 31, 55 }, + { 44, 29, 61, 2, 35, 58, 26, 15, 60, 10, 51, 59, 14, 55, 8, 50, 2, 44, 25, 51, 1, 33, 16, 4, 48, 36, 2, 21, 12, 57, 48, 13, 51, 55, 40, 28, 37, 62, 8, 39, 12, 63, 36, 10, 59, 24, 56, 47, 9, 50, 41, 1, 32, 17, 6, 21, 61, 30, 9, 43, 1, 54, 41, 2, 54, 37, 48, 61, 1, 46, 21, 3, 58, 24, 50, 32, 60, 10, 57, 25, 46, 12, 59, 4, 45, 13, 57, 47, 27, 39, 5, 58, 47, 14, 35, 4, 52, 13, 60, 6, 36, 10, 45, 55, 4, 50, 29, 2, 61, 50, 25, 58, 44, 24, 36, 42, 54, 28, 40, 32, 16, 56, 6, 62, 46, 39, 60, 23 }, + { 7, 48, 14, 54, 23, 40, 4, 45, 30, 22, 42, 32, 1, 44, 20, 29, 58, 8, 37, 19, 41, 54, 24, 58, 9, 53, 25, 46, 34, 16, 23, 38, 27, 11, 18, 1, 52, 21, 35, 22, 48, 5, 25, 45, 18, 38, 2, 27, 35, 4, 57, 15, 62, 39, 57, 28, 42, 16, 36, 60, 24, 18, 10, 63, 20, 5, 16, 23, 37, 14, 59, 27, 41, 8, 13, 42, 21, 35, 6, 50, 3, 38, 15, 48, 30, 39, 17, 3, 49, 14, 53, 33, 24, 7, 61, 44, 11, 39, 23, 49, 19, 58, 1, 32, 36, 12, 60, 41, 20, 13, 41, 4, 39, 1, 48, 8, 18, 51, 14, 44, 5, 37, 21, 34, 1, 26, 10, 37 }, + { 53, 36, 27, 9, 50, 12, 32, 55, 2, 57, 7, 17, 48, 34, 63, 15, 40, 26, 62, 11, 49, 6, 31, 39, 22, 42, 6, 63, 1, 39, 60, 4, 42, 61, 32, 45, 24, 44, 2, 60, 16, 41, 53, 1, 33, 61, 49, 17, 63, 23, 45, 26, 33, 3, 23, 46, 2, 50, 20, 4, 45, 34, 49, 30, 39, 58, 44, 31, 53, 34, 6, 52, 30, 47, 63, 1, 53, 22, 42, 31, 58, 23, 54, 22, 61, 8, 36, 59, 22, 35, 21, 1, 55, 40, 27, 16, 30, 54, 2, 29, 43, 16, 39, 63, 21, 46, 26, 10, 48, 32, 19, 53, 30, 56, 26, 60, 33, 4, 61, 23, 49, 59, 15, 53, 19, 58, 42, 16 }, + { 20, 5, 59, 46, 25, 62, 7, 19, 43, 25, 37, 61, 11, 24, 4, 54, 12, 52, 3, 32, 17, 61, 12, 47, 15, 55, 18, 31, 53, 28, 9, 50, 21, 6, 55, 9, 58, 14, 54, 26, 33, 7, 31, 58, 13, 21, 8, 42, 29, 6, 37, 11, 48, 52, 14, 60, 11, 39, 56, 32, 14, 58, 7, 26, 17, 4, 42, 8, 11, 47, 19, 38, 10, 17, 26, 37, 9, 55, 28, 13, 18, 40, 6, 33, 1, 43, 25, 11, 51, 7, 62, 43, 18, 37, 3, 57, 45, 9, 38, 58, 5, 52, 27, 7, 17, 53, 5, 57, 37, 2, 63, 9, 22, 15, 11, 38, 25, 45, 35, 0, 28, 10, 41, 30, 50, 8, 31, 57 }, + { 49, 33, 16, 38, 1, 42, 51, 34, 53, 14, 28, 49, 30, 56, 36, 23, 43, 20, 38, 56, 22, 45, 28, 0, 62, 35, 26, 44, 11, 19, 52, 35, 44, 15, 30, 38, 10, 31, 40, 4, 46, 50, 20, 40, 27, 44, 51, 14, 56, 53, 19, 59, 7, 29, 41, 19, 35, 25, 8, 52, 22, 44, 13, 53, 50, 32, 61, 24, 56, 25, 63, 0, 45, 57, 33, 59, 16, 46, 4, 62, 50, 11, 60, 37, 52, 19, 55, 29, 37, 46, 13, 26, 48, 10, 50, 34, 21, 63, 26, 13, 42, 33, 22, 55, 35, 28, 43, 15, 24, 51, 27, 34, 46, 49, 58, 3, 52, 9, 57, 19, 48, 55, 3, 35, 12, 45, 24, 3 }, + { 41, 11, 56, 28, 18, 31, 22, 10, 37, 6, 47, 13, 3, 41, 9, 46, 0, 48, 29, 6, 34, 10, 55, 37, 20, 8, 49, 3, 41, 59, 14, 25, 0, 63, 19, 47, 27, 51, 17, 57, 23, 10, 61, 6, 54, 3, 38, 31, 0, 22, 34, 43, 20, 55, 31, 0, 49, 63, 29, 38, 3, 62, 28, 40, 0, 22, 14, 35, 2, 48, 15, 43, 23, 14, 3, 29, 49, 20, 39, 34, 0, 44, 29, 9, 15, 47, 5, 42, 0, 31, 58, 5, 31, 61, 23, 15, 0, 47, 19, 50, 24, 3, 59, 11, 44, 0, 31, 59, 6, 42, 17, 60, 0, 39, 20, 31, 43, 17, 29, 40, 12, 25, 60, 22, 52, 15, 63, 29 }, + { 20, 52, 8, 44, 62, 4, 59, 49, 17, 63, 21, 39, 60, 18, 52, 27, 33, 59, 14, 51, 59, 43, 24, 5, 51, 30, 57, 17, 32, 5, 37, 56, 48, 34, 42, 3, 60, 5, 36, 13, 43, 37, 18, 34, 25, 12, 59, 24, 47, 36, 11, 50, 3, 38, 9, 58, 16, 5, 43, 18, 47, 10, 37, 18, 59, 46, 29, 52, 40, 12, 34, 28, 56, 36, 53, 7, 43, 8, 24, 52, 26, 17, 56, 43, 24, 32, 63, 20, 57, 16, 22, 52, 36, 8, 41, 56, 29, 32, 54, 7, 35, 57, 14, 48, 20, 62, 13, 39, 53, 29, 8, 45, 13, 29, 7, 61, 14, 54, 6, 63, 38, 32, 18, 43, 2, 39, 6, 47 }, + { 0, 58, 23, 35, 13, 46, 12, 39, 0, 31, 55, 24, 5, 35, 15, 61, 17, 5, 39, 25, 18, 2, 50, 33, 41, 13, 39, 23, 62, 46, 29, 12, 22, 8, 56, 25, 20, 49, 32, 62, 0, 56, 11, 46, 63, 42, 9, 16, 55, 5, 60, 15, 62, 26, 45, 21, 36, 51, 13, 57, 31, 24, 55, 6, 35, 9, 57, 5, 20, 60, 7, 51, 5, 19, 40, 25, 61, 32, 56, 12, 36, 48, 21, 2, 58, 12, 39, 28, 9, 50, 40, 12, 44, 18, 25, 49, 6, 38, 11, 62, 18, 46, 30, 9, 40, 25, 49, 19, 10, 36, 55, 22, 33, 52, 41, 18, 37, 27, 49, 21, 2, 46, 7, 53, 33, 61, 27, 35 }, + { 41, 31, 5, 39, 51, 26, 33, 57, 27, 41, 9, 44, 54, 29, 48, 7, 44, 36, 57, 10, 31, 63, 16, 45, 11, 60, 1, 47, 7, 20, 43, 3, 58, 36, 13, 52, 39, 7, 15, 28, 22, 48, 30, 21, 1, 29, 49, 44, 27, 17, 40, 30, 24, 42, 12, 53, 33, 7, 47, 20, 1, 42, 11, 49, 25, 43, 17, 32, 45, 27, 41, 21, 31, 62, 11, 49, 2, 15, 42, 5, 63, 7, 41, 27, 49, 6, 54, 23, 46, 34, 2, 28, 54, 3, 59, 12, 46, 17, 42, 28, 40, 1, 37, 51, 5, 55, 2, 34, 47, 16, 3, 62, 47, 5, 23, 56, 1, 44, 12, 34, 51, 16, 57, 11, 25, 17, 54, 13 }, + { 60, 26, 55, 18, 3, 60, 20, 6, 52, 15, 50, 19, 32, 11, 23, 53, 26, 21, 1, 47, 42, 27, 8, 58, 21, 27, 53, 36, 26, 54, 31, 50, 17, 30, 45, 1, 29, 59, 44, 53, 41, 4, 35, 58, 51, 19, 32, 4, 52, 34, 48, 8, 51, 5, 56, 2, 25, 61, 27, 38, 54, 27, 62, 21, 51, 1, 39, 62, 10, 50, 1, 58, 13, 47, 38, 18, 35, 54, 22, 51, 30, 19, 59, 34, 14, 32, 44, 4, 60, 15, 52, 62, 20, 43, 30, 35, 21, 60, 4, 52, 12, 24, 61, 18, 30, 42, 23, 61, 25, 50, 27, 38, 11, 59, 12, 35, 50, 30, 59, 24, 8, 42, 28, 37, 48, 9, 44, 21 }, + { 10, 47, 15, 50, 30, 43, 8, 45, 29, 2, 36, 59, 1, 58, 41, 3, 63, 31, 54, 20, 13, 55, 35, 38, 4, 44, 15, 9, 61, 2, 14, 38, 61, 10, 23, 54, 18, 12, 24, 2, 14, 55, 16, 8, 38, 14, 41, 60, 10, 23, 1, 58, 32, 17, 28, 37, 41, 15, 3, 60, 15, 33, 4, 36, 16, 59, 28, 14, 23, 55, 37, 18, 44, 28, 2, 57, 30, 10, 27, 46, 14, 38, 3, 53, 21, 61, 17, 35, 10, 41, 26, 7, 33, 9, 57, 1, 53, 37, 26, 20, 56, 48, 9, 33, 58, 16, 37, 7, 45, 1, 57, 15, 32, 26, 42, 23, 7, 20, 4, 54, 31, 62, 22, 1, 59, 30, 4, 51 }, + { 36, 2, 38, 11, 24, 36, 54, 22, 62, 47, 25, 8, 28, 45, 16, 38, 12, 43, 9, 37, 49, 3, 23, 52, 18, 30, 50, 33, 19, 42, 49, 26, 6, 40, 47, 35, 63, 38, 50, 33, 60, 26, 36, 47, 24, 57, 6, 26, 39, 63, 19, 44, 14, 46, 61, 9, 50, 30, 45, 23, 10, 50, 44, 8, 31, 54, 6, 46, 36, 4, 30, 54, 8, 52, 22, 41, 4, 60, 40, 0, 58, 24, 45, 10, 37, 1, 48, 30, 56, 17, 38, 48, 24, 47, 19, 39, 14, 8, 45, 32, 2, 34, 27, 44, 4, 52, 11, 56, 31, 21, 40, 19, 44, 51, 2, 63, 46, 58, 36, 43, 14, 5, 50, 38, 14, 56, 40, 23 }, + { 61, 46, 32, 63, 54, 1, 14, 34, 12, 40, 18, 49, 37, 10, 61, 30, 51, 24, 60, 7, 29, 40, 62, 11, 46, 58, 6, 56, 24, 10, 34, 52, 21, 59, 16, 3, 27, 5, 20, 46, 9, 40, 7, 62, 2, 30, 53, 15, 48, 10, 28, 35, 54, 6, 21, 34, 18, 55, 7, 40, 57, 19, 26, 60, 41, 13, 24, 51, 19, 61, 9, 25, 34, 15, 63, 11, 45, 17, 20, 47, 33, 8, 31, 62, 43, 26, 53, 7, 24, 59, 0, 13, 55, 4, 62, 27, 51, 31, 63, 15, 58, 7, 54, 14, 46, 22, 28, 43, 12, 63, 8, 54, 5, 17, 39, 33, 15, 10, 27, 17, 47, 34, 19, 45, 27, 12, 33, 17 }, + { 5, 28, 21, 7, 17, 48, 42, 58, 23, 4, 63, 14, 55, 21, 34, 5, 19, 0, 45, 17, 52, 15, 25, 32, 0, 22, 40, 13, 45, 62, 18, 0, 43, 11, 33, 55, 30, 42, 57, 19, 51, 31, 22, 43, 18, 45, 34, 0, 43, 31, 56, 3, 23, 40, 59, 0, 44, 13, 48, 35, 2, 32, 46, 0, 21, 48, 35, 3, 40, 32, 43, 59, 0, 48, 33, 26, 53, 36, 55, 12, 51, 16, 55, 5, 18, 29, 11, 39, 51, 19, 45, 31, 42, 21, 35, 6, 22, 47, 10, 38, 23, 50, 20, 36, 0, 60, 38, 4, 50, 35, 48, 34, 24, 57, 9, 53, 28, 48, 61, 0, 56, 24, 53, 3, 63, 6, 42, 57 }, + { 13, 53, 45, 40, 58, 27, 6, 16, 38, 51, 33, 30, 43, 2, 47, 56, 40, 50, 33, 57, 27, 5, 47, 42, 60, 36, 16, 54, 28, 4, 37, 57, 28, 51, 22, 8, 45, 14, 6, 39, 0, 54, 11, 59, 28, 12, 50, 21, 61, 13, 19, 38, 49, 11, 25, 37, 58, 29, 22, 63, 14, 56, 12, 53, 30, 63, 9, 57, 26, 12, 47, 16, 23, 39, 50, 6, 31, 2, 25, 6, 28, 41, 36, 22, 50, 57, 42, 3, 34, 8, 28, 61, 11, 50, 16, 54, 41, 0, 55, 43, 5, 29, 41, 63, 25, 16, 53, 18, 26, 10, 21, 0, 61, 30, 41, 22, 3, 38, 20, 39, 29, 8, 41, 16, 36, 52, 22, 19 }, + { 55, 34, 0, 25, 10, 32, 56, 44, 28, 0, 57, 7, 26, 53, 23, 8, 13, 35, 22, 12, 36, 60, 20, 8, 14, 29, 48, 2, 41, 49, 23, 13, 39, 7, 48, 58, 25, 53, 34, 62, 28, 16, 48, 4, 37, 56, 27, 5, 36, 52, 46, 7, 62, 33, 52, 11, 17, 53, 5, 28, 41, 24, 38, 17, 5, 39, 20, 45, 15, 56, 5, 38, 60, 8, 14, 57, 21, 48, 62, 39, 59, 13, 1, 60, 9, 32, 16, 63, 44, 25, 52, 15, 36, 2, 60, 29, 12, 33, 25, 17, 59, 45, 13, 8, 49, 32, 6, 40, 59, 29, 45, 37, 13, 47, 6, 55, 30, 45, 9, 52, 13, 59, 25, 47, 32, 1, 49, 30 }, + { 9, 39, 14, 61, 49, 37, 3, 20, 50, 13, 41, 19, 46, 17, 38, 59, 28, 62, 4, 44, 54, 1, 34, 51, 55, 7, 63, 32, 21, 8, 56, 31, 62, 19, 36, 1, 41, 17, 24, 12, 42, 35, 25, 52, 20, 8, 44, 59, 25, 2, 22, 42, 16, 29, 4, 46, 20, 36, 43, 9, 51, 8, 49, 26, 58, 33, 54, 1, 37, 29, 52, 20, 27, 45, 19, 35, 42, 16, 10, 32, 20, 49, 46, 27, 40, 4, 47, 22, 13, 55, 4, 47, 26, 44, 23, 40, 58, 19, 48, 13, 31, 2, 57, 34, 42, 19, 61, 32, 14, 55, 5, 51, 26, 19, 58, 16, 49, 14, 62, 5, 33, 44, 21, 7, 60, 26, 11, 41 }, + { 62, 24, 47, 29, 8, 19, 53, 11, 60, 24, 32, 61, 4, 55, 31, 2, 49, 16, 39, 9, 31, 24, 43, 17, 26, 38, 11, 25, 58, 43, 12, 35, 3, 46, 15, 32, 63, 4, 49, 56, 2, 60, 10, 32, 63, 17, 39, 12, 55, 30, 57, 9, 48, 55, 39, 24, 60, 2, 58, 31, 19, 61, 34, 3, 42, 11, 22, 46, 7, 61, 10, 42, 3, 55, 32, 1, 58, 28, 44, 54, 4, 34, 23, 15, 56, 20, 37, 58, 6, 30, 38, 18, 63, 9, 32, 5, 51, 3, 62, 37, 52, 18, 39, 23, 3, 51, 9, 47, 1, 23, 43, 15, 60, 35, 11, 40, 1, 36, 31, 26, 57, 2, 37, 54, 18, 44, 58, 16 }, + { 5, 51, 3, 33, 43, 62, 21, 42, 35, 9, 48, 15, 36, 10, 22, 42, 20, 46, 26, 56, 50, 12, 59, 3, 48, 19, 45, 53, 1, 27, 47, 17, 52, 24, 56, 11, 51, 21, 37, 30, 20, 46, 14, 41, 1, 47, 33, 7, 41, 17, 35, 27, 20, 1, 14, 54, 26, 33, 18, 47, 1, 44, 14, 59, 16, 52, 28, 18, 49, 31, 25, 34, 63, 13, 51, 24, 9, 50, 3, 23, 38, 63, 7, 52, 29, 46, 11, 33, 50, 22, 57, 36, 1, 57, 49, 17, 39, 28, 9, 35, 6, 27, 53, 15, 55, 30, 24, 58, 36, 41, 11, 52, 32, 3, 44, 25, 62, 23, 51, 15, 42, 22, 50, 10, 39, 4, 31, 35 }, + { 46, 22, 57, 17, 12, 39, 26, 5, 31, 59, 1, 45, 27, 62, 52, 7, 58, 33, 6, 18, 39, 22, 33, 41, 57, 5, 35, 18, 40, 16, 60, 5, 29, 42, 7, 39, 27, 44, 9, 47, 8, 26, 54, 22, 51, 29, 24, 49, 15, 61, 4, 51, 31, 63, 43, 6, 50, 8, 39, 12, 53, 37, 23, 30, 40, 6, 62, 43, 14, 53, 2, 49, 7, 36, 17, 41, 61, 37, 18, 56, 11, 18, 44, 35, 2, 19, 61, 0, 41, 14, 8, 30, 43, 12, 24, 46, 14, 54, 42, 21, 44, 61, 10, 46, 37, 11, 44, 7, 18, 63, 20, 29, 7, 49, 28, 54, 8, 43, 4, 48, 18, 63, 12, 29, 48, 24, 59, 20 }, + { 13, 36, 28, 54, 35, 2, 56, 46, 16, 49, 22, 40, 11, 34, 14, 43, 29, 12, 63, 48, 2, 61, 7, 15, 28, 30, 50, 9, 61, 33, 38, 23, 54, 13, 61, 33, 3, 59, 16, 35, 58, 40, 5, 38, 13, 57, 3, 58, 37, 21, 45, 12, 39, 7, 35, 30, 13, 56, 22, 62, 27, 6, 55, 10, 48, 21, 33, 2, 38, 23, 40, 20, 44, 29, 59, 4, 26, 12, 33, 47, 28, 53, 31, 13, 59, 41, 27, 49, 26, 54, 45, 16, 53, 21, 35, 7, 59, 26, 11, 56, 1, 24, 33, 4, 28, 62, 21, 49, 31, 2, 56, 39, 24, 58, 13, 17, 37, 21, 56, 10, 38, 0, 34, 55, 15, 43, 1, 52 }, + { 42, 9, 50, 6, 25, 60, 14, 38, 10, 29, 53, 18, 57, 3, 25, 51, 0, 53, 25, 17, 29, 37, 52, 46, 0, 62, 14, 37, 4, 50, 10, 44, 0, 46, 20, 25, 50, 19, 55, 0, 23, 31, 62, 34, 11, 45, 19, 32, 0, 53, 10, 59, 23, 47, 18, 60, 42, 28, 37, 3, 50, 15, 35, 44, 0, 51, 27, 60, 9, 57, 16, 58, 11, 22, 46, 15, 53, 48, 7, 42, 0, 60, 5, 49, 24, 54, 9, 17, 39, 5, 34, 62, 3, 40, 60, 31, 0, 47, 29, 16, 49, 39, 59, 17, 50, 0, 40, 13, 53, 38, 16, 46, 0, 42, 34, 60, 2, 53, 29, 31, 58, 46, 27, 6, 61, 8, 37, 28 }, + { 0, 63, 21, 40, 45, 18, 51, 23, 63, 34, 6, 43, 28, 38, 55, 19, 40, 35, 8, 41, 54, 10, 21, 32, 39, 23, 53, 26, 55, 28, 22, 63, 30, 34, 9, 48, 6, 38, 29, 43, 49, 6, 18, 52, 27, 61, 9, 43, 28, 42, 33, 26, 56, 3, 51, 23, 0, 48, 16, 45, 32, 25, 63, 20, 57, 17, 42, 12, 35, 47, 5, 31, 39, 56, 6, 30, 34, 21, 61, 25, 14, 40, 22, 38, 15, 6, 36, 56, 20, 60, 25, 12, 51, 27, 10, 56, 42, 20, 36, 63, 32, 6, 21, 41, 12, 34, 60, 26, 5, 48, 27, 10, 62, 19, 6, 47, 39, 14, 45, 7, 24, 17, 41, 32, 23, 51, 19, 56 }, + { 45, 31, 15, 59, 4, 33, 7, 47, 0, 41, 13, 61, 4, 47, 9, 23, 60, 14, 57, 31, 4, 45, 59, 6, 58, 10, 44, 20, 8, 42, 15, 6, 55, 17, 58, 31, 53, 12, 61, 10, 15, 57, 43, 2, 23, 35, 48, 14, 54, 6, 18, 49, 15, 38, 11, 34, 62, 9, 21, 58, 11, 41, 4, 31, 38, 8, 29, 55, 19, 36, 27, 52, 0, 25, 50, 43, 1, 39, 8, 55, 35, 51, 10, 30, 45, 62, 29, 2, 46, 10, 32, 48, 18, 38, 5, 22, 33, 8, 51, 3, 14, 44, 54, 25, 57, 30, 18, 52, 33, 22, 59, 28, 36, 52, 32, 21, 26, 50, 5, 55, 35, 60, 14, 54, 4, 40, 16, 33 }, + { 27, 3, 49, 10, 30, 40, 55, 27, 57, 24, 52, 21, 32, 17, 60, 30, 5, 44, 27, 49, 19, 34, 13, 24, 43, 36, 3, 49, 31, 59, 37, 48, 26, 41, 2, 41, 14, 36, 21, 32, 40, 26, 13, 49, 55, 5, 16, 40, 25, 60, 36, 1, 63, 29, 17, 44, 25, 40, 52, 5, 29, 47, 54, 13, 46, 24, 60, 4, 51, 22, 63, 14, 45, 18, 12, 62, 17, 57, 19, 42, 3, 26, 58, 48, 1, 21, 40, 52, 23, 37, 44, 1, 29, 58, 43, 50, 15, 61, 19, 45, 58, 28, 7, 48, 2, 46, 8, 42, 3, 55, 8, 50, 12, 4, 55, 10, 63, 33, 20, 40, 11, 3, 46, 20, 48, 26, 61, 11 }, + { 44, 56, 24, 36, 53, 19, 12, 37, 16, 44, 7, 36, 49, 54, 11, 37, 48, 21, 15, 1, 62, 25, 47, 56, 16, 18, 51, 12, 40, 1, 24, 11, 52, 16, 23, 59, 28, 1, 45, 53, 4, 60, 37, 21, 39, 30, 63, 20, 52, 10, 30, 45, 8, 41, 54, 4, 57, 7, 34, 55, 36, 18, 23, 59, 2, 48, 11, 32, 44, 1, 41, 8, 33, 54, 38, 23, 30, 46, 6, 29, 62, 18, 32, 16, 55, 34, 14, 11, 61, 7, 55, 16, 53, 13, 23, 2, 55, 37, 26, 10, 33, 23, 36, 16, 38, 22, 56, 15, 24, 43, 35, 17, 44, 40, 25, 46, 16, 1, 57, 25, 49, 36, 28, 62, 9, 35, 7, 53 }, + { 17, 38, 8, 61, 1, 50, 26, 62, 3, 31, 56, 15, 1, 26, 40, 2, 34, 51, 56, 36, 42, 9, 38, 2, 29, 60, 32, 57, 19, 62, 34, 47, 4, 57, 39, 7, 44, 63, 24, 18, 46, 28, 8, 54, 1, 34, 7, 46, 3, 37, 50, 23, 57, 21, 13, 46, 31, 20, 43, 15, 1, 61, 8, 33, 37, 17, 56, 26, 15, 49, 24, 59, 28, 3, 56, 9, 52, 32, 13, 49, 10, 43, 5, 45, 8, 25, 59, 42, 28, 33, 19, 40, 8, 63, 35, 47, 25, 4, 40, 52, 1, 60, 12, 53, 63, 9, 29, 60, 37, 19, 1, 62, 31, 20, 58, 12, 41, 30, 43, 9, 18, 52, 22, 1, 39, 30, 58, 21 }, + { 13, 47, 29, 18, 43, 34, 5, 48, 20, 42, 10, 45, 30, 58, 20, 63, 24, 11, 6, 28, 54, 14, 22, 52, 41, 7, 26, 5, 45, 15, 53, 13, 35, 27, 18, 50, 12, 33, 5, 56, 10, 17, 45, 24, 59, 15, 50, 26, 56, 13, 19, 5, 32, 52, 27, 36, 2, 61, 12, 26, 49, 40, 27, 52, 13, 50, 6, 39, 61, 34, 10, 37, 48, 20, 41, 27, 2, 36, 59, 24, 54, 33, 63, 20, 38, 50, 3, 17, 52, 4, 58, 27, 45, 21, 32, 11, 48, 17, 57, 20, 46, 38, 25, 43, 4, 34, 51, 6, 13, 45, 57, 26, 6, 48, 2, 35, 53, 23, 61, 34, 59, 6, 42, 56, 13, 51, 2, 41 }, + { 32, 5, 55, 23, 58, 14, 22, 52, 29, 15, 61, 25, 51, 8, 43, 13, 53, 41, 46, 20, 3, 33, 63, 11, 48, 21, 54, 38, 28, 3, 30, 43, 21, 62, 9, 31, 55, 22, 51, 29, 37, 62, 32, 12, 42, 29, 41, 9, 33, 44, 62, 28, 43, 1, 59, 19, 48, 30, 51, 39, 24, 4, 58, 19, 42, 29, 22, 43, 3, 18, 53, 5, 13, 50, 16, 60, 45, 21, 7, 40, 15, 0, 26, 53, 13, 31, 43, 24, 47, 31, 15, 49, 2, 41, 6, 59, 29, 42, 9, 30, 14, 7, 49, 18, 31, 47, 20, 39, 49, 32, 11, 41, 54, 15, 61, 18, 7, 38, 4, 13, 44, 28, 15, 32, 45, 19, 27, 49 }, + { 63, 34, 11, 39, 2, 45, 37, 8, 59, 39, 33, 4, 36, 17, 48, 5, 29, 18, 32, 61, 39, 50, 5, 27, 35, 0, 46, 12, 22, 49, 60, 6, 54, 0, 38, 49, 2, 42, 15, 40, 0, 47, 20, 51, 3, 57, 18, 61, 22, 0, 39, 16, 55, 12, 35, 8, 41, 22, 6, 59, 16, 45, 10, 36, 0, 62, 9, 54, 30, 58, 21, 43, 63, 31, 7, 35, 12, 48, 58, 28, 47, 37, 41, 9, 57, 20, 61, 0, 36, 11, 57, 35, 23, 52, 37, 18, 0, 62, 22, 55, 35, 62, 27, 54, 0, 15, 61, 28, 2, 59, 22, 9, 37, 27, 33, 51, 29, 48, 19, 50, 25, 37, 10, 57, 5, 37, 60, 8 }, + { 20, 25, 46, 52, 31, 60, 12, 55, 0, 19, 11, 46, 62, 35, 23, 38, 57, 0, 55, 10, 16, 30, 58, 44, 17, 59, 29, 63, 42, 8, 36, 20, 33, 46, 16, 61, 25, 35, 8, 54, 26, 7, 58, 22, 34, 6, 47, 14, 53, 31, 48, 9, 37, 25, 49, 63, 16, 55, 45, 14, 34, 63, 21, 53, 25, 33, 46, 16, 35, 7, 46, 29, 0, 39, 25, 55, 22, 34, 18, 4, 56, 11, 23, 51, 28, 6, 39, 14, 62, 44, 19, 8, 60, 12, 56, 28, 50, 34, 39, 5, 51, 3, 41, 12, 57, 35, 10, 53, 25, 17, 52, 30, 47, 0, 43, 14, 5, 57, 31, 55, 0, 63, 47, 23, 54, 24, 14, 43 }, + { 0, 57, 16, 6, 26, 19, 35, 28, 49, 42, 54, 26, 21, 1, 59, 27, 9, 47, 26, 44, 50, 22, 13, 40, 8, 37, 10, 34, 17, 56, 25, 58, 13, 27, 44, 9, 20, 58, 31, 17, 60, 36, 10, 41, 53, 25, 36, 39, 4, 24, 58, 17, 60, 4, 22, 38, 10, 32, 0, 50, 31, 7, 28, 47, 12, 57, 5, 26, 52, 23, 14, 40, 57, 17, 47, 5, 53, 1, 44, 31, 19, 60, 46, 2, 35, 48, 30, 54, 22, 5, 51, 39, 25, 31, 4, 43, 14, 9, 45, 16, 24, 44, 19, 29, 40, 23, 44, 7, 38, 42, 4, 63, 12, 54, 23, 59, 22, 42, 8, 15, 40, 21, 8, 34, 3, 41, 30, 50 }, + { 39, 10, 48, 33, 41, 54, 5, 47, 23, 13, 32, 7, 52, 44, 14, 39, 58, 18, 35, 6, 37, 2, 60, 24, 55, 19, 53, 2, 51, 32, 1, 41, 51, 4, 40, 29, 47, 3, 52, 44, 13, 49, 28, 16, 1, 62, 11, 27, 52, 35, 5, 42, 29, 47, 14, 56, 28, 53, 26, 38, 9, 56, 40, 3, 38, 15, 41, 60, 1, 37, 50, 25, 11, 28, 61, 19, 42, 62, 10, 52, 39, 6, 32, 14, 58, 17, 7, 26, 42, 34, 27, 10, 54, 40, 20, 63, 26, 53, 21, 61, 32, 7, 59, 48, 3, 56, 18, 31, 58, 14, 49, 21, 36, 16, 45, 9, 36, 24, 62, 45, 27, 31, 53, 17, 49, 12, 62, 18 }, + { 28, 59, 21, 58, 2, 16, 38, 9, 62, 3, 56, 41, 10, 31, 50, 4, 32, 52, 12, 63, 23, 46, 33, 31, 4, 48, 25, 43, 14, 23, 47, 11, 22, 55, 14, 60, 23, 37, 11, 39, 23, 2, 45, 56, 31, 43, 19, 55, 16, 46, 21, 51, 11, 33, 44, 2, 41, 18, 5, 52, 23, 44, 17, 60, 27, 49, 11, 32, 44, 10, 54, 2, 56, 33, 8, 38, 13, 29, 36, 16, 24, 63, 27, 51, 21, 43, 56, 12, 49, 3, 59, 48, 1, 15, 46, 7, 36, 2, 47, 11, 50, 27, 37, 13, 33, 8, 51, 46, 1, 34, 28, 40, 3, 33, 60, 29, 47, 1, 35, 11, 59, 42, 2, 60, 26, 46, 6, 35 }, + { 4, 43, 9, 29, 36, 63, 24, 44, 20, 50, 30, 17, 60, 22, 16, 43, 25, 3, 42, 19, 51, 15, 8, 54, 42, 15, 61, 5, 39, 57, 18, 61, 31, 48, 34, 2, 50, 19, 57, 5, 63, 33, 19, 38, 13, 27, 48, 7, 32, 61, 2, 26, 58, 6, 24, 50, 13, 61, 42, 20, 62, 2, 35, 20, 51, 4, 62, 18, 23, 58, 20, 31, 43, 15, 51, 45, 26, 50, 4, 55, 45, 3, 35, 9, 38, 1, 32, 61, 20, 45, 17, 33, 24, 57, 29, 51, 22, 58, 38, 30, 15, 1, 54, 21, 63, 43, 26, 12, 24, 56, 8, 60, 50, 19, 5, 52, 13, 54, 17, 50, 4, 16, 36, 12, 32, 56, 22, 54 }, + { 51, 25, 40, 53, 12, 49, 15, 57, 34, 7, 38, 47, 2, 36, 55, 8, 61, 30, 56, 7, 28, 59, 48, 11, 27, 35, 21, 45, 28, 36, 9, 38, 6, 16, 24, 63, 10, 32, 28, 43, 21, 53, 5, 60, 8, 57, 3, 45, 11, 37, 15, 54, 40, 20, 62, 36, 27, 34, 11, 48, 30, 15, 54, 8, 30, 42, 22, 34, 48, 13, 35, 63, 4, 37, 22, 2, 59, 9, 41, 23, 13, 41, 49, 18, 59, 24, 40, 5, 37, 30, 9, 61, 44, 6, 37, 11, 33, 17, 5, 55, 41, 60, 23, 39, 17, 5, 30, 62, 41, 16, 46, 25, 11, 56, 39, 26, 20, 38, 29, 39, 22, 52, 44, 20, 48, 1, 38, 14 }, + { 15, 33, 2, 18, 44, 6, 27, 0, 32, 61, 25, 12, 58, 28, 40, 20, 47, 13, 34, 43, 38, 1, 23, 62, 40, 0, 51, 10, 63, 3, 52, 26, 44, 30, 45, 6, 41, 54, 0, 51, 12, 30, 46, 24, 49, 22, 40, 33, 63, 23, 43, 30, 9, 47, 0, 17, 54, 7, 57, 3, 37, 47, 24, 46, 13, 55, 7, 52, 2, 42, 6, 26, 49, 18, 60, 34, 16, 57, 33, 20, 61, 30, 8, 54, 14, 46, 12, 53, 16, 55, 38, 13, 22, 53, 18, 59, 46, 27, 43, 19, 32, 10, 45, 6, 49, 36, 52, 2, 20, 55, 6, 39, 32, 15, 44, 3, 58, 10, 63, 6, 56, 30, 7, 58, 9, 40, 19, 63 }, + { 10, 47, 61, 23, 55, 31, 52, 42, 17, 45, 4, 51, 27, 6, 15, 53, 0, 49, 26, 10, 56, 18, 36, 6, 20, 58, 32, 30, 13, 49, 19, 56, 0, 59, 12, 53, 27, 17, 38, 25, 48, 9, 15, 36, 14, 30, 59, 17, 0, 50, 8, 58, 18, 56, 31, 45, 21, 41, 29, 19, 60, 6, 32, 59, 0, 36, 29, 39, 19, 59, 46, 12, 55, 30, 10, 47, 24, 3, 28, 48, 0, 55, 44, 27, 33, 4, 63, 29, 49, 0, 26, 50, 34, 2, 42, 14, 0, 62, 9, 56, 3, 52, 28, 34, 58, 9, 20, 48, 37, 32, 22, 53, 0, 62, 27, 49, 34, 46, 21, 33, 41, 14, 25, 37, 53, 29, 31, 45 }, + { 56, 28, 7, 37, 11, 36, 20, 9, 54, 14, 39, 19, 34, 63, 45, 37, 24, 17, 60, 31, 21, 45, 53, 29, 47, 15, 7, 55, 40, 23, 34, 14, 42, 20, 37, 35, 15, 59, 7, 62, 34, 40, 59, 1, 51, 42, 10, 28, 54, 21, 35, 5, 38, 13, 36, 4, 59, 12, 39, 53, 15, 43, 9, 21, 39, 62, 16, 56, 25, 9, 32, 38, 0, 41, 14, 51, 40, 53, 43, 11, 37, 17, 5, 22, 57, 39, 19, 7, 42, 21, 60, 10, 31, 63, 25, 52, 30, 49, 36, 25, 48, 17, 61, 14, 22, 42, 29, 13, 60, 11, 47, 18, 35, 41, 7, 23, 4, 16, 51, 11, 0, 48, 61, 3, 17, 50, 5, 24 }, + { 0, 42, 21, 49, 60, 3, 57, 40, 29, 48, 23, 56, 42, 11, 22, 5, 59, 39, 4, 50, 3, 41, 12, 57, 25, 50, 44, 18, 4, 46, 7, 62, 33, 50, 4, 56, 21, 32, 43, 18, 3, 23, 55, 34, 20, 4, 53, 38, 12, 46, 29, 52, 25, 61, 23, 51, 26, 46, 1, 34, 25, 57, 28, 51, 26, 11, 50, 3, 44, 28, 53, 21, 57, 27, 62, 6, 31, 19, 8, 63, 26, 59, 36, 47, 15, 29, 50, 25, 35, 47, 18, 41, 4, 48, 8, 40, 12, 23, 6, 44, 13, 40, 1, 31, 55, 0, 61, 43, 4, 50, 26, 58, 9, 53, 24, 61, 42, 55, 31, 43, 57, 20, 34, 27, 43, 8, 59, 39 }, + { 18, 51, 30, 13, 26, 16, 46, 22, 2, 59, 8, 30, 1, 48, 33, 51, 29, 9, 46, 16, 62, 14, 33, 2, 38, 9, 27, 60, 37, 26, 53, 17, 28, 10, 24, 46, 2, 49, 8, 57, 29, 45, 6, 26, 62, 44, 18, 25, 61, 3, 42, 14, 49, 10, 43, 6, 17, 32, 63, 10, 49, 4, 40, 14, 45, 33, 22, 37, 12, 61, 5, 17, 43, 7, 23, 37, 15, 58, 49, 13, 39, 21, 10, 52, 1, 62, 9, 56, 12, 2, 58, 28, 36, 16, 56, 28, 56, 35, 20, 63, 24, 37, 51, 8, 45, 25, 16, 33, 27, 38, 2, 44, 13, 30, 17, 36, 12, 26, 5, 18, 28, 47, 13, 60, 23, 45, 13, 33 }, + { 55, 4, 62, 34, 52, 38, 7, 63, 32, 37, 13, 53, 25, 62, 18, 12, 55, 41, 27, 35, 24, 49, 31, 52, 17, 63, 34, 1, 56, 12, 41, 2, 48, 58, 39, 16, 61, 27, 41, 52, 13, 19, 50, 39, 11, 31, 57, 6, 32, 40, 20, 55, 1, 28, 33, 57, 48, 8, 37, 22, 44, 18, 53, 1, 61, 5, 54, 16, 47, 36, 50, 24, 55, 34, 48, 45, 1, 30, 33, 46, 2, 50, 32, 42, 25, 34, 43, 21, 38, 52, 23, 45, 14, 54, 21, 4, 44, 16, 53, 29, 10, 47, 19, 57, 12, 54, 39, 10, 51, 15, 63, 21, 57, 40, 51, 1, 48, 57, 37, 62, 2, 38, 9, 52, 1, 35, 58, 22 }, + { 36, 46, 10, 42, 1, 27, 43, 15, 50, 21, 45, 16, 41, 3, 35, 44, 20, 1, 57, 11, 55, 7, 43, 8, 22, 42, 13, 46, 21, 39, 31, 60, 22, 5, 29, 44, 11, 35, 20, 4, 36, 58, 32, 15, 47, 2, 36, 48, 16, 60, 8, 35, 44, 63, 16, 2, 40, 26, 55, 14, 58, 35, 24, 31, 19, 42, 31, 58, 1, 29, 10, 40, 2, 19, 12, 54, 22, 61, 7, 24, 56, 5, 28, 16, 54, 3, 15, 58, 6, 30, 8, 62, 1, 43, 31, 47, 7, 59, 1, 38, 58, 4, 34, 27, 38, 5, 31, 59, 7, 46, 30, 3, 34, 6, 28, 59, 20, 8, 32, 15, 53, 24, 55, 31, 19, 49, 11, 26 }, + { 2, 24, 16, 58, 19, 55, 5, 35, 10, 61, 4, 28, 57, 24, 58, 7, 31, 47, 22, 38, 19, 28, 61, 36, 54, 5, 59, 29, 6, 52, 15, 11, 43, 36, 8, 54, 52, 1, 62, 25, 47, 9, 1, 60, 28, 53, 24, 14, 46, 27, 51, 22, 12, 24, 38, 53, 20, 11, 51, 3, 29, 7, 48, 63, 8, 49, 9, 21, 52, 14, 63, 32, 46, 60, 35, 4, 41, 16, 52, 35, 18, 42, 59, 7, 36, 61, 45, 27, 33, 51, 19, 39, 34, 11, 61, 18, 33, 41, 28, 15, 54, 22, 42, 3, 49, 21, 47, 18, 36, 23, 55, 19, 48, 24, 45, 10, 33, 44, 50, 40, 7, 35, 15, 41, 63, 6, 40, 54 }, + { 62, 41, 32, 8, 47, 28, 60, 24, 44, 30, 38, 49, 9, 33, 14, 40, 50, 14, 60, 2, 54, 40, 0, 20, 25, 39, 16, 49, 24, 35, 57, 47, 19, 61, 33, 18, 23, 37, 13, 55, 31, 43, 22, 41, 17, 8, 42, 58, 0, 37, 5, 56, 31, 54, 7, 30, 60, 33, 42, 17, 59, 39, 12, 27, 38, 17, 35, 41, 27, 45, 20, 7, 25, 15, 29, 58, 27, 47, 11, 40, 14, 54, 23, 46, 19, 31, 11, 40, 13, 49, 5, 58, 24, 51, 26, 6, 50, 20, 49, 9, 32, 46, 17, 60, 14, 63, 24, 1, 57, 41, 9, 43, 14, 62, 16, 52, 3, 27, 14, 22, 61, 45, 4, 28, 9, 47, 29, 17 }, + { 5, 50, 12, 53, 38, 18, 11, 51, 0, 55, 17, 6, 47, 54, 19, 63, 5, 26, 34, 45, 13, 30, 47, 58, 10, 48, 32, 3, 62, 9, 26, 0, 25, 14, 50, 3, 47, 30, 42, 16, 6, 63, 12, 49, 33, 55, 21, 10, 34, 63, 18, 41, 3, 47, 19, 43, 0, 49, 8, 28, 46, 20, 52, 0, 56, 24, 60, 3, 59, 5, 39, 57, 48, 52, 9, 38, 3, 21, 26, 60, 0, 32, 12, 38, 4, 48, 53, 0, 60, 15, 29, 44, 18, 10, 38, 57, 13, 60, 2, 26, 62, 7, 50, 29, 35, 8, 40, 53, 28, 12, 60, 33, 38, 5, 37, 29, 60, 39, 56, 0, 30, 18, 50, 34, 59, 25, 14, 44 }, + { 20, 31, 60, 22, 3, 49, 33, 25, 40, 13, 34, 59, 22, 36, 0, 28, 37, 56, 8, 18, 51, 16, 4, 45, 27, 12, 53, 42, 18, 44, 51, 31, 55, 40, 28, 58, 7, 60, 10, 51, 27, 37, 24, 56, 5, 26, 44, 29, 50, 23, 45, 11, 34, 15, 59, 27, 13, 23, 62, 37, 4, 57, 15, 32, 42, 6, 47, 11, 30, 43, 23, 13, 0, 36, 18, 44, 63, 51, 37, 29, 49, 20, 57, 27, 62, 9, 24, 35, 23, 53, 37, 3, 42, 55, 0, 36, 23, 39, 31, 43, 17, 37, 24, 11, 52, 43, 19, 32, 5, 50, 26, 0, 56, 21, 54, 11, 19, 6, 47, 25, 59, 42, 12, 54, 21, 3, 38, 57 }, + { 48, 0, 35, 27, 44, 14, 59, 7, 57, 46, 26, 2, 42, 12, 52, 43, 10, 27, 53, 42, 32, 62, 37, 21, 34, 61, 7, 23, 36, 4, 38, 12, 41, 5, 17, 45, 22, 27, 39, 21, 59, 0, 45, 18, 39, 62, 3, 38, 14, 7, 54, 26, 61, 39, 9, 52, 45, 36, 18, 50, 10, 34, 44, 22, 50, 14, 36, 55, 17, 34, 53, 62, 33, 26, 56, 6, 31, 12, 6, 53, 9, 44, 2, 50, 20, 40, 55, 17, 47, 7, 26, 63, 22, 32, 48, 16, 46, 8, 52, 12, 57, 41, 0, 56, 25, 3, 61, 14, 45, 35, 18, 44, 12, 46, 23, 42, 32, 51, 35, 10, 17, 36, 23, 1, 45, 52, 32, 10 }, + { 37, 15, 43, 8, 63, 39, 21, 31, 16, 37, 19, 62, 30, 46, 17, 60, 21, 48, 1, 23, 6, 25, 11, 56, 1, 40, 30, 58, 15, 54, 21, 59, 9, 63, 35, 56, 11, 51, 2, 46, 34, 14, 53, 7, 30, 11, 51, 19, 60, 40, 30, 1, 24, 50, 20, 32, 3, 56, 5, 25, 31, 13, 61, 2, 29, 60, 25, 20, 51, 2, 27, 8, 18, 42, 10, 45, 21, 34, 43, 17, 62, 29, 41, 14, 34, 6, 30, 43, 2, 57, 33, 13, 45, 12, 27, 62, 4, 55, 21, 35, 5, 27, 45, 33, 16, 47, 30, 54, 22, 10, 51, 27, 63, 7, 49, 1, 58, 22, 15, 43, 53, 7, 57, 39, 27, 12, 61, 24 }, + { 56, 51, 26, 56, 19, 2, 41, 54, 5, 52, 9, 48, 6, 23, 39, 4, 32, 15, 63, 35, 59, 49, 43, 15, 52, 19, 50, 9, 46, 33, 1, 29, 48, 20, 32, 1, 38, 33, 19, 54, 9, 32, 24, 48, 58, 35, 16, 48, 4, 52, 13, 57, 33, 5, 45, 59, 15, 29, 41, 55, 47, 39, 23, 53, 9, 40, 4, 57, 10, 44, 48, 40, 50, 14, 61, 24, 55, 1, 59, 22, 33, 8, 51, 25, 58, 46, 11, 59, 20, 41, 17, 51, 6, 56, 35, 25, 42, 30, 15, 58, 48, 18, 61, 9, 58, 39, 13, 2, 37, 59, 40, 2, 31, 16, 34, 41, 8, 30, 62, 3, 29, 48, 33, 5, 63, 16, 41, 7 }, + { 22, 4, 46, 11, 33, 51, 29, 10, 62, 24, 43, 27, 15, 58, 50, 25, 54, 44, 9, 38, 18, 3, 29, 57, 32, 5, 26, 43, 17, 61, 24, 52, 8, 42, 23, 53, 15, 61, 7, 28, 57, 43, 4, 40, 20, 2, 43, 25, 32, 35, 21, 43, 17, 48, 10, 22, 38, 54, 11, 21, 1, 58, 16, 30, 48, 18, 46, 32, 38, 13, 22, 4, 59, 35, 2, 51, 30, 39, 15, 47, 4, 56, 13, 37, 1, 28, 16, 52, 32, 9, 61, 29, 38, 19, 3, 52, 10, 48, 1, 32, 11, 40, 20, 36, 6, 22, 49, 29, 55, 6, 20, 56, 36, 52, 19, 60, 26, 46, 18, 54, 40, 13, 20, 46, 35, 19, 49, 29 }, + { 61, 17, 34, 53, 23, 6, 48, 35, 20, 40, 1, 56, 36, 29, 11, 34, 7, 41, 14, 30, 55, 20, 46, 8, 24, 38, 63, 2, 37, 10, 45, 14, 34, 49, 6, 13, 44, 25, 49, 41, 21, 12, 61, 15, 54, 29, 63, 12, 56, 8, 49, 2, 62, 36, 28, 61, 0, 25, 41, 63, 35, 8, 44, 6, 37, 62, 7, 21, 63, 28, 55, 31, 16, 24, 41, 19, 9, 57, 27, 36, 18, 42, 31, 62, 22, 55, 38, 4, 27, 47, 1, 40, 14, 54, 43, 20, 60, 23, 38, 63, 25, 51, 2, 53, 26, 63, 10, 42, 17, 34, 47, 25, 13, 5, 44, 11, 55, 2, 38, 27, 6, 60, 52, 25, 9, 55, 1, 40 }, + { 8, 30, 58, 3, 42, 61, 17, 38, 13, 59, 32, 10, 54, 3, 51, 20, 61, 26, 57, 2, 46, 33, 12, 60, 41, 13, 48, 29, 55, 20, 39, 27, 57, 18, 62, 29, 55, 2, 31, 16, 37, 50, 26, 36, 6, 46, 9, 41, 27, 57, 23, 39, 26, 6, 51, 12, 31, 46, 7, 16, 27, 52, 19, 56, 26, 12, 33, 53, 1, 41, 8, 57, 46, 7, 54, 32, 47, 5, 49, 11, 60, 23, 5, 48, 10, 43, 19, 63, 35, 24, 49, 21, 59, 5, 31, 37, 14, 44, 7, 42, 6, 30, 46, 13, 44, 32, 19, 50, 4, 58, 8, 30, 62, 38, 28, 53, 21, 36, 13, 50, 21, 33, 15, 2, 44, 31, 14, 47 }, + { 37, 13, 39, 16, 28, 9, 57, 0, 25, 49, 21, 45, 18, 47, 12, 42, 0, 49, 22, 39, 16, 53, 25, 36, 0, 52, 22, 16, 6, 60, 4, 51, 0, 26, 37, 47, 10, 36, 63, 5, 57, 0, 18, 59, 23, 33, 51, 19, 0, 44, 15, 11, 54, 17, 42, 35, 53, 18, 58, 33, 49, 4, 34, 42, 0, 50, 43, 25, 16, 49, 34, 20, 37, 28, 12, 63, 16, 38, 25, 44, 0, 40, 52, 17, 35, 3, 50, 14, 8, 53, 11, 36, 25, 45, 9, 62, 0, 54, 28, 17, 50, 55, 15, 24, 57, 0, 53, 34, 23, 41, 15, 45, 0, 49, 16, 4, 48, 9, 63, 45, 0, 42, 58, 37, 61, 22, 54, 26 }, + { 0, 50, 21, 47, 54, 36, 27, 45, 52, 4, 34, 15, 63, 29, 37, 59, 17, 31, 6, 61, 28, 5, 48, 18, 59, 27, 34, 56, 44, 31, 35, 12, 41, 59, 16, 3, 40, 20, 50, 22, 30, 40, 52, 10, 45, 3, 59, 22, 37, 61, 29, 46, 31, 58, 2, 22, 9, 43, 3, 39, 14, 61, 24, 54, 15, 29, 11, 60, 39, 17, 5, 61, 0, 44, 50, 3, 31, 14, 58, 21, 54, 28, 15, 45, 60, 26, 33, 58, 44, 22, 60, 2, 57, 34, 49, 27, 18, 34, 21, 59, 29, 4, 36, 41, 8, 39, 28, 11, 62, 26, 53, 20, 35, 24, 59, 32, 29, 39, 24, 31, 57, 23, 11, 28, 5, 36, 11, 59 }, + { 44, 32, 63, 5, 20, 12, 41, 7, 30, 61, 42, 8, 39, 5, 33, 8, 24, 53, 45, 11, 37, 58, 7, 44, 10, 50, 3, 40, 8, 22, 53, 19, 46, 9, 33, 52, 24, 58, 8, 44, 13, 47, 8, 34, 38, 30, 14, 47, 7, 34, 4, 55, 9, 19, 40, 49, 56, 26, 60, 21, 30, 45, 10, 19, 40, 58, 23, 36, 3, 52, 45, 23, 54, 13, 22, 42, 53, 45, 7, 33, 10, 36, 57, 6, 29, 12, 41, 0, 30, 15, 41, 30, 17, 7, 16, 53, 40, 56, 2, 39, 12, 61, 10, 52, 31, 60, 16, 45, 1, 37, 7, 61, 40, 10, 43, 17, 58, 7, 54, 14, 4, 51, 39, 49, 18, 56, 42, 20 }, + { 14, 6, 24, 36, 56, 49, 22, 60, 18, 14, 23, 51, 26, 57, 21, 52, 41, 14, 35, 50, 19, 31, 40, 23, 33, 14, 63, 17, 32, 47, 7, 62, 23, 30, 56, 11, 42, 27, 14, 60, 35, 19, 28, 61, 17, 55, 25, 39, 53, 17, 42, 21, 38, 63, 25, 5, 14, 36, 12, 50, 1, 37, 59, 32, 2, 51, 6, 56, 27, 32, 11, 30, 38, 26, 60, 8, 26, 19, 62, 39, 50, 2, 21, 39, 53, 23, 56, 19, 49, 39, 5, 46, 55, 23, 42, 4, 31, 11, 47, 26, 45, 22, 48, 18, 21, 5, 48, 25, 57, 14, 47, 30, 3, 56, 12, 50, 1, 42, 19, 47, 35, 17, 8, 30, 45, 25, 4, 51 }, + { 28, 58, 43, 1, 31, 8, 33, 2, 44, 55, 32, 1, 60, 12, 46, 27, 4, 62, 23, 1, 56, 13, 62, 2, 54, 36, 25, 51, 1, 57, 26, 42, 3, 49, 17, 38, 1, 48, 31, 4, 54, 3, 50, 24, 1, 49, 5, 63, 13, 27, 52, 1, 48, 13, 45, 33, 52, 30, 46, 20, 55, 28, 6, 48, 24, 38, 20, 47, 14, 62, 48, 9, 58, 4, 36, 30, 56, 1, 34, 12, 18, 63, 25, 48, 4, 16, 37, 7, 62, 10, 52, 28, 13, 50, 36, 63, 24, 51, 15, 58, 8, 33, 1, 38, 56, 35, 42, 9, 33, 51, 22, 18, 48, 32, 27, 37, 23, 61, 33, 11, 59, 29, 62, 1, 53, 10, 60, 33 }, + { 12, 39, 17, 52, 26, 46, 53, 38, 25, 11, 48, 36, 16, 43, 2, 35, 55, 17, 39, 29, 43, 9, 28, 45, 20, 5, 46, 12, 42, 28, 13, 52, 36, 6, 60, 22, 54, 17, 62, 39, 25, 42, 15, 55, 44, 20, 31, 10, 35, 57, 24, 32, 29, 6, 59, 18, 7, 62, 3, 41, 10, 44, 16, 54, 13, 62, 31, 9, 41, 1, 21, 43, 18, 47, 15, 40, 11, 49, 28, 55, 46, 30, 8, 43, 32, 61, 28, 47, 25, 34, 21, 61, 32, 1, 20, 9, 46, 6, 35, 19, 41, 54, 27, 63, 14, 3, 51, 20, 62, 2, 38, 55, 8, 21, 63, 6, 46, 9, 26, 51, 3, 24, 43, 34, 16, 41, 18, 48 }, + { 62, 23, 55, 9, 15, 62, 19, 13, 58, 40, 6, 30, 54, 19, 50, 31, 10, 44, 6, 59, 21, 47, 51, 15, 60, 39, 30, 54, 21, 61, 19, 33, 14, 29, 43, 11, 34, 45, 7, 21, 10, 56, 36, 6, 38, 11, 58, 42, 2, 47, 11, 60, 50, 16, 41, 28, 38, 23, 47, 17, 35, 63, 22, 33, 42, 5, 45, 17, 53, 35, 25, 56, 33, 6, 51, 19, 60, 23, 43, 15, 5, 40, 58, 13, 51, 1, 45, 11, 54, 3, 43, 8, 37, 48, 59, 29, 39, 21, 61, 43, 3, 31, 10, 44, 24, 29, 60, 12, 28, 40, 11, 25, 43, 52, 14, 41, 16, 57, 44, 20, 40, 55, 12, 21, 57, 27, 35, 2 }, + { 37, 6, 31, 42, 40, 4, 29, 50, 0, 20, 63, 28, 9, 58, 14, 24, 63, 26, 48, 16, 34, 4, 32, 38, 23, 11, 58, 4, 37, 9, 45, 5, 63, 48, 26, 57, 2, 28, 32, 51, 46, 29, 13, 62, 27, 46, 28, 18, 50, 15, 40, 4, 19, 34, 54, 0, 53, 9, 26, 58, 28, 5, 49, 0, 57, 27, 19, 60, 29, 8, 59, 12, 37, 63, 24, 46, 3, 37, 6, 52, 26, 32, 20, 36, 9, 22, 59, 18, 35, 51, 14, 57, 17, 24, 12, 44, 56, 0, 30, 13, 59, 20, 49, 17, 54, 43, 6, 34, 46, 17, 58, 36, 0, 34, 29, 54, 25, 2, 36, 15, 60, 6, 37, 46, 4, 50, 9, 45 }, + { 19, 59, 48, 3, 24, 60, 44, 22, 34, 51, 15, 45, 41, 5, 33, 47, 0, 37, 12, 55, 25, 54, 8, 57, 0, 47, 18, 34, 49, 15, 55, 24, 40, 20, 8, 35, 53, 13, 41, 18, 0, 59, 22, 33, 4, 52, 8, 60, 24, 36, 31, 56, 45, 26, 10, 43, 15, 56, 36, 4, 51, 14, 39, 30, 12, 55, 36, 2, 39, 49, 4, 44, 17, 0, 32, 13, 53, 35, 59, 17, 62, 0, 55, 24, 52, 38, 31, 6, 42, 19, 29, 40, 4, 54, 33, 5, 16, 27, 52, 37, 23, 55, 7, 37, 0, 39, 23, 49, 4, 53, 31, 15, 59, 10, 50, 4, 60, 34, 48, 7, 31, 49, 27, 14, 62, 22, 53, 29 }, + { 46, 21, 14, 51, 36, 17, 7, 57, 10, 32, 3, 37, 22, 60, 39, 18, 56, 20, 42, 3, 36, 10, 44, 26, 41, 29, 53, 27, 2, 39, 30, 52, 0, 59, 15, 48, 23, 61, 6, 58, 37, 12, 40, 49, 16, 39, 20, 44, 0, 62, 8, 21, 3, 59, 23, 32, 49, 31, 12, 44, 22, 59, 18, 50, 24, 7, 43, 52, 15, 23, 41, 26, 51, 28, 55, 39, 21, 27, 10, 42, 12, 45, 27, 47, 3, 15, 63, 26, 55, 0, 60, 26, 45, 18, 62, 38, 58, 49, 8, 47, 4, 33, 46, 29, 57, 13, 56, 16, 59, 21, 5, 47, 23, 39, 18, 44, 13, 22, 28, 53, 19, 0, 58, 32, 41, 7, 26, 13 }, + { 0, 56, 34, 28, 11, 55, 31, 47, 26, 41, 56, 13, 53, 28, 11, 49, 7, 52, 32, 61, 50, 22, 63, 17, 13, 56, 7, 19, 43, 62, 10, 21, 37, 32, 43, 4, 38, 19, 44, 25, 31, 54, 5, 23, 61, 30, 53, 12, 35, 22, 43, 53, 37, 48, 7, 62, 20, 2, 61, 41, 8, 34, 47, 9, 63, 34, 28, 10, 55, 33, 14, 57, 7, 47, 9, 61, 4, 49, 31, 50, 21, 38, 8, 16, 57, 44, 33, 5, 49, 36, 12, 50, 7, 34, 10, 25, 2, 22, 36, 15, 26, 61, 18, 9, 22, 46, 32, 8, 27, 37, 44, 30, 55, 3, 62, 24, 38, 56, 5, 45, 38, 24, 43, 10, 19, 54, 39, 61 }, + { 41, 30, 8, 63, 43, 23, 38, 3, 62, 19, 8, 49, 25, 1, 58, 30, 23, 40, 9, 28, 18, 40, 6, 38, 49, 22, 35, 59, 8, 27, 50, 5, 56, 17, 11, 50, 30, 9, 55, 2, 51, 19, 34, 47, 9, 41, 6, 26, 48, 57, 14, 28, 17, 12, 39, 13, 37, 46, 25, 19, 54, 27, 1, 37, 16, 45, 20, 60, 1, 48, 20, 38, 31, 22, 42, 15, 19, 44, 1, 61, 6, 34, 56, 40, 29, 10, 20, 46, 13, 22, 41, 23, 59, 42, 30, 51, 45, 13, 63, 53, 42, 12, 51, 38, 62, 2, 26, 41, 50, 1, 61, 10, 19, 42, 31, 8, 49, 32, 12, 63, 9, 52, 16, 56, 36, 2, 31, 16 }, + { 52, 5, 47, 20, 1, 53, 12, 50, 16, 35, 43, 21, 33, 43, 16, 44, 3, 59, 14, 46, 1, 30, 60, 33, 2, 45, 12, 42, 31, 47, 14, 33, 46, 25, 55, 27, 60, 36, 16, 42, 14, 46, 26, 1, 55, 15, 63, 32, 2, 38, 5, 47, 33, 61, 30, 52, 4, 57, 6, 38, 11, 43, 61, 24, 52, 3, 31, 22, 42, 10, 62, 3, 59, 11, 35, 57, 33, 54, 24, 14, 29, 48, 18, 2, 60, 41, 53, 24, 32, 62, 3, 53, 15, 1, 55, 17, 32, 40, 6, 31, 1, 40, 28, 5, 35, 52, 19, 63, 13, 33, 17, 41, 52, 26, 15, 57, 1, 20, 42, 17, 35, 27, 48, 5, 25, 50, 44, 11 }, + { 35, 25, 38, 57, 33, 17, 40, 6, 59, 27, 54, 5, 61, 10, 52, 26, 36, 19, 51, 35, 57, 48, 11, 20, 54, 25, 61, 16, 1, 58, 24, 61, 3, 39, 7, 47, 1, 22, 49, 28, 63, 10, 58, 32, 17, 36, 45, 19, 51, 29, 59, 10, 50, 1, 23, 42, 18, 29, 51, 21, 56, 32, 14, 5, 40, 58, 47, 13, 54, 35, 29, 45, 18, 52, 26, 2, 38, 8, 46, 36, 58, 11, 52, 35, 17, 28, 1, 58, 9, 39, 17, 28, 37, 48, 20, 9, 57, 24, 50, 19, 58, 16, 48, 25, 43, 11, 35, 6, 45, 24, 56, 4, 36, 7, 47, 35, 52, 28, 59, 30, 2, 61, 21, 33, 63, 12, 18, 59 }, + { 3, 49, 15, 10, 27, 61, 25, 45, 30, 0, 14, 47, 31, 38, 17, 62, 7, 55, 27, 4, 15, 24, 42, 52, 10, 34, 5, 51, 36, 18, 41, 11, 35, 21, 62, 13, 33, 57, 8, 35, 5, 40, 21, 43, 52, 3, 24, 56, 11, 16, 33, 25, 41, 20, 55, 8, 60, 35, 15, 48, 2, 57, 30, 49, 18, 25, 6, 39, 17, 57, 7, 25, 43, 5, 49, 16, 62, 22, 55, 4, 25, 43, 23, 7, 50, 11, 37, 48, 14, 51, 33, 57, 7, 27, 39, 46, 4, 29, 11, 43, 34, 56, 7, 60, 20, 54, 30, 57, 22, 49, 9, 33, 54, 14, 63, 23, 6, 43, 10, 40, 50, 13, 44, 8, 38, 33, 46, 23 }, + { 55, 39, 22, 50, 44, 4, 36, 9, 52, 23, 37, 59, 21, 2, 46, 13, 31, 41, 11, 45, 62, 29, 6, 37, 19, 48, 30, 23, 44, 7, 53, 28, 54, 16, 41, 29, 44, 18, 52, 24, 60, 15, 48, 7, 27, 59, 9, 34, 42, 54, 7, 63, 4, 46, 31, 27, 45, 0, 40, 26, 34, 17, 37, 10, 53, 29, 36, 50, 2, 27, 51, 11, 61, 37, 23, 41, 30, 7, 18, 50, 39, 14, 63, 32, 45, 61, 19, 30, 25, 44, 2, 47, 23, 63, 11, 34, 59, 37, 60, 3, 22, 14, 44, 30, 15, 0, 47, 15, 3, 38, 61, 20, 27, 45, 11, 39, 51, 16, 55, 3, 22, 54, 29, 58, 1, 57, 6, 29 }, + { 9, 17, 60, 2, 34, 56, 20, 62, 39, 12, 49, 6, 29, 56, 34, 48, 0, 58, 22, 38, 18, 43, 56, 0, 63, 14, 55, 3, 59, 31, 15, 45, 0, 49, 6, 58, 3, 38, 12, 45, 0, 37, 29, 57, 13, 39, 30, 49, 0, 23, 44, 36, 16, 57, 13, 54, 11, 24, 63, 9, 53, 7, 62, 42, 0, 59, 15, 23, 63, 34, 40, 16, 32, 0, 53, 12, 48, 28, 59, 33, 0, 53, 9, 27, 3, 22, 54, 5, 56, 9, 61, 13, 42, 14, 52, 19, 0, 21, 47, 27, 53, 36, 3, 50, 39, 58, 25, 40, 53, 28, 12, 50, 0, 59, 32, 2, 21, 34, 26, 46, 37, 7, 18, 47, 24, 14, 53, 42 }, + { 61, 32, 13, 54, 29, 7, 46, 13, 28, 57, 18, 41, 53, 15, 9, 39, 24, 49, 33, 3, 53, 9, 26, 32, 40, 28, 46, 39, 25, 9, 56, 21, 63, 37, 26, 22, 51, 27, 17, 56, 31, 53, 4, 43, 22, 46, 12, 18, 60, 40, 20, 26, 50, 21, 39, 5, 49, 33, 16, 44, 22, 46, 20, 32, 24, 45, 8, 43, 12, 46, 4, 48, 56, 20, 29, 58, 3, 40, 10, 42, 31, 21, 47, 41, 56, 38, 15, 42, 36, 27, 20, 33, 55, 3, 26, 44, 31, 54, 12, 35, 9, 63, 28, 10, 21, 32, 9, 60, 17, 8, 43, 29, 40, 16, 36, 48, 60, 7, 57, 14, 62, 31, 42, 15, 36, 40, 20, 26 }, + { 0, 37, 47, 23, 41, 18, 32, 48, 1, 35, 8, 25, 4, 26, 63, 20, 54, 8, 16, 61, 35, 23, 51, 15, 58, 7, 12, 20, 50, 34, 42, 4, 38, 10, 32, 47, 8, 60, 41, 20, 9, 25, 50, 19, 62, 1, 37, 56, 28, 8, 53, 11, 3, 58, 34, 43, 19, 60, 38, 4, 58, 31, 3, 51, 11, 55, 38, 30, 21, 58, 19, 26, 9, 44, 36, 13, 46, 20, 62, 24, 13, 60, 5, 28, 12, 34, 7, 59, 0, 53, 45, 6, 38, 30, 50, 7, 62, 16, 41, 5, 46, 18, 55, 42, 51, 5, 45, 23, 34, 48, 19, 58, 5, 25, 54, 19, 13, 41, 28, 21, 0, 49, 10, 60, 4, 51, 9, 45 }, + { 19, 28, 6, 58, 10, 51, 4, 22, 55, 42, 60, 45, 34, 51, 42, 5, 30, 45, 27, 40, 13, 47, 4, 49, 21, 38, 60, 29, 2, 57, 17, 27, 52, 19, 61, 14, 30, 34, 2, 44, 63, 33, 11, 35, 16, 51, 25, 6, 14, 47, 31, 61, 37, 29, 18, 8, 52, 2, 28, 54, 13, 41, 15, 62, 35, 18, 2, 60, 6, 33, 41, 61, 31, 6, 56, 17, 34, 50, 6, 52, 44, 35, 16, 51, 59, 24, 48, 18, 31, 40, 16, 49, 21, 60, 17, 39, 10, 49, 32, 57, 24, 39, 1, 25, 18, 62, 37, 12, 56, 1, 37, 11, 52, 44, 9, 30, 47, 4, 51, 40, 55, 25, 34, 27, 56, 30, 32, 54 }, + { 63, 40, 49, 15, 43, 26, 63, 38, 16, 20, 30, 12, 57, 14, 19, 60, 36, 12, 59, 2, 57, 17, 42, 31, 1, 44, 16, 35, 47, 11, 32, 48, 13, 43, 1, 39, 51, 12, 57, 23, 6, 40, 53, 3, 55, 31, 39, 60, 35, 44, 5, 15, 45, 1, 62, 41, 26, 14, 47, 22, 36, 27, 50, 9, 26, 47, 52, 28, 54, 16, 1, 13, 51, 39, 23, 63, 1, 30, 15, 26, 2, 57, 19, 37, 1, 44, 21, 50, 13, 63, 8, 24, 56, 1, 35, 25, 58, 20, 2, 28, 14, 51, 33, 59, 13, 30, 4, 49, 31, 24, 63, 26, 33, 3, 58, 38, 62, 24, 32, 8, 17, 45, 5, 48, 18, 3, 43, 11 }, + { 21, 4, 24, 34, 59, 1, 37, 11, 53, 5, 47, 2, 22, 40, 32, 1, 24, 50, 21, 29, 38, 25, 63, 8, 55, 24, 53, 6, 62, 23, 59, 3, 54, 20, 58, 24, 5, 46, 15, 38, 48, 14, 27, 42, 23, 7, 46, 10, 17, 58, 25, 52, 23, 32, 49, 12, 55, 30, 40, 7, 59, 1, 56, 21, 39, 4, 23, 15, 37, 46, 55, 42, 21, 4, 48, 8, 45, 54, 37, 55, 32, 8, 46, 10, 30, 54, 4, 41, 25, 29, 36, 48, 11, 43, 14, 47, 5, 43, 53, 36, 61, 10, 45, 6, 41, 54, 27, 43, 16, 55, 6, 46, 18, 42, 23, 15, 1, 45, 12, 60, 37, 22, 62, 12, 39, 59, 16, 52 }, + { 47, 35, 56, 7, 19, 46, 31, 50, 33, 24, 61, 35, 50, 7, 53, 44, 55, 6, 46, 10, 52, 5, 21, 43, 36, 10, 18, 41, 26, 37, 8, 29, 40, 36, 9, 49, 34, 26, 61, 21, 7, 59, 18, 62, 29, 54, 20, 32, 51, 0, 40, 10, 55, 6, 20, 36, 9, 61, 5, 51, 44, 19, 33, 43, 13, 57, 40, 63, 8, 24, 29, 10, 60, 34, 27, 40, 25, 18, 10, 42, 21, 49, 26, 62, 38, 12, 33, 61, 5, 57, 2, 19, 54, 28, 62, 22, 38, 31, 16, 7, 22, 47, 29, 17, 35, 8, 20, 51, 2, 40, 22, 50, 13, 61, 28, 53, 35, 20, 56, 30, 2, 53, 14, 41, 23, 34, 8, 31 }, + { 12, 2, 42, 29, 52, 13, 21, 8, 55, 14, 41, 17, 28, 58, 23, 11, 17, 36, 31, 62, 17, 34, 50, 14, 28, 61, 33, 52, 2, 51, 17, 45, 7, 25, 62, 30, 18, 55, 0, 42, 30, 35, 45, 1, 12, 48, 3, 63, 21, 36, 30, 48, 19, 59, 43, 27, 46, 17, 34, 25, 12, 29, 53, 6, 48, 31, 11, 34, 49, 3, 36, 50, 19, 47, 14, 61, 11, 36, 58, 4, 60, 14, 39, 22, 6, 52, 15, 35, 17, 46, 31, 42, 9, 34, 3, 52, 12, 60, 26, 56, 40, 2, 53, 23, 57, 38, 62, 14, 36, 59, 10, 31, 39, 6, 49, 9, 41, 26, 5, 48, 43, 27, 33, 58, 1, 50, 25, 57 }, + { 61, 37, 15, 61, 3, 39, 58, 43, 26, 0, 44, 10, 47, 3, 37, 63, 28, 43, 13, 39, 3, 57, 30, 59, 0, 48, 5, 43, 13, 22, 60, 33, 55, 15, 42, 4, 52, 10, 45, 13, 54, 4, 24, 49, 37, 26, 41, 14, 42, 9, 61, 13, 38, 23, 3, 53, 0, 58, 21, 42, 63, 10, 17, 61, 25, 0, 58, 28, 17, 44, 57, 12, 27, 0, 55, 5, 52, 28, 23, 47, 29, 0, 43, 17, 58, 28, 47, 23, 55, 10, 58, 23, 51, 40, 18, 33, 45, 0, 49, 8, 32, 61, 19, 48, 0, 26, 7, 47, 29, 18, 44, 0, 56, 34, 20, 59, 15, 51, 37, 18, 10, 52, 7, 20, 46, 9, 38, 17 }, + { 6, 27, 48, 23, 45, 29, 5, 18, 38, 62, 27, 56, 20, 32, 15, 9, 48, 0, 54, 22, 45, 20, 7, 41, 23, 39, 19, 27, 58, 31, 44, 0, 12, 50, 23, 56, 20, 39, 32, 59, 16, 52, 33, 9, 57, 22, 6, 58, 28, 50, 24, 2, 56, 35, 16, 45, 32, 38, 15, 54, 2, 38, 46, 22, 35, 45, 20, 5, 52, 25, 7, 35, 59, 32, 22, 43, 38, 3, 51, 16, 34, 53, 32, 50, 3, 40, 8, 43, 0, 39, 27, 4, 14, 61, 8, 55, 15, 41, 20, 44, 27, 13, 39, 11, 46, 42, 54, 33, 4, 52, 23, 61, 14, 25, 43, 2, 33, 11, 63, 29, 61, 17, 40, 55, 22, 62, 28, 44 }, + { 20, 54, 8, 56, 35, 10, 63, 31, 52, 12, 48, 6, 59, 41, 52, 33, 19, 58, 25, 49, 11, 37, 47, 12, 54, 15, 56, 35, 7, 47, 16, 53, 28, 34, 5, 37, 28, 8, 48, 3, 28, 38, 18, 61, 16, 43, 53, 32, 4, 17, 47, 27, 44, 8, 63, 10, 25, 49, 6, 37, 24, 52, 32, 3, 50, 12, 41, 56, 38, 14, 62, 20, 40, 16, 53, 31, 18, 63, 41, 9, 59, 7, 13, 25, 57, 20, 63, 26, 53, 18, 48, 62, 30, 46, 21, 25, 58, 29, 36, 4, 55, 34, 6, 60, 31, 16, 21, 12, 58, 38, 9, 29, 47, 7, 52, 30, 57, 44, 22, 0, 35, 45, 3, 31, 14, 36, 0, 51 }, + { 42, 14, 33, 24, 16, 49, 40, 2, 22, 33, 16, 36, 25, 1, 21, 61, 38, 8, 33, 4, 62, 26, 29, 60, 6, 46, 30, 11, 63, 4, 36, 40, 19, 57, 46, 11, 41, 63, 22, 25, 58, 10, 46, 2, 34, 27, 11, 38, 56, 34, 12, 53, 18, 33, 41, 51, 13, 28, 60, 20, 47, 14, 29, 59, 16, 62, 8, 22, 32, 47, 9, 49, 2, 44, 7, 12, 45, 6, 20, 27, 45, 24, 62, 42, 36, 11, 33, 15, 37, 7, 32, 10, 37, 1, 35, 50, 6, 11, 63, 24, 52, 15, 50, 24, 3, 37, 56, 27, 34, 22, 49, 16, 36, 62, 17, 39, 4, 15, 54, 24, 50, 8, 58, 26, 49, 54, 11, 30 }, + { 4, 59, 41, 1, 53, 12, 25, 45, 59, 7, 51, 39, 54, 14, 46, 4, 27, 53, 16, 44, 18, 51, 1, 32, 25, 2, 50, 40, 20, 54, 24, 9, 62, 2, 27, 60, 1, 17, 36, 50, 6, 40, 30, 55, 41, 19, 49, 1, 21, 60, 40, 5, 62, 1, 22, 30, 57, 4, 43, 31, 1, 55, 40, 7, 27, 37, 30, 54, 1, 19, 42, 30, 56, 26, 62, 49, 24, 57, 37, 56, 2, 39, 16, 5, 30, 55, 3, 49, 60, 23, 56, 44, 17, 52, 13, 42, 28, 48, 18, 45, 9, 37, 21, 41, 58, 10, 48, 1, 63, 5, 41, 57, 2, 24, 12, 48, 27, 42, 32, 46, 13, 38, 19, 34, 5, 41, 25, 60 }, + { 39, 28, 21, 46, 32, 57, 36, 9, 19, 42, 4, 29, 11, 43, 30, 49, 13, 42, 35, 56, 9, 39, 15, 52, 36, 61, 18, 26, 45, 14, 31, 48, 21, 43, 14, 33, 49, 54, 14, 44, 21, 62, 13, 23, 8, 62, 15, 51, 44, 7, 30, 37, 20, 42, 56, 7, 39, 18, 50, 11, 61, 9, 19, 43, 57, 2, 48, 11, 39, 60, 28, 4, 37, 17, 35, 1, 33, 11, 31, 14, 48, 19, 35, 51, 46, 21, 44, 29, 12, 41, 2, 22, 58, 26, 54, 4, 59, 38, 2, 33, 57, 1, 63, 13, 28, 51, 15, 40, 18, 45, 8, 30, 43, 37, 54, 19, 8, 59, 21, 6, 60, 29, 55, 10, 63, 15, 47, 17 }, + { 3, 50, 10, 62, 18, 5, 27, 49, 60, 23, 55, 18, 62, 24, 56, 10, 59, 28, 2, 23, 34, 59, 43, 20, 10, 42, 8, 49, 1, 37, 57, 6, 51, 29, 53, 7, 23, 31, 5, 32, 51, 0, 35, 54, 45, 31, 5, 26, 36, 24, 55, 15, 48, 29, 14, 48, 26, 60, 21, 41, 36, 26, 50, 33, 14, 44, 17, 24, 52, 15, 46, 23, 54, 6, 47, 21, 60, 50, 4, 53, 29, 61, 8, 23, 1, 60, 19, 6, 53, 16, 47, 34, 6, 39, 16, 31, 12, 20, 53, 22, 30, 43, 25, 46, 35, 6, 44, 32, 53, 26, 55, 19, 11, 59, 5, 33, 51, 1, 35, 53, 25, 3, 42, 23, 44, 32, 7, 53 }, + { 22, 44, 37, 6, 26, 51, 38, 0, 34, 13, 31, 46, 3, 37, 6, 19, 40, 21, 47, 63, 12, 5, 29, 55, 22, 58, 34, 28, 60, 22, 11, 41, 17, 38, 9, 44, 59, 39, 56, 19, 11, 47, 25, 15, 3, 39, 57, 17, 61, 11, 46, 3, 58, 9, 54, 35, 2, 34, 8, 45, 15, 56, 5, 23, 53, 33, 63, 35, 4, 59, 10, 51, 13, 61, 29, 41, 15, 25, 43, 19, 40, 10, 54, 33, 41, 12, 38, 51, 31, 26, 61, 9, 30, 45, 24, 62, 49, 40, 10, 61, 14, 49, 5, 17, 54, 20, 60, 23, 3, 13, 35, 50, 32, 23, 46, 27, 38, 63, 16, 12, 39, 48, 18, 51, 1, 27, 56, 35 }, + { 63, 15, 30, 55, 43, 14, 57, 17, 53, 44, 7, 48, 26, 50, 32, 60, 0, 53, 14, 31, 50, 24, 46, 0, 38, 13, 4, 52, 16, 45, 30, 59, 0, 25, 55, 35, 16, 10, 26, 42, 58, 29, 60, 38, 50, 22, 28, 47, 0, 50, 28, 19, 33, 39, 11, 44, 16, 52, 24, 59, 3, 38, 27, 51, 0, 21, 7, 42, 26, 34, 21, 40, 33, 18, 39, 3, 54, 38, 8, 59, 0, 44, 27, 15, 58, 28, 57, 9, 43, 0, 36, 50, 20, 59, 8, 34, 0, 27, 47, 7, 36, 19, 56, 32, 0, 38, 11, 29, 62, 47, 6, 61, 0, 41, 14, 56, 10, 23, 45, 31, 57, 8, 36, 13, 58, 38, 11, 19 }, + { 0, 34, 12, 47, 21, 2, 40, 30, 11, 25, 61, 20, 40, 15, 35, 22, 45, 36, 7, 41, 17, 57, 9, 48, 32, 62, 44, 24, 35, 3, 54, 13, 33, 63, 19, 4, 48, 22, 62, 2, 37, 8, 33, 6, 20, 52, 9, 32, 43, 13, 39, 63, 25, 4, 49, 23, 62, 32, 9, 30, 48, 18, 63, 12, 46, 29, 58, 13, 48, 8, 57, 31, 0, 51, 9, 58, 12, 22, 47, 29, 35, 22, 49, 5, 46, 4, 34, 20, 63, 24, 56, 11, 41, 3, 51, 19, 56, 35, 17, 58, 28, 42, 9, 45, 59, 26, 51, 42, 17, 36, 25, 15, 53, 21, 44, 3, 30, 55, 5, 50, 21, 28, 61, 32, 6, 49, 28, 46 }, + { 58, 42, 60, 4, 31, 59, 22, 63, 35, 38, 9, 54, 1, 57, 8, 51, 16, 58, 27, 53, 3, 38, 30, 15, 27, 6, 19, 56, 10, 50, 21, 36, 47, 5, 43, 28, 51, 32, 13, 46, 18, 54, 16, 43, 63, 12, 36, 59, 22, 34, 5, 52, 17, 59, 27, 41, 0, 19, 55, 37, 13, 43, 6, 34, 41, 10, 36, 55, 19, 44, 3, 16, 58, 27, 49, 25, 32, 62, 17, 55, 13, 63, 18, 52, 25, 37, 17, 48, 13, 32, 5, 46, 28, 37, 14, 43, 25, 5, 51, 39, 3, 52, 33, 22, 8, 40, 12, 4, 57, 9, 46, 39, 28, 58, 13, 62, 17, 42, 19, 36, 0, 47, 16, 43, 24, 21, 54, 13 }, + { 25, 9, 23, 50, 36, 8, 45, 14, 3, 51, 16, 28, 44, 12, 42, 29, 4, 26, 10, 47, 22, 61, 18, 54, 51, 39, 46, 13, 41, 26, 58, 7, 18, 39, 12, 57, 15, 1, 52, 27, 41, 23, 48, 1, 27, 45, 18, 2, 57, 26, 55, 8, 43, 31, 6, 58, 14, 51, 40, 5, 61, 31, 24, 54, 17, 60, 22, 1, 39, 30, 53, 45, 36, 13, 43, 5, 45, 2, 37, 6, 34, 42, 2, 39, 10, 62, 7, 54, 40, 18, 60, 15, 52, 21, 63, 8, 55, 46, 15, 30, 23, 13, 62, 16, 50, 24, 58, 31, 48, 21, 34, 2, 49, 7, 31, 37, 26, 48, 9, 61, 40, 11, 52, 2, 60, 40, 4, 37 }, + { 52, 28, 39, 16, 54, 19, 29, 55, 42, 20, 58, 33, 24, 63, 18, 55, 39, 62, 43, 34, 12, 40, 6, 35, 2, 25, 8, 62, 34, 1, 31, 42, 61, 27, 53, 24, 40, 61, 34, 8, 59, 4, 30, 56, 40, 6, 53, 42, 10, 48, 16, 37, 12, 46, 21, 36, 47, 11, 28, 45, 22, 10, 57, 2, 49, 31, 14, 44, 61, 11, 25, 6, 23, 63, 18, 36, 28, 56, 20, 51, 11, 48, 27, 56, 32, 22, 45, 30, 2, 42, 27, 39, 1, 44, 23, 31, 38, 22, 11, 61, 43, 54, 4, 47, 35, 2, 44, 16, 28, 54, 12, 62, 18, 43, 10, 52, 1, 58, 33, 15, 29, 56, 20, 34, 9, 30, 48, 17 }, + { 46, 2, 56, 11, 41, 1, 49, 6, 27, 47, 2, 48, 5, 32, 37, 3, 13, 19, 32, 1, 55, 28, 60, 17, 43, 59, 32, 20, 49, 16, 55, 23, 14, 46, 2, 36, 6, 30, 20, 49, 12, 47, 35, 14, 21, 60, 29, 14, 35, 24, 46, 1, 56, 29, 53, 8, 33, 23, 56, 1, 35, 46, 20, 39, 26, 4, 53, 28, 17, 38, 60, 34, 48, 9, 55, 15, 46, 7, 41, 31, 60, 24, 16, 36, 1, 59, 19, 52, 35, 6, 55, 11, 59, 33, 7, 57, 4, 29, 48, 1, 19, 26, 37, 30, 18, 63, 37, 6, 59, 1, 40, 24, 56, 33, 46, 22, 35, 7, 24, 53, 39, 5, 26, 45, 55, 18, 62, 7 }, + { 20, 60, 29, 34, 20, 62, 33, 52, 10, 36, 13, 60, 41, 21, 50, 27, 56, 49, 8, 51, 21, 45, 11, 48, 8, 23, 53, 3, 29, 44, 5, 52, 9, 32, 50, 17, 43, 56, 3, 38, 24, 10, 62, 25, 51, 9, 33, 49, 61, 7, 30, 62, 22, 19, 2, 42, 63, 5, 49, 18, 60, 15, 52, 7, 43, 56, 23, 50, 5, 50, 2, 20, 41, 30, 1, 52, 22, 61, 14, 26, 3, 43, 53, 7, 47, 28, 11, 14, 23, 58, 33, 25, 47, 13, 50, 17, 40, 54, 34, 60, 41, 6, 59, 14, 50, 7, 25, 55, 20, 42, 51, 8, 27, 4, 16, 60, 28, 50, 44, 3, 22, 49, 63, 12, 33, 1, 43, 31 }, + { 36, 5, 46, 8, 44, 24, 13, 39, 25, 57, 31, 18, 8, 52, 10, 45, 6, 30, 36, 24, 63, 4, 33, 26, 57, 40, 15, 56, 37, 12, 40, 25, 37, 58, 11, 63, 21, 45, 16, 60, 31, 53, 18, 33, 3, 45, 23, 0, 20, 54, 40, 15, 50, 38, 60, 16, 25, 42, 29, 38, 7, 41, 25, 62, 18, 33, 8, 35, 42, 16, 32, 56, 12, 39, 59, 19, 34, 9, 49, 38, 57, 12, 21, 50, 14, 40, 61, 44, 50, 9, 49, 19, 3, 29, 35, 62, 12, 24, 7, 18, 52, 32, 10, 46, 21, 41, 32, 11, 36, 29, 14, 34, 60, 38, 54, 11, 41, 14, 19, 57, 32, 16, 7, 41, 51, 25, 14, 57 }, + { 53, 18, 26, 50, 15, 58, 4, 63, 17, 43, 7, 40, 61, 35, 15, 41, 23, 60, 16, 38, 14, 42, 19, 50, 0, 31, 10, 46, 27, 63, 18, 60, 0, 20, 29, 39, 8, 26, 37, 5, 42, 0, 44, 39, 57, 17, 58, 41, 28, 37, 4, 32, 9, 44, 12, 31, 54, 10, 59, 14, 27, 53, 12, 36, 0, 47, 13, 63, 21, 58, 10, 24, 50, 27, 4, 26, 44, 53, 31, 0, 18, 42, 29, 33, 57, 4, 32, 26, 0, 38, 16, 61, 41, 53, 20, 0, 42, 44, 49, 27, 10, 56, 39, 0, 57, 15, 53, 49, 3, 61, 22, 47, 17, 5, 49, 26, 2, 63, 39, 10, 47, 27, 37, 23, 4, 59, 38, 10 }, + { 23, 39, 61, 3, 37, 28, 48, 31, 0, 34, 51, 23, 2, 26, 58, 0, 53, 11, 46, 1, 57, 29, 52, 14, 37, 61, 21, 35, 2, 49, 7, 34, 47, 55, 4, 33, 54, 13, 58, 52, 19, 50, 22, 7, 13, 29, 36, 11, 51, 17, 60, 25, 55, 4, 34, 51, 0, 35, 20, 48, 32, 3, 51, 30, 59, 28, 40, 3, 46, 29, 54, 43, 7, 62, 47, 11, 39, 4, 23, 46, 55, 8, 63, 5, 25, 37, 18, 46, 21, 56, 31, 5, 36, 8, 45, 58, 26, 15, 2, 36, 47, 21, 29, 44, 25, 34, 3, 27, 43, 10, 52, 0, 45, 30, 24, 36, 43, 18, 34, 59, 0, 52, 61, 15, 44, 19, 30, 49 }, + { 0, 27, 12, 43, 54, 9, 22, 53, 21, 46, 15, 55, 29, 47, 20, 33, 39, 28, 59, 35, 9, 44, 5, 24, 47, 7, 52, 17, 56, 22, 30, 42, 14, 26, 45, 18, 49, 1, 24, 34, 11, 27, 55, 32, 61, 47, 2, 56, 6, 44, 13, 47, 36, 27, 58, 22, 16, 47, 40, 4, 57, 38, 21, 45, 16, 9, 56, 26, 11, 38, 0, 22, 36, 17, 33, 57, 16, 30, 62, 15, 35, 40, 20, 45, 59, 10, 54, 8, 63, 13, 52, 27, 22, 57, 28, 12, 32, 51, 55, 22, 63, 4, 16, 54, 12, 62, 45, 19, 58, 13, 32, 40, 20, 56, 7, 57, 9, 54, 6, 29, 42, 21, 8, 55, 35, 47, 6, 41 }, + { 56, 33, 58, 32, 19, 35, 42, 6, 59, 11, 38, 5, 49, 12, 62, 7, 52, 17, 5, 25, 54, 20, 61, 31, 54, 27, 41, 11, 44, 5, 59, 12, 36, 51, 10, 61, 28, 41, 48, 9, 43, 63, 5, 40, 20, 8, 49, 26, 34, 21, 58, 1, 18, 45, 7, 39, 61, 26, 8, 50, 23, 10, 63, 5, 55, 37, 19, 49, 52, 15, 59, 47, 13, 54, 1, 25, 42, 58, 10, 48, 3, 27, 50, 1, 17, 48, 34, 41, 16, 40, 2, 45, 10, 39, 17, 61, 5, 38, 19, 9, 41, 31, 60, 38, 5, 23, 36, 8, 30, 55, 24, 63, 12, 48, 14, 51, 31, 20, 45, 25, 12, 50, 32, 2, 28, 11, 62, 14 }, + { 44, 16, 7, 48, 1, 62, 16, 50, 27, 33, 61, 25, 17, 44, 31, 14, 22, 43, 32, 48, 18, 40, 8, 36, 3, 16, 33, 62, 23, 38, 25, 53, 2, 21, 41, 6, 22, 15, 59, 29, 16, 37, 26, 15, 52, 42, 23, 15, 54, 39, 10, 30, 53, 11, 49, 24, 2, 43, 55, 17, 34, 44, 15, 31, 24, 44, 2, 32, 7, 35, 25, 5, 40, 45, 29, 51, 6, 21, 37, 52, 24, 60, 13, 31, 53, 23, 2, 28, 49, 24, 31, 60, 20, 51, 1, 34, 48, 14, 59, 33, 50, 1, 18, 33, 48, 60, 17, 51, 39, 6, 38, 2, 35, 29, 40, 23, 1, 62, 15, 53, 37, 17, 46, 57, 40, 51, 24, 22 }, + { 5, 37, 52, 24, 45, 13, 40, 3, 45, 9, 19, 42, 56, 4, 37, 46, 56, 2, 63, 11, 51, 1, 49, 13, 59, 45, 39, 1, 48, 15, 58, 9, 46, 31, 54, 35, 57, 38, 3, 46, 56, 4, 47, 57, 1, 30, 38, 63, 3, 46, 28, 63, 41, 14, 33, 62, 19, 32, 13, 28, 61, 1, 53, 42, 11, 60, 22, 62, 27, 42, 61, 31, 19, 8, 61, 12, 32, 55, 2, 18, 33, 12, 43, 36, 9, 62, 30, 55, 6, 58, 35, 7, 43, 29, 54, 23, 43, 30, 3, 25, 11, 45, 52, 28, 7, 14, 42, 1, 22, 50, 16, 53, 19, 59, 4, 46, 33, 41, 4, 35, 58, 5, 26, 13, 20, 2, 34, 54 }, + { 30, 63, 21, 10, 26, 55, 29, 59, 23, 39, 53, 1, 36, 24, 59, 27, 10, 34, 23, 38, 30, 60, 22, 42, 28, 19, 9, 57, 30, 19, 43, 33, 13, 63, 3, 19, 11, 50, 31, 20, 14, 34, 10, 35, 17, 59, 7, 31, 19, 25, 50, 5, 20, 57, 29, 6, 52, 41, 4, 46, 20, 37, 26, 17, 49, 6, 39, 18, 53, 14, 3, 49, 57, 23, 34, 48, 14, 41, 28, 38, 56, 6, 58, 25, 39, 19, 43, 15, 37, 11, 47, 18, 53, 4, 37, 9, 62, 21, 53, 40, 57, 24, 13, 40, 56, 26, 47, 31, 59, 25, 45, 27, 10, 43, 21, 61, 13, 27, 48, 9, 23, 43, 31, 62, 38, 59, 9, 47 }, + { 25, 4, 40, 60, 34, 6, 18, 36, 8, 57, 12, 30, 49, 14, 6, 54, 41, 16, 50, 6, 43, 15, 34, 4, 53, 24, 50, 35, 4, 51, 7, 55, 28, 24, 39, 44, 60, 7, 25, 62, 42, 53, 24, 61, 28, 45, 52, 12, 48, 37, 9, 35, 43, 3, 37, 48, 12, 58, 30, 52, 9, 59, 6, 57, 33, 29, 48, 4, 37, 45, 20, 34, 10, 39, 0, 60, 22, 45, 8, 63, 21, 42, 14, 49, 3, 56, 11, 46, 21, 61, 0, 42, 25, 13, 63, 17, 36, 8, 46, 16, 6, 35, 63, 0, 21, 37, 4, 57, 9, 34, 5, 61, 48, 32, 8, 37, 54, 17, 56, 30, 60, 0, 50, 16, 7, 29, 42, 17 }, + { 32, 50, 15, 48, 2, 43, 52, 25, 47, 16, 32, 63, 21, 52, 40, 19, 0, 61, 29, 58, 20, 56, 26, 46, 12, 55, 6, 22, 62, 32, 17, 40, 0, 49, 34, 8, 27, 32, 48, 0, 21, 39, 5, 44, 12, 6, 22, 40, 0, 57, 16, 60, 23, 17, 54, 22, 36, 15, 24, 39, 19, 34, 47, 23, 0, 54, 13, 51, 24, 9, 55, 16, 52, 27, 44, 20, 4, 54, 26, 49, 0, 30, 46, 16, 29, 51, 34, 4, 52, 28, 33, 15, 57, 39, 26, 49, 0, 56, 27, 31, 48, 20, 43, 29, 53, 11, 46, 19, 41, 13, 55, 18, 0, 57, 26, 51, 2, 44, 6, 38, 14, 40, 22, 45, 36, 53, 3, 57 }, + { 44, 12, 37, 28, 22, 57, 11, 38, 0, 51, 9, 41, 4, 29, 11, 47, 33, 45, 12, 26, 3, 36, 9, 63, 31, 16, 38, 44, 14, 47, 25, 61, 20, 58, 15, 47, 17, 57, 13, 36, 9, 51, 18, 29, 50, 36, 54, 20, 61, 27, 32, 13, 53, 44, 9, 27, 0, 63, 45, 2, 56, 10, 14, 43, 41, 28, 58, 11, 35, 60, 30, 41, 6, 63, 11, 51, 37, 32, 15, 10, 35, 53, 5, 61, 22, 7, 26, 59, 23, 9, 44, 48, 21, 3, 51, 32, 24, 41, 12, 61, 2, 55, 9, 15, 35, 58, 28, 15, 62, 30, 37, 23, 42, 29, 11, 17, 35, 24, 63, 20, 52, 28, 8, 55, 11, 23, 47, 19 }, + { 0, 56, 8, 53, 14, 31, 61, 20, 55, 28, 62, 18, 35, 60, 25, 57, 7, 23, 39, 54, 47, 17, 43, 0, 40, 59, 29, 2, 56, 10, 37, 5, 43, 11, 29, 52, 1, 23, 54, 41, 59, 30, 55, 1, 62, 15, 33, 4, 43, 10, 47, 39, 1, 31, 40, 60, 49, 33, 7, 55, 26, 50, 31, 61, 8, 18, 21, 32, 44, 1, 25, 47, 18, 36, 30, 23, 59, 7, 40, 59, 27, 19, 38, 32, 44, 54, 40, 17, 38, 60, 27, 6, 35, 55, 10, 14, 44, 5, 50, 17, 38, 26, 42, 50, 18, 3, 44, 52, 2, 49, 7, 52, 15, 46, 62, 39, 55, 10, 31, 48, 3, 58, 33, 18, 61, 34, 13, 59 }, + { 39, 27, 63, 20, 35, 41, 4, 45, 26, 5, 38, 13, 44, 2, 50, 17, 37, 52, 2, 13, 28, 58, 24, 51, 21, 8, 34, 48, 27, 42, 18, 51, 31, 56, 5, 36, 38, 44, 4, 17, 26, 11, 38, 23, 42, 8, 56, 39, 24, 51, 5, 56, 21, 59, 14, 6, 18, 42, 22, 35, 16, 37, 3, 25, 39, 46, 63, 5, 50, 17, 58, 8, 55, 3, 50, 12, 43, 17, 47, 2, 51, 9, 62, 12, 1, 35, 13, 50, 1, 37, 12, 51, 19, 29, 46, 59, 22, 58, 33, 45, 22, 60, 10, 32, 61, 39, 8, 33, 25, 36, 20, 60, 38, 4, 21, 5, 28, 45, 12, 18, 42, 11, 49, 1, 27, 40, 6, 30 }, + { 24, 16, 42, 1, 50, 10, 48, 17, 33, 43, 24, 48, 21, 55, 31, 42, 10, 21, 63, 35, 49, 6, 33, 13, 41, 53, 10, 20, 60, 6, 53, 26, 12, 41, 22, 60, 14, 28, 63, 33, 49, 3, 45, 16, 48, 26, 14, 46, 18, 30, 35, 26, 8, 50, 29, 51, 25, 57, 12, 47, 53, 9, 62, 20, 54, 2, 36, 15, 40, 28, 33, 13, 38, 24, 46, 1, 29, 56, 33, 20, 44, 24, 41, 26, 57, 20, 63, 8, 30, 55, 5, 41, 62, 8, 34, 2, 37, 10, 19, 6, 37, 1, 53, 23, 5, 27, 58, 22, 43, 12, 50, 26, 9, 34, 54, 32, 49, 1, 59, 37, 22, 46, 25, 36, 51, 15, 54, 46 }, + { 52, 7, 45, 33, 26, 58, 14, 60, 7, 54, 3, 58, 8, 34, 14, 5, 59, 30, 18, 44, 8, 22, 48, 62, 3, 26, 55, 38, 23, 16, 39, 1, 62, 24, 49, 9, 53, 19, 46, 7, 19, 60, 31, 58, 2, 34, 53, 7, 59, 2, 62, 42, 46, 19, 36, 11, 44, 4, 38, 28, 1, 43, 32, 51, 12, 29, 56, 22, 52, 2, 62, 49, 22, 60, 14, 35, 63, 5, 25, 57, 14, 53, 4, 46, 18, 31, 42, 22, 47, 20, 58, 31, 16, 43, 23, 54, 30, 42, 52, 57, 29, 49, 30, 13, 45, 48, 16, 55, 6, 63, 1, 44, 14, 58, 19, 47, 15, 24, 51, 34, 6, 55, 5, 63, 20, 41, 21, 9 }, + { 30, 62, 18, 55, 5, 23, 39, 29, 49, 30, 15, 36, 28, 46, 60, 25, 39, 46, 4, 32, 61, 40, 15, 30, 36, 45, 14, 2, 49, 33, 57, 45, 18, 32, 3, 45, 30, 2, 35, 52, 40, 27, 13, 21, 38, 63, 20, 28, 37, 23, 16, 10, 13, 55, 2, 62, 21, 32, 60, 17, 58, 23, 5, 40, 16, 48, 7, 45, 10, 26, 43, 19, 6, 31, 52, 21, 39, 16, 48, 9, 37, 28, 36, 55, 7, 48, 3, 59, 15, 45, 25, 1, 53, 13, 47, 7, 62, 15, 4, 25, 12, 41, 18, 60, 38, 11, 34, 19, 39, 31, 29, 56, 23, 42, 3, 27, 60, 41, 8, 16, 61, 29, 43, 9, 32, 2, 60, 34 }, + { 3, 38, 13, 37, 52, 44, 2, 19, 12, 42, 63, 19, 40, 1, 20, 50, 12, 55, 15, 56, 27, 1, 54, 11, 57, 18, 32, 63, 44, 4, 29, 13, 37, 61, 35, 16, 42, 57, 12, 22, 6, 55, 43, 10, 50, 5, 44, 11, 48, 52, 34, 58, 28, 41, 38, 30, 7, 52, 11, 49, 30, 14, 45, 27, 59, 34, 21, 38, 32, 58, 11, 36, 56, 42, 9, 41, 3, 54, 31, 42, 0, 60, 16, 11, 39, 24, 52, 33, 6, 36, 10, 40, 32, 60, 26, 20, 39, 28, 47, 34, 63, 8, 54, 3, 24, 56, 0, 51, 13, 47, 16, 40, 7, 35, 52, 11, 36, 4, 57, 30, 39, 13, 18, 50, 58, 28, 12, 48 }, + { 57, 24, 49, 21, 10, 31, 61, 36, 56, 0, 22, 53, 11, 56, 32, 7, 36, 27, 41, 9, 46, 19, 34, 42, 25, 7, 50, 9, 28, 21, 54, 8, 50, 7, 27, 59, 10, 25, 48, 62, 37, 0, 33, 58, 25, 18, 32, 61, 0, 15, 45, 5, 50, 3, 23, 55, 47, 17, 40, 6, 60, 34, 53, 8, 41, 0, 61, 13, 54, 4, 46, 28, 0, 17, 48, 27, 58, 13, 23, 61, 33, 21, 50, 30, 62, 8, 14, 29, 56, 27, 61, 49, 17, 2, 44, 11, 51, 0, 59, 17, 40, 20, 32, 47, 36, 21, 42, 28, 60, 4, 54, 10, 59, 17, 30, 62, 21, 43, 26, 48, 0, 56, 36, 25, 8, 44, 39, 17 }, + { 10, 42, 4, 59, 27, 47, 8, 23, 51, 32, 45, 6, 37, 26, 48, 43, 62, 0, 21, 53, 38, 12, 51, 5, 60, 47, 24, 37, 59, 15, 35, 47, 22, 55, 0, 50, 21, 40, 6, 29, 15, 52, 24, 8, 41, 55, 13, 29, 40, 56, 24, 31, 19, 33, 61, 15, 0, 35, 24, 42, 21, 2, 19, 57, 24, 15, 30, 50, 20, 25, 40, 16, 57, 34, 61, 8, 29, 45, 6, 49, 11, 47, 2, 44, 19, 57, 38, 50, 12, 42, 21, 4, 35, 52, 28, 56, 23, 36, 13, 45, 4, 52, 27, 14, 6, 62, 9, 45, 21, 37, 25, 46, 33, 49, 0, 44, 7, 53, 13, 19, 53, 31, 3, 47, 15, 56, 22, 51 }, + { 35, 28, 53, 32, 1, 16, 54, 40, 9, 17, 25, 58, 14, 59, 3, 22, 16, 51, 31, 5, 23, 58, 28, 17, 35, 20, 0, 42, 11, 52, 3, 31, 41, 17, 43, 13, 32, 54, 18, 60, 32, 45, 17, 49, 2, 36, 51, 22, 7, 36, 9, 63, 48, 12, 46, 26, 43, 28, 63, 13, 48, 37, 51, 33, 5, 47, 55, 9, 42, 63, 7, 51, 24, 12, 37, 19, 55, 34, 18, 38, 15, 28, 54, 34, 5, 43, 22, 0, 48, 14, 54, 24, 58, 9, 38, 5, 32, 55, 21, 30, 49, 9, 59, 43, 30, 51, 35, 26, 7, 53, 2, 22, 14, 27, 57, 18, 38, 24, 33, 45, 10, 41, 20, 60, 37, 5, 32, 0 }, + { 63, 19, 15, 40, 62, 35, 14, 28, 46, 61, 4, 49, 35, 10, 29, 54, 33, 8, 45, 62, 37, 1, 43, 55, 10, 52, 61, 30, 19, 40, 25, 62, 11, 38, 27, 58, 36, 3, 46, 8, 39, 4, 62, 28, 47, 20, 4, 54, 47, 27, 43, 1, 21, 38, 8, 58, 10, 54, 4, 56, 9, 26, 12, 39, 60, 27, 18, 37, 1, 31, 35, 5, 45, 50, 2, 43, 26, 1, 59, 23, 56, 40, 7, 26, 58, 17, 32, 63, 25, 39, 7, 31, 45, 19, 63, 15, 48, 8, 37, 61, 16, 34, 1, 56, 18, 3, 15, 58, 49, 32, 63, 41, 55, 5, 40, 22, 50, 6, 59, 2, 63, 23, 52, 11, 26, 61, 44, 23 }, + { 11, 56, 46, 6, 22, 43, 58, 3, 34, 21, 38, 30, 18, 44, 52, 13, 41, 57, 17, 28, 14, 49, 25, 7, 33, 39, 26, 6, 56, 48, 1, 20, 56, 5, 46, 9, 19, 51, 30, 25, 56, 21, 35, 14, 57, 42, 16, 33, 10, 57, 17, 59, 41, 25, 53, 37, 20, 40, 30, 18, 31, 62, 44, 22, 3, 44, 11, 48, 23, 53, 18, 60, 29, 22, 62, 15, 53, 47, 10, 41, 3, 19, 52, 36, 13, 46, 10, 35, 3, 61, 41, 16, 1, 50, 26, 42, 18, 46, 2, 25, 54, 20, 39, 23, 47, 31, 41, 12, 38, 17, 8, 19, 31, 48, 12, 61, 9, 54, 29, 35, 15, 38, 6, 43, 34, 14, 7, 47 }, + { 39, 2, 33, 26, 53, 8, 18, 50, 41, 12, 53, 1, 63, 24, 19, 39, 2, 24, 47, 10, 60, 38, 19, 63, 48, 4, 15, 45, 32, 14, 60, 36, 29, 53, 23, 63, 34, 12, 61, 1, 43, 11, 53, 30, 1, 26, 60, 45, 23, 39, 3, 29, 12, 50, 4, 16, 51, 3, 45, 36, 50, 1, 16, 54, 35, 14, 57, 30, 58, 9, 46, 14, 41, 10, 32, 38, 4, 30, 21, 51, 32, 63, 25, 1, 60, 27, 53, 18, 51, 22, 28, 55, 34, 12, 40, 3, 60, 29, 57, 41, 6, 44, 11, 53, 8, 61, 24, 57, 1, 28, 44, 59, 36, 3, 34, 25, 41, 31, 16, 44, 22, 47, 28, 58, 1, 49, 54, 29 }, + { 58, 25, 50, 13, 38, 30, 60, 24, 6, 57, 27, 42, 9, 45, 6, 61, 30, 50, 4, 34, 29, 3, 46, 13, 22, 42, 58, 28, 9, 39, 23, 44, 7, 15, 44, 2, 40, 15, 47, 41, 23, 37, 7, 59, 38, 11, 34, 6, 62, 14, 52, 35, 55, 19, 32, 61, 33, 24, 57, 6, 22, 59, 29, 7, 49, 25, 40, 3, 17, 39, 27, 52, 0, 55, 16, 57, 24, 61, 36, 6, 29, 12, 48, 39, 20, 44, 6, 40, 33, 5, 48, 10, 57, 36, 22, 51, 33, 9, 24, 12, 62, 29, 50, 35, 14, 43, 5, 33, 47, 52, 13, 23, 10, 51, 56, 16, 46, 1, 49, 4, 61, 9, 52, 18, 31, 21, 36, 17 }, + { 19, 42, 9, 48, 2, 44, 11, 37, 48, 20, 33, 16, 55, 35, 49, 15, 37, 20, 59, 16, 53, 22, 56, 31, 50, 11, 34, 54, 16, 51, 4, 49, 33, 53, 21, 28, 56, 24, 31, 9, 52, 16, 48, 24, 44, 13, 51, 20, 31, 49, 18, 6, 34, 2, 44, 14, 47, 8, 15, 43, 13, 41, 33, 52, 20, 61, 7, 51, 34, 62, 4, 20, 36, 33, 43, 8, 46, 13, 53, 17, 45, 42, 9, 31, 52, 11, 30, 56, 13, 59, 17, 44, 27, 6, 62, 11, 43, 17, 49, 38, 26, 2, 16, 27, 58, 21, 54, 18, 26, 5, 35, 61, 43, 27, 7, 39, 14, 58, 37, 55, 20, 33, 13, 40, 62, 10, 55, 5 }, + { 51, 14, 61, 29, 59, 20, 55, 31, 0, 49, 11, 60, 3, 26, 22, 56, 0, 40, 12, 43, 41, 8, 36, 0, 17, 57, 24, 2, 46, 26, 61, 18, 0, 38, 12, 59, 6, 49, 3, 57, 19, 63, 5, 33, 18, 54, 28, 56, 0, 43, 26, 46, 63, 27, 56, 22, 27, 54, 38, 28, 63, 24, 10, 45, 0, 31, 42, 21, 12, 25, 44, 49, 59, 6, 26, 50, 3, 34, 27, 59, 0, 35, 62, 16, 4, 58, 47, 0, 43, 24, 37, 2, 54, 20, 46, 31, 0, 56, 34, 5, 55, 45, 60, 37, 0, 40, 10, 38, 63, 46, 15, 20, 0, 53, 21, 62, 30, 11, 24, 27, 40, 0, 57, 26, 3, 45, 27, 35 } +}; + +#endif /* USE_DITHER_128128 */ + +EAPI void +evas_common_convert_init(void) +{ +} + +EAPI Gfx_Func_Convert +evas_common_convert_func_get(DATA8 *dest, int w, int h __UNUSED__, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation) +{ + if ((rmask == 0) && (gmask == 0) && (bmask == 0)) + { + if (depth == 8) + { +#ifdef BUILD_CONVERT_8_GRY_1 + if (pal_mode == PAL_MODE_NONE) + return evas_common_convert_rgba_to_8bpp_gry_256_dith; +#endif +#ifdef BUILD_CONVERT_8_GRY_16 + if (pal_mode == PAL_MODE_NONE) + return evas_common_convert_rgba_to_8bpp_gry_16_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_332 + if (pal_mode == PAL_MODE_RGB332) + return evas_common_convert_rgba_to_8bpp_rgb_332_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_666 + if (pal_mode == PAL_MODE_RGB666) + return evas_common_convert_rgba_to_8bpp_rgb_666_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_232 + if (pal_mode == PAL_MODE_RGB232) + return evas_common_convert_rgba_to_8bpp_rgb_232_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_222 + if (pal_mode == PAL_MODE_RGB222) + return evas_common_convert_rgba_to_8bpp_rgb_222_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_221 + if (pal_mode == PAL_MODE_RGB221) + return evas_common_convert_rgba_to_8bpp_rgb_221_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_121 + if (pal_mode == PAL_MODE_RGB121) + return evas_common_convert_rgba_to_8bpp_rgb_121_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_111 + if (pal_mode == PAL_MODE_RGB111) + return evas_common_convert_rgba_to_8bpp_rgb_111_dith; +#endif +#ifdef BUILD_CONVERT_8_GRAYSCALE_64 + if (pal_mode == PAL_MODE_GRAY64) + return evas_common_convert_rgba_to_8bpp_pal_gray64; +#endif + } + } + else + { + if (depth == 16) + { +#ifdef BUILD_CONVERT_16_RGB_565 + if ((rmask == 0x0000f800) && (gmask == 0x000007e0) && (bmask == 0x0000001f)) + { +#ifdef BUILD_CONVERT_16_RGB_ROT0 + if (rotation == 0) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_565_dith; + else + return evas_common_convert_rgba_to_16bpp_rgb_565_dith; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT180 + if (rotation == 180) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180; + else + return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT270 + if (rotation == 270) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270; + else + return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT90 + if (rotation == 90) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90; + else + return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90; + } +#endif + } +#endif +#ifdef BUILD_CONVERT_16_BGR_565 + if ((rmask == 0x0000001f) && (gmask == 0x000007e0) && (bmask == 0x0000f800)) + { +#ifdef BUILD_CONVERT_16_RGB_ROT0 + if (rotation == 0) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_bgr_565_dith; + else + return evas_common_convert_rgba_to_16bpp_bgr_565_dith; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT180 + if (rotation == 180) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180; + else + return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT270 + if (rotation == 270) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270; + else + return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT90 + if (rotation == 90) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90; + else + return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90; + } +#endif + } +#endif +#ifdef BUILD_CONVERT_16_RGB_555 + if ((rmask == 0x00007c00) && (gmask == 0x000003e0) && (bmask == 0x0000001f)) + { +#ifdef BUILD_CONVERT_16_RGB_ROT0 + if (rotation == 0) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_555_dith; + else + return evas_common_convert_rgba_to_16bpp_rgb_555_dith; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT180 + if (rotation == 180) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180; + else + return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT270 + if (rotation == 270) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270; + else + return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT90 + if (rotation == 90) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90; + else + return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90; + } +#endif + } +#endif +#ifdef BUILD_CONVERT_16_RGB_444 + if ((rmask == 0x00000f00) && (gmask == 0x000000f0) && (bmask == 0x0000000f)) + { +#ifdef BUILD_CONVERT_16_RGB_ROT0 + if (rotation == 0) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_444_dith; + else + return evas_common_convert_rgba_to_16bpp_rgb_444_dith; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT180 + if (rotation == 180) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180; + else + return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT270 + if (rotation == 270) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270; + else + return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT90 + if (rotation == 90) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90; + else + return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90; + } +#endif + } +#endif +#ifdef BUILD_CONVERT_16_RGB_454645 + if ((rmask == 0x0000f000) && (gmask == 0x00000780) && (bmask == 0x0000001e)) + { +#ifdef BUILD_CONVERT_16_RGB_ROT0 + if (rotation == 0) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith; + else + return evas_common_convert_rgba_to_16bpp_rgb_454645_dith; + + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT180 + if (rotation == 180) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180; + else + return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT270 + if (rotation == 270) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270; + else + return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT90 + if (rotation == 270) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90; + else + return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90; + } +#endif + } +#endif +#ifdef BUILD_CONVERT_16_RGB_454645 + if ((rmask == 0x0000f800) && (gmask == 0x000007e0) && (bmask == 0x0000001f)) + { +#ifdef BUILD_CONVERT_16_RGB_ROT0 + if (rotation == 0) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith; + else + return evas_common_convert_rgba_to_16bpp_rgb_454645_dith; + + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT180 + if (rotation == 180) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180; + else + return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT270 + if (rotation == 270) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270; + else + return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270; + } +#endif +#ifdef BUILD_CONVERT_16_RGB_ROT90 + if (rotation == 90) + { + if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) + return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90; + else + return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90; + } +#endif + } +#endif + } + if (depth == 32) + { +#ifdef BUILD_CONVERT_32_RGB_8888 + if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff)) + { +#ifdef BUILD_CONVERT_32_RGB_ROT0 + if (rotation == 0) + return evas_common_convert_rgba_to_32bpp_rgb_8888; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT180 + if (rotation == 180) + return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT270 + if (rotation == 270) + return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT90 + if (rotation == 90) + return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90; +#endif + } +#endif +#ifdef BUILD_CONVERT_32_RGBX_8888 + if ((rmask == 0xff000000) && (gmask == 0x00ff0000) && (bmask == 0x0000ff00)) + { +#ifdef BUILD_CONVERT_32_RGB_ROT0 + if (rotation == 0) + return evas_common_convert_rgba_to_32bpp_rgbx_8888; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT180 + if (rotation == 180) + return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT270 + if (rotation == 270) + return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT90 + if (rotation == 90) + return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90; +#endif + } +#endif +#ifdef BUILD_CONVERT_32_BGR_8888 + if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000)) + { +#ifdef BUILD_CONVERT_32_RGB_ROT0 + if (rotation == 0) + return evas_common_convert_rgba_to_32bpp_bgr_8888; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT180 + if (rotation == 180) + return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT270 + if (rotation == 270) + return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT90 + if (rotation == 90) + return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90; +#endif + } +#endif +#ifdef BUILD_CONVERT_32_BGRX_8888 + if ((rmask == 0x0000ff00) && (gmask == 0x00ff0000) && (bmask == 0xff000000)) + { +#ifdef BUILD_CONVERT_32_RGB_ROT0 + if (rotation == 0) + return evas_common_convert_rgba_to_32bpp_bgrx_8888; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT180 + if (rotation == 180) + return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT270 + if (rotation == 270) + return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT90 + if (rotation == 90) + return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90; +#endif + } +#endif +#ifdef BUILD_CONVERT_32_RGB_666 + if ((rmask == 0x0003f000) && (gmask == 0x00000fc0) && (bmask == 0x0000003f)) + { +#ifdef BUILD_CONVERT_32_RGB_ROT0 + if (rotation == 0) + return evas_common_convert_rgba_to_32bpp_rgb_666; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT180 +// if (rotation == 180) +// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT270 +// if (rotation == 270) +// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270; +#endif +#ifdef BUILD_CONVERT_32_RGB_ROT90 +// if (rotation == 90) +// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90; +#endif + } +#endif + } + if (depth == 24) + { +#ifdef BUILD_CONVERT_24_RGB_888 + if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff)) + { + if (rotation == 0) + return evas_common_convert_rgba_to_24bpp_rgb_888; + } +#endif +#ifdef BUILD_CONVERT_24_RGB_666 + if ((rmask == 0x0003f000) && (gmask == 0x00000fc0) && (bmask == 0x0000003f)) + { + if (rotation == 0) + return evas_common_convert_rgba_to_24bpp_rgb_666; + } +#endif +#ifdef BUILD_CONVERT_24_BGR_888 + if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000)) + { + if (rotation == 0) + return evas_common_convert_rgba_to_24bpp_bgr_888; + } +#endif + } + INF("depth = %i mode = %i", depth, pal_mode); + if (depth == 8) + { +#ifdef BUILD_CONVERT_8_RGB_332 + if (pal_mode == PAL_MODE_RGB332) + return evas_common_convert_rgba_to_8bpp_rgb_332_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_666 + if (pal_mode == PAL_MODE_RGB666) + return evas_common_convert_rgba_to_8bpp_rgb_666_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_232 + if (pal_mode == PAL_MODE_RGB232) + return evas_common_convert_rgba_to_8bpp_rgb_232_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_222 + if (pal_mode == PAL_MODE_RGB222) + return evas_common_convert_rgba_to_8bpp_rgb_222_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_221 + if (pal_mode == PAL_MODE_RGB221) + return evas_common_convert_rgba_to_8bpp_rgb_221_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_121 + if (pal_mode == PAL_MODE_RGB121) + return evas_common_convert_rgba_to_8bpp_rgb_121_dith; +#endif +#ifdef BUILD_CONVERT_8_RGB_111 + if (pal_mode == PAL_MODE_RGB111) + return evas_common_convert_rgba_to_8bpp_rgb_111_dith; +#endif + } + } + /* no optimised converter for this... no generic one either. NULL */ + return NULL; +} diff --git a/libraries/evas/src/lib/engines/common/evas_convert_main.h b/libraries/evas/src/lib/engines/common/evas_convert_main.h new file mode 100644 index 0000000..51c2cc8 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_main.h @@ -0,0 +1,9 @@ +#ifndef _EVAS_CONVERT_MAIN_H +#define _EVAS_CONVERT_MAIN_H + + +EAPI void evas_common_convert_init (void); +EAPI Gfx_Func_Convert evas_common_convert_func_get (DATA8 *dest, int w, int h, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation); + + +#endif /* _EVAS_CONVERT_MAIN_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c new file mode 100644 index 0000000..b30ec1e --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c @@ -0,0 +1,2089 @@ +#include "evas_common.h" +#include "evas_convert_rgb_16.h" + +#ifndef BUILD_NO_DITHER_MASK +#ifdef USE_DITHER_44 +extern const DATA8 _evas_dither_44[4][4]; +#endif +#ifdef USE_DITHER_128128 +extern const DATA8 _evas_dither_128128[128][128]; +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_565 +#ifdef BUILD_CONVERT_16_RGB_ROT0 +void +evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ +#ifndef BUILD_NO_DITHER_MASK + DATA16 *d = (DATA16 *)dst; + DATA32 r1, g1, b1; + DATA32 r2, g2, b2; + unsigned int dith, dith2; + int x, y; + +#ifdef BUILD_LINE_DITHER_MASK + for (y = 0; y < h; y++) + { + if ((y + dith_y) & 0x1) + { + for (x = 0; x < w; x+=2) + { + DATA32 p = *src++, q = *src++; + r1 = ((p & 0xff0000) + 0x030000) >> 19; + if (r1 > 0x1f) r1 = 0x1f; + g1 = ((p & 0xff00) + 0x000100) >> 10; + if (g1 > 0x3f) g1 = 0x3f; + b1 = ((p & 0xff) + 0x000003) >> 3; + if (b1 > 0x1f) b1 = 0x1f; + r2 = ((q & 0xff0000) + 0x030000) >> 19; + if (r2 > 0x1f) r2 = 0x1f; + g2 = ((q & 0xff00) + 0x000100) >> 10; + if (g2 > 0x3f) g2 = 0x3f; + b2 = ((q & 0xff) + 0x000003) >> 3; + if (b2 > 0x1f) b2 = 0x1f; +#ifndef WORDS_BIGENDIAN + *((DATA32 *)d) = (r2 << 27) | (g2 << 21) | (b2 << 16) | + (r1 << 11) | (g1 << 5) | (b1); +#else + *((DATA32 *)d) = (r1 << 27) | (g1 << 21) | (b1 << 16) | + (r2 << 11) | (g2 << 5) | (b2); +#endif + d += 2; + } + } + else + { + x = w; + while (w > 0) + { + DATA32 p = *src++, q = *src++; + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)d) = + (((q & 0xff0000) >> 19) << 27) | (((q & 0xff00) >> 10) << 21) | (((q & 0xff) >> 3) << 16) | + (((p & 0xff0000) >> 19) << 11) | (((p & 0xff00) >> 10) << 5) | ((p & 0xff) >> 3); +#else + *((DATA32 *)d) = + (((p & 0xff0000) >> 19) << 27) | (((p & 0xff00) >> 10) << 21) | (((p & 0xff) >> 3) << 16) | + (((q & 0xff0000) >> 19) << 11) | (((q & 0xff00) >> 10) << 5) | ((q & 0xff) >> 3); +#endif + d += 2; w -= 2; + } + w = x; + } + src += src_jump; + d += dst_jump; + } +#else + for (y = 0; y < h; y++) + { + for (x = 0; x < w; x++) + { + DATA32 p = *src++, q = *src++; + + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; + dith2 = dith >> DM_SHF(6); + dith >>= DM_SHF(5); + r1 = (p & 0xff0000) >> 19; + g1 = (p & 0xff00) >> 10; + b1 = (p & 0xff) >> 3; + if ((r1 < 0x1f) && ((((p & 0xff0000) >> 16) - (r1 << 3)) >= dith )) r1++; + if ((g1 < 0x3f) && ((((p & 0xff00) >> 8) - (g1 << 2)) >= dith2)) g1++; + if ((b1 < 0x1f) && (((p & 0xff) - (b1 << 3)) >= dith )) b1++; + + x++; + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; + dith2 = dith >> DM_SHF(6); + dith >>= DM_SHF(5); + r2 = (q & 0xff0000) >> 19; + g2 = (q & 0xff00) >> 10; + b2 = (q & 0xff) >> 3; + if ((r2 < 0x1f) && ((((q & 0xff0000) >> 16) - (r2 << 3)) >= dith )) r2++; + if ((g2 < 0x3f) && ((((q & 0xff00) >> 8) - (g2 << 2)) >= dith2)) g2++; + if ((b2 < 0x1f) && (((q & 0xff) - (b2 << 3)) >= dith )) b2++; + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)d) = (r2 << 27) | (g2 << 21) | (b2 << 16) | + (r1 << 11) | (g1 << 5) | (b1); +#else + *((DATA32 *)d) = (r1 << 27) | (g1 << 21) | (b1 << 16) | + (r2 << 11) | (g2 << 5) | (b2); +#endif + d += 2; + } + src += src_jump; + d += dst_jump; + } +#endif + return; + pal = 0; +#else + DATA16 *d = (DATA16 *)dst; + int w0 = w; + + while (h--) + { + while (w > 0) + { + DATA32 p = *src++, q = *src++; + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)d) = + (((q & 0xff0000) >> 19) << 27) | (((q & 0xff00) >> 10) << 21) | (((q & 0xff) >> 3) << 16) | + (((p & 0xff0000) >> 19) << 11) | (((p & 0xff00) >> 10) << 5) | ((p & 0xff) >> 3); +#else + *((DATA32 *)d) = + (((p & 0xff0000) >> 19) << 27) | (((p & 0xff00) >> 10) << 21) | (((p & 0xff) >> 3) << 16) | + (((q & 0xff0000) >> 19) << 11) | (((q & 0xff00) >> 10) << 5) | ((q & 0xff) >> 3); +#endif + d += 2; w -= 2; + } + w = w0; + src += src_jump; + d += dst_jump; + } + return; + pal = 0; +#endif +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_565 +#ifdef BUILD_CONVERT_16_RGB_ROT0 +void +evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ +#ifndef BUILD_NO_DITHER_MASK + DATA16 *d = (DATA16 *)dst; + DATA32 r, g, b; + unsigned int dith, dith2; + int x, y; + +#ifdef BUILD_LINE_DITHER_MASK + for (y = 0; y < h; y++) + { + if ((y + dith_y) & 0x1) + { + for (x = 0; x < w; x++) + { + DATA32 p = *src++; + + r = (p & 0xff0000) >> 19; + if (r > 0x1f) r = 0x1f; + g = (p & 0xff00) >> 10; + if (g > 0x3f) g = 0x3f; + b = (p & 0xff) >> 3; + if (b > 0x1f) b = 0x1f; + *d++ = (r << 11) | (g << 5) | b; + } + } + else + { + x = w; + while (w--) + { + *d++ = (((*src & 0xff0000) >> 19) << 11) | (((*src & 0xff00) >> 10) << 5) | ((*src & 0xff) >> 3); + src++; + } + w = x; + } + src += src_jump; + d += dst_jump; + } +#else + for (y = 0; y < h; y++) + { + for (x = 0; x < w; x++) + { + DATA32 p = *src++; + + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; + dith2 = dith >> DM_SHF(6); + dith >>= DM_SHF(5); + r = (p & 0xff0000) >> 19; + g = (p & 0xff00) >> 10; + b = (p & 0xff) >> 3; + if ((r < 0x1f) && ((((p & 0xff0000) >> 16) - (r << 3)) >= dith )) r++; + if ((g < 0x3f) && ((((p & 0xff00) >> 8) - (g << 2)) >= dith2)) g++; + if ((b < 0x1f) && (((p & 0xff) - (b << 3)) >= dith )) b++; + + *d++ = (r << 11) | (g << 5) | b; + } + src += src_jump; + d += dst_jump; + } +#endif + return; + pal = 0; +#else + DATA16 *d = (DATA16 *)dst; + int w0 = w; + + while (h--) + { + while (w--) + { + *d++ = (((*src & 0xff0000) >> 19) << 11) | (((*src & 0xff00) >> 10) << 5) | ((*src & 0xff) >> 3); + src++; + } + w = w0; + src += src_jump; + d += dst_jump; + } + return; + pal = 0; +#endif +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_565 +#ifdef BUILD_CONVERT_16_RGB_ROT180 +void +evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_180(); + + r1 = (R_VAL(src_ptr)) >> 3; + g1 = (G_VAL(src_ptr)) >> 2; + b1 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_180(); + + r2 = (R_VAL(src_ptr)) >> 3; + g2 = (G_VAL(src_ptr)) >> 2; + b2 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 27) | (g2 << 21) | (b2 << 16) | + (r1 << 11) | (g1 << 5 ) | (b1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 27) | (g1 << 21) | (b1 << 16) | + (r2 << 11) | (g2 << 5 ) | (b2 ); +#endif + + CONVERT_LOOP2_END_ROT_180(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_565 +#ifdef BUILD_CONVERT_16_RGB_ROT180 +void +evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_180(); + + r = (R_VAL(src_ptr)) >> 3; + g = (G_VAL(src_ptr)) >> 2; + b = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; + if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; + if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; +#endif + + *dst_ptr = (r << 11) | (g << 5) | (b); + + CONVERT_LOOP_END_ROT_180(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_565 +#ifdef BUILD_CONVERT_16_RGB_ROT270 +void +evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_270(); + + r1 = (R_VAL(src_ptr)) >> 3; + g1 = (G_VAL(src_ptr)) >> 2; + b1 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_270(); + + r2 = (R_VAL(src_ptr)) >> 3; + g2 = (G_VAL(src_ptr)) >> 2; + b2 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 27) | (g2 << 21) | (b2 << 16) | + (r1 << 11) | (g1 << 5 ) | (b1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 27) | (g1 << 21) | (b1 << 16) | + (r2 << 11) | (g2 << 5 ) | (b2 ); +#endif + + CONVERT_LOOP2_END_ROT_270(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_565 +#ifdef BUILD_CONVERT_16_RGB_ROT270 +void +evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_270(); + + r = (R_VAL(src_ptr)) >> 3; + g = (G_VAL(src_ptr)) >> 2; + b = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; + if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; + if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; +#endif + + *dst_ptr = (r << 11) | (g << 5) | (b); + + CONVERT_LOOP_END_ROT_270(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_565 +#ifdef BUILD_CONVERT_16_RGB_ROT90 +void +evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_90(); + + r1 = (R_VAL(src_ptr)) >> 3; + g1 = (G_VAL(src_ptr)) >> 2; + b1 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_90(); + + r2 = (R_VAL(src_ptr)) >> 3; + g2 = (G_VAL(src_ptr)) >> 2; + b2 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 27) | (g2 << 21) | (b2 << 16) | + (r1 << 11) | (g1 << 5 ) | (b1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 27) | (g1 << 21) | (b1 << 16) | + (r2 << 11) | (g2 << 5 ) | (b2 ); +#endif + + CONVERT_LOOP2_END_ROT_90(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_565 +#ifdef BUILD_CONVERT_16_RGB_ROT90 +void +evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_90(); + + r = (R_VAL(src_ptr)) >> 3; + g = (G_VAL(src_ptr)) >> 2; + b = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; + if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; + if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; +#endif + + *dst_ptr = (r << 11) | (g << 5) | (b); + + CONVERT_LOOP_END_ROT_90(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_BGR_565 +#ifdef BUILD_CONVERT_16_RGB_ROT0 +void +evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_0(); + + r1 = (R_VAL(src_ptr)) >> 3; + g1 = (G_VAL(src_ptr)) >> 2; + b1 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_0(); + + r2 = (R_VAL(src_ptr)) >> 3; + g2 = (G_VAL(src_ptr)) >> 2; + b2 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (b2 << 27) | (g2 << 21) | (r2 << 16) | + (b1 << 11) | (g1 << 5 ) | (r1 ); +#else + *((DATA32 *)dst_ptr) = + (b1 << 27) | (g1 << 21) | (r1 << 16) | + (b2 << 11) | (g2 << 5 ) | (r2 ); +#endif + + CONVERT_LOOP2_END_ROT_0(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_BGR_565 +#ifdef BUILD_CONVERT_16_RGB_ROT0 +void +evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + r = (R_VAL(src_ptr)) >> 3; + g = (G_VAL(src_ptr)) >> 2; + b = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; + if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; + if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; +#endif + + *dst_ptr = (b << 11) | (g << 5) | (r); + + CONVERT_LOOP_END_ROT_0(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_BGR_565 +#ifdef BUILD_CONVERT_16_RGB_ROT180 +void +evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_180(); + + r1 = (R_VAL(src_ptr)) >> 3; + g1 = (G_VAL(src_ptr)) >> 2; + b1 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_180(); + + r2 = (R_VAL(src_ptr)) >> 3; + g2 = (G_VAL(src_ptr)) >> 2; + b2 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (b2 << 27) | (g2 << 21) | (r2 << 16) | + (b1 << 11) | (g1 << 5 ) | (r1 ); +#else + *((DATA32 *)dst_ptr) = + (b1 << 27) | (g1 << 21) | (r1 << 16) | + (b2 << 11) | (g2 << 5 ) | (r2 ); +#endif + + CONVERT_LOOP2_END_ROT_180(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_BGR_565 +#ifdef BUILD_CONVERT_16_RGB_ROT180 +void +evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + ERR("evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180"); + + CONVERT_LOOP_START_ROT_180(); + + r = (R_VAL(src_ptr)) >> 3; + g = (G_VAL(src_ptr)) >> 2; + b = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; + if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; + if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; +#endif + + *dst_ptr = (b << 11) | (g << 5) | (r); + + CONVERT_LOOP_END_ROT_180(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_BGR_565 +#ifdef BUILD_CONVERT_16_RGB_ROT270 +void +evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_270(); + + r1 = (R_VAL(src_ptr)) >> 3; + g1 = (G_VAL(src_ptr)) >> 2; + b1 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_270(); + + r2 = (R_VAL(src_ptr)) >> 3; + g2 = (G_VAL(src_ptr)) >> 2; + b2 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (b2 << 27) | (g2 << 21) | (r2 << 16) | + (b1 << 11) | (g1 << 5 ) | (r1 ); +#else + *((DATA32 *)dst_ptr) = + (b1 << 27) | (g1 << 21) | (r1 << 16) | + (b2 << 11) | (g2 << 5 ) | (r2 ); +#endif + + CONVERT_LOOP2_END_ROT_270(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_BGR_565 +#ifdef BUILD_CONVERT_16_RGB_ROT270 +void +evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_270(); + + r = (R_VAL(src_ptr)) >> 3; + g = (G_VAL(src_ptr)) >> 2; + b = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; + if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; + if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; +#endif + + *dst_ptr = (b << 11) | (g << 5) | (r); + + CONVERT_LOOP_END_ROT_270(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_BGR_565 +#ifdef BUILD_CONVERT_16_RGB_ROT90 +void +evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_90(); + + r1 = (R_VAL(src_ptr)) >> 3; + g1 = (G_VAL(src_ptr)) >> 2; + b1 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_90(); + + r2 = (R_VAL(src_ptr)) >> 3; + g2 = (G_VAL(src_ptr)) >> 2; + b2 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (b2 << 27) | (g2 << 21) | (r2 << 16) | + (b1 << 11) | (g1 << 5 ) | (r1 ); +#else + *((DATA32 *)dst_ptr) = + (b1 << 27) | (g1 << 21) | (r1 << 16) | + (b2 << 11) | (g2 << 5 ) | (r2 ); +#endif + + CONVERT_LOOP2_END_ROT_90(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_BGR_565 +#ifdef BUILD_CONVERT_16_RGB_ROT90 +void +evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith, dith2; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_90(); + + r = (R_VAL(src_ptr)) >> 3; + g = (G_VAL(src_ptr)) >> 2; + b = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); + if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; + if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; + if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; +#endif + + *dst_ptr = (b << 11) | (g << 5) | (r); + + CONVERT_LOOP_END_ROT_90(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_444 +#ifdef BUILD_CONVERT_16_RGB_ROT0 +void +evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_0(); + + r1 = (R_VAL(src_ptr)) >> 4; + g1 = (G_VAL(src_ptr)) >> 4; + b1 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_0(); + + r2 = (R_VAL(src_ptr)) >> 4; + g2 = (G_VAL(src_ptr)) >> 4; + b2 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 24) | (g2 << 20) | (b2 << 16) | + (r1 << 8 ) | (g1 << 4 ) | (b1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 24) | (g1 << 20) | (b1 << 16) | + (r2 << 8 ) | (g2 << 4 ) | (b2 ); +#endif + + CONVERT_LOOP2_END_ROT_0(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_444 +#ifdef BUILD_CONVERT_16_RGB_ROT0 +void +evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + r = (R_VAL(src_ptr)) >> 4; + g = (G_VAL(src_ptr)) >> 4; + b = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; + if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; + if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; +#endif + + *dst_ptr = (r << 8) | (g << 4) | (b); + + CONVERT_LOOP_END_ROT_0(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_444 +#ifdef BUILD_CONVERT_16_RGB_ROT180 +void +evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_180(); + + r1 = (R_VAL(src_ptr)) >> 4; + g1 = (G_VAL(src_ptr)) >> 4; + b1 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_180(); + + r2 = (R_VAL(src_ptr)) >> 4; + g2 = (G_VAL(src_ptr)) >> 4; + b2 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 24) | (g2 << 20) | (b2 << 16) | + (r1 << 8 ) | (g1 << 4 ) | (b1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 24) | (g1 << 20) | (b1 << 16) | + (r2 << 8 ) | (g2 << 4 ) | (b2 ); +#endif + + CONVERT_LOOP2_END_ROT_180(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_444 +#ifdef BUILD_CONVERT_16_RGB_ROT180 +void +evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_180(); + + r = (R_VAL(src_ptr)) >> 4; + g = (G_VAL(src_ptr)) >> 4; + b = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; + if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; + if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; +#endif + + *dst_ptr = (r << 8) | (g << 4) | (b); + + CONVERT_LOOP_END_ROT_180(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_444 +#ifdef BUILD_CONVERT_16_RGB_ROT270 +void +evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_270(); + + r1 = (R_VAL(src_ptr)) >> 4; + g1 = (G_VAL(src_ptr)) >> 4; + b1 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_270(); + + r2 = (R_VAL(src_ptr)) >> 4; + g2 = (G_VAL(src_ptr)) >> 4; + b2 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 24) | (g2 << 20) | (b2 << 16) | + (r1 << 8 ) | (g1 << 4 ) | (b1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 24) | (g1 << 20) | (b1 << 16) | + (r2 << 8 ) | (g2 << 4 ) | (b2 ); +#endif + + CONVERT_LOOP2_END_ROT_270(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_444 +#ifdef BUILD_CONVERT_16_RGB_ROT270 +void +evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_270(); + + r = (R_VAL(src_ptr)) >> 4; + g = (G_VAL(src_ptr)) >> 4; + b = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; + if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; + if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; +#endif + + *dst_ptr = (r << 8) | (g << 4) | (b); + + CONVERT_LOOP_END_ROT_270(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_444 +#ifdef BUILD_CONVERT_16_RGB_ROT90 +void +evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_90(); + + r1 = (R_VAL(src_ptr)) >> 4; + g1 = (G_VAL(src_ptr)) >> 4; + b1 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_90(); + + r2 = (R_VAL(src_ptr)) >> 4; + g2 = (G_VAL(src_ptr)) >> 4; + b2 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 24) | (g2 << 20) | (b2 << 16) | + (r1 << 8 ) | (g1 << 4 ) | (b1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 24) | (g1 << 20) | (b1 << 16) | + (r2 << 8 ) | (g2 << 4 ) | (b2 ); +#endif + + CONVERT_LOOP2_END_ROT_90(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_444 +#ifdef BUILD_CONVERT_16_RGB_ROT90 +void +evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_90(); + + r = (R_VAL(src_ptr)) >> 4; + g = (G_VAL(src_ptr)) >> 4; + b = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; + if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; + if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; +#endif + + *dst_ptr = (r << 8) | (g << 4) | (b); + + CONVERT_LOOP_END_ROT_90(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_454645 +#ifdef BUILD_CONVERT_16_RGB_ROT0 +void +evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_0(); + + r1 = (R_VAL(src_ptr)) >> 4; + g1 = (G_VAL(src_ptr)) >> 4; + b1 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_0(); + + r2 = (R_VAL(src_ptr)) >> 4; + g2 = (G_VAL(src_ptr)) >> 4; + b2 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 28) | (g2 << 23) | (b2 << 17) | + (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 28) | (g1 << 23) | (b1 << 17) | + (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); +#endif + + CONVERT_LOOP2_END_ROT_0(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_454645 +#ifdef BUILD_CONVERT_16_RGB_ROT0 +void +evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + r = (R_VAL(src_ptr)) >> 4; + g = (G_VAL(src_ptr)) >> 4; + b = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; + if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; + if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; +#endif + + *dst_ptr = (r << 12) | (g << 7) | (b << 1); + + CONVERT_LOOP_END_ROT_0(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_454645 +#ifdef BUILD_CONVERT_16_RGB_ROT180 +void +evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_180(); + + r1 = (R_VAL(src_ptr)) >> 4; + g1 = (G_VAL(src_ptr)) >> 4; + b1 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_180(); + + r2 = (R_VAL(src_ptr)) >> 4; + g2 = (G_VAL(src_ptr)) >> 4; + b2 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 28) | (g2 << 23) | (b2 << 17) | + (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 28) | (g1 << 23) | (b1 << 17) | + (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); +#endif + + CONVERT_LOOP2_END_ROT_180(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_454645 +#ifdef BUILD_CONVERT_16_RGB_ROT180 +void +evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_180(); + + r = (R_VAL(src_ptr)) >> 4; + g = (G_VAL(src_ptr)) >> 4; + b = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; + if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; + if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; +#endif + + *dst_ptr = (r << 12) | (g << 7) | (b << 1); + + CONVERT_LOOP_END_ROT_180(); + return; + pal = 0; +} +#endif +#endif + + +#ifdef BUILD_CONVERT_16_RGB_454645 +#ifdef BUILD_CONVERT_16_RGB_ROT270 +void +evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_270(); + + r1 = (R_VAL(src_ptr)) >> 4; + g1 = (G_VAL(src_ptr)) >> 4; + b1 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_270(); + + r2 = (R_VAL(src_ptr)) >> 4; + g2 = (G_VAL(src_ptr)) >> 4; + b2 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 28) | (g2 << 23) | (b2 << 17) | + (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 28) | (g1 << 23) | (b1 << 17) | + (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); +#endif + + CONVERT_LOOP2_END_ROT_270(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_454645 +#ifdef BUILD_CONVERT_16_RGB_ROT270 +void +evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_270(); + + r = (R_VAL(src_ptr)) >> 4; + g = (G_VAL(src_ptr)) >> 4; + b = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; + if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; + if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; +#endif + + *dst_ptr = (r << 12) | (g << 7) | (b << 1); + + CONVERT_LOOP_END_ROT_270(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_454645 +#ifdef BUILD_CONVERT_16_RGB_ROT90 +void +evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_90(); + + r1 = (R_VAL(src_ptr)) >> 4; + g1 = (G_VAL(src_ptr)) >> 4; + b1 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_90(); + + r2 = (R_VAL(src_ptr)) >> 4; + g2 = (G_VAL(src_ptr)) >> 4; + b2 = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 28) | (g2 << 23) | (b2 << 17) | + (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 28) | (g1 << 23) | (b1 << 17) | + (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); +#endif + + CONVERT_LOOP2_END_ROT_90(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_454645 +#ifdef BUILD_CONVERT_16_RGB_ROT90 +void +evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_90(); + + r = (R_VAL(src_ptr)) >> 4; + g = (G_VAL(src_ptr)) >> 4; + b = (B_VAL(src_ptr)) >> 4; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); + if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; + if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; + if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; +#endif + + *dst_ptr = (r << 12) | (g << 7) | (b << 1); + + CONVERT_LOOP_END_ROT_90(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_555 +#ifdef BUILD_CONVERT_16_RGB_ROT0 +void +evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_0(); + + r1 = (R_VAL(src_ptr)) >> 3; + g1 = (G_VAL(src_ptr)) >> 3; + b1 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_0(); + + r2 = (R_VAL(src_ptr)) >> 3; + g2 = (G_VAL(src_ptr)) >> 3; + b2 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 26) | (g2 << 21) | (b2 << 16) | + (r1 << 10) | (g1 << 5 ) | (b1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 26) | (g1 << 21) | (b1 << 16) | + (r2 << 10) | (g2 << 5 ) | (b2 ); +#endif + + CONVERT_LOOP2_END_ROT_0(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_555 +#ifdef BUILD_CONVERT_16_RGB_ROT0 +void +evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + r = (R_VAL(src_ptr)) >> 3; + g = (G_VAL(src_ptr)) >> 3; + b = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; + if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; + if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; +#endif + + *dst_ptr = (r << 10) | (g << 5) | (b); + + CONVERT_LOOP_END_ROT_0(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_555 +#ifdef BUILD_CONVERT_16_RGB_ROT180 +void +evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_180(); + + r1 = (R_VAL(src_ptr)) >> 3; + g1 = (G_VAL(src_ptr)) >> 3; + b1 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_180(); + + r2 = (R_VAL(src_ptr)) >> 3; + g2 = (G_VAL(src_ptr)) >> 3; + b2 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 26) | (g2 << 21) | (b2 << 16) | + (r1 << 10) | (g1 << 5 ) | (b1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 26) | (g1 << 21) | (b1 << 16) | + (r2 << 10) | (g2 << 5 ) | (b2 ); +#endif + + CONVERT_LOOP2_END_ROT_180(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_555 +#ifdef BUILD_CONVERT_16_RGB_ROT180 +void +evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_180(); + + r = (R_VAL(src_ptr)) >> 3; + g = (G_VAL(src_ptr)) >> 3; + b = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; + if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; + if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; +#endif + + *dst_ptr = (r << 10) | (g << 5) | (b); + + CONVERT_LOOP_END_ROT_180(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_555 +#ifdef BUILD_CONVERT_16_RGB_ROT270 +void +evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_270(); + + r1 = (R_VAL(src_ptr)) >> 3; + g1 = (G_VAL(src_ptr)) >> 3; + b1 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_270(); + + r2 = (R_VAL(src_ptr)) >> 3; + g2 = (G_VAL(src_ptr)) >> 3; + b2 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 26) | (g2 << 21) | (b2 << 16) | + (r1 << 10) | (g1 << 5 ) | (b1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 26) | (g1 << 21) | (b1 << 16) | + (r2 << 10) | (g2 << 5 ) | (b2 ); +#endif + + CONVERT_LOOP2_END_ROT_270(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_555 +#ifdef BUILD_CONVERT_16_RGB_ROT270 +void +evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_270(); + + r = (R_VAL(src_ptr)) >> 3; + g = (G_VAL(src_ptr)) >> 3; + b = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; + if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; + if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; +#endif + + *dst_ptr = (r << 10) | (g << 5) | (b); + + CONVERT_LOOP_END_ROT_270(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_555 +#ifdef BUILD_CONVERT_16_RGB_ROT90 +void +evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r1, g1, b1; + DATA8 r2, g2, b2; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP2_START_ROT_90(); + + r1 = (R_VAL(src_ptr)) >> 3; + g1 = (G_VAL(src_ptr)) >> 3; + b1 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; + if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; + if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; +#endif + + CONVERT_LOOP2_INC_ROT_90(); + + r2 = (R_VAL(src_ptr)) >> 3; + g2 = (G_VAL(src_ptr)) >> 3; + b2 = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; + if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; + if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; +#endif + +#ifndef WORDS_BIGENDIAN + *((DATA32 *)dst_ptr) = + (r2 << 26) | (g2 << 21) | (b2 << 16) | + (r1 << 10) | (g1 << 5 ) | (b1 ); +#else + *((DATA32 *)dst_ptr) = + (r1 << 26) | (g1 << 21) | (b1 << 16) | + (r2 << 10) | (g2 << 5 ) | (b2 ); +#endif + + CONVERT_LOOP2_END_ROT_90(); + return; + pal = 0; +} +#endif +#endif + +#ifdef BUILD_CONVERT_16_RGB_555 +#ifdef BUILD_CONVERT_16_RGB_ROT90 +void +evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA16 *dst_ptr; + int x, y; + DATA8 r, g, b; +#ifndef BUILD_NO_DITHER_MASK + DATA8 dith; +#endif + + dst_ptr = (DATA16 *)dst; + + CONVERT_LOOP_START_ROT_90(); + + r = (R_VAL(src_ptr)) >> 3; + g = (G_VAL(src_ptr)) >> 3; + b = (B_VAL(src_ptr)) >> 3; + +#ifndef BUILD_NO_DITHER_MASK + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); + if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; + if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; + if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; +#endif + + *dst_ptr = (r << 10) | (g << 5) | (b); + + CONVERT_LOOP_END_ROT_90(); + return; + pal = 0; +} +#endif +#endif + diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h new file mode 100644 index 0000000..f7ae63c --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h @@ -0,0 +1,50 @@ +#ifndef _EVAS_CONVERT_RGB_16_H +#define _EVAS_CONVERT_RGB_16_H + + +void evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + +void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + +void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + +void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + + +#endif /* _EVAS_CONVERT_RGB_16_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c new file mode 100644 index 0000000..9efa006 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c @@ -0,0 +1,89 @@ +#include "evas_common.h" +#include "evas_convert_rgb_24.h" + +#ifdef BUILD_CONVERT_24_RGB_888 +void +evas_common_convert_rgba_to_24bpp_rgb_888(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + + dst_ptr = (DATA8 *)dst; + src_ptr = (DATA32 *)src; + + for (y = 0; y < h; y++) + { + for (x = 0; x < w; x++) + { + dst_ptr[0] = R_VAL(src_ptr); + dst_ptr[1] = G_VAL(src_ptr); + dst_ptr[2] = B_VAL(src_ptr); + src_ptr++; + dst_ptr+=3; + } + src_ptr += src_jump; + dst_ptr += (dst_jump * 3); + } + return; +} +#endif +#ifdef BUILD_CONVERT_24_RGB_666 +void +evas_common_convert_rgba_to_24bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr, *scratch_ptr; + DATA32 scratch; + int x, y; + + dst_ptr = (DATA8 *)dst; + src_ptr = (DATA32 *)src; + + scratch_ptr = (DATA8 *)(&scratch); + for (y = 0; y < h; y++) + { + for (x = 0; x < w; x++) + { + scratch = + (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) | + ((G_VAL(src_ptr) << 4) & 0x000fc0); + dst_ptr[0] = scratch_ptr[1]; + dst_ptr[1] = scratch_ptr[2]; + dst_ptr[2] = scratch_ptr[3]; + src_ptr++; + dst_ptr+=3; + } + src_ptr += src_jump; + dst_ptr += (dst_jump * 3); + } + return; +} +#endif +#ifdef BUILD_CONVERT_24_BGR_888 +void +evas_common_convert_rgba_to_24bpp_bgr_888(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + + dst_ptr = (DATA8 *)dst; + src_ptr = (DATA32 *)src; + + for (y = 0; y < h; y++) + { + for (x = 0; x < w; x++) + { + dst_ptr[2] = R_VAL(src_ptr); + dst_ptr[1] = G_VAL(src_ptr); + dst_ptr[0] = B_VAL(src_ptr); + src_ptr++; + dst_ptr+=3; + } + src_ptr += src_jump; + dst_ptr += (dst_jump * 3); + } + return; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h new file mode 100644 index 0000000..bc114ca --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h @@ -0,0 +1,10 @@ +#ifndef _EVAS_CONVERT_RGB_24_H +#define _EVAS_CONVERT_RGB_24_H + + +void evas_common_convert_rgba_to_24bpp_rgb_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_24bpp_bgr_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + +void evas_common_convert_rgba_to_24bpp_rgb_666 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + +#endif /* _EVAS_CONVERT_RGB_24_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c new file mode 100644 index 0000000..41dac6f --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c @@ -0,0 +1,460 @@ +#include "evas_common.h" +#include "evas_convert_rgb_32.h" + +#ifdef BUILD_CONVERT_32_RGB_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT0 +void +evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int y; + Gfx_Func_Copy func; + + dst_ptr = (DATA32 *)dst; + src_ptr = src; + + func = evas_common_draw_func_copy_get(w, 0); + + for (y = 0; y < h; y++) + { + func(src_ptr, dst_ptr, w); + src_ptr += w + src_jump; + dst_ptr += w + dst_jump; + } + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_RGB_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT180 +void +evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_180(); + + *dst_ptr = *src_ptr; + + CONVERT_LOOP_END_ROT_180(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_RGB_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT270 +void +evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_270(); + + *dst_ptr = *src_ptr; + + CONVERT_LOOP_END_ROT_270(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_RGB_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT90 +void +evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ +#ifndef BUILD_NEON + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + CONVERT_LOOP_START_ROT_90(); + + *dst_ptr = *src_ptr; + + CONVERT_LOOP_END_ROT_90(); +#else + if ((w & 1) || (h & 1)) + { + /* Rarely (if ever) if ever: so slow path is fine */ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + CONVERT_LOOP_START_ROT_90(); + + *dst_ptr = *src_ptr; + + CONVERT_LOOP_END_ROT_90(); + } else { +#define AP "convert_rgba32_rot_90_" + asm volatile ( + ".fpu neon \n\t" + " mov %[s1], %[src] \n\t" + " add %[s1], %[h],lsl #2 \n\t" + " sub %[s1], #8 \n\t" + + " mov %[s2], %[src] \n\t" + " add %[s2], %[h], lsl #3 \n\t" + " add %[s2], %[sjmp], lsr #1 \n\t" + " sub %[s2], #8 \n\t" + + " mov %[d1], %[dst] \n\t" + + " add %[d2], %[d1], %[djmp] \n\t" + " add %[d2], %[w], lsl #2 \n\t" + + " mov %[sadv], %[h], lsl #3 \n\t" + " add %[sadv], %[sjmp], lsl #1 \n\t" + + " mov %[y], #0 \n\t" + " mov %[x], #0 \n\t" + AP"loop: \n\t" + " vld1.u32 d0, [%[s1]] \n\t" + " vld1.u32 d1, [%[s2]] \n\t" + " add %[x], #2 \n\t" + " add %[s1], %[sadv] \n\t" + " add %[s2], %[sadv] \n\t" + " vtrn.u32 d0, d1 \n\t" + " cmp %[x], %[w] \n\t" + " vst1.u32 d1, [%[d1]]! \n\t" + " vst1.u32 d0, [%[d2]]! \n\t" + " blt "AP"loop \n\t" + + " mov %[x], #0 \n\t" + " add %[d1], %[djmp] \n\t" + " add %[d1], %[w], lsl #2 \n\t" + " add %[d2], %[djmp] \n\t" + " add %[d2], %[w], lsl #2 \n\t" + + " mov %[s1], %[src] \n\t" + " add %[s1], %[h], lsl #2 \n\t" + " sub %[s1], %[y], lsl #2 \n\t" + " sub %[s1], #16 \n\t" + + " add %[s2], %[s1], %[h], lsl #2 \n\t" + " add %[s2], %[sjmp], lsl #2 \n\t" + + " add %[y], #2 \n\t" + + " cmp %[y], %[h] \n\t" + " blt "AP"loop \n\t" + + : // Out + : [s1] "r" (1), + [s2] "r" (11), + [d1] "r" (2), + [d2] "r" (12), + [src] "r" (src), + [dst] "r" (dst), + [x] "r" (3), + [y] "r" (4), + [w] "r" (w), + [h] "r" (h), + [sadv] "r" (5), + [sjmp] "r" (src_jump * 4), + [djmp] "r" (dst_jump * 4 * 2) + : "d0", "d1", "memory", "cc"// Clober + + + ); + } +#undef AP +#endif + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_RGBX_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT0 +void +evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_0(); + +// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); + *dst_ptr = (*src_ptr << 8); + + CONVERT_LOOP_END_ROT_0(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_RGBX_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT180 +void +evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_180(); + +// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); + *dst_ptr = (*src_ptr << 8); + + CONVERT_LOOP_END_ROT_180(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_RGBX_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT270 +void +evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_270(); + +// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); + *dst_ptr = (*src_ptr << 8); + + CONVERT_LOOP_END_ROT_270(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_RGBX_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT90 +void +evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_90(); + +// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); + *dst_ptr = (*src_ptr << 8); + + CONVERT_LOOP_END_ROT_90(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_BGR_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT0 +void +evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); + + CONVERT_LOOP_END_ROT_0(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_BGR_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT180 +void +evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_180(); + + *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); + + CONVERT_LOOP_END_ROT_180(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_BGR_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT270 +void +evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_270(); + + *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); + + CONVERT_LOOP_END_ROT_270(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_BGR_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT90 +void +evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_90(); + + *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); + + CONVERT_LOOP_END_ROT_90(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_BGRX_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT0 +void +evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); + + CONVERT_LOOP_END_ROT_0(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_BGRX_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT180 +void +evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_180(); + + *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); + + CONVERT_LOOP_END_ROT_180(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_BGRX_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT270 +void +evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_270(); + + *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); + + CONVERT_LOOP_END_ROT_270(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_BGRX_8888 +#ifdef BUILD_CONVERT_32_RGB_ROT90 +void +evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_90(); + + *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); + + CONVERT_LOOP_END_ROT_90(); + return; +} +#endif +#endif + +#ifdef BUILD_CONVERT_32_RGB_666 +#ifdef BUILD_CONVERT_32_RGB_ROT0 +void +evas_common_convert_rgba_to_32bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) +{ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + *dst_ptr = + (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) | + ((G_VAL(src_ptr) << 4) & 0x000fc0); + + CONVERT_LOOP_END_ROT_0(); + return; +} +#endif +#endif + diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h new file mode 100644 index 0000000..75595c7 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h @@ -0,0 +1,24 @@ +#ifndef _EVAS_CONVERT_RGB_32_H +#define _EVAS_CONVERT_RGB_32_H + + +void evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + +void evas_common_convert_rgba_to_32bpp_rgb_666 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + +#endif /* _EVAS_CONVERT_RGB_32_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c new file mode 100644 index 0000000..f69f398 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c @@ -0,0 +1,248 @@ +#include "evas_common.h" +#include "evas_convert_rgb_8.h" + +#ifdef USE_DITHER_44 +extern const DATA8 _evas_dither_44[4][4]; +#endif +#ifdef USE_DITHER_128128 +extern const DATA8 _evas_dither_128128[128][128]; +#endif + +#ifdef BUILD_CONVERT_8_RGB_332 +void evas_common_convert_rgba_to_8bpp_rgb_332_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + DATA8 r, g, b; + DATA8 dith, dith2; + + dst_ptr = (DATA8 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3); + dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); +/* r = (R_VAL(src_ptr)) >> (8 - 3);*/ +/* g = (G_VAL(src_ptr)) >> (8 - 3);*/ +/* b = (B_VAL(src_ptr)) >> (8 - 2);*/ +/* if (((R_VAL(src_ptr) - (r << (8 - 3))) >= dith ) && (r < 0x07)) r++;*/ +/* if (((G_VAL(src_ptr) - (g << (8 - 3))) >= dith ) && (g < 0x07)) g++;*/ +/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith2) && (b < 0x03)) b++;*/ + r = (R_VAL(src_ptr)) * 7 / 255; + if (((R_VAL(src_ptr) - (r * 255 / 7)) >= dith ) && (r < 0x07)) r++; + g = (G_VAL(src_ptr)) * 7 / 255; + if (((G_VAL(src_ptr) - (g * 255 / 7)) >= dith ) && (g < 0x07)) g++; + b = (B_VAL(src_ptr)) * 3 / 255; + if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith2) && (b < 0x03)) b++; + + *dst_ptr = pal[(r << 5) | (g << 2) | (b)]; + + CONVERT_LOOP_END_ROT_0(); +} +#endif +#ifdef BUILD_CONVERT_8_RGB_666 +static DATA8 p_to_6[256]; +static DATA8 p_to_6_err[256]; + +void evas_common_convert_rgba_to_8bpp_rgb_666_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + DATA8 r, g, b; + DATA8 dith; + static int tables_calcualted = 0; + + if (!tables_calcualted) + { + int i; + + tables_calcualted = 1; + for (i = 0; i < 256; i++) + p_to_6[i] = (i * 5) / 255; + for (i = 0; i < 256; i++) + p_to_6_err[i] = ((i * 5) - (p_to_6[i] * 255)) * DM_DIV / 255; + } + dst_ptr = (DATA8 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + r = p_to_6[(R_VAL(src_ptr))]; + g = p_to_6[(G_VAL(src_ptr))]; + b = p_to_6[(B_VAL(src_ptr))]; + dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; + if ((p_to_6_err[(R_VAL(src_ptr))] >= dith ) && (r < 5)) r++; + if ((p_to_6_err[(G_VAL(src_ptr))] >= dith ) && (g < 5)) g++; + if ((p_to_6_err[(B_VAL(src_ptr))] >= dith ) && (b < 5)) b++; + + *dst_ptr = pal[(r * 36) + (g * 6) + (b)]; + + CONVERT_LOOP_END_ROT_0(); +} +#endif +#ifdef BUILD_CONVERT_8_RGB_232 +void evas_common_convert_rgba_to_8bpp_rgb_232_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + DATA8 r, g, b; + DATA8 dith, dith2; + + dst_ptr = (DATA8 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3); + dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); +/* r = (R_VAL(src_ptr)) >> (8 - 2);*/ +/* g = (G_VAL(src_ptr)) >> (8 - 3);*/ +/* b = (B_VAL(src_ptr)) >> (8 - 2);*/ +/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith2) && (r < 0x03)) r++;*/ +/* if (((G_VAL(src_ptr) - (g << (8 - 3))) >= dith ) && (g < 0x07)) g++;*/ +/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith2) && (b < 0x03)) b++;*/ + r = (R_VAL(src_ptr)) * 3 / 255; + if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith2) && (r < 0x03)) r++; + g = (G_VAL(src_ptr)) * 7 / 255; + if (((G_VAL(src_ptr) - (g * 255 / 7)) >= dith ) && (g < 0x07)) g++; + b = (B_VAL(src_ptr)) * 3 / 255; + if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith2) && (b < 0x03)) b++; + + *dst_ptr = pal[(r << 5) | (g << 2) | (b)]; + + CONVERT_LOOP_END_ROT_0(); +} +#endif +#ifdef BUILD_CONVERT_8_RGB_222 +void evas_common_convert_rgba_to_8bpp_rgb_222_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + DATA8 r, g, b; + DATA8 dith; + + dst_ptr = (DATA8 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); +/* r = (R_VAL(src_ptr)) >> (8 - 2);*/ +/* g = (G_VAL(src_ptr)) >> (8 - 2);*/ +/* b = (B_VAL(src_ptr)) >> (8 - 2);*/ +/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith ) && (r < 0x03)) r++;*/ +/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/ +/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith ) && (b < 0x03)) b++;*/ + r = (R_VAL(src_ptr)) * 3 / 255; + if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith ) && (r < 0x03)) r++; + g = (G_VAL(src_ptr)) * 3 / 255; + if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++; + b = (B_VAL(src_ptr)) * 3 / 255; + if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith ) && (b < 0x03)) b++; + + *dst_ptr = pal[(r << 4) | (g << 2) | (b)]; + + CONVERT_LOOP_END_ROT_0(); +} +#endif +#ifdef BUILD_CONVERT_8_RGB_221 +void evas_common_convert_rgba_to_8bpp_rgb_221_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + DATA8 r, g, b; + DATA8 dith, dith2; + + dst_ptr = (DATA8 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); + dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1); +/* r = (R_VAL(src_ptr)) >> (8 - 2);*/ +/* g = (G_VAL(src_ptr)) >> (8 - 2);*/ +/* b = (B_VAL(src_ptr)) >> (8 - 1);*/ +/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith ) && (r < 0x03)) r++;*/ +/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/ +/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith2) && (b < 0x01)) b++;*/ + r = (R_VAL(src_ptr)) * 3 / 255; + if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith ) && (r < 0x03)) r++; + g = (G_VAL(src_ptr)) * 3 / 255; + if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++; + b = (B_VAL(src_ptr)) * 1 / 255; + if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith2) && (b < 0x01)) b++; + + *dst_ptr = pal[(r << 3) | (g << 1) | (b)]; + + CONVERT_LOOP_END_ROT_0(); +} +#endif +#ifdef BUILD_CONVERT_8_RGB_121 +void evas_common_convert_rgba_to_8bpp_rgb_121_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + DATA8 r, g, b; + DATA8 dith, dith2; + + dst_ptr = (DATA8 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); + dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1); +/* r = (R_VAL(src_ptr)) >> (8 - 1);*/ +/* g = (G_VAL(src_ptr)) >> (8 - 2);*/ +/* b = (B_VAL(src_ptr)) >> (8 - 1);*/ +/* if (((R_VAL(src_ptr) - (r << (8 - 1))) >= dith2) && (r < 0x01)) r++;*/ +/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/ +/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith2) && (b < 0x01)) b++;*/ + + r = (R_VAL(src_ptr)) * 1 / 255; + if (((R_VAL(src_ptr) - (r * 255 / 1)) >= dith2) && (r < 0x01)) r++; + g = (G_VAL(src_ptr)) * 3 / 255; + if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++; + b = (B_VAL(src_ptr)) * 1 / 255; + if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith2) && (b < 0x01)) b++; + + *dst_ptr = pal[(r << 3) | (g << 1) | (b)]; + + CONVERT_LOOP_END_ROT_0(); +} +#endif +#ifdef BUILD_CONVERT_8_RGB_111 +void evas_common_convert_rgba_to_8bpp_rgb_111_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) +{ + DATA32 *src_ptr; + DATA8 *dst_ptr; + int x, y; + DATA8 r, g, b; + DATA8 dith; + + dst_ptr = (DATA8 *)dst; + + CONVERT_LOOP_START_ROT_0(); + + dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1); +/* r = (R_VAL(src_ptr)) >> (8 - 1);*/ +/* g = (G_VAL(src_ptr)) >> (8 - 1);*/ +/* b = (B_VAL(src_ptr)) >> (8 - 1);*/ +/* if (((R_VAL(src_ptr) - (r << (8 - 1))) >= dith ) && (r < 0x01)) r++;*/ +/* if (((G_VAL(src_ptr) - (g << (8 - 1))) >= dith ) && (g < 0x01)) g++;*/ +/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith ) && (b < 0x01)) b++;*/ + + r = (R_VAL(src_ptr)) * 1 / 255; + if (((R_VAL(src_ptr) - (r * 255 / 1)) >= dith ) && (r < 0x01)) r++; + g = (G_VAL(src_ptr)) * 1 / 255; + if (((G_VAL(src_ptr) - (g * 255 / 1)) >= dith ) && (g < 0x01)) g++; + b = (B_VAL(src_ptr)) * 1 / 255; + if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith ) && (b < 0x01)) b++; + + *dst_ptr = pal[(r << 2) | (g << 1) | (b)]; + + CONVERT_LOOP_END_ROT_0(); +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h new file mode 100644 index 0000000..edb3a89 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h @@ -0,0 +1,14 @@ +#ifndef _EVAS_CONVERT_RGB_8_H +#define _EVAS_CONVERT_RGB_8_H + + +void evas_common_convert_rgba_to_8bpp_rgb_332_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_8bpp_rgb_666_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_8bpp_rgb_232_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_8bpp_rgb_222_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_8bpp_rgb_221_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_8bpp_rgb_121_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); +void evas_common_convert_rgba_to_8bpp_rgb_111_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + + +#endif /* _EVAS_CONVERT_RGB_8_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_yuv.c b/libraries/evas/src/lib/engines/common/evas_convert_yuv.c new file mode 100644 index 0000000..a0d155c --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_yuv.c @@ -0,0 +1,1258 @@ +#include "evas_common.h" +#include "evas_convert_yuv.h" + +#if defined BUILD_MMX || defined BUILD_SSE +# include "evas_mmx.h" +#endif + +#if defined HAVE_ALTIVEC_H +# include +#ifdef CONFIG_DARWIN +#define AVV(x...) (x) +#else +#define AVV(x...) {x} +#endif + +#endif + +#ifdef BUILD_CONVERT_YUV + +static void _evas_yuv_init (void); +static void _evas_yv12torgb_sse (unsigned char **yuv, unsigned char *rgb, int w, int h); +static void _evas_yv12torgb_mmx (unsigned char **yuv, unsigned char *rgb, int w, int h); +#ifdef BUILD_ALTIVEC +static void _evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h); +static void _evas_yv12torgb_diz (unsigned char **yuv, unsigned char *rgb, int w, int h); +#endif +static void _evas_yv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h); +static void _evas_yuy2torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h); +static void _evas_nv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h); +static void _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h); + +#define CRV 104595 +#define CBU 132251 +#define CGU 25624 +#define CGV 53280 +#define YMUL 76283 +#define OFF 32768 +#define BITRES 16 + +/* calculation float resolution in bits */ +/* ie RES = 6 is 10.6 fixed point */ +/* RES = 8 is 8.8 fixed point */ +/* RES = 4 is 12.4 fixed point */ +/* NB: going above 6 will lead to overflow... :( */ +#define RES 6 + +#define RZ(i) (i >> (BITRES - RES)) +#define FOUR(i) {i, i, i, i} + +#if defined BUILD_MMX || defined BUILD_SSE +__attribute__ ((aligned (8))) const volatile unsigned short _const_crvcrv[4] = FOUR(RZ(CRV)); +__attribute__ ((aligned (8))) const volatile unsigned short _const_cbucbu[4] = FOUR(RZ(CBU)); +__attribute__ ((aligned (8))) const volatile unsigned short _const_cgucgu[4] = FOUR(RZ(CGU)); +__attribute__ ((aligned (8))) const volatile unsigned short _const_cgvcgv[4] = FOUR(RZ(CGV)); +__attribute__ ((aligned (8))) const volatile unsigned short _const_ymul [4] = FOUR(RZ(YMUL)); +__attribute__ ((aligned (8))) const volatile unsigned short _const_128 [4] = FOUR(128); +__attribute__ ((aligned (8))) const volatile unsigned short _const_32 [4] = FOUR(RZ(OFF)); +__attribute__ ((aligned (8))) const volatile unsigned short _const_16 [4] = FOUR(16); +__attribute__ ((aligned (8))) const volatile unsigned short _const_ff [4] = FOUR(-1); + +#define CONST_CRVCRV *_const_crvcrv +#define CONST_CBUCBU *_const_cbucbu +#define CONST_CGUCGU *_const_cgucgu +#define CONST_CGVCGV *_const_cgvcgv +#define CONST_YMUL *_const_ymul +#define CONST_128 *_const_128 +#define CONST_32 *_const_32 +#define CONST_16 *_const_16 +#define CONST_FF *_const_ff + +/* for C non aligned cleanup */ +const int _crv = RZ(CRV); /* 1.596 */ +const int _cbu = RZ(CBU); /* 2.018 */ +const int _cgu = RZ(CGU); /* 0.391 */ +const int _cgv = RZ(CGV); /* 0.813 */ + +#endif + +#ifdef BUILD_ALTIVEC +#ifdef __VEC__ +const vector unsigned short res = AVV(RES); +const vector signed short crv = AVV(RZ(CRV)); +const vector signed short cbu = AVV(RZ(CBU)); +const vector signed short cgu = AVV(RZ(CGU)); +const vector signed short cgv = AVV(RZ(CGV)); +const vector signed short ymul = AVV(RZ(YMUL)); +const vector signed short c128 = AVV(128); +const vector signed short c32 = AVV(RZ(OFF)); +const vector signed short c16 = AVV(16); +const vector unsigned char zero = AVV(0); +const vector signed short maxchar = AVV(255); +const vector unsigned char pickrg1 = AVV(0, 0x1, 0x11, 0, + 0, 0x3, 0x13, 0, + 0, 0x5, 0x15, 0, + 0, 0x7, 0x17, 0); +const vector unsigned char pickrg2 = AVV(0, 0x9, 0x19, 0, + 0, 0xb, 0x1b, 0, + 0, 0xd, 0x1d, 0, + 0, 0xf, 0x1f, 0); +const vector unsigned char pickrgb1 = AVV(0x3, 0x1, 0x2, 0x11, + 0x7, 0x5, 0x6, 0x13, + 0xb, 0x9, 0xa, 0x15, + 0xf, 0xd, 0xe, 0x17); +const vector unsigned char pickrgb2 = AVV(0x3, 0x1, 0x2, 0x19, + 0x7, 0x5, 0x6, 0x1b, + 0xb, 0x9, 0xa, 0x1d, + 0xf, 0xd, 0xe, 0x1f); +#endif +#endif + +#ifdef BUILD_C + +/* shortcut speedup lookup-tables */ +static short _v1164[256]; +static short _v1596[256]; +static short _v813[256]; +static short _v391[256]; +static short _v2018[256]; + +static unsigned char _clip_lut[1024]; +#define LUT_CLIP(i) ((_clip_lut+384)[(i)]) + +#define CMP_CLIP(i) ((i&256)? (~(i>>10)) : i); + +static int initted = 0; + +#endif + +void +evas_common_convert_yuv_420p_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) +{ + int mmx, sse, sse2; + +#if defined BUILD_MMX || defined BUILD_SSE + evas_common_cpu_can_do(&mmx, &sse, &sse2); +#endif +#ifndef BUILD_SSE + sse = 0; + sse2 = 0; +#endif +#ifndef BUILD_MMX + mmx = 0; +#endif + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) + _evas_yv12torgb_sse(src, dst, w, h); + else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + _evas_yv12torgb_mmx(src, dst, w, h); +#ifdef BUILD_ALTIVEC + if (evas_common_cpu_has_feature(CPU_FEATURE_ALTIVEC)) + _evas_yv12torgb_altivec(src, dst, w, h); +#endif + else + { +#ifdef BUILD_C + if (!initted) _evas_yuv_init(); + initted = 1; + /* FIXME: diz may be faster sometimes */ + _evas_yv12torgb_raster(src, dst, w, h); +#endif + } +} + +/* Thanks to Diz for this code. i've munged it a little and turned it into */ +/* inline macros. I tried beating it with a different algorithm using MMX */ +/* but failed. So here we are. This is the fastest YUV->RGB i know of for */ +/* x86. It has an issue that it doesn't convert colours accurately so the */ +/* image looks a little "yellowy". This is a result of only 10.6 fixed point */ +/* resolution as opposed to 16.16 in the C code. This could be fixed by */ +/* processing half the number of pixels per cycle and going up to 32bits */ +/* per element during compute, but it would all but negate the speedup */ +/* from mmx I think :( It might be possible to use SSE and SSE2 here, but */ +/* I haven't tried yet. Let's see. */ + +/* NB: XviD has almost the same code in it's assembly YV12->RGB code. same */ +/* algorithm, same constants, same all over actually, except it actually */ +/* does a few extra memory accesses that this one doesn't, so in theory */ +/* this code should be faster. In the end it's all just an mmx version of */ +/* the reference implimentation done with fixed point math */ + +static void +_evas_yv12torgb_sse(unsigned char **yuv, unsigned char *rgb, int w, int h) +{ +#ifdef BUILD_SSE + int xx, yy; + register unsigned char *yp1, *up, *vp; + unsigned char *dp1; + + /* destination pointers */ + dp1 = rgb; + + for (yy = 0; yy < h; yy++) + { + /* plane pointers */ + yp1 = yuv[yy]; + up = yuv[h + (yy / 2)]; + vp = yuv[h + (h / 2) + (yy / 2)]; + for (xx = 0; xx < (w - 7); xx += 8) + { + movd_m2r(*up, mm3); + movd_m2r(*vp, mm2); + movq_m2r(*yp1, mm0); + + pxor_r2r(mm7, mm7); + punpcklbw_r2r(mm7, mm2); + punpcklbw_r2r(mm7, mm3); + + movq_r2r(mm0, mm1); + psrlw_i2r(8, mm0); + psllw_i2r(8, mm1); + psrlw_i2r(8, mm1); + + movq_m2r(CONST_16, mm4); + psubsw_r2r(mm4, mm0); + psubsw_r2r(mm4, mm1); + + movq_m2r(CONST_128, mm5); + psubsw_r2r(mm5, mm2); + psubsw_r2r(mm5, mm3); + + movq_m2r(CONST_YMUL, mm4); + pmullw_r2r(mm4, mm0); + pmullw_r2r(mm4, mm1); + + movq_m2r(CONST_CRVCRV, mm7); + pmullw_r2r(mm3, mm7); + movq_m2r(CONST_CBUCBU, mm6); + pmullw_r2r(mm2, mm6); + movq_m2r(CONST_CGUCGU, mm5); + pmullw_r2r(mm2, mm5); + movq_m2r(CONST_CGVCGV, mm4); + pmullw_r2r(mm3, mm4); + + movq_r2r(mm0, mm2); + paddsw_r2r(mm7, mm2); + paddsw_r2r(mm1, mm7); + + psraw_i2r(RES, mm2); + psraw_i2r(RES, mm7); + packuswb_r2r(mm7, mm2); + + pxor_r2r(mm7, mm7); + movq_r2r(mm2, mm3); + punpckhbw_r2r(mm7, mm2); + punpcklbw_r2r(mm3, mm7); + por_r2r(mm7, mm2); + + movq_r2r(mm0, mm3); + psubsw_r2r(mm5, mm3); + psubsw_r2r(mm4, mm3); + paddsw_m2r(CONST_32, mm3); + + movq_r2r(mm1, mm7); + psubsw_r2r(mm5, mm7); + psubsw_r2r(mm4, mm7); + paddsw_m2r(CONST_32, mm7); + + psraw_i2r(RES, mm3); + psraw_i2r(RES, mm7); + packuswb_r2r(mm7, mm3); + + pxor_r2r(mm7, mm7); + movq_r2r(mm3, mm4); + punpckhbw_r2r(mm7, mm3); + punpcklbw_r2r(mm4, mm7); + por_r2r(mm7, mm3); + + movq_m2r(CONST_32, mm4); + paddsw_r2r(mm6, mm0); + paddsw_r2r(mm6, mm1); + paddsw_r2r(mm4, mm0); + paddsw_r2r(mm4, mm1); + psraw_i2r(RES, mm0); + psraw_i2r(RES, mm1); + packuswb_r2r(mm1, mm0); + + pxor_r2r(mm7, mm7); + movq_r2r(mm0, mm5); + punpckhbw_r2r(mm7, mm0); + punpcklbw_r2r(mm5, mm7); + por_r2r(mm7, mm0); + + movq_m2r(CONST_FF, mm1); + movq_r2r(mm0, mm5); + movq_r2r(mm3, mm6); + movq_r2r(mm2, mm7); + punpckhbw_r2r(mm3, mm2); + punpcklbw_r2r(mm6, mm7); + punpckhbw_r2r(mm1, mm0); + punpcklbw_r2r(mm1, mm5); + + movq_r2r(mm7, mm1); + punpckhwd_r2r(mm5, mm7); + punpcklwd_r2r(mm5, mm1); + + movq_r2r(mm2, mm4); + punpckhwd_r2r(mm0, mm2); + punpcklwd_r2r(mm0, mm4); + + movntq_r2m(mm1, *(dp1)); + movntq_r2m(mm7, *(dp1 + 8)); + movntq_r2m(mm4, *(dp1 + 16)); + movntq_r2m(mm2, *(dp1 + 24)); + + yp1 += 8; + up += 4; + vp += 4; + dp1 += 8 * 4; + } + /* cleanup pixles that arent a multiple of 8 pixels wide */ + if (xx < w) + { + int y, u, v, r, g, b; + + for (; xx < w; xx += 2) + { + u = (*up++) - 128; + v = (*vp++) - 128; + + y = RZ(YMUL) * ((*yp1++) - 16); + r = LUT_CLIP((y + (_crv * v)) >> RES); + g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); + b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); + *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); + + dp1 += 4; + + y = RZ(YMUL) * ((*yp1++) - 16); + r = LUT_CLIP((y + (_crv * v)) >> RES); + g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); + b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); + *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); + + dp1 += 4; + } + } + } + emms(); +#else + _evas_yv12torgb_mmx(yuv, rgb, w, h); +#endif +} + +static void +_evas_yv12torgb_mmx(unsigned char **yuv, unsigned char *rgb, int w, int h) +{ +#ifdef BUILD_MMX + int xx, yy; + register unsigned char *yp1, *up, *vp; + unsigned char *dp1; + + /* destination pointers */ + dp1 = rgb; + + for (yy = 0; yy < h; yy++) + { + /* plane pointers */ + yp1 = yuv[yy]; + up = yuv[h + (yy / 2)]; + vp = yuv[h + (h / 2) + (yy / 2)]; + for (xx = 0; xx < (w - 7); xx += 8) + { + movd_m2r(*up, mm3); + movd_m2r(*vp, mm2); + movq_m2r(*yp1, mm0); + + pxor_r2r(mm7, mm7); + punpcklbw_r2r(mm7, mm2); + punpcklbw_r2r(mm7, mm3); + + movq_r2r(mm0, mm1); + psrlw_i2r(8, mm0); + psllw_i2r(8, mm1); + psrlw_i2r(8, mm1); + + movq_m2r(CONST_16, mm4); + psubsw_r2r(mm4, mm0); + psubsw_r2r(mm4, mm1); + + movq_m2r(CONST_128, mm5); + psubsw_r2r(mm5, mm2); + psubsw_r2r(mm5, mm3); + + movq_m2r(CONST_YMUL, mm4); + pmullw_r2r(mm4, mm0); + pmullw_r2r(mm4, mm1); + + movq_m2r(CONST_CRVCRV, mm7); + pmullw_r2r(mm3, mm7); + movq_m2r(CONST_CBUCBU, mm6); + pmullw_r2r(mm2, mm6); + movq_m2r(CONST_CGUCGU, mm5); + pmullw_r2r(mm2, mm5); + movq_m2r(CONST_CGVCGV, mm4); + pmullw_r2r(mm3, mm4); + + movq_r2r(mm0, mm2); + paddsw_r2r(mm7, mm2); + paddsw_r2r(mm1, mm7); + + psraw_i2r(RES, mm2); + psraw_i2r(RES, mm7); + packuswb_r2r(mm7, mm2); + + pxor_r2r(mm7, mm7); + movq_r2r(mm2, mm3); + punpckhbw_r2r(mm7, mm2); + punpcklbw_r2r(mm3, mm7); + por_r2r(mm7, mm2); + + movq_r2r(mm0, mm3); + psubsw_r2r(mm5, mm3); + psubsw_r2r(mm4, mm3); + paddsw_m2r(CONST_32, mm3); + + movq_r2r(mm1, mm7); + psubsw_r2r(mm5, mm7); + psubsw_r2r(mm4, mm7); + paddsw_m2r(CONST_32, mm7); + + psraw_i2r(RES, mm3); + psraw_i2r(RES, mm7); + packuswb_r2r(mm7, mm3); + + pxor_r2r(mm7, mm7); + movq_r2r(mm3, mm4); + punpckhbw_r2r(mm7, mm3); + punpcklbw_r2r(mm4, mm7); + por_r2r(mm7, mm3); + + movq_m2r(CONST_32, mm4); + paddsw_r2r(mm6, mm0); + paddsw_r2r(mm6, mm1); + paddsw_r2r(mm4, mm0); + paddsw_r2r(mm4, mm1); + psraw_i2r(RES, mm0); + psraw_i2r(RES, mm1); + packuswb_r2r(mm1, mm0); + + pxor_r2r(mm7, mm7); + movq_r2r(mm0, mm5); + punpckhbw_r2r(mm7, mm0); + punpcklbw_r2r(mm5, mm7); + por_r2r(mm7, mm0); + + movq_m2r(CONST_FF, mm1); + movq_r2r(mm0, mm5); + movq_r2r(mm3, mm6); + movq_r2r(mm2, mm7); + punpckhbw_r2r(mm3, mm2); + punpcklbw_r2r(mm6, mm7); + punpckhbw_r2r(mm1, mm0); + punpcklbw_r2r(mm1, mm5); + + movq_r2r(mm7, mm1); + punpckhwd_r2r(mm5, mm7); + punpcklwd_r2r(mm5, mm1); + + movq_r2r(mm2, mm4); + punpckhwd_r2r(mm0, mm2); + punpcklwd_r2r(mm0, mm4); + + movq_r2m(mm1, *(dp1)); + movq_r2m(mm7, *(dp1 + 8)); + movq_r2m(mm4, *(dp1 + 16)); + movq_r2m(mm2, *(dp1 + 24)); + + yp1 += 8; + up += 4; + vp += 4; + dp1 += 8 * 4; + } + /* cleanup pixles that arent a multiple of 8 pixels wide */ + if (xx < w) + { + int y, u, v, r, g, b; + + for (; xx < w; xx += 2) + { + u = (*up++) - 128; + v = (*vp++) - 128; + + y = RZ(YMUL) * ((*yp1++) - 16); + r = LUT_CLIP((y + (_crv * v)) >> RES); + g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); + b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); + *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); + + dp1 += 4; + + y = RZ(YMUL) * ((*yp1++) - 16); + r = LUT_CLIP((y + (_crv * v)) >> RES); + g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); + b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); + *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); + + dp1 += 4; + } + } + } + emms(); +#else + _evas_yv12torgb_raster(yuv, rgb, w, h); +#endif +} + +#ifdef BUILD_ALTIVEC +static void +_evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h) +{ +#ifdef __VEC__ + int xx, yy; + int w2, h2; + unsigned char *yp1, *yp2, *up, *vp; + unsigned char *dp1, *dp2; + vector signed short y, u, v; + vector signed short r, g, b; + vector signed short tmp1, tmp2, tmp3; + vector unsigned char yperm, uperm, vperm, rgb1, rgb2; + vector unsigned char alpha; + + /* handy halved w & h */ + w2 = w / 2; + h2 = h / 2; + /* plane pointers */ + yp1 = yuv; + yp2 = yuv + w; + up = yuv + (w * h); + vp = up + (w2 * h2); + /* destination pointers */ + dp1 = rgb; + dp2 = rgb + (w * 4); + + alpha = vec_mergeh((vector unsigned char)AVV(255), zero); + alpha = (vector unsigned char)vec_mergeh((vector unsigned short)alpha, + (vector unsigned short)zero); + + for (yy = 0; yy < h2; yy++) + { + for (xx = 0; xx < w2; xx += 4) + { +/* Cycles */ + /* + * Load 4 y and 4 u & v pixels for the 8x2 pixel block. + */ +/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp1); +/* 3 */ tmp1 = (vector signed short)vec_lde(0, (unsigned int *)up); +/* 3 */ tmp2 = (vector signed short)vec_lde(0, (unsigned int *)vp); + + /* Prepare for aligning the data in their vectors */ +/* 3 */ yperm = vec_lvsl(0, yp1); +/* 3 */ uperm = vec_lvsl(0, up); +/* 3 */ vperm = vec_lvsl(0, vp); + yp1 += 4; + + /* Save y and load the next 4 y pixels for a total of 8 */ +/* 2 */ y = vec_perm(tmp3, tmp3, yperm); +/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp1); + + /* Setup and calculate the 4 u pixels */ +/* 2 */ tmp1 = vec_perm(tmp1, tmp1, uperm); +/* 2 */ tmp2 = vec_perm(tmp2, tmp2, vperm); + + /* Avoid dependency stalls on yperm and calculate the 4 u values */ +/* 3 */ yperm = vec_lvsr(12, yp1); +/* 1 */ tmp1 = (vector signed short)vec_mergeh((vector unsigned char)tmp1, + (vector unsigned char)tmp1); +/* 1 */ u = (vector signed short)vec_mergeh(zero, + (vector unsigned char)tmp1); + +/* 1 */ u = vec_sub(u, c128); +/* 2 */ tmp3 = vec_perm(tmp3, tmp3, yperm); + + /* Setup and calculate the 4 v values */ +/* 1 */ tmp2 = (vector signed short)vec_mergeh((vector unsigned char)tmp2, + (vector unsigned char)tmp2); +/* 1 */ v = (vector signed short)vec_mergeh(zero, + (vector unsigned char)tmp2); +/* 4 */ tmp2 = vec_mladd(cgu, u, (vector signed short)zero); +/* 1 */ v = vec_sub(v, c128); + + /* Move the data into y and start loading the next 4 pixels */ +/* 1 */ y = (vector signed short)vec_mergeh(zero, + (vector unsigned char)y); +/* 1 */ tmp3 = (vector signed short)vec_mergeh(zero, + (vector unsigned char)tmp3); +/* 1 */ y = vec_or(y, tmp3); + + /* Finish calculating y */ +/* 1 */ y = vec_sub(y, c16); +/* 4 */ y = vec_mladd(ymul, y, (vector signed short)zero); + + /* Perform non-dependent multiplies first. */ +/* 4 */ tmp1 = vec_mladd(crv, v, y); +/* 4 */ tmp2 = vec_mladd(cgv, v, tmp2); +/* 4 */ tmp3 = vec_mladd(cbu, u, y); + + /* Calculate rgb values */ +/* 1 */ r = vec_sra(tmp1, res); + +/* 1 */ tmp2 = vec_sub(y, tmp2); +/* 1 */ tmp2 = vec_add(tmp2, c32); +/* 1 */ g = vec_sra(tmp2, res); + +/* 1 */ tmp3 = vec_add(tmp3, c32); +/* 1 */ b = vec_sra(tmp3, res); + + /* Bound to 0 <= x <= 255 */ +/* 1 */ r = vec_min(r, maxchar); +/* 1 */ g = vec_min(g, maxchar); +/* 1 */ b = vec_min(b, maxchar); +/* 1 */ r = vec_max(r, (vector signed short)zero); +/* 1 */ g = vec_max(g, (vector signed short)zero); +/* 1 */ b = vec_max(b, (vector signed short)zero); + + /* Combine r, g and b. */ +/* 2 */ rgb1 = vec_perm((vector unsigned char)r, (vector unsigned char)g, + pickrg1); +/* 2 */ rgb2 = vec_perm((vector unsigned char)r, (vector unsigned char)g, + pickrg2); + +/* 2 */ rgb1 = vec_perm(rgb1, (vector unsigned char)b, pickrgb1); +/* 2 */ rgb2 = vec_perm(rgb2, (vector unsigned char)b, pickrgb2); + +/* 1 */ rgb1 = vec_or(alpha, rgb1); +/* 1 */ rgb2 = vec_or(alpha, rgb2); + +/* 3 */ vec_stl(rgb1, 0, dp1); + dp1 += 16; +/* 3 */ vec_stl(rgb2, 0, dp1); + + /* + * Begin the second row calculations + */ + + /* + * Load 4 y pixels for the 8x2 pixel block. + */ +/* 3 */ yperm = vec_lvsl(0, yp2); +/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp2); + yp2 += 4; + + /* Save y and load the next 4 y pixels for a total of 8 */ +/* 2 */ y = vec_perm(tmp3, tmp3, yperm); +/* 3 */ yperm = vec_lvsr(12, yp2); +/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp2); +/* 1 */ y = (vector signed short)vec_mergeh(zero, + (vector unsigned char)y); + + /* Avoid dependency stalls on yperm */ +/* 2 */ tmp3 = vec_perm(tmp3, tmp3, yperm); +/* 1 */ tmp3 = (vector signed short)vec_mergeh(zero, + (vector unsigned char)tmp3); +/* 1 */ y = vec_or(y, tmp3); + + /* Start the calculation for g */ +/* 4 */ tmp2 = vec_mladd(cgu, u, (vector signed short)zero); + + /* Finish calculating y */ +/* 1 */ y = vec_sub(y, c16); +/* 4 */ y = vec_mladd(ymul, y, (vector signed short)zero); + + /* Perform non-dependent multiplies first. */ +/* 4 */ tmp2 = vec_mladd(cgv, v, tmp2); +/* 4 */ tmp1 = vec_mladd(crv, v, y); +/* 4 */ tmp3 = vec_mladd(cbu, u, y); + + /* Calculate rgb values */ +/* 1 */ r = vec_sra(tmp1, res); + +/* 1 */ tmp2 = vec_sub(y, tmp2); +/* 1 */ tmp2 = vec_add(tmp2, c32); +/* 1 */ g = vec_sra(tmp2, res); + +/* 1 */ tmp3 = vec_add(tmp3, c32); +/* 1 */ b = vec_sra(tmp3, res); + + /* Bound to 0 <= x <= 255 */ +/* 1 */ r = vec_min(r, maxchar); +/* 1 */ g = vec_min(g, maxchar); +/* 1 */ b = vec_min(b, maxchar); +/* 1 */ r = vec_max(r, (vector signed short)zero); +/* 1 */ g = vec_max(g, (vector signed short)zero); +/* 1 */ b = vec_max(b, (vector signed short)zero); + + /* Combine r, g and b. */ +/* 2 */ rgb1 = vec_perm((vector unsigned char)r, (vector unsigned char)g, + pickrg1); +/* 2 */ rgb2 = vec_perm((vector unsigned char)r, (vector unsigned char)g, + pickrg2); + +/* 2 */ rgb1 = vec_perm(rgb1, (vector unsigned char)b, pickrgb1); +/* 2 */ rgb2 = vec_perm(rgb2, (vector unsigned char)b, pickrgb2); + +/* 1 */ rgb1 = vec_or(alpha, rgb1); +/* 1 */ rgb2 = vec_or(alpha, rgb2); + +/* 3 */ vec_stl(rgb1, 0, dp2); + dp2 += 16; +/* 3 */ vec_stl(rgb2, 0, dp2); + + /* Increment the YUV data pointers to the next set of pixels. */ + yp1 += 4; + yp2 += 4; + up += 4; + vp += 4; + + /* Move the destination pointers to the next set of pixels. */ + dp1 += 16; + dp2 += 16; + } + + /* jump down one line since we are doing 2 at once */ + yp1 += w; + yp2 += w; + dp1 += (w * 4); + dp2 += (w * 4); + } +#else + _evas_yv12torgb_diz(yuv, rgb, w, h); +#endif +} +#endif + +static void +_evas_yuv_init(void) +{ +#ifdef BUILD_C + int i; + + for (i = 0; i < 256; i++) + { + _v1164[i] = (int)(((float)(i - 16 )) * 1.164); + + _v1596[i] = (int)(((float)(i - 128)) * 1.596); + _v813[i] = (int)(((float)(i - 128)) * 0.813); + + _v391[i] = (int)(((float)(i - 128)) * 0.391); + _v2018[i] = (int)(((float)(i - 128)) * 2.018); + } + + for (i = -384; i < 640; i++) + { + _clip_lut[i+384] = i < 0 ? 0 : (i > 255) ? 255 : i; + } +#endif +} + +#ifdef BUILD_ALTIVEC +static void +_evas_yv12torgb_diz(unsigned char **yuv, unsigned char *rgb, int w, int h) +{ +#ifdef BUILD_C + int xx, yy; + int y, u, v, r, g, b; + unsigned char *yp1, *yp2, *up, *vp; + unsigned char *dp1, *dp2; + int crv, cbu, cgu, cgv; + + /* destination pointers */ + dp1 = rgb; + dp2 = rgb + (w * 4); + + crv = CRV; /* 1.596 */ + cbu = CBU; /* 2.018 */ + cgu = CGU; /* 0.391 */ + cgv = CGV; /* 0.813 */ + + for (yy = 0; yy < h; yy += 2) + { + /* plane pointers */ + yp1 = yuv[yy]; + yp2 = yuv[yy + 1]; + up = yuv[h + (yy / 2)]; + vp = yuv[h + (h / 2) + (yy / 2)]; + for (xx = 0; xx < w; xx += 2) + { + /* collect u & v for 2x2 pixel block */ + u = (*up++) - 128; + v = (*vp++) - 128; + + /* do the top 2 pixels of the 2x2 block which shared u & v */ + /* yuv to rgb */ + y = YMUL * ((*yp1++) - 16); + r = LUT_CLIP((y + (crv * v)) >> 16); + g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); + b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); + *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); + + dp1 += 4; + + /* yuv to rgb */ + y = YMUL * ((*yp1++) - 16); + r = LUT_CLIP((y + (crv * v)) >> 16); + g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); + b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); + *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); + + dp1 += 4; + + /* do the bottom 2 pixels */ + /* yuv to rgb */ + y = YMUL * ((*yp2++) - 16); + r = LUT_CLIP((y + (crv * v)) >> 16); + g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); + b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); + *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(r,g,b); + + dp2 += 4; + + /* yuv to rgb */ + y = YMUL * ((*yp2++) - 16); + r = LUT_CLIP((y + (crv * v)) >> 16); + g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); + b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); + *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(r,g,b); + + dp2 += 4; + } + /* jump down one line since we are doing 2 at once */ + dp1 += (w * 4); + dp2 += (w * 4); + } +#endif +} +#endif + +static void +_evas_yv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) +{ +#ifdef BUILD_C + int xx, yy; + int y, u, v; + unsigned char *yp1, *yp2, *up, *vp; + unsigned char *dp1, *dp2; + + /* destination pointers */ + dp1 = rgb; + dp2 = rgb + (w * 4); + + for (yy = 0; yy < h; yy += 2) + { + /* plane pointers */ + yp1 = yuv[yy]; + yp2 = yuv[yy + 1]; + up = yuv[h + (yy / 2)]; + vp = yuv[h + (h / 2) + (yy / 2)]; + for (xx = 0; xx < w; xx += 2) + { + int vmu; + + /* collect u & v for 2x2 pixel block */ + u = *up++; + v = *vp++; + + /* save lookups */ + vmu = _v813[v] + _v391[u]; + u = _v2018[u]; + v = _v1596[v]; + + /* do the top 2 pixels of the 2x2 block which shared u & v */ + /* yuv to rgb */ + y = _v1164[*yp1++]; + *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); + + dp1 += 4; + + /* yuv to rgb */ + y = _v1164[*yp1++]; + *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); + + dp1 += 4; + + /* do the bottom 2 pixels */ + /* yuv to rgb */ + y = _v1164[*yp2++]; + *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); + + dp2 += 4; + + /* yuv to rgb */ + y = _v1164[*yp2++]; + *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); + + dp2 += 4; + } + /* jump down one line since we are doing 2 at once */ + dp1 += (w * 4); + dp2 += (w * 4); + } +#endif +} + +void +evas_common_convert_yuv_422_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) +{ +#ifdef BUILD_C + if (!initted) _evas_yuv_init(); + initted = 1; + _evas_yuy2torgb_raster(src, dst, w, h); +#endif +} + +void +evas_common_convert_yuv_420_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) +{ +#ifdef BUILD_C + if (!initted) _evas_yuv_init(); + initted = 1; + _evas_nv12torgb_raster(src, dst, w, h); +#endif +} + +void +evas_common_convert_yuv_420T_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) +{ +#ifdef BUILD_C + if (initted) _evas_yuv_init(); + initted = 1; + _evas_nv12tiledtorgb_raster(src, dst, w, h); +#endif +} + +static void +_evas_yuy2torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) +{ +#ifdef BUILD_C + int xx, yy; + int y, u, v; + unsigned char *yp1, *yp2, *up, *vp; + unsigned char *dp1; + + dp1 = rgb; + + /* destination pointers */ + for (yy = 0; yy < h; yy++) + { + /* plane pointers */ + unsigned char *line; + + line = yuv[yy]; + yp1 = line + 0; + up = line + 1; + yp2 = line + 2; + vp = line + 3; + + for (xx = 0; xx < w; xx += 2) + { + int vmu; + + /* collect u & v for 2 pixels block */ + u = *up; + v = *vp; + + /* save lookups */ + vmu = _v813[v] + _v391[u]; + u = _v2018[u]; + v = _v1596[v]; + + /* do the top 2 pixels of the 2x2 block which shared u & v */ + /* yuv to rgb */ + y = _v1164[*yp1]; + *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); + + dp1 += 4; + + /* yuv to rgb */ + y = _v1164[*yp2]; + *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); + + dp1 += 4; + + yp1 += 4; yp2 += 4; up += 4; vp += 4; + } + } +#endif +} + +#ifdef BUILD_C +static inline void +_evas_yuv2rgb_420_raster(unsigned char *yp1, unsigned char *yp2, unsigned char *up, unsigned char *vp, + unsigned char *dp1, unsigned char *dp2) +{ + int y, u, v; + int vmu; + int rgb; + + /* collect u & v for 4 pixels block */ + u = *up; + v = *vp; + + /* save lookups */ +#ifdef MEM_BP + vmu = _v813[v] + _v391[u]; + u = _v2018[u]; + v = _v1596[v]; +#else + u -= 128; + v -= 128; + vmu = v * CGV + u * CGU; + u = u * CBU; + v = v * CRV; +#endif + + /* do the top 2 pixels of the 2x2 block which shared u & v */ + /* yuv to rgb */ +#ifdef MEM_BP + y = _v1164[*yp1]; + rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); +#else + y = (*yp1 - 16 ) * YMUL; + rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), + LUT_CLIP(((y - vmu + OFF) >> 16)), + LUT_CLIP(((y + u + OFF) >> 16))); +#endif + *((DATA32 *) dp1) = 0xff000000 + rgb; + + dp1 += 4; yp1++; + + /* yuv to rgb */ +#ifdef MEM_BP + y = _v1164[*yp1]; + rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); +#else + y = (*yp1 - 16 ) * YMUL; + rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), + LUT_CLIP(((y - vmu + OFF) >> 16)), + LUT_CLIP(((y + u + OFF) >> 16))); +#endif + *((DATA32 *) dp1) = 0xff000000 + rgb; + + /* do the bottom 2 pixels of the 2x2 block which shared u & v */ + /* yuv to rgb */ +#ifdef MEM_BP + y = _v1164[*yp2]; + rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); +#else + y = (*yp2 - 16 ) * YMUL; + rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), + LUT_CLIP(((y - vmu + OFF) >> 16)), + LUT_CLIP(((y + u + OFF) >> 16))); +#endif + *((DATA32 *) dp2) = 0xff000000 + rgb; + + dp2 += 4; yp2++; + + /* yuv to rgb */ +#ifdef MEM_BP + y = _v1164[*yp2]; + rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); +#else + y = (*yp2 - 16 ) * YMUL; + rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), + LUT_CLIP(((y - vmu + OFF) >> 16)), + LUT_CLIP(((y + u + OFF) >> 16))); +#endif + *((DATA32 *) dp2) = 0xff000000 + rgb; +} +#endif + +static void +_evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) +{ +#ifdef BUILD_C + +#define HANDLE_MACROBLOCK(YP1, YP2, UP, VP, DP1, DP2) \ + { \ + int i; \ + int j; \ + \ + for (i = 0; i < 32; i += 2) \ + { \ + for (j = 0; j < 64; j += 2) \ + { \ + _evas_yuv2rgb_420_raster(YP1, YP2, UP, VP, DP1, DP2); \ + \ + /* the previous call just rendered 2 pixels per lines */ \ + DP1 += 8; DP2 += 8; \ + \ + /* and took for that 2 lines with 2 Y, 1 U and 1 V. Don't forget U & V are in the same plane */ \ + YP1 += 2; YP2 += 2; UP += 2; VP += 2; \ + } \ + \ + DP1 += sizeof (int) * ((w << 1) - 64); \ + DP2 += sizeof (int) * ((w << 1) - 64); \ + YP1 += 64; \ + YP2 += 64; \ + } \ + } + + /* One macro block is 32 lines of Y and 16 lines of UV */ + const int offset_value[2] = { 0, 64 * 16 }; + int mb_x, mb_y, mb_w, mb_h; + int base_h; + int uv_x, uv_y, uv_step; + int stride; + + /* Idea iterate over each macroblock and convert each of them using _evas_nv12torgb_raster */ + + /* The layout of the Y macroblock order in RGB non tiled space : */ + /* --------------------------------------------------- */ + /* | 0 | 1 | 6 | 7 | 8 | 9 | 14 | 15 | 16 | 17 | */ + /* --------------------------------------------------- */ + /* | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 18 | 19 | */ + /* --------------------------------------------------- */ + /* | 20 | 21 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | */ + /* --------------------------------------------------- */ + /* | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 38 | 39 | */ + /* --------------------------------------------------- */ + /* | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | */ + /* --------------------------------------------------- */ + /* The layout of the UV macroblock order in the same RGB non tiled space : */ + /* --------------------------------------------------- */ + /* | | | | | | | | | | | */ + /* - 0 - 1 - 6 - 7 - 8 - 9 - 14 - 15 - 16 - 17 - */ + /* | | | | | | | | | | | */ + /* --------------------------------------------------- */ + /* | | | | | | | | | | | */ + /* - 2 - 3 - 4 - 5 - 10 - 11 - 12 - 13 - 18 - 19 - */ + /* | | | | | | | | | | | */ + /* --------------------------------------------------- */ + /* | | | | | | | | | | | */ + /* - 20 - 21 - 22 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - */ + + /* the number of macroblock should be a multiple of 64x32 */ + mb_w = w / 64; + mb_h = h / 32; + + base_h = (mb_h >> 1) + (mb_h & 0x1); + stride = w * sizeof (int); + + uv_x = 0; uv_y = 0; + + /* In this format we linearize macroblock on two line to form a Z and it's invert */ + for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) + { + int step = 2; + int offset = 0; + int x = 0; + int rmb_x = 0; + int ry[2]; + + ry[0] = mb_y * 2 * 32 * stride; + ry[1] = ry[0] + 32 * stride; + + uv_step = (mb_y & 0x1) == 0 ? 4 : 0; + uv_x = (mb_y & 0x1) == 0 ? 0 : 2 * 64 * 32; + + for (mb_x = 0; mb_x < mb_w * 2; mb_x++, rmb_x += 64 * 32) + { + unsigned char *yp1, *yp2, *up, *vp; + unsigned char *dp1, *dp2; + + dp1 = rgb + x + ry[offset]; + dp2 = dp1 + stride; + + yp1 = yuv[mb_y] + rmb_x; + yp2 = yp1 + 64; + + /* UV plane is two time less bigger in pixel count, but it old two bytes each times */ + up = yuv[(mb_y >> 1) + base_h] + uv_x + offset_value[offset]; + vp = up + 1; + + HANDLE_MACROBLOCK(yp1, yp2, up, vp, dp1, dp2); + + step++; + if ((step & 0x3) == 0) + { + offset = 1 - offset; + x -= 64 * sizeof (int); + uv_x -= 64 * 32; + } + else + { + x += 64 * sizeof (int); + uv_x += 64 * 32; + } + + uv_step++; + if (uv_step == 8) + { + uv_step = 0; + uv_x += 4 * 64 * 32; + } + } + } + + if (mb_h & 0x1) + { + int x = 0; + int ry; + + ry = mb_y << 1; + + uv_step = 0; + uv_x = 0; + + for (mb_x = 0; mb_x < mb_w; mb_x++, x++, uv_x++) + { + unsigned char *yp1, *yp2, *up, *vp; + unsigned char *dp1, *dp2; + + dp1 = rgb + (x * 64 + (ry * 32 * w)) * sizeof (int); + dp2 = dp1 + sizeof (int) * w; + + yp1 = yuv[mb_y] + mb_x * 64 * 32; + yp2 = yp1 + 64; + + up = yuv[mb_y / 2 + base_h] + uv_x * 64 * 32; + vp = up + 1; + + HANDLE_MACROBLOCK(yp1, yp2, up, vp, dp1, dp2); + } + } +#endif +} + +static void +_evas_nv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) +{ +#ifdef BUILD_C + int xx, yy; + unsigned char *yp1, *yp2, *up, *vp; + unsigned char *dp1; + unsigned char *dp2; + + dp1 = rgb; + dp2 = dp1 + sizeof (int) * w; + + for (yy = 0; yy < h; yy++) + { + yp1 = yuv[yy++]; + yp2 = yuv[yy]; + + up = yuv[h + (yy >> 1)]; + vp = up + 1; + + for (xx = 0; xx < w; xx += 2) + { + _evas_yuv2rgb_420_raster(yp1, yp2, up, vp, dp1, dp2); + + /* the previous call just rendered 2 pixels per lines */ + dp1 += 8; dp2 += 8; + + /* and took for that 2 lines with 2 Y, 1 U and 1 V. Don't forget U & V are in the same plane */ + yp1 += 2; yp2 += 2; up += 2; vp += 2; + } + + /* jump one line */ + dp1 += sizeof (int) * w; + dp2 += sizeof (int) * w; + yp1 += w; + yp2 += w; + } +#endif +} + +#endif + diff --git a/libraries/evas/src/lib/engines/common/evas_convert_yuv.h b/libraries/evas/src/lib/engines/common/evas_convert_yuv.h new file mode 100644 index 0000000..b598807 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_convert_yuv.h @@ -0,0 +1,9 @@ +#ifndef _EVAS_CONVERT_YUV_H +#define _EVAS_CONVERT_YUV_H + +EAPI void evas_common_convert_yuv_420p_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); +EAPI void evas_common_convert_yuv_422_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); +EAPI void evas_common_convert_yuv_420_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); +EAPI void evas_common_convert_yuv_420T_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); + +#endif /* _EVAS_CONVERT_YUV_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_cpu.c b/libraries/evas/src/lib/engines/common/evas_cpu.c new file mode 100644 index 0000000..cff8b2b --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_cpu.c @@ -0,0 +1,270 @@ +#include "evas_common.h" +#if defined BUILD_MMX || defined BUILD_SSE +#include "evas_mmx.h" +#endif + +#if defined BUILD_SSE3 +#include +#endif + +#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP) +#include +#include +#include + +static sigjmp_buf detect_buf; +#endif + +static int cpu_feature_mask = 0; + +#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP) +static void evas_common_cpu_catch_ill(int sig); +static void evas_common_cpu_catch_segv(int sig); + +static void +evas_common_cpu_catch_ill(int sig __UNUSED__) +{ + siglongjmp(detect_buf, 1); +} + +static void +evas_common_cpu_catch_segv(int sig __UNUSED__) +{ + siglongjmp(detect_buf, 1); +} +#endif + +void +evas_common_cpu_mmx_test(void) +{ +#ifdef BUILD_MMX + pxor_r2r(mm4, mm4); +#endif +} + +void +evas_common_cpu_mmx2_test(void) +{ +#ifdef BUILD_MMX + char data[16]; + + data[0] = 0; + mmx_r2m(movntq, mm0, data); + data[0] = 0; +#endif +} + +void +evas_common_cpu_sse_test(void) +{ +#ifdef BUILD_SSE + int blah[16]; + + movntq_r2m(mm0, blah); +#endif +} + +void evas_common_op_sse3_test(void); + +void +evas_common_cpu_sse3_test(void) +{ +#ifdef BUILD_SSE3 + evas_common_op_sse3_test(); +#endif +} + +void +evas_common_cpu_altivec_test(void) +{ +#ifdef __POWERPC__ +#ifdef __VEC__ + vector unsigned int zero; + + zero = vec_splat_u32(0); +#endif /* __VEC__ */ +#endif /* __POWERPC__ */ +} + +void +evas_common_cpu_neon_test(void) +{ +//#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 70) +#ifdef BUILD_NEON + asm volatile ( + ".fpu neon \n\t" + "vqadd.u8 d0, d1, d0\n" + : /* Out */ + : /* In */ + : /* Clobbered */ + "d0", "d1" + ); +#endif +//#endif +} + +void +evas_common_cpu_vis_test(void) +{ +#ifdef __SPARC__ +#endif /* __SPARC__ */ +} + +int +evas_common_cpu_feature_test(void (*feature)(void)) +{ +#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP) + int enabled = 1; + struct sigaction act, oact, oact2; + + act.sa_handler = evas_common_cpu_catch_ill; + act.sa_flags = SA_RESTART; + sigemptyset(&act.sa_mask); + sigaction(SIGILL, &act, &oact); + + act.sa_handler = evas_common_cpu_catch_segv; + act.sa_flags = SA_RESTART; + sigemptyset(&act.sa_mask); + sigaction(SIGSEGV, &act, &oact2); + + if (sigsetjmp(detect_buf, 1)) + { + sigaction(SIGILL, &oact, NULL); + sigaction(SIGSEGV, &oact2, NULL); + return 0; + } + + feature(); + + sigaction(SIGILL, &oact, NULL); + sigaction(SIGSEGV, &oact2, NULL); + return enabled; +#else + return 0; +#endif +} + +EAPI void +evas_common_cpu_init(void) +{ + static int called = 0; + + if (called) return; + called = 1; +#ifdef BUILD_MMX + cpu_feature_mask |= CPU_FEATURE_MMX * + evas_common_cpu_feature_test(evas_common_cpu_mmx_test); + evas_common_cpu_end_opt(); + if (getenv("EVAS_CPU_NO_MMX")) + cpu_feature_mask &= ~CPU_FEATURE_MMX; + cpu_feature_mask |= CPU_FEATURE_MMX2 * + evas_common_cpu_feature_test(evas_common_cpu_mmx2_test); + evas_common_cpu_end_opt(); + if (getenv("EVAS_CPU_NO_MMX2")) + cpu_feature_mask &= ~CPU_FEATURE_MMX2; +#ifdef BUILD_SSE + cpu_feature_mask |= CPU_FEATURE_SSE * + evas_common_cpu_feature_test(evas_common_cpu_sse_test); + evas_common_cpu_end_opt(); + if (getenv("EVAS_CPU_NO_SSE")) + cpu_feature_mask &= ~CPU_FEATURE_SSE; +#ifdef BUILD_SSE3 + cpu_feature_mask |= CPU_FEATURE_SSE3 * + evas_common_cpu_feature_test(evas_common_cpu_sse3_test); + evas_common_cpu_end_opt(); + if (getenv("EVAS_CPU_NO_SSE3")) + cpu_feature_mask &= ~CPU_FEATURE_SSE3; +#endif /* BUILD_SSE3 */ +#endif /* BUILD_SSE */ +#endif /* BUILD_MMX */ +#ifdef __POWERPC__ +#ifdef __VEC__ + cpu_feature_mask |= CPU_FEATURE_ALTIVEC * + evas_common_cpu_feature_test(evas_common_cpu_altivec_test); + evas_common_cpu_end_opt(); + if (getenv("EVAS_CPU_NO_ALTIVEC")) + cpu_feature_mask &= ~CPU_FEATURE_ALTIVEC; +#endif /* __VEC__ */ +#endif /* __POWERPC__ */ +#ifdef __SPARC__ + cpu_feature_mask |= CPU_FEATURE_VIS * + evas_common_cpu_feature_test(evas_common_cpu_vis_test); + evas_common_cpu_end_opt(); + if (getenv("EVAS_CPU_NO_VIS")) + cpu_feature_mask &= ~CPU_FEATURE_VIS; +#endif /* __SPARC__ */ +#if defined(__ARM_ARCH__) +#ifdef BUILD_NEON + cpu_feature_mask |= CPU_FEATURE_NEON * + evas_common_cpu_feature_test(evas_common_cpu_neon_test); + evas_common_cpu_end_opt(); + if (getenv("EVAS_CPU_NO_NEON")) + cpu_feature_mask &= ~CPU_FEATURE_NEON; +#endif +#endif +} + +int +evas_common_cpu_has_feature(unsigned int feature) +{ + return (cpu_feature_mask & feature); +} + +int +evas_common_cpu_have_cpuid(void) +{ + return 0; +/* +#ifdef BUILD_MMX + unsigned int have_cpu_id; + + have_cpu_id = 0; + have_cpuid(have_cpu_id); + return have_cpu_id; +#else + return 0; +#endif + */ +} + +EAPI void +evas_common_cpu_can_do(int *mmx, int *sse, int *sse2) +{ + static int do_mmx = 0, do_sse = 0, do_sse2 = 0, done = 0; + + if (!done) + { +# ifdef HARD_CODED_P3 + cpu_feature_mask |= CPU_FEATURE_MMX; + cpu_feature_mask |= CPU_FEATURE_SSE; +#endif +#ifdef HARD_CODED_P2 + cpu_feature_mask |= CPU_FEATURE_MMX; +#endif + if (cpu_feature_mask & CPU_FEATURE_MMX) do_mmx = 1; + if (cpu_feature_mask & CPU_FEATURE_MMX2) do_sse = 1; + if (cpu_feature_mask & CPU_FEATURE_SSE) do_sse = 1; + } +// INF("%i %i %i", do_mmx, do_sse, do_sse2); + *mmx = do_mmx; + *sse = do_sse; + *sse2 = do_sse2; + done = 1; +} + +#ifdef BUILD_MMX +EAPI void +evas_common_cpu_end_opt(void) +{ + if (cpu_feature_mask & + (CPU_FEATURE_MMX | CPU_FEATURE_MMX2)) + { + emms(); + } +} +#else +EAPI void +evas_common_cpu_end_opt(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_draw.h b/libraries/evas/src/lib/engines/common/evas_draw.h new file mode 100644 index 0000000..34e0ed3 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_draw.h @@ -0,0 +1,36 @@ +#ifndef _EVAS_DRAW_H +#define _EVAS_DRAW_H + + +EAPI void evas_common_draw_init (void); + +EAPI RGBA_Draw_Context *evas_common_draw_context_new (void); +EAPI void evas_common_draw_context_free (RGBA_Draw_Context *dc); +EAPI void evas_common_draw_context_font_ext_set (RGBA_Draw_Context *dc, + void *data, + void *(*gl_new) (void *data, RGBA_Font_Glyph *fg), + void (*gl_free) (void *ext_dat), + void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y)); +EAPI void evas_common_draw_context_clip_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h); +EAPI void evas_common_draw_context_set_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h); +EAPI void evas_common_draw_context_unset_clip (RGBA_Draw_Context *dc); +EAPI void evas_common_draw_context_set_color (RGBA_Draw_Context *dc, int r, int g, int b, int a); +EAPI void evas_common_draw_context_set_multiplier (RGBA_Draw_Context *dc, int r, int g, int b, int a); +EAPI void evas_common_draw_context_unset_multiplier (RGBA_Draw_Context *dc); +EAPI void evas_common_draw_context_set_mask (RGBA_Draw_Context *dc, RGBA_Image *im, int x, int y, int w, int h); +EAPI void evas_common_draw_context_unset_mask (RGBA_Draw_Context *dc); +EAPI Cutout_Rects *evas_common_draw_context_cutouts_new (void); +EAPI void evas_common_draw_context_cutouts_free (Cutout_Rects* rects); +EAPI void evas_common_draw_context_cutouts_del (Cutout_Rects* rects, int idx); +EAPI void evas_common_draw_context_add_cutout (RGBA_Draw_Context *dc, int x, int y, int w, int h); +EAPI void evas_common_draw_context_clear_cutouts (RGBA_Draw_Context *dc); +EAPI Cutout_Rects *evas_common_draw_context_apply_cutouts (RGBA_Draw_Context *dc); +EAPI void evas_common_draw_context_apply_clear_cutouts (Cutout_Rects* rects); +EAPI void evas_common_draw_context_apply_clean_cutouts (Cutout_Rects* rects); +EAPI void evas_common_draw_context_set_anti_alias (RGBA_Draw_Context *dc, unsigned char aa); +EAPI void evas_common_draw_context_set_color_interpolation (RGBA_Draw_Context *dc, int color_space); +EAPI void evas_common_draw_context_set_render_op (RGBA_Draw_Context *dc, int op); +EAPI void evas_common_draw_context_set_sli (RGBA_Draw_Context *dc, int y, int h); + + +#endif /* _EVAS_DRAW_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_draw_main.c b/libraries/evas/src/lib/engines/common/evas_draw_main.c new file mode 100644 index 0000000..7652708 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_draw_main.c @@ -0,0 +1,576 @@ +#include "evas_common.h" +#include "evas_convert_main.h" +#include "evas_private.h" + +EAPI Cutout_Rects* +evas_common_draw_context_cutouts_new(void) +{ + Cutout_Rects *rects; + + rects = calloc(1, sizeof(Cutout_Rects)); + return rects; +} + +EAPI void +evas_common_draw_context_cutouts_free(Cutout_Rects* rects) +{ + rects->active = 0; +} + +EAPI void +evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx) +{ + if ((idx >= 0) && (idx < rects->active)) + { + Cutout_Rect *rect; + + rect = rects->rects + idx; + memmove(rect, rect + 1, + sizeof(Cutout_Rect) * (rects->active - idx - 1)); + rects->active--; + } +} + +void +evas_common_init(void) +{ + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); +} + +void +evas_common_shutdown(void) +{ + evas_font_dir_cache_free(); + evas_common_image_cache_free(); +} + +EAPI void +evas_common_draw_init(void) +{ +} + +EAPI RGBA_Draw_Context * +evas_common_draw_context_new(void) +{ + RGBA_Draw_Context *dc; + + dc = calloc(1, sizeof(RGBA_Draw_Context)); + dc->sli.h = 1; + return dc; +} + +EAPI void +evas_common_draw_context_free(RGBA_Draw_Context *dc) +{ + if (!dc) return; + + evas_common_draw_context_apply_clean_cutouts(&dc->cutout); + free(dc); +} + +EAPI void +evas_common_draw_context_clear_cutouts(RGBA_Draw_Context *dc) +{ + evas_common_draw_context_apply_clean_cutouts(&dc->cutout); +} + +EAPI void +evas_common_draw_context_font_ext_set(RGBA_Draw_Context *dc, + void *data, + void *(*gl_new) (void *data, RGBA_Font_Glyph *fg), + void (*gl_free) (void *ext_dat), + void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y)) +{ + dc->font_ext.data = data; + dc->font_ext.func.gl_new = gl_new; + dc->font_ext.func.gl_free = gl_free; + dc->font_ext.func.gl_draw = gl_draw; +} + +EAPI void +evas_common_draw_context_clip_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h) +{ + if (dc->clip.use) + { + RECTS_CLIP_TO_RECT(dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h, + x, y, w, h); + } + else + evas_common_draw_context_set_clip(dc, x, y, w, h); +} + +EAPI void +evas_common_draw_context_set_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h) +{ + dc->clip.use = 1; + dc->clip.x = x; + dc->clip.y = y; + dc->clip.w = w; + dc->clip.h = h; +} + +EAPI void +evas_common_draw_context_unset_clip(RGBA_Draw_Context *dc) +{ + dc->clip.use = 0; +} + +EAPI void +evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, int a) +{ + R_VAL(&(dc->col.col)) = (DATA8)r; + G_VAL(&(dc->col.col)) = (DATA8)g; + B_VAL(&(dc->col.col)) = (DATA8)b; + A_VAL(&(dc->col.col)) = (DATA8)a; +} + +EAPI void +evas_common_draw_context_set_multiplier(RGBA_Draw_Context *dc, int r, int g, int b, int a) +{ + dc->mul.use = 1; + R_VAL(&(dc->mul.col)) = (DATA8)r; + G_VAL(&(dc->mul.col)) = (DATA8)g; + B_VAL(&(dc->mul.col)) = (DATA8)b; + A_VAL(&(dc->mul.col)) = (DATA8)a; +} + +EAPI void +evas_common_draw_context_unset_multiplier(RGBA_Draw_Context *dc) +{ + dc->mul.use = 0; +} + +EAPI void +evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x, int y, int w, int h) +{ + dc->mask.mask = mask; + dc->mask.x = x; + dc->mask.y = y; + dc->mask.w = w; + dc->mask.h = h; +} + +EAPI void +evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc) +{ + dc->mask.mask = NULL; +} + + + + + +EAPI void +evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w, int h) +{ +// if (dc->cutout.rects > 512) return; + if (dc->clip.use) + { +#if 1 // this is a bit faster + int xa1, xa2, xb1, xb2; + + xa1 = x; + xa2 = xa1 + w - 1; + xb1 = dc->clip.x; + if (xa2 < xb1) return; + xb2 = xb1 + dc->clip.w - 1; + if (xa1 >= xb2) return; + if (xa2 > xb2) xa2 = xb2; + if (xb1 > xa1) xa1 = xb1; + x = xa1; + w = xa2 - xa1 + 1; + + xa1 = y; + xa2 = xa1 + h - 1; + xb1 = dc->clip.y; + if (xa2 < xb1) return; + xb2 = xb1 + dc->clip.h - 1; + if (xa1 >= xb2) return; + if (xa2 > xb2) xa2 = xb2; + if (xb1 > xa1) xa1 = xb1; + y = xa1; + h = xa2 - xa1 + 1; +#else + RECTS_CLIP_TO_RECT(x, y, w, h, + dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); +#endif + if ((w < 1) || (h < 1)) return; + } + evas_common_draw_context_cutouts_add(&dc->cutout, x, y, w, h); +} + +int +evas_common_draw_context_cutout_split(Cutout_Rects* res, int idx, Cutout_Rect *split) +{ + /* 1 input rect, multiple out */ + Cutout_Rect in = res->rects[idx]; + + /* this is to save me a LOT of typing */ +#define INX1 (in.x) +#define INX2 (in.x + in.w) +#define SPX1 (split->x) +#define SPX2 (split->x + split->w) +#define INY1 (in.y) +#define INY2 (in.y + in.h) +#define SPY1 (split->y) +#define SPY2 (split->y + split->h) +#define X1_IN (in.x < split->x) +#define X2_IN ((in.x + in.w) > (split->x + split->w)) +#define Y1_IN (in.y < split->y) +#define Y2_IN ((in.y + in.h) > (split->y + split->h)) +#define R_NEW(_r, _x, _y, _w, _h) { evas_common_draw_context_cutouts_add(_r, _x, _y, _w, _h); } + if (!RECTS_INTERSECT(in.x, in.y, in.w, in.h, + split->x, split->y, split->w, split->h)) + { + /* No colision => no clipping, don't touch it. */ + return 1; + } + + /* S = split (ie cut out rect) */ + /* +--+ = in (rect to be cut) */ + + /* + * +---+ + * | | + * | S | + * | | + * +---+ + * + */ + if (X1_IN && X2_IN && Y1_IN && Y2_IN) + { + R_NEW(res, in.x, in.y, in.w, SPY1 - in.y); + R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1); + R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1); + /* out => (in.x, SPY2, in.w, INY2 - SPY2) */ + res->rects[idx].h = INY2 - SPY2; + res->rects[idx].y = SPY2; + return 1; + } + /* SSSSSSS + * S+---+S + * S|SSS|S + * S|SSS|S + * S|SSS|S + * S+---+S + * SSSSSSS + */ + if (!X1_IN && !X2_IN && !Y1_IN && !Y2_IN) + { + evas_common_draw_context_cutouts_del(res, idx); + return 0; + } + /* SSS + * S+---+ + * S|S | + * S|S | + * S|S | + * S+---+ + * SSS + */ + if (!X1_IN && X2_IN && !Y1_IN && !Y2_IN) + { + /* in => (SPX2, in.y, INX2 - SPX2, in.h) */ + res->rects[idx].w = INX2 - SPX2; + res->rects[idx].x = SPX2; + return 1; + } + /* S + * +---+ + * | S | + * | S | + * | S | + * +---+ + * S + */ + if (X1_IN && X2_IN && !Y1_IN && !Y2_IN) + { + R_NEW(res, in.x, in.y, SPX1 - in.x, in.h); + /* in => (SPX2, in.y, INX2 - SPX2, in.h) */ + res->rects[idx].w = INX2 - SPX2; + res->rects[idx].x = SPX2; + return 1; + } + /* SSS + * +---+S + * | S|S + * | S|S + * | S|S + * +---+S + * SSS + */ + if (X1_IN && !X2_IN && !Y1_IN && !Y2_IN) + { + /* in => (in.x, in.y, SPX1 - in.x, in.h) */ + res->rects[idx].w = SPX1 - in.x; + return 1; + } + /* SSSSSSS + * S+---+S + * S|SSS|S + * | | + * | | + * +---+ + * + */ + if (!X1_IN && !X2_IN && !Y1_IN && Y2_IN) + { + /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ + res->rects[idx].h = INY2 - SPY2; + res->rects[idx].y = SPY2; + return 1; + } + /* + * +---+ + * | | + * S|SSS|S + * | | + * +---+ + * + */ + if (!X1_IN && !X2_IN && Y1_IN && Y2_IN) + { + R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2); + /* in => (in.x, in.y, in.w, SPY1 - in.y) */ + res->rects[idx].h = SPY1 - in.y; + return 1; + } + /* + * +---+ + * | | + * | | + * S|SSS|S + * S+---+S + * SSSSSSS + */ + if (!X1_IN && !X2_IN && Y1_IN && !Y2_IN) + { + /* in => (in.x, in.y, in.w, SPY1 - in.y) */ + res->rects[idx].h = SPY1 - in.y; + return 1; + } + /* SSS + * S+---+ + * S|S | + * | | + * | | + * +---+ + * + */ + if (!X1_IN && X2_IN && !Y1_IN && Y2_IN) + { + R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y); + /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ + res->rects[idx].h = INY2 - SPY2; + res->rects[idx].y = SPY2; + return 1; + } + /* S + * +---+ + * | S | + * | | + * | | + * +---+ + * + */ + if (X1_IN && X2_IN && !Y1_IN && Y2_IN) + { + R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y); + R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y); + /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ + res->rects[idx].h = INY2 - SPY2; + res->rects[idx].y = SPY2; + return 1; + } + /* SSS + * +---+S + * | S|S + * | | + * | | + * +---+ + * + */ + if (X1_IN && !X2_IN && !Y1_IN && Y2_IN) + { + R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y); + /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ + res->rects[idx].h = INY2 - SPY2; + res->rects[idx].y = SPY2; + return 1; + } + /* + * +---+ + * | | + * S|S | + * | | + * +---+ + * + */ + if (!X1_IN && X2_IN && Y1_IN && Y2_IN) + { + R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2); + R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1); + /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ + res->rects[idx].h = SPY1 - in.y; + return 1; + } + /* + * +---+ + * | | + * | S|S + * | | + * +---+ + * + */ + if (X1_IN && !X2_IN && Y1_IN && Y2_IN) + { + R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2); + R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1); + /* in => (in.x, in.y, in.w, SPY1 - in.y) */ + res->rects[idx].h = SPY1 - in.y; + return 1; + } + /* + * +---+ + * | | + * | | + * S|S | + * S+---+ + * SSS + */ + if (!X1_IN && X2_IN && Y1_IN && !Y2_IN) + { + R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1); + /* in => (in.x, in.y, in.w, SPY1 - in.y) */ + res->rects[idx].h = SPY1 - in.y; + return 1; + } + /* + * +---+ + * | | + * | | + * | S | + * +---+ + * S + */ + if (X1_IN && X2_IN && Y1_IN && !Y2_IN) + { + R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1); + R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1); + /* in => (in.x, in.y, in.w, SPY1 - in.y) */ + res->rects[idx].h = SPY1 - in.y; + return 1; + } + /* + * +---+ + * | | + * | | + * | S|S + * +---+S + * SSS + */ + if (X1_IN && !X2_IN && Y1_IN && !Y2_IN) + { + R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1); + /* in => (in.x, in.y, in.w, SPY1 - in.y) */ + res->rects[idx].h = SPY1 - in.y; + return 1; + } + evas_common_draw_context_cutouts_del(res, idx); + return 0; +#undef INX1 +#undef INX2 +#undef SPX1 +#undef SPX2 +#undef INY1 +#undef INY2 +#undef SPY1 +#undef SPY2 +#undef X1_IN +#undef X2_IN +#undef Y1_IN +#undef Y2_IN +#undef R_NEW +} + +EAPI Cutout_Rects* +evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc) +{ + Cutout_Rects* res; + int i; + int j; + + if (!dc->clip.use) return NULL; + if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return NULL; + + + res = evas_common_draw_context_cutouts_new(); + evas_common_draw_context_cutouts_add(res, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); + + for (i = 0; i < dc->cutout.active; ++i) + { + /* Don't loop on the element just added to the list as they are already correctly clipped. */ + int active = res->active; + + for (j = 0; j < active; ) + { + if (evas_common_draw_context_cutout_split(res, j, dc->cutout.rects + i)) + ++j; + else + active--; + } + } + return res; +} + +EAPI void +evas_common_draw_context_apply_clear_cutouts(Cutout_Rects* rects) +{ + evas_common_draw_context_apply_clean_cutouts(rects); + free(rects); +} + +EAPI void +evas_common_draw_context_apply_clean_cutouts(Cutout_Rects* rects) +{ + free(rects->rects); + rects->rects = NULL; + rects->active = 0; + rects->max = 0; +} + +EAPI void +evas_common_draw_context_set_anti_alias(RGBA_Draw_Context *dc , unsigned char aa) +{ + dc->anti_alias = !!aa; +} + +EAPI void +evas_common_draw_context_set_color_interpolation(RGBA_Draw_Context *dc, int color_space) +{ + dc->interpolation.color_space = color_space; +} + +EAPI void +evas_common_draw_context_set_render_op(RGBA_Draw_Context *dc , int op) +{ + dc->render_op = op; +} + +EAPI void +evas_common_draw_context_set_sli(RGBA_Draw_Context *dc, int y, int h) +{ + dc->sli.y = y; + dc->sli.h = h; +} diff --git a/libraries/evas/src/lib/engines/common/evas_font.h b/libraries/evas/src/lib/engines/common/evas_font.h new file mode 100644 index 0000000..533d897 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_font.h @@ -0,0 +1,76 @@ +#ifndef _EVAS_FONT_H +#define _EVAS_FONT_H +#include "evas_text_utils.h" + + +/* main */ + +EAPI void evas_common_font_init (void); +EAPI void evas_common_font_shutdown (void); +EAPI void evas_common_font_font_all_unload (void); + +EAPI int evas_common_font_ascent_get (RGBA_Font *fn); +EAPI int evas_common_font_descent_get (RGBA_Font *fn); +EAPI int evas_common_font_max_ascent_get (RGBA_Font *fn); +EAPI int evas_common_font_max_descent_get (RGBA_Font *fn); +EAPI int evas_common_font_get_line_advance (RGBA_Font *fn); + +/* draw */ + +EAPI void evas_common_font_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props); +EAPI int evas_common_font_glyph_search (RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl); +EAPI RGBA_Font_Glyph *evas_common_font_int_cache_glyph_get (RGBA_Font_Int *fi, FT_UInt index); +EAPI FT_UInt evas_common_get_char_index (RGBA_Font_Int* fi, Eina_Unicode gl); +EAPI void evas_common_font_draw_init (void); + +/* load */ +EAPI void evas_common_font_dpi_set (int dpi); +EAPI RGBA_Font_Source *evas_common_font_source_memory_load (const char *name, const void *data, int data_size); +EAPI RGBA_Font_Source *evas_common_font_source_load (const char *name); +EAPI int evas_common_font_source_load_complete (RGBA_Font_Source *fs); +EAPI RGBA_Font_Source *evas_common_font_source_find (const char *name); +EAPI void evas_common_font_source_free (RGBA_Font_Source *fs); +EAPI void evas_common_font_size_use (RGBA_Font *fn); +EAPI RGBA_Font_Int *evas_common_font_int_load (const char *name, int size, Font_Rend_Flags wanted_rend); +EAPI RGBA_Font_Int *evas_common_font_int_load_init (RGBA_Font_Int *fn); +EAPI RGBA_Font_Int *evas_common_font_int_load_complete (RGBA_Font_Int *fi); +EAPI RGBA_Font *evas_common_font_memory_load (const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend); +EAPI RGBA_Font *evas_common_font_load (const char *name, int size, Font_Rend_Flags wanted_rend); +EAPI RGBA_Font *evas_common_font_add (RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend); +EAPI RGBA_Font *evas_common_font_memory_add (RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend); +EAPI void evas_common_font_free (RGBA_Font *fn); +EAPI void evas_common_font_hinting_set (RGBA_Font *fn, Font_Hint_Flags hinting); +EAPI Eina_Bool evas_common_hinting_available (Font_Hint_Flags hinting); +EAPI RGBA_Font *evas_common_font_memory_hinting_load (const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend); +EAPI RGBA_Font *evas_common_font_hinting_load (const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend); +EAPI RGBA_Font *evas_common_font_hinting_add (RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend); +EAPI RGBA_Font *evas_common_font_memory_hinting_add (RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend); +EAPI void evas_common_font_int_modify_cache_by (RGBA_Font_Int *fi, int dir); +EAPI int evas_common_font_cache_get (void); +EAPI void evas_common_font_cache_set (int size); +EAPI void evas_common_font_flush (void); +EAPI void evas_common_font_flush_last (void); +EAPI RGBA_Font_Int *evas_common_font_int_find (const char *name, int size, Font_Rend_Flags wanted_rend); +EAPI void evas_common_font_all_clear (void); + +/* query */ + +EAPI int evas_common_font_query_kerning (RGBA_Font_Int* fi, FT_UInt left, FT_UInt right, int* kerning); +EAPI void evas_common_font_query_size (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *w, int *h); +EAPI int evas_common_font_query_inset (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props); +EAPI int evas_common_font_query_right_inset (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props); +EAPI void evas_common_font_query_advance (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *h_adv, int *v_adv); +EAPI int evas_common_font_query_char_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch); +EAPI int evas_common_font_query_pen_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch); +EAPI int evas_common_font_query_char_at_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch); +EAPI int evas_common_font_query_last_up_to_pos (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y); +EAPI int evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len); + +#ifdef EVAS_FRAME_QUEUING +EAPI void evas_common_font_draw_finish(void); +#endif + +void evas_common_font_load_init(void); +void evas_common_font_load_shutdown(void); + +#endif /* _EVAS_FONT_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_font_default_walk.x b/libraries/evas/src/lib/engines/common/evas_font_default_walk.x new file mode 100644 index 0000000..94e7fde --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_font_default_walk.x @@ -0,0 +1,144 @@ +#ifndef _EVAS_FONT_DEFAULT_WALK_X +#define _EVAS_FONT_DEFAULT_WALK_X +/* Macros for text walking */ + +/** + * @def EVAS_FONT_WALK_TEXT_INIT + * @internal + * This macro defines the variables that will later be used with the following + * macros, and by font handling functions. + * @see EVAS_FONT_WALK_TEXT_START + * @see EVAS_FONT_WALK_TEXT_WORK + * @see EVAS_FONT_WALK_TEXT_END + */ +# define EVAS_FONT_WALK_TEXT_INIT() \ + int _pen_x = 0, _pen_y = 0; \ + Evas_Coord _start_pen = (text_props->info && \ + (text_props->start > 0)) ? \ + text_props->info->glyph[text_props->start - 1].pen_after : 0 ; \ + size_t char_index; \ + (void) _pen_y; /* Sometimes it won't be used */ + +/* Visual walk helper macros */ +#ifdef OT_SUPPORT +#define _EVAS_FONT_WALK_TEXT_START() \ + Evas_Font_OT_Info *_ot_itr = (text_props->info) ? \ + text_props->info->ot + text_props->start : NULL; \ + if (!_ot_itr) break; \ + for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++, _ot_itr++) \ + { +#else +#define _EVAS_FONT_WALK_TEXT_START() \ + for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++) \ + { +#endif + +/** + * @def EVAS_FONT_WALK_TEXT_START + * @internal + * This runs through the text in visual order while updating char_index, + * which is the current index in the text. + * Does not end with a ; + * Take a look at EVAS_FONT_WALK_X_OFF and the like. + * @see EVAS_FONT_WALK_TEXT_INIT + * @see EVAS_FONT_WALK_TEXT_WORK + * @see EVAS_FONT_WALK_TEXT_END + */ +#define EVAS_FONT_WALK_TEXT_START() \ + do \ + { \ + Evas_Font_Glyph_Info *_glyph_itr = (text_props->info) ? \ + text_props->info->glyph + text_props->start : NULL; \ + if (!_glyph_itr) break; \ + _EVAS_FONT_WALK_TEXT_START() + +/*FIXME: doc */ +#ifdef OT_SUPPORT +# define EVAS_FONT_WALK_X_OFF \ + (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(*_ot_itr))) +# define EVAS_FONT_WALK_Y_OFF \ + (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_Y_OFF_GET(*_ot_itr))) +# define EVAS_FONT_WALK_POS \ + (EVAS_FONT_OT_POS_GET(*_ot_itr) - text_props->text_offset) +# define EVAS_FONT_WALK_POS_NEXT \ + ((!EVAS_FONT_WALK_IS_LAST) ? \ + EVAS_FONT_OT_POS_GET(*(_ot_itr + 1)) - \ + text_props->text_offset : \ + EVAS_FONT_WALK_POS \ + ) +# define EVAS_FONT_WALK_POS_PREV \ + ((char_index > 0) ? \ + EVAS_FONT_OT_POS_GET(*(_ot_itr - 1)) - \ + text_props->text_offset : \ + EVAS_FONT_WALK_POS \ + ) +#else +# define EVAS_FONT_WALK_X_OFF 0 +# define EVAS_FONT_WALK_Y_OFF 0 +# define EVAS_FONT_WALK_POS \ + ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \ + (text_props->len - char_index - 1) : \ + (char_index)) +# define EVAS_FONT_WALK_POS_NEXT \ + ((!EVAS_FONT_WALK_IS_LAST) ? \ + ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \ + text_props->len - char_index - 2 \ + : (char_index + 1)) : \ + EVAS_FONT_WALK_POS) +# define EVAS_FONT_WALK_POS_PREV \ + ((char_index > 0) ? \ + ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \ + text_props->len - char_index \ + : (char_index - 1)) : \ + EVAS_FONT_WALK_POS) +#endif + + +#define EVAS_FONT_WALK_IS_VISIBLE (_glyph_itr->index != 0) +#define EVAS_FONT_WALK_X_BEAR (_glyph_itr->x_bear) +#define EVAS_FONT_WALK_Y_BEAR (fg->glyph_out->top) +#define EVAS_FONT_WALK_X_ADV ((_glyph_itr > text_props->info->glyph) ? \ + _glyph_itr->pen_after - (_glyph_itr - 1)->pen_after : \ + _glyph_itr->pen_after) +#define EVAS_FONT_WALK_WIDTH (_glyph_itr->width) + +#define EVAS_FONT_WALK_INDEX (_glyph_itr->index) +#define EVAS_FONT_WALK_PEN_X (_pen_x) +#define EVAS_FONT_WALK_PEN_X_AFTER (_glyph_itr->pen_after - _start_pen) +#define EVAS_FONT_WALK_PEN_Y (EVAS_FONT_ROUND_26_6_TO_INT(_pen_y)) +#define EVAS_FONT_WALK_Y_ADV (0) +#define EVAS_FONT_WALK_IS_LAST \ + (char_index + 1 == text_props->len) +#define EVAS_FONT_WALK_IS_FIRST \ + (char_index == 0) +#define EVAS_FONT_WALK_LEN (text_props->len) + +/** + * @def EVAS_FONT_WALK_TEXT_WORK + * @internal + * This macro actually updates the values mentioned in EVAS_FONT_WALK_TEXT_START + * according to the current positing in the walk. + * @see EVAS_FONT_WALK_TEXT_START + * @see EVAS_FONT_WALK_TEXT_INIT + * @see EVAS_FONT_WALK_TEXT_END + */ +#define EVAS_FONT_WALK_TEXT_WORK() do {} while(0) + +/** + * @def EVAS_FONT_WALK_TEXT_END + * @internal + * Closes EVAS_FONT_WALK_TEXT_START, needs to end with a ; + * @see EVAS_FONT_WALK_TEXT_START + * @see EVAS_FONT_WALK_TEXT_INIT + * @see EVAS_FONT_WALK_TEXT_WORK + */ +#define EVAS_FONT_WALK_TEXT_END() \ + if (EVAS_FONT_WALK_IS_VISIBLE) \ + { \ + _pen_x = _glyph_itr->pen_after - _start_pen; \ + } \ + } \ + } \ + while(0) + +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_font_draw.c b/libraries/evas/src/lib/engines/common/evas_font_draw.c new file mode 100644 index 0000000..94aa085 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_font_draw.c @@ -0,0 +1,615 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_blend_private.h" + +#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */ +#include "evas_font_private.h" /* for Frame-Queuing support */ + +#include "evas_font_ot.h" + +/* Forcibly disable the broken word/metric caching. */ +#ifdef METRIC_CACHE +# undef METRIC_CACHE +#endif + +#ifdef WORD_CACHE +# undef WORD_CACHE +#endif + +#define WORD_CACHE_MAXLEN 50 +/* How many to cache */ +#define WORD_CACHE_NWORDS 40 + +static int max_cached_words = WORD_CACHE_NWORDS; + +struct prword +{ + EINA_INLIST; + struct cinfo *cinfo; + Evas_Text_Props text_props; + DATA8 *im; + int roww; + int width; + int height; + int baseline; +}; + +struct cinfo +{ + FT_UInt index; + struct + { + int x, y; + } pos; + int posx; + RGBA_Font_Glyph *fg; + struct + { + int w,h; + int rows; + unsigned char *data; + } bm; +}; + + +#if defined(METRIC_CACHE) || defined(WORD_CACHE) +LK(lock_words); // for word cache call +static Eina_Inlist *words = NULL; +static struct prword *evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_props); +#endif + +EAPI void +evas_common_font_draw_init(void) +{ + char *p; + int tmp; + + if ((p = getenv("EVAS_WORD_CACHE_MAX_WORDS"))) + { + tmp = strtol(p,NULL,10); + /* 0 to disable of course */ + if (tmp > -1 && tmp < 500){ + max_cached_words = tmp; + } + } +} + +#ifdef EVAS_FRAME_QUEUING +EAPI void +evas_common_font_draw_finish(void) +{ +} +#endif + +/* + * BiDi handling: We receive the shaped string + other props from text_props, + * we need to reorder it so we'll have the visual string (the way we draw) + * and then for kerning we have to switch the order of the kerning query (as the prev + * is on the right, and not on the left). + */ +static void +evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn __UNUSED__, int x, int y, + const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, + int ext_h, int im_w, int im_h __UNUSED__) +{ + DATA32 *im; + RGBA_Font_Int *fi; + EVAS_FONT_WALK_TEXT_INIT(); + + fi = text_props->font_instance; + if (!fi) return; + + evas_common_font_int_reload(fi); + + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } + + +#if defined(METRIC_CACHE) || defined(WORD_CACHE) + unsigned int len; + + len = text_props->len; + + if (len > 2 && (len < WORD_CACHE_MAXLEN)) + { + struct prword *word; + + word = + evas_font_word_prerender(dc, text_props); + if (word) + { + int j, rowstart, rowend, xstart, xrun; + + im = dst->image.data; + xrun = word->width; + y -= word->baseline; + xstart = 0; + rowstart = 0; + rowend = word->height; + /* Clip to extent */ + if (x + xrun > ext_x + ext_w) + { + xrun -= x + xrun - ext_x - ext_w; + } + if (x < ext_x) + { + int excess = ext_x - x; + xstart = excess - 1; + xrun -= excess; + x = ext_x; + } + if (y + rowend > ext_y + ext_h) + { + rowend -= (y - ext_y + rowend - ext_h); + } + if (y < ext_y) + { + int excess = ext_y - y; + rowstart += excess; + //rowend -= excess; + // y = ext_y; + } + + if (xrun < 1) return; +/* For some reason, metric and word chache are exactly the same except for + * this piece of code that makes metric go nuts. ATM, we'll just go the + * WORD_CACHE path. */ +#if defined(METRIC_CACHE) || defined(WORD_CACHE) + if (word->im) + { + for (j = rowstart ; j < rowend ; j ++) + { + func(NULL, word->im + (word->roww * j) + xstart, dc->col.col, + im + ((y + j) * im_w) + x, xrun); + } + return; + } +# elif defined(METRIC_CACHE) + unsigned int ind; + + y += word->baseline; + for (ind = 0 ; ind < len ; ind ++) + { + // FIXME Do we need to draw? + struct cinfo *ci = word->cinfo + ind; + for (j = rowstart ; j < rowend ; j ++) + { + if ((ci->fg->ext_dat) && (dc->font_ext.func.gl_draw)) + { + /* ext glyph draw */ + dc->font_ext.func.gl_draw(dc->font_ext.data, + (void *)dst, + dc, ci->fg, + x + ci->pos.x, + y - ci->bm.h + j); + } + else + { + func(NULL, word->im + (word->roww * j) + xstart, + dc->col.col, im + ((y + j) * im_w) + x, xrun); + } + } + } + return; +# endif + } + } +#endif + + im = dst->image.data; + + EVAS_FONT_WALK_TEXT_START() + { + FT_UInt idx; + RGBA_Font_Glyph *fg; + int chr_x, chr_y; + + if (!EVAS_FONT_WALK_IS_VISIBLE) continue; + + idx = EVAS_FONT_WALK_INDEX; + + LKL(fi->ft_mutex); + fg = evas_common_font_int_cache_glyph_get(fi, idx); + if (!fg) + { + LKU(fi->ft_mutex); + continue; + } + + LKU(fi->ft_mutex); + + if (dc->font_ext.func.gl_new) + { + /* extension calls */ + fg->ext_dat = dc->font_ext.func.gl_new(dc->font_ext.data, fg); + fg->ext_dat_free = dc->font_ext.func.gl_free; + } + + chr_x = x + EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR; + chr_y = y + EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR; + + if (chr_x < (ext_x + ext_w)) + { + DATA8 *data; + int i, j, w, h; + + data = fg->glyph_out->bitmap.buffer; + j = fg->glyph_out->bitmap.pitch; + w = fg->glyph_out->bitmap.width; + if (j < w) j = w; + h = fg->glyph_out->bitmap.rows; + /* + if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays) + && (fg->glyph_out->bitmap.num_grays == 256) + ) + */ + { + if ((j > 0) && (chr_x + w > ext_x)) + { + if ((fg->ext_dat) && (dc->font_ext.func.gl_draw)) + { + /* ext glyph draw */ + dc->font_ext.func.gl_draw(dc->font_ext.data, + (void *)dst, + dc, fg, chr_x, + y - (chr_y - y)); + } + else + { + if ((fg->glyph_out->bitmap.num_grays == 256) && + (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)) + { + for (i = 0; i < h; i++) + { + int dx, dy; + int in_x, in_w; + + in_x = 0; + in_w = 0; + dx = chr_x; + dy = y - (chr_y - i - y); +#ifdef EVAS_SLI + if (((dy) % dc->sli.h) == dc->sli.y) +#endif + { + if ((dx < (ext_x + ext_w)) && + (dy >= (ext_y)) && + (dy < (ext_y + ext_h))) + { + if (dx + w > (ext_x + ext_w)) + in_w += (dx + w) - (ext_x + ext_w); + if (dx < ext_x) + { + in_w += ext_x - dx; + in_x = ext_x - dx; + dx = ext_x; + } + if (in_w < w) + { + func(NULL, data + (i * j) + in_x, dc->col.col, + im + (dy * im_w) + dx, w - in_w); + } + } + } + } + } + else + { + DATA8 *tmpbuf = NULL, *dp, *tp, bits; + int bi, bj; + const DATA8 bitrepl[2] = {0x0, 0xff}; + + tmpbuf = alloca(w); + for (i = 0; i < h; i++) + { + int dx, dy; + int in_x, in_w, end; + + in_x = 0; + in_w = 0; + dx = chr_x; + dy = y - (chr_y - i - y); +#ifdef EVAS_SLI + if (((dy) % dc->sli.h) == dc->sli.y) +#endif + { + tp = tmpbuf; + dp = data + (i * fg->glyph_out->bitmap.pitch); + for (bi = 0; bi < w; bi += 8) + { + bits = *dp; + if ((w - bi) < 8) end = w - bi; + else end = 8; + for (bj = 0; bj < end; bj++) + { + *tp = bitrepl[(bits >> (7 - bj)) & 0x1]; + tp++; + } + dp++; + } + if ((dx < (ext_x + ext_w)) && + (dy >= (ext_y)) && + (dy < (ext_y + ext_h))) + { + if (dx + w > (ext_x + ext_w)) + in_w += (dx + w) - (ext_x + ext_w); + if (dx < ext_x) + { + in_w += ext_x - dx; + in_x = ext_x - dx; + dx = ext_x; + } + if (in_w < w) + { + func(NULL, tmpbuf + in_x, dc->col.col, + im + (dy * im_w) + dx, w - in_w); + } + } + } + } + } + } + } + } + } + else + break; + } + EVAS_FONT_WALK_TEXT_END(); + evas_common_font_int_use_trim(); +} + +EAPI void +evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *text_props) +{ + int ext_x, ext_y, ext_w, ext_h; + int im_w, im_h; + RGBA_Gfx_Func func; + Cutout_Rects *rects; + Cutout_Rect *r; + int c, cx, cy, cw, ch; + int i; + + im_w = dst->cache_entry.w; + im_h = dst->cache_entry.h; + + ext_x = 0; ext_y = 0; ext_w = im_w; ext_h = im_h; + if (dc->clip.use) + { + ext_x = dc->clip.x; + ext_y = dc->clip.y; + ext_w = dc->clip.w; + ext_h = dc->clip.h; + if (ext_x < 0) + { + ext_w += ext_x; + ext_x = 0; + } + if (ext_y < 0) + { + ext_h += ext_y; + ext_y = 0; + } + if ((ext_x + ext_w) > im_w) + ext_w = im_w - ext_x; + if ((ext_y + ext_h) > im_h) + ext_h = im_h - ext_y; + } + if (ext_w <= 0) return; + if (ext_h <= 0) return; + +#ifdef EVAS_FRAME_QUEUING + LKL(fn->lock); +#endif +// evas_common_font_size_use(fn); + func = evas_common_gfx_func_composite_mask_color_span_get(dc->col.col, dst, 1, dc->render_op); + + if (!dc->cutout.rects) + { + evas_common_font_draw_internal(dst, dc, fn, x, y, text_props, + func, ext_x, ext_y, ext_w, ext_h, + im_w, im_h); + } + else + { + c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; + evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); + /* our clip is 0 size.. abort */ + if ((dc->clip.w > 0) && (dc->clip.h > 0)) + { + rects = evas_common_draw_context_apply_cutouts(dc); + for (i = 0; i < rects->active; ++i) + { + r = rects->rects + i; + evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); + evas_common_font_draw_internal(dst, dc, fn, x, y, text_props, + func, r->x, r->y, r->w, r->h, + im_w, im_h); + } + evas_common_draw_context_apply_clear_cutouts(rects); + } + dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; + } +#ifdef EVAS_FRAME_QUEUING + LKU(fn->lock); +#endif +} + +/* Only used if cache is on */ +#if defined(METRIC_CACHE) || defined(WORD_CACHE) + +static Eina_Bool +_evas_font_word_prerender_text_props_equal(const Evas_Text_Props *_a, const Evas_Text_Props *_b) +{ + Evas_Font_Glyph_Info *gl1, *gl2; + size_t i; + + if ((_a->len != _b->len) || + (_a->font_instance != _b->font_instance)) + return EINA_FALSE; + + gl1 = _a->info->glyph + _a->start; + gl2 = _b->info->glyph + _b->start; + i = _a->len; + for ( ; (i > 0) && (gl1->index == gl2->index) ; i--, gl1++, gl2++) + ; + + return (i == 0); +} + +static struct prword * +evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_props) +{ + struct cinfo *metrics; + unsigned char *im; + int width; + int height, above, below, baseline, descent; + unsigned int i,j; + struct prword *w; + int last_delta = 0; + Eina_Unicode gl; + struct cinfo *ci; + unsigned int len = text_props->len; + RGBA_Font_Int *fi = (RGBA_Font_Int *) text_props->font_instance; + EVAS_FONT_WALK_TEXT_INIT(); + +# ifndef METRIC_CACHE + gl = dc->font_ext.func.gl_new ? 1: 0; + if (gl) return NULL; +# endif + + LKL(lock_words); + EINA_INLIST_FOREACH(words,w) + { + if (_evas_font_word_prerender_text_props_equal(&w->text_props, + text_props)) + { + words = eina_inlist_promote(words, EINA_INLIST_GET(w)); + LKU(lock_words); + return w; + } + } + LKU(lock_words); + + gl = dc->font_ext.func.gl_new ? 1: 0; + + above = 0; below = 0; baseline = 0; height = 0; descent = 0; + + /* First pass: Work out how big and populate */ + metrics = malloc(sizeof(struct cinfo) * len); + ci = metrics; + EVAS_FONT_WALK_TEXT_START() + { + FT_UInt index; + RGBA_Font_Glyph *fg; + index = EVAS_FONT_WALK_INDEX; + LKL(fi->ft_mutex); + fg = evas_common_font_int_cache_glyph_get(fi, index); + if (!fg) + { + LKU(fi->ft_mutex); + continue; + } + + LKU(fi->ft_mutex); + EVAS_FONT_WALK_TEXT_WORK(); + /* Currently broken with invisible chars if (!EVAS_FONT_WALK_IS_VISIBLE) continue; */ + ci->index = index; + ci->fg = fg; + + if (gl) + { + ci->fg->ext_dat =dc->font_ext.func.gl_new(dc->font_ext.data,ci->fg); + ci->fg->ext_dat_free = dc->font_ext.func.gl_free; + } + ci->bm.data = ci->fg->glyph_out->bitmap.buffer; + ci->bm.w = MAX(ci->fg->glyph_out->bitmap.pitch, + ci->fg->glyph_out->bitmap.width); + ci->bm.rows = ci->fg->glyph_out->bitmap.rows; + ci->bm.h = ci->fg->glyph_out->top; + above = ci->bm.rows - (ci->bm.rows - ci->bm.h); + below = ci->bm.rows - ci->bm.h; + if (below > descent) descent = below; + if (above > baseline) baseline = above; + ci->pos.x = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR; + ci->pos.y = EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR; + last_delta = EVAS_FONT_WALK_X_ADV - + (ci->bm.w + ci->fg->glyph_out->left); + ci++; + } + EVAS_FONT_WALK_TEXT_END(); + + /* First loop done */ + width = EVAS_FONT_WALK_PEN_X; + if (last_delta < 0) + width -= last_delta; + width = (width & 0x7) ? width + (8 - (width & 0x7)) : width; + + height = baseline + descent; + if (!gl) + { + im = calloc(height, width); + for (i = 0 ; i < len ; i ++) + { + struct cinfo *cin = metrics + i; + + for (j = 0 ; j < cin->bm.rows ; j ++) + { + int correction; /* Used to remove negative inset and such */ + if (cin->pos.x < 0) + correction = -cin->pos.x; + else + correction = 0; + + memcpy(im + cin->pos.x + (j + baseline - cin->bm.h) * width + + correction, + cin->bm.data + j * cin->bm.w + correction, + cin->bm.w - correction); + } + } + } + else + { + im = NULL; + } + + /* Save it */ + struct prword *save; + + save = malloc(sizeof(struct prword)); + save->cinfo = metrics; + evas_common_text_props_content_copy_and_ref(&save->text_props, text_props); + save->im = im; + save->width = EVAS_FONT_WALK_PEN_X; + if (last_delta < 0) + save->width += last_delta; + save->roww = width; + save->height = height; + save->baseline = baseline; + LKL(lock_words); + words = eina_inlist_prepend(words, EINA_INLIST_GET(save)); + + /* Clean up if too long */ + if (eina_inlist_count(words) > max_cached_words) + { + struct prword *last = (struct prword *)(words->last); + + if (last) + { + if (last->im) free(last->im); + if (last->cinfo) free(last->cinfo); + evas_common_text_props_content_unref(&last->text_props); + words = eina_inlist_remove(words, EINA_INLIST_GET(last)); + free(last); + } + } + LKU(lock_words); + + return save; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_font_load.c b/libraries/evas/src/lib/engines/common/evas_font_load.c new file mode 100644 index 0000000..3fc4521 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_font_load.c @@ -0,0 +1,929 @@ +#include "evas_common.h" +#include "evas_private.h" + +#include + +#include "evas_font_private.h" /* for Frame-Queuing support */ +#include "evas_font_ot.h" + +#ifdef USE_HARFBUZZ +# include +# include +#endif + +extern FT_Library evas_ft_lib; + +static int font_cache_usage = 0; +static int font_cache = 0; +static int font_dpi = 75; + +static Eina_Hash *fonts_src = NULL; +static Eina_Hash *fonts = NULL; +static Eina_List *fonts_lru = NULL; +static Eina_Inlist *fonts_use_lru = NULL; +static int fonts_use_usage = 0; + +static void _evas_common_font_int_clear(RGBA_Font_Int *fi); + +static int +_evas_font_cache_int_cmp(const RGBA_Font_Int *k1, int k1_length __UNUSED__, + const RGBA_Font_Int *k2, int k2_length __UNUSED__) +{ + /* RGBA_Font_Source->name is a stringshare */ + if (k1->src->name == k2->src->name) + { + if (k1->size == k2->size) + return k1->wanted_rend - k2->wanted_rend; + else + return k1->size - k2->size; + } + return strcmp(k1->src->name, k2->src->name); +} + +static int +_evas_font_cache_int_hash(const RGBA_Font_Int *key, int key_length __UNUSED__) +{ + int hash; + unsigned int wanted_rend = key->wanted_rend; + hash = eina_hash_djb2(key->src->name, eina_stringshare_strlen(key->src->name) + 1); + hash ^= eina_hash_int32(&key->size, sizeof (int)); + hash ^= eina_hash_int32(&wanted_rend, sizeof (int)); + return hash; +} + +static void +_evas_common_font_source_free(RGBA_Font_Source *fs) +{ + FTLOCK(); + FT_Done_Face(fs->ft.face); + FTUNLOCK(); + if (fs->name) eina_stringshare_del(fs->name); + if (fs->file) eina_stringshare_del(fs->file); + free(fs); +} + +static void +_evas_common_font_int_free(RGBA_Font_Int *fi) +{ + FT_Done_Size(fi->ft.size); + + evas_common_font_int_modify_cache_by(fi, -1); + _evas_common_font_int_clear(fi); + eina_hash_free(fi->kerning); + +#ifdef HAVE_PTHREAD + pthread_mutex_destroy(&fi->ft_mutex); +#endif +#ifdef USE_HARFBUZZ + hb_font_destroy(fi->ft.hb_font); +#endif + evas_common_font_source_free(fi->src); + if (fi->references == 0) fonts_lru = eina_list_remove(fonts_lru, fi); + if (fi->fash) fi->fash->freeme(fi->fash); + if (fi->inuse) + { + fonts_use_lru = eina_inlist_remove(fonts_use_lru, EINA_INLIST_GET(fi)); + fi->inuse = 0; + fonts_use_usage -= fi->usage; + fi->usage = 0; + } + free(fi); +} + +void +evas_common_font_load_init(void) +{ + fonts_src = eina_hash_string_small_new(EINA_FREE_CB(_evas_common_font_source_free)); + fonts = eina_hash_new(NULL, + EINA_KEY_CMP(_evas_font_cache_int_cmp), + EINA_KEY_HASH(_evas_font_cache_int_hash), + EINA_FREE_CB(_evas_common_font_int_free), + 5); +} + +void +evas_common_font_load_shutdown(void) +{ + eina_hash_free(fonts); + fonts = NULL; + eina_hash_free(fonts_src); + fonts_src = NULL; +} + +EAPI void +evas_common_font_dpi_set(int dpi) +{ + font_dpi = dpi; +} + +EAPI RGBA_Font_Source * +evas_common_font_source_memory_load(const char *name, const void *data, int data_size) +{ + int error; + RGBA_Font_Source *fs; + + assert(name != NULL); + fs = calloc(1, sizeof(RGBA_Font_Source) + data_size); + if (!fs) return NULL; + fs->data = ((unsigned char *)fs) + sizeof(RGBA_Font_Source); + fs->data_size = data_size; + fs->current_size = 0; + memcpy(fs->data, data, data_size); + FTLOCK(); + error = FT_New_Memory_Face(evas_ft_lib, fs->data, fs->data_size, 0, &(fs->ft.face)); + FTUNLOCK(); + if (error) + { + free(fs); + return NULL; + } + fs->name = eina_stringshare_add(name); + fs->file = NULL; + FTLOCK(); + error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode); + if (error) + { + FT_Done_Face(fs->ft.face); + fs->ft.face = NULL; + free(fs); + return NULL; + } + FTUNLOCK(); + fs->ft.orig_upem = fs->ft.face->units_per_EM; + fs->references = 1; + eina_hash_direct_add(fonts_src, fs->name, fs); + return fs; +} + +EAPI RGBA_Font_Source * +evas_common_font_source_load(const char *name) +{ + RGBA_Font_Source *fs; + + assert(name != NULL); + fs = calloc(1, sizeof(RGBA_Font_Source)); + if (!fs) return NULL; + fs->data = NULL; + fs->data_size = 0; + fs->current_size = 0; + fs->ft.face = NULL; + fs->name = eina_stringshare_add(name); + fs->file = eina_stringshare_ref(fs->name); + fs->ft.orig_upem = 0; + fs->references = 1; + eina_hash_direct_add(fonts_src, fs->name, fs); + return fs; +} + +void +evas_common_font_source_unload(RGBA_Font_Source *fs) +{ + FTLOCK(); + FT_Done_Face(fs->ft.face); + fs->ft.face = NULL; + FTUNLOCK(); +} + +void +evas_common_font_source_reload(RGBA_Font_Source *fs) +{ + if (fs->ft.face) return; + if (fs->data) + { + int error; + + FTLOCK(); + error = FT_New_Memory_Face(evas_ft_lib, fs->data, fs->data_size, 0, &(fs->ft.face)); + FTUNLOCK(); + if (error) return; + FTLOCK(); + error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode); + if (error) + { + FT_Done_Face(fs->ft.face); + fs->ft.face = NULL; + } + FTUNLOCK(); + } + else + evas_common_font_source_load_complete(fs); +} + +EAPI int +evas_common_font_source_load_complete(RGBA_Font_Source *fs) +{ + int error; + + FTLOCK(); + error = FT_New_Face(evas_ft_lib, fs->file, 0, &(fs->ft.face)); + if (error) + { + FTUNLOCK(); + fs->ft.face = NULL; + return error; + } + error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode); + if (error) + { + FT_Done_Face(fs->ft.face); + FTUNLOCK(); + fs->ft.face = NULL; + return error; + } + FTUNLOCK(); + fs->ft.orig_upem = fs->ft.face->units_per_EM; + return error; +} + +EAPI RGBA_Font_Source * +evas_common_font_source_find(const char *name) +{ + RGBA_Font_Source *fs; + + if (!name) return NULL; + fs = eina_hash_find(fonts_src, name); + if (fs) + { + fs->references++; + return fs; + } + return NULL; +} + +EAPI void +evas_common_font_source_free(RGBA_Font_Source *fs) +{ + fs->references--; + if (fs->references > 0) return; + eina_hash_del(fonts_src, fs->name, fs); +} + +EAPI void +evas_common_font_size_use(RGBA_Font *fn) +{ + RGBA_Font_Int *fi; + Eina_List *l; + + EINA_LIST_FOREACH(fn->fonts, l, fi) + { + if (fi->src->current_size != fi->size) + { + evas_common_font_source_reload(fi->src); + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } + } +} + +static int +_evas_common_font_double_int_cmp(const int *key1, __UNUSED__ int key1_length, + const int *key2, __UNUSED__ int key2_length) +{ + if (key1[0] - key2[0] == 0) return key1[1] - key2[1]; + return key1[0] - key2[0]; +} + +static int +_evas_common_font_double_int_hash(const unsigned int key[2], int key_length) +{ + return + eina_hash_int32(&key[0], key_length) ^ + eina_hash_int32(&key[1], key_length); +} + +static void +_evas_common_font_int_cache_init(RGBA_Font_Int *fi) +{ + /* Add some font kerning cache. */ + fi->kerning = eina_hash_new(NULL, + EINA_KEY_CMP(_evas_common_font_double_int_cmp), + EINA_KEY_HASH(_evas_common_font_double_int_hash), + free, 3); +#ifdef HAVE_PTHREAD + pthread_mutex_init(&fi->ft_mutex, NULL); +#endif +} + +EAPI RGBA_Font_Int * +evas_common_font_int_memory_load(const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend) +{ + RGBA_Font_Int *fi; + + fi = evas_common_font_int_find(name, size, wanted_rend); + if (fi) return fi; + fi = calloc(1, sizeof(RGBA_Font_Int)); + if (!fi) return NULL; + fi->src = evas_common_font_source_find(name); + if (!fi->src) + fi->src = evas_common_font_source_memory_load(name, data, data_size); + if (!fi->src) + { + free(fi); + return NULL; + } + fi->size = size; + _evas_common_font_int_cache_init(fi); + fi = evas_common_font_int_load_init(fi); + evas_common_font_int_load_complete(fi); + return fi; +} + +EAPI RGBA_Font_Int * +evas_common_font_int_load(const char *name, int size, + Font_Rend_Flags wanted_rend) +{ + RGBA_Font_Int *fi; + + fi = evas_common_font_int_find(name, size, wanted_rend); + if (fi) return fi; + fi = calloc(1, sizeof(RGBA_Font_Int)); + if (!fi) return NULL; + fi->src = evas_common_font_source_find(name); + if (!fi->src && evas_file_path_is_file(name)) + fi->src = evas_common_font_source_load(name); + + if (!fi->src) + { + free(fi); + return NULL; + } + fi->size = size; + fi->wanted_rend = wanted_rend; + _evas_common_font_int_cache_init(fi); + fi = evas_common_font_int_load_init(fi); +// evas_common_font_int_load_complete(fi); + return fi; +} + +EAPI RGBA_Font_Int * +evas_common_font_int_load_init(RGBA_Font_Int *fi) +{ + fi->ft.size = NULL; + fi->references = 1; + eina_hash_direct_add(fonts, fi, fi); + return fi; +} + +EAPI RGBA_Font_Int * +evas_common_font_int_load_complete(RGBA_Font_Int *fi) +{ + int val, dv; + int ret; + int error; + + FTLOCK(); + error = FT_New_Size(fi->src->ft.face, &(fi->ft.size)); + if (!error) + { + FT_Activate_Size(fi->ft.size); + } + fi->real_size = fi->size * 64; + error = FT_Set_Char_Size(fi->src->ft.face, 0, fi->real_size, font_dpi, font_dpi); + if (error) + { + fi->real_size = fi->size; + error = FT_Set_Pixel_Sizes(fi->src->ft.face, 0, fi->real_size); + } + FTUNLOCK(); + if (error) + { + int i; + int chosen_size = 0; + int chosen_width = 0; + + for (i = 0; i < fi->src->ft.face->num_fixed_sizes; i++) + { + int s; + int d, cd; + + s = fi->src->ft.face->available_sizes[i].height; + cd = chosen_size - fi->size; + if (cd < 0) cd = -cd; + d = s - fi->size; + if (d < 0) d = -d; + if (d < cd) + { + chosen_width = fi->src->ft.face->available_sizes[i].width; + chosen_size = s; + } + if (d == 0) break; + } + fi->real_size = chosen_size; + FTLOCK(); + error = FT_Set_Pixel_Sizes(fi->src->ft.face, chosen_width, fi->real_size); + FTUNLOCK(); + if (error) + { + /* couldn't choose the size anyway... what now? */ + } + } + fi->src->current_size = 0; + fi->max_h = 0; + val = (int)fi->src->ft.face->bbox.yMax; + if (fi->src->ft.face->units_per_EM != 0) + { + dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; + ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); + } + else ret = val; + fi->max_h += ret; + val = -(int)fi->src->ft.face->bbox.yMin; + if (fi->src->ft.face->units_per_EM != 0) + { + dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; + ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); + } + else ret = val; + fi->max_h += ret; + + /* If the loaded font doesn't match with wanted_rend value requested by + * textobject and textblock, Set the runtime_rend value as FONT_REND_SLANT + * or FONT_REND_WEIGHT for software rendering. */ + fi->runtime_rend = FONT_REND_REGULAR; + if ((fi->wanted_rend & FONT_REND_SLANT) && + !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_ITALIC)) + fi->runtime_rend |= FONT_REND_SLANT; + + if ((fi->wanted_rend & FONT_REND_WEIGHT) && + !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_BOLD)) + fi->runtime_rend |= FONT_REND_WEIGHT; + + return fi; +} + +EAPI RGBA_Font * +evas_common_font_memory_load(const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend) +{ + RGBA_Font *fn; + RGBA_Font_Int *fi; + + fi = evas_common_font_int_memory_load(name, size, data, data_size, + wanted_rend); + if (!fi) return NULL; + fn = calloc(1, sizeof(RGBA_Font)); + if (!fn) + { + fi->references--; + if (fi->references == 0) + { + fonts_lru = eina_list_prepend(fonts_lru, fi); + evas_common_font_int_modify_cache_by(fi, 1); + evas_common_font_flush(); + } + return NULL; + } + fn->fonts = eina_list_append(fn->fonts, fi); + fn->hinting = FONT_BYTECODE_HINT; + fi->hinting = fn->hinting; + fn->references = 1; + LKI(fn->lock); +#ifdef EVAS_FRAME_QUEUING + LKI(fn->ref_fq_add); + LKI(fn->ref_fq_del); + eina_condition_new(&(fn->cond_fq_del), &(fn->ref_fq_del)); +#endif + if (fi->inuse) evas_common_font_int_promote(fi); + else + { + fi->inuse = 1; + fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); + } + return fn; +} + + +//ZZZ: font struct looks like: +// fn->(fi, fi, fi, ...) +// fi->fs + +EAPI RGBA_Font * +evas_common_font_load(const char *name, int size, Font_Rend_Flags wanted_rend) +{ + RGBA_Font *fn; + RGBA_Font_Int *fi; + + fi = evas_common_font_int_load(name, size, wanted_rend); + if (!fi) return NULL; + /* First font, complete load */ + if (!fi->ft.size) + { + if (!fi->src->ft.face) + { + if (evas_common_font_source_load_complete(fi->src)) + { + fi->references--; + if (fi->references == 0) + { + fonts_lru = eina_list_prepend(fonts_lru, fi); + evas_common_font_int_modify_cache_by(fi, 1); + evas_common_font_flush(); + } + return NULL; + } + } + evas_common_font_int_load_complete(fi); + } + fn = calloc(1, sizeof(RGBA_Font)); + if (!fn) + { + fi->references--; + if (fi->references == 0) + { + fonts_lru = eina_list_prepend(fonts_lru, fi); + evas_common_font_int_modify_cache_by(fi, 1); + evas_common_font_flush(); + } + return NULL; + } + + fn->fonts = eina_list_append(fn->fonts, fi); + fn->hinting = FONT_BYTECODE_HINT; + fi->hinting = fn->hinting; + fn->references = 1; + LKI(fn->lock); +#ifdef EVAS_FRAME_QUEUING + LKI(fn->ref_fq_add); + LKI(fn->ref_fq_del); + eina_condition_new(&(fn->cond_fq_del), &(fn->ref_fq_del)); +#endif + if (fi->inuse) evas_common_font_int_promote(fi); + else + { + fi->inuse = 1; + fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); + } + return fn; +} + +EAPI RGBA_Font * +evas_common_font_add(RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend) +{ + RGBA_Font_Int *fi; + + if (!fn) return NULL; + fi = evas_common_font_int_load(name, size, wanted_rend); + if (fi) + { + fn->fonts = eina_list_append(fn->fonts, fi); + fi->hinting = fn->hinting; + if (fi->inuse) evas_common_font_int_promote(fi); + else + { + fi->inuse = 1; + fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); + } + return fn; + } + return NULL; +} + +EAPI RGBA_Font * +evas_common_font_memory_add(RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend) +{ + RGBA_Font_Int *fi; + + if (!fn) + return NULL; + fi = evas_common_font_int_memory_load(name, size, data, data_size, wanted_rend); + if (fi) + { + fn->fonts = eina_list_append(fn->fonts, fi); + fi->hinting = fn->hinting; + if (fi->inuse) evas_common_font_int_promote(fi); + else + { + fi->inuse = 1; + fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); + } + return fn; + } + return NULL; +} + +EAPI void +evas_common_font_free(RGBA_Font *fn) +{ + Eina_List *l; + RGBA_Font_Int *fi; + + if (!fn) return; + fn->references--; + if (fn->references > 0) return; +#ifdef EVAS_FRAME_QUEUING + LKL(fn->ref_fq_add); + LKL(fn->ref_fq_del); + if (fn->ref_fq[0] != fn->ref_fq[1]) + { + LKU(fn->ref_fq_add); + LKU(fn->ref_fq_del); + return; + } + LKU(fn->ref_fq_add); + LKU(fn->ref_fq_del); +#endif + EINA_LIST_FOREACH(fn->fonts, l, fi) + { + fi->references--; + if (fi->references == 0) + { + fonts_lru = eina_list_append(fonts_lru, fi); + evas_common_font_int_modify_cache_by(fi, 1); + } + } + evas_common_font_flush(); + eina_list_free(fn->fonts); + if (fn->fash) fn->fash->freeme(fn->fash); + LKD(fn->lock); +#ifdef EVAS_FRAME_QUEUING + LKD(fn->ref_fq_add); + LKD(fn->ref_fq_del); + eina_condition_free(&(fn->cond_fq_del)); +#endif + free(fn); +} + +EAPI void +evas_common_font_hinting_set(RGBA_Font *fn, Font_Hint_Flags hinting) +{ + Eina_List *l; + RGBA_Font_Int *fi; + + if (!fn) return; + fn->hinting = hinting; + EINA_LIST_FOREACH(fn->fonts, l, fi) + { + fi->hinting = fn->hinting; + } +} + +EAPI Eina_Bool +evas_common_hinting_available(Font_Hint_Flags hinting) +{ + switch (hinting) + { + case FONT_NO_HINT: + case FONT_AUTO_HINT: + /* these two hinting modes are always available */ + return EINA_TRUE; + case FONT_BYTECODE_HINT: + /* Only use the bytecode interpreter if support for the _patented_ + * algorithms is available because the free bytecode + * interpreter's results are too crappy. + * + * On freetyp 2.2+, we can ask the library about support for + * the patented interpreter. On older versions, we need to use + * macros to check for it. + */ +#if FREETYPE_MINOR >= 2 + return FT_Get_TrueType_Engine_Type(evas_ft_lib) >= + FT_TRUETYPE_ENGINE_TYPE_PATENTED; +#else + /* we may not rely on TT_CONFIG_OPTION_BYTECODE_INTERPRETER + * here to find out whether it's supported. + * + * so, assume it is. o_O + */ + return EINA_TRUE; +#endif + } + /* shouldn't get here - need to add another case statement */ + return EINA_FALSE; +} + +EAPI RGBA_Font * +evas_common_font_memory_hinting_load(const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend) +{ + RGBA_Font *fn; + + fn = evas_common_font_memory_load(name, size, data, data_size, wanted_rend); + if (fn) evas_common_font_hinting_set(fn, hinting); + return fn; +} + +EAPI RGBA_Font * +evas_common_font_hinting_load(const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend) +{ + RGBA_Font *fn; + + fn = evas_common_font_load(name, size, wanted_rend); + if (fn) evas_common_font_hinting_set(fn, hinting); + return fn; +} + +EAPI RGBA_Font * +evas_common_font_hinting_add(RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend) +{ + fn = evas_common_font_add(fn, name, size, wanted_rend); + if (fn) evas_common_font_hinting_set(fn, hinting); + return fn; +} + +EAPI RGBA_Font * +evas_common_font_memory_hinting_add(RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend) +{ + fn = evas_common_font_memory_add(fn, name, size, data, data_size, + wanted_rend); + if (fn) evas_common_font_hinting_set(fn, hinting); + return fn; +} + +static void +_evas_common_font_int_clear(RGBA_Font_Int *fi) +{ + int i, j, k; + + LKL(fi->ft_mutex); + if (!fi->fash) + { + LKU(fi->ft_mutex); + return; + } + evas_common_font_int_modify_cache_by(fi, -1); + if (fi->fash) + { + for (k = 0; k <= 0xff; k++) // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) + { + Fash_Glyph_Map2 *fmap2 = fi->fash->bucket[k]; + if (fmap2) + { + for (j = 0; j <= 0xff; j++) // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) + { + Fash_Glyph_Map *fmap = fmap2->bucket[j]; + if (fmap) + { + for (i = 0; i <= 0xff; i++) + { + RGBA_Font_Glyph *fg = fmap->item[i]; + if ((fg) && (fg != (void *)(-1))) + { + FT_Done_Glyph(fg->glyph); + /* extension calls */ + if (fg->ext_dat_free) fg->ext_dat_free(fg->ext_dat); + free(fg); + fmap->item[i] = NULL; + } + } + } + } + } + } + fi->fash->freeme(fi->fash); + fi->fash = NULL; + } + if (fi->inuse) fonts_use_usage -= fi->usage; + fi->usage = 0; + LKU(fi->ft_mutex); +} + +static Eina_Bool +_evas_common_font_all_clear_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__) +{ + RGBA_Font_Int *fi = data; + _evas_common_font_int_clear(fi); + return 1; +} + +EAPI void +evas_common_font_all_clear(void) +{ + eina_hash_foreach(fonts, _evas_common_font_all_clear_cb, NULL); +} + +void +evas_common_font_int_promote(RGBA_Font_Int *fi) +{ + return; + if (fonts_use_lru == (Eina_Inlist *)fi) return; + if (!fi->inuse) return; + fonts_use_lru = eina_inlist_remove(fonts_use_lru, EINA_INLIST_GET(fi)); + fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); +} + +void +evas_common_font_int_use_increase(int size) +{ + fonts_use_usage += size; +} + +void +evas_common_font_int_use_trim(void) +{ + Eina_Inlist *l; + + return; + if (fonts_use_usage <= (font_cache << 1)) return; + if (!fonts_use_lru) return; + l = fonts_use_lru->last; + while (l) + { + RGBA_Font_Int *fi = (RGBA_Font_Int *)l; + if (fonts_use_usage <= (font_cache << 1)) break; + // FIXME: del fi->kerning content + _evas_common_font_int_clear(fi); + evas_common_font_int_unload(fi); + evas_common_font_int_promote(fi); + l = l->prev; + } +} + +void +evas_common_font_int_unload(RGBA_Font_Int *fi) +{ + return; + if (!fi->src->ft.face) return; + _evas_common_font_int_clear(fi); + FT_Done_Size(fi->ft.size); + fi->ft.size = NULL; + evas_common_font_source_unload(fi->src); +} + +void +evas_common_font_int_reload(RGBA_Font_Int *fi) +{ + if (fi->src->ft.face) return; + evas_common_font_source_load_complete(fi->src); + return; + evas_common_font_source_reload(fi->src); + evas_common_font_int_load_complete(fi); +} + +/* when the fi->references == 0 we increase this instead of really deleting + * we then check if the cache_useage size is larger than allowed + * !If the cache is NOT too large we dont delete font_int + * !If the cache is too large we really delete font_int */ +EAPI void +evas_common_font_int_modify_cache_by(RGBA_Font_Int *fi, int dir) +{ + font_cache_usage += dir * (sizeof(RGBA_Font) + fi->usage + + sizeof(FT_FaceRec) + 16384); /* fudge values */ +} + +EAPI int +evas_common_font_cache_get(void) +{ + return font_cache; +} + +EAPI void +evas_common_font_cache_set(int size) +{ + font_cache = size; + evas_common_font_flush(); + evas_common_font_int_use_trim(); +} + +EAPI void +evas_common_font_flush(void) +{ + if (font_cache_usage < font_cache) return; + while (font_cache_usage > font_cache) + { + int pfont_cache_usage; + + pfont_cache_usage = font_cache_usage; + evas_common_font_flush_last(); + if (pfont_cache_usage == font_cache_usage) break; + } +} + +/* We run this when the cache gets larger than allowed size + * We check cache size each time a fi->references goes to 0 + * PERFORMS: Find font_int(s) with references == 0 and delete them */ +EAPI void +evas_common_font_flush_last(void) +{ + RGBA_Font_Int *fi = NULL; + + if (!fonts_lru) return ; + fi = eina_list_data_get(fonts_lru); + fonts_lru = eina_list_remove_list(fonts_lru, fonts_lru); + eina_hash_del(fonts, fi, fi); +} + +EAPI RGBA_Font_Int * +evas_common_font_int_find(const char *name, int size, + Font_Rend_Flags wanted_rend) +{ + RGBA_Font_Int tmp_fi; + RGBA_Font_Source tmp_fn; + RGBA_Font_Int *fi; + + tmp_fn.name = (char*) eina_stringshare_add(name); + tmp_fi.src = &tmp_fn; + tmp_fi.size = size; + tmp_fi.wanted_rend = wanted_rend; + fi = eina_hash_find(fonts, &tmp_fi); + if (fi) + { + if (fi->references == 0) + { + evas_common_font_int_modify_cache_by(fi, -1); + fonts_lru = eina_list_remove(fonts_lru, fi); + } + fi->references++; + } + eina_stringshare_del(tmp_fn.name); + return fi; +} diff --git a/libraries/evas/src/lib/engines/common/evas_font_main.c b/libraries/evas/src/lib/engines/common/evas_font_main.c new file mode 100644 index 0000000..64b1d5e --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_font_main.c @@ -0,0 +1,547 @@ +#include "evas_common.h" +#include "evas_private.h" + +#include "evas_font_private.h" + +#include FT_OUTLINE_H + +FT_Library evas_ft_lib = 0; +static int initialised = 0; + +LK(lock_font_draw); // for freetype2 API calls +LK(lock_bidi); // for evas bidi internal usage. +LK(lock_ot); // for evas bidi internal usage. + +EAPI void +evas_common_font_init(void) +{ + int error; + const char *s; + + initialised++; + if (initialised != 1) return; + error = FT_Init_FreeType(&evas_ft_lib); + if (error) return; + evas_common_font_load_init(); + evas_common_font_draw_init(); + s = getenv("EVAS_FONT_DPI"); + if (s) + { + int dpi = atoi(s); + + if (dpi > 0) evas_common_font_dpi_set(dpi); + } + LKI(lock_font_draw); + LKI(lock_bidi); + LKI(lock_ot); +} + +EAPI void +evas_common_font_shutdown(void) +{ + int error; + + if (initialised < 1) return; + initialised--; + if (initialised != 0) return; + + LKD(lock_font_draw); + LKD(lock_bidi); + LKD(lock_ot); + + evas_common_font_load_shutdown(); + evas_common_font_cache_set(0); + evas_common_font_flush(); + + error = FT_Done_FreeType(evas_ft_lib); +#ifdef EVAS_FRAME_QUEUING + evas_common_font_draw_finish(); +#endif + evas_ft_lib = 0; +} + +EAPI void +evas_common_font_font_all_unload(void) +{ + evas_common_font_all_clear(); +} + +EAPI int +evas_common_font_ascent_get(RGBA_Font *fn) +{ + int val; + RGBA_Font_Int *fi; + +// evas_common_font_size_use(fn); +#if 0 + { + Eina_List *l; + + EINA_LIST_FOREACH(fn->fonts, l, fi) + { + if (!fi->src->ft.face) continue; + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } + val = (int)fi->src->ft.face->size->metrics.ascender; + if (fi->src->ft.face->units_per_EM == 0) + return val; + dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; + ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); + printf(" ==== %p: %i\n", fi, ret); + } + } +#endif + fi = fn->fonts->data; + evas_common_font_int_reload(fi); + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } + if (!FT_IS_SCALABLE(fi->src->ft.face)) + { + WRN("NOT SCALABLE!"); + } + val = (int)fi->src->ft.face->size->metrics.ascender; + return val >> 6; +// printf("%i | %i\n", val, val >> 6); +// if (fi->src->ft.face->units_per_EM == 0) +// return val; +// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; +// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); +// return ret; +} + +EAPI int +evas_common_font_descent_get(RGBA_Font *fn) +{ + int val; + RGBA_Font_Int *fi; + +// evas_common_font_size_use(fn); + fi = fn->fonts->data; + evas_common_font_int_reload(fi); + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } + val = -(int)fi->src->ft.face->size->metrics.descender; + return val >> 6; +// if (fi->src->ft.face->units_per_EM == 0) +// return val; +// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; +// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); +// return ret; +} + +EAPI int +evas_common_font_max_ascent_get(RGBA_Font *fn) +{ + int val, dv; + int ret; + RGBA_Font_Int *fi; + +// evas_common_font_size_use(fn); + fi = fn->fonts->data; + evas_common_font_int_reload(fi); + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } + val = (int)fi->src->ft.face->bbox.yMax; + if (fi->src->ft.face->units_per_EM == 0) + return val; + dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; + ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); + return ret; +} + +EAPI int +evas_common_font_max_descent_get(RGBA_Font *fn) +{ + int val, dv; + int ret; + RGBA_Font_Int *fi; + +// evas_common_font_size_use(fn); + fi = fn->fonts->data; + evas_common_font_int_reload(fi); + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } + val = -(int)fi->src->ft.face->bbox.yMin; + if (fi->src->ft.face->units_per_EM == 0) + return val; + dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; + ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); + return ret; +} + +EAPI int +evas_common_font_get_line_advance(RGBA_Font *fn) +{ + int val; + RGBA_Font_Int *fi; + +// evas_common_font_size_use(fn); + fi = fn->fonts->data; + evas_common_font_int_reload(fi); + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } + val = (int)fi->src->ft.face->size->metrics.height; + if (fi->src->ft.face->units_per_EM == 0) + return val; + return val >> 6; +// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; +// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); +// return ret; +} + +/* Set of common functions that are used in a couple of places. */ + +static void +_fash_int2_free(Fash_Int_Map2 *fash) +{ + int i; + + for (i = 0; i < 256; i++) if (fash->bucket[i]) free(fash->bucket[i]); + free(fash); +} + +static void +_fash_int_free(Fash_Int *fash) +{ + int i; + + for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_int2_free(fash->bucket[i]); + free(fash); +} + +static Fash_Int * +_fash_int_new(void) +{ + Fash_Int *fash = calloc(1, sizeof(Fash_Int)); + fash->freeme = _fash_int_free; + return fash; +} + +static Fash_Item_Index_Map * +_fash_int_find(Fash_Int *fash, int item) +{ + int grp, maj, min; + + // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) + grp = (item >> 16) & 0xff; + maj = (item >> 8) & 0xff; + min = item & 0xff; + if (!fash->bucket[grp]) return NULL; + if (!fash->bucket[grp]->bucket[maj]) return NULL; + return &(fash->bucket[grp]->bucket[maj]->item[min]); +} + +static void +_fash_int_add(Fash_Int *fash, int item, RGBA_Font_Int *fint, int idx) +{ + int grp, maj, min; + + // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) + grp = (item >> 16) & 0xff; + maj = (item >> 8) & 0xff; + min = item & 0xff; + if (!fash->bucket[grp]) + fash->bucket[grp] = calloc(1, sizeof(Fash_Int_Map2)); + EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]); + if (!fash->bucket[grp]->bucket[maj]) + fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Int_Map)); + EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]); + fash->bucket[grp]->bucket[maj]->item[min].fint = fint; + fash->bucket[grp]->bucket[maj]->item[min].index = idx; +} + +static void +_fash_gl2_free(Fash_Glyph_Map2 *fash) +{ + int i; + + for (i = 0; i < 256; i++) if (fash->bucket[i]) free(fash->bucket[i]); + free(fash); +} + +static void +_fash_gl_free(Fash_Glyph *fash) +{ + int i; + + for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_gl2_free(fash->bucket[i]); + free(fash); +} + +static Fash_Glyph * +_fash_gl_new(void) +{ + Fash_Glyph *fash = calloc(1, sizeof(Fash_Glyph)); + fash->freeme = _fash_gl_free; + return fash; +} + +static RGBA_Font_Glyph * +_fash_gl_find(Fash_Glyph *fash, int item) +{ + int grp, maj, min; + + // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) + grp = (item >> 16) & 0xff; + maj = (item >> 8) & 0xff; + min = item & 0xff; + if (!fash->bucket[grp]) return NULL; + if (!fash->bucket[grp]->bucket[maj]) return NULL; + return fash->bucket[grp]->bucket[maj]->item[min]; +} + +static void +_fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph) +{ + int grp, maj, min; + + // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) + grp = (item >> 16) & 0xff; + maj = (item >> 8) & 0xff; + min = item & 0xff; + if (!fash->bucket[grp]) + fash->bucket[grp] = calloc(1, sizeof(Fash_Glyph_Map2)); + EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]); + if (!fash->bucket[grp]->bucket[maj]) + fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Glyph_Map)); + EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]); + fash->bucket[grp]->bucket[maj]->item[min] = glyph; +} + +EAPI RGBA_Font_Glyph * +evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx) +{ + RGBA_Font_Glyph *fg; + FT_UInt hindex; + FT_Error error; + int size; + const FT_Int32 hintflags[3] = + { FT_LOAD_NO_HINTING, FT_LOAD_FORCE_AUTOHINT, FT_LOAD_NO_AUTOHINT }; + static FT_Matrix transform = {0x10000, 0x05000, 0x0000, 0x10000}; // about 12 degree. + + evas_common_font_int_promote(fi); + if (fi->fash) + { + fg = _fash_gl_find(fi->fash, idx); + if (fg == (void *)(-1)) return NULL; + else if (fg) return fg; + } + + hindex = idx + (fi->hinting * 500000000); + +// fg = eina_hash_find(fi->glyphs, &hindex); +// if (fg) return fg; + + evas_common_font_int_reload(fi); + FTLOCK(); + error = FT_Load_Glyph(fi->src->ft.face, idx, + FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP | + hintflags[fi->hinting]); + FTUNLOCK(); + if (error) + { + if (!fi->fash) fi->fash = _fash_gl_new(); + if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1)); + return NULL; + } + + /* Transform the outline of Glyph according to runtime_rend. */ + if (fi->runtime_rend & FONT_REND_SLANT) + FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform); + /* Embolden the outline of Glyph according to rundtime_rend. */ + if (fi->runtime_rend & FONT_REND_WEIGHT) + FT_Outline_Embolden(&fi->src->ft.face->glyph->outline, + (fi->src->ft.face->size->metrics.x_ppem * 5 * 64) / 100); + + fg = malloc(sizeof(struct _RGBA_Font_Glyph)); + if (!fg) return NULL; + memset(fg, 0, (sizeof(struct _RGBA_Font_Glyph))); + + FTLOCK(); + error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph)); + FTUNLOCK(); + if (error) + { + free(fg); + if (!fi->fash) fi->fash = _fash_gl_new(); + if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1)); + return NULL; + } + + FTLOCK(); + error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1); + if (error) + { + FT_Done_Glyph(fg->glyph); + FTUNLOCK(); + free(fg); + if (!fi->fash) fi->fash = _fash_gl_new(); + if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1)); + return NULL; + } + FTUNLOCK(); + + fg->glyph_out = (FT_BitmapGlyph)fg->glyph; + fg->index = hindex; + fg->fi = fi; + + if (!fi->fash) fi->fash = _fash_gl_new(); + if (fi->fash) _fash_gl_add(fi->fash, idx, fg); + /* This '+ 200' is just an estimation of how much memory freetype will use + * on it's size. This value is not really used anywhere in code - it's + * only for statistics. */ + size = sizeof(RGBA_Font_Glyph) + sizeof(Eina_List) + + (fg->glyph_out->bitmap.width * fg->glyph_out->bitmap.rows) + 200; + fi->usage += size; + if (fi->inuse) evas_common_font_int_use_increase(size); + +// eina_hash_direct_add(fi->glyphs, &fg->index, fg); + return fg; +} + +typedef struct _Font_Char_Index Font_Char_Index; +struct _Font_Char_Index +{ + FT_UInt index; + Eina_Unicode gl; +}; + +EAPI FT_UInt +evas_common_get_char_index(RGBA_Font_Int* fi, Eina_Unicode gl) +{ + Font_Char_Index result; + //FT_UInt ret; + +#ifdef HAVE_PTHREAD +/// pthread_mutex_lock(&fi->ft_mutex); +#endif + +// result = eina_hash_find(fi->indexes, &gl); +// if (result) goto on_correct; +// +// result = malloc(sizeof (Font_Char_Index)); +// if (!result) +// { +//#ifdef HAVE_PTHREAD +// pthread_mutex_unlock(&fi->ft_mutex); +//#endif +// return FT_Get_Char_Index(fi->src->ft.face, gl); +// } + + evas_common_font_int_reload(fi); + FTLOCK(); + result.index = FT_Get_Char_Index(fi->src->ft.face, gl); + FTUNLOCK(); + result.gl = gl; + +// eina_hash_direct_add(fi->indexes, &result->gl, result); +// +// on_correct: +#ifdef HAVE_PTHREAD +// pthread_mutex_unlock(&fi->ft_mutex); +#endif + return result.index; +} + +EAPI int +evas_common_font_glyph_search(RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl) +{ + Eina_List *l; + + if (fn->fash) + { + Fash_Item_Index_Map *fm = _fash_int_find(fn->fash, gl); + if (fm) + { + if (fm->fint) + { + *fi_ret = fm->fint; + return fm->index; + } + else if (fm->index == -1) return 0; + } + } + + for (l = fn->fonts; l; l = l->next) + { + RGBA_Font_Int *fi; + int idx; + + fi = l->data; + +#if 0 /* FIXME: charmap user is disabled and use a deprecated data type. */ +/* + if (fi->src->charmap) // Charmap loaded, FI/FS blank + { + idx = evas_array_hash_search(fi->src->charmap, gl); + if (idx != 0) + { + evas_common_font_source_load_complete(fi->src); + evas_common_font_int_load_complete(fi); + + evas_array_hash_free(fi->src->charmap); + fi->src->charmap = NULL; + + *fi_ret = fi; + return idx; + } + } + else +*/ +#endif + if (!fi->src->ft.face) /* Charmap not loaded, FI/FS blank */ + { + evas_common_font_int_reload(fi); + } + if (fi->src->ft.face) + { + idx = evas_common_get_char_index(fi, gl); + if (idx != 0) + { + if (!fi->ft.size) + evas_common_font_int_load_complete(fi); + if (!fn->fash) fn->fash = _fash_int_new(); + if (fn->fash) _fash_int_add(fn->fash, gl, fi, idx); + *fi_ret = fi; + return idx; + } + else + { + if (!fn->fash) fn->fash = _fash_int_new(); + if (fn->fash) _fash_int_add(fn->fash, gl, NULL, -1); + } + } + } + *fi_ret = NULL; + return 0; +} diff --git a/libraries/evas/src/lib/engines/common/evas_font_ot.c b/libraries/evas/src/lib/engines/common/evas_font_ot.c new file mode 100644 index 0000000..2912d55 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_font_ot.c @@ -0,0 +1,336 @@ +#include "evas_font_ot.h" + +#ifdef USE_HARFBUZZ +# include +# include +#endif + +#include "evas_common.h" + +#include +#include "evas_font_private.h" + +#ifdef USE_HARFBUZZ +static const hb_script_t +_evas_script_to_harfbuzz[] = +{ + HB_SCRIPT_COMMON, + HB_SCRIPT_INHERITED, + HB_SCRIPT_ARABIC, + HB_SCRIPT_ARMENIAN, + HB_SCRIPT_BENGALI, + HB_SCRIPT_BOPOMOFO, + HB_SCRIPT_CHEROKEE, + HB_SCRIPT_COPTIC, + HB_SCRIPT_CYRILLIC, + HB_SCRIPT_DESERET, + HB_SCRIPT_DEVANAGARI, + HB_SCRIPT_ETHIOPIC, + HB_SCRIPT_GEORGIAN, + HB_SCRIPT_GOTHIC, + HB_SCRIPT_GREEK, + HB_SCRIPT_GUJARATI, + HB_SCRIPT_GURMUKHI, + HB_SCRIPT_HAN, + HB_SCRIPT_HANGUL, + HB_SCRIPT_HEBREW, + HB_SCRIPT_HIRAGANA, + HB_SCRIPT_KANNADA, + HB_SCRIPT_KATAKANA, + HB_SCRIPT_KHMER, + HB_SCRIPT_LAO, + HB_SCRIPT_LATIN, + HB_SCRIPT_MALAYALAM, + HB_SCRIPT_MONGOLIAN, + HB_SCRIPT_MYANMAR, + HB_SCRIPT_OGHAM, + HB_SCRIPT_OLD_ITALIC, + HB_SCRIPT_ORIYA, + HB_SCRIPT_RUNIC, + HB_SCRIPT_SINHALA, + HB_SCRIPT_SYRIAC, + HB_SCRIPT_TAMIL, + HB_SCRIPT_TELUGU, + HB_SCRIPT_THAANA, + HB_SCRIPT_THAI, + HB_SCRIPT_TIBETAN, + HB_SCRIPT_CANADIAN_ABORIGINAL, + HB_SCRIPT_YI, + HB_SCRIPT_TAGALOG, + HB_SCRIPT_HANUNOO, + HB_SCRIPT_BUHID, + HB_SCRIPT_TAGBANWA, + + /* Unicode-4.0 additions */ + HB_SCRIPT_BRAILLE, + HB_SCRIPT_CYPRIOT, + HB_SCRIPT_LIMBU, + HB_SCRIPT_OSMANYA, + HB_SCRIPT_SHAVIAN, + HB_SCRIPT_LINEAR_B, + HB_SCRIPT_TAI_LE, + HB_SCRIPT_UGARITIC, + + /* Unicode-4.1 additions */ + HB_SCRIPT_NEW_TAI_LUE, + HB_SCRIPT_BUGINESE, + HB_SCRIPT_GLAGOLITIC, + HB_SCRIPT_TIFINAGH, + HB_SCRIPT_SYLOTI_NAGRI, + HB_SCRIPT_OLD_PERSIAN, + HB_SCRIPT_KHAROSHTHI, + + /* Unicode-5.0 additions */ + HB_SCRIPT_UNKNOWN, + HB_SCRIPT_BALINESE, + HB_SCRIPT_CUNEIFORM, + HB_SCRIPT_PHOENICIAN, + HB_SCRIPT_PHAGS_PA, + HB_SCRIPT_NKO, + + /* Unicode-5.1 additions */ + HB_SCRIPT_KAYAH_LI, + HB_SCRIPT_LEPCHA, + HB_SCRIPT_REJANG, + HB_SCRIPT_SUNDANESE, + HB_SCRIPT_SAURASHTRA, + HB_SCRIPT_CHAM, + HB_SCRIPT_OL_CHIKI, + HB_SCRIPT_VAI, + HB_SCRIPT_CARIAN, + HB_SCRIPT_LYCIAN, + HB_SCRIPT_LYDIAN, + + /* Unicode-5.2 additions */ + HB_SCRIPT_AVESTAN, + HB_SCRIPT_BAMUM, + HB_SCRIPT_EGYPTIAN_HIEROGLYPHS, + HB_SCRIPT_IMPERIAL_ARAMAIC, + HB_SCRIPT_INSCRIPTIONAL_PAHLAVI, + HB_SCRIPT_INSCRIPTIONAL_PARTHIAN, + HB_SCRIPT_JAVANESE, + HB_SCRIPT_KAITHI, + HB_SCRIPT_TAI_THAM, + HB_SCRIPT_LISU, + HB_SCRIPT_MEETEI_MAYEK, + HB_SCRIPT_OLD_SOUTH_ARABIAN, + HB_SCRIPT_OLD_TURKIC, + HB_SCRIPT_SAMARITAN, + HB_SCRIPT_TAI_VIET, + + /* Unicode-6.0 additions */ + HB_SCRIPT_BATAK, + HB_SCRIPT_BRAHMI, + HB_SCRIPT_MANDAIC +}; +#endif + +#ifdef OT_SUPPORT +/* FIXME: doc. returns #items */ +EAPI int +evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index) +{ + int i; + int items; + int left_bound, right_bound; + size_t base_cluster; + char_index += props->start; + base_cluster = EVAS_FONT_OT_POS_GET(props->info->ot[char_index]); + for (i = (int) char_index ; + (i >= (int) props->start) && + (EVAS_FONT_OT_POS_GET(props->info->ot[i]) == base_cluster) ; + i--) + ; + left_bound = i; + for (i = (int) char_index + 1; + (i < (int) (props->start + props->len)) && + (EVAS_FONT_OT_POS_GET(props->info->ot[i]) == base_cluster) ; + i++) + ; + right_bound = i; + + if (right_bound == left_bound) + { + items = 1; + } + else if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + if (left_bound < 0) + { + items = props->text_offset + props->text_len - base_cluster; + } + else + { + items = props->info->ot[left_bound].source_cluster - base_cluster; + } + } + else + { + if (right_bound >= (int) (props->text_offset + props->text_len)) + { + items = props->text_offset + props->text_len - base_cluster; + } + else + { + items = props->info->ot[right_bound].source_cluster - base_cluster; + } + } + return (items > 0) ? items : 1; +} + +/* Harfbuzz font functions */ + +static hb_position_t +_evas_common_font_ot_hb_get_glyph_advance(hb_font_t *font, + void *font_data, hb_codepoint_t glyph, + void *user_data) +{ + /* Use our cache*/ + RGBA_Font_Int *fi = (RGBA_Font_Int *) font_data; + RGBA_Font_Glyph *fg; + (void) font; + (void) user_data; + fg = evas_common_font_int_cache_glyph_get(fi, glyph); + if (fg) + { + return fg->glyph->advance.x >> 10; + } + return 0; +} + +static hb_position_t +_evas_common_font_ot_hb_get_kerning(hb_font_t *font, void *font_data, + hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, void *user_data) +{ + RGBA_Font_Int *fi = (RGBA_Font_Int *) font_data; + int kern; + (void) font; + (void) user_data; + if (evas_common_font_query_kerning(fi, first_glyph, second_glyph, &kern)) + return kern; + + return 0; +} + +/* End of harfbuzz font funcs */ + +static inline hb_font_funcs_t * +_evas_common_font_ot_font_funcs_get(void) +{ + static hb_font_funcs_t *font_funcs = NULL; + if (!font_funcs) + { + font_funcs = hb_font_funcs_create(); + hb_font_funcs_set_glyph_h_advance_func(font_funcs, + _evas_common_font_ot_hb_get_glyph_advance, NULL, NULL); + hb_font_funcs_set_glyph_h_kerning_func(font_funcs, + _evas_common_font_ot_hb_get_kerning, NULL, NULL); + } + + return font_funcs; +} + +static inline hb_unicode_funcs_t * +_evas_common_font_ot_unicode_funcs_get(void) +{ + static hb_unicode_funcs_t *unicode_funcs = NULL; + if (!unicode_funcs) + { + unicode_funcs = hb_unicode_funcs_get_default(); + } + + return unicode_funcs; +} + +static void +_evas_common_font_ot_shape(hb_buffer_t *buffer, RGBA_Font_Int *fi) +{ + /* Create hb_font if not previously created */ + if (!fi->ft.hb_font) + { + hb_font_t *hb_ft_font; + + hb_ft_font = hb_ft_font_create(fi->src->ft.face, NULL); + fi->ft.hb_font = hb_font_create_sub_font(hb_ft_font); + hb_font_destroy(hb_ft_font); + + hb_font_set_funcs(fi->ft.hb_font, + _evas_common_font_ot_font_funcs_get(), fi, NULL); + } + + hb_shape(fi->ft.hb_font, buffer, NULL, 0); +} + +EAPI Eina_Bool +evas_common_font_ot_populate_text_props(const Eina_Unicode *text, + Evas_Text_Props *props, int len) +{ + RGBA_Font_Int *fi; + hb_buffer_t *buffer; + hb_glyph_position_t *positions; + hb_glyph_info_t *infos; + int slen; + unsigned int i; + Evas_Font_Glyph_Info *gl_itr; + Evas_Font_OT_Info *ot_itr; + Evas_Coord pen_x = 0; + + fi = props->font_instance; + + if (len < 0) + { + slen = eina_unicode_strlen(text); + } + else + { + slen = len; + } + + buffer = hb_buffer_create(); + hb_buffer_set_unicode_funcs(buffer, _evas_common_font_ot_unicode_funcs_get()); + hb_buffer_set_language(buffer, hb_language_from_string( + evas_common_language_from_locale_get(), -1)); + hb_buffer_set_script(buffer, _evas_script_to_harfbuzz[props->script]); + hb_buffer_set_direction(buffer, + (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? + HB_DIRECTION_RTL : HB_DIRECTION_LTR); + /* FIXME: add run-time conversions if needed, which is very unlikely */ + hb_buffer_add_utf32(buffer, (const uint32_t *) text, slen, 0, slen); + + _evas_common_font_ot_shape(buffer, fi); + + props->len = hb_buffer_get_length(buffer); + props->info->ot = calloc(props->len, + sizeof(Evas_Font_OT_Info)); + props->info->glyph = calloc(props->len, + sizeof(Evas_Font_Glyph_Info)); + positions = hb_buffer_get_glyph_positions(buffer, NULL); + infos = hb_buffer_get_glyph_infos(buffer, NULL); + gl_itr = props->info->glyph; + ot_itr = props->info->ot; + for (i = 0 ; i < props->len ; i++) + { + Evas_Coord adv; + ot_itr->source_cluster = infos->cluster; + ot_itr->x_offset = positions->x_offset; + ot_itr->y_offset = positions->y_offset; + gl_itr->index = infos->codepoint; + adv = positions->x_advance; + + pen_x += adv; + gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x); + + ot_itr++; + gl_itr++; + infos++; + positions++; + } + + hb_buffer_destroy(buffer); + evas_common_font_int_use_trim(); + + return EINA_FALSE; +} + +#endif + diff --git a/libraries/evas/src/lib/engines/common/evas_font_ot.h b/libraries/evas/src/lib/engines/common/evas_font_ot.h new file mode 100644 index 0000000..bc5ab02 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_font_ot.h @@ -0,0 +1,45 @@ +#ifndef _EVAS_FONT_OT_H +# define _EVAS_FONT_OT_H + +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif + +# ifdef HAVE_HARFBUZZ +# define OT_SUPPORT +# define USE_HARFBUZZ +# endif + +# ifdef OT_SUPPORT +# include +typedef struct _Evas_Font_OT_Info Evas_Font_OT_Info; +# else +typedef void *Evas_Font_OT_Info; +# endif + +# include "Evas.h" + +# ifdef OT_SUPPORT +struct _Evas_Font_OT_Info +{ + size_t source_cluster; + Evas_Coord x_offset; + Evas_Coord y_offset; +}; +# endif + +# ifdef OT_SUPPORT +# define EVAS_FONT_OT_X_OFF_GET(a) ((a).x_offset) +# define EVAS_FONT_OT_Y_OFF_GET(a) ((a).y_offset) +# define EVAS_FONT_OT_POS_GET(a) ((a).source_cluster) +# endif + +# include "evas_text_utils.h" +EAPI int +evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index); + +EAPI Eina_Bool +evas_common_font_ot_populate_text_props(const Eina_Unicode *text, + Evas_Text_Props *props, int len); +#endif + diff --git a/libraries/evas/src/lib/engines/common/evas_font_private.h b/libraries/evas/src/lib/engines/common/evas_font_private.h new file mode 100644 index 0000000..eed3faf --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_font_private.h @@ -0,0 +1,52 @@ +#ifndef _EVAS_FONT_PRIVATE_H +# define _EVAS_FONT_PRIVATE_H +#include "evas_font_ot.h" + +#ifdef BUILD_PTHREAD +extern LK(lock_font_draw); // for freetype2 API calls +extern LK(lock_bidi); // for fribidi API calls +extern LK(lock_ot); // for harfbuzz calls +#endif + +# if defined(EVAS_FRAME_QUEUING) || defined(BUILD_PIPE_RENDER) +# define FTLOCK() LKL(lock_font_draw) +# define FTUNLOCK() LKU(lock_font_draw) + +# define BIDILOCK() LKL(lock_bidi) +# define BIDIUNLOCK() LKU(lock_bidi) + +# define OTLOCK() LKL(lock_ot) +# define OTUNLOCK() LKU(lock_ot) +# else +# define FTLOCK(x) +# define FTUNLOCK(x) + +# define BIDILOCK() +# define BIDIUNLOCK() + +/* Macros for text walking */ +# define OTLOCK() +# define OTUNLOCK() +# endif + +void evas_common_font_source_unload(RGBA_Font_Source *fs); +void evas_common_font_source_reload(RGBA_Font_Source *fs); + +void evas_common_font_int_promote(RGBA_Font_Int *fi); +void evas_common_font_int_use_increase(int size); +void evas_common_font_int_use_trim(void); +void evas_common_font_int_unload(RGBA_Font_Int *fi); +void evas_common_font_int_reload(RGBA_Font_Int *fi); + +/* 6th bit is on is the same as frac part >= 0.5 */ +# define EVAS_FONT_ROUND_26_6_TO_INT(x) \ + (((x + 0x20) & -0x40) >> 6) + +# define EVAS_FONT_CHARACTER_IS_INVISIBLE(x) ( \ + ((0x200C <= (x)) && ((x) <= 0x200D)) || /* ZWNJ..ZWH */ \ + ((0x200E <= (x)) && ((x) <= 0x200F)) || /* BIDI stuff */ \ + ((0x202A <= (x)) && ((x) <= 0x202E)) /* BIDI stuff */ \ + ) + +# include "evas_font_default_walk.x" +#endif /* !_EVAS_FONT_PRIVATE_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_font_query.c b/libraries/evas/src/lib/engines/common/evas_font_query.c new file mode 100644 index 0000000..af2cc84 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_font_query.c @@ -0,0 +1,789 @@ +#include "evas_common.h" +#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */ +#include "evas_font_private.h" /* for Frame-Queuing support */ +#include "evas_font_ot.h" + + +/* FIXME: Check coverage according to the font and not by actually loading */ +/** + * @internal + * Find the end of a run according to font coverage, and return the base script + * font and the current wanted font. + * + * @param[in] fn the font to use. + * @param script_fi The base font instance to be used with the script. If NULL, then it's calculated and returned in this variable, if not NULL, it's used and not modified. + * @param[out] cur_fi The font instance found for the current run. + * @param[in] script the base script + * @param[in] text the text to work on. + * @param[in] run_let the current run len, i.e "search limit". + * @return length of the run found. + */ +EAPI int +evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len) +{ + RGBA_Font_Int *fi = NULL; + const Eina_Unicode *run_end = text + run_len; + const Eina_Unicode *itr; + + /* If there's no current script_fi, find it first */ + if (!*script_fi) + { + const Eina_Unicode *base_char = NULL; + /* Skip common chars */ + for (base_char = text ; + (base_char < run_end) && + (evas_common_language_char_script_get(*base_char) != script) ; + base_char++) + ; + if (base_char == run_end) base_char = text; + + /* Find the first renderable char */ + while (base_char < run_end) + { + /* 0x1F is the last ASCII contral char, just a hack in + * the meanwhile. */ + if ((*base_char > 0x1F) && + evas_common_font_glyph_search(fn, &fi, *base_char)) + break; + base_char++; + } + + + /* If everything else fails, at least try to find a font for the + * replacement char */ + if (base_char == run_end) + evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR); + + if (!fi) + fi = fn->fonts->data; + + *script_fi = fi; + } + else + { + fi = *script_fi; + } + + /* Find the longest run of the same font starting from the start position + * and update cur_fi accordingly. */ + itr = text; + while (itr < run_end) + { + RGBA_Font_Int *tmp_fi; + /* Itr will end up being the first of the next run */ + for ( ; itr < run_end ; itr++) + { + /* 0x1F is the last ASCII contral char, just a hack in + * the meanwhile. */ + if (*itr <= 0x1F) + continue; + /* Break if either it's not in the font, or if it is in the + * script's font. */ + if (fi == *script_fi) + { + if (!evas_common_get_char_index(fi, *itr)) + break; + } + else + { + if (evas_common_get_char_index(*script_fi, *itr)) + break; + } + } + + /* Abort if we reached the end */ + if (itr == run_end) + break; + + /* If the script font doesn't fit even one char, find a new font. */ + if (itr == text) + { + /* If we can find a font, use it. Otherwise, find the first + * char the run of chars that can't be rendered until the first + * one that can. */ + if (evas_common_font_glyph_search(fn, &tmp_fi, *itr)) + { + fi = tmp_fi; + } + else + { + itr++; + /* Go through all the chars that can't be rendered with any + * font */ + for ( ; itr < run_end ; itr++) + { + tmp_fi = fi; + if (evas_common_get_char_index(fi, *itr) || + evas_common_font_glyph_search(fn, &tmp_fi, *itr)) + { + fi = tmp_fi; + break; + } + } + + /* If we found a renderable character and the found font + * can render the replacement char, continue, otherwise + * find a font most suitable for the replacement char and + * break */ + if ((itr == run_end) || + !evas_common_get_char_index(fi, REPLACEMENT_CHAR)) + { + evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR); + break; + } + } + itr++; + } + else + { + /* If this char is not renderable by any font, but the replacement + * char can be rendered using the currentfont, continue this + * run. */ + if (!evas_common_font_glyph_search(fn, &tmp_fi, *itr) && + evas_common_get_char_index(fi, REPLACEMENT_CHAR)) + { + itr++; + } + else + { + /* Done, we did as much as possible */ + break; + } + } + } + + if (fi) + *cur_fi = fi; + else + *cur_fi = *script_fi; + + return itr - text; +} + +/** + * @internal + * Calculate the kerning between "left" and "right. + * + * @param fi the font instance to use + * @param left the left glyph index + * @param right the right glyph index + * @param[out] kerning the kerning calculated. + * @return FALSE on error, TRUE on success. + */ +EAPI int +evas_common_font_query_kerning(RGBA_Font_Int *fi, FT_UInt left, FT_UInt right, + int *kerning) +{ + int *result; + FT_Vector delta; + int key[2]; + int error = 1; + + key[0] = left; + key[1] = right; + + result = eina_hash_find(fi->kerning, key); + if (result) + { + *kerning = result[2]; + goto on_correct; + } + + /* NOTE: ft2 seems to have a bug. and sometimes returns bizarre + * values to kern by - given same font, same size and same + * prev_index and index. auto/bytecode or none hinting doesn't + * matter */ + evas_common_font_int_reload(fi); + FTLOCK(); + if (FT_Get_Kerning(fi->src->ft.face, + key[0], key[1], + FT_KERNING_DEFAULT, &delta) == 0) + { + int *push; + + FTUNLOCK(); + *kerning = delta.x; + + push = malloc(sizeof (int) * 3); + if (!push) return 1; + + push[0] = key[0]; + push[1] = key[1]; + push[2] = *kerning; + + eina_hash_direct_add(fi->kerning, push, push); + + goto on_correct; + } + + FTUNLOCK(); + error = 0; + + on_correct: + return error; +} + +/** + * @internal + * Calculate the inset of the text. Inset is the difference between the pen + * position of the first char in the string, and the first pixel drawn. + * (can be negative). + * + * @param fn the font set to use. + * @param text_props the string object. + * @return the calculated inset. + */ +EAPI int +evas_common_font_query_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props) +{ + if (!text_props->len) return 0; + return text_props->info->glyph[text_props->start].x_bear; +} + +/** + * @internal + * Calculate the right inset of the text. This is the difference between the + * pen position of the glyph after the last glyph in the text, and the last + * pixel drawn in the text (essentially "advance - width" of the last char). + * + * @param fn the font set to use. + * @param text_props the string object. + * @return the calculated inset. + * + * @see evas_common_font_query_inset() + */ +EAPI int +evas_common_font_query_right_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props) +{ + const Evas_Font_Glyph_Info *gli; + if (!text_props->len) return 0; + gli = text_props->info->glyph + text_props->start + text_props->len - 1; + + /* If the last char is a whitespace, we use the advance as the size, + * so the right_inset is 0. */ + if (gli->width == 0) + return 0; + + return ((gli > text_props->info->glyph) ? + gli->pen_after - (gli - 1)->pen_after : gli->pen_after) - + (gli->width + gli->x_bear +#ifdef OT_SUPPORT + + EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET( + text_props->info->ot[text_props->start + text_props->len - 1])) +#endif + ); +} + +/** + * @internal + * Calculate the size of the string (width and height). + * The width is the disntance between the first pen position and the last pixel + * drawn. + * The height is the max ascent+descent of the font. + * + * @param fn the font set to use. + * @param text_props the string object. + * @param[out] w the calculated width + * @param[out] h the calculated height + */ +EAPI void +evas_common_font_query_size(RGBA_Font *fn, const Evas_Text_Props *text_props, int *w, int *h) +{ + Evas_Coord ret_w = 0; + + if (text_props->len > 0) + { + const Evas_Font_Glyph_Info *glyph = text_props->info->glyph + + text_props->start; + const Evas_Font_Glyph_Info *last_glyph = glyph; + + if (text_props->len > 1) + { + last_glyph += text_props->len - 1; + ret_w = last_glyph[-1].pen_after; + if (text_props->start > 0) + ret_w -= glyph[-1].pen_after; + } +#ifdef OT_SUPPORT + ret_w += EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET( + text_props->info->ot[text_props->start + text_props->len - 1])); +#endif + ret_w += last_glyph->width + last_glyph->x_bear; + } + + if (w) *w = ret_w; + if (h) *h = evas_common_font_max_ascent_get(fn) + evas_common_font_max_descent_get(fn); +} + +/** + * @internal + * Calculate the advance of the string. Advance is the distance between the + * first pen position and the pen position after the string. + * + * @param fn the font set to use. + * @param text_props the string object. + * @param[out] h_adv the calculated horizontal advance. + * @param[out] v_adv the calculated vertical advance. + */ +EAPI void +evas_common_font_query_advance(RGBA_Font *fn, const Evas_Text_Props *text_props, int *h_adv, int *v_adv) +{ + Evas_Coord ret_adv = 0; + if (text_props->len > 0) + { + const Evas_Font_Glyph_Info *glyph = text_props->info->glyph + + text_props->start; + ret_adv = glyph[text_props->len - 1].pen_after; + if (text_props->start > 0) + ret_adv -= glyph[-1].pen_after; + } + + if (h_adv) *h_adv = ret_adv; + if (v_adv) *v_adv = evas_common_font_get_line_advance(fn); +} + +/** + * @internal + * Query the coordinates of the char at position pos. If the position is at the + * end of the string (i.e where the finishing null would be) it returns the + * coordinates of the position right after the last char. This is either on + * the left or on the right of the string, depending on BiDi direction. Returned + * width in this case is 0. It returns the x of the leftmost pixel drawn. + * + * @param fn the font set to use. + * @param text_props the string object. + * @param pos the position of the char in the string object (not actual position in the string object, but the position of the source character). + * @param[out] cx the calculated x - CAN BE NULL + * @param[out] cy the calculated y - CAN BE NULL + * @param[out] cw the calculated width - CAN BE NULL + * @param[out] ch the calculated height - CAN BE NULL + * @return TRUE on success, FALSE otherwise. + * + * @see evas_common_font_query_pen_coords() + */ +EAPI int +evas_common_font_query_char_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch) +{ + int asc, desc; + size_t position = 0; + int ret_val = 0; + EVAS_FONT_WALK_TEXT_INIT(); + + asc = evas_common_font_max_ascent_get(fn); + desc = evas_common_font_max_descent_get(fn); + + position = pos; + /* If it's the null, choose location according to the direction. */ + if (position == text_props->text_len) + { + /* if it's rtl then the location is the left of the string, + * otherwise, the right. */ +#ifdef BIDI_SUPPORT + if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + if (cx) *cx = 0; + if (ch) *ch = asc + desc; + } + else +#endif + { + evas_common_font_query_advance(fn, text_props, cx, ch); + } + if (cy) *cy = 0; + if (cw) *cw = 0; + ret_val = 1; + goto end; + } + + Evas_Coord cluster_start = 0, last_end = 0; + int prev_cluster = -1; + int found = 0, items = 1, item_pos = 1; + int last_is_visible = 0; + EVAS_FONT_WALK_TEXT_START() + { + EVAS_FONT_WALK_TEXT_WORK(); + + if (prev_cluster != (int) EVAS_FONT_WALK_POS) + { + if (found) + { + break; + } + else + { + cluster_start = EVAS_FONT_WALK_PEN_X + + EVAS_FONT_WALK_X_OFF + + EVAS_FONT_WALK_X_BEAR; + } + } + last_is_visible = EVAS_FONT_WALK_IS_VISIBLE; + last_end = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + + EVAS_FONT_WALK_X_BEAR + EVAS_FONT_WALK_WIDTH; + /* we need to see if the char at the visual position is the char wanted */ + if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) && + (EVAS_FONT_WALK_POS <= (size_t) position) && + ((((size_t) position) < EVAS_FONT_WALK_POS_NEXT) || + (EVAS_FONT_WALK_IS_LAST))) + { + found = 1; +#ifdef OT_SUPPORT + items = evas_common_font_ot_cluster_size_get(text_props, + char_index); +#endif + item_pos = position - EVAS_FONT_WALK_POS + 1; + } + else if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) && + ((EVAS_FONT_WALK_POS_PREV > (size_t) position) || + (EVAS_FONT_WALK_IS_FIRST)) && + (((size_t) position) >= EVAS_FONT_WALK_POS)) + { + found = 1; +#ifdef OT_SUPPORT + items = evas_common_font_ot_cluster_size_get(text_props, + char_index); +#endif + item_pos = items - (position - EVAS_FONT_WALK_POS); + } + + prev_cluster = EVAS_FONT_WALK_POS; + } + EVAS_FONT_WALK_TEXT_END(); + if (found) + { + Evas_Coord cluster_w; + cluster_w = last_end - cluster_start; + if (cy) *cy = -asc; + if (ch) *ch = asc + desc; + if (last_is_visible) + { + if (cx) *cx = cluster_start + + (cluster_w / items) * + (item_pos - 1); + if (cw) *cw = (cluster_w / items); + } + else + { + if (cx) *cx = cluster_start; + if (cw) *cw = 0; + } + ret_val = 1; + goto end; + } +end: + + return ret_val; +} + +/** + * @internal + * Query the coordinates of the char at position pos. If the position is at the + * end of the string (i.e where the finishing null would be) it returns the + * coordinates of the position right after the last char. This is either on + * the left or on the right of the string, depending on BiDi direction. Returned + * advance in this case is 0. + * + * This is the same as evas_common_font_query_char_coords() except that the + * advance of the character is returned instead of the width and the pen + * position is returned instead of the actual pixel position. + * + * @param fn the font set to use. + * @param text_props the string object. + * @param pos the position of the char in the string object (not actual position in the string object, but the position of the source character). + * @param[out] cpenx the calculated x - CAN BE NULL + * @param[out] cy the calculated y - CAN BE NULL + * @param[out] cadv the calculated advance - CAN BE NULL + * @param[out] ch the calculated height - CAN BE NULL + * @return TRUE on success, FALSE otherwise. + * + * @see evas_common_font_query_char_coords() + */ +EAPI int +evas_common_font_query_pen_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch) +{ + int asc, desc; + size_t position; + int ret_val = 0; + EVAS_FONT_WALK_TEXT_INIT(); + + asc = evas_common_font_max_ascent_get(fn); + desc = evas_common_font_max_descent_get(fn); + + position = pos; + /* If it's the null, choose location according to the direction. */ + if (position == text_props->text_len) + { + /* if it's rtl then the location is the left of the string, + * otherwise, the right. */ +#ifdef BIDI_SUPPORT + if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + if (cpen_x) *cpen_x = 0; + if (ch) *ch = asc + desc; + } + else +#endif + { + evas_common_font_query_advance(fn, text_props, cpen_x, ch); + } + if (cy) *cy = 0; + if (cadv) *cadv = 0; + ret_val = 1; + goto end; + } + Evas_Coord cluster_start = 0; + int prev_cluster = -1; + int found = 0, items = 1, item_pos = 1; + int last_is_visible = 0; + EVAS_FONT_WALK_TEXT_START() + { + EVAS_FONT_WALK_TEXT_WORK(); + + if (prev_cluster != (int) EVAS_FONT_WALK_POS) + { + if (found) + { + break; + } + else + { + cluster_start = EVAS_FONT_WALK_PEN_X; + } + } + last_is_visible = EVAS_FONT_WALK_IS_VISIBLE; + + if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) && + (EVAS_FONT_WALK_POS <= (size_t) position) && + ((((size_t) position) < EVAS_FONT_WALK_POS_NEXT) || + (EVAS_FONT_WALK_IS_LAST))) + { + found = 1; +#ifdef OT_SUPPORT + items = evas_common_font_ot_cluster_size_get(text_props, + char_index); +#endif + item_pos = position - EVAS_FONT_WALK_POS + 1; + } + else if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) && + ((EVAS_FONT_WALK_POS_PREV > (size_t) position) || + (EVAS_FONT_WALK_IS_FIRST)) && + (((size_t) position) >= EVAS_FONT_WALK_POS)) + { + found = 1; +#ifdef OT_SUPPORT + items = evas_common_font_ot_cluster_size_get(text_props, + char_index); +#endif + item_pos = items - (position - EVAS_FONT_WALK_POS); + } + + prev_cluster = EVAS_FONT_WALK_POS; + } + EVAS_FONT_WALK_TEXT_END(); + + if (found) + { + Evas_Coord cluster_adv; + cluster_adv = EVAS_FONT_WALK_PEN_X - cluster_start; + if (cy) *cy = -asc; + if (ch) *ch = asc + desc; + if (last_is_visible) + { + if (cpen_x) *cpen_x = cluster_start + + (cluster_adv / items) * + (item_pos - 1); + if (cadv) *cadv = (cluster_adv / items); + } + else + { + if (cpen_x) *cpen_x = EVAS_FONT_WALK_PEN_X; + if (cadv) *cadv = 0; + } + ret_val = 1; + goto end; + } +end: + + return ret_val; +} + +/** + * @internal + * Find the character at a specific x, y coordinates and return it's position + * in the text (not in the text object, but in the source text). Also calculate + * the char's geometry. + * + * @param fn the font set to use. + * @param text_props the string object. + * @param x the x to look at. + * @param y the y to look at. + * @param[out] cx the calculated x - CAN BE NULL + * @param[out] cy the calculated y - CAN BE NULL + * @param[out] cw the calculated width - CAN BE NULL + * @param[out] ch the calculated height - CAN BE NULL + * @return the position found, -1 on failure. + */ +EAPI int +evas_common_font_query_char_at_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) +{ + int asc, desc; + int ret_val = -1; + EVAS_FONT_WALK_TEXT_INIT(); + + asc = evas_common_font_max_ascent_get(fn); + desc = evas_common_font_max_descent_get(fn); + Evas_Coord cluster_start = 0; + int prev_cluster = -1; + int found = 0, items = 1; + EVAS_FONT_WALK_TEXT_START() + { + EVAS_FONT_WALK_TEXT_WORK(); + if (prev_cluster != (int) EVAS_FONT_WALK_POS) + { + if (found) + { + break; + } + else + { + cluster_start = EVAS_FONT_WALK_PEN_X; + } + } + + if (!EVAS_FONT_WALK_IS_VISIBLE) continue; + + /* we need to see if the char at the visual position is the char, + * we check that by checking if it's before the current pen + * position and the next */ + if ((x >= EVAS_FONT_WALK_PEN_X) && + (x <= (EVAS_FONT_WALK_PEN_X_AFTER)) && (y >= -asc) && (y <= desc)) + { +#ifdef OT_SUPPORT + items = evas_common_font_ot_cluster_size_get(text_props, + char_index); +#endif + found = 1; + } + + prev_cluster = EVAS_FONT_WALK_POS; + } + EVAS_FONT_WALK_TEXT_END(); + if (found) + { + int item_pos; + Evas_Coord cluster_adv; + cluster_adv = EVAS_FONT_WALK_PEN_X - cluster_start; + + if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) + { + double part; + part = cluster_adv / items; + item_pos = (int) ((x - cluster_start) / part); + } + else + { + double part; + part = cluster_adv / items; + item_pos = items - ((int) ((x - cluster_start) / part)) - 1; + } + if (cx) *cx = EVAS_FONT_WALK_PEN_X + + ((cluster_adv / items) * (item_pos - 1)); + if (cy) *cy = -asc; + if (cw) *cw = (cluster_adv / items); + if (ch) *ch = asc + desc; + ret_val = prev_cluster + item_pos; + goto end; + } +end: + + return ret_val; +} + +/** + * @internal + * Find one after the last character that fits until the boundaries set by x + * and y. I.e find the first char that doesn't fit. + * This LOGICALLY walks the string. This is needed for wrapping for example + * where we want the first part to be the first logical part. + * + * @param fn the font set to use. + * @param text_props the string object. + * @param x the x boundary. + * @param y the y boundary. + * @return the position found, -1 on failure. + */ +EAPI int +evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y) +{ + int asc, desc; + int ret=-1; + + asc = evas_common_font_max_ascent_get(fn); + desc = evas_common_font_max_descent_get(fn); + +#ifdef BIDI_SUPPORT + if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + Evas_Font_Glyph_Info *gli = NULL; + Evas_Coord full_adv = 0, pen_x = 0, start_pen = 0; + int i; + + if ((text_props->info) && (text_props->len > 0)) + { + gli = text_props->info->glyph + text_props->start; + full_adv = gli[text_props->len - 1].pen_after; + if (text_props->start > 0) + { + start_pen = gli[-1].pen_after; + full_adv -= start_pen; + } + + gli += text_props->len - 1; + + for (i = text_props->len - 1 ; i >= 0 ; i--, gli--) + { + pen_x = full_adv - (gli->pen_after - start_pen); + /* If invisible, skip */ + if (gli->index == 0) continue; + if ((x >= pen_x) && + (((i == 0) && (x <= full_adv)) || + (x <= (full_adv - (gli[-1].pen_after - start_pen)))) && + (y >= -asc) && (y <= desc)) + { +#ifdef OT_SUPPORT + ret = EVAS_FONT_OT_POS_GET( + text_props->info->ot[text_props->start + i]) - + text_props->text_offset; +#else + ret = text_props->text_len - i - 1; +#endif + goto end; + } + } + } + } + else +#endif + { + EVAS_FONT_WALK_TEXT_INIT(); + /* When text is not rtl, visual direction = logical direction */ + EVAS_FONT_WALK_TEXT_START() + { + EVAS_FONT_WALK_TEXT_WORK(); + if (!EVAS_FONT_WALK_IS_VISIBLE) continue; + + if ((x >= EVAS_FONT_WALK_PEN_X) && + (x <= (EVAS_FONT_WALK_PEN_X_AFTER)) && + (y >= -asc) && (y <= desc)) + { + ret = EVAS_FONT_WALK_POS; + goto end; + } + } + EVAS_FONT_WALK_TEXT_END(); + } + +end: + + return ret; +} + diff --git a/libraries/evas/src/lib/engines/common/evas_image.h b/libraries/evas/src/lib/engines/common/evas_image.h new file mode 100644 index 0000000..300697c --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_image.h @@ -0,0 +1,63 @@ +#ifndef _EVAS_IMAGE_H +#define _EVAS_IMAGE_H + + +EAPI void evas_common_image_init (void); +EAPI void evas_common_image_shutdown (void); + +EAPI void evas_common_image_image_all_unload (void); + +EAPI void evas_common_rgba_image_free (Image_Entry *ie); +EAPI void evas_common_rgba_image_unload (Image_Entry *ie); +EAPI void evas_common_image_colorspace_normalize (RGBA_Image *im); +EAPI void evas_common_image_colorspace_dirty (RGBA_Image *im); +EAPI void evas_common_image_cache_free (void); /*2*/ +EAPI void evas_common_image_premul (Image_Entry *ie); /*2*/ +EAPI void evas_common_image_set_alpha_sparse (Image_Entry *ie); /*2*/ +/* EAPI RGBA_Image *evas_common_image_alpha_create (int w, int h); */ +/* EAPI RGBA_Image *evas_common_image_create (int w, int h); */ +EAPI RGBA_Image *evas_common_image_new (unsigned int w, unsigned int h, unsigned int alpha); +EAPI Evas_Cache_Image *evas_common_image_cache_get (void); + +EAPI void evas_common_image_set_cache (unsigned int size); +EAPI int evas_common_image_get_cache (void); + +EAPI RGBA_Image *evas_common_image_line_buffer_obtain (int len); +EAPI void evas_common_image_line_buffer_release (RGBA_Image *im); + +EAPI RGBA_Image *evas_common_image_alpha_line_buffer_obtain (int len); +EAPI void evas_common_image_alpha_line_buffer_release (RGBA_Image *im); +EAPI void evas_common_image_alpha_line_buffer_free (RGBA_Image *im); + +EAPI RGBA_Image *evas_common_load_image_from_file (const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); +EAPI int evas_common_save_image_to_file (RGBA_Image *im, const char *file, const char *key, int quality, int compress); + +EAPI void evas_common_rgba_image_scalecache_size_set(unsigned int size); +EAPI unsigned int evas_common_rgba_image_scalecache_size_get(void); +EAPI void evas_common_rgba_image_scalecache_flush(void); +EAPI void evas_common_rgba_image_scalecache_dump(void); +EAPI void + evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst, + RGBA_Draw_Context *dc, int smooth, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h); +EAPI void + evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst, + RGBA_Draw_Context *dc, int smooth, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h); + + +EAPI int evas_common_load_rgba_image_module_from_file (Image_Entry *im); +EAPI int evas_common_load_rgba_image_data_from_file (Image_Entry *im); +EAPI double evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *im, int start_frame, int frame_num); + +void _evas_common_rgba_image_post_surface(Image_Entry *ie); + +EAPI Eina_Bool evas_common_extension_can_load_get(const char *file); + +#endif /* _EVAS_IMAGE_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_image_data.c b/libraries/evas/src/lib/engines/common/evas_image_data.c new file mode 100644 index 0000000..10b3988 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_image_data.c @@ -0,0 +1,147 @@ +#include + +#include "evas_common.h" +#include "evas_private.h" +#include "evas_image.h" + +int +evas_common_rgba_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + RGBA_Image *dst = (RGBA_Image *) ie_dst; + + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + dst->cache_entry.w = w; + dst->cache_entry.h = h; + dst->image.data = image_data; + dst->image.no_free = 1; + dst->cache_entry.flags.alpha = alpha ? 1 : 0; + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + w &= ~0x1; + dst->cache_entry.w = w; + dst->cache_entry.h = h; + dst->cs.data = image_data; + dst->cs.no_free = 1; + break; + default: + abort(); + break; + } + dst->cache_entry.space = cspace; + evas_common_image_colorspace_dirty(dst); + _evas_common_rgba_image_post_surface(ie_dst); + return 0; +} + +int +evas_common_rgba_image_from_copied_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + RGBA_Image *dst = (RGBA_Image *) ie_dst; + + /* FIXME: Is dst->image.data valid. */ + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + dst->cache_entry.flags.alpha = alpha ? 1 : 0; + if (image_data) + memcpy(dst->image.data, image_data, w * h * sizeof(DATA32)); + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char*) * 2); + if (image_data && (dst->cs.data)) + memcpy(dst->cs.data, image_data, dst->cache_entry.h * sizeof(unsigned char*) * 2); + break; + default: + abort(); + break; + } + + dst->cache_entry.space = cspace; + evas_common_image_colorspace_dirty(dst); + _evas_common_rgba_image_post_surface(ie_dst); + return 0; +} + +int +evas_common_rgba_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h __UNUSED__) +{ + RGBA_Image *dst = (RGBA_Image *) ie_dst; + RGBA_Image *im = (RGBA_Image *) ie_im; + + if ((im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P601_PL) || + (im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P709_PL) || + (im->cache_entry.space == EVAS_COLORSPACE_YCBCR422601_PL) || + (im->cache_entry.space == EVAS_COLORSPACE_YCBCR420TM12601_PL) || + (im->cache_entry.space == EVAS_COLORSPACE_YCBCR420NV12601_PL)) + { + w &= ~0x1; + dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2); + } + + dst->flags = im->flags; + dst->cs.no_free = 0; + evas_common_image_colorspace_dirty(dst); + + _evas_common_rgba_image_post_surface(ie_dst); + return 0; +} + +int +evas_common_rgba_image_colorspace_set(Image_Entry* ie_dst, int cspace) +{ + RGBA_Image *dst = (RGBA_Image *) ie_dst; + + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + if (dst->cs.data) + { + if (!dst->cs.no_free) free(dst->cs.data); + dst->cs.data = NULL; + dst->cs.no_free = 0; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + if (dst->image.no_free) + { + ie_dst->allocated.w = 0; + ie_dst->allocated.h = 0; +#ifdef BUILD_ASYNC_PRELOAD + ie_dst->flags.preload_done = 0; +#endif + ie_dst->flags.loaded = 0; + dst->image.data = NULL; + dst->image.no_free = 0; + /* FIXME: Must allocate image.data surface cleanly. */ + } + if (dst->cs.data) + { + if (!dst->cs.no_free) free(dst->cs.data); + } + dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2); + dst->cs.no_free = 0; + break; + default: + abort(); + break; + } + dst->cache_entry.space = cspace; + evas_common_image_colorspace_dirty(dst); + + _evas_common_rgba_image_post_surface(ie_dst); + return 0; +} diff --git a/libraries/evas/src/lib/engines/common/evas_image_load.c b/libraries/evas/src/lib/engines/common/evas_image_load.c new file mode 100644 index 0000000..c7eff3f --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_image_load.c @@ -0,0 +1,381 @@ +#include +#include +#include + +#include "evas_common.h" +#include "evas_private.h" +#include "evas_cs.h" + +struct ext_loader_s +{ + unsigned int length; + const char *extension; + const char *loader; +}; + +#define MATCHING(Ext, Module) \ + { sizeof (Ext), Ext, Module } + +static const struct ext_loader_s loaders[] = +{ /* map extensions to loaders to use for good first-guess tries */ + MATCHING(".png", "png"), + MATCHING(".jpg", "jpeg"), + MATCHING(".jpeg", "jpeg"), + MATCHING(".jfif", "jpeg"), + MATCHING(".eet", "eet"), + MATCHING(".edj", "eet"), + MATCHING(".eap", "eet"), + MATCHING(".edb", "edb"), + MATCHING(".xpm", "xpm"), + MATCHING(".tiff", "tiff"), + MATCHING(".tif", "tiff"), + MATCHING(".svg", "svg"), + MATCHING(".svgz", "svg"), + MATCHING(".svg.gz", "svg"), + MATCHING(".gif", "gif"), + MATCHING(".pbm", "pmaps"), + MATCHING(".pgm", "pmaps"), + MATCHING(".ppm", "pmaps"), + MATCHING(".pnm", "pmaps"), + MATCHING(".bmp", "bmp"), + MATCHING(".tga", "tga"), + MATCHING(".wbmp", "wbmp"), + MATCHING(".ico", "ico"), + MATCHING(".cur", "ico"), + MATCHING(".psd", "psd"), + MATCHING(".pdf", "generic"), + MATCHING(".ps", "generic"), + MATCHING(".xcf", "generic"), + MATCHING(".xcf.gz", "generic"), + /* RAW */ + MATCHING(".arw", "generic"), + MATCHING(".cr2", "generic"), + MATCHING(".crw", "generic"), + MATCHING(".dcr", "generic"), + MATCHING(".dng", "generic"), + MATCHING(".k25", "generic"), + MATCHING(".kdc", "generic"), + MATCHING(".erf", "generic"), + MATCHING(".mrw", "generic"), + MATCHING(".nef", "generic"), + MATCHING(".nrf", "generic"), + MATCHING(".nrw", "generic"), + MATCHING(".orf", "generic"), + MATCHING(".raw", "generic"), + MATCHING(".rw2", "generic"), + MATCHING(".pef", "generic"), + MATCHING(".raf", "generic"), + MATCHING(".sr2", "generic"), + MATCHING(".srf", "generic"), + MATCHING(".x3f", "generic"), + /* video */ + MATCHING(".264", "generic"), + MATCHING(".3g2", "generic"), + MATCHING(".3gp", "generic"), + MATCHING(".3gp2", "generic"), + MATCHING(".3gpp", "generic"), + MATCHING(".3gpp2", "generic"), + MATCHING(".3p2", "generic"), + MATCHING(".asf", "generic"), + MATCHING(".avi", "generic"), + MATCHING(".bdm", "generic"), + MATCHING(".bdmv", "generic"), + MATCHING(".clpi", "generic"), + MATCHING(".clp", "generic"), + MATCHING(".fla", "generic"), + MATCHING(".flv", "generic"), + MATCHING(".m1v", "generic"), + MATCHING(".m2v", "generic"), + MATCHING(".m2t", "generic"), + MATCHING(".m4v", "generic"), + MATCHING(".mkv", "generic"), + MATCHING(".mov", "generic"), + MATCHING(".mp2", "generic"), + MATCHING(".mp2ts", "generic"), + MATCHING(".mp4", "generic"), + MATCHING(".mpe", "generic"), + MATCHING(".mpeg", "generic"), + MATCHING(".mpg", "generic"), + MATCHING(".mpl", "generic"), + MATCHING(".mpls", "generic"), + MATCHING(".mts", "generic"), + MATCHING(".mxf", "generic"), + MATCHING(".nut", "generic"), + MATCHING(".nuv", "generic"), + MATCHING(".ogg", "generic"), + MATCHING(".ogm", "generic"), + MATCHING(".ogv", "generic"), + MATCHING(".rm", "generic"), + MATCHING(".rmj", "generic"), + MATCHING(".rmm", "generic"), + MATCHING(".rms", "generic"), + MATCHING(".rmx", "generic"), + MATCHING(".rmvb", "generic"), + MATCHING(".swf", "generic"), + MATCHING(".ts", "generic"), + MATCHING(".weba", "generic"), + MATCHING(".webm", "generic"), + MATCHING(".wmv", "generic") +}; + +static const char *loaders_name[] = +{ /* in order of most likely needed */ + "png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "pmaps", "bmp", "tga", "wbmp", "ico", "psd", "edb", "generic" +}; + +struct evas_image_foreach_loader_data +{ + Image_Entry *ie; + int *error; + Evas_Module *em; +}; + + +static Eina_Bool +_evas_image_foreach_loader(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata) +{ + Evas_Image_Load_Func *evas_image_load_func = NULL; + Evas_Module *em = data; + struct evas_image_foreach_loader_data *d = fdata; + Image_Entry *ie = d->ie; + + if (!evas_module_load(em)) return EINA_TRUE; + evas_image_load_func = em->functions; + evas_module_use(em); + *(d->error) = EVAS_LOAD_ERROR_NONE; + if (evas_image_load_func && + evas_image_load_func->file_head(ie, ie->file, ie->key, d->error) && + (*(d->error) == EVAS_LOAD_ERROR_NONE)) + { + d->em = em; + return EINA_FALSE; + } + + return EINA_TRUE; +} + +EAPI int +evas_common_load_rgba_image_module_from_file(Image_Entry *ie) +{ + Evas_Image_Load_Func *evas_image_load_func = NULL; + const char *loader = NULL, *end; + Evas_Module *em; + struct stat st; + unsigned int i; + int len, ret = EVAS_LOAD_ERROR_NONE; + struct evas_image_foreach_loader_data fdata; + + +#ifdef EVAS_CSERVE + if (evas_cserve_use_get()) + { + // TODO: handle errors from server and return them? + DBG("try cserve '%s' '%s'", ie->file, ie->key ? ie->key : ""); + if (evas_cserve_image_load(ie, ie->file, ie->key, &(ie->load_opts))) + { + DBG("try cserve '%s' '%s' loaded!", + ie->file, ie->key ? ie->key : ""); + return EVAS_LOAD_ERROR_NONE; + } + } +#endif + if (stat(ie->file, &st) != 0 || S_ISDIR(st.st_mode)) + { + DBG("trying to open directory '%s' !", ie->file); + return EVAS_LOAD_ERROR_DOES_NOT_EXIST; + } + + len = strlen(ie->file); + end = ie->file + len; + for (i = 0; i < (sizeof (loaders) / sizeof(struct ext_loader_s)); i++) + { + int len2 = strlen(loaders[i].extension); + if (len2 > len) continue; + if (!strcasecmp(end - len2, loaders[i].extension)) + { + loader = loaders[i].loader; + DBG("known loader '%s' handles extension '%s' of file '%s'", + loader, end - len2, ie->file); + break; + } + } + + if (loader) + { + em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_LOADER, loader); + if (em) + { + DBG("found image loader '%s' (%p)", loader, em); + if (evas_module_load(em)) + { + evas_module_use(em); + evas_image_load_func = em->functions; + ret = EVAS_LOAD_ERROR_NONE; + if (evas_image_load_func->file_head(ie, ie->file, ie->key, &ret)) + { + DBG("loaded file head using module '%s' (%p): %s", + loader, em, ie->file); + goto end; + } + evas_module_unload(em); + INF("failed to load file head using module '%s' (%p): " + "%s (%s)", + loader, em, ie->file, evas_load_error_str(ret)); + } + else + WRN("failed to load module '%s' (%p)", loader, em); + } + else + INF("image loader '%s' is not enabled or missing!", loader); + } + + fdata.ie = ie; + fdata.error = &ret; + fdata.em = NULL; + ret = EVAS_LOAD_ERROR_NONE; + evas_module_foreach_image_loader(_evas_image_foreach_loader, &fdata); + em = fdata.em; + evas_image_load_func = em ? em->functions : NULL; + if (em) goto end; + + /* This is our last chance, try all known image loader. */ + /* FIXME: We could use eina recursive module search ability. */ + for (i = 0; i < sizeof (loaders_name) / sizeof (char *); i++) + { + em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_LOADER, loaders_name[i]); + if (em) + { + if (evas_module_load(em)) + { + evas_module_use(em); + evas_image_load_func = em->functions; + ret = EVAS_LOAD_ERROR_NONE; + if (evas_image_load_func->file_head(ie, ie->file, ie->key, &ret)) + { + DBG("brute force loader '%s' (%p) worked on %s", + loaders_name[i], em, ie->file); + goto end; + } + else + INF("brute force loader '%s' (%p) failed on %s (%s)", + loaders_name[i], em, ie->file, + evas_load_error_str(ret)); + + evas_module_unload(em); + } + else + INF("failed to load module '%s' (%p)", loaders_name[i], em); + } + else + DBG("could not find module '%s'", loaders_name[i]); + } + + INF("exhausted all means to load image '%s'", ie->file); + return EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + + end: + + if (ret != EVAS_LOAD_ERROR_NONE) + { + const char *modname = NULL; + int modversion = -1; + if (em && em->definition) + { + modname = em->definition->name; + modversion = em->definition->version; + } + WRN("loader '%s' (version %d) " + "handled file '%s', key '%s' with errors: %s", + modname ? modname : "", modversion, + ie->file, ie->key ? ie->key : "", + evas_load_error_str(ret)); + goto end; + } + + DBG("loader '%s' used for file %s", + (em && em->definition && em->definition->name) ? + em->definition->name : "", + ie->file); + + ie->info.module = (void*) em; + ie->info.loader = (void*) evas_image_load_func; + evas_module_ref((Evas_Module*) ie->info.module); + return ret; +} + +EAPI int +evas_common_load_rgba_image_data_from_file(Image_Entry *ie) +{ + Evas_Image_Load_Func *evas_image_load_func = NULL; + int ret = EVAS_LOAD_ERROR_NONE; + + if ((ie->flags.loaded) && (!ie->flags.animated)) return EVAS_LOAD_ERROR_GENERIC; + +#ifdef EVAS_CSERVE + if (ie->data1) + { + if (evas_cserve_image_data_load(ie)) + { + RGBA_Image *im = (RGBA_Image *)ie; + Mem *mem = ie->data2; + if (mem) + { + im->image.data = (void*) (mem->data + mem->offset); + im->image.no_free = 1; + return EVAS_LOAD_ERROR_NONE; + } + } + return EVAS_LOAD_ERROR_GENERIC; + } +#endif + + if (!ie->info.module) return EVAS_LOAD_ERROR_GENERIC; + +// printf("load data [%p] %s %s\n", ie, ie->file, ie->key); + + evas_image_load_func = ie->info.loader; + evas_module_use((Evas_Module*) ie->info.module); + if (!evas_image_load_func->file_data(ie, ie->file, ie->key, &ret)) + { + return ret; + } + +// evas_module_unref((Evas_Module*) ie->info.module); +// ie->info.module = NULL; + + return EVAS_LOAD_ERROR_NONE; +} + +EAPI double +evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *ie, const int start, const int frame_num) +{ + Evas_Image_Load_Func *evas_image_load_func = NULL; + + if (!ie->info.module) return -1; + + evas_image_load_func = ie->info.loader; + evas_module_use((Evas_Module*) ie->info.module); + if (evas_image_load_func->frame_duration) + return evas_image_load_func->frame_duration(ie, ie->file, start, frame_num); + return -1; +} + +EAPI Eina_Bool +evas_common_extension_can_load_get(const char *file) +{ + unsigned int length; + unsigned int i; + + length = eina_stringshare_strlen(file) + 1; + if (length < 5) return EINA_FALSE; + + for (i = 0; i < sizeof (loaders) / sizeof (struct ext_loader_s); ++i) + { + if (loaders[i].length > length) continue; + + if (!strcasecmp(loaders[i].extension, file + length - loaders[i].length)) + return EINA_TRUE; + } + + return EINA_FALSE; +} diff --git a/libraries/evas/src/lib/engines/common/evas_image_main.c b/libraries/evas/src/lib/engines/common/evas_image_main.c new file mode 100644 index 0000000..d4d847c --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_image_main.c @@ -0,0 +1,818 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" /* so that EAPI in Eet.h is correctly defined */ +#endif + +#ifdef BUILD_LOADER_EET +# include +#endif + +#include "evas_common.h" +#include "evas_private.h" +#include "evas_image_private.h" +#include "evas_convert_yuv.h" +#include "evas_cs.h" + +#ifdef HAVE_VALGRIND +# include +#endif + +static Evas_Cache_Image * eci = NULL; +static int reference = 0; + +/* static RGBA_Image *evas_rgba_line_buffer = NULL; */ + +#define EVAS_RGBA_LINE_BUFFER_MIN_LEN 256 +#define EVAS_RGBA_LINE_BUFFER_MAX_LEN 2048 + +/* static RGBA_Image *evas_alpha_line_buffer = NULL; */ + +#define EVAS_ALPHA_LINE_BUFFER_MIN_LEN 256 +#define EVAS_ALPHA_LINE_BUFFER_MAX_LEN 2048 + + +static Image_Entry *_evas_common_rgba_image_new(void); +static void _evas_common_rgba_image_delete(Image_Entry *ie); + +static int _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h); +static void _evas_common_rgba_image_surface_delete(Image_Entry *ie); +static DATA32 *_evas_common_rgba_image_surface_pixels(Image_Entry *ie); + +static void _evas_common_rgba_image_unload(Image_Entry *im); + +static void _evas_common_rgba_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); + +static int _evas_common_rgba_image_ram_usage(Image_Entry *ie); + +/* Only called when references > 0. Need to provide a fresh copie of im. */ +/* The destination surface does have a surface, but no allocated pixel data. */ +static int _evas_common_rgba_image_dirty(Image_Entry* dst, const Image_Entry* src); + +#if 0 +static void +_evas_common_rgba_image_debug(const char* context, Image_Entry *eim) +{ + DBG("%p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); +} +#endif + +static const Evas_Cache_Image_Func _evas_common_image_func = +{ + _evas_common_rgba_image_new, + _evas_common_rgba_image_delete, + _evas_common_rgba_image_surface_alloc, + _evas_common_rgba_image_surface_delete, + _evas_common_rgba_image_surface_pixels, + evas_common_load_rgba_image_module_from_file, + _evas_common_rgba_image_unload, + _evas_common_rgba_image_dirty_region, + _evas_common_rgba_image_dirty, + evas_common_rgba_image_size_set, + evas_common_rgba_image_from_copied_data, + evas_common_rgba_image_from_data, + evas_common_rgba_image_colorspace_set, + evas_common_load_rgba_image_data_from_file, + _evas_common_rgba_image_ram_usage, +/* _evas_common_rgba_image_debug */ + NULL +}; + +EAPI void +evas_common_image_init(void) +{ + if (!eci) + eci = evas_cache_image_init(&_evas_common_image_func); + reference++; +//// ERR("REF++=%i", reference); + +#ifdef BUILD_LOADER_EET + eet_init(); +#endif + evas_common_scalecache_init(); +} + +EAPI void +evas_common_image_shutdown(void) +{ + if (--reference == 0) + { +//// printf("REF--=%i\n", reference); +// DISABLE for now - something wrong with cache shutdown freeing things +// still in use - rage_thumb segv's now. +// +// actually - i think i see it. cache ref goes to 0 (and thus gets freed) +// because in eng_setup() when a buffer changes size it is FIRST freed +// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately +// where it should stay at 1. - see evas_engine.c in the buffer enigne for +// example. eng_output_free() is called BEFORE _output_setup(). although this +// is only a SIGNE of the problem. we can patch this up with either freeing +// after the setup (so we just pt a ref of 2 then back to 1), or just +// evas_common_image_init() at the start and evas_common_image_shutdown() +// after it all. really ref 0 should only be reached when no more canvases +// with no more objects exist anywhere. + +// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009. + evas_cache_image_shutdown(eci); + eci = NULL; + } + +#ifdef BUILD_LOADER_EET + eet_shutdown(); +#endif + evas_common_scalecache_shutdown(); +} + +EAPI void +evas_common_image_image_all_unload(void) +{ + evas_common_rgba_image_scalecache_dump(); + evas_cache_image_unload_all(eci); +} + +static Image_Entry * +_evas_common_rgba_image_new(void) +{ + RGBA_Image *im; + + im = calloc(1, sizeof(RGBA_Image)); + if (!im) return NULL; + im->flags = RGBA_IMAGE_NOTHING; + im->ref = 1; +#ifdef EVAS_FRAME_QUEUING + LKI(im->cache_entry.ref_fq_add); + LKI(im->cache_entry.ref_fq_del); + eina_condition_new(&(im->cache_entry.cond_fq_del), + &(im->cache_entry.ref_fq_del)); +#endif + + evas_common_rgba_image_scalecache_init(&im->cache_entry); + + return &im->cache_entry; +} + +static void +_evas_common_rgba_image_delete(Image_Entry *ie) +{ + RGBA_Image *im = (RGBA_Image *)ie; + +#ifdef BUILD_PIPE_RENDER + evas_common_pipe_free(im); +# ifdef EVAS_FRAME_QUEUING + LKD(im->cache_entry.ref_fq_add); + LKD(im->cache_entry.ref_fq_del); + eina_condition_free(&(im->cache_entry.cond_fq_del)); +# endif +#endif + evas_common_rgba_image_scalecache_shutdown(&im->cache_entry); + if (ie->info.module) evas_module_unref((Evas_Module *)ie->info.module); + /* memset the image to 0x99 because i recently saw a segv where an + * seemed to be used BUT its contents were wrong - it looks like it was + * overwritten by something from efreet - as there was an execute command + * for a command there and some other signs - but to make sure, I am + * going to empty this struct out in case this happens again so i know + * that something else is overwritign this struct - or not */ +// memset(im, 0x99, sizeof(im)); +#ifdef EVAS_CSERVE + if (ie->data1) evas_cserve_image_free(ie); +#endif +/* + * FIXME: This doesn't seem to be needed... But I'm not sure why. + * -- nash + { + Filtered_Image *fi; + + EINA_LIST_FREE(im->filtered, fi) + { + free(fi->key); + _evas_common_rgba_image_delete((Image_Entry *)(fi->image)); + free(fi); + } + } +*/ + if (ie->frames) + { + Eina_List *l; + Image_Entry_Frame *frame; + EINA_LIST_FOREACH(ie->frames, l, frame) + { + if (frame) + { + if (frame->data) free(frame->data); + if (frame->info) free(frame->info); + free (frame); + } + } + } + free(im); +} + +EAPI void +evas_common_rgba_image_free(Image_Entry *ie) +{ + _evas_common_rgba_image_surface_delete(ie); + _evas_common_rgba_image_delete(ie); +} + +EAPI void +evas_common_rgba_image_unload(Image_Entry *ie) +{ + RGBA_Image *im = (RGBA_Image *) ie; + + if (!ie->flags.loaded) return; + if ((!ie->info.module) && (!ie->data1)) return; + if (!ie->file) return; + + ie->flags.loaded = 0; + + if ((im->cs.data) && (im->image.data)) + { + if (im->cs.data != im->image.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + } + else if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + im->cs.data = NULL; + +#ifdef EVAS_CSERVE + if (ie->data1) + { + evas_cserve_image_useless(ie); + im->image.data = NULL; + ie->allocated.w = 0; + ie->allocated.h = 0; + ie->flags.loaded = 0; +#ifdef BUILD_ASYNC_PRELOAD + ie->flags.preload_done = 0; +#endif + return; + } +#endif + + if (im->image.data && !im->image.no_free) + free(im->image.data); + im->image.data = NULL; + ie->allocated.w = 0; + ie->allocated.h = 0; + ie->flags.loaded = 0; +#ifdef BUILD_ASYNC_PRELOAD + ie->flags.preload_done = 0; +#endif +} + +void +_evas_common_rgba_image_post_surface(Image_Entry *ie) +{ +#ifdef HAVE_PIXMAN + RGBA_Image *im = (RGBA_Image *) ie; + + if (im->pixman.im) pixman_image_unref(im->pixman.im); + if (im->cache_entry.flags.alpha) + { + im->pixman.im = pixman_image_create_bits + ( +// FIXME: endianess determines this + PIXMAN_a8r8g8b8, +// PIXMAN_b8g8r8a8, + im->cache_entry.w, im->cache_entry.h, + im->image.data, + im->cache_entry.w * 4 + ); + } + else + { + im->pixman.im = pixman_image_create_bits + ( +// FIXME: endianess determines this + PIXMAN_x8r8g8b8, +// PIXMAN_b8g8r8x8, + im->cache_entry.w, im->cache_entry.h, + im->image.data, + im->cache_entry.w * 4 + ); + } +#else + ie = NULL; +#endif +} + +static int +_evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h) +{ + RGBA_Image *im = (RGBA_Image *) ie; + size_t siz = 0; + +#ifdef EVAS_CSERVE + if (ie->data1) return 0; +#endif + if (im->image.no_free) return 0; + + if (im->flags & RGBA_IMAGE_ALPHA_ONLY) + siz = w * h * sizeof(DATA8); + else + siz = w * h * sizeof(DATA32); + + if (im->image.data) free(im->image.data); + im->image.data = malloc(siz); + if (!im->image.data) return -1; + +#ifdef HAVE_VALGRIND +# ifdef VALGRIND_MAKE_READABLE + VALGRIND_MAKE_READABLE(im->image.data, siz); +# else +# ifdef VALGRIND_MAKE_MEM_DEFINED + VALGRIND_MAKE_MEM_DEFINED(im->image.data, siz); +# endif +# endif +#endif + _evas_common_rgba_image_post_surface(ie); + + return 0; +} + +static void +_evas_common_rgba_image_surface_delete(Image_Entry *ie) +{ + RGBA_Image *im = (RGBA_Image *) ie; + +#ifdef HAVE_PIXMAN + if (im->pixman.im) + { + pixman_image_unref(im->pixman.im); + im->pixman.im = NULL; + } +#endif + if (ie->file) + DBG("unload: [%p] %s %s", ie, ie->file, ie->key); + if ((im->cs.data) && (im->image.data)) + { + if (im->cs.data != im->image.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + } + else if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + im->cs.data = NULL; + + if (im->image.data && !im->image.no_free) + free(im->image.data); +#ifdef EVAS_CSERVE + else if (ie->data1) + evas_cserve_image_free(ie); +#endif + + im->image.data = NULL; + ie->allocated.w = 0; + ie->allocated.h = 0; +#ifdef BUILD_ASYNC_PRELOAD + ie->flags.preload_done = 0; +#endif + ie->flags.loaded = 0; + evas_common_rgba_image_scalecache_dirty(&im->cache_entry); +} + +static void +_evas_common_rgba_image_unload(Image_Entry *im) +{ +// DBG("unload: [%p] %s %s", im, im->file, im->key); + evas_common_rgba_image_scalecache_dirty(im); + evas_common_rgba_image_unload(im); +} + +static void +_evas_common_rgba_image_dirty_region(Image_Entry* ie, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__) +{ + RGBA_Image *im = (RGBA_Image *) ie; + +#ifdef EVAS_CSERVE + if (ie->data1) evas_cserve_image_free(ie); +#endif + im->flags |= RGBA_IMAGE_IS_DIRTY; + evas_common_rgba_image_scalecache_dirty(&im->cache_entry); +} + +/* Only called when references > 0. Need to provide a fresh copie of im. */ +static int +_evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src) +{ + RGBA_Image *dst = (RGBA_Image *) ie_dst; + RGBA_Image *src = (RGBA_Image *) ie_src; + + evas_common_rgba_image_scalecache_dirty((Image_Entry *)ie_src); + evas_common_rgba_image_scalecache_dirty(ie_dst); + evas_cache_image_load_data(&src->cache_entry); + if (_evas_common_rgba_image_surface_alloc(&dst->cache_entry, + src->cache_entry.w, src->cache_entry.h)) + { +#ifdef EVAS_CSERVE + if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); +#endif + return 1; + } + +#ifdef EVAS_CSERVE + if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); +#endif + evas_common_image_colorspace_normalize(src); + evas_common_image_colorspace_normalize(dst); +/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ +/* evas_common_cpu_end_opt(); */ + + return 0; +} + +static int +_evas_common_rgba_image_ram_usage(Image_Entry *ie) +{ + RGBA_Image *im = (RGBA_Image *)ie; + int size = sizeof(struct _RGBA_Image); + + if (ie->cache_key) size += strlen(ie->cache_key); + if (ie->file) size += strlen(ie->file); + if (ie->key) size += strlen(ie->key); + + if (im->image.data) + { +#ifdef EVAS_CSERVE + if ((!im->image.no_free) || (ie->data1)) +#else + if ((!im->image.no_free)) +#endif + size += im->cache_entry.w * im->cache_entry.h * sizeof(DATA32); + } + size += evas_common_rgba_image_scalecache_usage_get(&im->cache_entry); + return size; +} + +static DATA32 * +_evas_common_rgba_image_surface_pixels(Image_Entry *ie) +{ + RGBA_Image *im = (RGBA_Image *) ie; + + return im->image.data; +} + +#if 0 +void +evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize) +{ + int x, y; + DATA32 *ptr; + + if (is->spans) return; + if (!is->im->cache_entry.flags.alpha) return; + /* FIXME: dont handle alpha only images yet */ + if ((is->im->flags & RGBA_IMAGE_ALPHA_ONLY)) return; + if (tsize < 0) tsize = 0; + is->spans = calloc(1, sizeof(RGBA_Image_Span *) * is->h); + if (!is->spans) return; + ptr = is->data; + for (y = 0; y < is->h; y++) + { + RGBA_Image_Span *sp; + + sp = NULL; + for (x = 0; x < is->w; x++) + { + DATA8 a; + + a = A_VAL(ptr); + if (sp) + { + if (a == 0) + { + is->spans[y] = eina_inlist_append(is->spans[y], sp); + sp = NULL; + } + else + { + sp->w++; + if ((sp->v == 2) && (a != 255)) sp->v = 1; + } + } + else + { + if (a == 255) + { + sp = calloc(1, sizeof(RGBA_Image_Span)); + sp->x = x; + sp->w = 1; + sp->v = 2; + } + else if (a > 0) + { + sp = calloc(1, sizeof(RGBA_Image_Span)); + sp->x = x; + sp->w = 1; + sp->v = 1; + } + } + ptr++; + } + if (sp) + { + is->spans[y] = eina_inlist_append(is->spans[y], sp); + sp = NULL; + } + } +} +#endif + +/* EAPI void */ +/* evas_common_image_surface_dealloc(RGBA_Surface *is) */ +/* { */ +/* if ((is->data) && (!is->no_free)) */ +/* { */ +/* free(is->data); */ +/* is->data = NULL; */ +/* } */ +/* } */ + +static RGBA_Image * +evas_common_image_create(unsigned int w, unsigned int h) +{ + RGBA_Image *im; + + im = (RGBA_Image *) _evas_common_rgba_image_new(); + if (!im) return NULL; + im->cache_entry.w = w; + im->cache_entry.h = h; + if (_evas_common_rgba_image_surface_alloc(&im->cache_entry, w, h)) + { + _evas_common_rgba_image_delete(&im->cache_entry); + return NULL; + } + im->cache_entry.flags.cached = 0; + return im; +} + +EAPI RGBA_Image * +evas_common_image_alpha_create(unsigned int w, unsigned int h) +{ + RGBA_Image *im; + + im = (RGBA_Image *) _evas_common_rgba_image_new(); + if (!im) return NULL; + im->cache_entry.w = w; + im->cache_entry.h = h; + im->cache_entry.flags.alpha = 1; + if (_evas_common_rgba_image_surface_alloc(&im->cache_entry, w, h)) + { + _evas_common_rgba_image_delete(&im->cache_entry); + return NULL; + } + im->cache_entry.flags.cached = 0; + return im; +} + +EAPI RGBA_Image * +evas_common_image_new(unsigned int w, unsigned int h, unsigned int alpha) +{ + if (alpha) + return evas_common_image_alpha_create(w, h); + return evas_common_image_create(w, h); +} + +void +evas_common_image_colorspace_normalize(RGBA_Image *im) +{ + if ((!im->cs.data) || + ((!im->cs.dirty) && (!(im->flags & RGBA_IMAGE_IS_DIRTY)))) return; + switch (im->cache_entry.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (im->image.data != im->cs.data) + { +#ifdef EVAS_CSERVE + if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry); +#endif + if (!im->image.no_free) free(im->image.data); + im->image.data = im->cs.data; + im->cs.no_free = im->image.no_free; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: +#ifdef BUILD_CONVERT_YUV + if ((im->image.data) && (*((unsigned char **)im->cs.data))) + evas_common_convert_yuv_420p_601_rgba(im->cs.data, (DATA8*) im->image.data, + im->cache_entry.w, im->cache_entry.h); +#endif + break; + case EVAS_COLORSPACE_YCBCR422601_PL: +#ifdef BUILD_CONVERT_YUV + if ((im->image.data) && (*((unsigned char **)im->cs.data))) + evas_common_convert_yuv_422_601_rgba(im->cs.data, (DATA8*) im->image.data, + im->cache_entry.w, im->cache_entry.h); +#endif + break; + case EVAS_COLORSPACE_YCBCR420NV12601_PL: +#ifdef BUILD_CONVERT_YUV + if ((im->image.data) && (*((unsigned char **)im->cs.data))) + evas_common_convert_yuv_420_601_rgba(im->cs.data, (DATA8*) im->image.data, + im->cache_entry.w, im->cache_entry.h); +#endif + break; + case EVAS_COLORSPACE_YCBCR420TM12601_PL: +#ifdef BUILD_CONVERT_YUV + if ((im->image.data) && (*((unsigned char **)im->cs.data))) + evas_common_convert_yuv_420T_601_rgba(im->cs.data, (DATA8*) im->image.data, + im->cache_entry.w, im->cache_entry.h); +#endif + break; + default: + break; + } + im->cs.dirty = 0; +} + +EAPI void +evas_common_image_colorspace_dirty(RGBA_Image *im) +{ + im->cs.dirty = 1; + evas_common_rgba_image_scalecache_dirty(&im->cache_entry); +} + +EAPI void +evas_common_image_set_cache(unsigned int size) +{ + if (eci) + evas_cache_image_set(eci, size); +} + +EAPI int +evas_common_image_get_cache(void) +{ + return evas_cache_image_get(eci); +} + +EAPI RGBA_Image * +evas_common_load_image_from_file(const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error) +{ + if (!file) + { + *error = EVAS_LOAD_ERROR_GENERIC; + return NULL; + } + return (RGBA_Image *) evas_cache_image_request(eci, file, key, lo, error); +} + +EAPI void +evas_common_image_cache_free(void) +{ + evas_common_image_set_cache(0); +} + +EAPI Evas_Cache_Image* +evas_common_image_cache_get(void) +{ + return eci; +} + +EAPI RGBA_Image * +evas_common_image_line_buffer_obtain(int len) +{ + if (len < 1) return NULL; + if (len < EVAS_RGBA_LINE_BUFFER_MIN_LEN) + len = EVAS_RGBA_LINE_BUFFER_MIN_LEN; + return evas_common_image_create(len, 1); +/* + if (evas_rgba_line_buffer) + { + if (evas_rgba_line_buffer->image->w >= len) + return evas_rgba_line_buffer; + evas_rgba_line_buffer->image->data = (DATA32 *)realloc(evas_rgba_line_buffer->image->data, len * sizeof(DATA32)); + if (!evas_rgba_line_buffer->image->data) + { + evas_common_image_free(evas_rgba_line_buffer); + evas_rgba_line_buffer = NULL; + return NULL; + } + evas_rgba_line_buffer->image->w = len; + return evas_rgba_line_buffer; + } + evas_rgba_line_buffer = evas_common_image_create(len, 1); + if (!evas_rgba_line_buffer) return NULL; + return evas_rgba_line_buffer; + */ +} + +EAPI void +evas_common_image_line_buffer_release(RGBA_Image *im) +{ + _evas_common_rgba_image_delete(&im->cache_entry); +/* + if (!evas_rgba_line_buffer) return; + if (EVAS_RGBA_LINE_BUFFER_MAX_LEN < evas_rgba_line_buffer->image->w) + { + evas_rgba_line_buffer->image->w = EVAS_RGBA_LINE_BUFFER_MAX_LEN; + evas_rgba_line_buffer->image->data = (DATA32 *)realloc(evas_rgba_line_buffer->image->data, + evas_rgba_line_buffer->image->w * sizeof(DATA32)); + if (!evas_rgba_line_buffer->image->data) + { + evas_common_image_free(evas_rgba_line_buffer); + evas_rgba_line_buffer = NULL; + } + } + */ +} + +EAPI void +evas_common_image_line_buffer_free(RGBA_Image *im) +{ + _evas_common_rgba_image_delete(&im->cache_entry); +/* + if (!evas_rgba_line_buffer) return; + evas_common_image_free(evas_rgba_line_buffer); + evas_rgba_line_buffer = NULL; + */ +} + +EAPI RGBA_Image * +evas_common_image_alpha_line_buffer_obtain(int len) +{ + if (len < 1) return NULL; + if (len < EVAS_ALPHA_LINE_BUFFER_MIN_LEN) + len = EVAS_ALPHA_LINE_BUFFER_MIN_LEN; + return evas_common_image_alpha_create(len, 1); +/* + if (evas_alpha_line_buffer) + { + if (evas_alpha_line_buffer->image->w >= len) + return evas_alpha_line_buffer; + evas_alpha_line_buffer->image->data = realloc(evas_alpha_line_buffer->image->data, len * sizeof(DATA8)); + if (!evas_alpha_line_buffer->image->data) + { + evas_common_image_free(evas_alpha_line_buffer); + evas_alpha_line_buffer = NULL; + return NULL; + } + evas_alpha_line_buffer->image->w = len; + return evas_alpha_line_buffer; + } + evas_alpha_line_buffer = evas_common_image_alpha_create(len, 1); + return evas_alpha_line_buffer; + */ +} + +EAPI void +evas_common_image_alpha_line_buffer_release(RGBA_Image *im) +{ + _evas_common_rgba_image_delete(&im->cache_entry); +/* + if (!evas_alpha_line_buffer) return; + if (EVAS_ALPHA_LINE_BUFFER_MAX_LEN < evas_alpha_line_buffer->image->w) + { + evas_alpha_line_buffer->image->w = EVAS_ALPHA_LINE_BUFFER_MAX_LEN; + evas_alpha_line_buffer->image->data = realloc(evas_alpha_line_buffer->image->data, + evas_alpha_line_buffer->image->w * sizeof(DATA8)); + if (!evas_alpha_line_buffer->image->data) + { + evas_common_image_free(evas_alpha_line_buffer); + evas_alpha_line_buffer = NULL; + } + } + */ +} + +EAPI void +evas_common_image_premul(Image_Entry *ie) +{ + DATA32 nas = 0; + + if (!ie) return ; + if (!evas_cache_image_pixels(ie)) return ; + if (!ie->flags.alpha) return; + + nas = evas_common_convert_argb_premul(evas_cache_image_pixels(ie), ie->w * ie->h); + if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ie->w * ie->h)) + ie->flags.alpha_sparse = 1; +} + +EAPI void +evas_common_image_set_alpha_sparse(Image_Entry *ie) +{ + DATA32 *s, *se; + DATA32 nas = 0; + + if (!ie) return; + if (!evas_cache_image_pixels(ie)) return ; + if (!ie->flags.alpha) return; + + s = evas_cache_image_pixels(ie); + se = s + (ie->w * ie->h); + while (s < se) + { + DATA32 p = *s & 0xff000000; + + if (!p || (p == 0xff000000)) + nas++; + s++; + } + if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ie->w * ie->h)) + ie->flags.alpha_sparse = 1; +} diff --git a/libraries/evas/src/lib/engines/common/evas_image_private.h b/libraries/evas/src/lib/engines/common/evas_image_private.h new file mode 100644 index 0000000..1bec6c8 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_image_private.h @@ -0,0 +1,17 @@ +#ifndef _EVAS_IMAGE_PRIVATE_H +#define _EVAS_IMAGE_PRIVATE_H + +int evas_common_rgba_image_size_set (Image_Entry* dst, const Image_Entry* im, unsigned int w, unsigned int h); +int evas_common_rgba_image_from_copied_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); +int evas_common_rgba_image_from_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); +int evas_common_rgba_image_colorspace_set (Image_Entry* dst, int cspace); + +void evas_common_scalecache_init(void); +void evas_common_scalecache_shutdown(void); +void evas_common_rgba_image_scalecache_init(Image_Entry *ie); +void evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie); +void evas_common_rgba_image_scalecache_dirty(Image_Entry *ie); +void evas_common_rgba_image_scalecache_orig_use(Image_Entry *ie); +int evas_common_rgba_image_scalecache_usage_get(Image_Entry *ie); + +#endif /* _EVAS_IMAGE_PRIVATE_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_image_save.c b/libraries/evas/src/lib/engines/common/evas_image_save.c new file mode 100644 index 0000000..d7484c0 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_image_save.c @@ -0,0 +1,51 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "evas_options.h" + +#include "evas_common.h" +#include "evas_private.h" + + +int +evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key, int quality, int compress) +{ + Evas_Image_Save_Func *evas_image_save_func = NULL; + char *p; + char *saver = NULL; + + p = strrchr(file, '.'); + if (p) + { + p++; + + if (!strcasecmp(p, "png")) + saver = "png"; + if ((!strcasecmp(p, "jpg")) || (!strcasecmp(p, "jpeg")) || + (!strcasecmp(p, "jfif"))) + saver = "jpeg"; + if ((!strcasecmp(p, "eet")) || (!strcasecmp(p, "edj")) || + (!strcasecmp(p, "eap"))) + saver = "eet"; + if (!strcasecmp(p, "edb")) + saver = "edb"; + } + + if (saver) + { + Evas_Module *em; + + em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_SAVER, saver); + if (em) + { + evas_module_use(em); + if (evas_module_load(em)) + { + evas_image_save_func = em->functions; + return evas_image_save_func->image_save(im, file, key, quality, compress); + } + } + } + return 0; +} diff --git a/libraries/evas/src/lib/engines/common/evas_image_scalecache.c b/libraries/evas/src/lib/engines/common/evas_image_scalecache.c new file mode 100644 index 0000000..24a4f2d --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_image_scalecache.c @@ -0,0 +1,846 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifdef HAVE_EVIL +# include +#endif + +#include + +#include "evas_common.h" +#include "evas_private.h" +#include "evas_image_private.h" + +#define SCALECACHE 1 + +#define MAX_SCALEITEMS 32 +#define MIN_SCALE_USES 3 +//#define MIN_SCALE_AGE_GAP 5000 +#define MAX_SCALECACHE_DIM 3200 +#define FLOP_ADD 4 +#define MAX_FLOP_COUNT 16 +#define FLOP_DEL 1 +#define SCALE_CACHE_SIZE 4 * 1024 * 1024 +//#define SCALE_CACHE_SIZE 0 + +typedef struct _Scaleitem Scaleitem; + +struct _Scaleitem +{ + EINA_INLIST; + unsigned long long usage; + unsigned long long usage_count; + RGBA_Image *im, *parent_im; + int src_x, src_y; + unsigned int src_w, src_h; + unsigned int dst_w, dst_h; + unsigned int flop; + unsigned int size_adjust; +#ifdef EVAS_FRAME_QUEUING + RWLK(lock); +#endif + Eina_Bool forced_unload : 1; + Eina_Bool smooth : 1; + Eina_Bool populate_me : 1; +}; + +#ifdef SCALECACHE +static unsigned long long use_counter = 0; + +#ifdef BUILD_PTHREAD +static LK(cache_lock); +#endif +static Eina_Inlist *cache_list = NULL; +static unsigned int cache_size = 0; +static int init = 0; + +static unsigned int max_cache_size = SCALE_CACHE_SIZE; +static unsigned int max_dimension = MAX_SCALECACHE_DIM; +static unsigned int max_flop_count = MAX_FLOP_COUNT; +static unsigned int max_scale_items = MAX_SCALEITEMS; +static unsigned int min_scale_uses = MIN_SCALE_USES; +#endif + +void +evas_common_scalecache_init(void) +{ +#ifdef SCALECACHE + const char *s; + + init++; + if (init > 1) return; + use_counter = 0; + LKI(cache_lock); + s = getenv("EVAS_SCALECACHE_SIZE"); + if (s) max_cache_size = atoi(s) * 1024; + s = getenv("EVAS_SCALECACHE_MAX_DIMENSION"); + if (s) max_dimension = atoi(s); + s = getenv("EVAS_SCALECACHE_MAX_FLOP_COUNT"); + if (s) max_flop_count = atoi(s); + s = getenv("EVAS_SCALECACHE_MAX_ITEMS"); + if (s) max_scale_items = atoi(s); + s = getenv("EVAS_SCALECACHE_MIN_USES"); + if (s) min_scale_uses = atoi(s); +#endif +} + +void +evas_common_scalecache_shutdown(void) +{ +#ifdef SCALECACHE + init--; + if (init ==0) + LKD(cache_lock); +#endif +} + +void +evas_common_rgba_image_scalecache_init(Image_Entry *ie) +{ +#ifdef SCALECACHE + RGBA_Image *im = (RGBA_Image *)ie; + // NOTE: this conflicts with evas image cache init and del of lock + LKI(im->cache.lock); +#endif +} + +void +evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie) +{ +#ifdef SCALECACHE + RGBA_Image *im = (RGBA_Image *)ie; + evas_common_rgba_image_scalecache_dirty(ie); + // NOTE: this conflicts with evas image cache init and del of lock + LKD(im->cache.lock); +#endif +} + +void +evas_common_rgba_image_scalecache_dirty(Image_Entry *ie) +{ +#ifdef SCALECACHE + RGBA_Image *im = (RGBA_Image *)ie; + LKL(im->cache.lock); + while (im->cache.list) + { + Scaleitem *sci; + sci = im->cache.list->data; +#ifdef EVAS_FRAME_QUEUING + WRLKL(sci->lock); +#endif + im->cache.list = eina_list_remove(im->cache.list, sci); + if (sci->im) + { +// INF(" 0- %i", sci->dst_w * sci->dst_h * 4); + LKL(cache_lock); + evas_common_rgba_image_free(&sci->im->cache_entry); + if (!sci->forced_unload) + cache_size -= sci->dst_w * sci->dst_h * 4; + else + cache_size -= sci->size_adjust; + cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); + LKU(cache_lock); + } +#ifdef EVAS_FRAME_QUEUING + RWLKU(sci->lock); + RWLKD(sci->lock); +#endif + free(sci); + } + LKU(im->cache.lock); +#endif +} + +void +evas_common_rgba_image_scalecache_orig_use(Image_Entry *ie) +{ +#ifdef SCALECACHE + RGBA_Image *im = (RGBA_Image *)ie; + LKL(im->cache.lock); + use_counter++; + // FIXME: if orig not loaded, reload + // FIXME: mark orig with current used counter + im->cache.orig_usage++; + im->cache.usage_count = use_counter; + LKU(im->cache.lock); +#endif +} + +int +evas_common_rgba_image_scalecache_usage_get(Image_Entry *ie) +{ +#ifdef SCALECACHE + RGBA_Image *im = (RGBA_Image *)ie; + int size = 0; + Eina_List *l; + Scaleitem *sci; + LKL(im->cache.lock); + EINA_LIST_FOREACH(im->cache.list, l, sci) + { + if (sci->im) size += sci->dst_w * sci->dst_h * 4; + } + LKU(im->cache.lock); + return size; +#else + return 0; +#endif +} + +#ifdef SCALECACHE +static void +_sci_fix_newest(RGBA_Image *im) +{ + Eina_List *l; + Scaleitem *sci; + + im->cache.newest_usage = 0; + im->cache.newest_usage_count = 0; + EINA_LIST_FOREACH(im->cache.list, l, sci) + { + if (sci->usage > im->cache.newest_usage) + im->cache.newest_usage = sci->usage; + if (sci->usage_count > im->cache.newest_usage_count) + im->cache.newest_usage_count = sci->usage_count; + } +// INF("_sci_fix_newest! -> %i", im->cache.newest_usage); +} + +static Scaleitem * +_sci_find(RGBA_Image *im, + RGBA_Draw_Context *dc __UNUSED__, int smooth, + int src_region_x, int src_region_y, + unsigned int src_region_w, unsigned int src_region_h, + unsigned int dst_region_w, unsigned int dst_region_h) +{ + Eina_List *l; + Scaleitem *sci; + + EINA_LIST_FOREACH(im->cache.list, l, sci) + { + if ( + (sci->src_w == src_region_w) && + (sci->src_h == src_region_h) && + (sci->dst_w == dst_region_w) && + (sci->dst_h == dst_region_h) && + (sci->src_x == src_region_x) && + (sci->src_y == src_region_y) && + (sci->smooth == smooth) + ) + { + if (im->cache.list != l) + { + im->cache.list = eina_list_remove_list(im->cache.list, l); + im->cache.list = eina_list_prepend(im->cache.list, sci); + } + return sci; + } + } + if (eina_list_count(im->cache.list) > max_scale_items) + { + l = eina_list_last(im->cache.list); + sci = l->data; +#ifdef EVAS_FRAME_QUEUING + WRLKL(sci->lock); +#endif + im->cache.list = eina_list_remove_list(im->cache.list, l); + if ((sci->usage == im->cache.newest_usage) || + (sci->usage_count == im->cache.newest_usage_count)) + _sci_fix_newest(im); + if (sci->im) + { + evas_common_rgba_image_free(&sci->im->cache_entry); + if (!sci->forced_unload) + cache_size -= sci->dst_w * sci->dst_h * 4; + else + cache_size -= sci->size_adjust; +// INF(" 1- %i", sci->dst_w * sci->dst_h * 4); + cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); + } +#ifdef EVAS_FRAME_QUEUING + RWLKU(sci->lock); +#endif + if (max_scale_items < 1) return NULL; + } + else + { + if (max_scale_items < 1) return NULL; + + if (eina_list_count(im->cache.list) > (max_scale_items - 1)) + return NULL; + sci = calloc(1, sizeof(Scaleitem)); + sci->parent_im = im; +#ifdef EVAS_FRAME_QUEUING + RWLKI(sci->lock); +#endif + } + sci->usage = 0; + sci->usage_count = 0; + sci->populate_me = 0; + sci->smooth = smooth; + sci->forced_unload = 0; + sci->flop = 0; + sci->im = NULL; + sci->src_x = src_region_x; + sci->src_y = src_region_y; + sci->src_w = src_region_w; + sci->src_h = src_region_h; + sci->dst_w = dst_region_w; + sci->dst_h = dst_region_h; + im->cache.list = eina_list_prepend(im->cache.list, sci); + return sci; +} + +static void +_cache_prune(Scaleitem *notsci, Eina_Bool copies_only) +{ + Scaleitem *sci; + while (cache_size > max_cache_size) + { + if (!cache_list) break; + sci = (Scaleitem *)(cache_list); + if (copies_only) + { + while ((sci) && (!sci->parent_im->image.data)) + sci = (Scaleitem *)(((Eina_Inlist *)sci)->next); + if (!sci) return; + } + if (sci == notsci) return; +#ifdef EVAS_FRAME_QUEUING + WRLKL(sci->lock); +#endif + if (sci->im) + { + evas_common_rgba_image_free(&sci->im->cache_entry); + sci->im = NULL; + sci->usage = 0; + sci->usage_count = 0; + sci->flop += FLOP_ADD; + if (!sci->forced_unload) + cache_size -= sci->dst_w * sci->dst_h * 4; + else + cache_size -= sci->size_adjust; +// INF(" 2- %i", sci->dst_w * sci->dst_h * 4); + cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); + memset(sci, 0, sizeof(Eina_Inlist)); + } +#ifdef EVAS_FRAME_QUEUING + RWLKU(sci->lock); +#endif + +// INF("FLUSH %i > %i", cache_size, max_cache_size); + } +} +#endif + +EAPI void +evas_common_rgba_image_scalecache_size_set(unsigned int size) +{ +#ifdef SCALECACHE + LKL(cache_lock); + if (size != max_cache_size) + { + max_cache_size = size; + _cache_prune(NULL, 1); + } + LKU(cache_lock); +#endif +} + +EAPI unsigned int +evas_common_rgba_image_scalecache_size_get(void) +{ +#ifdef SCALECACHE + int t; + LKL(cache_lock); + t = max_cache_size; + LKU(cache_lock); + return t; +#else + return 0; +#endif +} + +EAPI void +evas_common_rgba_image_scalecache_dump(void) +{ +#ifdef SCALECACHE + int t; + LKL(cache_lock); + t = max_cache_size; + max_cache_size = 0; + _cache_prune(NULL, 0); + max_cache_size = t; + LKU(cache_lock); +#endif +} + +EAPI void +evas_common_rgba_image_scalecache_flush(void) +{ +#ifdef SCALECACHE + int t; + LKL(cache_lock); + t = max_cache_size; + max_cache_size = 0; + _cache_prune(NULL, 1); + max_cache_size = t; + LKU(cache_lock); +#endif +} + +EAPI void +evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst __UNUSED__, + RGBA_Draw_Context *dc, int smooth, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x __UNUSED__, int dst_region_y __UNUSED__, + int dst_region_w, int dst_region_h) +{ +#ifdef SCALECACHE + int locked = 0; + Eina_Lock_Result ret; + RGBA_Image *im = (RGBA_Image *)ie; + Scaleitem *sci; + if (!im->image.data) return; + if ((dst_region_w == 0) || (dst_region_h == 0) || + (src_region_w == 0) || (src_region_h == 0)) return; + // was having major lock issues here - LKL was deadlocking. what was + // going on? it may have been an eina treads badness but this will stay here + // for now for debug +#if 1 + ret = LKT(im->cache.lock); + if (ret == EINA_FALSE) /* can't get image lock */ + { + useconds_t slp = 1, slpt = 0; + + while (slpt < 500000) + { +#ifdef _WIN32 + Sleep(slp / 1000); +#else + usleep(slp); +#endif + slpt += slp; + slp++; + ret = LKT(im->cache.lock); + if (ret == EINA_LOCK_DEADLOCK) + { + printf("WARNING: DEADLOCK on image %p (%s)\n", im, ie->file); + } + else + { + locked = 1; + break; + } + } + if (ret == EINA_FALSE) + { + printf("WARNING: lock still there after %i usec\n", slpt); + printf("WARNING: stucklock on image %p (%s)\n", im, ie->file); + LKDBG(im->cache.lock); + } + } + else if (ret == EINA_LOCK_DEADLOCK) + { + printf("WARNING: DEADLOCK on image %p (%s)\n", im, ie->file); + } + else locked = 1; +#endif + if (!locked) { LKL(im->cache.lock); locked = 1; } + use_counter++; + if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h)) + { + // 1:1 scale. + im->cache.orig_usage++; + im->cache.usage_count = use_counter; + if (locked) LKU(im->cache.lock); + return; + } + if ((!im->cache_entry.flags.alpha) && (!smooth)) + { + // solid nearest scaling - it's actually the same speed cached or not, + // or in some cases faster not cached + im->cache.orig_usage++; + im->cache.usage_count = use_counter; + if (locked) LKU(im->cache.lock); + return; + } + LKL(cache_lock); + sci = _sci_find(im, dc, smooth, + src_region_x, src_region_y, src_region_w, src_region_h, + dst_region_w, dst_region_h); + if (!sci) + { + LKU(cache_lock); + if (locked) LKU(im->cache.lock); + return; + } +// INF("%10i | %4i %4i %4ix%4i -> %4i %4i %4ix%4i | %i", +// (int)use_counter, +// src_region_x, src_region_y, src_region_w, src_region_h, +// dst_region_x, dst_region_y, dst_region_w, dst_region_h, +// smooth); + if ((sci->usage >= min_scale_uses) + && (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC) +// && (sci->usage_count > (use_counter - MIN_SCALE_AGE_GAP)) + ) + { + if (!sci->im) + { + if ((sci->dst_w < max_dimension) && + (sci->dst_h < max_dimension)) + { + if (sci->flop <= max_flop_count) + { + sci->populate_me = 1; + im->cache.populate_count++; + } + } + } + } + sci->usage++; + sci->usage_count = use_counter; + LKU(cache_lock); + if (sci->usage > im->cache.newest_usage) + im->cache.newest_usage = sci->usage; +// INF("newset? %p %i > %i", im, +// (int)sci->usage, +// (int)im->cache.newest_usage); + if (sci->usage_count > im->cache.newest_usage_count) + im->cache.newest_usage_count = sci->usage_count; +// INF(" -------------- used %8i#, %8i@", (int)sci->usage, (int)sci->usage_count); + if (locked) LKU(im->cache.lock); +#endif +} + +#ifdef SCALECACHE +//static int pops = 0; +//static int hits = 0; +//static int misses = 0; +//static int noscales = 0; +#endif + +EAPI void +evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst, + RGBA_Draw_Context *dc, int smooth, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h) +{ +#ifdef SCALECACHE + RGBA_Image *im = (RGBA_Image *)ie; + Scaleitem *sci; + int didpop = 0; + int dounload = 0; +/* + static int i = 0; + + i++; + if (i > 2000) + { + INF("p: %6i, h: %6i, m: %6i, n: %6i", + pops, hits, misses, noscales); + i = 0; + } + */ + if ((dst_region_w == 0) || (dst_region_h == 0) || + (src_region_w == 0) || (src_region_h == 0)) return; + LKL(im->cache.lock); + if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h)) + { +#ifdef EVAS_FRAME_QUEUING + if (!evas_common_frameq_enabled()) +#endif + { + if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) + evas_cache_image_load_data(&im->cache_entry); + evas_common_image_colorspace_normalize(im); + } +// noscales++; + LKU(im->cache.lock); + if (im->image.data) + { + evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + } + return; + } + LKL(cache_lock); + sci = _sci_find(im, dc, smooth, + src_region_x, src_region_y, src_region_w, src_region_h, + dst_region_w, dst_region_h); + LKU(cache_lock); + if (!sci) + { +#ifdef EVAS_FRAME_QUEUING + if (!evas_common_frameq_enabled()) +#endif + { + if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) + evas_cache_image_load_data(&im->cache_entry); + evas_common_image_colorspace_normalize(im); + } +// misses++; + LKU(im->cache.lock); + if (im->image.data) + { + if (smooth) + evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + else + evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + } + return; + } + if (sci->populate_me) + { + int size, osize, used; + + size = dst_region_w * dst_region_h; + if (((((dst_region_w > 640) || (dst_region_h > 640)) && + (size > (480 * 480))) || + (ie->scale_hint == EVAS_IMAGE_SCALE_HINT_STATIC)) && + (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC)) + { + Eina_List *l; + Scaleitem *sci2; + + dounload = 1; + osize = sci->parent_im->cache_entry.w * sci->parent_im->cache_entry.h; + used = 0; + EINA_LIST_FOREACH(im->cache.list, l, sci2) + { + if (sci2->im) used += sci2->dst_w * sci2->dst_h; + } + if ((size < osize) && (used == 0)) + sci->size_adjust = 0; + else + { + osize -= used; + if (osize < 0) osize = 0; + size -= osize; + sci->size_adjust = size * 4; + } + } + else + { + size *= sizeof(DATA32); + if ((cache_size + size) > max_cache_size) + { + sci->populate_me = 0; + im->cache.populate_count--; + } + } + } + if (sci->populate_me) + { +// INF("##! populate!"); + sci->im = evas_common_image_new + (dst_region_w, dst_region_h, im->cache_entry.flags.alpha); + if (sci->im) + { + static RGBA_Draw_Context *ct = NULL; + + LKL(cache_lock); + im->cache.orig_usage++; + im->cache.usage_count = use_counter; + im->cache.populate_count--; +// pops++; + if (!ct) + { + // FIXME: static ct - never can free on shutdown? not a leak + // or real harm - just annoying valgrind bitch + ct = evas_common_draw_context_new(); + evas_common_draw_context_set_render_op(ct, _EVAS_RENDER_COPY); + } + if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) + evas_cache_image_load_data(&im->cache_entry); + evas_common_image_colorspace_normalize(im); + if (im->image.data) + { + if (smooth) + evas_common_scale_rgba_in_to_out_clip_smooth + (im, sci->im, ct, + src_region_x, src_region_y, + src_region_w, src_region_h, + 0, 0, + dst_region_w, dst_region_h); + else + evas_common_scale_rgba_in_to_out_clip_sample + (im, sci->im, ct, + src_region_x, src_region_y, + src_region_w, src_region_h, + 0, 0, + dst_region_w, dst_region_h); + sci->populate_me = 0; +#if 0 // visual debug of cached images + { + int xx, yy; + DATA32 *pp; + + pp = sci->im->image.data; + for (yy = 0; yy < dst_region_h; yy++) + { + + for (xx = 0; xx < dst_region_w; xx++) + { + if (yy & 0x1) + { + if (xx & 0x1) *pp = 0x882288ff; + } + else + { + if (!(xx & 0x1)) *pp = 0x882288ff; + } + pp++; + } + } + } +#endif + } + if (dounload) + { + sci->forced_unload = 1; + cache_size += sci->size_adjust; + } + else + { + cache_size += sci->dst_w * sci->dst_h * 4; + } +// INF(" + %i @ flop: %i (%ix%i)", +// sci->dst_w * sci->dst_h * 4, sci->flop, +// sci->dst_w, sci->dst_h); + cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci); + _cache_prune(sci, 0); + LKU(cache_lock); + didpop = 1; + } + } + if (sci->im && !ie->flags.animated) + { + if (!didpop) + { + LKL(cache_lock); + cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); + cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci); + LKU(cache_lock); + } + else + { + if (sci->flop >= FLOP_DEL) sci->flop -= FLOP_DEL; + } +// INF("use cached!"); +#ifdef EVAS_FRAME_QUEUING + RDLKL(sci->lock); +#endif + LKU(im->cache.lock); + evas_common_scale_rgba_in_to_out_clip_sample + (sci->im, dst, dc, + 0, 0, + dst_region_w, dst_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); +#ifdef EVAS_FRAME_QUEUING + RWLKU(sci->lock); +#endif +// hits++; +// INF("check %p %i < %i", +// im, +// (int)im->cache.orig_usage, +// (int)im->cache.newest_usage); +#ifndef EVAS_FRAME_QUEUING + /* while framequeuing is applied, + * original image data is loaded by the main thread + * just before enqueuing the rendering op into the pipe. + * so unloading the original image data here + * causes only speed-down side-effect and no memory usage gain; + * it will be loaded again for the very next rendering for this image. + */ + if (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC) + { + if ((dounload) || + ((im->cache_entry.flags.loaded) && + ((!im->cs.no_free) +#ifdef EVAS_CSERVE + || (ie->data1) +#endif + ) && + (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888))) + { + if ((dounload) || (im->cache.orig_usage < + (im->cache.newest_usage / 20))) + { + //FIXME: imagedataunload - inform owners + evas_common_rgba_image_unload(&im->cache_entry); + } + } + } +#endif + } + else + { +#ifdef EVAS_FRAME_QUEUING + if (!evas_common_frameq_enabled()) +#endif + { + if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) + evas_cache_image_load_data(&im->cache_entry); + evas_common_image_colorspace_normalize(im); + } +// misses++; + LKU(im->cache.lock); + if (im->image.data) + { + if (smooth) + evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + else + evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + } + } +#else + RGBA_Image *im = (RGBA_Image *)ie; +#ifdef EVAS_FRAME_QUEUING + if (!evas_common_frameq_enabled()) +#endif + { + if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) + evas_cache_image_load_data(&im->cache_entry); + evas_common_image_colorspace_normalize(im); + } + if (im->image.data) + { + if (smooth) + evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + else + evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + } +#endif +} diff --git a/libraries/evas/src/lib/engines/common/evas_line.h b/libraries/evas/src/lib/engines/common/evas_line.h new file mode 100644 index 0000000..9d45e3d --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_line.h @@ -0,0 +1,11 @@ +#ifndef _EVAS_LINE_H +#define _EVAS_LINE_H + + +EAPI void evas_common_line_init (void); + +EAPI void evas_common_line_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2); + + +#endif /* _EVAS_LINE_H */ + diff --git a/libraries/evas/src/lib/engines/common/evas_line_main.c b/libraries/evas/src/lib/engines/common/evas_line_main.c new file mode 100644 index 0000000..04401cb --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_line_main.c @@ -0,0 +1,678 @@ +#include "evas_common.h" +#include "evas_blend_private.h" + + +static void +_evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y); + +static void +_evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); + +static void +_evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); + +static void +_evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); + + +#define IN_RANGE(x, y, w, h) \ + ( x > 0 && y > 0 &&((unsigned)(x) < (unsigned)(w)) && ((unsigned)(y) < (unsigned)(h)) ) + +#define IN_RECT(x, y, rx, ry, rw, rh) \ + ( ((unsigned)((x) - (rx)) < (unsigned)(rw)) && \ + ((unsigned)((y) - (ry)) < (unsigned)(rh)) ) + +#define EXCHANGE_POINTS(x0, y0, x1, y1) \ + { \ + int _tmp = y0; \ + \ + y0 = y1; \ + y1 = _tmp; \ + \ + _tmp = x0; \ + x0 = x1; \ + x1 = _tmp; \ + } + + +EAPI void +evas_common_line_init(void) +{ +} + +EAPI void +evas_common_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) +{ + int x, y, w, h; + int clx, cly, clw, clh; + int cuse, cx, cy, cw, ch; + + if ((x0 == x1) && (y0 == y1)) + { + _evas_draw_point(dst, dc, x0, y0); + return; + } + + clx = cly = 0; + clw = dst->cache_entry.w; + clh = dst->cache_entry.h; + + /* save out clip info */ + cuse = dc->clip.use; + cx = dc->clip.x; + cy = dc->clip.y; + cw = dc->clip.w; + ch = dc->clip.h; + + if (cuse) + { + RECTS_CLIP_TO_RECT(clx, cly, clw, clh, cx, cy, cw, ch); + if ((clw < 1) || (clh < 1)) + return; + } + + x = MIN(x0, x1); + y = MIN(y0, y1); + w = MAX(x0, x1) - x + 1; + h = MAX(y0, y1) - y + 1; + + RECTS_CLIP_TO_RECT(clx, cly, clw, clh, x, y, w, h); + if ((clw < 1) || (clh < 1)) + return; + + dc->clip.use = 1; + dc->clip.x = clx; + dc->clip.y = cly; + dc->clip.w = clw; + dc->clip.h = clh; + + if (dc->anti_alias) + _evas_draw_line_aa(dst, dc, x0, y0, x1, y1); + else + _evas_draw_line(dst, dc, x0, y0, x1, y1); + + /* restore clip info */ + dc->clip.use = cuse; + dc->clip.x = cx; + dc->clip.y = cy; + dc->clip.w = cw; + dc->clip.h = ch; +} + + +static void +_evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y) +{ + RGBA_Gfx_Pt_Func pfunc; + + if (!IN_RANGE(x, y, dst->cache_entry.w, dst->cache_entry.h)) + return; + if ((dc->clip.use) && (!IN_RECT(x, y, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h))) + return; + pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op); + if (pfunc) + pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x); +} + +/* + these functions use the dc->clip data as bounding + data. they assume that such data has already been cut + back to lie in the dst image rect and the object's + (line) bounding rect. +*/ +static void +_evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) +{ + int dx, dy, len, lx, ty, rx, by; + int clx, cly, clw, clh; + int dstw; + DATA32 *p, color; + RGBA_Gfx_Pt_Func pfunc; + RGBA_Gfx_Func sfunc; + + dstw = dst->cache_entry.w; + color = dc->col.col; + + if (y0 > y1) + EXCHANGE_POINTS(x0, y0, x1, y1) + if (x0 > x1) + EXCHANGE_POINTS(x0, y0, x1, y1) + + dx = x1 - x0; + dy = y1 - y0; + + clx = dc->clip.x; + cly = dc->clip.y; + clw = dc->clip.w; + clh = dc->clip.h; + + lx = clx; + rx = clx + clw - 1; + ty = cly; + by = cly + clh - 1; + + if (dy == 0) + { +#ifdef EVAS_SLI + if (((y0) % dc->sli.h) == dc->sli.y) +#endif + { + if ((y0 >= ty) && (y0 <= by)) + { + if (dx < 0) + { + int tmp = x1; + + x1 = x0; + x0 = tmp; + } + + if (x0 < lx) x0 = lx; + if (x1 > rx) x1 = rx; + + len = x1 - x0 + 1; + p = dst->image.data + (dstw * y0) + x0; + sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); + if (sfunc) + sfunc(NULL, NULL, color, p, len); + } + } + return; + } + + pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); + if (!pfunc) return; + + if (dx == 0) + { + if ((x0 >= lx) && (x0 <= rx)) + { + if (y0 < ty) y0 = ty; + if (y1 > by) y1 = by; + + len = y1 - y0 + 1; + p = dst->image.data + (dstw * y0) + x0; + while (len--) + { +#ifdef EVAS_SLI + if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) +#endif + { + pfunc(0, 255, color, p); + } + p += dstw; + } + } + return; + } + + if ((dy == dx) || (dy == -dx)) + { + int p0_in, p1_in; + + p0_in = (IN_RECT(x0, y0, clx, cly, clw, clh) ? 1 : 0); + p1_in = (IN_RECT(x1, y1, clx, cly, clw, clh) ? 1 : 0); + + if (dy > 0) + { + if (!p0_in) + { + x0 = x0 + (ty - y0); + y0 = ty; + if (x0 > rx) return; + if (x0 < lx) + { + y0 = y0 + (lx - x0); + x0 = lx; + if ((y0 < ty) || (y0 > by)) return; + } + } + if (!p1_in) + { + x1 = x0 + (by - y0); + y1 = by; + if (x1 < lx) return; + if (x1 > rx) + { + y1 = y0 + (rx - x0); + x1 = rx; + if ((y1 < ty) || (y1 > by)) return; + } + } + } + else + { + if (!p0_in) + { + x0 = x0 - (by - y0); + y0 = by; + if (x0 > rx) return; + if (x0 < lx) + { + y0 = y0 - (lx - x0); + x0 = lx; + if ((y0 < ty) || (y0 > by)) return; + } + } + if (!p1_in) + { + x1 = x0 - (ty - y0); + y1 = ty; + if (x1 < lx) return; + if (x1 > rx) + { + y1 = y0 - (rx - x0); + x1 = rx; + if ((y1 < ty) || (y1 > by)) return; + } + } + } + if (y1 > y0) + { + p = dst->image.data + (dstw * y0) + x0; + len = y1 - y0 + 1; + if (dx > 0) dstw++; + else dstw--; + } + else + { + len = y0 - y1 + 1; + p = dst->image.data + (dstw * y1) + x1; + if (dx > 0) dstw--; + else dstw++; + } + + while (len--) + { +#ifdef EVAS_SLI + if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) +#endif + { + pfunc(0, 255, color, p); + } + p += dstw; + } + } +} + + +#define SETUP_LINE_SHALLOW \ + if (x0 > x1) \ + { \ + EXCHANGE_POINTS(x0, y0, x1, y1); \ + dx = -dx; \ + dy = -dy; \ + } \ + \ + px = x0; \ + py = y0; \ + \ + p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \ + p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \ + \ + dely = 1; \ + dh = dstw; \ + if (dy < 0) \ + { \ + dely = -1; \ + dh = -dstw; \ + } \ + \ + dyy = ((dy) << 16) / (dx); \ + \ + if (!p0_in) \ + { \ + dxx = ((dx) << 16) / (dy); \ + if (px < 0) \ + { \ + x = -px; px = 0; \ + yy = x * dyy; \ + y = yy >> 16; \ + if (!a_a) \ + y += (yy - (y << 16)) >> 15; \ + py += y; \ + if ((dely > 0) && (py >= clh)) \ + return; \ + else if ((dely < 0) && (py < -1)) \ + return; \ + } \ + \ + y = 0; \ + if ((dely > 0) && (py < 0)) \ + y = (-1 - py); \ + else if ((dely < 0) && (py >= clh)) \ + y = (clh - 1 - py); \ + \ + xx = y * dxx; \ + x = xx >> 16; \ + if (!a_a) \ + x += (xx - (x << 16)) >> 15; \ + px += x; \ + if (px >= clw) return; \ + \ + yy = x * dyy; \ + y = yy >> 16; \ + if (!a_a) \ + y += (yy - (y << 16)) >> 15; \ + py += y; \ + if ((dely > 0) && (py >= clh)) \ + return; \ + else if ((dely < 0) && (py < -1)) \ + return; \ + } \ + \ + p = data + (dstw * py) + px; \ + \ + x = px - x0; \ + yy = x * dyy; \ + prev_y = (yy >> 16); \ + \ + rx = MIN(x1 + 1, clw); \ + by = clh - 1; + + +#define SETUP_LINE_STEEP \ + if (y0 > y1) \ + { \ + EXCHANGE_POINTS(x0, y0, x1, y1); \ + dx = -dx; \ + dy = -dy; \ + } \ + \ + px = x0; \ + py = y0; \ + \ + p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \ + p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \ + \ + delx = 1; \ + if (dx < 0) \ + delx = -1; \ + \ + dxx = ((dx) << 16) / (dy); \ + \ + if (!p0_in) \ + { \ + dyy = ((dy) << 16) / (dx); \ + \ + if (py < 0) \ + { \ + y = -py; py = 0; \ + xx = y * dxx; \ + x = xx >> 16; \ + if (!a_a) \ + x += (xx - (x << 16)) >> 15; \ + px += x; \ + if ((delx > 0) && (px >= clw)) \ + return; \ + else if ((delx < 0) && (px < -1)) \ + return; \ + } \ + \ + x = 0; \ + if ((delx > 0) && (px < -1)) \ + x = (-1 - px); \ + else if ((delx < 0) && (px >= clw)) \ + x = (clw - 1 - px); \ + \ + yy = x * dyy; \ + y = yy >> 16; \ + if (!a_a) \ + y += (yy - (y << 16)) >> 15; \ + py += y; \ + if (py >= clh) return; \ + \ + xx = y * dxx; \ + x = xx >> 16; \ + if (!a_a) \ + x += (xx - (x << 16)) >> 15; \ + px += x; \ + if ((delx > 0) && (px >= clw)) \ + return; \ + else if ((delx < 0) && (px < -1)) \ + return; \ + } \ + \ + p = data + (dstw * py) + px; \ + \ + y = py - y0; \ + xx = y * dxx; \ + prev_x = (xx >> 16); \ + \ + by = MIN(y1 + 1, clh); \ + rx = clw - 1; + +static void +_evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) +{ + int px, py, x, y, prev_x, prev_y; + int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 0; + int delx, dely, xx, yy, dxx, dyy; + int clx, cly, clw, clh; + int dstw; + DATA32 *p, *data, color; + RGBA_Gfx_Pt_Func pfunc; + + dx = x1 - x0; + dy = y1 - y0; + + if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) + { + _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); + return; + } + + color = dc->col.col; + pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); + if (!pfunc) return; + + clx = dc->clip.x; + cly = dc->clip.y; + clw = dc->clip.w; + clh = dc->clip.h; + + data = dst->image.data; + dstw = dst->cache_entry.w; + + data += (dstw * cly) + clx; + x0 -= clx; + y0 -= cly; + x1 -= clx; + y1 -= cly; + + /* shallow: x-parametric */ + if ((dy < dx) || (dy < -dx)) + { + SETUP_LINE_SHALLOW; + + while (px < rx) + { + y = (yy >> 16); + y += ((yy - (y << 16)) >> 15); + if (prev_y != y) + { + prev_y = y; + p += dh; + py += dely; + } + if (!p1_in) + { + if ((py < 0) && (dely < 0)) return; + if ((py > by) && (dely > 0)) return; + } + if (!p0_in) + { + if (py < 0) goto next_x; + } +#ifdef EVAS_SLI + if (((py) % dc->sli.h) == dc->sli.y) +#endif + { + if (IN_RANGE(px, py, clw, clh)) + pfunc(0, 255, color, p); + } + next_x: + yy += dyy; + px++; + p++; + } + return; + } + + /* steep: y-parametric */ + + SETUP_LINE_STEEP; + + while (py < by) + { + x = (xx >> 16); + x += ((xx - (x << 16)) >> 15); + if (prev_x != x) + { + prev_x = x; + px += delx; + p += delx; + } + if (!p1_in) + { + if ((px < 0) && (delx < 0)) return; + if ((px > rx) && (delx > 0)) return; + } + if (!p0_in) + { + if (px < 0) goto next_y; + } +#ifdef EVAS_SLI + if (((py) % dc->sli.h) == dc->sli.y) +#endif + { + if (IN_RANGE(px, py, clw, clh)) + pfunc(0, 255, color, p); + } + next_y: + xx += dxx; + py++; + p += dstw; + } +} + + +static void +_evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) +{ + int px, py, x, y, prev_x, prev_y; + int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 1; + int delx, dely, xx, yy, dxx, dyy; + int clx, cly, clw, clh; + int dstw; + DATA32 *p, *data, color; + RGBA_Gfx_Pt_Func pfunc; + + if (y0 > y1) + EXCHANGE_POINTS(x0, y0, x1, y1); + dx = x1 - x0; + dy = y1 - y0; + + if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) + { + _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); + return; + } + + color = dc->col.col; + pfunc = evas_common_gfx_func_composite_mask_color_pt_get(color, dst, dc->render_op); + if (!pfunc) return; + + clx = dc->clip.x; + cly = dc->clip.y; + clw = dc->clip.w; + clh = dc->clip.h; + + data = evas_cache_image_pixels(&dst->cache_entry); + dstw = dst->cache_entry.w; + + data += (dstw * cly) + clx; + x0 -= clx; + y0 -= cly; + x1 -= clx; + y1 -= cly; + + /* shallow: x-parametric */ + if ((dy < dx) || (dy < -dx)) + { + SETUP_LINE_SHALLOW; + + while (px < rx) + { + DATA8 aa; + + y = (yy >> 16); + if (prev_y != y) + { + prev_y = y; + p += dh; + py += dely; + } + if (!p1_in) + { + if ((py < 0) && (dely < 0)) return; + if ((py > by) && (dely > 0)) return; + } + if (!p0_in) + { + if (py < 0) goto next_x; + } + if (px < clw) + { + aa = ((yy - (y << 16)) >> 8); + if ((py) < clh) + pfunc(0, 255 - aa, color, p); + if ((py + 1) < clh) + pfunc(0, aa, color, p + dstw); + } + + next_x: + yy += dyy; + px++; + p++; + } + return; + } + + /* steep: y-parametric */ + SETUP_LINE_STEEP; + + while (py < by) + { + DATA8 aa; + + x = (xx >> 16); + if (prev_x != x) + { + prev_x = x; + px += delx; + p += delx; + } + if (!p1_in) + { + if ((px < 0) && (delx < 0)) return; + if ((px > rx) && (delx > 0)) return; + } + if (!p0_in) + { + if (px < 0) goto next_y; + } + if (py < clh) + { + aa = ((xx - (x << 16)) >> 8); + if ((px) < clw) + pfunc(0, 255 - aa, color, p); + if ((px + 1) < clw) + pfunc(0, aa, color, p + 1); + } + next_y: + xx += dxx; + py++; + p += dstw; + } +} diff --git a/libraries/evas/src/lib/engines/common/evas_map_image.c b/libraries/evas/src/lib/engines/common/evas_map_image.c new file mode 100644 index 0000000..502b2dc --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_map_image.c @@ -0,0 +1,432 @@ +#include "evas_common.h" +#include "evas_blend_private.h" + +#ifdef BUILD_SCALE_SMOOTH +# ifdef BUILD_MMX +# undef SCALE_USING_MMX +# define SCALE_USING_MMX +# endif +#endif + +#define FPI 8 +#define FPI1 (1 << (FPI)) +#define FPIH (1 << (FPI - 1)) + +#define FPFPI1 (1 << (FP + FPI)) + +typedef struct _Line Line; +typedef struct _Span Span; + +struct _Span +{ + int x1, x2; + FPc o1, o2, z1, z2; + FPc u[2], v[2]; + DATA32 col[2]; +}; + +struct _Line +{ + Span span[2]; +}; + +static FPc +_interp(int x1, int x2, int p, FPc u1, FPc u2) +{ + FPc u; + + x2 -= x1; + p -= x1; + u = u2 - u1; + u = (u * p) / (x2 + 1); + // FIXME: do z persp + return u1 + u; +} + +static DATA32 +_interp_col(int x1, int x2, int p, DATA32 col1, DATA32 col2) +{ + x2 -= x1; + p -= x1; + p = (p << 8) / (x2 + 1); + // FIXME: do z persp + return INTERP_256(p, col2, col1); +} + +static void +_limit(Span *s, int c1, int c2, int nocol) +{ + if (s->x1 < c1) + { + s->u[0] = _interp(s->x1, s->x2, c1, s->u[0], s->u[1]); + s->v[0] = _interp(s->x1, s->x2, c1, s->v[0], s->v[1]); + if (!nocol) + s->col[0] = _interp_col(s->x1, s->x2, c1, s->col[0], s->col[1]); + s->x1 = c1; + s->o1 = c1 << FP; + // FIXME: do s->z1 + } + if (s->x2 > c2) + { + s->u[1] = _interp(s->x1, s->x2, c2, s->u[0], s->u[1]); + s->v[1] = _interp(s->x1, s->x2, c2, s->v[0], s->v[1]); + if (!nocol) + s->col[1] = _interp_col(s->x1, s->x2, c2, s->col[0], s->col[1]); + s->x2 = c2; + s->o2 = c2 << FP; + // FIXME: do s->z2 + } +} + +// 12.63 % of time - this can improve +static void +_calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy __UNUSED__, int cw, int ch __UNUSED__) +{ + int i, y, yp, yy; + int py[4]; + int edge[4][4], edge_num, swapped, order[4]; + FPc uv[4][2], u, v, x, h, t, uu, vv; + DATA32 col[4]; + +#if 1 // maybe faster on x86? + for (i = 0; i < 4; i++) py[i] = p[i].y >> FP; +# define PY(x) (py[x]) +#else +# define PY(x) (p[x].y >> FP) +#endif + + if ((PY(0) == PY(1)) && (PY(0) == PY(2)) && (PY(0) == PY(3))) + { + int leftp, rightp; + int nocol = 1; + + leftp = rightp = 0; + for (i = 1; i < 4; i++) + { + if (p[i].x < p[leftp].x) leftp = i; + if (p[i].x > p[rightp].x) rightp = i; + if (p[i].col != 0xffffffff) nocol = 0; + } + for (y = ystart; y <= yend; y++) + { + yp = y - ystart; + if (y == PY(0)) + { + i = 0; + spans[yp].span[i].x1 = p[leftp].x >> FP; + spans[yp].span[i].o1 = p[leftp].x; + spans[yp].span[i].u[0] = p[leftp].u; + spans[yp].span[i].v[0] = p[leftp].v; + spans[yp].span[i].col[0] = p[leftp].col; + spans[yp].span[i].x2 = p[rightp].x >> FP; + spans[yp].span[i].o2 = p[rightp].x; + spans[yp].span[i].u[1] = p[rightp].u; + spans[yp].span[i].v[1] = p[rightp].v; + spans[yp].span[i].col[1] = p[rightp].col; + if ((spans[yp].span[i].x1 >= (cx + cw)) || + (spans[yp].span[i].x2 < cx)) + spans[yp].span[i].x1 = -1; + else + { + _limit(&(spans[yp].span[i]), cx, cx + cw, nocol); + i++; + spans[yp].span[i].x1 = -1; + } + } + else + spans[yp].span[0].x1 = -1; + } + return; + } + for (y = ystart; y <= yend; y++) + { + int nocol = 1; + + yp = y - ystart; + edge_num = 0; + for (i = 0; i < 4; i++) + { + if ((PY(i) <= y) && (PY((i + 1) % 4) > y)) + { + edge[edge_num][0] = i; + edge[edge_num][1] = (i + 1) % 4; + edge_num++; + } + else if ((PY((i + 1) % 4) <= y) && (PY(i) > y)) + { + edge[edge_num][0] = (i + 1) % 4; + edge[edge_num][1] = i; + edge_num++; + } + if (p[i].col != 0xffffffff) nocol = 0; + } + // calculate line x points for each edge + for (i = 0; i < edge_num; i++) + { + int e1 = edge[i][0]; + int e2 = edge[i][1]; + FPc t256; + + h = (p[e2].y - p[e1].y) >> FP; // height of edge + if (h < 1) h = 1; + t = (((y << FP) + (FP1 / 2) - 1) - p[e1].y) >> FP; + x = p[e2].x - p[e1].x; + x = p[e1].x + ((x * t) / h); + +/* + // FIXME: 3d accuracy here + // XXX t needs adjusting. above its a linear interp point + // only. + // + // // FIXME: do in fixed pt. reduce divides + evas_common_cpu_end_opt(); + // + int foc = 512, z0 = 0, px = 320, py = 240; // FIXME: need from map points + // + float focf, hf; + float z1, z2, y1, y2, dz, dy, zt, dydz, yt; + + focf = foc; + hf = h; + + // adjust for fixed point and focal length and z0 for map + z1 = (p[e1].z >> FP) - z0 + foc; + z2 = (p[e2].z >> FP) - z0 + foc; + // deltas + dz = z1 - z2; + + if (dz != 0) + { + int pt; + + // adjust for perspective point (being 0 0) + y1 = (p[e1].y >> FP) - py; + y2 = (p[e2].y >> FP) - py; + + // correct for x &y not being in world coords - screen coords + y1 = (y1 * z1) / focf; + y2 = (y2 * z2) / focf; + + // deltas + dy = y1 - y2; + + yt = y - py; + dydz = dy / dz; + + zt = (y2 - (dydz * z2)) / ((yt / focf) - dydz); + + pt = t; + t = ((z1 - zt) * hf) / dz; + } + */ + u = p[e2].u - p[e1].u; + uu = u >> FP; + if (uu < 0) uu = -uu; + if (uu == h) + { + yy = ((y << FP) - p[e1].y) >> FP; + if (u > 0) + u = p[e1].u + (yy << FP); + else + u = p[e1].u - (yy << FP) - (FP1 - 1); + } + else + { + if (u >= 0) + u = p[e1].u + ((u * t) / h); + else + u = p[e1].u + (((u * t) - (FP1 / 2)) / h); + } + + v = p[e2].v - p[e1].v; + vv = v >> FP; + if (vv < 0) vv = -vv; + if (vv == h) + { + yy = ((y << FP) - p[e1].y) >> FP; + if (v > 0) + v = p[e1].v + (yy << FP); + else + v = p[e1].v - (yy << FP) - (FP1 - 1); + } + else + { + if (v >= 0) + v = p[e1].v + ((v * t) / h); + else + v = p[e1].v + (((v * t) - (FP1 / 2)) / h); + } + + // FIXME: 3d accuracy for color too + t256 = (t << 8) / h; // maybe * 255? + col[i] = INTERP_256(t256, p[e2].col, p[e1].col); + + // FIXME: store z persp + uv[i][1] = v; + uv[i][0] = u; + edge[i][2] = x >> FP; + edge[i][3] = x; + // also fill in order + order[i] = i; + } + // sort edges from left to right - bubble. its a small list! + do + { + swapped = 0; + for (i = 0; i < (edge_num - 1); i++) + { + if (edge[order[i]][2] > edge[order[i + 1]][2]) + { + t = order[i]; + order[i] = order[i + 1]; + order[i + 1] = t; + swapped = 1; + } + } + } + while (swapped); + if (edge_num == 2) + { + i = 0; + spans[yp].span[i].x1 = edge[order[0]][2]; + spans[yp].span[i].o1 = edge[order[0]][3]; + spans[yp].span[i].u[0] = uv[order[0]][0]; + spans[yp].span[i].v[0] = uv[order[0]][1]; + spans[yp].span[i].col[0] = col[order[0]]; + + spans[yp].span[i].x2 = edge[order[1]][2]; + spans[yp].span[i].o2 = edge[order[1]][3]; + spans[yp].span[i].u[1] = uv[order[1]][0]; + spans[yp].span[i].v[1] = uv[order[1]][1]; + spans[yp].span[i].col[1] = col[order[1]]; + if ((spans[yp].span[i].x1 >= (cx + cw)) || + (spans[yp].span[i].x2 < cx)) + spans[yp].span[i].x1 = -1; + else + { + _limit(&(spans[yp].span[i]), cx, cx + cw, nocol); + i++; + spans[yp].span[i].x1 = -1; + } + } + else if (edge_num == 4) + { + i = 0; + spans[yp].span[i].x1 = edge[order[0]][2]; + spans[yp].span[i].u[0] = uv[order[0]][0]; + spans[yp].span[i].v[0] = uv[order[0]][1]; + spans[yp].span[i].col[0] = col[order[0]]; + + spans[yp].span[i].x2 = edge[order[1]][2]; + spans[yp].span[i].u[1] = uv[order[1]][0]; + spans[yp].span[i].v[1] = uv[order[1]][1]; + spans[yp].span[i].col[1] = col[order[1]]; + if ((spans[yp].span[i].x1 >= (cx + cw)) || + (spans[yp].span[i].x2 < cx)) + spans[yp].span[i].x1 = -1; + else + { + _limit(&(spans[yp].span[i]), cx, cx + cw, nocol); + i++; + } + spans[yp].span[i].x1 = edge[order[2]][2]; + spans[yp].span[i].u[0] = uv[order[2]][0]; + spans[yp].span[i].v[0] = uv[order[2]][1]; + spans[yp].span[i].col[0] = col[order[2]]; + + spans[yp].span[i].x2 = edge[order[3]][2]; + spans[yp].span[i].u[1] = uv[order[3]][0]; + spans[yp].span[i].v[1] = uv[order[3]][1]; + spans[yp].span[i].col[1] = col[order[3]]; + if ((spans[yp].span[i].x1 >= (cx + cw)) || + (spans[yp].span[i].x2 < cx)) + spans[yp].span[i].x1 = -1; + else + { + int l = cx; + + if (i > 0) l = spans[yp].span[i - 1].x2; + _limit(&(spans[yp].span[i]), l, cx + cw, nocol); + } + } + else + spans[yp].span[0].x1 = -1; + } +} + +#ifdef BUILD_SCALE_SMOOTH +# ifdef BUILD_MMX +# undef FUNC_NAME +# define FUNC_NAME evas_common_map_rgba_internal_mmx +# undef SCALE_USING_MMX +# define SCALE_USING_MMX +# include "evas_map_image_internal.c" +# endif +# ifdef BUILD_C +# undef FUNC_NAME +# define FUNC_NAME evas_common_map_rgba_internal +# undef SCALE_USING_MMX +# include "evas_map_image_internal.c" +# endif +#endif + +EAPI void +evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, + int npoints __UNUSED__, RGBA_Map_Point *p, + int smooth, int level) +{ +#ifdef BUILD_MMX + int mmx, sse, sse2; +#endif + Cutout_Rects *rects; + Cutout_Rect *r; + int c, cx, cy, cw, ch; + int i; + + if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888) + evas_cache_image_load_data(&src->cache_entry); + evas_common_image_colorspace_normalize(src); + if (!src->image.data) return; +#ifdef BUILD_MMX + evas_common_cpu_can_do(&mmx, &sse, &sse2); +#endif + if ((!dc->cutout.rects) && (!dc->clip.use)) + { +#ifdef BUILD_MMX + if (mmx) + evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level); + else +#endif +#ifdef BUILD_C + evas_common_map_rgba_internal(src, dst, dc, p, smooth, level); +#endif + return; + } + /* save out clip info */ + c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; + evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); + /* our clip is 0 size.. abort */ + if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) + { + dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; + return; + } + rects = evas_common_draw_context_apply_cutouts(dc); + for (i = 0; i < rects->active; ++i) + { + r = rects->rects + i; + evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); +#ifdef BUILD_MMX + if (mmx) + evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level); + else +#endif +#ifdef BUILD_C + evas_common_map_rgba_internal(src, dst, dc, p, smooth, level); +#endif + } + evas_common_draw_context_apply_clear_cutouts(rects); + /* restore clip info */ + dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; +} diff --git a/libraries/evas/src/lib/engines/common/evas_map_image.h b/libraries/evas/src/lib/engines/common/evas_map_image.h new file mode 100644 index 0000000..a7cb8cf --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_map_image.h @@ -0,0 +1,10 @@ +#ifndef _EVAS_MAP_H +#define _EVAS_MAP_H + +EAPI void +evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, + int npoints, RGBA_Map_Point *points, + int smooth, int level); + +#endif /* _EVAS_MAP_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_map_image_core.c b/libraries/evas/src/lib/engines/common/evas_map_image_core.c new file mode 100644 index 0000000..b9bbeb5 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_map_image_core.c @@ -0,0 +1,226 @@ +//#undef SCALE_USING_MMX +{ + if (smooth) + { + for (y = ystart; y <= yend; y++) + { + int x, w, ww; + FPc u, v, ud, vd, dv, ue, ve; + DATA32 *d, *s; +#ifdef COLMUL + FPc cv, cd; // col +# ifdef SCALE_USING_MMX + FPc cc; +#endif + DATA32 c1, c2; // col +#endif + Line *line; + +#ifdef SCALE_USING_MMX + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) +#endif + + line = &(spans[y - ystart]); + for (i = 0; i < 2; i++) + { + Span *span; + + span = &(line->span[i]); + if (span->x1 >= 0) + { + long long tl; + + x = span->x1; + w = (span->x2 - x); + if (w <= 0) continue; + dv = (span->o2 - span->o1); + if (dv <= 0) continue; + + ww = w; + u = span->u[0] << FPI; + if (u < 0) u = 0; + else if (u > swp) u = swp; + v = span->v[0] << FPI; + if (v < 0) v = 0; + else if (v > shp) v = shp; + ue = span->u[1] << FPI; + if (ue < 0) ue = 0; + else if (ue > swp) ue = swp; + ve = span->v[1] << FPI; + if (ve < 0) ve = 0; + else if (ve > shp) ve = shp; + ud = (ue - u) / w; + vd = (ve - v) / w; + tl = (long long)ud * (w << FP); + tl = tl / dv; + ud = tl; + u -= (ud * (span->o1 - (span->x1 << FP))) / FP1; + + tl = (long long)vd * (w << FP); + tl = tl / dv; + vd = tl; + v -= (vd * (span->o1 - (span->x1 << FP))) / FP1; + + if (ud < 0) u += ud; + if (vd < 0) v += vd; + if (u < 0) u = 0; + else if (u >= swp) u = swp - 1; + if (v < 0) v = 0; + else if (v >= shp) v = shp - 1; + + if (direct) + d = dst->image.data + (y * dst->cache_entry.w) + x; + else + d = buf; + +#define SMOOTH 1 +#ifdef COLMUL + c1 = span->col[0]; // col + c2 = span->col[1]; // col + cv = 0; // col + cd = (255 << 16) / w; // col + + if (c1 == c2) + { + if (c1 == 0xffffffff) + { +#endif +#include "evas_map_image_loop.c" +#ifdef COLMUL + } + else if ((c1 == 0x0000ff) && (!src->cache_entry.flags.alpha)) + { + // all black line +# define COLBLACK 1 +# include "evas_map_image_loop.c" +# undef COLBLACK + } + else if (c1 == 0x000000) + { + // skip span + } + else + { + // generic loop +# include "evas_map_image_loop.c" + } + } + else + { +# include "evas_map_image_loop.c" + } +#endif + if (!direct) + { + d = dst->image.data; + d += (y * dst->cache_entry.w) + x; + func(buf, NULL, dc->mul.col, d, w); + } + } + else break; + } + } + } + else + { + for (y = ystart; y <= yend; y++) + { + int x, w, ww; + FPc u, v, ud, vd, ue, ve; + DATA32 *d, *s; +#ifdef COLMUL + FPc cv, cd; // col + DATA32 c1, c2; // col +#endif + Line *line; + + line = &(spans[y - ystart]); + for (i = 0; i < 2; i++) + { + Span *span; + + span = &(line->span[i]); + if (span->x1 >= 0) + { + x = span->x1; + w = (span->x2 - x); + + if (w <= 0) continue; + ww = w; + u = span->u[0] << FPI; + if (u < 0) u = 0; + else if (u > swp) u = swp; + v = span->v[0] << FPI; + if (v < 0) v = 0; + else if (v > shp) v = shp; + ue = span->u[1] << FPI; + if (ue < 0) ue = 0; + else if (ue > swp) ue = swp; + ve = span->v[1] << FPI; + if (ve < 0) ve = 0; + else if (ve > shp) ve = shp; + ud = (ue - u) / w; + vd = (ve - v) / w; + if (direct) + d = dst->image.data + (y * dst->cache_entry.w) + x; + else + d = buf; + + if (ud < 0) u += ud; + if (vd < 0) v += vd; + if (u < 0) u = 0; + else if (u >= swp) u = swp - 1; + if (v < 0) v = 0; + else if (v >= shp) v = shp - 1; + +#undef SMOOTH +#ifdef COLMUL + c1 = span->col[0]; // col + c2 = span->col[1]; // col + cv = 0; // col + cd = (255 << 16) / w; // col + + if (c1 == c2) + { + if (c1 == 0xffffffff) + { +#endif +#include "evas_map_image_loop.c" +#ifdef COLMUL + } + else if ((c1 == 0x0000ff) && (!src->cache_entry.flags.alpha)) + { + // all black line +# define COLBLACK 1 +# include "evas_map_image_loop.c" +# undef COLBLACK + } + else if (c1 == 0x000000) + { + // skip span + } + else + { + // generic loop +# include "evas_map_image_loop.c" + } + } + else + { + // generic loop +# include "evas_map_image_loop.c" + } +#endif + if (!direct) + { + d = dst->image.data; + d += (y * dst->cache_entry.w) + x; + func(buf, NULL, dc->mul.col, d, w); + } + } + else break; + } + } + } +} diff --git a/libraries/evas/src/lib/engines/common/evas_map_image_internal.c b/libraries/evas/src/lib/engines/common/evas_map_image_internal.c new file mode 100644 index 0000000..d60117e --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_map_image_internal.c @@ -0,0 +1,117 @@ +// 66.74 % of time +static void +FUNC_NAME(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, + RGBA_Map_Point *p, + int smooth, int level __UNUSED__) // level unused for now - for future use +{ + int i; + int c, cx, cy, cw, ch; + int ytop, ybottom, ystart, yend, y, sw, shp, swp, direct; + Line *spans; + DATA32 *buf = NULL, *sp; + RGBA_Gfx_Func func = NULL; + int havea = 0; + int havecol = 4; + + // get the clip + c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; + if (!c) + { + cx = 0; + cy = 0; + cw = dst->cache_entry.w; + ch = dst->cache_entry.h; + } + + // find y yop line and y bottom line + ytop = p[0].y; + if ((p[0].col >> 24) < 0xff) havea = 1; + if (p[0].col == 0xffffffff) havecol--; + for (i = 1; i < 4; i++) + { + if (p[i].y < ytop) ytop = p[i].y; + if ((p[i].col >> 24) < 0xff) havea = 1; + if (p[i].col == 0xffffffff) havecol--; + } + + ybottom = p[0].y; + for (i = 1; i < 4; i++) + { + if (p[i].y > ybottom) ybottom = p[i].y; + } + + // convert to screen space from fixed point + ytop = ytop >> FP; + ybottom = ybottom >> FP; + + // if its outside the clip vertical bounds - don't bother + if ((ytop >= (cy + ch)) || (ybottom < cy)) return; + + // limit to the clip vertical bounds + if (ytop < cy) ystart = cy; + else ystart = ytop; + if (ybottom >= (cy + ch)) yend = (cy + ch) - 1; + else yend = ybottom; + + // get some source image information + sp = src->image.data; + sw = src->cache_entry.w; + swp = sw << (FP + FPI); + shp = src->cache_entry.h << (FP + FPI); + + // limit u,v coords of points to be within the source image + for (i = 0; i < 4; i++) + { + if (p[i].u < 0) p[i].u = 0; + else if (p[i].u > (int)(src->cache_entry.w << FP)) + p[i].u = src->cache_entry.w << FP; + + if (p[i].v < 0) p[i].v = 0; + else if (p[i].v > (int)(src->cache_entry.h << FP)) + p[i].v = src->cache_entry.h << FP; + } + + // allocate some spans to hold out span list + spans = alloca((yend - ystart + 1) * sizeof(Line)); + if (!spans) return; + memset(spans, 0, (yend - ystart + 1) * sizeof(Line)); + + // calculate the spans list + _calc_spans(p, spans, ystart, yend, cx, cy, cw, ch); + + // walk through spans and render + + // if operation is solid, bypass buf and draw func and draw direct to dst + direct = 0; + if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha) && + (!dc->mul.use) && (!havea)) + { + direct = 1; + } + else + { + int pa; + + buf = alloca(cw * sizeof(DATA32)); + if (!buf) return; + pa = src->cache_entry.flags.alpha; + if (havea) src->cache_entry.flags.alpha = 1; + if (dc->mul.use) + func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, cw, dc->render_op); + else + func = evas_common_gfx_func_composite_pixel_span_get(src, dst, cw, dc->render_op); + src->cache_entry.flags.alpha = pa; + } + + if (!havecol) + { +#undef COLMUL +#include "evas_map_image_core.c" + } + else + { +#define COLMUL 1 +#include "evas_map_image_core.c" + } +} diff --git a/libraries/evas/src/lib/engines/common/evas_map_image_loop.c b/libraries/evas/src/lib/engines/common/evas_map_image_loop.c new file mode 100644 index 0000000..c434386 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_map_image_loop.c @@ -0,0 +1,116 @@ +#ifdef SMOOTH +{ + while (ww > 0) + { +# ifdef COLBLACK + *d = 0xff000000; // col +# else + FPc u1, v1, u2, v2; + FPc rv, ru; + DATA32 val1, val2, val3, val4; + + u1 = u; + if (u1 < 0) u1 = 0; + else if (u1 >= swp) u1 = swp - 1; + + v1 = v; + if (v1 < 0) v1 = 0; + else if (v1 >= shp) v1 = shp - 1; + + u2 = u1 + FPFPI1; + if (u2 >= swp) u2 = swp - 1; + + v2 = v1 + FPFPI1; + if (v2 >= shp) v2 = shp - 1; + + ru = (u >> (FP + FPI - 8)) & 0xff; + rv = (v >> (FP + FPI - 8)) & 0xff; + + s = sp + ((v1 >> (FP + FPI)) * sw) + + (u1 >> (FP + FPI)); + val1 = *s; + s = sp + ((v1 >> (FP + FPI)) * sw) + + (u2 >> (FP + FPI)); + val2 = *s; + + s = sp + ((v2 >> (FP + FPI)) * sw) + + (u1 >> (FP + FPI)); + val3 = *s; + s = sp + ((v2 >> (FP + FPI)) * sw) + + (u2 >> (FP + FPI)); + val4 = *s; +# ifdef SCALE_USING_MMX + MOV_A2R(rv, mm4); + MOV_A2R(ru, mm6); + MOV_P2R(val1, mm1, mm0); + if (val1 | val2) + { + MOV_P2R(val2, mm2, mm0); + INTERP_256_R2R(mm6, mm2, mm1, mm5); + } + MOV_P2R(val3, mm2, mm0); + if (val3 | val4) + { + MOV_P2R(val4, mm3, mm0); + INTERP_256_R2R(mm6, mm3, mm2, mm5); + } + INTERP_256_R2R(mm4, mm2, mm1, mm5); +# ifdef COLMUL + cc = cv >> 16; // col + cv += cd; // col + MOV_A2R(cc, mm2); // col + MOV_P2R(c1, mm3, mm0); // col + MOV_P2R(c2, mm4, mm0); // col + INTERP_256_R2R(mm2, mm4, mm3, mm5); // col + MUL4_SYM_R2R(mm3, mm1, mm5); // col +# endif + MOV_R2P(mm1, *d, mm0); +# else + val1 = INTERP_256(ru, val2, val1); + val3 = INTERP_256(ru, val4, val3); + val1 = INTERP_256(rv, val3, val1); // col +# ifdef COLMUL + val2 = INTERP_256((cv >> 16), c2, c1); // col + *d = MUL4_SYM(val2, val1); // col + cv += cd; // col +# else + *d = INTERP_256(rv, val3, val1); +# endif +# endif + u += ud; + v += vd; +# endif + d++; + ww--; + } +} +#else +{ + while (ww > 0) + { +# ifdef COLMUL +# ifndef COLBLACK + DATA32 val1, cval; // col +# endif +# endif +# ifdef COLBLACK + *d = 0xff000000; // col +# else + s = sp + ((v >> (FP + FPI)) * sw) + + (u >> (FP + FPI)); +# ifdef COLMUL + val1 = *s; // col + cval = INTERP_256((cv >> 16), c2, c1); // col + *d = MUL4_SYM(cval, val1); + cv += cd; // col +# else + *d = *s; +# endif + u += ud; + v += vd; +# endif + d++; + ww--; + } +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am new file mode 100644 index 0000000..78ce9fa --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am @@ -0,0 +1,13 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ +op_add_color_.c \ +op_add_color_i386.c \ +op_add_mask_color_.c \ +op_add_mask_color_i386.c \ +op_add_pixel_.c \ +op_add_pixel_color_.c \ +op_add_pixel_color_i386.c \ +op_add_pixel_i386.c \ +op_add_pixel_mask_.c \ +op_add_pixel_mask_i386.c diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in new file mode 100644 index 0000000..4c721f9 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in @@ -0,0 +1,543 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/engines/common/evas_op_add +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = \ +op_add_color_.c \ +op_add_color_i386.c \ +op_add_mask_color_.c \ +op_add_mask_color_i386.c \ +op_add_pixel_.c \ +op_add_pixel_color_.c \ +op_add_pixel_color_i386.c \ +op_add_pixel_i386.c \ +op_add_pixel_mask_.c \ +op_add_pixel_mask_i386.c + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_add/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_add/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c new file mode 100644 index 0000000..ace781b --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c @@ -0,0 +1,33 @@ +/* add color -> dst */ + +#ifdef BUILD_C +static void +init_add_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_add_color_pt_funcs_c(void) +{ +} +#endif + +/*-----*/ + +/* add_rel color -> dst */ + +#ifdef BUILD_C +static void +init_add_rel_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_add_rel_color_pt_funcs_c(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c new file mode 100644 index 0000000..f4f83a4 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c @@ -0,0 +1,33 @@ +/* add color -> dst */ + +#ifdef BUILD_MMX +static void +init_add_color_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_add_color_pt_funcs_mmx(void) +{ +} +#endif + +/*-----*/ + +/* add_rel color -> dst */ + +#ifdef BUILD_MMX +static void +init_add_rel_color_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_add_rel_color_pt_funcs_mmx(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c new file mode 100644 index 0000000..b20053c --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c @@ -0,0 +1,33 @@ +/* add mask x color -> dst */ + +#ifdef BUILD_C +static void +init_add_mask_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_add_mask_color_pt_funcs_c(void) +{ +} +#endif + +/*-----*/ + +/* add_rel mask x color -> dst */ + +#ifdef BUILD_C +static void +init_add_rel_mask_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_add_rel_mask_color_pt_funcs_c(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c new file mode 100644 index 0000000..6a86f86 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c @@ -0,0 +1,33 @@ +/* add mask x color -> dst */ + +#ifdef BUILD_MMX +static void +init_add_mask_color_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_add_mask_color_pt_funcs_mmx(void) +{ +} +#endif + +/*-----*/ + +/* add_rel mask x color -> dst */ + +#ifdef BUILD_MMX +static void +init_add_rel_mask_color_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_add_rel_mask_color_pt_funcs_mmx(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c new file mode 100644 index 0000000..4fe5a76 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c @@ -0,0 +1,33 @@ +/* add pixel --> dst */ + +#ifdef BUILD_C +static void +init_add_pixel_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_add_pixel_pt_funcs_c(void) +{ +} +#endif + +/*-----*/ + +/* add_rel pixel --> dst */ + +#ifdef BUILD_C +static void +init_add_rel_pixel_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_add_rel_pixel_pt_funcs_c(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c new file mode 100644 index 0000000..aa0dba1 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c @@ -0,0 +1,33 @@ +/* add pixel x color --> dst */ + +#ifdef BUILD_C +static void +init_add_pixel_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_add_pixel_color_pt_funcs_c(void) +{ +} +#endif + +/*-----*/ + +/* add_rel pixel x color --> dst */ + +#ifdef BUILD_C +static void +init_add_rel_pixel_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_add_rel_pixel_color_pt_funcs_c(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c new file mode 100644 index 0000000..fa382d9 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c @@ -0,0 +1,29 @@ +/* add pixel x color --> dst */ + +#ifdef BUILD_MMX +static void +init_add_pixel_color_span_funcs_mmx(void) +{ } +#endif + +#ifdef BUILD_MMX +static void +init_add_pixel_color_pt_funcs_mmx(void) +{ } +#endif + +/*-----*/ + +/* add_rel pixel x color --> dst */ + +#ifdef BUILD_MMX +static void +init_add_rel_pixel_color_span_funcs_mmx(void) +{ } +#endif + +#ifdef BUILD_MMX +static void +init_add_rel_pixel_color_pt_funcs_mmx(void) +{ } +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c new file mode 100644 index 0000000..eb2b5a3 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c @@ -0,0 +1,33 @@ +/* add pixel --> dst */ + +#ifdef BUILD_MMX +static void +init_add_pixel_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_add_pixel_pt_funcs_mmx(void) +{ +} +#endif + +/*-----*/ + +/* add_rel pixel --> dst */ + +#ifdef BUILD_MMX +static void +init_add_rel_pixel_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_add_rel_pixel_pt_funcs_mmx(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c new file mode 100644 index 0000000..8414bce --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c @@ -0,0 +1,37 @@ +/* add pixel x mask --> dst */ + +#ifdef BUILD_C +/* XXX: not used +static void +init_add_pixel_mask_span_funcs_c(void) +{ +} +*/ +#endif + +#ifdef BUILD_C +/* XXX: not used +static void +init_add_pixel_mask_pt_funcs_c(void) +{ +} +*/ +#endif + +/*-----*/ + +/* add_rel pixel x mask --> dst */ + +#ifdef BUILD_C +static void +init_add_rel_pixel_mask_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_add_rel_pixel_mask_pt_funcs_c(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c new file mode 100644 index 0000000..a6309c3 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c @@ -0,0 +1,33 @@ +/* add pixel x mask -> dst */ + +#ifdef BUILD_MMX +static void +init_add_pixel_mask_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_add_pixel_mask_pt_funcs_mmx(void) +{ +} +#endif + +/*-----*/ + +/* add_rel pixel x mask -> dst */ + +#ifdef BUILD_MMX +static void +init_add_rel_pixel_mask_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_add_rel_pixel_mask_pt_funcs_mmx(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add_main_.c b/libraries/evas/src/lib/engines/common/evas_op_add_main_.c new file mode 100644 index 0000000..ef8b728 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_add_main_.c @@ -0,0 +1,541 @@ +#include "evas_common.h" +static RGBA_Gfx_Func op_add_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +static RGBA_Gfx_Pt_Func op_add_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +static void op_add_init(void); +static void op_add_shutdown(void); + +static RGBA_Gfx_Func op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); + +static RGBA_Gfx_Pt_Func op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_add_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); + +static RGBA_Gfx_Compositor _composite_add = { "add", + op_add_init, op_add_shutdown, + op_add_pixel_span_get, op_add_color_span_get, + op_add_pixel_color_span_get, op_add_mask_color_span_get, + op_add_pixel_mask_span_get, + op_add_pixel_pt_get, op_add_color_pt_get, + op_add_pixel_color_pt_get, op_add_mask_color_pt_get, + op_add_pixel_mask_pt_get + }; + +RGBA_Gfx_Compositor * +evas_common_gfx_compositor_add_get(void) +{ + return &(_composite_add); +} + +static RGBA_Gfx_Func op_add_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +static RGBA_Gfx_Pt_Func op_add_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +static void op_add_rel_init(void); +static void op_add_rel_shutdown(void); + +static RGBA_Gfx_Func op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); + +static RGBA_Gfx_Pt_Func op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); + +static RGBA_Gfx_Compositor _composite_add_rel = { "add_rel", + op_add_rel_init, op_add_rel_shutdown, + op_add_rel_pixel_span_get, op_add_rel_color_span_get, + op_add_rel_pixel_color_span_get, op_add_rel_mask_color_span_get, + op_add_rel_pixel_mask_span_get, + op_add_rel_pixel_pt_get, op_add_rel_color_pt_get, + op_add_rel_pixel_color_pt_get, op_add_rel_mask_color_pt_get, + op_add_rel_pixel_mask_pt_get + }; + +RGBA_Gfx_Compositor * +evas_common_gfx_compositor_add_rel_get(void) +{ + return &(_composite_add_rel); +} + + +# include "./evas_op_add/op_add_pixel_.c" +# include "./evas_op_add/op_add_color_.c" +# include "./evas_op_add/op_add_pixel_color_.c" +# include "./evas_op_add/op_add_pixel_mask_.c" +# include "./evas_op_add/op_add_mask_color_.c" +//# include "./evas_op_add/op_add_pixel_mask_color_.c" + +# include "./evas_op_add/op_add_pixel_i386.c" +# include "./evas_op_add/op_add_color_i386.c" +# include "./evas_op_add/op_add_pixel_color_i386.c" +# include "./evas_op_add/op_add_pixel_mask_i386.c" +# include "./evas_op_add/op_add_mask_color_i386.c" +//# include "op_add_pixel_mask_color_.c" + +static void +op_add_init(void) +{ + memset(op_add_span_funcs, 0, sizeof(op_add_span_funcs)); + memset(op_add_pt_funcs, 0, sizeof(op_add_pt_funcs)); +#ifdef BUILD_MMX + init_add_pixel_span_funcs_mmx(); + init_add_pixel_color_span_funcs_mmx(); + init_add_pixel_mask_span_funcs_mmx(); + init_add_color_span_funcs_mmx(); + init_add_mask_color_span_funcs_mmx(); + + init_add_pixel_pt_funcs_mmx(); + init_add_pixel_color_pt_funcs_mmx(); + init_add_pixel_mask_pt_funcs_mmx(); + init_add_color_pt_funcs_mmx(); + init_add_mask_color_pt_funcs_mmx(); +#endif +#ifdef BUILD_C + init_add_pixel_span_funcs_c(); + init_add_pixel_color_span_funcs_c(); + init_add_rel_pixel_mask_span_funcs_c(); + init_add_color_span_funcs_c(); + init_add_mask_color_span_funcs_c(); + + init_add_pixel_pt_funcs_c(); + init_add_pixel_color_pt_funcs_c(); + init_add_rel_pixel_mask_pt_funcs_c(); + init_add_color_pt_funcs_c(); + init_add_mask_color_pt_funcs_c(); +#endif +} + +static void +op_add_shutdown(void) +{ +} + +static RGBA_Gfx_Func +add_gfx_span_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_add_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_add_span_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Func +op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +add_gfx_pt_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Pt_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_add_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_add_pt_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Pt_Func +op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_add_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_gfx_pt_func_cpu(s, m, c, d); +} + + + +static void +op_add_rel_init(void) +{ + memset(op_add_rel_span_funcs, 0, sizeof(op_add_rel_span_funcs)); + memset(op_add_rel_pt_funcs, 0, sizeof(op_add_rel_pt_funcs)); +#ifdef BUILD_MMX + init_add_rel_pixel_span_funcs_mmx(); + init_add_rel_pixel_color_span_funcs_mmx(); + init_add_rel_pixel_mask_span_funcs_mmx(); + init_add_rel_color_span_funcs_mmx(); + init_add_rel_mask_color_span_funcs_mmx(); + + init_add_rel_pixel_pt_funcs_mmx(); + init_add_rel_pixel_color_pt_funcs_mmx(); + init_add_rel_pixel_mask_pt_funcs_mmx(); + init_add_rel_color_pt_funcs_mmx(); + init_add_rel_mask_color_pt_funcs_mmx(); +#endif +#ifdef BUILD_C + init_add_rel_pixel_span_funcs_c(); + init_add_rel_pixel_color_span_funcs_c(); + init_add_rel_pixel_mask_span_funcs_c(); + init_add_rel_color_span_funcs_c(); + init_add_rel_mask_color_span_funcs_c(); + + init_add_rel_pixel_pt_funcs_c(); + init_add_rel_pixel_color_pt_funcs_c(); + init_add_rel_pixel_mask_pt_funcs_c(); + init_add_rel_color_pt_funcs_c(); + init_add_rel_mask_color_pt_funcs_c(); +#endif +} + +static void +op_add_rel_shutdown(void) +{ +} + +static RGBA_Gfx_Func +add_rel_gfx_span_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_add_rel_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_add_rel_span_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Func +op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +add_rel_gfx_pt_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Pt_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_add_rel_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_add_rel_pt_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Pt_Func +op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return add_rel_gfx_pt_func_cpu(s, m, c, d); +} diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am new file mode 100644 index 0000000..84add38 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am @@ -0,0 +1,50 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ +op_blend_color_.c \ +op_blend_color_i386.c \ +op_blend_color_neon.c \ +op_blend_color_sse3.c \ +op_blend_mask_color_.c \ +op_blend_mask_color_i386.c \ +op_blend_mask_color_neon.c \ +op_blend_mask_color_sse3.c \ +op_blend_pixel_.c \ +op_blend_pixel_color_.c \ +op_blend_pixel_color_i386.c \ +op_blend_pixel_color_neon.c \ +op_blend_pixel_color_sse3.c \ +op_blend_pixel_i386.c \ +op_blend_pixel_mask_.c \ +op_blend_pixel_mask_i386.c \ +op_blend_pixel_mask_neon.c \ +op_blend_pixel_mask_sse3.c \ +op_blend_pixel_neon.c \ +op_blend_pixel_sse3.c + +noinst_LTLIBRARIES = libevas_engine_common_op_blend_master_sse3.la + +libevas_engine_common_op_blend_master_sse3_la_SOURCES = \ +op_blend_master_sse3.c + +libevas_engine_common_op_blend_master_sse3_la_CFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/engines/common \ +-I$(top_srcdir)/src/lib/engines/common/evas_op_blend \ +-I$(top_srcdir)/src/lib/cserve \ +-I$(top_srcdir)/src/lib/include \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EET_CFLAGS@ @pthread_cflags@ \ +@WIN32_CFLAGS@ @EINA_CFLAGS@ \ +@FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EVAS_SSE3_CFLAGS@ + +libevas_engine_common_op_blend_master_sse3_la_DEPENENCIES = \ +$(top_builddir)/config.h + diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in new file mode 100644 index 0000000..e796ef2 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in @@ -0,0 +1,720 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/engines/common/evas_op_blend +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libevas_engine_common_op_blend_master_sse3_la_LIBADD = +am_libevas_engine_common_op_blend_master_sse3_la_OBJECTS = libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo +libevas_engine_common_op_blend_master_sse3_la_OBJECTS = \ + $(am_libevas_engine_common_op_blend_master_sse3_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +libevas_engine_common_op_blend_master_sse3_la_LINK = $(LIBTOOL) \ + $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) \ + $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_common_op_blend_master_sse3_la_SOURCES) +DIST_SOURCES = \ + $(libevas_engine_common_op_blend_master_sse3_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = \ +op_blend_color_.c \ +op_blend_color_i386.c \ +op_blend_color_neon.c \ +op_blend_color_sse3.c \ +op_blend_mask_color_.c \ +op_blend_mask_color_i386.c \ +op_blend_mask_color_neon.c \ +op_blend_mask_color_sse3.c \ +op_blend_pixel_.c \ +op_blend_pixel_color_.c \ +op_blend_pixel_color_i386.c \ +op_blend_pixel_color_neon.c \ +op_blend_pixel_color_sse3.c \ +op_blend_pixel_i386.c \ +op_blend_pixel_mask_.c \ +op_blend_pixel_mask_i386.c \ +op_blend_pixel_mask_neon.c \ +op_blend_pixel_mask_sse3.c \ +op_blend_pixel_neon.c \ +op_blend_pixel_sse3.c + +noinst_LTLIBRARIES = libevas_engine_common_op_blend_master_sse3.la +libevas_engine_common_op_blend_master_sse3_la_SOURCES = \ +op_blend_master_sse3.c + +libevas_engine_common_op_blend_master_sse3_la_CFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/engines/common \ +-I$(top_srcdir)/src/lib/engines/common/evas_op_blend \ +-I$(top_srcdir)/src/lib/cserve \ +-I$(top_srcdir)/src/lib/include \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EET_CFLAGS@ @pthread_cflags@ \ +@WIN32_CFLAGS@ @EINA_CFLAGS@ \ +@FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EVAS_SSE3_CFLAGS@ + +libevas_engine_common_op_blend_master_sse3_la_DEPENENCIES = \ +$(top_builddir)/config.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_blend/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_blend/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_common_op_blend_master_sse3.la: $(libevas_engine_common_op_blend_master_sse3_la_OBJECTS) $(libevas_engine_common_op_blend_master_sse3_la_DEPENDENCIES) + $(AM_V_CCLD)$(libevas_engine_common_op_blend_master_sse3_la_LINK) $(libevas_engine_common_op_blend_master_sse3_la_OBJECTS) $(libevas_engine_common_op_blend_master_sse3_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo: op_blend_master_sse3.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) $(CFLAGS) -MT libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo -MD -MP -MF $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Tpo -c -o libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo `test -f 'op_blend_master_sse3.c' || echo '$(srcdir)/'`op_blend_master_sse3.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Tpo $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='op_blend_master_sse3.c' object='libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) $(CFLAGS) -c -o libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo `test -f 'op_blend_master_sse3.c' || echo '$(srcdir)/'`op_blend_master_sse3.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c new file mode 100644 index 0000000..be70065 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c @@ -0,0 +1,109 @@ +/* blend color -> dst */ + +#ifdef BUILD_C +static void +_op_blend_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e, a = 256 - (c >> 24); + UNROLL8_PLD_WHILE(d, l, e, + { + *d = c + MUL_256(a, *d); + d++; + }); +} + +#define _op_blend_caa_dp _op_blend_c_dp + +#define _op_blend_c_dpan _op_blend_c_dp +#define _op_blend_caa_dpan _op_blend_c_dpan + +static void +init_blend_color_span_funcs_c(void) +{ + op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_c_dp; + op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_caa_dp; + + op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_c_dpan; + op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_blend_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = 256 - (c >> 24); + *d = c + MUL_256(s, *d); +} + +#define _op_blend_pt_caa_dp _op_blend_pt_c_dp + +#define _op_blend_pt_c_dpan _op_blend_pt_c_dp +#define _op_blend_pt_caa_dpan _op_blend_pt_c_dpan + +#define _op_blend_pt_c_dpas _op_blend_pt_c_dp +#define _op_blend_pt_caa_dpas _op_blend_pt_c_dp + +static void +init_blend_color_pt_funcs_c(void) +{ + op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_pt_c_dp; + op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_caa_dp; + + op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_c_dpan; + op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_caa_dpan; +} +#endif + +/*-----*/ + +/* blend_rel color -> dst */ + +#ifdef BUILD_C +static void +_op_blend_rel_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha = 256 - (c >> 24); + UNROLL8_PLD_WHILE(d, l, e, + { + *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); + d++; + }); +} + +#define _op_blend_rel_caa_dp _op_blend_rel_c_dp + +#define _op_blend_rel_c_dpan _op_blend_c_dpan +#define _op_blend_rel_caa_dpan _op_blend_caa_dpan + +static void +init_blend_rel_color_span_funcs_c(void) +{ + op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_rel_c_dp; + op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_caa_dp; + + op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_c_dpan; + op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_blend_rel_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = *d >> 24; + *d = MUL_SYM(s, c) + MUL_256(256 - (c >> 24), *d); +} + +#define _op_blend_rel_pt_caa_dp _op_blend_rel_pt_c_dp + +#define _op_blend_rel_pt_c_dpan _op_blend_pt_c_dpan +#define _op_blend_rel_pt_caa_dpan _op_blend_pt_caa_dpan + +static void +init_blend_rel_color_pt_funcs_c(void) +{ + op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_c_dp; + op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_caa_dp; + + op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_c_dpan; + op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_caa_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c new file mode 100644 index 0000000..a05af7d --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c @@ -0,0 +1,138 @@ +/* blend color --> dst */ + +#ifdef BUILD_MMX +static void +_op_blend_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + c = 256 - (c >> 24); + MOV_A2R(c, mm3) + while (d < e) { + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm3, mm1) + paddw_r2r(mm2, mm1); + MOV_R2P(mm1, *d, mm0) + d++; + } +} + +#define _op_blend_caa_dp_mmx _op_blend_c_dp_mmx + +#define _op_blend_c_dpan_mmx _op_blend_c_dp_mmx +#define _op_blend_caa_dpan_mmx _op_blend_c_dpan_mmx + +static void +init_blend_color_span_funcs_mmx(void) +{ + op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_c_dp_mmx; + op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_caa_dp_mmx; + + op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_c_dpan_mmx; + op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_blend_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + c = 256 - (c >> 24); + MOV_A2R(c, mm3) + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm3, mm1) + paddw_r2r(mm2, mm1); + MOV_R2P(mm1, *d, mm0) +} + +#define _op_blend_pt_caa_dp_mmx _op_blend_pt_c_dp_mmx + +#define _op_blend_pt_c_dpan_mmx _op_blend_pt_c_dp_mmx +#define _op_blend_pt_caa_dpan_mmx _op_blend_pt_c_dpan_mmx + +static void +init_blend_color_pt_funcs_mmx(void) +{ + op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_c_dp_mmx; + op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_caa_dp_mmx; + + op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_c_dpan_mmx; + op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_caa_dpan_mmx; +} +#endif +/*-----*/ + +/* blend_rel color -> dst */ + +#ifdef BUILD_MMX +static void +_op_blend_rel_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + c = 256 - (c >> 24); + MOV_A2R(c, mm3) + MOV_A2R(ALPHA_255, mm5) + while (d < e) { + MOV_P2R(*d, mm1, mm0) + MOV_RA2R(mm1, mm4) + MUL4_256_R2R(mm3, mm1) + MUL4_SYM_R2R(mm2, mm4, mm5) + paddw_r2r(mm4, mm1); + MOV_R2P(mm1, *d, mm0) + d++; + } +} + +#define _op_blend_rel_caa_dp_mmx _op_blend_rel_c_dp_mmx + +#define _op_blend_rel_c_dpan_mmx _op_blend_c_dpan_mmx +#define _op_blend_rel_caa_dpan_mmx _op_blend_caa_dpan_mmx + +static void +init_blend_rel_color_span_funcs_mmx(void) +{ + op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_rel_c_dp_mmx; + op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_rel_caa_dp_mmx; + + op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_c_dpan_mmx; + op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_blend_rel_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + MOV_A2R(ALPHA_255, mm5) + + MOV_P2R(c, mm2, mm0) + MOV_RA2R(mm2, mm1) + psubw_r2r(mm1, mm6); + + MOV_P2R(*d, mm1, mm0) + MOV_RA2R(mm1, mm4) + MUL4_256_R2R(mm6, mm1) + + MUL4_SYM_R2R(mm4, mm2, mm5) + paddw_r2r(mm2, mm1); + MOV_R2P(mm1, *d, mm0) +} + +#define _op_blend_rel_pt_caa_dp_mmx _op_blend_rel_pt_c_dp_mmx + +#define _op_blend_rel_pt_c_dpan_mmx _op_blend_pt_c_dpan_mmx +#define _op_blend_rel_pt_caa_dpan_mmx _op_blend_pt_caa_dpan_mmx + +static void +init_blend_rel_color_pt_funcs_mmx(void) +{ + op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_rel_pt_c_dp_mmx; + op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_rel_pt_caa_dp_mmx; + + op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_c_dpan_mmx; + op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_caa_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c new file mode 100644 index 0000000..53b9991 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c @@ -0,0 +1,223 @@ +/* blend color --> dst */ + +#ifdef BUILD_NEON +static void +_op_blend_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e, *tmp = 0; +#define AP "B_C_DP" + asm volatile ( + ".fpu neon \n\t" + "vdup.u32 q6, %[c] \n\t" + "vmov.i8 q5, #1 \n\t" + "vmvn.u8 q7,q6 \n\t" + "vshr.u32 q7, q7, $0x18 \n\t" + "vmul.u32 q7,q5, q7 \n\t" + "bic %[e], #3 \n\t" + "bic %[d], #3 \n\t" + + AP "loopchoose: \n\t" + // If aligned already - straight to quads + "andS %[tmp], %[d],$0x1f \n\t" + "beq "AP"quadloops \n\t" + + "andS %[tmp], %[d],$0x4 \n\t" + "beq "AP"dualloop \n\t" + + // Only ever executes once, fall through to dual + AP "singleloop: \n\t" + // Use 'tmp' not 'd' + "vld1.32 d0[0], [%[d]] \n\t" + // Only touch d1 + "vmull.u8 q0, d0, d14 \n\t" + "vqrshrn.u16 d0, q0, #8 \n\t" + "vadd.u8 d0, d12, d0 \n\t" + "vst1.32 d0[0], [%[d]] \n\t" + + "add %[d], #4 \n\t" + + // Can we go the fast path? + "andS %[tmp], %[d],$0x1f \n\t" + "beq "AP"quadloops \n\t" + + AP "dualloop: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #32 \n\t" + "blt "AP"loopout \n\t" + + + AP "dualloopint: \n\t" + "vldr.32 d0, [%[d]] \n\t" + "vmull.u8 q1, d0, d14 \n\t" + "vqrshrn.u16 d0, q1, #8 \n\t" + "vqadd.u8 d0, d0, d12 \n\t" + + "vstm %[d]!, {d0} \n\t" + + "ands %[tmp], %[d], $0x1f \n\t" + "bne "AP"dualloopint \n\t" + + AP "quadloops: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #32 \n\t" + "blt "AP"loopout \n\t" + + "sub %[tmp],%[e],#31 \n\t" + + AP "quadloopint:\n\t" + "vldm %[d], {d0,d1,d2,d3} \n\t" + + "vmull.u8 q2, d0, d14 \n\t" + "vmull.u8 q3, d1, d15 \n\t" + "vmull.u8 q4, d2, d14 \n\t" + "vmull.u8 q5, d3, d15 \n\t" + + "vqrshrn.u16 d0, q2, #8 \n\t" + "vqrshrn.u16 d1, q3, #8 \n\t" + "vqrshrn.u16 d2, q4, #8 \n\t" + "vqrshrn.u16 d3, q5, #8 \n\t" + + "vqadd.u8 q0, q6, q0 \n\t" + "vqadd.u8 q1, q6, q1 \n\t" + + "vstm %[d]!, {d0,d1,d2,d3} \n\t" + + "cmp %[tmp], %[d]\n\t" + "bhi "AP"quadloopint\n\t" + + AP "loopout: \n\t" + "cmp %[d], %[e]\n\t" + "beq "AP"done\n\t" + "sub %[tmp],%[e], %[d] \n\t" + "cmp %[tmp],#8 \n\t" + "blt "AP"singleloop2 \n\t" + + AP "dualloop2: \n\t" + "sub %[tmp],%[e],$0x7 \n\t" + AP "dualloop2int: \n\t" + "vldr.64 d0, [%[d]] \n\t" + "vmull.u8 q1, d0, d14 \n\t" + "vqrshrn.u16 d0, q1, #8 \n\t" + "vqadd.u8 d0, d0, d12 \n\t" + + "vstr.64 d0, [%[d]] \n\t" + + "add %[d], #8 \n\t" + "cmp %[tmp], %[d] \n\t" + "bhi "AP"dualloop2int \n\t" + + // Single ?? + "cmp %[e], %[d] \n\t" + "beq "AP"done \n\t" + + AP "singleloop2: \n\t" + "vld1.32 d0[0], [%[d]] \n\t" + "vmull.u8 q1, d0, d14 \n\t" + "vqrshrn.u16 d0, q1, #8 \n\t" + "vqadd.u8 d0, d0, d12 \n\t" + + "vst1.32 d0[0], [%[d]] \n\t" + + AP "done:\n\t" + + : // output regs + // Input + : [e] "r" (e = d + l), [d] "r" (d), [c] "r" (c), [tmp] "r" (tmp) + : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","memory" // clobbered + + ); +#undef AP + +} + +#define _op_blend_caa_dp_neon _op_blend_c_dp_neon + +#define _op_blend_c_dpan_neon _op_blend_c_dp_neon +#define _op_blend_caa_dpan_neon _op_blend_c_dpan_neon + +static void +init_blend_color_span_funcs_neon(void) +{ + op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_c_dp_neon; + op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_caa_dp_neon; + + op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_c_dpan_neon; + op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_blend_pt_c_dp_neon(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = 256 - (c >> 24); + *d = c + MUL_256(s, *d); +} + +#define _op_blend_pt_caa_dp_neon _op_blend_pt_c_dp_neon + +#define _op_blend_pt_c_dpan_neon _op_blend_pt_c_dp_neon +#define _op_blend_pt_caa_dpan_neon _op_blend_pt_c_dpan_neon + +static void +init_blend_color_pt_funcs_neon(void) +{ + op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_c_dp_neon; + op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_caa_dp_neon; + + op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_c_dpan_neon; + op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_caa_dpan_neon; +} +#endif +/*-----*/ + +/* blend_rel color -> dst */ + +#ifdef BUILD_NEON +static void +_op_blend_rel_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha = 256 - (c >> 24); + UNROLL8_PLD_WHILE(d, l, e, + { + *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); + d++; + }); +} + +#define _op_blend_rel_caa_dp_neon _op_blend_rel_c_dp_neon + +#define _op_blend_rel_c_dpan_neon _op_blend_c_dpan_neon +#define _op_blend_rel_caa_dpan_neon _op_blend_caa_dpan_neon + +static void +init_blend_rel_color_span_funcs_neon(void) +{ + op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_rel_c_dp_neon; + op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_rel_caa_dp_neon; + + op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_c_dpan_neon; + op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_blend_rel_pt_c_dp_neon(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = *d >> 24; + *d = MUL_SYM(s, c) + MUL_256(256 - (c >> 24), *d); +} + +#define _op_blend_rel_pt_caa_dp_neon _op_blend_rel_pt_c_dp_neon + +#define _op_blend_rel_pt_c_dpan_neon _op_blend_pt_c_dpan_neon +#define _op_blend_rel_pt_caa_dpan_neon _op_blend_pt_caa_dpan_neon + +static void +init_blend_rel_color_pt_funcs_neon(void) +{ + op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_rel_pt_c_dp_neon; + op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_rel_pt_caa_dp_neon; + + op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_c_dpan_neon; + op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_caa_dpan_neon; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c new file mode 100644 index 0000000..64d5a86 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c @@ -0,0 +1,166 @@ +/* blend color -> dst */ + +#ifdef BUILD_SSE3 + +static void +_op_blend_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + + DATA32 a = 256 - (c >> 24); + + const __m128i c_packed = _mm_set_epi32(c, c, c, c); + const __m128i a_packed = _mm_set_epi32(a, a, a, a); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + *d = c + MUL_256(a, *d); + d++; l--; + }, + { /* A4OP */ + + __m128i d0 = _mm_load_si128((__m128i *)d); + + d0 = mul_256_sse3(a_packed, d0); + d0 = _mm_add_epi32(d0, c_packed); + + _mm_store_si128((__m128i *)d, d0); + + d += 4; l -= 4; + }, + { /* A8OP */ + + __m128i d0 = _mm_load_si128((__m128i *)d); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + d0 = mul_256_sse3(a_packed, d0); + d1 = mul_256_sse3(a_packed, d1); + + d0 = _mm_add_epi32(d0, c_packed); + d1 = _mm_add_epi32(d1, c_packed); + + _mm_store_si128((__m128i *)d, d0); + _mm_store_si128((__m128i *)(d+4), d1); + + d += 8; l -= 8; + }) +} + +#define _op_blend_caa_dp_sse3 _op_blend_c_dp_sse3 + +#define _op_blend_c_dpan_sse3 _op_blend_c_dp_sse3 +#define _op_blend_caa_dpan_sse3 _op_blend_c_dpan_sse3 + +static void +init_blend_color_span_funcs_sse3(void) +{ + op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_c_dp_sse3; + op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_caa_dp_sse3; + +// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) +// op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_c_dpan_sse3; + op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_caa_dpan_sse3; +} + +#define _op_blend_pt_c_dp_sse3 NULL +#define _op_blend_pt_caa_dp_sse3 _op_blend_pt_c_dp_sse3 + +#define _op_blend_pt_c_dpan_sse3 _op_blend_pt_c_dp_sse3 +#define _op_blend_pt_caa_dpan_sse3 _op_blend_pt_c_dpan_sse3 + +#define _op_blend_pt_c_dpas_sse3 _op_blend_pt_c_dp_sse3 +#define _op_blend_pt_caa_dpas_sse3 _op_blend_pt_c_dp_sse3 + +static void +init_blend_color_pt_funcs_sse3(void) +{ + op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_c_dp_sse3; + op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_caa_dp_sse3; + + op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_c_dpan_sse3; + op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_caa_dpan_sse3; +} + + +/*-----*/ + +/* blend_rel color -> dst */ + +static void +_op_blend_rel_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + + int alpha = 256 - (c >> 24); + + const __m128i c_packed = _mm_set_epi32(c, c, c, c); + const __m128i alpha_packed = _mm_set_epi32(alpha, alpha, alpha, alpha); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); + d++; l--; + }, + { /* A4OP */ + + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i mul0 = mul_256_sse3(alpha_packed, d0); + __m128i sym0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c_packed); + + d0 = _mm_add_epi32(mul0, sym0); + + _mm_store_si128((__m128i *)d, d0); + + d += 4; l -= 4; + }, + { /* A8OP */ + + __m128i d0 = _mm_load_si128((__m128i *)d); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i mul0 = mul_256_sse3(alpha_packed, d0); + __m128i mul1 = mul_256_sse3(alpha_packed, d1); + + __m128i sym0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c_packed); + __m128i sym1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), c_packed); + + d0 = _mm_add_epi32(mul0, sym0); + d1 = _mm_add_epi32(mul1, sym1); + + _mm_store_si128((__m128i *)d, d0); + _mm_store_si128((__m128i *)(d+4), d1); + + d += 8; l -= 8; + }) +} + +#define _op_blend_rel_caa_dp_sse3 _op_blend_rel_c_dp_sse3 +#define _op_blend_rel_c_dpan_sse3 _op_blend_c_dpan_sse3 +#define _op_blend_rel_caa_dpan_sse3 _op_blend_caa_dpan_sse3 + +static void +init_blend_rel_color_span_funcs_sse3(void) +{ + op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_c_dp_sse3; + op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_caa_dp_sse3; + + op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_c_dpan_sse3; + op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_caa_dpan_sse3; +} + +#define _op_blend_rel_pt_c_dp_sse3 NULL +#define _op_blend_rel_pt_caa_dp_sse3 _op_blend_rel_pt_c_dp_sse3 + +#define _op_blend_rel_pt_c_dpan_sse3 _op_blend_pt_c_dpan_sse3 +#define _op_blend_rel_pt_caa_dpan_sse3 _op_blend_pt_caa_dpan_sse3 + +static void +init_blend_rel_color_pt_funcs_sse3(void) +{ + op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_c_dp_sse3; + op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_caa_dp_sse3; + + op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_c_dpan_sse3; + op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_caa_dpan_sse3; +} + +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c new file mode 100644 index 0000000..12a0a75 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c @@ -0,0 +1,185 @@ +/* blend mask x color -> dst */ + +#ifdef BUILD_C +static void +_op_blend_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha = 256 - (c >> 24); + UNROLL8_PLD_WHILE(d, l, e, + { + DATA32 a = *m; + switch(a) + { + case 0: + break; + case 255: + *d = c + MUL_256(alpha, *d); + break; + default: + { + DATA32 mc = MUL_SYM(a, c); + a = 256 - (mc >> 24); + *d = mc + MUL_256(a, *d); + } + break; + } + m++; d++; + }); +} + +static void +_op_blend_mas_can_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + alpha = *m; + switch(alpha) + { + case 0: + break; + case 255: + *d = c; + break; + default: + alpha++; + *d = INTERP_256(alpha, c, *d); + break; + } + m++; d++; + }); +} + +#define _op_blend_mas_cn_dp _op_blend_mas_can_dp +#define _op_blend_mas_caa_dp _op_blend_mas_c_dp + +#define _op_blend_mas_c_dpan _op_blend_mas_c_dp +#define _op_blend_mas_cn_dpan _op_blend_mas_cn_dp +#define _op_blend_mas_can_dpan _op_blend_mas_can_dp +#define _op_blend_mas_caa_dpan _op_blend_mas_caa_dp + +static void +init_blend_mask_color_span_funcs_c(void) +{ + op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_mas_c_dp; + op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_mas_cn_dp; + op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_mas_can_dp; + op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_mas_caa_dp; + + op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_mas_c_dpan; + op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_mas_cn_dpan; + op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_mas_can_dpan; + op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_mas_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_blend_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = MUL_SYM(m, c); + m = 256 - (s >> 24); + *d = s + MUL_256(m, *d); +} + +static void +_op_blend_pt_mas_can_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { + *d = INTERP_256(m + 1, c, *d); +} + +#define _op_blend_pt_mas_cn_dp _op_blend_pt_mas_can_dp +#define _op_blend_pt_mas_caa_dp _op_blend_pt_mas_c_dp + +#define _op_blend_pt_mas_c_dpan _op_blend_pt_mas_c_dp +#define _op_blend_pt_mas_cn_dpan _op_blend_pt_mas_cn_dp +#define _op_blend_pt_mas_can_dpan _op_blend_pt_mas_can_dp +#define _op_blend_pt_mas_caa_dpan _op_blend_pt_mas_caa_dp + +static void +init_blend_mask_color_pt_funcs_c(void) +{ + op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_pt_mas_c_dp; + op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_mas_cn_dp; + op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_pt_mas_can_dp; + op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_pt_mas_caa_dp; + + op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_pt_mas_c_dpan; + op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_mas_cn_dpan; + op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_pt_mas_can_dpan; + op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_pt_mas_caa_dpan; +} +#endif + +/*-----*/ + +/* blend_rel mask x color --> dst */ + +#ifdef BUILD_C +static void +_op_blend_rel_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + DATA32 mc = MUL_SYM(*m, c); + alpha = 256 - (mc >> 24); + *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d); + d++; + m++; + }); +} + +#define _op_blend_rel_mas_cn_dp _op_blend_rel_mas_c_dp +#define _op_blend_rel_mas_can_dp _op_blend_rel_mas_c_dp +#define _op_blend_rel_mas_caa_dp _op_blend_rel_mas_c_dp + +#define _op_blend_rel_mas_c_dpan _op_blend_mas_c_dpan +#define _op_blend_rel_mas_cn_dpan _op_blend_mas_cn_dpan +#define _op_blend_rel_mas_can_dpan _op_blend_mas_can_dpan +#define _op_blend_rel_mas_caa_dpan _op_blend_mas_caa_dpan + +static void +init_blend_rel_mask_color_span_funcs_c(void) +{ + op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_rel_mas_c_dp; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_mas_can_dp; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_rel_mas_can_dp; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_rel_mas_caa_dp; + + op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_rel_mas_c_dpan; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_mas_cn_dpan; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_rel_mas_can_dpan; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_rel_mas_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_blend_rel_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = MUL_SYM(m, c); + c = 256 - (s >> 24); + *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); +} + +#define _op_blend_rel_pt_mas_cn_dp _op_blend_rel_pt_mas_c_dp +#define _op_blend_rel_pt_mas_can_dp _op_blend_rel_pt_mas_c_dp +#define _op_blend_rel_pt_mas_caa_dp _op_blend_rel_pt_mas_c_dp + +#define _op_blend_rel_pt_mas_c_dpan _op_blend_pt_mas_c_dpan +#define _op_blend_rel_pt_mas_cn_dpan _op_blend_pt_mas_cn_dpan +#define _op_blend_rel_pt_mas_can_dpan _op_blend_pt_mas_can_dpan +#define _op_blend_rel_pt_mas_caa_dpan _op_blend_pt_mas_caa_dpan + +static void +init_blend_rel_mask_color_pt_funcs_c(void) +{ + op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_rel_pt_mas_c_dp; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_mas_cn_dp; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_rel_pt_mas_can_dp; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_rel_pt_mas_caa_dp; + + op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_rel_pt_mas_c_dpan; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_mas_cn_dpan; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_mas_can_dpan; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_mas_caa_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c new file mode 100644 index 0000000..f8fe02e --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c @@ -0,0 +1,251 @@ +/* blend mask x color -> dst */ + +#ifdef BUILD_MMX +static void +_op_blend_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + MOV_P2R(c, mm2, mm0) + c = 256 - (c >> 24); + MOV_A2R(c, mm4) + while (d < e) { + l = *m; + switch(l) + { + case 0: + break; + case 255: + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm4, mm1) + paddw_r2r(mm2, mm1); + MOV_R2P(mm1, *d, mm0) + break; + default: + l++; + MOV_A2R(l, mm3) + MUL4_256_R2R(mm2, mm3) + + MOV_RA2R(mm3, mm1) + movq_r2r(mm6, mm7); + psubw_r2r(mm1, mm7); + + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm7, mm1) + + paddw_r2r(mm3, mm1); + MOV_R2P(mm1, *d, mm0) + break; + } + m++; d++; + } +} + +static void +_op_blend_mas_can_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + MOV_A2R(ALPHA_255, mm5) + while (d < e) { + l = *m; + switch(l) + { + case 0: + break; + case 255: + *d = c; + break; + default: + l++; + MOV_A2R(l, mm3) + MOV_P2R(*d, mm1, mm0) + movq_r2r(mm2, mm4); + INTERP_256_R2R(mm3, mm4, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + break; + } + m++; d++; + } +} + +#define _op_blend_mas_cn_dp_mmx _op_blend_mas_can_dp_mmx +#define _op_blend_mas_caa_dp_mmx _op_blend_mas_c_dp_mmx + +#define _op_blend_mas_c_dpan_mmx _op_blend_mas_c_dp_mmx +#define _op_blend_mas_cn_dpan_mmx _op_blend_mas_cn_dp_mmx +#define _op_blend_mas_can_dpan_mmx _op_blend_mas_can_dp_mmx +#define _op_blend_mas_caa_dpan_mmx _op_blend_mas_caa_dp_mmx + +static void +init_blend_mask_color_span_funcs_mmx(void) +{ + op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_mas_c_dp_mmx; + op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_mas_cn_dp_mmx; + op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_mas_can_dp_mmx; + op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_mas_caa_dp_mmx; + + op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_mas_c_dpan_mmx; + op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_mas_cn_dpan_mmx; + op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_mas_can_dpan_mmx; + op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_mas_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_blend_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = m + 1; + MOV_A2R(s, mm3) + MOV_A2R(ALPHA_256, mm6) + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + MUL4_256_R2R(mm2, mm3) + + MOV_RA2R(mm3, mm1) + psubw_r2r(mm1, mm6); + + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm6, mm1) + + paddw_r2r(mm3, mm1); + MOV_R2P(mm1, *d, mm0) +} + + +#define _op_blend_pt_mas_cn_dp_mmx _op_blend_pt_mas_c_dp_mmx +#define _op_blend_pt_mas_can_dp_mmx _op_blend_pt_mas_c_dp_mmx +#define _op_blend_pt_mas_caa_dp_mmx _op_blend_pt_mas_c_dp_mmx + +#define _op_blend_pt_mas_c_dpan_mmx _op_blend_pt_mas_c_dp_mmx +#define _op_blend_pt_mas_cn_dpan_mmx _op_blend_pt_mas_cn_dp_mmx +#define _op_blend_pt_mas_can_dpan_mmx _op_blend_pt_mas_can_dp_mmx +#define _op_blend_pt_mas_caa_dpan_mmx _op_blend_pt_mas_caa_dp_mmx + +static void +init_blend_mask_color_pt_funcs_mmx(void) +{ + op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_pt_mas_c_dp_mmx; + op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_mas_cn_dp_mmx; + op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_pt_mas_can_dp_mmx; + op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_pt_mas_caa_dp_mmx; + + op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_pt_mas_c_dpan_mmx; + op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_mas_cn_dpan_mmx; + op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_mas_can_dpan_mmx; + op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_mas_caa_dpan_mmx; +} +#endif + +/*-----*/ + +/* blend_rel mask x color -> dst */ + +#ifdef BUILD_MMX +static void +_op_blend_rel_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + MOV_A2R(ALPHA_255, mm5) + MOV_P2R(c, mm2, mm0) + while (d < e) { + l = *m; + switch(l) + { + case 0: + break; + default: + l++; + MOV_A2R(l, mm3) + MUL4_256_R2R(mm2, mm3) + + MOV_RA2R(mm3, mm1) + movq_r2r(mm6, mm7); + psubw_r2r(mm1, mm7); + + MOV_P2R(*d, mm1, mm0) + MOV_RA2R(mm1, mm4) + MUL4_256_R2R(mm7, mm1) + + MUL4_SYM_R2R(mm4, mm3, mm5) + + paddw_r2r(mm3, mm1); + MOV_R2P(mm1, *d, mm0) + break; + } + m++; d++; + } +} + +#define _op_blend_rel_mas_cn_dp_mmx _op_blend_rel_mas_c_dp_mmx +#define _op_blend_rel_mas_can_dp_mmx _op_blend_rel_mas_c_dp_mmx +#define _op_blend_rel_mas_caa_dp_mmx _op_blend_rel_mas_c_dp_mmx + +#define _op_blend_rel_mas_c_dpan_mmx _op_blend_mas_c_dpan_mmx +#define _op_blend_rel_mas_cn_dpan_mmx _op_blend_mas_cn_dpan_mmx +#define _op_blend_rel_mas_can_dpan_mmx _op_blend_mas_can_dpan_mmx +#define _op_blend_rel_mas_caa_dpan_mmx _op_blend_mas_caa_dpan_mmx + +static void +init_blend_rel_mask_color_span_funcs_mmx(void) +{ + op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_rel_mas_c_dp_mmx; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_rel_mas_cn_dp_mmx; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_rel_mas_can_dp_mmx; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_rel_mas_caa_dp_mmx; + + op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_rel_mas_c_dpan_mmx; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_mas_cn_dpan_mmx; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_mas_can_dpan_mmx; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_mas_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_blend_rel_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + MOV_A2R(ALPHA_255, mm5) + s = m + 1; + MOV_A2R(s, mm3) + MOV_P2R(c, mm2, mm0) + MUL4_256_R2R(mm2, mm3) + + MOV_RA2R(mm3, mm1) + psubw_r2r(mm1, mm6); + + MOV_P2R(*d, mm1, mm0) + MOV_RA2R(mm1, mm4) + MUL4_256_R2R(mm6, mm1) + + MUL4_SYM_R2R(mm4, mm3, mm5) + + paddw_r2r(mm3, mm1); + MOV_R2P(mm1, *d, mm0) +} + +#define _op_blend_rel_pt_mas_cn_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx +#define _op_blend_rel_pt_mas_can_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx +#define _op_blend_rel_pt_mas_caa_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx + +#define _op_blend_rel_pt_mas_c_dpan_mmx _op_blend_pt_mas_c_dpan_mmx +#define _op_blend_rel_pt_mas_cn_dpan_mmx _op_blend_pt_mas_cn_dpan_mmx +#define _op_blend_rel_pt_mas_can_dpan_mmx _op_blend_pt_mas_can_dpan_mmx +#define _op_blend_rel_pt_mas_caa_dpan_mmx _op_blend_pt_mas_caa_dpan_mmx + +static void +init_blend_rel_mask_color_pt_funcs_mmx(void) +{ + op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_rel_pt_mas_c_dp_mmx; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_mas_cn_dp_mmx; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_rel_pt_mas_can_dp_mmx; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_rel_pt_mas_caa_dp_mmx; + + op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_c_dpan_mmx; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_cn_dpan_mmx; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_can_dpan_mmx; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_caa_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c new file mode 100644 index 0000000..f5eb480 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c @@ -0,0 +1,562 @@ +#define NEONDEBUG 0 + + +#if NEONDEBUG +#define DEBUG_FNCOUNT(x) \ + do { \ + static int _foo = 0; \ + if (_foo++%10000 ==0) \ + printf("%s %+d %s: %d (%s)\n",__FILE__,__LINE__,__FUNCTION__,\ + _foo, x " optimised");\ + } while (0) +#else +#define DEBUG_FNCOUNT(x) ((void)x) +#endif + + +/* blend mask x color -> dst */ + +#ifdef BUILD_NEON +static void +_op_blend_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + + DEBUG_FNCOUNT(""); + +#define AP "blend_mas_c_dp_" + asm volatile ( + ".fpu neon \n\t" + " vdup.i32 q15, %[c] \n\t" + " vmov.i8 q14, #1 \n\t" + + // If aligned already - straight to quads + " andS %[tmp], %[d],$0xf \n\t" + " beq "AP"quadloops \n\t" + + " andS %[tmp], %[d],$0x4 \n\t" + " beq "AP"dualloop \n\t" + + AP"singleloop: \n\t" + " vld1.8 d0[0], [%[m]]! \n\t" + " vld1.32 d4[0], [%[d]] \n\t" + " vdup.u8 d0, d0[0] \n\t" + " vmull.u8 q4, d0, d30 \n\t" + " vqrshrn.u16 d12, q4, #8 \n\t" + " vmvn.u16 d14, d12 \n\t" + " vshr.u32 d16, d14, #24 \n\t" + " vmul.u32 d16, d16, d28 \n\t" + " vmull.u8 q7, d16, d4 \n\t" + " vqrshrn.u16 d0, q7, #8 \n\t" + " vqadd.u8 d0, d0, d12 \n\t" + " vst1.32 d0[0], [%[d]]! \n\t" + + // Can we go the fast path? + " andS %[tmp], %[d],$0xf \n\t" + " beq "AP"quadloops \n\t" + + AP"dualloop: \n\t" + " sub %[tmp], %[e], %[d] \n\t" + " cmp %[tmp], #16 \n\t" + " blt "AP"loopout \n\t" + + " vld1.16 d0[0], [%[m]]! \n\t" + " vldm %[d], {d4} \n\t" + " vmovl.u8 q0, d0 \n\t" + " vmovl.u8 q0, d0 \n\t" + " vmul.u32 q0, q14 \n\t" + " vmull.u8 q4, d0, d30 \n\t" + " vqrshrn.u16 d12, q4, #8 \n\t" + " vmvn.u16 d14, d12 \n\t" + " vshr.u32 d16, d14, #24 \n\t" + " vmul.u32 d16, d16, d28 \n\t" + " vmull.u8 q7, d16, d4 \n\t" + " vqrshrn.u16 d0, q7, #8 \n\t" + " vqadd.u8 q0, q0, q6 \n\t" + " vstm %[d]!, {d0} \n\t" + + AP"quadloops: \n\t" + " sub %[tmp], %[e], %[d] \n\t" + " cmp %[tmp], #16 \n\t" + " blt "AP"loopout \n\t" + + + " sub %[tmp], %[e], #15 \n\t" + + " sub %[d], #16 \n\t" + AP"fastloop:" + " add %[d], #16 \n\t" + " cmp %[tmp], %[d] \n\t" + " ble "AP"loopout \n\t" + AP"quadloopint: \n\t" + " ldr %[x], [%[m]] \n\t" + " add %[m], #4 \n\t" + " cmp %[x], #0 \n\t" + " beq "AP"fastloop \n\t" + " vmov.32 d0[0], %[x] \n\t" + " vldm %[d], {d4,d5} \n\t" + + // Expand M: Fixme: Can we do this quicker? + " vmovl.u8 q0, d0 \n\t" + " vmovl.u8 q0, d0 \n\t" + " vmul.u32 q0, q14 \n\t" + + // Multiply a * c + " vmull.u8 q4, d0, d30 \n\t" + " vmull.u8 q5, d1, d31 \n\t" + + // Shorten + " vqrshrn.u16 d12, q4, #8 \n\t" + " vqrshrn.u16 d13, q5, #8 \n\t" + + // extract negated alpha + " vmvn.u16 q7, q6 \n\t" + " vshr.u32 q8, q7, #24 \n\t" + " vmul.u32 q8, q8, q14 \n\t" + + // Multiply + " vmull.u8 q7, d16, d4 \n\t" + " vmull.u8 q8, d17, d5 \n\t" + + " vqrshrn.u16 d0, q7, #8 \n\t" + " vqrshrn.u16 d1, q8, #8 \n\t" + + // Add + " vqadd.u8 q0, q0, q6 \n\t" + + " vstm %[d]!, {d0,d1} \n\t" + + " cmp %[tmp], %[d] \n\t" + " bhi "AP"quadloopint \n\t" + + AP"loopout: \n\t" +#if NEONDEBUG + "cmp %[d], %[e] \n\t" + "ble "AP"foo \n\t" + "cmp %[tmp], %[m] \n\t" + "sub %[x], %[x] \n\t" + "vst1.32 d0[0], [%[x]] \n\t" + AP"foo: \n\t" +#endif + + " cmp %[d], %[e] \n\t" + " beq "AP"done \n\t" + " sub %[tmp],%[e], %[d] \n\t" + " cmp %[tmp],#4 \n\t" + " beq "AP"singleout \n\t" + + AP "dualloop2: \n\t" + "sub %[tmp],%[e],$0x8 \n\t" + " vld1.16 d0[0], [%[m]]! \n\t" + " vldm %[d], {d4} \n\t" + " vmovl.u8 q0, d0 \n\t" + " vmovl.u8 q0, d0 \n\t" + " vmul.u32 q0, q14 \n\t" + " vmull.u8 q4, d0, d30 \n\t" + " vqrshrn.u16 d12, q4, #8 \n\t" + " vmvn.u16 d14, d12 \n\t" + " vshr.u32 d16, d14, #24 \n\t" + " vmul.u32 d16, d16, d28 \n\t" + " vmull.u8 q7, d16, d4 \n\t" + " vqrshrn.u16 d0, q7, #8 \n\t" + " vqadd.u8 q0, q0, q6 \n\t" + " vstm %[d]!, {d0} \n\t" + + " cmp %[e], %[d] \n\t" + " beq "AP"done \n\t" + + AP"singleout: \n\t" + " vld1.8 d0[0], [%[m]]! \n\t" + " vld1.32 d4[0], [%[d]] \n\t" + " vdup.u8 d0, d0[0] \n\t" + " vmull.u8 q4, d0, d30 \n\t" + " vqrshrn.u16 d12, q4, #8 \n\t" + " vmvn.u16 d14, d12 \n\t" + " vshr.u32 d16, d14, #24 \n\t" + " vmul.u32 d16, d16, d28 \n\t" + " vmull.u8 q7, d16, d4 \n\t" + " vqrshrn.u16 d0, q7, #8 \n\t" + " vqadd.u8 q0, q0, q6 \n\t" + " vst1.32 d0[0], [%[d]]! \n\t" + + AP"done: \n\t" +#if NEONDEBUG + "cmp %[d], %[e] \n\t" + "beq "AP"reallydone \n\t" + "sub %[tmp], %[tmp] \n\t" + "vst1.32 d0[0], [%[tmp]] \n\t" + AP"reallydone:" +#endif + : // Out + : [e] "r" (d + l), [d] "r" (d), [c] "r" (c), + [tmp] "r" (7), [m] "r" (m), [x] "r" (0) + : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q8","q14","q15", + "memory" // clobbered + ); +#undef AP +} +#endif + +#ifdef BUILD_NEON +static void +_op_blend_mas_can_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e,*tmp; + int alpha; + + DEBUG_FNCOUNT(""); + +#define AP "_blend_mas_can_dp_neon_" + asm volatile ( + ".fpu neon \n\t" + "vdup.u32 q9, %[c] \n\t" + "vmov.i8 q15, #1 \n\t" + "vmov.i8 q14, #0 \n\t" + + // Make C 16 bit (C in q3/q2) + "vmovl.u8 q3, d19 \n\t" + "vmovl.u8 q2, d18 \n\t" + + // Which loop to start + " andS %[tmp], %[d],$0xf \n\t" + " beq "AP"quadloop \n\t" + + " andS %[tmp], %[d], #4 \n\t" + " beq "AP"dualstart \n\t" + + + AP"singleloop: \n\t" + " vld1.8 d0[0], [%[m]]! \n\t" + " vld1.32 d8[0], [%[d]] \n\t" + " vdup.u8 d0, d0[0] \n\t" + " vshr.u8 d0, d0, #1 \n\t" + " vmovl.u8 q0, d0 \n\t" + " vmovl.u8 q4, d8 \n\t" + " vsub.s16 q6, q2, q4 \n\t" + " vmul.s16 q6, q0 \n\t" + " vshr.s16 q6, #7 \n\t" + " vadd.s16 q6, q4 \n\t" + " vqmovun.s16 d2, q6 \n\t" + " vst1.32 d2[0], [%[d]]! \n\t" + + " andS %[tmp], %[d], $0xf \n\t" + " beq "AP"quadloop \n\t" + + AP"dualstart: \n\t" + " sub %[tmp], %[e], %[d] \n\t" + " cmp %[tmp], #16 \n\t" + " blt "AP"loopout \n\t" + + AP"dualloop: \n\t" + " vld1.16 d0[0], [%[m]]! \n\t" + " vldm %[d], {d8} \n\t" + " vmovl.u8 q0, d0 \n\t" + " vmovl.u8 q0, d0 \n\t" + " vmul.u32 d0, d0, d30 \n\t" + " vshr.u8 d0, d0, #1 \n\t" + " vmovl.u8 q0, d0 \n\t" + " vmovl.u8 q4, d8 \n\t" + " vsub.s16 q6, q2, q4 \n\t" + " vmul.s16 q6, q0 \n\t" + " vshr.s16 q6, #7 \n\t" + " vadd.s16 q6, q4 \n\t" + " vqmovun.s16 d2, q6 \n\t" + " vstm %[d]!, {d2} \n\t" + + AP"quadloop: \n\t" + " sub %[tmp], %[e], %[d] \n\t" + " cmp %[tmp], #16 \n\t" + " blt "AP"loopout \n\t" + " sub %[tmp], %[e], #15 \n\t" + + " sub %[d], #16 \n\t" + AP"fastloop: \n\t" + " add %[d], #16 \n\t" + " cmp %[tmp], %[d] \n\t" + " blt "AP"loopout \n\t" + + AP"quadloopint: \n\t" + // Load the mask: 4 bytes: It has d0/d1 + " ldr %[x], [%[m]] \n\t" + " add %[m], #4 \n\t" + + // Check for shortcuts + " cmp %[x], #0 \n\t" + " beq "AP"fastloop \n\t" + + " cmp %[x], $0xffffffff \n\t" + " beq "AP"quadstore \n\t" + + " vmov.32 d0[0], %[x] \n\t" + // Load d into d8/d9 q4 + " vldm %[d], {d8,d9} \n\t" + + // Get the alpha channel ready (m) + " vmovl.u8 q0, d0 \n\t" + " vmovl.u8 q0, d0 \n\t" + " vmul.u32 q0, q0,q15 \n\t" + // Lop a bit off to prevent overflow + " vshr.u8 q0, q0, #1 \n\t" + + // Now make it 16 bit + " vmovl.u8 q1, d1 \n\t" + " vmovl.u8 q0, d0 \n\t" + + // 16 bit 'd' + " vmovl.u8 q5, d9 \n\t" + " vmovl.u8 q4, d8 \n\t" + + // Diff 'd' & 'c' + " vsub.s16 q7, q3, q5 \n\t" + " vsub.s16 q6, q2, q4 \n\t" + + " vmul.s16 q7, q1 \n\t" + " vmul.s16 q6, q0 \n\t" + + // Shift results a bit + " vshr.s16 q7, #7 \n\t" + " vshr.s16 q6, #7 \n\t" + + // Add 'd' + " vadd.s16 q7, q5 \n\t" + " vadd.s16 q6, q4 \n\t" + + // Make sure none are negative + " vqmovun.s16 d9, q7 \n\t" + " vqmovun.s16 d8, q6 \n\t" + + " vstm %[d]!, {d8,d9} \n\t" + + " cmp %[tmp], %[d] \n\t" + " bhi "AP"quadloopint \n\t" + " b "AP"loopout \n\t" + + AP"quadstore: \n\t" + " vstm %[d]!, {d18,d19} \n\t" + " cmp %[tmp], %[d] \n\t" + " bhi "AP"quadloopint \n\t" + + AP"loopout: \n\t" +#if NEONDEBUG + "cmp %[d], %[e] \n\t" + "ble "AP"foo \n\t" + "sub %[tmp], %[tmp] \n\t" + "vst1.32 d0[0], [%[tmp]] \n\t" + AP"foo: \n\t" +#endif + + " cmp %[e], %[d] \n\t" + " beq "AP"done \n\t" + + " sub %[tmp],%[e], %[d] \n\t" + " cmp %[tmp],#8 \n\t" + + " blt "AP"onebyte \n\t" + + // Load the mask: 2 bytes: It has d0 + " vld1.16 d0[0], [%[m]]! \n\t" + + // Load d into d8/d9 q4 + " vldm %[d], {d8} \n\t" + + // Get the alpha channel ready (m) + " vmovl.u8 q0, d0 \n\t" + " vmovl.u8 q0, d0 \n\t" + " vmul.u32 d0, d0, d30 \n\t" + // Lop a bit off to prevent overflow + " vshr.u8 d0, d0, #1 \n\t" + + // Now make it 16 bit + " vmovl.u8 q0, d0 \n\t" + + // 16 bit 'd' + " vmovl.u8 q4, d8 \n\t" + + // Diff 'd' & 'c' + " vsub.s16 q6, q2, q4 \n\t" + + " vmul.s16 q6, q0 \n\t" + + // Shift results a bit + " vshr.s16 q6, #7 \n\t" + + // Add 'd' + "vadd.s16 q6, q4 \n\t" + + // Make sure none are negative + "vqmovun.s16 d2, q6 \n\t" + + "vstm %[d]!, {d2} \n\t" + + "cmp %[e], %[d] \n\t" + "beq "AP"done \n\t" + + AP"onebyte: \n\t" + "vld1.8 d0[0], [%[m]]! \n\t" + "vld1.32 d8[0], [%[d]] \n\t" + "vdup.u8 d0, d0[0] \n\t" + "vshr.u8 d0, d0, #1 \n\t" + "vmovl.u8 q0, d0 \n\t" + "vmovl.u8 q4, d8 \n\t" + "vsub.s16 q6, q2, q4 \n\t" + "vmul.s16 q6, q0 \n\t" + "vshr.s16 q6, #7 \n\t" + "vadd.s16 q6, q4 \n\t" + "vqmovun.s16 d2, q6 \n\t" + "vst1.32 d2[0], [%[d]]! \n\t" + + + AP"done: \n\t" +#if NEONDEBUG + "cmp %[d], %[e] \n\t" + "beq "AP"reallydone \n\t" + "sub %[m], %[m] \n\t" + "vst1.32 d0[0], [%[m]] \n\t" + AP"reallydone:" +#endif + + + : // output regs + // Input + : [e] "r" (e = d + l), [d] "r" (d), [c] "r" (c), + [m] "r" (m), [tmp] "r" (7), [x] "r" (33) + : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q9","q14","q15", + "memory" // clobbered + + ); +#undef AP +} +#endif + +#ifdef BUILD_NEON +#define _op_blend_mas_cn_dp_neon _op_blend_mas_can_dp_neon +#define _op_blend_mas_caa_dp_neon _op_blend_mas_c_dp_neon + +#define _op_blend_mas_c_dpan_neon _op_blend_mas_c_dp_neon +#define _op_blend_mas_cn_dpan_neon _op_blend_mas_cn_dp_neon +#define _op_blend_mas_can_dpan_neon _op_blend_mas_can_dp_neon +#define _op_blend_mas_caa_dpan_neon _op_blend_mas_caa_dp_neon + +static void +init_blend_mask_color_span_funcs_neon(void) +{ + op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_mas_c_dp_neon; + op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_mas_cn_dp_neon; + op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_mas_can_dp_neon; + op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_mas_caa_dp_neon; + + op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_mas_c_dpan_neon; + op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_mas_cn_dpan_neon; + op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_mas_can_dpan_neon; + op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_mas_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_blend_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = MUL_SYM(m, c); + c = 256 - (s >> 24); + *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); +} + + +#define _op_blend_pt_mas_cn_dp_neon _op_blend_pt_mas_c_dp_neon +#define _op_blend_pt_mas_can_dp_neon _op_blend_pt_mas_c_dp_neon +#define _op_blend_pt_mas_caa_dp_neon _op_blend_pt_mas_c_dp_neon + +#define _op_blend_pt_mas_c_dpan_neon _op_blend_pt_mas_c_dp_neon +#define _op_blend_pt_mas_cn_dpan_neon _op_blend_pt_mas_cn_dp_neon +#define _op_blend_pt_mas_can_dpan_neon _op_blend_pt_mas_can_dp_neon +#define _op_blend_pt_mas_caa_dpan_neon _op_blend_pt_mas_caa_dp_neon + +static void +init_blend_mask_color_pt_funcs_neon(void) +{ + op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_pt_mas_c_dp_neon; + op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_mas_cn_dp_neon; + op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_pt_mas_can_dp_neon; + op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_pt_mas_caa_dp_neon; + + op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_pt_mas_c_dpan_neon; + op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_mas_cn_dpan_neon; + op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_mas_can_dpan_neon; + op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_mas_caa_dpan_neon; +} +#endif + +/*-----*/ + +/* blend_rel mask x color -> dst */ + +#ifdef BUILD_NEON +static void +_op_blend_rel_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha; + + DEBUG_FNCOUNT("not"); + + UNROLL8_PLD_WHILE(d, l, e, + { + DATA32 mc = MUL_SYM(*m, c); + alpha = 256 - (mc >> 24); + *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d); + d++; + m++; + }); +} + +#define _op_blend_rel_mas_cn_dp_neon _op_blend_rel_mas_c_dp_neon +#define _op_blend_rel_mas_can_dp_neon _op_blend_rel_mas_c_dp_neon +#define _op_blend_rel_mas_caa_dp_neon _op_blend_rel_mas_c_dp_neon + +#define _op_blend_rel_mas_c_dpan_neon _op_blend_mas_c_dpan_neon +#define _op_blend_rel_mas_cn_dpan_neon _op_blend_mas_cn_dpan_neon +#define _op_blend_rel_mas_can_dpan_neon _op_blend_mas_can_dpan_neon +#define _op_blend_rel_mas_caa_dpan_neon _op_blend_mas_caa_dpan_neon + +static void +init_blend_rel_mask_color_span_funcs_neon(void) +{ + op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_rel_mas_c_dp_neon; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_rel_mas_cn_dp_neon; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_rel_mas_can_dp_neon; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_rel_mas_caa_dp_neon; + + op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_rel_mas_c_dpan_neon; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_mas_cn_dpan_neon; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_mas_can_dpan_neon; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_mas_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_blend_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = MUL_SYM(m, c); + c = 256 - (s >> 24); + *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); +} + +#define _op_blend_rel_pt_mas_cn_dp_neon _op_blend_rel_pt_mas_c_dp_neon +#define _op_blend_rel_pt_mas_can_dp_neon _op_blend_rel_pt_mas_c_dp_neon +#define _op_blend_rel_pt_mas_caa_dp_neon _op_blend_rel_pt_mas_c_dp_neon + +#define _op_blend_rel_pt_mas_c_dpan_neon _op_blend_pt_mas_c_dpan_neon +#define _op_blend_rel_pt_mas_cn_dpan_neon _op_blend_pt_mas_cn_dpan_neon +#define _op_blend_rel_pt_mas_can_dpan_neon _op_blend_pt_mas_can_dpan_neon +#define _op_blend_rel_pt_mas_caa_dpan_neon _op_blend_pt_mas_caa_dpan_neon + +static void +init_blend_rel_mask_color_pt_funcs_neon(void) +{ + op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_rel_pt_mas_c_dp_neon; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_mas_cn_dp_neon; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_rel_pt_mas_can_dp_neon; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_rel_pt_mas_caa_dp_neon; + + op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_c_dpan_neon; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_cn_dpan_neon; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_can_dpan_neon; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_caa_dpan_neon; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c new file mode 100644 index 0000000..83230e5 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c @@ -0,0 +1,320 @@ +/* blend mask x color -> dst */ + +#ifdef BUILD_SSE3 + +static void +_op_blend_mas_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + + const __m128i c_packed = _mm_set_epi32(c, c, c, c); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + DATA32 a = *m; + DATA32 mc = MUL_SYM(a, c); + a = 256 - (mc >> 24); + *d = mc + MUL_256(a, *d); + m++; d++; l--; + }, + { /* A4OP */ + + if ((m[3] | m[2] | m[1] | m[0]) == 0) { + m += 4; d += 4; l -= 4; + continue; + } + + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i mc0 = mul_sym_sse3(m0, c_packed); + __m128i a0 = sub4_alpha_sse3(mc0); + __m128i mul0 = mul_256_sse3(a0, d0); + + mul0 = _mm_add_epi32(mul0, mc0); + + _mm_store_si128((__m128i *)d, mul0); + + m += 4; d += 4; l -= 4; + }, + { /* A8OP */ + + if((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) { + m += 8; d += 8; l -= 8; + continue; + } + + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i mc0 = mul_sym_sse3(m0, c_packed); + __m128i a0 = sub4_alpha_sse3(mc0); + __m128i mul0 = mul_256_sse3(a0, d0); + + mul0 = _mm_add_epi32(mc0, mul0); + + __m128i mc1 = mul_sym_sse3(m1, c_packed); + __m128i a1 = sub4_alpha_sse3(mc1); + __m128i mul1 = mul_256_sse3(a1, d1); + + mul1 = _mm_add_epi32(mc1, mul1); + + _mm_store_si128((__m128i *)d, mul0); + _mm_store_si128((__m128i *)(d+4), mul1); + + m += 8; d += 8; l -= 8; + }) +} + +static void +_op_blend_mas_can_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + + DATA32 alpha; + + const __m128i one = _mm_set_epi32(1, 1, 1, 1); + const __m128i c_packed = _mm_set_epi32(c, c, c, c); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + alpha = *m; + switch(alpha) + { + case 0: + break; + case 255: + *d = c; + break; + default: + alpha++; + *d = INTERP_256(alpha, c, *d); + break; + } + m++; d++; l--; + }, + { /* A4OP */ + + if ((m[3] | m[2] | m[1] | m[0]) == 0) { + m += 4; d += 4; l -= 4; + continue; + } + + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); + + m0 = _mm_add_epi32(one, m0); + + __m128i r0 = interp4_256_sse3(m0, c_packed, d0); + + r0 = _mm_and_si128(~zm0, r0); + d0 = _mm_and_si128(zm0, d0); + + d0 = _mm_add_epi32(r0, d0); + + _mm_store_si128((__m128i *)d, d0); + + m += 4; d += 4; l -= 4; + }, + { /* A8OP */ + + if ((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) { + m += 8; d += 8; l -= 8; + continue; + } + + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); + __m128i zm1 = _mm_cmpeq_epi32(m1, _mm_setzero_si128()); + + m0 = _mm_add_epi32(one, m0); + m1 = _mm_add_epi32(one, m1); + + __m128i r0 = interp4_256_sse3(m0, c_packed, d0); + __m128i r1 = interp4_256_sse3(m1, c_packed, d1); + + r0 = _mm_and_si128(~zm0, r0); + d0 = _mm_and_si128(zm0, d0); + + r1 = _mm_and_si128(~zm1, r1); + d1 = _mm_and_si128(zm1, d1); + + d0 = _mm_add_epi32(d0, r0); + d1 = _mm_add_epi32(d1, r1); + + _mm_store_si128((__m128i *)d, d0); + _mm_store_si128((__m128i *)(d+4), d1); + + m += 8; d += 8; l -= 8; + }) +} + +#define _op_blend_mas_cn_dp_sse3 _op_blend_mas_can_dp_sse3 +#define _op_blend_mas_caa_dp_sse3 _op_blend_mas_c_dp_sse3 + +#define _op_blend_mas_c_dpan_sse3 _op_blend_mas_c_dp_sse3 +#define _op_blend_mas_cn_dpan_sse3 _op_blend_mas_cn_dp_sse3 +#define _op_blend_mas_can_dpan_sse3 _op_blend_mas_can_dp_sse3 +#define _op_blend_mas_caa_dpan_sse3 _op_blend_mas_caa_dp_sse3 + +static void +init_blend_mask_color_span_funcs_sse3(void) +{ + op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_mas_c_dp_sse3; + op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_mas_cn_dp_sse3; + op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_mas_can_dp_sse3; + op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_mas_caa_dp_sse3; + +// FIXME: BUGGY BUGGY Core i5 2500 (64bit), gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text) +// op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_mas_c_dpan_sse3; + op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_mas_cn_dpan_sse3; + op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_mas_can_dpan_sse3; + op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_mas_caa_dpan_sse3; +} + +#define _op_blend_pt_mas_c_dp_sse3 NULL +#define _op_blend_pt_mas_can_dp_sse3 NULL + +#define _op_blend_pt_mas_cn_dp_sse3 _op_blend_pt_mas_can_dp_sse3 +#define _op_blend_pt_mas_caa_dp_sse3 _op_blend_pt_mas_c_dp_sse3 + +#define _op_blend_pt_mas_c_dpan_sse3 _op_blend_pt_mas_c_dp_sse3 +#define _op_blend_pt_mas_cn_dpan_sse3 _op_blend_pt_mas_cn_dp_sse3 +#define _op_blend_pt_mas_can_dpan_sse3 _op_blend_pt_mas_can_dp_sse3 +#define _op_blend_pt_mas_caa_dpan_sse3 _op_blend_pt_mas_caa_dp_sse3 + +static void +init_blend_mask_color_pt_funcs_sse3(void) +{ + op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_pt_mas_c_dp_sse3; + op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_mas_cn_dp_sse3; + op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_pt_mas_can_dp_sse3; + op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_pt_mas_caa_dp_sse3; + + op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_pt_mas_c_dpan_sse3; + op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_mas_cn_dpan_sse3; + op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_mas_can_dpan_sse3; + op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_mas_caa_dpan_sse3; +} + +/*-----*/ + +/* blend_rel mask x color --> dst */ + +static void +_op_blend_rel_mas_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + + const __m128i c_packed = _mm_set_epi32(c, c, c, c); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + DATA32 mc = MUL_SYM(*m, c); + int alpha = 256 - (mc >> 24); + *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d); + d++; m++; l--; + }, + { /* A4OP */ + + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + __m128i d0 = _mm_load_si128((__m128i *) d); + + __m128i mc0 = mul_sym_sse3(m0, c_packed); + __m128i a0 = sub4_alpha_sse3(mc0); + + __m128i d0_sym = mul_sym_sse3(_mm_srli_epi32(d0, 24), mc0); + d0 = mul_256_sse3(a0, d0); + + d0 = _mm_add_epi32(d0, d0_sym); + + _mm_store_si128((__m128i *)d, d0); + + d += 4; m += 4; l -= 4; + }, + { /* A8OP */ + + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i mc0 = mul_sym_sse3(m0, c_packed); + __m128i mc1 = mul_sym_sse3(m1, c_packed); + + __m128i a0 = sub4_alpha_sse3(mc0); + __m128i a1 = sub4_alpha_sse3(mc1); + + __m128i d0_sym = mul_sym_sse3(_mm_srli_epi32(d0, 24), mc0); + __m128i d1_sym = mul_sym_sse3(_mm_srli_epi32(d1, 24), mc1); + + d0 = mul_256_sse3(a0, d0); + d1 = mul_256_sse3(a1, d1); + + d0 = _mm_add_epi32(d0, d0_sym); + d1 = _mm_add_epi32(d1, d1_sym); + + _mm_store_si128((__m128i *)d, d0); + _mm_store_si128((__m128i *)(d+4), d1); + + d += 8; m += 8; l -= 8; + }) +} + +#define _op_blend_rel_mas_cn_dp_sse3 _op_blend_rel_mas_c_dp_sse3 +#define _op_blend_rel_mas_can_dp_sse3 _op_blend_rel_mas_c_dp_sse3 +#define _op_blend_rel_mas_caa_dp_sse3 _op_blend_rel_mas_c_dp_sse3 + +#define _op_blend_rel_mas_c_dpan_sse3 _op_blend_mas_c_dpan_sse3 +#define _op_blend_rel_mas_cn_dpan_sse3 _op_blend_mas_cn_dpan_sse3 +#define _op_blend_rel_mas_can_dpan_sse3 _op_blend_mas_can_dpan_sse3 +#define _op_blend_rel_mas_caa_dpan_sse3 _op_blend_mas_caa_dpan_sse3 + +static void +init_blend_rel_mask_color_span_funcs_sse3(void) +{ + op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_rel_mas_c_dp_sse3; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_mas_can_dp_sse3; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_rel_mas_can_dp_sse3; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_rel_mas_caa_dp_sse3; + + op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_rel_mas_c_dpan_sse3; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_mas_cn_dpan_sse3; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_mas_can_dpan_sse3; + op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_mas_caa_dpan_sse3; +} + +#define _op_blend_rel_pt_mas_c_dp_sse3 NULL + +#define _op_blend_rel_pt_mas_cn_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3 +#define _op_blend_rel_pt_mas_can_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3 +#define _op_blend_rel_pt_mas_caa_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3 + +#define _op_blend_rel_pt_mas_c_dpan_sse3 _op_blend_pt_mas_c_dpan_sse3 +#define _op_blend_rel_pt_mas_cn_dpan_sse3 _op_blend_pt_mas_cn_dpan_sse3 +#define _op_blend_rel_pt_mas_can_dpan_sse3 _op_blend_pt_mas_can_dpan_sse3 +#define _op_blend_rel_pt_mas_caa_dpan_sse3 _op_blend_pt_mas_caa_dpan_sse3 + +static void +init_blend_rel_mask_color_pt_funcs_sse3(void) +{ + op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_rel_pt_mas_c_dp_sse3; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_mas_cn_dp_sse3; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_mas_can_dp_sse3; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_mas_caa_dp_sse3; + + op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_c_dpan_sse3; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_cn_dpan_sse3; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_can_dpan_sse3; + op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_caa_dpan_sse3; +} + +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c new file mode 100644 index 0000000..eac6755 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c @@ -0,0 +1,77 @@ +#define NEED_SSE3 1 + +#include "evas_common.h" + +#ifdef BUILD_SSE3 +static __m128i A_MASK_SSE3; +#endif + +extern RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +extern RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +extern RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +extern RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +# include "op_blend_pixel_sse3.c" +# include "op_blend_color_sse3.c" +# include "op_blend_pixel_color_sse3.c" +# include "op_blend_pixel_mask_sse3.c" +# include "op_blend_mask_color_sse3.c" + +void +evas_common_op_blend_init_sse3(void) +{ +#ifdef BUILD_SSE3 + GA_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x00FF00FF); + RB_MASK_SSE3 = _mm_set_epi32(0xFF00FF00, 0xFF00FF00, 0xFF00FF00, 0xFF00FF00); + SYM4_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x000000FF, 0x00FF00FF, 0x000000FF); + RGB_MASK_SSE3 = _mm_set_epi32(0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF); + A_MASK_SSE3 = _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000); + ALPHA_SSE3 = _mm_set_epi32(256, 256, 256, 256); + + init_blend_pixel_span_funcs_sse3(); + init_blend_pixel_color_span_funcs_sse3(); + init_blend_pixel_mask_span_funcs_sse3(); + init_blend_color_span_funcs_sse3(); + init_blend_mask_color_span_funcs_sse3(); + + init_blend_pixel_pt_funcs_sse3(); + init_blend_pixel_color_pt_funcs_sse3(); + init_blend_pixel_mask_pt_funcs_sse3(); + init_blend_color_pt_funcs_sse3(); + init_blend_mask_color_pt_funcs_sse3(); +#endif +} + +void +evas_common_op_blend_rel_init_sse3(void) +{ +#ifdef BUILD_SSE3 + init_blend_rel_pixel_span_funcs_sse3(); + init_blend_rel_pixel_color_span_funcs_sse3(); + init_blend_rel_pixel_mask_span_funcs_sse3(); + init_blend_rel_color_span_funcs_sse3(); + init_blend_rel_mask_color_span_funcs_sse3(); + + init_blend_rel_pixel_pt_funcs_sse3(); + init_blend_rel_pixel_color_pt_funcs_sse3(); + init_blend_rel_pixel_mask_pt_funcs_sse3(); + init_blend_rel_color_pt_funcs_sse3(); + init_blend_rel_mask_color_pt_funcs_sse3(); +#endif +} + +//#pragma GCC push_options +//#pragma GCC optimize ("O0") +void +evas_common_op_sse3_test(void) +{ +#ifdef BUILD_SSE3 + DATA32 s[64] = {0x11883399}, d[64] = {0xff88cc33}; + + s[0] = rand(); d[1] = rand(); + _op_blend_pas_dp_sse3(s, NULL, 0, d, 64); + evas_common_cpu_end_opt(); +#endif +} +//#pragma GCC pop_options diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c new file mode 100644 index 0000000..0ce78d8 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c @@ -0,0 +1,162 @@ +/* blend pixel --> dst */ + +#ifdef BUILD_C +static void +_op_blend_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + alpha = 256 - (*s >> 24); + *d = *s++ + MUL_256(alpha, *d); + d++; + }); +} + +static void +_op_blend_pas_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + switch (*s & 0xff000000) + { + case 0: + break; + case 0xff000000: + *d = *s; + break; + default: + alpha = 256 - (*s >> 24); + *d = *s + MUL_256(alpha, *d); + break; + } + s++; d++; + }); +} + +#define _op_blend_pan_dp NULL + +#define _op_blend_p_dpan _op_blend_p_dp +#define _op_blend_pas_dpan _op_blend_pas_dp +#define _op_blend_pan_dpan _op_blend_pan_dp + +static void +init_blend_pixel_span_funcs_c(void) +{ + op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_p_dp; + op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_pas_dp; + op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_pan_dp; + + op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_p_dpan; + op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pas_dpan; + op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pan_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_blend_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + c = 256 - (s >> 24); + *d = s + MUL_256(c, *d); +} + +#define _op_blend_pt_pas_dp _op_blend_pt_p_dp +#define _op_blend_pt_pan_dp NULL + +#define _op_blend_pt_p_dpan _op_blend_pt_p_dp +#define _op_blend_pt_pan_dpan _op_blend_pt_pan_dp +#define _op_blend_pt_pas_dpan _op_blend_pt_pas_dp + +static void +init_blend_pixel_pt_funcs_c(void) +{ + op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_p_dp; + op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_pas_dp; + op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_pan_dp; + + op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_p_dpan; + op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_pas_dpan; + op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_pan_dpan; +} +#endif + +/*-----*/ + +/* blend_rel pixel -> dst */ + +#ifdef BUILD_C +static void +_op_blend_rel_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + alpha = 256 - (*s >> 24); + c = 1 + (*d >> 24); + *d = MUL_256(c, *s) + MUL_256(alpha, *d); + d++; + s++; + }); +} + +static void +_op_blend_rel_pan_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + UNROLL8_PLD_WHILE(d, l, e, + { + c = 1 + (*d >> 24); + *d++ = MUL_256(c, *s); + s++; + }); +} + +#define _op_blend_rel_pas_dp _op_blend_rel_p_dp + +#define _op_blend_rel_p_dpan _op_blend_p_dpan +#define _op_blend_rel_pan_dpan _op_blend_pan_dpan +#define _op_blend_rel_pas_dpan _op_blend_pas_dpan + +static void +init_blend_rel_pixel_span_funcs_c(void) +{ + op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_p_dp; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pas_dp; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pan_dp; + + op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_p_dpan; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pas_dpan; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pan_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_blend_rel_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + c = 256 - (s >> 24); + *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); +} + +static void +_op_blend_rel_pt_pan_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { + *d = MUL_SYM(*d >> 24, s); +} + +#define _op_blend_rel_pt_pas_dp _op_blend_rel_pt_p_dp + +#define _op_blend_rel_pt_p_dpan _op_blend_pt_p_dpan +#define _op_blend_rel_pt_pan_dpan _op_blend_pt_pan_dpan +#define _op_blend_rel_pt_pas_dpan _op_blend_pt_pas_dpan + +static void +init_blend_rel_pixel_pt_funcs_c(void) +{ + op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_p_dp; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_pas_dp; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_pan_dp; + + op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_p_dpan; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pas_dpan; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pan_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c new file mode 100644 index 0000000..c5e40a0 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c @@ -0,0 +1,284 @@ +/* blend pixel x color --> dst */ + +#ifdef BUILD_C +static void +_op_blend_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + DATA32 sc = MUL4_SYM(c, *s); + alpha = 256 - (sc >> 24); + *d = sc + MUL_256(alpha, *d); + d++; + s++; + }); +} + +static void +_op_blend_pan_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha = 256 - (c >> 24); + UNROLL8_PLD_WHILE(d, l, e, + { + *d = ((c & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); + d++; + s++; + }); +} + +static void +_op_blend_p_can_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + alpha = 256 - (*s >> 24); + *d = ((*s & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); + d++; + s++; + }); +} + +static void +_op_blend_pan_can_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + UNROLL8_PLD_WHILE(d, l, e, + { + *d++ = 0xff000000 + MUL3_SYM(c, *s); + s++; + }); +} + +static void +_op_blend_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha; + c = 1 + (c & 0xff); + UNROLL8_PLD_WHILE(d, l, e, + { + DATA32 sc = MUL_256(c, *s); + alpha = 256 - (sc >> 24); + *d = sc + MUL_256(alpha, *d); + d++; + s++; + }); +} + +static void +_op_blend_pan_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + c = 1 + (c & 0xff); + UNROLL8_PLD_WHILE(d, l, e, + { + *d = INTERP_256(c, *s, *d); + d++; + s++; + }); +} + +#define _op_blend_pas_c_dp _op_blend_p_c_dp +#define _op_blend_pas_can_dp _op_blend_p_can_dp +#define _op_blend_pas_caa_dp _op_blend_p_caa_dp + +#define _op_blend_p_c_dpan _op_blend_p_c_dp +#define _op_blend_pas_c_dpan _op_blend_pas_c_dp +#define _op_blend_pan_c_dpan _op_blend_pan_c_dp +#define _op_blend_p_can_dpan _op_blend_p_can_dp +#define _op_blend_pas_can_dpan _op_blend_pas_can_dp +#define _op_blend_pan_can_dpan _op_blend_pan_can_dp +#define _op_blend_p_caa_dpan _op_blend_p_caa_dp +#define _op_blend_pas_caa_dpan _op_blend_pas_caa_dp +#define _op_blend_pan_caa_dpan _op_blend_pan_caa_dp + +static void +init_blend_pixel_color_span_funcs_c(void) +{ + op_blend_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_p_c_dp; + op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_pas_c_dp; + op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_pan_c_dp; + op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_p_can_dp; + op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_pas_can_dp; + op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_pan_can_dp; + op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_p_caa_dp; + op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_pas_caa_dp; + op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_pan_caa_dp; + + op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_p_c_dpan; + op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_pas_c_dpan; + op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_pan_c_dpan; + op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_p_can_dpan; + op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pas_can_dpan; + op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pan_can_dpan; + op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_p_caa_dpan; + op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pas_caa_dpan; + op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pan_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_blend_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = MUL4_SYM(c, s); + c = 256 - (s >> 24); + *d = s + MUL_256(c, *d); +} + +#define _op_blend_pt_pas_c_dp _op_blend_pt_p_c_dp +#define _op_blend_pt_pan_c_dp _op_blend_pt_p_c_dp +#define _op_blend_pt_p_can_dp _op_blend_pt_p_c_dp +#define _op_blend_pt_pas_can_dp _op_blend_pt_p_c_dp +#define _op_blend_pt_pan_can_dp _op_blend_pt_p_c_dp +#define _op_blend_pt_p_caa_dp _op_blend_pt_p_c_dp +#define _op_blend_pt_pas_caa_dp _op_blend_pt_p_c_dp +#define _op_blend_pt_pan_caa_dp _op_blend_pt_p_c_dp + +#define _op_blend_pt_p_c_dpan _op_blend_pt_p_c_dp +#define _op_blend_pt_pas_c_dpan _op_blend_pt_pas_c_dp +#define _op_blend_pt_pan_c_dpan _op_blend_pt_pan_c_dp +#define _op_blend_pt_p_can_dpan _op_blend_pt_p_can_dp +#define _op_blend_pt_pas_can_dpan _op_blend_pt_pas_can_dp +#define _op_blend_pt_pan_can_dpan _op_blend_pt_pan_can_dp +#define _op_blend_pt_p_caa_dpan _op_blend_pt_p_caa_dp +#define _op_blend_pt_pas_caa_dpan _op_blend_pt_pas_caa_dp +#define _op_blend_pt_pan_caa_dpan _op_blend_pt_pan_caa_dp + +static void +init_blend_pixel_color_pt_funcs_c(void) +{ + op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_pt_p_c_dp; + op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_pt_pas_c_dp; + op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_pt_pan_c_dp; + op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_p_can_dp; + op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_pas_can_dp; + op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_pan_can_dp; + op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_p_caa_dp; + op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_pas_caa_dp; + op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_pan_caa_dp; + + op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_p_c_dpan; + op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_pas_c_dpan; + op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_pan_c_dpan; + op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_p_can_dpan; + op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_pas_can_dpan; + op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_pan_can_dpan; + op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_p_caa_dpan; + op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_pas_caa_dpan; + op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_pan_caa_dpan; +} +#endif + +/*-----*/ + +/* blend_rel pixel x color -> dst */ + +#ifdef BUILD_C +static void +_op_blend_rel_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + DATA32 sc = MUL4_SYM(c, *s); + alpha = 256 - (sc >> 24); + *d = MUL_SYM(*d >> 24, sc) + MUL_256(alpha, *d); + d++; + s++; + }); +} + +#define _op_blend_rel_pas_c_dp _op_blend_rel_p_c_dp +#define _op_blend_rel_pan_c_dp _op_blend_rel_p_c_dp +#define _op_blend_rel_p_can_dp _op_blend_rel_p_c_dp +#define _op_blend_rel_pas_can_dp _op_blend_rel_p_c_dp +#define _op_blend_rel_pan_can_dp _op_blend_rel_p_c_dp +#define _op_blend_rel_p_caa_dp _op_blend_rel_p_c_dp +#define _op_blend_rel_pas_caa_dp _op_blend_rel_p_c_dp +#define _op_blend_rel_pan_caa_dp _op_blend_rel_p_c_dp + +#define _op_blend_rel_p_c_dpan _op_blend_p_c_dpan +#define _op_blend_rel_pas_c_dpan _op_blend_pas_c_dpan +#define _op_blend_rel_pan_c_dpan _op_blend_pan_c_dpan +#define _op_blend_rel_p_can_dpan _op_blend_p_can_dpan +#define _op_blend_rel_pas_can_dpan _op_blend_pas_can_dpan +#define _op_blend_rel_pan_can_dpan _op_blend_pan_can_dpan +#define _op_blend_rel_p_caa_dpan _op_blend_p_caa_dpan +#define _op_blend_rel_pas_caa_dpan _op_blend_pas_caa_dpan +#define _op_blend_rel_pan_caa_dpan _op_blend_pan_caa_dpan + +static void +init_blend_rel_pixel_color_span_funcs_c(void) +{ + op_blend_rel_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_rel_p_c_dp; + op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_rel_pas_c_dp; + op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_rel_pan_c_dp; + op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_p_can_dp; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pas_can_dp; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pan_can_dp; + op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_p_caa_dp; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pas_caa_dp; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pan_caa_dp; + + op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_p_c_dpan; + op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pas_c_dpan; + op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pan_c_dpan; + op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_p_can_dpan; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pas_can_dpan; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pan_can_dpan; + op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_p_caa_dpan; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pas_caa_dpan; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pan_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_blend_rel_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = MUL4_SYM(c, s); + c = 256 - (s >> 24); + *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); +} + +#define _op_blend_rel_pt_pas_c_dp _op_blend_rel_pt_p_c_dp +#define _op_blend_rel_pt_pan_c_dp _op_blend_rel_pt_p_c_dp +#define _op_blend_rel_pt_p_can_dp _op_blend_rel_pt_p_c_dp +#define _op_blend_rel_pt_pas_can_dp _op_blend_rel_pt_p_c_dp +#define _op_blend_rel_pt_pan_can_dp _op_blend_rel_pt_p_c_dp +#define _op_blend_rel_pt_p_caa_dp _op_blend_rel_pt_p_c_dp +#define _op_blend_rel_pt_pas_caa_dp _op_blend_rel_pt_p_c_dp +#define _op_blend_rel_pt_pan_caa_dp _op_blend_rel_pt_p_c_dp + +#define _op_blend_rel_pt_p_c_dpan _op_blend_pt_p_c_dpan +#define _op_blend_rel_pt_pas_c_dpan _op_blend_pt_pas_c_dpan +#define _op_blend_rel_pt_pan_c_dpan _op_blend_pt_pan_c_dpan +#define _op_blend_rel_pt_p_can_dpan _op_blend_pt_p_can_dpan +#define _op_blend_rel_pt_pas_can_dpan _op_blend_pt_pas_can_dpan +#define _op_blend_rel_pt_pan_can_dpan _op_blend_pt_pan_can_dpan +#define _op_blend_rel_pt_p_caa_dpan _op_blend_pt_p_caa_dpan +#define _op_blend_rel_pt_pas_caa_dpan _op_blend_pt_pas_caa_dpan +#define _op_blend_rel_pt_pan_caa_dpan _op_blend_pt_pan_caa_dpan + +static void +init_blend_rel_pixel_color_pt_funcs_c(void) +{ + op_blend_rel_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_p_c_dp; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_pas_c_dp; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_pan_c_dp; + op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_p_can_dp; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_pas_can_dp; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_pan_can_dp; + op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_p_caa_dp; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_pas_caa_dp; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_pan_caa_dp; + + op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_p_c_dpan; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_pas_c_dpan; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_pan_c_dpan; + op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_p_can_dpan; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_pas_can_dpan; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_pan_can_dpan; + op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_p_caa_dpan; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_pas_caa_dpan; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_pan_caa_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c new file mode 100644 index 0000000..52751f4 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c @@ -0,0 +1,221 @@ +/* blend pixel x color --> dst */ + +#ifdef BUILD_MMX +static void +_op_blend_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + MOV_A2R(ALPHA_256, mm6) + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + while (d < e) { + MOV_P2R(*s, mm3, mm0) + MUL4_SYM_R2R(mm2, mm3, mm5) + + MOV_RA2R(mm3, mm1) + movq_r2r(mm6, mm4); + psubw_r2r(mm1, mm4); + + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm4, mm1) + + paddw_r2r(mm3, mm1); + MOV_R2P(mm1, *d, mm0) + s++; d++; + } +} + +static void +_op_blend_pan_can_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + MOV_A2R(ALPHA_255, mm5) + while (d < e) { + MOV_P2R(*s, mm1, mm0) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + s++; d++; + } +} + +static void +_op_blend_pan_caa_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + c = 1 + (c & 0xff); + MOV_A2R(c, mm2) + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + while (d < e) { + MOV_P2R(*s, mm3, mm0) + MOV_P2R(*d, mm1, mm0) + INTERP_256_R2R(mm2, mm3, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + s++; d++; + } +} + +#define _op_blend_pas_c_dp_mmx _op_blend_p_c_dp_mmx +#define _op_blend_pan_c_dp_mmx _op_blend_p_c_dp_mmx +#define _op_blend_p_can_dp_mmx _op_blend_p_c_dp_mmx +#define _op_blend_pas_can_dp_mmx _op_blend_p_c_dp_mmx +#define _op_blend_p_caa_dp_mmx _op_blend_p_c_dp_mmx +#define _op_blend_pas_caa_dp_mmx _op_blend_p_c_dp_mmx + +#define _op_blend_p_c_dpan_mmx _op_blend_p_c_dp_mmx +#define _op_blend_pas_c_dpan_mmx _op_blend_pas_c_dp_mmx +#define _op_blend_pan_c_dpan_mmx _op_blend_pan_c_dp_mmx +#define _op_blend_p_can_dpan_mmx _op_blend_p_can_dp_mmx +#define _op_blend_pas_can_dpan_mmx _op_blend_pas_can_dp_mmx +#define _op_blend_pan_can_dpan_mmx _op_blend_pan_can_dp_mmx +#define _op_blend_p_caa_dpan_mmx _op_blend_p_caa_dp_mmx +#define _op_blend_pas_caa_dpan_mmx _op_blend_pas_caa_dp_mmx +#define _op_blend_pan_caa_dpan_mmx _op_blend_pan_caa_dp_mmx + + +static void +init_blend_pixel_color_span_funcs_mmx(void) +{ + op_blend_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_blend_p_c_dp_mmx; + op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_blend_pas_c_dp_mmx; + op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_blend_pan_c_dp_mmx; + op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_p_can_dp_mmx; + op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pas_can_dp_mmx; + op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pan_can_dp_mmx; + op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_p_caa_dp_mmx; + op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pas_caa_dp_mmx; + op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pan_caa_dp_mmx; + + op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_p_c_dpan_mmx; + op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pas_c_dpan_mmx; + op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pan_c_dpan_mmx; + op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_p_can_dpan_mmx; + op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pas_can_dpan_mmx; + op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pan_can_dpan_mmx; + op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_p_caa_dpan_mmx; + op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pas_caa_dpan_mmx; + op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pan_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_blend_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + MOV_A2R(ALPHA_256, mm4) + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + MOV_P2R(s, mm3, mm0) + MUL4_SYM_R2R(mm2, mm3, mm5) + + MOV_RA2R(mm3, mm1) + psubw_r2r(mm1, mm4); + + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm4, mm1) + + paddw_r2r(mm3, mm1); + MOV_R2P(mm1, *d, mm0) +} + +#define _op_blend_pt_pas_c_dp_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_pan_c_dp_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_p_can_dp_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_pas_can_dp_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_pan_can_dp_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_p_caa_dp_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_pas_caa_dp_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_pan_caa_dp_mmx _op_blend_pt_p_c_dp_mmx + +#define _op_blend_pt_p_c_dpan_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_pas_c_dpan_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_pan_c_dpan_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_p_can_dpan_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_pas_can_dpan_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_pan_can_dpan_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_p_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_pas_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx +#define _op_blend_pt_pan_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx + +static void +init_blend_pixel_color_pt_funcs_mmx(void) +{ + op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_p_c_dp_mmx; + op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_pas_c_dp_mmx; + op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_pan_c_dp_mmx; + op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_p_can_dp_mmx; + op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_pas_can_dp_mmx; + op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_pan_can_dp_mmx; + op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_p_caa_dp_mmx; + op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_pas_caa_dp_mmx; + op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_pan_caa_dp_mmx; + + op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_p_c_dpan_mmx; + op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_pas_c_dpan_mmx; + op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_pan_c_dpan_mmx; + op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_p_can_dpan_mmx; + op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_pas_can_dpan_mmx; + op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_pan_can_dpan_mmx; + op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_p_caa_dpan_mmx; + op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_pas_caa_dpan_mmx; + op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_pan_caa_dpan_mmx; +} +#endif + +/*-----*/ + +/* blend_rel pixel x color -> dst */ + +#ifdef BUILD_MMX + +#define _op_blend_rel_p_c_dpan_mmx _op_blend_p_c_dpan_mmx +#define _op_blend_rel_pas_c_dpan_mmx _op_blend_pas_c_dpan_mmx +#define _op_blend_rel_pan_c_dpan_mmx _op_blend_pan_c_dpan_mmx +#define _op_blend_rel_p_can_dpan_mmx _op_blend_p_can_dpan_mmx +#define _op_blend_rel_pas_can_dpan_mmx _op_blend_pas_can_dpan_mmx +#define _op_blend_rel_pan_can_dpan_mmx _op_blend_pan_can_dpan_mmx +#define _op_blend_rel_p_caa_dpan_mmx _op_blend_p_caa_dpan_mmx +#define _op_blend_rel_pas_caa_dpan_mmx _op_blend_pas_caa_dpan_mmx +#define _op_blend_rel_pan_caa_dpan_mmx _op_blend_pan_caa_dpan_mmx + +static void +init_blend_rel_pixel_color_span_funcs_mmx(void) +{ + op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_p_c_dpan_mmx; + op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pas_c_dpan_mmx; + op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pan_c_dpan_mmx; + op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_p_can_dpan_mmx; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pas_can_dpan_mmx; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pan_can_dpan_mmx; + op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_p_caa_dpan_mmx; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pas_caa_dpan_mmx; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pan_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX + +#define _op_blend_rel_pt_p_c_dpan_mmx _op_blend_pt_p_c_dpan_mmx +#define _op_blend_rel_pt_pas_c_dpan_mmx _op_blend_pt_pas_c_dpan_mmx +#define _op_blend_rel_pt_pan_c_dpan_mmx _op_blend_pt_pan_c_dpan_mmx +#define _op_blend_rel_pt_p_can_dpan_mmx _op_blend_pt_p_can_dpan_mmx +#define _op_blend_rel_pt_pas_can_dpan_mmx _op_blend_pt_pas_can_dpan_mmx +#define _op_blend_rel_pt_pan_can_dpan_mmx _op_blend_pt_pan_can_dpan_mmx +#define _op_blend_rel_pt_p_caa_dpan_mmx _op_blend_pt_p_caa_dpan_mmx +#define _op_blend_rel_pt_pas_caa_dpan_mmx _op_blend_pt_pas_caa_dpan_mmx +#define _op_blend_rel_pt_pan_caa_dpan_mmx _op_blend_pt_pan_caa_dpan_mmx + +static void +init_blend_rel_pixel_color_pt_funcs_mmx(void) +{ + op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_c_dpan_mmx; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_c_dpan_mmx; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_c_dpan_mmx; + op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_can_dpan_mmx; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_can_dpan_mmx; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_can_dpan_mmx; + op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_caa_dpan_mmx; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_caa_dpan_mmx; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_caa_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c new file mode 100644 index 0000000..6e35970 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c @@ -0,0 +1,570 @@ +/* blend pixel x color --> dst */ +#ifdef BUILD_NEON +/* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of + * reads, then two writes, a miss on read is 'just' two reads */ +static void +_op_blend_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { +#define AP "blend_p_c_dp_" + asm volatile ( + ".fpu neon \n\t" + // Load 'c' + "vdup.u32 q7, %[c] \n\t" + "vmov.i8 q6, #1 \n\t" + + // Choose a loop + "andS %[tmp], %[d], $0xf \n\t" + "beq "AP"quadstart \n\t" + + "andS %[tmp],%[d], $0x4 \n\t" + "beq "AP"dualloop \n\t" + + AP"singleloop:" + "vld1.32 d0[0], [%[s]]! \n\t" + "vld1.32 d2[0], [%[d]] \n\t" + // Mulitply s * c (= sc) + "vmull.u8 q4, d0,d14 \n\t" + // sc in d8 + "vqrshrn.u16 d4, q4, #8 \n\t" + + // sca in d9 + "vmvn.u32 d6, d4 \n\t" + "vshr.u32 d6, d6, #24 \n\t" + + "vmul.u32 d6, d12, d6 \n\t" + + /* d * alpha */ + "vmull.u8 q4, d6, d2 \n\t" + "vqrshrn.u16 d0, q4, #8 \n\t" + + "vqadd.u8 d2, d0, d4 \n\t" + + // Save dsc + sc + "vst1.32 d2[0], [%[d]]! \n\t" + + // Now where? + // Can we go the fast path? + "andS %[tmp], %[d],$0xf \n\t" + "beq "AP"quadstart \n\t" + + AP"dualloop: \n\t" + // Check we have enough to bother with! + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #16 \n\t" + "blt "AP"loopout \n\t" + + // load 's' -> q0, 'd' -> q1 + "vldm %[s]!, {d0} \n\t" + "vldm %[d], {d2} \n\t" + // Mulitply s * c (= sc) + "vmull.u8 q4, d0,d14 \n\t" + // sc in d8 + "vqrshrn.u16 d4, q4, #8 \n\t" + + // sca in d9 + "vmvn.u32 d6, d4 \n\t" + "vshr.u32 d6, d6, #24 \n\t" + + "vmul.u32 d6, d12, d6 \n\t" + + /* d * alpha */ + "vmull.u8 q4, d6, d2 \n\t" + "vqrshrn.u16 d0, q4, #8 \n\t" + + "vqadd.u8 d2, d0, d4 \n\t" + + // Save dsc + sc + "vst1.32 d2, [%[d]]! \n\t" + + AP"quadstart: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #16 \n\t" + "blt "AP"loopout \n\t" + + "sub %[tmp], %[e], #15 \n\t" + + AP"quadloop:\n\t" + // load 's' -> q0, 'd' -> q1 + "vldm %[s]!, {d0,d1} \n\t" + "vldm %[d], {d2,d3} \n\t" + // Mulitply s * c (= sc) + "vmull.u8 q4, d0,d14 \n\t" + "vmull.u8 q5, d1,d14 \n\t" + + // Get sc & sc alpha + "vqrshrn.u16 d4, q4, #8 \n\t" + "vqrshrn.u16 d5, q5, #8 \n\t" + // sc is now in q2, 8bpp + // Shift out, then spread alpha for q2 + "vmvn.u32 q3, q2 \n\t" + "vshr.u32 q3, q3, $0x18 \n\t" + "vmul.u32 q3, q6,q3 \n\t" + + // Multiply 'd' by sc.alpha (dsca) + "vmull.u8 q4, d6,d2 \n\t" + "vmull.u8 q5, d7,d3 \n\t" + + "vqrshrn.u16 d0, q4, #8 \n\t" + "vqrshrn.u16 d1, q5, #8 \n\t" + + "vqadd.u8 q1, q0, q2 \n\t" + + // Save dsc + sc + "vstm %[d]!, {d2,d3} \n\t" + + "cmp %[tmp], %[d] \n\t" + + "bhi "AP"quadloop \n\t" + + /* Trailing stuff */ + AP"loopout: \n\t" + + "cmp %[d], %[e] \n\t" + "beq "AP"done\n\t" + "sub %[tmp],%[e], %[d] \n\t" + "cmp %[tmp],$0x04 \n\t" + "beq "AP"singleloop2 \n\t" + + "sub %[tmp], %[e], #7 \n\t" + /* Dual loop */ + AP"dualloop2: \n\t" + "vldm %[s]!, {d0} \n\t" + "vldm %[d], {d2} \n\t" + // Mulitply s * c (= sc) + "vmull.u8 q4, d0,d14 \n\t" + // sc in d8 + "vqrshrn.u16 d4, q4, #8 \n\t" + + // sca in d9 + // XXX: I can probably squash one of these 3 + "vmvn.u32 d6, d4 \n\t" + "vshr.u32 d6, d6, #24 \n\t" + "vmul.u32 d6, d6, d12 \n\t" + + /* d * alpha */ + "vmull.u8 q4, d6, d2 \n\t" + "vqrshrn.u16 d0, q4, #8 \n\t" + + "vqadd.u8 d2, d0, d4 \n\t" + + // Save dsc + sc + "vstm %[d]!, {d2} \n\t" + + "cmp %[tmp], %[d] \n\t" + "bhi "AP"dualloop2 \n\t" + + "cmp %[d], %[e] \n\t" + "beq "AP"done \n\t" + + AP"singleloop2: \n\t" + "vld1.32 d0[0], [%[s]]! \n\t" + "vld1.32 d2[0], [%[d]] \n\t" + // Mulitply s * c (= sc) + "vmull.u8 q4, d0,d14 \n\t" + // sc in d8 + "vqrshrn.u16 d4, q4, #8 \n\t" + + // sca in d6 + "vmvn.u32 d6, d4 \n\t" + "vshr.u32 d6, d6, #24 \n\t" + "vmul.u32 d6, d12,d6 \n\t" + + /* d * alpha */ + "vmull.u8 q4, d6, d2 \n\t" + "vqrshrn.u16 d0, q4, #8 \n\t" + + "vqadd.u8 d2, d0, d4 \n\t" + + // Save dsc + sc + "vst1.32 d2[0], [%[d]]! \n\t" + + + AP"done:" + : // No output + // + : [s] "r" (s), [e] "r" (d + l), [d] "r" (d), [c] "r" (c), + [tmp] "r" (12) + : "q0","q1","q2","q3","q4","q5","q6","q7","memory" + ); +#undef AP +} + +static void +_op_blend_pan_can_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + UNROLL8_PLD_WHILE(d, l, e, + { + *d++ = 0xff000000 + MUL3_SYM(c, *s); + s++; + }); +} + +static void +_op_blend_pan_caa_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { +#if 1 + DATA32 *e; + int alpha; + c = 1 + (c & 0xff); + UNROLL8_PLD_WHILE(d, l, e, + { + DATA32 sc = MUL_256(c, *s); + alpha = 256 - (sc >> 24); + *d = sc + MUL_256(alpha, *d); + d++; + s++; + }); +#else // the below neon is buggy!! misses rendering of spans, i think with alignment. quick - just disable this. +#define AP "_op_blend_pan_caa_dp_" + DATA32 *e = d + l, *tmp = (void*)73; + asm volatile ( + ".fpu neon \n\t" + /* Set up 'c' */ + "vdup.u8 d14, %[c] \n\t" + "vmov.i8 d15, #1 \n\t" + "vaddl.u8 q15, d14, d15 \n\t" + "vshr.u8 q15,#1 \n\t" + + // Pick a loop + "andS %[tmp], %[d], $0xf \n\t" + "beq "AP"quadstart \n\t" + + "andS %[tmp], %[d], $0x4 \n\t" + "beq "AP"dualstart \n\t" + + AP"singleloop: \n\t" + "vld1.32 d4[0], [%[d]] \n\t" + "vld1.32 d0[0], [%[s]]! \n\t" + + // Long version of 'd' + "vmovl.u8 q8, d4 \n\t" + + // Long version of 's' + "vmovl.u8 q6, d0 \n\t" + + // d8 = s -d + "vsub.s16 d8, d12, d16 \n\t" + + // Multiply + "vmul.s16 d8, d8, d30 \n\t" + + // Shift down + "vshr.s16 d8, #7 \n\t" + + // Add 'd' + "vqadd.s16 d8, d8, d16 \n\t" + + // Shrink to save + "vqmovun.s16 d0, q4 \n\t" + "vst1.32 d0[0], [%[d]]! \n\t" + + // Now where? + "andS %[tmp], %[d], $0xf \n\t" + "beq "AP"quadstart \n\t" + + AP"dualstart: \n\t" + // Check we have enough + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #16 \n\t" + "blt "AP"loopout \n\t" + + AP"dualloop:" + "vldm %[d], {d4} \n\t" + "vldm %[s]!, {d0} \n\t" + + // Long version of d + "vmovl.u8 q8, d4 \n\t" + + // Long version of s + "vmovl.u8 q6, d0 \n\t" + + // q4/q5 = s-d + "vsub.s16 q4, q6, q8 \n\t" + + // Multiply + "vmul.s16 q4, q4,q15 \n\t" + + // Shift down + "vshr.s16 q4, #7 \n\t" + + // Add d + "vqadd.s16 q4, q4, q8 \n\t" + + // Shrink to save + "vqmovun.s16 d0, q4 \n\t" + + "vstm %[d]!, {d0} \n\t" + AP"quadstart: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #16 \n\t" + "blt "AP"loopout \n\t" + + "sub %[tmp], %[e], #15 \n\t" + + AP"quadloop: \n\t" + // load 's' -> q0, 'd' -> q2 + "vldm %[d], {d4,d5} \n\t" + "vldm %[s]!, {d0,d1} \n\t" + + // Long version of d + "vmovl.u8 q8, d4 \n\t" + "vmovl.u8 q9, d5 \n\t" + + // Long version of s + "vmovl.u8 q6, d0 \n\t" + "vmovl.u8 q7, d1 \n\t" + + // q4/q5 = s-d + "vsub.s16 q4, q6, q8 \n\t" + "vsub.s16 q5, q7, q9 \n\t" + + // Multiply + "vmul.s16 q4, q4,q15 \n\t" + "vmul.s16 q5, q5,q15 \n\t" + + // Shift down + "vshr.s16 q4, #7 \n\t" + "vshr.s16 q5, #7 \n\t" + + // Add d + "vqadd.s16 q4, q4, q8 \n\t" + "vqadd.s16 q5, q5, q9 \n\t" + + // Shrink to save + "vqmovun.s16 d0, q4 \n\t" + "vqmovun.s16 d1, q5 \n\t" + "vstm %[d]!, {d0,d1} \n\t" + "cmp %[tmp], %[d] \n\t" + + "bhi "AP"quadloop\n\t" + + + "b "AP"done\n\t" + AP"loopout: \n\t" + "cmp %[d], %[e] \n\t" + "beq "AP"done\n\t" + "sub %[tmp],%[e], %[d] \n\t" + "cmp %[tmp],$0x04 \n\t" + "beq "AP"singleloop2 \n\t" + + AP"dualloop2: \n\t" + "vldm %[d], {d4} \n\t" + "vldm %[s]!, {d0} \n\t" + + // Long version of d + "vmovl.u8 q8, d4 \n\t" + + // Long version of s + "vmovl.u8 q6, d0 \n\t" + + // q4/q5 = s-d + "vsub.s16 q4, q6, q8 \n\t" + + // Multiply + "vmul.s16 q4, q4,q15 \n\t" + + // Shift down + "vshr.s16 q4, #7 \n\t" + + // Add d + "vqadd.s16 q4, q4, q8 \n\t" + + // Shrink to save + "vqmovun.s16 d0, q4 \n\t" + + "vstm %[d]!, {d0} \n\t" + + "cmp %[d], %[e] \n\t" + "beq "AP"done \n\t" + + AP"singleloop2: \n\t" + "vld1.32 d4[0], [%[d]] \n\t" + "vld1.32 d0[0], [%[s]]! \n\t" + + // Long version of 'd' + "vmovl.u8 q8, d4 \n\t" + + // Long version of 's' + "vmovl.u8 q6, d0 \n\t" + + // d8 = s -d + "vsub.s16 d8, d12, d16 \n\t" + + // Multiply + "vmul.s16 d8, d8, d30 \n\t" + + // Shift down + "vshr.s16 d8, #7 \n\t" + + // Add 'd' + "vqadd.s16 d8, d8, d16 \n\t" + + // Shrink to save + "vqmovun.s16 d0, q4 \n\t" + + "vst1.32 d0[0], [%[d]] \n\t" + + + AP"done: \n\t" + + // No output + : + // Input + : [s] "r" (s), [d] "r" (d), [e] "r" (e), [c] "r" (c), [tmp] "r" (tmp) + // Clobbered + : "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q9", "memory" + ); +#undef AP +#endif +} + +#define _op_blend_pas_c_dp_neon _op_blend_p_c_dp_neon +#define _op_blend_pan_c_dp_neon _op_blend_p_c_dp_neon +#define _op_blend_p_can_dp_neon _op_blend_p_c_dp_neon +#define _op_blend_pas_can_dp_neon _op_blend_p_c_dp_neon +#define _op_blend_p_caa_dp_neon _op_blend_p_c_dp_neon +#define _op_blend_pas_caa_dp_neon _op_blend_p_c_dp_neon + +#define _op_blend_p_c_dpan_neon _op_blend_p_c_dp_neon +#define _op_blend_pas_c_dpan_neon _op_blend_pas_c_dp_neon +#define _op_blend_pan_c_dpan_neon _op_blend_pan_c_dp_neon +#define _op_blend_p_can_dpan_neon _op_blend_p_can_dp_neon +#define _op_blend_pas_can_dpan_neon _op_blend_pas_can_dp_neon +#define _op_blend_pan_can_dpan_neon _op_blend_pan_can_dp_neon +#define _op_blend_p_caa_dpan_neon _op_blend_p_caa_dp_neon +#define _op_blend_pas_caa_dpan_neon _op_blend_pas_caa_dp_neon +#define _op_blend_pan_caa_dpan_neon _op_blend_pan_caa_dp_neon + + +static void +init_blend_pixel_color_span_funcs_neon(void) +{ + op_blend_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_blend_p_c_dp_neon; + op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_blend_pas_c_dp_neon; + op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_blend_pan_c_dp_neon; + op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_p_can_dp_neon; + op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pas_can_dp_neon; + op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pan_can_dp_neon; + op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_p_caa_dp_neon; + op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pas_caa_dp_neon; + op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pan_caa_dp_neon; + + op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_p_c_dpan_neon; + op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pas_c_dpan_neon; + op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pan_c_dpan_neon; + op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_p_can_dpan_neon; + op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pas_can_dpan_neon; + op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pan_can_dpan_neon; + op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_p_caa_dpan_neon; + op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pas_caa_dpan_neon; + op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pan_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_blend_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = MUL4_SYM(c, s); + c = 256 - (s >> 24); + *d = s + MUL_256(c, *d); +} + +#define _op_blend_pt_pas_c_dp_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_pan_c_dp_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_p_can_dp_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_pas_can_dp_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_pan_can_dp_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_p_caa_dp_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_pas_caa_dp_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_pan_caa_dp_neon _op_blend_pt_p_c_dp_neon + +#define _op_blend_pt_p_c_dpan_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_pas_c_dpan_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_pan_c_dpan_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_p_can_dpan_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_pas_can_dpan_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_pan_can_dpan_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_p_caa_dpan_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_pas_caa_dpan_neon _op_blend_pt_p_c_dp_neon +#define _op_blend_pt_pan_caa_dpan_neon _op_blend_pt_p_c_dp_neon + +static void +init_blend_pixel_color_pt_funcs_neon(void) +{ + op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_p_c_dp_neon; + op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_pas_c_dp_neon; + op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_pan_c_dp_neon; + op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_p_can_dp_neon; + op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_pas_can_dp_neon; + op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_pan_can_dp_neon; + op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_p_caa_dp_neon; + op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_pas_caa_dp_neon; + op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_pan_caa_dp_neon; + + op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_p_c_dpan_neon; + op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_pas_c_dpan_neon; + op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_pan_c_dpan_neon; + op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_p_can_dpan_neon; + op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_pas_can_dpan_neon; + op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_pan_can_dpan_neon; + op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_p_caa_dpan_neon; + op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_pas_caa_dpan_neon; + op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_pan_caa_dpan_neon; +} +#endif + +/*-----*/ + +/* blend_rel pixel x color -> dst */ + +#ifdef BUILD_NEON + +#define _op_blend_rel_p_c_dpan_neon _op_blend_p_c_dpan_neon +#define _op_blend_rel_pas_c_dpan_neon _op_blend_pas_c_dpan_neon +#define _op_blend_rel_pan_c_dpan_neon _op_blend_pan_c_dpan_neon +#define _op_blend_rel_p_can_dpan_neon _op_blend_p_can_dpan_neon +#define _op_blend_rel_pas_can_dpan_neon _op_blend_pas_can_dpan_neon +#define _op_blend_rel_pan_can_dpan_neon _op_blend_pan_can_dpan_neon +#define _op_blend_rel_p_caa_dpan_neon _op_blend_p_caa_dpan_neon +#define _op_blend_rel_pas_caa_dpan_neon _op_blend_pas_caa_dpan_neon +#define _op_blend_rel_pan_caa_dpan_neon _op_blend_pan_caa_dpan_neon + +static void +init_blend_rel_pixel_color_span_funcs_neon(void) +{ + op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_p_c_dpan_neon; + op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pas_c_dpan_neon; + op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pan_c_dpan_neon; + op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_p_can_dpan_neon; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pas_can_dpan_neon; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pan_can_dpan_neon; + op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_p_caa_dpan_neon; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pas_caa_dpan_neon; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pan_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON + +#define _op_blend_rel_pt_p_c_dpan_neon _op_blend_pt_p_c_dpan_neon +#define _op_blend_rel_pt_pas_c_dpan_neon _op_blend_pt_pas_c_dpan_neon +#define _op_blend_rel_pt_pan_c_dpan_neon _op_blend_pt_pan_c_dpan_neon +#define _op_blend_rel_pt_p_can_dpan_neon _op_blend_pt_p_can_dpan_neon +#define _op_blend_rel_pt_pas_can_dpan_neon _op_blend_pt_pas_can_dpan_neon +#define _op_blend_rel_pt_pan_can_dpan_neon _op_blend_pt_pan_can_dpan_neon +#define _op_blend_rel_pt_p_caa_dpan_neon _op_blend_pt_p_caa_dpan_neon +#define _op_blend_rel_pt_pas_caa_dpan_neon _op_blend_pt_pas_caa_dpan_neon +#define _op_blend_rel_pt_pan_caa_dpan_neon _op_blend_pt_pan_caa_dpan_neon + +static void +init_blend_rel_pixel_color_pt_funcs_neon(void) +{ + op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_c_dpan_neon; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_c_dpan_neon; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_c_dpan_neon; + op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_can_dpan_neon; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_can_dpan_neon; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_can_dpan_neon; + op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_caa_dpan_neon; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_caa_dpan_neon; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_caa_dpan_neon; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c new file mode 100644 index 0000000..4ee31f5 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c @@ -0,0 +1,543 @@ +/* blend pixel x color --> dst */ + +#ifdef BUILD_SSE3 + +static void +_op_blend_p_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + + DATA32 alpha; + + const __m128i c_packed = _mm_set_epi32(c, c, c, c); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + DATA32 sc = MUL4_SYM(c, *s); + alpha = 256 - (sc >> 24); + *d = sc + MUL_256(alpha, *d); + d++; s++; l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i sc0 = mul4_sym_sse3(c_packed, s0); + __m128i a0 = sub4_alpha_sse3(sc0); + __m128i mul0 = mul_256_sse3(a0, d0); + + d0 = _mm_add_epi32(sc0, mul0); + + _mm_store_si128((__m128i *)d, d0); + + d += 4; s += 4; l -= 4; + }, + { /* A8OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i sc0 = mul4_sym_sse3(c_packed, s0); + __m128i sc1 = mul4_sym_sse3(c_packed, s1); + + __m128i a0 = sub4_alpha_sse3(sc0); + __m128i a1 = sub4_alpha_sse3(sc1); + + __m128i mul0 = mul_256_sse3(a0, d0); + __m128i mul1 = mul_256_sse3(a1, d1); + + d0 = _mm_add_epi32(sc0, mul0); + d1 = _mm_add_epi32(sc1, mul1); + + _mm_store_si128((__m128i *)d, d0); + _mm_store_si128((__m128i *)(d+4), d1); + + d += 8; s += 8; l -= 8; + }) +} + +static void +_op_blend_pan_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + + DATA32 c_a = c & 0xFF000000; + DATA32 alpha = 256 - (c >> 24); + + const __m128i c_packed = _mm_set_epi32(c, c, c, c); + const __m128i c_alpha = _mm_set_epi32(c_a, c_a, c_a, c_a); + const __m128i a0 = _mm_set_epi32(alpha, alpha, alpha, alpha); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + *d = ((c & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); + d++; s++; l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), + mul_256_sse3(a0, d0)); + + r0 = _mm_add_epi32(r0, c_alpha); + + _mm_store_si128((__m128i *)d, r0); + + d += 4; s += 4; l -= 4; + }, + { /* A8OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), + mul_256_sse3(a0, d0)); + + __m128i r1 = _mm_add_epi32(mul3_sym_sse3(c_packed, s1), + mul_256_sse3(a0, d1)); + + r0 = _mm_add_epi32(r0, c_alpha); + r1 = _mm_add_epi32(r1, c_alpha); + + _mm_store_si128((__m128i *)d, r0); + _mm_store_si128((__m128i *)(d+4), r1); + + d += 8; s += 8; l -= 8; + }) +} + +static void +_op_blend_p_can_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + + int alpha; + const __m128i c_packed = _mm_set_epi32(c, c, c, c); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + alpha = 256 - (*s >> 24); + *d = ((*s & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); + d++; s++; l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i a0 = sub4_alpha_sse3(s0); + + __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), + mul_256_sse3(a0, d0)); + + r0 = _mm_add_epi32(r0, _mm_and_si128(s0, A_MASK_SSE3)); + + _mm_store_si128((__m128i *)d, r0); + + d += 4; s += 4; l -= 4; + }, + { + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i a0 = sub4_alpha_sse3(s0); + __m128i a1 = sub4_alpha_sse3(s1); + + __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), + mul_256_sse3(a0, d0)); + + __m128i r1 = _mm_add_epi32(mul3_sym_sse3(c_packed, s1), + mul_256_sse3(a1, d1)); + + r0 = _mm_add_epi32(r0, _mm_and_si128(s0, A_MASK_SSE3)); + r1 = _mm_add_epi32(r1, _mm_and_si128(s1, A_MASK_SSE3)); + + _mm_store_si128((__m128i *)d, r0); + _mm_store_si128((__m128i *)(d+4), r1); + + d += 8; s += 8; l -= 8; + }) +} + +static void +_op_blend_pan_can_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + + const __m128i c_packed = _mm_set_epi32(c, c, c, c); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + *d++ = 0xff000000 + MUL3_SYM(c, *s); + s++; l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + + __m128i r0 = mul3_sym_sse3(c_packed, s0); + r0 = _mm_add_epi32(r0, A_MASK_SSE3); + + _mm_store_si128((__m128i *)d, r0); + + d += 4; s += 4; l -= 4; + }, + { /* A8OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + + __m128i r0 = mul3_sym_sse3(c_packed, s0); + __m128i r1 = mul3_sym_sse3(c_packed, s1); + + r0 = _mm_add_epi32(r0, A_MASK_SSE3); + r1 = _mm_add_epi32(r1, A_MASK_SSE3); + + _mm_store_si128((__m128i *)d, r0); + _mm_store_si128((__m128i *)(d+4), r1); + + d += 8; s += 8; l -= 8; + }) +} + +static void +_op_blend_p_caa_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + + int alpha; + c = 1 + (c & 0xff); + const __m128i c_packed = _mm_set_epi32(c, c, c, c); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + DATA32 sc = MUL_256(c, *s); + alpha = 256 - (sc >> 24); + *d = sc + MUL_256(alpha, *d); + d++; + s++; + l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128 ((__m128i *)d); + + __m128i sc0 = mul_256_sse3(c_packed, s0); + __m128i a0 = sub4_alpha_sse3(sc0); + + __m128i r0 = _mm_add_epi32(mul_256_sse3(a0, d0), sc0); + + _mm_store_si128((__m128i *)d, r0); + + d += 4; s += 4; l -= 4; + }, + { + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i sc0 = mul_256_sse3(c_packed, s0); + __m128i sc1 = mul_256_sse3(c_packed, s1); + + __m128i a0 = sub4_alpha_sse3(sc0); + __m128i a1 = sub4_alpha_sse3(sc1); + + __m128i r0 = _mm_add_epi32(mul_256_sse3(a0, d0), sc0); + __m128i r1 = _mm_add_epi32(mul_256_sse3(a1, d1), sc1); + + _mm_store_si128((__m128i *)d, r0); + _mm_store_si128((__m128i *)(d+4), r1); + + d += 8; s += 8; l -= 8; + }) +} + +static void +_op_blend_pan_caa_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + + c = 1 + (c & 0xff); + const __m128i c_packed = _mm_set_epi32(c, c, c,c); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + *d = INTERP_256(c, *s, *d); + d++; s++; l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i r0 = interp4_256_sse3(c_packed, s0, d0); + + _mm_store_si128((__m128i *)d, r0); + + d += 4; s += 4; l -= 4; + }, + { + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i r0 = interp4_256_sse3(c_packed, s0, d0); + __m128i r1 = interp4_256_sse3(c_packed, s1, d1); + + _mm_store_si128((__m128i *)d, r0); + _mm_store_si128((__m128i *)(d+4), r1); + + d += 8; s += 8; l -= 8; + }) +} + +#define _op_blend_pas_c_dp_sse3 _op_blend_p_c_dp_sse3 +#define _op_blend_pas_can_dp_sse3 _op_blend_p_can_dp_sse3 +#define _op_blend_pas_caa_dp_sse3 _op_blend_p_caa_dp_sse3 + +#define _op_blend_p_c_dpan_sse3 _op_blend_p_c_dp_sse3 +#define _op_blend_pas_c_dpan_sse3 _op_blend_pas_c_dp_sse3 +#define _op_blend_pan_c_dpan_sse3 _op_blend_pan_c_dp_sse3 +#define _op_blend_p_can_dpan_sse3 _op_blend_p_can_dp_sse3 +#define _op_blend_pas_can_dpan_sse3 _op_blend_pas_can_dp_sse3 +#define _op_blend_pan_can_dpan_sse3 _op_blend_pan_can_dp_sse3 +#define _op_blend_p_caa_dpan_sse3 _op_blend_p_caa_dp_sse3 +#define _op_blend_pas_caa_dpan_sse3 _op_blend_pas_caa_dp_sse3 +#define _op_blend_pan_caa_dpan_sse3 _op_blend_pan_caa_dp_sse3 + +static void +init_blend_pixel_color_span_funcs_sse3(void) +{ + op_blend_span_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_p_c_dp_sse3; + op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_pas_c_dp_sse3; + op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_pan_c_dp_sse3; + op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_p_can_dp_sse3; + op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pas_can_dp_sse3; + op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pan_can_dp_sse3; + op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_p_caa_dp_sse3; + op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pas_caa_dp_sse3; + op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pan_caa_dp_sse3; + + op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_p_c_dpan_sse3; + op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pas_c_dpan_sse3; + op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pan_c_dpan_sse3; + op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_p_can_dpan_sse3; + op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pas_can_dpan_sse3; + op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pan_can_dpan_sse3; + op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_p_caa_dpan_sse3; + op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pas_caa_dpan_sse3; + op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pan_caa_dpan_sse3; +} + +#define _op_blend_pt_p_c_dp_sse3 NULL + +#define _op_blend_pt_pas_c_dp_sse3 _op_blend_pt_p_c_dp_sse3 +#define _op_blend_pt_pan_c_dp_sse3 _op_blend_pt_p_c_dp_sse3 +#define _op_blend_pt_p_can_dp_sse3 _op_blend_pt_p_c_dp_sse3 +#define _op_blend_pt_pas_can_dp_sse3 _op_blend_pt_p_c_dp_sse3 +#define _op_blend_pt_pan_can_dp_sse3 _op_blend_pt_p_c_dp_sse3 +#define _op_blend_pt_p_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3 +#define _op_blend_pt_pas_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3 +#define _op_blend_pt_pan_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3 + +#define _op_blend_pt_p_c_dpan_sse3 _op_blend_pt_p_c_dp_sse3 +#define _op_blend_pt_pas_c_dpan_sse3 _op_blend_pt_pas_c_dp_sse3 +#define _op_blend_pt_pan_c_dpan_sse3 _op_blend_pt_pan_c_dp_sse3 +#define _op_blend_pt_p_can_dpan_sse3 _op_blend_pt_p_can_dp_sse3 +#define _op_blend_pt_pas_can_dpan_sse3 _op_blend_pt_pas_can_dp_sse3 +#define _op_blend_pt_pan_can_dpan_sse3 _op_blend_pt_pan_can_dp_sse3 +#define _op_blend_pt_p_caa_dpan_sse3 _op_blend_pt_p_caa_dp_sse3 +#define _op_blend_pt_pas_caa_dpan_sse3 _op_blend_pt_pas_caa_dp_sse3 +#define _op_blend_pt_pan_caa_dpan_sse3 _op_blend_pt_pan_caa_dp_sse3 + +static void +init_blend_pixel_color_pt_funcs_sse3(void) +{ + op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_p_c_dp_sse3; + op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_pas_c_dp_sse3; + op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_pan_c_dp_sse3; + op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_p_can_dp_sse3; + op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_pas_can_dp_sse3; + op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_pan_can_dp_sse3; + op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_p_caa_dp_sse3; + op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_pas_caa_dp_sse3; + op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_pan_caa_dp_sse3; + + op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_p_c_dpan_sse3; + op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_pas_c_dpan_sse3; + op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_pan_c_dpan_sse3; + op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_p_can_dpan_sse3; + op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_pas_can_dpan_sse3; + op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_pan_can_dpan_sse3; + op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_p_caa_dpan_sse3; + op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_pas_caa_dpan_sse3; + op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_pan_caa_dpan_sse3; +} + +/*-----*/ + +/* blend_rel pixel x color -> dst */ + +static void +_op_blend_rel_p_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + + int alpha; + + const __m128i c_packed = _mm_set_epi32(c, c, c, c); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + DATA32 sc = MUL4_SYM(c, *s); + alpha = 256 - (sc >> 24); + *d = MUL_SYM(*d >> 24, sc) + MUL_256(alpha, *d); + d++; s++; l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i sc0 = mul4_sym_sse3(c_packed, s0); + __m128i a0 = sub4_alpha_sse3(sc0); + + __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), sc0); + __m128i r0 = mul_256_sse3(a0, d0); + + r0 = _mm_add_epi32(l0, r0); + + _mm_store_si128((__m128i *)d, r0); + + d += 4; s += 4; l -= 4; + }, + { /* A8OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i sc0 = mul4_sym_sse3(c_packed, s0); + __m128i sc1 = mul4_sym_sse3(c_packed, s1); + + __m128i a0 = sub4_alpha_sse3(sc0); + __m128i a1 = sub4_alpha_sse3(sc1); + + __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), sc0); + __m128i r0 = mul_256_sse3(a0, d0); + + __m128i l1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), sc1); + __m128i r1 = mul_256_sse3(a1, d1); + + r0 = _mm_add_epi32(l0, r0); + r1 = _mm_add_epi32(l1, r1); + + _mm_store_si128((__m128i *)d, r0); + _mm_store_si128((__m128i *)(d+4), r1); + + d += 8; s += 8; l -= 8; + }) +} + +#define _op_blend_rel_pas_c_dp_sse3 _op_blend_rel_p_c_dp_sse3 +#define _op_blend_rel_pan_c_dp_sse3 _op_blend_rel_p_c_dp_sse3 +#define _op_blend_rel_p_can_dp_sse3 _op_blend_rel_p_c_dp_sse3 +#define _op_blend_rel_pas_can_dp_sse3 _op_blend_rel_p_c_dp_sse3 +#define _op_blend_rel_pan_can_dp_sse3 _op_blend_rel_p_c_dp_sse3 +#define _op_blend_rel_p_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3 +#define _op_blend_rel_pas_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3 +#define _op_blend_rel_pan_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3 + +#define _op_blend_rel_p_c_dpan_sse3 _op_blend_p_c_dpan_sse3 +#define _op_blend_rel_pas_c_dpan_sse3 _op_blend_pas_c_dpan_sse3 +#define _op_blend_rel_pan_c_dpan_sse3 _op_blend_pan_c_dpan_sse3 +#define _op_blend_rel_p_can_dpan_sse3 _op_blend_p_can_dpan_sse3 +#define _op_blend_rel_pas_can_dpan_sse3 _op_blend_pas_can_dpan_sse3 +#define _op_blend_rel_pan_can_dpan_sse3 _op_blend_pan_can_dpan_sse3 +#define _op_blend_rel_p_caa_dpan_sse3 _op_blend_p_caa_dpan_sse3 +#define _op_blend_rel_pas_caa_dpan_sse3 _op_blend_pas_caa_dpan_sse3 +#define _op_blend_rel_pan_caa_dpan_sse3 _op_blend_pan_caa_dpan_sse3 + +static void +init_blend_rel_pixel_color_span_funcs_sse3(void) +{ + op_blend_rel_span_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_p_c_dp_sse3; + op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pas_c_dp_sse3; + op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pan_c_dp_sse3; + op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_p_can_dp_sse3; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pas_can_dp_sse3; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pan_can_dp_sse3; + op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_p_caa_dp_sse3; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pas_caa_dp_sse3; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pan_caa_dp_sse3; + + op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_p_c_dpan_sse3; + op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pas_c_dpan_sse3; + op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pan_c_dpan_sse3; + op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_p_can_dpan_sse3; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pas_can_dpan_sse3; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pan_can_dpan_sse3; + op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_p_caa_dpan_sse3; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pas_caa_dpan_sse3; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pan_caa_dpan_sse3; +} + +#define _op_blend_rel_pt_p_c_dp_sse3 NULL + +#define _op_blend_rel_pt_pas_c_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 +#define _op_blend_rel_pt_pan_c_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 +#define _op_blend_rel_pt_p_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 +#define _op_blend_rel_pt_pas_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 +#define _op_blend_rel_pt_pan_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 +#define _op_blend_rel_pt_p_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 +#define _op_blend_rel_pt_pas_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 +#define _op_blend_rel_pt_pan_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 + +#define _op_blend_rel_pt_p_c_dpan_sse3 _op_blend_pt_p_c_dpan_sse3 +#define _op_blend_rel_pt_pas_c_dpan_sse3 _op_blend_pt_pas_c_dpan_sse3 +#define _op_blend_rel_pt_pan_c_dpan_sse3 _op_blend_pt_pan_c_dpan_sse3 +#define _op_blend_rel_pt_p_can_dpan_sse3 _op_blend_pt_p_can_dpan_sse3 +#define _op_blend_rel_pt_pas_can_dpan_sse3 _op_blend_pt_pas_can_dpan_sse3 +#define _op_blend_rel_pt_pan_can_dpan_sse3 _op_blend_pt_pan_can_dpan_sse3 +#define _op_blend_rel_pt_p_caa_dpan_sse3 _op_blend_pt_p_caa_dpan_sse3 +#define _op_blend_rel_pt_pas_caa_dpan_sse3 _op_blend_pt_pas_caa_dpan_sse3 +#define _op_blend_rel_pt_pan_caa_dpan_sse3 _op_blend_pt_pan_caa_dpan_sse3 + +static void +init_blend_rel_pixel_color_pt_funcs_sse3(void) +{ + op_blend_rel_pt_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_p_c_dp_sse3; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_pas_c_dp_sse3; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_pan_c_dp_sse3; + op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_p_can_dp_sse3; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_pas_can_dp_sse3; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_pan_can_dp_sse3; + op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_p_caa_dp_sse3; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_pas_caa_dp_sse3; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_pan_caa_dp_sse3; + + op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_c_dpan_sse3; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_c_dpan_sse3; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_c_dpan_sse3; + op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_can_dpan_sse3; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_can_dpan_sse3; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_can_dpan_sse3; + op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_caa_dpan_sse3; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_caa_dpan_sse3; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_caa_dpan_sse3; +} + +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c new file mode 100644 index 0000000..9b5abe6 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c @@ -0,0 +1,217 @@ +/* blend pixel --> dst */ + +#ifdef BUILD_MMX +static void +_op_blend_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + while (d < e) + { + MOV_P2R(*s, mm2, mm0) + MOV_RA2R(mm2, mm1) + movq_r2r(mm6, mm3); + psubw_r2r(mm1, mm3); + + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm3, mm1) + + paddw_r2r(mm2, mm1); + MOV_R2P(mm1, *d, mm0) + s++; d++; + } +} + +static void +_op_blend_pas_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + _op_blend_p_dp_mmx(s, m, c, d, l); + return; + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + while (d < e) + { + switch (*s & 0xff000000) + { + case 0: + break; + case 0xff000000: + *d = *s; + break; + default : + MOV_P2R(*s, mm2, mm0) + MOV_RA2R(mm2, mm1) + movq_r2r(mm6, mm3); + psubw_r2r(mm1, mm3); + + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm3, mm1) + + paddw_r2r(mm2, mm1); + MOV_R2P(mm1, *d, mm0) + break; + } + s++; d++; + } +} + +#define _op_blend_pan_dp_mmx NULL + +#define _op_blend_p_dpan_mmx _op_blend_p_dp_mmx +#define _op_blend_pas_dpan_mmx _op_blend_pas_dp_mmx +#define _op_blend_pan_dpan_mmx _op_blend_pan_dp_mmx + +static void +init_blend_pixel_span_funcs_mmx(void) +{ + op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_p_dp_mmx; + op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pas_dp_mmx; + op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pan_dp_mmx; + + op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_p_dpan_mmx; + op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pas_dpan_mmx; + op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pan_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_blend_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + MOV_P2R(s, mm2, mm0) + MOV_RA2R(mm2, mm1) + movq_r2r(mm6, mm3); + psubw_r2r(mm1, mm3); + + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm3, mm1) + + paddw_r2r(mm2, mm1); + MOV_R2P(mm1, *d, mm0) +} + + +#define _op_blend_pt_pan_dp_mmx NULL +#define _op_blend_pt_pas_dp_mmx _op_blend_pt_p_dp_mmx + +#define _op_blend_pt_p_dpan_mmx _op_blend_pt_p_dp_mmx +#define _op_blend_pt_pan_dpan_mmx _op_blend_pt_pan_dp_mmx +#define _op_blend_pt_pas_dpan_mmx _op_blend_pt_pas_dp_mmx + +static void +init_blend_pixel_pt_funcs_mmx(void) +{ + op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_p_dp_mmx; + op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_pas_dp_mmx; + op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_pan_dp_mmx; + + op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_p_dpan_mmx; + op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pas_dpan_mmx; + op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pan_dpan_mmx; +} +#endif + +/*-----*/ + +/* blend_rel pixel -> dst */ + +#ifdef BUILD_MMX +static void +_op_blend_rel_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + MOV_A2R(ALPHA_255, mm5) + while (d < e) + { + MOV_P2R(*s, mm2, mm0) + MOV_RA2R(mm2, mm1) + movq_r2r(mm6, mm3); + psubw_r2r(mm1, mm3); + + MOV_P2R(*d, mm1, mm0) + MOV_RA2R(mm1, mm4) + MUL4_256_R2R(mm3, mm1) + + MUL4_SYM_R2R(mm4, mm2, mm5) + paddw_r2r(mm2, mm1); + MOV_R2P(mm1, *d, mm0) + s++; d++; + } +} + +static void +_op_blend_rel_pan_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + MOV_A2R(ALPHA_255, mm5) + while (d < e) + { + MOV_P2R(*s, mm2, mm0) + MOV_PA2R(*d, mm1) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + s++; d++; + } +} + +#define _op_blend_rel_pas_dp_mmx _op_blend_rel_p_dp_mmx + +#define _op_blend_rel_p_dpan_mmx _op_blend_p_dpan_mmx +#define _op_blend_rel_pan_dpan_mmx _op_blend_pan_dpan_mmx +#define _op_blend_rel_pas_dpan_mmx _op_blend_pas_dpan_mmx + +static void +init_blend_rel_pixel_span_funcs_mmx(void) +{ + op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_p_dp_mmx; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pas_dp_mmx; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pan_dp_mmx; + + op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_p_dpan_mmx; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pas_dpan_mmx; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pan_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_blend_rel_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + MOV_A2R(ALPHA_255, mm5) + + MOV_P2R(s, mm2, mm0) + MOV_RA2R(mm2, mm1) + psubw_r2r(mm1, mm6); + + MOV_P2R(*d, mm1, mm0) + MOV_RA2R(mm1, mm4) + MUL4_256_R2R(mm6, mm1) + + MUL4_SYM_R2R(mm4, mm2, mm5) + paddw_r2r(mm2, mm1); + MOV_R2P(mm1, *d, mm0) +} + +#define _op_blend_rel_pt_pas_dp_mmx _op_blend_rel_pt_p_dp_mmx +#define _op_blend_rel_pt_pan_dp_mmx _op_blend_rel_pt_p_dp_mmx + +#define _op_blend_rel_pt_p_dpan_mmx _op_blend_pt_p_dpan_mmx +#define _op_blend_rel_pt_pas_dpan_mmx _op_blend_pt_pas_dpan_mmx +#define _op_blend_rel_pt_pan_dpan_mmx _op_blend_pt_pan_dpan_mmx + +static void +init_blend_rel_pixel_pt_funcs_mmx(void) +{ + op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_p_dp_mmx; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_pas_dp_mmx; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_pan_dp_mmx; + + op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_dpan_mmx; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_dpan_mmx; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c new file mode 100644 index 0000000..a9d0f4b --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c @@ -0,0 +1,189 @@ +/* blend pixel x mask --> dst */ + +#ifdef BUILD_C +static void +_op_blend_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + alpha = *m; + switch(alpha) + { + case 0: + break; + case 255: + alpha = 256 - (*s >> 24); + *d = *s + MUL_256(alpha, *d); + break; + default: + c = MUL_SYM(alpha, *s); + alpha = 256 - (c >> 24); + *d = c + MUL_256(alpha, *d); + break; + } + m++; s++; d++; + }); +} + +static void +_op_blend_pas_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + alpha = *m; + switch(alpha) + { + case 0: + break; + case 255: + *d = *s; + break; + default: + alpha++; + *d = INTERP_256(alpha, *s, *d); + break; + } + m++; s++; d++; + }); +} + +static void +_op_blend_pan_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + alpha = *m; + switch(alpha) + { + case 0: + break; + case 255: + *d = *s; + break; + default: + alpha++; + *d = INTERP_256(alpha, *s, *d); + break; + } + m++; s++; d++; + }); +} + + +#define _op_blend_p_mas_dpan _op_blend_p_mas_dp +#define _op_blend_pas_mas_dpan _op_blend_pas_mas_dp +#define _op_blend_pan_mas_dpan _op_blend_pan_mas_dp + +static void +init_blend_pixel_mask_span_funcs_c(void) +{ + op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_p_mas_dp; + op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_pas_mas_dp; + op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_pan_mas_dp; + + op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_p_mas_dpan; + op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pas_mas_dpan; + op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pan_mas_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_blend_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = MUL_SYM(m, s); + c = 256 - (s >> 24); + *d = s + MUL_256(c, *d); +} + +static void +_op_blend_pt_pan_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { + *d = INTERP_256(m + 1, s, *d); +} + +#define _op_blend_pt_pas_mas_dp _op_blend_pt_p_mas_dp + +#define _op_blend_pt_p_mas_dpan _op_blend_pt_p_mas_dp +#define _op_blend_pt_pas_mas_dpan _op_blend_pt_pas_mas_dp +#define _op_blend_pt_pan_mas_dpan _op_blend_pt_pan_mas_dp + +static void +init_blend_pixel_mask_pt_funcs_c(void) +{ + op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_p_mas_dp; + op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_pas_mas_dp; + op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_pan_mas_dp; + + op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_p_mas_dpan; + op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_pas_mas_dpan; + op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_pan_mas_dpan; +} +#endif + +/*-----*/ + +/* blend_rel pixel x mask -> dst */ + +#ifdef BUILD_C +static void +_op_blend_rel_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + c = MUL_SYM(*m, *s); + alpha = 256 - (c >> 24); + *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); + d++; m++; s++; + }); +} + +#define _op_blend_rel_pas_mas_dp _op_blend_rel_p_mas_dp +#define _op_blend_rel_pan_mas_dp _op_blend_rel_p_mas_dp + +#define _op_blend_rel_p_mas_dpan _op_blend_p_mas_dpan +#define _op_blend_rel_pas_mas_dpan _op_blend_pas_mas_dpan +#define _op_blend_rel_pan_mas_dpan _op_blend_pan_mas_dpan + +static void +init_blend_rel_pixel_mask_span_funcs_c(void) +{ + op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_p_mas_dp; + op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pas_mas_dp; + op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pan_mas_dp; + + op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_p_mas_dpan; + op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pas_mas_dpan; + op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pan_mas_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_blend_rel_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = MUL_SYM(m, s); + c = 256 - (s >> 24); + *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); +} + +#define _op_blend_rel_pt_pas_mas_dp _op_blend_rel_pt_p_mas_dp +#define _op_blend_rel_pt_pan_mas_dp _op_blend_rel_pt_p_mas_dp + +#define _op_blend_rel_pt_p_mas_dpan _op_blend_pt_p_mas_dpan +#define _op_blend_rel_pt_pas_mas_dpan _op_blend_pt_pas_mas_dpan +#define _op_blend_rel_pt_pan_mas_dpan _op_blend_pt_pan_mas_dpan + +static void +init_blend_rel_pixel_mask_pt_funcs_c(void) +{ + op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_p_mas_dp; + op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_pas_mas_dp; + op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_pan_mas_dp; + + op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_p_mas_dpan; + op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pas_mas_dpan; + op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pan_mas_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c new file mode 100644 index 0000000..4fa50a9 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c @@ -0,0 +1,157 @@ +/* blend pixel x mask --> dst */ + +#ifdef BUILD_MMX +static void +_op_blend_pas_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + while (d < e) { + l = (*s >> 24); + switch(*m & l) + { + case 0: + break; + case 255: + *d = *s; + break; + default: + l = 1 + *m; + MOV_A2R(l, mm3) + MOV_P2R(*s, mm2, mm0) + MUL4_256_R2R(mm3, mm2) + + MOV_RA2R(mm2, mm1) + movq_r2r(mm6, mm3); + psubw_r2r(mm1, mm3); + + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm3, mm1) + + paddw_r2r(mm2, mm1); + MOV_R2P(mm1, *d, mm0) + break; + } + m++; s++; d++; + } +} + +static void +_op_blend_pan_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + while (d < e) { + l = *m; + switch(l) + { + case 0: + break; + case 255: + *d = *s; + break; + default: + l++; + MOV_A2R(l, mm3) + MOV_P2R(*s, mm2, mm0) + MOV_P2R(*d, mm1, mm0) + INTERP_256_R2R(mm3, mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + break; + } + m++; s++; d++; + } +} + +#define _op_blend_p_mas_dp_mmx _op_blend_pas_mas_dp_mmx + +#define _op_blend_p_mas_dpan_mmx _op_blend_p_mas_dp_mmx +#define _op_blend_pan_mas_dpan_mmx _op_blend_pan_mas_dp_mmx +#define _op_blend_pas_mas_dpan_mmx _op_blend_pas_mas_dp_mmx + +static void +init_blend_pixel_mask_span_funcs_mmx(void) +{ + op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_p_mas_dp_mmx; + op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pas_mas_dp_mmx; + op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pan_mas_dp_mmx; + + op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_p_mas_dpan_mmx; + op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pas_mas_dpan_mmx; + op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pan_mas_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_blend_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + c = m + 1; + MOV_A2R(c, mm3) + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_256, mm6) + MOV_P2R(s, mm2, mm0) + MUL4_256_R2R(mm3, mm2) + + MOV_RA2R(mm2, mm1) + psubw_r2r(mm1, mm6); + + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm6, mm1) + + paddw_r2r(mm2, mm1); + MOV_R2P(mm1, *d, mm0) +} + +#define _op_blend_pt_pan_mas_dp_mmx _op_blend_pt_p_mas_dp_mmx +#define _op_blend_pt_pas_mas_dp_mmx _op_blend_pt_p_mas_dp_mmx + +#define _op_blend_pt_p_mas_dpan_mmx _op_blend_pt_p_mas_dp_mmx +#define _op_blend_pt_pas_mas_dpan_mmx _op_blend_pt_pas_mas_dp_mmx +#define _op_blend_pt_pan_mas_dpan_mmx _op_blend_pt_pan_mas_dp_mmx + +static void +init_blend_pixel_mask_pt_funcs_mmx(void) +{ + op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_p_mas_dp_mmx; + op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_pas_mas_dp_mmx; + op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_pan_mas_dp_mmx; + + op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_p_mas_dpan_mmx; + op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pas_mas_dpan_mmx; + op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pan_mas_dpan_mmx; +} +#endif + +/*-----*/ + +/* blend_rel pixel x mask -> dst */ + +#ifdef BUILD_MMX + +#define _op_blend_rel_p_mas_dpan_mmx _op_blend_p_mas_dpan_mmx +#define _op_blend_rel_pas_mas_dpan_mmx _op_blend_pas_mas_dpan_mmx +#define _op_blend_rel_pan_mas_dpan_mmx _op_blend_pan_mas_dpan_mmx + +static void +init_blend_rel_pixel_mask_span_funcs_mmx(void) +{ + op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_p_mas_dpan_mmx; + op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pas_mas_dpan_mmx; + op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pan_mas_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX + +#define _op_blend_rel_pt_p_mas_dpan_mmx _op_blend_pt_p_mas_dpan_mmx +#define _op_blend_rel_pt_pas_mas_dpan_mmx _op_blend_pt_pas_mas_dpan_mmx +#define _op_blend_rel_pt_pan_mas_dpan_mmx _op_blend_pt_pan_mas_dpan_mmx + +static void +init_blend_rel_pixel_mask_pt_funcs_mmx(void) +{ + op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_mas_dpan_mmx; + op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_mas_dpan_mmx; + op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_mas_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c new file mode 100644 index 0000000..b252a67 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c @@ -0,0 +1,129 @@ +/* blend pixel x mask --> dst */ + +#ifdef BUILD_NEON +static void +_op_blend_pas_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + alpha = *m; + switch(alpha) + { + case 0: + break; + case 255: + *d = *s; + break; + default: + alpha++; + *d = INTERP_256(alpha, *s, *d); + break; + } + m++; s++; d++; + }); +} + +static void +_op_blend_pan_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e; + int alpha; + UNROLL8_PLD_WHILE(d, l, e, + { + alpha = *m; + switch(alpha) + { + case 0: + break; + case 255: + *d = *s; + break; + default: + alpha++; + *d = INTERP_256(alpha, *s, *d); + break; + } + m++; s++; d++; + }); +} + +#define _op_blend_p_mas_dp_neon _op_blend_pas_mas_dp_neon + +#define _op_blend_p_mas_dpan_neon _op_blend_p_mas_dp_neon +#define _op_blend_pan_mas_dpan_neon _op_blend_pan_mas_dp_neon +#define _op_blend_pas_mas_dpan_neon _op_blend_pas_mas_dp_neon + +static void +init_blend_pixel_mask_span_funcs_neon(void) +{ + op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_p_mas_dp_neon; + op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pas_mas_dp_neon; + op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pan_mas_dp_neon; + + op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_p_mas_dpan_neon; + op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pas_mas_dpan_neon; + op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pan_mas_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_blend_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = MUL_SYM(m, s); + c = 256 - (s >> 24); + *d = s + MUL_256(c, *d); +} + +#define _op_blend_pt_pan_mas_dp_neon _op_blend_pt_p_mas_dp_neon +#define _op_blend_pt_pas_mas_dp_neon _op_blend_pt_p_mas_dp_neon + +#define _op_blend_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dp_neon +#define _op_blend_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dp_neon +#define _op_blend_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dp_neon + +static void +init_blend_pixel_mask_pt_funcs_neon(void) +{ + op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_p_mas_dp_neon; + op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pas_mas_dp_neon; + op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pan_mas_dp_neon; + + op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_p_mas_dpan_neon; + op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pas_mas_dpan_neon; + op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pan_mas_dpan_neon; +} +#endif + +/*-----*/ + +/* blend_rel pixel x mask -> dst */ + +#ifdef BUILD_NEON + +#define _op_blend_rel_p_mas_dpan_neon _op_blend_p_mas_dpan_neon +#define _op_blend_rel_pas_mas_dpan_neon _op_blend_pas_mas_dpan_neon +#define _op_blend_rel_pan_mas_dpan_neon _op_blend_pan_mas_dpan_neon + +static void +init_blend_rel_pixel_mask_span_funcs_neon(void) +{ + op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_p_mas_dpan_neon; + op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pas_mas_dpan_neon; + op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pan_mas_dpan_neon; +} +#endif + +#ifdef BUILD_NEON + +#define _op_blend_rel_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dpan_neon +#define _op_blend_rel_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dpan_neon +#define _op_blend_rel_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dpan_neon + +static void +init_blend_rel_pixel_mask_pt_funcs_neon(void) +{ + op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_mas_dpan_neon; + op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_mas_dpan_neon; + op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_mas_dpan_neon; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c new file mode 100644 index 0000000..617b9e2 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c @@ -0,0 +1,300 @@ +/* blend pixel x mask --> dst */ + +#ifdef BUILD_SSE3 + +static void +_op_blend_p_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + + int alpha; + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + alpha = *m; + c = MUL_SYM(alpha, *s); + alpha = 256 - (c >> 24); + *d = c + MUL_256(alpha, *d); + m++; s++; d++; l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + + __m128i c0 = mul_sym_sse3(m0, s0); + __m128i a0 = sub4_alpha_sse3(c0); + __m128i r0 = mul_256_sse3(a0, d0); + + r0 = _mm_add_epi32(r0, c0); + + _mm_store_si128((__m128i *)d, r0); + + m += 4; s += 4; d += 4; l -= 4; + }, + { /* A8OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); + + __m128i c0 = mul_sym_sse3(m0, s0); + __m128i c1 = mul_sym_sse3(m1, s1); + + __m128i a0 = sub4_alpha_sse3(c0); + __m128i a1 = sub4_alpha_sse3(c1); + + __m128i r0 = mul_256_sse3(a0, d0); + __m128i r1 = mul_256_sse3(a1, d1); + + r0 = _mm_add_epi32(r0, c0); + r1 = _mm_add_epi32(r1, c1); + + _mm_store_si128((__m128i *)d, r0); + _mm_store_si128((__m128i *)(d+4), r1); + + m += 8; s += 8; d += 8; l -= 8; + }) +} + +static void +_op_blend_pas_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + + const __m128i ones = _mm_set_epi32(1, 1, 1, 1); + int alpha; + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + alpha = *m; + switch(alpha) + { + case 0: + break; + case 255: + *d = *s; + break; + default: + alpha++; + *d = INTERP_256(alpha, *s, *d); + break; + } + m++; s++; d++; l--; + }, + { /*A4OP */ + + if ((m[3] | m[2] | m[1] | m[0]) == 0) { + m += 4; s += 4; d += 4; l -= 4; + continue; + } + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + + __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); + + m0 = _mm_add_epi32(m0, ones); + + __m128i r0 = interp4_256_sse3(m0, s0, d0); + + r0 = _mm_and_si128(~zm0, r0); + d0 = _mm_and_si128(zm0, d0); + + d0 = _mm_add_epi32(r0, d0); + + _mm_store_si128((__m128i *)d, d0); + + m += 4; s += 4; d += 4; l -= 4; + }, + { /* A8OP */ + + if ((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) { + m += 8; s += 8; d += 8; l -= 8; + continue; + } + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); + + __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); + __m128i zm1 = _mm_cmpeq_epi32(m1, _mm_setzero_si128()); + + m0 = _mm_add_epi32(m0, ones); + m1 = _mm_add_epi32(m1, ones); + + __m128i r0 = interp4_256_sse3(m0, s0, d0); + __m128i r1 = interp4_256_sse3(m1, s1, d1); + + r0 = _mm_and_si128(~zm0, r0); + d0 = _mm_and_si128(zm0, d0); + + r1 = _mm_and_si128(~zm1, r1); + d1 = _mm_and_si128(zm1, d1); + + d0 = _mm_add_epi32(d0, r0); + d1 = _mm_add_epi32(d1, r1); + + _mm_store_si128((__m128i *)d, d0); + _mm_store_si128((__m128i *)(d+4), d1); + + m += 8; s += 8; d += 8; l -= 8; + }) +} + +#define _op_blend_pan_mas_dp_sse3 _op_blend_pas_mas_dp_sse3 + +#define _op_blend_p_mas_dpan_sse3 _op_blend_p_mas_dp_sse3 +#define _op_blend_pas_mas_dpan_sse3 _op_blend_pas_mas_dp_sse3 +#define _op_blend_pan_mas_dpan_sse3 _op_blend_pan_mas_dp_sse3 + +static void +init_blend_pixel_mask_span_funcs_sse3(void) +{ + op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_p_mas_dp_sse3; + op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pas_mas_dp_sse3; + op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pan_mas_dp_sse3; + + op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_mas_dpan_sse3; + op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_mas_dpan_sse3; + op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pan_mas_dpan_sse3; +} + +#define _op_blend_pt_p_mas_dp_sse3 NULL +#define _op_blend_pt_pan_mas_dp_sse3 NULL + +#define _op_blend_pt_pas_mas_dp_sse3 _op_blend_pt_p_mas_dp_sse3 + +#define _op_blend_pt_p_mas_dpan_sse3 _op_blend_pt_p_mas_dp_sse3 +#define _op_blend_pt_pas_mas_dpan_sse3 _op_blend_pt_pas_mas_dp_sse3 +#define _op_blend_pt_pan_mas_dpan_sse3 _op_blend_pt_pan_mas_dp_sse3 + +static void +init_blend_pixel_mask_pt_funcs_sse3(void) +{ + op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_p_mas_dp_sse3; + op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_pas_mas_dp_sse3; + op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_pan_mas_dp_sse3; + + op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_p_mas_dpan_sse3; + op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pas_mas_dpan_sse3; + op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pan_mas_dpan_sse3; +} + +/*-----*/ + +/* blend_rel pixel x mask -> dst */ + +static void +_op_blend_rel_p_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + + int alpha; + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + c = MUL_SYM(*m, *s); + alpha = 256 - (c >> 24); + *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); + d++; m++; s++; l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i c0 = mul_sym_sse3(m0, s0); + __m128i a0 = sub4_alpha_sse3(c0); + + __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c0); + __m128i r0 = mul_256_sse3(a0, d0); + + d0 = _mm_add_epi32(l0, r0); + + _mm_store_si128((__m128i *)d, d0); + + d += 4; m += 4; s += 4; l -= 4; + }, + { /* A8OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i c0 = mul_sym_sse3(m0, s0); + __m128i c1 = mul_sym_sse3(m1, s1); + + __m128i a0 = sub4_alpha_sse3(c0); + __m128i a1 = sub4_alpha_sse3(c1); + + __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c0); + __m128i r0 = mul_256_sse3(a0, d0); + + __m128i l1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), c1); + __m128i r1 = mul_256_sse3(a1, d1); + + d0 = _mm_add_epi32(l0, r0); + d1 = _mm_add_epi32(l1, r1); + + _mm_store_si128((__m128i *)d, d0); + _mm_store_si128((__m128i *)(d+4), d1); + + d += 8; m += 8; s += 8; l -= 8; + }) +} + +#define _op_blend_rel_pas_mas_dp_sse3 _op_blend_rel_p_mas_dp_sse3 +#define _op_blend_rel_pan_mas_dp_sse3 _op_blend_rel_p_mas_dp_sse3 + +#define _op_blend_rel_p_mas_dpan_sse3 _op_blend_p_mas_dpan_sse3 +#define _op_blend_rel_pas_mas_dpan_sse3 _op_blend_pas_mas_dpan_sse3 +#define _op_blend_rel_pan_mas_dpan_sse3 _op_blend_pan_mas_dpan_sse3 + +static void +init_blend_rel_pixel_mask_span_funcs_sse3(void) +{ + op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_p_mas_dp_sse3; + op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pas_mas_dp_sse3; + op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pan_mas_dp_sse3; + + op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_p_mas_dpan_sse3; + op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pas_mas_dpan_sse3; + op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pan_mas_dpan_sse3; +} + +#define _op_blend_rel_pt_p_mas_dp_sse3 NULL + +#define _op_blend_rel_pt_pas_mas_dp_sse3 _op_blend_rel_pt_p_mas_dp_sse3 +#define _op_blend_rel_pt_pan_mas_dp_sse3 _op_blend_rel_pt_p_mas_dp_sse3 + +#define _op_blend_rel_pt_p_mas_dpan_sse3 _op_blend_pt_p_mas_dpan_sse3 +#define _op_blend_rel_pt_pas_mas_dpan_sse3 _op_blend_pt_pas_mas_dpan_sse3 +#define _op_blend_rel_pt_pan_mas_dpan_sse3 _op_blend_pt_pan_mas_dpan_sse3 + +static void +init_blend_rel_pixel_mask_pt_funcs_sse3(void) +{ + op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_p_mas_dp_sse3; + op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pas_mas_dp_sse3; + op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pan_mas_dp_sse3; + + op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_mas_dpan_sse3; + op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_mas_dpan_sse3; + op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_mas_dpan_sse3; +} + +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c new file mode 100644 index 0000000..1cb50b6 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c @@ -0,0 +1,530 @@ +/* blend pixel --> dst */ + +#ifdef BUILD_NEON +static void +_op_blend_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { +#define AP "blend_p_dp_" + asm volatile ( + ".fpu neon \n\t" + //** init + "vmov.i8 q8, $0x1 \n\t" + + AP "loopchoose: \n\t" + // If aligned already - straight to octs + "andS %[tmp], %[d],$0x1f \n\t" + "beq "AP"octloops \n\t" + + "andS %[tmp], %[d],$0xf \n\t" + "beq "AP"quadloops \n\t" + + "andS %[tmp], %[d],$0x4 \n\t" + "beq "AP"dualloop \n\t" + + // Only ever executes once, fall through to dual + AP "singleloop: \n\t" + "vld1.32 d0[0], [%[s]]! \n\t" + "vld1.32 d4[0], [%[d]] \n\t" + + "vmvn.u8 d8, d0 \n\t" + "vshr.u32 d8, d8, #24 \n\t" + + "vmul.u32 d8, d16, d8 \n\t" + + "vmull.u8 q6, d4,d8 \n\t" + "vqrshrn.u16 d8, q6, #8 \n\t" + // Add to 's' + "vqadd.u8 q2, q4,q0 \n\t" + + "vst1.32 d4[0], [%[d]] \n\t" + "add %[d], #4 \n\t" + + // Can we go the fast path? + "andS %[tmp], %[d],$0x1f \n\t" + "beq "AP"octloops \n\t" + + "andS %[tmp], %[d],$0x0f \n\t" + "beq "AP"quadloops \n\t" + + + AP "dualloop: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #32 \n\t" + "blt "AP"loopout \n\t" + + AP "dualloopint: \n\t" + //** Dual Loop + "vldm %[s]!, {d0} \n\t" + "vldr d4, [%[d]] \n\t" + + "vmvn.u8 d8, d0 \n\t" + "vshr.u32 d8, d8, #24 \n\t" + + "vmul.u32 d8, d16, d8 \n\t" + + "vmull.u8 q6, d4,d8 \n\t" + "vqrshrn.u16 d8, q6, #8 \n\t" + // Add to 's' + "vqadd.u8 d4, d8,d0 \n\t" + "vstr d4, [%[d]] \n\t" + "add %[d], #8 \n\t" + + "ands %[tmp], %[d], $0x1f \n\t" + "beq "AP"octloops \n\t" + + AP"quadloops: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #32 \n\t" + "blt "AP"loopout \n\t" + + "vldm %[s]!, {d0,d1) \n\t" + "vldm %[d], {d4,d5} \n\t" + + + // Copy s.a into q2 (>> 24) & subtract from 255 + "vmvn.u8 q4, q0 \n\t" + "vshr.u32 q4, q4,$0x18 \n\t" + + // Multiply into all fields + "vmul.u32 q4, q8,q4 \n\t" + + // a * d (clobbering 'd'/q7) + "vmull.u8 q6, d4,d8 \n\t" + "vmull.u8 q2, d5,d9 \n\t" + + // Shift & narrow it + "vqrshrn.u16 d8, q6, #8 \n\t" + "vqrshrn.u16 d9, q2, #8 \n\t" + + // Add to s + "vqadd.u8 q2, q4,q0 \n\t" + + // Write it + "vstm %[d]!, {d4,d5} \n\t" + + AP "octloops: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #32 \n\t" + "ble "AP"loopout \n\t" + + "sub %[tmp],%[e],#64 \n\t" + + + AP "octloopint:\n\t" + //** Oct loop + "vldm %[s]!, {d0,d1,d2,d3) \n\t" + "vldm %[d], {d4,d5,d6,d7} \n\t" + "pld [%[s], #64] \n\t" + + + // Copy s.a into q2 (>> 24) & subtract from 255 + "vmvn.u8 q4, q0 \n\t" + "vmvn.u8 q5, q1 \n\t" + "vshr.u32 q4, q4,$0x18 \n\t" + "vshr.u32 q5, q5,$0x18\n\t" + + // Multiply into all fields + "vmul.u32 q4, q8,q4 \n\t" + "vmul.u32 q5, q8,q5 \n\t" + + + // a * d (clobbering 'd'/q7) + "vmull.u8 q6, d4,d8 \n\t" + "vmull.u8 q2, d5,d9 \n\t" + "vmull.u8 q7, d6,d10 \n\t" + "vmull.u8 q3, d7,d11 \n\t" + + "cmp %[tmp], %[d]\n\t" + + // Shift & narrow it + "vqrshrn.u16 d8, q6, #8 \n\t" + "vqrshrn.u16 d9, q2, #8 \n\t" + "vqrshrn.u16 d10, q7, #8 \n\t" + "vqrshrn.u16 d11, q3, #8 \n\t" + + + // Add to s + "vqadd.u8 q2, q4,q0 \n\t" + "vqadd.u8 q3, q5,q1 \n\t" + + // Write it + "vstm %[d]!, {d4,d5,d6,d7} \n\t" + + "bhi "AP"octloopint\n\t" + + AP "loopout: \n\t" + "cmp %[d], %[e] \n\t" + "beq "AP"done \n\t" + "sub %[tmp],%[e], %[d] \n\t" + "cmp %[tmp],$0x04 \n\t" + "ble "AP"singleloop2 \n\t" + + AP "dualloop2: \n\t" + "sub %[tmp],%[e],$0x7 \n\t" + AP "dualloop2int: \n\t" + //** Trailing double + + "vldm %[s]!, {d0} \n\t" + "vldm %[d], {d4} \n\t" + + "vmvn.u8 d8, d0 \n\t" + "vshr.u32 d8, d8, #24 \n\t" + + "vmul.u32 d8, d16, d8 \n\t" + + "vmull.u8 q6, d4,d8 \n\t" + "vqrshrn.u16 d8, q6, #8 \n\t" + // Add to 's' + "vqadd.u8 d4, d8,d0 \n\t" + + "vstr.32 d4, [%[d]] \n\t" + "add %[d], #8 \n\t" + + "cmp %[tmp], %[d] \n\t" + "bhi "AP"dualloop2int \n\t" + + // Single ?? + "cmp %[e], %[d] \n\t" + "beq "AP"done \n\t" + + AP"singleloop2: \n\t" + "vld1.32 d0[0], [%[s]] \n\t" + "vld1.32 d4[0], [%[d]] \n\t" + + "vmvn.u8 d8, d0 \n\t" + "vshr.u32 d8, d8, #24 \n\t" + + "vmul.u32 d8, d8, d16 \n\t" + + "vmull.u8 q6, d8,d4 \n\t" + "vqrshrn.u16 d8, q6, #8 \n\t" + // Add to 's' + "vqadd.u8 d0, d0,d8 \n\t" + "vst1.32 d0[0], [%[d]] \n\t" + + //** Trailing single + + AP"done:\n\t" +//"sub %[tmp], %[e], #4 \n\t" +//"vmov.i32 d0, $0xffff0000 \n\t" +//"vst1.32 d0[0], [%[tmp]] \n\t" + + + : // output regs + // Input + : [e] "r" (d + l), [d] "r" (d), [s] "r" (s), [c] "r" (c), + [tmp] "r" (7) + : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q8","memory" // clobbered + ); +#undef AP + +} + +static void +_op_blend_pas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { +#define AP "blend_pas_dp_" + DATA32 *e = d + l,*tmp = e + 32,*pl=(void*)912; + asm volatile ( + ".fpu neon \n\t" + "vmov.i8 q8, #1 \n\t" + AP"loopchoose: \n\t" + // If aliged - go as fast we can + "andS %[tmp], %[d], #31 \n\t" + "beq "AP"quadstart \n\t" + + // See if we can at least do our double loop + "andS %[tmp], %[d], $0x7 \n\t" + "beq "AP"dualstart \n\t" + + // Ugly single word version + AP "singleloop: \n\t" + "vld1.32 d0[0], [%[s]]! \n\t" + "vld1.32 d4[0], [%[d]] \n\t" + + "vmvn.u8 d8, d0 \n\t" + + "vshr.u32 d8, d8,$0x18 \n\t" + + // Mulitply into all fields + "vmul.u32 d8, d8, d16 \n\t" + + // Multiply out + "vmull.u8 q6, d8, d4 \n\t" + + "vqrshrn.u16 d8, q6, #8 \n\t" + + // Add to s + "vqadd.u8 d0, d0,d8 \n\t" + "vst1.32 d0[0], [%[d]]! \n\t" + + AP"dualstart: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #32 \n\t" + "blt "AP"loopout \n\t" + + // If aligned - go as fast we can + "andS %[tmp], %[d], #31 \n\t" + "beq "AP"quadstart \n\t" + + + AP"dualloop: \n\t" + + "vldm %[s]!, {d0) \n\t" + "vldm %[d], {d4} \n\t" + + // Subtract from 255 (ie negate) and extract alpha channel + "vmvn.u8 d8, d0 \n\t" + "vshr.u32 d8, d8,$0x18 \n\t" + + // Mulitply into all fields + "vmul.u32 d8, d8, d16 \n\t" + + // Multiply out + "vmull.u8 q6, d8, d4 \n\t" + + "vqrshrn.u16 d8, q6, #8 \n\t" + + // Add to s + "vqadd.u8 d0, d0,d8 \n\t" + "vstm %[d]!, {d0} \n\t" + + "andS %[tmp], %[d], $0x1f \n\t" + "bne "AP"dualloop \n\t" + + + AP"quadstart: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #32 \n\t" + "blt "AP"loopout \n\t" + + "sub %[tmp], %[e], #31 \n\t" + + AP"quadloop:\n\t" + "vldm %[s]!, {d0,d1,d2,d3) \n\t" + "vldm %[d], {d4,d5,d6,d7} \n\t" + + // Subtract from 255 (ie negate) and extract alpha channel + "vmvn.u8 q4, q0 \n\t" + "vmvn.u8 q5, q1 \n\t" + "vshr.u32 q4, q4,$0x18 \n\t" + "vshr.u32 q5, q5,$0x18 \n\t" + + // Prepare to preload + "add %[pl], %[s], #32 \n\t" + + // Mulitply into all fields + "vmul.u32 q4, q4, q8 \n\t" + "vmul.u32 q5, q5, q8 \n\t" + "pld [%[pl]] \n\t" + + // Multiply out + "vmull.u8 q6, d8, d4 \n\t" + "vmull.u8 q7, d10, d6 \n\t" + "vmull.u8 q2, d9, d5 \n\t" + "vmull.u8 q3, d11, d7 \n\t" + + "add %[pl], %[d], #32 \n\t" + + "vqrshrn.u16 d8, q6, #8 \n\t" + "vqrshrn.u16 d10, q7, #8 \n\t" + "vqrshrn.u16 d9, q2, #8 \n\t" + "vqrshrn.u16 d11, q3, #8 \n\t" + "pld [%[pl]] \n\t" + + "cmp %[tmp], %[pl] \n\t" + // Add to s + "vqadd.u8 q0, q0,q4 \n\t" + "vqadd.u8 q1, q1,q5 \n\t" + + "vstm %[d]!, {d0,d1,d2,d3} \n\t" + + "bhi "AP"quadloop \n\t" + + AP "loopout: \n\t" + "cmp %[d], %[e] \n\t" + "beq "AP"done \n\t" + + "sub %[tmp],%[e], %[d] \n\t" + "cmp %[tmp],$0x04 \n\t" + "beq "AP"singleloop2 \n\t" + + "sub %[tmp],%[e],$0x7 \n\t" + + AP"dualloop2: \n\t" + "vldm %[s]!, {d0) \n\t" + "vldm %[d], {d4} \n\t" + + // Subtract from 255 (ie negate) and extract alpha channel + "vmvn.u8 d8, d0 \n\t" + "vshr.u32 d8, d8,$0x18 \n\t" + + // Mulitply into all fields + "vmul.u32 d8, d8, d16 \n\t" + + // Multiply out + "vmull.u8 q6, d8, d4 \n\t" + + "vqrshrn.u16 d8, q6, #8 \n\t" + + // Add to s + "vqadd.u8 d0, d0,d8 \n\t" + + "vstm %[d]!, {d0} \n\t" + "cmp %[tmp], %[d] \n\t" + + "bhi "AP"dualloop2 \n\t" + + // Single ?? + "cmp %[e], %[d] \n\t" + "beq "AP"done \n\t" + + AP "singleloop2: \n\t" + "vld1.32 d0[0], [%[s]] \n\t" + "vld1.32 d4[0], [%[d]] \n\t" + + "vmvn.u8 d8, d0 \n\t" + + "vshr.u32 d8, d8,$0x18 \n\t" + + // Mulitply into all fields + "vmul.u32 d8, d8, d16 \n\t" + + // Multiply out + "vmull.u8 q6, d8, d4 \n\t" + + "vqrshrn.u16 d8, q6, #8 \n\t" + + // Add to s + "vqadd.u8 d0, d0,d8 \n\t" + + "vst1.32 d0[0], [%[d]] \n\t" + AP "done:\n\t" + + + : /* Out */ + : /* In */ [s] "r" (s), [e] "r" (e), [d] "r" (d), [tmp] "r" (tmp), + [pl] "r" (pl) + : /* Clobbered */ + "q0","q1","q2","q3","q4","q5","q6","q7","q8","memory" + ); +#undef AP +} + +#define _op_blend_pan_dp_neon NULL + +#define _op_blend_p_dpan_neon _op_blend_p_dp_neon +#define _op_blend_pas_dpan_neon _op_blend_pas_dp_neon +#define _op_blend_pan_dpan_neon _op_blend_pan_dp_neon + +static void +init_blend_pixel_span_funcs_neon(void) +{ + op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_p_dp_neon; + op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pas_dp_neon; + op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pan_dp_neon; + + op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_p_dpan_neon; + op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pas_dpan_neon; + op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pan_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_blend_pt_p_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + c = 256 - (s >> 24); + *d = s + MUL_256(c, *d); +} + + +#define _op_blend_pt_pan_dp_neon NULL +#define _op_blend_pt_pas_dp_neon _op_blend_pt_p_dp_neon + +#define _op_blend_pt_p_dpan_neon _op_blend_pt_p_dp_neon +#define _op_blend_pt_pan_dpan_neon _op_blend_pt_pan_dp_neon +#define _op_blend_pt_pas_dpan_neon _op_blend_pt_pas_dp_neon + +static void +init_blend_pixel_pt_funcs_neon(void) +{ + op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_p_dp_neon; + op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_pas_dp_neon; + op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_pan_dp_neon; + + op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_p_dpan_neon; + op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pas_dpan_neon; + op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pan_dpan_neon; +} +#endif + +/*-----*/ + +/* blend_rel pixel -> dst */ + +#ifdef BUILD_NEON +static void +_op_blend_rel_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + while (d < e) { + l = 256 - (*s >> 24); + c = 1 + (*d >> 24); + *d = MUL_256(c, *s) + MUL_256(l, *d); + d++; + s++; + } +} + +static void +_op_blend_rel_pan_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + while (d < e) { + c = 1 + (*d >> 24); + *d++ = MUL_256(c, *s); + s++; + } +} + +#define _op_blend_rel_pas_dp_neon _op_blend_rel_p_dp_neon + +#define _op_blend_rel_p_dpan_neon _op_blend_p_dpan_neon +#define _op_blend_rel_pan_dpan_neon _op_blend_pan_dpan_neon +#define _op_blend_rel_pas_dpan_neon _op_blend_pas_dpan_neon + +static void +init_blend_rel_pixel_span_funcs_neon(void) +{ + op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_p_dp_neon; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pas_dp_neon; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pan_dp_neon; + + op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_p_dpan_neon; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pas_dpan_neon; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pan_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_blend_rel_pt_p_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + c = 256 - (s >> 24); + *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); +} + +#define _op_blend_rel_pt_pas_dp_neon _op_blend_rel_pt_p_dp_neon +#define _op_blend_rel_pt_pan_dp_neon _op_blend_rel_pt_p_dp_neon + +#define _op_blend_rel_pt_p_dpan_neon _op_blend_pt_p_dpan_neon +#define _op_blend_rel_pt_pas_dpan_neon _op_blend_pt_pas_dpan_neon +#define _op_blend_rel_pt_pan_dpan_neon _op_blend_pt_pan_dpan_neon + +static void +init_blend_rel_pixel_pt_funcs_neon(void) +{ + op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_p_dp_neon; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_pas_dp_neon; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_pan_dp_neon; + + op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_dpan_neon; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_dpan_neon; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_dpan_neon; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c new file mode 100644 index 0000000..2e72fec --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c @@ -0,0 +1,316 @@ +/* blend pixel --> dst */ + +#ifdef BUILD_SSE3 + +static void +_op_blend_p_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + int alpha = 256 - (*s >> 24); + *d = *s + MUL_256(alpha, *d); + s++; d++; l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i a0 = sub4_alpha_sse3(s0); + __m128i mul0 = mul_256_sse3(a0, d0); + d0 = _mm_add_epi32(mul0, s0); + + _mm_store_si128((__m128i *)d, d0); + + s += 4; d += 4; l -= 4; + }, + { /* A8OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i a0 = sub4_alpha_sse3(s0); + __m128i a1 = sub4_alpha_sse3(s1); + + __m128i mul0 = mul_256_sse3(a0, d0); + __m128i mul1 = mul_256_sse3(a1, d1); + + d0 = _mm_add_epi32(mul0, s0); + d1 = _mm_add_epi32(mul1, s1); + + _mm_store_si128((__m128i *)d, d0); + _mm_store_si128((__m128i *)(d+4), d1); + + s += 8; d += 8; l -= 8; + }) +} + +static void +_op_blend_pas_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + + int alpha; + + const __m128i zero = _mm_setzero_si128(); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + switch (*s & 0xff000000) + { + case 0: + break; + case 0xff000000: + *d = *s; + break; + default: + alpha = 256 - (*s >> 24); + *d = *s + MUL_256(alpha, *d); + break; + } + s++; d++; l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i a0 = sub4_alpha_sse3(s0); + __m128i mul0 = mul_256_sse3(a0, d0); + + mul0 = _mm_add_epi32(s0, mul0); + + __m128i zmask0 = _mm_cmpeq_epi32(_mm_srli_epi32(s0, 24), zero); + __m128i imask0 = ~zmask0; + + mul0 = _mm_and_si128(imask0, mul0); + d0 = _mm_and_si128(zmask0, d0); + + d0 = _mm_add_epi32(mul0, d0); + + _mm_store_si128((__m128i *)d, d0); + + s += 4; d += 4; l -= 4; + }, + { /* A8OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128((__m128i *)(d+4)); + + __m128i a0 = sub4_alpha_sse3(s0); + __m128i a1 = sub4_alpha_sse3(s1); + + __m128i mul0 = mul_256_sse3(a0, d0); + __m128i mul1 = mul_256_sse3(a1, d1); + + mul0 = _mm_add_epi32(s0, mul0); + mul1 = _mm_add_epi32(s1, mul1); + + __m128i zmask0 = _mm_cmpeq_epi32(_mm_srli_epi32(s0, 24), zero); + __m128i zmask1 = _mm_cmpeq_epi32(_mm_srli_epi32(s1, 24), zero); + + __m128i imask0 = ~zmask0; + __m128i imask1 = ~zmask1; + + mul0 = _mm_and_si128(imask0, mul0); + d0 = _mm_and_si128(zmask0, d0); + + mul1 = _mm_and_si128(imask1, mul1); + d1 = _mm_and_si128(zmask1, d1); + + d0 = _mm_add_epi32(mul0, d0); + d1 = _mm_add_epi32(mul1, d1); + + _mm_store_si128((__m128i *)d, d0); + _mm_store_si128((__m128i *)(d+4), d1); + + s += 8; d += 8; l -= 8; + }) +} + +#define _op_blend_pan_dp_sse3 NULL + +#define _op_blend_p_dpan_sse3 _op_blend_p_dp_sse3 +#define _op_blend_pas_dpan_sse3 _op_blend_pas_dp_sse3 +#define _op_blend_pan_dpan_sse3 _op_blend_pan_dp_sse3 + +static void +init_blend_pixel_span_funcs_sse3(void) +{ + op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_p_dp_sse3; + op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pas_dp_sse3; + op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pan_dp_sse3; + + +// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) +// op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_dpan_sse3; + op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_dpan_sse3; + op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pan_dpan_sse3; +} + +#define _op_blend_pt_p_dp_sse3 NULL + +#define _op_blend_pt_pas_dp_sse3 _op_blend_pt_p_dp_sse3 +#define _op_blend_pt_pan_dp_sse3 NULL + +#define _op_blend_pt_p_dpan_sse3 _op_blend_pt_p_dp_sse3 +#define _op_blend_pt_pan_dpan_sse3 _op_blend_pt_pan_dp_sse3 +#define _op_blend_pt_pas_dpan_sse3 _op_blend_pt_pas_dp_sse3 + +static void +init_blend_pixel_pt_funcs_sse3(void) +{ + op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_p_dp_sse3; + op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_pas_dp_sse3; + op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_pan_dp_sse3; + + op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_p_dpan_sse3; + op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pas_dpan_sse3; + op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pan_dpan_sse3; +} + +/*-----*/ + +/* blend_rel pixel -> dst */ + +static void +_op_blend_rel_p_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + + const __m128i ones = _mm_set_epi32(1, 1, 1, 1); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + int alpha = 256 - (*s >> 24); + c = 1 + (*d >> 24); + *d = MUL_256(c, *s) + MUL_256(alpha, *d); + d++; s++; l--; + }, + { /*A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); + __m128i a0 = sub4_alpha_sse3(s0); + + d0 = _mm_add_epi32(mul_256_sse3(c0, s0), mul_256_sse3(a0, d0)); + + _mm_store_si128((__m128i *)d, d0); + + d += 4; s += 4; l -= 4; + }, + { /* A8OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128 ((__m128i *)d); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128 ((__m128i *)(d+4)); + + __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); + __m128i c1 = _mm_add_epi32(_mm_srli_epi32(d1, 24), ones); + + __m128i a0 = sub4_alpha_sse3(s0); + __m128i a1 = sub4_alpha_sse3(s1); + + d0 = _mm_add_epi32(mul_256_sse3(c0, s0), mul_256_sse3(a0, d0)); + d1 = _mm_add_epi32(mul_256_sse3(c1, s1), mul_256_sse3(a1, d1)); + + _mm_store_si128((__m128i *)d, d0); + _mm_store_si128((__m128i *)(d+4), d1); + + d += 8; s += 8; l -= 8; + }) +} + +static void +_op_blend_rel_pan_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + + const __m128i ones = _mm_set_epi32(1, 1, 1, 1); + + LOOP_ALIGNED_U1_A48_SSE3(d, l, + { /* UOP */ + + c = 1 + (*d >> 24); + *d++ = MUL_256(c, *s); + s++; l--; + }, + { /* A4OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128((__m128i *)d); + + __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); + d0 = mul_256_sse3(c0, s0); + + _mm_store_si128((__m128i *)d, d0); + + d += 4; s += 4; l -= 4; + }, + { /* A8OP */ + + __m128i s0 = _mm_lddqu_si128((__m128i *)s); + __m128i d0 = _mm_load_si128 ((__m128i *)d); + + __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); + __m128i d1 = _mm_load_si128 ((__m128i *)(d+4)); + + __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); + __m128i c1 = _mm_add_epi32(_mm_srli_epi32(d1, 24), ones); + + d0 = mul_256_sse3(c0, s0); + d1 = mul_256_sse3(c1, s1); + + _mm_store_si128((__m128i *)d, d0); + _mm_store_si128((__m128i *)(d+4), d1); + + d += 8; s += 8; l -= 8; + }) +} + +#define _op_blend_rel_pas_dp_sse3 _op_blend_rel_p_dp_sse3 + +#define _op_blend_rel_p_dpan_sse3 _op_blend_p_dpan_sse3 +#define _op_blend_rel_pan_dpan_sse3 _op_blend_pan_dpan_sse3 +#define _op_blend_rel_pas_dpan_sse3 _op_blend_pas_dpan_sse3 + +static void +init_blend_rel_pixel_span_funcs_sse3(void) +{ + op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_p_dp_sse3; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pas_dp_sse3; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pan_dp_sse3; + + op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_p_dpan_sse3; + op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pas_dpan_sse3; + op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pan_dpan_sse3; +} + +#define _op_blend_rel_pt_p_dp_sse3 NULL +#define _op_blend_rel_pt_pan_dp_sse3 NULL + +#define _op_blend_rel_pt_pas_dp_sse3 _op_blend_rel_pt_p_dp_sse3 + +#define _op_blend_rel_pt_p_dpan_sse3 _op_blend_pt_p_dpan_sse3 +#define _op_blend_rel_pt_pan_dpan_sse3 _op_blend_pt_pan_dpan_sse3 +#define _op_blend_rel_pt_pas_dpan_sse3 _op_blend_pt_pas_dpan_sse3 + +static void +init_blend_rel_pixel_pt_funcs_sse3(void) +{ + op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_p_dp_sse3; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pas_dp_sse3; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pan_dp_sse3; + + op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_dpan_sse3; + op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_dpan_sse3; + op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_dpan_sse3; +} + +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c b/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c new file mode 100644 index 0000000..a1a5de8 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c @@ -0,0 +1,671 @@ +#include "evas_common.h" + +RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +static void op_blend_init(void); +static void op_blend_shutdown(void); + +static RGBA_Gfx_Func op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); + +static RGBA_Gfx_Pt_Func op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_blend_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); + +static RGBA_Gfx_Compositor _composite_blend = { "blend", + op_blend_init, op_blend_shutdown, + op_blend_pixel_span_get, op_blend_color_span_get, + op_blend_pixel_color_span_get, op_blend_mask_color_span_get, + op_blend_pixel_mask_span_get, + op_blend_pixel_pt_get, op_blend_color_pt_get, + op_blend_pixel_color_pt_get, op_blend_mask_color_pt_get, + op_blend_pixel_mask_pt_get + }; + +RGBA_Gfx_Compositor * +evas_common_gfx_compositor_blend_get(void) +{ + return &(_composite_blend); +} + + +RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +static void op_blend_rel_init(void); +static void op_blend_rel_shutdown(void); + +static RGBA_Gfx_Func op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); + +static RGBA_Gfx_Pt_Func op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); + +static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel", + op_blend_rel_init, op_blend_rel_shutdown, + op_blend_rel_pixel_span_get, op_blend_rel_color_span_get, + op_blend_rel_pixel_color_span_get, op_blend_rel_mask_color_span_get, + op_blend_rel_pixel_mask_span_get, + op_blend_rel_pixel_pt_get, op_blend_rel_color_pt_get, + op_blend_rel_pixel_color_pt_get, op_blend_rel_mask_color_pt_get, + op_blend_rel_pixel_mask_pt_get + }; + +RGBA_Gfx_Compositor * +evas_common_gfx_compositor_blend_rel_get(void) +{ + return &(_composite_blend_rel); +} + + +# include "./evas_op_blend/op_blend_pixel_.c" +# include "./evas_op_blend/op_blend_color_.c" +# include "./evas_op_blend/op_blend_pixel_color_.c" +# include "./evas_op_blend/op_blend_pixel_mask_.c" +# include "./evas_op_blend/op_blend_mask_color_.c" +//# include "./evas_op_blend/op_blend_pixel_mask_color_.c" + +# include "./evas_op_blend/op_blend_pixel_i386.c" +# include "./evas_op_blend/op_blend_color_i386.c" +# include "./evas_op_blend/op_blend_pixel_color_i386.c" +# include "./evas_op_blend/op_blend_pixel_mask_i386.c" +# include "./evas_op_blend/op_blend_mask_color_i386.c" +//# include "./evas_op_blend/op_blend_pixel_mask_color_i386.c" + +# include "./evas_op_blend/op_blend_pixel_neon.c" +# include "./evas_op_blend/op_blend_color_neon.c" +# include "./evas_op_blend/op_blend_pixel_color_neon.c" +# include "./evas_op_blend/op_blend_pixel_mask_neon.c" +# include "./evas_op_blend/op_blend_mask_color_neon.c" +//# include "./evas_op_blend/op_blend_pixel_mask_color_neon.c" + +#ifdef BUILD_SSE3 +void evas_common_op_blend_init_sse3(void); +#endif + +static void +op_blend_init(void) +{ + memset(op_blend_span_funcs, 0, sizeof(op_blend_span_funcs)); + memset(op_blend_pt_funcs, 0, sizeof(op_blend_pt_funcs)); +#ifdef BUILD_SSE3 + evas_common_op_blend_init_sse3(); +#endif +#ifdef BUILD_MMX + init_blend_pixel_span_funcs_mmx(); + init_blend_pixel_color_span_funcs_mmx(); + init_blend_pixel_mask_span_funcs_mmx(); + init_blend_color_span_funcs_mmx(); + init_blend_mask_color_span_funcs_mmx(); + + init_blend_pixel_pt_funcs_mmx(); + init_blend_pixel_color_pt_funcs_mmx(); + init_blend_pixel_mask_pt_funcs_mmx(); + init_blend_color_pt_funcs_mmx(); + init_blend_mask_color_pt_funcs_mmx(); +#endif +#ifdef BUILD_NEON + init_blend_pixel_span_funcs_neon(); + init_blend_pixel_color_span_funcs_neon(); + init_blend_pixel_mask_span_funcs_neon(); + init_blend_color_span_funcs_neon(); + init_blend_mask_color_span_funcs_neon(); + + init_blend_pixel_pt_funcs_neon(); + init_blend_pixel_color_pt_funcs_neon(); + init_blend_pixel_mask_pt_funcs_neon(); + init_blend_color_pt_funcs_neon(); + init_blend_mask_color_pt_funcs_neon(); +#endif +#ifdef BUILD_C + init_blend_pixel_span_funcs_c(); + init_blend_pixel_color_span_funcs_c(); + init_blend_pixel_mask_span_funcs_c(); + init_blend_color_span_funcs_c(); + init_blend_mask_color_span_funcs_c(); + + init_blend_pixel_pt_funcs_c(); + init_blend_pixel_color_pt_funcs_c(); + init_blend_pixel_mask_pt_funcs_c(); + init_blend_color_pt_funcs_c(); + init_blend_mask_color_pt_funcs_c(); +#endif +} + +static void +op_blend_shutdown(void) +{ +} + +static RGBA_Gfx_Func +blend_gfx_span_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_SSE3 + if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) + { + cpu = CPU_SSE3; + func = op_blend_span_funcs[s][m][c][d][cpu]; + if(func) return func; + } +#endif +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_blend_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_NEON + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) + { + cpu = CPU_NEON; + func = op_blend_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_blend_span_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Func +op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + s = SP; + if (src->cache_entry.flags.alpha_sparse) + s = SP_AS; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + s = SP; + if (src->cache_entry.flags.alpha_sparse) + s = SP_AS; + } + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + s = SP; + if (src->cache_entry.flags.alpha_sparse) + s = SP_AS; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_gfx_span_func_cpu(s, m, c, d); +} + + +static RGBA_Gfx_Pt_Func +blend_gfx_pt_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Pt_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_SSE3 + if(evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) + { + cpu = CPU_SSE3; + func = op_blend_pt_funcs[s][m][c][d][cpu]; + if(func) return func; + } +#endif +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_blend_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_NEON + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) + { + cpu = CPU_NEON; + func = op_blend_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_blend_pt_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Pt_Func +op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_blend_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_gfx_pt_func_cpu(s, m, c, d); +} + +void evas_common_op_blend_rel_init_sse3(void); + +static void +op_blend_rel_init(void) +{ + memset(op_blend_rel_span_funcs, 0, sizeof(op_blend_rel_span_funcs)); + memset(op_blend_rel_pt_funcs, 0, sizeof(op_blend_rel_pt_funcs)); +#ifdef BUILD_SSE3 + evas_common_op_blend_rel_init_sse3(); +#endif +#ifdef BUILD_MMX + init_blend_rel_pixel_span_funcs_mmx(); + init_blend_rel_pixel_color_span_funcs_mmx(); + init_blend_rel_pixel_mask_span_funcs_mmx(); + init_blend_rel_color_span_funcs_mmx(); + init_blend_rel_mask_color_span_funcs_mmx(); + + init_blend_rel_pixel_pt_funcs_mmx(); + init_blend_rel_pixel_color_pt_funcs_mmx(); + init_blend_rel_pixel_mask_pt_funcs_mmx(); + init_blend_rel_color_pt_funcs_mmx(); + init_blend_rel_mask_color_pt_funcs_mmx(); +#endif +#ifdef BUILD_NEON + init_blend_rel_pixel_span_funcs_neon(); + init_blend_rel_pixel_color_span_funcs_neon(); + init_blend_rel_pixel_mask_span_funcs_neon(); + init_blend_rel_color_span_funcs_neon(); + init_blend_rel_mask_color_span_funcs_neon(); + + init_blend_rel_pixel_pt_funcs_neon(); + init_blend_rel_pixel_color_pt_funcs_neon(); + init_blend_rel_pixel_mask_pt_funcs_neon(); + init_blend_rel_color_pt_funcs_neon(); + init_blend_rel_mask_color_pt_funcs_neon(); +#endif +#ifdef BUILD_C + init_blend_rel_pixel_span_funcs_c(); + init_blend_rel_pixel_color_span_funcs_c(); + init_blend_rel_pixel_mask_span_funcs_c(); + init_blend_rel_color_span_funcs_c(); + init_blend_rel_mask_color_span_funcs_c(); + + init_blend_rel_pixel_pt_funcs_c(); + init_blend_rel_pixel_color_pt_funcs_c(); + init_blend_rel_pixel_mask_pt_funcs_c(); + init_blend_rel_color_pt_funcs_c(); + init_blend_rel_mask_color_pt_funcs_c(); +#endif +} + +static void +op_blend_rel_shutdown(void) +{ +} + +static RGBA_Gfx_Func +blend_rel_gfx_span_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_SSE3 + if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) + { + cpu = CPU_SSE3; + func = op_blend_rel_span_funcs[s][m][c][d][cpu]; + if(func) return func; + } +#endif +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_blend_rel_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_NEON + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) + { + cpu = CPU_NEON; + func = op_blend_rel_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_blend_rel_span_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Func +op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + s = SP; + if (src->cache_entry.flags.alpha_sparse) + s = SP_AS; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + s = SP; + if (src->cache_entry.flags.alpha_sparse) + s = SP_AS; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +blend_rel_gfx_pt_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Pt_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_SSE3 + if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) + { + cpu = CPU_SSE3; + func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; + if(func) return func; + } +#endif +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_NEON + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) + { + cpu = CPU_NEON; + func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Pt_Func +op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return blend_rel_gfx_pt_func_cpu(s, m, c, d); +} diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am new file mode 100644 index 0000000..599e98d --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am @@ -0,0 +1,18 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ +op_copy_color_.c \ +op_copy_color_i386.c \ +op_copy_color_neon.c \ +op_copy_mask_color_.c \ +op_copy_mask_color_i386.c \ +op_copy_mask_color_neon.c \ +op_copy_pixel_.c \ +op_copy_pixel_neon.c \ +op_copy_pixel_color_.c \ +op_copy_pixel_color_i386.c \ +op_copy_pixel_color_neon.c \ +op_copy_pixel_i386.c \ +op_copy_pixel_mask_.c \ +op_copy_pixel_mask_i386.c \ +op_copy_pixel_mask_neon.c diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in new file mode 100644 index 0000000..52658a4 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in @@ -0,0 +1,548 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/engines/common/evas_op_copy +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = \ +op_copy_color_.c \ +op_copy_color_i386.c \ +op_copy_color_neon.c \ +op_copy_mask_color_.c \ +op_copy_mask_color_i386.c \ +op_copy_mask_color_neon.c \ +op_copy_pixel_.c \ +op_copy_pixel_neon.c \ +op_copy_pixel_color_.c \ +op_copy_pixel_color_i386.c \ +op_copy_pixel_color_neon.c \ +op_copy_pixel_i386.c \ +op_copy_pixel_mask_.c \ +op_copy_pixel_mask_i386.c \ +op_copy_pixel_mask_neon.c + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_copy/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_copy/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c new file mode 100644 index 0000000..0178358 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c @@ -0,0 +1,138 @@ +/* copy color --> dst */ + +#ifdef BUILD_C +static void +_op_copy_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + UNROLL8_PLD_WHILE(d, l, e, + { + *d = c; + d++; + }); +} + +#define _op_copy_cn_dp _op_copy_c_dp +#define _op_copy_can_dp _op_copy_c_dp +#define _op_copy_caa_dp _op_copy_c_dp + +#define _op_copy_c_dpan _op_copy_c_dp +#define _op_copy_cn_dpan _op_copy_c_dp +#define _op_copy_can_dpan _op_copy_c_dp +#define _op_copy_caa_dpan _op_copy_c_dp + +static void +init_copy_color_span_funcs_c(void) +{ + op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_cn_dp; + op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_c_dp; + op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_can_dp; + op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_caa_dp; + + op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_cn_dpan; + op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_c_dpan; + op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_can_dpan; + op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_copy_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + *d = c; +} + +#define _op_copy_pt_cn_dp _op_copy_pt_c_dp +#define _op_copy_pt_can_dp _op_copy_pt_c_dp +#define _op_copy_pt_caa_dp _op_copy_pt_c_dp + +#define _op_copy_pt_c_dpan _op_copy_pt_c_dp +#define _op_copy_pt_cn_dpan _op_copy_pt_c_dp +#define _op_copy_pt_can_dpan _op_copy_pt_c_dp +#define _op_copy_pt_caa_dpan _op_copy_pt_c_dp + +static void +init_copy_color_pt_funcs_c(void) +{ + op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_cn_dp; + op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_pt_c_dp; + op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_can_dp; + op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_caa_dp; + + op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_cn_dpan; + op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_c_dpan; + op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_can_dpan; + op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_caa_dpan; +} +#endif + +/*-----*/ + +/* copy_rel color --> dst */ + +#ifdef BUILD_C +static void +_op_copy_rel_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + UNROLL8_PLD_WHILE(d, l, e, + { + *d = MUL_SYM(*d >> 24, c); + d++; + }); +} + + +#define _op_copy_rel_cn_dp _op_copy_rel_c_dp +#define _op_copy_rel_can_dp _op_copy_rel_c_dp +#define _op_copy_rel_caa_dp _op_copy_rel_c_dp + +#define _op_copy_rel_c_dpan _op_copy_c_dp +#define _op_copy_rel_cn_dpan _op_copy_cn_dp +#define _op_copy_rel_can_dpan _op_copy_can_dp +#define _op_copy_rel_caa_dpan _op_copy_caa_dp + +static void +init_copy_rel_color_span_funcs_c(void) +{ + op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_cn_dp; + op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_rel_c_dp; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_can_dp; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_caa_dp; + + op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_cn_dpan; + op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_c_dpan; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_can_dpan; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_copy_rel_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = 1 + (*d >> 24); + *d = MUL_256(s, c); +} + + +#define _op_copy_rel_pt_cn_dp _op_copy_rel_pt_c_dp +#define _op_copy_rel_pt_can_dp _op_copy_rel_pt_c_dp +#define _op_copy_rel_pt_caa_dp _op_copy_rel_pt_c_dp + +#define _op_copy_rel_pt_c_dpan _op_copy_pt_c_dp +#define _op_copy_rel_pt_cn_dpan _op_copy_pt_cn_dp +#define _op_copy_rel_pt_can_dpan _op_copy_pt_can_dp +#define _op_copy_rel_pt_caa_dpan _op_copy_pt_caa_dp + +static void +init_copy_rel_color_pt_funcs_c(void) +{ + op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_cn_dp; + op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_c_dp; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_can_dp; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_caa_dp; + + op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_cn_dpan; + op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_c_dpan; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_can_dpan; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_caa_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c new file mode 100644 index 0000000..d864d92 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c @@ -0,0 +1,150 @@ +/* copy color --> dst */ + +#ifdef BUILD_MMX +static void +_op_copy_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l - 1; + movd_m2r(c, mm1); + movq_r2r(mm1, mm2); + psllq_i2r(32, mm1); + por_r2r(mm2, mm1); + for (; d < e; d+=2) { + movq_r2m(mm1, d[0]); + } + e+=1; + for (; d < e; d++) { + *d = c; + } +} + +#define _op_copy_cn_dp_mmx _op_copy_c_dp_mmx +#define _op_copy_can_dp_mmx _op_copy_c_dp_mmx +#define _op_copy_caa_dp_mmx _op_copy_c_dp_mmx + +#define _op_copy_cn_dpan_mmx _op_copy_c_dp_mmx +#define _op_copy_c_dpan_mmx _op_copy_c_dp_mmx +#define _op_copy_can_dpan_mmx _op_copy_c_dp_mmx +#define _op_copy_caa_dpan_mmx _op_copy_c_dp_mmx + +static void +init_copy_color_span_funcs_mmx(void) +{ + op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_cn_dp_mmx; + op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_c_dp_mmx; + op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_can_dp_mmx; + op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_caa_dp_mmx; + + op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_cn_dpan_mmx; + op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_c_dpan_mmx; + op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_can_dpan_mmx; + op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_copy_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + *d = c; +} + +#define _op_copy_pt_cn_dp_mmx _op_copy_pt_c_dp_mmx +#define _op_copy_pt_can_dp_mmx _op_copy_pt_c_dp_mmx +#define _op_copy_pt_caa_dp_mmx _op_copy_pt_c_dp_mmx + +#define _op_copy_pt_cn_dpan_mmx _op_copy_pt_c_dp_mmx +#define _op_copy_pt_c_dpan_mmx _op_copy_pt_c_dp_mmx +#define _op_copy_pt_can_dpan_mmx _op_copy_pt_c_dp_mmx +#define _op_copy_pt_caa_dpan_mmx _op_copy_pt_c_dp_mmx + +static void +init_copy_color_pt_funcs_mmx(void) +{ + op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_cn_dp_mmx; + op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_c_dp_mmx; + op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_can_dp_mmx; + op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_caa_dp_mmx; + + op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_cn_dpan_mmx; + op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_c_dpan_mmx; + op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_can_dpan_mmx; + op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_caa_dpan_mmx; +} +#endif + +/*-----*/ + +/* copy_rel color --> dst */ + +#ifdef BUILD_MMX +static void +_op_copy_rel_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + for (; d < e; d++) { + DATA32 da = 1 + (*d >> 24); + MOV_A2R(da, mm1) + MUL4_256_R2R(mm2, mm1) + MOV_R2P(mm1, *d, mm0) + } +} + +#define _op_copy_rel_cn_dp_mmx _op_copy_rel_c_dp_mmx +#define _op_copy_rel_can_dp_mmx _op_copy_rel_c_dp_mmx +#define _op_copy_rel_caa_dp_mmx _op_copy_rel_c_dp_mmx + +#define _op_copy_rel_cn_dpan_mmx _op_copy_cn_dpan_mmx +#define _op_copy_rel_c_dpan_mmx _op_copy_c_dpan_mmx +#define _op_copy_rel_can_dpan_mmx _op_copy_can_dpan_mmx +#define _op_copy_rel_caa_dpan_mmx _op_copy_caa_dpan_mmx + +static void +init_copy_rel_color_span_funcs_mmx(void) +{ + op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_cn_dp_mmx; + op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_c_dp_mmx; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_can_dp_mmx; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_caa_dp_mmx; + + op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_cn_dpan_mmx; + op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_c_dpan_mmx; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_can_dpan_mmx; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_copy_rel_pt_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = 1 + (*d >> 24); + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + MOV_A2R(s, mm1) + MUL4_256_R2R(mm2, mm1) + MOV_R2P(mm1, *d, mm0) +} + + +#define _op_copy_rel_pt_cn_dp_mmx _op_copy_rel_pt_c_dp_mmx +#define _op_copy_rel_pt_can_dp_mmx _op_copy_rel_pt_c_dp_mmx +#define _op_copy_rel_pt_caa_dp_mmx _op_copy_rel_pt_c_dp_mmx + +#define _op_copy_rel_pt_cn_dpan_mmx _op_copy_pt_cn_dpan_mmx +#define _op_copy_rel_pt_c_dpan_mmx _op_copy_pt_c_dpan_mmx +#define _op_copy_rel_pt_can_dpan_mmx _op_copy_pt_can_dpan_mmx +#define _op_copy_rel_pt_caa_dpan_mmx _op_copy_pt_caa_dpan_mmx + +static void +init_copy_rel_color_pt_funcs_mmx(void) +{ + op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_cn_dp_mmx; + op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_c_dp_mmx; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_can_dp_mmx; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_caa_dp_mmx; + + op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_cn_dpan_mmx; + op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_c_dpan_mmx; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_can_dpan_mmx; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_caa_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c new file mode 100644 index 0000000..96310cd --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c @@ -0,0 +1,212 @@ +/* copy color --> dst */ + +#ifdef BUILD_NEON +static void +_op_copy_c_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { +#define AP "COPY_C_DP_" + uint32_t *e = d + l,*tmp; + asm volatile ( + ".fpu neon \n\t" + + "vdup.i32 q0, %[c] \n\t" + + // Can we do 32 byte? + "andS %[tmp], %[d], $0x1f \n\t" + "beq "AP"quadstart \n\t" + + // Can we do at least 16 byte? + "andS %[tmp], %[d], $0x4 \n\t" + "beq "AP"dualstart \n\t" + + // Only once + AP"singleloop: \n\t" + "vst1.32 d0[0], [%[d]] \n\t" + "add %[d], #4 \n\t" + + // Up to 3 times + AP"dualstart: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #32 \n\t" + "blt "AP"loopout \n\t" + + AP"dualloop: \n\t" + "vstr.32 d0, [%[d]] \n\t" + + "add %[d], #8 \n\t" + "andS %[tmp], %[d], $0x1f \n\t" + "bne "AP"dualloop \n\t" + + + AP"quadstart: \n\t" + "sub %[tmp], %[e], %[d] \n\t" + "cmp %[tmp], #32 \n\t" + "blt "AP"loopout \n\t" + + "vmov q1, q0 \n\t" + "sub %[tmp],%[e],#31 \n\t" + + AP "quadloop: \n\t" + "vstm %[d]!, {d0,d1,d2,d3} \n\t" + + "cmp %[tmp], %[d] \n\t" + "bhi "AP"quadloop \n\t" + + + AP "loopout: \n\t" + "cmp %[d], %[e] \n\t" + "beq "AP"done \n\t" + "sub %[tmp],%[e], %[d] \n\t" + "cmp %[tmp],$0x04 \n\t" + "beq "AP"singleloop2 \n\t" + + AP "dualloop2: \n\t" + "sub %[tmp],%[e],#7 \n\t" + AP "dualloop2int: \n\t" + "vstr.64 d0, [%[d]] \n\t" + + "add %[d], #8 \n\t" + "cmp %[tmp], %[d] \n\t" + "bhi "AP"dualloop2int \n\t" + + // Single ?? + "cmp %[e], %[d] \n\t" + "beq "AP"done \n\t" + + AP "singleloop2: \n\t" + "vst1.32 d0[0], [%[d]] \n\t" + + AP "done:\n\t" + + : // No output regs + // Input + : [c] "r" (c), [e] "r" (e), [d] "r" (d),[tmp] "r" (tmp) + // Clobbered + : "q0","q1","memory" + + + ); +} + +#define _op_copy_cn_dp_neon _op_copy_c_dp_neon +#define _op_copy_can_dp_neon _op_copy_c_dp_neon +#define _op_copy_caa_dp_neon _op_copy_c_dp_neon + +#define _op_copy_cn_dpan_neon _op_copy_c_dp_neon +#define _op_copy_c_dpan_neon _op_copy_c_dp_neon +#define _op_copy_can_dpan_neon _op_copy_c_dp_neon +#define _op_copy_caa_dpan_neon _op_copy_c_dp_neon + +static void +init_copy_color_span_funcs_neon(void) +{ + op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_cn_dp_neon; + op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_c_dp_neon; + op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_can_dp_neon; + op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_caa_dp_neon; + + op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_cn_dpan_neon; + op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_c_dpan_neon; + op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_can_dpan_neon; + op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_copy_pt_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + *d = c; +} + +#define _op_copy_pt_cn_dp_neon _op_copy_pt_c_dp_neon +#define _op_copy_pt_can_dp_neon _op_copy_pt_c_dp_neon +#define _op_copy_pt_caa_dp_neon _op_copy_pt_c_dp_neon + +#define _op_copy_pt_cn_dpan_neon _op_copy_pt_c_dp_neon +#define _op_copy_pt_c_dpan_neon _op_copy_pt_c_dp_neon +#define _op_copy_pt_can_dpan_neon _op_copy_pt_c_dp_neon +#define _op_copy_pt_caa_dpan_neon _op_copy_pt_c_dp_neon + +static void +init_copy_color_pt_funcs_neon(void) +{ + op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_cn_dp_neon; + op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_c_dp_neon; + op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_can_dp_neon; + op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_caa_dp_neon; + + op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_cn_dpan_neon; + op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_c_dpan_neon; + op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_can_dpan_neon; + op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_caa_dpan_neon; +} +#endif + +/*-----*/ + +/* copy_rel color --> dst */ + +#ifdef BUILD_NEON +static void +_op_copy_rel_c_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + // FIXME: neon-it + DATA32 *e = d + l; + for (; d < e; d++) { + *d = MUL_SYM(*d >> 24, c); + } +} + +#define _op_copy_rel_cn_dp_neon _op_copy_rel_c_dp_neon +#define _op_copy_rel_can_dp_neon _op_copy_rel_c_dp_neon +#define _op_copy_rel_caa_dp_neon _op_copy_rel_c_dp_neon + +#define _op_copy_rel_cn_dpan_neon _op_copy_cn_dpan_neon +#define _op_copy_rel_c_dpan_neon _op_copy_c_dpan_neon +#define _op_copy_rel_can_dpan_neon _op_copy_can_dpan_neon +#define _op_copy_rel_caa_dpan_neon _op_copy_caa_dpan_neon + +static void +init_copy_rel_color_span_funcs_neon(void) +{ + op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_cn_dp_neon; + op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_c_dp_neon; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_can_dp_neon; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_caa_dp_neon; + + op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_cn_dpan_neon; + op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_c_dpan_neon; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_can_dpan_neon; + op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_copy_rel_pt_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = 1 + (*d >> 24); + *d = MUL_256(s, c); +} + + +#define _op_copy_rel_pt_cn_dp_neon _op_copy_rel_pt_c_dp_neon +#define _op_copy_rel_pt_can_dp_neon _op_copy_rel_pt_c_dp_neon +#define _op_copy_rel_pt_caa_dp_neon _op_copy_rel_pt_c_dp_neon + +#define _op_copy_rel_pt_cn_dpan_neon _op_copy_pt_cn_dpan_neon +#define _op_copy_rel_pt_c_dpan_neon _op_copy_pt_c_dpan_neon +#define _op_copy_rel_pt_can_dpan_neon _op_copy_pt_can_dpan_neon +#define _op_copy_rel_pt_caa_dpan_neon _op_copy_pt_caa_dpan_neon + +static void +init_copy_rel_color_pt_funcs_neon(void) +{ + op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_cn_dp_neon; + op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_c_dp_neon; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_can_dp_neon; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_caa_dp_neon; + + op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_cn_dpan_neon; + op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_c_dpan_neon; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_can_dpan_neon; + op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_caa_dpan_neon; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c new file mode 100644 index 0000000..c03a843 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c @@ -0,0 +1,170 @@ +/* copy mask x color -> dst */ + +#ifdef BUILD_C +static void +_op_copy_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int color; + UNROLL8_PLD_WHILE(d, l, e, + { + color = *m; + switch(color) + { + case 0: + break; + case 255: + *d = c; + break; + default: + color++; + *d = INTERP_256(color, c, *d); + break; + } + m++; d++; + }); +} + +#define _op_copy_mas_cn_dp _op_copy_mas_c_dp +#define _op_copy_mas_can_dp _op_copy_mas_c_dp +#define _op_copy_mas_caa_dp _op_copy_mas_c_dp + +#define _op_copy_mas_c_dpan _op_copy_mas_c_dp +#define _op_copy_mas_cn_dpan _op_copy_mas_c_dpan +#define _op_copy_mas_can_dpan _op_copy_mas_c_dpan +#define _op_copy_mas_caa_dpan _op_copy_mas_c_dpan + +static void +init_copy_mask_color_span_funcs_c(void) +{ + op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_mas_cn_dp; + op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_mas_c_dp; + op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_mas_can_dp; + op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_mas_caa_dp; + + op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_mas_cn_dpan; + op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_mas_c_dpan; + op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_mas_can_dpan; + op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_mas_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_copy_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { + *d = INTERP_256(m + 1, c, *d); +} + + +#define _op_copy_pt_mas_cn_dp _op_copy_pt_mas_c_dp +#define _op_copy_pt_mas_can_dp _op_copy_pt_mas_c_dp +#define _op_copy_pt_mas_caa_dp _op_copy_pt_mas_c_dp + +#define _op_copy_pt_mas_c_dpan _op_copy_pt_mas_c_dp +#define _op_copy_pt_mas_cn_dpan _op_copy_pt_mas_c_dpan +#define _op_copy_pt_mas_can_dpan _op_copy_pt_mas_c_dpan +#define _op_copy_pt_mas_caa_dpan _op_copy_pt_mas_c_dpan + +static void +init_copy_mask_color_pt_funcs_c(void) +{ + op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_mas_cn_dp; + op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_pt_mas_c_dp; + op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_pt_mas_can_dp; + op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_pt_mas_caa_dp; + + op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_mas_cn_dpan; + op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_pt_mas_c_dpan; + op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_pt_mas_can_dpan; + op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_pt_mas_caa_dpan; +} +#endif + +/*-----*/ + +/* copy_rel mask x color -> dst */ + +#ifdef BUILD_C +static void +_op_copy_rel_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int color; + UNROLL8_PLD_WHILE(d, l, e, + { + color = *m; + switch(color) + { + case 0: + break; + case 255: + color = 1 + (*d >> 24); + *d = MUL_256(color, c); + break; + default: + { + DATA32 da = 1 + (*d >> 24); + da = MUL_256(da, c); + color++; + *d = INTERP_256(color, da, *d); + } + break; + } + m++; d++; + }); +} + + +#define _op_copy_rel_mas_cn_dp _op_copy_rel_mas_c_dp +#define _op_copy_rel_mas_can_dp _op_copy_rel_mas_c_dp +#define _op_copy_rel_mas_caa_dp _op_copy_rel_mas_c_dp + +#define _op_copy_rel_mas_c_dpan _op_copy_mas_c_dpan +#define _op_copy_rel_mas_cn_dpan _op_copy_mas_cn_dpan +#define _op_copy_rel_mas_can_dpan _op_copy_mas_can_dpan +#define _op_copy_rel_mas_caa_dpan _op_copy_mas_caa_dpan + +static void +init_copy_rel_mask_color_span_funcs_c(void) +{ + op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_mas_cn_dp; + op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_rel_mas_c_dp; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_rel_mas_can_dp; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_rel_mas_caa_dp; + + op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_mas_cn_dpan; + op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_rel_mas_c_dpan; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_rel_mas_can_dpan; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_rel_mas_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_copy_rel_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = 1 + (*d >> 24); + s = MUL_256(s, c); + *d = INTERP_256(m + 1, s, *d); +} + +#define _op_copy_rel_pt_mas_cn_dp _op_copy_rel_pt_mas_c_dp +#define _op_copy_rel_pt_mas_can_dp _op_copy_rel_pt_mas_c_dp +#define _op_copy_rel_pt_mas_caa_dp _op_copy_rel_pt_mas_c_dp + +#define _op_copy_rel_pt_mas_c_dpan _op_copy_pt_mas_c_dpan +#define _op_copy_rel_pt_mas_cn_dpan _op_copy_pt_mas_cn_dpan +#define _op_copy_rel_pt_mas_can_dpan _op_copy_pt_mas_can_dpan +#define _op_copy_rel_pt_mas_caa_dpan _op_copy_pt_mas_caa_dpan + +static void +init_copy_rel_mask_color_pt_funcs_c(void) +{ + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_mas_cn_dp; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_rel_pt_mas_c_dp; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_rel_pt_mas_can_dp; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_rel_pt_mas_caa_dp; + + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_mas_cn_dpan; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_rel_pt_mas_c_dpan; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_mas_can_dpan; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_mas_caa_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c new file mode 100644 index 0000000..e27493f --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c @@ -0,0 +1,193 @@ +/* copy mask x color -> dst */ + +#ifdef BUILD_MMX +static void +_op_copy_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + MOV_A2R(ALPHA_255, mm5) + while (d < e) { + l = *m; + switch(l) + { + case 0: + break; + case 255: + *d = c; + break; + default: + { + l++; + MOV_A2R(l, mm3) + MOV_P2R(*d, mm1, mm0) + movq_r2r(mm2, mm4); + INTERP_256_R2R(mm3, mm4, mm1, mm5); + MOV_R2P(mm1, *d, mm0) + } + break; + } + m++; d++; + } +} + +#define _op_copy_mas_cn_dp_mmx _op_copy_mas_c_dp_mmx +#define _op_copy_mas_can_dp_mmx _op_copy_mas_c_dp_mmx +#define _op_copy_mas_caa_dp_mmx _op_copy_mas_c_dp_mmx + +#define _op_copy_mas_c_dpan_mmx _op_copy_mas_c_dp_mmx +#define _op_copy_mas_cn_dpan_mmx _op_copy_mas_c_dpan_mmx +#define _op_copy_mas_can_dpan_mmx _op_copy_mas_c_dpan_mmx +#define _op_copy_mas_caa_dpan_mmx _op_copy_mas_c_dpan_mmx + +static void +init_copy_mask_color_span_funcs_mmx(void) +{ + op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_mas_cn_dp_mmx; + op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_mas_c_dp_mmx; + op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_mas_can_dp_mmx; + op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_mas_caa_dp_mmx; + + op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_mas_cn_dpan_mmx; + op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_mas_c_dpan_mmx; + op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_mas_can_dpan_mmx; + op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_mas_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_copy_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = m + 1; + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + MOV_A2R(s, mm3) + MOV_P2R(*d, mm1, mm0) + INTERP_256_R2R(mm3, mm2, mm1, mm5); + MOV_R2P(mm1, *d, mm0) +} + +#define _op_copy_pt_mas_cn_dp_mmx _op_copy_pt_mas_c_dp_mmx +#define _op_copy_pt_mas_can_dp_mmx _op_copy_pt_mas_c_dp_mmx +#define _op_copy_pt_mas_caa_dp_mmx _op_copy_pt_mas_c_dp_mmx + +#define _op_copy_pt_mas_c_dpan_mmx _op_copy_pt_mas_c_dp_mmx +#define _op_copy_pt_mas_cn_dpan_mmx _op_copy_pt_mas_c_dpan_mmx +#define _op_copy_pt_mas_can_dpan_mmx _op_copy_pt_mas_c_dpan_mmx +#define _op_copy_pt_mas_caa_dpan_mmx _op_copy_pt_mas_c_dpan_mmx + +static void +init_copy_mask_color_pt_funcs_mmx(void) +{ + op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_mas_cn_dp_mmx; + op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_pt_mas_c_dp_mmx; + op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_pt_mas_can_dp_mmx; + op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_pt_mas_caa_dp_mmx; + + op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_mas_cn_dpan_mmx; + op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_pt_mas_c_dpan_mmx; + op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_mas_can_dpan_mmx; + op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_mas_caa_dpan_mmx; +} +#endif + +/*-----*/ + +/* copy_rel mask x color -> dst */ + +#ifdef BUILD_MMX +static void +_op_copy_rel_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + MOV_A2R(ALPHA_255, mm5) + while (d < e) { + l = *m; + switch(l) + { + case 0: + break; + case 255: + l = 1 + (*d >> 24); + MOV_A2R(l, mm1) + MUL4_256_R2R(mm2, mm1) + MOV_R2P(mm1, *d, mm0) + break; + default: + l++; + MOV_A2R(l, mm3) + MOV_P2R(*d, mm1, mm0) + MOV_RA2R(mm1, mm4) + MUL4_256_R2R(mm2, mm4) + INTERP_256_R2R(mm3, mm4, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + break; + } + m++; d++; + } +} + +#define _op_copy_rel_mas_cn_dp_mmx _op_copy_rel_mas_c_dp_mmx +#define _op_copy_rel_mas_can_dp_mmx _op_copy_rel_mas_c_dp_mmx +#define _op_copy_rel_mas_caa_dp_mmx _op_copy_rel_mas_c_dp_mmx + +#define _op_copy_rel_mas_c_dpan_mmx _op_copy_mas_c_dpan_mmx +#define _op_copy_rel_mas_cn_dpan_mmx _op_copy_mas_cn_dpan_mmx +#define _op_copy_rel_mas_can_dpan_mmx _op_copy_mas_can_dpan_mmx +#define _op_copy_rel_mas_caa_dpan_mmx _op_copy_mas_caa_dpan_mmx + +static void +init_copy_rel_mask_color_span_funcs_mmx(void) +{ + op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_mas_cn_dp_mmx; + op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_rel_mas_c_dp_mmx; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_rel_mas_can_dp_mmx; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_rel_mas_caa_dp_mmx; + + op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_mas_cn_dpan_mmx; + op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_rel_mas_c_dpan_mmx; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_mas_can_dpan_mmx; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_mas_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_copy_rel_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = m + 1; + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + MOV_A2R(s, mm3) + MOV_P2R(*d, mm1, mm0) + MOV_RA2R(mm1, mm4) + MOV_P2R(c, mm2, mm0) + MUL4_256_R2R(mm2, mm4) + INTERP_256_R2R(mm3, mm4, mm1, mm5) + MOV_R2P(mm1, *d, mm0) +} + +#define _op_copy_rel_pt_mas_cn_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx +#define _op_copy_rel_pt_mas_can_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx +#define _op_copy_rel_pt_mas_caa_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx + +#define _op_copy_rel_pt_mas_c_dpan_mmx _op_copy_pt_mas_c_dpan_mmx +#define _op_copy_rel_pt_mas_cn_dpan_mmx _op_copy_pt_mas_cn_dpan_mmx +#define _op_copy_rel_pt_mas_can_dpan_mmx _op_copy_pt_mas_can_dpan_mmx +#define _op_copy_rel_pt_mas_caa_dpan_mmx _op_copy_pt_mas_caa_dpan_mmx + +static void +init_copy_rel_mask_color_pt_funcs_mmx(void) +{ + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_mas_cn_dp_mmx; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_rel_pt_mas_c_dp_mmx; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_mas_can_dp_mmx; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_mas_caa_dp_mmx; + + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_cn_dpan_mmx; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_c_dpan_mmx; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_can_dpan_mmx; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_caa_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c new file mode 100644 index 0000000..dc7f78f --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c @@ -0,0 +1,170 @@ +/* copy mask x color -> dst */ + +#ifdef BUILD_NEON +static void +_op_copy_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + // FIXME: neon-it + DATA32 *e; + int color; + UNROLL8_PLD_WHILE(d, l, e, + { + color = *m; + switch(color) + { + case 0: + break; + case 255: + *d = c; + break; + default: + color++; + *d = INTERP_256(color, c, *d); + break; + } + m++; d++; + }); +} + +#define _op_copy_mas_cn_dp_neon _op_copy_mas_c_dp_neon +#define _op_copy_mas_can_dp_neon _op_copy_mas_c_dp_neon +#define _op_copy_mas_caa_dp_neon _op_copy_mas_c_dp_neon + +#define _op_copy_mas_c_dpan_neon _op_copy_mas_c_dp_neon +#define _op_copy_mas_cn_dpan_neon _op_copy_mas_c_dpan_neon +#define _op_copy_mas_can_dpan_neon _op_copy_mas_c_dpan_neon +#define _op_copy_mas_caa_dpan_neon _op_copy_mas_c_dpan_neon + +static void +init_copy_mask_color_span_funcs_neon(void) +{ + op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_mas_cn_dp_neon; + op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_mas_c_dp_neon; + op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_mas_can_dp_neon; + op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_mas_caa_dp_neon; + + op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_mas_cn_dpan_neon; + op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_mas_c_dpan_neon; + op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_mas_can_dpan_neon; + op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_mas_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_copy_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + *d = INTERP_256(m + 1, c, *d); +} + +#define _op_copy_pt_mas_cn_dp_neon _op_copy_pt_mas_c_dp_neon +#define _op_copy_pt_mas_can_dp_neon _op_copy_pt_mas_c_dp_neon +#define _op_copy_pt_mas_caa_dp_neon _op_copy_pt_mas_c_dp_neon + +#define _op_copy_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dp_neon +#define _op_copy_pt_mas_cn_dpan_neon _op_copy_pt_mas_c_dpan_neon +#define _op_copy_pt_mas_can_dpan_neon _op_copy_pt_mas_c_dpan_neon +#define _op_copy_pt_mas_caa_dpan_neon _op_copy_pt_mas_c_dpan_neon + +static void +init_copy_mask_color_pt_funcs_neon(void) +{ + op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_mas_cn_dp_neon; + op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_pt_mas_c_dp_neon; + op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_pt_mas_can_dp_neon; + op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_pt_mas_caa_dp_neon; + + op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_mas_cn_dpan_neon; + op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_pt_mas_c_dpan_neon; + op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_mas_can_dpan_neon; + op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_mas_caa_dpan_neon; +} +#endif + +/*-----*/ + +/* copy_rel mask x color -> dst */ + +#ifdef BUILD_NEON +static void +_op_copy_rel_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + // FIXME: neon-it + DATA32 *e; + int color; + UNROLL8_PLD_WHILE(d, l, e, + { + color = *m; + switch(color) + { + case 0: + break; + case 255: + color = 1 + (*d >> 24); + *d = MUL_256(color, c); + break; + default: + { + DATA32 da = 1 + (*d >> 24); + da = MUL_256(da, c); + color++; + *d = INTERP_256(color, da, *d); + } + break; + } + m++; d++; + }); +} + +#define _op_copy_rel_mas_cn_dp_neon _op_copy_rel_mas_c_dp_neon +#define _op_copy_rel_mas_can_dp_neon _op_copy_rel_mas_c_dp_neon +#define _op_copy_rel_mas_caa_dp_neon _op_copy_rel_mas_c_dp_neon + +#define _op_copy_rel_mas_c_dpan_neon _op_copy_mas_c_dpan_neon +#define _op_copy_rel_mas_cn_dpan_neon _op_copy_mas_cn_dpan_neon +#define _op_copy_rel_mas_can_dpan_neon _op_copy_mas_can_dpan_neon +#define _op_copy_rel_mas_caa_dpan_neon _op_copy_mas_caa_dpan_neon + +static void +init_copy_rel_mask_color_span_funcs_neon(void) +{ + op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_mas_cn_dp_neon; + op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_mas_c_dp_neon; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_mas_can_dp_neon; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_mas_caa_dp_neon; + + op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_mas_cn_dpan_neon; + op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_mas_c_dpan_neon; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_mas_can_dpan_neon; + op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_mas_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_copy_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = 1 + (*d >> 24); + s = MUL_256(s, c); + *d = INTERP_256(m + 1, s, *d); +} + +#define _op_copy_rel_pt_mas_cn_dp_neon _op_copy_rel_pt_mas_c_dp_neon +#define _op_copy_rel_pt_mas_can_dp_neon _op_copy_rel_pt_mas_c_dp_neon +#define _op_copy_rel_pt_mas_caa_dp_neon _op_copy_rel_pt_mas_c_dp_neon + +#define _op_copy_rel_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dpan_neon +#define _op_copy_rel_pt_mas_cn_dpan_neon _op_copy_pt_mas_cn_dpan_neon +#define _op_copy_rel_pt_mas_can_dpan_neon _op_copy_pt_mas_can_dpan_neon +#define _op_copy_rel_pt_mas_caa_dpan_neon _op_copy_pt_mas_caa_dpan_neon + +static void +init_copy_rel_mask_color_pt_funcs_neon(void) +{ + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_mas_cn_dp_neon; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_pt_mas_c_dp_neon; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_mas_can_dp_neon; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_mas_caa_dp_neon; + + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_cn_dpan_neon; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_c_dpan_neon; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_can_dpan_neon; + op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_caa_dpan_neon; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c new file mode 100644 index 0000000..45d59d0 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c @@ -0,0 +1,117 @@ +/* copy pixel --> dst */ + +#ifdef BUILD_C +static void +_op_copy_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + memcpy(d, s, l * sizeof(DATA32)); +} + +#define _op_copy_pan_dp _op_copy_p_dp +#define _op_copy_pas_dp _op_copy_p_dp + +#define _op_copy_p_dpan _op_copy_p_dp +#define _op_copy_pan_dpan _op_copy_pan_dp +#define _op_copy_pas_dpan _op_copy_pas_dp + +static void +init_copy_pixel_span_funcs_c(void) +{ + op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_p_dp; + op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_pan_dp; + op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_pas_dp; + + op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_p_dpan; + op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pan_dpan; + op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pas_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_copy_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { + *d = s; +} + +#define _op_copy_pt_pan_dp _op_copy_pt_p_dp +#define _op_copy_pt_pas_dp _op_copy_pt_p_dp + +#define _op_copy_pt_p_dpan _op_copy_pt_p_dp +#define _op_copy_pt_pan_dpan _op_copy_pt_pan_dp +#define _op_copy_pt_pas_dpan _op_copy_pt_pas_dp + +static void +init_copy_pixel_pt_funcs_c(void) +{ + op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_p_dp; + op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_pan_dp; + op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_pas_dp; + + op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_p_dpan; + op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_pan_dpan; + op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_pas_dpan; +} +#endif + +/*-----*/ + +/* copy_rel pixel --> dst */ + +#ifdef BUILD_C +static void +_op_copy_rel_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e; + UNROLL8_PLD_WHILE(d, l, e, + { + *d = MUL_SYM(*d >> 24, *s); + d++; s++; + }); +} + + +#define _op_copy_rel_pas_dp _op_copy_rel_p_dp +#define _op_copy_rel_pan_dp _op_copy_rel_p_dp + +#define _op_copy_rel_p_dpan _op_copy_p_dpan +#define _op_copy_rel_pan_dpan _op_copy_pan_dpan +#define _op_copy_rel_pas_dpan _op_copy_pas_dpan + +static void +init_copy_rel_pixel_span_funcs_c(void) +{ + op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_p_dp; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pan_dp; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pas_dp; + + op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_p_dpan; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pan_dpan; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pas_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_copy_rel_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + c = 1 + (*d >> 24); + *d = MUL_256(c, s); +} + + +#define _op_copy_rel_pt_pan_dp _op_copy_rel_pt_p_dp +#define _op_copy_rel_pt_pas_dp _op_copy_rel_pt_p_dp + +#define _op_copy_rel_pt_p_dpan _op_copy_pt_p_dpan +#define _op_copy_rel_pt_pan_dpan _op_copy_pt_pan_dpan +#define _op_copy_rel_pt_pas_dpan _op_copy_pt_pas_dpan + +static void +init_copy_rel_pixel_pt_funcs_c(void) +{ + op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_p_dp; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_pan_dp; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_pas_dp; + + op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_p_dpan; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pan_dpan; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pas_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c new file mode 100644 index 0000000..12b616d --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c @@ -0,0 +1,236 @@ +/* copy pixel x color --> dst */ + +#ifdef BUILD_C +static void +_op_copy_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + UNROLL8_PLD_WHILE(d, l, e, + { + *d = MUL4_SYM(c, *s); + d++; + s++; + }); +} + +static void +_op_copy_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + c = 1 + (c >> 24); + UNROLL8_PLD_WHILE(d, l, e, + { + *d = MUL_256(c, *s); + d++; + s++; + }); +} + + +#define _op_copy_pas_c_dp _op_copy_p_c_dp +#define _op_copy_pan_c_dp _op_copy_p_c_dp +#define _op_copy_p_can_dp _op_copy_p_c_dp +#define _op_copy_pas_can_dp _op_copy_p_can_dp +#define _op_copy_pan_can_dp _op_copy_p_c_dp +#define _op_copy_pas_caa_dp _op_copy_p_caa_dp +#define _op_copy_pan_caa_dp _op_copy_p_caa_dp + +#define _op_copy_p_c_dpan _op_copy_p_c_dp +#define _op_copy_pas_c_dpan _op_copy_pas_c_dp +#define _op_copy_pan_c_dpan _op_copy_pan_c_dp +#define _op_copy_p_can_dpan _op_copy_p_can_dp +#define _op_copy_pas_can_dpan _op_copy_pas_can_dp +#define _op_copy_pan_can_dpan _op_copy_pan_can_dp +#define _op_copy_p_caa_dpan _op_copy_p_caa_dp +#define _op_copy_pas_caa_dpan _op_copy_pas_caa_dp +#define _op_copy_pan_caa_dpan _op_copy_pan_caa_dp + +static void +init_copy_pixel_color_span_funcs_c(void) +{ + op_copy_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_p_c_dp; + op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_pas_c_dp; + op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_pan_c_dp; + op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_p_can_dp; + op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_pas_can_dp; + op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_pan_can_dp; + op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_p_caa_dp; + op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_pas_caa_dp; + op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_pan_caa_dp; + + op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_p_c_dpan; + op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_pas_c_dpan; + op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_pan_c_dpan; + op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_p_can_dpan; + op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pas_can_dpan; + op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pan_can_dpan; + op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_p_caa_dpan; + op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pas_caa_dpan; + op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pan_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_copy_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + *d = MUL4_SYM(c, s); +} + +static void +_op_copy_pt_p_caa_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + *d = MUL_SYM(c >> 24, s); +} + + +#define _op_copy_pt_p_can_dp _op_copy_pt_p_c_dp +#define _op_copy_pt_pan_c_dp _op_copy_pt_p_c_dp +#define _op_copy_pt_pan_can_dp _op_copy_pt_p_c_dp +#define _op_copy_pt_pan_caa_dp _op_copy_pt_p_caa_dp +#define _op_copy_pt_pas_c_dp _op_copy_pt_p_c_dp +#define _op_copy_pt_pas_can_dp _op_copy_pt_p_can_dp +#define _op_copy_pt_pas_caa_dp _op_copy_pt_p_caa_dp + +#define _op_copy_pt_p_c_dpan _op_copy_pt_p_c_dp +#define _op_copy_pt_pas_c_dpan _op_copy_pt_pas_c_dp +#define _op_copy_pt_pan_c_dpan _op_copy_pt_pan_c_dp +#define _op_copy_pt_p_can_dpan _op_copy_pt_p_can_dp +#define _op_copy_pt_pas_can_dpan _op_copy_pt_pas_can_dp +#define _op_copy_pt_pan_can_dpan _op_copy_pt_pan_can_dp +#define _op_copy_pt_p_caa_dpan _op_copy_pt_p_caa_dp +#define _op_copy_pt_pas_caa_dpan _op_copy_pt_pas_caa_dp +#define _op_copy_pt_pan_caa_dpan _op_copy_pt_pan_caa_dp + +static void +init_copy_pixel_color_pt_funcs_c(void) +{ + op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_pt_p_c_dp; + op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_pt_pas_c_dp; + op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_pt_pan_c_dp; + op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_p_can_dp; + op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_pas_can_dp; + op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_pan_can_dp; + op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_p_caa_dp; + op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_pas_caa_dp; + op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_pan_caa_dp; + + op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_p_c_dpan; + op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_pas_c_dpan; + op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_pan_c_dpan; + op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_p_can_dpan; + op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_pas_can_dpan; + op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_pan_can_dpan; + op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_p_caa_dpan; + op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_pas_caa_dpan; + op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_pan_caa_dpan; +} +#endif + +/*-----*/ + +/* copy_rel pixel x color --> dst */ + +#ifdef BUILD_C +static void +_op_copy_rel_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + UNROLL8_PLD_WHILE(d, l, e, + { + DATA32 cs = MUL4_SYM(c, *s); + *d = MUL_SYM(*d >> 24, cs); + d++; + s++; + }); +} + +#define _op_copy_rel_pas_c_dp _op_copy_rel_p_c_dp +#define _op_copy_rel_pan_c_dp _op_copy_rel_p_c_dp +#define _op_copy_rel_p_can_dp _op_copy_rel_p_c_dp +#define _op_copy_rel_pas_can_dp _op_copy_rel_pas_c_dp +#define _op_copy_rel_pan_can_dp _op_copy_rel_p_c_dp +#define _op_copy_rel_p_caa_dp _op_copy_rel_p_c_dp +#define _op_copy_rel_pas_caa_dp _op_copy_rel_p_c_dp +#define _op_copy_rel_pan_caa_dp _op_copy_rel_p_c_dp + +#define _op_copy_rel_p_c_dpan _op_copy_p_c_dpan +#define _op_copy_rel_pas_c_dpan _op_copy_pas_c_dpan +#define _op_copy_rel_pan_c_dpan _op_copy_pan_c_dpan +#define _op_copy_rel_p_can_dpan _op_copy_p_can_dpan +#define _op_copy_rel_pas_can_dpan _op_copy_pas_can_dpan +#define _op_copy_rel_pan_can_dpan _op_copy_pan_can_dpan +#define _op_copy_rel_p_caa_dpan _op_copy_p_caa_dpan +#define _op_copy_rel_pas_caa_dpan _op_copy_pas_caa_dpan +#define _op_copy_rel_pan_caa_dpan _op_copy_pan_caa_dpan + +static void +init_copy_rel_pixel_color_span_funcs_c(void) +{ + op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_rel_p_c_dp; + op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_rel_pas_c_dp; + op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_rel_pan_c_dp; + op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_p_can_dp; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pas_can_dp; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pan_can_dp; + op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_p_caa_dp; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pas_caa_dp; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pan_caa_dp; + + op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_p_c_dpan; + op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pas_c_dpan; + op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pan_c_dpan; + op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_p_can_dpan; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pas_can_dpan; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pan_can_dpan; + op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_p_caa_dpan; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pas_caa_dpan; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pan_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_copy_rel_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = MUL4_SYM(c, s); + *d = MUL_SYM(*d >> 24, s); +} + +#define _op_copy_rel_pt_pas_c_dp _op_copy_rel_pt_p_c_dp +#define _op_copy_rel_pt_pan_c_dp _op_copy_rel_pt_p_c_dp +#define _op_copy_rel_pt_p_can_dp _op_copy_rel_pt_p_c_dp +#define _op_copy_rel_pt_pas_can_dp _op_copy_rel_pt_p_can_dp +#define _op_copy_rel_pt_pan_can_dp _op_copy_rel_pt_p_c_dp +#define _op_copy_rel_pt_p_caa_dp _op_copy_rel_pt_p_c_dp +#define _op_copy_rel_pt_pas_caa_dp _op_copy_rel_pt_p_caa_dp +#define _op_copy_rel_pt_pan_caa_dp _op_copy_rel_pt_p_caa_dp + +#define _op_copy_rel_pt_p_c_dpan _op_copy_pt_p_c_dpan +#define _op_copy_rel_pt_pas_c_dpan _op_copy_pt_pas_c_dpan +#define _op_copy_rel_pt_pan_c_dpan _op_copy_pt_pan_c_dpan +#define _op_copy_rel_pt_p_can_dpan _op_copy_pt_p_can_dpan +#define _op_copy_rel_pt_pas_can_dpan _op_copy_pt_pas_can_dpan +#define _op_copy_rel_pt_pan_can_dpan _op_copy_pt_pan_can_dpan +#define _op_copy_rel_pt_p_caa_dpan _op_copy_pt_p_caa_dpan +#define _op_copy_rel_pt_pas_caa_dpan _op_copy_pt_pas_caa_dpan +#define _op_copy_rel_pt_pan_caa_dpan _op_copy_pt_pan_caa_dpan + +static void +init_copy_rel_pixel_color_pt_funcs_c(void) +{ + op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_p_c_dp; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_pas_c_dp; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_pan_c_dp; + op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_p_can_dp; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_pas_can_dp; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_pan_can_dp; + op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_p_caa_dp; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_pas_caa_dp; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_pan_caa_dp; + + op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_p_c_dpan; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_pas_c_dpan; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_pan_c_dpan; + op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_p_can_dpan; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_pas_can_dpan; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_pan_can_dpan; + op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_p_caa_dpan; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_pas_caa_dpan; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_pan_caa_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c new file mode 100644 index 0000000..fb5bc70 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c @@ -0,0 +1,255 @@ +/* copy pixel x color --> dst */ + +#ifdef BUILD_MMX +static void +_op_copy_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm3, mm0) + MOV_A2R(ALPHA_255, mm5) + while (d < e) { + MOV_P2R(*s, mm2, mm0) + MUL4_SYM_R2R(mm3, mm2, mm5); + MOV_R2P(mm2, *d, mm0) + s++; d++; + } +} + + +static void +_op_copy_p_caa_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + c = 1 + (c >> 24); + MOV_A2R(c, mm3) + pxor_r2r(mm0, mm0); + while (d < e) { + MOV_P2R(*s, mm2, mm0) + MUL4_256_R2R(mm3, mm2); + MOV_R2P(mm2, *d, mm0) + s++; d++; + } +} + + +#define _op_copy_pas_c_dp_mmx _op_copy_p_c_dp_mmx +#define _op_copy_pan_c_dp_mmx _op_copy_p_c_dp_mmx +#define _op_copy_p_can_dp_mmx _op_copy_p_c_dp_mmx +#define _op_copy_pas_can_dp_mmx _op_copy_pas_c_dp_mmx +#define _op_copy_pan_can_dp_mmx _op_copy_pan_c_dp_mmx +#define _op_copy_pas_caa_dp_mmx _op_copy_p_caa_dp_mmx +#define _op_copy_pan_caa_dp_mmx _op_copy_p_caa_dp_mmx + +#define _op_copy_p_c_dpan_mmx _op_copy_p_c_dp_mmx +#define _op_copy_pas_c_dpan_mmx _op_copy_pas_c_dp_mmx +#define _op_copy_pan_c_dpan_mmx _op_copy_pan_c_dp_mmx +#define _op_copy_p_can_dpan_mmx _op_copy_p_can_dp_mmx +#define _op_copy_pas_can_dpan_mmx _op_copy_pas_can_dp_mmx +#define _op_copy_pan_can_dpan_mmx _op_copy_pan_can_dp_mmx +#define _op_copy_p_caa_dpan_mmx _op_copy_p_caa_dp_mmx +#define _op_copy_pas_caa_dpan_mmx _op_copy_pas_caa_dp_mmx +#define _op_copy_pan_caa_dpan_mmx _op_copy_pan_caa_dp_mmx + +static void +init_copy_pixel_color_span_funcs_mmx(void) +{ + op_copy_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_p_c_dp_mmx; + op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_pas_c_dp_mmx; + op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_pan_c_dp_mmx; + op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_p_can_dp_mmx; + op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pas_can_dp_mmx; + op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pan_can_dp_mmx; + op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_p_caa_dp_mmx; + op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pas_caa_dp_mmx; + op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pan_caa_dp_mmx; + + op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_p_c_dpan_mmx; + op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pas_c_dpan_mmx; + op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pan_c_dpan_mmx; + op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_p_can_dpan_mmx; + op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pas_can_dpan_mmx; + op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pan_can_dpan_mmx; + op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_p_caa_dpan_mmx; + op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pas_caa_dpan_mmx; + op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pan_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_copy_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + MOV_P2R(c, mm2, mm0) + MOV_P2R(s, mm2, mm0) + MUL4_SYM_R2R(mm3, mm2, mm5); + MOV_R2P(mm2, *d, mm0) +} + +#define _op_copy_pt_pas_c_dp_mmx _op_copy_pt_p_c_dp_mmx +#define _op_copy_pt_pan_c_dp_mmx _op_copy_pt_p_c_dp_mmx +#define _op_copy_pt_p_can_dp_mmx _op_copy_pt_p_c_dp_mmx +#define _op_copy_pt_pas_can_dp_mmx _op_copy_pt_p_c_dp_mmx +#define _op_copy_pt_pan_can_dp_mmx _op_copy_pt_p_c_dp_mmx +#define _op_copy_pt_p_caa_dp_mmx _op_copy_pt_p_c_dp_mmx +#define _op_copy_pt_pas_caa_dp_mmx _op_copy_pt_p_c_dp_mmx +#define _op_copy_pt_pan_caa_dp_mmx _op_copy_pt_p_c_dp_mmx + +#define _op_copy_pt_p_c_dpan_mmx _op_copy_pt_p_c_dp_mmx +#define _op_copy_pt_pas_c_dpan_mmx _op_copy_pt_pas_c_dp_mmx +#define _op_copy_pt_pan_c_dpan_mmx _op_copy_pt_pan_c_dp_mmx +#define _op_copy_pt_p_can_dpan_mmx _op_copy_pt_p_can_dp_mmx +#define _op_copy_pt_pas_can_dpan_mmx _op_copy_pt_pas_can_dp_mmx +#define _op_copy_pt_pan_can_dpan_mmx _op_copy_pt_pan_can_dp_mmx +#define _op_copy_pt_p_caa_dpan_mmx _op_copy_pt_p_caa_dp_mmx +#define _op_copy_pt_pas_caa_dpan_mmx _op_copy_pt_pas_caa_dp_mmx +#define _op_copy_pt_pan_caa_dpan_mmx _op_copy_pt_pan_caa_dp_mmx + +static void +init_copy_pixel_color_pt_funcs_mmx(void) +{ + op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_p_c_dp_mmx; + op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_pas_c_dp_mmx; + op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_pan_c_dp_mmx; + op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_p_can_dp_mmx; + op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_pas_can_dp_mmx; + op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_pan_can_dp_mmx; + op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_p_caa_dp_mmx; + op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_pas_caa_dp_mmx; + op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_pan_caa_dp_mmx; + + op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_p_c_dpan_mmx; + op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_pas_c_dpan_mmx; + op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_pan_c_dpan_mmx; + op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_p_can_dpan_mmx; + op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_pas_can_dpan_mmx; + op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_pan_can_dpan_mmx; + op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_p_caa_dpan_mmx; + op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_pas_caa_dpan_mmx; + op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_pan_caa_dpan_mmx; +} +#endif + +/*-----*/ + +/* copy_rel pixel x color --> dst */ + +#ifdef BUILD_MMX +static void +_op_copy_rel_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm3, mm0) + MOV_A2R(ALPHA_255, mm5) + while (d < e) { + MOV_PA2R(*d, mm1) + MOV_P2R(*s, mm2, mm0) + MUL4_SYM_R2R(mm3, mm2, mm5); + MUL4_SYM_R2R(mm2, mm1, mm5); + MOV_R2P(mm1, *d, mm0) + s++; d++; + } +} + + +#define _op_copy_rel_pas_c_dp_mmx _op_copy_rel_p_c_dp_mmx +#define _op_copy_rel_pan_c_dp_mmx _op_copy_rel_p_c_dp_mmx +#define _op_copy_rel_p_can_dp_mmx _op_copy_rel_p_c_dp_mmx +#define _op_copy_rel_pas_can_dp_mmx _op_copy_rel_p_c_dp_mmx +#define _op_copy_rel_pan_can_dp_mmx _op_copy_rel_p_c_dp_mmx +#define _op_copy_rel_p_caa_dp_mmx _op_copy_rel_p_c_dp_mmx +#define _op_copy_rel_pas_caa_dp_mmx _op_copy_rel_p_c_dp_mmx +#define _op_copy_rel_pan_caa_dp_mmx _op_copy_rel_p_c_dp_mmx + +#define _op_copy_rel_p_c_dpan_mmx _op_copy_p_c_dpan_mmx +#define _op_copy_rel_pas_c_dpan_mmx _op_copy_pas_c_dpan_mmx +#define _op_copy_rel_pan_c_dpan_mmx _op_copy_pan_c_dpan_mmx +#define _op_copy_rel_p_can_dpan_mmx _op_copy_p_can_dpan_mmx +#define _op_copy_rel_pas_can_dpan_mmx _op_copy_pas_can_dpan_mmx +#define _op_copy_rel_pan_can_dpan_mmx _op_copy_pan_can_dpan_mmx +#define _op_copy_rel_p_caa_dpan_mmx _op_copy_p_caa_dpan_mmx +#define _op_copy_rel_pas_caa_dpan_mmx _op_copy_pas_caa_dpan_mmx +#define _op_copy_rel_pan_caa_dpan_mmx _op_copy_pan_caa_dpan_mmx + +static void +init_copy_rel_pixel_color_span_funcs_mmx(void) +{ + op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_p_c_dp_mmx; + op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pas_c_dp_mmx; + op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pan_c_dp_mmx; + op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_p_can_dp_mmx; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pas_can_dp_mmx; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pan_can_dp_mmx; + op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_p_caa_dp_mmx; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pas_caa_dp_mmx; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pan_caa_dp_mmx; + + op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_p_c_dpan_mmx; + op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pas_c_dpan_mmx; + op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pan_c_dpan_mmx; + op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_p_can_dpan_mmx; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pas_can_dpan_mmx; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pan_can_dpan_mmx; + op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_p_caa_dpan_mmx; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pas_caa_dpan_mmx; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pan_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_copy_rel_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm3, mm0) + MOV_A2R(ALPHA_255, mm5) + MOV_PA2R(*d, mm1) + MOV_P2R(s, mm2, mm0) + MUL4_SYM_R2R(mm3, mm2, mm5); + MUL4_SYM_R2R(mm2, mm1, mm5); + MOV_R2P(mm1, *d, mm0) +} + + +#define _op_copy_rel_pt_pas_c_dp_mmx _op_copy_rel_pt_p_c_dp_mmx +#define _op_copy_rel_pt_pan_c_dp_mmx _op_copy_rel_pt_p_c_dp_mmx +#define _op_copy_rel_pt_p_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx +#define _op_copy_rel_pt_pas_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx +#define _op_copy_rel_pt_pan_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx +#define _op_copy_rel_pt_p_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx +#define _op_copy_rel_pt_pas_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx +#define _op_copy_rel_pt_pan_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx + +#define _op_copy_rel_pt_p_c_dpan_mmx _op_copy_pt_p_c_dpan_mmx +#define _op_copy_rel_pt_pas_c_dpan_mmx _op_copy_pt_pas_c_dpan_mmx +#define _op_copy_rel_pt_pan_c_dpan_mmx _op_copy_pt_pan_c_dpan_mmx +#define _op_copy_rel_pt_p_can_dpan_mmx _op_copy_pt_p_can_dpan_mmx +#define _op_copy_rel_pt_pas_can_dpan_mmx _op_copy_pt_pas_can_dpan_mmx +#define _op_copy_rel_pt_pan_can_dpan_mmx _op_copy_pt_pan_can_dpan_mmx +#define _op_copy_rel_pt_p_caa_dpan_mmx _op_copy_pt_p_caa_dpan_mmx +#define _op_copy_rel_pt_pas_caa_dpan_mmx _op_copy_pt_pas_caa_dpan_mmx +#define _op_copy_rel_pt_pan_caa_dpan_mmx _op_copy_pt_pan_caa_dpan_mmx + + +static void +init_copy_rel_pixel_color_pt_funcs_mmx(void) +{ + op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_p_c_dp_mmx; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_pas_c_dp_mmx; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_pan_c_dp_mmx; + op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_p_can_dp_mmx; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_pas_can_dp_mmx; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_pan_can_dp_mmx; + op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_p_caa_dp_mmx; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_pas_caa_dp_mmx; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_pan_caa_dp_mmx; + + op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_c_dpan_mmx; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_c_dpan_mmx; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_c_dpan_mmx; + op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_can_dpan_mmx; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_can_dpan_mmx; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_can_dpan_mmx; + op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_caa_dpan_mmx; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_caa_dpan_mmx; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_caa_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c new file mode 100644 index 0000000..f8a1e79 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c @@ -0,0 +1,238 @@ +/* copy pixel x color --> dst */ + +#ifdef BUILD_NEON +static void +_op_copy_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + // FIXME: neon-it + DATA32 *e; + UNROLL8_PLD_WHILE(d, l, e, + { + *d = MUL4_SYM(c, *s); + d++; + s++; + }); +} + + +static void +_op_copy_p_caa_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { // FIXME: neon-it + // FIXME: neon-it + DATA32 *e; + c = 1 + (c >> 24); + UNROLL8_PLD_WHILE(d, l, e, + { + *d = MUL_256(c, *s); + d++; + s++; + }); +} + + +#define _op_copy_pas_c_dp_neon _op_copy_p_c_dp_neon +#define _op_copy_pan_c_dp_neon _op_copy_p_c_dp_neon +#define _op_copy_p_can_dp_neon _op_copy_p_c_dp_neon +#define _op_copy_pas_can_dp_neon _op_copy_pas_c_dp_neon +#define _op_copy_pan_can_dp_neon _op_copy_pan_c_dp_neon +#define _op_copy_pas_caa_dp_neon _op_copy_p_caa_dp_neon +#define _op_copy_pan_caa_dp_neon _op_copy_p_caa_dp_neon + +#define _op_copy_p_c_dpan_neon _op_copy_p_c_dp_neon +#define _op_copy_pas_c_dpan_neon _op_copy_pas_c_dp_neon +#define _op_copy_pan_c_dpan_neon _op_copy_pan_c_dp_neon +#define _op_copy_p_can_dpan_neon _op_copy_p_can_dp_neon +#define _op_copy_pas_can_dpan_neon _op_copy_pas_can_dp_neon +#define _op_copy_pan_can_dpan_neon _op_copy_pan_can_dp_neon +#define _op_copy_p_caa_dpan_neon _op_copy_p_caa_dp_neon +#define _op_copy_pas_caa_dpan_neon _op_copy_pas_caa_dp_neon +#define _op_copy_pan_caa_dpan_neon _op_copy_pan_caa_dp_neon + +static void +init_copy_pixel_color_span_funcs_neon(void) +{ + op_copy_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_p_c_dp_neon; + op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_pas_c_dp_neon; + op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_pan_c_dp_neon; + op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_p_can_dp_neon; + op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pas_can_dp_neon; + op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pan_can_dp_neon; + op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_p_caa_dp_neon; + op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pas_caa_dp_neon; + op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pan_caa_dp_neon; + + op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_p_c_dpan_neon; + op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pas_c_dpan_neon; + op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pan_c_dpan_neon; + op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_p_can_dpan_neon; + op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pas_can_dpan_neon; + op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pan_can_dpan_neon; + op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_p_caa_dpan_neon; + op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pas_caa_dpan_neon; + op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pan_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_copy_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + *d = MUL4_SYM(c, s); +} + +#define _op_copy_pt_pas_c_dp_neon _op_copy_pt_p_c_dp_neon +#define _op_copy_pt_pan_c_dp_neon _op_copy_pt_p_c_dp_neon +#define _op_copy_pt_p_can_dp_neon _op_copy_pt_p_c_dp_neon +#define _op_copy_pt_pas_can_dp_neon _op_copy_pt_p_c_dp_neon +#define _op_copy_pt_pan_can_dp_neon _op_copy_pt_p_c_dp_neon +#define _op_copy_pt_p_caa_dp_neon _op_copy_pt_p_c_dp_neon +#define _op_copy_pt_pas_caa_dp_neon _op_copy_pt_p_c_dp_neon +#define _op_copy_pt_pan_caa_dp_neon _op_copy_pt_p_c_dp_neon + +#define _op_copy_pt_p_c_dpan_neon _op_copy_pt_p_c_dp_neon +#define _op_copy_pt_pas_c_dpan_neon _op_copy_pt_pas_c_dp_neon +#define _op_copy_pt_pan_c_dpan_neon _op_copy_pt_pan_c_dp_neon +#define _op_copy_pt_p_can_dpan_neon _op_copy_pt_p_can_dp_neon +#define _op_copy_pt_pas_can_dpan_neon _op_copy_pt_pas_can_dp_neon +#define _op_copy_pt_pan_can_dpan_neon _op_copy_pt_pan_can_dp_neon +#define _op_copy_pt_p_caa_dpan_neon _op_copy_pt_p_caa_dp_neon +#define _op_copy_pt_pas_caa_dpan_neon _op_copy_pt_pas_caa_dp_neon +#define _op_copy_pt_pan_caa_dpan_neon _op_copy_pt_pan_caa_dp_neon + +static void +init_copy_pixel_color_pt_funcs_neon(void) +{ + op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_p_c_dp_neon; + op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_pas_c_dp_neon; + op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_pan_c_dp_neon; + op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_p_can_dp_neon; + op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_pas_can_dp_neon; + op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_pan_can_dp_neon; + op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_p_caa_dp_neon; + op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_pas_caa_dp_neon; + op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_pan_caa_dp_neon; + + op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_p_c_dpan_neon; + op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_pas_c_dpan_neon; + op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_pan_c_dpan_neon; + op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_p_can_dpan_neon; + op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_pas_can_dpan_neon; + op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_pan_can_dpan_neon; + op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_p_caa_dpan_neon; + op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_pas_caa_dpan_neon; + op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_pan_caa_dpan_neon; +} +#endif + +/*-----*/ + +/* copy_rel pixel x color --> dst */ + +#ifdef BUILD_NEON +static void +_op_copy_rel_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + // FIXME: neon-it + DATA32 *e; + UNROLL8_PLD_WHILE(d, l, e, + { + DATA32 cs = MUL4_SYM(c, *s); + *d = MUL_SYM(*d >> 24, cs); + d++; + s++; + }); +} + + +#define _op_copy_rel_pas_c_dp_neon _op_copy_rel_p_c_dp_neon +#define _op_copy_rel_pan_c_dp_neon _op_copy_rel_p_c_dp_neon +#define _op_copy_rel_p_can_dp_neon _op_copy_rel_p_c_dp_neon +#define _op_copy_rel_pas_can_dp_neon _op_copy_rel_p_c_dp_neon +#define _op_copy_rel_pan_can_dp_neon _op_copy_rel_p_c_dp_neon +#define _op_copy_rel_p_caa_dp_neon _op_copy_rel_p_c_dp_neon +#define _op_copy_rel_pas_caa_dp_neon _op_copy_rel_p_c_dp_neon +#define _op_copy_rel_pan_caa_dp_neon _op_copy_rel_p_c_dp_neon + +#define _op_copy_rel_p_c_dpan_neon _op_copy_p_c_dpan_neon +#define _op_copy_rel_pas_c_dpan_neon _op_copy_pas_c_dpan_neon +#define _op_copy_rel_pan_c_dpan_neon _op_copy_pan_c_dpan_neon +#define _op_copy_rel_p_can_dpan_neon _op_copy_p_can_dpan_neon +#define _op_copy_rel_pas_can_dpan_neon _op_copy_pas_can_dpan_neon +#define _op_copy_rel_pan_can_dpan_neon _op_copy_pan_can_dpan_neon +#define _op_copy_rel_p_caa_dpan_neon _op_copy_p_caa_dpan_neon +#define _op_copy_rel_pas_caa_dpan_neon _op_copy_pas_caa_dpan_neon +#define _op_copy_rel_pan_caa_dpan_neon _op_copy_pan_caa_dpan_neon + +static void +init_copy_rel_pixel_color_span_funcs_neon(void) +{ + op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_p_c_dp_neon; + op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pas_c_dp_neon; + op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pan_c_dp_neon; + op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_p_can_dp_neon; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pas_can_dp_neon; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pan_can_dp_neon; + op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_p_caa_dp_neon; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pas_caa_dp_neon; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pan_caa_dp_neon; + + op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_p_c_dpan_neon; + op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pas_c_dpan_neon; + op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pan_c_dpan_neon; + op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_p_can_dpan_neon; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pas_can_dpan_neon; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pan_can_dpan_neon; + op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_p_caa_dpan_neon; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pas_caa_dpan_neon; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pan_caa_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_copy_rel_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = MUL4_SYM(c, s); + *d = MUL_SYM(*d >> 24, s); +} + + +#define _op_copy_rel_pt_pas_c_dp_neon _op_copy_rel_pt_p_c_dp_neon +#define _op_copy_rel_pt_pan_c_dp_neon _op_copy_rel_pt_p_c_dp_neon +#define _op_copy_rel_pt_p_can_dp_neon _op_copy_rel_pt_p_c_dp_neon +#define _op_copy_rel_pt_pas_can_dp_neon _op_copy_rel_pt_p_c_dp_neon +#define _op_copy_rel_pt_pan_can_dp_neon _op_copy_rel_pt_p_c_dp_neon +#define _op_copy_rel_pt_p_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon +#define _op_copy_rel_pt_pas_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon +#define _op_copy_rel_pt_pan_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon + +#define _op_copy_rel_pt_p_c_dpan_neon _op_copy_pt_p_c_dpan_neon +#define _op_copy_rel_pt_pas_c_dpan_neon _op_copy_pt_pas_c_dpan_neon +#define _op_copy_rel_pt_pan_c_dpan_neon _op_copy_pt_pan_c_dpan_neon +#define _op_copy_rel_pt_p_can_dpan_neon _op_copy_pt_p_can_dpan_neon +#define _op_copy_rel_pt_pas_can_dpan_neon _op_copy_pt_pas_can_dpan_neon +#define _op_copy_rel_pt_pan_can_dpan_neon _op_copy_pt_pan_can_dpan_neon +#define _op_copy_rel_pt_p_caa_dpan_neon _op_copy_pt_p_caa_dpan_neon +#define _op_copy_rel_pt_pas_caa_dpan_neon _op_copy_pt_pas_caa_dpan_neon +#define _op_copy_rel_pt_pan_caa_dpan_neon _op_copy_pt_pan_caa_dpan_neon + + +static void +init_copy_rel_pixel_color_pt_funcs_neon(void) +{ + op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_p_c_dp_neon; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_pas_c_dp_neon; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_pan_c_dp_neon; + op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_p_can_dp_neon; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_pas_can_dp_neon; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_pan_can_dp_neon; + op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_p_caa_dp_neon; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_pas_caa_dp_neon; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_pan_caa_dp_neon; + + op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_c_dpan_neon; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_c_dpan_neon; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_c_dpan_neon; + op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_can_dpan_neon; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_can_dpan_neon; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_can_dpan_neon; + op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_caa_dpan_neon; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_caa_dpan_neon; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_caa_dpan_neon; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c new file mode 100644 index 0000000..b03022b --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c @@ -0,0 +1,131 @@ +/* copy pixel --> dst */ + +#ifdef BUILD_MMX +static void +_op_copy_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l - 15; + for (; d < e; d+=16, s+=16) { + MOVE_16DWORDS_MMX(s, d); + } + e+=15; + for (; d < e; d++, s++) { + *d = *s; + } +} + +#define _op_copy_pan_dp_mmx _op_copy_p_dp_mmx +#define _op_copy_pas_dp_mmx _op_copy_p_dp_mmx + +#define _op_copy_p_dpan_mmx _op_copy_p_dp_mmx +#define _op_copy_pan_dpan_mmx _op_copy_pan_dp_mmx +#define _op_copy_pas_dpan_mmx _op_copy_pas_dp_mmx + +static void +init_copy_pixel_span_funcs_mmx(void) +{ + op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_p_dp_mmx; + op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pan_dp_mmx; + op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pas_dp_mmx; + + op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_p_dpan_mmx; + op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pan_dpan_mmx; + op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pas_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_copy_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { + *d = s; +} + +#define _op_copy_pt_pan_dp_mmx _op_copy_pt_p_dp_mmx +#define _op_copy_pt_pas_dp_mmx _op_copy_pt_p_dp_mmx + +#define _op_copy_pt_p_dpan_mmx _op_copy_pt_p_dp_mmx +#define _op_copy_pt_pan_dpan_mmx _op_copy_pt_pan_dp_mmx +#define _op_copy_pt_pas_dpan_mmx _op_copy_pt_pas_dp_mmx + +static void +init_copy_pixel_pt_funcs_mmx(void) +{ + op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_p_dp_mmx; + op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_pan_dp_mmx; + op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_pas_dp_mmx; + + op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_p_dpan_mmx; + op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pan_dpan_mmx; + op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pas_dpan_mmx; +} +#endif + +/*-----*/ + +/* copy_rel pixel --> dst */ + +#ifdef BUILD_MMX +static void +_op_copy_rel_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + for (; d < e; d++, s++) { + MOV_PA2R(*d, mm1) + MOV_P2R(*s, mm2, mm0) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + } +} + + +#define _op_copy_rel_pas_dp_mmx _op_copy_rel_p_dp_mmx +#define _op_copy_rel_pan_dp_mmx _op_copy_rel_p_dp_mmx + +#define _op_copy_rel_p_dpan_mmx _op_copy_p_dpan_mmx +#define _op_copy_rel_pan_dpan_mmx _op_copy_pan_dpan_mmx +#define _op_copy_rel_pas_dpan_mmx _op_copy_pas_dpan_mmx + +static void +init_copy_rel_pixel_span_funcs_mmx(void) +{ + op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_p_dp_mmx; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pan_dp_mmx; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pas_dp_mmx; + + op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_p_dpan_mmx; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pan_dpan_mmx; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pas_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_copy_rel_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + c = 1 + (*d >> 24); + MOV_A2R(c, mm1) + pxor_r2r(mm0, mm0); + MOV_P2R(s, mm2, mm0) + MUL4_256_R2R(mm2, mm1) + MOV_R2P(mm1, *d, mm0) +} + + +#define _op_copy_rel_pt_pan_dp_mmx _op_copy_rel_pt_p_dp_mmx +#define _op_copy_rel_pt_pas_dp_mmx _op_copy_rel_pt_p_dp_mmx + +#define _op_copy_rel_pt_p_dpan_mmx _op_copy_pt_p_dpan_mmx +#define _op_copy_rel_pt_pan_dpan_mmx _op_copy_pt_pan_dpan_mmx +#define _op_copy_rel_pt_pas_dpan_mmx _op_copy_pt_pas_dpan_mmx + +static void +init_copy_rel_pixel_pt_funcs_mmx(void) +{ + op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_p_dp_mmx; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pan_dp_mmx; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pas_dp_mmx; + + op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_dpan_mmx; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_dpan_mmx; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c new file mode 100644 index 0000000..48b5338 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c @@ -0,0 +1,150 @@ +/* copy pixel x mask --> dst */ + +#ifdef BUILD_C +static void +_op_copy_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e; + int color; + UNROLL8_PLD_WHILE(d, l, e, + { + color = *m; + switch(color) + { + case 0: + break; + case 255: + *d = *s; + break; + default: + color++; + *d = INTERP_256(color, *s, *d); + break; + } + m++; s++; d++; + }); +} + + +#define _op_copy_pan_mas_dp _op_copy_p_mas_dp +#define _op_copy_pas_mas_dp _op_copy_p_mas_dp + +#define _op_copy_p_mas_dpan _op_copy_p_mas_dp +#define _op_copy_pan_mas_dpan _op_copy_p_mas_dpan +#define _op_copy_pas_mas_dpan _op_copy_p_mas_dpan + +static void +init_copy_pixel_mask_span_funcs_c(void) +{ + op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_p_mas_dp; + op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pan_mas_dp; + op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pas_mas_dp; + + op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_p_mas_dpan; + op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pan_mas_dpan; + op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pas_mas_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_copy_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { + *d = INTERP_256(m + 1, s, *d); +} + +#define _op_copy_pt_pan_mas_dp _op_copy_pt_p_mas_dp +#define _op_copy_pt_pas_mas_dp _op_copy_pt_p_mas_dp + +#define _op_copy_pt_p_mas_dpan _op_copy_pt_p_mas_dp +#define _op_copy_pt_pan_mas_dpan _op_copy_pt_p_mas_dpan +#define _op_copy_pt_pas_mas_dpan _op_copy_pt_p_mas_dpan + +static void +init_copy_pixel_mask_pt_funcs_c(void) +{ + op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_p_mas_dp; + op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pan_mas_dp; + op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pas_mas_dp; + + op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_p_mas_dpan; + op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pan_mas_dpan; + op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pas_mas_dpan; +} +#endif + +/*-----*/ + +/* copy_rel pixel x mask --> dst */ + +#ifdef BUILD_C +static void +_op_copy_rel_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e; + int color; + UNROLL8_PLD_WHILE(d, l, e, + { + color = *m; + switch(color) + { + case 0: + break; + case 255: + *d = MUL_SYM(*d >> 24, *s); + break; + default: + c = MUL_SYM(*d >> 24, *s); + l++; + *d = INTERP_256(l, c, *d); + break; + } + m++; s++; d++; + }); +} + + +#define _op_copy_rel_pan_mas_dp _op_copy_rel_p_mas_dp +#define _op_copy_rel_pas_mas_dp _op_copy_rel_p_mas_dp + +#define _op_copy_rel_p_mas_dpan _op_copy_p_mas_dpan +#define _op_copy_rel_pan_mas_dpan _op_copy_pan_mas_dpan +#define _op_copy_rel_pas_mas_dpan _op_copy_pas_mas_dpan + +static void +init_copy_rel_pixel_mask_span_funcs_c(void) +{ + op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_p_mas_dp; + op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pan_mas_dp; + op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pas_mas_dp; + + op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_p_mas_dpan; + op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pan_mas_dpan; + op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pas_mas_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_copy_rel_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + c = MUL_SYM(*d >> 24, s); + *d = INTERP_256(m + 1, c, *d); +} + + +#define _op_copy_rel_pt_pan_mas_dp _op_copy_rel_pt_p_mas_dp +#define _op_copy_rel_pt_pas_mas_dp _op_copy_rel_pt_p_mas_dp + +#define _op_copy_rel_pt_p_mas_dpan _op_copy_pt_p_mas_dpan +#define _op_copy_rel_pt_pan_mas_dpan _op_copy_pt_pan_mas_dpan +#define _op_copy_rel_pt_pas_mas_dpan _op_copy_pt_pas_mas_dpan + +static void +init_copy_rel_pixel_mask_pt_funcs_c(void) +{ + op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_p_mas_dp; + op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pan_mas_dp; + op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pas_mas_dp; + + op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_p_mas_dpan; + op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pan_mas_dpan; + op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pas_mas_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c new file mode 100644 index 0000000..2511c41 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c @@ -0,0 +1,176 @@ +/* copy pixel x mask --> dst */ + +#ifdef BUILD_MMX +static void +_op_copy_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + while (d < e) { + l = *m; + switch(l) + { + case 0: + break; + case 255: + *d = *s; + break; + default: + l++; + MOV_A2R(l, mm3) + MOV_P2R(*s, mm2, mm0) + MOV_P2R(*d, mm1, mm0) + INTERP_256_R2R(mm3, mm2, mm1, mm5); + MOV_R2P(mm1, *d, mm0) + break; + } + m++; d++; + } +} + +#define _op_copy_pan_mas_dp_mmx _op_copy_p_mas_dp_mmx +#define _op_copy_pas_mas_dp_mmx _op_copy_p_mas_dp_mmx + +#define _op_copy_p_mas_dpan_mmx _op_copy_p_mas_dp_mmx +#define _op_copy_pan_mas_dpan_mmx _op_copy_p_mas_dpan_mmx +#define _op_copy_pas_mas_dpan_mmx _op_copy_p_mas_dpan_mmx + +static void +init_copy_pixel_mask_span_funcs_mmx(void) +{ + op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_p_mas_dp_mmx; + op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pan_mas_dp_mmx; + op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pas_mas_dp_mmx; + + op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_p_mas_dpan_mmx; + op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pan_mas_dpan_mmx; + op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pas_mas_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_copy_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + c = m + 1; + MOV_A2R(ALPHA_255, mm5) + MOV_A2R(c, mm3) + pxor_r2r(mm0, mm0); + MOV_P2R(s, mm2, mm0) + MOV_P2R(*d, mm1, mm0) + INTERP_256_R2R(mm3, mm2, mm1, mm5); + MOV_R2P(mm1, *d, mm0) +} + +#define _op_copy_pt_pan_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx +#define _op_copy_pt_pas_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx + +#define _op_copy_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dp_mmx +#define _op_copy_pt_pan_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx +#define _op_copy_pt_pas_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx + +static void +init_copy_pixel_mask_pt_funcs_mmx(void) +{ + op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_p_mas_dp_mmx; + op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pan_mas_dp_mmx; + op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pas_mas_dp_mmx; + + op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_p_mas_dpan_mmx; + op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pan_mas_dpan_mmx; + op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pas_mas_dpan_mmx; +} +#endif + +/*-----*/ + +/* copy_rel pixel x mask --> dst */ + +#ifdef BUILD_MMX +static void +_op_copy_rel_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + while (d < e) { + l = *m; + switch(l) + { + case 0: + break; + case 255: + MOV_P2R(*s, mm2, mm0) + MOV_PA2R(*d, mm1) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + break; + default: + l++; + MOV_P2R(*s, mm3, mm0) + MOV_P2R(*d, mm1, mm0) + MOV_RA2R(mm1, mm2) + MUL4_SYM_R2R(mm3, mm2, mm5) + MOV_A2R(l, mm3) + INTERP_256_R2R(mm3, mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + break; + } + m++; s++; d++; + } +} + +#define _op_copy_rel_pan_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx +#define _op_copy_rel_pas_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx + +#define _op_copy_rel_p_mas_dpan_mmx _op_copy_p_mas_dpan_mmx +#define _op_copy_rel_pan_mas_dpan_mmx _op_copy_pan_mas_dpan_mmx +#define _op_copy_rel_pas_mas_dpan_mmx _op_copy_pas_mas_dpan_mmx + +static void +init_copy_rel_pixel_mask_span_funcs_mmx(void) +{ + op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_p_mas_dp_mmx; + op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pan_mas_dp_mmx; + op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pas_mas_dp_mmx; + + op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_p_mas_dpan_mmx; + op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pan_mas_dpan_mmx; + op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pas_mas_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_copy_rel_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + c = m + 1; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + MOV_P2R(s, mm3, mm0) + MOV_P2R(*d, mm1, mm0) + MOV_RA2R(mm1, mm2) + MUL4_SYM_R2R(mm3, mm2, mm5) + MOV_A2R(c, mm3) + INTERP_256_R2R(mm3, mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) +} + + +#define _op_copy_rel_pt_pan_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx +#define _op_copy_rel_pt_pas_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx + +#define _op_copy_rel_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx +#define _op_copy_rel_pt_pan_mas_dpan_mmx _op_copy_pt_pan_mas_dpan_mmx +#define _op_copy_rel_pt_pas_mas_dpan_mmx _op_copy_pt_pas_mas_dpan_mmx + +static void +init_copy_rel_pixel_mask_pt_funcs_mmx(void) +{ + op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_p_mas_dp_mmx; + op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pan_mas_dp_mmx; + op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pas_mas_dp_mmx; + + op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_mas_dpan_mmx; + op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_mas_dpan_mmx; + op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_mas_dpan_mmx; +} +#endif + diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c new file mode 100644 index 0000000..e25f8f8 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c @@ -0,0 +1,151 @@ +/* copy pixel x mask --> dst */ + +#ifdef BUILD_NEON +static void +_op_copy_p_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + // FIXME: neon-it + DATA32 *e; + int color; + UNROLL8_PLD_WHILE(d, l, e, + { + color = *m; + switch(color) + { + case 0: + break; + case 255: + *d = *s; + break; + default: + color++; + *d = INTERP_256(color, *s, *d); + break; + } + m++; s++; d++; + }); +} + +#define _op_copy_pan_mas_dp_neon _op_copy_p_mas_dp_neon +#define _op_copy_pas_mas_dp_neon _op_copy_p_mas_dp_neon + +#define _op_copy_p_mas_dpan_neon _op_copy_p_mas_dp_neon +#define _op_copy_pan_mas_dpan_neon _op_copy_p_mas_dpan_neon +#define _op_copy_pas_mas_dpan_neon _op_copy_p_mas_dpan_neon + +static void +init_copy_pixel_mask_span_funcs_neon(void) +{ + op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_p_mas_dp_neon; + op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pan_mas_dp_neon; + op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pas_mas_dp_neon; + + op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_p_mas_dpan_neon; + op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pan_mas_dpan_neon; + op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pas_mas_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_copy_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + *d = INTERP_256(m + 1, s, *d); +} + +#define _op_copy_pt_pan_mas_dp_neon _op_copy_pt_p_mas_dp_neon +#define _op_copy_pt_pas_mas_dp_neon _op_copy_pt_p_mas_dp_neon + +#define _op_copy_pt_p_mas_dpan_neon _op_copy_pt_p_mas_dp_neon +#define _op_copy_pt_pan_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon +#define _op_copy_pt_pas_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon + +static void +init_copy_pixel_mask_pt_funcs_neon(void) +{ + op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_p_mas_dp_neon; + op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_pan_mas_dp_neon; + op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_pas_mas_dp_neon; + + op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_p_mas_dpan_neon; + op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pan_mas_dpan_neon; + op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pas_mas_dpan_neon; +} +#endif + +/*-----*/ + +/* copy_rel pixel x mask --> dst */ + +#ifdef BUILD_NEON +static void +_op_copy_rel_p_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + // FIXME: neon-it + DATA32 *e; + int color; + UNROLL8_PLD_WHILE(d, l, e, + { + color = *m; + switch(color) + { + case 0: + break; + case 255: + *d = MUL_SYM(*d >> 24, *s); + break; + default: + c = MUL_SYM(*d >> 24, *s); + l++; + *d = INTERP_256(l, c, *d); + break; + } + m++; s++; d++; + }); +} + +#define _op_copy_rel_pan_mas_dp_neon _op_copy_rel_p_mas_dp_neon +#define _op_copy_rel_pas_mas_dp_neon _op_copy_rel_p_mas_dp_neon + +#define _op_copy_rel_p_mas_dpan_neon _op_copy_p_mas_dpan_neon +#define _op_copy_rel_pan_mas_dpan_neon _op_copy_pan_mas_dpan_neon +#define _op_copy_rel_pas_mas_dpan_neon _op_copy_pas_mas_dpan_neon + +static void +init_copy_rel_pixel_mask_span_funcs_neon(void) +{ + op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_p_mas_dp_neon; + op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pan_mas_dp_neon; + op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pas_mas_dp_neon; + + op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_p_mas_dpan_neon; + op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pan_mas_dpan_neon; + op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pas_mas_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_copy_rel_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + c = MUL_SYM(*d >> 24, s); + *d = INTERP_256(m + 1, c, *d); +} + + +#define _op_copy_rel_pt_pan_mas_dp_neon _op_copy_rel_pt_p_mas_dp_neon +#define _op_copy_rel_pt_pas_mas_dp_neon _op_copy_rel_pt_p_mas_dp_neon + +#define _op_copy_rel_pt_p_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon +#define _op_copy_rel_pt_pan_mas_dpan_neon _op_copy_pt_pan_mas_dpan_neon +#define _op_copy_rel_pt_pas_mas_dpan_neon _op_copy_pt_pas_mas_dpan_neon + +static void +init_copy_rel_pixel_mask_pt_funcs_neon(void) +{ + op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_p_mas_dp_neon; + op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pan_mas_dp_neon; + op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pas_mas_dp_neon; + + op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_mas_dpan_neon; + op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_mas_dpan_neon; + op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_mas_dpan_neon; +} +#endif + diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c new file mode 100644 index 0000000..5b8bd60 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c @@ -0,0 +1,158 @@ +/* copy pixel --> dst */ + +#ifdef BUILD_NEON +static void +_op_copy_p_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { +//#define USENEON 1 +#ifndef USENEON + memcpy(d, s, l * sizeof(DATA32)); + return; +#else + DATA32 *e; + e = d + l - 23; + if (e > d) + { + int dl; + + asm volatile + (".fpu neon \n\t" + "_op_copy_p_dp_neon_asmloop: \n\t" + "pld [%[s], #192] \n\t" // preload 256 bytes ahead + "pld [%[s], #320] \n\t" // preload 320 bytes ahead + "vld1.32 {d0-d3}, [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned + "vld1.32 {d4-d7} , [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned + "vld1.32 {d8-d11}, [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned + "vst1.32 {d0-d3}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned + "vst1.32 {d4-d7}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned + "vst1.32 {d8-d11}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned + "cmp %[e], %[d] \n\t" // compare current and end ptr + "bgt _op_copy_p_dp_neon_asmloop \n\t" + : /*out*/ + : /*in */ [s] "r" (s), [e] "r" (e), [d] "r" (d) + : /*clobber*/ + "q0", "q1", "q2","q3", "q4", "q5", "q6", + "d0", "d1", "d2", "d3", + "d4", "d5", "d6", "d7", + "d8", "d9", "d10", "d11", + "memory" // clobbered + ); + dl = l % 24; // dl is how many pixels at end that is not a multiple of 24 + l = l - dl; // jump to there at the end of the run? + s = s + l; + d = d + l; + } + e += 23; + for (;d < e; d++, s++) *d = *s; +#endif +} + +#define _op_copy_pan_dp_neon _op_copy_p_dp_neon +#define _op_copy_pas_dp_neon _op_copy_p_dp_neon + +#define _op_copy_p_dpan_neon _op_copy_p_dp_neon +#define _op_copy_pan_dpan_neon _op_copy_pan_dp_neon +#define _op_copy_pas_dpan_neon _op_copy_pas_dp_neon + +static void +init_copy_pixel_span_funcs_neon(void) +{ + op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_p_dp_neon; + op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pan_dp_neon; + op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pas_dp_neon; + + op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_p_dpan_neon; + op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pan_dpan_neon; + op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pas_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_copy_pt_p_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { + *d = s; +} + +#define _op_copy_pt_pan_dp_neon _op_copy_pt_p_dp_neon +#define _op_copy_pt_pas_dp_neon _op_copy_pt_p_dp_neon + +#define _op_copy_pt_p_dpan_neon _op_copy_pt_p_dp_neon +#define _op_copy_pt_pan_dpan_neon _op_copy_pt_pan_dp_neon +#define _op_copy_pt_pas_dpan_neon _op_copy_pt_pas_dp_neon + +static void +init_copy_pixel_pt_funcs_neon(void) +{ + op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_p_dp_neon; + op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_pan_dp_neon; + op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_pas_dp_neon; + + op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_p_dpan_neon; + op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pan_dpan_neon; + op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pas_dpan_neon; +} +#endif + +/*-----*/ + +/* copy_rel pixel --> dst */ + +#ifdef BUILD_NEON +static void +_op_copy_rel_p_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + // FIXME: neon-it + DATA32 *e; + UNROLL8_PLD_WHILE(d, l, e, + { + *d = MUL_SYM(*d >> 24, c); + d++; + }); +} + + +#define _op_copy_rel_pas_dp_neon _op_copy_rel_p_dp_neon +#define _op_copy_rel_pan_dp_neon _op_copy_rel_p_dp_neon + +#define _op_copy_rel_p_dpan_neon _op_copy_p_dpan_neon +#define _op_copy_rel_pan_dpan_neon _op_copy_pan_dpan_neon +#define _op_copy_rel_pas_dpan_neon _op_copy_pas_dpan_neon + +static void +init_copy_rel_pixel_span_funcs_neon(void) +{ + op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_p_dp_neon; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pan_dp_neon; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pas_dp_neon; + + op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_p_dpan_neon; + op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pan_dpan_neon; + op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pas_dpan_neon; +} +#endif + +#ifdef BUILD_NEON +static void +_op_copy_rel_pt_p_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = 1 + (*d >> 24); + *d = MUL_256(s, c); +} + + +#define _op_copy_rel_pt_pan_dp_neon _op_copy_rel_pt_p_dp_neon +#define _op_copy_rel_pt_pas_dp_neon _op_copy_rel_pt_p_dp_neon + +#define _op_copy_rel_pt_p_dpan_neon _op_copy_pt_p_dpan_neon +#define _op_copy_rel_pt_pan_dpan_neon _op_copy_pt_pan_dpan_neon +#define _op_copy_rel_pt_pas_dpan_neon _op_copy_pt_pas_dpan_neon + +static void +init_copy_rel_pixel_pt_funcs_neon(void) +{ + op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_p_dp_neon; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pan_dp_neon; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pas_dp_neon; + + op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_dpan_neon; + op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_dpan_neon; + op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_dpan_neon; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c b/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c new file mode 100644 index 0000000..4575aee --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c @@ -0,0 +1,675 @@ +#include "evas_common.h" +#include "evas_blend_private.h" + +static RGBA_Gfx_Func op_copy_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +static RGBA_Gfx_Pt_Func op_copy_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +static void op_copy_init(void); +static void op_copy_shutdown(void); + +static RGBA_Gfx_Func op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); + +static RGBA_Gfx_Pt_Func op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_copy_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); + +static RGBA_Gfx_Compositor _composite_copy = { "copy", + op_copy_init, op_copy_shutdown, + op_copy_pixel_span_get, op_copy_color_span_get, + op_copy_pixel_color_span_get, op_copy_mask_color_span_get, + op_copy_pixel_mask_span_get, + op_copy_pixel_pt_get, op_copy_color_pt_get, + op_copy_pixel_color_pt_get, op_copy_mask_color_pt_get, + op_copy_pixel_mask_pt_get + }; + +RGBA_Gfx_Compositor * +evas_common_gfx_compositor_copy_get(void) +{ + return &(_composite_copy); +} + + +static RGBA_Gfx_Func op_copy_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +static RGBA_Gfx_Pt_Func op_copy_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +static void op_copy_rel_init(void); +static void op_copy_rel_shutdown(void); + +static RGBA_Gfx_Func op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); + +static RGBA_Gfx_Pt_Func op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); +/* XXX: doesn't exist +static RGBA_Gfx_Pt_Func op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst); + */ +static RGBA_Gfx_Pt_Func op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); + +static RGBA_Gfx_Compositor _composite_copy_rel = { "copy_rel", + op_copy_rel_init, op_copy_rel_shutdown, + op_copy_rel_pixel_span_get, op_copy_rel_color_span_get, + op_copy_rel_pixel_color_span_get, op_copy_rel_mask_color_span_get, + op_copy_rel_pixel_mask_span_get, + op_copy_rel_pixel_pt_get, op_copy_color_pt_get, + op_copy_rel_pixel_color_pt_get, op_copy_rel_mask_color_pt_get, + op_copy_rel_pixel_mask_pt_get + }; + +RGBA_Gfx_Compositor * +evas_common_gfx_compositor_copy_rel_get(void) +{ + return &(_composite_copy_rel); +} + + +# include "./evas_op_copy/op_copy_pixel_.c" +# include "./evas_op_copy/op_copy_color_.c" +# include "./evas_op_copy/op_copy_pixel_color_.c" +# include "./evas_op_copy/op_copy_pixel_mask_.c" +# include "./evas_op_copy/op_copy_mask_color_.c" +//# include "./evas_op_copy/op_copy_pixel_mask_color_.c" + +# include "./evas_op_copy/op_copy_pixel_i386.c" +# include "./evas_op_copy/op_copy_color_i386.c" +# include "./evas_op_copy/op_copy_pixel_color_i386.c" +# include "./evas_op_copy/op_copy_pixel_mask_i386.c" +# include "./evas_op_copy/op_copy_mask_color_i386.c" +//# include "./evas_op_copy/op_copy_pixel_mask_color_i386.c" + +# include "./evas_op_copy/op_copy_pixel_neon.c" +# include "./evas_op_copy/op_copy_color_neon.c" +# include "./evas_op_copy/op_copy_pixel_color_neon.c" +# include "./evas_op_copy/op_copy_pixel_mask_neon.c" +# include "./evas_op_copy/op_copy_mask_color_neon.c" +//# include "./evas_op_copy/op_copy_pixel_mask_color_neon.c" + + +static void +op_copy_init(void) +{ + memset(op_copy_span_funcs, 0, sizeof(op_copy_span_funcs)); + memset(op_copy_pt_funcs, 0, sizeof(op_copy_pt_funcs)); +#ifdef BUILD_MMX + init_copy_pixel_span_funcs_mmx(); + init_copy_pixel_color_span_funcs_mmx(); + init_copy_pixel_mask_span_funcs_mmx(); + init_copy_color_span_funcs_mmx(); + init_copy_mask_color_span_funcs_mmx(); + + init_copy_pixel_pt_funcs_mmx(); + init_copy_pixel_color_pt_funcs_mmx(); + init_copy_pixel_mask_pt_funcs_mmx(); + init_copy_color_pt_funcs_mmx(); + init_copy_mask_color_pt_funcs_mmx(); +#endif +#ifdef BUILD_NEON + init_copy_pixel_span_funcs_neon(); + init_copy_pixel_color_span_funcs_neon(); + init_copy_pixel_mask_span_funcs_neon(); + init_copy_color_span_funcs_neon(); + init_copy_mask_color_span_funcs_neon(); + + init_copy_pixel_pt_funcs_neon(); + init_copy_pixel_color_pt_funcs_neon(); + init_copy_pixel_mask_pt_funcs_neon(); + init_copy_color_pt_funcs_neon(); + init_copy_mask_color_pt_funcs_neon(); +#endif +#ifdef BUILD_C + init_copy_pixel_span_funcs_c(); + init_copy_pixel_color_span_funcs_c(); + init_copy_pixel_mask_span_funcs_c(); + init_copy_color_span_funcs_c(); + init_copy_mask_color_span_funcs_c(); + + init_copy_pixel_pt_funcs_c(); + init_copy_pixel_color_pt_funcs_c(); + init_copy_pixel_mask_pt_funcs_c(); + init_copy_color_pt_funcs_c(); + init_copy_mask_color_pt_funcs_c(); +#endif +} + +static void +op_copy_shutdown(void) +{ +} + +static RGBA_Gfx_Func +copy_gfx_span_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_copy_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_NEON + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) + { + cpu = CPU_NEON; + func = op_copy_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_copy_span_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Func +op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + return copy_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if (src && src->cache_entry.flags.alpha) + s = SP; + return copy_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +copy_gfx_pt_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Pt_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_copy_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_NEON + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) + { + cpu = CPU_NEON; + func = op_copy_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_copy_pt_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Pt_Func +op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + { + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_copy_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src_flags.alpha) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + return copy_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if (src_flags.alpha) + s = SP; + return copy_gfx_pt_func_cpu(s, m, c, d); +} + + +static void +op_copy_rel_init(void) +{ + memset(op_copy_rel_span_funcs, 0, sizeof(op_copy_rel_span_funcs)); + memset(op_copy_rel_pt_funcs, 0, sizeof(op_copy_rel_pt_funcs)); +#ifdef BUILD_MMX + init_copy_rel_pixel_span_funcs_mmx(); + init_copy_rel_pixel_color_span_funcs_mmx(); + init_copy_rel_pixel_mask_span_funcs_mmx(); + init_copy_rel_color_span_funcs_mmx(); + init_copy_rel_mask_color_span_funcs_mmx(); + + init_copy_rel_pixel_pt_funcs_mmx(); + init_copy_rel_pixel_color_pt_funcs_mmx(); + init_copy_rel_pixel_mask_pt_funcs_mmx(); + init_copy_rel_color_pt_funcs_mmx(); + init_copy_rel_mask_color_pt_funcs_mmx(); +#endif +#ifdef BUILD_NEON + init_copy_rel_pixel_span_funcs_neon(); + init_copy_rel_pixel_color_span_funcs_neon(); + init_copy_rel_pixel_mask_span_funcs_neon(); + init_copy_rel_color_span_funcs_neon(); + init_copy_rel_mask_color_span_funcs_neon(); + + init_copy_rel_pixel_pt_funcs_neon(); + init_copy_rel_pixel_color_pt_funcs_neon(); + init_copy_rel_pixel_mask_pt_funcs_neon(); + init_copy_rel_color_pt_funcs_neon(); + init_copy_rel_mask_color_pt_funcs_neon(); +#endif +#ifdef BUILD_C + init_copy_rel_pixel_span_funcs_c(); + init_copy_rel_pixel_color_span_funcs_c(); + init_copy_rel_pixel_mask_span_funcs_c(); + init_copy_rel_color_span_funcs_c(); + init_copy_rel_mask_color_span_funcs_c(); + + init_copy_rel_pixel_pt_funcs_c(); + init_copy_rel_pixel_color_pt_funcs_c(); + init_copy_rel_pixel_mask_pt_funcs_c(); + init_copy_rel_color_pt_funcs_c(); + init_copy_rel_mask_color_pt_funcs_c(); +#endif +} + +static void +op_copy_rel_shutdown(void) +{ +} + +static RGBA_Gfx_Func +copy_rel_gfx_span_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_copy_rel_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_NEON + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) + { + cpu = CPU_NEON; + func = op_copy_rel_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_copy_rel_span_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Func +op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + return copy_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if (src && src->cache_entry.flags.alpha) + s = SP; + return copy_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +copy_rel_gfx_pt_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Pt_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_NEON + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) + { + cpu = CPU_NEON; + func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Pt_Func +op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_rel_gfx_pt_func_cpu(s, m, c, d); +} + +/* XXX: not used +static RGBA_Gfx_Pt_Func +op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_rel_gfx_pt_func_cpu(s, m, c, d); +} +*/ + +static RGBA_Gfx_Pt_Func +op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src_flags.alpha) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return copy_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if ((col >> 24) < 255) + c = SC; + if (col == ((col >> 24) * 0x01010101)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + return copy_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if (src_flags.alpha) + s = SP; + return copy_rel_gfx_pt_func_cpu(s, m, c, d); +} diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am new file mode 100644 index 0000000..47eefd2 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am @@ -0,0 +1,13 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ +op_mask_color_.c \ +op_mask_color_i386.c \ +op_mask_mask_color_.c \ +op_mask_mask_color_i386.c \ +op_mask_pixel_.c \ +op_mask_pixel_color_.c \ +op_mask_pixel_color_i386.c \ +op_mask_pixel_i386.c \ +op_mask_pixel_mask_.c \ +op_mask_pixel_mask_i386.c diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in new file mode 100644 index 0000000..0ccd7f3 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in @@ -0,0 +1,543 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/engines/common/evas_op_mask +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = \ +op_mask_color_.c \ +op_mask_color_i386.c \ +op_mask_mask_color_.c \ +op_mask_mask_color_i386.c \ +op_mask_pixel_.c \ +op_mask_pixel_color_.c \ +op_mask_pixel_color_i386.c \ +op_mask_pixel_i386.c \ +op_mask_pixel_mask_.c \ +op_mask_pixel_mask_i386.c + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mask/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mask/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c new file mode 100644 index 0000000..c95b125 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c @@ -0,0 +1,49 @@ +/* mask color --> dst */ + +#ifdef BUILD_C +static void +_op_mask_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + c = 1 + (c >> 24); + for (; d < e; d++) { + *d = MUL_256(c, *d); + } +} + +#define _op_mask_caa_dp _op_mask_c_dp + +#define _op_mask_c_dpan _op_mask_c_dp +#define _op_mask_caa_dpan _op_mask_caa_dp + +static void +init_mask_color_span_funcs_c(void) +{ + op_mask_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mask_c_dp; + op_mask_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mask_caa_dp; + + op_mask_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mask_c_dpan; + op_mask_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_mask_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + *d = MUL_SYM(c >> 24, *d); +} + +#define _op_mask_pt_caa_dp _op_mask_pt_c_dp + +#define _op_mask_pt_c_dpan _op_mask_pt_c_dp +#define _op_mask_pt_caa_dpan _op_mask_pt_caa_dp + +static void +init_mask_color_pt_funcs_c(void) +{ + op_mask_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mask_pt_c_dp; + op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_caa_dp; + + op_mask_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_c_dpan; + op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_caa_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c new file mode 100644 index 0000000..9635eac --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c @@ -0,0 +1,58 @@ +/* mask color --> dst */ + +#ifdef BUILD_MMX +static void +_op_mask_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + c = 1 + (c >> 24); + MOV_A2R(c, mm2) + pxor_r2r(mm0, mm0); + for (; d < e; d++) { + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm2, mm1) + MOV_R2P(mm1, *d, mm0) + } +} + +#define _op_mask_caa_dp_mmx _op_mask_c_dp_mmx + +#define _op_mask_c_dpan_mmx _op_mask_c_dp_mmx +#define _op_mask_caa_dpan_mmx _op_mask_caa_dp_mmx + +static void +init_mask_color_span_funcs_mmx(void) +{ + op_mask_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mask_c_dp_mmx; + op_mask_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mask_caa_dp_mmx; + + op_mask_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mask_c_dpan_mmx; + op_mask_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mask_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_mask_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + c = 1 + (c >> 24); + MOV_A2R(c, mm2) + pxor_r2r(mm0, mm0); + MOV_P2R(*d, mm1, mm0) + MUL4_256_R2R(mm2, mm1) + MOV_R2P(mm1, *d, mm0) +} + +#define _op_mask_pt_caa_dp_mmx _op_mask_pt_c_dp_mmx + +#define _op_mask_pt_c_dpan_mmx _op_mask_pt_c_dp_mmx +#define _op_mask_pt_caa_dpan_mmx _op_mask_pt_caa_dp_mmx + +static void +init_mask_color_pt_funcs_mmx(void) +{ + op_mask_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mask_pt_c_dp_mmx; + op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mask_pt_caa_dp_mmx; + + op_mask_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mask_pt_c_dpan_mmx; + op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mask_pt_caa_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c new file mode 100644 index 0000000..c75edb4 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c @@ -0,0 +1,63 @@ +/* mask mask x color -> dst */ + +#ifdef BUILD_C +static void +_op_mask_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + c = 1 + (c >> 24); + while (d < e) { + l = *m; + switch(l) + { + case 0: + break; + case 255: + *d = MUL_256(c, *d); + break; + default: + l = 256 - (((257 - c) * l) >> 8); + *d = MUL_256(l, *d); + break; + } + m++; d++; + } +} + +#define _op_mask_mas_caa_dp _op_mask_mas_c_dp + +#define _op_mask_mas_c_dpan _op_mask_mas_c_dp +#define _op_mask_mas_caa_dpan _op_mask_mas_caa_dp + +static void +init_mask_mask_color_span_funcs_c(void) +{ + op_mask_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mask_mas_c_dp; + op_mask_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mask_mas_caa_dp; + + op_mask_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mask_mas_c_dpan; + op_mask_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mask_mas_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_mask_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { + c = 256 - (((256 - (c >> 24)) * m) >> 8); + *d = MUL_256(c, *d); +} + +#define _op_mask_pt_mas_caa_dp _op_mask_pt_mas_c_dp + +#define _op_mask_pt_mas_c_dpan _op_mask_pt_mas_c_dp +#define _op_mask_pt_mas_caa_dpan _op_mask_pt_mas_caa_dp + +static void +init_mask_mask_color_pt_funcs_c(void) +{ + op_mask_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mask_pt_mas_c_dp; + op_mask_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mask_pt_mas_caa_dp; + + op_mask_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mask_pt_mas_c_dpan; + op_mask_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mask_pt_mas_caa_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c new file mode 100644 index 0000000..9427dbf --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c @@ -0,0 +1,13 @@ +/* mask mask x color -> dst */ + +#ifdef BUILD_MMX +static void +init_mask_mask_color_span_funcs_mmx(void) +{} +#endif + +#ifdef BUILD_MMX +static void +init_mask_mask_color_pt_funcs_mmx(void) +{} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c new file mode 100644 index 0000000..ea7982b --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c @@ -0,0 +1,48 @@ +/* mask pixel --> dst */ + +#ifdef BUILD_C +static void +_op_mask_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + for (; d < e; d++, s++) { + *d = MUL_SYM(*s >> 24, *d); + } +} + +#define _op_mask_pas_dp _op_mask_p_dp + +#define _op_mask_p_dpan _op_mask_p_dp +#define _op_mask_pas_dpan _op_mask_pas_dp + +static void +init_mask_pixel_span_funcs_c(void) +{ + op_mask_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_p_dp; + op_mask_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pas_dp; + + op_mask_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_p_dpan; + op_mask_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pas_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_mask_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { + *d = MUL_SYM(s >> 24, *d); +} + +#define _op_mask_pt_pas_dp _op_mask_pt_p_dp + +#define _op_mask_pt_p_dpan _op_mask_pt_p_dp +#define _op_mask_pt_pas_dpan _op_mask_pt_pas_dp + +static void +init_mask_pixel_pt_funcs_c(void) +{ + op_mask_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_p_dp; + op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_pas_dp; + + op_mask_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_p_dpan; + op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_pas_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c new file mode 100644 index 0000000..18d1cab --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c @@ -0,0 +1,100 @@ +/* mask pixel x color --> dst */ + +#ifdef BUILD_C +static void +_op_mask_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + l = 1 + (c >> 24); + while (d < e) { + c = 1 + ((l * (*s >> 24)) >> 8); + *d = MUL_256(c, *d); + s++; d++; + } +} + +#define _op_mask_pas_c_dp _op_mask_p_c_dp +#define _op_mask_pan_c_dp _op_mask_p_c_dp +#define _op_mask_p_can_dp _op_mask_p_c_dp +#define _op_mask_pas_can_dp _op_mask_p_c_dp +#define _op_mask_p_caa_dp _op_mask_p_c_dp +#define _op_mask_pas_caa_dp _op_mask_p_c_dp +#define _op_mask_pan_caa_dp _op_mask_p_c_dp + +#define _op_mask_p_c_dpan _op_mask_p_c_dp +#define _op_mask_pas_c_dpan _op_mask_p_c_dp +#define _op_mask_pan_c_dpan _op_mask_p_c_dp +#define _op_mask_p_can_dpan _op_mask_p_c_dp +#define _op_mask_pas_can_dpan _op_mask_p_c_dp +#define _op_mask_p_caa_dpan _op_mask_p_c_dp +#define _op_mask_pas_caa_dpan _op_mask_p_c_dp +#define _op_mask_pan_caa_dpan _op_mask_p_c_dp + +static void +init_mask_pixel_color_span_funcs_c(void) +{ + op_mask_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mask_p_c_dp; + op_mask_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mask_pas_c_dp; + op_mask_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mask_pan_c_dp; + op_mask_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mask_p_can_dp; + op_mask_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mask_pas_can_dp; + op_mask_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mask_p_caa_dp; + op_mask_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mask_pas_caa_dp; + op_mask_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mask_pan_caa_dp; + + op_mask_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mask_p_c_dpan; + op_mask_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mask_pas_c_dpan; + op_mask_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mask_pan_c_dpan; + op_mask_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_p_can_dpan; + op_mask_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pas_can_dpan; + op_mask_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_p_caa_dpan; + op_mask_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pas_caa_dpan; + op_mask_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pan_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_mask_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + c = 1 + ((((c >> 24) * (s >> 24)) + 255) >> 8); + *d = MUL_256(c, *d); +} + +#define _op_mask_pt_pas_c_dp _op_mask_pt_p_c_dp +#define _op_mask_pt_pan_c_dp _op_mask_pt_p_c_dp +#define _op_mask_pt_p_can_dp _op_mask_pt_p_c_dp +#define _op_mask_pt_pas_can_dp _op_mask_pt_p_c_dp +#define _op_mask_pt_p_caa_dp _op_mask_pt_p_c_dp +#define _op_mask_pt_pas_caa_dp _op_mask_pt_p_c_dp +#define _op_mask_pt_pan_caa_dp _op_mask_pt_p_c_dp + +#define _op_mask_pt_p_c_dpan _op_mask_pt_p_c_dp +#define _op_mask_pt_pas_c_dpan _op_mask_pt_p_c_dp +#define _op_mask_pt_pan_c_dpan _op_mask_pt_p_c_dp +#define _op_mask_pt_p_can_dpan _op_mask_pt_p_c_dp +#define _op_mask_pt_pas_can_dpan _op_mask_pt_p_c_dp +#define _op_mask_pt_p_caa_dpan _op_mask_pt_p_c_dp +#define _op_mask_pt_pas_caa_dpan _op_mask_pt_p_c_dp +#define _op_mask_pt_pan_caa_dpan _op_mask_pt_p_c_dp + +static void +init_mask_pixel_color_pt_funcs_c(void) +{ + op_mask_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mask_pt_p_c_dp; + op_mask_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mask_pt_pas_c_dp; + op_mask_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mask_pt_pan_c_dp; + op_mask_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mask_pt_p_can_dp; + op_mask_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mask_pt_pas_can_dp; + op_mask_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_p_caa_dp; + op_mask_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_pas_caa_dp; + op_mask_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_pan_caa_dp; + + op_mask_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_p_c_dpan; + op_mask_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_pas_c_dpan; + op_mask_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_pan_c_dpan; + op_mask_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pt_p_can_dpan; + op_mask_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pt_pas_can_dpan; + op_mask_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_p_caa_dpan; + op_mask_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_pas_caa_dpan; + op_mask_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_pan_caa_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c new file mode 100644 index 0000000..0afcb71 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c @@ -0,0 +1,13 @@ +/* mask pixel x color --> dst */ + +#ifdef BUILD_MMX +static void +init_mask_pixel_color_span_funcs_mmx(void) +{ } +#endif + +#ifdef BUILD_MMX +static void +init_mask_pixel_color_pt_funcs_mmx(void) +{ } +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c new file mode 100644 index 0000000..a1c09af --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c @@ -0,0 +1,58 @@ +/* mask pixel --> dst */ + +#ifdef BUILD_MMX +static void +_op_mask_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + for (; d < e; d++) { + MOV_P2R(*d, mm1, mm0) + MOV_PA2R(*s, mm2) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + } +} + +#define _op_mask_pas_dp_mmx _op_mask_p_dp_mmx + +#define _op_mask_p_dpan_mmx _op_mask_p_dp_mmx +#define _op_mask_pas_dpan_mmx _op_mask_pas_dp_mmx + +static void +init_mask_pixel_span_funcs_mmx(void) +{ + op_mask_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mask_p_dp_mmx; + op_mask_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pas_dp_mmx; + + op_mask_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_p_dpan_mmx; + op_mask_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pas_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_mask_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + MOV_P2R(*d, mm1, mm0) + MOV_PA2R(s, mm2) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) +} + +#define _op_mask_pt_pas_dp_mmx _op_mask_pt_p_dp_mmx + +#define _op_mask_pt_p_dpan_mmx _op_mask_pt_p_dp_mmx +#define _op_mask_pt_pas_dpan_mmx _op_mask_pt_pas_dp_mmx + +static void +init_mask_pixel_pt_funcs_mmx(void) +{ + op_mask_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pt_p_dp_mmx; + op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pt_pas_dp_mmx; + + op_mask_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pt_p_dpan_mmx; + op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pt_pas_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c new file mode 100644 index 0000000..b948aa6 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c @@ -0,0 +1,62 @@ +/* mask pixel x mask --> dst */ + +#ifdef BUILD_C +static void +_op_mask_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + while (d < e) { + l = *m; + switch(l) + { + case 0: + break; + case 255: + *d = MUL_SYM(*s >> 24, *d); + break; + default: + l = 256 - (((256 - (*s >> 24)) * l) >> 8); + *d = MUL_256(l, *d); + break; + } + m++; s++; d++; + } +} + +#define _op_mask_pas_mas_dp _op_mask_p_mas_dp + +#define _op_mask_p_mas_dpan _op_mask_p_mas_dp +#define _op_mask_pas_mas_dpan _op_mask_pas_mas_dp + +static void +init_mask_pixel_mask_span_funcs_c(void) +{ + op_mask_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mask_p_mas_dp; + op_mask_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mask_pas_mas_dp; + + op_mask_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_p_mas_dpan; + op_mask_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pas_mas_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_mask_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { + s = 256 - (((256 - (s >> 24)) * m) >> 8); + *d = MUL_256(s, *d); +} + +#define _op_mask_pt_pas_mas_dp _op_mask_pt_p_mas_dp + +#define _op_mask_pt_p_mas_dpan _op_mask_pt_p_mas_dp +#define _op_mask_pt_pas_mas_dpan _op_mask_pt_pas_mas_dp + +static void +init_mask_pixel_mask_pt_funcs_c(void) +{ + op_mask_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mask_pt_p_mas_dp; + op_mask_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mask_pt_pas_mas_dp; + + op_mask_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pt_p_mas_dpan; + op_mask_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pt_pas_mas_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c new file mode 100644 index 0000000..c5dd8da --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c @@ -0,0 +1,13 @@ +/* mask pixel x mask --> dst */ + +#ifdef BUILD_MMX +static void +init_mask_pixel_mask_span_funcs_mmx(void) +{ } +#endif + +#ifdef BUILD_MMX +static void +init_mask_pixel_mask_pt_funcs_mmx(void) +{ } +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c b/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c new file mode 100644 index 0000000..bbe497a --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c @@ -0,0 +1,309 @@ +#include "evas_common.h" + +static RGBA_Gfx_Func op_mask_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +static RGBA_Gfx_Pt_Func op_mask_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +static void op_mask_init(void); +static void op_mask_shutdown(void); + +static RGBA_Gfx_Func op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); + +static RGBA_Gfx_Pt_Func op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_mask_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); + +static RGBA_Gfx_Compositor _composite_mask = { "mask", + op_mask_init, op_mask_shutdown, + op_mask_pixel_span_get, op_mask_color_span_get, + op_mask_pixel_color_span_get, op_mask_mask_color_span_get, + op_mask_pixel_mask_span_get, + op_mask_pixel_pt_get, op_mask_color_pt_get, + op_mask_pixel_color_pt_get, op_mask_mask_color_pt_get, + op_mask_pixel_mask_pt_get + }; + +RGBA_Gfx_Compositor * +evas_common_gfx_compositor_mask_get(void) +{ + return &(_composite_mask); +} + + +# include "./evas_op_mask/op_mask_pixel_.c" +# include "./evas_op_mask/op_mask_color_.c" +# include "./evas_op_mask/op_mask_pixel_color_.c" +# include "./evas_op_mask/op_mask_pixel_mask_.c" +# include "./evas_op_mask/op_mask_mask_color_.c" +//# include "./evas_op_mask/op_mask_pixel_mask_color_.c" + +# include "./evas_op_mask/op_mask_pixel_i386.c" +# include "./evas_op_mask/op_mask_color_i386.c" +# include "./evas_op_mask/op_mask_pixel_color_i386.c" +# include "./evas_op_mask/op_mask_pixel_mask_i386.c" +# include "./evas_op_mask/op_mask_mask_color_i386.c" +//# include "./evas_op_mask/op_mask_pixel_mask_color_i386.c" + + +static void +op_mask_init(void) +{ + memset(op_mask_span_funcs, 0, sizeof(op_mask_span_funcs)); + memset(op_mask_pt_funcs, 0, sizeof(op_mask_pt_funcs)); +#ifdef BUILD_MMX + init_mask_pixel_span_funcs_mmx(); + init_mask_pixel_color_span_funcs_mmx(); + init_mask_pixel_mask_span_funcs_mmx(); + init_mask_color_span_funcs_mmx(); + init_mask_mask_color_span_funcs_mmx(); + + init_mask_pixel_pt_funcs_mmx(); + init_mask_pixel_color_pt_funcs_mmx(); + init_mask_pixel_mask_pt_funcs_mmx(); + init_mask_color_pt_funcs_mmx(); + init_mask_mask_color_pt_funcs_mmx(); +#endif +#ifdef BUILD_C + init_mask_pixel_span_funcs_c(); + init_mask_pixel_color_span_funcs_c(); + init_mask_pixel_mask_span_funcs_c(); + init_mask_color_span_funcs_c(); + init_mask_mask_color_span_funcs_c(); + + init_mask_pixel_pt_funcs_c(); + init_mask_pixel_color_pt_funcs_c(); + init_mask_pixel_mask_pt_funcs_c(); + init_mask_color_pt_funcs_c(); + init_mask_mask_color_pt_funcs_c(); +#endif +} + +static void +op_mask_shutdown(void) +{ +} + +static RGBA_Gfx_Func +mask_gfx_span_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_mask_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_mask_span_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Func +op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mask_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mask_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mask_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + return mask_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if (src && src->cache_entry.flags.alpha) + s = SP; + return mask_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +mask_gfx_pt_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Pt_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_mask_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_mask_pt_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Pt_Func +op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + { + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mask_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_mask_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mask_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src_flags.alpha) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mask_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + return mask_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if (src_flags.alpha) + s = SP; + return mask_gfx_pt_func_cpu(s, m, c, d); +} diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am new file mode 100644 index 0000000..e3d0b82 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am @@ -0,0 +1,13 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ +op_mul_color_.c \ +op_mul_color_i386.c \ +op_mul_mask_color_.c \ +op_mul_mask_color_i386.c \ +op_mul_pixel_.c \ +op_mul_pixel_color_.c \ +op_mul_pixel_color_i386.c \ +op_mul_pixel_i386.c \ +op_mul_pixel_mask_.c \ +op_mul_pixel_mask_i386.c diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in new file mode 100644 index 0000000..f239cf7 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in @@ -0,0 +1,543 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/engines/common/evas_op_mul +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = \ +op_mul_color_.c \ +op_mul_color_i386.c \ +op_mul_mask_color_.c \ +op_mul_mask_color_i386.c \ +op_mul_pixel_.c \ +op_mul_pixel_color_.c \ +op_mul_pixel_color_i386.c \ +op_mul_pixel_i386.c \ +op_mul_pixel_mask_.c \ +op_mul_pixel_mask_i386.c + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mul/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mul/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c new file mode 100644 index 0000000..fb656b5 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c @@ -0,0 +1,65 @@ +/* mul color --> dst */ + +#ifdef BUILD_C +static void +_op_mul_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + for (; d < e; d++) { + *d = MUL4_SYM(c, *d); + } +} + +static void +_op_mul_caa_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + c = 1 + (c >> 24); + for (; d < e; d++) { + *d = MUL_256(c, *d); + } +} + +#define _op_mul_can_dp _op_mul_c_dp + +#define _op_mul_c_dpan _op_mul_c_dp +#define _op_mul_can_dpan _op_mul_can_dp +#define _op_mul_caa_dpan _op_mul_caa_dp + +static void +init_mul_color_span_funcs_c(void) +{ + op_mul_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mul_c_dp; + op_mul_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_mul_can_dp; + op_mul_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mul_caa_dp; + + op_mul_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mul_c_dpan; + op_mul_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_can_dpan; + op_mul_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_mul_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + *d = MUL4_SYM(c, *d); +} + +#define _op_mul_pt_can_dp _op_mul_pt_c_dp +#define _op_mul_pt_caa_dp _op_mul_pt_c_dp + +#define _op_mul_pt_c_dpan _op_mul_pt_c_dp +#define _op_mul_pt_can_dpan _op_mul_pt_can_dp +#define _op_mul_pt_caa_dpan _op_mul_pt_caa_dp + +static void +init_mul_color_pt_funcs_c(void) +{ + op_mul_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mul_pt_c_dp; + op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_can_dp; + op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_caa_dp; + + op_mul_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_c_dpan; + op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_can_dpan; + op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_caa_dpan; +} +#endif + diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c new file mode 100644 index 0000000..95f43f6 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c @@ -0,0 +1,66 @@ +/* mul color --> dst */ + +#ifdef BUILD_MMX +static void +_op_mul_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + MOV_P2R(c, mm2, mm0) + for (; d < e; d++) { + MOV_P2R(*d, mm1, mm0) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + } +} + +#define _op_mul_can_dp_mmx _op_mul_c_dp_mmx +#define _op_mul_caa_dp_mmx _op_mul_c_dp_mmx + +#define _op_mul_c_dpan_mmx _op_mul_c_dp_mmx +#define _op_mul_can_dpan_mmx _op_mul_can_dp_mmx +#define _op_mul_caa_dpan_mmx _op_mul_caa_dp_mmx + +static void +init_mul_color_span_funcs_mmx(void) +{ + op_mul_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_c_dp_mmx; + op_mul_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_can_dp_mmx; + op_mul_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_caa_dp_mmx; + + op_mul_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_c_dpan_mmx; + op_mul_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_can_dpan_mmx; + op_mul_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_mul_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + MOV_P2R(c, mm2, mm0) + MOV_P2R(*d, mm1, mm0) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) +} + +#define _op_mul_pt_caa_dp_mmx _op_mul_pt_c_dp_mmx +#define _op_mul_pt_can_dp_mmx _op_mul_pt_c_dp_mmx + +#define _op_mul_pt_c_dpan_mmx _op_mul_pt_c_dp_mmx +#define _op_mul_pt_can_dpan_mmx _op_mul_pt_can_dp_mmx +#define _op_mul_pt_caa_dpan_mmx _op_mul_pt_caa_dp_mmx + +static void +init_mul_color_pt_funcs_mmx(void) +{ + op_mul_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_c_dp_mmx; + op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_can_dp_mmx; + op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_caa_dp_mmx; + + op_mul_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_c_dpan_mmx; + op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_can_dpan_mmx; + op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_caa_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c new file mode 100644 index 0000000..7a6e403 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c @@ -0,0 +1,72 @@ +/* mul mask x color -> dst */ + +#ifdef BUILD_C +static void +_op_mul_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l, nc = ~c; + while (d < e) + { + DATA32 a = *m; + switch(a) + { + case 0: + break; + case 255: + *d = MUL4_SYM(c, *d); + break; + default: + a = ~MUL_SYM(a, nc); + *d = MUL4_SYM(a, *d); + break; + } + m++; d++; + } +} + +#define _op_mul_mas_can_dp _op_mul_mas_c_dp +#define _op_mul_mas_caa_dp _op_mul_mas_c_dp + +#define _op_mul_mas_c_dpan _op_mul_mas_c_dp +#define _op_mul_mas_can_dpan _op_mul_mas_can_dp +#define _op_mul_mas_caa_dpan _op_mul_mas_caa_dp + +static void +init_mul_mask_color_span_funcs_c(void) +{ + op_mul_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mul_mas_c_dp; + op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_mul_mas_can_dp; + op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mul_mas_caa_dp; + + op_mul_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mul_mas_c_dpan; + op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_mul_mas_can_dpan; + op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mul_mas_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_mul_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { + c = ~c; + c = ~MUL_SYM(m, c); + *d = MUL4_SYM(c, *d); +} + +#define _op_mul_pt_mas_can_dp _op_mul_pt_mas_c_dp +#define _op_mul_pt_mas_caa_dp _op_mul_pt_mas_c_dp + +#define _op_mul_pt_mas_c_dpan _op_mul_pt_mas_c_dp +#define _op_mul_pt_mas_can_dpan _op_mul_pt_mas_can_dp +#define _op_mul_pt_mas_caa_dpan _op_mul_pt_mas_caa_dp + +static void +init_mul_mask_color_pt_funcs_c(void) +{ + op_mul_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mul_pt_mas_c_dp; + op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_mul_pt_mas_can_dp; + op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mul_pt_mas_caa_dp; + + op_mul_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mul_pt_mas_c_dpan; + op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_mul_pt_mas_can_dpan; + op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mul_pt_mas_caa_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c new file mode 100644 index 0000000..1999503 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c @@ -0,0 +1,92 @@ +/* mul mask x color -> dst */ + +#ifdef BUILD_MMX +static void +_op_mul_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + MOV_P2R(c, mm2, mm0) + c = ~c; + MOV_P2R(c, mm3, mm0) + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + while (d < e) { + DATA32 a = *m; + switch(a) + { + case 0: + break; + case 255: + MOV_P2R(*d, mm1, mm0) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + break; + default: + a++; + MOV_A2R(a, mm1) + MUL4_256_R2R(mm3, mm1) + movq_r2r(mm5, mm4); + psubw_r2r(mm1, mm4); + MOV_P2R(*d, mm1, mm0) + MUL4_SYM_R2R(mm4, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + break; + } + m++; d++; + } +} + +#define _op_mul_mas_can_dp_mmx _op_mul_mas_c_dp_mmx +#define _op_mul_mas_caa_dp_mmx _op_mul_mas_c_dp_mmx + +#define _op_mul_mas_c_dpan_mmx _op_mul_mas_c_dp_mmx +#define _op_mul_mas_can_dpan_mmx _op_mul_mas_can_dp_mmx +#define _op_mul_mas_caa_dpan_mmx _op_mul_mas_caa_dp_mmx + +static void +init_mul_mask_color_span_funcs_mmx(void) +{ + op_mul_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_mul_mas_c_dp_mmx; + op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_mul_mas_can_dp_mmx; + op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_mul_mas_caa_dp_mmx; + + op_mul_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_mul_mas_c_dpan_mmx; + op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_mul_mas_can_dpan_mmx; + op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_mul_mas_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_mul_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { + s = m + 1; + c = ~c; + MOV_P2R(c, mm3, mm0) + MOV_A2R(ALPHA_255, mm4) + pxor_r2r(mm0, mm0); + MOV_A2R(s, mm1) + MUL4_256_R2R(mm3, mm1) + psubw_r2r(mm1, mm4); + MOV_P2R(*d, mm1, mm0) + MUL4_SYM_R2R(mm4, mm1, mm5) + MOV_R2P(mm1, *d, mm0) +} + +#define _op_mul_pt_mas_can_dp_mmx _op_mul_pt_mas_c_dp_mmx +#define _op_mul_pt_mas_caa_dp_mmx _op_mul_pt_mas_c_dp_mmx + +#define _op_mul_pt_mas_c_dpan_mmx _op_mul_pt_mas_c_dp_mmx +#define _op_mul_pt_mas_can_dpan_mmx _op_mul_pt_mas_can_dp_mmx +#define _op_mul_pt_mas_caa_dpan_mmx _op_mul_pt_mas_caa_dp_mmx + +static void +init_mul_mask_color_pt_funcs_mmx(void) +{ + op_mul_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_mul_pt_mas_c_dp_mmx; + op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_mul_pt_mas_can_dp_mmx; + op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_mul_pt_mas_caa_dp_mmx; + + op_mul_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_mul_pt_mas_c_dpan_mmx; + op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_mas_can_dpan_mmx; + op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_mas_caa_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c new file mode 100644 index 0000000..2e034b9 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c @@ -0,0 +1,56 @@ +/* mul pixel --> dst */ + +#ifdef BUILD_C +static void +_op_mul_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = d + l; + for (; d < e; d++, s++) { + *d = MUL4_SYM(*s, *d); + } +} + +#define _op_mul_pas_dp _op_mul_p_dp +#define _op_mul_pan_dp _op_mul_p_dp + +#define _op_mul_p_dpan _op_mul_p_dp +#define _op_mul_pas_dpan _op_mul_pas_dp +#define _op_mul_pan_dpan _op_mul_pan_dp + +static void +init_mul_pixel_span_funcs_c(void) +{ + op_mul_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_p_dp; + op_mul_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pas_dp; + op_mul_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pan_dp; + + op_mul_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_p_dpan; + op_mul_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pas_dpan; + op_mul_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pan_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_mul_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { + *d = MUL4_SYM(s, *d); +} + +#define _op_mul_pt_pas_dp _op_mul_pt_p_dp +#define _op_mul_pt_pan_dp _op_mul_pt_p_dp + +#define _op_mul_pt_p_dpan _op_mul_pt_p_dp +#define _op_mul_pt_pan_dpan _op_mul_pt_pan_dp +#define _op_mul_pt_pas_dpan _op_mul_pt_pas_dp + +static void +init_mul_pixel_pt_funcs_c(void) +{ + op_mul_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_p_dp; + op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pas_dp; + op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pan_dp; + + op_mul_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_p_dpan; + op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pas_dpan; + op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pan_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c new file mode 100644 index 0000000..3ea6919 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c @@ -0,0 +1,122 @@ +/* mul pixel x color --> dst */ + +#ifdef BUILD_C +static void +_op_mul_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + while (d < e) { + DATA32 cs = MUL4_SYM(c, *s); + *d = MUL4_SYM(cs, *d); + s++; d++; + } +} + +static void +_op_mul_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + c = 1 + (c >> 24); + while (d < e) + { + DATA32 cs = MUL_256(c, *s); + *d = MUL4_SYM(cs, *d); + s++; d++; + } +} + +#define _op_mul_pas_c_dp _op_mul_p_c_dp +#define _op_mul_pan_c_dp _op_mul_p_c_dp +#define _op_mul_p_can_dp _op_mul_p_c_dp +#define _op_mul_pas_can_dp _op_mul_p_c_dp +#define _op_mul_pan_can_dp _op_mul_p_c_dp +#define _op_mul_pas_caa_dp _op_mul_p_caa_dp +#define _op_mul_pan_caa_dp _op_mul_p_caa_dp + +#define _op_mul_p_c_dpan _op_mul_p_c_dp +#define _op_mul_pas_c_dpan _op_mul_pas_c_dp +#define _op_mul_pan_c_dpan _op_mul_pan_c_dp +#define _op_mul_p_can_dpan _op_mul_p_can_dp +#define _op_mul_pas_can_dpan _op_mul_pas_can_dp +#define _op_mul_pan_can_dpan _op_mul_pan_can_dp +#define _op_mul_p_caa_dpan _op_mul_p_caa_dp +#define _op_mul_pas_caa_dpan _op_mul_pas_caa_dp +#define _op_mul_pan_caa_dpan _op_mul_pan_caa_dp + +static void +init_mul_pixel_color_span_funcs_c(void) +{ + op_mul_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mul_p_c_dp; + op_mul_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mul_pas_c_dp; + op_mul_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mul_pan_c_dp; + op_mul_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mul_p_can_dp; + op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mul_pas_can_dp; + op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_mul_pan_can_dp; + op_mul_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mul_p_caa_dp; + op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mul_pas_caa_dp; + op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mul_pan_caa_dp; + + op_mul_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mul_p_c_dpan; + op_mul_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mul_pas_c_dpan; + op_mul_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mul_pan_c_dpan; + op_mul_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_p_can_dpan; + op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pas_can_dpan; + op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pan_can_dpan; + op_mul_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_p_caa_dpan; + op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pas_caa_dpan; + op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pan_caa_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_mul_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = MUL4_SYM(c, s); + *d = MUL4_SYM(s, *d); +} + +static void +_op_mul_pt_p_caa_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + s = MUL_SYM(c >> 24, s); + *d = MUL4_SYM(s, *d); +} + +#define _op_mul_pt_pas_c_dp _op_mul_pt_p_c_dp +#define _op_mul_pt_pan_c_dp _op_mul_pt_p_c_dp +#define _op_mul_pt_p_can_dp _op_mul_pt_p_c_dp +#define _op_mul_pt_pas_can_dp _op_mul_pt_p_c_dp +#define _op_mul_pt_pan_can_dp _op_mul_pt_p_c_dp +#define _op_mul_pt_pas_caa_dp _op_mul_pt_p_caa_dp +#define _op_mul_pt_pan_caa_dp _op_mul_pt_p_caa_dp + +#define _op_mul_pt_p_c_dpan _op_mul_pt_p_c_dp +#define _op_mul_pt_pan_c_dpan _op_mul_pt_pan_c_dp +#define _op_mul_pt_pas_c_dpan _op_mul_pt_pas_c_dp +#define _op_mul_pt_p_can_dpan _op_mul_pt_p_can_dp +#define _op_mul_pt_pan_can_dpan _op_mul_pt_pan_can_dp +#define _op_mul_pt_pas_can_dpan _op_mul_pt_pas_can_dp +#define _op_mul_pt_p_caa_dpan _op_mul_pt_p_caa_dp +#define _op_mul_pt_pan_caa_dpan _op_mul_pt_pan_caa_dp +#define _op_mul_pt_pas_caa_dpan _op_mul_pt_pas_caa_dp +static void +init_mul_pixel_color_pt_funcs_c(void) +{ + op_mul_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mul_pt_p_c_dp; + op_mul_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mul_pt_pas_c_dp; + op_mul_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mul_pt_pan_c_dp; + op_mul_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_p_can_dp; + op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_pas_can_dp; + op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_pan_can_dp; + op_mul_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_p_caa_dp; + op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_pas_caa_dp; + op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_pan_caa_dp; + + op_mul_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_p_c_dpan; + op_mul_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_pas_c_dpan; + op_mul_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_pan_c_dpan; + op_mul_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_p_can_dpan; + op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_pas_can_dpan; + op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_pan_can_dpan; + op_mul_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_p_caa_dpan; + op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_pas_caa_dpan; + op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_pan_caa_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c new file mode 100644 index 0000000..24f5a80 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c @@ -0,0 +1,120 @@ +/* mul pixel x color --> dst */ + +#ifdef BUILD_MMX +static void +_op_mul_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + while (d < e) + { + MOV_P2R(*s, mm3, mm0) + MUL4_SYM_R2R(mm2, mm3, mm5) + MOV_P2R(*d, mm1, mm0) + MUL4_SYM_R2R(mm3, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + s++; d++; + } +} + +#define _op_mul_pas_c_dp_mmx _op_mul_p_c_dp_mmx +#define _op_mul_pan_c_dp_mmx _op_mul_p_c_dp_mmx +#define _op_mul_p_can_dp_mmx _op_mul_p_c_dp_mmx +#define _op_mul_pas_can_dp_mmx _op_mul_p_c_dp_mmx +#define _op_mul_pan_can_dp_mmx _op_mul_p_c_dp_mmx +#define _op_mul_p_caa_dp_mmx _op_mul_p_c_dp_mmx +#define _op_mul_pas_caa_dp_mmx _op_mul_p_c_dp_mmx +#define _op_mul_pan_caa_dp_mmx _op_mul_p_c_dp_mmx + +#define _op_mul_p_c_dpan_mmx _op_mul_p_c_dp_mmx +#define _op_mul_pan_c_dpan_mmx _op_mul_pan_c_dp_mmx +#define _op_mul_pas_c_dpan_mmx _op_mul_pas_c_dp_mmx +#define _op_mul_p_can_dpan_mmx _op_mul_p_can_dp_mmx +#define _op_mul_pan_can_dpan_mmx _op_mul_pan_can_dp_mmx +#define _op_mul_pas_can_dpan_mmx _op_mul_pas_can_dp_mmx +#define _op_mul_p_caa_dpan_mmx _op_mul_p_caa_dp_mmx +#define _op_mul_pan_caa_dpan_mmx _op_mul_pan_caa_dp_mmx +#define _op_mul_pas_caa_dpan_mmx _op_mul_pas_caa_dp_mmx + +static void +init_mul_pixel_color_span_funcs_mmx(void) +{ + op_mul_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_mul_p_c_dp_mmx; + op_mul_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_mul_pas_c_dp_mmx; + op_mul_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_mul_pan_c_dp_mmx; + op_mul_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_p_can_dp_mmx; + op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pas_can_dp_mmx; + op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pan_can_dp_mmx; + op_mul_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_p_caa_dp_mmx; + op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pas_caa_dp_mmx; + op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pan_caa_dp_mmx; + + op_mul_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_p_c_dpan_mmx; + op_mul_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pas_c_dpan_mmx; + op_mul_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pan_c_dpan_mmx; + op_mul_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_p_can_dpan_mmx; + op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pas_can_dpan_mmx; + op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pan_can_dpan_mmx; + op_mul_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_p_caa_dpan_mmx; + op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pas_caa_dpan_mmx; + op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pan_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_mul_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + MOV_P2R(c, mm2, mm0) + MOV_P2R(s, mm3, mm0) + MUL4_SYM_R2R(mm2, mm3, mm5) + MOV_P2R(*d, mm1, mm0) + MUL4_SYM_R2R(mm3, mm1, mm5) + MOV_R2P(mm1, *d, mm0) +} + +#define _op_mul_pt_pas_c_dp_mmx _op_mul_pt_p_c_dp_mmx +#define _op_mul_pt_pan_c_dp_mmx _op_mul_pt_p_c_dp_mmx +#define _op_mul_pt_p_can_dp_mmx _op_mul_pt_p_c_dp_mmx +#define _op_mul_pt_pas_can_dp_mmx _op_mul_pt_p_c_dp_mmx +#define _op_mul_pt_pan_can_dp_mmx _op_mul_pt_p_c_dp_mmx +#define _op_mul_pt_p_caa_dp_mmx _op_mul_pt_p_c_dp_mmx +#define _op_mul_pt_pas_caa_dp_mmx _op_mul_pt_p_c_dp_mmx +#define _op_mul_pt_pan_caa_dp_mmx _op_mul_pt_p_c_dp_mmx + +#define _op_mul_pt_p_c_dpan_mmx _op_mul_pt_p_c_dp_mmx +#define _op_mul_pt_pan_c_dpan_mmx _op_mul_pt_pan_c_dp_mmx +#define _op_mul_pt_pas_c_dpan_mmx _op_mul_pt_pas_c_dp_mmx +#define _op_mul_pt_p_can_dpan_mmx _op_mul_pt_p_can_dp_mmx +#define _op_mul_pt_pan_can_dpan_mmx _op_mul_pt_pan_can_dp_mmx +#define _op_mul_pt_pas_can_dpan_mmx _op_mul_pt_pas_can_dp_mmx +#define _op_mul_pt_p_caa_dpan_mmx _op_mul_pt_p_caa_dp_mmx +#define _op_mul_pt_pan_caa_dpan_mmx _op_mul_pt_pan_caa_dp_mmx +#define _op_mul_pt_pas_caa_dpan_mmx _op_mul_pt_pas_caa_dp_mmx + +static void +init_mul_pixel_color_pt_funcs_mmx(void) +{ + op_mul_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_p_c_dp_mmx; + op_mul_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_pas_c_dp_mmx; + op_mul_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_pan_c_dp_mmx; + op_mul_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_p_can_dp_mmx; + op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_pas_can_dp_mmx; + op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_pan_can_dp_mmx; + op_mul_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_p_caa_dp_mmx; + op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_pas_caa_dp_mmx; + op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_pan_caa_dp_mmx; + + op_mul_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_p_c_dpan_mmx; + op_mul_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_pas_c_dpan_mmx; + op_mul_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_pan_c_dpan_mmx; + op_mul_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_p_can_dpan_mmx; + op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_pas_can_dpan_mmx; + op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_pan_can_dpan_mmx; + op_mul_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_p_caa_dpan_mmx; + op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_pas_caa_dpan_mmx; + op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_pan_caa_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c new file mode 100644 index 0000000..0db6cd7 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c @@ -0,0 +1,66 @@ +/* mul pixel --> dst */ + +#ifdef BUILD_MMX +static void +_op_mul_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { + DATA32 *e = s + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + for (; s < e; s++, d++) { + MOV_P2R(*d, mm1, mm0) + MOV_P2R(*s, mm2, mm0) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + } +} + +#define _op_mul_pas_dp_mmx _op_mul_p_dp_mmx +#define _op_mul_pan_dp_mmx _op_mul_p_dp_mmx + +#define _op_mul_p_dpan_mmx _op_mul_p_dp_mmx +#define _op_mul_pan_dpan_mmx _op_mul_pan_dp_mmx +#define _op_mul_pas_dpan_mmx _op_mul_pas_dp_mmx + +static void +init_mul_pixel_span_funcs_mmx(void) +{ + op_mul_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mul_p_dp_mmx; + op_mul_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pan_dp_mmx; + op_mul_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pas_dp_mmx; + + op_mul_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_p_dpan_mmx; + op_mul_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pan_dpan_mmx; + op_mul_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pas_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_mul_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + MOV_P2R(*d, mm1, mm0) + MOV_P2R(s, mm2, mm0) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) +} + +#define _op_mul_pt_pan_dp_mmx _op_mul_pt_p_dp_mmx +#define _op_mul_pt_pas_dp_mmx _op_mul_pt_p_dp_mmx + +#define _op_mul_pt_p_dpan_mmx _op_mul_pt_p_dp_mmx +#define _op_mul_pt_pan_dpan_mmx _op_mul_pt_pan_dp_mmx +#define _op_mul_pt_pas_dpan_mmx _op_mul_pt_pas_dp_mmx + +static void +init_mul_pixel_pt_funcs_mmx(void) +{ + op_mul_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_p_dp_mmx; + op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_pan_dp_mmx; + op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_pas_dp_mmx; + + op_mul_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_p_dpan_mmx; + op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_pan_dpan_mmx; + op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_pas_dpan_mmx; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c new file mode 100644 index 0000000..37d0497 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c @@ -0,0 +1,117 @@ +/* mul pixel x mask --> dst */ + +#ifdef BUILD_C +static void +_op_mul_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + while (d < e) + { + c = *m; + switch(c) + { + case 0: + break; + case 255: + *d = MUL4_SYM(*s, *d); + break; + default: + c = ~(*s); + c = ~MUL_SYM(*m, c); + *d = MUL4_SYM(c, *d); + break; + } + m++; s++; d++; + } +} + +static void +_op_mul_pan_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + while (d < e) + { + c = *m; + switch(c) + { + case 0: + break; + case 255: + *d = (*d & 0xff000000) + MUL3_SYM(*s, *d); + break; + default: + c = ~(*s); + c = ~MUL_SYM(*m, c); + *d = (*d & 0xff000000) + MUL3_SYM(c, *d); + break; + } + m++; s++; d++; + } +} + +static void +_op_mul_p_mas_dpan(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + while (d < e) + { + c = *m; + switch(c) + { + case 0: + break; + case 255: + *d = (*s & 0xff000000) + MUL3_SYM(*s, *d); + break; + default: + c = ~(*s); + c = ~MUL_SYM(*m, c); + *d = (c & 0xff000000) + MUL3_SYM(c, *d); + break; + } + m++; d++; + } +} + +#define _op_mul_pas_mas_dp _op_mul_p_mas_dp + +#define _op_mul_pan_mas_dpan _op_mul_p_mas_dpan +#define _op_mul_pas_mas_dpan _op_mul_p_mas_dpan + +static void +init_mul_pixel_mask_span_funcs_c(void) +{ + op_mul_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mul_p_mas_dp; + op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mul_pas_mas_dp; + op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_mul_pan_mas_dp; + + op_mul_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_p_mas_dpan; + op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pas_mas_dpan; + op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pan_mas_dpan; +} +#endif + +#ifdef BUILD_C +static void +_op_mul_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { + s = ~s; + s = ~MUL_SYM(m, s); + *d = MUL4_SYM(s, *d); +} + +#define _op_mul_pt_pas_mas_dp _op_mul_pt_p_mas_dp +#define _op_mul_pt_pan_mas_dp _op_mul_pt_p_mas_dp + +#define _op_mul_pt_p_mas_dpan _op_mul_pt_p_mas_dp +#define _op_mul_pt_pas_mas_dpan _op_mul_pt_p_mas_dp +#define _op_mul_pt_pan_mas_dpan _op_mul_pt_p_mas_dp + +static void +init_mul_pixel_mask_pt_funcs_c(void) +{ + op_mul_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_p_mas_dp; + op_mul_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_pas_mas_dp; + op_mul_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_pan_mas_dp; + + op_mul_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_p_mas_dpan; + op_mul_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_pas_mas_dpan; + op_mul_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_pan_mas_dpan; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c new file mode 100644 index 0000000..ebbac01 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c @@ -0,0 +1,63 @@ +/* mul pixel x mask --> dst */ + +#ifdef BUILD_MMX +static void +_op_mul_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + MOV_A2R(ALPHA_255, mm5) + pxor_r2r(mm0, mm0); + while (d < e) { + c = *m; + switch(c) + { + case 0: + break; + case 255: + MOV_P2R(*d, mm1, mm0) + MOV_P2R(*s, mm2, mm0) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + break; + default: + c++; + MOV_A2R(c, mm1) + c = ~(*s); + MOV_P2R(c, mm3, mm0) + MUL4_256_R2R(mm3, mm1) + movq_r2r(mm5, mm4); + psubw_r2r(mm1, mm4); + MOV_P2R(*d, mm1, mm0) + MUL4_SYM_R2R(mm4, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + break; + } + s++; m++; d++; + } +} + +#define _op_mul_pas_mas_dp_mmx _op_mul_p_mas_dp_mmx +#define _op_mul_pan_mas_dp_mmx _op_mul_p_mas_dp_mmx + +#define _op_mul_p_mas_dpan_mmx _op_mul_p_mas_dp_mmx +#define _op_mul_pas_mas_dpan_mmx _op_mul_pas_mas_dp_mmx +#define _op_mul_pan_mas_dpan_mmx _op_mul_pan_mas_dp_mmx + +static void +init_mul_pixel_mask_span_funcs_mmx(void) +{ + op_mul_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_p_mas_dp_mmx; + op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_pas_mas_dp_mmx; + op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_pan_mas_dp_mmx; + + op_mul_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_p_mas_dpan_mmx; + op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_pas_mas_dpan_mmx; + op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_pan_mas_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +init_mul_pixel_mask_pt_funcs_mmx(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul_main_.c b/libraries/evas/src/lib/engines/common/evas_op_mul_main_.c new file mode 100644 index 0000000..25fa932 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul_main_.c @@ -0,0 +1,308 @@ +#include "evas_common.h" + +static RGBA_Gfx_Func op_mul_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +static RGBA_Gfx_Pt_Func op_mul_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +static void op_mul_init(void); +static void op_mul_shutdown(void); + +static RGBA_Gfx_Func op_mul_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_mul_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_mul_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_mul_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_mul_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); + +static RGBA_Gfx_Pt_Func op_mul_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_mul_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); + +static RGBA_Gfx_Compositor _composite_mul = { "mul", + op_mul_init, op_mul_shutdown, + op_mul_pixel_span_get, op_mul_color_span_get, + op_mul_pixel_color_span_get, op_mul_mask_color_span_get, + op_mul_pixel_mask_span_get, + op_mul_pixel_pt_get, op_mul_color_pt_get, + op_mul_pixel_color_pt_get, op_mul_mask_color_pt_get, + op_mul_pixel_mask_pt_get + }; + +RGBA_Gfx_Compositor * +evas_common_gfx_compositor_mul_get(void) +{ + return &(_composite_mul); +} + + +# include "./evas_op_mul/op_mul_pixel_.c" +# include "./evas_op_mul/op_mul_color_.c" +# include "./evas_op_mul/op_mul_pixel_color_.c" +# include "./evas_op_mul/op_mul_pixel_mask_.c" +# include "./evas_op_mul/op_mul_mask_color_.c" +//# include "./evas_op_mul/op_mul_pixel_mask_color_.c" + +# include "./evas_op_mul/op_mul_pixel_i386.c" +# include "./evas_op_mul/op_mul_color_i386.c" +# include "./evas_op_mul/op_mul_pixel_color_i386.c" +# include "./evas_op_mul/op_mul_pixel_mask_i386.c" +# include "./evas_op_mul/op_mul_mask_color_i386.c" +// # include "./evas_op_mul/op_mul_pixel_mask_color_i386.c" + +static void +op_mul_init(void) +{ + memset(op_mul_span_funcs, 0, sizeof(op_mul_span_funcs)); + memset(op_mul_pt_funcs, 0, sizeof(op_mul_pt_funcs)); +#ifdef BUILD_MMX + init_mul_pixel_span_funcs_mmx(); + init_mul_pixel_color_span_funcs_mmx(); + init_mul_pixel_mask_span_funcs_mmx(); + init_mul_color_span_funcs_mmx(); + init_mul_mask_color_span_funcs_mmx(); + + init_mul_pixel_pt_funcs_mmx(); + init_mul_pixel_color_pt_funcs_mmx(); + init_mul_pixel_mask_pt_funcs_mmx(); + init_mul_color_pt_funcs_mmx(); + init_mul_mask_color_pt_funcs_mmx(); +#endif +#ifdef BUILD_C + init_mul_pixel_span_funcs_c(); + init_mul_pixel_color_span_funcs_c(); + init_mul_pixel_mask_span_funcs_c(); + init_mul_color_span_funcs_c(); + init_mul_mask_color_span_funcs_c(); + + init_mul_pixel_pt_funcs_c(); + init_mul_pixel_color_pt_funcs_c(); + init_mul_pixel_mask_pt_funcs_c(); + init_mul_color_pt_funcs_c(); + init_mul_mask_color_pt_funcs_c(); +#endif +} + +static void +op_mul_shutdown(void) +{ +} + +static RGBA_Gfx_Func +mul_gfx_span_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_mul_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_mul_span_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Func +op_mul_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mul_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_mul_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mul_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_mul_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mul_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_mul_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + return mul_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_mul_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if (src && src->cache_entry.flags.alpha) + s = SP; + return mul_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +mul_gfx_pt_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Pt_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_mul_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_mul_pt_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Pt_Func +op_mul_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + { + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mul_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_mul_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mul_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src_flags.alpha) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + s = SP; + } + if ((col >> 24) < 255) + { + if (dst) + dst->cache_entry.flags.alpha = 1; + c = SC; + } + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return mul_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + return mul_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP; + + if (dst) + dst->cache_entry.flags.alpha = 1; + if (src_flags.alpha) + s = SP; + return mul_gfx_pt_func_cpu(s, m, c, d); +} diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am new file mode 100644 index 0000000..a8eca14 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am @@ -0,0 +1,14 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ +op_sub_color_.c \ +op_sub_color_i386.c \ +op_sub_mask_color_.c \ +op_sub_mask_color_i386.c \ +op_sub_pixel_.c \ +op_sub_pixel_color_.c \ +op_sub_pixel_color_i386.c \ +op_sub_pixel_i386.c \ +op_sub_pixel_mask_.c \ +op_sub_pixel_mask_i386.c + diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in new file mode 100644 index 0000000..b68ed3b --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in @@ -0,0 +1,543 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/engines/common/evas_op_sub +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = \ +op_sub_color_.c \ +op_sub_color_i386.c \ +op_sub_mask_color_.c \ +op_sub_mask_color_i386.c \ +op_sub_pixel_.c \ +op_sub_pixel_color_.c \ +op_sub_pixel_color_i386.c \ +op_sub_pixel_i386.c \ +op_sub_pixel_mask_.c \ +op_sub_pixel_mask_i386.c + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_sub/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_sub/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c new file mode 100644 index 0000000..8490b68 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c @@ -0,0 +1,33 @@ +/* sub color -> dst */ + +#ifdef BUILD_C +static void +init_sub_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_sub_color_pt_funcs_c(void) +{ +} +#endif + +/*-----*/ + +/* sub_rel color -> dst */ + +#ifdef BUILD_C +static void +init_sub_rel_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_sub_rel_color_pt_funcs_c(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c new file mode 100644 index 0000000..d8fbbea --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c @@ -0,0 +1,33 @@ +/* sub color -> dst */ + +#ifdef BUILD_MMX +static void +init_sub_color_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_sub_color_pt_funcs_mmx(void) +{ +} +#endif + +/*-----*/ + +/* sub_rel color -> dst */ + +#ifdef BUILD_MMX +static void +init_sub_rel_color_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_sub_rel_color_pt_funcs_mmx(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c new file mode 100644 index 0000000..0584227 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c @@ -0,0 +1,33 @@ +/* sub mask x color -> dst */ + +#ifdef BUILD_C +static void +init_sub_mask_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_sub_mask_color_pt_funcs_c(void) +{ +} +#endif + +/*-----*/ + +/* sub_rel mask x color -> dst */ + +#ifdef BUILD_C +static void +init_sub_rel_mask_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_sub_rel_mask_color_pt_funcs_c(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c new file mode 100644 index 0000000..972a2c9 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c @@ -0,0 +1,33 @@ +/* sub mask x color -> dst */ + +#ifdef BUILD_MMX +static void +init_sub_mask_color_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_sub_mask_color_pt_funcs_mmx(void) +{ +} +#endif + +/*-----*/ + +/* sub_rel mask x color -> dst */ + +#ifdef BUILD_MMX +static void +init_sub_rel_mask_color_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_sub_rel_mask_color_pt_funcs_mmx(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c new file mode 100644 index 0000000..97001d4 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c @@ -0,0 +1,33 @@ +/* sub pixel --> dst */ + +#ifdef BUILD_C +static void +init_sub_pixel_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_sub_pixel_pt_funcs_c(void) +{ +} +#endif + +/*-----*/ + +/* sub_rel pixel --> dst */ + +#ifdef BUILD_C +static void +init_sub_rel_pixel_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_sub_rel_pixel_pt_funcs_c(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c new file mode 100644 index 0000000..13caa0b --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c @@ -0,0 +1,33 @@ +/* sub pixel x color --> dst */ + +#ifdef BUILD_C +static void +init_sub_pixel_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_sub_pixel_color_pt_funcs_c(void) +{ +} +#endif + +/*-----*/ + +/* sub_rel pixel x color --> dst */ + +#ifdef BUILD_C +static void +init_sub_rel_pixel_color_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_sub_rel_pixel_color_pt_funcs_c(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c new file mode 100644 index 0000000..e3c1793 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c @@ -0,0 +1,29 @@ +/* sub pixel x color --> dst */ + +#ifdef BUILD_MMX +static void +init_sub_pixel_color_span_funcs_mmx(void) +{ } +#endif + +#ifdef BUILD_MMX +static void +init_sub_pixel_color_pt_funcs_mmx(void) +{ } +#endif + +/*-----*/ + +/* sub_rel pixel x color --> dst */ + +#ifdef BUILD_MMX +static void +init_sub_rel_pixel_color_span_funcs_mmx(void) +{ } +#endif + +#ifdef BUILD_MMX +static void +init_sub_rel_pixel_color_pt_funcs_mmx(void) +{ } +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c new file mode 100644 index 0000000..95e2ab6 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c @@ -0,0 +1,33 @@ +/* sub pixel --> dst */ + +#ifdef BUILD_MMX +static void +init_sub_pixel_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_sub_pixel_pt_funcs_mmx(void) +{ +} +#endif + +/*-----*/ + +/* sub_rel pixel --> dst */ + +#ifdef BUILD_MMX +static void +init_sub_rel_pixel_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_sub_rel_pixel_pt_funcs_mmx(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c new file mode 100644 index 0000000..c0c67be --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c @@ -0,0 +1,37 @@ +/* sub pixel x mask --> dst */ + +#ifdef BUILD_C +/* XXX: not used +static void +init_sub_pixel_mask_span_funcs_c(void) +{ +} +*/ +#endif + +#ifdef BUILD_C +/* XXX: not used +static void +init_sub_pixel_mask_pt_funcs_c(void) +{ +} +*/ +#endif + +/*-----*/ + +/* sub_rel pixel x mask --> dst */ + +#ifdef BUILD_C +static void +init_sub_rel_pixel_mask_span_funcs_c(void) +{ +} +#endif + +#ifdef BUILD_C +static void +init_sub_rel_pixel_mask_pt_funcs_c(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c new file mode 100644 index 0000000..bfd145e --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c @@ -0,0 +1,33 @@ +/* sub pixel x mask -> dst */ + +#ifdef BUILD_MMX +static void +init_sub_pixel_mask_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_sub_pixel_mask_pt_funcs_mmx(void) +{ +} +#endif + +/*-----*/ + +/* sub_rel pixel x mask -> dst */ + +#ifdef BUILD_MMX +static void +init_sub_rel_pixel_mask_span_funcs_mmx(void) +{ +} +#endif + +#ifdef BUILD_MMX +static void +init_sub_rel_pixel_mask_pt_funcs_mmx(void) +{ +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub_main_.c b/libraries/evas/src/lib/engines/common/evas_op_sub_main_.c new file mode 100644 index 0000000..329c2e4 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_sub_main_.c @@ -0,0 +1,542 @@ +#include "evas_common.h" + +static RGBA_Gfx_Func op_sub_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +static RGBA_Gfx_Pt_Func op_sub_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +static void op_sub_init(void); +static void op_sub_shutdown(void); + +static RGBA_Gfx_Func op_sub_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_sub_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_sub_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_sub_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); + +static RGBA_Gfx_Pt_Func op_sub_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_sub_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); + +static RGBA_Gfx_Compositor _composite_sub = { "sub", + op_sub_init, op_sub_shutdown, + op_sub_pixel_span_get, op_sub_color_span_get, + op_sub_pixel_color_span_get, op_sub_mask_color_span_get, + op_sub_pixel_mask_span_get, + op_sub_pixel_pt_get, op_sub_color_pt_get, + op_sub_pixel_color_pt_get, op_sub_mask_color_pt_get, + op_sub_pixel_mask_pt_get + }; + +RGBA_Gfx_Compositor * +evas_common_gfx_compositor_sub_get(void) +{ + return &(_composite_sub); +} + +static RGBA_Gfx_Func op_sub_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; +static RGBA_Gfx_Pt_Func op_sub_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; + +static void op_sub_rel_init(void); +static void op_sub_rel_shutdown(void); + +static RGBA_Gfx_Func op_sub_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_sub_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_sub_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_sub_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); +static RGBA_Gfx_Func op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); + +static RGBA_Gfx_Pt_Func op_sub_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_sub_rel_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); +static RGBA_Gfx_Pt_Func op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); + +static RGBA_Gfx_Compositor _composite_sub_rel = { "sub_rel", + op_sub_rel_init, op_sub_rel_shutdown, + op_sub_rel_pixel_span_get, op_sub_rel_color_span_get, + op_sub_rel_pixel_color_span_get, op_sub_rel_mask_color_span_get, + op_sub_rel_pixel_mask_span_get, + op_sub_rel_pixel_pt_get, op_sub_rel_color_pt_get, + op_sub_rel_pixel_color_pt_get, op_sub_rel_mask_color_pt_get, + op_sub_rel_pixel_mask_pt_get + }; + +RGBA_Gfx_Compositor * +evas_common_gfx_compositor_sub_rel_get(void) +{ + return &(_composite_sub_rel); +} + + +# include "./evas_op_sub/op_sub_pixel_.c" +# include "./evas_op_sub/op_sub_color_.c" +# include "./evas_op_sub/op_sub_pixel_color_.c" +# include "./evas_op_sub/op_sub_pixel_mask_.c" +# include "./evas_op_sub/op_sub_mask_color_.c" +//# include "./evas_op_sub/op_sub_pixel_mask_color_.c" + +# include "./evas_op_sub/op_sub_pixel_i386.c" +# include "./evas_op_sub/op_sub_color_i386.c" +# include "./evas_op_sub/op_sub_pixel_color_i386.c" +# include "./evas_op_sub/op_sub_pixel_mask_i386.c" +# include "./evas_op_sub/op_sub_mask_color_i386.c" +//# include "./evas_op_sub/op_sub_pixel_mask_color_i386.c" + +static void +op_sub_init(void) +{ + memset(op_sub_span_funcs, 0, sizeof(op_sub_span_funcs)); + memset(op_sub_pt_funcs, 0, sizeof(op_sub_pt_funcs)); +#ifdef BUILD_MMX + init_sub_pixel_span_funcs_mmx(); + init_sub_pixel_color_span_funcs_mmx(); + init_sub_pixel_mask_span_funcs_mmx(); + init_sub_color_span_funcs_mmx(); + init_sub_mask_color_span_funcs_mmx(); + + init_sub_pixel_pt_funcs_mmx(); + init_sub_pixel_color_pt_funcs_mmx(); + init_sub_pixel_mask_pt_funcs_mmx(); + init_sub_color_pt_funcs_mmx(); + init_sub_mask_color_pt_funcs_mmx(); +#endif +#ifdef BUILD_C + init_sub_pixel_span_funcs_c(); + init_sub_pixel_color_span_funcs_c(); + init_sub_rel_pixel_mask_span_funcs_c(); + init_sub_color_span_funcs_c(); + init_sub_mask_color_span_funcs_c(); + + init_sub_pixel_pt_funcs_c(); + init_sub_pixel_color_pt_funcs_c(); + init_sub_rel_pixel_mask_pt_funcs_c(); + init_sub_color_pt_funcs_c(); + init_sub_mask_color_pt_funcs_c(); +#endif +} + +static void +op_sub_shutdown(void) +{ +} + +static RGBA_Gfx_Func +sub_gfx_span_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_sub_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_sub_span_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Func +op_sub_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_sub_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_sub_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_sub_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +sub_gfx_pt_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Pt_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_sub_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_sub_pt_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Pt_Func +op_sub_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_sub_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_gfx_pt_func_cpu(s, m, c, d); +} + + + +static void +op_sub_rel_init(void) +{ + memset(op_sub_rel_span_funcs, 0, sizeof(op_sub_rel_span_funcs)); + memset(op_sub_rel_pt_funcs, 0, sizeof(op_sub_rel_pt_funcs)); +#ifdef BUILD_MMX + init_sub_rel_pixel_span_funcs_mmx(); + init_sub_rel_pixel_color_span_funcs_mmx(); + init_sub_rel_pixel_mask_span_funcs_mmx(); + init_sub_rel_color_span_funcs_mmx(); + init_sub_rel_mask_color_span_funcs_mmx(); + + init_sub_rel_pixel_pt_funcs_mmx(); + init_sub_rel_pixel_color_pt_funcs_mmx(); + init_sub_rel_pixel_mask_pt_funcs_mmx(); + init_sub_rel_color_pt_funcs_mmx(); + init_sub_rel_mask_color_pt_funcs_mmx(); +#endif +#ifdef BUILD_C + init_sub_rel_pixel_span_funcs_c(); + init_sub_rel_pixel_color_span_funcs_c(); + init_sub_rel_pixel_mask_span_funcs_c(); + init_sub_rel_color_span_funcs_c(); + init_sub_rel_mask_color_span_funcs_c(); + + init_sub_rel_pixel_pt_funcs_c(); + init_sub_rel_pixel_color_pt_funcs_c(); + init_sub_rel_pixel_mask_pt_funcs_c(); + init_sub_rel_color_pt_funcs_c(); + init_sub_rel_mask_color_pt_funcs_c(); +#endif +} + +static void +op_sub_rel_shutdown(void) +{ +} + +static RGBA_Gfx_Func +sub_rel_gfx_span_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_sub_rel_span_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_sub_rel_span_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Func +op_sub_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_sub_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_sub_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_sub_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Func +op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src && src->cache_entry.flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_rel_gfx_span_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +sub_rel_gfx_pt_func_cpu(int s, int m, int c, int d) +{ + RGBA_Gfx_Pt_Func func = NULL; + int cpu = CPU_N; +#ifdef BUILD_MMX + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) + { + cpu = CPU_MMX; + func = op_sub_rel_pt_funcs[s][m][c][d][cpu]; + if (func) return func; + } +#endif +#ifdef BUILD_C + cpu = CPU_C; + func = op_sub_rel_pt_funcs[s][m][c][d][cpu]; + if (func) return func; +#endif + return func; +} + +static RGBA_Gfx_Pt_Func +op_sub_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_sub_rel_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) +{ + int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; + + if ((col >> 24) < 255) + c = SC; + if (col == (col | 0x00ffffff)) + c = SC_AA; + if (col == 0xffffffff) + c = SC_N; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_rel_gfx_pt_func_cpu(s, m, c, d); +} + +static RGBA_Gfx_Pt_Func +op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) +{ + int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; + + if (src_flags.alpha) + s = SP; + if (dst && dst->cache_entry.flags.alpha) + d = DP; + return sub_rel_gfx_pt_func_cpu(s, m, c, d); +} diff --git a/libraries/evas/src/lib/engines/common/evas_pipe.c b/libraries/evas/src/lib/engines/common/evas_pipe.c new file mode 100644 index 0000000..66085c8 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_pipe.c @@ -0,0 +1,1733 @@ +// THIS IS DEPRECATED. WILL GO EVENTUALLTY. NO NEED TO SUPPORT ANYMORE + +#include "evas_common.h" +#include + +#ifdef BUILD_PIPE_RENDER + +#ifdef EVAS_FRAME_QUEUING +#define SCALECACHE +static Evas_FrameQ gframeq; // global frameQ + +static Evas_Surface * +evas_common_surface_alloc(void *surface, int x, int y, int w, int h) +{ + Evas_Surface *e_surface; + + e_surface = calloc(1, sizeof(Evas_Surface)); + e_surface->im = surface; + LKL(e_surface->im->cache_entry.ref_fq_add); + e_surface->im->cache_entry.ref_fq[0]++; + LKU(e_surface->im->cache_entry.ref_fq_add); + e_surface->x = x; + e_surface->y = y; + e_surface->w = w; + e_surface->h = h; + + return e_surface; +} + +static void +evas_common_surface_dealloc(Evas_Surface *surface) +{ + Evas_Surface *d_surface; + + while (surface) + { + d_surface = surface; + surface = (Evas_Surface *)eina_inlist_remove(EINA_INLIST_GET(surface), EINA_INLIST_GET(d_surface)); + LKL(d_surface->im->cache_entry.ref_fq_del); + d_surface->im->cache_entry.ref_fq[1]++; + LKU(d_surface->im->cache_entry.ref_fq_del); + free(d_surface); + } +} + +static void +evas_common_surface_add(Evas_Frame *frame, Evas_Surface *surface) +{ + frame->surfaces = (Evas_Surface *)eina_inlist_append(EINA_INLIST_GET(frame->surfaces), EINA_INLIST_GET(surface)); +} + +static Evas_Frame * +evas_common_frame_alloc(void) +{ + Evas_Frame *frame; + + frame = calloc(1, sizeof(Evas_Frame)); + frame->surfaces = NULL; + return frame; +} + +static void +evas_common_frame_dealloc(Evas_Frame *frame) +{ + evas_common_surface_dealloc(frame->surfaces); + free(frame); +} + +static void +evas_common_frame_add(Evas_FrameQ *frameq, Evas_Frame *frame) +{ + Evas_Frame *temp_frame; + + LKL(frameq->mutex); + while ((int)eina_inlist_count(EINA_INLIST_GET(frameq->frames)) >= frameq->frameq_sz) + { + /* wait a worker thread finish previous frame */ + eina_condition_wait(&(frameq->cond_done)); + } + frameq->frames = (Evas_Frame *) eina_inlist_append(EINA_INLIST_GET(frameq->frames), EINA_INLIST_GET(frame)); + + // this frame need not to be scheduled for flushing time + EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), temp_frame) + { + if (!temp_frame->ready) + { + break; + } + } + if (temp_frame && temp_frame == frame) + frame->dont_schedule = 1; + + LKU(frameq->mutex); + + eina_condition_signal(&(frameq->cond_new)); +} + +EAPI Evas_Surface * +evas_common_frameq_new_surface(void *surface, int x, int y, int w, int h) +{ + return evas_common_surface_alloc(surface, x, y, w, h); +} + +EAPI void +evas_common_frameq_add_surface(Evas_Surface *surface) +{ + evas_common_surface_add(gframeq.cur_frame, surface); +} + +EAPI void +evas_common_frameq_set_frame_data(void *data, + void (*fn_output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h), + void (*fn_output_flush) (void *data), + void (*fn_output_set_priv)(void *data, void *cur, void *prev)) +{ + if (gframeq.cur_frame) + { + gframeq.cur_frame->data = data; + gframeq.cur_frame->output_redraws_next_update_push = fn_output_redraws_next_update_push; + gframeq.cur_frame->output_flush = fn_output_flush; + gframeq.cur_frame->output_set_priv = fn_output_set_priv; + } +} + +EAPI void +evas_common_frameq_prepare_frame(void) +{ + if (!gframeq.cur_frame ) + { + gframeq.cur_frame = evas_common_frame_alloc(); + } +} + +EAPI void +evas_common_frameq_ready_frame(void) +{ + if (gframeq.cur_frame) + { + evas_common_frame_add(&gframeq, gframeq.cur_frame); + gframeq.cur_frame = NULL; // create a new frame for the next frame later + } +} + + +EAPI void +evas_common_frameq_init(void) +{ + gframeq.frames = NULL; + LKI(gframeq.mutex); + eina_condition_new(&(gframeq.cond_new), &(gframeq.mutex)); + eina_condition_new(&(gframeq.cond_ready), &(gframeq.mutex)); + eina_condition_new(&(gframeq.cond_done), &(gframeq.mutex)); + gframeq.initialised = 0; // worker thread are not created yet + gframeq.frameq_sz = 1; // this value ensures the first frame can be enqueued. +} + +EAPI void +evas_common_frameq_destroy(void) +{ +#if 0 // let them destroyed indirectly with program exit + LKL(gframeq.mutex); + eina_condition_free(&(gframeq.cond_new)); + eina_condition_free(&(gframeq.cond_ready)); + eina_condition_free(&(gframeq.cond_done)); + LKU(gframeq.mutex); +#endif + LKD(gframeq.mutex); + + gframeq.frames = NULL; + gframeq.initialised = 0; +} + +EAPI void +evas_common_frameq_flush(void) +{ + if (! evas_common_frameq_enabled()) + return; + + LKL(gframeq.mutex); + while(eina_inlist_count(EINA_INLIST_GET(gframeq.frames)) > 0) + { + /* wait a worker thread finish previous frame */ + eina_condition_wait(&(gframeq.cond_done)); + } + LKU(gframeq.mutex); +} + + +EAPI void +evas_common_frameq_flush_ready(void) +{ + return; +} + +EAPI int +evas_common_frameq_get_frameq_sz(void) +{ + return gframeq.frameq_sz; +} + +EAPI int +evas_common_frameq_enabled(void) +{ + return gframeq.initialised; +} +#endif + +static RGBA_Pipe *evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op); +static void evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op); +static void evas_common_pipe_op_free(RGBA_Pipe_Op *op); + +/* utils */ +static RGBA_Pipe * +evas_common_pipe_add(RGBA_Pipe *rpipe, RGBA_Pipe_Op **op) +{ + RGBA_Pipe *p; + int first_pipe = 0; + + if (!rpipe) + { + first_pipe = 1; + p = calloc(1, sizeof(RGBA_Pipe)); + if (!p) return NULL; + rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p)); + } + p = (RGBA_Pipe *)(EINA_INLIST_GET(rpipe))->last; + if (p->op_num == PIPE_LEN) + { + p = calloc(1, sizeof(RGBA_Pipe)); + if (!p) return NULL; + rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p)); + } + p->op_num++; + *op = &(p->op[p->op_num - 1]); + if (first_pipe) + { + /* FIXME: PTHREAD init any thread locks etc */ + } + return rpipe; +} + +static void +evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op) +{ + memcpy(&(op->context), dc, sizeof(RGBA_Draw_Context)); + if (op->context.cutout.active > 0) + { + op->context.cutout.rects = malloc(sizeof(Cutout_Rect) * op->context.cutout.active); + memcpy(op->context.cutout.rects, dc->cutout.rects, sizeof(Cutout_Rect) * op->context.cutout.active); + } + else + { + op->context.cutout.rects = NULL; + } +} + +static void +evas_common_pipe_op_free(RGBA_Pipe_Op *op) +{ + evas_common_draw_context_apply_clean_cutouts(&op->context.cutout); +} + +#ifdef BUILD_PTHREAD +/* main api calls */ +static void * +evas_common_pipe_thread(void *data) +{ + Thinfo *thinfo; + +// INF("TH [..........."); + thinfo = data; + for (;;) + { + RGBA_Pipe_Thread_Info *info; + RGBA_Pipe *p; + + /* wait for start signal */ +// INF(" TH %i START...", thinfo->thread_num); + pthread_barrier_wait(&(thinfo->barrier[0])); + info = thinfo->info; +// if (info) +// { +// thinfo->info = NULL; +// INF(" TH %i GO", thinfo->thread_num); + EINA_INLIST_FOREACH(EINA_INLIST_GET(info->im->cache_entry.pipe), p) + { + int i; + + for (i = 0; i < p->op_num; i++) + { + if (p->op[i].op_func) + p->op[i].op_func(info->im, &(p->op[i]), info); + } + } + free(info); +// } +// INF(" TH %i DONE", thinfo->thread_num); + /* send finished signal */ + pthread_barrier_wait(&(thinfo->barrier[1])); + } + return NULL; +} + +#ifdef EVAS_FRAME_QUEUING +static void +evas_common_frameq_release(void *data) +{ + Evas_FrameQ *frameq; + Evas_Frameq_Thread_Info *fq_info; + Thinfo *thinfo; + + thinfo = data; + fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info); + frameq = fq_info->frameq; + + /* This thread may or may not own the mutex. + * But there's no way to determine the ownership of the mutex, so release it anyway + */ + LKU(frameq->mutex); +} + +static void * +evas_common_frameq_thread(void *data) +{ + Evas_FrameQ *frameq; + Evas_Frame *frame; + Evas_Surface *surface; + RGBA_Pipe *p; + Thinfo *thinfo; + Evas_Frameq_Thread_Info *fq_info; + RGBA_Pipe_Thread_Info p_info; + + thinfo = data; + fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info); + frameq = fq_info->frameq; + + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); + /* install thread cancelation cleanup handler */ + pthread_cleanup_push(evas_common_frameq_release, data); + + for (;;) + { + frame = NULL; + + /* 1. pick a frame to draw */ + LKL(frameq->mutex); + while(!frame) + { + EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), frame) + { + if (!frame->in_process) + { + frame->in_process = 1; + break; + } + } + if (frame) + { + break; + } + pthread_testcancel(); + eina_condition_wait(&(frameq->cond_new)); + } + LKU(frameq->mutex); + + /* 2. draw selected frame */ + EINA_INLIST_FOREACH(EINA_INLIST_GET(frame->surfaces), surface) + { + p_info.im = surface->im; + p_info.x = 0; + p_info.y = 0; + p_info.w = surface->im->cache_entry.w; + p_info.h = surface->im->cache_entry.h; + + EINA_INLIST_FOREACH(EINA_INLIST_GET(p_info.im->cache_entry.pipe), p) + { + int i; + + for (i = 0; i < p->op_num; i++) + { + if (p->op[i].op_func) + { + p->op[i].op_func(p_info.im, &(p->op[i]), &p_info); + } + } + } + + /* push surface out */ + if (! surface->dontpush) + { + frame->output_redraws_next_update_push(frame->data, + surface->im, surface->x, surface->y, surface->w, surface->h); + } + } + + // record frame ready time, will be used in post worker thread, evas_common_frameq_thread_post() + gettimeofday(&frame->ready_time, NULL); + + LKL(frameq->mutex); + frame->ready = 1; + eina_condition_signal(&(frameq->cond_ready)); + LKU(frameq->mutex); + } + + // Remove cleanup handler + pthread_cleanup_pop(0); + return NULL; +} + + +#define INTERVAL_QSIZE 17 // Actual size is 'INTERVAL_QSIZE - 1' because of not using index +#define SATISFACTION_THRESHOLD 4 // 4 ms --> 250 FPS +#define RESET_RATIO 4 // RESET_RATIO * [Average Ready Gap | get_max_interval()] --> Reset Threshold +#define DOUBLE_RESET_TIME_INTERVAL_THRESHOLD 16000 // make it double in case of less 16ms +#define RESET_ABSOLUTE_INTERVAL 600000 // 600 msec + +struct iq_node +{ + long long rt; + long long ri; +}; + +static struct iq_node _IQ[INTERVAL_QSIZE]; +static int _IQ_head = 0, _IQ_tail = 0; +static int _IQ_length = 0; +static long long min_ready, max_ready; +static long long average_interval; + +static int +_IQ_next_index(int i) +{ + return (i + 1) % INTERVAL_QSIZE; +} + +static int +_IQ_previous_index(int i) +{ + if (--i < 0) i += INTERVAL_QSIZE; + return i; +} + +static void +_IQ_init(void) +{ + _IQ_length = _IQ_head = _IQ_tail = 0; + min_ready = LLONG_MAX, max_ready = LLONG_MIN; + average_interval = 0; +} + +static int +_IQ_empty(void) +{ + return (_IQ_head == _IQ_tail) ? 1 : 0; +} + +static int +_IQ_full(void) +{ + return (_IQ_head == ((_IQ_tail + 1) % INTERVAL_QSIZE)) ? 1 : 0; +} + +static void +_IQ_insert(long long ready_time, long long last_interval) +{ + if (_IQ_full()) return; + + if (_IQ_empty()) + { + if (last_interval < 0) + { + last_interval = -last_interval; + } + _IQ[_IQ_tail].rt = ready_time; + _IQ[_IQ_tail].ri = last_interval; + min_ready = ready_time - last_interval; + max_ready = ready_time; + _IQ_tail = _IQ_next_index(_IQ_tail); + _IQ_length++; + } + else + { + if (max_ready < ready_time) + { + _IQ[_IQ_tail].rt = ready_time; + _IQ[_IQ_tail].ri = ready_time - max_ready; + _IQ_tail = _IQ_next_index(_IQ_tail); + _IQ_length++; + max_ready = ready_time; + } + else if (ready_time < min_ready) + { + last_interval = _IQ[_IQ_head].ri; + _IQ[_IQ_head].ri = _IQ[_IQ_head].rt - ready_time; + _IQ_head = _IQ_previous_index(_IQ_head); + _IQ[_IQ_head].rt = ready_time; + _IQ[_IQ_head].ri = last_interval; + min_ready = ready_time; + _IQ_length++; + } + else + { + int i, j, k, l = 0; + for (i = _IQ_head; i != _IQ_tail; i = j) + { + j = _IQ_next_index(i); + if (_IQ[j].rt < ready_time) + { + continue; + } + break; + } + for (k = _IQ_tail; k != j; k = l) + { + l = _IQ_previous_index(k); + _IQ[k] = _IQ[l]; + } + i = _IQ_next_index(j); + _IQ[j].ri -= (_IQ[j].rt - ready_time); + _IQ[j].rt = ready_time; + _IQ[i].ri = _IQ[i].rt - ready_time; + _IQ_tail = _IQ_next_index(_IQ_tail); + _IQ_length++; + } + } + average_interval = (max_ready - min_ready) / _IQ_length; +} + +static long long +_IQ_delete(void) +{ + struct iq_node oldest; + + if (_IQ_empty()) return 0; + oldest = _IQ[_IQ_head]; + _IQ_head = (_IQ_head + 1) % INTERVAL_QSIZE; + if ((--_IQ_length) == 0) + { + _IQ_init(); + } + else + { + min_ready = _IQ[_IQ_head].rt; + average_interval = (max_ready - min_ready) / _IQ_length; + } + + return oldest.ri; +} + +static long long +get_max_interval(void) +{ + int i; + long long max = LLONG_MIN; + + for ( i= _IQ_head ; i != _IQ_tail ; i = _IQ_next_index(i)) + { + if (_IQ[i].ri > max) + { + max = _IQ[i].ri; + } + } + + return max; +} + +static long long +tv_to_long_long(struct timeval *tv) +{ + if (!tv) + { + return 0; + } + + return tv->tv_sec * 1000000LL + tv->tv_usec; +} + +static long long +evas_common_frameq_schedule_flush_time(int frameq_sz, int thread_no, + long long last_ready_time, long long current_ready_time, + long long last_flush_time, int ready_frames_num, + int dont_schedule) +{ + // to get each time and to do others + long long current_time = 0LL; + long long current_ready_interval = 0LL; + long long theshold_time = SATISFACTION_THRESHOLD * 1000LL; // ms -> usec + long long reset_time_interval = 0LL; + long long sleep_time = 0LL; + long long saved_ready_time, saved_ready_interval; + long long time_slept = 0LL; + static long long time_lag = 0; + struct timeval now; + int frameq_full_threshold =0; + int need_reset = 0; + int need_schedule = 0; + + frameq_full_threshold = frameq_sz -thread_no; // Qsize - threads# + + /* 1.5 defer flush time of current frame if need */ + // in case of the first time, just keep ready time only + if (last_ready_time == 0LL) + { + last_ready_time = current_ready_time; + } + else + { + /* 1.5.1 get current ready time & interval */ + saved_ready_time = current_ready_time; + saved_ready_interval = current_ready_interval = current_ready_time - last_ready_time; + // compensate a case which current ready time is older than previous one, + // doesn't work on the interval queue + if (current_ready_interval < 0) + { + current_ready_time = last_ready_time; + current_ready_interval = 0; + } + + /* 1.5.2 get the reset time interval before keeping a new one */ + if (!_IQ_empty()) + { + reset_time_interval = RESET_RATIO * average_interval; + if (average_interval < DOUBLE_RESET_TIME_INTERVAL_THRESHOLD) + { + reset_time_interval *= 2; + } + } + + /* 1.5.3 reset - if too late, discard all saved interval and start from here */ + if (current_ready_interval > RESET_ABSOLUTE_INTERVAL) + { + need_reset = 1; + } + else if (_IQ_length >= thread_no * 2 && current_ready_interval > reset_time_interval) + { + need_reset = 1; + } + else if (_IQ_length >= thread_no && _IQ_length < thread_no * 2 + && current_ready_interval > get_max_interval() * RESET_RATIO) + { + need_reset = 1; + } + + if (need_reset) + { + _IQ_init(); + } + else + { + /* 1.5.4 enqueue - keep a new interval for next average interval */ + if (_IQ_full()) + { + _IQ_delete(); + } + _IQ_insert(saved_ready_time, saved_ready_interval); + + /* 1.5.5 schedule - if faster than average interval, figure out sleep time to meet it */ + if (!dont_schedule) + { + need_schedule = 0; + sleep_time = 0; + if (_IQ_length >= thread_no * 2 && average_interval > theshold_time) + { + need_schedule = 1; + } + // compensate the case that postworker blocks the workers from getting a new fresh frame + // It's actually occurred when during the wait time of postworker, the frame queue is full + // Consequently check the number of currently ready frames and apply some time drop to average time according to the number + if (ready_frames_num >= frameq_full_threshold) + { + need_schedule = 0; + } + if (need_schedule) + { + gettimeofday(&now, NULL); + current_time = tv_to_long_long(&now); + time_lag += (current_time - last_flush_time); + sleep_time = (average_interval < time_lag) ? 0 : (average_interval - time_lag); + } + } + + /* 1.5.6 sleep - actually sleep and get over-slept time (time_lag) for next frame */ + if (sleep_time > 0) + { + sleep_time = sleep_time * 9 / 10; + usleep((unsigned int)sleep_time); + gettimeofday(&now, NULL); + time_slept = tv_to_long_long(&now) - current_time; + time_lag = time_slept - sleep_time; + } + else + { + time_lag = 0; + } + } + last_ready_time = current_ready_time; + } + + return last_ready_time; +} + +static void * +evas_common_frameq_thread_post(void *data) +{ + Evas_FrameQ *frameq; + Evas_Frame *frame; + Evas_Surface *surface; + Thinfo *thinfo; + Evas_Frameq_Thread_Info *fq_info; + Eina_List *pending_writes = NULL; + Eina_List *prev_pending_writes = NULL; + + long long last_ready_time = 0LL; + long long current_ready_time; + Evas_Frame *temp_frame = NULL; + int ready_frames_num; + long long last_flush_time = 0LL; + struct timeval now; + int dont_schedule = 0; + + thinfo = data; + fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info); + frameq = fq_info->frameq; + + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); + /* install thread cancelation cleanup handler */ + pthread_cleanup_push(evas_common_frameq_release, data); + + _IQ_init(); + + for (;;) + { + /* 1. wait the first frame being done */ + LKL(frameq->mutex); + while(!frameq->frames || !frameq->frames->ready) + { + eina_condition_wait(&(frameq->cond_ready)); + } + frame = frameq->frames; + + /* 1.5. prepare to schedule flush time */ + current_ready_time = tv_to_long_long(&frame->ready_time); + ready_frames_num = 0; + EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), temp_frame) + { + if (temp_frame->ready == 1) + { + ready_frames_num++; + } + } + dont_schedule = (frame->dont_schedule)?1:0; + LKU(frameq->mutex); + + /* 2. generate pending_writes */ + EINA_INLIST_FOREACH(EINA_INLIST_GET(frame->surfaces), surface) + { + evas_common_pipe_flush(surface->im); + if (! surface->dontpush) + { + pending_writes = eina_list_append(pending_writes, surface->im); + } + } + + /* 2.5. schedule flush time */ + last_ready_time = evas_common_frameq_schedule_flush_time( + frameq->frameq_sz, frameq->thread_num, + last_ready_time, current_ready_time, + last_flush_time, ready_frames_num, dont_schedule); + + /* 3. flush redraws */ + frame->output_set_priv(frame->data, pending_writes, prev_pending_writes); + frame->output_flush(frame->data); + gettimeofday(&now, NULL); + // keep as the last flush time + last_flush_time = now.tv_sec * 1000000LL + now.tv_usec; + + prev_pending_writes = pending_writes; + pending_writes = NULL; + + /* 4. remove this frame from the frame queue */ + LKL(frameq->mutex); + frameq->frames = + (Evas_Frame *)eina_inlist_remove(EINA_INLIST_GET(frameq->frames), + EINA_INLIST_GET(frame)); + + LKU(frameq->mutex); + eina_condition_broadcast(&frameq->cond_done); + evas_common_frame_dealloc(frame); + } + + // Remove cleanup handler + pthread_cleanup_pop(0); + return NULL; +} + +#endif /* EVAS_FRAME_QUEUING */ +#endif + +#ifdef BUILD_PTHREAD +static int thread_num = 0; +static Thinfo thinfo[TH_MAX]; +static pthread_barrier_t thbarrier[2]; +#endif + +static void +evas_common_pipe_begin(RGBA_Image *im) +{ +#ifdef BUILD_PTHREAD + int i, y, h; + +#ifdef EVAS_FRAME_QUEUING + return; +#endif + + if (!im->cache_entry.pipe) return; + if (thread_num == 1) return; + y = 0; + h = im->cache_entry.h / thread_num; + if (h < 1) h = 1; + for (i = 0; i < thread_num; i++) + { + RGBA_Pipe_Thread_Info *info; + +// if (y >= im->cache_entry.h) break; + info = calloc(1, sizeof(RGBA_Pipe_Thread_Info)); + info->im = im; +#ifdef EVAS_SLI + info->x = 0; + info->w = im->cache_entry.w; + info->y = i; + info->h = thread_num; +#else + info->x = 0; + info->y = y; + info->w = im->cache_entry.w; + if (i == (thread_num - 1)) + { + info->h = im->cache_entry.h - y; + } + else + { + info->h = h; + } + y += info->h; +#endif + thinfo[i].info = info; + } + /* tell worker threads to start */ + pthread_barrier_wait(&(thbarrier[0])); +#endif +} + +#ifdef EVAS_FRAME_QUEUING +EAPI void +evas_common_frameq_begin(void) +{ +#ifdef BUILD_PTHREAD + int i; + Evas_Frameq_Thread_Info *fp_info; + pthread_attr_t attr; + cpu_set_t cpu; + + if (!gframeq.initialised) + { + int cpunum, set_cpu_affinity = 0; + + cpunum = eina_cpu_count(); + gframeq.thread_num = cpunum; + gframeq.frameq_sz = cpunum * FRAMEQ_SZ_PER_THREAD; + + eina_threads_init(); + + for (i = 0; i < gframeq.thread_num; i++) + { + + fp_info = calloc(1, sizeof(Evas_Frameq_Thread_Info)); + fp_info->frameq = &gframeq; + + gframeq.thinfo[i].thread_num = i; + gframeq.thinfo[i].fq_info = fp_info; + + pthread_attr_init(&attr); + if (set_cpu_affinity) + { + CPU_ZERO(&cpu); + CPU_SET((i+1) % cpunum, &cpu); + pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); + } + + pthread_create(&(gframeq.thinfo[i].thread_id), &attr, + evas_common_frameq_thread, &(gframeq.thinfo[i])); + + pthread_attr_destroy(&attr); + pthread_detach(gframeq.thinfo[i].thread_id); + } + + { + fp_info = calloc(1, sizeof(Evas_Frameq_Thread_Info)); + fp_info->frameq = &gframeq; + + gframeq.thinfo[i].thread_num = i; + gframeq.thinfo[i].fq_info = fp_info; + + pthread_attr_init(&attr); + if (set_cpu_affinity) + { + CPU_ZERO(&cpu); + CPU_SET((i+1) % cpunum, &cpu); + pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); + } + + pthread_create(&(gframeq.thinfo[i].thread_id), &attr, + evas_common_frameq_thread_post, &(gframeq.thinfo[i])); + pthread_attr_destroy(&attr); + pthread_detach(gframeq.thinfo[i].thread_id); + } + gframeq.initialised = 1; // now worker threads are created. + + INF("initialised"); + DBG("%d cpus, set_cpu_affinity=%d, frameq_sz=%d", + cpunum, set_cpu_affinity, gframeq.frameq_sz); + } +#endif /* BUILD_PTHREAD */ +} + +EAPI void +evas_common_frameq_finish(void) +{ + int i; + + /* 1. cancel all worker threads */ + for (i = 0; i < gframeq.thread_num; i++) + { + pthread_cancel(gframeq.thinfo[i].thread_id); + } + // cancel post-worker thread + pthread_cancel(gframeq.thinfo[i].thread_id); + + /* 2. send signal to worker threads so that they enter to the thread cancelation cleanup handler */ + for (i = 0; i < gframeq.thread_num; i++) + { + eina_condition_signal(&(gframeq.cond_new)); + } + // send signal to post-worker thread + eina_condition_signal(&(gframeq.cond_ready)); + + /* all the workers were created and detached before + * so don't need to join them here. + */ + +} + +#endif /* EVAS_FRAME_QUEUING */ + +EAPI void +evas_common_pipe_flush(RGBA_Image *im) +{ + if (!im->cache_entry.pipe) return; +#ifndef EVAS_FRAME_QUEUING +#ifdef BUILD_PTHREAD + if (thread_num > 1) + { + /* sync worker threads */ + pthread_barrier_wait(&(thbarrier[1])); + } + else +#endif + { + RGBA_Pipe *p; + int i; + + /* process pipe - 1 thead */ + for (p = im->cache_entry.pipe; p; p = (RGBA_Pipe *)(EINA_INLIST_GET(p))->next) + { + for (i = 0; i < p->op_num; i++) + { + if (p->op[i].op_func) + { + p->op[i].op_func(im, &(p->op[i]), NULL); + } + } + } + } +#endif /* !EVAS_FRAME_QUEUING */ + evas_common_cpu_end_opt(); + evas_common_pipe_free(im); +} + +EAPI void +evas_common_pipe_free(RGBA_Image *im) +{ + + RGBA_Pipe *p; + int i; + + if (!im->cache_entry.pipe) return; + /* FIXME: PTHREAD join all threads here (if not finished) */ + + /* free pipe */ + while (im->cache_entry.pipe) + { + p = im->cache_entry.pipe; + for (i = 0; i < p->op_num; i++) + { + if (p->op[i].free_func) + { + p->op[i].free_func(&(p->op[i])); + } + } + im->cache_entry.pipe = (RGBA_Pipe *)eina_inlist_remove(EINA_INLIST_GET(im->cache_entry.pipe), EINA_INLIST_GET(p)); + free(p); + } +} + + + +/* draw ops */ +/**************** RECT ******************/ +static void +evas_common_pipe_rectangle_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) +{ + if (info) + { + RGBA_Draw_Context context; + + memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); +#ifdef EVAS_SLI + evas_common_draw_context_set_sli(&(context), info->y, info->h); +#else + evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); +#endif + evas_common_rectangle_draw(dst, &(context), + op->op.rect.x, op->op.rect.y, + op->op.rect.w, op->op.rect.h); + } + else + { + evas_common_rectangle_draw(dst, &(op->context), + op->op.rect.x, op->op.rect.y, + op->op.rect.w, op->op.rect.h); + } +} + +EAPI void +evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) +{ + RGBA_Pipe_Op *op; + + if ((w < 1) || (h < 1)) return; + dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); + if (!dst->cache_entry.pipe) return; + op->op.rect.x = x; + op->op.rect.y = y; + op->op.rect.w = w; + op->op.rect.h = h; + op->op_func = evas_common_pipe_rectangle_draw_do; + op->free_func = evas_common_pipe_op_free; + evas_common_pipe_draw_context_copy(dc, op); +} + +/**************** LINE ******************/ +static void +evas_common_pipe_line_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) +{ + if (info) + { + RGBA_Draw_Context context; + + memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); +#ifdef EVAS_SLI + evas_common_draw_context_set_sli(&(context), info->y, info->h); +#else + evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); +#endif + evas_common_line_draw(dst, &(context), + op->op.line.x0, op->op.line.y0, + op->op.line.x1, op->op.line.y1); + } + else + { + evas_common_line_draw(dst, &(op->context), + op->op.line.x0, op->op.line.y0, + op->op.line.x1, op->op.line.y1); + } +} + +EAPI void +evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, + int x0, int y0, int x1, int y1) +{ + RGBA_Pipe_Op *op; + + dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); + if (!dst->cache_entry.pipe) return; + op->op.line.x0 = x0; + op->op.line.y0 = y0; + op->op.line.x1 = x1; + op->op.line.y1 = y1; + op->op_func = evas_common_pipe_line_draw_do; + op->free_func = evas_common_pipe_op_free; + evas_common_pipe_draw_context_copy(dc, op); +} + +/**************** POLY ******************/ +static void +evas_common_pipe_op_poly_free(RGBA_Pipe_Op *op) +{ + RGBA_Polygon_Point *p; + + while (op->op.poly.points) + { + p = op->op.poly.points; + op->op.poly.points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(op->op.poly.points), + EINA_INLIST_GET(p)); + free(p); + } + evas_common_pipe_op_free(op); +} + +static void +evas_common_pipe_poly_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) +{ + if (info) + { + RGBA_Draw_Context context; + + memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); +#ifdef EVAS_SLI + evas_common_draw_context_set_sli(&(context), info->y, info->h); +#else + evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); +#endif + evas_common_polygon_draw(dst, &(context), + op->op.poly.points, 0, 0); + } + else + { + evas_common_polygon_draw(dst, &(op->context), + op->op.poly.points, 0, 0); + } +} + +EAPI void +evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, + RGBA_Polygon_Point *points, int x, int y) +{ + RGBA_Pipe_Op *op; + RGBA_Polygon_Point *pts = NULL, *p, *pp; + + if (!points) return; + dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); + if (!dst->cache_entry.pipe) return; + /* FIXME: copy points - maybe we should refcount? */ + for (p = points; p; p = (RGBA_Polygon_Point *)(EINA_INLIST_GET(p))->next) + { + pp = calloc(1, sizeof(RGBA_Polygon_Point)); + if (pp) + { + pp->x = p->x + x; + pp->y = p->y + y; + pts = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(pts), EINA_INLIST_GET(pp)); + } + } + op->op.poly.points = pts; + op->op_func = evas_common_pipe_poly_draw_do; + op->free_func = evas_common_pipe_op_poly_free; + evas_common_pipe_draw_context_copy(dc, op); +} + +/**************** TEXT ******************/ +static void +evas_common_pipe_op_text_free(RGBA_Pipe_Op *op) +{ +#ifdef EVAS_FRAME_QUEUING + LKL(op->op.text.font->ref_fq_del); + op->op.text.font->ref_fq[1]++; + LKU(op->op.text.font->ref_fq_del); + eina_condition_signal(&(op->op.text.font->cond_fq_del)); +#else + evas_common_font_free(op->op.text.font); +#endif + evas_common_text_props_content_unref(&(op->op.text.intl_props)); + evas_common_pipe_op_free(op); +} + +#ifdef EVAS_FRAME_QUEUING +/* flush all op using @fn */ +EAPI void +evas_common_pipe_op_text_flush(RGBA_Font *fn) +{ + if (! evas_common_frameq_enabled()) + return; + + LKL(fn->ref_fq_add); + LKL(fn->ref_fq_del); + + while (fn->ref_fq[0] != fn->ref_fq[1]) + eina_condition_wait(&(fn->cond_fq_del)); + + LKU(fn->ref_fq_del); + LKU(fn->ref_fq_add); +} +#endif + +static void +evas_common_pipe_text_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) +{ + if (info) + { + RGBA_Draw_Context context; + + memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); +#ifdef EVAS_SLI + evas_common_draw_context_set_sli(&(context), info->y, info->h); +#else + evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); +#endif + evas_common_font_draw(dst, &(context), + op->op.text.font, op->op.text.x, op->op.text.y, + &op->op.text.intl_props); + } + else + { + evas_common_font_draw(dst, &(op->context), + op->op.text.font, op->op.text.x, op->op.text.y, + &op->op.text.intl_props); + } +} + +EAPI void +evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, + RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props) +{ + RGBA_Pipe_Op *op; + + if (!fn) return; + dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); + if (!dst->cache_entry.pipe) return; + op->op.text.x = x; + op->op.text.y = y; + evas_common_text_props_content_copy_and_ref(&(op->op.text.intl_props), + intl_props); +#ifdef EVAS_FRAME_QUEUING + LKL(fn->ref_fq_add); + fn->ref_fq[0]++; + LKU(fn->ref_fq_add); +#else + fn->references++; +#endif + op->op.text.font = fn; + op->op_func = evas_common_pipe_text_draw_do; + op->free_func = evas_common_pipe_op_text_free; + evas_common_pipe_draw_context_copy(dc, op); +} + +/**************** IMAGE *****************/ +static void +evas_common_pipe_op_image_free(RGBA_Pipe_Op *op) +{ +#ifdef EVAS_FRAME_QUEUING + LKL(op->op.image.src->cache_entry.ref_fq_del); + op->op.image.src->cache_entry.ref_fq[1]++; + LKU(op->op.image.src->cache_entry.ref_fq_del); + eina_condition_signal(&(op->op.image.src->cache_entry.cond_fq_del)); +#else + op->op.image.src->ref--; + if (op->op.image.src->ref == 0) + { + evas_cache_image_drop(&op->op.image.src->cache_entry); + } +#endif + evas_common_pipe_op_free(op); +} + +#ifdef EVAS_FRAME_QUEUING +EAPI void +evas_common_pipe_op_image_flush(RGBA_Image *im) +{ + if (! evas_common_frameq_enabled()) + return; + + LKL(im->cache_entry.ref_fq_add); + LKL(im->cache_entry.ref_fq_del); + + while (im->cache_entry.ref_fq[0] != im->cache_entry.ref_fq[1]) + eina_condition_wait(&(im->cache_entry.cond_fq_del)); + + LKU(im->cache_entry.ref_fq_del); + LKU(im->cache_entry.ref_fq_add); +} +#endif + +static void +evas_common_pipe_image_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) +{ + if (info) + { + RGBA_Draw_Context context; + + memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); +#ifdef EVAS_SLI + evas_common_draw_context_set_sli(&(context), info->y, info->h); +#else + evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); +#endif + +#ifdef SCALECACHE + evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src), + dst, &(context), + op->op.image.smooth, + op->op.image.sx, + op->op.image.sy, + op->op.image.sw, + op->op.image.sh, + op->op.image.dx, + op->op.image.dy, + op->op.image.dw, + op->op.image.dh); +#else + if (op->op.image.smooth) + { + evas_common_scale_rgba_in_to_out_clip_smooth(op->op.image.src, + dst, &(context), + op->op.image.sx, + op->op.image.sy, + op->op.image.sw, + op->op.image.sh, + op->op.image.dx, + op->op.image.dy, + op->op.image.dw, + op->op.image.dh); + } + else + { + evas_common_scale_rgba_in_to_out_clip_sample(op->op.image.src, + dst, &(context), + op->op.image.sx, + op->op.image.sy, + op->op.image.sw, + op->op.image.sh, + op->op.image.dx, + op->op.image.dy, + op->op.image.dw, + op->op.image.dh); + } +#endif + } + else + { +#ifdef SCALECACHE + evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src), + dst, &(op->context), + op->op.image.smooth, + op->op.image.sx, + op->op.image.sy, + op->op.image.sw, + op->op.image.sh, + op->op.image.dx, + op->op.image.dy, + op->op.image.dw, + op->op.image.dh); +#else + if (op->op.image.smooth) + { + evas_common_scale_rgba_in_to_out_clip_smooth(op->op.image.src, + dst, &(op->context), + op->op.image.sx, + op->op.image.sy, + op->op.image.sw, + op->op.image.sh, + op->op.image.dx, + op->op.image.dy, + op->op.image.dw, + op->op.image.dh); + } + else + { + evas_common_scale_rgba_in_to_out_clip_sample(op->op.image.src, + dst, &(op->context), + op->op.image.sx, + op->op.image.sy, + op->op.image.sw, + op->op.image.sh, + op->op.image.dx, + op->op.image.dy, + op->op.image.dw, + op->op.image.dh); + } +#endif + } +} + +EAPI void +evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, int smooth, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h) +{ + RGBA_Pipe_Op *op; + + if (!src) return; +// evas_common_pipe_flush(src); + dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); + if (!dst->cache_entry.pipe) return; + op->op.image.smooth = smooth; + op->op.image.sx = src_region_x; + op->op.image.sy = src_region_y; + op->op.image.sw = src_region_w; + op->op.image.sh = src_region_h; + op->op.image.dx = dst_region_x; + op->op.image.dy = dst_region_y; + op->op.image.dw = dst_region_w; + op->op.image.dh = dst_region_h; +#ifdef EVAS_FRAME_QUEUING + LKL(src->cache_entry.ref_fq_add); + src->cache_entry.ref_fq[0]++; + LKU(src->cache_entry.ref_fq_add); +#else + src->ref++; +#endif + op->op.image.src = src; + op->op_func = evas_common_pipe_image_draw_do; + op->free_func = evas_common_pipe_op_image_free; + evas_common_pipe_draw_context_copy(dc, op); + +#ifdef EVAS_FRAME_QUEUING + /* laod every src image here. + * frameq utilize all cpu cores already by worker threads + * so another threads and barrier waiting can't be of any benefit. + * therefore, not instantiate loader threads. + */ + if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888) + evas_cache_image_load_data(&src->cache_entry); + evas_common_image_colorspace_normalize(src); +#else + evas_common_pipe_image_load(src); +#endif +} + +static void +evas_common_pipe_op_map_free(RGBA_Pipe_Op *op) +{ +#ifdef EVAS_FRAME_QUEUING + LKL(op->op.image.src->cache_entry.ref_fq_del); + op->op.image.src->cache_entry.ref_fq[1]++; + LKU(op->op.image.src->cache_entry.ref_fq_del); +#else + op->op.map.src->ref--; + if (op->op.map.src->ref == 0) + evas_cache_image_drop(&op->op.map.src->cache_entry); +#endif + free(op->op.map.p); + evas_common_pipe_op_free(op); +} + +static void +evas_common_pipe_map_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) +{ + if (info) + { + RGBA_Draw_Context context; + + memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); +#ifdef EVAS_SLI + evas_common_draw_context_set_sli(&(context), info->y, info->h); +#else + evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); +#endif + + evas_common_map_rgba(op->op.map.src, dst, + &context, op->op.map.npoints, op->op.map.p, + op->op.map.smooth, op->op.map.level); + } + else + { + evas_common_map_rgba(op->op.map.src, dst, + &(op->context), op->op.map.npoints, op->op.map.p, + op->op.map.smooth, op->op.map.level); + } +} + +EAPI void +evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, int npoints, RGBA_Map_Point *p, + int smooth, int level) +{ + RGBA_Pipe_Op *op; + RGBA_Map_Point *pts_copy; + int i; + + if (!src) return; + pts_copy = malloc(sizeof (RGBA_Map_Point) * 4); + if (!pts_copy) return; + dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); + if (!dst->cache_entry.pipe) + { + free(pts_copy); + return; + } + + for (i = 0; i < 4; ++i) + pts_copy[i] = p[i]; + + op->op.map.npoints = npoints; + op->op.map.smooth = smooth; + op->op.map.level = level; +#ifdef EVAS_FRAME_QUEUING + LKL(src->cache_entry.ref_fq_add); + src->cache_entry.ref_fq[0]++; + LKU(src->cache_entry.ref_fq_add); +#else + src->ref++; +#endif + op->op.map.src = src; + op->op.map.p = pts_copy; + op->op_func = evas_common_pipe_map_draw_do; + op->free_func = evas_common_pipe_op_map_free; + evas_common_pipe_draw_context_copy(dc, op); + +#ifdef EVAS_FRAME_QUEUING + /* laod every src image here. + * frameq utilize all cpu cores already by worker threads + * so another threads and barrier waiting can't be of any benefit. + * therefore, not instantiate loader threads. + */ + if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888) + evas_cache_image_load_data(&src->cache_entry); + evas_common_image_colorspace_normalize(src); +#else + evas_common_pipe_image_load(src); +#endif +} + +static void +evas_common_pipe_map_render(RGBA_Image *root) +{ + RGBA_Pipe *p; + int i; + + /* Map imply that we need to process them recursively first. */ + for (p = root->cache_entry.pipe; p; p = (RGBA_Pipe *)(EINA_INLIST_GET(p))->next) + { + for (i = 0; i < p->op_num; i++) + { + if (p->op[i].op_func == evas_common_pipe_map_draw_do) + { + if (p->op[i].op.map.src->cache_entry.pipe) + evas_common_pipe_map_render(p->op[i].op.map.src); + } + else if (p->op[i].op_func == evas_common_pipe_image_draw_do) + { + if (p->op[i].op.image.src->cache_entry.pipe) + evas_common_pipe_map_render(p->op[i].op.image.src); + } + } + } + + evas_common_pipe_begin(root); + evas_common_pipe_flush(root); +} + +#ifdef BUILD_PTHREAD +static Eina_List *task = NULL; +static Thinfo task_thinfo[TH_MAX]; +static pthread_barrier_t task_thbarrier[2]; +static LK(task_mutext); +#endif + +#ifdef BUILD_PTHREAD +static void* +evas_common_pipe_load(void *data) +{ + Thinfo *tinfo; + + tinfo = data; + for (;;) + { + /* wait for start signal */ + pthread_barrier_wait(&(tinfo->barrier[0])); + + while (task) + { + RGBA_Image *im = NULL; + + LKL(task_mutext); + im = eina_list_data_get(task); + task = eina_list_remove_list(task, task); + LKU(task_mutext); + + if (im) + { + if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) + evas_cache_image_load_data(&im->cache_entry); + evas_common_image_colorspace_normalize(im); + + im->flags &= ~RGBA_IMAGE_TODO_LOAD; + } + } + + /* send finished signal */ + pthread_barrier_wait(&(tinfo->barrier[1])); + } + + return NULL; +} +#endif + +static volatile int bval = 0; + +static void +evas_common_pipe_image_load_do(void) +{ +#ifdef BUILD_PTHREAD + /* Notify worker thread. */ + pthread_barrier_wait(&(task_thbarrier[0])); + + /* sync worker threads */ + pthread_barrier_wait(&(task_thbarrier[1])); +#endif +} + +static Eina_Bool +evas_common_pipe_init(void) +{ +#ifdef BUILD_PTHREAD + if (thread_num == 0) + { + int cpunum; + int i; + + cpunum = eina_cpu_count(); + thread_num = cpunum; +// on single cpu we still want this initted.. otherwise we block forever +// waiting onm pthread barriers for async rendering on a single core! +// if (thread_num == 1) return EINA_FALSE; + + eina_threads_init(); + + LKI(task_mutext); + + pthread_barrier_init(&(thbarrier[0]), NULL, thread_num + 1); + pthread_barrier_init(&(thbarrier[1]), NULL, thread_num + 1); + for (i = 0; i < thread_num; i++) + { + pthread_attr_t attr; + cpu_set_t cpu; + + pthread_attr_init(&attr); + CPU_ZERO(&cpu); + CPU_SET(i % cpunum, &cpu); + pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); + thinfo[i].thread_num = i; + thinfo[i].info = NULL; + thinfo[i].barrier = thbarrier; + /* setup initial locks */ + pthread_create(&(thinfo[i].thread_id), &attr, + evas_common_pipe_thread, &(thinfo[i])); + pthread_attr_destroy(&attr); + } + + pthread_barrier_init(&(task_thbarrier[0]), NULL, thread_num + 1); + pthread_barrier_init(&(task_thbarrier[1]), NULL, thread_num + 1); + for (i = 0; i < thread_num; i++) + { + pthread_attr_t attr; + cpu_set_t cpu; + + pthread_attr_init(&attr); + CPU_ZERO(&cpu); + CPU_SET(i % cpunum, &cpu); + pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); + task_thinfo[i].thread_num = i; + task_thinfo[i].info = NULL; + task_thinfo[i].barrier = task_thbarrier; + /* setup initial locks */ + pthread_create(&(task_thinfo[i].thread_id), &attr, + evas_common_pipe_load, &(task_thinfo[i])); + pthread_attr_destroy(&attr); + } + } + + if (thread_num == 1) return EINA_FALSE; + return EINA_TRUE; +#endif + return EINA_FALSE; +} + +EAPI void +evas_common_pipe_image_load(RGBA_Image *im) +{ + if (im->flags & RGBA_IMAGE_TODO_LOAD) + return ; + + if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888 + && !evas_cache_image_is_loaded(&(im->cache_entry))) + goto add_task; + + if ((!im->cs.data) || ((!im->cs.dirty) && (!(im->flags & RGBA_IMAGE_IS_DIRTY)))) + goto add_task; + + return ; + + add_task: + task = eina_list_append(task, im); + im->flags |= RGBA_IMAGE_TODO_LOAD; +} + +EAPI void +evas_common_pipe_map_begin(RGBA_Image *root) +{ + if (!evas_common_pipe_init()) + { + RGBA_Image *im; + + EINA_LIST_FREE(task, im) + { + if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) + evas_cache_image_load_data(&im->cache_entry); + evas_common_image_colorspace_normalize(im); + + im->flags &= ~RGBA_IMAGE_TODO_LOAD; + } + } + + evas_common_pipe_image_load_do(); + + evas_common_pipe_map_render(root); +} + +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_pipe.h b/libraries/evas/src/lib/engines/common/evas_pipe.h new file mode 100644 index 0000000..37b0136 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_pipe.h @@ -0,0 +1,111 @@ +#ifndef _EVAS_PIPE_H +#define _EVAS_PIPE_H + +#include +#include "language/evas_bidi_utils.h" + +#ifdef BUILD_PTHREAD +typedef struct _Thinfo +{ + int thread_num; + pthread_t thread_id; + pthread_barrier_t *barrier; + RGBA_Pipe_Thread_Info *info; +# ifdef EVAS_FRAME_QUEUING + void *fq_info; +#endif +} Thinfo; +#endif + +#ifdef EVAS_FRAME_QUEUING +struct _Evas_Surface +{ + EINA_INLIST; + RGBA_Image *im; + int x, y, w, h; + int dontpush; // dont push the surface out after drawing done +}; +typedef struct _Evas_Surface Evas_Surface; + +struct _Evas_Frame +{ + EINA_INLIST; + Evas_Surface *surfaces; + void *data; + int in_process; + int ready; + int dont_schedule; + struct timeval ready_time; + + void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h); + void (*output_flush) (void *data); + void (*output_set_priv)(void *data, void *cur, void *prev); +}; +typedef struct _Evas_Frame Evas_Frame; + + +struct _Evas_FrameQ +{ + int initialised; + Evas_Frame *frames; + Eina_Condition cond_new; + Eina_Condition cond_ready; + Eina_Condition cond_done; + LK(mutex); + + int thread_num; + Thinfo thinfo[TH_MAX]; + int frameq_sz; + + Evas_Frame *cur_frame; +}; +typedef struct _Evas_FrameQ Evas_FrameQ; +#define FRAMEQ_SZ_PER_THREAD 2 + +struct _Evas_Frameq_Thread_Info +{ + Evas_FrameQ *frameq; +}; +typedef struct _Evas_Frameq_Thread_Info Evas_Frameq_Thread_Info; + +EAPI Evas_Surface *evas_common_frameq_new_surface(void *surface, int x, int y, int w, int h); +EAPI void evas_common_frameq_add_surface(Evas_Surface *surface); +EAPI void evas_common_frameq_set_frame_data(void *data, + void (*fn_output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h), + void (*fn_output_flush) (void *data), + void (*fn_output_set_priv)(void *data, void *cur, void *prev)); +EAPI void evas_common_frameq_prepare_frame(void); +EAPI void evas_common_frameq_ready_frame(void); +EAPI void evas_common_frameq_init(void); +EAPI void evas_common_frameq_destroy(void); +EAPI void evas_common_frameq_flush(void); +EAPI void evas_common_frameq_flush_ready(void); +EAPI int evas_common_frameq_get_frameq_sz(void); +EAPI int evas_common_frameq_enabled(void); +EAPI void evas_common_frameq_begin(void); +EAPI void evas_common_frameq_finish(void); +#endif + +/* image rendering pipelines... new optional system - non-immediate and + * threadable + */ + +EAPI void evas_common_pipe_free(RGBA_Image *im); +EAPI void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); +EAPI void evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); +EAPI void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); +EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props); +EAPI void evas_common_pipe_image_load(RGBA_Image *im); +EAPI void evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); +EAPI void evas_common_pipe_map_begin(RGBA_Image *root); +EAPI void evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, int npoints, RGBA_Map_Point *p, + int smooth, int level); +EAPI void evas_common_pipe_flush(RGBA_Image *im); + +#ifdef EVAS_FRAME_QUEUING +EAPI void evas_common_pipe_op_text_flush(RGBA_Font *fn); +EAPI void evas_common_pipe_op_image_flush(RGBA_Image *im); +#endif + +#endif /* _EVAS_PIPE_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_polygon.h b/libraries/evas/src/lib/engines/common/evas_polygon.h new file mode 100644 index 0000000..0695f54 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_polygon.h @@ -0,0 +1,13 @@ +#ifndef _EVAS_POLYGON_H +#define _EVAS_POLYGON_H + + +EAPI void evas_common_polygon_init (void); + +EAPI RGBA_Polygon_Point *evas_common_polygon_point_add (RGBA_Polygon_Point *points, int x, int y); +EAPI RGBA_Polygon_Point *evas_common_polygon_points_clear (RGBA_Polygon_Point *points); +EAPI void evas_common_polygon_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); + + +#endif /* _EVAS_POLYGON_H */ + diff --git a/libraries/evas/src/lib/engines/common/evas_polygon_main.c b/libraries/evas/src/lib/engines/common/evas_polygon_main.c new file mode 100644 index 0000000..bca3f83 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_polygon_main.c @@ -0,0 +1,293 @@ +#include + +#include "evas_common.h" +#include "evas_blend_private.h" + +typedef struct _RGBA_Span RGBA_Span; +typedef struct _RGBA_Edge RGBA_Edge; +typedef struct _RGBA_Vertex RGBA_Vertex; + +struct _RGBA_Span +{ + EINA_INLIST; + int x, y, w; +}; + +struct _RGBA_Edge +{ + double x, dx; + int i; +}; + +struct _RGBA_Vertex +{ + double x, y; + int i; +}; + +#define POLY_EDGE_DEL(_i) \ +{ \ + int _j; \ + \ + for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ + if (_j < num_active_edges) \ + { \ + num_active_edges--; \ + memmove(&(edges[_j]), &(edges[_j + 1]), \ + (num_active_edges - _j) * sizeof(RGBA_Edge)); \ + } \ +} + +#define POLY_EDGE_ADD(_i, _y) \ +{ \ + int _j; \ + float _dx; \ + RGBA_Vertex *_p, *_q; \ + if (_i < (n - 1)) _j = _i + 1; \ + else _j = 0; \ + if (point[_i].y < point[_j].y) \ + { \ + _p = &(point[_i]); \ + _q = &(point[_j]); \ + } \ + else \ + { \ + _p = &(point[_j]); \ + _q = &(point[_i]); \ + } \ + edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ + edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ + edges[num_active_edges].i = _i; \ + num_active_edges++; \ +} + +EAPI void +evas_common_polygon_init(void) +{ +} + +EAPI RGBA_Polygon_Point * +evas_common_polygon_point_add(RGBA_Polygon_Point *points, int x, int y) +{ + RGBA_Polygon_Point *pt; + + pt = malloc(sizeof(RGBA_Polygon_Point)); + if (!pt) return points; + pt->x = x; + pt->y = y; + points = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(points), EINA_INLIST_GET(pt)); + return points; +} + +EAPI RGBA_Polygon_Point * +evas_common_polygon_points_clear(RGBA_Polygon_Point *points) +{ + if (points) + { + while (points) + { + RGBA_Polygon_Point *old_p; + + old_p = points; + points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(points), EINA_INLIST_GET(points)); + free(old_p); + } + } + return NULL; +} + +static int +polygon_point_sorter(const void *a, const void *b) +{ + RGBA_Vertex *p, *q; + + p = (RGBA_Vertex *)a; + q = (RGBA_Vertex *)b; + if (p->y <= q->y) return -1; + return 1; +} + +static int +polygon_edge_sorter(const void *a, const void *b) +{ + RGBA_Edge *p, *q; + + p = (RGBA_Edge *)a; + q = (RGBA_Edge *)b; + if (p->x <= q->x) return -1; + return 1; +} + +EAPI void +evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y) +{ + RGBA_Gfx_Func func; + RGBA_Polygon_Point *pt; + RGBA_Vertex *point; + RGBA_Edge *edges; + Eina_Inlist *spans; + int num_active_edges; + int n; + int i, j, k; + int y0, y1, yi; + int ext_x, ext_y, ext_w, ext_h; + int *sorted_index; + + ext_x = 0; + ext_y = 0; + ext_w = dst->cache_entry.w; + ext_h = dst->cache_entry.h; + if (dc->clip.use) + { + if (dc->clip.x > ext_x) + { + ext_w += ext_x - dc->clip.x; + ext_x = dc->clip.x; + } + if ((ext_x + ext_w) > (dc->clip.x + dc->clip.w)) + { + ext_w = (dc->clip.x + dc->clip.w) - ext_x; + } + if (dc->clip.y > ext_y) + { + ext_h += ext_y - dc->clip.y; + ext_y = dc->clip.y; + } + if ((ext_y + ext_h) > (dc->clip.y + dc->clip.h)) + { + ext_h = (dc->clip.y + dc->clip.h) - ext_y; + } + } + if ((ext_w <= 0) || (ext_h <= 0)) return; + + evas_common_cpu_end_opt(); + + n = 0; EINA_INLIST_FOREACH(points, pt) n++; + if (n < 3) return; + edges = malloc(sizeof(RGBA_Edge) * n); + if (!edges) return; + point = malloc(sizeof(RGBA_Vertex) * n); + if (!point) + { + free(edges); + return; + } + sorted_index = malloc(sizeof(int) * n); + if (!sorted_index) + { + free(edges); + free(point); + return; + } + + k = 0; + EINA_INLIST_FOREACH(points, pt) + { + point[k].x = pt->x + x; + point[k].y = pt->y + y; + point[k].i = k; + k++; + } + qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); + for (k = 0; k < n; k++) sorted_index[k] = point[k].i; + k = 0; + EINA_INLIST_FOREACH(points, pt) + { + point[k].x = pt->x + x; + point[k].y = pt->y + y; + point[k].i = k; + k++; + } + + y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); + y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); + + k = 0; + num_active_edges = 0; + spans = NULL; + + for (yi = y0; yi <= y1; yi++) + { + for (; (k < n) && (point[sorted_index[k]].y <= ((double)yi + 0.5)); k++) + { + i = sorted_index[k]; + + if (i > 0) j = i - 1; + else j = n - 1; + if (point[j].y <= ((double)yi - 0.5)) + { + POLY_EDGE_DEL(j) + } + else if (point[j].y > ((double)yi + 0.5)) + { + POLY_EDGE_ADD(j, yi) + } + if (i < (n - 1)) j = i + 1; + else j = 0; + if (point[j].y <= ((double)yi - 0.5)) + { + POLY_EDGE_DEL(i) + } + else if (point[j].y > ((double)yi + 0.5)) + { + POLY_EDGE_ADD(i, yi) + } + } + + qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); + + for (j = 0; j < num_active_edges; j += 2) + { + int x0, x1; + + x0 = ceil(edges[j].x - 0.5); + if (j < (num_active_edges - 1)) + x1 = floor(edges[j + 1].x - 0.5); + else + x1 = x0; + if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) + { + RGBA_Span *span; + + if (x0 < ext_x) x0 = ext_x; + if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1; + span = malloc(sizeof(RGBA_Span)); + spans = eina_inlist_append(spans, EINA_INLIST_GET(span)); + span->y = yi; + span->x = x0; + span->w = (x1 - x0) + 1; + } + edges[j].x += edges[j].dx; + edges[j + 1].x += edges[j + 1].dx; + } + } + + free(edges); + free(point); + free(sorted_index); + + func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, 1, dc->render_op); + if (spans) + { + RGBA_Span *span; + + EINA_INLIST_FOREACH(spans, span) + { + DATA32 *ptr; + +#ifdef EVAS_SLI + if (((span->y) % dc->sli.h) == dc->sli.y) +#endif + { + ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x; + func(NULL, NULL, dc->col.col, ptr, span->w); + } + } + while (spans) + { + span = (RGBA_Span *)spans; + spans = eina_inlist_remove(spans, spans); + free(span); + } + } +} diff --git a/libraries/evas/src/lib/engines/common/evas_rectangle.h b/libraries/evas/src/lib/engines/common/evas_rectangle.h new file mode 100644 index 0000000..a653b04 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_rectangle.h @@ -0,0 +1,11 @@ +#ifndef _EVAS_RECTANGLE_H +#define _EVAS_RECTANGLE_H + + +EAPI void evas_common_rectangle_init (void); + +EAPI void evas_common_rectangle_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); + + +#endif /* _EVAS_RECTANGLE_H */ + diff --git a/libraries/evas/src/lib/engines/common/evas_rectangle_main.c b/libraries/evas/src/lib/engines/common/evas_rectangle_main.c new file mode 100644 index 0000000..28aaf16 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_rectangle_main.c @@ -0,0 +1,73 @@ +#include "evas_common.h" +#include "evas_blend_private.h" + +static void rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); + +EAPI void +evas_common_rectangle_init(void) +{ +} + +EAPI void +evas_common_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) +{ + Cutout_Rects *rects; + Cutout_Rect *r; + int c, cx, cy, cw, ch; + int i; + /* handle cutouts here! */ + + if ((w <= 0) || (h <= 0)) return; + if (!(RECTS_INTERSECT(x, y, w, h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) + return; + /* save out clip info */ + c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; + evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); + /* no cutouts - cut right to the chase */ + if (!dc->cutout.rects) + { + rectangle_draw_internal(dst, dc, x, y, w, h); + } + else + { + evas_common_draw_context_clip_clip(dc, x, y, w, h); + /* our clip is 0 size.. abort */ + if ((dc->clip.w > 0) && (dc->clip.h > 0)) + { + rects = evas_common_draw_context_apply_cutouts(dc); + for (i = 0; i < rects->active; ++i) + { + r = rects->rects + i; + evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); + rectangle_draw_internal(dst, dc, x, y, w, h); + } + evas_common_draw_context_apply_clear_cutouts(rects); + } + } + /* restore clip info */ + dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; +} + +static void +rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) +{ + RGBA_Gfx_Func func; + int yy; + DATA32 *ptr; + + RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); + if ((w <= 0) || (h <= 0)) return; + + func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op); + ptr = dst->image.data + (y * dst->cache_entry.w) + x; + for (yy = 0; yy < h; yy++) + { +#ifdef EVAS_SLI + if (((yy + y) % dc->sli.h) == dc->sli.y) +#endif + { + func(NULL, NULL, dc->col.col, ptr, w); + } + ptr += dst->cache_entry.w; + } +} diff --git a/libraries/evas/src/lib/engines/common/evas_regionbuf.c b/libraries/evas/src/lib/engines/common/evas_regionbuf.c new file mode 100644 index 0000000..f381da5 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_regionbuf.c @@ -0,0 +1,357 @@ +#include "evas_common.h" + +#if 0 +Regionbuf * +evas_common_regionbuf_new(int w, int h) +{ + Regionbuf *rb; + + rb = calloc(1, sizeof(Regionbuf) + (h * sizeof(Regionspan))); + if (!rb) return NULL; + rb->spans = (Regionspan **)(rb + sizeof(Regionbuf)); + rb->w = w; + rb->h = h; + return rb; +} + +void +evas_common_regionbuf_free(Regionbuf *rb) +{ + evas_common_regionbuf_clear(rb); + free(rb); +} + +void +evas_common_regionbuf_clear(Regionbuf *rb) +{ + int y; + + for (y = 0; y < rb->h; y++) + { + while (rb->spans[y]) + { + Regionspan *span; + + span = rb->spans[y]; + rb->spans[y] = eina_inlist_remove(rb->spans[y], rb->spans[y]); + free(span); + } + } +} + +void +evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y) +{ + Regionspan *span, *span2, *nspan, *sp_start, *sp_stop; + + /* abort if outside */ + if ((y < 0) || + (y >= rb->h) || + (x2 < 0) || + (x1 >= rb->w)) return; + /* clip to horiz bounds */ + if (x1 < 0) x1 = 0; + if (x2 < (rb->w - 1)) x2 = rb->w - 1; + sp_start = NULL; + sp_stop = NULL; + EINA_INLIST_FOREACH(rb->spans[y], span) + { + nspan = (Regionspan *)(EINA_INLIST_GET(span))->next; + /* we dont know what t do with the span yet */ + if (!sp_start) + { + /* if new span starts before or on this span or just after + * with no gap */ + if (x1 <= (span->x2 + 1)) + sp_start = span; + /* if there is no next span */ + if (!nspan) + { + sp_stop = span; + break; + } + /* if new span ends before the next span starts with a gap of + * 1 pixel (or more) */ + else if (x2 < (nspan->x1 - 1)) + { + sp_stop = span; + break; + } + } + /* we already know it already starts before or in sp_start */ + else + { + /* there is no span after this one, so this has to be the stop */ + if (!nspan) + { + sp_stop = span; + break; + } + /* if new span ends before the next span starts with a gap of + * 1 pixel (or more) */ + else if (x2 < (nspan->x1 - 1)) + { + sp_stop = span; + break; + } + } + } + /* sp_start is where the new span starts in or before */ + /* sp_stop is where the new span stops in or after */ + if ((sp_start) && (sp_stop)) + { + /* same start and stop */ + if (sp_start == sp_stop) + { + if (x2 < (sp_start->x1 - 1)) + { + span2 = calloc(1, sizeof(Regionspan)); + span2->x1 = x1; + span2->x2 = x2; + rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start); + return; + } + if (x1 < sp_start->x1) + sp_start->x1 = x1; + if (x2 > sp_start->x2) + sp_start->x2 = x2; + return; + } + else + { + Eina_Inlist *l; + + /* remove all nodes after sp_start and before_sp_stop because + * the new */ + for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);) + { + span = (Regionspan *)l; + l = l->next; + rb->spans[y] = eina_inlist_remove(rb->spans[y], span); + free(span); + } + /* remove the end span */ + rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop); + /* if the new span is before the start span - extend */ + if (x1 < sp_start->x1) + sp_start->x1 = x1; + /* if it goes beyond the stop span - extend stop span */ + if (x2 > sp_stop->x2) + sp_stop->x2 = x2; + /* extend start span to stop span */ + sp_start->x2 = sp_stop->x2; + /* don't need stop span anymore */ + free(sp_stop); + return; + } + } + /* no start AND stop... just append */ + span2 = calloc(1, sizeof(Regionspan)); + span2->x1 = x1; + span2->x2 = x2; + rb->spans[y] = eina_inlist_append(rb->spans[y], span2); +} + +void +evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y) +{ + /* FIXME: del span */ + Regionspan *span, *span2, *nspan, *sp_start, *sp_stop; + + /* abort if outside */ + if ((y < 0) || + (y >= rb->h) || + (x2 < 0) || + (x1 >= rb->w)) return; + /* clip to horiz bounds */ + if (x1 < 0) x1 = 0; + if (x2 < (rb->w - 1)) x2 = rb->w - 1; + sp_start = NULL; + sp_stop = NULL; + EINA_INLIST_FOREACH(rb->spans[y], span) + { + nspan = (Regionspan *)(EINA_INLIST_GET(l))->next; + /* we dont know what t do with the span yet */ + if (!sp_start) + { + /* if new span starts before or on this span or just after + * with no gap */ + if (x1 <= (span->x2)) + sp_start = span; + /* if there is no next span */ + if (!nspan) + { + sp_stop = span; + break; + } + /* if new span ends before the next span starts with a gap of + * 1 pixel (or more) */ + else if (x2 < nspan->x1) + { + sp_stop = span; + break; + } + } + /* we already know it already starts before or in sp_start */ + else + { + /* there is no span after this one, so this has to be the stop */ + if (!nspan) + { + sp_stop = span; + break; + } + /* if new span ends before the next span starts with a gap of + * 1 pixel (or more) */ + else if (x2 < nspan->x1) + { + sp_stop = span; + break; + } + } + } + /* sp_start is where the new span starts in or before */ + /* sp_stop is where the new span stops in or after */ + if ((sp_start) && (sp_stop)) + { + /* same start and stop */ + if (sp_start == sp_stop) + { + /* if it ends before this the span start starts... return */ + if (x2 < sp_start->x1) + return; + /* it starts on or before this span */ + else if (x1 <= sp_start->x1) + { + /* right edge is within the span */ + if (x2 < sp_start->x2) + { + sp_start->x2 = x2; + return; + } + else + { + rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); + return; + } + } + /* it ends on or after the end of this span */ + else if (x2 >= sp_start->x2) + { + /* it starts after the start */ + if (x1 > sp_start->x1) + { + sp_start->x1 = x1; + return; + } + /* remove it all */ + else + { + rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); + return; + } + return; + } + /* this breaks the span into 2 */ + else + { + span2 = calloc(1, sizeof(Regionspan)); + span2->x1 = sp_start->x1; + span2->x2 = x1 - 1; + rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start); + sp_start->x1 = x2 + 1; + return; + } + } + else + { + Eina_Inlist *l; + + /* remove all nodes after sp_start and before_sp_stop because + * the new */ + for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);) + { + span = (Regionspan *)l; + l = l->next; + rb->spans[y] = eina_inlist_remove(rb->spans[y], span); + free(span); + } + /* all of the start span is cut out */ + if (x1 <= sp_start->x1) + { + rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); + free(sp_start); + } + /* chup it off at the new span start */ + else + sp_start->x2 = x1 - 1; + /* all of the end span is cut out */ + if (x2 >= sp_stop->x2) + { + rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop); + free(sp_stop); + } + /* chop it up at the end */ + else + sp_stop->x1 = x2 + 1; + return; + } + } +} + +Tilebuf_Rect * +evas_common_regionbuf_rects_get(Regionbuf *rb) +{ + Tilebuf_Rect *rects = NULL, *r; + int y; + + /* FIXME: take spans, make rects */ + for (y = 0; y < rb->h; y++) + { + Regionspan *sp_start; + Eina_Inlist *l, *ll; + + for (l = EINA_INLIST_GET(rb->spans[y]); l;) + { + Regionspan *span; + int yy; + + sp_start = (Regionspan *)l; + l = l->next; + rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); + for (yy = y + 1; yy < rb->h; yy++) + { + int match = 0; + + for (ll = EINA_INLIST_GET(rb->spans[yy]); ll;) + { + span = (Regionspan *)ll; + ll = ll->next; + if (span->x1 == sp_start->x1) + { + if ((span->x1 != sp_start->x1) || + (span->x2 != sp_start->x2)) + { + goto coallate; + } + match = 1; + rb->spans[yy] = eina_inlist_remove(rb->spans[yy], span); + free(span); + } + } + if (!match) goto coallate; + } + coallate: + r = calloc(1, sizeof(Tilebuf_Rect)); + r->x = sp_start->x1; + r->y = y; + r->w = sp_start->x2 - sp_start->x1 + 1; + r->h = yy - y; + rects = eina_inlist_append(rects, r); + free(sp_start); + } + } + evas_common_regionbuf_clear(rb); + return rects; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_scale_main.c b/libraries/evas/src/lib/engines/common/evas_scale_main.c new file mode 100644 index 0000000..959336c --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_main.c @@ -0,0 +1,6 @@ +#include "evas_common.h" + +EAPI void +evas_common_scale_init(void) +{ +} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_main.h b/libraries/evas/src/lib/engines/common/evas_scale_main.h new file mode 100644 index 0000000..eafd9d2 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_main.h @@ -0,0 +1,13 @@ +#ifndef _EVAS_SCALE_MAIN_H +#define _EVAS_SCALE_MAIN_H + + +EAPI void evas_common_scale_init (void); + +EAPI void evas_common_scale_rgba_in_to_out_clip_smooth (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); + +EAPI void evas_common_scale_rgba_in_to_out_clip_sample (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); + +EAPI void evas_common_rgba_image_scalecache_dump(void); + +#endif /* _EVAS_SCALE_MAIN_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_scale_sample.c b/libraries/evas/src/lib/engines/common/evas_scale_sample.c new file mode 100644 index 0000000..54b8e92 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_sample.c @@ -0,0 +1,398 @@ +#include "evas_common.h" +#include "evas_blend_private.h" + +void scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); + +#ifndef BUILD_SCALE_SMOOTH +#ifdef BUILD_SCALE_SAMPLE +EAPI void +evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h) +{ + evas_common_scale_rgba_in_to_out_clip_sample(src, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); +} +#endif +#endif + +#ifdef BUILD_SCALE_SAMPLE +EAPI void +evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h) +{ + Cutout_Rects *rects; + Cutout_Rect *r; + int c, cx, cy, cw, ch; + int i; + /* handle cutouts here! */ + + if ((dst_region_w <= 0) || (dst_region_h <= 0)) return; + if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) + return; + /* no cutouts - cut right to the chase */ + if (!dc->cutout.rects) + { + scale_rgba_in_to_out_clip_sample_internal(src, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + return; + } + /* save out clip info */ + c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; + evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); + evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h); + /* our clip is 0 size.. abort */ + if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) + { + dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; + return; + } + rects = evas_common_draw_context_apply_cutouts(dc); + for (i = 0; i < rects->active; ++i) + { + r = rects->rects + i; + evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); + scale_rgba_in_to_out_clip_sample_internal(src, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + + } + evas_common_draw_context_apply_clear_cutouts(rects); + /* restore clip info */ + dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; +} + +void +scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h) +{ + int x, y; + int *lin_ptr; + DATA32 *buf, *dptr; + DATA32 **row_ptr; + DATA32 *ptr, *dst_ptr, *src_data, *dst_data; + int dst_jump; + int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h; + int m_clip_x = 0, m_clip_y = 0, m_clip_w = 0, m_clip_h = 0, mdx = 0, mdy = 0; + int src_w, src_h, dst_w, dst_h; + RGBA_Gfx_Func func; + RGBA_Image *maskobj = NULL; + DATA8 *mask = NULL; + + if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) + return; + if (!(RECTS_INTERSECT(src_region_x, src_region_y, src_region_w, src_region_h, 0, 0, src->cache_entry.w, src->cache_entry.h))) + return; + + src_w = src->cache_entry.w; + src_h = src->cache_entry.h; + dst_w = dst->cache_entry.w; + dst_h = dst->cache_entry.h; + + src_data = src->image.data; + dst_data = dst->image.data; + + if (dc->clip.use) + { + dst_clip_x = dc->clip.x; + dst_clip_y = dc->clip.y; + dst_clip_w = dc->clip.w; + dst_clip_h = dc->clip.h; + if (dst_clip_x < 0) + { + dst_clip_w += dst_clip_x; + dst_clip_x = 0; + } + if (dst_clip_y < 0) + { + dst_clip_h += dst_clip_y; + dst_clip_y = 0; + } + if ((dst_clip_x + dst_clip_w) > dst_w) + dst_clip_w = dst_w - dst_clip_x; + if ((dst_clip_y + dst_clip_h) > dst_h) + dst_clip_h = dst_h - dst_clip_y; + } + else + { + dst_clip_x = 0; + dst_clip_y = 0; + dst_clip_w = dst_w; + dst_clip_h = dst_h; + } + + if (dc->mask.mask) + { + m_clip_x = dc->mask.x; + m_clip_y = dc->mask.y; + m_clip_w = dc->mask.mask->cache_entry.w; + m_clip_h = dc->mask.mask->cache_entry.h; + RECTS_CLIP_TO_RECT(m_clip_x, m_clip_y, m_clip_w, m_clip_h, + dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h); + if ((m_clip_w <= 0) || (m_clip_h <= 0)) return; + dst_clip_x = m_clip_x; + dst_clip_y = m_clip_y; + dst_clip_w = m_clip_w; + dst_clip_h = m_clip_h; + } + + if (dst_clip_x < dst_region_x) + { + dst_clip_w += dst_clip_x - dst_region_x; + dst_clip_x = dst_region_x; + } + if ((dst_clip_x + dst_clip_w) > (dst_region_x + dst_region_w)) + dst_clip_w = dst_region_x + dst_region_w - dst_clip_x; + if (dst_clip_y < dst_region_y) + { + dst_clip_h += dst_clip_y - dst_region_y; + dst_clip_y = dst_region_y; + } + if ((dst_clip_y + dst_clip_h) > (dst_region_y + dst_region_h)) + dst_clip_h = dst_region_y + dst_region_h - dst_clip_y; + + if ((src_region_w <= 0) || (src_region_h <= 0) || + (dst_region_w <= 0) || (dst_region_h <= 0) || + (dst_clip_w <= 0) || (dst_clip_h <= 0)) + return; + + /* sanitise x */ + if (src_region_x < 0) + { + dst_region_x -= (src_region_x * dst_region_w) / src_region_w; + dst_region_w += (src_region_x * dst_region_w) / src_region_w; + src_region_w += src_region_x; + src_region_x = 0; + } + if (src_region_x >= src_w) return; + if ((src_region_x + src_region_w) > src_w) + { + dst_region_w = (dst_region_w * (src_w - src_region_x)) / (src_region_w); + src_region_w = src_w - src_region_x; + } + if (dst_region_w <= 0) return; + if (src_region_w <= 0) return; + if (dst_clip_x < 0) + { + dst_clip_w += dst_clip_x; + dst_clip_x = 0; + } + if (dst_clip_w <= 0) return; + if (dst_clip_x >= dst_w) return; + if (dst_clip_x < dst_region_x) + { + dst_clip_w += (dst_clip_x - dst_region_x); + dst_clip_x = dst_region_x; + } + if ((dst_clip_x + dst_clip_w) > dst_w) + { + dst_clip_w = dst_w - dst_clip_x; + } + if (dst_clip_w <= 0) return; + + /* sanitise y */ + if (src_region_y < 0) + { + dst_region_y -= (src_region_y * dst_region_h) / src_region_h; + dst_region_h += (src_region_y * dst_region_h) / src_region_h; + src_region_h += src_region_y; + src_region_y = 0; + } + if (src_region_y >= src_h) return; + if ((src_region_y + src_region_h) > src_h) + { + dst_region_h = (dst_region_h * (src_h - src_region_y)) / (src_region_h); + src_region_h = src_h - src_region_y; + } + if (dst_region_h <= 0) return; + if (src_region_h <= 0) return; + if (dst_clip_y < 0) + { + dst_clip_h += dst_clip_y; + dst_clip_y = 0; + } + if (dst_clip_h <= 0) return; + if (dst_clip_y >= dst_h) return; + if (dst_clip_y < dst_region_y) + { + dst_clip_h += (dst_clip_y - dst_region_y); + dst_clip_y = dst_region_y; + } + if ((dst_clip_y + dst_clip_h) > dst_h) + { + dst_clip_h = dst_h - dst_clip_y; + } + if (dst_clip_h <= 0) return; + + /* allocate scale lookup tables */ + lin_ptr = alloca(dst_clip_w * sizeof(int)); + row_ptr = alloca(dst_clip_h * sizeof(DATA32 *)); + + /* figure out dst jump */ + dst_jump = dst_w - dst_clip_w; + + /* figure out dest start ptr */ + dst_ptr = dst_data + dst_clip_x + (dst_clip_y * dst_w); + + if (dc->mask.mask) + { + func = evas_common_gfx_func_composite_pixel_mask_span_get(src, dst, dst_clip_w, dc->render_op); + maskobj = dc->mask.mask; + mask = maskobj->mask.mask; +/* + if (1 || dst_region_w > src_region_w || dst_region_h > src_region_h){ + printf("Mask w/h: %d/%d\n",maskobj->cache_entry.w, + maskobj->cache_entry.h); + printf("Warning: Unscaled mask (%d/%d) // (%d/%d)\n", + dst_region_w,src_region_w, + dst_region_h,src_region_h); + } + */ + } + else if (dc->mul.use) + func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); + else + func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); + + if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h)) + { +#ifdef HAVE_PIXMAN + if ((1) && + (src->pixman.im) && (dst->pixman.im) && + ((!dc->mul.use) || + ((dc->mul.use) && (dc->mul.col == 0xffffffff))) && + ((dc->render_op == _EVAS_RENDER_COPY) || + (dc->render_op == _EVAS_RENDER_BLEND)) + ) + { + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; + pixman_image_composite(op, + src->pixman.im, NULL, + dst->pixman.im, + (dst_clip_x - dst_region_x) + src_region_x, + (dst_clip_y - dst_region_y) + src_region_y, + 0, 0, + dst_clip_x, dst_clip_y, + dst_clip_w, dst_clip_h); + } + else +#endif + { + ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; + if (mask) + { + mdx = (m_clip_x - dc->mask.x) + (m_clip_x - dst_clip_x); + mdy = (m_clip_y - dc->mask.y) + (m_clip_y - dst_clip_y); + mask += mdx + (mdy * maskobj->cache_entry.w); + } + for (y = 0; y < dst_clip_h; y++) + { + /* * blend here [clip_w *] ptr -> dst_ptr * */ +#ifdef EVAS_SLI + if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) +#endif + { + func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w); + } + ptr += src_w; + dst_ptr += dst_w; + if (mask) mask += maskobj->cache_entry.w; + } + } + } + else + { + /* fill scale tables */ + for (x = 0; x < dst_clip_w; x++) + lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x; + for (y = 0; y < dst_clip_h; y++) + row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h) + + src_region_y) * src_w); + /* scale to dst */ + dptr = dst_ptr; +#ifdef DIRECT_SCALE + if ((!src->cache_entry.flags.alpha) && + (!dst->cache_entry.flags.alpha) && + (!dc->mul.use)) + { + for (y = 0; y < dst_clip_h; y++) + { +#ifdef EVAS_SLI + if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) +#endif + { + dst_ptr = dptr; + for (x = 0; x < dst_clip_w; x++) + { + ptr = row_ptr[y] + lin_ptr[x]; + *dst_ptr = *ptr; + dst_ptr++; + } + } + dptr += dst_w; + } + } + else +#endif + { + /* a scanline buffer */ + buf = alloca(dst_clip_w * sizeof(DATA32)); + for (y = 0; y < dst_clip_h; y++) + { +#ifdef EVAS_SLI + if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) +#endif + { + dst_ptr = buf; + for (x = 0; x < dst_clip_w; x++) + { + ptr = row_ptr[y] + lin_ptr[x]; + *dst_ptr = *ptr; + dst_ptr++; + } + /* * blend here [clip_w *] buf -> dptr * */ + func(buf, NULL, dc->mul.col, dptr, dst_clip_w); + } + dptr += dst_w; + } + } + } +} +#else +#ifdef BUILD_SCALE_SMOOTH +EAPI void +evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h) +{ + evas_common_scale_rgba_in_to_out_clip_smooth(src, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); +} +#endif +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth.c new file mode 100644 index 0000000..d3aada6 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth.c @@ -0,0 +1,532 @@ +#include "evas_common.h" +#include "evas_scale_smooth.h" +#include "evas_blend_private.h" + +#define SCALE_CALC_X_POINTS(P, SW, DW, CX, CW) \ + P = alloca((CW + 1) * sizeof (int)); \ + scale_calc_x_points(P, SW, DW, CX, CW); + +#define SCALE_CALC_Y_POINTS(P, SRC, SW, SH, DH, CY, CH) \ + P = alloca((CH + 1) * sizeof (DATA32 *)); \ + scale_calc_y_points(P, SRC, SW, SH, DH, CY, CH); + +#define SCALE_CALC_A_POINTS(P, S, D, C, CC) \ + P = alloca(CC * sizeof (int)); \ + scale_calc_a_points(P, S, D, C, CC); + +static void scale_calc_y_points(DATA32 **p, DATA32 *src, int sw, int sh, int dh, int cy, int ch); +static void scale_calc_x_points(int *p, int sw, int dw, int cx, int cw); +static void scale_calc_a_points(int *p, int s, int d, int c, int cc); + +static void +scale_calc_y_points(DATA32** p, DATA32 *src, int sw, int sh, int dh, int cy, int ch) +{ + int i, val, inc; + if (sh > SCALE_SIZE_MAX) return; + val = 0; + inc = (sh << 16) / dh; + for (i = 0; i < dh; i++) + { + if ((i >= cy) && (i < (cy + ch))) + p[i - cy] = src + ((val >> 16) * sw); + val += inc; + } + if ((i >= cy) && (i < (cy + ch))) + p[i - cy] = p[i - cy - 1]; +} + +static void +scale_calc_x_points(int *p, int sw, int dw, int cx, int cw) +{ + int i, val, inc; + if (sw > SCALE_SIZE_MAX) return; + val = 0; + inc = (sw << 16) / dw; + for (i = 0; i < dw; i++) + { + if ((i >= cx) && (i < (cx + cw))) + p[i - cx] = val >> 16; + val += inc; + } + if ((i >= cx) && (i < (cx + cw))) + p[i - cx] = p[i - cx - 1]; +} + +static void +scale_calc_a_points(int *p, int s, int d, int c, int cc) +{ + int i, val, inc; + + if (s > SCALE_SIZE_MAX) return; + if (d >= s) + { + val = 0; + inc = (s << 16) / d; + for (i = 0; i < d; i++) + { + if ((i >= c) && (i < (c + cc))) + { + p[i - c] = (val >> 8) - ((val >> 8) & 0xffffff00); + if ((val >> 16) >= (s - 1)) p[i - c] = 0; + } + val += inc; + } + } + else + { + int ap, Cp; + + val = 0; + inc = (s << 16) / d; + Cp = ((d << 14) / s) + 1; + for (i = 0; i < d; i++) + { + ap = ((0x100 - ((val >> 8) & 0xff)) * Cp) >> 8; + if ((i >= c) && (i < (c + cc))) + p[i - c] = ap | (Cp << 16); + val += inc; + } + } +} + +#ifdef BUILD_SCALE_SMOOTH +#ifdef BUILD_C +EAPI void +evas_common_scale_rgba_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) +{ + int x, y, dst_w, dst_h; + DATA32 *src_ptr, *src_ptr2, *dst_ptr; + + dst_w = src_w >> 1; + dst_h = src_h >> 1; + + if (dst_w < 1) dst_w = 1; + if (dst_h < 1) dst_h = 1; + + src_ptr = src; + src_ptr2 = src + src_w; + dst_ptr = dst; + for (y = 0; y < dst_h; y++) + { + src_ptr = src + (y * src_w * 2); + src_ptr2 = src_ptr + src_w; + for (x = 0; x < dst_w; x++) + { + R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2; + G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2; + B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2; + A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1) + A_VAL(src_ptr2) + A_VAL(src_ptr2 + 1)) >> 2; + + src_ptr+=2; + src_ptr2+=2; + dst_ptr++; + } + } +} +#endif +#endif + +#ifdef BUILD_SCALE_SMOOTH +#ifdef BUILD_C +EAPI void +evas_common_scale_rgba_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) +{ + int x, y, dst_w, dst_h; + DATA32 *src_ptr, *dst_ptr; + + dst_w = src_w >> 1; + dst_h = src_h >> 1; + + if (dst_w < 1) dst_w = 1; + if (dst_h < 1) dst_h = 1; + + src_ptr = src; + dst_ptr = dst; + for (y = 0; y < dst_h; y++) + { + src_ptr = src + (y * src_w * 2); + for (x = 0; x < dst_w; x++) + { + R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1; + G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1; + B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1; + A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1)) >> 1; + + src_ptr+=2; + dst_ptr++; + } + } +} +#endif +#endif + +#ifdef BUILD_SCALE_SMOOTH +#ifdef BUILD_C +EAPI void +evas_common_scale_rgba_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) +{ + int x, y, dst_w, dst_h; + DATA32 *src_ptr, *src_ptr2, *dst_ptr; + + dst_w = src_w >> 1; + dst_h = src_h >> 1; + + if (dst_w < 1) dst_w = 1; + if (dst_h < 1) dst_h = 1; + + src_ptr = src; + dst_ptr = dst; + for (y = 0; y < dst_h; y++) + { + src_ptr = src + (y * src_w * 2); + src_ptr2 = src_ptr + src_w; + for (x = 0; x < dst_w; x++) + { + R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1; + G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1; + B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1; + A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr2)) >> 1; + + src_ptr+=2; + src_ptr2+=2; + dst_ptr++; + } + } +} +#endif +#endif + +#ifdef BUILD_SCALE_SMOOTH +#ifdef BUILD_C +EAPI void +evas_common_scale_rgb_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) +{ + int x, y, dst_w, dst_h; + DATA32 *src_ptr, *src_ptr2, *dst_ptr; + + dst_w = src_w >> 1; + dst_h = src_h >> 1; + + if (dst_w < 1) dst_w = 1; + if (dst_h < 1) dst_h = 1; + + src_ptr = src; + src_ptr2 = src + src_w; + dst_ptr = dst; + for (y = 0; y < dst_h; y++) + { + for (x = 0; x < dst_w; x++) + { + R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2; + G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2; + B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2; + A_VAL(dst_ptr) = 0xff; + + src_ptr+=2; + src_ptr2+=2; + dst_ptr++; + } + src_ptr += src_w; + src_ptr2 += src_w; + } +} +#endif +#endif + +#ifdef BUILD_SCALE_SMOOTH +#ifdef BUILD_C +EAPI void +evas_common_scale_rgb_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) +{ + int x, y, dst_w, dst_h; + DATA32 *src_ptr, *dst_ptr; + + dst_w = src_w >> 1; + dst_h = src_h >> 1; + + if (dst_w < 1) dst_w = 1; + if (dst_h < 1) dst_h = 1; + + src_ptr = src; + dst_ptr = dst; + for (y = 0; y < dst_h; y++) + { + for (x = 0; x < dst_w; x++) + { + R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1; + G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1; + B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1; + A_VAL(dst_ptr) = 0xff; + + src_ptr+=2; + dst_ptr++; + } + src_ptr += src_w; + } +} +#endif +#endif + +#ifdef BUILD_SCALE_SMOOTH +#ifdef BUILD_C +EAPI void +evas_common_scale_rgb_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) +{ + int x, y, dst_w, dst_h; + DATA32 *src_ptr, *src_ptr2, *dst_ptr; + + dst_w = src_w >> 1; + dst_h = src_h >> 1; + + if (dst_w < 1) dst_w = 1; + if (dst_h < 1) dst_h = 1; + + src_ptr = src; + src_ptr2 = src + src_w; + dst_ptr = dst; + for (y = 0; y < dst_h; y++) + { + for (x = 0; x < dst_w; x++) + { + R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1; + G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1; + B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1; + A_VAL(dst_ptr) = 0xff; + + src_ptr+=2; + src_ptr2+=2; + dst_ptr++; + } + src_ptr += src_w; + src_ptr2 += src_w; + } +} +#endif +#endif + +#ifdef BUILD_SCALE_SMOOTH +#ifdef BUILD_MMX +EAPI void +evas_common_scale_rgba_mipmap_down_2x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h) +{ + int x, y, dst_w, dst_h; + DATA32 *src_ptr, *src_ptr2, *dst_ptr; + + dst_w = src_w >> 1; + dst_h = src_h >> 1; + + if (dst_w < 1) dst_w = 1; + if (dst_h < 1) dst_h = 1; + + /* NB: Dead assignments (reassigned to different values below) + src_ptr = src; + src_ptr2 = src + src_w; + */ + + dst_ptr = dst; + for (y = 0; y < dst_h; y++) + { + src_ptr = src + (y * src_w * 2); + src_ptr2 = src_ptr + src_w; + for (x = 0; x < dst_w; x++) + { + punpcklbw_m2r(src_ptr[0], mm0); + punpcklbw_m2r(src_ptr[1], mm1); + punpcklbw_m2r(src_ptr2[0], mm2); + punpcklbw_m2r(src_ptr2[1], mm3); + psrlw_i2r(8, mm0); + psrlw_i2r(8, mm1); + psrlw_i2r(8, mm2); + psrlw_i2r(8, mm3); + paddw_r2r(mm1, mm0); + paddw_r2r(mm2, mm0); + paddw_r2r(mm3, mm0); + psrlw_i2r(2, mm0); + packuswb_r2r(mm0, mm0); + movd_r2m(mm0, dst_ptr[0]); + + src_ptr+=2; + src_ptr2+=2; + dst_ptr++; + } + } +} +#endif +#endif + +#ifdef BUILD_SCALE_SMOOTH +#ifdef BUILD_MMX +EAPI void +evas_common_scale_rgba_mipmap_down_2x1_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h) +{ + int x, y, dst_w, dst_h; + DATA32 *src_ptr, *dst_ptr; + + dst_w = src_w >> 1; + dst_h = src_h >> 1; + + if (dst_w < 1) dst_w = 1; + if (dst_h < 1) dst_h = 1; + + src_ptr = src; + dst_ptr = dst; + for (y = 0; y < dst_h; y++) + { + src_ptr = src + (y * src_w * 2); + for (x = 0; x < dst_w; x++) + { + punpcklbw_m2r(src_ptr[0], mm0); + punpcklbw_m2r(src_ptr[1], mm1); + psrlw_i2r(8, mm0); + psrlw_i2r(8, mm1); + paddw_r2r(mm1, mm0); + psrlw_i2r(1, mm0); + packuswb_r2r(mm0, mm0); + movd_r2m(mm0, dst_ptr[0]); + + src_ptr+=2; + dst_ptr++; + } + } +} +#endif +#endif + +#ifdef BUILD_SCALE_SMOOTH +#ifdef BUILD_MMX +EAPI void +evas_common_scale_rgba_mipmap_down_1x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h) +{ + int x, y, dst_w, dst_h; + DATA32 *src_ptr, *src_ptr2, *dst_ptr; + + dst_w = src_w >> 1; + dst_h = src_h >> 1; + + if (dst_w < 1) dst_w = 1; + if (dst_h < 1) dst_h = 1; + + /* NB: Dead assignment (gets reassigned later) */ +// src_ptr = src; + + src_ptr2 = src + src_w; + dst_ptr = dst; + for (y = 0; y < dst_h; y++) + { + src_ptr = src + (y * src_w * 2); + src_ptr2 = src_ptr + src_w; + for (x = 0; x < dst_w; x++) + { + punpcklbw_m2r(src_ptr[0], mm0); + punpcklbw_m2r(src_ptr2[0], mm1); + psrlw_i2r(8, mm0); + psrlw_i2r(8, mm1); + paddw_r2r(mm1, mm0); + psrlw_i2r(1, mm0); + packuswb_r2r(mm0, mm0); + movd_r2m(mm0, dst_ptr[0]); + + src_ptr+=2; + src_ptr2+=2; + dst_ptr++; + } + } +} +#endif +#endif + +#ifdef BUILD_SCALE_SMOOTH +# ifdef BUILD_MMX +# undef SCALE_FUNC +# define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_mmx +# undef SCALE_USING_MMX +# define SCALE_USING_MMX +# include "evas_scale_smooth_scaler.c" +# endif +# ifdef BUILD_C +# undef SCALE_FUNC +# define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_c +# undef SCALE_USING_MMX +# include "evas_scale_smooth_scaler.c" +# endif +EAPI void +evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h) +{ +# ifdef BUILD_MMX + int mmx, sse, sse2; +# endif + Cutout_Rects *rects; + Cutout_Rect *r; + int c, cx, cy, cw, ch; + int i; + /* handle cutouts here! */ + + if ((dst_region_w <= 0) || (dst_region_h <= 0)) return; + if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) + return; +# ifdef BUILD_MMX + evas_common_cpu_can_do(&mmx, &sse, &sse2); +# endif + /* no cutouts - cut right to the chase */ + if (!dc->cutout.rects) + { +# ifdef BUILD_MMX + if (mmx) + evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + else +# endif +# ifdef BUILD_C + evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); +# endif + return; + } + /* save out clip info */ + c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; + evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); + evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h); + /* our clip is 0 size.. abort */ + if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) + { + dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; + return; + } + rects = evas_common_draw_context_apply_cutouts(dc); + for (i = 0; i < rects->active; ++i) + { + r = rects->rects + i; + evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); +# ifdef BUILD_MMX + if (mmx) + evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + else +# endif +# ifdef BUILD_C + evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc, + src_region_x, src_region_y, + src_region_w, src_region_h, + dst_region_x, dst_region_y, + dst_region_w, dst_region_h); +# endif + } + evas_common_draw_context_apply_clear_cutouts(rects); + /* restore clip info */ + dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; +} +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth.h b/libraries/evas/src/lib/engines/common/evas_scale_smooth.h new file mode 100644 index 0000000..63ced50 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth.h @@ -0,0 +1,19 @@ +#ifndef _EVAS_SCALE_SMOOTH_H +#define _EVAS_SCALE_SMOOTH_H + +EAPI void evas_common_scale_rgba_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); +EAPI void evas_common_scale_rgba_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); +EAPI void evas_common_scale_rgba_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); +EAPI void evas_common_scale_rgb_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); +EAPI void evas_common_scale_rgb_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); +EAPI void evas_common_scale_rgb_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); + +EAPI void evas_common_scale_rgba_mipmap_down_2x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h); +EAPI void evas_common_scale_rgba_mipmap_down_2x1_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h); +EAPI void evas_common_scale_rgba_mipmap_down_1x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h); + +EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_mmx (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); +EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_c (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); + + +#endif /* _EVAS_SCALE_SMOOTH_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c new file mode 100644 index 0000000..599bfda --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c @@ -0,0 +1,211 @@ +void +SCALE_FUNC(RGBA_Image *src, RGBA_Image *dst, + RGBA_Draw_Context *dc, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h) +{ + DATA32 *dst_ptr; + int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h; + int src_w, src_h, dst_w, dst_h; + + if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) + return; + if (!(RECTS_INTERSECT(src_region_x, src_region_y, src_region_w, src_region_h, 0, 0, src->cache_entry.w, src->cache_entry.h))) + return; + + src_w = src->cache_entry.w; + src_h = src->cache_entry.h; + dst_w = dst->cache_entry.w; + dst_h = dst->cache_entry.h; + + if (dc->clip.use) + { + dst_clip_x = dc->clip.x; + dst_clip_y = dc->clip.y; + dst_clip_w = dc->clip.w; + dst_clip_h = dc->clip.h; + if (dst_clip_x < 0) + { + dst_clip_w += dst_clip_x; + dst_clip_x = 0; + } + if (dst_clip_y < 0) + { + dst_clip_h += dst_clip_y; + dst_clip_y = 0; + } + if ((dst_clip_w <= 0) || (dst_clip_h <= 0)) return; + if ((dst_clip_x + dst_clip_w) > dst_w) dst_clip_w = dst_w - dst_clip_x; + if ((dst_clip_y + dst_clip_h) > dst_h) dst_clip_h = dst_h - dst_clip_y; + } + else + { + dst_clip_x = 0; + dst_clip_y = 0; + dst_clip_w = dst_w; + dst_clip_h = dst_h; + } + + if (dst_clip_x < dst_region_x) + { + dst_clip_w += dst_clip_x - dst_region_x; + dst_clip_x = dst_region_x; + } + if ((dst_clip_x + dst_clip_w) > (dst_region_x + dst_region_w)) + dst_clip_w = dst_region_x + dst_region_w - dst_clip_x; + if (dst_clip_y < dst_region_y) + { + dst_clip_h += dst_clip_y - dst_region_y; + dst_clip_y = dst_region_y; + } + if ((dst_clip_y + dst_clip_h) > (dst_region_y + dst_region_h)) + dst_clip_h = dst_region_y + dst_region_h - dst_clip_y; + + if ((src_region_w <= 0) || (src_region_h <= 0) || + (dst_region_w <= 0) || (dst_region_h <= 0) || + (dst_clip_w <= 0) || (dst_clip_h <= 0)) + return; + + /* sanitise x */ + if (src_region_x < 0) + { + dst_region_x -= (src_region_x * dst_region_w) / src_region_w; + dst_region_w += (src_region_x * dst_region_w) / src_region_w; + src_region_w += src_region_x; + src_region_x = 0; + } + if (src_region_x >= src_w) return; + if ((src_region_x + src_region_w) > src_w) + { + dst_region_w = (dst_region_w * (src_w - src_region_x)) / (src_region_w); + src_region_w = src_w - src_region_x; + } + if (dst_region_w <= 0) return; + if (src_region_w <= 0) return; + if (dst_clip_x < 0) + { + dst_clip_w += dst_clip_x; + dst_clip_x = 0; + } + if (dst_clip_w <= 0) return; + if (dst_clip_x >= dst_w) return; + if (dst_clip_x < dst_region_x) + { + dst_clip_w += (dst_clip_x - dst_region_x); + dst_clip_x = dst_region_x; + } + if ((dst_clip_x + dst_clip_w) > dst_w) + { + dst_clip_w = dst_w - dst_clip_x; + } + if (dst_clip_w <= 0) return; + + /* sanitise y */ + if (src_region_y < 0) + { + dst_region_y -= (src_region_y * dst_region_h) / src_region_h; + dst_region_h += (src_region_y * dst_region_h) / src_region_h; + src_region_h += src_region_y; + src_region_y = 0; + } + if (src_region_y >= src_h) return; + if ((src_region_y + src_region_h) > src_h) + { + dst_region_h = (dst_region_h * (src_h - src_region_y)) / (src_region_h); + src_region_h = src_h - src_region_y; + } + if (dst_region_h <= 0) return; + if (src_region_h <= 0) return; + if (dst_clip_y < 0) + { + dst_clip_h += dst_clip_y; + dst_clip_y = 0; + } + if (dst_clip_h <= 0) return; + if (dst_clip_y >= dst_h) return; + if (dst_clip_y < dst_region_y) + { + dst_clip_h += (dst_clip_y - dst_region_y); + dst_clip_y = dst_region_y; + } + if ((dst_clip_y + dst_clip_h) > dst_h) + { + dst_clip_h = dst_h - dst_clip_y; + } + if (dst_clip_h <= 0) return; + + /* some maximum region sizes to avoid insane calc point tables */ + if (dst_clip_w > 65536) return; + if (dst_clip_h > 65536) return; + if (dst_region_w > (65536 * 1024)) return; + if (dst_region_h > (65536 * 1024)) return; + + /* figure out dst jump + * NB: Unused currently, so commented out */ +// dst_jump = dst_w - dst_clip_w; + + /* figure out dest start ptr */ + dst_ptr = dst->image.data + dst_clip_x + (dst_clip_y * dst_w); + +/* FIXME: + * + * things to do later for speedups: + * + * break upscale into 3 cases (as listed below - up:up, 1:up, up:1) + * + * break downscale into more cases (as listed below) + * + * roll func (blend/copy/cultiply/cmod) code into inner loop of scaler. + * (578 fps vs 550 in mmx upscale in evas demo - this means probably + * a good 10-15% speedup over the func call, but means massively larger + * code) + * + * anything involving downscaling has no mmx equivalent code and maybe the + * C could do with a little work. + * + * --------------------------------------------------------------------------- + * + * (1 = no scaling (1:1 ratio), + = scale up, - = scale down) + * (* == fully optimised mmx, # = fully optimised C) + * + * h:v mmx C + * + * 1:1 * # + * + * +:+ * # + * 1:+ * # + * +:1 * # + * + * 1:- + * -:1 + * +:- + * -:+ + * -:- + * + */ + + /* if 1:1 scale */ + if ((dst_region_w == src_region_w) && + (dst_region_h == src_region_h)) + { +#include "evas_scale_smooth_scaler_noscale.c" + } + else + { + /* scaling up only - dont need anything except original */ +// if ((!dc->anti_alias) || ((dst_region_w >= src_region_w) && (dst_region_h >= src_region_h))) + if (((dst_region_w >= src_region_w) && (dst_region_h >= src_region_h))) + { +#include "evas_scale_smooth_scaler_up.c" + return; + } + else + /* scaling down... funkiness */ + { +#include "evas_scale_smooth_scaler_down.c" + return; + } + } +} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c new file mode 100644 index 0000000..357eb32 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c @@ -0,0 +1,43 @@ +{ + DATA32 **ypoints; + int *xpoints; + int *xapoints, *xapp; + int *yapoints, *yapp; + DATA32 *buf, *src_data; + + RGBA_Gfx_Func func; + + src_data = src->image.data; + + /* some maximum region sizes to avoid insane calc point tables */ + SCALE_CALC_X_POINTS(xpoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w); + SCALE_CALC_Y_POINTS(ypoints, src_data, src_w, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h); + SCALE_CALC_A_POINTS(xapoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w); + SCALE_CALC_A_POINTS(yapoints, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h); + + /* a scanline buffer */ + buf = alloca(dst_clip_w * sizeof(DATA32)); + + if (dc->mul.use) + func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); + else + func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); + /* scaling down vertically */ + if ((dst_region_w >= src_region_w) && + (dst_region_h < src_region_h)) + { +#include "evas_scale_smooth_scaler_downy.c" + } + /* scaling down horizontally */ + else if ((dst_region_w < src_region_w) && + (dst_region_h >= src_region_h)) + { +#include "evas_scale_smooth_scaler_downx.c" + } + /* scaling down both vertically & horizontally */ + else if ((dst_region_w < src_region_w) && + (dst_region_h < src_region_h)) + { +#include "evas_scale_smooth_scaler_downx_downy.c" + } +} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c new file mode 100644 index 0000000..50b2e5c --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c @@ -0,0 +1,259 @@ +{ + int Cx, j; + DATA32 *pix, *dptr, *pbuf, **yp; + int r, g, b, a, rr, gg, bb, aa; + int *xp, xap, yap, pos; + int dyy, dxx; + int w = dst_clip_w; +#ifdef EVAS_SLI + int ysli = dst_clip_y; +#endif + + dptr = dst_ptr; + pos = (src_region_y * src_w) + src_region_x; + dyy = dst_clip_y - dst_region_y; + dxx = dst_clip_x - dst_region_x; + + xp = xpoints;// + dxx; + yp = ypoints;// + dyy; + xapp = xapoints;// + dxx; + yapp = yapoints;// + dyy; + pbuf = buf; + + if (src->cache_entry.flags.alpha) + { + while (dst_clip_h--) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + while (dst_clip_w--) + { + Cx = *xapp >> 16; + xap = *xapp & 0xffff; + pix = *yp + *xp + pos; + + a = (A_VAL(pix) * xap) >> 10; + r = (R_VAL(pix) * xap) >> 10; + g = (G_VAL(pix) * xap) >> 10; + b = (B_VAL(pix) * xap) >> 10; + for (j = (1 << 14) - xap; j > Cx; j -= Cx) + { + pix++; + a += (A_VAL(pix) * Cx) >> 10; + r += (R_VAL(pix) * Cx) >> 10; + g += (G_VAL(pix) * Cx) >> 10; + b += (B_VAL(pix) * Cx) >> 10; + } + if (j > 0) + { + pix++; + a += (A_VAL(pix) * j) >> 10; + r += (R_VAL(pix) * j) >> 10; + g += (G_VAL(pix) * j) >> 10; + b += (B_VAL(pix) * j) >> 10; + } + if ((yap = *yapp) > 0) + { + pix = *yp + *xp + src_w + pos; + aa = (A_VAL(pix) * xap) >> 10; + rr = (R_VAL(pix) * xap) >> 10; + gg = (G_VAL(pix) * xap) >> 10; + bb = (B_VAL(pix) * xap) >> 10; + for (j = (1 << 14) - xap; j > Cx; j -= Cx) + { + pix++; + aa += (A_VAL(pix) * Cx) >> 10; + rr += (R_VAL(pix) * Cx) >> 10; + gg += (G_VAL(pix) * Cx) >> 10; + bb += (B_VAL(pix) * Cx) >> 10; + } + if (j > 0) + { + pix++; + aa += (A_VAL(pix) * j) >> 10; + rr += (R_VAL(pix) * j) >> 10; + gg += (G_VAL(pix) * j) >> 10; + bb += (B_VAL(pix) * j) >> 10; + } + a += ((aa - a) * yap) >> 8; + r += ((rr - r) * yap) >> 8; + g += ((gg - g) * yap) >> 8; + b += ((bb - b) * yap) >> 8; + } + *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4), + ((r + (1 << 3)) >> 4), + ((g + (1 << 3)) >> 4), + ((b + (1 << 3)) >> 4)); + xp++; xapp++; + } + + func(buf, NULL, dc->mul.col, dptr, w); + } +#ifdef EVAS_SLI + ysli++; +#endif + pbuf = buf; + dptr += dst_w; dst_clip_w = w; + yp++; yapp++; + xp = xpoints;// + dxx; + xapp = xapoints;// + dxx; + } + } + else + { +#ifdef DIRECT_SCALE + if ((!src->cache_entry.flags.alpha) && + (!dst->cache_entry.flags.alpha) && + (!dc->mul.use)) + { + while (dst_clip_h--) + { + pbuf = dptr; +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + while (dst_clip_w--) + { + Cx = *xapp >> 16; + xap = *xapp & 0xffff; + pix = *yp + *xp + pos; + + r = (R_VAL(pix) * xap) >> 10; + g = (G_VAL(pix) * xap) >> 10; + b = (B_VAL(pix) * xap) >> 10; + for (j = (1 << 14) - xap; j > Cx; j -= Cx) + { + pix++; + r += (R_VAL(pix) * Cx) >> 10; + g += (G_VAL(pix) * Cx) >> 10; + b += (B_VAL(pix) * Cx) >> 10; + } + if (j > 0) + { + pix++; + r += (R_VAL(pix) * j) >> 10; + g += (G_VAL(pix) * j) >> 10; + b += (B_VAL(pix) * j) >> 10; + } + if ((yap = *yapp) > 0) + { + pix = *yp + *xp + src_w + pos; + rr = (R_VAL(pix) * xap) >> 10; + gg = (G_VAL(pix) * xap) >> 10; + bb = (B_VAL(pix) * xap) >> 10; + for (j = (1 << 14) - xap; j > Cx; j -= Cx) + { + pix++; + rr += (R_VAL(pix) * Cx) >> 10; + gg += (G_VAL(pix) * Cx) >> 10; + bb += (B_VAL(pix) * Cx) >> 10; + } + if (j > 0) + { + pix++; + rr += (R_VAL(pix) * j) >> 10; + gg += (G_VAL(pix) * j) >> 10; + bb += (B_VAL(pix) * j) >> 10; + } + r += ((rr - r) * yap) >> 8; + g += ((gg - g) * yap) >> 8; + b += ((bb - b) * yap) >> 8; + } + *pbuf++ = ARGB_JOIN(0xff, + ((r + (1 << 3)) >> 4), + ((g + (1 << 3)) >> 4), + ((b + (1 << 3)) >> 4)); + xp++; xapp++; + } + } +#ifdef EVAS_SLI + ysli++; +#endif + + dptr += dst_w; dst_clip_w = w; + yp++; yapp++; + xp = xpoints;// + dxx; + xapp = xapoints;// + dxx; + } + } + else +#endif + { + while (dst_clip_h--) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + while (dst_clip_w--) + { + Cx = *xapp >> 16; + xap = *xapp & 0xffff; + pix = *yp + *xp + pos; + + r = (R_VAL(pix) * xap) >> 10; + g = (G_VAL(pix) * xap) >> 10; + b = (B_VAL(pix) * xap) >> 10; + for (j = (1 << 14) - xap; j > Cx; j -= Cx) + { + pix++; + r += (R_VAL(pix) * Cx) >> 10; + g += (G_VAL(pix) * Cx) >> 10; + b += (B_VAL(pix) * Cx) >> 10; + } + if (j > 0) + { + pix++; + r += (R_VAL(pix) * j) >> 10; + g += (G_VAL(pix) * j) >> 10; + b += (B_VAL(pix) * j) >> 10; + } + if ((yap = *yapp) > 0) + { + pix = *yp + *xp + src_w + pos; + rr = (R_VAL(pix) * xap) >> 10; + gg = (G_VAL(pix) * xap) >> 10; + bb = (B_VAL(pix) * xap) >> 10; + for (j = (1 << 14) - xap; j > Cx; j -= Cx) + { + pix++; + rr += (R_VAL(pix) * Cx) >> 10; + gg += (G_VAL(pix) * Cx) >> 10; + bb += (B_VAL(pix) * Cx) >> 10; + } + if (j > 0) + { + pix++; + rr += (R_VAL(pix) * j) >> 10; + gg += (G_VAL(pix) * j) >> 10; + bb += (B_VAL(pix) * j) >> 10; + } + r += ((rr - r) * yap) >> 8; + g += ((gg - g) * yap) >> 8; + b += ((bb - b) * yap) >> 8; + } + *pbuf++ = ARGB_JOIN(0xff, + ((r + (1 << 3)) >> 4), + ((g + (1 << 3)) >> 4), + ((b + (1 << 3)) >> 4)); + xp++; xapp++; + } + + func(buf, NULL, dc->mul.col, dptr, w); + } +#ifdef EVAS_SLI + ysli++; +#endif + + pbuf = buf; + dptr += dst_w; dst_clip_w = w; + yp++; yapp++; + xp = xpoints;// + dxx; + xapp = xapoints;// + dxx; + } + } + } +} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c new file mode 100644 index 0000000..ab0c74e --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c @@ -0,0 +1,387 @@ +{ + int Cx, Cy, i, j; + DATA32 *dptr, *sptr, *pix, *pbuf; + int a, r, g, b, rx, gx, bx, ax; + int xap, yap, pos; + int dyy, dxx; +#ifdef EVAS_SLI + int ysli = dst_clip_y; +#endif + + DATA32 **yp; + int *xp; + int w = dst_clip_w; + + dptr = dst_ptr; + pos = (src_region_y * src_w) + src_region_x; + dyy = dst_clip_y - dst_region_y; + dxx = dst_clip_x - dst_region_x; + + xp = xpoints;// + dxx; + yp = ypoints;// + dyy; + xapp = xapoints;// + dxx; + yapp = yapoints;// + dyy; + pbuf = buf; +/*#ifndef SCALE_USING_MMX */ +/* for now there's no mmx down scaling - so C only */ +#if 1 + if (src->cache_entry.flags.alpha) + { + while (dst_clip_h--) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + Cy = *yapp >> 16; + yap = *yapp & 0xffff; + + while (dst_clip_w--) + { + Cx = *xapp >> 16; + xap = *xapp & 0xffff; + + sptr = *yp + *xp + pos; + pix = sptr; + sptr += src_w; + + ax = (A_VAL(pix) * xap) >> 9; + rx = (R_VAL(pix) * xap) >> 9; + gx = (G_VAL(pix) * xap) >> 9; + bx = (B_VAL(pix) * xap) >> 9; + pix++; + for (i = (1 << 14) - xap; i > Cx; i -= Cx) + { + ax += (A_VAL(pix) * Cx) >> 9; + rx += (R_VAL(pix) * Cx) >> 9; + gx += (G_VAL(pix) * Cx) >> 9; + bx += (B_VAL(pix) * Cx) >> 9; + pix++; + } + if (i > 0) + { + ax += (A_VAL(pix) * i) >> 9; + rx += (R_VAL(pix) * i) >> 9; + gx += (G_VAL(pix) * i) >> 9; + bx += (B_VAL(pix) * i) >> 9; + } + + a = (ax * yap) >> 14; + r = (rx * yap) >> 14; + g = (gx * yap) >> 14; + b = (bx * yap) >> 14; + + for (j = (1 << 14) - yap; j > Cy; j -= Cy) + { + pix = sptr; + sptr += src_w; + ax = (A_VAL(pix) * xap) >> 9; + rx = (R_VAL(pix) * xap) >> 9; + gx = (G_VAL(pix) * xap) >> 9; + bx = (B_VAL(pix) * xap) >> 9; + pix++; + for (i = (1 << 14) - xap; i > Cx; i -= Cx) + { + ax += (A_VAL(pix) * Cx) >> 9; + rx += (R_VAL(pix) * Cx) >> 9; + gx += (G_VAL(pix) * Cx) >> 9; + bx += (B_VAL(pix) * Cx) >> 9; + pix++; + } + if (i > 0) + { + ax += (A_VAL(pix) * i) >> 9; + rx += (R_VAL(pix) * i) >> 9; + gx += (G_VAL(pix) * i) >> 9; + bx += (B_VAL(pix) * i) >> 9; + } + + a += (ax * Cy) >> 14; + r += (rx * Cy) >> 14; + g += (gx * Cy) >> 14; + b += (bx * Cy) >> 14; + } + if (j > 0) + { + pix = sptr; + sptr += src_w; + ax = (A_VAL(pix) * xap) >> 9; + rx = (R_VAL(pix) * xap) >> 9; + gx = (G_VAL(pix) * xap) >> 9; + bx = (B_VAL(pix) * xap) >> 9; + pix++; + for (i = (1 << 14) - xap; i > Cx; i -= Cx) + { + ax += (A_VAL(pix) * Cx) >> 9; + rx += (R_VAL(pix) * Cx) >> 9; + gx += (G_VAL(pix) * Cx) >> 9; + bx += (B_VAL(pix) * Cx) >> 9; + pix++; + } + if (i > 0) + { + ax += (A_VAL(pix) * i) >> 9; + rx += (R_VAL(pix) * i) >> 9; + gx += (G_VAL(pix) * i) >> 9; + bx += (B_VAL(pix) * i) >> 9; + } + + a += (ax * j) >> 14; + r += (rx * j) >> 14; + g += (gx * j) >> 14; + b += (bx * j) >> 14; + } + *pbuf++ = ARGB_JOIN(((a + (1 << 4)) >> 5), + ((r + (1 << 4)) >> 5), + ((g + (1 << 4)) >> 5), + ((b + (1 << 4)) >> 5)); + xp++; xapp++; + } + + func(buf, NULL, dc->mul.col, dptr, w); + } +#ifdef EVAS_SLI + ysli++; +#endif + pbuf = buf; + dptr += dst_w; dst_clip_w = w; + xp = xpoints;// + dxx; + xapp = xapoints;// + dxx; + yp++; yapp++; + } + } + else + { +#ifdef DIRECT_SCALE + if ((!src->cache_entry.flags.alpha) && + (!dst->cache_entry.flags.alpha) && + (!dc->mul.use)) + { + while (dst_clip_h--) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + Cy = *yapp >> 16; + yap = *yapp & 0xffff; + + pbuf = dptr; + while (dst_clip_w--) + { + Cx = *xapp >> 16; + xap = *xapp & 0xffff; + + sptr = *yp + *xp + pos; + pix = sptr; + sptr += src_w; + + rx = (R_VAL(pix) * xap) >> 9; + gx = (G_VAL(pix) * xap) >> 9; + bx = (B_VAL(pix) * xap) >> 9; + pix++; + for (i = (1 << 14) - xap; i > Cx; i -= Cx) + { + rx += (R_VAL(pix) * Cx) >> 9; + gx += (G_VAL(pix) * Cx) >> 9; + bx += (B_VAL(pix) * Cx) >> 9; + pix++; + } + if (i > 0) + { + rx += (R_VAL(pix) * i) >> 9; + gx += (G_VAL(pix) * i) >> 9; + bx += (B_VAL(pix) * i) >> 9; + } + + r = (rx * yap) >> 14; + g = (gx * yap) >> 14; + b = (bx * yap) >> 14; + + for (j = (1 << 14) - yap; j > Cy; j -= Cy) + { + pix = sptr; + sptr += src_w; + rx = (R_VAL(pix) * xap) >> 9; + gx = (G_VAL(pix) * xap) >> 9; + bx = (B_VAL(pix) * xap) >> 9; + pix++; + for (i = (1 << 14) - xap; i > Cx; i -= Cx) + { + rx += (R_VAL(pix) * Cx) >> 9; + gx += (G_VAL(pix) * Cx) >> 9; + bx += (B_VAL(pix) * Cx) >> 9; + pix++; + } + if (i > 0) + { + rx += (R_VAL(pix) * i) >> 9; + gx += (G_VAL(pix) * i) >> 9; + bx += (B_VAL(pix) * i) >> 9; + } + + r += (rx * Cy) >> 14; + g += (gx * Cy) >> 14; + b += (bx * Cy) >> 14; + } + if (j > 0) + { + pix = sptr; + sptr += src_w; + rx = (R_VAL(pix) * xap) >> 9; + gx = (G_VAL(pix) * xap) >> 9; + bx = (B_VAL(pix) * xap) >> 9; + pix++; + for (i = (1 << 14) - xap; i > Cx; i -= Cx) + { + rx += (R_VAL(pix) * Cx) >> 9; + gx += (G_VAL(pix) * Cx) >> 9; + bx += (B_VAL(pix) * Cx) >> 9; + pix++; + } + if (i > 0) + { + rx += (R_VAL(pix) * i) >> 9; + gx += (G_VAL(pix) * i) >> 9; + bx += (B_VAL(pix) * i) >> 9; + } + + r += (rx * j) >> 14; + g += (gx * j) >> 14; + b += (bx * j) >> 14; + } + *pbuf++ = ARGB_JOIN(0xff, + ((r + (1 << 4)) >> 5), + ((g + (1 << 4)) >> 5), + ((b + (1 << 4)) >> 5)); + xp++; xapp++; + } + } +#ifdef EVAS_SLI + ysli++; +#endif + dptr += dst_w; dst_clip_w = w; + xp = xpoints;// + dxx; + xapp = xapoints;// + dxx; + yp++; yapp++; + } + } + else +#endif + { + while (dst_clip_h--) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + Cy = *yapp >> 16; + yap = *yapp & 0xffff; + + while (dst_clip_w--) + { + Cx = *xapp >> 16; + xap = *xapp & 0xffff; + + sptr = *yp + *xp + pos; + pix = sptr; + sptr += src_w; + + rx = (R_VAL(pix) * xap) >> 9; + gx = (G_VAL(pix) * xap) >> 9; + bx = (B_VAL(pix) * xap) >> 9; + pix++; + for (i = (1 << 14) - xap; i > Cx; i -= Cx) + { + rx += (R_VAL(pix) * Cx) >> 9; + gx += (G_VAL(pix) * Cx) >> 9; + bx += (B_VAL(pix) * Cx) >> 9; + pix++; + } + if (i > 0) + { + rx += (R_VAL(pix) * i) >> 9; + gx += (G_VAL(pix) * i) >> 9; + bx += (B_VAL(pix) * i) >> 9; + } + + r = (rx * yap) >> 14; + g = (gx * yap) >> 14; + b = (bx * yap) >> 14; + + for (j = (1 << 14) - yap; j > Cy; j -= Cy) + { + pix = sptr; + sptr += src_w; + rx = (R_VAL(pix) * xap) >> 9; + gx = (G_VAL(pix) * xap) >> 9; + bx = (B_VAL(pix) * xap) >> 9; + pix++; + for (i = (1 << 14) - xap; i > Cx; i -= Cx) + { + rx += (R_VAL(pix) * Cx) >> 9; + gx += (G_VAL(pix) * Cx) >> 9; + bx += (B_VAL(pix) * Cx) >> 9; + pix++; + } + if (i > 0) + { + rx += (R_VAL(pix) * i) >> 9; + gx += (G_VAL(pix) * i) >> 9; + bx += (B_VAL(pix) * i) >> 9; + } + + r += (rx * Cy) >> 14; + g += (gx * Cy) >> 14; + b += (bx * Cy) >> 14; + } + if (j > 0) + { + pix = sptr; + sptr += src_w; + rx = (R_VAL(pix) * xap) >> 9; + gx = (G_VAL(pix) * xap) >> 9; + bx = (B_VAL(pix) * xap) >> 9; + pix++; + for (i = (1 << 14) - xap; i > Cx; i -= Cx) + { + rx += (R_VAL(pix) * Cx) >> 9; + gx += (G_VAL(pix) * Cx) >> 9; + bx += (B_VAL(pix) * Cx) >> 9; + pix++; + } + if (i > 0) + { + rx += (R_VAL(pix) * i) >> 9; + gx += (G_VAL(pix) * i) >> 9; + bx += (B_VAL(pix) * i) >> 9; + } + + r += (rx * j) >> 14; + g += (gx * j) >> 14; + b += (bx * j) >> 14; + } + *pbuf++ = ARGB_JOIN(0xff, + ((r + (1 << 4)) >> 5), + ((g + (1 << 4)) >> 5), + ((b + (1 << 4)) >> 5)); + xp++; xapp++; + } + + func(buf, NULL, dc->mul.col, dptr, w); + } +#ifdef EVAS_SLI + ysli++; +#endif + pbuf = buf; + dptr += dst_w; dst_clip_w = w; + xp = xpoints;// + dxx; + xapp = xapoints;// + dxx; + yp++; yapp++; + } + } + } +#else + /* MMX scaling down would go here */ +#endif +} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c new file mode 100644 index 0000000..4c5448e --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c @@ -0,0 +1,260 @@ +{ + int Cy, j; + DATA32 *dptr, *pix, *pbuf, **yp; + int r, g, b, a, rr, gg, bb, aa; + int *xp, xap, yap, pos; + int dyy, dxx; + int w = dst_clip_w; +#ifdef EVAS_SLI + int ysli = dst_clip_y; +#endif + + dptr = dst_ptr; + pos = (src_region_y * src_w) + src_region_x; + dyy = dst_clip_y - dst_region_y; + dxx = dst_clip_x - dst_region_x; + + xp = xpoints;// + dxx; + yp = ypoints;// + dyy; + xapp = xapoints;// + dxx; + yapp = yapoints;// + dyy; + pbuf = buf; + + if (src->cache_entry.flags.alpha) + { + while (dst_clip_h--) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + Cy = *yapp >> 16; + yap = *yapp & 0xffff; + + while (dst_clip_w--) + { + pix = *yp + *xp + pos; + + a = (A_VAL(pix) * yap) >> 10; + r = (R_VAL(pix) * yap) >> 10; + g = (G_VAL(pix) * yap) >> 10; + b = (B_VAL(pix) * yap) >> 10; + for (j = (1 << 14) - yap; j > Cy; j -= Cy) + { + pix += src_w; + a += (A_VAL(pix) * Cy) >> 10; + r += (R_VAL(pix) * Cy) >> 10; + g += (G_VAL(pix) * Cy) >> 10; + b += (B_VAL(pix) * Cy) >> 10; + } + if (j > 0) + { + pix += src_w; + a += (A_VAL(pix) * j) >> 10; + r += (R_VAL(pix) * j) >> 10; + g += (G_VAL(pix) * j) >> 10; + b += (B_VAL(pix) * j) >> 10; + } + if ((xap = *xapp) > 0) + { + pix = *yp + *xp + 1 + pos; + aa = (A_VAL(pix) * yap) >> 10; + rr = (R_VAL(pix) * yap) >> 10; + gg = (G_VAL(pix) * yap) >> 10; + bb = (B_VAL(pix) * yap) >> 10; + for (j = (1 << 14) - yap; j > Cy; j -= Cy) + { + pix += src_w; + aa += (A_VAL(pix) * Cy) >> 10; + rr += (R_VAL(pix) * Cy) >> 10; + gg += (G_VAL(pix) * Cy) >> 10; + bb += (B_VAL(pix) * Cy) >> 10; + } + if (j > 0) + { + pix += src_w; + aa += (A_VAL(pix) * j) >> 10; + rr += (R_VAL(pix) * j) >> 10; + gg += (G_VAL(pix) * j) >> 10; + bb += (B_VAL(pix) * j) >> 10; + } + a += ((aa - a) * xap) >> 8; + r += ((rr - r) * xap) >> 8; + g += ((gg - g) * xap) >> 8; + b += ((bb - b) * xap) >> 8; + } + *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4), + ((r + (1 << 3)) >> 4), + ((g + (1 << 3)) >> 4), + ((b + (1 << 3)) >> 4)); + xp++; xapp++; + } + + func(buf, NULL, dc->mul.col, dptr, w); + } +#ifdef EVAS_SLI + ysli++; +#endif + pbuf = buf; + dptr += dst_w; dst_clip_w = w; + yp++; yapp++; + xp = xpoints;// + dxx; + xapp = xapoints;// + dxx; + } + } + else + { +#ifdef DIRECT_SCALE + if ((!src->cache_entry.flags.alpha) && + (!dst->cache_entry.flags.alpha) && + (!dc->mul.use)) + { + while (dst_clip_h--) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + Cy = *yapp >> 16; + yap = *yapp & 0xffff; + + pbuf = dptr; + while (dst_clip_w--) + { + pix = *yp + *xp + pos; + + r = (R_VAL(pix) * yap) >> 10; + g = (G_VAL(pix) * yap) >> 10; + b = (B_VAL(pix) * yap) >> 10; + for (j = (1 << 14) - yap; j > Cy; j -= Cy) + { + pix += src_w; + r += (R_VAL(pix) * Cy) >> 10; + g += (G_VAL(pix) * Cy) >> 10; + b += (B_VAL(pix) * Cy) >> 10; + } + if (j > 0) + { + pix += src_w; + r += (R_VAL(pix) * j) >> 10; + g += (G_VAL(pix) * j) >> 10; + b += (B_VAL(pix) * j) >> 10; + } + if ((xap = *xapp) > 0) + { + pix = *yp + *xp + 1 + pos; + rr = (R_VAL(pix) * yap) >> 10; + gg = (G_VAL(pix) * yap) >> 10; + bb = (B_VAL(pix) * yap) >> 10; + for (j = (1 << 14) - yap; j > Cy; j -= Cy) + { + pix += src_w; + rr += (R_VAL(pix) * Cy) >> 10; + gg += (G_VAL(pix) * Cy) >> 10; + bb += (B_VAL(pix) * Cy) >> 10; + } + if (j > 0) + { + pix += src_w; + rr += (R_VAL(pix) * j) >> 10; + gg += (G_VAL(pix) * j) >> 10; + bb += (B_VAL(pix) * j) >> 10; + } + r += ((rr - r) * xap) >> 8; + g += ((gg - g) * xap) >> 8; + b += ((bb - b) * xap) >> 8; + } + *pbuf++ = ARGB_JOIN(0xff, + ((r + (1 << 3)) >> 4), + ((g + (1 << 3)) >> 4), + ((b + (1 << 3)) >> 4)); + xp++; xapp++; + } + } +#ifdef EVAS_SLI + ysli++; +#endif + dptr += dst_w; dst_clip_w = w; + yp++; yapp++; + xp = xpoints;// + dxx; + xapp = xapoints;// + dxx; + } + } + else +#endif + { + while (dst_clip_h--) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + Cy = *yapp >> 16; + yap = *yapp & 0xffff; + + while (dst_clip_w--) + { + pix = *yp + *xp + pos; + + r = (R_VAL(pix) * yap) >> 10; + g = (G_VAL(pix) * yap) >> 10; + b = (B_VAL(pix) * yap) >> 10; + for (j = (1 << 14) - yap; j > Cy; j -= Cy) + { + pix += src_w; + r += (R_VAL(pix) * Cy) >> 10; + g += (G_VAL(pix) * Cy) >> 10; + b += (B_VAL(pix) * Cy) >> 10; + } + if (j > 0) + { + pix += src_w; + r += (R_VAL(pix) * j) >> 10; + g += (G_VAL(pix) * j) >> 10; + b += (B_VAL(pix) * j) >> 10; + } + if ((xap = *xapp) > 0) + { + pix = *yp + *xp + 1 + pos; + rr = (R_VAL(pix) * yap) >> 10; + gg = (G_VAL(pix) * yap) >> 10; + bb = (B_VAL(pix) * yap) >> 10; + for (j = (1 << 14) - yap; j > Cy; j -= Cy) + { + pix += src_w; + rr += (R_VAL(pix) * Cy) >> 10; + gg += (G_VAL(pix) * Cy) >> 10; + bb += (B_VAL(pix) * Cy) >> 10; + } + if (j > 0) + { + pix += src_w; + rr += (R_VAL(pix) * j) >> 10; + gg += (G_VAL(pix) * j) >> 10; + bb += (B_VAL(pix) * j) >> 10; + } + r += ((rr - r) * xap) >> 8; + g += ((gg - g) * xap) >> 8; + b += ((bb - b) * xap) >> 8; + } + *pbuf++ = ARGB_JOIN(0xff, + ((r + (1 << 3)) >> 4), + ((g + (1 << 3)) >> 4), + ((b + (1 << 3)) >> 4)); + xp++; xapp++; + } + + func(buf, NULL, dc->mul.col, dptr, w); + } +#ifdef EVAS_SLI + ysli++; +#endif + pbuf = buf; + dptr += dst_w; dst_clip_w = w; + yp++; yapp++; + xp = xpoints;// + dxx; + xapp = xapoints;// + dxx; + } + } + } +} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c new file mode 100644 index 0000000..24529e5 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c @@ -0,0 +1,62 @@ +{ + DATA32 *ptr; + RGBA_Gfx_Func func; + RGBA_Image *maskobj; + DATA8 *mask = NULL; +#ifdef EVAS_SLI + int ysli = dst_clip_y; +#endif + + ptr = src->image.data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; + if (dc->mask.mask) + { + func = evas_common_gfx_func_composite_pixel_mask_span_get(NULL, NULL, dst_clip_w, dc->render_op); + maskobj = dc->mask.mask; + mask = maskobj->mask.mask; + } + else if (dc->mul.use) + func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); + else + func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); + + if (mask) + { + // mask += dst_clip_x - dc->mask.x; + // mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w; + while (dst_clip_h--) + { + +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w); + } +#ifdef EVAS_SLI + ysli++; +#endif + ptr += src_w; + dst_ptr += dst_w; + mask += maskobj->cache_entry.w; + } + } + else + { + while (dst_clip_h--) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w); + } +#ifdef EVAS_SLI + ysli++; +#endif + ptr += src_w; + dst_ptr += dst_w; + } + } +} + +/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c new file mode 100644 index 0000000..7327ac5 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c @@ -0,0 +1,266 @@ +{ + int srx = src_region_x, sry = src_region_y; + int srw = src_region_w, srh = src_region_h; + int drx = dst_region_x, dry = dst_region_y; + int drw = dst_region_w, drh = dst_region_h; + + int dsxx, dsyy, sxx, syy, sx, sy; + int cx, cy; + int direct_scale = 0, buf_step = 0; + + DATA32 *psrc, *pdst, *pdst_end; + DATA32 *buf, *pbuf, *pbuf_end; + RGBA_Gfx_Func func = NULL; + + /* check value to make overflow(only check value related with overflow) */ + if ((src_region_w > SCALE_SIZE_MAX) || + (src_region_h > SCALE_SIZE_MAX)) return; + + /* a scanline buffer */ + pdst = dst_ptr; // it's been set at (dst_clip_x, dst_clip_y) + pdst_end = pdst + (dst_clip_h * dst_w); + if (!dc->mul.use) + { + if ((dc->render_op == _EVAS_RENDER_BLEND) && !src->cache_entry.flags.alpha) + { direct_scale = 1; buf_step = dst->cache_entry.w; } + else if (dc->render_op == _EVAS_RENDER_COPY) + { + direct_scale = 1; buf_step = dst->cache_entry.w; + if (src->cache_entry.flags.alpha) + dst->cache_entry.flags.alpha = 1; + } + } + if (!direct_scale) + { + buf = alloca(dst_clip_w * sizeof(DATA32)); + if (dc->mul.use) + func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); + else + func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); + } + else + buf = pdst; + + if ((srw > 1) && (drw > 1)) + dsxx = ((srw - 1) << 16) / (drw - 1); + else + dsxx = (srw << 16) / drw; + if ((srh > 1) && (drh > 1)) + dsyy = ((srh - 1) << 16) / (drh - 1); + else + dsyy = (srh << 16) / drh; + + cx = dst_clip_x - drx; + cy = dst_clip_y - dry; + + sxx = (dsxx * cx); + syy = (dsyy * cy); + + sy = syy >> 16; + + if (drh == srh) + { + int sxx0 = sxx; +#ifdef EVAS_SLI + int ysli = dst_clip_y; +#endif + psrc = src->image.data + (src_w * (sry + cy)) + srx; + while (pdst < pdst_end) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + pbuf = buf; pbuf_end = buf + dst_clip_w; + sxx = sxx0; +#ifdef SCALE_USING_MMX + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) +#endif + while (pbuf < pbuf_end) + { + DATA32 p0, p1; + int ax; + + sx = (sxx >> 16); + ax = 1 + ((sxx - (sx << 16)) >> 8); + p0 = p1 = *(psrc + sx); + if ((sx + 1) < srw) + p1 = *(psrc + sx + 1); +#ifdef SCALE_USING_MMX + MOV_P2R(p0, mm1, mm0) + if (p0 | p1) + { + MOV_A2R(ax, mm3) + MOV_P2R(p1, mm2, mm0) + INTERP_256_R2R(mm3, mm2, mm1, mm5) + } + MOV_R2P(mm1, *pbuf, mm0) + pbuf++; +#else + if (p0 | p1) + p0 = INTERP_256(ax, p1, p0); + *pbuf++ = p0; +#endif + sxx += dsxx; + } + /* * blend here [clip_w *] buf -> dptr * */ + if (!direct_scale) + func(buf, NULL, dc->mul.col, pdst, dst_clip_w); + } +#ifdef EVAS_SLI + ysli++; +#endif + pdst += dst_w; + psrc += src_w; + buf += buf_step; + } + + goto done_scale_up; + } + else if (drw == srw) + { + DATA32 *ps = src->image.data + (src_w * sry) + srx + cx; +#ifdef EVAS_SLI + int ysli = dst_clip_y; +#endif + + while (pdst < pdst_end) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + int ay; + + sy = syy >> 16; + psrc = ps + (sy * src_w); + ay = 1 + ((syy - (sy << 16)) >> 8); +#ifdef SCALE_USING_MMX + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + MOV_A2R(ay, mm4) +#endif + pbuf = buf; pbuf_end = buf + dst_clip_w; + while (pbuf < pbuf_end) + { + DATA32 p0 = *psrc, p2 = p0; + + if ((sy + 1) < srh) + p2 = *(psrc + src_w); +#ifdef SCALE_USING_MMX + MOV_P2R(p0, mm1, mm0) + if (p0 | p2) + { + MOV_P2R(p2, mm2, mm0) + INTERP_256_R2R(mm4, mm2, mm1, mm5) + } + MOV_R2P(mm1, *pbuf, mm0) + pbuf++; +#else + if (p0 | p2) + p0 = INTERP_256(ay, p2, p0); + *pbuf++ = p0; +#endif + psrc++; + } + /* * blend here [clip_w *] buf -> dptr * */ + if (!direct_scale) + func(buf, NULL, dc->mul.col, pdst, dst_clip_w); + } +#ifdef EVAS_SLI + ysli++; +#endif + pdst += dst_w; + syy += dsyy; + buf += buf_step; + } + goto done_scale_up; + } + + { + DATA32 *ps = src->image.data + (src_w * sry) + srx; + int sxx0 = sxx; +#ifdef EVAS_SLI + int ysli = dst_clip_y; +#endif + + while (pdst < pdst_end) + { +#ifdef EVAS_SLI + if (((ysli) % dc->sli.h) == dc->sli.y) +#endif + { + int ay; + + sy = syy >> 16; + psrc = ps + (sy * src_w); + ay = 1 + ((syy - (sy << 16)) >> 8); +#ifdef SCALE_USING_MMX + MOV_A2R(ay, mm4) + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) +#endif + pbuf = buf; pbuf_end = buf + dst_clip_w; + sxx = sxx0; + while (pbuf < pbuf_end) + { + int ax; + DATA32 *p, *q; + DATA32 p0, p1, p2, p3; + + sx = sxx >> 16; + ax = 1 + ((sxx - (sx << 16)) >> 8); + p = psrc + sx; q = p + src_w; + p0 = p1 = p2 = p3 = *p; + if ((sx + 1) < srw) + p1 = *(p + 1); + if ((sy + 1) < srh) + { + p2 = *q; p3 = p2; + if ((sx + 1) < srw) + p3 = *(q + 1); + } +#ifdef SCALE_USING_MMX + MOV_A2R(ax, mm6) + MOV_P2R(p0, mm1, mm0) + if (p0 | p1) + { + MOV_P2R(p1, mm2, mm0) + INTERP_256_R2R(mm6, mm2, mm1, mm5) + } + MOV_P2R(p2, mm2, mm0) + if (p2 | p3) + { + MOV_P2R(p3, mm3, mm0) + INTERP_256_R2R(mm6, mm3, mm2, mm5) + } + INTERP_256_R2R(mm4, mm2, mm1, mm5) + MOV_R2P(mm1, *pbuf, mm0) + pbuf++; +#else + if (p0 | p1) + p0 = INTERP_256(ax, p1, p0); + if (p2 | p3) + p2 = INTERP_256(ax, p3, p2); + if (p0 | p2) + p0 = INTERP_256(ay, p2, p0); + *pbuf++ = p0; +#endif + sxx += dsxx; + } + /* * blend here [clip_w *] buf -> dptr * */ + if (!direct_scale) + func(buf, NULL, dc->mul.col, pdst, dst_clip_w); + } +#ifdef EVAS_SLI + ysli++; +#endif + pdst += dst_w; + syy += dsyy; + buf += buf_step; + } + } + done_scale_up: + return; +} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_span.c b/libraries/evas/src/lib/engines/common/evas_scale_span.c new file mode 100644 index 0000000..e0fefb2 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_span.c @@ -0,0 +1,653 @@ +#include "evas_common.h" +#include "evas_convert_color.h" +#include "evas_scale_span.h" + +static void +evas_common_scale_rgba_span_(DATA32 *src, DATA8 *mask __UNUSED__, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) +{ + int mul = 0, step = 1; + DATA32 *pdst = dst; + + if (!src || !dst) return; + if ((src_len < 1) || (dst_len < 1)) return; + if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; + if (mul_col != 0xffffffff) + mul = 1; + if (dir < 0) + { + pdst += dst_len - 1; + step = -1; + } + + if ((src_len == 1) || (dst_len == 1)) + { + DATA32 c = *src; + + if (mul) c = MUL4_SYM(mul_col, c); + while (dst_len--) + *dst++ = c; + return; + } + + if (src_len == dst_len) + { + if (mul) + { +#ifdef BUILD_MMX + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + MOV_P2R(mul_col, mm7, mm0) +#endif + while (dst_len--) + { +#ifdef BUILD_MMX + MOV_P2R(*src, mm1, mm0) + MUL4_SYM_R2R(mm7, mm1, mm5) + MOV_R2P(mm1, *pdst, mm0) +#else + *pdst = MUL4_SYM(mul_col, *src); +#endif + src++; pdst += step; + } + return; + } + while (dst_len--) + { + *pdst = *src; + src++; pdst += step; + } + return; + } + + { + DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); + DATA32 sxx = 0; + int sx = sxx >> 16; + +#ifdef BUILD_MMX + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + if (mul) + { + MOV_P2R(mul_col, mm7, mm0) + } +#endif + while (dst_len--) + { + DATA32 p2, p1 = 0; + int a; + + sx = (sxx >> 16); + if (sx < src_len) + p1 = *(src + sx); + p2 = p1; + if ((sx + 1) < src_len) + p2 = *(src + sx + 1); + a = 1 + ((sxx - (sx << 16)) >> 8); +#ifdef BUILD_MMX + MOV_A2R(a, mm3) + MOV_P2R(p1, mm1, mm0) + MOV_P2R(p2, mm2, mm0) + INTERP_256_R2R(mm3, mm2, mm1, mm5) + if (mul) + { + MUL4_SYM_R2R(mm7, mm1, mm5) + } + MOV_R2P(mm1, *pdst, mm0) +#else + p1 = INTERP_256(a, p2, p1); + if (mul) + p1 = MUL4_SYM(mul_col, p1); + *pdst = p1; +#endif + pdst += step; sxx += dsxx; + } + return; + } +} + +static void +evas_common_scale_rgba_a8_span_(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) +{ + int mul = 0, step = 1; + DATA32 *pdst = dst; + + if (!src || !mask || !dst) return; + if ((src_len < 1) || (dst_len < 1)) return; + if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; + if (mul_col != 0xffffffff) + mul = 1; + if (dir < 0) + { + pdst += dst_len - 1; + step = -1; + } + + if ((src_len == 1) || (dst_len == 1)) + { + DATA32 c = MUL_SYM(*mask, *src); + + if (mul) c = MUL4_SYM(mul_col, c); + while (dst_len--) + *dst++ = c; + return; + } + + if (src_len == dst_len) + { +#ifdef BUILD_MMX + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) +#endif + if (mul) + { +#ifdef BUILD_MMX + MOV_P2R(mul_col, mm7, mm0) +#endif + while (dst_len--) + { +#ifdef BUILD_MMX + MOV_P2R(*src, mm1, mm0) + MOV_A2R(*mask, mm3) + MUL4_SYM_R2R(mm3, mm1, mm5) + MUL4_SYM_R2R(mm7, mm1, mm5) + MOV_R2P(mm1, *pdst, mm0) +#else + DATA32 c = MUL_SYM(*mask, *src); + *pdst = MUL4_SYM(mul_col, c); +#endif + src++; mask++; pdst += step; + } + return; + } + while (dst_len--) + { +#ifdef BUILD_MMX + MOV_P2R(*src, mm1, mm0) + MOV_A2R(*mask, mm3) + MUL4_SYM_R2R(mm3, mm1, mm5) + MOV_R2P(mm1, *pdst, mm0) +#else + *pdst = MUL_SYM(*mask, *src); +#endif + src++; mask++; pdst += step; + } + return; + } + + { + DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); + DATA32 sxx = 0; + int sx = sxx >> 16; + +#ifdef BUILD_MMX + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + if (mul) + { + MOV_P2R(mul_col, mm7, mm0) + } +#endif + while (dst_len--) + { + DATA32 p2, p1 = 0; + int a, a2, a1 = 0; + + sx = (sxx >> 16); + if (sx < src_len) + { + p1 = *(src + sx); + a1 = *(mask + sx); + } + p2 = p1; a2 = a1; + if ((sx + 1) < src_len) + { + p2 = *(src + sx + 1); + a2 = *(mask + sx + 1); + } + a = 1 + ((sxx - (sx << 16)) >> 8); +#ifdef BUILD_MMX + MOV_A2R(a, mm3) + MOV_P2R(p1, mm1, mm0) + MOV_P2R(p2, mm2, mm0) + INTERP_256_R2R(mm3, mm2, mm1, mm5) + a1 += 1 + ((a * (a2 - a1)) >> 8); + MOV_A2R(a1, mm3) + MUL4_256_R2R(mm3, mm1) + if (mul) + { + MUL4_SYM_R2R(mm7, mm1, mm5) + } + MOV_R2P(mm1, *pdst, mm0) +#else + p1 = INTERP_256(a, p2, p1); + a1 += 1 + ((a * (a2 - a1)) >> 8); + p1 = MUL_256(a1, p1); + if (mul) + p1 = MUL4_SYM(mul_col, p1); + *pdst = p1; +#endif + pdst += step; sxx += dsxx; + } + return; + } +} + +static void +evas_common_scale_a8_span_(DATA32 *src __UNUSED__, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) +{ + int step = 1; + DATA32 *pdst = dst; + + if (!mask || !dst) return; + if ((src_len < 1) || (dst_len < 1)) return; + if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; + if (dir < 0) + { + pdst += dst_len - 1; + step = -1; + } + + if ((src_len == 1) || (dst_len == 1)) + { + DATA32 c = MUL_SYM(*mask, mul_col); + + while (dst_len--) + *dst++ = c; + return; + } + +#ifdef BUILD_MMX + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + MOV_P2R(mul_col, mm7, mm0) +#endif + if (src_len == dst_len) + { + while (dst_len--) + { +#ifdef BUILD_MMX + MOV_A2R(*mask, mm3) + MUL4_SYM_R2R(mm7, mm3, mm5) + MOV_R2P(mm3, *pdst, mm0) +#else + *pdst = MUL_SYM(*mask, mul_col); +#endif + mask++; pdst += step; + } + return; + } + + { + DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); + DATA32 sxx = 0; + int sx = sxx >> 16; + + while (dst_len--) + { + int a, a2, a1 = 0; + + sx = (sxx >> 16); + if (sx < src_len) + a1 = *(mask + sx); + a2 = a1; + if ((sx + 1) < src_len) + a2 = *(mask + sx + 1); + a = 1 + ((sxx - (sx << 16)) >> 8); + a1 += 1 + ((a * (a2 - a1)) >> 8); +#ifdef BUILD_MMX + MOV_A2R(a1, mm3) + MUL4_256_R2R(mm7, mm3) + MOV_R2P(mm3, *pdst, mm0) +#else + *pdst = MUL_256(a1, mul_col); +#endif + pdst += step; sxx += dsxx; + } + return; + } +} + +static void +evas_common_scale_clip_a8_span_(DATA32 *src __UNUSED__, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) +{ + int mul = 0, step = 1; + DATA32 *pdst = dst; + + if (!mask || !dst) return; + if ((src_len < 1) || (dst_len < 1)) return; + if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; + if (mul_col != 0xffffffff) + mul = 1; + if (dir < 0) + { + pdst += dst_len - 1; + step = -1; + } + +#ifdef BUILD_MMX + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + if (mul) + { + MOV_P2R(mul_col, mm7, mm0) + } +#endif + if ((src_len == 1) || (dst_len == 1)) + { +#ifdef BUILD_MMX + MOV_A2R(*mask, mm3) +#else + DATA32 c = *mask; +#endif + if (mul) + { +#ifdef BUILD_MMX + MUL4_SYM_R2R(mm7, mm3, mm5) +#else + c = MUL_SYM(c, mul_col); +#endif + while (dst_len--) + { +#ifdef BUILD_MMX + MOV_P2R(*dst, mm1, mm0) + MUL4_SYM_R2R(mm3, mm1, mm5) + MOV_R2P(mm1, *dst, mm0) +#else + *dst = MUL4_SYM(c, *dst); +#endif + dst++; + } + return; + } + while (dst_len--) + { +#ifdef BUILD_MMX + MOV_P2R(*dst, mm1, mm0) + MUL4_SYM_R2R(mm3, mm1, mm5) + MOV_R2P(mm1, *dst, mm0) +#else + *dst = MUL_SYM(c, *dst); +#endif + dst++; + } + return; + } + + if (src_len == dst_len) + { + if (mul) + { + while (dst_len--) + { +#ifdef BUILD_MMX + MOV_A2R(*mask, mm3) + MUL4_SYM_R2R(mm7, mm3, mm5) + MOV_P2R(*pdst, mm1, mm0) + MUL4_SYM_R2R(mm3, mm1, mm5) + MOV_R2P(mm1, *pdst, mm0) +#else + DATA32 c = MUL_SYM(*mask, mul_col); + + *pdst = MUL4_SYM(c, *pdst); +#endif + mask++; pdst += step; + } + return; + } + while (dst_len--) + { +#ifdef BUILD_MMX + MOV_A2R(*mask, mm3) + MOV_P2R(*pdst, mm1, mm0) + MUL4_SYM_R2R(mm3, mm1, mm5) + MOV_R2P(mm1, *pdst, mm0) +#else + *pdst = MUL_SYM(*mask, *pdst); +#endif + mask++; pdst += step; + } + return; + } + + { + DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); + DATA32 sxx = 0; + int sx = sxx >> 16; + + while (dst_len--) + { + int a, a2, a1 = 0; + + sx = (sxx >> 16); + if (sx < src_len) + a1 = *(mask + sx); + a2 = a1; + if ((sx + 1) < src_len) + a2 = *(mask + sx + 1); + a = 1 + ((sxx - (sx << 16)) >> 8); + a1 += 1 + ((a * (a2 - a1)) >> 8); +#ifdef BUILD_MMX + MOV_A2R(a1, mm3) + MOV_P2R(*pdst, mm1, mm0) + MUL4_256_R2R(mm3, mm1) + if (mul) + { + MUL4_SYM_R2R(mm7, mm1, mm5) + } + MOV_R2P(mm1, *pdst, mm0) +#else + *pdst = MUL_256(a1, *pdst); + if (mul) + *pdst = MUL4_SYM(mul_col, *pdst); +#endif + pdst += step; sxx += dsxx; + } + return; + } +} + +EAPI void +evas_common_scale_rgba_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) +{ + evas_common_scale_rgba_span_(src, mask, src_len, mul_col, dst, dst_len, dir); + evas_common_cpu_end_opt(); +} + +EAPI void +evas_common_scale_rgba_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) +{ + evas_common_scale_rgba_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir); + evas_common_cpu_end_opt(); +} + +EAPI void +evas_common_scale_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) +{ + evas_common_scale_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir); + evas_common_cpu_end_opt(); +} + +EAPI void +evas_common_scale_clip_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) +{ + evas_common_scale_clip_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir); + evas_common_cpu_end_opt(); +} + +EAPI void +evas_common_scale_hsva_span(DATA32 *src, DATA8 *mask __UNUSED__, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) +{ + int mul = 0, step = 1; + DATA32 *pdst = dst; + + if (!src || !dst) return; + if ((src_len < 1) || (dst_len < 1)) return; + if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; + if (mul_col != 0xffffffff) + mul = 1; + if (dir < 0) + { + pdst += dst_len - 1; + step = -1; + } + + if ((src_len == 1) || (dst_len == 1)) + { + DATA32 c = *src; + + if (mul) c = MUL4_SYM(mul_col, c); + while (dst_len--) + *dst++ = c; + return; + } + + if (src_len == dst_len) + { + if (mul) + { + while (dst_len--) + { + *pdst = MUL4_SYM(mul_col, *src); + src++; pdst += step; + } + return; + } + while (dst_len--) + { + *pdst = *src; + src++; pdst += step; + } + return; + } + + { + DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); + DATA32 sxx = 0; + int sx = sxx >> 16; + + while (dst_len--) + { + DATA32 p2, p1 = 0; + int a, h1, s1, v1, h2, s2, v2; + + sx = (sxx >> 16); + if (sx < src_len) + p1 = *(src + sx); + evas_common_convert_color_rgb_to_hsv_int((p1 >> 16) & 0xff, (p1 >> 8) & 0xff, p1 & 0xff, + &h1, &s1, &v1); + p2 = p1; + if ((sx + 1) < src_len) + p2 = *(src + sx + 1); + evas_common_convert_color_rgb_to_hsv_int((p2 >> 16) & 0xff, (p2 >> 8) & 0xff, p2 & 0xff, + &h2, &s2, &v2); + a = 1 + ((sxx - (sx << 16)) >> 8); + h1 += (a * (h2 - h1)) >> 8; + s1 += (a * (s2 - s1)) >> 8; + v1 += (a * (v2 - v1)) >> 8; + a = (((((p2 >> 8) & 0xff0000) - ((p1 >> 8) & 0xff0000)) * a) + + (p1 & 0xff000000)) & 0xff000000; + evas_common_convert_color_hsv_to_rgb_int(h1, s1, v1, &h2, &s2, &v2); + p1 = a + RGB_JOIN(h2,s2,v2); + if (mul) + p1 = MUL4_SYM(mul_col, p1); + *pdst = p1; + pdst += step; sxx += dsxx; + } + return; + } +} + +EAPI void +evas_common_scale_hsva_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) +{ + int mul = 0, step = 1; + DATA32 *pdst = dst; + + if (!src || !mask || !dst) return; + if ((src_len < 1) || (dst_len < 1)) return; + if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; + if (mul_col != 0xffffffff) + mul = 1; + if (dir < 0) + { + pdst += dst_len - 1; + step = -1; + } + + if ((src_len == 1) || (dst_len == 1)) + { + DATA32 c = MUL_SYM(*mask, *src); + + if (mul) c = MUL4_SYM(mul_col, c); + while (dst_len--) + *dst++ = c; + return; + } + + if (src_len == dst_len) + { + if (mul) + { + while (dst_len--) + { + DATA32 c = MUL_SYM(*mask, *src); + *pdst = MUL4_SYM(mul_col, c); + src++; mask++; pdst += step; + } + return; + } + while (dst_len--) + { + *pdst = MUL_SYM(*mask, *src); + src++; mask++; pdst += step; + } + return; + } + + { + DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); + DATA32 sxx = 0; + int sx = sxx >> 16; + + while (dst_len--) + { + DATA32 p2, p1 = 0; + int a, a2, a1 = 0; + int h1, s1, v1, h2, s2, v2; + + sx = (sxx >> 16); + if (sx < src_len) + { + p1 = *(src + sx); + a1 = *(mask + sx); + } + p2 = p1; a2 = a1; + if ((sx + 1) < src_len) + { + p2 = *(src + sx + 1); + a2 = *(mask + sx + 1); + } + evas_common_convert_color_rgb_to_hsv_int((p1 >> 16) & 0xff, (p1 >> 8) & 0xff, p1 & 0xff, + &h1, &s1, &v1); + evas_common_convert_color_rgb_to_hsv_int((p2 >> 16) & 0xff, (p2 >> 8) & 0xff, p2 & 0xff, + &h2, &s2, &v2); + a = 1 + ((sxx - (sx << 16)) >> 8); + a1 += (a * (a2 - a1)) >> 8; + h1 += (a * (h2 - h1)) >> 8; + s1 += (a * (s2 - s1)) >> 8; + v1 += (a * (v2 - v1)) >> 8; + a = (((((p2 >> 8) & 0xff0000) - ((p1 >> 8) & 0xff0000)) * a) + + (p1 & 0xff000000)) & 0xff000000; + + evas_common_convert_color_hsv_to_rgb_int(h1, s1, v1, &h2, &s2, &v2); + p1 = a + RGB_JOIN(h2,s2,v2); + p1 = MUL_SYM(a1, p1); + if (mul) + p1 = MUL4_SYM(mul_col, p1); + *pdst = p1; + pdst += step; sxx += dsxx; + } + return; + } +} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_span.h b/libraries/evas/src/lib/engines/common/evas_scale_span.h new file mode 100644 index 0000000..874c594 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_scale_span.h @@ -0,0 +1,14 @@ +#ifndef _EVAS_SCALE_SPAN_H +#define _EVAS_SCALE_SPAN_H + + +EAPI void evas_common_scale_rgba_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); +EAPI void evas_common_scale_rgba_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); +EAPI void evas_common_scale_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); +EAPI void evas_common_scale_clip_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); + +EAPI void evas_common_scale_hsva_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); +EAPI void evas_common_scale_hsva_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); + + +#endif /* _EVAS_SCALE_SPAN_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_text_utils.c b/libraries/evas/src/lib/engines/common/evas_text_utils.c new file mode 100644 index 0000000..a00df91 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_text_utils.c @@ -0,0 +1,472 @@ +#include "evas_common.h" +#include "evas_font_private.h" +#include "evas_text_utils.h" +#include "language/evas_bidi_utils.h" +#include "language/evas_language_utils.h" +#include "evas_font_ot.h" + +void +evas_common_text_props_bidi_set(Evas_Text_Props *props, + Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start) +{ +#ifdef BIDI_SUPPORT + props->bidi.dir = (evas_bidi_is_rtl_char( + bidi_par_props, + 0, + start)) ? EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR; +#else + (void) start; + (void) bidi_par_props; + props->bidi.dir = EVAS_BIDI_DIRECTION_LTR; +#endif +} + +void +evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr) +{ + props->script = scr; +} + +void +evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst, + const Evas_Text_Props *src) +{ + memcpy(dst, src, sizeof(Evas_Text_Props)); + evas_common_text_props_content_ref(dst); +} + +void +evas_common_text_props_content_ref(Evas_Text_Props *props) +{ + /* No content in this case */ + if (!props->info) + return; + + props->info->refcount++; +} + +void +evas_common_text_props_content_unref(Evas_Text_Props *props) +{ + /* No content in this case */ + if (!props->info) + return; + + if (--(props->info->refcount) == 0) + { + if (props->info->glyph) + free(props->info->glyph); +#ifdef OT_SUPPORT + if (props->info->ot) + free(props->info->ot); +#endif + free(props->info); + props->info = NULL; + } +} + +static int +_evas_common_text_props_cluster_move(const Evas_Text_Props *props, int pos, + Eina_Bool right) +{ + int prop_pos = evas_common_text_props_index_find(props, pos); + if (!right && (prop_pos > 0)) + { +#ifdef OT_SUPPORT + return props->info->ot[props->start + prop_pos - 1].source_cluster - + props->text_offset; +#else + return props->start + prop_pos - 1 - props->text_offset; +#endif + } + else if (right && (prop_pos < (int) (props->len - 1))) + { +#ifdef OT_SUPPORT + return props->info->ot[props->start + prop_pos + 1].source_cluster - + props->text_offset; +#else + return props->start + prop_pos + 1 - props->text_offset; +#endif + } + + return pos; +} + +EAPI int +evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos) +{ + Eina_Bool right; + /* Move right if we are in a non-rtl text */ + right = (props->bidi.dir != EVAS_BIDI_DIRECTION_RTL); + return _evas_common_text_props_cluster_move(props, pos, right); +} + +EAPI int +evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos) +{ + Eina_Bool right; + /* Move right if we are in an rtl text */ + right = (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL); + return _evas_common_text_props_cluster_move(props, pos, right); +} + +/* Returns the index of the logical char in the props. */ +EAPI int +evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff) +{ +#ifdef OT_SUPPORT + Evas_Font_OT_Info *ot_info; + int min = 0; + int max = props->len - 1; + int mid; + + _cutoff += props->text_offset; + ot_info = props->info->ot + props->start; + /* Should get us closer to the right place. */ + if ((min <= _cutoff) && (_cutoff <= max)) + mid = _cutoff; + else + mid = (min + max) / 2; + + if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + /* Monotonic in a descending order */ + do + { + if (_cutoff > (int) ot_info[mid].source_cluster) + max = mid - 1; + else if (_cutoff < (int) ot_info[mid].source_cluster) + min = mid + 1; + else + break; + + mid = (min + max) / 2; + } + while (min <= max); + } + else + { + /* Monotonic in an ascending order */ + do + { + if (_cutoff < (int) ot_info[mid].source_cluster) + max = mid - 1; + else if (_cutoff > (int) ot_info[mid].source_cluster) + min = mid + 1; + else + break; + + mid = (min + max) / 2; + } + while (min <= max); + } + + /* If we didn't find, abort */ + if (min > max) + return -1; + + ot_info += mid; + if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + /* Walk to the last one of the same cluster */ + for ( ; mid < (int) props->len ; mid++, ot_info++) + { + if (ot_info->source_cluster != (size_t) _cutoff) + break; + } + mid--; + } + else + { + /* Walk to the last one of the same cluster */ + for ( ; mid >= 0 ; mid--, ot_info--) + { + if (ot_info->source_cluster != (size_t) _cutoff) + break; + } + mid++; + } + + return mid; +#else + return _cutoff; + (void) props; +#endif +} + +/* Won't work in the middle of ligatures, assumes cutoff < len. + * Also won't work in the middle of indic words, should handle that in a + * smart way. */ +EAPI void +evas_common_text_props_split(Evas_Text_Props *base, + Evas_Text_Props *ext, int _cutoff) +{ + size_t cutoff; + + /* Translate text cutoff pos to string object cutoff point */ +#ifdef OT_SUPPORT + _cutoff = evas_common_text_props_index_find(base, _cutoff); + + if (_cutoff >= 0) + { + cutoff = (size_t) _cutoff; + } + else + { + ERR("Couldn't find the cutoff position. Is it inside a cluster?"); + return; + } +#else + cutoff = (size_t) _cutoff; +#endif + + evas_common_text_props_content_copy_and_ref(ext, base); + if (base->bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + ext->start = base->start; + ext->len = cutoff + 1; + base->start = base->start + ext->len; + base->len = base->len - ext->len; + +#ifdef OT_SUPPORT + ext->text_offset = + ext->info->ot[ext->start + ext->len - 1].source_cluster; +#else + ext->text_offset = base->text_offset + base->len; +#endif + } + else + { + ext->start = base->start + cutoff; + ext->len = base->len - cutoff; + base->len = cutoff; + +#ifdef OT_SUPPORT + ext->text_offset = ext->info->ot[ext->start].source_cluster; +#else + ext->text_offset = base->text_offset + base->len; +#endif + } + ext->text_len = base->text_len - (ext->text_offset - base->text_offset); + base->text_len = (ext->text_offset - base->text_offset); +} + +/* Won't work in the middle of ligatures */ +EAPI void +evas_common_text_props_merge(Evas_Text_Props *item1, + const Evas_Text_Props *item2) +{ + if (item1->info != item2->info) + { + ERR("tried merge back items that weren't together in the first place."); + return; + } + if (item1->bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + item1->start = item2->start; + } + + item1->len += item2->len; + item1->text_len += item2->text_len; +} + +EAPI Eina_Bool +evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text, + Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, + size_t par_pos, int len) +{ + RGBA_Font_Int *fi = (RGBA_Font_Int *) _fi; + + if (text_props->info) + { + evas_common_text_props_content_unref(text_props); + } + if (len == 0) + { + text_props->info = NULL; + text_props->start = text_props->len = text_props->text_offset = 0; + } + text_props->info = calloc(1, sizeof(Evas_Text_Props_Info)); + + text_props->font_instance = fi; + + evas_common_font_int_reload(fi); + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } + +#ifdef OT_SUPPORT + size_t char_index; + Evas_Font_Glyph_Info *gl_itr; + Evas_Coord pen_x = 0, adjust_x = 0; + (void) par_props; + (void) par_pos; + + evas_common_font_ot_populate_text_props(text, text_props, len); + + gl_itr = text_props->info->glyph; + for (char_index = 0 ; char_index < text_props->len ; char_index++) + { + FT_UInt idx; + RGBA_Font_Glyph *fg; + Eina_Bool is_replacement = EINA_FALSE; + /* If we got a malformed index, show the replacement char instead */ + if (gl_itr->index == 0) + { + gl_itr->index = evas_common_get_char_index(fi, REPLACEMENT_CHAR); + is_replacement = EINA_TRUE; + } + idx = gl_itr->index; + LKL(fi->ft_mutex); + fg = evas_common_font_int_cache_glyph_get(fi, idx); + if (!fg) + { + LKU(fi->ft_mutex); + continue; + } + LKU(fi->ft_mutex); + + gl_itr->x_bear = fg->glyph_out->left; + gl_itr->width = fg->glyph_out->bitmap.width; + /* text_props->info->glyph[char_index].advance = + * text_props->info->glyph[char_index].index = + * already done by the ot function */ + if (EVAS_FONT_CHARACTER_IS_INVISIBLE( + text[text_props->info->ot[char_index].source_cluster])) + { + gl_itr->index = 0; + /* Reduce the current advance */ + if (gl_itr > text_props->info->glyph) + { + adjust_x -= gl_itr->pen_after - (gl_itr - 1)->pen_after; + } + else + { + adjust_x -= gl_itr->pen_after; + } + } + else + { + if (is_replacement) + { + /* Update the advance accordingly */ + adjust_x += (pen_x + (fg->glyph->advance.x >> 16)) - + gl_itr->pen_after; + } + pen_x = gl_itr->pen_after; + } + gl_itr->pen_after += adjust_x; + + fi = text_props->font_instance; + gl_itr++; + } +#else + /* We are walking the string in visual ordering */ + Evas_Font_Glyph_Info *gl_itr; + Eina_Bool use_kerning; + FT_UInt prev_index; + FT_Face pface = NULL; + Evas_Coord pen_x = 0; + int adv_d, i; +#if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT) + Eina_Unicode *base_str = NULL; + if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + text = base_str = eina_unicode_strndup(text, len); + evas_bidi_shape_string(base_str, par_props, par_pos, len); + } +#else + (void) par_props; + (void) par_pos; +#endif + + FTLOCK(); + use_kerning = FT_HAS_KERNING(fi->src->ft.face); + FTUNLOCK(); + prev_index = 0; + + i = len; + text_props->info->glyph = calloc(len, + sizeof(Evas_Font_Glyph_Info)); + + if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + text += len - 1; + adv_d = -1; + } + else + { + adv_d = 1; + } + + gl_itr = text_props->info->glyph; + for ( ; i > 0 ; gl_itr++, text += adv_d, i--) + { + FT_UInt idx; + RGBA_Font_Glyph *fg; + int _gl, kern; + Evas_Coord adv; + _gl = *text; + if (_gl == 0) break; + + idx = evas_common_get_char_index(fi, _gl); + if (idx == 0) + { + idx = evas_common_get_char_index(fi, REPLACEMENT_CHAR); + } + + LKL(fi->ft_mutex); + fg = evas_common_font_int_cache_glyph_get(fi, idx); + if (!fg) + { + LKU(fi->ft_mutex); + continue; + } + kern = 0; + + if ((use_kerning) && (prev_index) && (idx) && + (pface == fi->src->ft.face)) + { + if (evas_common_font_query_kerning(fi, prev_index, idx, &kern)) + { + pen_x += kern; + (gl_itr - 1)->pen_after += + EVAS_FONT_ROUND_26_6_TO_INT(kern); + } + } + + pface = fi->src->ft.face; + LKU(fi->ft_mutex); + + gl_itr->index = idx; + gl_itr->x_bear = fg->glyph_out->left; + adv = fg->glyph->advance.x >> 10; + gl_itr->width = fg->glyph_out->bitmap.width; + + if (EVAS_FONT_CHARACTER_IS_INVISIBLE(_gl)) + { + gl_itr->index = 0; + } + else + { + pen_x += adv; + } + + gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x); + + prev_index = idx; + } + text_props->len = len; +# if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT) + if (base_str) + free(base_str); +# endif +#endif + text_props->text_len = len; + text_props->info->refcount = 1; + return EINA_TRUE; +} diff --git a/libraries/evas/src/lib/engines/common/evas_text_utils.h b/libraries/evas/src/lib/engines/common/evas_text_utils.h new file mode 100644 index 0000000..7f1c802 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_text_utils.h @@ -0,0 +1,89 @@ +#ifndef _EVAS_TEXT_UTILS_H +# define _EVAS_TEXT_UTILS_H + +typedef struct _Evas_Text_Props Evas_Text_Props; +typedef struct _Evas_Text_Props_Info Evas_Text_Props_Info; +typedef struct _Evas_Font_Glyph_Info Evas_Font_Glyph_Info; + +# include "evas_font_ot.h" +# include "language/evas_bidi_utils.h" +# include "language/evas_language_utils.h" + +/* Used for showing "malformed" or missing chars */ +#define REPLACEMENT_CHAR 0xFFFD + +struct _Evas_Text_Props +{ + /* Start and len represent the start offset and the length in the + * glyphs_info and ot_data fields, they are both internal */ + size_t start; + size_t len; + size_t text_offset; /* The text offset from the start of the info */ + size_t text_len; /* The length of the original text */ + Evas_BiDi_Props bidi; + Evas_Script_Type script; + Evas_Text_Props_Info *info; + void *font_instance; +}; + +struct _Evas_Text_Props_Info +{ + unsigned int refcount; + Evas_Font_Glyph_Info *glyph; + Evas_Font_OT_Info *ot; +}; + +/* Sorted in visual order when created */ +struct _Evas_Font_Glyph_Info +{ + unsigned int index; /* Should conform to FT */ + Evas_Coord x_bear; +#if 0 + /* This one is rarely used, only in draw, in which we already get the glyph + * so it doesn't really save time. Leaving it here just so no one will + * add it thinking it was accidentally skipped */ + Evas_Coord y_bear; +#endif + Evas_Coord width; + Evas_Coord pen_after; +}; + + +void +evas_common_text_props_bidi_set(Evas_Text_Props *props, + Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start); + +void +evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr); + +EAPI Eina_Bool +evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text, + Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, + size_t par_pos, int len); + +void +evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst, + const Evas_Text_Props *src); + +void +evas_common_text_props_content_ref(Evas_Text_Props *props); + +void +evas_common_text_props_content_unref(Evas_Text_Props *props); + +EAPI int +evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos); + +EAPI int +evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos); + +EAPI int +evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff); + +EAPI void +evas_common_text_props_split(Evas_Text_Props *base, Evas_Text_Props *ext, + int cutoff); +EAPI void +evas_common_text_props_merge(Evas_Text_Props *item1, const Evas_Text_Props *item2); + +#endif diff --git a/libraries/evas/src/lib/engines/common/evas_tiler.c b/libraries/evas/src/lib/engines/common/evas_tiler.c new file mode 100644 index 0000000..0bbe811 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_tiler.c @@ -0,0 +1,1391 @@ +#include "evas_common.h" +#ifdef EVAS_RECT_SPLIT + +static inline void rect_list_node_pool_set_max(int max); +static inline void rect_list_node_pool_flush(void); +static inline list_node_t *rect_list_node_pool_get(void); +static inline void rect_list_node_pool_put(list_node_t *node); +static inline void rect_init(rect_t *r, int x, int y, int w, int h); +static inline void rect_list_append_node(list_t *rects, list_node_t *node); +static inline void rect_list_append(list_t *rects, const rect_t r); +static inline void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h); +static inline void rect_list_concat(list_t *rects, list_t *other); +static inline list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node); +static inline void rect_list_del_next(list_t *rects, list_node_t *parent_node); +static inline void rect_list_clear(list_t *rects); +static inline void rect_list_del_split_strict(list_t *rects, const rect_t del_r); +static inline void rect_list_add_split_strict(list_t *rects, list_node_t *node); +static inline list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error); +static inline void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error); +static inline void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error); +static inline void rect_print(const rect_t r); +static inline void rect_list_print(const list_t rects); + +static const list_node_t list_node_zeroed = { NULL }; +static const list_t list_zeroed = { NULL, NULL }; + +typedef struct list_node_pool +{ + list_node_t *node; + int len; + int max; +} list_node_pool_t; + +static list_node_pool_t list_node_pool = { NULL, 0, 1024 }; + +static inline void +rect_list_node_pool_set_max(int max) +{ + int diff; + + diff = list_node_pool.len - max; + for (; diff > 0 && list_node_pool.node; diff--) + { + list_node_t *node; + + node = list_node_pool.node; + list_node_pool.node = node->next; + list_node_pool.len--; + + free(node); + } + + list_node_pool.max = max; +} + +static inline void +rect_list_node_pool_flush(void) +{ + while (list_node_pool.node) + { + list_node_t *node; + + node = list_node_pool.node; + list_node_pool.node = node->next; + list_node_pool.len--; + + free(node); + } +} + +static inline list_node_t * +rect_list_node_pool_get(void) +{ + if (list_node_pool.node) + { + list_node_t *node; + + node = list_node_pool.node; + list_node_pool.node = node->next; + list_node_pool.len--; + + return node; + } + else return malloc(sizeof(rect_node_t)); +} + +static inline void +rect_list_node_pool_put(list_node_t *node) +{ + if (list_node_pool.len < list_node_pool.max) + { + node->next = list_node_pool.node; + list_node_pool.node = node; + list_node_pool.len++; + } + else free(node); +} + +static inline void +rect_init(rect_t *r, int x, int y, int w, int h) +{ + r->area = w * h; + + r->left = x; + r->top = y; + + r->right = x + w; + r->bottom = y + h; + + r->width = w; + r->height = h; +} + +static inline void +rect_print(const rect_t r) +{ + INF("", r.left, r.top, r.width, r.height); +} + +static inline void +rect_list_print(const list_t rects) +{ + list_node_t *node; + int len; + + len = 0; + for (node = rects.head; node; node = node->next) len++; + + putchar('['); + for (node = rects.head; node; node = node->next) + { + rect_print(((rect_node_t *)node)->rect); + if (node->next) + { + putchar(','); + if (len < 4) putchar(' '); + else + { + putchar('\n'); + putchar(' '); + } + } + } + putchar(']'); +} + +static inline void +rect_list_append_node(list_t *rects, list_node_t *node) +{ + if (rects->tail) + { + rects->tail->next = node; + rects->tail = node; + } + else + { + rects->head = node; + rects->tail = node; + } +} + +static inline void +rect_list_append(list_t *rects, const rect_t r) +{ + rect_node_t *rect_node; + + rect_node = (rect_node_t *)rect_list_node_pool_get(); + rect_node->rect = r; + rect_node->_lst = list_node_zeroed; + + rect_list_append_node(rects, (list_node_t *)rect_node); +} + +static inline void +rect_list_append_xywh(list_t *rects, int x, int y, int w, int h) +{ + rect_t r; + + rect_init(&r, x, y, w, h); + rect_list_append(rects, r); +} + +static inline void +rect_list_concat(list_t *rects, list_t *other) +{ + if (!other->head) + return; + + if (rects->tail) + { + rects->tail->next = other->head; + rects->tail = other->tail; + } + else + { + rects->head = other->head; + rects->tail = other->tail; + } + *other = list_zeroed; +} + +static inline list_node_t * +rect_list_unlink_next(list_t *rects, list_node_t *parent_node) +{ + list_node_t *node; + + if (parent_node) + { + node = parent_node->next; + parent_node->next = node->next; + } + else + { + node = rects->head; + rects->head = node->next; + } + + if (rects->tail == node) rects->tail = parent_node; + *node = list_node_zeroed; + return node; +} + +static inline void +rect_list_del_next(list_t *rects, list_node_t *parent_node) +{ + list_node_t *node; + + node = rect_list_unlink_next(rects, parent_node); + rect_list_node_pool_put(node); +} + +static inline void +rect_list_clear(list_t *rects) +{ + list_node_t *node; + + node = rects->head; + while (node) + { + list_node_t *aux; + + aux = node->next; + rect_list_node_pool_put(node); + node = aux; + } + *rects = list_zeroed; +} + +static inline void +_calc_intra_rect_area(const rect_t a, const rect_t b, int *width, int *height) +{ + int max_left, min_right, max_top, min_bottom; + + if (a.left < b.left) max_left = b.left; + else max_left = a.left; + + if (a.right < b.right) min_right = a.right; + else min_right = b.right; + + *width = min_right - max_left; + + if (a.top < b.top) max_top = b.top; + else max_top = a.top; + + if (a.bottom < b.bottom) min_bottom = a.bottom; + else min_bottom = b.bottom; + + *height = min_bottom - max_top; +} + +static inline void +_split_strict(list_t *dirty, const rect_t current, rect_t r) +{ + int h_1, h_2, w_1, w_2; + + h_1 = current.top - r.top; + h_2 = r.bottom - current.bottom; + w_1 = current.left - r.left; + w_2 = r.right - current.right; + + if (h_1 > 0) + { + /* .--.r (b) .---.r2 + * | | | | + * .-------.cur (a) .---.r '---' + * | | | | -> | | + + * | `--' | `---' + * `-------' + */ + rect_list_append_xywh(dirty, r.left, r.top, r.width, h_1); + r.height -= h_1; + r.top = current.top; + } + + if (h_2 > 0) + { + /* .-------.cur (a) + * | .---. | .---.r + * | | | | -> | | + * `-------' `---' + .---.r2 + * | | | | + * `---'r (b) `---' + */ + rect_list_append_xywh(dirty, r.left, current.bottom, r.width, h_2); + r.height -= h_2; + } + + if (w_1 > 0) + { + /* (b) r .----.cur (a) + * .--|-. | .--.r2 .-.r + * | | | | -> | | + | | + * `--|-' | `--' `-' + * `----' + */ + rect_list_append_xywh(dirty, r.left, r.top, w_1, r.height); + /* not necessary to keep these, r (b) will be destroyed */ + /* r.width -= w_1; */ + /* r.left = current.left; */ + } + + if (w_2 > 0) + { + /* .----.cur (a) + * | | + * | .-|--.r (b) .-.r .--.r2 + * | | | | -> | | + | | + * | `-|--' `-' `--' + * `----' + */ + rect_list_append_xywh(dirty, current.right, r.top, w_2, r.height); + /* not necessary to keep this, r (b) will be destroyed */ + /* r.width -= w_2; */ + } +} + +static inline void +rect_list_del_split_strict(list_t *rects, const rect_t del_r) +{ + list_t modified = list_zeroed; + list_node_t *cur_node, *prev_node; + + prev_node = NULL; + cur_node = rects->head; + while (cur_node) + { + int intra_width, intra_height; + rect_t current; + + current = ((rect_node_t*)cur_node)->rect; + + _calc_intra_rect_area(del_r, current, &intra_width, &intra_height); + if ((intra_width <= 0) || (intra_height <= 0)) + { + /* .---.current .---.del_r + * | | | | + * `---+---.del_r `---+---.current + * | | | | + * `---' `---' + * no interception, nothing to do + */ + prev_node = cur_node; + cur_node = cur_node->next; + } + else if ((intra_width == current.width) && + (intra_height == current.height)) + { + /* .-------.del_r + * | .---. | + * | | | | + * | `---'current + * `-------' + * current is contained, remove from rects + */ + cur_node = cur_node->next; + rect_list_del_next(rects, prev_node); + } + else + { + _split_strict(&modified, del_r, current); + cur_node = cur_node->next; + rect_list_del_next(rects, prev_node); + } + } + + rect_list_concat(rects, &modified); +} + +static inline void +rect_list_add_split_strict(list_t *rects, list_node_t *node) +{ + list_t dirty = list_zeroed; + list_t new_dirty = list_zeroed; + list_node_t *cur_node; + + if (!rects->head) + { + rect_list_append_node(rects, node); + return; + } + + rect_list_append_node(&dirty, node); + + cur_node = rects->head; + while (dirty.head) + { + rect_t current; + + if (!cur_node) + { + rect_list_concat(rects, &dirty); + break; + } + + current = ((rect_node_t*)cur_node)->rect; + + while (dirty.head) + { + int intra_width, intra_height; + rect_t r; + + r = ((rect_node_t *)dirty.head)->rect; + _calc_intra_rect_area(r, current, &intra_width, &intra_height); + if ((intra_width == r.width) && (intra_height == r.height)) + /* .-------.cur + * | .---.r| + * | | | | + * | `---' | + * `-------' + */ + rect_list_del_next(&dirty, NULL); + else if ((intra_width <= 0) || (intra_height <= 0)) + { + /* .---.cur .---.r + * | | | | + * `---+---.r `---+---.cur + * | | | | + * `---' `---' + */ + list_node_t *tmp; + tmp = rect_list_unlink_next(&dirty, NULL); + rect_list_append_node(&new_dirty, tmp); + } + else + { + _split_strict(&new_dirty, current, r); + rect_list_del_next(&dirty, NULL); + } + } + dirty = new_dirty; + new_dirty = list_zeroed; + + cur_node = cur_node->next; + } +} + +static inline void +_calc_intra_outer_rect_area(const rect_t a, const rect_t b, + rect_t *intra, rect_t *outer) +{ + int min_left, max_left, min_right, max_right; + int min_top, max_top, min_bottom, max_bottom; + + if (a.left < b.left) + { + max_left = b.left; + min_left = a.left; + } + else + { + max_left = a.left; + min_left = b.left; + } + + if (a.right < b.right) + { + min_right = a.right; + max_right = b.right; + } + else + { + min_right = b.right; + max_right = a.right; + } + + intra->left = max_left; + intra->right = min_right; + intra->width = min_right - max_left; + + outer->left = min_left; + outer->right = max_right; + outer->width = max_right - min_left; + + if (a.top < b.top) + { + max_top = b.top; + min_top = a.top; + } + else + { + max_top = a.top; + min_top = b.top; + } + + if (a.bottom < b.bottom) + { + min_bottom = a.bottom; + max_bottom = b.bottom; + } + else + { + min_bottom = b.bottom; + max_bottom = a.bottom; + } + + intra->top = max_top; + intra->bottom = min_bottom; + intra->height = min_bottom - max_top; + if ((intra->width > 0) && (intra->height > 0)) + intra->area = intra->width * intra->height; + else + intra->area = 0; + + outer->top = min_top; + outer->bottom = max_bottom; + outer->height = max_bottom - min_top; + outer->area = outer->width * outer->height; +} + +enum +{ + SPLIT_FUZZY_ACTION_NONE, + SPLIT_FUZZY_ACTION_SPLIT, + SPLIT_FUZZY_ACTION_MERGE +}; + +static inline int +_split_fuzzy(list_t *dirty, const rect_t a, rect_t *b) +{ + int h_1, h_2, w_1, w_2, action; + + h_1 = a.top - b->top; + h_2 = b->bottom - a.bottom; + w_1 = a.left - b->left; + w_2 = b->right - a.right; + + action = SPLIT_FUZZY_ACTION_NONE; + + if (h_1 > 0) + { + /* .--.r (b) .---.r2 + * | | | | + * .-------.cur (a) .---.r '---' + * | | | | -> | | + + * | `--' | `---' + * `-------' + */ + rect_list_append_xywh(dirty, b->left, b->top, b->width, h_1); + b->height -= h_1; + b->top = a.top; + action = SPLIT_FUZZY_ACTION_SPLIT; + } + + if (h_2 > 0) + { + /* .-------.cur (a) + * | .---. | .---.r + * | | | | -> | | + * `-------' `---' + .---.r2 + * | | | | + * `---'r (b) `---' + */ + rect_list_append_xywh(dirty, b->left, a.bottom, b->width, h_2); + b->height -= h_2; + action = SPLIT_FUZZY_ACTION_SPLIT; + } + + if (((w_1 > 0) || (w_2 > 0)) && (a.height == b->height)) + return SPLIT_FUZZY_ACTION_MERGE; + + if (w_1 > 0) + { + /* (b) r .----.cur (a) + * .--|-. | .--.r2 .-.r + * | | | | -> | | + | | + * `--|-' | `--' `-' + * `----' + */ + rect_list_append_xywh(dirty, b->left, b->top, w_1, b->height); + /* not necessary to keep these, r (b) will be destroyed */ + /* b->width -= w_1; */ + /* b->left = a.left; */ + action = SPLIT_FUZZY_ACTION_SPLIT; + } + + if (w_2 > 0) + { + /* .----.cur (a) + * | | + * | .-|--.r (b) .-.r .--.r2 + * | | | | -> | | + | | + * | `-|--' `-' `--' + * `----' + */ + rect_list_append_xywh(dirty, a.right, b->top, w_2, b->height); + /* not necessary to keep these, r (b) will be destroyed */ + /* b->width -= w_2; */ + action = SPLIT_FUZZY_ACTION_SPLIT; + } + + return action; +} + +static inline list_node_t * +rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error) +{ + list_t dirty = list_zeroed; + list_node_t *old_last; + + old_last = rects->tail; + + if (!rects->head) + { + rect_list_append_node(rects, node); + return old_last; + } + + rect_list_append_node(&dirty, node); + while (dirty.head) + { + list_node_t *d_node, *cur_node, *prev_cur_node; + int keep_dirty; + rect_t r; + + d_node = rect_list_unlink_next(&dirty, NULL); + r = ((rect_node_t *)d_node)->rect; + + prev_cur_node = NULL; + cur_node = rects->head; + keep_dirty = 1; + while (cur_node) + { + int area, action; + rect_t current, intra, outer; + + current = ((rect_node_t *)cur_node)->rect; + + _calc_intra_outer_rect_area(r, current, &intra, &outer); + area = current.area + r.area - intra.area; + + if ((intra.width == r.width) && (intra.height == r.height)) + { + /* .-------.cur + * | .---.r| + * | | | | + * | `---' | + * `-------' + */ + keep_dirty = 0; + break; + } + else if ((intra.width == current.width) && + (intra.height == current.height)) + { + /* .-------.r + * | .---.cur + * | | | | + * | `---' | + * `-------' + */ + if (old_last == cur_node) + old_last = prev_cur_node; + cur_node = cur_node->next; + rect_list_del_next(rects, prev_cur_node); + } + else if ((outer.area - area) <= accepted_error) + { + /* .-----------. bounding box (outer) + * |.---. .---.| + * ||cur| |r || + * || | | || + * |`---' `---'| + * `-----------' + * merge them, remove both and add merged + */ + rect_node_t *n; + + if (old_last == cur_node) + old_last = prev_cur_node; + + n = (rect_node_t *)rect_list_unlink_next(rects, prev_cur_node); + n->rect = outer; + rect_list_append_node(&dirty, (list_node_t *)n); + + keep_dirty = 0; + break; + } + else if (intra.area <= accepted_error) + { + /* .---.cur .---.r + * | | | | + * `---+---.r `---+---.cur + * | | | | + * `---' `---' + * no split, no merge + */ + prev_cur_node = cur_node; + cur_node = cur_node->next; + } + else + { + /* split is required */ + action = _split_fuzzy(&dirty, current, &r); + if (action == SPLIT_FUZZY_ACTION_MERGE) + { + /* horizontal merge is possible: remove both, add merged */ + rect_node_t *n; + + if (old_last == cur_node) + old_last = prev_cur_node; + + n = (rect_node_t *) + rect_list_unlink_next(rects, prev_cur_node); + + n->rect.left = outer.left; + n->rect.width = outer.width; + n->rect.right = outer.right; + n->rect.area = outer.width * r.height; + rect_list_append_node(&dirty, (list_node_t *)n); + } + else if (action == SPLIT_FUZZY_ACTION_NONE) + { + /* + * this rect check was totally useless, + * should never happen + */ + /* prev_cur_node = cur_node; */ + /* cur_node = cur_node->next; */ + WRN("Should not get here!"); + abort(); + } + + keep_dirty = 0; + break; + } + } + + if (UNLIKELY(keep_dirty)) rect_list_append_node(rects, d_node); + else rect_list_node_pool_put(d_node); + } + + return old_last; +} + +static inline void +_calc_outer_rect_area(const rect_t a, const rect_t b, rect_t *outer) +{ + int min_left, max_right; + int min_top, max_bottom; + + if (a.left < b.left) min_left = a.left; + else min_left = b.left; + + if (a.right < b.right) max_right = b.right; + else max_right = a.right; + + outer->left = min_left; + outer->right = max_right; + outer->width = max_right - min_left; + + if (a.top < b.top) min_top = a.top; + else min_top = b.top; + + if (a.bottom < b.bottom) max_bottom = b.bottom; + else max_bottom = a.bottom; + + outer->top = min_top; + outer->bottom = max_bottom; + outer->height = max_bottom - min_top; + + outer->area = outer->width * outer->height; +} + +static inline void +rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error) +{ + while (to_merge->head) + { + list_node_t *node, *parent_node; + rect_t r1; + int merged; + + r1 = ((rect_node_t *)to_merge->head)->rect; + + merged = 0; + parent_node = NULL; + node = rects->head; + while (node) + { + rect_t r2, outer; + int area; + + r2 = ((rect_node_t *)node)->rect; + + _calc_outer_rect_area(r1, r2, &outer); + area = r1.area + r2.area; /* intra area is taken as 0 */ + if (outer.area - area <= accepted_error) + { + /* + * remove both r1 and r2, create r3 + * actually r3 uses r2 instance, saves memory + */ + rect_node_t *n; + + n = (rect_node_t *)rect_list_unlink_next(rects, parent_node); + n->rect = outer; + rect_list_append_node(to_merge, (list_node_t *)n); + merged = 1; + break; + } + + parent_node = node; + node = node->next; + } + + if (!merged) + { + list_node_t *n; + n = rect_list_unlink_next(to_merge, NULL); + rect_list_append_node(rects, n); + } + else + rect_list_del_next(to_merge, NULL); + } +} + +static inline void +rect_list_add_split_fuzzy_and_merge(list_t *rects, + list_node_t *node, + int split_accepted_error, + int merge_accepted_error) +{ + list_node_t *n; + + n = rect_list_add_split_fuzzy(rects, node, split_accepted_error); + if (n && n->next) + { + list_t to_merge; + + /* split list into 2 segments, already merged and to merge */ + to_merge.head = n->next; + to_merge.tail = rects->tail; + rects->tail = n; + n->next = NULL; + + rect_list_merge_rects(rects, &to_merge, merge_accepted_error); + } +} +#endif /* EVAS_RECT_SPLIT */ + +#define TILE(tb, x, y) ((tb)->tiles.tiles[((y) * (tb)->tiles.w) + (x)]) + +#ifdef RECTUPDATE +#elif defined(EVAS_RECT_SPLIT) +#else +/* +static int tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill); +static int tilebuf_y_intersect(Tilebuf *tb, int y, int h, int *y1, int *y2, int *y1_fill, int *y2_fill); +static int tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill); + */ +#endif +/* +static void tilebuf_setup(Tilebuf *tb); + */ + +EAPI void +evas_common_tilebuf_init(void) +{ +} + +EAPI Tilebuf * +evas_common_tilebuf_new(int w, int h) +{ + Tilebuf *tb; + + tb = calloc(1, sizeof(Tilebuf)); + if (!tb) return NULL; + + tb->tile_size.w = 8; + tb->tile_size.h = 8; + tb->outbuf_w = w; + tb->outbuf_h = h; + + return tb; +} + +EAPI void +evas_common_tilebuf_free(Tilebuf *tb) +{ +#ifdef RECTUPDATE +/* + evas_common_regionbuf_free(tb->rb); + */ +#elif defined(EVAS_RECT_SPLIT) + rect_list_clear(&tb->rects); + rect_list_node_pool_flush(); +#else +/* + if (tb->tiles.tiles) free(tb->tiles.tiles); + */ +#endif + free(tb); +} + +EAPI void +evas_common_tilebuf_set_tile_size(Tilebuf *tb, int tw, int th) +{ + tb->tile_size.w = tw; + tb->tile_size.h = th; +/* + tilebuf_setup(tb); + */ +} + +EAPI void +evas_common_tilebuf_get_tile_size(Tilebuf *tb, int *tw, int *th) +{ + if (tw) *tw = tb->tile_size.w; + if (th) *th = tb->tile_size.h; +} + +#ifdef EVAS_RECT_SPLIT +static inline int +_add_redraw(list_t *rects, int x, int y, int w, int h) +{ + rect_node_t *rn; +/* we dont need to do this fuzz stuff - it actually creates overdraw bugs + * when evas shouldnt draw at all. + x >>= 1; + y >>= 1; + w += 2; + w >>= 1; + h += 2; + h >>= 1; + */ + rn = (rect_node_t *)rect_list_node_pool_get(); + rn->_lst = list_node_zeroed; + rect_init(&rn->rect, x, y, w, h); + //INF("ACCOUNTING: add_redraw: %4d,%4d %3dx%3d", x, y, w, h); + //testing on my core2 duo desktop - fuzz of 32 or 48 is best. +#define FUZZ 32 + rect_list_add_split_fuzzy_and_merge(rects, (list_node_t *)rn, + FUZZ * FUZZ, FUZZ * FUZZ); + return 1; +} +#endif + +EAPI int +evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h) +{ +#ifdef RECTUPDATE +/* + int i; + + if ((w <= 0) || (h <= 0)) return 0; + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); + if ((w <= 0) || (h <= 0)) return 0; + for (i = 0; i < h; i++) + evas_common_regionbuf_span_add(tb->rb, x, x + w - 1, y + i); + return 1; + */ +#elif defined(EVAS_RECT_SPLIT) + if ((w <= 0) || (h <= 0)) return 0; + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); + if ((w <= 0) || (h <= 0)) return 0; + // optimize a common case -> adding the exact same rect 2x in a row + if ((tb->prev_add.x == x) && (tb->prev_add.y == y) && + (tb->prev_add.w == w) && (tb->prev_add.h == h)) return 1; + tb->prev_add.x = x; tb->prev_add.y = y; + tb->prev_add.w = w; tb->prev_add.h = h; + tb->prev_del.w = 0; tb->prev_del.h = 0; + return _add_redraw(&tb->rects, x, y, w, h); +#else +/* + int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy; + int num; + + if ((w <= 0) || (h <= 0)) return 0; + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); + if ((w <= 0) || (h <= 0)) return 0; + num = 0; + // wipes out any motion vectors in tiles it touches into redraws + if (tilebuf_x_intersect(tb, x, w, &tx1, &tx2, &tfx1, &tfx2) && + tilebuf_y_intersect(tb, y, h, &ty1, &ty2, &tfy1, &tfy2)) + { + Tilebuf_Tile *tbt; + int delta_x; + int delta_y; + + tbt = &(TILE(tb, tx1, ty1)); + delta_x = tx2 - tx1 + 1; + delta_y = ty2 - ty1 + 1; + for (yy = delta_y; yy > 0; yy--) + { + Tilebuf_Tile *tbti; + + tbti = tbt; + for (xx = delta_x; xx > 0; xx--) + { + tbti->redraw = 1; + tbti++; + } + tbt += tb->tiles.w; + } + num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1); + } + return num; + */ +#endif +} + +EAPI int +evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h) +{ +#ifdef RECTUPDATE +/* + int i; + + for (i = 0; i < h; i++) + evas_common_regionbuf_span_del(tb->rb, x, x + w - 1, y + i); + */ +#elif defined(EVAS_RECT_SPLIT) + rect_t r; + + if (!tb->rects.head) return 0; + if ((w <= 0) || (h <= 0)) return 0; + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); + if ((w <= 0) || (h <= 0)) return 0; + +/* we dont need to do this fuzz stuff - it actually creates overdraw bugs + * when evas shouldnt draw at all. + x += 1; + y += 1; + x >>= 1; + y >>= 1; + w -= 1; + w >>= 1; + h -= 1; + h >>= 1; + + if ((w <= 0) || (h <= 0)) return 0; + */ + + // optimize a common case -> deleting the exact same rect 2x in a row + if ((tb->prev_del.x == x) && (tb->prev_del.y == y) && + (tb->prev_del.w == w) && (tb->prev_del.h == h)) return 1; + tb->prev_del.x = x; tb->prev_del.y = y; + tb->prev_del.w = w; tb->prev_del.h = h; + tb->prev_add.w = 0; tb->prev_add.h = 0; + rect_init(&r, x, y, w, h); + + rect_list_del_split_strict(&tb->rects, r); + tb->need_merge = 1; + return 0; +#else +/* + int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy; + int num; + + num = 0; + // wipes out any motion vectors in tiles it touches into redraws + if (tilebuf_x_intersect(tb, x, w, &tx1, &tx2, &tfx1, &tfx2) && + tilebuf_y_intersect(tb, y, h, &ty1, &ty2, &tfy1, &tfy2)) + { + Tilebuf_Tile *tbt; + int delta_y; + int delta_x; + + if (!tfx1) tx1++; + if (!tfx2) tx2--; + if (!tfy1) ty1++; + if (!tfy2) ty2--; + + tbt = &(TILE(tb, tx1, ty1)); + delta_x = tx2 - tx1 + 1; + delta_y = ty2 - ty1 + 1; + for (yy = delta_y; yy > 0; yy--) + { + Tilebuf_Tile *tbti; + + tbti = tbt; + for (xx = delta_x; xx > 0; xx--) + { + tbti->redraw = 0; + tbti++; + } + tbt += tb->tiles.w; + } + num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1); + } + return num; + */ +#endif +} + +EAPI int +evas_common_tilebuf_add_motion_vector(Tilebuf *tb __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dx __UNUSED__, int dy __UNUSED__, int alpha __UNUSED__) +{ +#ifdef EVAS_RECT_SPLIT +/* motion vector handling never has been used -> disable it + list_t lr = list_zeroed; + int num; + + num = _add_redraw(&lr, x, y, w, h); + num += _add_redraw(&lr, x + dx, y + dy, w, h); + while (lr.head) + { + list_node_t *node = rect_list_unlink_next(&lr, NULL); + rect_list_add_split_fuzzy_and_merge(&tb->rects, node, + FUZZ * FUZZ, FUZZ * FUZZ); + } + return num; + */ + return 0; +#else +/* + int num; + + num = evas_common_tilebuf_add_redraw(tb, x, y, w, h); + num += evas_common_tilebuf_add_redraw(tb, x + dx, y + dy, w, h); + return num; + */ +#endif +} + +EAPI void +evas_common_tilebuf_clear(Tilebuf *tb) +{ +#ifdef RECTUPDATE +/* + evas_common_regionbuf_clear(tb->rb); + */ +#elif defined(EVAS_RECT_SPLIT) + tb->prev_add.x = tb->prev_add.y = tb->prev_add.w = tb->prev_add.h = 0; + tb->prev_del.x = tb->prev_del.y = tb->prev_del.w = tb->prev_del.h = 0; + rect_list_clear(&tb->rects); + tb->need_merge = 0; +#else +/* + if (!tb->tiles.tiles) return; + memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile)); + */ +#endif +} + +EAPI Tilebuf_Rect * +evas_common_tilebuf_get_render_rects(Tilebuf *tb) +{ +#ifdef RECTUPDATE +/* + return evas_common_regionbuf_rects_get(tb->rb); + */ +#elif defined(EVAS_RECT_SPLIT) + list_node_t *n; + Tilebuf_Rect *rects = NULL; + + if (tb->need_merge) { + list_t to_merge; + to_merge = tb->rects; + tb->rects = list_zeroed; + rect_list_merge_rects(&tb->rects, &to_merge, FUZZ * FUZZ); + tb->need_merge = 0; + } + + for (n = tb->rects.head; n; n = n->next) { + rect_t cur; + + cur = ((rect_node_t *)n)->rect; +/* disable fuzz - created bugs. + cur.left <<= 1; + cur.top <<= 1; + cur.width <<= 1; + cur.height <<= 1; + */ + RECTS_CLIP_TO_RECT(cur.left, cur.top, cur.width, cur.height, + 0, 0, tb->outbuf_w, tb->outbuf_h); + if ((cur.width > 0) && (cur.height > 0)) + { + Tilebuf_Rect *r; + + r = malloc(sizeof(Tilebuf_Rect)); + r->x = cur.left; + r->y = cur.top; + r->w = cur.width; + r->h = cur.height; + + rects = (Tilebuf_Rect *)eina_inlist_append(EINA_INLIST_GET(rects), EINA_INLIST_GET(r)); + } + } + return rects; + +#else +/* + Tilebuf_Rect *rects = NULL; + Tilebuf_Tile *tbt; + int x, y; + + tbt = &(TILE(tb, 0, 0)); + for (y = 0; y < tb->tiles.h; y++) + { + for (x = 0; x < tb->tiles.w; x++, tbt++) + { + if (tbt->redraw) + { + Tilebuf_Tile *tbti; + int can_expand_x = 1, can_expand_y = 1; + Tilebuf_Rect *r = NULL; + int xx = 0, yy = 0; + r = malloc(sizeof(Tilebuf_Rect)); + r->_list_data.next = NULL; + r->_list_data.prev = NULL; + r->_list_data.last = NULL; + + // amalgamate tiles +#if 1 + tbti = tbt; + while (can_expand_x) + { + tbti++; + xx++; + if ((x + xx) >= tb->tiles.w) + can_expand_x = 0; + else if (!(tbti->redraw)) + can_expand_x = 0; + if (can_expand_x) + tbti->redraw = 0; + } + tbti = tbt; + while (can_expand_y) + { + int i; + + tbti += tb->tiles.w; + yy++; + if ((y + yy) >= tb->tiles.h) + can_expand_y = 0; + if (can_expand_y) + { + Tilebuf_Tile *tbtj; + + tbtj = tbti; + for (i = x; i < x + xx; i++, tbtj++) + { + if (!(tbtj->redraw)) + { + can_expand_y = 0; + break; + } + } + } + if (can_expand_y) + { + Tilebuf_Tile *tbtj; + + tbtj = tbti; + for (i = x; i < x + xx; i++, tbtj++) + tbtj->redraw = 0; + } + } + tbt->redraw = 0; +#else + xx = 1; + yy = 1; +#endif + r->x = x * tb->tile_size.w; + r->y = y * tb->tile_size.h; + r->w = (xx) * tb->tile_size.w; + r->h = (yy) * tb->tile_size.h; + rects = eina_inlist_append(rects, r); + x = x + (xx - 1); + tbt += xx - 1; + } + } + } + return rects; + */ +#endif +} + +EAPI void +evas_common_tilebuf_free_render_rects(Tilebuf_Rect *rects) +{ + while (rects) + { + Tilebuf_Rect *r; + + r = rects; + rects = (Tilebuf_Rect *)eina_inlist_remove(EINA_INLIST_GET(rects), EINA_INLIST_GET(r)); + free(r); + } +} + +/* need a way of getting rectangles to: blit, re-render */ + + + + + +/* internal usage */ +/* +static void +tilebuf_setup(Tilebuf *tb) +{ + if ((tb->outbuf_w <= 0) || (tb->outbuf_h <= 0)) return; +#ifdef RECTUPDATE + tb->rb = evas_common_regionbuf_new(tb->outbuf_w, tb->outbuf_h); +#elif defined(EVAS_RECT_SPLIT) + tb->rects = list_zeroed; +#else + if (tb->tiles.tiles) free(tb->tiles.tiles); + tb->tiles.tiles = NULL; + + tb->tiles.w = (tb->outbuf_w + (tb->tile_size.w - 1)) / tb->tile_size.w; + tb->tiles.h = (tb->outbuf_h + (tb->tile_size.h - 1)) / tb->tile_size.h; + + tb->tiles.tiles = malloc(tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile)); + + if (!tb->tiles.tiles) + { + tb->tiles.w = 0; + tb->tiles.h = 0; + return; + } + memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile)); +#endif +} +*/ + +#ifdef RECTUPDATE +#elif defined(EVAS_RECT_SPLIT) +#else +/* +static int +tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill) +{ + return tilebuf_intersect(tb->tile_size.w, tb->outbuf_w, tb->tiles.w, + x, w, x1, x2, x1_fill, x2_fill); +} + +static int +tilebuf_y_intersect(Tilebuf *tb, int y, int h, int *y1, int *y2, int *y1_fill, int *y2_fill) +{ + return tilebuf_intersect(tb->tile_size.h, tb->outbuf_h, tb->tiles.h, + y, h, y1, y2, y1_fill, y2_fill); +} + +static int +tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill) +{ + int p1, p2; + + // initial clip out of region + if ((x + w) <= 0) return 0; + if (x >= tlen) return 0; + + // adjust x & w so it all fits in region + if (x < 0) + { + w += x; + x = 0; + } + if (w < 0) return 0; + if ((x + w) > tlen) w = tlen - x; + + // now figure if the first edge is fully filling its tile + p1 = (x) / tsize; + if ((p1 * tsize) == (x)) *x1_fill = 1; + else *x1_fill = 0; + *x1 = p1; + + // now figure if the last edge is fully filling its tile + p2 = (x + w - 1) / tsize; + if (((p2 + 1) * tsize) == (x + w)) *x2_fill = 1; + else *x2_fill = 0; + *x2 = p2; + + return 1; + tnum = 0; +} +*/ +#endif diff --git a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c new file mode 100644 index 0000000..9f7859b --- /dev/null +++ b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c @@ -0,0 +1,641 @@ +#include +#include + +#include "evas_common.h" +#include "evas_bidi_utils.h" + +#include "evas_font_private.h" + +#ifdef BIDI_SUPPORT +#include +/** + * @internal + * @addtogroup Evas_Utils + * + * @{ + */ +/** + * @internal + * @addtogroup Evas_BiDi + * + * @{ + */ + +/** + * @internal + * @def _SAFE_FREE(x) + * checks if x is not NULL, if it's not, it's freed and set to NULL. + */ +#define _SAFE_FREE(x) \ + do { \ + if (x) \ + { \ + free(x); \ + x = NULL; \ + } \ + } while(0) + +#if SIZEOF_FRIBIDICHAR != SIZEOF_EINA_UNICODE +# define EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL +#endif + +#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL +/* Convert bidichar to eina_unicode assume both are valid pointers */ +static Eina_Unicode * +_evas_bidi_fribidichar_to_unicode(Eina_Unicode *dest, const FriBidiChar *src) +{ + Eina_Unicode *ret = dest; + + while (*src) + *dest++ = *src++; + *dest = 0; + return ret; +} + +/* Convert eina_unicode to bidi_char assume both are valid pointers */ +static FriBidiChar * +_evas_bidi_unicode_to_fribidichar(FriBidiChar *dest, const Eina_Unicode *src) +{ + FriBidiChar *ret = dest; + + while (*src) + *dest++ = *src++; + *dest = 0; + return ret; +} +#endif + +/** + * @internal + * Checks if the string has RTL characters. + * + * @param str The string to be checked + * @return #EINA_TRUE if true, #EINA_FALSE otherwise. + */ +Eina_Bool +evas_bidi_is_rtl_str(const Eina_Unicode *str) +{ + EvasBiDiCharType type; + + if (!str) + return EINA_FALSE; + + for ( ; *str ; str++) + { + type = fribidi_get_bidi_type((FriBidiChar) *str); + if (FRIBIDI_IS_LETTER(type) && FRIBIDI_IS_RTL(type)) + { + return EINA_TRUE; + } + } + return EINA_FALSE; +} + +/** + * @internal + * Shapes the string ustr according to the bidi properties. + * + * @param str The string to shape + * @param bidi_props the bidi props to shaped according. + * @param start the start of the string to shape (offset in bidi_props) + * @param len the length of th string. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + */ +EAPI Eina_Bool +evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len) +{ + FriBidiChar *ustr, *base_ustr = NULL; + + if (!bidi_props) + return EINA_FALSE; + + /* The size of fribidichar is different than eina_unicode, convert */ +#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL + base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar)); + ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr); +#else + (void) base_ustr; + ustr = (FriBidiChar *) eina_ustr; +#endif + + + EvasBiDiJoiningType *join_types = NULL; + join_types = (EvasBiDiJoiningType *) malloc(sizeof(EvasBiDiJoiningType) * len); + if (!join_types) + { + return EINA_FALSE; + } + fribidi_get_joining_types(ustr, len, join_types); + + fribidi_join_arabic(bidi_props->char_types + start, len, + bidi_props->embedding_levels + start, join_types); + + + /* Actually modify the string */ + fribidi_shape(FRIBIDI_FLAGS_DEFAULT | FRIBIDI_FLAGS_ARABIC, + bidi_props->embedding_levels + start, len, join_types, ustr); + + if (join_types) free(join_types); + + /* Convert back */ +#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL + eina_ustr = _evas_bidi_fribidichar_to_unicode(eina_ustr, ustr); + if (base_ustr) free(base_ustr); +#endif + return EINA_TRUE; +} + +/** + * @internal + * Return a -1 terminated array of the indexes of the delimiters (passed in + * delim) found in the string. This result should be used with par_props_get. + * + * @param str The string to parse + * @param delim a list of delimiters to work with. + * @return returns a -1 terminated array of indexes according to positions of the delimiters found. NULL if there were none. + */ +int * +evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim) +{ + Eina_Unicode *udelim; + const Eina_Unicode *str_base = str; + int *ret, *tmp_ret; + int ret_idx = 0, ret_len = 10; /* arbitrary choice */ + udelim = eina_unicode_utf8_to_unicode(delim, NULL); + ret = malloc(ret_len * sizeof(int)); + for ( ; *str ; str++) + { + const Eina_Unicode *del; + for (del = udelim ; *del ; del++) + { + if (*str == *del) + { + if (ret_idx >= ret_len) + { + /* arbitrary choice */ + ret_len += 20; + tmp_ret = realloc(ret, ret_len * sizeof(int)); + if (!tmp_ret) + { + free(ret); + return NULL; + } + } + ret[ret_idx++] = str - str_base; + break; + } + } + } + free(udelim); + + /* If no indexes were found return NULL */ + if (ret_idx == 0) + { + free(ret); + return NULL; + } + + ret[ret_idx] = -1; + tmp_ret = realloc(ret, (ret_idx + 1) * sizeof(int)); + + return (tmp_ret) ? tmp_ret : ret; +} + +/** + * @internal + * Allocates bidi properties according to ustr. First checks to see if the + * passed has rtl chars, if not, it returns NULL. + * + * Assumes all the segment_idxs are either -1 or legal, and > 0 indexes. + * Also assumes that the characters at the override points are of weak/neutral + * bidi type, otherwise unexpected results may occur. + * + * @param ustr The string to update according to. + * @param len The length of the string + * @param segment_idxs A -1 terminated array of points to start a new bidi analysis at (used for section high level bidi overrides). - NULL means none. + * @return returns allocated paragraph props on success, NULL otherwise. + */ +Evas_BiDi_Paragraph_Props * +evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len, + int *segment_idxs) +{ + Evas_BiDi_Paragraph_Props *bidi_props = NULL; + EvasBiDiCharType *char_types = NULL; + EvasBiDiLevel *embedding_levels = NULL; + const FriBidiChar *ustr; + FriBidiChar *base_ustr = NULL; + + if (!eina_ustr) + return NULL; + + + if (!evas_bidi_is_rtl_str(eina_ustr)) /* No need to handle bidi */ + { + len = -1; + goto cleanup; + } + + len = eina_unicode_strlen(eina_ustr); + /* The size of fribidichar s different than eina_unicode, convert */ +#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL + base_ustr = calloc(len + 1, sizeof(FriBidiChar)); + base_ustr = _evas_bidi_unicode_to_fribidichar(base_ustr, eina_ustr); + ustr = base_ustr; +#else + ustr = (const FriBidiChar *) eina_ustr; +#endif + + bidi_props = evas_bidi_paragraph_props_new(); + + /* Prep work for reordering */ + char_types = (EvasBiDiCharType *) malloc(sizeof(EvasBiDiCharType) * len); + if (!char_types) + { + len = -2; + goto cleanup; + } + fribidi_get_bidi_types(ustr, len, char_types); + + embedding_levels = (EvasBiDiLevel *)malloc(sizeof(EvasBiDiLevel) * len); + if (!embedding_levels) + { + len = -2; + goto cleanup; + } + + if (segment_idxs) + { + size_t pos = 0; + int *itr; + EvasBiDiLevel base_level = 0; + EvasBiDiParType direction; + + for (itr = segment_idxs ; *itr > 0 ; itr++) + { + direction = EVAS_BIDI_PARAGRAPH_NEUTRAL; + if (!fribidi_get_par_embedding_levels(char_types + pos, + *itr - pos, + &direction, + embedding_levels + pos)) + { + len = -2; + goto cleanup; + } + + /* Only on the first run */ + if (itr == segment_idxs) + { + bidi_props->direction = direction; + /* adjust base_level to be 1 for rtl paragraphs, and 0 for + * ltr paragraphs. */ + base_level = + EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(bidi_props) ? 1 : 0; + } + + /* We want those chars at the override points to be on the base + * level and we also remove -2 cause we later increment them, + * just for simpler code paths */ + embedding_levels[*itr] = base_level - 2; + pos = *itr + 1; + } + + direction = EVAS_BIDI_PARAGRAPH_NEUTRAL; + if (!fribidi_get_par_embedding_levels(char_types + pos, + len - pos, + &direction, + embedding_levels + pos)) + { + len = -2; + goto cleanup; + } + + /* Increment all levels by 2 to emulate embedding. */ + { + EvasBiDiLevel *bitr = embedding_levels, *end; + end = bitr + len; + for ( ; bitr < end ; bitr++) + { + *bitr += 2; + } + } + } + else + { + if (!fribidi_get_par_embedding_levels(char_types, len, + &bidi_props->direction, embedding_levels)) + { + len = -2; + goto cleanup; + } + } + + + /* clean up */ + if (bidi_props->embedding_levels) + { + free(bidi_props->embedding_levels); + } + bidi_props->embedding_levels = embedding_levels; + + /* clean up */ + + if (bidi_props->char_types) + { + free(bidi_props->char_types); + } + bidi_props->char_types = char_types; + + if (base_ustr) free(base_ustr); + + + return bidi_props; + +/* Cleanup */ +cleanup: + if (char_types) free(char_types); + if (embedding_levels) free(embedding_levels); + if (base_ustr) free(base_ustr); + if (bidi_props) evas_bidi_paragraph_props_unref(bidi_props); /* Clean up the bidi props */ + return NULL; +} + +/** + * @internal + * Copies dst to src and refs (doesn't copy) the paragraph props. + * + * @param src the props to copy + * @param dst the props to copy to. + */ +void +evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst) +{ + dst->dir = src->dir; +} + +/** + * @internal + * Reorders ustr according to the bidi props. + * + * @param ustr the string to reorder. - Null is ok, will just populate the map. + * @param start the start of the line + * @param len the length of the line + * @param props the paragraph props to reorder according to + * @param _v_to_l The visual to logical map to populate - if NULL it won't populate it. + * @return #EINA_FALSE on success, #EINA_TRUE on error. + */ +Eina_Bool +evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len, const Evas_BiDi_Paragraph_Props *props, EvasBiDiStrIndex **_v_to_l) +{ + EvasBiDiStrIndex *v_to_l = NULL; + FriBidiChar *ustr = NULL, *base_ustr = NULL; + + if (!props) + return EINA_FALSE; + + if (eina_ustr) + { + /* The size of fribidichar is different than eina_unicode, convert */ +#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL + base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar)); + ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr); +#else + ustr = (FriBidiChar *) eina_ustr; +#endif + } + + + if (_v_to_l) { + size_t i; + v_to_l = *_v_to_l = calloc(len, sizeof(EvasBiDiStrIndex)); + if (!v_to_l) + { + goto error; + } + /* init the array for fribidi */ + for (i = 0 ; i < len ; i++) + { + v_to_l[i] = i; + } + } + + { + EvasBiDiLevel *emb_lvl; + emb_lvl = malloc((start + len) * sizeof(EvasBiDiLevel)); + memcpy(emb_lvl, props->embedding_levels, + (start + len) * sizeof(EvasBiDiLevel)); + /* We pass v_to_l - start, because fribidi assumes start is the offset + * from the start of v_to_l as well, not just the props. */ + if (!fribidi_reorder_line (FRIBIDI_FLAGS_DEFAULT, props->char_types, + len, start, props->direction, emb_lvl, ustr, v_to_l - start)) + { + free(emb_lvl); + goto error; + } + free(emb_lvl); + } + + + /* The size of fribidichar is different than eina_unicode, convert */ +#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL + _evas_bidi_fribidichar_to_unicode(eina_ustr, base_ustr); + free(base_ustr); +#endif + return EINA_FALSE; +/* ERROR HANDLING */ +error: + if (base_ustr) free(base_ustr); + _SAFE_FREE(v_to_l); + return EINA_TRUE; +} + +/** + * @internal + * Returns the end of the current run of text + * + * @param bidi_props the paragraph properties + * @param start where to start looking from + * @param len the length of the string + * @return the position of the end of the run (offset from + * bidi_props->props->start), 0 when there is no end (i.e all the text) + */ +int +evas_bidi_end_of_run_get(const Evas_BiDi_Paragraph_Props *bidi_props, + size_t start, int len) +{ + EvasBiDiLevel *i; + EvasBiDiLevel base; + + if (!bidi_props || (len <= 0)) + return 0; + + i = bidi_props->embedding_levels + start; + base = *i; + for ( ; (len > 0) && (base == *i) ; len--, i++) + ; + + if (len == 0) + { + return 0; + } + return i - (bidi_props->embedding_levels + start); +} + +/** + * @internal + * Returns the visual string index from the logical string index. + * + * @param v_to_l the visual to logical map + * @param len the length of the map. + * @param position the position to convert. + * @return on success the visual position, on failure the same position. + */ +EvasBiDiStrIndex +evas_bidi_position_logical_to_visual(EvasBiDiStrIndex *v_to_l, int len, EvasBiDiStrIndex position) +{ + int i; + EvasBiDiStrIndex *ind; + if (position >= len || !v_to_l) + return position; + + for (i = 0, ind = v_to_l ; i < len ; i++, ind++) + { + if (*ind == position) + { + return i; + } + } + return position; +} + +/** + * @internal + * Returns the reversed pos of the index. + * + * @param dir the direction of the string + * @param len the length of the map. + * @param position the position to convert. + * @return on success the visual position, on failure the same position. + */ +EvasBiDiStrIndex +evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrIndex position) +{ + if (!props || position >= len) + return position; + + return (props->dir == EVAS_BIDI_DIRECTION_RTL) ? (len - 1) - position : position; +} + +/** + * @internal + * Checks if the char is rtl oriented. I.e even a neutral char can become rtl + * if surrounded by rtl chars. + * + * @param bidi_props The bidi paragraph properties + * @param start the base position + * @param index the offset from the base position. + * @return #EINA_TRUE if true, #EINA_FALSE otherwise. + */ +Eina_Bool +evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex ind) +{ + if(!bidi_props || ind < 0) + return EINA_FALSE; + return (FRIBIDI_IS_RTL( + bidi_props->embedding_levels[ind + start])) + ? EINA_TRUE : EINA_FALSE; +} + +Evas_BiDi_Paragraph_Props * +evas_bidi_paragraph_props_new(void) +{ + Evas_BiDi_Paragraph_Props *ret; + ret = calloc(1, sizeof(Evas_BiDi_Paragraph_Props)); + ret->direction = EVAS_BIDI_PARAGRAPH_NEUTRAL; + ret->refcount = 1; + + return ret; +} + +/** + * @internal + * Refs the bidi props. + * + * @param bidi_props the props to ref. + */ +Evas_BiDi_Paragraph_Props * +evas_bidi_paragraph_props_ref(Evas_BiDi_Paragraph_Props *bidi_props) +{ + if (!bidi_props) return NULL; + BIDILOCK(); + + bidi_props->refcount++; + BIDIUNLOCK(); + return bidi_props; +} + +/** + * @internal + * Unrefs and potentially frees the props. + * + * @param bidi_props the properties to unref + */ +void +evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props) +{ + if (!bidi_props) return; + BIDILOCK(); + + if (--bidi_props->refcount == 0) + { + evas_bidi_paragraph_props_clean(bidi_props); + free(bidi_props); + } + BIDIUNLOCK(); +} + + +/** + * @internal + * Cleans the paragraph properties. + * + * @param bidi_props the properties to clean. + */ +void +evas_bidi_paragraph_props_clean(Evas_BiDi_Paragraph_Props *bidi_props) +{ + _SAFE_FREE(bidi_props->embedding_levels); + _SAFE_FREE(bidi_props->char_types); +} + +/** + * @internal + * Cleans the bidi properties. + * + * @param bidi_props the properties to clean. + */ +void +evas_bidi_props_clean(Evas_BiDi_Props *bidi_props) +{ + if (!bidi_props) return; + bidi_props->dir = EVAS_BIDI_DIRECTION_NEUTRAL; +} +/** + * @} + */ +/** + * @} + */ +#endif + +#if 0 +/* Good for debugging */ +static void +dump_levels(Eina_Unicode *ustr, EvasBiDiLevel *emb) +{ + for ( ; *ustr ; ustr++, emb++) + { + printf("%lc %d\n", *ustr, *emb); + } +} +#endif + diff --git a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h new file mode 100644 index 0000000..f1a374b --- /dev/null +++ b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h @@ -0,0 +1,157 @@ +#ifndef _EVAS_BIDI_UTILS +#define _EVAS_BIDI_UTILS + +/** + * @internal + * @addtogroup Evas_Utils + * + * @{ + */ +/** + * @internal + * @defgroup Evas_BiDi Evas BiDi utility functions + * + * This set of functions and types helps evas handle BiDi strings correctly. + * @todo Document types, structures and macros. + * + * @{ + */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifdef HAVE_FRIBIDI +# define USE_FRIBIDI +# define BIDI_SUPPORT +#endif + +#include + +#ifdef USE_FRIBIDI +# include +#endif + +/* abstract fribidi - we statically define sizes here because otherwise we would + * have to ifdef everywhere (because function decorations may change with/without + * bidi support) + * These types should only be passed as pointers! i.e do not directely use any of + * these types in function declarations. Defining as void should help ensuring that. + */ + +/* Evas_BiDi_Direction is defined in evas.h */ + +#ifdef USE_FRIBIDI +# define _EVAS_BIDI_TYPEDEF(type) \ + typedef FriBidi ## type EvasBiDi ## type +#else +# define _EVAS_BIDI_TYPEDEF(type) \ + typedef void EvasBiDi ## type +#endif + +#if 0 /* We are using Eina_Unicode instead */ +_EVAS_BIDI_TYPEDEF(Char); +#endif +_EVAS_BIDI_TYPEDEF(CharType); +_EVAS_BIDI_TYPEDEF(ParType); +_EVAS_BIDI_TYPEDEF(StrIndex); +_EVAS_BIDI_TYPEDEF(Level); +_EVAS_BIDI_TYPEDEF(JoiningType); + +typedef struct _Evas_BiDi_Paragraph_Props Evas_BiDi_Paragraph_Props; +typedef struct _Evas_BiDi_Props Evas_BiDi_Props; + +/* This structure defines a set of properties of a BiDi string. In case of a + * non-bidi string, all values should be NULL. + * To check if a structure describes a bidi string or not, use the macro + * EVAS_BIDI_IS_BIDI_PROP. RTL-only strings are also treated as bidi ATM. + */ +struct _Evas_BiDi_Paragraph_Props { + EvasBiDiCharType *char_types; /* BiDi char types */ + EvasBiDiLevel *embedding_levels; /* BiDi embedding levels */ + int refcount; /* The number of references to this object */ +#ifdef USE_FRIBIDI + EvasBiDiParType direction; +#endif +}; + +#include "Evas.h" +struct _Evas_BiDi_Props +{ + Evas_BiDi_Direction dir; +}; + + + +#ifdef USE_FRIBIDI + +#define EVAS_BIDI_PARAGRAPH_NEUTRAL FRIBIDI_PAR_ON +#define EVAS_BIDI_PARAGRAPH_LTR FRIBIDI_PAR_LTR +#define EVAS_BIDI_PARAGRAPH_RTL FRIBIDI_PAR_RTL +#define EVAS_BIDI_PARAGRAPH_WLTR FRIBIDI_PAR_WLTR +#define EVAS_BIDI_PARAGRAPH_WRTL FRIBIDI_PAR_WRTL + +#define EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(x) \ + (((x) && \ + ((x->direction == EVAS_BIDI_PARAGRAPH_RTL) || \ + (x->direction == EVAS_BIDI_PARAGRAPH_WRTL))) ? \ + EINA_TRUE : EINA_FALSE) + + +# define evas_bidi_position_visual_to_logical(list, position) \ + (list) ? list[position] : position; + +EvasBiDiStrIndex +evas_bidi_position_logical_to_visual(EvasBiDiStrIndex *v_to_l, int len, EvasBiDiStrIndex position); + +EvasBiDiStrIndex +evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrIndex position); + +Eina_Bool +evas_bidi_is_rtl_str(const Eina_Unicode *str); + +Eina_Bool +evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex index); + +int +evas_bidi_end_of_run_get(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len); + +Eina_Bool +evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len, const Evas_BiDi_Paragraph_Props *props, EvasBiDiStrIndex **_v_to_l); + +Evas_BiDi_Paragraph_Props * +evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len, int *segment_idxs) EINA_ARG_NONNULL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT; + +void +evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst); + +EAPI Eina_Bool +evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len); + +void +evas_bidi_props_clean(Evas_BiDi_Props *intl_props) EINA_ARG_NONNULL(1); + +void +evas_bidi_paragraph_props_clean(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); + +Evas_BiDi_Paragraph_Props * +evas_bidi_paragraph_props_ref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); + +void +evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); + +Evas_BiDi_Paragraph_Props * +evas_bidi_paragraph_props_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; + +int * +evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT EINA_MALLOC; + +#endif +/** + * @} + */ +/** + * @} + */ + +#endif + diff --git a/libraries/evas/src/lib/engines/common/language/evas_language_utils.c b/libraries/evas/src/lib/engines/common/language/evas_language_utils.c new file mode 100644 index 0000000..9c9b3e3 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/language/evas_language_utils.c @@ -0,0 +1,146 @@ +/** + * @internal + * @addtogroup Evas_Utils + * + * @{ + */ +/** + * @internal + * @defgroup Evas_Script Evas Script (language) utility functions + * + * This set of functions and types helps evas handle scripts correctly. + * @todo Document types, structures and macros. + * + * @{ + */ +#include + +#include "evas_language_utils.h" +#include "evas_bidi_utils.h" /* Used for splitting according to bidi */ +#include "../evas_font_ot.h" /* Used for harfbuzz info */ + +#ifdef USE_HARFBUZZ +# include +#endif + +#include "evas_script_table.h" + +static Evas_Script_Type +_evas_common_language_char_script_search(Eina_Unicode unicode) +{ + int min = 0; + int max = (sizeof(_evas_script_slow_table) / + sizeof(_evas_script_slow_table[0])) - 1; + int mid; + + do + { + mid = (min + max) / 2; + + if (unicode < _evas_script_slow_table[mid].start) + max = mid - 1; + else if (unicode >= _evas_script_slow_table[mid].start + + _evas_script_slow_table[mid].len) + min = mid + 1; + else + return _evas_script_slow_table[mid].script; + } + while (min <= max); + + return EVAS_SCRIPT_UNKNOWN; +} + +Evas_Script_Type +evas_common_language_char_script_get(Eina_Unicode unicode) +{ + if ((unicode >= 0) && (unicode < EVAS_SCRIPT_DIRECT_TABLE_LIMIT)) + return _evas_script_fast_table[unicode]; + else + return _evas_common_language_char_script_search(unicode); +} + +int +evas_common_language_script_end_of_run_get(const Eina_Unicode *str, + const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len) +{ + /* FIXME: Use the standard segmentation instead */ + Evas_Script_Type first = EVAS_SCRIPT_UNKNOWN; + int i; + for (i = 0 ; i < len ; i++, str++) + { + Evas_Script_Type tmp; + tmp = evas_common_language_char_script_get(*str); + /* Arabic is the first script in the array that's not + * common/inherited. */ + if ((first == EVAS_SCRIPT_UNKNOWN) && (tmp >= EVAS_SCRIPT_ARABIC)) + { + first = tmp; + continue; + } + if ((first != tmp) && (tmp >= EVAS_SCRIPT_ARABIC)) + { + break; + } + } +#ifdef BIDI_SUPPORT + { + int bidi_end; + bidi_end = evas_bidi_end_of_run_get(bidi_props, start, len); + if (bidi_end > 0) + { + i = (i < bidi_end) ? i : bidi_end; + } + } +#else + (void) bidi_props; + (void) start; +#endif + return (i < len) ? i : 0; +} + +Evas_Script_Type +evas_common_language_script_type_get(const Eina_Unicode *str, size_t len) +{ + Evas_Script_Type script = EVAS_SCRIPT_COMMON; + const Eina_Unicode *end = str + len; + /* Arabic is the first script in the array that's not a common/inherited */ + for ( ; str < end && ((script = evas_common_language_char_script_get(*str)) < EVAS_SCRIPT_ARABIC) ; str++) + ; + return script; +} + +const char * +evas_common_language_from_locale_get(void) +{ + static char lang[6]; /* FIXME: Maximum length I know about */ + if (*lang) return lang; + + const char *locale; + locale = getenv("LANG"); + if (locale && *locale) + { + char *itr; + strncpy(lang, locale, 5); + lang[5] = '\0'; + itr = lang; + while (*itr) + { + if (*itr == '_') + { + *itr = '\0'; + } + itr++; + } + return lang; + } + + return ""; +} + +/* + * @} + */ +/* + * @} + */ + diff --git a/libraries/evas/src/lib/engines/common/language/evas_language_utils.h b/libraries/evas/src/lib/engines/common/language/evas_language_utils.h new file mode 100644 index 0000000..fa795ec --- /dev/null +++ b/libraries/evas/src/lib/engines/common/language/evas_language_utils.h @@ -0,0 +1,132 @@ +#ifndef _EVAS_LANGUAGE_UTILS +#define _EVAS_LANGUAGE_UTILS + +#include +#include "evas_bidi_utils.h" + +/* Unicode Script property */ +typedef enum +{ + EVAS_SCRIPT_COMMON = 0, /* Zyyy */ + EVAS_SCRIPT_INHERITED, /* Qaai */ + EVAS_SCRIPT_ARABIC, /* Arab */ + EVAS_SCRIPT_ARMENIAN, /* Armn */ + EVAS_SCRIPT_BENGALI, /* Beng */ + EVAS_SCRIPT_BOPOMOFO, /* Bopo */ + EVAS_SCRIPT_CHEROKEE, /* Cher */ + EVAS_SCRIPT_COPTIC, /* Qaac */ + EVAS_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */ + EVAS_SCRIPT_DESERET, /* Dsrt */ + EVAS_SCRIPT_DEVANAGARI, /* Deva */ + EVAS_SCRIPT_ETHIOPIC, /* Ethi */ + EVAS_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */ + EVAS_SCRIPT_GOTHIC, /* Goth */ + EVAS_SCRIPT_GREEK, /* Grek */ + EVAS_SCRIPT_GUJARATI, /* Gujr */ + EVAS_SCRIPT_GURMUKHI, /* Guru */ + EVAS_SCRIPT_HAN, /* Hani */ + EVAS_SCRIPT_HANGUL, /* Hang */ + EVAS_SCRIPT_HEBREW, /* Hebr */ + EVAS_SCRIPT_HIRAGANA, /* Hira */ + EVAS_SCRIPT_KANNADA, /* Knda */ + EVAS_SCRIPT_KATAKANA, /* Kana */ + EVAS_SCRIPT_KHMER, /* Khmr */ + EVAS_SCRIPT_LAO, /* Laoo */ + EVAS_SCRIPT_LATIN, /* Latn (Latf, Latg) */ + EVAS_SCRIPT_MALAYALAM, /* Mlym */ + EVAS_SCRIPT_MONGOLIAN, /* Mong */ + EVAS_SCRIPT_MYANMAR, /* Mymr */ + EVAS_SCRIPT_OGHAM, /* Ogam */ + EVAS_SCRIPT_OLD_ITALIC, /* Ital */ + EVAS_SCRIPT_ORIYA, /* Orya */ + EVAS_SCRIPT_RUNIC, /* Runr */ + EVAS_SCRIPT_SINHALA, /* Sinh */ + EVAS_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */ + EVAS_SCRIPT_TAMIL, /* Taml */ + EVAS_SCRIPT_TELUGU, /* Telu */ + EVAS_SCRIPT_THAANA, /* Thaa */ + EVAS_SCRIPT_THAI, /* Thai */ + EVAS_SCRIPT_TIBETAN, /* Tibt */ + EVAS_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */ + EVAS_SCRIPT_YI, /* Yiii */ + EVAS_SCRIPT_TAGALOG, /* Tglg */ + EVAS_SCRIPT_HANUNOO, /* Hano */ + EVAS_SCRIPT_BUHID, /* Buhd */ + EVAS_SCRIPT_TAGBANWA, /* Tagb */ + + /* Unicode-4.0 additions */ + EVAS_SCRIPT_BRAILLE, /* Brai */ + EVAS_SCRIPT_CYPRIOT, /* Cprt */ + EVAS_SCRIPT_LIMBU, /* Limb */ + EVAS_SCRIPT_OSMANYA, /* Osma */ + EVAS_SCRIPT_SHAVIAN, /* Shaw */ + EVAS_SCRIPT_LINEAR_B, /* Linb */ + EVAS_SCRIPT_TAI_LE, /* Tale */ + EVAS_SCRIPT_UGARITIC, /* Ugar */ + + /* Unicode-4.1 additions */ + EVAS_SCRIPT_NEW_TAI_LUE, /* Talu */ + EVAS_SCRIPT_BUGINESE, /* Bugi */ + EVAS_SCRIPT_GLAGOLITIC, /* Glag */ + EVAS_SCRIPT_TIFINAGH, /* Tfng */ + EVAS_SCRIPT_SYLOTI_NAGRI, /* Sylo */ + EVAS_SCRIPT_OLD_PERSIAN, /* Xpeo */ + EVAS_SCRIPT_KHAROSHTHI, /* Khar */ + + /* Unicode-5.0 additions */ + EVAS_SCRIPT_UNKNOWN, /* Zzzz */ + EVAS_SCRIPT_BALINESE, /* Bali */ + EVAS_SCRIPT_CUNEIFORM, /* Xsux */ + EVAS_SCRIPT_PHOENICIAN, /* Phnx */ + EVAS_SCRIPT_PHAGS_PA, /* Phag */ + EVAS_SCRIPT_NKO, /* Nkoo */ + + /* Unicode-5.1 additions */ + EVAS_SCRIPT_KAYAH_LI, /* Kali */ + EVAS_SCRIPT_LEPCHA, /* Lepc */ + EVAS_SCRIPT_REJANG, /* Rjng */ + EVAS_SCRIPT_SUNDANESE, /* Sund */ + EVAS_SCRIPT_SAURASHTRA, /* Saur */ + EVAS_SCRIPT_CHAM, /* Cham */ + EVAS_SCRIPT_OL_CHIKI, /* Olck */ + EVAS_SCRIPT_VAI, /* Vaii */ + EVAS_SCRIPT_CARIAN, /* Cari */ + EVAS_SCRIPT_LYCIAN, /* Lyci */ + EVAS_SCRIPT_LYDIAN, /* Lydi */ + + /* Unicode-5.2 additions */ + EVAS_SCRIPT_AVESTAN, /* Avst */ + EVAS_SCRIPT_BAMUM, /* Bamu */ + EVAS_SCRIPT_EGYPTIAN_HIEROGLYPHS, /* Egyp */ + EVAS_SCRIPT_IMPERIAL_ARAMAIC, /* Armi */ + EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI, /* Phli */ + EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN, /* Prti */ + EVAS_SCRIPT_JAVANESE, /* Java */ + EVAS_SCRIPT_KAITHI, /* Kthi */ + EVAS_SCRIPT_LISU, /* Lisu */ + EVAS_SCRIPT_MEETEI_MAYEK, /* Mtei */ + EVAS_SCRIPT_OLD_SOUTH_ARABIAN, /* Sarb */ + EVAS_SCRIPT_OLD_TURKIC, /* Orkh */ + EVAS_SCRIPT_SAMARITAN, /* Samr */ + EVAS_SCRIPT_TAI_THAM, /* Lana */ + EVAS_SCRIPT_TAI_VIET, /* Tavt */ + + /* Unicode-6.0 additions */ + EVAS_SCRIPT_BATAK, /* Batk */ + EVAS_SCRIPT_BRAHMI, /* Brah */ + EVAS_SCRIPT_MANDAIC, /* Mand */ +} Evas_Script_Type; + +int +evas_common_language_script_end_of_run_get(const Eina_Unicode *str, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len); + +Evas_Script_Type +evas_common_language_script_type_get(const Eina_Unicode *str, size_t len); + +Evas_Script_Type +evas_common_language_char_script_get(Eina_Unicode unicode); + +const char * +evas_common_language_from_locale_get(void); +#endif + diff --git a/libraries/evas/src/lib/engines/common/language/evas_script_table.h b/libraries/evas/src/lib/engines/common/language/evas_script_table.h new file mode 100644 index 0000000..dd77db0 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/language/evas_script_table.h @@ -0,0 +1,3087 @@ +/* evas_script_table.h: Mostly based on output by gen-script-table.pl + * which is available in glib's tools. + * + * NOTICE: This is temporary and will only stay here until there will be + * a nice "UNICODE DATA" library to use. From my understanding it's already + * being worked on. + * + * Date: Sun May 1 15:48:56 2011 + * Source: Scripts-6.0.0.txt + * + * Do not edit. + */ + +#define EVAS_SCRIPT_DIRECT_TABLE_LIMIT 8192 + +static const +Eina_Unicode _evas_script_fast_table[EVAS_SCRIPT_DIRECT_TABLE_LIMIT] = { + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_BOPOMOFO, + EVAS_SCRIPT_BOPOMOFO, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, + EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, + EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, + EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, + EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARMENIAN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, + EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, + EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, + EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, + EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, + EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, + EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, + EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, + EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, + EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, + EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, + EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, + EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, + EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, + EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, + EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, + EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, + EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, + EVAS_SCRIPT_THAI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, + EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, + EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, + EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, + EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, + EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, + EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, + EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, + EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, + EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, + EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, + EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_RUNIC, + EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGALOG, + EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, + EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, + EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, + EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, + EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, + EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, + EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, + EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, + EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, + EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, + EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, + EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, + EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, + EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, + EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, + EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, + EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, + EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, + EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA, + EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, + EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, + EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, + EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, + EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA, + EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, + EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, + EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_BUGINESE, + EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, + EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, + EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, + EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, + EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, + EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, + EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, + EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, + EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BUGINESE, + EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, + EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, + EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, + EVAS_SCRIPT_BATAK, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, + EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_CYRILLIC, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, + EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, + EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, +}; + +static const struct { + Eina_Unicode start; + short len; + Evas_Script_Type script; +} _evas_script_slow_table[] = { + { 0x2000, 12, EVAS_SCRIPT_COMMON }, + { 0x200c, 2, EVAS_SCRIPT_INHERITED }, + { 0x200e, 87, EVAS_SCRIPT_COMMON }, + { 0x206a, 7, EVAS_SCRIPT_COMMON }, + { 0x2071, 1, EVAS_SCRIPT_LATIN }, + { 0x2074, 11, EVAS_SCRIPT_COMMON }, + { 0x207f, 1, EVAS_SCRIPT_LATIN }, + { 0x2080, 15, EVAS_SCRIPT_COMMON }, + { 0x2090, 13, EVAS_SCRIPT_LATIN }, + { 0x20a0, 26, EVAS_SCRIPT_COMMON }, + { 0x20d0, 33, EVAS_SCRIPT_INHERITED }, + { 0x2100, 38, EVAS_SCRIPT_COMMON }, + { 0x2126, 1, EVAS_SCRIPT_GREEK }, + { 0x2127, 3, EVAS_SCRIPT_COMMON }, + { 0x212a, 2, EVAS_SCRIPT_LATIN }, + { 0x212c, 6, EVAS_SCRIPT_COMMON }, + { 0x2132, 1, EVAS_SCRIPT_LATIN }, + { 0x2133, 27, EVAS_SCRIPT_COMMON }, + { 0x214e, 1, EVAS_SCRIPT_LATIN }, + { 0x214f, 17, EVAS_SCRIPT_COMMON }, + { 0x2160, 41, EVAS_SCRIPT_LATIN }, + { 0x2189, 1, EVAS_SCRIPT_COMMON }, + { 0x2190, 612, EVAS_SCRIPT_COMMON }, + { 0x2400, 39, EVAS_SCRIPT_COMMON }, + { 0x2440, 11, EVAS_SCRIPT_COMMON }, + { 0x2460, 672, EVAS_SCRIPT_COMMON }, + { 0x2701, 202, EVAS_SCRIPT_COMMON }, + { 0x27cc, 1, EVAS_SCRIPT_COMMON }, + { 0x27ce, 50, EVAS_SCRIPT_COMMON }, + { 0x2800, 256, EVAS_SCRIPT_BRAILLE }, + { 0x2900, 589, EVAS_SCRIPT_COMMON }, + { 0x2b50, 10, EVAS_SCRIPT_COMMON }, + { 0x2c00, 47, EVAS_SCRIPT_GLAGOLITIC }, + { 0x2c30, 47, EVAS_SCRIPT_GLAGOLITIC }, + { 0x2c60, 32, EVAS_SCRIPT_LATIN }, + { 0x2c80, 114, EVAS_SCRIPT_COPTIC }, + { 0x2cf9, 7, EVAS_SCRIPT_COPTIC }, + { 0x2d00, 38, EVAS_SCRIPT_GEORGIAN }, + { 0x2d30, 54, EVAS_SCRIPT_TIFINAGH }, + { 0x2d6f, 2, EVAS_SCRIPT_TIFINAGH }, + { 0x2d7f, 1, EVAS_SCRIPT_TIFINAGH }, + { 0x2d80, 23, EVAS_SCRIPT_ETHIOPIC }, + { 0x2da0, 7, EVAS_SCRIPT_ETHIOPIC }, + { 0x2da8, 7, EVAS_SCRIPT_ETHIOPIC }, + { 0x2db0, 7, EVAS_SCRIPT_ETHIOPIC }, + { 0x2db8, 7, EVAS_SCRIPT_ETHIOPIC }, + { 0x2dc0, 7, EVAS_SCRIPT_ETHIOPIC }, + { 0x2dc8, 7, EVAS_SCRIPT_ETHIOPIC }, + { 0x2dd0, 7, EVAS_SCRIPT_ETHIOPIC }, + { 0x2dd8, 7, EVAS_SCRIPT_ETHIOPIC }, + { 0x2de0, 32, EVAS_SCRIPT_CYRILLIC }, + { 0x2e00, 50, EVAS_SCRIPT_COMMON }, + { 0x2e80, 26, EVAS_SCRIPT_HAN }, + { 0x2e9b, 89, EVAS_SCRIPT_HAN }, + { 0x2f00, 214, EVAS_SCRIPT_HAN }, + { 0x2ff0, 12, EVAS_SCRIPT_COMMON }, + { 0x3000, 5, EVAS_SCRIPT_COMMON }, + { 0x3005, 1, EVAS_SCRIPT_HAN }, + { 0x3006, 1, EVAS_SCRIPT_COMMON }, + { 0x3007, 1, EVAS_SCRIPT_HAN }, + { 0x3008, 25, EVAS_SCRIPT_COMMON }, + { 0x3021, 9, EVAS_SCRIPT_HAN }, + { 0x302a, 4, EVAS_SCRIPT_INHERITED }, + { 0x302e, 2, EVAS_SCRIPT_HANGUL }, + { 0x3030, 8, EVAS_SCRIPT_COMMON }, + { 0x3038, 4, EVAS_SCRIPT_HAN }, + { 0x303c, 4, EVAS_SCRIPT_COMMON }, + { 0x3041, 86, EVAS_SCRIPT_HIRAGANA }, + { 0x3099, 2, EVAS_SCRIPT_INHERITED }, + { 0x309b, 2, EVAS_SCRIPT_COMMON }, + { 0x309d, 3, EVAS_SCRIPT_HIRAGANA }, + { 0x30a0, 1, EVAS_SCRIPT_COMMON }, + { 0x30a1, 90, EVAS_SCRIPT_KATAKANA }, + { 0x30fb, 2, EVAS_SCRIPT_COMMON }, + { 0x30fd, 3, EVAS_SCRIPT_KATAKANA }, + { 0x3105, 41, EVAS_SCRIPT_BOPOMOFO }, + { 0x3131, 94, EVAS_SCRIPT_HANGUL }, + { 0x3190, 16, EVAS_SCRIPT_COMMON }, + { 0x31a0, 27, EVAS_SCRIPT_BOPOMOFO }, + { 0x31c0, 36, EVAS_SCRIPT_COMMON }, + { 0x31f0, 16, EVAS_SCRIPT_KATAKANA }, + { 0x3200, 31, EVAS_SCRIPT_HANGUL }, + { 0x3220, 64, EVAS_SCRIPT_COMMON }, + { 0x3260, 31, EVAS_SCRIPT_HANGUL }, + { 0x327f, 81, EVAS_SCRIPT_COMMON }, + { 0x32d0, 47, EVAS_SCRIPT_KATAKANA }, + { 0x3300, 88, EVAS_SCRIPT_KATAKANA }, + { 0x3358, 168, EVAS_SCRIPT_COMMON }, + { 0x3400, 6582, EVAS_SCRIPT_HAN }, + { 0x4dc0, 64, EVAS_SCRIPT_COMMON }, + { 0x4e00, 20940, EVAS_SCRIPT_HAN }, + { 0xa000, 1165, EVAS_SCRIPT_YI }, + { 0xa490, 55, EVAS_SCRIPT_YI }, + { 0xa4d0, 48, EVAS_SCRIPT_LISU }, + { 0xa500, 300, EVAS_SCRIPT_VAI }, + { 0xa640, 52, EVAS_SCRIPT_CYRILLIC }, + { 0xa67c, 28, EVAS_SCRIPT_CYRILLIC }, + { 0xa6a0, 88, EVAS_SCRIPT_BAMUM }, + { 0xa700, 34, EVAS_SCRIPT_COMMON }, + { 0xa722, 102, EVAS_SCRIPT_LATIN }, + { 0xa788, 3, EVAS_SCRIPT_COMMON }, + { 0xa78b, 4, EVAS_SCRIPT_LATIN }, + { 0xa790, 2, EVAS_SCRIPT_LATIN }, + { 0xa7a0, 10, EVAS_SCRIPT_LATIN }, + { 0xa7fa, 6, EVAS_SCRIPT_LATIN }, + { 0xa800, 44, EVAS_SCRIPT_SYLOTI_NAGRI }, + { 0xa830, 10, EVAS_SCRIPT_COMMON }, + { 0xa840, 56, EVAS_SCRIPT_PHAGS_PA }, + { 0xa880, 69, EVAS_SCRIPT_SAURASHTRA }, + { 0xa8ce, 12, EVAS_SCRIPT_SAURASHTRA }, + { 0xa8e0, 28, EVAS_SCRIPT_DEVANAGARI }, + { 0xa900, 48, EVAS_SCRIPT_KAYAH_LI }, + { 0xa930, 36, EVAS_SCRIPT_REJANG }, + { 0xa95f, 1, EVAS_SCRIPT_REJANG }, + { 0xa960, 29, EVAS_SCRIPT_HANGUL }, + { 0xa980, 78, EVAS_SCRIPT_JAVANESE }, + { 0xa9cf, 11, EVAS_SCRIPT_JAVANESE }, + { 0xa9de, 2, EVAS_SCRIPT_JAVANESE }, + { 0xaa00, 55, EVAS_SCRIPT_CHAM }, + { 0xaa40, 14, EVAS_SCRIPT_CHAM }, + { 0xaa50, 10, EVAS_SCRIPT_CHAM }, + { 0xaa5c, 4, EVAS_SCRIPT_CHAM }, + { 0xaa60, 28, EVAS_SCRIPT_MYANMAR }, + { 0xaa80, 67, EVAS_SCRIPT_TAI_VIET }, + { 0xaadb, 5, EVAS_SCRIPT_TAI_VIET }, + { 0xab01, 6, EVAS_SCRIPT_ETHIOPIC }, + { 0xab09, 6, EVAS_SCRIPT_ETHIOPIC }, + { 0xab11, 6, EVAS_SCRIPT_ETHIOPIC }, + { 0xab20, 7, EVAS_SCRIPT_ETHIOPIC }, + { 0xab28, 7, EVAS_SCRIPT_ETHIOPIC }, + { 0xabc0, 46, EVAS_SCRIPT_MEETEI_MAYEK }, + { 0xabf0, 10, EVAS_SCRIPT_MEETEI_MAYEK }, + { 0xac00, 11172, EVAS_SCRIPT_HANGUL }, + { 0xd7b0, 23, EVAS_SCRIPT_HANGUL }, + { 0xd7cb, 49, EVAS_SCRIPT_HANGUL }, + { 0xf900, 302, EVAS_SCRIPT_HAN }, + { 0xfa30, 62, EVAS_SCRIPT_HAN }, + { 0xfa70, 106, EVAS_SCRIPT_HAN }, + { 0xfb00, 7, EVAS_SCRIPT_LATIN }, + { 0xfb13, 5, EVAS_SCRIPT_ARMENIAN }, + { 0xfb1d, 26, EVAS_SCRIPT_HEBREW }, + { 0xfb38, 5, EVAS_SCRIPT_HEBREW }, + { 0xfb3e, 1, EVAS_SCRIPT_HEBREW }, + { 0xfb40, 2, EVAS_SCRIPT_HEBREW }, + { 0xfb43, 2, EVAS_SCRIPT_HEBREW }, + { 0xfb46, 10, EVAS_SCRIPT_HEBREW }, + { 0xfb50, 114, EVAS_SCRIPT_ARABIC }, + { 0xfbd3, 363, EVAS_SCRIPT_ARABIC }, + { 0xfd3e, 2, EVAS_SCRIPT_COMMON }, + { 0xfd50, 64, EVAS_SCRIPT_ARABIC }, + { 0xfd92, 54, EVAS_SCRIPT_ARABIC }, + { 0xfdf0, 13, EVAS_SCRIPT_ARABIC }, + { 0xfdfd, 1, EVAS_SCRIPT_COMMON }, + { 0xfe00, 16, EVAS_SCRIPT_INHERITED }, + { 0xfe10, 10, EVAS_SCRIPT_COMMON }, + { 0xfe20, 7, EVAS_SCRIPT_INHERITED }, + { 0xfe30, 35, EVAS_SCRIPT_COMMON }, + { 0xfe54, 19, EVAS_SCRIPT_COMMON }, + { 0xfe68, 4, EVAS_SCRIPT_COMMON }, + { 0xfe70, 5, EVAS_SCRIPT_ARABIC }, + { 0xfe76, 135, EVAS_SCRIPT_ARABIC }, + { 0xfeff, 1, EVAS_SCRIPT_COMMON }, + { 0xff01, 32, EVAS_SCRIPT_COMMON }, + { 0xff21, 26, EVAS_SCRIPT_LATIN }, + { 0xff3b, 6, EVAS_SCRIPT_COMMON }, + { 0xff41, 26, EVAS_SCRIPT_LATIN }, + { 0xff5b, 11, EVAS_SCRIPT_COMMON }, + { 0xff66, 10, EVAS_SCRIPT_KATAKANA }, + { 0xff70, 1, EVAS_SCRIPT_COMMON }, + { 0xff71, 45, EVAS_SCRIPT_KATAKANA }, + { 0xff9e, 2, EVAS_SCRIPT_COMMON }, + { 0xffa0, 31, EVAS_SCRIPT_HANGUL }, + { 0xffc2, 6, EVAS_SCRIPT_HANGUL }, + { 0xffca, 6, EVAS_SCRIPT_HANGUL }, + { 0xffd2, 6, EVAS_SCRIPT_HANGUL }, + { 0xffda, 3, EVAS_SCRIPT_HANGUL }, + { 0xffe0, 7, EVAS_SCRIPT_COMMON }, + { 0xffe8, 7, EVAS_SCRIPT_COMMON }, + { 0xfff9, 5, EVAS_SCRIPT_COMMON }, + { 0x10000, 12, EVAS_SCRIPT_LINEAR_B }, + { 0x1000d, 26, EVAS_SCRIPT_LINEAR_B }, + { 0x10028, 19, EVAS_SCRIPT_LINEAR_B }, + { 0x1003c, 2, EVAS_SCRIPT_LINEAR_B }, + { 0x1003f, 15, EVAS_SCRIPT_LINEAR_B }, + { 0x10050, 14, EVAS_SCRIPT_LINEAR_B }, + { 0x10080, 123, EVAS_SCRIPT_LINEAR_B }, + { 0x10100, 3, EVAS_SCRIPT_COMMON }, + { 0x10107, 45, EVAS_SCRIPT_COMMON }, + { 0x10137, 9, EVAS_SCRIPT_COMMON }, + { 0x10140, 75, EVAS_SCRIPT_GREEK }, + { 0x10190, 12, EVAS_SCRIPT_COMMON }, + { 0x101d0, 45, EVAS_SCRIPT_COMMON }, + { 0x101fd, 1, EVAS_SCRIPT_INHERITED }, + { 0x10280, 29, EVAS_SCRIPT_LYCIAN }, + { 0x102a0, 49, EVAS_SCRIPT_CARIAN }, + { 0x10300, 31, EVAS_SCRIPT_OLD_ITALIC }, + { 0x10320, 4, EVAS_SCRIPT_OLD_ITALIC }, + { 0x10330, 27, EVAS_SCRIPT_GOTHIC }, + { 0x10380, 30, EVAS_SCRIPT_UGARITIC }, + { 0x1039f, 1, EVAS_SCRIPT_UGARITIC }, + { 0x103a0, 36, EVAS_SCRIPT_OLD_PERSIAN }, + { 0x103c8, 14, EVAS_SCRIPT_OLD_PERSIAN }, + { 0x10400, 80, EVAS_SCRIPT_DESERET }, + { 0x10450, 48, EVAS_SCRIPT_SHAVIAN }, + { 0x10480, 30, EVAS_SCRIPT_OSMANYA }, + { 0x104a0, 10, EVAS_SCRIPT_OSMANYA }, + { 0x10800, 6, EVAS_SCRIPT_CYPRIOT }, + { 0x10808, 1, EVAS_SCRIPT_CYPRIOT }, + { 0x1080a, 44, EVAS_SCRIPT_CYPRIOT }, + { 0x10837, 2, EVAS_SCRIPT_CYPRIOT }, + { 0x1083c, 1, EVAS_SCRIPT_CYPRIOT }, + { 0x1083f, 1, EVAS_SCRIPT_CYPRIOT }, + { 0x10840, 22, EVAS_SCRIPT_IMPERIAL_ARAMAIC }, + { 0x10857, 9, EVAS_SCRIPT_IMPERIAL_ARAMAIC }, + { 0x10900, 28, EVAS_SCRIPT_PHOENICIAN }, + { 0x1091f, 1, EVAS_SCRIPT_PHOENICIAN }, + { 0x10920, 26, EVAS_SCRIPT_LYDIAN }, + { 0x1093f, 1, EVAS_SCRIPT_LYDIAN }, + { 0x10a00, 4, EVAS_SCRIPT_KHAROSHTHI }, + { 0x10a05, 2, EVAS_SCRIPT_KHAROSHTHI }, + { 0x10a0c, 8, EVAS_SCRIPT_KHAROSHTHI }, + { 0x10a15, 3, EVAS_SCRIPT_KHAROSHTHI }, + { 0x10a19, 27, EVAS_SCRIPT_KHAROSHTHI }, + { 0x10a38, 3, EVAS_SCRIPT_KHAROSHTHI }, + { 0x10a3f, 9, EVAS_SCRIPT_KHAROSHTHI }, + { 0x10a50, 9, EVAS_SCRIPT_KHAROSHTHI }, + { 0x10a60, 32, EVAS_SCRIPT_OLD_SOUTH_ARABIAN }, + { 0x10b00, 54, EVAS_SCRIPT_AVESTAN }, + { 0x10b39, 7, EVAS_SCRIPT_AVESTAN }, + { 0x10b40, 22, EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN }, + { 0x10b58, 8, EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN }, + { 0x10b60, 19, EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI }, + { 0x10b78, 8, EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI }, + { 0x10c00, 73, EVAS_SCRIPT_OLD_TURKIC }, + { 0x10e60, 31, EVAS_SCRIPT_ARABIC }, + { 0x11000, 78, EVAS_SCRIPT_BRAHMI }, + { 0x11052, 30, EVAS_SCRIPT_BRAHMI }, + { 0x11080, 66, EVAS_SCRIPT_KAITHI }, + { 0x12000, 879, EVAS_SCRIPT_CUNEIFORM }, + { 0x12400, 99, EVAS_SCRIPT_CUNEIFORM }, + { 0x12470, 4, EVAS_SCRIPT_CUNEIFORM }, + { 0x13000, 1071, EVAS_SCRIPT_EGYPTIAN_HIEROGLYPHS }, + { 0x16800, 569, EVAS_SCRIPT_BAMUM }, + { 0x1b000, 1, EVAS_SCRIPT_KATAKANA }, + { 0x1b001, 1, EVAS_SCRIPT_HIRAGANA }, + { 0x1d000, 246, EVAS_SCRIPT_COMMON }, + { 0x1d100, 39, EVAS_SCRIPT_COMMON }, + { 0x1d129, 62, EVAS_SCRIPT_COMMON }, + { 0x1d167, 3, EVAS_SCRIPT_INHERITED }, + { 0x1d16a, 17, EVAS_SCRIPT_COMMON }, + { 0x1d17b, 8, EVAS_SCRIPT_INHERITED }, + { 0x1d183, 2, EVAS_SCRIPT_COMMON }, + { 0x1d185, 7, EVAS_SCRIPT_INHERITED }, + { 0x1d18c, 30, EVAS_SCRIPT_COMMON }, + { 0x1d1aa, 4, EVAS_SCRIPT_INHERITED }, + { 0x1d1ae, 48, EVAS_SCRIPT_COMMON }, + { 0x1d200, 70, EVAS_SCRIPT_GREEK }, + { 0x1d300, 87, EVAS_SCRIPT_COMMON }, + { 0x1d360, 18, EVAS_SCRIPT_COMMON }, + { 0x1d400, 85, EVAS_SCRIPT_COMMON }, + { 0x1d456, 71, EVAS_SCRIPT_COMMON }, + { 0x1d49e, 2, EVAS_SCRIPT_COMMON }, + { 0x1d4a2, 1, EVAS_SCRIPT_COMMON }, + { 0x1d4a5, 2, EVAS_SCRIPT_COMMON }, + { 0x1d4a9, 4, EVAS_SCRIPT_COMMON }, + { 0x1d4ae, 12, EVAS_SCRIPT_COMMON }, + { 0x1d4bb, 1, EVAS_SCRIPT_COMMON }, + { 0x1d4bd, 7, EVAS_SCRIPT_COMMON }, + { 0x1d4c5, 65, EVAS_SCRIPT_COMMON }, + { 0x1d507, 4, EVAS_SCRIPT_COMMON }, + { 0x1d50d, 8, EVAS_SCRIPT_COMMON }, + { 0x1d516, 7, EVAS_SCRIPT_COMMON }, + { 0x1d51e, 28, EVAS_SCRIPT_COMMON }, + { 0x1d53b, 4, EVAS_SCRIPT_COMMON }, + { 0x1d540, 5, EVAS_SCRIPT_COMMON }, + { 0x1d546, 1, EVAS_SCRIPT_COMMON }, + { 0x1d54a, 7, EVAS_SCRIPT_COMMON }, + { 0x1d552, 340, EVAS_SCRIPT_COMMON }, + { 0x1d6a8, 292, EVAS_SCRIPT_COMMON }, + { 0x1d7ce, 50, EVAS_SCRIPT_COMMON }, + { 0x1f000, 44, EVAS_SCRIPT_COMMON }, + { 0x1f030, 100, EVAS_SCRIPT_COMMON }, + { 0x1f0a0, 15, EVAS_SCRIPT_COMMON }, + { 0x1f0b1, 14, EVAS_SCRIPT_COMMON }, + { 0x1f0c1, 15, EVAS_SCRIPT_COMMON }, + { 0x1f0d1, 15, EVAS_SCRIPT_COMMON }, + { 0x1f100, 11, EVAS_SCRIPT_COMMON }, + { 0x1f110, 31, EVAS_SCRIPT_COMMON }, + { 0x1f130, 58, EVAS_SCRIPT_COMMON }, + { 0x1f170, 43, EVAS_SCRIPT_COMMON }, + { 0x1f1e6, 26, EVAS_SCRIPT_COMMON }, + { 0x1f200, 1, EVAS_SCRIPT_HIRAGANA }, + { 0x1f201, 2, EVAS_SCRIPT_COMMON }, + { 0x1f210, 43, EVAS_SCRIPT_COMMON }, + { 0x1f240, 9, EVAS_SCRIPT_COMMON }, + { 0x1f250, 2, EVAS_SCRIPT_COMMON }, + { 0x1f300, 33, EVAS_SCRIPT_COMMON }, + { 0x1f330, 6, EVAS_SCRIPT_COMMON }, + { 0x1f337, 70, EVAS_SCRIPT_COMMON }, + { 0x1f380, 20, EVAS_SCRIPT_COMMON }, + { 0x1f3a0, 37, EVAS_SCRIPT_COMMON }, + { 0x1f3c6, 5, EVAS_SCRIPT_COMMON }, + { 0x1f3e0, 17, EVAS_SCRIPT_COMMON }, + { 0x1f400, 63, EVAS_SCRIPT_COMMON }, + { 0x1f440, 1, EVAS_SCRIPT_COMMON }, + { 0x1f442, 182, EVAS_SCRIPT_COMMON }, + { 0x1f4f9, 4, EVAS_SCRIPT_COMMON }, + { 0x1f500, 62, EVAS_SCRIPT_COMMON }, + { 0x1f550, 24, EVAS_SCRIPT_COMMON }, + { 0x1f5fb, 5, EVAS_SCRIPT_COMMON }, + { 0x1f601, 16, EVAS_SCRIPT_COMMON }, + { 0x1f612, 3, EVAS_SCRIPT_COMMON }, + { 0x1f616, 1, EVAS_SCRIPT_COMMON }, + { 0x1f618, 1, EVAS_SCRIPT_COMMON }, + { 0x1f61a, 1, EVAS_SCRIPT_COMMON }, + { 0x1f61c, 3, EVAS_SCRIPT_COMMON }, + { 0x1f620, 6, EVAS_SCRIPT_COMMON }, + { 0x1f628, 4, EVAS_SCRIPT_COMMON }, + { 0x1f62d, 1, EVAS_SCRIPT_COMMON }, + { 0x1f630, 4, EVAS_SCRIPT_COMMON }, + { 0x1f635, 12, EVAS_SCRIPT_COMMON }, + { 0x1f645, 11, EVAS_SCRIPT_COMMON }, + { 0x1f680, 70, EVAS_SCRIPT_COMMON }, + { 0x1f700, 116, EVAS_SCRIPT_COMMON }, + { 0x20000, 42711, EVAS_SCRIPT_HAN }, + { 0x2a700, 4149, EVAS_SCRIPT_HAN }, + { 0x2b740, 222, EVAS_SCRIPT_HAN }, + { 0x2f800, 542, EVAS_SCRIPT_HAN }, + { 0xe0001, 1, EVAS_SCRIPT_COMMON }, + { 0xe0020, 96, EVAS_SCRIPT_COMMON }, + { 0xe0100, 240, EVAS_SCRIPT_INHERITED }, +}; diff --git a/libraries/evas/src/lib/engines/common_16/Makefile.am b/libraries/evas/src/lib/engines/common_16/Makefile.am new file mode 100644 index 0000000..ef2ab30 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/Makefile.am @@ -0,0 +1,32 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@VALGRIND_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EET_CFLAGS@ \ +@pthread_cflags@ + +noinst_LTLIBRARIES = libevas_engine_common_16.la + +libevas_engine_common_16_la_SOURCES = \ +evas_soft16_dither_mask.c \ +evas_soft16_font.c \ +evas_soft16_image_scaled_sampled.c \ +evas_soft16_image_unscaled.c \ +evas_soft16_main.c \ +evas_soft16_rectangle.c \ +evas_soft16_line.c \ +evas_soft16_polygon.c + +libevas_engine_common_16_la_DEPENDENCIES = $(top_builddir)/config.h + +EXTRA_DIST = \ +evas_soft16_point_blend.c \ +evas_soft16_scanline_blend.c \ +evas_soft16_scanline_fill.c diff --git a/libraries/evas/src/lib/engines/common_16/Makefile.in b/libraries/evas/src/lib/engines/common_16/Makefile.in new file mode 100644 index 0000000..9097a8d --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/Makefile.in @@ -0,0 +1,698 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/engines/common_16 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libevas_engine_common_16_la_LIBADD = +am_libevas_engine_common_16_la_OBJECTS = evas_soft16_dither_mask.lo \ + evas_soft16_font.lo evas_soft16_image_scaled_sampled.lo \ + evas_soft16_image_unscaled.lo evas_soft16_main.lo \ + evas_soft16_rectangle.lo evas_soft16_line.lo \ + evas_soft16_polygon.lo +libevas_engine_common_16_la_OBJECTS = \ + $(am_libevas_engine_common_16_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_common_16_la_SOURCES) +DIST_SOURCES = $(libevas_engine_common_16_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@VALGRIND_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EET_CFLAGS@ \ +@pthread_cflags@ + +noinst_LTLIBRARIES = libevas_engine_common_16.la +libevas_engine_common_16_la_SOURCES = \ +evas_soft16_dither_mask.c \ +evas_soft16_font.c \ +evas_soft16_image_scaled_sampled.c \ +evas_soft16_image_unscaled.c \ +evas_soft16_main.c \ +evas_soft16_rectangle.c \ +evas_soft16_line.c \ +evas_soft16_polygon.c + +libevas_engine_common_16_la_DEPENDENCIES = $(top_builddir)/config.h +EXTRA_DIST = \ +evas_soft16_point_blend.c \ +evas_soft16_scanline_blend.c \ +evas_soft16_scanline_fill.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common_16/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/engines/common_16/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_common_16.la: $(libevas_engine_common_16_la_OBJECTS) $(libevas_engine_common_16_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libevas_engine_common_16_la_OBJECTS) $(libevas_engine_common_16_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_dither_mask.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_font.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_image_scaled_sampled.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_image_unscaled.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_line.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_polygon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_rectangle.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c new file mode 100644 index 0000000..566efac --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c @@ -0,0 +1,293 @@ +#include "evas_common_soft16.h" + +#define S16_DM_SIZE 128 +#define S16_DM_BITS 6 +#define S16_DM_DIV 64 +#define S16_DM_MSK (S16_DM_SIZE - 1) +#define S16_DM_SHF(_b) (S16_DM_BITS - (8 - _b)) + +static const DATA8 dither_table[S16_DM_SIZE][S16_DM_SIZE] = +{ + { 0, 41, 23, 5, 17, 39, 7, 15, 62, 23, 40, 51, 31, 47, 9, 32, 52, 27, 57, 25, 6, 61, 27, 52, 37, 7, 40, 63, 18, 36, 10, 42, 25, 62, 45, 34, 20, 42, 37, 14, 35, 29, 50, 10, 61, 2, 40, 8, 37, 12, 58, 22, 5, 41, 10, 39, 0, 60, 11, 46, 2, 55, 38, 17, 36, 59, 13, 54, 37, 56, 8, 29, 16, 13, 63, 22, 41, 55, 7, 20, 49, 14, 23, 55, 37, 23, 19, 36, 15, 49, 23, 63, 30, 14, 38, 27, 53, 13, 22, 41, 19, 31, 7, 19, 50, 30, 49, 16, 3, 32, 56, 40, 29, 34, 8, 48, 19, 45, 4, 51, 12, 46, 35, 49, 16, 42, 12, 62 }, + { 30, 57, 36, 54, 47, 34, 52, 27, 43, 4, 28, 7, 17, 36, 62, 13, 44, 7, 18, 48, 33, 21, 44, 14, 30, 47, 12, 33, 5, 55, 31, 58, 13, 30, 4, 17, 52, 10, 60, 26, 46, 0, 39, 27, 42, 22, 47, 25, 60, 32, 9, 38, 48, 17, 59, 30, 49, 18, 34, 25, 51, 19, 5, 48, 21, 8, 28, 46, 1, 32, 41, 19, 54, 47, 37, 18, 28, 11, 44, 30, 39, 56, 2, 33, 8, 42, 61, 28, 58, 8, 46, 9, 41, 4, 58, 7, 21, 48, 59, 10, 52, 14, 42, 57, 12, 25, 7, 53, 42, 24, 11, 50, 17, 59, 42, 2, 36, 60, 32, 17, 63, 29, 21, 7, 59, 32, 24, 39 }, + { 22, 8, 16, 32, 3, 25, 13, 57, 18, 45, 58, 39, 55, 20, 5, 42, 23, 34, 63, 1, 51, 10, 58, 4, 60, 23, 53, 27, 44, 21, 3, 48, 8, 50, 43, 54, 27, 32, 5, 55, 21, 58, 12, 53, 6, 36, 14, 50, 17, 29, 53, 15, 24, 52, 7, 36, 13, 42, 4, 53, 9, 35, 61, 26, 56, 32, 49, 15, 62, 23, 6, 60, 2, 31, 4, 48, 58, 38, 15, 61, 5, 25, 47, 28, 50, 15, 7, 40, 3, 32, 33, 52, 25, 50, 35, 42, 61, 3, 28, 36, 23, 63, 4, 33, 46, 62, 36, 23, 60, 6, 54, 28, 4, 37, 23, 55, 25, 8, 42, 54, 14, 6, 56, 38, 19, 52, 4, 46 }, + { 48, 53, 43, 12, 45, 63, 30, 37, 9, 34, 21, 1, 25, 47, 29, 58, 3, 54, 15, 39, 29, 17, 38, 35, 20, 43, 1, 49, 15, 59, 29, 39, 22, 35, 16, 23, 1, 47, 39, 18, 8, 44, 25, 31, 57, 19, 63, 4, 45, 3, 42, 61, 1, 31, 45, 20, 57, 29, 62, 21, 32, 41, 14, 44, 3, 39, 5, 34, 10, 43, 51, 35, 23, 52, 40, 10, 21, 1, 53, 18, 51, 43, 12, 62, 18, 54, 26, 51, 20, 57, 14, 1, 62, 16, 11, 18, 32, 39, 17, 44, 1, 48, 26, 37, 18, 2, 51, 14, 28, 45, 35, 18, 57, 13, 47, 11, 51, 20, 2, 39, 31, 47, 25, 1, 50, 11, 60, 7 }, + { 18, 28, 1, 56, 21, 10, 51, 2, 46, 54, 14, 61, 11, 50, 13, 38, 19, 31, 45, 9, 55, 24, 47, 5, 54, 9, 62, 11, 35, 8, 51, 14, 57, 6, 63, 40, 58, 14, 51, 28, 62, 34, 15, 48, 1, 41, 30, 35, 55, 21, 34, 11, 49, 37, 8, 52, 4, 23, 15, 43, 1, 58, 11, 23, 53, 16, 55, 26, 58, 18, 27, 12, 45, 14, 25, 63, 42, 33, 27, 35, 9, 31, 21, 38, 1, 44, 34, 12, 48, 38, 21, 44, 29, 47, 26, 53, 1, 46, 54, 8, 59, 29, 11, 55, 22, 41, 33, 20, 39, 1, 48, 9, 44, 32, 5, 62, 29, 44, 57, 23, 10, 58, 34, 43, 15, 37, 26, 33 }, + { 51, 38, 59, 24, 35, 42, 19, 60, 5, 32, 41, 26, 43, 33, 7, 53, 48, 11, 59, 23, 42, 2, 61, 30, 16, 40, 32, 24, 56, 41, 19, 33, 37, 26, 47, 9, 31, 22, 2, 45, 9, 54, 4, 37, 21, 52, 11, 23, 7, 57, 16, 25, 55, 18, 63, 27, 46, 39, 56, 10, 50, 37, 29, 47, 19, 63, 24, 9, 46, 2, 39, 60, 9, 57, 30, 7, 49, 11, 59, 3, 45, 57, 5, 60, 29, 22, 5, 60, 30, 9, 59, 18, 40, 6, 57, 36, 30, 12, 24, 34, 15, 40, 52, 6, 49, 9, 58, 4, 63, 12, 26, 61, 22, 53, 38, 16, 35, 14, 28, 50, 42, 17, 5, 28, 62, 20, 54, 12 }, + { 26, 6, 31, 15, 49, 6, 38, 27, 22, 49, 16, 56, 2, 62, 30, 21, 0, 36, 28, 6, 49, 32, 13, 52, 26, 50, 19, 46, 3, 26, 62, 0, 53, 12, 29, 3, 53, 41, 60, 24, 38, 13, 58, 16, 43, 9, 59, 39, 46, 28, 44, 40, 2, 33, 13, 41, 16, 6, 47, 31, 26, 17, 57, 6, 38, 0, 42, 36, 29, 52, 20, 31, 48, 0, 34, 56, 20, 36, 23, 54, 14, 41, 24, 37, 10, 55, 46, 25, 16, 45, 36, 4, 55, 23, 15, 8, 50, 62, 5, 56, 44, 20, 13, 28, 59, 31, 24, 47, 31, 52, 37, 17, 40, 0, 26, 49, 3, 60, 7, 33, 0, 61, 53, 40, 8, 45, 2, 41 }, + { 16, 63, 43, 4, 61, 24, 56, 13, 53, 8, 36, 12, 24, 41, 16, 46, 60, 26, 52, 39, 14, 57, 21, 37, 0, 45, 7, 59, 38, 17, 43, 10, 45, 20, 61, 43, 19, 11, 33, 17, 50, 32, 23, 61, 28, 49, 26, 0, 18, 51, 5, 60, 22, 58, 29, 0, 59, 34, 19, 62, 3, 52, 7, 44, 30, 59, 13, 50, 15, 62, 7, 17, 38, 22, 44, 15, 40, 4, 47, 28, 33, 17, 49, 16, 51, 40, 10, 56, 0, 53, 13, 49, 28, 38, 60, 21, 43, 19, 37, 27, 3, 51, 34, 39, 0, 45, 15, 43, 10, 21, 3, 55, 8, 33, 59, 10, 41, 18, 52, 24, 46, 20, 30, 13, 58, 22, 36, 57 }, + { 50, 34, 11, 47, 29, 17, 44, 0, 33, 63, 28, 46, 52, 5, 57, 10, 42, 18, 4, 63, 20, 8, 44, 10, 56, 34, 14, 29, 5, 54, 23, 59, 32, 49, 7, 34, 49, 27, 56, 0, 42, 7, 46, 3, 40, 6, 54, 32, 62, 13, 36, 10, 47, 8, 35, 49, 24, 51, 12, 40, 22, 35, 60, 12, 22, 51, 33, 4, 40, 25, 43, 55, 5, 54, 12, 61, 26, 51, 8, 62, 0, 53, 7, 63, 2, 32, 19, 34, 42, 24, 31, 63, 2, 10, 45, 33, 0, 48, 9, 61, 22, 47, 8, 62, 18, 56, 7, 54, 27, 57, 46, 30, 50, 19, 45, 30, 56, 36, 22, 47, 11, 38, 3, 51, 32, 48, 18, 9 }, + { 0, 21, 40, 19, 52, 9, 37, 48, 20, 40, 3, 18, 27, 38, 35, 22, 31, 56, 13, 35, 46, 28, 60, 40, 27, 18, 61, 50, 41, 30, 7, 36, 2, 25, 16, 57, 5, 15, 47, 29, 55, 19, 30, 52, 15, 34, 20, 12, 43, 30, 20, 54, 25, 44, 53, 12, 38, 5, 55, 27, 48, 15, 33, 27, 45, 8, 19, 28, 56, 11, 33, 49, 18, 36, 29, 2, 45, 16, 39, 19, 31, 43, 27, 35, 20, 52, 26, 6, 61, 11, 41, 17, 29, 51, 20, 56, 25, 32, 41, 17, 53, 31, 25, 14, 42, 23, 35, 16, 38, 6, 34, 12, 15, 62, 6, 21, 13, 1, 63, 9, 55, 27, 43, 25, 14, 4, 31, 55 }, + { 44, 29, 61, 2, 35, 58, 26, 15, 60, 10, 51, 59, 14, 55, 8, 50, 2, 44, 25, 51, 1, 33, 16, 4, 48, 36, 2, 21, 12, 57, 48, 13, 51, 55, 40, 28, 37, 62, 8, 39, 12, 63, 36, 10, 59, 24, 56, 47, 9, 50, 41, 1, 32, 17, 6, 21, 61, 30, 9, 43, 1, 54, 41, 2, 54, 37, 48, 61, 1, 46, 21, 3, 58, 24, 50, 32, 60, 10, 57, 25, 46, 12, 59, 4, 45, 13, 57, 47, 27, 39, 5, 58, 47, 14, 35, 4, 52, 13, 60, 6, 36, 10, 45, 55, 4, 50, 29, 2, 61, 50, 25, 58, 44, 24, 36, 42, 54, 28, 40, 32, 16, 56, 6, 62, 46, 39, 60, 23 }, + { 7, 48, 14, 54, 23, 40, 4, 45, 30, 22, 42, 32, 1, 44, 20, 29, 58, 8, 37, 19, 41, 54, 24, 58, 9, 53, 25, 46, 34, 16, 23, 38, 27, 11, 18, 1, 52, 21, 35, 22, 48, 5, 25, 45, 18, 38, 2, 27, 35, 4, 57, 15, 62, 39, 57, 28, 42, 16, 36, 60, 24, 18, 10, 63, 20, 5, 16, 23, 37, 14, 59, 27, 41, 8, 13, 42, 21, 35, 6, 50, 3, 38, 15, 48, 30, 39, 17, 3, 49, 14, 53, 33, 24, 7, 61, 44, 11, 39, 23, 49, 19, 58, 1, 32, 36, 12, 60, 41, 20, 13, 41, 4, 39, 1, 48, 8, 18, 51, 14, 44, 5, 37, 21, 34, 1, 26, 10, 37 }, + { 53, 36, 27, 9, 50, 12, 32, 55, 2, 57, 7, 17, 48, 34, 63, 15, 40, 26, 62, 11, 49, 6, 31, 39, 22, 42, 6, 63, 1, 39, 60, 4, 42, 61, 32, 45, 24, 44, 2, 60, 16, 41, 53, 1, 33, 61, 49, 17, 63, 23, 45, 26, 33, 3, 23, 46, 2, 50, 20, 4, 45, 34, 49, 30, 39, 58, 44, 31, 53, 34, 6, 52, 30, 47, 63, 1, 53, 22, 42, 31, 58, 23, 54, 22, 61, 8, 36, 59, 22, 35, 21, 1, 55, 40, 27, 16, 30, 54, 2, 29, 43, 16, 39, 63, 21, 46, 26, 10, 48, 32, 19, 53, 30, 56, 26, 60, 33, 4, 61, 23, 49, 59, 15, 53, 19, 58, 42, 16 }, + { 20, 5, 59, 46, 25, 62, 7, 19, 43, 25, 37, 61, 11, 24, 4, 54, 12, 52, 3, 32, 17, 61, 12, 47, 15, 55, 18, 31, 53, 28, 9, 50, 21, 6, 55, 9, 58, 14, 54, 26, 33, 7, 31, 58, 13, 21, 8, 42, 29, 6, 37, 11, 48, 52, 14, 60, 11, 39, 56, 32, 14, 58, 7, 26, 17, 4, 42, 8, 11, 47, 19, 38, 10, 17, 26, 37, 9, 55, 28, 13, 18, 40, 6, 33, 1, 43, 25, 11, 51, 7, 62, 43, 18, 37, 3, 57, 45, 9, 38, 58, 5, 52, 27, 7, 17, 53, 5, 57, 37, 2, 63, 9, 22, 15, 11, 38, 25, 45, 35, 0, 28, 10, 41, 30, 50, 8, 31, 57 }, + { 49, 33, 16, 38, 1, 42, 51, 34, 53, 14, 28, 49, 30, 56, 36, 23, 43, 20, 38, 56, 22, 45, 28, 0, 62, 35, 26, 44, 11, 19, 52, 35, 44, 15, 30, 38, 10, 31, 40, 4, 46, 50, 20, 40, 27, 44, 51, 14, 56, 53, 19, 59, 7, 29, 41, 19, 35, 25, 8, 52, 22, 44, 13, 53, 50, 32, 61, 24, 56, 25, 63, 0, 45, 57, 33, 59, 16, 46, 4, 62, 50, 11, 60, 37, 52, 19, 55, 29, 37, 46, 13, 26, 48, 10, 50, 34, 21, 63, 26, 13, 42, 33, 22, 55, 35, 28, 43, 15, 24, 51, 27, 34, 46, 49, 58, 3, 52, 9, 57, 19, 48, 55, 3, 35, 12, 45, 24, 3 }, + { 41, 11, 56, 28, 18, 31, 22, 10, 37, 6, 47, 13, 3, 41, 9, 46, 0, 48, 29, 6, 34, 10, 55, 37, 20, 8, 49, 3, 41, 59, 14, 25, 0, 63, 19, 47, 27, 51, 17, 57, 23, 10, 61, 6, 54, 3, 38, 31, 0, 22, 34, 43, 20, 55, 31, 0, 49, 63, 29, 38, 3, 62, 28, 40, 0, 22, 14, 35, 2, 48, 15, 43, 23, 14, 3, 29, 49, 20, 39, 34, 0, 44, 29, 9, 15, 47, 5, 42, 0, 31, 58, 5, 31, 61, 23, 15, 0, 47, 19, 50, 24, 3, 59, 11, 44, 0, 31, 59, 6, 42, 17, 60, 0, 39, 20, 31, 43, 17, 29, 40, 12, 25, 60, 22, 52, 15, 63, 29 }, + { 20, 52, 8, 44, 62, 4, 59, 49, 17, 63, 21, 39, 60, 18, 52, 27, 33, 59, 14, 51, 59, 43, 24, 5, 51, 30, 57, 17, 32, 5, 37, 56, 48, 34, 42, 3, 60, 5, 36, 13, 43, 37, 18, 34, 25, 12, 59, 24, 47, 36, 11, 50, 3, 38, 9, 58, 16, 5, 43, 18, 47, 10, 37, 18, 59, 46, 29, 52, 40, 12, 34, 28, 56, 36, 53, 7, 43, 8, 24, 52, 26, 17, 56, 43, 24, 32, 63, 20, 57, 16, 22, 52, 36, 8, 41, 56, 29, 32, 54, 7, 35, 57, 14, 48, 20, 62, 13, 39, 53, 29, 8, 45, 13, 29, 7, 61, 14, 54, 6, 63, 38, 32, 18, 43, 2, 39, 6, 47 }, + { 0, 58, 23, 35, 13, 46, 12, 39, 0, 31, 55, 24, 5, 35, 15, 61, 17, 5, 39, 25, 18, 2, 50, 33, 41, 13, 39, 23, 62, 46, 29, 12, 22, 8, 56, 25, 20, 49, 32, 62, 0, 56, 11, 46, 63, 42, 9, 16, 55, 5, 60, 15, 62, 26, 45, 21, 36, 51, 13, 57, 31, 24, 55, 6, 35, 9, 57, 5, 20, 60, 7, 51, 5, 19, 40, 25, 61, 32, 56, 12, 36, 48, 21, 2, 58, 12, 39, 28, 9, 50, 40, 12, 44, 18, 25, 49, 6, 38, 11, 62, 18, 46, 30, 9, 40, 25, 49, 19, 10, 36, 55, 22, 33, 52, 41, 18, 37, 27, 49, 21, 2, 46, 7, 53, 33, 61, 27, 35 }, + { 41, 31, 5, 39, 51, 26, 33, 57, 27, 41, 9, 44, 54, 29, 48, 7, 44, 36, 57, 10, 31, 63, 16, 45, 11, 60, 1, 47, 7, 20, 43, 3, 58, 36, 13, 52, 39, 7, 15, 28, 22, 48, 30, 21, 1, 29, 49, 44, 27, 17, 40, 30, 24, 42, 12, 53, 33, 7, 47, 20, 1, 42, 11, 49, 25, 43, 17, 32, 45, 27, 41, 21, 31, 62, 11, 49, 2, 15, 42, 5, 63, 7, 41, 27, 49, 6, 54, 23, 46, 34, 2, 28, 54, 3, 59, 12, 46, 17, 42, 28, 40, 1, 37, 51, 5, 55, 2, 34, 47, 16, 3, 62, 47, 5, 23, 56, 1, 44, 12, 34, 51, 16, 57, 11, 25, 17, 54, 13 }, + { 60, 26, 55, 18, 3, 60, 20, 6, 52, 15, 50, 19, 32, 11, 23, 53, 26, 21, 1, 47, 42, 27, 8, 58, 21, 27, 53, 36, 26, 54, 31, 50, 17, 30, 45, 1, 29, 59, 44, 53, 41, 4, 35, 58, 51, 19, 32, 4, 52, 34, 48, 8, 51, 5, 56, 2, 25, 61, 27, 38, 54, 27, 62, 21, 51, 1, 39, 62, 10, 50, 1, 58, 13, 47, 38, 18, 35, 54, 22, 51, 30, 19, 59, 34, 14, 32, 44, 4, 60, 15, 52, 62, 20, 43, 30, 35, 21, 60, 4, 52, 12, 24, 61, 18, 30, 42, 23, 61, 25, 50, 27, 38, 11, 59, 12, 35, 50, 30, 59, 24, 8, 42, 28, 37, 48, 9, 44, 21 }, + { 10, 47, 15, 50, 30, 43, 8, 45, 29, 2, 36, 59, 1, 58, 41, 3, 63, 31, 54, 20, 13, 55, 35, 38, 4, 44, 15, 9, 61, 2, 14, 38, 61, 10, 23, 54, 18, 12, 24, 2, 14, 55, 16, 8, 38, 14, 41, 60, 10, 23, 1, 58, 32, 17, 28, 37, 41, 15, 3, 60, 15, 33, 4, 36, 16, 59, 28, 14, 23, 55, 37, 18, 44, 28, 2, 57, 30, 10, 27, 46, 14, 38, 3, 53, 21, 61, 17, 35, 10, 41, 26, 7, 33, 9, 57, 1, 53, 37, 26, 20, 56, 48, 9, 33, 58, 16, 37, 7, 45, 1, 57, 15, 32, 26, 42, 23, 7, 20, 4, 54, 31, 62, 22, 1, 59, 30, 4, 51 }, + { 36, 2, 38, 11, 24, 36, 54, 22, 62, 47, 25, 8, 28, 45, 16, 38, 12, 43, 9, 37, 49, 3, 23, 52, 18, 30, 50, 33, 19, 42, 49, 26, 6, 40, 47, 35, 63, 38, 50, 33, 60, 26, 36, 47, 24, 57, 6, 26, 39, 63, 19, 44, 14, 46, 61, 9, 50, 30, 45, 23, 10, 50, 44, 8, 31, 54, 6, 46, 36, 4, 30, 54, 8, 52, 22, 41, 4, 60, 40, 0, 58, 24, 45, 10, 37, 1, 48, 30, 56, 17, 38, 48, 24, 47, 19, 39, 14, 8, 45, 32, 2, 34, 27, 44, 4, 52, 11, 56, 31, 21, 40, 19, 44, 51, 2, 63, 46, 58, 36, 43, 14, 5, 50, 38, 14, 56, 40, 23 }, + { 61, 46, 32, 63, 54, 1, 14, 34, 12, 40, 18, 49, 37, 10, 61, 30, 51, 24, 60, 7, 29, 40, 62, 11, 46, 58, 6, 56, 24, 10, 34, 52, 21, 59, 16, 3, 27, 5, 20, 46, 9, 40, 7, 62, 2, 30, 53, 15, 48, 10, 28, 35, 54, 6, 21, 34, 18, 55, 7, 40, 57, 19, 26, 60, 41, 13, 24, 51, 19, 61, 9, 25, 34, 15, 63, 11, 45, 17, 20, 47, 33, 8, 31, 62, 43, 26, 53, 7, 24, 59, 0, 13, 55, 4, 62, 27, 51, 31, 63, 15, 58, 7, 54, 14, 46, 22, 28, 43, 12, 63, 8, 54, 5, 17, 39, 33, 15, 10, 27, 17, 47, 34, 19, 45, 27, 12, 33, 17 }, + { 5, 28, 21, 7, 17, 48, 42, 58, 23, 4, 63, 14, 55, 21, 34, 5, 19, 0, 45, 17, 52, 15, 25, 32, 0, 22, 40, 13, 45, 62, 18, 0, 43, 11, 33, 55, 30, 42, 57, 19, 51, 31, 22, 43, 18, 45, 34, 0, 43, 31, 56, 3, 23, 40, 59, 0, 44, 13, 48, 35, 2, 32, 46, 0, 21, 48, 35, 3, 40, 32, 43, 59, 0, 48, 33, 26, 53, 36, 55, 12, 51, 16, 55, 5, 18, 29, 11, 39, 51, 19, 45, 31, 42, 21, 35, 6, 22, 47, 10, 38, 23, 50, 20, 36, 0, 60, 38, 4, 50, 35, 48, 34, 24, 57, 9, 53, 28, 48, 61, 0, 56, 24, 53, 3, 63, 6, 42, 57 }, + { 13, 53, 45, 40, 58, 27, 6, 16, 38, 51, 33, 30, 43, 2, 47, 56, 40, 50, 33, 57, 27, 5, 47, 42, 60, 36, 16, 54, 28, 4, 37, 57, 28, 51, 22, 8, 45, 14, 6, 39, 0, 54, 11, 59, 28, 12, 50, 21, 61, 13, 19, 38, 49, 11, 25, 37, 58, 29, 22, 63, 14, 56, 12, 53, 30, 63, 9, 57, 26, 12, 47, 16, 23, 39, 50, 6, 31, 2, 25, 6, 28, 41, 36, 22, 50, 57, 42, 3, 34, 8, 28, 61, 11, 50, 16, 54, 41, 0, 55, 43, 5, 29, 41, 63, 25, 16, 53, 18, 26, 10, 21, 0, 61, 30, 41, 22, 3, 38, 20, 39, 29, 8, 41, 16, 36, 52, 22, 19 }, + { 55, 34, 0, 25, 10, 32, 56, 44, 28, 0, 57, 7, 26, 53, 23, 8, 13, 35, 22, 12, 36, 60, 20, 8, 14, 29, 48, 2, 41, 49, 23, 13, 39, 7, 48, 58, 25, 53, 34, 62, 28, 16, 48, 4, 37, 56, 27, 5, 36, 52, 46, 7, 62, 33, 52, 11, 17, 53, 5, 28, 41, 24, 38, 17, 5, 39, 20, 45, 15, 56, 5, 38, 60, 8, 14, 57, 21, 48, 62, 39, 59, 13, 1, 60, 9, 32, 16, 63, 44, 25, 52, 15, 36, 2, 60, 29, 12, 33, 25, 17, 59, 45, 13, 8, 49, 32, 6, 40, 59, 29, 45, 37, 13, 47, 6, 55, 30, 45, 9, 52, 13, 59, 25, 47, 32, 1, 49, 30 }, + { 9, 39, 14, 61, 49, 37, 3, 20, 50, 13, 41, 19, 46, 17, 38, 59, 28, 62, 4, 44, 54, 1, 34, 51, 55, 7, 63, 32, 21, 8, 56, 31, 62, 19, 36, 1, 41, 17, 24, 12, 42, 35, 25, 52, 20, 8, 44, 59, 25, 2, 22, 42, 16, 29, 4, 46, 20, 36, 43, 9, 51, 8, 49, 26, 58, 33, 54, 1, 37, 29, 52, 20, 27, 45, 19, 35, 42, 16, 10, 32, 20, 49, 46, 27, 40, 4, 47, 22, 13, 55, 4, 47, 26, 44, 23, 40, 58, 19, 48, 13, 31, 2, 57, 34, 42, 19, 61, 32, 14, 55, 5, 51, 26, 19, 58, 16, 49, 14, 62, 5, 33, 44, 21, 7, 60, 26, 11, 41 }, + { 62, 24, 47, 29, 8, 19, 53, 11, 60, 24, 32, 61, 4, 55, 31, 2, 49, 16, 39, 9, 31, 24, 43, 17, 26, 38, 11, 25, 58, 43, 12, 35, 3, 46, 15, 32, 63, 4, 49, 56, 2, 60, 10, 32, 63, 17, 39, 12, 55, 30, 57, 9, 48, 55, 39, 24, 60, 2, 58, 31, 19, 61, 34, 3, 42, 11, 22, 46, 7, 61, 10, 42, 3, 55, 32, 1, 58, 28, 44, 54, 4, 34, 23, 15, 56, 20, 37, 58, 6, 30, 38, 18, 63, 9, 32, 5, 51, 3, 62, 37, 52, 18, 39, 23, 3, 51, 9, 47, 1, 23, 43, 15, 60, 35, 11, 40, 1, 36, 31, 26, 57, 2, 37, 54, 18, 44, 58, 16 }, + { 5, 51, 3, 33, 43, 62, 21, 42, 35, 9, 48, 15, 36, 10, 22, 42, 20, 46, 26, 56, 50, 12, 59, 3, 48, 19, 45, 53, 1, 27, 47, 17, 52, 24, 56, 11, 51, 21, 37, 30, 20, 46, 14, 41, 1, 47, 33, 7, 41, 17, 35, 27, 20, 1, 14, 54, 26, 33, 18, 47, 1, 44, 14, 59, 16, 52, 28, 18, 49, 31, 25, 34, 63, 13, 51, 24, 9, 50, 3, 23, 38, 63, 7, 52, 29, 46, 11, 33, 50, 22, 57, 36, 1, 57, 49, 17, 39, 28, 9, 35, 6, 27, 53, 15, 55, 30, 24, 58, 36, 41, 11, 52, 32, 3, 44, 25, 62, 23, 51, 15, 42, 22, 50, 10, 39, 4, 31, 35 }, + { 46, 22, 57, 17, 12, 39, 26, 5, 31, 59, 1, 45, 27, 62, 52, 7, 58, 33, 6, 18, 39, 22, 33, 41, 57, 5, 35, 18, 40, 16, 60, 5, 29, 42, 7, 39, 27, 44, 9, 47, 8, 26, 54, 22, 51, 29, 24, 49, 15, 61, 4, 51, 31, 63, 43, 6, 50, 8, 39, 12, 53, 37, 23, 30, 40, 6, 62, 43, 14, 53, 2, 49, 7, 36, 17, 41, 61, 37, 18, 56, 11, 18, 44, 35, 2, 19, 61, 0, 41, 14, 8, 30, 43, 12, 24, 46, 14, 54, 42, 21, 44, 61, 10, 46, 37, 11, 44, 7, 18, 63, 20, 29, 7, 49, 28, 54, 8, 43, 4, 48, 18, 63, 12, 29, 48, 24, 59, 20 }, + { 13, 36, 28, 54, 35, 2, 56, 46, 16, 49, 22, 40, 11, 34, 14, 43, 29, 12, 63, 48, 2, 61, 7, 15, 28, 30, 50, 9, 61, 33, 38, 23, 54, 13, 61, 33, 3, 59, 16, 35, 58, 40, 5, 38, 13, 57, 3, 58, 37, 21, 45, 12, 39, 7, 35, 30, 13, 56, 22, 62, 27, 6, 55, 10, 48, 21, 33, 2, 38, 23, 40, 20, 44, 29, 59, 4, 26, 12, 33, 47, 28, 53, 31, 13, 59, 41, 27, 49, 26, 54, 45, 16, 53, 21, 35, 7, 59, 26, 11, 56, 1, 24, 33, 4, 28, 62, 21, 49, 31, 2, 56, 39, 24, 58, 13, 17, 37, 21, 56, 10, 38, 0, 34, 55, 15, 43, 1, 52 }, + { 42, 9, 50, 6, 25, 60, 14, 38, 10, 29, 53, 18, 57, 3, 25, 51, 0, 53, 25, 17, 29, 37, 52, 46, 0, 62, 14, 37, 4, 50, 10, 44, 0, 46, 20, 25, 50, 19, 55, 0, 23, 31, 62, 34, 11, 45, 19, 32, 0, 53, 10, 59, 23, 47, 18, 60, 42, 28, 37, 3, 50, 15, 35, 44, 0, 51, 27, 60, 9, 57, 16, 58, 11, 22, 46, 15, 53, 48, 7, 42, 0, 60, 5, 49, 24, 54, 9, 17, 39, 5, 34, 62, 3, 40, 60, 31, 0, 47, 29, 16, 49, 39, 59, 17, 50, 0, 40, 13, 53, 38, 16, 46, 0, 42, 34, 60, 2, 53, 29, 31, 58, 46, 27, 6, 61, 8, 37, 28 }, + { 0, 63, 21, 40, 45, 18, 51, 23, 63, 34, 6, 43, 28, 38, 55, 19, 40, 35, 8, 41, 54, 10, 21, 32, 39, 23, 53, 26, 55, 28, 22, 63, 30, 34, 9, 48, 6, 38, 29, 43, 49, 6, 18, 52, 27, 61, 9, 43, 28, 42, 33, 26, 56, 3, 51, 23, 0, 48, 16, 45, 32, 25, 63, 20, 57, 17, 42, 12, 35, 47, 5, 31, 39, 56, 6, 30, 34, 21, 61, 25, 14, 40, 22, 38, 15, 6, 36, 56, 20, 60, 25, 12, 51, 27, 10, 56, 42, 20, 36, 63, 32, 6, 21, 41, 12, 34, 60, 26, 5, 48, 27, 10, 62, 19, 6, 47, 39, 14, 45, 7, 24, 17, 41, 32, 23, 51, 19, 56 }, + { 45, 31, 15, 59, 4, 33, 7, 47, 0, 41, 13, 61, 4, 47, 9, 23, 60, 14, 57, 31, 4, 45, 59, 6, 58, 10, 44, 20, 8, 42, 15, 6, 55, 17, 58, 31, 53, 12, 61, 10, 15, 57, 43, 2, 23, 35, 48, 14, 54, 6, 18, 49, 15, 38, 11, 34, 62, 9, 21, 58, 11, 41, 4, 31, 38, 8, 29, 55, 19, 36, 27, 52, 0, 25, 50, 43, 1, 39, 8, 55, 35, 51, 10, 30, 45, 62, 29, 2, 46, 10, 32, 48, 18, 38, 5, 22, 33, 8, 51, 3, 14, 44, 54, 25, 57, 30, 18, 52, 33, 22, 59, 28, 36, 52, 32, 21, 26, 50, 5, 55, 35, 60, 14, 54, 4, 40, 16, 33 }, + { 27, 3, 49, 10, 30, 40, 55, 27, 57, 24, 52, 21, 32, 17, 60, 30, 5, 44, 27, 49, 19, 34, 13, 24, 43, 36, 3, 49, 31, 59, 37, 48, 26, 41, 2, 41, 14, 36, 21, 32, 40, 26, 13, 49, 55, 5, 16, 40, 25, 60, 36, 1, 63, 29, 17, 44, 25, 40, 52, 5, 29, 47, 54, 13, 46, 24, 60, 4, 51, 22, 63, 14, 45, 18, 12, 62, 17, 57, 19, 42, 3, 26, 58, 48, 1, 21, 40, 52, 23, 37, 44, 1, 29, 58, 43, 50, 15, 61, 19, 45, 58, 28, 7, 48, 2, 46, 8, 42, 3, 55, 8, 50, 12, 4, 55, 10, 63, 33, 20, 40, 11, 3, 46, 20, 48, 26, 61, 11 }, + { 44, 56, 24, 36, 53, 19, 12, 37, 16, 44, 7, 36, 49, 54, 11, 37, 48, 21, 15, 1, 62, 25, 47, 56, 16, 18, 51, 12, 40, 1, 24, 11, 52, 16, 23, 59, 28, 1, 45, 53, 4, 60, 37, 21, 39, 30, 63, 20, 52, 10, 30, 45, 8, 41, 54, 4, 57, 7, 34, 55, 36, 18, 23, 59, 2, 48, 11, 32, 44, 1, 41, 8, 33, 54, 38, 23, 30, 46, 6, 29, 62, 18, 32, 16, 55, 34, 14, 11, 61, 7, 55, 16, 53, 13, 23, 2, 55, 37, 26, 10, 33, 23, 36, 16, 38, 22, 56, 15, 24, 43, 35, 17, 44, 40, 25, 46, 16, 1, 57, 25, 49, 36, 28, 62, 9, 35, 7, 53 }, + { 17, 38, 8, 61, 1, 50, 26, 62, 3, 31, 56, 15, 1, 26, 40, 2, 34, 51, 56, 36, 42, 9, 38, 2, 29, 60, 32, 57, 19, 62, 34, 47, 4, 57, 39, 7, 44, 63, 24, 18, 46, 28, 8, 54, 1, 34, 7, 46, 3, 37, 50, 23, 57, 21, 13, 46, 31, 20, 43, 15, 1, 61, 8, 33, 37, 17, 56, 26, 15, 49, 24, 59, 28, 3, 56, 9, 52, 32, 13, 49, 10, 43, 5, 45, 8, 25, 59, 42, 28, 33, 19, 40, 8, 63, 35, 47, 25, 4, 40, 52, 1, 60, 12, 53, 63, 9, 29, 60, 37, 19, 1, 62, 31, 20, 58, 12, 41, 30, 43, 9, 18, 52, 22, 1, 39, 30, 58, 21 }, + { 13, 47, 29, 18, 43, 34, 5, 48, 20, 42, 10, 45, 30, 58, 20, 63, 24, 11, 6, 28, 54, 14, 22, 52, 41, 7, 26, 5, 45, 15, 53, 13, 35, 27, 18, 50, 12, 33, 5, 56, 10, 17, 45, 24, 59, 15, 50, 26, 56, 13, 19, 5, 32, 52, 27, 36, 2, 61, 12, 26, 49, 40, 27, 52, 13, 50, 6, 39, 61, 34, 10, 37, 48, 20, 41, 27, 2, 36, 59, 24, 54, 33, 63, 20, 38, 50, 3, 17, 52, 4, 58, 27, 45, 21, 32, 11, 48, 17, 57, 20, 46, 38, 25, 43, 4, 34, 51, 6, 13, 45, 57, 26, 6, 48, 2, 35, 53, 23, 61, 34, 59, 6, 42, 56, 13, 51, 2, 41 }, + { 32, 5, 55, 23, 58, 14, 22, 52, 29, 15, 61, 25, 51, 8, 43, 13, 53, 41, 46, 20, 3, 33, 63, 11, 48, 21, 54, 38, 28, 3, 30, 43, 21, 62, 9, 31, 55, 22, 51, 29, 37, 62, 32, 12, 42, 29, 41, 9, 33, 44, 62, 28, 43, 1, 59, 19, 48, 30, 51, 39, 24, 4, 58, 19, 42, 29, 22, 43, 3, 18, 53, 5, 13, 50, 16, 60, 45, 21, 7, 40, 15, 0, 26, 53, 13, 31, 43, 24, 47, 31, 15, 49, 2, 41, 6, 59, 29, 42, 9, 30, 14, 7, 49, 18, 31, 47, 20, 39, 49, 32, 11, 41, 54, 15, 61, 18, 7, 38, 4, 13, 44, 28, 15, 32, 45, 19, 27, 49 }, + { 63, 34, 11, 39, 2, 45, 37, 8, 59, 39, 33, 4, 36, 17, 48, 5, 29, 18, 32, 61, 39, 50, 5, 27, 35, 0, 46, 12, 22, 49, 60, 6, 54, 0, 38, 49, 2, 42, 15, 40, 0, 47, 20, 51, 3, 57, 18, 61, 22, 0, 39, 16, 55, 12, 35, 8, 41, 22, 6, 59, 16, 45, 10, 36, 0, 62, 9, 54, 30, 58, 21, 43, 63, 31, 7, 35, 12, 48, 58, 28, 47, 37, 41, 9, 57, 20, 61, 0, 36, 11, 57, 35, 23, 52, 37, 18, 0, 62, 22, 55, 35, 62, 27, 54, 0, 15, 61, 28, 2, 59, 22, 9, 37, 27, 33, 51, 29, 48, 19, 50, 25, 37, 10, 57, 5, 37, 60, 8 }, + { 20, 25, 46, 52, 31, 60, 12, 55, 0, 19, 11, 46, 62, 35, 23, 38, 57, 0, 55, 10, 16, 30, 58, 44, 17, 59, 29, 63, 42, 8, 36, 20, 33, 46, 16, 61, 25, 35, 8, 54, 26, 7, 58, 22, 34, 6, 47, 14, 53, 31, 48, 9, 37, 25, 49, 63, 16, 55, 45, 14, 34, 63, 21, 53, 25, 33, 46, 16, 35, 7, 46, 29, 0, 39, 25, 55, 22, 34, 18, 4, 56, 11, 23, 51, 28, 6, 39, 14, 62, 44, 19, 8, 60, 12, 56, 28, 50, 34, 39, 5, 51, 3, 41, 12, 57, 35, 10, 53, 25, 17, 52, 30, 47, 0, 43, 14, 5, 57, 31, 55, 0, 63, 47, 23, 54, 24, 14, 43 }, + { 0, 57, 16, 6, 26, 19, 35, 28, 49, 42, 54, 26, 21, 1, 59, 27, 9, 47, 26, 44, 50, 22, 13, 40, 8, 37, 10, 34, 17, 56, 25, 58, 13, 27, 44, 9, 20, 58, 31, 17, 60, 36, 10, 41, 53, 25, 36, 39, 4, 24, 58, 17, 60, 4, 22, 38, 10, 32, 0, 50, 31, 7, 28, 47, 12, 57, 5, 26, 52, 23, 14, 40, 57, 17, 47, 5, 53, 1, 44, 31, 19, 60, 46, 2, 35, 48, 30, 54, 22, 5, 51, 39, 25, 31, 4, 43, 14, 9, 45, 16, 24, 44, 19, 29, 40, 23, 44, 7, 38, 42, 4, 63, 12, 54, 23, 59, 22, 42, 8, 15, 40, 21, 8, 34, 3, 41, 30, 50 }, + { 39, 10, 48, 33, 41, 54, 5, 47, 23, 13, 32, 7, 52, 44, 14, 39, 58, 18, 35, 6, 37, 2, 60, 24, 55, 19, 53, 2, 51, 32, 1, 41, 51, 4, 40, 29, 47, 3, 52, 44, 13, 49, 28, 16, 1, 62, 11, 27, 52, 35, 5, 42, 29, 47, 14, 56, 28, 53, 26, 38, 9, 56, 40, 3, 38, 15, 41, 60, 1, 37, 50, 25, 11, 28, 61, 19, 42, 62, 10, 52, 39, 6, 32, 14, 58, 17, 7, 26, 42, 34, 27, 10, 54, 40, 20, 63, 26, 53, 21, 61, 32, 7, 59, 48, 3, 56, 18, 31, 58, 14, 49, 21, 36, 16, 45, 9, 36, 24, 62, 45, 27, 31, 53, 17, 49, 12, 62, 18 }, + { 28, 59, 21, 58, 2, 16, 38, 9, 62, 3, 56, 41, 10, 31, 50, 4, 32, 52, 12, 63, 23, 46, 33, 31, 4, 48, 25, 43, 14, 23, 47, 11, 22, 55, 14, 60, 23, 37, 11, 39, 23, 2, 45, 56, 31, 43, 19, 55, 16, 46, 21, 51, 11, 33, 44, 2, 41, 18, 5, 52, 23, 44, 17, 60, 27, 49, 11, 32, 44, 10, 54, 2, 56, 33, 8, 38, 13, 29, 36, 16, 24, 63, 27, 51, 21, 43, 56, 12, 49, 3, 59, 48, 1, 15, 46, 7, 36, 2, 47, 11, 50, 27, 37, 13, 33, 8, 51, 46, 1, 34, 28, 40, 3, 33, 60, 29, 47, 1, 35, 11, 59, 42, 2, 60, 26, 46, 6, 35 }, + { 4, 43, 9, 29, 36, 63, 24, 44, 20, 50, 30, 17, 60, 22, 16, 43, 25, 3, 42, 19, 51, 15, 8, 54, 42, 15, 61, 5, 39, 57, 18, 61, 31, 48, 34, 2, 50, 19, 57, 5, 63, 33, 19, 38, 13, 27, 48, 7, 32, 61, 2, 26, 58, 6, 24, 50, 13, 61, 42, 20, 62, 2, 35, 20, 51, 4, 62, 18, 23, 58, 20, 31, 43, 15, 51, 45, 26, 50, 4, 55, 45, 3, 35, 9, 38, 1, 32, 61, 20, 45, 17, 33, 24, 57, 29, 51, 22, 58, 38, 30, 15, 1, 54, 21, 63, 43, 26, 12, 24, 56, 8, 60, 50, 19, 5, 52, 13, 54, 17, 50, 4, 16, 36, 12, 32, 56, 22, 54 }, + { 51, 25, 40, 53, 12, 49, 15, 57, 34, 7, 38, 47, 2, 36, 55, 8, 61, 30, 56, 7, 28, 59, 48, 11, 27, 35, 21, 45, 28, 36, 9, 38, 6, 16, 24, 63, 10, 32, 28, 43, 21, 53, 5, 60, 8, 57, 3, 45, 11, 37, 15, 54, 40, 20, 62, 36, 27, 34, 11, 48, 30, 15, 54, 8, 30, 42, 22, 34, 48, 13, 35, 63, 4, 37, 22, 2, 59, 9, 41, 23, 13, 41, 49, 18, 59, 24, 40, 5, 37, 30, 9, 61, 44, 6, 37, 11, 33, 17, 5, 55, 41, 60, 23, 39, 17, 5, 30, 62, 41, 16, 46, 25, 11, 56, 39, 26, 20, 38, 29, 39, 22, 52, 44, 20, 48, 1, 38, 14 }, + { 15, 33, 2, 18, 44, 6, 27, 0, 32, 61, 25, 12, 58, 28, 40, 20, 47, 13, 34, 43, 38, 1, 23, 62, 40, 0, 51, 10, 63, 3, 52, 26, 44, 30, 45, 6, 41, 54, 0, 51, 12, 30, 46, 24, 49, 22, 40, 33, 63, 23, 43, 30, 9, 47, 0, 17, 54, 7, 57, 3, 37, 47, 24, 46, 13, 55, 7, 52, 2, 42, 6, 26, 49, 18, 60, 34, 16, 57, 33, 20, 61, 30, 8, 54, 14, 46, 12, 53, 16, 55, 38, 13, 22, 53, 18, 59, 46, 27, 43, 19, 32, 10, 45, 6, 49, 36, 52, 2, 20, 55, 6, 39, 32, 15, 44, 3, 58, 10, 63, 6, 56, 30, 7, 58, 9, 40, 19, 63 }, + { 10, 47, 61, 23, 55, 31, 52, 42, 17, 45, 4, 51, 27, 6, 15, 53, 0, 49, 26, 10, 56, 18, 36, 6, 20, 58, 32, 30, 13, 49, 19, 56, 0, 59, 12, 53, 27, 17, 38, 25, 48, 9, 15, 36, 14, 30, 59, 17, 0, 50, 8, 58, 18, 56, 31, 45, 21, 41, 29, 19, 60, 6, 32, 59, 0, 36, 29, 39, 19, 59, 46, 12, 55, 30, 10, 47, 24, 3, 28, 48, 0, 55, 44, 27, 33, 4, 63, 29, 49, 0, 26, 50, 34, 2, 42, 14, 0, 62, 9, 56, 3, 52, 28, 34, 58, 9, 20, 48, 37, 32, 22, 53, 0, 62, 27, 49, 34, 46, 21, 33, 41, 14, 25, 37, 53, 29, 31, 45 }, + { 56, 28, 7, 37, 11, 36, 20, 9, 54, 14, 39, 19, 34, 63, 45, 37, 24, 17, 60, 31, 21, 45, 53, 29, 47, 15, 7, 55, 40, 23, 34, 14, 42, 20, 37, 35, 15, 59, 7, 62, 34, 40, 59, 1, 51, 42, 10, 28, 54, 21, 35, 5, 38, 13, 36, 4, 59, 12, 39, 53, 15, 43, 9, 21, 39, 62, 16, 56, 25, 9, 32, 38, 0, 41, 14, 51, 40, 53, 43, 11, 37, 17, 5, 22, 57, 39, 19, 7, 42, 21, 60, 10, 31, 63, 25, 52, 30, 49, 36, 25, 48, 17, 61, 14, 22, 42, 29, 13, 60, 11, 47, 18, 35, 41, 7, 23, 4, 16, 51, 11, 0, 48, 61, 3, 17, 50, 5, 24 }, + { 0, 42, 21, 49, 60, 3, 57, 40, 29, 48, 23, 56, 42, 11, 22, 5, 59, 39, 4, 50, 3, 41, 12, 57, 25, 50, 44, 18, 4, 46, 7, 62, 33, 50, 4, 56, 21, 32, 43, 18, 3, 23, 55, 34, 20, 4, 53, 38, 12, 46, 29, 52, 25, 61, 23, 51, 26, 46, 1, 34, 25, 57, 28, 51, 26, 11, 50, 3, 44, 28, 53, 21, 57, 27, 62, 6, 31, 19, 8, 63, 26, 59, 36, 47, 15, 29, 50, 25, 35, 47, 18, 41, 4, 48, 8, 40, 12, 23, 6, 44, 13, 40, 1, 31, 55, 0, 61, 43, 4, 50, 26, 58, 9, 53, 24, 61, 42, 55, 31, 43, 57, 20, 34, 27, 43, 8, 59, 39 }, + { 18, 51, 30, 13, 26, 16, 46, 22, 2, 59, 8, 30, 1, 48, 33, 51, 29, 9, 46, 16, 62, 14, 33, 2, 38, 9, 27, 60, 37, 26, 53, 17, 28, 10, 24, 46, 2, 49, 8, 57, 29, 45, 6, 26, 62, 44, 18, 25, 61, 3, 42, 14, 49, 10, 43, 6, 17, 32, 63, 10, 49, 4, 40, 14, 45, 33, 22, 37, 12, 61, 5, 17, 43, 7, 23, 37, 15, 58, 49, 13, 39, 21, 10, 52, 1, 62, 9, 56, 12, 2, 58, 28, 36, 16, 56, 28, 56, 35, 20, 63, 24, 37, 51, 8, 45, 25, 16, 33, 27, 38, 2, 44, 13, 30, 17, 36, 12, 26, 5, 18, 28, 47, 13, 60, 23, 45, 13, 33 }, + { 55, 4, 62, 34, 52, 38, 7, 63, 32, 37, 13, 53, 25, 62, 18, 12, 55, 41, 27, 35, 24, 49, 31, 52, 17, 63, 34, 1, 56, 12, 41, 2, 48, 58, 39, 16, 61, 27, 41, 52, 13, 19, 50, 39, 11, 31, 57, 6, 32, 40, 20, 55, 1, 28, 33, 57, 48, 8, 37, 22, 44, 18, 53, 1, 61, 5, 54, 16, 47, 36, 50, 24, 55, 34, 48, 45, 1, 30, 33, 46, 2, 50, 32, 42, 25, 34, 43, 21, 38, 52, 23, 45, 14, 54, 21, 4, 44, 16, 53, 29, 10, 47, 19, 57, 12, 54, 39, 10, 51, 15, 63, 21, 57, 40, 51, 1, 48, 57, 37, 62, 2, 38, 9, 52, 1, 35, 58, 22 }, + { 36, 46, 10, 42, 1, 27, 43, 15, 50, 21, 45, 16, 41, 3, 35, 44, 20, 1, 57, 11, 55, 7, 43, 8, 22, 42, 13, 46, 21, 39, 31, 60, 22, 5, 29, 44, 11, 35, 20, 4, 36, 58, 32, 15, 47, 2, 36, 48, 16, 60, 8, 35, 44, 63, 16, 2, 40, 26, 55, 14, 58, 35, 24, 31, 19, 42, 31, 58, 1, 29, 10, 40, 2, 19, 12, 54, 22, 61, 7, 24, 56, 5, 28, 16, 54, 3, 15, 58, 6, 30, 8, 62, 1, 43, 31, 47, 7, 59, 1, 38, 58, 4, 34, 27, 38, 5, 31, 59, 7, 46, 30, 3, 34, 6, 28, 59, 20, 8, 32, 15, 53, 24, 55, 31, 19, 49, 11, 26 }, + { 2, 24, 16, 58, 19, 55, 5, 35, 10, 61, 4, 28, 57, 24, 58, 7, 31, 47, 22, 38, 19, 28, 61, 36, 54, 5, 59, 29, 6, 52, 15, 11, 43, 36, 8, 54, 52, 1, 62, 25, 47, 9, 1, 60, 28, 53, 24, 14, 46, 27, 51, 22, 12, 24, 38, 53, 20, 11, 51, 3, 29, 7, 48, 63, 8, 49, 9, 21, 52, 14, 63, 32, 46, 60, 35, 4, 41, 16, 52, 35, 18, 42, 59, 7, 36, 61, 45, 27, 33, 51, 19, 39, 34, 11, 61, 18, 33, 41, 28, 15, 54, 22, 42, 3, 49, 21, 47, 18, 36, 23, 55, 19, 48, 24, 45, 10, 33, 44, 50, 40, 7, 35, 15, 41, 63, 6, 40, 54 }, + { 62, 41, 32, 8, 47, 28, 60, 24, 44, 30, 38, 49, 9, 33, 14, 40, 50, 14, 60, 2, 54, 40, 0, 20, 25, 39, 16, 49, 24, 35, 57, 47, 19, 61, 33, 18, 23, 37, 13, 55, 31, 43, 22, 41, 17, 8, 42, 58, 0, 37, 5, 56, 31, 54, 7, 30, 60, 33, 42, 17, 59, 39, 12, 27, 38, 17, 35, 41, 27, 45, 20, 7, 25, 15, 29, 58, 27, 47, 11, 40, 14, 54, 23, 46, 19, 31, 11, 40, 13, 49, 5, 58, 24, 51, 26, 6, 50, 20, 49, 9, 32, 46, 17, 60, 14, 63, 24, 1, 57, 41, 9, 43, 14, 62, 16, 52, 3, 27, 14, 22, 61, 45, 4, 28, 9, 47, 29, 17 }, + { 5, 50, 12, 53, 38, 18, 11, 51, 0, 55, 17, 6, 47, 54, 19, 63, 5, 26, 34, 45, 13, 30, 47, 58, 10, 48, 32, 3, 62, 9, 26, 0, 25, 14, 50, 3, 47, 30, 42, 16, 6, 63, 12, 49, 33, 55, 21, 10, 34, 63, 18, 41, 3, 47, 19, 43, 0, 49, 8, 28, 46, 20, 52, 0, 56, 24, 60, 3, 59, 5, 39, 57, 48, 52, 9, 38, 3, 21, 26, 60, 0, 32, 12, 38, 4, 48, 53, 0, 60, 15, 29, 44, 18, 10, 38, 57, 13, 60, 2, 26, 62, 7, 50, 29, 35, 8, 40, 53, 28, 12, 60, 33, 38, 5, 37, 29, 60, 39, 56, 0, 30, 18, 50, 34, 59, 25, 14, 44 }, + { 20, 31, 60, 22, 3, 49, 33, 25, 40, 13, 34, 59, 22, 36, 0, 28, 37, 56, 8, 18, 51, 16, 4, 45, 27, 12, 53, 42, 18, 44, 51, 31, 55, 40, 28, 58, 7, 60, 10, 51, 27, 37, 24, 56, 5, 26, 44, 29, 50, 23, 45, 11, 34, 15, 59, 27, 13, 23, 62, 37, 4, 57, 15, 32, 42, 6, 47, 11, 30, 43, 23, 13, 0, 36, 18, 44, 63, 51, 37, 29, 49, 20, 57, 27, 62, 9, 24, 35, 23, 53, 37, 3, 42, 55, 0, 36, 23, 39, 31, 43, 17, 37, 24, 11, 52, 43, 19, 32, 5, 50, 26, 0, 56, 21, 54, 11, 19, 6, 47, 25, 59, 42, 12, 54, 21, 3, 38, 57 }, + { 48, 0, 35, 27, 44, 14, 59, 7, 57, 46, 26, 2, 42, 12, 52, 43, 10, 27, 53, 42, 32, 62, 37, 21, 34, 61, 7, 23, 36, 4, 38, 12, 41, 5, 17, 45, 22, 27, 39, 21, 59, 0, 45, 18, 39, 62, 3, 38, 14, 7, 54, 26, 61, 39, 9, 52, 45, 36, 18, 50, 10, 34, 44, 22, 50, 14, 36, 55, 17, 34, 53, 62, 33, 26, 56, 6, 31, 12, 6, 53, 9, 44, 2, 50, 20, 40, 55, 17, 47, 7, 26, 63, 22, 32, 48, 16, 46, 8, 52, 12, 57, 41, 0, 56, 25, 3, 61, 14, 45, 35, 18, 44, 12, 46, 23, 42, 32, 51, 35, 10, 17, 36, 23, 1, 45, 52, 32, 10 }, + { 37, 15, 43, 8, 63, 39, 21, 31, 16, 37, 19, 62, 30, 46, 17, 60, 21, 48, 1, 23, 6, 25, 11, 56, 1, 40, 30, 58, 15, 54, 21, 59, 9, 63, 35, 56, 11, 51, 2, 46, 34, 14, 53, 7, 30, 11, 51, 19, 60, 40, 30, 1, 24, 50, 20, 32, 3, 56, 5, 25, 31, 13, 61, 2, 29, 60, 25, 20, 51, 2, 27, 8, 18, 42, 10, 45, 21, 34, 43, 17, 62, 29, 41, 14, 34, 6, 30, 43, 2, 57, 33, 13, 45, 12, 27, 62, 4, 55, 21, 35, 5, 27, 45, 33, 16, 47, 30, 54, 22, 10, 51, 27, 63, 7, 49, 1, 58, 22, 15, 43, 53, 7, 57, 39, 27, 12, 61, 24 }, + { 56, 51, 26, 56, 19, 2, 41, 54, 5, 52, 9, 48, 6, 23, 39, 4, 32, 15, 63, 35, 59, 49, 43, 15, 52, 19, 50, 9, 46, 33, 1, 29, 48, 20, 32, 1, 38, 33, 19, 54, 9, 32, 24, 48, 58, 35, 16, 48, 4, 52, 13, 57, 33, 5, 45, 59, 15, 29, 41, 55, 47, 39, 23, 53, 9, 40, 4, 57, 10, 44, 48, 40, 50, 14, 61, 24, 55, 1, 59, 22, 33, 8, 51, 25, 58, 46, 11, 59, 20, 41, 17, 51, 6, 56, 35, 25, 42, 30, 15, 58, 48, 18, 61, 9, 58, 39, 13, 2, 37, 59, 40, 2, 31, 16, 34, 41, 8, 30, 62, 3, 29, 48, 33, 5, 63, 16, 41, 7 }, + { 22, 4, 46, 11, 33, 51, 29, 10, 62, 24, 43, 27, 15, 58, 50, 25, 54, 44, 9, 38, 18, 3, 29, 57, 32, 5, 26, 43, 17, 61, 24, 52, 8, 42, 23, 53, 15, 61, 7, 28, 57, 43, 4, 40, 20, 2, 43, 25, 32, 35, 21, 43, 17, 48, 10, 22, 38, 54, 11, 21, 1, 58, 16, 30, 48, 18, 46, 32, 38, 13, 22, 4, 59, 35, 2, 51, 30, 39, 15, 47, 4, 56, 13, 37, 1, 28, 16, 52, 32, 9, 61, 29, 38, 19, 3, 52, 10, 48, 1, 32, 11, 40, 20, 36, 6, 22, 49, 29, 55, 6, 20, 56, 36, 52, 19, 60, 26, 46, 18, 54, 40, 13, 20, 46, 35, 19, 49, 29 }, + { 61, 17, 34, 53, 23, 6, 48, 35, 20, 40, 1, 56, 36, 29, 11, 34, 7, 41, 14, 30, 55, 20, 46, 8, 24, 38, 63, 2, 37, 10, 45, 14, 34, 49, 6, 13, 44, 25, 49, 41, 21, 12, 61, 15, 54, 29, 63, 12, 56, 8, 49, 2, 62, 36, 28, 61, 0, 25, 41, 63, 35, 8, 44, 6, 37, 62, 7, 21, 63, 28, 55, 31, 16, 24, 41, 19, 9, 57, 27, 36, 18, 42, 31, 62, 22, 55, 38, 4, 27, 47, 1, 40, 14, 54, 43, 20, 60, 23, 38, 63, 25, 51, 2, 53, 26, 63, 10, 42, 17, 34, 47, 25, 13, 5, 44, 11, 55, 2, 38, 27, 6, 60, 52, 25, 9, 55, 1, 40 }, + { 8, 30, 58, 3, 42, 61, 17, 38, 13, 59, 32, 10, 54, 3, 51, 20, 61, 26, 57, 2, 46, 33, 12, 60, 41, 13, 48, 29, 55, 20, 39, 27, 57, 18, 62, 29, 55, 2, 31, 16, 37, 50, 26, 36, 6, 46, 9, 41, 27, 57, 23, 39, 26, 6, 51, 12, 31, 46, 7, 16, 27, 52, 19, 56, 26, 12, 33, 53, 1, 41, 8, 57, 46, 7, 54, 32, 47, 5, 49, 11, 60, 23, 5, 48, 10, 43, 19, 63, 35, 24, 49, 21, 59, 5, 31, 37, 14, 44, 7, 42, 6, 30, 46, 13, 44, 32, 19, 50, 4, 58, 8, 30, 62, 38, 28, 53, 21, 36, 13, 50, 21, 33, 15, 2, 44, 31, 14, 47 }, + { 37, 13, 39, 16, 28, 9, 57, 0, 25, 49, 21, 45, 18, 47, 12, 42, 0, 49, 22, 39, 16, 53, 25, 36, 0, 52, 22, 16, 6, 60, 4, 51, 0, 26, 37, 47, 10, 36, 63, 5, 57, 0, 18, 59, 23, 33, 51, 19, 0, 44, 15, 11, 54, 17, 42, 35, 53, 18, 58, 33, 49, 4, 34, 42, 0, 50, 43, 25, 16, 49, 34, 20, 37, 28, 12, 63, 16, 38, 25, 44, 0, 40, 52, 17, 35, 3, 50, 14, 8, 53, 11, 36, 25, 45, 9, 62, 0, 54, 28, 17, 50, 55, 15, 24, 57, 0, 53, 34, 23, 41, 15, 45, 0, 49, 16, 4, 48, 9, 63, 45, 0, 42, 58, 37, 61, 22, 54, 26 }, + { 0, 50, 21, 47, 54, 36, 27, 45, 52, 4, 34, 15, 63, 29, 37, 59, 17, 31, 6, 61, 28, 5, 48, 18, 59, 27, 34, 56, 44, 31, 35, 12, 41, 59, 16, 3, 40, 20, 50, 22, 30, 40, 52, 10, 45, 3, 59, 22, 37, 61, 29, 46, 31, 58, 2, 22, 9, 43, 3, 39, 14, 61, 24, 54, 15, 29, 11, 60, 39, 17, 5, 61, 0, 44, 50, 3, 31, 14, 58, 21, 54, 28, 15, 45, 60, 26, 33, 58, 44, 22, 60, 2, 57, 34, 49, 27, 18, 34, 21, 59, 29, 4, 36, 41, 8, 39, 28, 11, 62, 26, 53, 20, 35, 24, 59, 32, 29, 39, 24, 31, 57, 23, 11, 28, 5, 36, 11, 59 }, + { 44, 32, 63, 5, 20, 12, 41, 7, 30, 61, 42, 8, 39, 5, 33, 8, 24, 53, 45, 11, 37, 58, 7, 44, 10, 50, 3, 40, 8, 22, 53, 19, 46, 9, 33, 52, 24, 58, 8, 44, 13, 47, 8, 34, 38, 30, 14, 47, 7, 34, 4, 55, 9, 19, 40, 49, 56, 26, 60, 21, 30, 45, 10, 19, 40, 58, 23, 36, 3, 52, 45, 23, 54, 13, 22, 42, 53, 45, 7, 33, 10, 36, 57, 6, 29, 12, 41, 0, 30, 15, 41, 30, 17, 7, 16, 53, 40, 56, 2, 39, 12, 61, 10, 52, 31, 60, 16, 45, 1, 37, 7, 61, 40, 10, 43, 17, 58, 7, 54, 14, 4, 51, 39, 49, 18, 56, 42, 20 }, + { 14, 6, 24, 36, 56, 49, 22, 60, 18, 14, 23, 51, 26, 57, 21, 52, 41, 14, 35, 50, 19, 31, 40, 23, 33, 14, 63, 17, 32, 47, 7, 62, 23, 30, 56, 11, 42, 27, 14, 60, 35, 19, 28, 61, 17, 55, 25, 39, 53, 17, 42, 21, 38, 63, 25, 5, 14, 36, 12, 50, 1, 37, 59, 32, 2, 51, 6, 56, 27, 32, 11, 30, 38, 26, 60, 8, 26, 19, 62, 39, 50, 2, 21, 39, 53, 23, 56, 19, 49, 39, 5, 46, 55, 23, 42, 4, 31, 11, 47, 26, 45, 22, 48, 18, 21, 5, 48, 25, 57, 14, 47, 30, 3, 56, 12, 50, 1, 42, 19, 47, 35, 17, 8, 30, 45, 25, 4, 51 }, + { 28, 58, 43, 1, 31, 8, 33, 2, 44, 55, 32, 1, 60, 12, 46, 27, 4, 62, 23, 1, 56, 13, 62, 2, 54, 36, 25, 51, 1, 57, 26, 42, 3, 49, 17, 38, 1, 48, 31, 4, 54, 3, 50, 24, 1, 49, 5, 63, 13, 27, 52, 1, 48, 13, 45, 33, 52, 30, 46, 20, 55, 28, 6, 48, 24, 38, 20, 47, 14, 62, 48, 9, 58, 4, 36, 30, 56, 1, 34, 12, 18, 63, 25, 48, 4, 16, 37, 7, 62, 10, 52, 28, 13, 50, 36, 63, 24, 51, 15, 58, 8, 33, 1, 38, 56, 35, 42, 9, 33, 51, 22, 18, 48, 32, 27, 37, 23, 61, 33, 11, 59, 29, 62, 1, 53, 10, 60, 33 }, + { 12, 39, 17, 52, 26, 46, 53, 38, 25, 11, 48, 36, 16, 43, 2, 35, 55, 17, 39, 29, 43, 9, 28, 45, 20, 5, 46, 12, 42, 28, 13, 52, 36, 6, 60, 22, 54, 17, 62, 39, 25, 42, 15, 55, 44, 20, 31, 10, 35, 57, 24, 32, 29, 6, 59, 18, 7, 62, 3, 41, 10, 44, 16, 54, 13, 62, 31, 9, 41, 1, 21, 43, 18, 47, 15, 40, 11, 49, 28, 55, 46, 30, 8, 43, 32, 61, 28, 47, 25, 34, 21, 61, 32, 1, 20, 9, 46, 6, 35, 19, 41, 54, 27, 63, 14, 3, 51, 20, 62, 2, 38, 55, 8, 21, 63, 6, 46, 9, 26, 51, 3, 24, 43, 34, 16, 41, 18, 48 }, + { 62, 23, 55, 9, 15, 62, 19, 13, 58, 40, 6, 30, 54, 19, 50, 31, 10, 44, 6, 59, 21, 47, 51, 15, 60, 39, 30, 54, 21, 61, 19, 33, 14, 29, 43, 11, 34, 45, 7, 21, 10, 56, 36, 6, 38, 11, 58, 42, 2, 47, 11, 60, 50, 16, 41, 28, 38, 23, 47, 17, 35, 63, 22, 33, 42, 5, 45, 17, 53, 35, 25, 56, 33, 6, 51, 19, 60, 23, 43, 15, 5, 40, 58, 13, 51, 1, 45, 11, 54, 3, 43, 8, 37, 48, 59, 29, 39, 21, 61, 43, 3, 31, 10, 44, 24, 29, 60, 12, 28, 40, 11, 25, 43, 52, 14, 41, 16, 57, 44, 20, 40, 55, 12, 21, 57, 27, 35, 2 }, + { 37, 6, 31, 42, 40, 4, 29, 50, 0, 20, 63, 28, 9, 58, 14, 24, 63, 26, 48, 16, 34, 4, 32, 38, 23, 11, 58, 4, 37, 9, 45, 5, 63, 48, 26, 57, 2, 28, 32, 51, 46, 29, 13, 62, 27, 46, 28, 18, 50, 15, 40, 4, 19, 34, 54, 0, 53, 9, 26, 58, 28, 5, 49, 0, 57, 27, 19, 60, 29, 8, 59, 12, 37, 63, 24, 46, 3, 37, 6, 52, 26, 32, 20, 36, 9, 22, 59, 18, 35, 51, 14, 57, 17, 24, 12, 44, 56, 0, 30, 13, 59, 20, 49, 17, 54, 43, 6, 34, 46, 17, 58, 36, 0, 34, 29, 54, 25, 2, 36, 15, 60, 6, 37, 46, 4, 50, 9, 45 }, + { 19, 59, 48, 3, 24, 60, 44, 22, 34, 51, 15, 45, 41, 5, 33, 47, 0, 37, 12, 55, 25, 54, 8, 57, 0, 47, 18, 34, 49, 15, 55, 24, 40, 20, 8, 35, 53, 13, 41, 18, 0, 59, 22, 33, 4, 52, 8, 60, 24, 36, 31, 56, 45, 26, 10, 43, 15, 56, 36, 4, 51, 14, 39, 30, 12, 55, 36, 2, 39, 49, 4, 44, 17, 0, 32, 13, 53, 35, 59, 17, 62, 0, 55, 24, 52, 38, 31, 6, 42, 19, 29, 40, 4, 54, 33, 5, 16, 27, 52, 37, 23, 55, 7, 37, 0, 39, 23, 49, 4, 53, 31, 15, 59, 10, 50, 4, 60, 34, 48, 7, 31, 49, 27, 14, 62, 22, 53, 29 }, + { 46, 21, 14, 51, 36, 17, 7, 57, 10, 32, 3, 37, 22, 60, 39, 18, 56, 20, 42, 3, 36, 10, 44, 26, 41, 29, 53, 27, 2, 39, 30, 52, 0, 59, 15, 48, 23, 61, 6, 58, 37, 12, 40, 49, 16, 39, 20, 44, 0, 62, 8, 21, 3, 59, 23, 32, 49, 31, 12, 44, 22, 59, 18, 50, 24, 7, 43, 52, 15, 23, 41, 26, 51, 28, 55, 39, 21, 27, 10, 42, 12, 45, 27, 47, 3, 15, 63, 26, 55, 0, 60, 26, 45, 18, 62, 38, 58, 49, 8, 47, 4, 33, 46, 29, 57, 13, 56, 16, 59, 21, 5, 47, 23, 39, 18, 44, 13, 22, 28, 53, 19, 0, 58, 32, 41, 7, 26, 13 }, + { 0, 56, 34, 28, 11, 55, 31, 47, 26, 41, 56, 13, 53, 28, 11, 49, 7, 52, 32, 61, 50, 22, 63, 17, 13, 56, 7, 19, 43, 62, 10, 21, 37, 32, 43, 4, 38, 19, 44, 25, 31, 54, 5, 23, 61, 30, 53, 12, 35, 22, 43, 53, 37, 48, 7, 62, 20, 2, 61, 41, 8, 34, 47, 9, 63, 34, 28, 10, 55, 33, 14, 57, 7, 47, 9, 61, 4, 49, 31, 50, 21, 38, 8, 16, 57, 44, 33, 5, 49, 36, 12, 50, 7, 34, 10, 25, 2, 22, 36, 15, 26, 61, 18, 9, 22, 46, 32, 8, 27, 37, 44, 30, 55, 3, 62, 24, 38, 56, 5, 45, 38, 24, 43, 10, 19, 54, 39, 61 }, + { 41, 30, 8, 63, 43, 23, 38, 3, 62, 19, 8, 49, 25, 1, 58, 30, 23, 40, 9, 28, 18, 40, 6, 38, 49, 22, 35, 59, 8, 27, 50, 5, 56, 17, 11, 50, 30, 9, 55, 2, 51, 19, 34, 47, 9, 41, 6, 26, 48, 57, 14, 28, 17, 12, 39, 13, 37, 46, 25, 19, 54, 27, 1, 37, 16, 45, 20, 60, 1, 48, 20, 38, 31, 22, 42, 15, 19, 44, 1, 61, 6, 34, 56, 40, 29, 10, 20, 46, 13, 22, 41, 23, 59, 42, 30, 51, 45, 13, 63, 53, 42, 12, 51, 38, 62, 2, 26, 41, 50, 1, 61, 10, 19, 42, 31, 8, 49, 32, 12, 63, 9, 52, 16, 56, 36, 2, 31, 16 }, + { 52, 5, 47, 20, 1, 53, 12, 50, 16, 35, 43, 21, 33, 43, 16, 44, 3, 59, 14, 46, 1, 30, 60, 33, 2, 45, 12, 42, 31, 47, 14, 33, 46, 25, 55, 27, 60, 36, 16, 42, 14, 46, 26, 1, 55, 15, 63, 32, 2, 38, 5, 47, 33, 61, 30, 52, 4, 57, 6, 38, 11, 43, 61, 24, 52, 3, 31, 22, 42, 10, 62, 3, 59, 11, 35, 57, 33, 54, 24, 14, 29, 48, 18, 2, 60, 41, 53, 24, 32, 62, 3, 53, 15, 1, 55, 17, 32, 40, 6, 31, 1, 40, 28, 5, 35, 52, 19, 63, 13, 33, 17, 41, 52, 26, 15, 57, 1, 20, 42, 17, 35, 27, 48, 5, 25, 50, 44, 11 }, + { 35, 25, 38, 57, 33, 17, 40, 6, 59, 27, 54, 5, 61, 10, 52, 26, 36, 19, 51, 35, 57, 48, 11, 20, 54, 25, 61, 16, 1, 58, 24, 61, 3, 39, 7, 47, 1, 22, 49, 28, 63, 10, 58, 32, 17, 36, 45, 19, 51, 29, 59, 10, 50, 1, 23, 42, 18, 29, 51, 21, 56, 32, 14, 5, 40, 58, 47, 13, 54, 35, 29, 45, 18, 52, 26, 2, 38, 8, 46, 36, 58, 11, 52, 35, 17, 28, 1, 58, 9, 39, 17, 28, 37, 48, 20, 9, 57, 24, 50, 19, 58, 16, 48, 25, 43, 11, 35, 6, 45, 24, 56, 4, 36, 7, 47, 35, 52, 28, 59, 30, 2, 61, 21, 33, 63, 12, 18, 59 }, + { 3, 49, 15, 10, 27, 61, 25, 45, 30, 0, 14, 47, 31, 38, 17, 62, 7, 55, 27, 4, 15, 24, 42, 52, 10, 34, 5, 51, 36, 18, 41, 11, 35, 21, 62, 13, 33, 57, 8, 35, 5, 40, 21, 43, 52, 3, 24, 56, 11, 16, 33, 25, 41, 20, 55, 8, 60, 35, 15, 48, 2, 57, 30, 49, 18, 25, 6, 39, 17, 57, 7, 25, 43, 5, 49, 16, 62, 22, 55, 4, 25, 43, 23, 7, 50, 11, 37, 48, 14, 51, 33, 57, 7, 27, 39, 46, 4, 29, 11, 43, 34, 56, 7, 60, 20, 54, 30, 57, 22, 49, 9, 33, 54, 14, 63, 23, 6, 43, 10, 40, 50, 13, 44, 8, 38, 33, 46, 23 }, + { 55, 39, 22, 50, 44, 4, 36, 9, 52, 23, 37, 59, 21, 2, 46, 13, 31, 41, 11, 45, 62, 29, 6, 37, 19, 48, 30, 23, 44, 7, 53, 28, 54, 16, 41, 29, 44, 18, 52, 24, 60, 15, 48, 7, 27, 59, 9, 34, 42, 54, 7, 63, 4, 46, 31, 27, 45, 0, 40, 26, 34, 17, 37, 10, 53, 29, 36, 50, 2, 27, 51, 11, 61, 37, 23, 41, 30, 7, 18, 50, 39, 14, 63, 32, 45, 61, 19, 30, 25, 44, 2, 47, 23, 63, 11, 34, 59, 37, 60, 3, 22, 14, 44, 30, 15, 0, 47, 15, 3, 38, 61, 20, 27, 45, 11, 39, 51, 16, 55, 3, 22, 54, 29, 58, 1, 57, 6, 29 }, + { 9, 17, 60, 2, 34, 56, 20, 62, 39, 12, 49, 6, 29, 56, 34, 48, 0, 58, 22, 38, 18, 43, 56, 0, 63, 14, 55, 3, 59, 31, 15, 45, 0, 49, 6, 58, 3, 38, 12, 45, 0, 37, 29, 57, 13, 39, 30, 49, 0, 23, 44, 36, 16, 57, 13, 54, 11, 24, 63, 9, 53, 7, 62, 42, 0, 59, 15, 23, 63, 34, 40, 16, 32, 0, 53, 12, 48, 28, 59, 33, 0, 53, 9, 27, 3, 22, 54, 5, 56, 9, 61, 13, 42, 14, 52, 19, 0, 21, 47, 27, 53, 36, 3, 50, 39, 58, 25, 40, 53, 28, 12, 50, 0, 59, 32, 2, 21, 34, 26, 46, 37, 7, 18, 47, 24, 14, 53, 42 }, + { 61, 32, 13, 54, 29, 7, 46, 13, 28, 57, 18, 41, 53, 15, 9, 39, 24, 49, 33, 3, 53, 9, 26, 32, 40, 28, 46, 39, 25, 9, 56, 21, 63, 37, 26, 22, 51, 27, 17, 56, 31, 53, 4, 43, 22, 46, 12, 18, 60, 40, 20, 26, 50, 21, 39, 5, 49, 33, 16, 44, 22, 46, 20, 32, 24, 45, 8, 43, 12, 46, 4, 48, 56, 20, 29, 58, 3, 40, 10, 42, 31, 21, 47, 41, 56, 38, 15, 42, 36, 27, 20, 33, 55, 3, 26, 44, 31, 54, 12, 35, 9, 63, 28, 10, 21, 32, 9, 60, 17, 8, 43, 29, 40, 16, 36, 48, 60, 7, 57, 14, 62, 31, 42, 15, 36, 40, 20, 26 }, + { 0, 37, 47, 23, 41, 18, 32, 48, 1, 35, 8, 25, 4, 26, 63, 20, 54, 8, 16, 61, 35, 23, 51, 15, 58, 7, 12, 20, 50, 34, 42, 4, 38, 10, 32, 47, 8, 60, 41, 20, 9, 25, 50, 19, 62, 1, 37, 56, 28, 8, 53, 11, 3, 58, 34, 43, 19, 60, 38, 4, 58, 31, 3, 51, 11, 55, 38, 30, 21, 58, 19, 26, 9, 44, 36, 13, 46, 20, 62, 24, 13, 60, 5, 28, 12, 34, 7, 59, 0, 53, 45, 6, 38, 30, 50, 7, 62, 16, 41, 5, 46, 18, 55, 42, 51, 5, 45, 23, 34, 48, 19, 58, 5, 25, 54, 19, 13, 41, 28, 21, 0, 49, 10, 60, 4, 51, 9, 45 }, + { 19, 28, 6, 58, 10, 51, 4, 22, 55, 42, 60, 45, 34, 51, 42, 5, 30, 45, 27, 40, 13, 47, 4, 49, 21, 38, 60, 29, 2, 57, 17, 27, 52, 19, 61, 14, 30, 34, 2, 44, 63, 33, 11, 35, 16, 51, 25, 6, 14, 47, 31, 61, 37, 29, 18, 8, 52, 2, 28, 54, 13, 41, 15, 62, 35, 18, 2, 60, 6, 33, 41, 61, 31, 6, 56, 17, 34, 50, 6, 52, 44, 35, 16, 51, 59, 24, 48, 18, 31, 40, 16, 49, 21, 60, 17, 39, 10, 49, 32, 57, 24, 39, 1, 25, 18, 62, 37, 12, 56, 1, 37, 11, 52, 44, 9, 30, 47, 4, 51, 40, 55, 25, 34, 27, 56, 30, 32, 54 }, + { 63, 40, 49, 15, 43, 26, 63, 38, 16, 20, 30, 12, 57, 14, 19, 60, 36, 12, 59, 2, 57, 17, 42, 31, 1, 44, 16, 35, 47, 11, 32, 48, 13, 43, 1, 39, 51, 12, 57, 23, 6, 40, 53, 3, 55, 31, 39, 60, 35, 44, 5, 15, 45, 1, 62, 41, 26, 14, 47, 22, 36, 27, 50, 9, 26, 47, 52, 28, 54, 16, 1, 13, 51, 39, 23, 63, 1, 30, 15, 26, 2, 57, 19, 37, 1, 44, 21, 50, 13, 63, 8, 24, 56, 1, 35, 25, 58, 20, 2, 28, 14, 51, 33, 59, 13, 30, 4, 49, 31, 24, 63, 26, 33, 3, 58, 38, 62, 24, 32, 8, 17, 45, 5, 48, 18, 3, 43, 11 }, + { 21, 4, 24, 34, 59, 1, 37, 11, 53, 5, 47, 2, 22, 40, 32, 1, 24, 50, 21, 29, 38, 25, 63, 8, 55, 24, 53, 6, 62, 23, 59, 3, 54, 20, 58, 24, 5, 46, 15, 38, 48, 14, 27, 42, 23, 7, 46, 10, 17, 58, 25, 52, 23, 32, 49, 12, 55, 30, 40, 7, 59, 1, 56, 21, 39, 4, 23, 15, 37, 46, 55, 42, 21, 4, 48, 8, 45, 54, 37, 55, 32, 8, 46, 10, 30, 54, 4, 41, 25, 29, 36, 48, 11, 43, 14, 47, 5, 43, 53, 36, 61, 10, 45, 6, 41, 54, 27, 43, 16, 55, 6, 46, 18, 42, 23, 15, 1, 45, 12, 60, 37, 22, 62, 12, 39, 59, 16, 52 }, + { 47, 35, 56, 7, 19, 46, 31, 50, 33, 24, 61, 35, 50, 7, 53, 44, 55, 6, 46, 10, 52, 5, 21, 43, 36, 10, 18, 41, 26, 37, 8, 29, 40, 36, 9, 49, 34, 26, 61, 21, 7, 59, 18, 62, 29, 54, 20, 32, 51, 0, 40, 10, 55, 6, 20, 36, 9, 61, 5, 51, 44, 19, 33, 43, 13, 57, 40, 63, 8, 24, 29, 10, 60, 34, 27, 40, 25, 18, 10, 42, 21, 49, 26, 62, 38, 12, 33, 61, 5, 57, 2, 19, 54, 28, 62, 22, 38, 31, 16, 7, 22, 47, 29, 17, 35, 8, 20, 51, 2, 40, 22, 50, 13, 61, 28, 53, 35, 20, 56, 30, 2, 53, 14, 41, 23, 34, 8, 31 }, + { 12, 2, 42, 29, 52, 13, 21, 8, 55, 14, 41, 17, 28, 58, 23, 11, 17, 36, 31, 62, 17, 34, 50, 14, 28, 61, 33, 52, 2, 51, 17, 45, 7, 25, 62, 30, 18, 55, 0, 42, 30, 35, 45, 1, 12, 48, 3, 63, 21, 36, 30, 48, 19, 59, 43, 27, 46, 17, 34, 25, 12, 29, 53, 6, 48, 31, 11, 34, 49, 3, 36, 50, 19, 47, 14, 61, 11, 36, 58, 4, 60, 14, 39, 22, 6, 52, 15, 35, 17, 46, 31, 42, 9, 34, 3, 52, 12, 60, 26, 56, 40, 2, 53, 23, 57, 38, 62, 14, 36, 59, 10, 31, 39, 6, 49, 9, 41, 26, 5, 48, 43, 27, 33, 58, 1, 50, 25, 57 }, + { 61, 37, 15, 61, 3, 39, 58, 43, 26, 0, 44, 10, 47, 3, 37, 63, 28, 43, 13, 39, 3, 57, 30, 59, 0, 48, 5, 43, 13, 22, 60, 33, 55, 15, 42, 4, 52, 10, 45, 13, 54, 4, 24, 49, 37, 26, 41, 14, 42, 9, 61, 13, 38, 23, 3, 53, 0, 58, 21, 42, 63, 10, 17, 61, 25, 0, 58, 28, 17, 44, 57, 12, 27, 0, 55, 5, 52, 28, 23, 47, 29, 0, 43, 17, 58, 28, 47, 23, 55, 10, 58, 23, 51, 40, 18, 33, 45, 0, 49, 8, 32, 61, 19, 48, 0, 26, 7, 47, 29, 18, 44, 0, 56, 34, 20, 59, 15, 51, 37, 18, 10, 52, 7, 20, 46, 9, 38, 17 }, + { 6, 27, 48, 23, 45, 29, 5, 18, 38, 62, 27, 56, 20, 32, 15, 9, 48, 0, 54, 22, 45, 20, 7, 41, 23, 39, 19, 27, 58, 31, 44, 0, 12, 50, 23, 56, 20, 39, 32, 59, 16, 52, 33, 9, 57, 22, 6, 58, 28, 50, 24, 2, 56, 35, 16, 45, 32, 38, 15, 54, 2, 38, 46, 22, 35, 45, 20, 5, 52, 25, 7, 35, 59, 32, 22, 43, 38, 3, 51, 16, 34, 53, 32, 50, 3, 40, 8, 43, 0, 39, 27, 4, 14, 61, 8, 55, 15, 41, 20, 44, 27, 13, 39, 11, 46, 42, 54, 33, 4, 52, 23, 61, 14, 25, 43, 2, 33, 11, 63, 29, 61, 17, 40, 55, 22, 62, 28, 44 }, + { 20, 54, 8, 56, 35, 10, 63, 31, 52, 12, 48, 6, 59, 41, 52, 33, 19, 58, 25, 49, 11, 37, 47, 12, 54, 15, 56, 35, 7, 47, 16, 53, 28, 34, 5, 37, 28, 8, 48, 3, 28, 38, 18, 61, 16, 43, 53, 32, 4, 17, 47, 27, 44, 8, 63, 10, 25, 49, 6, 37, 24, 52, 32, 3, 50, 12, 41, 56, 38, 14, 62, 20, 40, 16, 53, 31, 18, 63, 41, 9, 59, 7, 13, 25, 57, 20, 63, 26, 53, 18, 48, 62, 30, 46, 21, 25, 58, 29, 36, 4, 55, 34, 6, 60, 31, 16, 21, 12, 58, 38, 9, 29, 47, 7, 52, 30, 57, 44, 22, 0, 35, 45, 3, 31, 14, 36, 0, 51 }, + { 42, 14, 33, 24, 16, 49, 40, 2, 22, 33, 16, 36, 25, 1, 21, 61, 38, 8, 33, 4, 62, 26, 29, 60, 6, 46, 30, 11, 63, 4, 36, 40, 19, 57, 46, 11, 41, 63, 22, 25, 58, 10, 46, 2, 34, 27, 11, 38, 56, 34, 12, 53, 18, 33, 41, 51, 13, 28, 60, 20, 47, 14, 29, 59, 16, 62, 8, 22, 32, 47, 9, 49, 2, 44, 7, 12, 45, 6, 20, 27, 45, 24, 62, 42, 36, 11, 33, 15, 37, 7, 32, 10, 37, 1, 35, 50, 6, 11, 63, 24, 52, 15, 50, 24, 3, 37, 56, 27, 34, 22, 49, 16, 36, 62, 17, 39, 4, 15, 54, 24, 50, 8, 58, 26, 49, 54, 11, 30 }, + { 4, 59, 41, 1, 53, 12, 25, 45, 59, 7, 51, 39, 54, 14, 46, 4, 27, 53, 16, 44, 18, 51, 1, 32, 25, 2, 50, 40, 20, 54, 24, 9, 62, 2, 27, 60, 1, 17, 36, 50, 6, 40, 30, 55, 41, 19, 49, 1, 21, 60, 40, 5, 62, 1, 22, 30, 57, 4, 43, 31, 1, 55, 40, 7, 27, 37, 30, 54, 1, 19, 42, 30, 56, 26, 62, 49, 24, 57, 37, 56, 2, 39, 16, 5, 30, 55, 3, 49, 60, 23, 56, 44, 17, 52, 13, 42, 28, 48, 18, 45, 9, 37, 21, 41, 58, 10, 48, 1, 63, 5, 41, 57, 2, 24, 12, 48, 27, 42, 32, 46, 13, 38, 19, 34, 5, 41, 25, 60 }, + { 39, 28, 21, 46, 32, 57, 36, 9, 19, 42, 4, 29, 11, 43, 30, 49, 13, 42, 35, 56, 9, 39, 15, 52, 36, 61, 18, 26, 45, 14, 31, 48, 21, 43, 14, 33, 49, 54, 14, 44, 21, 62, 13, 23, 8, 62, 15, 51, 44, 7, 30, 37, 20, 42, 56, 7, 39, 18, 50, 11, 61, 9, 19, 43, 57, 2, 48, 11, 39, 60, 28, 4, 37, 17, 35, 1, 33, 11, 31, 14, 48, 19, 35, 51, 46, 21, 44, 29, 12, 41, 2, 22, 58, 26, 54, 4, 59, 38, 2, 33, 57, 1, 63, 13, 28, 51, 15, 40, 18, 45, 8, 30, 43, 37, 54, 19, 8, 59, 21, 6, 60, 29, 55, 10, 63, 15, 47, 17 }, + { 3, 50, 10, 62, 18, 5, 27, 49, 60, 23, 55, 18, 62, 24, 56, 10, 59, 28, 2, 23, 34, 59, 43, 20, 10, 42, 8, 49, 1, 37, 57, 6, 51, 29, 53, 7, 23, 31, 5, 32, 51, 0, 35, 54, 45, 31, 5, 26, 36, 24, 55, 15, 48, 29, 14, 48, 26, 60, 21, 41, 36, 26, 50, 33, 14, 44, 17, 24, 52, 15, 46, 23, 54, 6, 47, 21, 60, 50, 4, 53, 29, 61, 8, 23, 1, 60, 19, 6, 53, 16, 47, 34, 6, 39, 16, 31, 12, 20, 53, 22, 30, 43, 25, 46, 35, 6, 44, 32, 53, 26, 55, 19, 11, 59, 5, 33, 51, 1, 35, 53, 25, 3, 42, 23, 44, 32, 7, 53 }, + { 22, 44, 37, 6, 26, 51, 38, 0, 34, 13, 31, 46, 3, 37, 6, 19, 40, 21, 47, 63, 12, 5, 29, 55, 22, 58, 34, 28, 60, 22, 11, 41, 17, 38, 9, 44, 59, 39, 56, 19, 11, 47, 25, 15, 3, 39, 57, 17, 61, 11, 46, 3, 58, 9, 54, 35, 2, 34, 8, 45, 15, 56, 5, 23, 53, 33, 63, 35, 4, 59, 10, 51, 13, 61, 29, 41, 15, 25, 43, 19, 40, 10, 54, 33, 41, 12, 38, 51, 31, 26, 61, 9, 30, 45, 24, 62, 49, 40, 10, 61, 14, 49, 5, 17, 54, 20, 60, 23, 3, 13, 35, 50, 32, 23, 46, 27, 38, 63, 16, 12, 39, 48, 18, 51, 1, 27, 56, 35 }, + { 63, 15, 30, 55, 43, 14, 57, 17, 53, 44, 7, 48, 26, 50, 32, 60, 0, 53, 14, 31, 50, 24, 46, 0, 38, 13, 4, 52, 16, 45, 30, 59, 0, 25, 55, 35, 16, 10, 26, 42, 58, 29, 60, 38, 50, 22, 28, 47, 0, 50, 28, 19, 33, 39, 11, 44, 16, 52, 24, 59, 3, 38, 27, 51, 0, 21, 7, 42, 26, 34, 21, 40, 33, 18, 39, 3, 54, 38, 8, 59, 0, 44, 27, 15, 58, 28, 57, 9, 43, 0, 36, 50, 20, 59, 8, 34, 0, 27, 47, 7, 36, 19, 56, 32, 0, 38, 11, 29, 62, 47, 6, 61, 0, 41, 14, 56, 10, 23, 45, 31, 57, 8, 36, 13, 58, 38, 11, 19 }, + { 0, 34, 12, 47, 21, 2, 40, 30, 11, 25, 61, 20, 40, 15, 35, 22, 45, 36, 7, 41, 17, 57, 9, 48, 32, 62, 44, 24, 35, 3, 54, 13, 33, 63, 19, 4, 48, 22, 62, 2, 37, 8, 33, 6, 20, 52, 9, 32, 43, 13, 39, 63, 25, 4, 49, 23, 62, 32, 9, 30, 48, 18, 63, 12, 46, 29, 58, 13, 48, 8, 57, 31, 0, 51, 9, 58, 12, 22, 47, 29, 35, 22, 49, 5, 46, 4, 34, 20, 63, 24, 56, 11, 41, 3, 51, 19, 56, 35, 17, 58, 28, 42, 9, 45, 59, 26, 51, 42, 17, 36, 25, 15, 53, 21, 44, 3, 30, 55, 5, 50, 21, 28, 61, 32, 6, 49, 28, 46 }, + { 58, 42, 60, 4, 31, 59, 22, 63, 35, 38, 9, 54, 1, 57, 8, 51, 16, 58, 27, 53, 3, 38, 30, 15, 27, 6, 19, 56, 10, 50, 21, 36, 47, 5, 43, 28, 51, 32, 13, 46, 18, 54, 16, 43, 63, 12, 36, 59, 22, 34, 5, 52, 17, 59, 27, 41, 0, 19, 55, 37, 13, 43, 6, 34, 41, 10, 36, 55, 19, 44, 3, 16, 58, 27, 49, 25, 32, 62, 17, 55, 13, 63, 18, 52, 25, 37, 17, 48, 13, 32, 5, 46, 28, 37, 14, 43, 25, 5, 51, 39, 3, 52, 33, 22, 8, 40, 12, 4, 57, 9, 46, 39, 28, 58, 13, 62, 17, 42, 19, 36, 0, 47, 16, 43, 24, 21, 54, 13 }, + { 25, 9, 23, 50, 36, 8, 45, 14, 3, 51, 16, 28, 44, 12, 42, 29, 4, 26, 10, 47, 22, 61, 18, 54, 51, 39, 46, 13, 41, 26, 58, 7, 18, 39, 12, 57, 15, 1, 52, 27, 41, 23, 48, 1, 27, 45, 18, 2, 57, 26, 55, 8, 43, 31, 6, 58, 14, 51, 40, 5, 61, 31, 24, 54, 17, 60, 22, 1, 39, 30, 53, 45, 36, 13, 43, 5, 45, 2, 37, 6, 34, 42, 2, 39, 10, 62, 7, 54, 40, 18, 60, 15, 52, 21, 63, 8, 55, 46, 15, 30, 23, 13, 62, 16, 50, 24, 58, 31, 48, 21, 34, 2, 49, 7, 31, 37, 26, 48, 9, 61, 40, 11, 52, 2, 60, 40, 4, 37 }, + { 52, 28, 39, 16, 54, 19, 29, 55, 42, 20, 58, 33, 24, 63, 18, 55, 39, 62, 43, 34, 12, 40, 6, 35, 2, 25, 8, 62, 34, 1, 31, 42, 61, 27, 53, 24, 40, 61, 34, 8, 59, 4, 30, 56, 40, 6, 53, 42, 10, 48, 16, 37, 12, 46, 21, 36, 47, 11, 28, 45, 22, 10, 57, 2, 49, 31, 14, 44, 61, 11, 25, 6, 23, 63, 18, 36, 28, 56, 20, 51, 11, 48, 27, 56, 32, 22, 45, 30, 2, 42, 27, 39, 1, 44, 23, 31, 38, 22, 11, 61, 43, 54, 4, 47, 35, 2, 44, 16, 28, 54, 12, 62, 18, 43, 10, 52, 1, 58, 33, 15, 29, 56, 20, 34, 9, 30, 48, 17 }, + { 46, 2, 56, 11, 41, 1, 49, 6, 27, 47, 2, 48, 5, 32, 37, 3, 13, 19, 32, 1, 55, 28, 60, 17, 43, 59, 32, 20, 49, 16, 55, 23, 14, 46, 2, 36, 6, 30, 20, 49, 12, 47, 35, 14, 21, 60, 29, 14, 35, 24, 46, 1, 56, 29, 53, 8, 33, 23, 56, 1, 35, 46, 20, 39, 26, 4, 53, 28, 17, 38, 60, 34, 48, 9, 55, 15, 46, 7, 41, 31, 60, 24, 16, 36, 1, 59, 19, 52, 35, 6, 55, 11, 59, 33, 7, 57, 4, 29, 48, 1, 19, 26, 37, 30, 18, 63, 37, 6, 59, 1, 40, 24, 56, 33, 46, 22, 35, 7, 24, 53, 39, 5, 26, 45, 55, 18, 62, 7 }, + { 20, 60, 29, 34, 20, 62, 33, 52, 10, 36, 13, 60, 41, 21, 50, 27, 56, 49, 8, 51, 21, 45, 11, 48, 8, 23, 53, 3, 29, 44, 5, 52, 9, 32, 50, 17, 43, 56, 3, 38, 24, 10, 62, 25, 51, 9, 33, 49, 61, 7, 30, 62, 22, 19, 2, 42, 63, 5, 49, 18, 60, 15, 52, 7, 43, 56, 23, 50, 5, 50, 2, 20, 41, 30, 1, 52, 22, 61, 14, 26, 3, 43, 53, 7, 47, 28, 11, 14, 23, 58, 33, 25, 47, 13, 50, 17, 40, 54, 34, 60, 41, 6, 59, 14, 50, 7, 25, 55, 20, 42, 51, 8, 27, 4, 16, 60, 28, 50, 44, 3, 22, 49, 63, 12, 33, 1, 43, 31 }, + { 36, 5, 46, 8, 44, 24, 13, 39, 25, 57, 31, 18, 8, 52, 10, 45, 6, 30, 36, 24, 63, 4, 33, 26, 57, 40, 15, 56, 37, 12, 40, 25, 37, 58, 11, 63, 21, 45, 16, 60, 31, 53, 18, 33, 3, 45, 23, 0, 20, 54, 40, 15, 50, 38, 60, 16, 25, 42, 29, 38, 7, 41, 25, 62, 18, 33, 8, 35, 42, 16, 32, 56, 12, 39, 59, 19, 34, 9, 49, 38, 57, 12, 21, 50, 14, 40, 61, 44, 50, 9, 49, 19, 3, 29, 35, 62, 12, 24, 7, 18, 52, 32, 10, 46, 21, 41, 32, 11, 36, 29, 14, 34, 60, 38, 54, 11, 41, 14, 19, 57, 32, 16, 7, 41, 51, 25, 14, 57 }, + { 53, 18, 26, 50, 15, 58, 4, 63, 17, 43, 7, 40, 61, 35, 15, 41, 23, 60, 16, 38, 14, 42, 19, 50, 0, 31, 10, 46, 27, 63, 18, 60, 0, 20, 29, 39, 8, 26, 37, 5, 42, 0, 44, 39, 57, 17, 58, 41, 28, 37, 4, 32, 9, 44, 12, 31, 54, 10, 59, 14, 27, 53, 12, 36, 0, 47, 13, 63, 21, 58, 10, 24, 50, 27, 4, 26, 44, 53, 31, 0, 18, 42, 29, 33, 57, 4, 32, 26, 0, 38, 16, 61, 41, 53, 20, 0, 42, 44, 49, 27, 10, 56, 39, 0, 57, 15, 53, 49, 3, 61, 22, 47, 17, 5, 49, 26, 2, 63, 39, 10, 47, 27, 37, 23, 4, 59, 38, 10 }, + { 23, 39, 61, 3, 37, 28, 48, 31, 0, 34, 51, 23, 2, 26, 58, 0, 53, 11, 46, 1, 57, 29, 52, 14, 37, 61, 21, 35, 2, 49, 7, 34, 47, 55, 4, 33, 54, 13, 58, 52, 19, 50, 22, 7, 13, 29, 36, 11, 51, 17, 60, 25, 55, 4, 34, 51, 0, 35, 20, 48, 32, 3, 51, 30, 59, 28, 40, 3, 46, 29, 54, 43, 7, 62, 47, 11, 39, 4, 23, 46, 55, 8, 63, 5, 25, 37, 18, 46, 21, 56, 31, 5, 36, 8, 45, 58, 26, 15, 2, 36, 47, 21, 29, 44, 25, 34, 3, 27, 43, 10, 52, 0, 45, 30, 24, 36, 43, 18, 34, 59, 0, 52, 61, 15, 44, 19, 30, 49 }, + { 0, 27, 12, 43, 54, 9, 22, 53, 21, 46, 15, 55, 29, 47, 20, 33, 39, 28, 59, 35, 9, 44, 5, 24, 47, 7, 52, 17, 56, 22, 30, 42, 14, 26, 45, 18, 49, 1, 24, 34, 11, 27, 55, 32, 61, 47, 2, 56, 6, 44, 13, 47, 36, 27, 58, 22, 16, 47, 40, 4, 57, 38, 21, 45, 16, 9, 56, 26, 11, 38, 0, 22, 36, 17, 33, 57, 16, 30, 62, 15, 35, 40, 20, 45, 59, 10, 54, 8, 63, 13, 52, 27, 22, 57, 28, 12, 32, 51, 55, 22, 63, 4, 16, 54, 12, 62, 45, 19, 58, 13, 32, 40, 20, 56, 7, 57, 9, 54, 6, 29, 42, 21, 8, 55, 35, 47, 6, 41 }, + { 56, 33, 58, 32, 19, 35, 42, 6, 59, 11, 38, 5, 49, 12, 62, 7, 52, 17, 5, 25, 54, 20, 61, 31, 54, 27, 41, 11, 44, 5, 59, 12, 36, 51, 10, 61, 28, 41, 48, 9, 43, 63, 5, 40, 20, 8, 49, 26, 34, 21, 58, 1, 18, 45, 7, 39, 61, 26, 8, 50, 23, 10, 63, 5, 55, 37, 19, 49, 52, 15, 59, 47, 13, 54, 1, 25, 42, 58, 10, 48, 3, 27, 50, 1, 17, 48, 34, 41, 16, 40, 2, 45, 10, 39, 17, 61, 5, 38, 19, 9, 41, 31, 60, 38, 5, 23, 36, 8, 30, 55, 24, 63, 12, 48, 14, 51, 31, 20, 45, 25, 12, 50, 32, 2, 28, 11, 62, 14 }, + { 44, 16, 7, 48, 1, 62, 16, 50, 27, 33, 61, 25, 17, 44, 31, 14, 22, 43, 32, 48, 18, 40, 8, 36, 3, 16, 33, 62, 23, 38, 25, 53, 2, 21, 41, 6, 22, 15, 59, 29, 16, 37, 26, 15, 52, 42, 23, 15, 54, 39, 10, 30, 53, 11, 49, 24, 2, 43, 55, 17, 34, 44, 15, 31, 24, 44, 2, 32, 7, 35, 25, 5, 40, 45, 29, 51, 6, 21, 37, 52, 24, 60, 13, 31, 53, 23, 2, 28, 49, 24, 31, 60, 20, 51, 1, 34, 48, 14, 59, 33, 50, 1, 18, 33, 48, 60, 17, 51, 39, 6, 38, 2, 35, 29, 40, 23, 1, 62, 15, 53, 37, 17, 46, 57, 40, 51, 24, 22 }, + { 5, 37, 52, 24, 45, 13, 40, 3, 45, 9, 19, 42, 56, 4, 37, 46, 56, 2, 63, 11, 51, 1, 49, 13, 59, 45, 39, 1, 48, 15, 58, 9, 46, 31, 54, 35, 57, 38, 3, 46, 56, 4, 47, 57, 1, 30, 38, 63, 3, 46, 28, 63, 41, 14, 33, 62, 19, 32, 13, 28, 61, 1, 53, 42, 11, 60, 22, 62, 27, 42, 61, 31, 19, 8, 61, 12, 32, 55, 2, 18, 33, 12, 43, 36, 9, 62, 30, 55, 6, 58, 35, 7, 43, 29, 54, 23, 43, 30, 3, 25, 11, 45, 52, 28, 7, 14, 42, 1, 22, 50, 16, 53, 19, 59, 4, 46, 33, 41, 4, 35, 58, 5, 26, 13, 20, 2, 34, 54 }, + { 30, 63, 21, 10, 26, 55, 29, 59, 23, 39, 53, 1, 36, 24, 59, 27, 10, 34, 23, 38, 30, 60, 22, 42, 28, 19, 9, 57, 30, 19, 43, 33, 13, 63, 3, 19, 11, 50, 31, 20, 14, 34, 10, 35, 17, 59, 7, 31, 19, 25, 50, 5, 20, 57, 29, 6, 52, 41, 4, 46, 20, 37, 26, 17, 49, 6, 39, 18, 53, 14, 3, 49, 57, 23, 34, 48, 14, 41, 28, 38, 56, 6, 58, 25, 39, 19, 43, 15, 37, 11, 47, 18, 53, 4, 37, 9, 62, 21, 53, 40, 57, 24, 13, 40, 56, 26, 47, 31, 59, 25, 45, 27, 10, 43, 21, 61, 13, 27, 48, 9, 23, 43, 31, 62, 38, 59, 9, 47 }, + { 25, 4, 40, 60, 34, 6, 18, 36, 8, 57, 12, 30, 49, 14, 6, 54, 41, 16, 50, 6, 43, 15, 34, 4, 53, 24, 50, 35, 4, 51, 7, 55, 28, 24, 39, 44, 60, 7, 25, 62, 42, 53, 24, 61, 28, 45, 52, 12, 48, 37, 9, 35, 43, 3, 37, 48, 12, 58, 30, 52, 9, 59, 6, 57, 33, 29, 48, 4, 37, 45, 20, 34, 10, 39, 0, 60, 22, 45, 8, 63, 21, 42, 14, 49, 3, 56, 11, 46, 21, 61, 0, 42, 25, 13, 63, 17, 36, 8, 46, 16, 6, 35, 63, 0, 21, 37, 4, 57, 9, 34, 5, 61, 48, 32, 8, 37, 54, 17, 56, 30, 60, 0, 50, 16, 7, 29, 42, 17 }, + { 32, 50, 15, 48, 2, 43, 52, 25, 47, 16, 32, 63, 21, 52, 40, 19, 0, 61, 29, 58, 20, 56, 26, 46, 12, 55, 6, 22, 62, 32, 17, 40, 0, 49, 34, 8, 27, 32, 48, 0, 21, 39, 5, 44, 12, 6, 22, 40, 0, 57, 16, 60, 23, 17, 54, 22, 36, 15, 24, 39, 19, 34, 47, 23, 0, 54, 13, 51, 24, 9, 55, 16, 52, 27, 44, 20, 4, 54, 26, 49, 0, 30, 46, 16, 29, 51, 34, 4, 52, 28, 33, 15, 57, 39, 26, 49, 0, 56, 27, 31, 48, 20, 43, 29, 53, 11, 46, 19, 41, 13, 55, 18, 0, 57, 26, 51, 2, 44, 6, 38, 14, 40, 22, 45, 36, 53, 3, 57 }, + { 44, 12, 37, 28, 22, 57, 11, 38, 0, 51, 9, 41, 4, 29, 11, 47, 33, 45, 12, 26, 3, 36, 9, 63, 31, 16, 38, 44, 14, 47, 25, 61, 20, 58, 15, 47, 17, 57, 13, 36, 9, 51, 18, 29, 50, 36, 54, 20, 61, 27, 32, 13, 53, 44, 9, 27, 0, 63, 45, 2, 56, 10, 14, 43, 41, 28, 58, 11, 35, 60, 30, 41, 6, 63, 11, 51, 37, 32, 15, 10, 35, 53, 5, 61, 22, 7, 26, 59, 23, 9, 44, 48, 21, 3, 51, 32, 24, 41, 12, 61, 2, 55, 9, 15, 35, 58, 28, 15, 62, 30, 37, 23, 42, 29, 11, 17, 35, 24, 63, 20, 52, 28, 8, 55, 11, 23, 47, 19 }, + { 0, 56, 8, 53, 14, 31, 61, 20, 55, 28, 62, 18, 35, 60, 25, 57, 7, 23, 39, 54, 47, 17, 43, 0, 40, 59, 29, 2, 56, 10, 37, 5, 43, 11, 29, 52, 1, 23, 54, 41, 59, 30, 55, 1, 62, 15, 33, 4, 43, 10, 47, 39, 1, 31, 40, 60, 49, 33, 7, 55, 26, 50, 31, 61, 8, 18, 21, 32, 44, 1, 25, 47, 18, 36, 30, 23, 59, 7, 40, 59, 27, 19, 38, 32, 44, 54, 40, 17, 38, 60, 27, 6, 35, 55, 10, 14, 44, 5, 50, 17, 38, 26, 42, 50, 18, 3, 44, 52, 2, 49, 7, 52, 15, 46, 62, 39, 55, 10, 31, 48, 3, 58, 33, 18, 61, 34, 13, 59 }, + { 39, 27, 63, 20, 35, 41, 4, 45, 26, 5, 38, 13, 44, 2, 50, 17, 37, 52, 2, 13, 28, 58, 24, 51, 21, 8, 34, 48, 27, 42, 18, 51, 31, 56, 5, 36, 38, 44, 4, 17, 26, 11, 38, 23, 42, 8, 56, 39, 24, 51, 5, 56, 21, 59, 14, 6, 18, 42, 22, 35, 16, 37, 3, 25, 39, 46, 63, 5, 50, 17, 58, 8, 55, 3, 50, 12, 43, 17, 47, 2, 51, 9, 62, 12, 1, 35, 13, 50, 1, 37, 12, 51, 19, 29, 46, 59, 22, 58, 33, 45, 22, 60, 10, 32, 61, 39, 8, 33, 25, 36, 20, 60, 38, 4, 21, 5, 28, 45, 12, 18, 42, 11, 49, 1, 27, 40, 6, 30 }, + { 24, 16, 42, 1, 50, 10, 48, 17, 33, 43, 24, 48, 21, 55, 31, 42, 10, 21, 63, 35, 49, 6, 33, 13, 41, 53, 10, 20, 60, 6, 53, 26, 12, 41, 22, 60, 14, 28, 63, 33, 49, 3, 45, 16, 48, 26, 14, 46, 18, 30, 35, 26, 8, 50, 29, 51, 25, 57, 12, 47, 53, 9, 62, 20, 54, 2, 36, 15, 40, 28, 33, 13, 38, 24, 46, 1, 29, 56, 33, 20, 44, 24, 41, 26, 57, 20, 63, 8, 30, 55, 5, 41, 62, 8, 34, 2, 37, 10, 19, 6, 37, 1, 53, 23, 5, 27, 58, 22, 43, 12, 50, 26, 9, 34, 54, 32, 49, 1, 59, 37, 22, 46, 25, 36, 51, 15, 54, 46 }, + { 52, 7, 45, 33, 26, 58, 14, 60, 7, 54, 3, 58, 8, 34, 14, 5, 59, 30, 18, 44, 8, 22, 48, 62, 3, 26, 55, 38, 23, 16, 39, 1, 62, 24, 49, 9, 53, 19, 46, 7, 19, 60, 31, 58, 2, 34, 53, 7, 59, 2, 62, 42, 46, 19, 36, 11, 44, 4, 38, 28, 1, 43, 32, 51, 12, 29, 56, 22, 52, 2, 62, 49, 22, 60, 14, 35, 63, 5, 25, 57, 14, 53, 4, 46, 18, 31, 42, 22, 47, 20, 58, 31, 16, 43, 23, 54, 30, 42, 52, 57, 29, 49, 30, 13, 45, 48, 16, 55, 6, 63, 1, 44, 14, 58, 19, 47, 15, 24, 51, 34, 6, 55, 5, 63, 20, 41, 21, 9 }, + { 30, 62, 18, 55, 5, 23, 39, 29, 49, 30, 15, 36, 28, 46, 60, 25, 39, 46, 4, 32, 61, 40, 15, 30, 36, 45, 14, 2, 49, 33, 57, 45, 18, 32, 3, 45, 30, 2, 35, 52, 40, 27, 13, 21, 38, 63, 20, 28, 37, 23, 16, 10, 13, 55, 2, 62, 21, 32, 60, 17, 58, 23, 5, 40, 16, 48, 7, 45, 10, 26, 43, 19, 6, 31, 52, 21, 39, 16, 48, 9, 37, 28, 36, 55, 7, 48, 3, 59, 15, 45, 25, 1, 53, 13, 47, 7, 62, 15, 4, 25, 12, 41, 18, 60, 38, 11, 34, 19, 39, 31, 29, 56, 23, 42, 3, 27, 60, 41, 8, 16, 61, 29, 43, 9, 32, 2, 60, 34 }, + { 3, 38, 13, 37, 52, 44, 2, 19, 12, 42, 63, 19, 40, 1, 20, 50, 12, 55, 15, 56, 27, 1, 54, 11, 57, 18, 32, 63, 44, 4, 29, 13, 37, 61, 35, 16, 42, 57, 12, 22, 6, 55, 43, 10, 50, 5, 44, 11, 48, 52, 34, 58, 28, 41, 38, 30, 7, 52, 11, 49, 30, 14, 45, 27, 59, 34, 21, 38, 32, 58, 11, 36, 56, 42, 9, 41, 3, 54, 31, 42, 0, 60, 16, 11, 39, 24, 52, 33, 6, 36, 10, 40, 32, 60, 26, 20, 39, 28, 47, 34, 63, 8, 54, 3, 24, 56, 0, 51, 13, 47, 16, 40, 7, 35, 52, 11, 36, 4, 57, 30, 39, 13, 18, 50, 58, 28, 12, 48 }, + { 57, 24, 49, 21, 10, 31, 61, 36, 56, 0, 22, 53, 11, 56, 32, 7, 36, 27, 41, 9, 46, 19, 34, 42, 25, 7, 50, 9, 28, 21, 54, 8, 50, 7, 27, 59, 10, 25, 48, 62, 37, 0, 33, 58, 25, 18, 32, 61, 0, 15, 45, 5, 50, 3, 23, 55, 47, 17, 40, 6, 60, 34, 53, 8, 41, 0, 61, 13, 54, 4, 46, 28, 0, 17, 48, 27, 58, 13, 23, 61, 33, 21, 50, 30, 62, 8, 14, 29, 56, 27, 61, 49, 17, 2, 44, 11, 51, 0, 59, 17, 40, 20, 32, 47, 36, 21, 42, 28, 60, 4, 54, 10, 59, 17, 30, 62, 21, 43, 26, 48, 0, 56, 36, 25, 8, 44, 39, 17 }, + { 10, 42, 4, 59, 27, 47, 8, 23, 51, 32, 45, 6, 37, 26, 48, 43, 62, 0, 21, 53, 38, 12, 51, 5, 60, 47, 24, 37, 59, 15, 35, 47, 22, 55, 0, 50, 21, 40, 6, 29, 15, 52, 24, 8, 41, 55, 13, 29, 40, 56, 24, 31, 19, 33, 61, 15, 0, 35, 24, 42, 21, 2, 19, 57, 24, 15, 30, 50, 20, 25, 40, 16, 57, 34, 61, 8, 29, 45, 6, 49, 11, 47, 2, 44, 19, 57, 38, 50, 12, 42, 21, 4, 35, 52, 28, 56, 23, 36, 13, 45, 4, 52, 27, 14, 6, 62, 9, 45, 21, 37, 25, 46, 33, 49, 0, 44, 7, 53, 13, 19, 53, 31, 3, 47, 15, 56, 22, 51 }, + { 35, 28, 53, 32, 1, 16, 54, 40, 9, 17, 25, 58, 14, 59, 3, 22, 16, 51, 31, 5, 23, 58, 28, 17, 35, 20, 0, 42, 11, 52, 3, 31, 41, 17, 43, 13, 32, 54, 18, 60, 32, 45, 17, 49, 2, 36, 51, 22, 7, 36, 9, 63, 48, 12, 46, 26, 43, 28, 63, 13, 48, 37, 51, 33, 5, 47, 55, 9, 42, 63, 7, 51, 24, 12, 37, 19, 55, 34, 18, 38, 15, 28, 54, 34, 5, 43, 22, 0, 48, 14, 54, 24, 58, 9, 38, 5, 32, 55, 21, 30, 49, 9, 59, 43, 30, 51, 35, 26, 7, 53, 2, 22, 14, 27, 57, 18, 38, 24, 33, 45, 10, 41, 20, 60, 37, 5, 32, 0 }, + { 63, 19, 15, 40, 62, 35, 14, 28, 46, 61, 4, 49, 35, 10, 29, 54, 33, 8, 45, 62, 37, 1, 43, 55, 10, 52, 61, 30, 19, 40, 25, 62, 11, 38, 27, 58, 36, 3, 46, 8, 39, 4, 62, 28, 47, 20, 4, 54, 47, 27, 43, 1, 21, 38, 8, 58, 10, 54, 4, 56, 9, 26, 12, 39, 60, 27, 18, 37, 1, 31, 35, 5, 45, 50, 2, 43, 26, 1, 59, 23, 56, 40, 7, 26, 58, 17, 32, 63, 25, 39, 7, 31, 45, 19, 63, 15, 48, 8, 37, 61, 16, 34, 1, 56, 18, 3, 15, 58, 49, 32, 63, 41, 55, 5, 40, 22, 50, 6, 59, 2, 63, 23, 52, 11, 26, 61, 44, 23 }, + { 11, 56, 46, 6, 22, 43, 58, 3, 34, 21, 38, 30, 18, 44, 52, 13, 41, 57, 17, 28, 14, 49, 25, 7, 33, 39, 26, 6, 56, 48, 1, 20, 56, 5, 46, 9, 19, 51, 30, 25, 56, 21, 35, 14, 57, 42, 16, 33, 10, 57, 17, 59, 41, 25, 53, 37, 20, 40, 30, 18, 31, 62, 44, 22, 3, 44, 11, 48, 23, 53, 18, 60, 29, 22, 62, 15, 53, 47, 10, 41, 3, 19, 52, 36, 13, 46, 10, 35, 3, 61, 41, 16, 1, 50, 26, 42, 18, 46, 2, 25, 54, 20, 39, 23, 47, 31, 41, 12, 38, 17, 8, 19, 31, 48, 12, 61, 9, 54, 29, 35, 15, 38, 6, 43, 34, 14, 7, 47 }, + { 39, 2, 33, 26, 53, 8, 18, 50, 41, 12, 53, 1, 63, 24, 19, 39, 2, 24, 47, 10, 60, 38, 19, 63, 48, 4, 15, 45, 32, 14, 60, 36, 29, 53, 23, 63, 34, 12, 61, 1, 43, 11, 53, 30, 1, 26, 60, 45, 23, 39, 3, 29, 12, 50, 4, 16, 51, 3, 45, 36, 50, 1, 16, 54, 35, 14, 57, 30, 58, 9, 46, 14, 41, 10, 32, 38, 4, 30, 21, 51, 32, 63, 25, 1, 60, 27, 53, 18, 51, 22, 28, 55, 34, 12, 40, 3, 60, 29, 57, 41, 6, 44, 11, 53, 8, 61, 24, 57, 1, 28, 44, 59, 36, 3, 34, 25, 41, 31, 16, 44, 22, 47, 28, 58, 1, 49, 54, 29 }, + { 58, 25, 50, 13, 38, 30, 60, 24, 6, 57, 27, 42, 9, 45, 6, 61, 30, 50, 4, 34, 29, 3, 46, 13, 22, 42, 58, 28, 9, 39, 23, 44, 7, 15, 44, 2, 40, 15, 47, 41, 23, 37, 7, 59, 38, 11, 34, 6, 62, 14, 52, 35, 55, 19, 32, 61, 33, 24, 57, 6, 22, 59, 29, 7, 49, 25, 40, 3, 17, 39, 27, 52, 0, 55, 16, 57, 24, 61, 36, 6, 29, 12, 48, 39, 20, 44, 6, 40, 33, 5, 48, 10, 57, 36, 22, 51, 33, 9, 24, 12, 62, 29, 50, 35, 14, 43, 5, 33, 47, 52, 13, 23, 10, 51, 56, 16, 46, 1, 49, 4, 61, 9, 52, 18, 31, 21, 36, 17 }, + { 19, 42, 9, 48, 2, 44, 11, 37, 48, 20, 33, 16, 55, 35, 49, 15, 37, 20, 59, 16, 53, 22, 56, 31, 50, 11, 34, 54, 16, 51, 4, 49, 33, 53, 21, 28, 56, 24, 31, 9, 52, 16, 48, 24, 44, 13, 51, 20, 31, 49, 18, 6, 34, 2, 44, 14, 47, 8, 15, 43, 13, 41, 33, 52, 20, 61, 7, 51, 34, 62, 4, 20, 36, 33, 43, 8, 46, 13, 53, 17, 45, 42, 9, 31, 52, 11, 30, 56, 13, 59, 17, 44, 27, 6, 62, 11, 43, 17, 49, 38, 26, 2, 16, 27, 58, 21, 54, 18, 26, 5, 35, 61, 43, 27, 7, 39, 14, 58, 37, 55, 20, 33, 13, 40, 62, 10, 55, 5 }, + { 51, 14, 61, 29, 59, 20, 55, 31, 0, 49, 11, 60, 3, 26, 22, 56, 0, 40, 12, 43, 41, 8, 36, 0, 17, 57, 24, 2, 46, 26, 61, 18, 0, 38, 12, 59, 6, 49, 3, 57, 19, 63, 5, 33, 18, 54, 28, 56, 0, 43, 26, 46, 63, 27, 56, 22, 27, 54, 38, 28, 63, 24, 10, 45, 0, 31, 42, 21, 12, 25, 44, 49, 59, 6, 26, 50, 3, 34, 27, 59, 0, 35, 62, 16, 4, 58, 47, 0, 43, 24, 37, 2, 54, 20, 46, 31, 0, 56, 34, 5, 55, 45, 60, 37, 0, 40, 10, 38, 63, 46, 15, 20, 0, 53, 21, 62, 30, 11, 24, 27, 40, 0, 57, 26, 3, 45, 27, 35 } +}; + +EFL_ALWAYS_INLINE void +_soft16_convert_from_rgba_pt(const DATA32 *src, DATA16 *dst, DATA8 *alpha, + const int x, const int y) +{ + DATA8 orig_r, orig_g, orig_b, orig_a; + + orig_r = R_VAL(src); + orig_g = G_VAL(src); + orig_b = B_VAL(src); + orig_a = A_VAL(src); + + if (orig_a == 255) + { + DATA8 dith5, dith6, dith, r, g, b; + + dith = dither_table[x & S16_DM_MSK][y & S16_DM_MSK]; + dith5 = dith >> S16_DM_SHF(5); + dith6 = dith >> S16_DM_SHF(6); + + r = orig_r >> 3; + g = orig_g >> 2; + b = orig_b >> 3; + + if (((orig_r - (r << 3)) >= dith5) && (r < 0x1f)) r++; + if (((orig_g - (g << 2)) >= dith6) && (g < 0x3f)) g++; + if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++; + + *dst = (r << 11) | (g << 5) | b; + *alpha = 31; + } + else if (orig_a == 0) + { + *dst = 0; + *alpha = 0; + } + else + { + DATA8 r, g, b, a; + r = orig_r >> 3; + g = orig_g >> 2; + b = orig_b >> 3; + a = (orig_a >> 3) + 1; + + *dst = (r << 11) | (g << 5) | b; + *alpha = a; + } +} + +static inline void +_soft16_convert_from_rgba_scanline(const DATA32 *src, DATA16 *dst, + DATA8 *alpha, const int y, const int w) +{ + int x, m; + + m = (w & ~7); + x = 0; + pld(src, 0); + + while (x < m) + { + pld(src, 32); + UNROLL8({ + _soft16_convert_from_rgba_pt(src, dst, alpha, x, y); + src++; + dst++; + alpha++; + x++; + }); + } + + for (; x < w; x++, src++, dst++, alpha++) + _soft16_convert_from_rgba_pt(src, dst, alpha, x, y); +} + +void +evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src) +{ + const DATA32 *sp; + DATA16 *dp; + DATA8 *ap; + unsigned int y; + + sp = src; + dp = im->pixels; + ap = im->alpha; + + for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride, ap += im->stride) + _soft16_convert_from_rgba_scanline(sp, dp, ap, y, im->cache_entry.w); +} + +EFL_ALWAYS_INLINE void +_soft16_convert_from_rgb_pt(const DATA32 *src, DATA16 *dst, + const int x, const int y) +{ + DATA8 orig_r, orig_g, orig_b, r, g, b, dith5, dith6, dith; + + orig_r = R_VAL(src); + orig_g = G_VAL(src); + orig_b = B_VAL(src); + + r = orig_r >> 3; + g = orig_g >> 2; + b = orig_b >> 3; + + dith = dither_table[x & S16_DM_MSK][y & S16_DM_MSK]; + dith5 = dith >> S16_DM_SHF(5); + dith6 = dith >> S16_DM_SHF(6); + + if (((orig_r - (r << 3)) >= dith5) && (r < 0x1f)) r++; + if (((orig_g - (g << 2)) >= dith6) && (g < 0x3f)) g++; + if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++; + + *dst = (r << 11) | (g << 5) | b; +} + +static inline void +_soft16_convert_from_rgb_scanline(const DATA32 *src, DATA16 *dst, const int y, + const int w) +{ + int x, m; + + m = (w & ~7); + x = 0; + pld(src, 0); + + while (x < m) + { + pld(src, 32); + UNROLL8({ + _soft16_convert_from_rgb_pt(src, dst, x, y); + src++; + dst++; + x++; + }); + } + + for (; x < w; x++, src++, dst++) + _soft16_convert_from_rgb_pt(src, dst, x, y); +} + +void +evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src) +{ + const DATA32 *sp; + DATA16 *dp; + unsigned int y; + + sp = src; + dp = im->pixels; + + for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride) + _soft16_convert_from_rgb_scanline(sp, dp, y, im->cache_entry.w); +} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_font.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_font.c new file mode 100644 index 0000000..fbad4d2 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_font.c @@ -0,0 +1,295 @@ +#include "evas_common_soft16.h" + +EFL_ALWAYS_INLINE void +_glyph_pt_mask_solid_solid(DATA16 *dst, + const DATA16 rgb565, + const DATA32 rgb565_unpack, + const DATA8 *mask) +{ + DATA8 alpha = *mask >> 3; + + if (alpha == 31) *dst = rgb565; + else if (alpha > 0) + { + DATA32 d; + + d = RGB_565_UNPACK(*dst); + d = RGB_565_UNPACKED_BLEND_UNMUL(rgb565_unpack, d, alpha); + *dst = RGB_565_PACK(d); + } +} + +static void +_glyph_scanline_mask_solid_solid(DATA16 *dst, + int size, + const DATA16 rgb565, + const DATA32 rgb565_unpack, + const DATA8 *mask) +{ + DATA16 *start, *end; + + start = dst; + pld(start, 0); + pld(mask, 0); + end = start + (size & ~3); + + while (start < end) + { + pld(start, 16); + pld(mask, 4); + UNROLL4({ + _glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask); + start++; + mask++; + }); + } + + end = start + (size & 3); + for (; start < end; start++, mask++) + _glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask); +} + +EFL_ALWAYS_INLINE void +_glyph_pt_mask_transp_solid(DATA16 *dst, + DATA32 rgb565_unpack, + DATA8 alpha, + const DATA8 *mask) +{ + DATA32 a, b; + int rel_alpha; + + rel_alpha = *mask >> 3; + alpha = (alpha * rel_alpha) >> 5; + if (alpha == 0) + return; + + alpha++; + + a = ((rgb565_unpack * rel_alpha) >> 5) & RGB_565_UNPACKED_MASK; + b = RGB_565_UNPACK(*dst); + b = RGB_565_UNPACKED_BLEND(a, b, alpha); + *dst = RGB_565_PACK(b); +} + +static void +_glyph_scanline_mask_transp_solid(DATA16 *dst, + int size, + const DATA32 rgb565_unpack, + const DATA8 rel_alpha, + const DATA8 *mask) +{ + DATA16 *start, *end; + + start = dst; + pld(start, 0); + pld(mask, 0); + end = start + (size & ~3); + + while (start < end) + { + pld(start, 16); + pld(mask, 4); + UNROLL4({ + _glyph_pt_mask_transp_solid(start, rgb565_unpack, rel_alpha, mask); + start++; + mask++; + }); + } + + end = start + (size & 3); + for (; start < end; start++, mask++) + _glyph_pt_mask_transp_solid(start, rgb565_unpack, rel_alpha, mask); +} + +static inline void +_calc_ext(const Soft16_Image *dst, const RGBA_Draw_Context *dc, + Eina_Rectangle *ext) +{ + EINA_RECTANGLE_SET(ext, 0, 0, dst->cache_entry.w, dst->cache_entry.h); + + if (dc->clip.use) + { + int v; + + EINA_RECTANGLE_SET(ext, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); + if (ext->x < 0) + { + ext->w += ext->x; + ext->x = 0; + } + if (ext->y < 0) + { + ext->h += ext->y; + ext->y = 0; + } + + v = dst->cache_entry.w - ext->x; + if (ext->w > v) ext->w = v; + + v = dst->cache_entry.h - ext->y; + if (ext->h > v) ext->h = v; + } +} + +static inline void +_glyph_scanline(Soft16_Image *dst, const DATA8 *p_mask, + const Eina_Rectangle ext, int dx, int dy, int max_x, int max_y, + int w, DATA8 alpha, const DATA16 rgb565, + const DATA32 rgb565_unpack) +{ + int size, in_x, in_w; + DATA16 *p_pixels; + + if ((dx >= max_x) || (dy < ext.y) || (dy >= max_y)) return; + + in_x = 0; + in_w = 0; + + if (dx + w > max_x) in_w += (dx + w) - max_x; + + if (dx < ext.x) + { + in_w += ext.x - dx; + in_x = ext.x - dx; + dx = ext.x; + } + + size = w - in_w; + p_pixels = dst->pixels + (dy * dst->stride) + dx; + p_mask += in_x; + + if (size > 1) + { + if (alpha == 31) + _glyph_scanline_mask_solid_solid + (p_pixels, size, rgb565, rgb565_unpack, p_mask); + else if (alpha != 0) + _glyph_scanline_mask_transp_solid + (p_pixels, size, rgb565_unpack, alpha, p_mask); + } + else if (size == 1) + { + if (alpha == 31) + _glyph_pt_mask_solid_solid(p_pixels, rgb565, rgb565_unpack, p_mask); + else if (alpha != 0) + _glyph_pt_mask_transp_solid(p_pixels, rgb565_unpack, alpha, p_mask); + } +} + +static void +_soft16_font_glyph_draw_grayscale(Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__, + int x, int y, DATA8 alpha, DATA16 rgb565, + const Eina_Rectangle ext, int bw, int bh, + int bpitch, const DATA8 *bitmap) +{ + const DATA32 rgb565_unpack = RGB_565_UNPACK(rgb565); + int i, max_x, max_y; + + max_x = ext.x + ext.w; + max_y = ext.y + ext.h; + + for (i = 0; i < bh; i++, bitmap += bpitch) + _glyph_scanline(dst, bitmap, ext, x, y + i, max_x, max_y, bw, + alpha, rgb565, rgb565_unpack); +} + +static inline void +_glyph_create_mask_line(DATA8 *mask, const DATA8 *bitmap, int w) +{ + const DATA8 bitrepl[2] = {0x0, 0xff}; + int i; + + for (i = 0; i < w; i += 8, bitmap++) + { + int j, size; + DATA32 bits; + + if (i + 8 < w) size = 8; + else size = w - i; + + bits = *bitmap; + + for (j = size - 1; j >= 0; j--, mask++) + *mask = bitrepl[(bits >> j) & 0x1]; + } +} + +static void +_soft16_font_glyph_draw_mono(Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__, + int x, int y, DATA8 alpha, DATA16 rgb565, + const Eina_Rectangle ext, int bw, int bh, + int bpitch, const DATA8 *bitmap) +{ + const DATA32 rgb565_unpack = RGB_565_UNPACK(rgb565); + DATA8 *mask; + int i, max_x, max_y; + + max_x = ext.x + ext.w; + max_y = ext.y + ext.h; + + mask = alloca(bpitch); + for (i = 0; i < bh; i++, bitmap += bpitch) + { + _glyph_create_mask_line(mask, bitmap, bw); + _glyph_scanline(dst, mask, ext, x, y + i, max_x, max_y, bw, + alpha, rgb565, rgb565_unpack); + } +} + +void +evas_common_soft16_font_glyph_draw(void *data, void *dest __UNUSED__, void *context, + RGBA_Font_Glyph *fg, int x, int y) +{ + Soft16_Image *dst; + RGBA_Draw_Context *dc; + const DATA8 *bitmap; + DATA8 alpha, r, g, b; + DATA16 rgb565; + Eina_Rectangle ext; + int bpitch, bw, bh; + + dst = data; + dc = context; + + alpha = A_VAL(&dc->col.col) >> 3; + if (alpha == 0) return; /* precision is 5 bits, 3 bits lost */ + + r = R_VAL(&dc->col.col) >> 3; + g = G_VAL(&dc->col.col) >> 2; + b = B_VAL(&dc->col.col) >> 3; + + if (r > alpha) r = alpha; + if (g > (alpha << 1)) g = (alpha << 1); + if (b > alpha) b = alpha; + + rgb565 = (r << 11) | (g << 5) | b; + + bitmap = fg->glyph_out->bitmap.buffer; + bh = fg->glyph_out->bitmap.rows; + bw = fg->glyph_out->bitmap.width; + bpitch = fg->glyph_out->bitmap.pitch; + if (bpitch < bw) bpitch = bw; + + _calc_ext(dst, dc, &ext); + + if ((fg->glyph_out->bitmap.num_grays == 256) && + (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays)) + _soft16_font_glyph_draw_grayscale(dst, dc, fg, x, y, alpha, rgb565, + ext, bw, bh, bpitch, bitmap); + else + _soft16_font_glyph_draw_mono(dst, dc, fg, x, y, alpha, rgb565, + ext, bw, bh, bpitch, bitmap); +} + +void * +evas_common_soft16_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__) +{ + return (void *)1; /* core requires != NULL to work */ +} + +void +evas_common_soft16_font_glyph_free(void *ext_dat __UNUSED__) +{ +} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c new file mode 100644 index 0000000..9c9f03c --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c @@ -0,0 +1,471 @@ +#include "evas_common_soft16.h" +#include "evas_soft16_point_blend.c" + +static void +_soft16_image_draw_scaled_solid_solid(Soft16_Image *src, + Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int dst_offset, int w, int h, + int *offset_x, int *offset_y) +{ + DATA16 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA16 *d, *s; + int x; + + s = src->pixels + offset_y[y]; + pld(s, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(offset_x + x, 32); + + UNROLL8({ + _soft16_pt_blend_solid_solid(d, s[offset_x[x]]); + x++; + d++; + }); + } + + for (; x < w; x++, d++) + _soft16_pt_blend_solid_solid(d, s[offset_x[x]]); + } +} +static void +_soft16_image_draw_scaled_transp_solid(Soft16_Image *src, + Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int dst_offset, int w, int h, + int *offset_x, int *offset_y) +{ + DATA16 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA16 *d, *s; + DATA8 *a; + int x; + + s = src->pixels + offset_y[y]; + a = src->alpha + offset_y[y]; + pld(s, 0); + pld(a, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(a, 8); + pld(offset_x + x, 32); + + UNROLL8({ + int off_x = offset_x[x]; + _soft16_pt_blend_transp_solid(d, s[off_x], a[off_x]); + x++; + d++; + }); + } + + for (; x < w; x++, d++) + _soft16_pt_blend_transp_solid(d, s[offset_x[x]], a[offset_x[x]]); + } +} + +static inline void +_soft16_image_draw_scaled_no_mul(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + int dst_offset, int w, int h, + int *offset_x, int *offset_y) +{ + if ((src->cache_entry.flags.alpha && src->alpha) && + (!dst->cache_entry.flags.alpha)) + _soft16_image_draw_scaled_transp_solid + (src, dst, dc, dst_offset, w, h, offset_x, offset_y); + else if (!dst->cache_entry.flags.alpha) + _soft16_image_draw_scaled_solid_solid + (src, dst, dc, dst_offset, w, h, offset_x, offset_y); + else + ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); +} + +static void +_soft16_image_draw_scaled_solid_solid_mul_alpha(Soft16_Image *src, + Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int dst_offset, int w, int h, + int *offset_x, int *offset_y, + DATA8 alpha) +{ + DATA16 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA16 *d, *s; + int x; + + s = src->pixels + offset_y[y]; + pld(s, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(offset_x + x, 32); + + UNROLL8({ + _soft16_pt_blend_solid_solid_mul_alpha + (d, s[offset_x[x]], alpha); + x++; + d++; + }); + } + + for (; x < w; x++, d++) + _soft16_pt_blend_solid_solid_mul_alpha + (d, s[offset_x[x]], alpha); + } +} + +static void +_soft16_image_draw_scaled_transp_solid_mul_alpha(Soft16_Image *src, + Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int dst_offset, int w, int h, + int *offset_x, int *offset_y, + DATA8 alpha) +{ + DATA16 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA16 *d, *s; + DATA8 *a; + int x; + + s = src->pixels + offset_y[y]; + a = src->alpha + offset_y[y]; + pld(s, 0); + pld(a, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(a, 8); + pld(offset_x + x, 32); + + UNROLL8({ + int off_x = offset_x[x]; + _soft16_pt_blend_transp_solid_mul_alpha + (d, s[off_x], a[off_x], alpha); + x++; + d++; + }); + } + + for (; x < w; x++, d++) + _soft16_pt_blend_transp_solid_mul_alpha + (d, s[offset_x[x]], a[offset_x[x]], alpha); + } +} + +static inline void +_soft16_image_draw_scaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + int dst_offset, int w, int h, + int *offset_x, int *offset_y, DATA8 a) +{ + if ((src->cache_entry.flags.alpha && src->alpha) && + (!dst->cache_entry.flags.alpha)) + _soft16_image_draw_scaled_transp_solid_mul_alpha + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); + else if (!dst->cache_entry.flags.alpha) + _soft16_image_draw_scaled_solid_solid_mul_alpha + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); + else + ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); +} + +static void +_soft16_image_draw_scaled_solid_solid_mul_color(Soft16_Image *src, + Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int dst_offset, int w, int h, + int *offset_x, int *offset_y, + DATA8 r, DATA8 g, DATA8 b, + DATA8 alpha) +{ + DATA16 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + + if (alpha == 31) + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA16 *d, *s; + int x; + + s = src->pixels + offset_y[y]; + pld(s, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(offset_x + x, 32); + + UNROLL8({ + _soft16_pt_blend_solid_solid_mul_color_solid + (d, s[offset_x[x]], r, g, b); + x++; + d++; + }); + } + + for (; x < w; x++, d++) + _soft16_pt_blend_solid_solid_mul_color_solid + (d, s[offset_x[x]], r, g, b); + } + else + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA16 *d, *s; + int x; + + s = src->pixels + offset_y[y]; + pld(s, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(offset_x + x, 32); + + UNROLL8({ + _soft16_pt_blend_solid_solid_mul_color_transp + (d, s[offset_x[x]], alpha, r, g, b); + x++; + d++; + }); + } + + for (; x < w; x++, d++) + _soft16_pt_blend_solid_solid_mul_color_transp + (d, s[offset_x[x]], alpha, r, g, b); + } +} + +static void +_soft16_image_draw_scaled_transp_solid_mul_color(Soft16_Image *src, + Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int dst_offset, int w, int h, + int *offset_x, int *offset_y, + DATA8 r, DATA8 g, DATA8 b, + DATA8 alpha) +{ + DATA16 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + + if (alpha == 31) + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA16 *d, *s; + DATA8 *a; + int x; + + s = src->pixels + offset_y[y]; + a = src->alpha + offset_y[y]; + pld(s, 0); + pld(a, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(a, 8); + pld(offset_x + x, 32); + + UNROLL8({ + int off_x = offset_x[x]; + _soft16_pt_blend_transp_solid_mul_color_solid + (d, s[off_x], a[off_x], r, g, b); + x++; + d++; + }); + } + + for (; x < w; x++, d++) + _soft16_pt_blend_transp_solid_mul_color_solid + (d, s[offset_x[x]], a[offset_x[x]], r, g, b); + } + else + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA16 *d, *s; + DATA8 *a; + int x; + + s = src->pixels + offset_y[y]; + a = src->alpha + offset_y[y]; + pld(s, 0); + pld(a, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(a, 8); + pld(offset_x + x, 32); + + UNROLL8({ + int off_x = offset_x[x]; + _soft16_pt_blend_transp_solid_mul_color_transp + (d, s[off_x], a[off_x], alpha, r, g, b); + x++; + d++; + }); + } + + for (; x < w; x++, d++) + _soft16_pt_blend_transp_solid_mul_color_transp + (d, s[offset_x[x]], a[offset_x[x]], alpha, r, g, b); + } +} + +static inline void +_soft16_image_draw_scaled_mul_color(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + int dst_offset, int w, int h, + int *offset_x, int *offset_y, + DATA8 r, DATA8 g, DATA8 b, DATA8 a) +{ + if ((src->cache_entry.flags.alpha && src->alpha) && + (!dst->cache_entry.flags.alpha)) + _soft16_image_draw_scaled_transp_solid_mul_color + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); + else if (!dst->cache_entry.flags.alpha) + _soft16_image_draw_scaled_solid_solid_mul_color + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); + else + ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); +} + +static inline void +_soft16_image_draw_scaled_mul(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + int dst_offset, int w, int h, + int *offset_x, int *offset_y, DATA8 r, DATA8 g, + DATA8 b, DATA8 a) +{ + if ((a == r) && (a == (g >> 1)) && (a == b)) + _soft16_image_draw_scaled_mul_alpha + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); + else + _soft16_image_draw_scaled_mul_color + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); +} + +void +evas_common_soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + const Eina_Rectangle sr, + const Eina_Rectangle dr, + const Eina_Rectangle cr) +{ + int x, y, dst_offset, *offset_x, *offset_y; + DATA16 mul_rgb565; + DATA8 r, g, b, a; + + if (!dc->mul.use) + { + r = b = a = 31; + g = 63; + mul_rgb565 = 0xffff; + } + else + { + a = A_VAL(&dc->mul.col) >> 3; + if (a == 0) + return; + + r = R_VAL(&dc->mul.col) >> 3; + g = G_VAL(&dc->mul.col) >> 2; + b = B_VAL(&dc->mul.col) >> 3; + + if (r > a) r = a; + if (g > (a << 1)) g = (a << 1); + if (b > a) b = a; + + mul_rgb565 = (r << 11) || (g << 5) | b; + } + + /* pre-calculated scale tables */ + offset_x = alloca(cr.w * sizeof(*offset_x)); + for (x = 0; x < cr.w; x++) + offset_x[x] = (((x + cr.x - dr.x) * sr.w) / dr.w) + sr.x; + + offset_y = alloca(cr.h * sizeof(*offset_y)); + for (y = 0; y < cr.h; y++) + offset_y[y] = (((((y + cr.y - dr.y) * sr.h) / dr.h) + sr.y) + * src->stride); + + dst_offset = cr.x + (cr.y * dst->stride); + + + if (mul_rgb565 == 0xffff) + _soft16_image_draw_scaled_no_mul + (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y); + else + _soft16_image_draw_scaled_mul + (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y, r, g, b, a); +} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c new file mode 100644 index 0000000..f53fdf0 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c @@ -0,0 +1,287 @@ +#include "evas_common_soft16.h" +#include "evas_soft16_scanline_blend.c" + +static void +_soft16_image_draw_unscaled_solid_solid(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int src_offset, int dst_offset, + int w, int h) +{ + DATA16 *src_itr, *dst_itr; + int y; + + src_itr = src->pixels + src_offset; + dst_itr = dst->pixels + dst_offset; + + for (y = 0; y < h; y++) + { + _soft16_scanline_blend_solid_solid(src_itr, dst_itr, w); + src_itr += src->stride; + dst_itr += dst->stride; + } +} + +static void +_soft16_image_draw_unscaled_transp_solid(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int src_offset, int dst_offset, + int w, int h) + +{ + DATA16 *src_itr, *dst_itr; + DATA8 *alpha_itr; + int y; + + src_itr = src->pixels + src_offset; + alpha_itr = src->alpha + src_offset; + dst_itr = dst->pixels + dst_offset; + + for (y = 0; y < h; y++) + { + _soft16_scanline_blend_transp_solid(src_itr, alpha_itr, dst_itr, w); + src_itr += src->stride; + alpha_itr += src->stride; + dst_itr += dst->stride; + } +} + +static inline void +_soft16_image_draw_unscaled_no_mul(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + int src_offset, int dst_offset, + int width, int height) +{ + if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) + _soft16_image_draw_unscaled_transp_solid(src, dst, dc, + src_offset, dst_offset, + width, height); + else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) + _soft16_image_draw_unscaled_solid_solid(src, dst, dc, + src_offset, dst_offset, + width, height); + else + ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); +} + +static void +_soft16_image_draw_unscaled_solid_solid_mul_alpha(Soft16_Image *src, + Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int src_offset, + int dst_offset, + int w, int h, DATA8 a) +{ + DATA16 *src_itr, *dst_itr; + int y; + + src_itr = src->pixels + src_offset; + dst_itr = dst->pixels + dst_offset; + + for (y = 0; y < h; y++) + { + _soft16_scanline_blend_solid_solid_mul_alpha(src_itr, dst_itr, w, a); + src_itr += src->stride; + dst_itr += dst->stride; + } +} + +static void +_soft16_image_draw_unscaled_transp_solid_mul_alpha(Soft16_Image *src, + Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int src_offset, + int dst_offset, + int w, int h, DATA8 a) + +{ + DATA16 *src_itr, *dst_itr; + DATA8 *alpha_itr; + int y; + + src_itr = src->pixels + src_offset; + alpha_itr = src->alpha + src_offset; + dst_itr = dst->pixels + dst_offset; + + for (y = 0; y < h; y++) + { + _soft16_scanline_blend_transp_solid_mul_alpha(src_itr, alpha_itr, + dst_itr, w, a); + src_itr += src->stride; + alpha_itr += src->stride; + dst_itr += dst->stride; + } +} + +static inline void +_soft16_image_draw_unscaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + int src_offset, int dst_offset, + int width, int height, DATA8 a) +{ + if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) + _soft16_image_draw_unscaled_transp_solid_mul_alpha + (src, dst, dc, src_offset, dst_offset, width, height, a); + else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) + _soft16_image_draw_unscaled_solid_solid_mul_alpha + (src, dst, dc, src_offset, dst_offset, width, height, a); + else + ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); +} + +static void +_soft16_image_draw_unscaled_solid_solid_mul_color(Soft16_Image *src, + Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int src_offset, + int dst_offset, + int w, int h, DATA8 r, + DATA8 g, DATA8 b, DATA8 a) +{ + DATA16 *src_itr, *dst_itr; + int y; + + src_itr = src->pixels + src_offset; + dst_itr = dst->pixels + dst_offset; + + if (a == 31) + for (y = 0; y < h; y++) + { + _soft16_scanline_blend_solid_solid_mul_color_solid + (src_itr, dst_itr, w, r, g, b); + src_itr += src->stride; + dst_itr += dst->stride; + } + else + for (y = 0; y < h; y++) + { + _soft16_scanline_blend_solid_solid_mul_color_transp + (src_itr, dst_itr, w, a, r, g, b); + src_itr += src->stride; + dst_itr += dst->stride; + } +} + +static void +_soft16_image_draw_unscaled_transp_solid_mul_color(Soft16_Image *src, + Soft16_Image *dst, + RGBA_Draw_Context *dc __UNUSED__, + int src_offset, + int dst_offset, + int w, int h, DATA8 r, + DATA8 g, DATA8 b, DATA8 a) + +{ + DATA16 *src_itr, *dst_itr; + DATA8 *alpha_itr; + int y; + + src_itr = src->pixels + src_offset; + alpha_itr = src->alpha + src_offset; + dst_itr = dst->pixels + dst_offset; + + if (a == 31) + for (y = 0; y < h; y++) + { + _soft16_scanline_blend_transp_solid_mul_color_solid + (src_itr, alpha_itr, dst_itr, w, r, g, b); + src_itr += src->stride; + alpha_itr += src->stride; + dst_itr += dst->stride; + } + else + for (y = 0; y < h; y++) + { + _soft16_scanline_blend_transp_solid_mul_color_transp + (src_itr, alpha_itr, dst_itr, w, a, r, g, b); + src_itr += src->stride; + alpha_itr += src->stride; + dst_itr += dst->stride; + } +} + +static inline void +_soft16_image_draw_unscaled_mul_color(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + int src_offset, int dst_offset, + int width, int height, + DATA8 r, DATA8 g, DATA8 b, DATA8 a) +{ + if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) + _soft16_image_draw_unscaled_transp_solid_mul_color + (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); + else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) + _soft16_image_draw_unscaled_solid_solid_mul_color + (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); + else + ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); +} + +static inline void +_soft16_image_draw_unscaled_mul(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + int src_offset, int dst_offset, + int width, int height, DATA8 r, DATA8 g, + DATA8 b, DATA8 a) +{ + if ((a == r) && (a == (g >> 1)) && (a == b)) + _soft16_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset, + dst_offset, width, height, a); + else + _soft16_image_draw_unscaled_mul_color(src, dst, dc, src_offset, + dst_offset, width, height, + r, g, b, a); +} + +void +evas_common_soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + const Eina_Rectangle sr, + const Eina_Rectangle dr, + const Eina_Rectangle cr) +{ + int src_offset_rows, src_offset, dst_offset; + DATA16 mul_rgb565; + DATA8 r, g, b, a; + + if (!dc->mul.use) + { + r = b = a = 31; + g = 63; + mul_rgb565 = 0xffff; + } + else + { + a = A_VAL(&dc->mul.col) >> 3; + if (a == 0) + return; + + r = R_VAL(&dc->mul.col) >> 3; + g = G_VAL(&dc->mul.col) >> 2; + b = B_VAL(&dc->mul.col) >> 3; + + if (r > a) r = a; + if (g > (a << 1)) g = (a << 1); + if (b > a) b = a; + + mul_rgb565 = (r << 11) || (g << 5) | b; + } + + + src_offset_rows = (cr.y - dr.y) + sr.y; + src_offset = (src_offset_rows * src->stride) + (cr.x - dr.x) + sr.x; + + dst_offset = cr.x + (cr.y * dst->stride); + + if (mul_rgb565 == 0xffff) + _soft16_image_draw_unscaled_no_mul(src, dst, dc, src_offset, dst_offset, + cr.w, cr.h); + else + _soft16_image_draw_unscaled_mul(src, dst, dc, src_offset, dst_offset, + cr.w, cr.h, r, g, b, a); +} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_line.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_line.c new file mode 100644 index 0000000..92e14af --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_line.c @@ -0,0 +1,444 @@ +#include "evas_common_soft16.h" +#include "evas_soft16_scanline_fill.c" + +/* + * All functions except by evas_common_soft16_line_draw() expect x0 <= x1. + */ + +static inline int +_in_range(int value, int min, int max) +{ + return min <= value && value <= max; +} + +static inline int +_is_xy_inside_clip(int x, int y, const struct RGBA_Draw_Context_clip clip) +{ + if (!clip.use) + return 1; + + if (!_in_range(x, clip.x, clip.x + clip.w - 1)) + return 0; + + if (!_in_range(y, clip.y, clip.y + clip.h - 1)) + return 0; + + return 1; +} + +static inline int +_is_x_inside_clip(int x, const struct RGBA_Draw_Context_clip clip) +{ + if (!clip.use) + return 1; + + return _in_range(x, clip.x, clip.x + clip.w - 1); +} + +static inline int +_is_y_inside_clip(int y, const struct RGBA_Draw_Context_clip clip) +{ + if (!clip.use) + return 1; + + return _in_range(y, clip.y, clip.y + clip.h - 1); +} + +static inline int +_is_xy_inside_rect(int x, int y, int w, int h) +{ + return _in_range(x, 0, w - 1) && _in_range(y, 0, h - 1); +} + +static inline int +_is_empty_clip(const struct RGBA_Draw_Context_clip clip) +{ + return clip.w < 1 || clip.h < 1; +} + +static void +_soft16_line_point(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y) +{ + DATA16 rgb565, *dst_itr; + DATA8 alpha; + + if (!_is_xy_inside_rect(x, y, dst->cache_entry.w, dst->cache_entry.h)) + return; + + if (!_is_xy_inside_clip(x, y, dc->clip)) + return; + + dst_itr = dst->pixels + (dst->stride * y) + x; + alpha = A_VAL(&dc->col.col) >> 3; + rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), + G_VAL(&dc->col.col), + B_VAL(&dc->col.col)); + + if (alpha == 31) + _soft16_pt_fill_solid_solid(dst_itr, rgb565); + else if (alpha > 0) + { + DATA32 rgb565_unpack; + + rgb565_unpack = RGB_565_UNPACK(rgb565); + alpha++; + _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); + } +} + +static void +_soft16_line_horiz(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int x1, int y) +{ + DATA16 rgb565, *dst_itr; + DATA8 alpha; + int w; + + if (!_is_y_inside_clip(y, dc->clip)) + return; + + if (x0 < dc->clip.x) + x0 = dc->clip.x; + + if (x1 >= dc->clip.x + dc->clip.w) + x1 = dc->clip.x + dc->clip.w - 1; + + w = x1 - x0; + if (w < 1) + return; + + dst_itr = dst->pixels + (dst->stride * y) + x0; + alpha = A_VAL(&dc->col.col) >> 3; + rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), + G_VAL(&dc->col.col), + B_VAL(&dc->col.col)); + + if (alpha == 31) + _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565); + else if (alpha > 0) + { + DATA32 rgb565_unpack; + + rgb565_unpack = RGB_565_UNPACK(rgb565); + alpha++; + _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha); + } +} + +static void +_soft16_line_vert(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y0, int y1) +{ + DATA16 rgb565, *dst_itr; + DATA8 alpha; + int h; + + if (!_is_x_inside_clip(x, dc->clip)) + return; + + if (y1 < y0) + { + int t; + t = y0; + y0 = y1; + y1 = t; + } + + if (y0 < dc->clip.y) + y0 = dc->clip.y; + + if (y1 >= dc->clip.y + dc->clip.h) + y1 = dc->clip.y + dc->clip.h - 1; + + h = y1 - y0; + if (h < 1) + return; + + dst_itr = dst->pixels + (dst->stride * y0) + x; + alpha = A_VAL(&dc->col.col) >> 3; + rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), + G_VAL(&dc->col.col), + B_VAL(&dc->col.col)); + + if (alpha == 31) + { + for (; h > 0; h--, dst_itr += dst->stride) + _soft16_pt_fill_solid_solid(dst_itr, rgb565); + } + else if (alpha > 0) + { + DATA32 rgb565_unpack; + + rgb565_unpack = RGB_565_UNPACK(rgb565); + alpha++; + + for (; h > 0; h--, dst_itr += dst->stride) + _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); + } +} + +static inline void +_soft16_line_45deg_adjust_boundaries(const struct RGBA_Draw_Context_clip clip, int *p_x0, int *p_y0, int *p_x1, int *p_y1) +{ + int diff, dy, x0, y0, x1, y1; + + x0 = *p_x0; + y0 = *p_y0; + x1 = *p_x1; + y1 = *p_y1; + + dy = y1 - y0; + + diff = clip.x - x0; + if (diff > 0) + { + x0 = clip.x; + y0 += (dy > 0) ? diff : -diff; + } + + diff = x1 - (clip.x + clip.w); + if (diff > 0) + { + x1 = clip.x + clip.w; + y1 += (dy > 0) ? -diff : diff; + } + + if (dy > 0) + { + diff = clip.y - y0; + if (diff > 0) + { + y0 = clip.y; + x0 += diff; + } + + diff = y1 - (clip.y + clip.h); + if (diff > 0) + { + y1 = clip.y + clip.h; + x1 -= diff; + } + } + else + { + diff = clip.y - y1; + if (diff > 0) + { + y1 = clip.y; + x1 -= diff; + } + + diff = y0 - (clip.y + clip.h - 1); + if (diff > 0) + { + y0 = clip.y + clip.h - 1; + x0 += diff; + } + } + + *p_x0 = x0; + *p_y0 = y0; + *p_x1 = x1; + *p_y1 = y1; +} + +static void +_soft16_line_45deg(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) +{ + int dy, step_dst_itr, len; + DATA8 alpha; + DATA16 *dst_itr, rgb565; + + alpha = A_VAL(&dc->col.col) >> 3; + if (alpha < 1) + return; + + rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), + G_VAL(&dc->col.col), + B_VAL(&dc->col.col)); + + dy = y1 - y0; + step_dst_itr = 1 + ((dy > 0) ? dst->stride : -dst->stride); + + _soft16_line_45deg_adjust_boundaries(dc->clip, &x0, &y0, &x1, &y1); + + len = (dy > 0) ? (y1 - y0) : (y0 - y1); + if (len < 1) + return; + + dst_itr = dst->pixels + dst->stride * y0 + x0; + if (alpha == 31) + { + for (; len > 0; len--, dst_itr += step_dst_itr) + _soft16_pt_fill_solid_solid(dst_itr, rgb565); + } + else + { + DATA32 rgb565_unpack; + + rgb565_unpack = RGB_565_UNPACK(rgb565); + alpha++; + for (; len > 0; len--, dst_itr += step_dst_itr) + _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); + } +} + +EFL_ALWAYS_INLINE void +_soft16_line_aliased_pt(DATA16 *dst_itr, DATA16 rgb565, DATA32 rgb565_unpack, DATA8 alpha) +{ + if (alpha == 32) + _soft16_pt_fill_solid_solid(dst_itr, rgb565); + else + _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); +} + +static void +_soft16_line_aliased(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) +{ + int dx, dy, step_y, step_dst_itr; + DATA32 rgb565_unpack; + DATA16 rgb565; + DATA8 alpha; + + alpha = A_VAL(&dc->col.col) >> 3; + if (alpha == 0) + return; + alpha++; + + rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), + G_VAL(&dc->col.col), + B_VAL(&dc->col.col)); + rgb565_unpack = RGB_565_UNPACK(rgb565); + + dx = x1 - x0; + dy = y1 - y0; + + if (dy >= 0) + { + step_y = 1; + step_dst_itr = dst->stride; + } + else + { + dy = -dy; + step_y = -1; + step_dst_itr = -dst->stride; + } + + if (dx > dy) + { + DATA16 *dst_itr; + int e, x, y; + + e = - (dx / 2); + y = y0; + dst_itr = dst->pixels + dst->stride * y0 + x0; + for (x=x0; x <= x1; x++, dst_itr++) + { + if (_is_xy_inside_clip(x, y, dc->clip)) + _soft16_line_aliased_pt(dst_itr, rgb565, rgb565_unpack, alpha); + + e += dy; + if (e >= 0) + { + dst_itr += step_dst_itr; + y += step_y; + e -= dx; + } + } + } + else + { + DATA16 *dst_itr; + int e, x, y; + + e = - (dy / 2); + x = x0; + dst_itr = dst->pixels + dst->stride * y0 + x0; + for (y=y0; y != y1; y += step_y, dst_itr += step_dst_itr) + { + if (_is_xy_inside_clip(x, y, dc->clip)) + _soft16_line_aliased_pt(dst_itr, rgb565, rgb565_unpack, alpha); + + e += dx; + if (e >= 0) + { + dst_itr++; + x++; + e -= dy; + } + } + } +} + +void +evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) +{ + struct RGBA_Draw_Context_clip c_bkp, c_tmp; + int dx, dy; + int x, y, w, h; + + c_tmp.use = 1; + c_tmp.x = 0; + c_tmp.y = 0; + c_tmp.w = dst->cache_entry.w; + c_tmp.h = dst->cache_entry.h; + + /* save out clip info */ + c_bkp = dc->clip; + if (c_bkp.use) + { + RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, + c_bkp.x, c_bkp.y, c_bkp.w, c_bkp.h); + if (_is_empty_clip(c_tmp)) + return; + } + + x = MIN(x0, x1); + y = MIN(y0, y1); + w = MAX(x0, x1) - x + 1; + h = MAX(y0, y1) - y + 1; + + RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, x, y, w, h); + if (_is_empty_clip(c_tmp)) + return; + + /* Check if the line doesn't cross the clip area */ + if (x0 < c_tmp.x && x1 < c_tmp.x) + return; + if (x0 >= c_tmp.x + c_tmp.w && x1 >= c_tmp.x + c_tmp.w) + return; + if (y0 < c_tmp.y && y1 < c_tmp.y) + return; + if (y0 >= c_tmp.y + c_tmp.h && y1 >= c_tmp.y + c_tmp.h) + return; + + dc->clip = c_tmp; + dx = x1 - x0; + dy = y1 - y0; + + if (dx < 0) + { + int t; + + t = x0; + x0 = x1; + x1 = t; + + t = y0; + y0 = y1; + y1 = t; + } + + if (dx == 0 && dy == 0) + _soft16_line_point(dst, dc, x0, y0); + else if (dx == 0) + _soft16_line_vert(dst, dc, x0, y0, y1); + else if (dy == 0) + _soft16_line_horiz(dst, dc, x0, x1, y0); + else if (dy == dx || dy == -dx) + _soft16_line_45deg(dst, dc, x0, y0, x1, y1); + else + _soft16_line_aliased(dst, dc, x0, y0, x1, y1); + + /* restore clip info */ + dc->clip = c_bkp; +} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_main.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_main.c new file mode 100644 index 0000000..6028744 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_main.c @@ -0,0 +1,594 @@ +#include "evas_common_soft16.h" + +static Evas_Cache_Image *eci = NULL; +static int reference = 0; + +static Image_Entry *_evas_common_soft16_image_new(void); +static void _evas_common_soft16_image_delete(Image_Entry *ie); + +static int _evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h); +static void _evas_common_soft16_image_surface_delete(Image_Entry *ie); +static DATA32 *_evas_common_soft16_image_surface_pixels(Image_Entry *ie); + +static int _evas_common_load_soft16_image_from_file(Image_Entry *ie); +static void _evas_common_soft16_image_unload(Image_Entry *ie); + +static void _evas_common_soft16_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); +static int _evas_common_soft16_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src); + +static int _evas_common_soft16_image_ram_usage(Image_Entry *ie); + +static int _evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h); +static int _evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); +static int _evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); +static int _evas_common_soft16_image_colorspace_set(Image_Entry* ie_dst, int cspace); + +static int _evas_common_load_soft16_image_data_from_file(Image_Entry *ie); + +/* static void */ +/* _evas_common_soft16_image_debug(const char* context, Image_Entry *eim) */ +/* { */ +/* DBG("[16] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); */ +/* } */ + +static const Evas_Cache_Image_Func _evas_common_soft16_image_func = +{ + _evas_common_soft16_image_new, + _evas_common_soft16_image_delete, + _evas_common_soft16_image_surface_alloc, + _evas_common_soft16_image_surface_delete, + _evas_common_soft16_image_surface_pixels, + _evas_common_load_soft16_image_from_file, + _evas_common_soft16_image_unload, + _evas_common_soft16_image_dirty_region, + _evas_common_soft16_image_dirty, + _evas_common_soft16_image_size_set, + _evas_common_soft16_image_from_copied_data, + _evas_common_soft16_image_from_data, + _evas_common_soft16_image_colorspace_set, + _evas_common_load_soft16_image_data_from_file, + _evas_common_soft16_image_ram_usage, +/* _evas_common_soft16_image_debug */ + NULL +}; + +EAPI void +evas_common_soft16_image_init(void) +{ + if (!eci) + eci = evas_cache_image_init(&_evas_common_soft16_image_func); + reference++; +} + +EAPI void +evas_common_soft16_image_shutdown(void) +{ + if (--reference == 0) + { +// DISABLE for now - something wrong with cache shutdown freeing things +// still in use - rage_thumb segv's now. +// +// actually - i think i see it. cache ref goes to 0 (and thus gets freed) +// because in eng_setup() when a buffer changes size it is FIRST freed +// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately +// where it should stay at 1. - see evas_engine.c in the buffer enigne for +// example. eng_output_free() is called BEFORE _output_setup(). although this +// is only a SIGNE of the problem. we can patch this up with either freeing +// after the setup (so we just pt a ref of 2 then back to 1), or just +// evas_common_image_init() at the start and evas_common_image_shutdown() +// after it all. really ref 0 should only be reached when no more canvases +// with no more objects exist anywhere. + +// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009. + evas_cache_image_shutdown(eci); + eci = NULL; + } +} + +EAPI Evas_Cache_Image * +evas_common_soft16_image_cache_get(void) +{ + return eci; +} + +static Image_Entry * +_evas_common_soft16_image_new(void) +{ + Soft16_Image *im; + + im = calloc(1, sizeof(Soft16_Image)); + if (!im) return NULL; + + im->stride = -1; + + return (Image_Entry *) im; +} + +static void +_evas_common_soft16_image_delete(Image_Entry *ie) +{ + memset(ie, 0xFF, sizeof (Soft16_Image)); + free(ie); +} + +static int +_evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h) +{ + Soft16_Image *im = (Soft16_Image *) ie; + + if (im->stride < 0) im->stride = _calc_stride(w); + + im->pixels = realloc(im->pixels, IMG_BYTE_SIZE(im->stride, h, ie->flags.alpha)); + if (!im->pixels) return -1; + + if (ie->flags.alpha) + { + im->alpha = (DATA8 *)(im->pixels + (im->stride * h)); + im->flags.free_alpha = 0; + } + im->flags.free_pixels = 1; + + return 0; +} + +static void +_evas_common_soft16_image_surface_delete(Image_Entry *ie) +{ + Soft16_Image *im = (Soft16_Image *) ie; + + if (im->flags.free_pixels) + free(im->pixels); + im->pixels = NULL; + im->flags.free_pixels = 0; + + if (im->flags.free_alpha) + free(im->alpha); + im->alpha = NULL; + im->flags.free_alpha = 0; +} + +static DATA32 * +_evas_common_soft16_image_surface_pixels(Image_Entry *ie __UNUSED__) +{ + abort(); + + return NULL; +} + +static int +_evas_common_load_soft16_image_from_file(Image_Entry *ie) +{ + Soft16_Image *sim = (Soft16_Image *) ie; + RGBA_Image *im; + int error = 0; + + im = (RGBA_Image *) evas_cache_image_request(evas_common_image_cache_get(), sim->cache_entry.file, sim->cache_entry.key, &sim->cache_entry.load_opts, &error); + sim->source = im; + if (!sim->source) return -1; + + sim->cache_entry.w = sim->source->cache_entry.w; + sim->cache_entry.h = sim->source->cache_entry.h; + ie->flags.alpha = im->cache_entry.flags.alpha; + sim->cache_entry.info = im->cache_entry.info; + if (sim->stride < 0) sim->stride = _calc_stride(sim->cache_entry.w); + + return 0; +} + +static void +_evas_common_soft16_image_unload(Image_Entry *ie __UNUSED__) +{ +} + +static void +_evas_common_soft16_image_dirty_region(Image_Entry *im __UNUSED__, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__) +{ +} + +static int +_evas_common_soft16_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src) +{ + Soft16_Image *dst = (Soft16_Image *) ie_dst; + Soft16_Image *src = (Soft16_Image *) ie_src; + + evas_cache_image_load_data(&src->cache_entry); + evas_cache_image_surface_alloc(&dst->cache_entry, + src->cache_entry.w, src->cache_entry.h); + +/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ + + return 0; +} + +static int +_evas_common_soft16_image_ram_usage(Image_Entry *ie) +{ + Soft16_Image *im = (Soft16_Image *) ie; + + if (im->pixels && im->flags.free_pixels) + return IMG_BYTE_SIZE(im->stride, im->cache_entry.h, ie->flags.alpha); + return 0; +} + +static int +_evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w __UNUSED__, unsigned int h __UNUSED__) +{ + Soft16_Image *dst = (Soft16_Image *) ie_dst; + Soft16_Image *im = (Soft16_Image *) ie_im; + + dst->flags = im->flags; + + return 0; +} + +static int +_evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace __UNUSED__) +{ + Soft16_Image *im = (Soft16_Image *) ie_dst; + + /* FIXME: handle colorspace */ + ie_dst->w = w; + ie_dst->h = h; + ie_dst->flags.alpha = alpha; + + im->flags.free_pixels = 0; + im->flags.free_alpha = 0; + if (im->stride < 0) + im->stride = _calc_stride(w); + + /* FIXME: That's bad, the application must be aware of the engine internal. */ + im->pixels = (DATA16 *) image_data; + if (ie_dst->flags.alpha) + im->alpha = (DATA8 *)(im->pixels + (im->stride * h)); + + return 0; +} + +static int +_evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, unsigned int w __UNUSED__, unsigned int h, DATA32 *image_data, int alpha __UNUSED__, int cspace __UNUSED__) +{ + Soft16_Image *im = (Soft16_Image *) ie_dst; + + /* FIXME: handle colorspace */ + if (image_data) + memcpy(im->pixels, image_data, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); + else + memset(im->pixels, 0, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); + + return 0; +} + +static int +_evas_common_soft16_image_colorspace_set(Image_Entry* ie_dst __UNUSED__, int cspace __UNUSED__) +{ + /* FIXME: handle colorspace */ + return 0; +} + +static int +_evas_common_load_soft16_image_data_from_file(Image_Entry *ie) +{ + Soft16_Image *im = (Soft16_Image *) ie; + + if (im->pixels) return 0; + if (!im->source) return -1; + + evas_cache_image_load_data(&im->source->cache_entry); + if (im->source->image.data) + { + DATA32 *sp; + + evas_cache_image_surface_alloc(&im->cache_entry, + im->source->cache_entry.w, + im->source->cache_entry.h); + + sp = im->source->image.data; + if (im->alpha) + evas_common_soft16_image_convert_from_rgba(im, sp); + else + evas_common_soft16_image_convert_from_rgb(im, sp); + } + evas_cache_image_drop(&im->source->cache_entry); + im->cache_entry.info.module = NULL; + im->cache_entry.info.loader = NULL; + im->source = NULL; + + return 0; +} + +/* Soft16_Image * */ +/* evas_common_soft16_image_new(int w, int h, int stride, int have_alpha, DATA16 *pixels, */ +/* int copy) */ +/* { */ +/* Soft16_Image *im; */ + +/* if (stride < 0) stride = _calc_stride(w); */ + +/* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */ +/* if (!im) return NULL; */ + +/* if (pixels) */ +/* { */ +/* if (copy) */ +/* memcpy(im->pixels, pixels, IMG_BYTE_SIZE(stride, h, have_alpha)); */ +/* else */ +/* { */ +/* im->pixels = pixels; */ +/* if (have_alpha) im->alpha = (DATA8 *)(im->pixels + (stride * h)); */ +/* } */ +/* } */ +/* return im; */ +/* } */ + +static inline void +_get_clip(const RGBA_Draw_Context *dc, const Soft16_Image *im, + Eina_Rectangle *clip) +{ + if (dc->clip.use) + { + EINA_RECTANGLE_SET(clip, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); + if (clip->x < 0) + { + clip->w += clip->x; + clip->x = 0; + } + if (clip->y < 0) + { + clip->h += clip->y; + clip->y = 0; + } + if ((clip->x + clip->w) > (int)im->cache_entry.w) clip->w = im->cache_entry.w - clip->x; + if ((clip->y + clip->h) > (int)im->cache_entry.h) clip->h = im->cache_entry.h - clip->y; + } + else + { + EINA_RECTANGLE_SET(clip, 0, 0, im->cache_entry.w, im->cache_entry.h); + } +} + +static inline int +_is_empty_rectangle(const Eina_Rectangle *r) +{ + return (r->w < 1) || (r->h < 1); +} + +static inline void +_shrink(int *s_pos, int *s_size, int pos, int size) +{ + int d; + + d = (*s_pos) - pos; + if (d < 0) + { + (*s_size) += d; + (*s_pos) = pos; + } + + d = size + pos - (*s_pos); + if ((*s_size) > d) + (*s_size) = d; +} + +static int +_soft16_adjust_areas(Eina_Rectangle *src, + int src_max_x, int src_max_y, + Eina_Rectangle *dst, + int dst_max_x, int dst_max_y, + Eina_Rectangle *dst_clip) +{ + if (_is_empty_rectangle(src) || + _is_empty_rectangle(dst) || + _is_empty_rectangle(dst_clip)) + return 0; + + /* shrink clip */ + _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst->w); + _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst->h); + if (_is_empty_rectangle(dst_clip)) return 0; + + /* sanitise x */ + if (src->x < 0) + { + dst->x -= (src->x * dst->w) / src->w; + dst->w += (src->x * dst->w) / src->w; + src->w += src->x; + src->x = 0; + } + if (src->x >= src_max_x) return 0; + if ((src->x + src->w) > src_max_x) + { + dst->w = (dst->w * (src_max_x - src->x)) / (src->w); + src->w = src_max_x - src->x; + } + if (dst->w <= 0) return 0; + if (src->w <= 0) return 0; + if (dst_clip->x < 0) + { + dst_clip->w += dst_clip->x; + dst_clip->x = 0; + } + if (dst_clip->w <= 0) return 0; + if (dst_clip->x >= dst_max_x) return 0; + + _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x); + if (dst_clip->w <= 0) return 0; + + /* sanitise y */ + if (src->y < 0) + { + dst->y -= (src->y * dst->h) / src->h; + dst->h += (src->y * dst->h) / src->h; + src->h += src->y; + src->y = 0; + } + if (src->y >= src_max_y) return 0; + if ((src->y + src->h) > src_max_y) + { + dst->h = (dst->h * (src_max_y - src->y)) / (src->h); + src->h = src_max_y - src->y; + } + if (dst->h <= 0) return 0; + if (src->h <= 0) return 0; + if (dst_clip->y < 0) + { + dst_clip->h += dst_clip->y; + dst_clip->y = 0; + } + if (dst_clip->h <= 0) return 0; + if (dst_clip->y >= dst_max_y) return 0; + + _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y); + if (dst_clip->h <= 0) return 0; + + return 1; +} + +static void +_soft16_image_draw_sampled_int(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + Eina_Rectangle sr, Eina_Rectangle dr) +{ + Eina_Rectangle cr; + + if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) + return; + if (!(RECTS_INTERSECT(sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) + return; + + _get_clip(dc, dst, &cr); + if (!_soft16_adjust_areas(&sr, src->cache_entry.w, src->cache_entry.h, &dr, dst->cache_entry.w, dst->cache_entry.h, &cr)) + return; + + if ((dr.w == sr.w) && (dr.h == sr.h)) + evas_common_soft16_image_draw_unscaled(src, dst, dc, sr, dr, cr); + else + evas_common_soft16_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr); +} + +EAPI void +evas_common_soft16_image_draw(Soft16_Image *src, Soft16_Image *dst, + RGBA_Draw_Context *dc, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h, + int smooth __UNUSED__) +{ + Eina_Rectangle sr, dr; + Cutout_Rects *rects; + Cutout_Rect *r; + struct RGBA_Draw_Context_clip clip_bkp; + int i; + + /* handle cutouts here! */ + EINA_RECTANGLE_SET(&dr, dst_region_x, dst_region_y, dst_region_w, dst_region_h); + + if (_is_empty_rectangle(&dr)) return; + if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) + return; + + EINA_RECTANGLE_SET(&sr, src_region_x, src_region_y, src_region_w, src_region_h); + + if (_is_empty_rectangle(&sr)) return; + if (!(RECTS_INTERSECT(sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) + return; + + /* no cutouts - cut right to the chase */ + if (!dc->cutout.rects) + { + _soft16_image_draw_sampled_int(src, dst, dc, sr, dr); + return; + } + + /* save out clip info */ + clip_bkp = dc->clip; + evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); + evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h); + /* our clip is 0 size.. abort */ + if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) + { + dc->clip = clip_bkp; + return; + } + rects = evas_common_draw_context_apply_cutouts(dc); + for (i = 0; i < rects->active; i++) + { + r = rects->rects + i; + evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); + _soft16_image_draw_sampled_int(src, dst, dc, sr, dr); + } + evas_common_draw_context_apply_clear_cutouts(rects); + dc->clip = clip_bkp; +} + +EAPI Soft16_Image * +evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha) +{ + Soft16_Image *new_im; + + if (im->cache_entry.flags.alpha == have_alpha) return im; + + new_im = (Soft16_Image *) evas_cache_image_alone(&im->cache_entry); + + new_im->cache_entry.flags.alpha = have_alpha; + + if (im->cache_entry.w > 0 + && im->cache_entry.h) + new_im = (Soft16_Image *) evas_cache_image_size_set(&new_im->cache_entry, im->cache_entry.w, im->cache_entry.h); + + return new_im; +} + +/* Soft16_Image * */ +/* evas_common_soft16_image_size_set(Soft16_Image *old_im, int w, int h) */ +/* { */ +/* Soft16_Image *new_im; */ +/* DATA16 *dp, *sp; */ +/* int i, cw, ch, ew; */ + +/* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */ + +/* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */ + +/* if (old_im->cache_entry.w < new_im->cache_entry.w) */ +/* cw = old_im->cache_entry.w; */ +/* else */ +/* cw = new_im->cache_entry.w; */ + +/* ew = new_im->cache_entry.w - cw; */ + +/* if (old_im->cache_entry.h < new_im->cache_entry.h) */ +/* ch = old_im->cache_entry.h; */ +/* else */ +/* ch = new_im->cache_entry.h; */ + +/* dp = new_im->pixels; */ +/* sp = old_im->pixels; */ +/* for (i = 0; i < ch; i++) */ +/* { */ +/* memcpy(dp, sp, cw * sizeof(DATA16)); */ +/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA16)); */ + +/* dp += new_im->stride; */ +/* sp += old_im->stride; */ +/* } */ + +/* if (old_im->flags.have_alpha) */ +/* { */ +/* DATA8 *dp, *sp; */ + +/* dp = new_im->alpha; */ +/* sp = old_im->alpha; */ +/* for (i = 0; i < ch; i++) */ +/* { */ +/* memcpy(dp, sp, cw * sizeof(DATA8)); */ +/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA8)); */ + +/* dp += new_im->stride; */ +/* sp += old_im->stride; */ +/* } */ +/* } */ + +/* evas_cache_image_drop(&old_im->cache_entry); */ +/* return new_im; */ +/* } */ diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c new file mode 100644 index 0000000..8cd02d5 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c @@ -0,0 +1,149 @@ +/** NOTE: This file is meant to be included by users **/ + +/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive. + ** this is due our division by 256 when multiplying the color. + **/ + +/***************************************************************************** + * Scanline processing + * + * _soft16_pt___[_]() + * + ****************************************************************************/ + +/*********************************************************************** + * Regular blend operations + */ + +EFL_ALWAYS_INLINE void +_soft16_pt_blend_transp_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha) +{ + if (alpha == 31) *p_dst = src; + else if (alpha != 0) + { + DATA32 a, b; + + a = RGB_565_UNPACK(src); + b = RGB_565_UNPACK(*p_dst); + b = RGB_565_UNPACKED_BLEND(a, b, alpha); + *p_dst = RGB_565_PACK(b); + } +} + +EFL_ALWAYS_INLINE void +_soft16_pt_blend_solid_solid(DATA16 *p_dst, DATA16 src) +{ + *p_dst = src; +} + +/*********************************************************************** + * Blend operations taking an extra alpha (fade in, out) + */ + +EFL_ALWAYS_INLINE void +_soft16_pt_blend_transp_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha) +{ + DATA32 a, b; + + alpha = (alpha * rel_alpha) >> 5; + if (alpha == 0) + return; + + alpha++; + + a = ((RGB_565_UNPACK(src) * rel_alpha) >> 5) & RGB_565_UNPACKED_MASK; + b = RGB_565_UNPACK(*p_dst); + b = RGB_565_UNPACKED_BLEND(a, b, alpha); + *p_dst = RGB_565_PACK(b); +} + +EFL_ALWAYS_INLINE void +_soft16_pt_blend_solid_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha) +{ + DATA32 a, b; + a = RGB_565_UNPACK(src); + b = RGB_565_UNPACK(*p_dst); + b = RGB_565_UNPACKED_BLEND_UNMUL(a, b, rel_alpha); + *p_dst = RGB_565_PACK(b); +} + +/*********************************************************************** + * Blend operations with extra alpha and multiply color + */ + +EFL_ALWAYS_INLINE void +_soft16_pt_blend_transp_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) +{ + DATA32 rgb, d; + int r1, g1, b1; + + alpha = (alpha * rel_alpha) >> 5; + if (alpha == 0) + return; + + alpha++; + + r1 = ((((src) >> 11) & 0x1f) * r) >> 5; + g1 = ((((src) >> 5) & 0x3f) * g) >> 6; + b1 = (((src) & 0x1f) * b) >> 5; + rgb = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK; + d = RGB_565_UNPACK(*p_dst); + d = RGB_565_UNPACKED_BLEND(rgb, d, alpha); + + *p_dst = RGB_565_PACK(d); +} + +EFL_ALWAYS_INLINE void +_soft16_pt_blend_solid_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) +{ + int r1, g1, b1; + DATA32 rgb, d; + + r1 = ((((src) >> 11) & 0x1f) * r) >> 5; + g1 = ((((src) >> 5) & 0x3f) * g) >> 6; + b1 = (((src) & 0x1f) * b) >> 5; + + rgb = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK; + d = RGB_565_UNPACK(*p_dst); + d = RGB_565_UNPACKED_BLEND(rgb, d, rel_alpha); + *p_dst = RGB_565_PACK(d); +} + +/*********************************************************************** + * Blend operations with extra multiply color + */ + +EFL_ALWAYS_INLINE void +_soft16_pt_blend_transp_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 r, DATA8 g, DATA8 b) +{ + int r1, g1, b1; + + if (alpha == 0) return; + + r1 = ((((src >> 11) & 0x1f) * r) >> 5) & 0x1f; + g1 = ((((src >> 5) & 0x3f) * g) >> 6) & 0x3f; + b1 = (((src & 0x1f) * b) >> 5) & 0x1f; + + if (alpha == 31) *p_dst = (r1 << 11) | (g1 << 5) | b1; + else + { + DATA32 rgb_unpack, d; + + rgb_unpack = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK; + d = RGB_565_UNPACK(*p_dst); + d = RGB_565_UNPACKED_BLEND(rgb_unpack, d, alpha); + *p_dst = RGB_565_PACK(d); + } +} + +EFL_ALWAYS_INLINE void +_soft16_pt_blend_solid_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA16 r, DATA16 g, DATA16 b) +{ + int r1, g1, b1; + + r1 = ((((src >> 11) & 0x1f) * r) >> 5) & 0x1f; + g1 = ((((src >> 5) & 0x3f) * g) >> 6) & 0x3f; + b1 = (((src & 0x1f) * b) >> 5) & 0x1f; + + *p_dst = (r1 << 11) | (g1 << 5) | b1; +} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c new file mode 100644 index 0000000..ca18bef --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c @@ -0,0 +1,231 @@ +#include +#include +#include "evas_soft16_scanline_fill.c" + +typedef struct _RGBA_Edge RGBA_Edge; +typedef struct _RGBA_Vertex RGBA_Vertex; + +struct _RGBA_Edge +{ + float x, dx; + int i; +}; + +struct _RGBA_Vertex +{ + float x, y; + int i; +}; + +#define POLY_EDGE_DEL(_i) \ +{ \ + int _j; \ + \ + for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ + if (_j < num_active_edges) \ + { \ + num_active_edges--; \ + memmove(&(edges[_j]), &(edges[_j + 1]), \ + (num_active_edges - _j) * sizeof(RGBA_Edge)); \ + } \ +} + +#define POLY_EDGE_ADD(_i, _y) \ +{ \ + int _j; \ + float _dx; \ + RGBA_Vertex *_p, *_q; \ + if (_i < (n - 1)) _j = _i + 1; \ + else _j = 0; \ + if (point[_i].y < point[_j].y) \ + { \ + _p = &(point[_i]); \ + _q = &(point[_j]); \ + } \ + else \ + { \ + _p = &(point[_j]); \ + _q = &(point[_i]); \ + } \ + edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ + edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ + edges[num_active_edges].i = _i; \ + num_active_edges++; \ +} + +static int +polygon_point_sorter(const void *a, const void *b) +{ + RGBA_Vertex *p, *q; + + p = (RGBA_Vertex *)a; + q = (RGBA_Vertex *)b; + if (p->y <= q->y) return -1; + return 1; +} + +static int +polygon_edge_sorter(const void *a, const void *b) +{ + RGBA_Edge *p, *q; + + p = (RGBA_Edge *)a; + q = (RGBA_Edge *)b; + if (p->x <= q->x) return -1; + return 1; +} + +void +evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y) +{ + RGBA_Polygon_Point *pt; + RGBA_Vertex *point; + RGBA_Edge *edges; + int num_active_edges; + int n; + int i, j, k; + int y0, y1, yi; + int ext_x, ext_y, ext_w, ext_h; + int *sorted_index; + DATA8 alpha; + DATA16 rgb565; + DATA32 rgb565_unpack; + + alpha = A_VAL(&dc->col.col) >> 3; + if (alpha == 0) + return; + alpha++; + + rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), + G_VAL(&dc->col.col), + B_VAL(&dc->col.col)); + rgb565_unpack = RGB_565_UNPACK(rgb565); + + ext_x = 0; + ext_y = 0; + ext_w = dst->cache_entry.w; + ext_h = dst->cache_entry.h; + if (dc->clip.use) + RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h, + dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); + + if ((ext_w <= 0) || (ext_h <= 0)) + return; + + n = 0; + EINA_INLIST_FOREACH(points, pt) n++; + + if (n < 3) + return; + + edges = malloc(sizeof(RGBA_Edge) * n); + if (!edges) + return; + + point = malloc(sizeof(RGBA_Vertex) * n); + if (!point) + { + free(edges); + return; + } + + sorted_index = malloc(sizeof(int) * n); + if (!sorted_index) + { + free(edges); + free(point); + return; + } + + k = 0; + EINA_INLIST_FOREACH(points, pt) + { + point[k].x = pt->x + x; + point[k].y = pt->y + y; + point[k].i = k; + k++; + } + qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); + + for (k = 0; k < n; k++) + sorted_index[k] = point[k].i; + + k = 0; + EINA_INLIST_FOREACH(points, pt) + { + point[k].x = pt->x + x; + point[k].y = pt->y + y; + point[k].i = k; + k++; + } + + y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); + y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); + + k = 0; + num_active_edges = 0; + + for (yi = y0; yi <= y1; yi++) + { + for (; (k < n) && (point[sorted_index[k]].y <= ((float)yi + 0.5)); k++) + { + i = sorted_index[k]; + + if (i > 0) j = i - 1; + else j = n - 1; + if (point[j].y <= ((float)yi - 0.5)) + { + POLY_EDGE_DEL(j) + } + else if (point[j].y > ((float)yi + 0.5)) + { + POLY_EDGE_ADD(j, yi) + } + if (i < (n - 1)) j = i + 1; + else j = 0; + if (point[j].y <= ((float)yi - 0.5)) + { + POLY_EDGE_DEL(i) + } + else if (point[j].y > ((float)yi + 0.5)) + { + POLY_EDGE_ADD(i, yi) + } + } + + qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); + + for (j = 0; j < num_active_edges; j += 2) + { + int x0, x1; + + x0 = ceil(edges[j].x - 0.5); + if (j < (num_active_edges - 1)) + x1 = floor(edges[j + 1].x - 0.5); + else + x1 = x0; + if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) + { + DATA16 *dst_itr; + int w; + + if (x0 < ext_x) x0 = ext_x; + if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1; + + w = (x1 - x0) + 1; + dst_itr = dst->pixels + (yi * dst->stride) + x0; + + if (alpha == 32) + _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565); + else + _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha); + } + edges[j].x += edges[j].dx; + edges[j + 1].x += edges[j + 1].dx; + } + } + + free(edges); + free(point); + free(sorted_index); +} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c new file mode 100644 index 0000000..bd38fce --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c @@ -0,0 +1,121 @@ +#include "evas_common_soft16.h" +#include "evas_soft16_scanline_fill.c" + +static inline int +_is_empty_rectangle(const Eina_Rectangle *r) +{ + return (r->w < 1) || (r->h < 1); +} + +static inline void +_soft16_rectangle_draw_solid_solid(Soft16_Image *dst, int offset, int w, int h, + DATA16 rgb565) +{ + DATA16 *dst_itr; + int i; + + dst_itr = dst->pixels + offset; + + for (i = 0; i < h; i++, dst_itr += dst->stride) + _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565); +} + +static inline void +_soft16_rectangle_draw_transp_solid(Soft16_Image *dst, int offset, int w, int h, + DATA16 rgb565, DATA8 alpha) +{ + DATA16 *dst_itr; + DATA32 rgb565_unpack; + int i; + + dst_itr = dst->pixels + offset; + rgb565_unpack = RGB_565_UNPACK(rgb565); + alpha++; + + for (i = 0; i < h; i++, dst_itr += dst->stride) + _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha); +} + +static void +_soft16_rectangle_draw_int(Soft16_Image *dst, RGBA_Draw_Context *dc, + Eina_Rectangle dr) +{ + int dst_offset; + + if (_is_empty_rectangle(&dr)) return; + RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h); + if (_is_empty_rectangle(&dr)) return; + + if (dc->clip.use) + RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, dc->clip.x, + dc->clip.y, dc->clip.w, dc->clip.h); + if (_is_empty_rectangle(&dr)) return; + if (A_VAL(&dc->col.col) == 0) return; + + dst_offset = dr.x + (dr.y * dst->cache_entry.w); + + if (!dst->cache_entry.flags.alpha) + { + DATA16 rgb565; + DATA8 alpha; + + alpha = A_VAL(&dc->col.col) >> 3; + rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), + G_VAL(&dc->col.col), + B_VAL(&dc->col.col)); + if (alpha == 31) + _soft16_rectangle_draw_solid_solid + (dst, dst_offset, dr.w, dr.h, rgb565); + else if (alpha > 0) + _soft16_rectangle_draw_transp_solid + (dst, dst_offset, dr.w, dr.h, rgb565, alpha); + } + else + ERR("Unsupported feature: drawing rectangle to non-opaque destination."); +} + +void +evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, + int x, int y, int w, int h) +{ + Eina_Rectangle dr; + Cutout_Rects *rects; + Cutout_Rect *r; + struct RGBA_Draw_Context_clip c_bkp; + int i; + + /* handle cutouts here! */ + EINA_RECTANGLE_SET(&dr, x, y, w, h); + + if (_is_empty_rectangle(&dr)) return; + if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) + return; + + /* no cutouts - cut right to the chase */ + if (!dc->cutout.rects) + { + _soft16_rectangle_draw_int(dst, dc, dr); + return; + } + + c_bkp = dc->clip; + + evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); + evas_common_draw_context_clip_clip(dc, x, y, w, h); + /* our clip is 0 size.. abort */ + if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) + { + dc->clip = c_bkp; + return; + } + rects = evas_common_draw_context_apply_cutouts(dc); + for (i = 0; i < rects->active; ++i) + { + r = rects->rects + i; + evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); + _soft16_rectangle_draw_int(dst, dc, dr); + } + evas_common_draw_context_apply_clear_cutouts(rects); + dc->clip = c_bkp; +} + diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c new file mode 100644 index 0000000..c89eeaa --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c @@ -0,0 +1,353 @@ +/** NOTE: This file is meant to be included by users **/ + +/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive. + ** this is due our division by 256 when multiplying the color. + **/ + +/***************************************************************************** + * Scanline processing + * + * _soft16_scanline___[_]() + * + ****************************************************************************/ + +#include "evas_soft16_point_blend.c" + +/*********************************************************************** + * Regular blend operations + */ +static void +_soft16_scanline_blend_transp_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size) +{ + DATA16 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(alpha, 0); + pld(src, 0); + + /* work on 8 pixels per time, do data preload */ + while (start < end) + { + DATA8 alpha1, alpha2; + + alpha1 = alpha[0]; + alpha += 8; + + /* empirical tests show these give the best performance */ + pld(alpha, 8); + pld(src, 32); + + src += 8; + start += 8; + + alpha2 = alpha[-7]; + _soft16_pt_blend_transp_solid(start - 8, src[-8], alpha1); + + alpha1 = alpha[-6]; + _soft16_pt_blend_transp_solid(start - 7, src[-7], alpha2); + + alpha2 = alpha[-5]; + _soft16_pt_blend_transp_solid(start - 6, src[-6], alpha1); + + alpha1 = alpha[-4]; + _soft16_pt_blend_transp_solid(start - 5, src[-5], alpha2); + + alpha2 = alpha[-3]; + _soft16_pt_blend_transp_solid(start - 4, src[-4], alpha1); + + alpha1 = alpha[-2]; + _soft16_pt_blend_transp_solid(start - 3, src[-3], alpha2); + + alpha2 = alpha[-1]; + _soft16_pt_blend_transp_solid(start - 2, src[-2], alpha1); + + _soft16_pt_blend_transp_solid(start - 1, src[-1], alpha2); + } + + /* remaining pixels (up to 7) */ + end = start + (size & 7); + for (; start < end; start++, src++, alpha++) + _soft16_pt_blend_transp_solid(start, *src, *alpha); +} + +static inline void +_soft16_scanline_blend_solid_solid(DATA16 *src, DATA16 *dst, int size) +{ + memcpy(dst, src, size * sizeof(DATA16)); +} + +/*********************************************************************** + * Blend operations taking an extra alpha (fade in, out) + */ + +static void +_soft16_scanline_blend_transp_solid_mul_alpha(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, const DATA8 rel_alpha) +{ + DATA16 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(alpha, 0); + pld(src, 0); + + while (start < end) + { + DATA8 alpha1, alpha2; + + alpha1 = alpha[0]; + alpha += 8; + + pld(alpha, 8); + pld(src, 32); + + src += 8; + start += 8; + + alpha2 = alpha[-7]; + _soft16_pt_blend_transp_solid_mul_alpha + (start - 8, src[-8], alpha1, rel_alpha); + + alpha1 = alpha[-6]; + _soft16_pt_blend_transp_solid_mul_alpha + (start - 7, src[-7], alpha2, rel_alpha); + + alpha2 = alpha[-5]; + _soft16_pt_blend_transp_solid_mul_alpha + (start - 6, src[-6], alpha1, rel_alpha); + + alpha1 = alpha[-4]; + _soft16_pt_blend_transp_solid_mul_alpha + (start - 5, src[-5], alpha2, rel_alpha); + + alpha2 = alpha[-3]; + _soft16_pt_blend_transp_solid_mul_alpha + (start - 4, src[-4], alpha1, rel_alpha); + + alpha1 = alpha[-2]; + _soft16_pt_blend_transp_solid_mul_alpha + (start - 3, src[-3], alpha2, rel_alpha); + + alpha2 = alpha[-1]; + _soft16_pt_blend_transp_solid_mul_alpha + (start - 2, src[-2], alpha1, rel_alpha); + + _soft16_pt_blend_transp_solid_mul_alpha + (start - 1, src[-1], alpha2, rel_alpha); + } + + end = start + (size & 7); + for (; start < end; start++, src++, alpha++) + _soft16_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha); +} + +static void +_soft16_scanline_blend_solid_solid_mul_alpha(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha) +{ + DATA16 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(src, 0); + + while (start < end) + { + pld(src, 32); + UNROLL8({ + _soft16_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); + start++; + src++; + }); + } + + end = start + (size & 7); + for (; start < end; start++, src++) + _soft16_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); +} + +/*********************************************************************** + * Blend operations with extra alpha and multiply color + */ + +static void +_soft16_scanline_blend_transp_solid_mul_color_transp(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) +{ + DATA16 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(alpha, 0); + pld(src, 0); + + while (start < end) + { + DATA8 alpha1, alpha2; + + alpha1 = alpha[0]; + alpha += 8; + + pld(src, 32); + pld(start, 32); + + src += 8; + start += 8; + + alpha2 = alpha[-7]; + _soft16_pt_blend_transp_solid_mul_color_transp + (start - 8, src[-8], alpha1, rel_alpha, r, g, b); + + alpha1 = alpha[-6]; + _soft16_pt_blend_transp_solid_mul_color_transp + (start - 7, src[-7], alpha2, rel_alpha, r, g, b); + + alpha2 = alpha[-5]; + _soft16_pt_blend_transp_solid_mul_color_transp + (start - 6, src[-6], alpha1, rel_alpha, r, g, b); + + alpha1 = alpha[-4]; + _soft16_pt_blend_transp_solid_mul_color_transp + (start - 5, src[-5], alpha2, rel_alpha, r, g, b); + + alpha2 = alpha[-3]; + _soft16_pt_blend_transp_solid_mul_color_transp + (start - 4, src[-4], alpha1, rel_alpha, r, g, b); + + alpha1 = alpha[-2]; + _soft16_pt_blend_transp_solid_mul_color_transp + (start - 3, src[-3], alpha2, rel_alpha, r, g, b); + + alpha2 = alpha[-1]; + _soft16_pt_blend_transp_solid_mul_color_transp + (start - 2, src[-2], alpha1, rel_alpha, r, g, b); + + _soft16_pt_blend_transp_solid_mul_color_transp + (start - 1, src[-1], alpha2, rel_alpha, r, g, b); + } + + end = start + (size & 7); + for (; start < end; start++, src++, alpha++) + _soft16_pt_blend_transp_solid_mul_color_transp + (start, *src, *alpha, rel_alpha, r, g, b); +} + +static void +_soft16_scanline_blend_solid_solid_mul_color_transp(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) +{ + DATA16 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(src, 0); + + while (start < end) + { + pld(src, 32); + UNROLL8({ + _soft16_pt_blend_solid_solid_mul_color_transp + (start, *src, rel_alpha, r, g, b); + start++; + src++; + }); + } + + end = start + (size & 7); + for (; start < end; start++, src++) + _soft16_pt_blend_solid_solid_mul_color_transp + (start, *src, rel_alpha, r, g, b); +} + +/*********************************************************************** + * Blend operations with extra multiply color + */ + +static void +_soft16_scanline_blend_transp_solid_mul_color_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, DATA16 r, DATA16 g, DATA16 b) +{ + DATA16 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(alpha, 0); + pld(src, 0); + + while (start < end) + { + DATA8 alpha1, alpha2; + + alpha1 = alpha[0]; + alpha += 8; + + pld(alpha, 8); + pld(src, 32); + + src += 8; + start += 8; + + alpha2 = alpha[-7]; + _soft16_pt_blend_transp_solid_mul_color_solid + (start - 8, src[-8], alpha1, r, g, b); + + alpha1 = alpha[-6]; + _soft16_pt_blend_transp_solid_mul_color_solid + (start - 7, src[-7], alpha2, r, g, b); + + alpha2 = alpha[-5]; + _soft16_pt_blend_transp_solid_mul_color_solid + (start - 6, src[-6], alpha1, r, g, b); + + alpha1 = alpha[-4]; + _soft16_pt_blend_transp_solid_mul_color_solid + (start - 5, src[-5], alpha2, r, g, b); + + alpha2 = alpha[-3]; + _soft16_pt_blend_transp_solid_mul_color_solid + (start - 4, src[-4], alpha1, r, g, b); + + alpha1 = alpha[-2]; + _soft16_pt_blend_transp_solid_mul_color_solid + (start - 3, src[-3], alpha2, r, g, b); + + alpha2 = alpha[-1]; + _soft16_pt_blend_transp_solid_mul_color_solid + (start - 2, src[-2], alpha1, r, g, b); + + _soft16_pt_blend_transp_solid_mul_color_solid + (start - 1, src[-1], alpha2, r, g, b); + } + + end = start + (size & 7); + for (; start < end; start++, src++, alpha++) + _soft16_pt_blend_transp_solid_mul_color_solid + (start, *src, *alpha, r, g, b); +} + +static void +_soft16_scanline_blend_solid_solid_mul_color_solid(DATA16 *src, DATA16 *dst, int size, DATA8 r, DATA8 g, DATA8 b) +{ + DATA16 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(src, 0); + + while (start < end) + { + pld(src, 32); + UNROLL8({ + _soft16_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b); + start++; + src++; + }); + } + + end = start + (size & 7); + for (; start < end; start++, src++) + _soft16_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b); +} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c new file mode 100644 index 0000000..d31bef8 --- /dev/null +++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c @@ -0,0 +1,86 @@ +/** NOTE: This file is meant to be included by users **/ + +/***************************************************************************** + * Point processing + * + * _soft16_pt___[_]() + * + * Scanline processing + * + * _soft16_scanline___[_]() + * + ****************************************************************************/ +EFL_ALWAYS_INLINE void +_soft16_pt_fill_solid_solid(DATA16 *dst, DATA16 rgb565) +{ + *dst = rgb565; +} + +static void +_soft16_scanline_fill_solid_solid(DATA16 *dst, int size, DATA16 rgb565) +{ + DATA16 *start, *end; + DATA32 rgb565_double; + + start = dst; + + if ((long)start & 0x2) + { + *start = rgb565; + start++; + size--; + } + + end = start + (size & ~7); + + rgb565_double = (rgb565 << 16) | rgb565; + + while (start < end) + { + DATA32 *p = (DATA32 *)start; + + p[0] = rgb565_double; + p[1] = rgb565_double; + p[2] = rgb565_double; + p[3] = rgb565_double; + + start += 8; + } + + end = start + (size & 7); + for (; start < end; start++) + *start = rgb565; +} + +EFL_ALWAYS_INLINE void +_soft16_pt_fill_transp_solid(DATA16 *dst, DATA32 rgb565_unpack, DATA8 alpha) +{ + DATA32 d; + + d = RGB_565_UNPACK(*dst); + d = RGB_565_UNPACKED_BLEND(rgb565_unpack, d, alpha); + *dst = RGB_565_PACK(d); +} + +static void +_soft16_scanline_fill_transp_solid(DATA16 *dst, int size, DATA32 rgb565_unpack, DATA8 alpha) +{ + DATA16 *start, *end; + + start = dst; + pld(start, 0); + end = start + (size & ~7); + + while (start < end) + { + pld(start, 32); + UNROLL8({ + _soft16_pt_fill_transp_solid(start, rgb565_unpack, alpha); + start++; + }); + } + + end = start + (size & 7); + for (; start < end; start++) + _soft16_pt_fill_transp_solid(start, rgb565_unpack, alpha); +} 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 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@VALGRIND_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EET_CFLAGS@ \ +@pthread_cflags@ + +noinst_LTLIBRARIES = libevas_engine_common_8.la + +libevas_engine_common_8_la_SOURCES = \ +evas_soft8_dither_mask.c \ +evas_soft8_font.c \ +evas_soft8_image_unscaled.c \ +evas_soft8_main.c \ +evas_soft8_rectangle.c \ +evas_soft8_line.c \ +evas_soft8_polygon.c \ +evas_soft8_image_scaled_sampled.c + + +libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h + +EXTRA_DIST = \ +evas_soft8_scanline_blend.c \ +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 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/engines/common_8 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libevas_engine_common_8_la_LIBADD = +am_libevas_engine_common_8_la_OBJECTS = evas_soft8_dither_mask.lo \ + evas_soft8_font.lo evas_soft8_image_unscaled.lo \ + evas_soft8_main.lo evas_soft8_rectangle.lo evas_soft8_line.lo \ + evas_soft8_polygon.lo evas_soft8_image_scaled_sampled.lo +libevas_engine_common_8_la_OBJECTS = \ + $(am_libevas_engine_common_8_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_common_8_la_SOURCES) +DIST_SOURCES = $(libevas_engine_common_8_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@VALGRIND_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EET_CFLAGS@ \ +@pthread_cflags@ + +noinst_LTLIBRARIES = libevas_engine_common_8.la +libevas_engine_common_8_la_SOURCES = \ +evas_soft8_dither_mask.c \ +evas_soft8_font.c \ +evas_soft8_image_unscaled.c \ +evas_soft8_main.c \ +evas_soft8_rectangle.c \ +evas_soft8_line.c \ +evas_soft8_polygon.c \ +evas_soft8_image_scaled_sampled.c + +libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h +EXTRA_DIST = \ +evas_soft8_scanline_blend.c \ +evas_soft8_scanline_fill.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_common_8.la: $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_dither_mask.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_font.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_scaled_sampled.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_unscaled.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_line.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_polygon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_rectangle.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.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 @@ +#include "evas_common_soft8.h" + +EFL_ALWAYS_INLINE void +_soft8_convert_from_rgba_pt(const DATA32 * src, DATA8 * dst, DATA8 * alpha) +{ + if (A_VAL(src) == 0) + { + *dst = 0; + *alpha = 0; + } + else + { + *dst = GRY_8_FROM_RGB(src); + *alpha = A_VAL(src); + } +} + +static inline void +_soft8_convert_from_rgba_scanline(const DATA32 * src, DATA8 * dst, + DATA8 * alpha, const int w) +{ + int x, m; + + m = (w & ~7); + x = 0; + pld(src, 0); + + while (x < m) + { + pld(src, 32); + UNROLL8( + { + _soft8_convert_from_rgba_pt(src, dst, alpha); + src++; dst++; alpha++; x++;} + ); + } + + for (; x < w; x++, src++, dst++, alpha++) + _soft8_convert_from_rgba_pt(src, dst, alpha); +} + +void +evas_common_soft8_image_convert_from_rgba(Soft8_Image * im, const DATA32 * src) +{ + const DATA32 *sp; + DATA8 *dp; + DATA8 *ap; + unsigned int y; + + sp = src; + dp = im->pixels; + ap = im->alpha; + + for (y = 0; y < im->cache_entry.h; + y++, sp += im->cache_entry.w, dp += im->stride, ap += im->stride) + _soft8_convert_from_rgba_scanline(sp, dp, ap, im->cache_entry.w); +} + +EFL_ALWAYS_INLINE void +_soft8_convert_from_rgb_pt(const DATA32 * src, DATA8 * dst) +{ + *dst = GRY_8_FROM_RGB(src); +} + +static inline void +_soft8_convert_from_rgb_scanline(const DATA32 * src, DATA8 * dst, const int w) +{ + int x, m; + + m = (w & ~7); + x = 0; + pld(src, 0); + + while (x < m) + { + pld(src, 32); + UNROLL8( + { + _soft8_convert_from_rgb_pt(src, dst); src++; dst++; x++;} + ); + } + + for (; x < w; x++, src++, dst++) + _soft8_convert_from_rgb_pt(src, dst); +} + +void +evas_common_soft8_image_convert_from_rgb(Soft8_Image * im, const DATA32 * src) +{ + const DATA32 *sp; + DATA8 *dp; + unsigned int y; + + sp = src; + dp = im->pixels; + + for (y = 0; y < im->cache_entry.h; + y++, sp += im->cache_entry.w, dp += im->stride) + _soft8_convert_from_rgb_scanline(sp, dp, im->cache_entry.w); +} 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 @@ +#include "evas_common_soft8.h" +#include "evas_soft8_scanline_blend.c" + +EFL_ALWAYS_INLINE void +_glyph_pt_mask_solid_solid(DATA8 * dst, const DATA8 gry8, const DATA8 * mask) +{ + DATA8 alpha = *mask; + + if (alpha == 0xff) + *dst = gry8; + else if (alpha > 0) + { + *dst = GRY_8_BLEND_UNMUL(gry8, *dst, alpha); + } +} + +static void +_glyph_scanline_mask_solid_solid(DATA8 * dst, + int size, const DATA8 gry8, const DATA8 * mask) +{ + DATA8 *start, *end; + + start = dst; + pld(start, 0); + pld(mask, 0); + end = start + (size & ~3); + + while (start < end) + { + pld(start, 8); + pld(mask, 4); + UNROLL4( + { + _glyph_pt_mask_solid_solid(start, gry8, mask); + start++; mask++;} + ); + } + + end = start + (size & 3); + for (; start < end; start++, mask++) + _glyph_pt_mask_solid_solid(start, gry8, mask); +} + +EFL_ALWAYS_INLINE void +_glyph_pt_mask_transp_solid(DATA8 * dst, + DATA8 gry8, DATA8 alpha, const DATA8 * mask) +{ + int rel_alpha; + + rel_alpha = *mask; + alpha = (alpha * rel_alpha) >> 8; + if (alpha == 0) + return; + + alpha++; + + *dst = GRY_8_BLEND((gry8 * rel_alpha) >> 8, *dst, alpha); +} + +static void +_glyph_scanline_mask_transp_solid(DATA8 * dst, + int size, + const DATA8 gry8, + const DATA8 rel_alpha, const DATA8 * mask) +{ + DATA8 *start, *end; + + start = dst; + pld(start, 0); + pld(mask, 0); + end = start + (size & ~3); + + while (start < end) + { + pld(start, 8); + pld(mask, 4); + UNROLL4( + { + _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask); + start++; mask++;} + ); + } + + end = start + (size & 3); + for (; start < end; start++, mask++) + _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask); +} + +static inline void +_calc_ext(const Soft8_Image * dst, const RGBA_Draw_Context * dc, + Eina_Rectangle * ext) +{ + EINA_RECTANGLE_SET(ext, 0, 0, dst->cache_entry.w, dst->cache_entry.h); + + if (dc->clip.use) + { + int v; + + EINA_RECTANGLE_SET(ext, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); + if (ext->x < 0) + { + ext->w += ext->x; + ext->x = 0; + } + if (ext->y < 0) + { + ext->h += ext->y; + ext->y = 0; + } + + v = dst->cache_entry.w - ext->x; + if (ext->w > v) + ext->w = v; + + v = dst->cache_entry.h - ext->y; + if (ext->h > v) + ext->h = v; + } +} + +static inline void +_glyph_scanline(Soft8_Image * dst, const DATA8 * p_mask, + const Eina_Rectangle ext, int dx, int dy, int max_x, int max_y, + int w, DATA8 alpha, const DATA8 gry8) +{ + int size, in_x, in_w; + DATA8 *p_pixels; + + if ((dx >= max_x) || (dy < ext.y) || (dy >= max_y)) + return; + + in_x = 0; + in_w = 0; + + if (dx + w > max_x) + in_w += (dx + w) - max_x; + + if (dx < ext.x) + { + in_w += ext.x - dx; + in_x = ext.x - dx; + dx = ext.x; + } + + size = w - in_w; + p_pixels = dst->pixels + (dy * dst->stride) + dx; + p_mask += in_x; + + if (size > 1) + { + if (alpha == 0xff) + _glyph_scanline_mask_solid_solid(p_pixels, size, gry8, p_mask); + else if (alpha != 0) + _glyph_scanline_mask_transp_solid + (p_pixels, size, gry8, alpha, p_mask); + } + else if (size == 1) + { + if (alpha == 0xff) + _glyph_pt_mask_solid_solid(p_pixels, gry8, p_mask); + else if (alpha != 0) + _glyph_pt_mask_transp_solid(p_pixels, gry8, alpha, p_mask); + } +} + +static void +_soft8_font_glyph_draw_grayscale(Soft8_Image * dst, + RGBA_Draw_Context * dc __UNUSED__, + RGBA_Font_Glyph * fg __UNUSED__, int x, int y, + DATA8 alpha, DATA8 gry8, + const Eina_Rectangle ext, int bw, int bh, + int bpitch, const DATA8 * bitmap) +{ + int i, max_x, max_y; + + max_x = ext.x + ext.w; + max_y = ext.y + ext.h; + + for (i = 0; i < bh; i++, bitmap += bpitch) + _glyph_scanline(dst, bitmap, ext, x, y + i, max_x, max_y, bw, + alpha, gry8); +} + +static inline void +_glyph_create_mask_line(DATA8 * mask, const DATA8 * bitmap, int w) +{ + const DATA8 bitrepl[2] = { 0x0, 0xff }; + int i; + + for (i = 0; i < w; i += 8, bitmap++) + { + int j, size; + DATA32 bits; + + if (i + 8 < w) + size = 8; + else + size = w - i; + + bits = *bitmap; + + for (j = size - 1; j >= 0; j--, mask++) + *mask = bitrepl[(bits >> j) & 0x1]; + } +} + +static void +_soft8_font_glyph_draw_mono(Soft8_Image * dst, + RGBA_Draw_Context * dc __UNUSED__, + RGBA_Font_Glyph * fg __UNUSED__, int x, int y, + DATA8 alpha, DATA8 gry8, const Eina_Rectangle ext, + int bw, int bh, int bpitch, const DATA8 * bitmap) +{ + DATA8 *mask; + int i, max_x, max_y; + + max_x = ext.x + ext.w; + max_y = ext.y + ext.h; + + mask = alloca(bpitch); + for (i = 0; i < bh; i++, bitmap += bpitch) + { + _glyph_create_mask_line(mask, bitmap, bw); + _glyph_scanline(dst, mask, ext, x, y + i, max_x, max_y, bw, + alpha, gry8); + } +} + +void +evas_common_soft8_font_glyph_draw(void *data, void *dest __UNUSED__, void *context, + RGBA_Font_Glyph * fg, int x, int y) +{ + Soft8_Image *dst; + RGBA_Draw_Context *dc; + const DATA8 *bitmap; + DATA8 alpha; // r, g, b + DATA8 gry8; + Eina_Rectangle ext; + int bpitch, bw, bh; + + dst = data; + dc = context; + + alpha = A_VAL(&dc->col.col); + if (alpha == 0) + return; + + gry8 = GRY_8_FROM_RGB(&dc->col.col); + + /* + * if (r > alpha) r = alpha; + * if (g > alpha) g = alpha; + * if (b > alpha) b = alpha; + * + * gry8 = GRY_8_FROM_COMPONENTS(r, g, b); + */ + + bitmap = fg->glyph_out->bitmap.buffer; + bh = fg->glyph_out->bitmap.rows; + bw = fg->glyph_out->bitmap.width; + bpitch = fg->glyph_out->bitmap.pitch; + if (bpitch < bw) + bpitch = bw; + + _calc_ext(dst, dc, &ext); + + if ((fg->glyph_out->bitmap.num_grays == 256) && + (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays)) + _soft8_font_glyph_draw_grayscale(dst, dc, fg, x, y, alpha, gry8, + ext, bw, bh, bpitch, bitmap); + else + _soft8_font_glyph_draw_mono(dst, dc, fg, x, y, alpha, gry8, + ext, bw, bh, bpitch, bitmap); +} + +void * +evas_common_soft8_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph * fg __UNUSED__) +{ + return (void *)1; /* core requires != NULL to work */ +} + +void +evas_common_soft8_font_glyph_free(void *ext_dat __UNUSED__) +{ +} 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 @@ +#include "evas_common_soft8.h" +#include "evas_soft8_scanline_blend.c" + +static void +_soft8_image_draw_scaled_solid_solid(Soft8_Image * src, + Soft8_Image * dst, + RGBA_Draw_Context * dc __UNUSED__, + int dst_offset, int w, int h, + int *offset_x, int *offset_y) +{ + DATA8 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA8 *d, *s; + int x; + + s = src->pixels + offset_y[y]; + pld(s, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(offset_x + x, 32); + + UNROLL8( + { + _soft8_pt_blend_solid_solid(d, s[offset_x[x]]); x++; d++;} + ); + } + + for (; x < w; x++, d++) + _soft8_pt_blend_solid_solid(d, s[offset_x[x]]); + } +} +static void +_soft8_image_draw_scaled_transp_solid(Soft8_Image * src, + Soft8_Image * dst, + RGBA_Draw_Context * dc __UNUSED__, + int dst_offset, int w, int h, + int *offset_x, int *offset_y) +{ + DATA8 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA8 *d, *s; + DATA8 *a; + int x; + + s = src->pixels + offset_y[y]; + a = src->alpha + offset_y[y]; + pld(s, 0); + pld(a, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(a, 8); + pld(offset_x + x, 32); + + UNROLL8( + { + int off_x = offset_x[x]; + _soft8_pt_blend_transp_solid(d, s[off_x], a[off_x]); + x++; d++;}); + } + + for (; x < w; x++, d++) + _soft8_pt_blend_transp_solid(d, s[offset_x[x]], a[offset_x[x]]); + } +} + +static inline void +_soft8_image_draw_scaled_no_mul(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + int dst_offset, int w, int h, + int *offset_x, int *offset_y) +{ + if ((src->cache_entry.flags.alpha && src->alpha) && + (!dst->cache_entry.flags.alpha)) + _soft8_image_draw_scaled_transp_solid + (src, dst, dc, dst_offset, w, h, offset_x, offset_y); + else if (!dst->cache_entry.flags.alpha) + _soft8_image_draw_scaled_solid_solid + (src, dst, dc, dst_offset, w, h, offset_x, offset_y); + else + ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); +} + +static void +_soft8_image_draw_scaled_solid_solid_mul_alpha(Soft8_Image * src, + Soft8_Image * dst, + RGBA_Draw_Context * + dc __UNUSED__, int dst_offset, + int w, int h, int *offset_x, + int *offset_y, DATA8 alpha) +{ + DATA8 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA8 *d, *s; + int x; + + s = src->pixels + offset_y[y]; + pld(s, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(offset_x + x, 32); + + UNROLL8( + { + _soft8_pt_blend_solid_solid_mul_alpha + (d, s[offset_x[x]], alpha); x++; d++;} + ); + } + + for (; x < w; x++, d++) + _soft8_pt_blend_solid_solid_mul_alpha(d, s[offset_x[x]], alpha); + } +} + +static void +_soft8_image_draw_scaled_transp_solid_mul_alpha(Soft8_Image * src, + Soft8_Image * dst, + RGBA_Draw_Context * + dc __UNUSED__, int dst_offset, + int w, int h, int *offset_x, + int *offset_y, DATA8 alpha) +{ + DATA8 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA8 *d, *s; + DATA8 *a; + int x; + + s = src->pixels + offset_y[y]; + a = src->alpha + offset_y[y]; + pld(s, 0); + pld(a, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(a, 8); + pld(offset_x + x, 32); + + UNROLL8( + { + int off_x = offset_x[x]; + _soft8_pt_blend_transp_solid_mul_alpha + (d, s[off_x], a[off_x], alpha); x++; d++;}); + } + + for (; x < w; x++, d++) + _soft8_pt_blend_transp_solid_mul_alpha + (d, s[offset_x[x]], a[offset_x[x]], alpha); + } +} + +static inline void +_soft8_image_draw_scaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + int dst_offset, int w, int h, + int *offset_x, int *offset_y, DATA8 a) +{ + if ((src->cache_entry.flags.alpha && src->alpha) && + (!dst->cache_entry.flags.alpha)) + _soft8_image_draw_scaled_transp_solid_mul_alpha + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); + else if (!dst->cache_entry.flags.alpha) + _soft8_image_draw_scaled_solid_solid_mul_alpha + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); + else + ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, + A_VAL(&dc->mul.col)); +} + +static void +_soft8_image_draw_scaled_solid_solid_mul_color(Soft8_Image * src, + Soft8_Image * dst, + RGBA_Draw_Context * + dc __UNUSED__, int dst_offset, + int w, int h, int *offset_x, + int *offset_y, DATA8 r, DATA8 g, + DATA8 b, DATA8 alpha) +{ + DATA8 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + + if (alpha == 0xff) + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA8 *d, *s; + int x; + + s = src->pixels + offset_y[y]; + pld(s, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(offset_x + x, 32); + + UNROLL8( + { + _soft8_pt_blend_solid_solid_mul_color_solid + (d, s[offset_x[x]], r, g, b); x++; d++;} + ); + } + + for (; x < w; x++, d++) + _soft8_pt_blend_solid_solid_mul_color_solid + (d, s[offset_x[x]], r, g, b); + } + else + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA8 *d, *s; + int x; + + s = src->pixels + offset_y[y]; + pld(s, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(offset_x + x, 32); + + UNROLL8( + { + _soft8_pt_blend_solid_solid_mul_color_transp + (d, s[offset_x[x]], alpha, r, g, b); x++; d++;} + ); + } + + for (; x < w; x++, d++) + _soft8_pt_blend_solid_solid_mul_color_transp + (d, s[offset_x[x]], alpha, r, g, b); + } +} + +static void +_soft8_image_draw_scaled_transp_solid_mul_color(Soft8_Image * src, + Soft8_Image * dst, + RGBA_Draw_Context * + dc __UNUSED__, int dst_offset, + int w, int h, int *offset_x, + int *offset_y, DATA8 r, DATA8 g, + DATA8 b, DATA8 alpha) +{ + DATA8 *dst_itr; + int y, w_align; + + w_align = w & ~7; + + dst_itr = dst->pixels + dst_offset; + + if (alpha == 0xff) + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA8 *d, *s; + DATA8 *a; + int x; + + s = src->pixels + offset_y[y]; + a = src->alpha + offset_y[y]; + pld(s, 0); + pld(a, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(a, 8); + pld(offset_x + x, 32); + + UNROLL8( + { + int off_x = offset_x[x]; + _soft8_pt_blend_transp_solid_mul_color_solid + (d, s[off_x], a[off_x], r, g, b); x++; d++;}); + } + + for (; x < w; x++, d++) + _soft8_pt_blend_transp_solid_mul_color_solid + (d, s[offset_x[x]], a[offset_x[x]], r, g, b); + } + else + for (y = 0; y < h; y++, dst_itr += dst->stride) + { + DATA8 *d, *s; + DATA8 *a; + int x; + + s = src->pixels + offset_y[y]; + a = src->alpha + offset_y[y]; + pld(s, 0); + pld(a, 0); + pld(offset_x, 0); + + d = dst_itr; + x = 0; + while (x < w_align) + { + pld(s, 32); + pld(a, 8); + pld(offset_x + x, 32); + + UNROLL8( + { + int off_x = offset_x[x]; + _soft8_pt_blend_transp_solid_mul_color_transp + (d, s[off_x], a[off_x], alpha, r, g, b); x++; d++;}); + } + + for (; x < w; x++, d++) + _soft8_pt_blend_transp_solid_mul_color_transp + (d, s[offset_x[x]], a[offset_x[x]], alpha, r, g, b); + } +} + +static inline void +_soft8_image_draw_scaled_mul_color(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + int dst_offset, int w, int h, + int *offset_x, int *offset_y, + DATA8 r, DATA8 g, DATA8 b, DATA8 a) +{ + if ((src->cache_entry.flags.alpha && src->alpha) && + (!dst->cache_entry.flags.alpha)) + _soft8_image_draw_scaled_transp_solid_mul_color + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); + else if (!dst->cache_entry.flags.alpha) + _soft8_image_draw_scaled_solid_solid_mul_color + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); + else + ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, + dc->mul.col); +} + +static inline void +_soft8_image_draw_scaled_mul(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + int dst_offset, int w, int h, + int *offset_x, int *offset_y, DATA8 r, DATA8 g, + DATA8 b, DATA8 a) +{ + if ((a == r) && (a == g) && (a == b)) + _soft8_image_draw_scaled_mul_alpha + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); + else + _soft8_image_draw_scaled_mul_color + (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); +} + +void +evas_common_soft8_image_draw_scaled_sampled(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + const Eina_Rectangle sr, + const Eina_Rectangle dr, + const Eina_Rectangle cr) +{ + int x, y, dst_offset, *offset_x, *offset_y; + DATA8 mul_gry8; + DATA8 r, g, b, a; + + if (!dc->mul.use) + { + r = g = b = a = 0xff; + mul_gry8 = 0xff; + } + else + { + a = A_VAL(&dc->mul.col); + if (a == 0) + return; + + r = R_VAL(&dc->mul.col); + g = G_VAL(&dc->mul.col); + b = B_VAL(&dc->mul.col); + + if (r > a) + r = a; + if (g > a) + g = a; + if (b > a) + b = a; + + mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b); + } + + /* pre-calculated scale tables */ + offset_x = alloca(cr.w * sizeof(*offset_x)); + for (x = 0; x < cr.w; x++) + offset_x[x] = (((x + cr.x - dr.x) * sr.w) / dr.w) + sr.x; + + offset_y = alloca(cr.h * sizeof(*offset_y)); + for (y = 0; y < cr.h; y++) + offset_y[y] = (((((y + cr.y - dr.y) * sr.h) / dr.h) + sr.y) + * src->stride); + + dst_offset = cr.x + (cr.y * dst->stride); + + if (mul_gry8 == 0xff) + _soft8_image_draw_scaled_no_mul + (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y); + else + _soft8_image_draw_scaled_mul + (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y, r, g, b, + a); +} 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 @@ +#include "evas_common_soft8.h" +#include "evas_soft8_scanline_blend.c" + +static void +_soft8_image_draw_unscaled_solid_solid(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc __UNUSED__, + int src_offset, int dst_offset, + int w, int h) +{ + DATA8 *src_itr, *dst_itr; + int y; + + src_itr = src->pixels + src_offset; + dst_itr = dst->pixels + dst_offset; + + for (y = 0; y < h; y++) + { + _soft8_scanline_blend_solid_solid(src_itr, dst_itr, w); + src_itr += src->stride; + dst_itr += dst->stride; + } +} + +static void +_soft8_image_draw_unscaled_transp_solid(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc __UNUSED__, + int src_offset, int dst_offset, + int w, int h) +{ + DATA8 *src_itr, *dst_itr; + DATA8 *alpha_itr; + int y; + + src_itr = src->pixels + src_offset; + alpha_itr = src->alpha + src_offset; + dst_itr = dst->pixels + dst_offset; + + for (y = 0; y < h; y++) + { + _soft8_scanline_blend_transp_solid(src_itr, alpha_itr, dst_itr, w); + src_itr += src->stride; + alpha_itr += src->stride; + dst_itr += dst->stride; + } +} + +static inline void +_soft8_image_draw_unscaled_no_mul(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + int src_offset, int dst_offset, + int width, int height) +{ + if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) + _soft8_image_draw_unscaled_transp_solid(src, dst, dc, + src_offset, dst_offset, + width, height); + else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) + _soft8_image_draw_unscaled_solid_solid(src, dst, dc, + src_offset, dst_offset, + width, height); + else + ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); +} + +static void +_soft8_image_draw_unscaled_solid_solid_mul_alpha(Soft8_Image * src, + Soft8_Image * dst, + RGBA_Draw_Context * + dc __UNUSED__, int src_offset, + int dst_offset, int w, int h, + DATA8 a) +{ + DATA8 *src_itr, *dst_itr; + int y; + + src_itr = src->pixels + src_offset; + dst_itr = dst->pixels + dst_offset; + + for (y = 0; y < h; y++) + { + _soft8_scanline_blend_solid_solid_mul_alpha(src_itr, dst_itr, w, a); + src_itr += src->stride; + dst_itr += dst->stride; + } +} + +static void +_soft8_image_draw_unscaled_transp_solid_mul_alpha(Soft8_Image * src, + Soft8_Image * dst, + RGBA_Draw_Context * + dc __UNUSED__, int src_offset, + int dst_offset, int w, int h, + DATA8 a) +{ + DATA8 *src_itr, *dst_itr; + DATA8 *alpha_itr; + int y; + + src_itr = src->pixels + src_offset; + alpha_itr = src->alpha + src_offset; + dst_itr = dst->pixels + dst_offset; + + for (y = 0; y < h; y++) + { + _soft8_scanline_blend_transp_solid_mul_alpha(src_itr, alpha_itr, + dst_itr, w, a); + src_itr += src->stride; + alpha_itr += src->stride; + dst_itr += dst->stride; + } +} + +static inline void +_soft8_image_draw_unscaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + int src_offset, int dst_offset, + int width, int height, DATA8 a) +{ + if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) + _soft8_image_draw_unscaled_transp_solid_mul_alpha + (src, dst, dc, src_offset, dst_offset, width, height, a); + else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) + _soft8_image_draw_unscaled_solid_solid_mul_alpha + (src, dst, dc, src_offset, dst_offset, width, height, a); + else + ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); +} + +static void +_soft8_image_draw_unscaled_solid_solid_mul_color(Soft8_Image * src, + Soft8_Image * dst, + RGBA_Draw_Context * + dc __UNUSED__, int src_offset, + int dst_offset, int w, int h, + DATA8 r, DATA8 g, DATA8 b, + DATA8 a) +{ + DATA8 *src_itr, *dst_itr; + int y; + + src_itr = src->pixels + src_offset; + dst_itr = dst->pixels + dst_offset; + + if (a == 0xff) + for (y = 0; y < h; y++) + { + _soft8_scanline_blend_solid_solid_mul_color_solid + (src_itr, dst_itr, w, r, g, b); + src_itr += src->stride; + dst_itr += dst->stride; + } + else + for (y = 0; y < h; y++) + { + _soft8_scanline_blend_solid_solid_mul_color_transp + (src_itr, dst_itr, w, a, r, g, b); + src_itr += src->stride; + dst_itr += dst->stride; + } +} + +static void +_soft8_image_draw_unscaled_transp_solid_mul_color(Soft8_Image * src, + Soft8_Image * dst, + RGBA_Draw_Context * + dc __UNUSED__, int src_offset, + int dst_offset, int w, int h, + DATA8 r, DATA8 g, DATA8 b, + DATA8 a) +{ + DATA8 *src_itr, *dst_itr; + DATA8 *alpha_itr; + int y; + + src_itr = src->pixels + src_offset; + alpha_itr = src->alpha + src_offset; + dst_itr = dst->pixels + dst_offset; + + if (a == 0xff) + for (y = 0; y < h; y++) + { + _soft8_scanline_blend_transp_solid_mul_color_solid + (src_itr, alpha_itr, dst_itr, w, r, g, b); + src_itr += src->stride; + alpha_itr += src->stride; + dst_itr += dst->stride; + } + else + for (y = 0; y < h; y++) + { + _soft8_scanline_blend_transp_solid_mul_color_transp + (src_itr, alpha_itr, dst_itr, w, a, r, g, b); + src_itr += src->stride; + alpha_itr += src->stride; + dst_itr += dst->stride; + } +} + +static inline void +_soft8_image_draw_unscaled_mul_color(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + int src_offset, int dst_offset, + int width, int height, + DATA8 r, DATA8 g, DATA8 b, DATA8 a) +{ + if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) + _soft8_image_draw_unscaled_transp_solid_mul_color + (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); + else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) + _soft8_image_draw_unscaled_solid_solid_mul_color + (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); + else + ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " + "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", + src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); +} + +static inline void +_soft8_image_draw_unscaled_mul(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + int src_offset, int dst_offset, + int width, int height, DATA8 r, DATA8 g, + DATA8 b, DATA8 a) +{ + if ((a == r) && (a == g) && (a == b)) + _soft8_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset, + dst_offset, width, height, a); + else + _soft8_image_draw_unscaled_mul_color(src, dst, dc, src_offset, + dst_offset, width, height, + r, g, b, a); +} + +void +evas_common_soft8_image_draw_unscaled(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + const Eina_Rectangle sr, + const Eina_Rectangle dr, const Eina_Rectangle cr) +{ + int src_offset_rows, src_offset, dst_offset; + DATA8 mul_gry8; + DATA8 r, g, b, a; + + if (!dc->mul.use) + { + r = g = b = a = 0xff; + mul_gry8 = 0xff; + } + else + { + a = A_VAL(&dc->mul.col); + if (a == 0) + return; + + r = R_VAL(&dc->mul.col); + g = G_VAL(&dc->mul.col); + b = B_VAL(&dc->mul.col); + + if (r > a) + r = a; + if (g > a) + g = a; + if (b > a) + b = a; + + mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b); + } + + src_offset_rows = (cr.y - dr.y) + sr.y; + src_offset = (src_offset_rows * src->stride) + (cr.x - dr.x) + sr.x; + + dst_offset = cr.x + (cr.y * dst->stride); + + if (mul_gry8 == 0xff) + _soft8_image_draw_unscaled_no_mul(src, dst, dc, src_offset, dst_offset, + cr.w, cr.h); + else + _soft8_image_draw_unscaled_mul(src, dst, dc, src_offset, dst_offset, + cr.w, cr.h, r, g, b, a); +} 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 @@ +#include "evas_common_soft8.h" +#include "evas_soft8_scanline_fill.c" + +/* + * All functions except by evas_common_soft8_line_draw() expect x0 <= x1. + */ + +static inline int +_in_range(int value, int min, int max) +{ + return min <= value && value <= max; +} + +static inline int +_is_xy_inside_clip(int x, int y, const struct RGBA_Draw_Context_clip clip) +{ + if (!clip.use) + return 1; + + if (!_in_range(x, clip.x, clip.x + clip.w - 1)) + return 0; + + if (!_in_range(y, clip.y, clip.y + clip.h - 1)) + return 0; + + return 1; +} + +static inline int +_is_x_inside_clip(int x, const struct RGBA_Draw_Context_clip clip) +{ + if (!clip.use) + return 1; + + return _in_range(x, clip.x, clip.x + clip.w - 1); +} + +static inline int +_is_y_inside_clip(int y, const struct RGBA_Draw_Context_clip clip) +{ + if (!clip.use) + return 1; + + return _in_range(y, clip.y, clip.y + clip.h - 1); +} + +static inline int +_is_xy_inside_rect(int x, int y, int w, int h) +{ + return _in_range(x, 0, w - 1) && _in_range(y, 0, h - 1); +} + +static inline int +_is_empty_clip(const struct RGBA_Draw_Context_clip clip) +{ + return clip.w < 1 || clip.h < 1; +} + +static void +_soft8_line_point(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y) +{ + DATA8 gry8, *dst_itr; + DATA8 alpha; + + if (!_is_xy_inside_rect(x, y, dst->cache_entry.w, dst->cache_entry.h)) + return; + + if (!_is_xy_inside_clip(x, y, dc->clip)) + return; + + dst_itr = dst->pixels + (dst->stride * y) + x; + alpha = A_VAL(&dc->col.col); + gry8 = GRY_8_FROM_RGB(&dc->col.col); + + if (alpha == 0xff) + _soft8_pt_fill_solid_solid(dst_itr, gry8); + else if (alpha > 0) + { + alpha++; + _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); + } +} + +static void +_soft8_line_horiz(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int x1, + int y) +{ + DATA8 gry8, *dst_itr; + DATA8 alpha; + int w; + + if (!_is_y_inside_clip(y, dc->clip)) + return; + + if (x0 < dc->clip.x) + x0 = dc->clip.x; + + if (x1 >= dc->clip.x + dc->clip.w) + x1 = dc->clip.x + dc->clip.w - 1; + + w = x1 - x0; + if (w < 1) + return; + + dst_itr = dst->pixels + (dst->stride * y) + x0; + alpha = A_VAL(&dc->col.col); + gry8 = GRY_8_FROM_RGB(&dc->col.col); + + if (alpha == 0xff) + _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); + else if (alpha > 0) + { + alpha++; + _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); + } +} + +static void +_soft8_line_vert(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y0, + int y1) +{ + DATA8 gry8, *dst_itr; + DATA8 alpha; + int h; + + if (!_is_x_inside_clip(x, dc->clip)) + return; + + if (y1 < y0) + { + int t; + t = y0; + y0 = y1; + y1 = t; + } + + if (y0 < dc->clip.y) + y0 = dc->clip.y; + + if (y1 >= dc->clip.y + dc->clip.h) + y1 = dc->clip.y + dc->clip.h - 1; + + h = y1 - y0; + if (h < 1) + return; + + dst_itr = dst->pixels + (dst->stride * y0) + x; + alpha = A_VAL(&dc->col.col); + gry8 = GRY_8_FROM_RGB(&dc->col.col); + + if (alpha == 0xff) + { + for (; h > 0; h--, dst_itr += dst->stride) + _soft8_pt_fill_solid_solid(dst_itr, gry8); + } + else if (alpha > 0) + { + alpha++; + + for (; h > 0; h--, dst_itr += dst->stride) + _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); + } +} + +static inline void +_soft8_line_45deg_adjust_boundaries(const struct RGBA_Draw_Context_clip clip, + int *p_x0, int *p_y0, int *p_x1, int *p_y1) +{ + int diff, dy, x0, y0, x1, y1; + + x0 = *p_x0; + y0 = *p_y0; + x1 = *p_x1; + y1 = *p_y1; + + dy = y1 - y0; + + diff = clip.x - x0; + if (diff > 0) + { + x0 = clip.x; + y0 += (dy > 0) ? diff : -diff; + } + + diff = x1 - (clip.x + clip.w); + if (diff > 0) + { + x1 = clip.x + clip.w; + y1 += (dy > 0) ? -diff : diff; + } + + if (dy > 0) + { + diff = clip.y - y0; + if (diff > 0) + { + y0 = clip.y; + x0 += diff; + } + + diff = y1 - (clip.y + clip.h); + if (diff > 0) + { + y1 = clip.y + clip.h; + x1 -= diff; + } + } + else + { + diff = clip.y - y1; + if (diff > 0) + { + y1 = clip.y; + x1 -= diff; + } + + diff = y0 - (clip.y + clip.h - 1); + if (diff > 0) + { + y0 = clip.y + clip.h - 1; + x0 += diff; + } + } + + *p_x0 = x0; + *p_y0 = y0; + *p_x1 = x1; + *p_y1 = y1; +} + +static void +_soft8_line_45deg(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, + int x1, int y1) +{ + int dy, step_dst_itr, len; + DATA8 alpha; + DATA8 *dst_itr, gry8; + + alpha = A_VAL(&dc->col.col); + if (alpha < 1) + return; + + gry8 = GRY_8_FROM_RGB(&dc->col.col); + + dy = y1 - y0; + step_dst_itr = 1 + ((dy > 0) ? dst->stride : -dst->stride); + + _soft8_line_45deg_adjust_boundaries(dc->clip, &x0, &y0, &x1, &y1); + + len = (dy > 0) ? (y1 - y0) : (y0 - y1); + if (len < 1) + return; + + dst_itr = dst->pixels + dst->stride * y0 + x0; + if (alpha == 0xff) + { + for (; len > 0; len--, dst_itr += step_dst_itr) + _soft8_pt_fill_solid_solid(dst_itr, gry8); + } + else + { + alpha++; + for (; len > 0; len--, dst_itr += step_dst_itr) + _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); + } +} + +EFL_ALWAYS_INLINE void +_soft8_line_aliased_pt(DATA8 * dst_itr, DATA8 gry8, DATA8 alpha) +{ + if (alpha == 32) + _soft8_pt_fill_solid_solid(dst_itr, gry8); + else + _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); +} + +static void +_soft8_line_aliased(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, + int x1, int y1) +{ + int dx, dy, step_y, step_dst_itr; + DATA8 gry8; + DATA8 alpha; + + alpha = A_VAL(&dc->col.col); + if (alpha == 0) + return; + alpha++; + + gry8 = GRY_8_FROM_RGB(&dc->col.col); + + dx = x1 - x0; + dy = y1 - y0; + + if (dy >= 0) + { + step_y = 1; + step_dst_itr = dst->stride; + } + else + { + dy = -dy; + step_y = -1; + step_dst_itr = -dst->stride; + } + + if (dx > dy) + { + DATA8 *dst_itr; + int e, x, y; + + e = -(dx / 2); + y = y0; + dst_itr = dst->pixels + dst->stride * y0 + x0; + for (x = x0; x <= x1; x++, dst_itr++) + { + if (_is_xy_inside_clip(x, y, dc->clip)) + _soft8_line_aliased_pt(dst_itr, gry8, alpha); + + e += dy; + if (e >= 0) + { + dst_itr += step_dst_itr; + y += step_y; + e -= dx; + } + } + } + else + { + DATA8 *dst_itr; + int e, x, y; + + e = -(dy / 2); + x = x0; + dst_itr = dst->pixels + dst->stride * y0 + x0; + for (y = y0; y != y1; y += step_y, dst_itr += step_dst_itr) + { + if (_is_xy_inside_clip(x, y, dc->clip)) + _soft8_line_aliased_pt(dst_itr, gry8, alpha); + + e += dx; + if (e >= 0) + { + dst_itr++; + x++; + e -= dy; + } + } + } +} + +void +evas_common_soft8_line_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, + int x1, int y1) +{ + struct RGBA_Draw_Context_clip c_bkp, c_tmp; + int dx, dy; + int x, y, w, h; + + c_tmp.use = 1; + c_tmp.x = 0; + c_tmp.y = 0; + c_tmp.w = dst->cache_entry.w; + c_tmp.h = dst->cache_entry.h; + + /* save out clip info */ + c_bkp = dc->clip; + if (c_bkp.use) + { + RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, + c_bkp.x, c_bkp.y, c_bkp.w, c_bkp.h); + if (_is_empty_clip(c_tmp)) + return; + } + + x = MIN(x0, x1); + y = MIN(y0, y1); + w = MAX(x0, x1) - x + 1; + h = MAX(y0, y1) - y + 1; + + RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, x, y, w, h); + if (_is_empty_clip(c_tmp)) + return; + + /* Check if the line doesn't cross the clip area */ + if (x0 < c_tmp.x && x1 < c_tmp.x) + return; + if (x0 >= c_tmp.x + c_tmp.w && x1 >= c_tmp.x + c_tmp.w) + return; + if (y0 < c_tmp.y && y1 < c_tmp.y) + return; + if (y0 >= c_tmp.y + c_tmp.h && y1 >= c_tmp.y + c_tmp.h) + return; + + dc->clip = c_tmp; + dx = x1 - x0; + dy = y1 - y0; + + if (dx < 0) + { + int t; + + t = x0; + x0 = x1; + x1 = t; + + t = y0; + y0 = y1; + y1 = t; + } + + if (dx == 0 && dy == 0) + _soft8_line_point(dst, dc, x0, y0); + else if (dx == 0) + _soft8_line_vert(dst, dc, x0, y0, y1); + else if (dy == 0) + _soft8_line_horiz(dst, dc, x0, x1, y0); + else if (dy == dx || dy == -dx) + _soft8_line_45deg(dst, dc, x0, y0, x1, y1); + else + _soft8_line_aliased(dst, dc, x0, y0, x1, y1); + + /* restore clip info */ + dc->clip = c_bkp; +} 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 @@ +#include "evas_common_soft8.h" + +static Evas_Cache_Image *eci = NULL; +static int reference = 0; + +static Image_Entry *_evas_common_soft8_image_new(void); +static void _evas_common_soft8_image_delete(Image_Entry * ie); + +static int _evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h); +static void _evas_common_soft8_image_surface_delete(Image_Entry * ie); +static DATA32 *_evas_common_soft8_image_surface_pixels(Image_Entry * ie); + +static int _evas_common_load_soft8_image_from_file(Image_Entry * ie); +static void _evas_common_soft8_image_unload(Image_Entry * ie); + +static void _evas_common_soft8_image_dirty_region(Image_Entry * im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); +static int _evas_common_soft8_image_dirty(Image_Entry * ie_dst, + const Image_Entry * ie_src); + +static int _evas_common_soft8_image_ram_usage(Image_Entry * ie); + +static int _evas_common_soft8_image_size_set(Image_Entry * ie_dst, + const Image_Entry * ie_im, unsigned int w, unsigned int h); +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); +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); +static int _evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst, + int cspace); + +static int _evas_common_load_soft8_image_data_from_file(Image_Entry * ie); + +/* +static void +_evas_common_soft8_image_debug(const char* context, Image_Entry *eim) +{ + DBG("[8] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); +} +*/ + +static const Evas_Cache_Image_Func _evas_common_soft8_image_func = { + _evas_common_soft8_image_new, + _evas_common_soft8_image_delete, + _evas_common_soft8_image_surface_alloc, + _evas_common_soft8_image_surface_delete, + _evas_common_soft8_image_surface_pixels, + _evas_common_load_soft8_image_from_file, + _evas_common_soft8_image_unload, + _evas_common_soft8_image_dirty_region, + _evas_common_soft8_image_dirty, + _evas_common_soft8_image_size_set, + _evas_common_soft8_image_from_copied_data, + _evas_common_soft8_image_from_data, + _evas_common_soft8_image_colorspace_set, + _evas_common_load_soft8_image_data_from_file, + _evas_common_soft8_image_ram_usage, +/* _evas_common_soft8_image_debug */ + NULL +}; + +EAPI void +evas_common_soft8_image_init(void) +{ + if (!eci) + eci = evas_cache_image_init(&_evas_common_soft8_image_func); + reference++; +} + +EAPI void +evas_common_soft8_image_shutdown(void) +{ + if (--reference == 0) + { +// DISABLE for now - something wrong with cache shutdown freeing things +// still in use - rage_thumb segv's now. +// +// actually - i think i see it. cache ref goes to 0 (and thus gets freed) +// because in eng_setup() when a buffer changes size it is FIRST freed +// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately +// where it should stay at 1. - see evas_engine.c in the buffer enigne for +// example. eng_output_free() is called BEFORE _output_setup(). although this +// is only a SIGNE of the problem. we can patch this up with either freeing +// after the setup (so we just pt a ref of 2 then back to 1), or just +// evas_common_image_init() at the start and evas_common_image_shutdown() +// after it all. really ref 0 should only be reached when no more canvases +// with no more objects exist anywhere. + +// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009. + //evas_cache_image_shutdown(eci); + //eci = NULL; + } +} + +EAPI Evas_Cache_Image * +evas_common_soft8_image_cache_get(void) +{ + return eci; +} + +static Image_Entry * +_evas_common_soft8_image_new(void) +{ + Soft8_Image *im; + + im = calloc(1, sizeof(Soft8_Image)); + if (!im) + return NULL; + + im->stride = -1; + + return (Image_Entry *) im; +} + +static void +_evas_common_soft8_image_delete(Image_Entry * ie) +{ + memset(ie, 0xFF, sizeof(Soft8_Image)); + free(ie); +} + +static int +_evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h) +{ + Soft8_Image *im = (Soft8_Image *) ie; + + if (im->stride < 0) + im->stride = _calc_stride(w); + + im->pixels = + realloc(im->pixels, IMG_BYTE_SIZE(im->stride, h, ie->flags.alpha)); + if (!im->pixels) + return -1; + + if (ie->flags.alpha) + { + im->alpha = (DATA8 *) (im->pixels + (im->stride * h)); + im->flags.free_alpha = 0; + } + im->flags.free_pixels = 1; + + return 0; +} + +static void +_evas_common_soft8_image_surface_delete(Image_Entry * ie) +{ + Soft8_Image *im = (Soft8_Image *) ie; + + if (im->flags.free_pixels) + free(im->pixels); + im->pixels = NULL; + im->flags.free_pixels = 0; + + if (im->flags.free_alpha) + free(im->alpha); + im->alpha = NULL; + im->flags.free_alpha = 0; +} + +static DATA32 * +_evas_common_soft8_image_surface_pixels(Image_Entry * ie __UNUSED__) +{ + abort(); + + return NULL; +} + +static int +_evas_common_load_soft8_image_from_file(Image_Entry * ie) +{ + Soft8_Image *sim = (Soft8_Image *) ie; + RGBA_Image *im; + int error = 0; + + im = (RGBA_Image *) evas_cache_image_request(evas_common_image_cache_get(), + sim->cache_entry.file, + sim->cache_entry.key, + &sim->cache_entry.load_opts, + &error); + sim->source = im; + if (!sim->source) + return -1; + + sim->cache_entry.w = sim->source->cache_entry.w; + sim->cache_entry.h = sim->source->cache_entry.h; + ie->flags.alpha = im->cache_entry.flags.alpha; + if (sim->stride < 0) + sim->stride = _calc_stride(sim->cache_entry.w); + + return 0; +} + +static void +_evas_common_soft8_image_unload(Image_Entry * ie __UNUSED__) +{ +} + +static void +_evas_common_soft8_image_dirty_region(Image_Entry * im __UNUSED__, + unsigned int x __UNUSED__, + unsigned int y __UNUSED__, + unsigned int w __UNUSED__, + unsigned int h __UNUSED__) +{ +} + +static int +_evas_common_soft8_image_dirty(Image_Entry * ie_dst, const Image_Entry * ie_src) +{ + Soft8_Image *dst = (Soft8_Image *) ie_dst; + Soft8_Image *src = (Soft8_Image *) ie_src; + + evas_cache_image_load_data(&src->cache_entry); + evas_cache_image_surface_alloc(&dst->cache_entry, + src->cache_entry.w, src->cache_entry.h); + +/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ + + return 0; +} + +static int +_evas_common_soft8_image_ram_usage(Image_Entry * ie) +{ + Soft8_Image *im = (Soft8_Image *) ie; + + if (im->pixels && im->flags.free_pixels) + return IMG_BYTE_SIZE(im->stride, im->cache_entry.h, ie->flags.alpha); + return 0; +} + +static int +_evas_common_soft8_image_size_set(Image_Entry * ie_dst, + const Image_Entry * ie_im, + unsigned int w __UNUSED__, + unsigned int h __UNUSED__) +{ + Soft8_Image *dst = (Soft8_Image *) ie_dst; + Soft8_Image *im = (Soft8_Image *) ie_im; + + dst->flags = im->flags; + + return 0; +} + +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 __UNUSED__) +{ + Soft8_Image *im = (Soft8_Image *) ie_dst; + + /* FIXME: handle colorspace */ + ie_dst->w = w; + ie_dst->h = h; + ie_dst->flags.alpha = alpha; + + im->flags.free_pixels = 0; + im->flags.free_alpha = 0; + if (im->stride < 0) + im->stride = _calc_stride(w); + + /* FIXME: That's bad, the application must be aware of the engine internal. */ + im->pixels = (DATA8 *) image_data; + if (ie_dst->flags.alpha) + im->alpha = (DATA8 *) (im->pixels + (im->stride * h)); + + return 0; +} + +static int +_evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst, + unsigned int w __UNUSED__, + unsigned int h, + DATA32 * image_data, + int alpha __UNUSED__, + int cspace __UNUSED__) +{ + Soft8_Image *im = (Soft8_Image *) ie_dst; + + /* FIXME: handle colorspace */ + if (image_data) + memcpy(im->pixels, image_data, + IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); + else + memset(im->pixels, 0, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); + + return 0; +} + +static int +_evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst __UNUSED__, + int cspace __UNUSED__) +{ + /* FIXME: handle colorspace */ + return 0; +} + +static int +_evas_common_load_soft8_image_data_from_file(Image_Entry * ie) +{ + Soft8_Image *im = (Soft8_Image *) ie; + + if (im->pixels) + return 0; + if (!im->source) + return -1; + + evas_cache_image_load_data(&im->source->cache_entry); + if (im->source->image.data) + { + DATA32 *sp; + + evas_cache_image_surface_alloc(&im->cache_entry, + im->source->cache_entry.w, + im->source->cache_entry.h); + + sp = im->source->image.data; + if (im->alpha) + evas_common_soft8_image_convert_from_rgba(im, sp); + else + evas_common_soft8_image_convert_from_rgb(im, sp); + } + evas_cache_image_drop(&im->source->cache_entry); + im->source = NULL; + + return 0; +} + +/* Soft16_Image * */ +/* evas_common_soft16_image_new(int w, unsigned int h, unsigned int stride, int have_alpha, DATA16 *pixels, */ +/* int copy) */ +/* { */ +/* Soft16_Image *im; */ + +/* if (stride < 0) stride = _calc_stride(w); */ + +/* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */ +/* if (!im) return NULL; */ + +/* if (pixels) */ +/* { */ +/* if (copy) */ +/* memcpy(im->pixels, pixels, IMG_BYTE_SIZE(stride, h, have_alpha)); */ +/* else */ +/* { */ +/* im->pixels = pixels; */ +/* if (have_alpha) im->alpha = (DATA8 *)(im->pixels + (stride * h)); */ +/* } */ +/* } */ +/* return im; */ +/* } */ + +static inline void +_get_clip(const RGBA_Draw_Context * dc, const Soft8_Image * im, + Eina_Rectangle * clip) +{ + if (dc->clip.use) + { + EINA_RECTANGLE_SET(clip, dc->clip.x, dc->clip.y, dc->clip.w, + dc->clip.h); + if (clip->x < 0) + { + clip->w += clip->x; + clip->x = 0; + } + if (clip->y < 0) + { + clip->h += clip->y; + clip->y = 0; + } + if ((clip->x + clip->w) > (int)im->cache_entry.w) + clip->w = im->cache_entry.w - clip->x; + if ((clip->y + clip->h) > (int)im->cache_entry.h) + clip->h = im->cache_entry.h - clip->y; + } + else + { + EINA_RECTANGLE_SET(clip, 0, 0, im->cache_entry.w, im->cache_entry.h); + } +} + +static inline int +_is_empty_rectangle(const Eina_Rectangle * r) +{ + return (r->w < 1) || (r->h < 1); +} + +static inline void +_shrink(int *s_pos, int *s_size, int pos, int size) +{ + int d; + + d = (*s_pos) - pos; + if (d < 0) + { + (*s_size) += d; + (*s_pos) = pos; + } + + d = size + pos - (*s_pos); + if ((*s_size) > d) + (*s_size) = d; +} + +static int +_soft8_adjust_areas(Eina_Rectangle * src, + int src_max_x, int src_max_y, Eina_Rectangle * dst, + int dst_max_x, int dst_max_y, Eina_Rectangle * dst_clip) +{ + if (_is_empty_rectangle(src) || + _is_empty_rectangle(dst) || _is_empty_rectangle(dst_clip)) + return 0; + + /* shrink clip */ + _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst->w); + _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst->h); + if (_is_empty_rectangle(dst_clip)) + return 0; + + /* sanitise x */ + if (src->x < 0) + { + dst->x -= (src->x * dst->w) / src->w; + dst->w += (src->x * dst->w) / src->w; + src->w += src->x; + src->x = 0; + } + if (src->x >= src_max_x) + return 0; + if ((src->x + src->w) > src_max_x) + { + dst->w = (dst->w * (src_max_x - src->x)) / (src->w); + src->w = src_max_x - src->x; + } + if (dst->w <= 0) + return 0; + if (src->w <= 0) + return 0; + if (dst_clip->x < 0) + { + dst_clip->w += dst_clip->x; + dst_clip->x = 0; + } + if (dst_clip->w <= 0) + return 0; + if (dst_clip->x >= dst_max_x) + return 0; + + _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x); + if (dst_clip->w <= 0) + return 0; + + /* sanitise y */ + if (src->y < 0) + { + dst->y -= (src->y * dst->h) / src->h; + dst->h += (src->y * dst->h) / src->h; + src->h += src->y; + src->y = 0; + } + if (src->y >= src_max_y) + return 0; + if ((src->y + src->h) > src_max_y) + { + dst->h = (dst->h * (src_max_y - src->y)) / (src->h); + src->h = src_max_y - src->y; + } + if (dst->h <= 0) + return 0; + if (src->h <= 0) + return 0; + if (dst_clip->y < 0) + { + dst_clip->h += dst_clip->y; + dst_clip->y = 0; + } + if (dst_clip->h <= 0) + return 0; + if (dst_clip->y >= dst_max_y) + return 0; + + _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y); + if (dst_clip->h <= 0) + return 0; + + return 1; +} + +static void +_soft8_image_draw_sampled_int(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + Eina_Rectangle sr, Eina_Rectangle dr) +{ + Eina_Rectangle cr; + + if (! + (RECTS_INTERSECT + (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) + return; + if (! + (RECTS_INTERSECT + (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) + return; + + _get_clip(dc, dst, &cr); + if (!_soft8_adjust_areas + (&sr, src->cache_entry.w, src->cache_entry.h, &dr, dst->cache_entry.w, + dst->cache_entry.h, &cr)) + return; + + if ((dr.w == sr.w) && (dr.h == sr.h)) + evas_common_soft8_image_draw_unscaled(src, dst, dc, sr, dr, cr); + else + evas_common_soft8_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr); +} + +EAPI void +evas_common_soft8_image_draw(Soft8_Image * src, Soft8_Image * dst, + RGBA_Draw_Context * dc, + int src_region_x, int src_region_y, + int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, + int dst_region_w, int dst_region_h, + int smooth __UNUSED__) +{ + Eina_Rectangle sr, dr; + Cutout_Rects *rects; + Cutout_Rect *r; + struct RGBA_Draw_Context_clip clip_bkp; + int i; + + /* handle cutouts here! */ + EINA_RECTANGLE_SET(&dr, dst_region_x, dst_region_y, dst_region_w, + dst_region_h); + + if (_is_empty_rectangle(&dr)) + return; + if (! + (RECTS_INTERSECT + (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) + return; + + EINA_RECTANGLE_SET(&sr, src_region_x, src_region_y, src_region_w, + src_region_h); + + if (_is_empty_rectangle(&sr)) + return; + if (! + (RECTS_INTERSECT + (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) + return; + + /* no cutouts - cut right to the chase */ + if (!dc->cutout.rects) + { + _soft8_image_draw_sampled_int(src, dst, dc, sr, dr); + return; + } + + /* save out clip info */ + clip_bkp = dc->clip; + evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, + dst->cache_entry.h); + evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, + dst_region_w, dst_region_h); + /* our clip is 0 size.. abort */ + if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) + { + dc->clip = clip_bkp; + return; + } + rects = evas_common_draw_context_apply_cutouts(dc); + for (i = 0; i < rects->active; i++) + { + r = rects->rects + i; + evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); + _soft8_image_draw_sampled_int(src, dst, dc, sr, dr); + } + evas_common_draw_context_apply_clear_cutouts(rects); + dc->clip = clip_bkp; +} + +EAPI Soft8_Image * +evas_common_soft8_image_alpha_set(Soft8_Image * im, int have_alpha) +{ + Soft8_Image *new_im; + + if (im->cache_entry.flags.alpha == have_alpha) + return im; + + new_im = (Soft8_Image *) evas_cache_image_alone(&im->cache_entry); + + new_im->cache_entry.flags.alpha = have_alpha; + + if (im->cache_entry.w > 0 && im->cache_entry.h) + new_im = + (Soft8_Image *) evas_cache_image_size_set(&new_im->cache_entry, + im->cache_entry.w, + im->cache_entry.h); + + return new_im; +} + +/* Soft16_Image * */ +/* evas_common_soft16_image_size_set(Soft16_Image *old_im, unsigned int w, unsigned int h) */ +/* { */ +/* Soft16_Image *new_im; */ +/* DATA16 *dp, *sp; */ +/* int i, cw, ch, ew; */ + +/* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */ + +/* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */ + +/* if (old_im->cache_entry.w < new_im->cache_entry.w) */ +/* cw = old_im->cache_entry.w; */ +/* else */ +/* cw = new_im->cache_entry.w; */ + +/* ew = new_im->cache_entry.w - cw; */ + +/* if (old_im->cache_entry.h < new_im->cache_entry.h) */ +/* ch = old_im->cache_entry.h; */ +/* else */ +/* ch = new_im->cache_entry.h; */ + +/* dp = new_im->pixels; */ +/* sp = old_im->pixels; */ +/* for (i = 0; i < ch; i++) */ +/* { */ +/* memcpy(dp, sp, cw * sizeof(DATA16)); */ +/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA16)); */ + +/* dp += new_im->stride; */ +/* sp += old_im->stride; */ +/* } */ + +/* if (old_im->flags.have_alpha) */ +/* { */ +/* DATA8 *dp, *sp; */ + +/* dp = new_im->alpha; */ +/* sp = old_im->alpha; */ +/* for (i = 0; i < ch; i++) */ +/* { */ +/* memcpy(dp, sp, cw * sizeof(DATA8)); */ +/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA8)); */ + +/* dp += new_im->stride; */ +/* sp += old_im->stride; */ +/* } */ +/* } */ + +/* evas_cache_image_drop(&old_im->cache_entry); */ +/* return new_im; */ +/* } */ 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 @@ +#include +#include "evas_soft8_scanline_fill.c" +#include + +typedef struct _RGBA_Edge RGBA_Edge; +typedef struct _RGBA_Vertex RGBA_Vertex; + +struct _RGBA_Edge { + float x, dx; + int i; +}; + +struct _RGBA_Vertex { + float x, y; + int i; +}; + +#define POLY_EDGE_DEL(_i) \ +{ \ + int _j; \ + \ + for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ + if (_j < num_active_edges) \ + { \ + num_active_edges--; \ + memmove(&(edges[_j]), &(edges[_j + 1]), \ + (num_active_edges - _j) * sizeof(RGBA_Edge)); \ + } \ +} + +#define POLY_EDGE_ADD(_i, _y) \ +{ \ + int _j; \ + float _dx; \ + RGBA_Vertex *_p, *_q; \ + if (_i < (n - 1)) _j = _i + 1; \ + else _j = 0; \ + if (point[_i].y < point[_j].y) \ + { \ + _p = &(point[_i]); \ + _q = &(point[_j]); \ + } \ + else \ + { \ + _p = &(point[_j]); \ + _q = &(point[_i]); \ + } \ + edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ + edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ + edges[num_active_edges].i = _i; \ + num_active_edges++; \ +} + +static int +polygon_point_sorter(const void *a, const void *b) +{ + RGBA_Vertex *p, *q; + + p = (RGBA_Vertex *) a; + q = (RGBA_Vertex *) b; + if (p->y <= q->y) + return -1; + return 1; +} + +static int +polygon_edge_sorter(const void *a, const void *b) +{ + RGBA_Edge *p, *q; + + p = (RGBA_Edge *) a; + q = (RGBA_Edge *) b; + if (p->x <= q->x) + return -1; + return 1; +} + +void +evas_common_soft8_polygon_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, + RGBA_Polygon_Point * points, int x, int y) +{ + RGBA_Polygon_Point *pt; + RGBA_Vertex *point; + RGBA_Edge *edges; + int num_active_edges; + int n; + int i, j, k; + int y0, y1, yi; + int ext_x, ext_y, ext_w, ext_h; + int *sorted_index; + DATA8 alpha; + DATA8 gry8; + + alpha = A_VAL(&dc->col.col); + if (alpha == 0) + return; + alpha++; + + gry8 = GRY_8_FROM_RGB(&dc->col.col); + + ext_x = 0; + ext_y = 0; + ext_w = dst->cache_entry.w; + ext_h = dst->cache_entry.h; + if (dc->clip.use) + RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h, + dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); + + if ((ext_w <= 0) || (ext_h <= 0)) + return; + + n = 0; + EINA_INLIST_FOREACH(points, pt) n++; + + if (n < 3) + return; + + edges = malloc(sizeof(RGBA_Edge) * n); + if (!edges) + return; + + point = malloc(sizeof(RGBA_Vertex) * n); + if (!point) + { + free(edges); + return; + } + + sorted_index = malloc(sizeof(int) * n); + if (!sorted_index) + { + free(edges); + free(point); + return; + } + + k = 0; + EINA_INLIST_FOREACH(points, pt) + { + point[k].x = pt->x + x; + point[k].y = pt->y + y; + point[k].i = k; + k++; + } + qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); + + for (k = 0; k < n; k++) + sorted_index[k] = point[k].i; + + k = 0; + EINA_INLIST_FOREACH(points, pt) + { + point[k].x = pt->x + x; + point[k].y = pt->y + y; + point[k].i = k; + k++; + } + + y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); + y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); + + k = 0; + num_active_edges = 0; + + for (yi = y0; yi <= y1; yi++) + { + for (; (k < n) && (point[sorted_index[k]].y <= ((float)yi + 0.5)); k++) + { + i = sorted_index[k]; + + if (i > 0) + j = i - 1; + else + j = n - 1; + if (point[j].y <= ((float)yi - 0.5)) + { + POLY_EDGE_DEL(j)} + else if (point[j].y > ((float)yi + 0.5)) + { + POLY_EDGE_ADD(j, yi)} + if (i < (n - 1)) + j = i + 1; + else + j = 0; + if (point[j].y <= ((float)yi - 0.5)) + { + POLY_EDGE_DEL(i)} + else if (point[j].y > ((float)yi + 0.5)) + { + POLY_EDGE_ADD(i, yi)} + } + + qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); + + for (j = 0; j < num_active_edges; j += 2) + { + int x0, x1; + + x0 = ceil(edges[j].x - 0.5); + if (j < (num_active_edges - 1)) + x1 = floor(edges[j + 1].x - 0.5); + else + x1 = x0; + if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) + { + DATA8 *dst_itr; + int w; + + if (x0 < ext_x) + x0 = ext_x; + if (x1 >= (ext_x + ext_w)) + x1 = ext_x + ext_w - 1; + + w = (x1 - x0) + 1; + dst_itr = dst->pixels + (yi * dst->stride) + x0; + + if (alpha == 0xff) + _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); + else + _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); + } + edges[j].x += edges[j].dx; + edges[j + 1].x += edges[j + 1].dx; + } + } + + free(edges); + free(point); + free(sorted_index); +} 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 @@ +#include "evas_common_soft8.h" +#include "evas_soft8_scanline_fill.c" + +static inline int +_is_empty_rectangle(const Eina_Rectangle * r) +{ + return (r->w < 1) || (r->h < 1); +} + +static inline void +_soft8_rectangle_draw_solid_solid(Soft8_Image * dst, int offset, int w, int h, + DATA8 gry8) +{ + DATA8 *dst_itr; + int i; + + dst_itr = dst->pixels + offset; + + for (i = 0; i < h; i++, dst_itr += dst->stride) + _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); +} + +static inline void +_soft8_rectangle_draw_transp_solid(Soft8_Image * dst, int offset, int w, int h, + DATA8 gry8, DATA8 alpha) +{ + DATA8 *dst_itr; + int i; + + dst_itr = dst->pixels + offset; + alpha++; + + for (i = 0; i < h; i++, dst_itr += dst->stride) + _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); +} + +static void +_soft8_rectangle_draw_int(Soft8_Image * dst, RGBA_Draw_Context * dc, + Eina_Rectangle dr) +{ + int dst_offset; + + if (_is_empty_rectangle(&dr)) + return; + RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, + dst->cache_entry.h); + if (_is_empty_rectangle(&dr)) + return; + + if (dc->clip.use) + RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, dc->clip.x, + dc->clip.y, dc->clip.w, dc->clip.h); + if (_is_empty_rectangle(&dr)) + return; + if (A_VAL(&dc->col.col) == 0) + return; + + dst_offset = dr.x + (dr.y * dst->stride); + + if (!dst->cache_entry.flags.alpha) + { + DATA8 gry8; + DATA8 alpha; + + alpha = A_VAL(&dc->col.col); + gry8 = GRY_8_FROM_RGB(&dc->col.col); + + if (alpha == 0xff) + _soft8_rectangle_draw_solid_solid(dst, dst_offset, dr.w, dr.h, gry8); + else if (alpha > 0) + _soft8_rectangle_draw_transp_solid + (dst, dst_offset, dr.w, dr.h, gry8, alpha); + } + else + ERR("Unsupported feature: drawing rectangle to non-opaque destination."); +} + +void +evas_common_soft8_rectangle_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, + int x, int y, int w, int h) +{ + Eina_Rectangle dr; + Cutout_Rects *rects; + Cutout_Rect *r; + struct RGBA_Draw_Context_clip c_bkp; + int i; + + /* handle cutouts here! */ + EINA_RECTANGLE_SET(&dr, x, y, w, h); + + if (_is_empty_rectangle(&dr)) + return; + if (! + (RECTS_INTERSECT + (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) + return; + + /* no cutouts - cut right to the chase */ + if (!dc->cutout.rects) + { + _soft8_rectangle_draw_int(dst, dc, dr); + return; + } + + c_bkp = dc->clip; + + evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, + dst->cache_entry.h); + evas_common_draw_context_clip_clip(dc, x, y, w, h); + /* our clip is 0 size.. abort */ + if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) + { + dc->clip = c_bkp; + return; + } + rects = evas_common_draw_context_apply_cutouts(dc); + for (i = 0; i < rects->active; ++i) + { + r = rects->rects + i; + evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); + _soft8_rectangle_draw_int(dst, dc, dr); + } + evas_common_draw_context_apply_clear_cutouts(rects); + dc->clip = c_bkp; +} 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 @@ +/** NOTE: This file is meant to be included by users **/ + +/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive. + ** this is due our division by 256 when multiplying the color. + **/ + +/***************************************************************************** + * Scanline processing + * + * _soft8_scanline___[_]() + * + ****************************************************************************/ + +EFL_ALWAYS_INLINE void +_soft8_pt_blend_transp_solid(DATA8 * p_dst, DATA8 src, DATA8 alpha) +{ + if (alpha == 0xff) + *p_dst = src; + else if (alpha != 0) + { + *p_dst = GRY_8_BLEND(src, *p_dst, alpha); + } +} + +/*********************************************************************** + * Regular blend operations + */ +static void +_soft8_scanline_blend_transp_solid(DATA8 * src, DATA8 * alpha, DATA8 * dst, + int size) +{ + DATA8 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(alpha, 0); + pld(src, 0); + + /* work on 8 pixels per time, do data preload */ + while (start < end) + { + DATA8 alpha1, alpha2; + + alpha1 = alpha[0]; + alpha += 8; + + /* empirical tests show these give the best performance */ + pld(alpha, 8); + pld(src, 32); + + src += 8; + start += 8; + + alpha2 = alpha[-7]; + _soft8_pt_blend_transp_solid(start - 8, src[-8], alpha1); + + alpha1 = alpha[-6]; + _soft8_pt_blend_transp_solid(start - 7, src[-7], alpha2); + + alpha2 = alpha[-5]; + _soft8_pt_blend_transp_solid(start - 6, src[-6], alpha1); + + alpha1 = alpha[-4]; + _soft8_pt_blend_transp_solid(start - 5, src[-5], alpha2); + + alpha2 = alpha[-3]; + _soft8_pt_blend_transp_solid(start - 4, src[-4], alpha1); + + alpha1 = alpha[-2]; + _soft8_pt_blend_transp_solid(start - 3, src[-3], alpha2); + + alpha2 = alpha[-1]; + _soft8_pt_blend_transp_solid(start - 2, src[-2], alpha1); + + _soft8_pt_blend_transp_solid(start - 1, src[-1], alpha2); + } + + /* remaining pixels (up to 7) */ + end = start + (size & 7); + for (; start < end; start++, src++, alpha++) + _soft8_pt_blend_transp_solid(start, *src, *alpha); +} + +EFL_ALWAYS_INLINE void +_soft8_pt_blend_solid_solid(DATA8 * p_dst, DATA8 src) +{ + *p_dst = src; +} + +static inline void +_soft8_scanline_blend_solid_solid(DATA8 * src, DATA8 * dst, int size) +{ + memcpy(dst, src, size * sizeof(DATA8)); +} + +/*********************************************************************** + * Blend operations taking an extra alpha (fade in, out) + */ + +static inline void +_soft8_pt_blend_transp_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 alpha, + DATA8 rel_alpha) +{ + alpha = alpha * rel_alpha; + if (alpha == 0) + return; + + alpha++; + *p_dst = GRY_8_BLEND((src * rel_alpha) & 0xff, *p_dst, alpha); +} + +static void +_soft8_scanline_blend_transp_solid_mul_alpha(DATA8 * src, DATA8 * alpha, + DATA8 * dst, int size, + const DATA8 rel_alpha) +{ + DATA8 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(alpha, 0); + pld(src, 0); + + while (start < end) + { + DATA8 alpha1, alpha2; + + alpha1 = alpha[0]; + alpha += 8; + + pld(alpha, 8); + pld(src, 32); + + src += 8; + start += 8; + + alpha2 = alpha[-7]; + _soft8_pt_blend_transp_solid_mul_alpha + (start - 8, src[-8], alpha1, rel_alpha); + + alpha1 = alpha[-6]; + _soft8_pt_blend_transp_solid_mul_alpha + (start - 7, src[-7], alpha2, rel_alpha); + + alpha2 = alpha[-5]; + _soft8_pt_blend_transp_solid_mul_alpha + (start - 6, src[-6], alpha1, rel_alpha); + + alpha1 = alpha[-4]; + _soft8_pt_blend_transp_solid_mul_alpha + (start - 5, src[-5], alpha2, rel_alpha); + + alpha2 = alpha[-3]; + _soft8_pt_blend_transp_solid_mul_alpha + (start - 4, src[-4], alpha1, rel_alpha); + + alpha1 = alpha[-2]; + _soft8_pt_blend_transp_solid_mul_alpha + (start - 3, src[-3], alpha2, rel_alpha); + + alpha2 = alpha[-1]; + _soft8_pt_blend_transp_solid_mul_alpha + (start - 2, src[-2], alpha1, rel_alpha); + + _soft8_pt_blend_transp_solid_mul_alpha + (start - 1, src[-1], alpha2, rel_alpha); + } + + end = start + (size & 7); + for (; start < end; start++, src++, alpha++) + _soft8_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha); +} + +EFL_ALWAYS_INLINE void +_soft8_pt_blend_solid_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 rel_alpha) +{ + *p_dst = GRY_8_BLEND_UNMUL(src, *p_dst, rel_alpha); +} + +static void +_soft8_scanline_blend_solid_solid_mul_alpha(DATA8 * src, DATA8 * dst, int size, + DATA8 rel_alpha) +{ + DATA8 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(src, 0); + + while (start < end) + { + pld(src, 32); + UNROLL8( + { + _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); + start++; src++;} + ); + } + + end = start + (size & 7); + for (; start < end; start++, src++) + _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); +} + +/*********************************************************************** + * Blend operations with extra alpha and multiply color + */ + +EFL_ALWAYS_INLINE void +_soft8_pt_blend_transp_solid_mul_color_transp(DATA8 * p_dst, DATA8 src, + DATA8 alpha, DATA8 rel_alpha, + DATA8 r, DATA8 g, DATA8 b) +{ + alpha = alpha * rel_alpha; + if (alpha == 0) + return; + + alpha++; + + DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; + *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha); +} + +static void +_soft8_scanline_blend_transp_solid_mul_color_transp(DATA8 * src, DATA8 * alpha, + DATA8 * dst, int size, + DATA8 rel_alpha, DATA8 r, + DATA8 g, DATA8 b) +{ + DATA8 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(alpha, 0); + pld(src, 0); + + while (start < end) + { + DATA8 alpha1, alpha2; + + alpha1 = alpha[0]; + alpha += 8; + + pld(src, 32); + pld(start, 32); + + src += 8; + start += 8; + + alpha2 = alpha[-7]; + _soft8_pt_blend_transp_solid_mul_color_transp + (start - 8, src[-8], alpha1, rel_alpha, r, g, b); + + alpha1 = alpha[-6]; + _soft8_pt_blend_transp_solid_mul_color_transp + (start - 7, src[-7], alpha2, rel_alpha, r, g, b); + + alpha2 = alpha[-5]; + _soft8_pt_blend_transp_solid_mul_color_transp + (start - 6, src[-6], alpha1, rel_alpha, r, g, b); + + alpha1 = alpha[-4]; + _soft8_pt_blend_transp_solid_mul_color_transp + (start - 5, src[-5], alpha2, rel_alpha, r, g, b); + + alpha2 = alpha[-3]; + _soft8_pt_blend_transp_solid_mul_color_transp + (start - 4, src[-4], alpha1, rel_alpha, r, g, b); + + alpha1 = alpha[-2]; + _soft8_pt_blend_transp_solid_mul_color_transp + (start - 3, src[-3], alpha2, rel_alpha, r, g, b); + + alpha2 = alpha[-1]; + _soft8_pt_blend_transp_solid_mul_color_transp + (start - 2, src[-2], alpha1, rel_alpha, r, g, b); + + _soft8_pt_blend_transp_solid_mul_color_transp + (start - 1, src[-1], alpha2, rel_alpha, r, g, b); + } + + end = start + (size & 7); + for (; start < end; start++, src++, alpha++) + _soft8_pt_blend_transp_solid_mul_color_transp + (start, *src, *alpha, rel_alpha, r, g, b); +} + +EFL_ALWAYS_INLINE void +_soft8_pt_blend_solid_solid_mul_color_transp(DATA8 * p_dst, DATA8 src, + DATA8 rel_alpha, DATA8 r, DATA8 g, + DATA8 b) +{ + DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; + *p_dst = GRY_8_BLEND(gry8, *p_dst, rel_alpha); +} + +static void +_soft8_scanline_blend_solid_solid_mul_color_transp(DATA8 * src, DATA8 * dst, + int size, DATA8 rel_alpha, + DATA8 r, DATA8 g, DATA8 b) +{ + DATA8 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(src, 0); + + while (start < end) + { + pld(src, 32); + UNROLL8( + { + _soft8_pt_blend_solid_solid_mul_color_transp + (start, *src, rel_alpha, r, g, b); start++; src++;} + ); + } + + end = start + (size & 7); + for (; start < end; start++, src++) + _soft8_pt_blend_solid_solid_mul_color_transp + (start, *src, rel_alpha, r, g, b); +} + +/*********************************************************************** + * Blend operations with extra multiply color + */ +EFL_ALWAYS_INLINE void +_soft8_pt_blend_transp_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, + DATA8 alpha, DATA8 r, DATA8 g, + DATA8 b) +{ + if (alpha == 0) + return; + + DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; + + if (alpha == 0xff) + *p_dst = gry8; + else + { + *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha); + } +} + +static void +_soft8_scanline_blend_transp_solid_mul_color_solid(DATA8 * src, DATA8 * alpha, + DATA8 * dst, int size, + DATA8 r, DATA8 g, DATA8 b) +{ + DATA8 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(alpha, 0); + pld(src, 0); + + while (start < end) + { + DATA8 alpha1, alpha2; + + alpha1 = alpha[0]; + alpha += 8; + + pld(alpha, 8); + pld(src, 32); + + src += 8; + start += 8; + + alpha2 = alpha[-7]; + _soft8_pt_blend_transp_solid_mul_color_solid + (start - 8, src[-8], alpha1, r, g, b); + + alpha1 = alpha[-6]; + _soft8_pt_blend_transp_solid_mul_color_solid + (start - 7, src[-7], alpha2, r, g, b); + + alpha2 = alpha[-5]; + _soft8_pt_blend_transp_solid_mul_color_solid + (start - 6, src[-6], alpha1, r, g, b); + + alpha1 = alpha[-4]; + _soft8_pt_blend_transp_solid_mul_color_solid + (start - 5, src[-5], alpha2, r, g, b); + + alpha2 = alpha[-3]; + _soft8_pt_blend_transp_solid_mul_color_solid + (start - 4, src[-4], alpha1, r, g, b); + + alpha1 = alpha[-2]; + _soft8_pt_blend_transp_solid_mul_color_solid + (start - 3, src[-3], alpha2, r, g, b); + + alpha2 = alpha[-1]; + _soft8_pt_blend_transp_solid_mul_color_solid + (start - 2, src[-2], alpha1, r, g, b); + + _soft8_pt_blend_transp_solid_mul_color_solid + (start - 1, src[-1], alpha2, r, g, b); + } + + end = start + (size & 7); + for (; start < end; start++, src++, alpha++) + _soft8_pt_blend_transp_solid_mul_color_solid + (start, *src, *alpha, r, g, b); +} + +EFL_ALWAYS_INLINE void +_soft8_pt_blend_solid_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, DATA8 r, + DATA8 g, DATA8 b) +{ + *p_dst = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; +} + +static void +_soft8_scanline_blend_solid_solid_mul_color_solid(DATA8 * src, DATA8 * dst, + int size, DATA8 r, DATA8 g, + DATA8 b) +{ + DATA8 *start, *end; + + start = dst; + end = start + (size & ~7); + + pld(src, 0); + + while (start < end) + { + pld(src, 32); + UNROLL8( + { + _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, + b); start++; + src++;} + ); + } + + end = start + (size & 7); + for (; start < end; start++, src++) + _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b); +} 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 @@ +/** NOTE: This file is meant to be included by users **/ + +/***************************************************************************** + * Point processing + * + * _soft8_pt___[_]() + * + * Scanline processing + * + * _soft8_scanline___[_]() + * + ****************************************************************************/ +EFL_ALWAYS_INLINE void +_soft8_pt_fill_solid_solid(DATA8 * dst, DATA8 gry8) +{ + *dst = gry8; +} + +EFL_ALWAYS_INLINE void +_soft8_scanline_fill_solid_solid(DATA8 * dst, int size, DATA8 gry8) +{ + memset(dst, gry8, size); +} + +EFL_ALWAYS_INLINE void +_soft8_pt_fill_transp_solid(DATA8 * dst, DATA8 gry8, DATA8 alpha) +{ + *dst = GRY_8_BLEND(gry8, *dst, alpha); +} + +static void +_soft8_scanline_fill_transp_solid(DATA8 * dst, int size, DATA8 gry8, + DATA8 alpha) +{ + DATA8 *start, *end; + + start = dst; + pld(start, 0); + end = start + (size & ~7); + + while (start < end) + { + pld(start, 32); + UNROLL8( + { + _soft8_pt_fill_transp_solid(start, gry8, alpha); start++;} + ); + } + + end = start + (size & 7); + for (; start < end; start++) + _soft8_pt_fill_transp_solid(start, gry8, alpha); +} diff --git a/libraries/evas/src/lib/file/Makefile.am b/libraries/evas/src/lib/file/Makefile.am new file mode 100644 index 0000000..7875fbe --- /dev/null +++ b/libraries/evas/src/lib/file/Makefile.am @@ -0,0 +1,25 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@FREETYPE_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ \ +@PIXMAN_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +noinst_LTLIBRARIES = libevas_file.la +libevas_file_la_SOURCES = \ +evas_path.c \ +evas_module.c +libevas_file_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ + +EXTRA_DIST = evas_module.h evas_path.h diff --git a/libraries/evas/src/lib/file/Makefile.in b/libraries/evas/src/lib/file/Makefile.in new file mode 100644 index 0000000..599d980 --- /dev/null +++ b/libraries/evas/src/lib/file/Makefile.in @@ -0,0 +1,680 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/file +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libevas_file_la_DEPENDENCIES = +am_libevas_file_la_OBJECTS = evas_path.lo evas_module.lo +libevas_file_la_OBJECTS = $(am_libevas_file_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_file_la_SOURCES) +DIST_SOURCES = $(libevas_file_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@FREETYPE_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ \ +@PIXMAN_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +noinst_LTLIBRARIES = libevas_file.la +libevas_file_la_SOURCES = \ +evas_path.c \ +evas_module.c + +libevas_file_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ +EXTRA_DIST = evas_module.h evas_path.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/file/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/file/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_file.la: $(libevas_file_la_OBJECTS) $(libevas_file_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libevas_file_la_OBJECTS) $(libevas_file_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_module.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_path.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/file/evas_module.c b/libraries/evas/src/lib/file/evas_module.c new file mode 100644 index 0000000..6b4d4f6 --- /dev/null +++ b/libraries/evas/src/lib/file/evas_module.c @@ -0,0 +1,586 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include +#include + + +static Eina_Hash *evas_modules[4] = { + NULL, + NULL, + NULL, + NULL +}; + +static Eina_List *eina_evas_modules = NULL; +static Eina_List *evas_module_paths = NULL; +static Eina_Array *evas_engines = NULL; + +static Eina_List * +_evas_module_append(Eina_List *list, char *path) +{ + if (path) + { + if (evas_file_path_exists(path)) + list = eina_list_append(list, path); + else + free(path); + } + return list; +} + +/* this will alloc a list of paths to search for the modules */ +/* by now these are: */ +/* 1. ~/.evas/modules/ */ +/* 2. $(EVAS_MODULE_DIR)/evas/modules/ */ +/* 3. dladdr/evas/modules/ */ +/* 4. PREFIX/evas/modules/ */ +void +evas_module_paths_init(void) +{ + char *path; + + /* 1. ~/.evas/modules/ */ + path = eina_module_environment_path_get("HOME", "/.evas/modules"); + evas_module_paths = _evas_module_append(evas_module_paths, path); + + /* 2. $(EVAS_MODULE_DIR)/evas/modules/ */ + path = eina_module_environment_path_get("EVAS_MODULES_DIR", "/evas/modules"); + if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) + free(path); + else + evas_module_paths = _evas_module_append(evas_module_paths, path); + + /* 3. libevas.so/../evas/modules/ */ + path = eina_module_symbol_path_get(evas_module_paths_init, "/evas/modules"); + if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) + free(path); + else + evas_module_paths = _evas_module_append(evas_module_paths, path); + + /* 4. PREFIX/evas/modules/ */ +#ifndef _MSC_VER + path = PACKAGE_LIB_DIR "/evas/modules"; + if (!eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) + { + path = strdup(path); + if (path) + evas_module_paths = _evas_module_append(evas_module_paths, path); + } +#endif +} + +#define EVAS_EINA_STATIC_MODULE_DEFINE(Tn, Name) \ + Eina_Bool evas_##Tn##_##Name##_init(void); \ + void evas_##Tn##_##Name##_shutdown(void); + +#define EVAS_EINA_STATIC_MODULE_USE(Tn, Name) \ + { evas_##Tn##_##Name##_init, evas_##Tn##_##Name##_shutdown } + +EVAS_EINA_STATIC_MODULE_DEFINE(engine, buffer); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, direct3d); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, directfb); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, fb); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_x11); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_sdl); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, psl1ght); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_ddraw); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_sdl); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_wince); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_x11); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_8); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_8_x11); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_ddraw); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_gdi); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_generic); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_sdl); +EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_x11); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, bmp); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, edb); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, eet); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, generic); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, gif); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, ico); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, jpeg); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, pmaps); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, png); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, psd); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, svg); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tga); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tiff); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, wbmp); +EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, xpm); +EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, edb); +EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, eet); +EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, jpeg); +EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, png); +EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, tiff); + +static const struct { + Eina_Bool (*init)(void); + void (*shutdown)(void); +} evas_static_module[] = { +#ifdef EVAS_STATIC_BUILD_BUFFER + EVAS_EINA_STATIC_MODULE_USE(engine, buffer), +#endif +#ifdef EVAS_STATIC_BUILD_DIRECT3D + EVAS_EINA_STATIC_MODULE_USE(engine, direct3d), +#endif +#ifdef EVAS_STATIC_BUILD_DIRECTFB + EVAS_EINA_STATIC_MODULE_USE(engine, directfb), +#endif +#ifdef EVAS_STATIC_BUILD_FB + EVAS_EINA_STATIC_MODULE_USE(engine, fb), +#endif +#ifdef EVAS_STATIC_BUILD_GL_X11 + EVAS_EINA_STATIC_MODULE_USE(engine, gl_x11), +#endif +#ifdef EVAS_STATIC_BUILD_GL_SDL + EVAS_EINA_STATIC_MODULE_USE(engine, gl_sdl), +#endif +#ifdef EVAS_STATIC_BUILD_PSL1GHT + EVAS_EINA_STATIC_MODULE_USE(engine, psl1ght), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_16 + EVAS_EINA_STATIC_MODULE_USE(engine, software_16), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW + EVAS_EINA_STATIC_MODULE_USE(engine, software_16_ddraw), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_SDL + EVAS_EINA_STATIC_MODULE_USE(engine, software_16_sdl), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_WINCE + EVAS_EINA_STATIC_MODULE_USE(engine, software_16_wince), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_X11 + EVAS_EINA_STATIC_MODULE_USE(engine, software_16_x11), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW + EVAS_EINA_STATIC_MODULE_USE(engine, software_ddraw), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_GDI + EVAS_EINA_STATIC_MODULE_USE(engine, software_gdi), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_8 + EVAS_EINA_STATIC_MODULE_USE(engine, software_8), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_8_X11 + EVAS_EINA_STATIC_MODULE_USE(engine, software_8_x11), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_GENERIC + EVAS_EINA_STATIC_MODULE_USE(engine, software_generic), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_SDL + EVAS_EINA_STATIC_MODULE_USE(engine, software_sdl), +#endif +#ifdef EVAS_STATIC_BUILD_SOFTWARE_X11 + EVAS_EINA_STATIC_MODULE_USE(engine, software_x11), +#endif +#ifdef EVAS_STATIC_BUILD_BMP + EVAS_EINA_STATIC_MODULE_USE(image_loader, bmp), +#endif +#ifdef EVAS_STATIC_BUILD_EDB + EVAS_EINA_STATIC_MODULE_USE(image_loader, edb), +#endif +#ifdef EVAS_STATIC_BUILD_EET + EVAS_EINA_STATIC_MODULE_USE(image_loader, eet), +#endif +#ifdef EVAS_STATIC_BUILD_GENERIC + EVAS_EINA_STATIC_MODULE_USE(image_loader, generic), +#endif +#ifdef EVAS_STATIC_BUILD_GIF + EVAS_EINA_STATIC_MODULE_USE(image_loader, gif), +#endif +#ifdef EVAS_STATIC_BUILD_ICO + EVAS_EINA_STATIC_MODULE_USE(image_loader, ico), +#endif +#ifdef EVAS_STATIC_BUILD_JPEG + EVAS_EINA_STATIC_MODULE_USE(image_loader, jpeg), +#endif +#ifdef EVAS_STATIC_BUILD_PMAPS + EVAS_EINA_STATIC_MODULE_USE(image_loader, pmaps), +#endif +#ifdef EVAS_STATIC_BUILD_PNG + EVAS_EINA_STATIC_MODULE_USE(image_loader, png), +#endif +#ifdef EVAS_STATIC_BUILD_PSD + EVAS_EINA_STATIC_MODULE_USE(image_loader, psd), +#endif +#ifdef EVAS_STATIC_BUILD_SVG + EVAS_EINA_STATIC_MODULE_USE(image_loader, svg), +#endif +#ifdef EVAS_STATIC_BUILD_TGA + EVAS_EINA_STATIC_MODULE_USE(image_loader, tga), +#endif +#ifdef EVAS_STATIC_BUILD_TIFF + EVAS_EINA_STATIC_MODULE_USE(image_loader, tiff), +#endif +#ifdef EVAS_STATIC_BUILD_WBMP + EVAS_EINA_STATIC_MODULE_USE(image_loader, wbmp), +#endif +#ifdef EVAS_STATIC_BUILD_XPM + EVAS_EINA_STATIC_MODULE_USE(image_loader, xpm), +#endif +#ifdef EVAS_STATIC_BUILD_EDB + EVAS_EINA_STATIC_MODULE_USE(image_saver, edb), +#endif +#ifdef EVAS_STATIC_BUILD_EET + EVAS_EINA_STATIC_MODULE_USE(image_saver, eet), +#endif +#if defined (EVAS_BUILD_SAVER_JPEG) && defined (EVAS_STATIC_BUILD_JPEG) + EVAS_EINA_STATIC_MODULE_USE(image_saver, jpeg), +#endif +#ifdef EVAS_STATIC_BUILD_PNG + EVAS_EINA_STATIC_MODULE_USE(image_saver, png), +#endif +#ifdef EVAS_STATIC_BUILD_TIFF + EVAS_EINA_STATIC_MODULE_USE(image_saver, tiff), +#endif + { NULL, NULL } +}; + +/* this will alloc an Evas_Module struct for each module + * it finds on the paths */ +void +evas_module_init(void) +{ + int i; + + evas_module_paths_init(); + + evas_modules[EVAS_MODULE_TYPE_ENGINE] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); + evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); + evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); + evas_modules[EVAS_MODULE_TYPE_OBJECT] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); + + evas_engines = eina_array_new(4); + + for (i = 0; evas_static_module[i].init; ++i) + evas_static_module[i].init(); +} + +Eina_Bool +evas_module_register(const Evas_Module_Api *module, Evas_Module_Type type) +{ + Evas_Module *em; + + if ((unsigned int)type > 3) return EINA_FALSE; + if (!module) return EINA_FALSE; + if (module->version != EVAS_MODULE_API_VERSION) return EINA_FALSE; + + em = eina_hash_find(evas_modules[type], module->name); + if (em) return EINA_FALSE; + + em = calloc(1, sizeof (Evas_Module)); + if (!em) return EINA_FALSE; + + em->definition = module; + + if (type == EVAS_MODULE_TYPE_ENGINE) + { + eina_array_push(evas_engines, em); + em->id_engine = eina_array_count_get(evas_engines); + } + + eina_hash_direct_add(evas_modules[type], module->name, em); + + return EINA_TRUE; +} + +Eina_List * +evas_module_engine_list(void) +{ + Evas_Module *em; + Eina_List *r = NULL; + Eina_Array_Iterator iterator; + unsigned int i; + + EINA_ARRAY_ITER_NEXT(evas_engines, i, em, iterator) + r = eina_list_append(r, em->definition->name); + + return r; +} + +Eina_Bool +evas_module_unregister(const Evas_Module_Api *module, Evas_Module_Type type) +{ + Evas_Module *em; + + if ((unsigned int)type > 3) return EINA_FALSE; + if (!module) return EINA_FALSE; + + em = eina_hash_find(evas_modules[type], module->name); + if (!em || em->definition != module) return EINA_FALSE; + + if (type == EVAS_MODULE_TYPE_ENGINE) + eina_array_data_set(evas_engines, em->id_engine, NULL); + + eina_hash_del(evas_modules[type], module->name, em); + free(em); + + return EINA_TRUE; +} + +#if defined(__CEGCC__) || defined(__MINGW32CE__) +# define EVAS_MODULE_NAME_IMAGE_SAVER "saver_%s.dll" +# define EVAS_MODULE_NAME_IMAGE_LOADER "loader_%s.dll" +# define EVAS_MODULE_NAME_ENGINE "engine_%s.dll" +# define EVAS_MODULE_NAME_OBJECT "object_%s.dll" +#elif _WIN32 +# define EVAS_MODULE_NAME_IMAGE_SAVER "module.dll" +# define EVAS_MODULE_NAME_IMAGE_LOADER "module.dll" +# define EVAS_MODULE_NAME_ENGINE "module.dll" +# define EVAS_MODULE_NAME_OBJECT "module.dll" +#else +# define EVAS_MODULE_NAME_IMAGE_SAVER "module.so" +# define EVAS_MODULE_NAME_IMAGE_LOADER "module.so" +# define EVAS_MODULE_NAME_ENGINE "module.so" +# define EVAS_MODULE_NAME_OBJECT "module.so" +#endif + +Evas_Module * +evas_module_find_type(Evas_Module_Type type, const char *name) +{ + const char *path; + const char *format = NULL; + char buffer[4096]; + Evas_Module *em; + Eina_Module *en; + Eina_List *l; + + if ((unsigned int)type > 3) return NULL; + + em = eina_hash_find(evas_modules[type], name); + if (em) return em; + + EINA_LIST_FOREACH(evas_module_paths, l, path) + { + switch (type) + { + case EVAS_MODULE_TYPE_ENGINE: format = "%s/engines/%s/%s/" EVAS_MODULE_NAME_ENGINE; break; + case EVAS_MODULE_TYPE_IMAGE_LOADER: format = "%s/loaders/%s/%s/" EVAS_MODULE_NAME_IMAGE_LOADER; break; + case EVAS_MODULE_TYPE_IMAGE_SAVER: format = "%s/savers/%s/%s/" EVAS_MODULE_NAME_IMAGE_SAVER; break; + case EVAS_MODULE_TYPE_OBJECT: format = "%s/object/%s/%s/" EVAS_MODULE_NAME_OBJECT; break; + } + + snprintf(buffer, sizeof (buffer), format, path, name, MODULE_ARCH, name); + if (!evas_file_path_is_file(buffer)) continue; + + en = eina_module_new(buffer); + if (!en) continue; + + if (!eina_module_load(en)) + { + eina_module_free(en); + continue; + } + + em = eina_hash_find(evas_modules[type], name); + if (em) + { + eina_evas_modules = eina_list_append(eina_evas_modules, en); + return em; + } + + eina_module_free(en); + } + + return NULL; +} + +Evas_Module * +evas_module_engine_get(int render_method) +{ + if ((render_method <= 0) || + ((unsigned int)render_method > eina_array_count_get(evas_engines))) + return NULL; + return eina_array_data_get(evas_engines, render_method - 1); +} + +void +evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata) +{ + eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER], cb, fdata); +} + +int +evas_module_load(Evas_Module *em) +{ + if (em->loaded) return 1; + if (!em->definition) return 0; + + if (!em->definition->func.open(em)) return 0; + em->loaded = 1; + +#ifdef BUILD_ASYNC_PRELOAD + LKI(em->lock); +#endif + return 1; +} + +void +evas_module_unload(Evas_Module *em) +{ + if (!em->loaded) + return; + if (!em->definition) + return ; + +// for now lets not unload modules - they may still be in use. +// em->definition->func.close(em); +// em->loaded = 0; + +#ifdef BUILD_ASYNC_PRELOAD + LKD(em->lock); +#endif +} + +void +evas_module_ref(Evas_Module *em) +{ +#ifdef BUILD_ASYNC_PRELOAD + LKL(em->lock); +#endif + em->ref++; +#ifdef BUILD_ASYNC_PRELOAD + LKU(em->lock); +#endif +} + +void +evas_module_unref(Evas_Module *em) +{ +#ifdef BUILD_ASYNC_PRELOAD + LKL(em->lock); +#endif + em->ref--; +#ifdef BUILD_ASYNC_PRELOAD + LKU(em->lock); +#endif +} + +static int use_count = 0; + +void +evas_module_use(Evas_Module *em) +{ + em->last_used = use_count; +} + +void +evas_module_clean(void) +{ + static int call_count = 0; +/* int ago; */ + int noclean = -1; +/* Eina_List *l; */ +/* Evas_Module *em; */ + + /* only clean modules every 256 calls */ + call_count++; + if (call_count <= 256) return; + call_count = 0; + + if (noclean == -1) + { + if (getenv("EVAS_NOCLEAN")) + noclean = 1; + else + noclean = 0; + } + if (noclean == 1) return; + + /* disable module cleaning for now - may cause instability with some modules */ + return; + + /* FIXME: Don't know what it is supposed to do. */ +/* /\* incriment use counter = 28bits *\/ */ +/* use_count++; */ +/* if (use_count > 0x0fffffff) use_count = 0; */ + +/* /\* printf("CLEAN!\n"); *\/ */ +/* /\* go through all modules *\/ */ +/* EINA_LIST_FOREACH(evas_modules, l, em) */ +/* { */ +/* /\* printf("M %s %i %i\n", em->name, em->ref, em->loaded); *\/ */ +/* /\* if the module is refernced - skip *\/ */ +/* if ((em->ref > 0) || (!em->loaded)) continue; */ +/* /\* how many clean cycles ago was this module last used *\/ */ +/* ago = use_count - em->last_used; */ +/* if (em->last_used > use_count) ago += 0x10000000; */ +/* /\* if it was used last more than N clean cycles ago - unload *\/ */ +/* if (ago > 5) */ +/* { */ +/* /\* printf(" UNLOAD %s\n", em->name); *\/ */ +/* evas_module_unload(em); */ +/* } */ +/* } */ +} + +/* will dlclose all the modules loaded and free all the structs */ +void +evas_module_shutdown(void) +{ + Eina_Module *en; + char *path; + int i; + + for (i = 0; evas_static_module[i].shutdown; ++i) + evas_static_module[i].shutdown(); + + EINA_LIST_FREE(eina_evas_modules, en) + eina_module_free(en); + + eina_hash_free(evas_modules[EVAS_MODULE_TYPE_ENGINE]); + evas_modules[EVAS_MODULE_TYPE_ENGINE] = NULL; + eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER]); + evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = NULL; + eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER]); + evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = NULL; + eina_hash_free(evas_modules[EVAS_MODULE_TYPE_OBJECT]); + evas_modules[EVAS_MODULE_TYPE_OBJECT] = NULL; + + EINA_LIST_FREE(evas_module_paths, path) + free(path); + + eina_array_free(evas_engines); + evas_engines = NULL; +} + +EAPI int +_evas_module_engine_inherit(Evas_Func *funcs, char *name) +{ + Evas_Module *em; + + em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name); + if (em) + { + if (evas_module_load(em)) + { + /* FIXME: no way to unref */ + evas_module_ref(em); + evas_module_use(em); + *funcs = *((Evas_Func *)(em->functions)); + return 1; + } + } + return 0; +} + +static Eina_Prefix *pfx = NULL; + +EAPI const char * +_evas_module_libdir_get(void) +{ + if (!pfx) pfx = eina_prefix_new + (NULL, _evas_module_libdir_get, "EVAS", "evas", NULL, + PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, PACKAGE_DATA_DIR, PACKAGE_DATA_DIR); + if (!pfx) return NULL; + return eina_prefix_lib_get(pfx); +} diff --git a/libraries/evas/src/lib/file/evas_module.h b/libraries/evas/src/lib/file/evas_module.h new file mode 100644 index 0000000..8699b6b --- /dev/null +++ b/libraries/evas/src/lib/file/evas_module.h @@ -0,0 +1,94 @@ +#ifndef _EVAS_MODULE_H +#define _EVAS_MODULE_H + + +/* the module api version */ +#define EVAS_MODULE_API_VERSION 2 + + +/* the module types */ +typedef enum _Evas_Module_Type +{ + EVAS_MODULE_TYPE_ENGINE = 0, + EVAS_MODULE_TYPE_IMAGE_LOADER = 1, + EVAS_MODULE_TYPE_IMAGE_SAVER = 2, + EVAS_MODULE_TYPE_OBJECT = 3 +} Evas_Module_Type; + + +typedef struct _Evas_Module_Api Evas_Module_Api; +typedef struct _Evas_Module Evas_Module; +typedef struct _Evas_Module_Path Evas_Module_Path; +typedef struct _Evas_Module_Engine Evas_Module_Engine; +typedef struct _Evas_Module_Public Evas_Module_Public; + +/* the module api structure, all modules should define this struct */ +struct _Evas_Module_Api +{ + int version; + const char *name; + const char *author; + + struct + { + int (*open)(Evas_Module *); + void (*close)(Evas_Module *); + } func; +}; + +/* the module structure */ +struct _Evas_Module +{ + const Evas_Module_Api *definition; + + void *functions; /* this are the functions exported by the module */ + int id_engine; /* some internal data for the module i.e the id for engines */ + + int ref; /* how many refs */ + int last_used; /* the cycle count when it was last used */ + + LK(lock); + + unsigned char loaded : 1; +}; + + +/* the internals of the module api use this struct to reference a path with a module type + * instead of deduce the type from the path. + * */ +struct _Evas_Module_Path +{ + Evas_Module_Type type; + char *path; +}; + +void evas_module_paths_init (void); +void evas_module_init (void); +Evas_Module *evas_module_find_type (Evas_Module_Type type, const char *name); +Evas_Module *evas_module_engine_get(int render_method); +void evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata); +int evas_module_load (Evas_Module *em); +void evas_module_unload (Evas_Module *em); +void evas_module_ref (Evas_Module *em); +void evas_module_unref (Evas_Module *em); +void evas_module_use (Evas_Module *em); +void evas_module_clean (void); +void evas_module_shutdown (void); +EAPI Eina_Bool evas_module_register (const Evas_Module_Api *module, Evas_Module_Type type); +EAPI Eina_Bool evas_module_unregister (const Evas_Module_Api *module, Evas_Module_Type type); + +#define EVAS_MODULE_DEFINE(Type, Tn, Name) \ + Eina_Bool evas_##Tn##_##Name##_init(void) \ + { \ + return evas_module_register(&evas_modapi, Type); \ + } \ + void evas_##Tn##_##Name##_shutdown(void) \ + { \ + evas_module_unregister(&evas_modapi, Type); \ + } + +#define EVAS_EINA_MODULE_DEFINE(Tn, Name) \ + EINA_MODULE_INIT(evas_##Tn##_##Name##_init); \ + EINA_MODULE_SHUTDOWN(evas_##Tn##_##Name##_shutdown); + +#endif /* _EVAS_MODULE_H */ diff --git a/libraries/evas/src/lib/file/evas_path.c b/libraries/evas/src/lib/file/evas_path.c new file mode 100644 index 0000000..ff13e20 --- /dev/null +++ b/libraries/evas/src/lib/file/evas_path.c @@ -0,0 +1,154 @@ +/* os dependent file code. for unix-y like fs's only for now */ +/* if your os doesn't use unix-like fs starting with "/" for the root and */ +/* the file path separator isn't "/" then you may need to help out by */ +/* adding in a new set of functions here */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +/* get the casefold feature! */ +#include +#ifndef _MSC_VER +# include +# include +#endif + +#ifdef HAVE_EVIL +# include +#endif + +#include "evas_common.h" +#include "evas_private.h" + +#ifdef _WIN32 +# define EVAS_PATH_SEPARATOR "\\" +#else +# define EVAS_PATH_SEPARATOR "/" +#endif + +int +evas_file_path_is_full_path(const char *path) +{ + if (!path) return 0; +#if defined _WIN32_WCE + if (path[0] == '\\') return 1; +#elif defined _WIN32 + if ((path[0] == '\0') || (path[1] == '\0')) + return 0; + if (path[1] == ':') return 1; +#else + if (path[0] == '/') return 1; +#endif + return 0; +} + +char * +evas_file_path_join(const char *path, const char *end) +{ + char *res = NULL; + size_t len; + + if ((!path) && (!end)) return NULL; + if (!path) return strdup(end); + if (!end) return strdup(path); + len = strlen(path); + len += strlen(end); + len += strlen(EVAS_PATH_SEPARATOR); + res = malloc(len + 1); + if (!res) return NULL; + strcpy(res, path); + strcat(res, EVAS_PATH_SEPARATOR); + strcat(res, end); + return res; +} + +int +evas_file_path_exists(const char *path) +{ + struct stat st; + + if (!stat(path, &st)) return 1; + return 0; +} + +int +evas_file_path_is_file(const char *path) +{ + struct stat st; + + if (stat(path, &st) == -1) return 0; + if (S_ISREG(st.st_mode)) return 1; + return 0; +} + +int +evas_file_path_is_dir(const char *path) +{ + struct stat st; + + if (stat(path, &st) == -1) return 0; + if (S_ISDIR(st.st_mode)) return 1; + return 0; +} + +Eina_List * +evas_file_path_list(char *path, const char *match, int match_case) +{ + Eina_File_Direct_Info *info; + Eina_Iterator *it; + Eina_List *files = NULL; + int flags; + + flags = FNM_PATHNAME; +#ifdef FNM_CASEFOLD + if (!match_case) + flags |= FNM_CASEFOLD; +#else +/*#warning "Your libc does not provide case-insensitive matching!"*/ +#endif + + it = eina_file_direct_ls(path); + EINA_ITERATOR_FOREACH(it, info) + { + if (match) + { + if (fnmatch(match, info->path + info->name_start, flags) == 0) + files = eina_list_append(files, strdup(info->path + info->name_start)); + } + else + files = eina_list_append(files, strdup(info->path + info->name_start)); + } + eina_iterator_free(it); + return files; +} + +DATA64 +evas_file_modified_time(const char *file) +{ + struct stat st; + + if (stat(file, &st) < 0) return 0; + if (st.st_ctime > st.st_mtime) return (DATA64)st.st_ctime; + else return (DATA64)st.st_mtime; + return 0; +} + +char * +evas_file_path_resolve(const char *file) +{ +#if 0 + char buf[PATH_MAX], *buf2; +#endif + + return strdup(file); +#if 0 + if (!realpath(file, buf)) return NULL; + buf2 = strdup(buf); + return buf2; +#endif +} diff --git a/libraries/evas/src/lib/file/evas_path.h b/libraries/evas/src/lib/file/evas_path.h new file mode 100644 index 0000000..e0aa6bb --- /dev/null +++ b/libraries/evas/src/lib/file/evas_path.h @@ -0,0 +1,15 @@ +#ifndef _EVAS_PATH_H +#define _EVAS_PATH_H + + +int evas_file_path_is_full_path (const char *path); +char *evas_file_path_join (const char *path, const char *end); +int evas_file_path_exists (const char *path); +int evas_file_path_is_file (const char *path); +int evas_file_path_is_dir (const char *path); +Eina_List *evas_file_path_list (char *path, const char *match, int match_case); +DATA64 evas_file_modified_time (const char *file); +char *evas_file_path_resolve (const char *file); + + +#endif /* _EVAS_PATH_H */ diff --git a/libraries/evas/src/lib/include/Makefile.am b/libraries/evas/src/lib/include/Makefile.am new file mode 100644 index 0000000..5c986c2 --- /dev/null +++ b/libraries/evas/src/lib/include/Makefile.am @@ -0,0 +1,13 @@ + +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ +evas_inline.x \ +evas_private.h \ +evas_options.h \ +evas_macros.h \ +evas_mmx.h \ +evas_common.h \ +evas_common_soft8.h \ +evas_common_soft16.h \ +evas_blend_ops.h diff --git a/libraries/evas/src/lib/include/Makefile.in b/libraries/evas/src/lib/include/Makefile.in new file mode 100644 index 0000000..9d5c371 --- /dev/null +++ b/libraries/evas/src/lib/include/Makefile.in @@ -0,0 +1,542 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/include +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = \ +evas_inline.x \ +evas_private.h \ +evas_options.h \ +evas_macros.h \ +evas_mmx.h \ +evas_common.h \ +evas_common_soft8.h \ +evas_common_soft16.h \ +evas_blend_ops.h + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/include/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/include/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/lib/include/evas_blend_ops.h b/libraries/evas/src/lib/include/evas_blend_ops.h new file mode 100644 index 0000000..1ada384 --- /dev/null +++ b/libraries/evas/src/lib/include/evas_blend_ops.h @@ -0,0 +1,378 @@ +#ifndef EVAS_BLEND_OPS_H +#define EVAS_BLEND_OPS_H + +#if defined BUILD_MMX || defined BUILD_SSE +#include "evas_mmx.h" +#endif + +#include "config.h" + +#ifdef NEED_SSE3 +# if defined BUILD_SSE3 +# include +# endif +#endif + +/* src pixel flags: */ + +/* pixels none */ +#define SP_N 0 +/* pixels (argb default) */ +#define SP 1 +/* pixels are rgb (ie. alphas == 255) */ +#define SP_AN 2 +/* pixels alpha are sparse */ +#define SP_AS 3 +/* src pixels flags count */ +#define SP_LAST 4 + +/* src mask flags: */ + +/* mask none */ +#define SM_N 0 +/* mask (alpha) */ +#define SM 1 +/* mask alphas are 'trivial - ie. only 0 or 255 */ +#define SM_AT 2 +/* mask alphas are sparse */ +#define SM_AS 3 +/* src mask flags count */ +#define SM_LAST 4 + +/* src color flags: */ + +/* color is 0xffffffff */ +#define SC_N 0 +/* color (argb default) */ +#define SC 1 +/* color is rgb (ie. 0xffrrggbb) */ +#define SC_AN 2 +/* color is 'alpha' (ie. 0xaaaaaaaa) */ +#define SC_AA 3 +/* src color flags count */ +#define SC_LAST 4 + +/* dst pixels flags: */ + +/* pixels (argb default) */ +#define DP 0 +/* pixels are rgb (ie. alphas == 255) */ +#define DP_AN 1 +/* dst pixels flags count */ +#define DP_LAST 2 + +/* cpu types flags */ + +/* none, bad news */ +#define CPU_N 0 +/* cpu C */ +#define CPU_C 1 +/* cpu MMX */ +#define CPU_MMX 2 +/* cpu SSE */ +#define CPU_SSE 3 +/* cpu SSE2 */ +#define CPU_SSE2 4 +/* cpu flags count */ +#define CPU_NEON 5 +/* CPU SSE3 */ +#define CPU_SSE3 6 +/* cpu flags count */ +#define CPU_LAST 7 + + +/* some useful constants */ + +extern const DATA32 ALPHA_255; +extern const DATA32 ALPHA_256; + +/* some useful C macros */ + +#define MUL4_256(a, r, g, b, c) \ + ( (((((c) >> 8) & 0xff0000) * (a)) & 0xff000000) + \ + (((((c) & 0xff0000) * (r)) >> 8) & 0xff0000) + \ + (((((c) & 0xff00) * (g)) >> 8) & 0xff00) + \ + ((((c) & 0xff) * (b)) >> 8) ) + +#define MUL3_256(r, g, b, c) \ + ( (((((c) & 0xff0000) * (r)) >> 8) & 0xff0000) + \ + (((((c) & 0xff00) * (g)) >> 8) & 0xff00) + \ + ((((c) & 0xff) * (b)) >> 8) ) + +#define MUL_256(a, c) \ + ( (((((c) >> 8) & 0x00ff00ff) * (a)) & 0xff00ff00) + \ + (((((c) & 0x00ff00ff) * (a)) >> 8) & 0x00ff00ff) ) + +#define MUL4_SYM(x, y) \ + ( ((((((x) >> 16) & 0xff00) * (((y) >> 16) & 0xff00)) + 0xff0000) & 0xff000000) + \ + ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \ + ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff00) >> 16) & 0xff00) + \ + (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) ) + +#define MUL3_SYM(x, y) \ + ( ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \ + ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff00) >> 16) & 0xff00) + \ + (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) ) + +#define MUL_SYM(a, x) \ + ( (((((x) >> 8) & 0x00ff00ff) * (a) + 0xff00ff) & 0xff00ff00) + \ + (((((x) & 0x00ff00ff) * (a) + 0xff00ff) >> 8) & 0x00ff00ff) ) + +#define MUL_A_256(a, c) \ + ( ((((c) >> 8) & 0x00ff0000) * (a)) & 0xff000000 ) + +#define MUL_A_SYM(a, c) \ + ( (((((c) >> 8) & 0x00ff0000) * (a)) + 0x00ff0000) & 0xff000000 ) + +#define INTERP_256(a, c0, c1) \ + ( (((((((c0) >> 8) & 0xff00ff) - (((c1) >> 8) & 0xff00ff)) * (a)) \ + + ((c1) & 0xff00ff00)) & 0xff00ff00) + \ + (((((((c0) & 0xff00ff) - ((c1) & 0xff00ff)) * (a)) >> 8) \ + + ((c1) & 0xff00ff)) & 0xff00ff) ) + +#define INTERP_RGB_256(a, c0, c1) \ + ( (((((((c0) >> 8) & 0xff) - (((c1) >> 8) & 0xff)) * (a)) \ + + ((c1) & 0xff00)) & 0xff00) + \ + (((((((c0) & 0xff00ff) - ((c1) & 0xff00ff)) * (a)) >> 8) \ + + ((c1) & 0xff00ff)) & 0xff00ff) ) + +#define INTERP_A_256(a, c0, c1) \ + ( (((((((c0) >> 8) & 0xff0000) - (((c1) >> 8) & 0xff0000)) * (a)) \ + + ((c1) & 0xff000000)) & 0xff000000) ) + + +/* some useful MMX macros */ + +#ifdef BUILD_MMX +#define MOV_A2R(a, mma) \ + movd_m2r(a, mma); \ + punpcklwd_r2r(mma, mma); \ + punpckldq_r2r(mma, mma); + +#define MOV_P2R(c, mmc, mmz) \ + movd_m2r(c, mmc); \ + punpcklbw_r2r(mmz, mmc); + +#define MOV_R2P(mmc, c, mmz) \ + packuswb_r2r(mmz, mmc); \ + movd_r2m(mmc, c); + +#define MUL4_256_R2R(mmx, mmy) \ + pmullw_r2r(mmx, mmy); \ + psrlw_i2r(8, mmy); + +#define MUL4_SYM_R2R(mmx, mmy, mm255) \ + pmullw_r2r(mmx, mmy); \ + paddw_r2r(mm255, mmy); \ + psrlw_i2r(8, mmy); + +#define MOV_RA2R(mmx, mma) \ + movq_r2r(mmx, mma); \ + punpckhwd_r2r(mma, mma); \ + punpckhdq_r2r(mma, mma); + +#define MOV_PA2R(c, mma) \ + movd_m2r(c, mma); \ + punpcklbw_r2r(mma, mma); \ + punpckhwd_r2r(mma, mma); \ + punpckhdq_r2r(mma, mma); + +#define INTERP_256_R2R(mma, mmx, mmy, mm255) \ + psubw_r2r(mmy, mmx); \ + pmullw_r2r(mma, mmx); \ + psrlw_i2r(8, mmx); \ + paddw_r2r(mmx, mmy); \ + pand_r2r(mm255, mmy); + +#endif + + +/* some useful SSE3 inline functions */ + +#ifdef NEED_SSE3 +#ifdef BUILD_SSE3 + +static __m128i GA_MASK_SSE3; +static __m128i RB_MASK_SSE3; +static __m128i SYM4_MASK_SSE3; +static __m128i RGB_MASK_SSE3; +//static __m128i A_MASK_SSE3; + +static __m128i ALPHA_SSE3; + +EFL_ALWAYS_INLINE __m128i +mul_256_sse3(__m128i a, __m128i c) { + + /* prepare alpha for word multiplication */ + __m128i a_l = a; + __m128i a_h = a; + a_l = _mm_unpacklo_epi16(a_l, a_l); + a_h = _mm_unpackhi_epi16(a_h, a_h); + __m128i a0 = (__m128i) _mm_shuffle_ps( (__m128)a_l, (__m128)a_h, 0x88); + + /* first half of calc */ + __m128i c0 = c; + c0 = _mm_srli_epi32(c0, 8); + c0 = _mm_and_si128(GA_MASK_SSE3, c0); + c0 = _mm_mullo_epi16(a0, c0); + c0 = _mm_and_si128(RB_MASK_SSE3, c0); + + /* second half of calc */ + __m128i c1 = c; + c1 = _mm_and_si128(GA_MASK_SSE3, c1); + c1 = _mm_mullo_epi16(a0, c1); + c1 = _mm_srli_epi32(c1, 8); + c1 = _mm_and_si128(GA_MASK_SSE3, c1); + + /* combine */ + return _mm_add_epi32(c0, c1); +} + +EFL_ALWAYS_INLINE __m128i +sub4_alpha_sse3(__m128i c) { + + __m128i c0 = c; + + c0 = _mm_srli_epi32(c0, 24); + return _mm_sub_epi32(ALPHA_SSE3, c0); +} + +EFL_ALWAYS_INLINE __m128i +interp4_256_sse3(__m128i a, __m128i c0, __m128i c1) +{ + const __m128i zero = _mm_setzero_si128(); + + __m128i a_l = a; + __m128i a_h = a; + a_l = _mm_unpacklo_epi16(a_l, a_l); + a_h = _mm_unpackhi_epi16(a_h, a_h); + + __m128i a_t = _mm_slli_epi64(a_l, 32); + __m128i a_t0 = _mm_slli_epi64(a_h, 32); + + a_l = _mm_add_epi32(a_l, a_t); + a_h = _mm_add_epi32(a_h, a_t0); + + __m128i c0_l = c0; + __m128i c0_h = c0; + + c0_l = _mm_unpacklo_epi8(c0_l, zero); + c0_h = _mm_unpackhi_epi8(c0_h, zero); + + __m128i c1_l = c1; + __m128i c1_h = c1; + + c1_l = _mm_unpacklo_epi8(c1_l, zero); + c1_h = _mm_unpackhi_epi8(c1_h, zero); + + __m128i cl_sub = _mm_sub_epi16(c0_l, c1_l); + __m128i ch_sub = _mm_sub_epi16(c0_h, c1_h); + + cl_sub = _mm_mullo_epi16(cl_sub, a_l); + ch_sub = _mm_mullo_epi16(ch_sub, a_h); + + __m128i c1ls = _mm_slli_epi16(c1_l, 8); + __m128i c1hs = _mm_slli_epi16(c1_h, 8); + + cl_sub = _mm_add_epi16(cl_sub, c1ls); + ch_sub = _mm_add_epi16(ch_sub, c1hs); + + cl_sub = _mm_and_si128(cl_sub, RB_MASK_SSE3); + ch_sub = _mm_and_si128(ch_sub, RB_MASK_SSE3); + + cl_sub = _mm_srli_epi64(cl_sub, 8); + ch_sub = _mm_srli_epi64(ch_sub, 8); + + cl_sub = _mm_packus_epi16(cl_sub, cl_sub); + ch_sub = _mm_packus_epi16(ch_sub, ch_sub); + + return (__m128i) _mm_shuffle_ps( (__m128)cl_sub, (__m128)ch_sub, 0x44); +} + +EFL_ALWAYS_INLINE __m128i +mul_sym_sse3(__m128i a, __m128i c) { + + /* Prepare alpha for word mult */ + __m128i a_l = a; + __m128i a_h = a; + a_l = _mm_unpacklo_epi16(a_l, a_l); + a_h = _mm_unpackhi_epi16(a_h, a_h); + __m128i a0 = (__m128i) _mm_shuffle_ps( (__m128)a_l, (__m128)a_h, 0x88); + + /* first part */ + __m128i c0 = c; + c0 = _mm_srli_epi32(c0, 8); + c0 = _mm_and_si128(GA_MASK_SSE3, c0); + c0 = _mm_mullo_epi16(a0, c0); + c0 = _mm_add_epi32(c0, GA_MASK_SSE3); + c0 = _mm_and_si128(RB_MASK_SSE3, c0); + + /* second part */ + __m128i c1 = c; + c1 = _mm_and_si128(GA_MASK_SSE3, c1); + c1 = _mm_mullo_epi16(a0, c1); + c1 = _mm_add_epi32(c1, GA_MASK_SSE3); + c1 = _mm_srli_epi32(c1, 8); + c1 = _mm_and_si128(GA_MASK_SSE3, c1); + + return _mm_add_epi32(c0, c1); +} + +EFL_ALWAYS_INLINE __m128i +mul4_sym_sse3(__m128i x, __m128i y) { + + const __m128i zero = _mm_setzero_si128(); + + __m128i x_l = _mm_unpacklo_epi8(x, zero); + __m128i x_h = _mm_unpackhi_epi8(x, zero); + + __m128i y_l = _mm_unpacklo_epi8(y, zero); + __m128i y_h = _mm_unpackhi_epi8(y, zero); + + __m128i r_l = _mm_mullo_epi16(x_l, y_l); + __m128i r_h = _mm_mullo_epi16(x_h, y_h); + + r_l = _mm_add_epi16(r_l, SYM4_MASK_SSE3); + r_h = _mm_add_epi16(r_h, SYM4_MASK_SSE3); + + r_l = _mm_srli_epi16(r_l, 8); + r_h = _mm_srli_epi16(r_h, 8); + + return _mm_packus_epi16(r_l, r_h); +} + +EFL_ALWAYS_INLINE __m128i +mul3_sym_sse3(__m128i x, __m128i y) { + + __m128i res = mul4_sym_sse3(x, y); + return _mm_and_si128(res, RGB_MASK_SSE3); +} + +#define LOOP_ALIGNED_U1_A48_SSE3(DEST, LENGTH, UOP, A4OP, A8OP) \ + { \ + while((uintptr_t)DEST & 0xF && LENGTH) UOP \ + \ + while(LENGTH) { \ + switch(LENGTH) { \ + case 3: UOP \ + case 2: UOP \ + case 1: UOP \ + break; \ + case 7: \ + case 6: \ + case 5: \ + case 4: \ + A4OP \ + break; \ + default: \ + A8OP \ + break; \ + } \ + } \ + } + + +#endif +#endif + +#endif diff --git a/libraries/evas/src/lib/include/evas_common.h b/libraries/evas/src/lib/include/evas_common.h new file mode 100644 index 0000000..f817202 --- /dev/null +++ b/libraries/evas/src/lib/include/evas_common.h @@ -0,0 +1,1242 @@ +#ifndef EVAS_COMMON_H +#define EVAS_COMMON_H + +#ifdef HAVE_CONFIG_H +# include "config.h" /* so that EAPI in Evas.h is correctly defined */ +#endif + +#ifdef HAVE_EVIL +# include +#endif + +#ifdef HAVE_ESCAPE +# include +#endif + +#include +#include "Evas.h" +//#include "Evas_GL.h" + +#ifdef HAVE_PIXMAN +#include +#endif + +#include +#include +#include + +#ifndef HAVE_LROUND +/* right now i dont care about rendering bugs on platforms without lround + (e.g. windows/vc++... yay!) + FIXME: http://cgit.freedesktop.org/cairo/tree/src/cairo-misc.c#n487 +*/ +#define lround(x) (((x) < 0) ? (long int)ceil((x) - 0.5) : (long int)floor((x) + 0.5)) +#endif + +/* macros needed to log message through eina_log */ +extern EAPI int _evas_log_dom_global; +#ifdef _EVAS_DEFAULT_LOG_DOM +# undef _EVAS_DEFAULT_LOG_DOM +#endif +#define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global + +#ifdef EVAS_DEFAULT_LOG_COLOR +# undef EVAS_DEFAULT_LOG_COLOR +#endif +#define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) + +#include "evas_options.h" + +#if defined(__ARM_ARCH_3M__) +# define __ARM_ARCH__ 40 +#endif +#if defined(__ARM_ARCH_4__) +# define __ARM_ARCH__ 40 +#endif +#if defined(__ARM_ARCH_4T__) +# define __ARM_ARCH__ 41 +#endif + +#if defined(__ARM_ARCH_5__) +# define __ARM_ARCH__ 50 +#endif +#if defined(__ARM_ARCH_5T__) +# define __ARM_ARCH__ 51 +#endif +#if defined(__ARM_ARCH_5E__) +# define __ARM_ARCH__ 52 +#endif +#if defined(__ARM_ARCH_5TE__) +# define __ARM_ARCH__ 53 +#endif +#if defined(__ARM_ARCH_5TEJ__) +# define __ARM_ARCH__ 54 +#endif + +#if defined(__ARM_ARCH_6__) +# define __ARM_ARCH__ 60 +#endif +#if defined(__ARM_ARCH_6J__) +# define __ARM_ARCH__ 61 +#endif +#if defined(__ARM_ARCH_6K__) +# define __ARM_ARCH__ 62 +#endif +#if defined(__ARM_ARCH_6Z__) +# define __ARM_ARCH__ 63 +#endif +#if defined(__ARM_ARCH_6ZK__) +# define __ARM_ARCH__ 64 +#endif +#if defined(__ARM_ARCH_6T2__) +# define __ARM_ARCH__ 65 +#endif + +#if defined(__ARM_ARCH_7__) +# define __ARM_ARCH__ 70 +#endif +#if defined(__ARM_ARCH_7A__) +# define __ARM_ARCH__ 71 +#endif +#if defined(__ARM_ARCH_7R__) +# define __ARM_ARCH__ 72 +#endif +#if defined(__ARM_ARCH_7M__) +# define __ARM_ARCH__ 73 +#endif + +#ifndef BUILD_PTHREAD +# undef BUILD_PIPE_RENDER +#endif + +#if defined(BUILD_ASYNC_PRELOAD) && !defined(BUILD_PTHREAD) +# define BUILD_PTHREAD +#endif + +#ifdef BUILD_PTHREAD + +#define LK(x) Eina_Lock x +#define LKI(x) eina_lock_new(&(x)) +#define LKD(x) eina_lock_free(&(x)) +#define LKL(x) eina_lock_take(&(x)) +#define LKT(x) eina_lock_take_try(&(x)) +#define LKU(x) eina_lock_release(&(x)) +#define LKDBG(x) eina_lock_debug(&(x)) + +# define TH(x) pthread_t x +# define THI(x) int x +# define TH_MAX 8 + +/* for rwlocks */ +#define RWLK(x) pthread_rwlock_t x +#define RWLKI(x) pthread_rwlock_init(&(x), NULL) +#define RWLKD(x) pthread_rwlock_destroy(&(x)) +#define RDLKL(x) pthread_rwlock_rdlock(&(x)) +#define WRLKL(x) pthread_rwlock_wrlock(&(x)) +#define RWLKU(x) pthread_rwlock_unlock(&(x)) + + +// even though in theory having every Nth rendered line done by a different +// thread might even out load across threads - it actually slows things down. +//#define EVAS_SLI 1 + +#else +# define LK(x) +# define LKI(x) +# define LKD(x) +# define LKL(x) +# define LKT(x) 1 +# define LKU(x) +# define TH(x) +# define THI(x) +# define TH_MAX 0 +# define LKDBG(x) + +/* for rwlocks */ +#define RWLK(x) +#define RWLKI(x) +#define RWLKD(x) +#define RDLKL(x) +#define WRLKL(x) +#define RWLKU(x) + +#endif + +#ifdef HAVE_ALLOCA_H +# include +#elif defined __GNUC__ +# define alloca __builtin_alloca +#elif defined _AIX +# define alloca __alloca +#elif defined _MSC_VER +# include +# define alloca _alloca +#else +# include +# ifdef __cplusplus +extern "C" +# endif +void *alloca (size_t); +#endif + +#include +#include +#include +#include +#include +#include +#include + +#ifndef _MSC_VER +# include +#endif + +#include +#include FT_FREETYPE_H +#include FT_GLYPH_H +#include FT_SIZES_H +#include FT_MODULE_H + +#ifdef __GNUC__ +# if __GNUC__ >= 4 +// BROKEN in gcc 4 on amd64 +//# pragma GCC visibility push(hidden) +# endif +#define LIKELY(x) __builtin_expect(!!(x), 1) +#define UNLIKELY(x) __builtin_expect(!!(x), 0) +#else +#define LIKELY(x) (x) +#define UNLIKELY(x) (x) +#endif + +/*****************************************************************************/ + +/* use exact rects for updates not tiles */ +/* #define RECTUPDATE */ +#define TILESIZE 8 +#define IMG_MAX_SIZE 65000 + +#define IMG_TOO_BIG(w, h) \ + ((((unsigned long long)w) * ((unsigned long long)h)) >= \ + ((1ULL << (29 * (sizeof(void *) / 4))) - 2048)) + +#ifdef BUILD_SMALL_DITHER_MASK +# define DM_TABLE _evas_dither_44 +# define DM_SIZE 4 +# define DM_BITS 4 +# define DM_DIV 16 +# define USE_DITHER_44 1 +#else +# define DM_TABLE _evas_dither_128128 +# define DM_SIZE 128 +# define DM_BITS 6 +# define DM_DIV 64 +# define USE_DITHER_128128 1 +#endif + +#define DM_MSK (DM_SIZE - 1) +#define DM_SHF(_b) (DM_BITS - (8 - _b)) +/* Supports negative right shifts */ +#define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \ + ((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b))) + +/* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse + * alpha flag gets set */ +#define ALPHA_SPARSE_INV_FRACTION 3 + +/*****************************************************************************/ + +#if defined(__ARM_ARCH_3M__) +# define __ARM_ARCH__ 40 +#endif +#if defined(__ARM_ARCH_4__) +# define __ARM_ARCH__ 40 +#endif +#if defined(__ARM_ARCH_4T__) +# define __ARM_ARCH__ 41 +#endif + +#if defined(__ARM_ARCH_5__) +# define __ARM_ARCH__ 50 +#endif +#if defined(__ARM_ARCH_5T__) +# define __ARM_ARCH__ 51 +#endif +#if defined(__ARM_ARCH_5E__) +# define __ARM_ARCH__ 52 +#endif +#if defined(__ARM_ARCH_5TE__) +# define __ARM_ARCH__ 53 +#endif +#if defined(__ARM_ARCH_5TEJ__) +# define __ARM_ARCH__ 54 +#endif + +#if defined(__ARM_ARCH_6__) +# define __ARM_ARCH__ 60 +#endif +#if defined(__ARM_ARCH_6J__) +# define __ARM_ARCH__ 61 +#endif +#if defined(__ARM_ARCH_6K__) +# define __ARM_ARCH__ 62 +#endif +#if defined(__ARM_ARCH_6Z__) +# define __ARM_ARCH__ 63 +#endif +#if defined(__ARM_ARCH_6ZK__) +# define __ARM_ARCH__ 64 +#endif +#if defined(__ARM_ARCH_6T2__) +# define __ARM_ARCH__ 65 +#endif + +#if defined(__ARM_ARCH_7__) +# define __ARM_ARCH__ 70 +#endif +#if defined(__ARM_ARCH_7A__) +# define __ARM_ARCH__ 71 +#endif +#if defined(__ARM_ARCH_7R__) +# define __ARM_ARCH__ 72 +#endif +#if defined(__ARM_ARCH_7M__) +# define __ARM_ARCH__ 73 +#endif + +#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52) +/* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */ +#define pld(addr, off) \ + __asm__("pld [%[address], %[offset]]":: \ + [address] "r" (addr), [offset] "i" (off)) +#else +#define pld(addr, off) +#endif /* __ARMEL__ */ + +/*****************************************************************************/ + +#define UNROLL2(op...) op op +#define UNROLL4(op...) UNROLL2(op) UNROLL2(op) +#define UNROLL8(op...) UNROLL4(op) UNROLL4(op) +#define UNROLL16(op...) UNROLL8(op) UNROLL8(op) + +#define UNROLL8_PLD_WHILE(start, size, end, op) \ + pld(start, 0); \ + end = start + (size & ~7); \ + while (start < end) \ + { \ + pld(start, 32); \ + UNROLL8(op); \ + } \ + end += (size & 7); \ + pld(start, 32); \ + while (start < end) \ + { \ + op; \ + } + +/*****************************************************************************/ + +typedef unsigned long long DATA64; +typedef unsigned int DATA32; +typedef unsigned short DATA16; +typedef unsigned char DATA8; + +typedef struct _Image_Entry Image_Entry; +typedef struct _Image_Entry_Flags Image_Entry_Flags; +typedef struct _Image_Entry_Frame Image_Entry_Frame; +typedef struct _Image_Timestamp Image_Timestamp; +typedef struct _Engine_Image_Entry Engine_Image_Entry; +typedef struct _Evas_Cache_Target Evas_Cache_Target; +typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread; + +typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts; +#ifdef BUILD_PIPE_RENDER +typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op; +typedef struct _RGBA_Pipe RGBA_Pipe; +typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info; +#endif +typedef struct _RGBA_Image RGBA_Image; +typedef struct _RGBA_Image_Span RGBA_Image_Span; +typedef struct _RGBA_Draw_Context RGBA_Draw_Context; +typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point; +typedef struct _RGBA_Map_Point RGBA_Map_Point; +typedef struct _RGBA_Font RGBA_Font; +typedef struct _RGBA_Font_Int RGBA_Font_Int; +typedef struct _RGBA_Font_Source RGBA_Font_Source; +typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph; +typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor; + +typedef struct _Cutout_Rect Cutout_Rect; +typedef struct _Cutout_Rects Cutout_Rects; + +typedef struct _Convert_Pal Convert_Pal; + +typedef struct _Tilebuf Tilebuf; +typedef struct _Tilebuf_Tile Tilebuf_Tile; +typedef struct _Tilebuf_Rect Tilebuf_Rect; + +typedef struct _Evas_Common_Transform Evas_Common_Transform; + +// RGBA_Map_Point +// all coords are 20.12 +// fp type - an int for now +typedef int FPc; +// fp # of bits of float accuracy +#define FP 8 +// fp half (half of an fp unit) +#define FPH (1 << (FP - 1)) +// one fp unit +#define FP1 (1 << (FP)) + +/* +typedef struct _Regionbuf Regionbuf; +typedef struct _Regionspan Regionspan; +*/ + +typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len); +typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst); +typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len); + +typedef void (*Gfx_Func_Convert) (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); + +#include "../cache/evas_cache.h" + +/*****************************************************************************/ + +typedef enum _RGBA_Image_Flags +{ + RGBA_IMAGE_NOTHING = (0), +/* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */ + RGBA_IMAGE_IS_DIRTY = (1 << 1), + RGBA_IMAGE_INDEXED = (1 << 2), + RGBA_IMAGE_ALPHA_ONLY = (1 << 3), + RGBA_IMAGE_ALPHA_TILES = (1 << 4), +/* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */ +/* RGBA_IMAGE_LOADED = (1 << 6), */ +/* RGBA_IMAGE_NEED_DATA = (1 << 7) */ + RGBA_IMAGE_TODO_LOAD = (1 << 8), +} RGBA_Image_Flags; + +typedef enum _Convert_Pal_Mode +{ + PAL_MODE_NONE, + PAL_MODE_MONO, + PAL_MODE_GRAY4, + PAL_MODE_GRAY16, + PAL_MODE_GRAY64, + PAL_MODE_GRAY256, + PAL_MODE_RGB111, + PAL_MODE_RGB121, + PAL_MODE_RGB221, + PAL_MODE_RGB222, + PAL_MODE_RGB232, + PAL_MODE_RGB332, + PAL_MODE_RGB666, + PAL_MODE_LAST +} Convert_Pal_Mode; + +typedef enum _CPU_Features +{ + CPU_FEATURE_C = 0, + CPU_FEATURE_MMX = (1 << 0), + CPU_FEATURE_MMX2 = (1 << 1), + CPU_FEATURE_SSE = (1 << 2), + CPU_FEATURE_ALTIVEC = (1 << 3), + CPU_FEATURE_VIS = (1 << 4), + CPU_FEATURE_VIS2 = (1 << 5), + CPU_FEATURE_NEON = (1 << 6), + CPU_FEATURE_SSE3 = (1 << 7) +} CPU_Features; + +typedef enum _Font_Hint_Flags +{ + FONT_NO_HINT, + FONT_AUTO_HINT, + FONT_BYTECODE_HINT +} Font_Hint_Flags; + +typedef enum _Font_Rend_Flags +{ + FONT_REND_REGULAR = 0, + FONT_REND_SLANT = (1 << 0), + FONT_REND_WEIGHT = (1 << 1), +} Font_Rend_Flags; + +/*****************************************************************************/ + +#if 0 // filtering disabled +typedef struct _Filtered_Image Filtered_Image; +#endif + +struct _RGBA_Image_Loadopts +{ + int scale_down_by; // if > 1 then use this + double dpi; // if > 0.0 use this + unsigned int w, h; // if > 0 use this + unsigned int degree;//if>0 there is some info related with rotation + struct { + unsigned int x, y, w, h; + } region; + + Eina_Bool orientation; // if EINA_TRUE => should honor orientation information provided by file (like jpeg exif info) +}; + +struct _Image_Entry_Flags +{ + Eina_Bool loaded : 1; + Eina_Bool in_progress : 1; + Eina_Bool dirty : 1; + Eina_Bool activ : 1; + + Eina_Bool need_data : 1; + Eina_Bool lru_nodata : 1; + Eina_Bool cached : 1; + Eina_Bool alpha : 1; + + Eina_Bool lru : 1; + Eina_Bool alpha_sparse : 1; +#ifdef BUILD_ASYNC_PRELOAD + Eina_Bool preload_done : 1; + Eina_Bool delete_me : 1; + Eina_Bool pending : 1; +#endif + Eina_Bool animated : 1; + Eina_Bool rotated : 1; +}; + +struct _Image_Entry_Frame +{ + int index; + DATA32 *data; /* frame decoding data */ + void *info; /* special image type info */ + Eina_Bool loaded : 1; +}; + +struct _Evas_Cache_Target +{ + EINA_INLIST; + const void *target; + void *data; +}; + +struct _Image_Timestamp +{ + time_t mtime; + off_t size; + ino_t ino; +#ifdef _STAT_VER_LINUX + unsigned long int mtime_nsec; +#endif +}; + +struct _Image_Entry +{ + EINA_INLIST; + + Evas_Cache_Image *cache; + + const char *cache_key; + + const char *file; + const char *key; + + Evas_Cache_Target *targets; + Evas_Preload_Pthread *preload; + + Image_Timestamp tstamp; + + int references; +#ifdef EVAS_FRAME_QUEUING + LK(lock_references); // needed for accessing references +#endif + +#ifdef BUILD_PIPE_RENDER + RGBA_Pipe *pipe; +#ifdef EVAS_FRAME_QUEUING + LK(ref_fq_add); + LK(ref_fq_del); + Eina_Condition cond_fq_del; + int ref_fq[2]; // ref_fq[0] is for addition, ref_fq[1] is for deletion +#endif +#endif + + unsigned char scale; + + RGBA_Image_Loadopts load_opts; + int space; + unsigned int w; + unsigned int h; + + struct + { + unsigned int w; + unsigned int h; + } allocated; + + struct + { + void *module; + void *loader; + } info; + +#ifdef BUILD_ASYNC_PRELOAD + LK(lock); + LK(lock_cancel); + Eina_Bool unload_cancel : 1; +#endif + + Image_Entry_Flags flags; + Evas_Image_Scale_Hint scale_hint; + void *data1, *data2; + int server_id; + int connect_num; + int channel; + int load_error; + + /* for animation feature */ + int frame_count; + Evas_Image_Animated_Loop_Hint loop_hint; + int loop_count; + int cur_frame; + Eina_List *frames; +}; + +struct _Engine_Image_Entry +{ + EINA_INLIST; + + /* Upper Engine data. */ + Image_Entry *src; + + /* Cache stuff. */ + Evas_Cache_Engine_Image *cache; + const char *cache_key; + + struct + { + Eina_Bool cached : 1; + Eina_Bool activ : 1; + Eina_Bool dirty : 1; + Eina_Bool loaded : 1; + Eina_Bool need_parent : 1; + } flags; + + int references; + int w; + int h; +}; + +struct _Cutout_Rect +{ + int x, y, w, h; +}; + +struct _Cutout_Rects +{ + Cutout_Rect* rects; + int active; + int max; +}; + +struct _Evas_Common_Transform +{ + float mxx, mxy, mxz; + float myx, myy, myz; + float mzx, mzy, mzz; +}; + +struct _RGBA_Draw_Context +{ + struct { + Eina_Bool use : 1; + DATA32 col; + } mul; + struct { + DATA32 col; + } col; + struct RGBA_Draw_Context_clip { + int x, y, w, h; + Eina_Bool use : 1; + } clip; + struct { + int x, y, w, h; + RGBA_Image *mask; + } mask; + Cutout_Rects cutout; + struct { + struct { + void *(*gl_new) (void *data, RGBA_Font_Glyph *fg); + void (*gl_free) (void *ext_dat); + void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y); + } func; + void *data; + } font_ext; + struct { + int color_space; + } interpolation; + struct { + int y, h; + } sli; + int render_op; + Eina_Bool anti_alias : 1; +}; + +#ifdef BUILD_PIPE_RENDER +#include "../engines/common/evas_map_image.h" +#include "../engines/common/evas_text_utils.h" + +struct _RGBA_Pipe_Op +{ + RGBA_Draw_Context context; + void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info); + void (*free_func) (RGBA_Pipe_Op *op); + + union { + struct { + int x, y, w, h; + } rect; + struct { + int x0, y0, x1, y1; + } line; + struct { + RGBA_Polygon_Point *points; + } poly; + struct { + RGBA_Font *font; + int x, y; + Evas_Text_Props intl_props; + } text; + struct { + RGBA_Image *src; + int sx, sy, sw, sh, dx, dy, dw, dh; + int smooth; + char *text; + } image; + struct { + RGBA_Image *src; + RGBA_Map_Point *p; + int npoints; + int smooth; + int level; + } map; + } op; +}; + +#define PIPE_LEN 256 + +struct _RGBA_Pipe +{ + EINA_INLIST; + int op_num; + RGBA_Pipe_Op op[PIPE_LEN]; +}; + +struct _RGBA_Pipe_Thread_Info +{ + RGBA_Image *im; + int x, y, w, h; +}; +#endif + +struct _RGBA_Image +{ + Image_Entry cache_entry; + + RGBA_Image_Flags flags; + struct + { +/* void *module; */ +/* void *loader; */ +/* char *real_file; */ + char *comment; +// int format; + } info; + + void *extended_info; + int ref; + +/* unsigned char scale; */ + + /* Colorspace stuff. */ + struct { + void *data; + Eina_Bool no_free : 1; + Eina_Bool dirty : 1; + } cs; + + /* RGBA stuff */ + struct { + DATA32 *data; + Eina_Bool no_free : 1; + } image; + + struct { + DATA8 *mask; + Eina_Bool dirty: 1; + } mask; + +#if 0 // filtering disabled + Eina_List *filtered; +#endif + + struct { + LK(lock); + Eina_List *list; + unsigned long long orig_usage; + unsigned long long usage_count; + int populate_count; + unsigned long long newest_usage; + unsigned long long newest_usage_count; + } cache; + +#ifdef HAVE_PIXMAN + struct { + pixman_image_t *im; + } pixman; +#endif +}; + +struct _RGBA_Polygon_Point +{ + EINA_INLIST; + int x, y; +}; + +struct _RGBA_Map_Point +{ + FPc x, y; // x, y screenspace + float fx, fy, fz; // x, y, z in floats +// FPc x3, y3; // x, y 3d space + FPc z; // z in world space. optional + FPc u, v; // u, v in tex coords + DATA32 col; // color at this point + // for perspective correctness - only point 0 has relevant info + FPc px, py, z0, foc; +}; + +#if 0 // filtering disabled +struct _Filtered_Image +{ + void *key; + size_t keylen; + RGBA_Image *image; + int ref; +}; +#endif + +// for fonts... +///// +typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map; +typedef struct _Fash_Int_Map Fash_Int_Map; +typedef struct _Fash_Int_Map2 Fash_Int_Map2; +typedef struct _Fash_Int Fash_Int; +struct _Fash_Item_Index_Map +{ + RGBA_Font_Int *fint; + int index; +}; +struct _Fash_Int_Map +{ + Fash_Item_Index_Map item[256]; +}; +struct _Fash_Int_Map2 +{ + Fash_Int_Map *bucket[256]; +}; +struct _Fash_Int +{ + Fash_Int_Map2 *bucket[256]; + void (*freeme) (Fash_Int *fash); +}; + +///// +typedef struct _Fash_Glyph_Map Fash_Glyph_Map; +typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2; +typedef struct _Fash_Glyph Fash_Glyph; +struct _Fash_Glyph_Map +{ + RGBA_Font_Glyph *item[256]; +}; +struct _Fash_Glyph_Map2 +{ + Fash_Glyph_Map *bucket[256]; +}; +struct _Fash_Glyph +{ + Fash_Glyph_Map2 *bucket[256]; + void (*freeme) (Fash_Glyph *fash); +}; +///// + +struct _RGBA_Font +{ + Eina_List *fonts; + Fash_Int *fash; + Font_Hint_Flags hinting; + int references; +#ifdef EVAS_FRAME_QUEUING + int ref_fq[2]; //ref_fq[0] is for addition, ref_fq[1] is for deletion + Eina_Condition cond_fq_del; + LK(ref_fq_add); + LK(ref_fq_del); +#endif + LK(lock); + unsigned char sizeok : 1; +}; + +#include "../engines/common/evas_font_ot.h" + +struct _RGBA_Font_Int +{ + EINA_INLIST; + RGBA_Font_Source *src; + Eina_Hash *kerning; + Fash_Glyph *fash; + unsigned int size; + int real_size; + int max_h; + int references; + int usage; + struct { + FT_Size size; +#ifdef USE_HARFBUZZ + void *hb_font; +#endif + } ft; + LK(ft_mutex); + Font_Hint_Flags hinting; + Font_Rend_Flags wanted_rend; /* The wanted rendering style */ + Font_Rend_Flags runtime_rend; /* The rendering we need to do on runtime + in order to comply with the wanted_rend. */ + unsigned char sizeok : 1; + unsigned char inuse : 1; +}; + +struct _RGBA_Font_Source +{ + const char *name; + const char *file; + void *data; + unsigned int current_size; + int data_size; + int references; + struct { + int orig_upem; + FT_Face face; + } ft; +}; + +struct _RGBA_Font_Glyph +{ + FT_UInt index; + FT_Glyph glyph; + FT_BitmapGlyph glyph_out; + /* this is a problem - only 1 engine at a time can extend such a font... grrr */ + void *ext_dat; + void (*ext_dat_free) (void *ext_dat); + RGBA_Font_Int *fi; +}; + +struct _RGBA_Gfx_Compositor +{ + const char *name; + + void (*init)(void); + void (*shutdown)(void); + + RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels); + RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels); + RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); + RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels); + RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels); + + RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst); + RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst); + RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); + RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst); + RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst); +}; + +#define EVAS_RECT_SPLIT 1 +#ifdef EVAS_RECT_SPLIT +typedef struct list_node list_node_t; +typedef struct list list_t; +typedef struct rect rect_t; +typedef struct rect_node rect_node_t; + +struct list_node +{ + struct list_node *next; +}; + +struct list +{ + struct list_node *head; + struct list_node *tail; +}; + +struct rect +{ + short left; + short top; + short right; + short bottom; + short width; + short height; + int area; +}; + +struct rect_node +{ + struct list_node _lst; + struct rect rect; +}; +#endif /* EVAS_RECT_SPLIT */ + +struct _Tilebuf +{ + int outbuf_w; + int outbuf_h; + + struct { + int w, h; + } tile_size; + + struct { + int x, y, w, h; + } prev_add, prev_del; +#ifdef RECTUPDATE +/* + Regionbuf *rb; + */ +#elif defined(EVAS_RECT_SPLIT) + int need_merge; + list_t rects; +#else +/* + struct { + int w, h; + Tilebuf_Tile *tiles; + } tiles; + */ +#endif +}; + +struct _Tilebuf_Tile +{ + Eina_Bool redraw : 1; +/* FIXME: need these flags later - but not now */ +/* + Eina_Bool done : 1; + Eina_Bool edge : 1; + Eina_Bool from : 1; + + struct { + int dx, dy; + } vector; + */ +}; + +struct _Tilebuf_Rect +{ + EINA_INLIST; + int x, y, w, h; +}; +/* +struct _Regionbuf +{ + int w, h; + Regionspan **spans; +}; + +struct _Regionspan +{ + EINA_INLIST; + int x1, x2; +}; +*/ + +struct _Convert_Pal +{ + int references; + int count; + Convert_Pal_Mode colors; + DATA8 *lookup; + void *data; +}; + +/****/ + +/*****************************************************************************/ +#include "evas_macros.h" + +#ifndef WORDS_BIGENDIAN +/* x86 */ +#define A_VAL(p) (((DATA8 *)(p))[3]) +#define R_VAL(p) (((DATA8 *)(p))[2]) +#define G_VAL(p) (((DATA8 *)(p))[1]) +#define B_VAL(p) (((DATA8 *)(p))[0]) +#define AR_VAL(p) ((DATA16 *)(p)[1]) +#define GB_VAL(p) ((DATA16 *)(p)[0]) +#else +/* ppc */ +#define A_VAL(p) (((DATA8 *)(p))[0]) +#define R_VAL(p) (((DATA8 *)(p))[1]) +#define G_VAL(p) (((DATA8 *)(p))[2]) +#define B_VAL(p) (((DATA8 *)(p))[3]) +#define AR_VAL(p) ((DATA16 *)(p)[0]) +#define GB_VAL(p) ((DATA16 *)(p)[1]) +#endif + +#define RGB_JOIN(r,g,b) \ + (((r) << 16) + ((g) << 8) + (b)) + +#define ARGB_JOIN(a,r,g,b) \ + (((a) << 24) + ((r) << 16) + ((g) << 8) + (b)) + +#include "evas_blend_ops.h" + +#define _EVAS_RENDER_FILL -1 +#define _EVAS_RENDER_BLEND 0 +#define _EVAS_RENDER_BLEND_REL 1 +#define _EVAS_RENDER_COPY 2 +#define _EVAS_RENDER_COPY_REL 3 +#define _EVAS_RENDER_ADD 4 +#define _EVAS_RENDER_ADD_REL 5 +#define _EVAS_RENDER_SUB 6 +#define _EVAS_RENDER_SUB_REL 7 +#define _EVAS_RENDER_TINT 8 +#define _EVAS_RENDER_TINT_REL 9 +#define _EVAS_RENDER_MASK 10 +#define _EVAS_RENDER_MUL 11 +#define _EVAS_RENDER_CLIP 12 + +#define _EVAS_TEXTURE_REFLECT 0 +#define _EVAS_TEXTURE_REPEAT 1 +#define _EVAS_TEXTURE_RESTRICT 2 +#define _EVAS_TEXTURE_RESTRICT_REFLECT 3 +#define _EVAS_TEXTURE_RESTRICT_REPEAT 4 +#define _EVAS_TEXTURE_PAD 5 + +#define _EVAS_COLOR_SPACE_ARGB 0 +#define _EVAS_COLOR_SPACE_AHSV 1 + +/*****************************************************************************/ + +#define SCALE_SIZE_MAX ((1 << 15) - 1) + +#ifdef __cplusplus +extern "C" { +#endif + +/****/ +void evas_common_init (void); +void evas_common_shutdown (void); + +EAPI void evas_common_cpu_init (void); + +int evas_common_cpu_have_cpuid (void); +int evas_common_cpu_has_feature (unsigned int feature); +EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2); +EAPI void evas_common_cpu_end_opt (void); + +/****/ +#include "../engines/common/evas_blend.h" + +EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse); + +/****/ +#include "../engines/common/evas_convert_color.h" +#include "../engines/common/evas_convert_colorspace.h" +#include "../engines/common/evas_convert_main.h" +#include "../engines/common/evas_convert_yuv.h" +#include "../engines/common/evas_scale_main.h" +#include "../engines/common/evas_scale_smooth.h" +#include "../engines/common/evas_scale_span.h" + +/****/ +#include "../engines/common/evas_image.h" + +/****/ +#include "../engines/common/evas_line.h" +#include "../engines/common/evas_polygon.h" +#include "../engines/common/evas_rectangle.h" + +/****/ +EAPI void evas_common_blit_init (void); + +EAPI void evas_common_blit_rectangle (const RGBA_Image *src, RGBA_Image *dst, int src_x, int src_y, int w, int h, int dst_x, int dst_y); + +/****/ +#include "../engines/common/evas_font.h" + +/****/ +EAPI void evas_common_tilebuf_init (void); + +EAPI Tilebuf *evas_common_tilebuf_new (int w, int h); +EAPI void evas_common_tilebuf_free (Tilebuf *tb); +EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th); +EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th); +EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h); +EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h); +EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha); +EAPI void evas_common_tilebuf_clear (Tilebuf *tb); +EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb); +EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects); + +/* +Regionbuf *evas_common_regionbuf_new (int w, int h); +void evas_common_regionbuf_free (Regionbuf *rb); +void evas_common_regionbuf_clear (Regionbuf *rb); +void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y); +void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y); +Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb); +*/ + +/****/ +#include "../engines/common/evas_draw.h" + +#include "../engines/common/evas_map_image.h" + +/****/ +#ifdef BUILD_PIPE_RENDER +# include "../engines/common/evas_pipe.h" +#endif + +void evas_font_dir_cache_free(void); + +/****/ + +/*****************************************************************************/ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libraries/evas/src/lib/include/evas_common_soft16.h b/libraries/evas/src/lib/include/evas_common_soft16.h new file mode 100644 index 0000000..446319e --- /dev/null +++ b/libraries/evas/src/lib/include/evas_common_soft16.h @@ -0,0 +1,100 @@ +#ifndef EVAS_COMMON_SOFT16_H +#define EVAS_COMMON_SOFT16_H + +#include "evas_common.h" +#include "evas_private.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define RGB_565_UNPACKED_MASK 0x07e0f81f +#define RGB_565_UNPACK(rgb) \ + (((rgb) | ((rgb) << 16)) & RGB_565_UNPACKED_MASK) +#define RGB_565_PACK(rgb) \ + ((((rgb) & RGB_565_UNPACKED_MASK) | \ + ((rgb) & RGB_565_UNPACKED_MASK) >> 16) & 0xffff) +#define RGB_565_UNPACKED_BLEND(a, b, alpha) \ + ((b) + (a) - ((((b) * (alpha)) >> 5) & RGB_565_UNPACKED_MASK)) +#define RGB_565_UNPACKED_BLEND_UNMUL(a, b, alpha) \ + ((b) + ((((a) - (b)) * (alpha)) >> 5)) + +#define RGB_565_FROM_COMPONENTS(r, g, b) \ + (((((r) >> 3) & 0x1f) << 11) | \ + ((((g) >> 2) & 0x3f) << 5) | \ + (((b) >> 3) & 0x1f)) + +static inline unsigned int +_calc_stride(unsigned int w) +{ + unsigned int pad = w % 4; + if (!pad) return w; + else return w + 4 - pad; +} + +#define IMG_BYTE_SIZE(stride, height, has_alpha) \ + ((stride) * (height) * (!(has_alpha) ? 2 : 3)) + +typedef struct _Soft16_Image Soft16_Image; +struct _Soft16_Image +{ + Image_Entry cache_entry; + + RGBA_Image *source; + + int stride; // pixel stride - likely a multiple of 2 + DATA16 *pixels; // 16bpp pixels rgb565 + DATA8 *alpha; // 8bit alpha mask - optional. points into pixels + + struct + { +/* unsigned char have_alpha : 1; // 1 if we have halpha */ + unsigned char free_pixels : 1; // 1 if pixels should be freed + unsigned char free_alpha : 1; // 1 if alpha mask should be freed + } flags; +}; + +/** + * Image (evas_soft16_main.c) + */ +EAPI void evas_common_soft16_image_init(void); +EAPI void evas_common_soft16_image_shutdown(void); +EAPI Evas_Cache_Image *evas_common_soft16_image_cache_get(void); + +EAPI void evas_common_soft16_image_draw(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, int smooth); +EAPI Soft16_Image *evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha); + +void evas_common_soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr); +void evas_common_soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr); + +/* convert/dither functions */ +void evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src); +void evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src); + +/** + * Rectangle (evas_soft16_rectangle.c) + */ +EAPI void evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); + +/** + * Polygon (evas_soft16_polygon.c) + */ + EAPI void evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); + +/** + * Line (evas_soft16_line.c) + */ +EAPI void evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); + +/** + * Font (evas_soft16_font.c) + */ +EAPI void *evas_common_soft16_font_glyph_new(void *data, RGBA_Font_Glyph *fg); +EAPI void evas_common_soft16_font_glyph_free(void *ext_dat); +EAPI void evas_common_soft16_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libraries/evas/src/lib/include/evas_common_soft8.h b/libraries/evas/src/lib/include/evas_common_soft8.h new file mode 100644 index 0000000..d701842 --- /dev/null +++ b/libraries/evas/src/lib/include/evas_common_soft8.h @@ -0,0 +1,184 @@ +#ifndef EVAS_COMMON_SOFT8_H +#define EVAS_COMMON_SOFT8_H + +#include "evas_common.h" +#include "evas_private.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define GRY_8_BLEND(a, b, alpha) \ + ((b) + (a) - ((((b) * ((alpha) + 1)) >> 8) & 0xff)) + +#define GRY_8_BLEND_UNMUL(a, b, alpha) \ + ((b) + ((((a) - (b)) * ((alpha) + 1)) >> 8)) + +#if 0 +#define GRY_8_FROM_COMPONENTS(r, g, b) \ + (((307 * (r)) + \ + (604 * (g)) + \ + (113 * (b))) >> 10) + +#define GRY_8_FROM_RGB(rgb) \ + GRY_8_FROM_COMPONENTS(R_VAL(rgb), G_VAL(rgb), B_VAL(rgb)) +#endif + +//Y = R * 0.2126 + G * 0.7152 + B * 0.0722 + +#define GRY_8_FROM_COMPONENTS(r, g, b) \ + (((218 * (r)) + \ + (732 * (g)) + \ + (74 * (b))) >> 10) + +#define GRY_8_FROM_RGB(rgb) \ + GRY_8_FROM_COMPONENTS(R_VAL(rgb), G_VAL(rgb), B_VAL(rgb)) + +#define UNROLL2(op...) op op +#define UNROLL4(op...) UNROLL2(op) UNROLL2(op) +#define UNROLL8(op...) UNROLL4(op) UNROLL4(op) +#define UNROLL16(op...) UNROLL8(op) UNROLL8(op) + +#if defined(__ARM_ARCH_3M__) +# define __ARM_ARCH__ 40 +#endif +#if defined(__ARM_ARCH_4__) +# define __ARM_ARCH__ 40 +#endif +#if defined(__ARM_ARCH_4T__) +# define __ARM_ARCH__ 41 +#endif + +#if defined(__ARM_ARCH_5__) +# define __ARM_ARCH__ 50 +#endif +#if defined(__ARM_ARCH_5T__) +# define __ARM_ARCH__ 51 +#endif +#if defined(__ARM_ARCH_5E__) +# define __ARM_ARCH__ 52 +#endif +#if defined(__ARM_ARCH_5TE__) +# define __ARM_ARCH__ 53 +#endif +#if defined(__ARM_ARCH_5TEJ__) +# define __ARM_ARCH__ 54 +#endif + +#if defined(__ARM_ARCH_6__) +# define __ARM_ARCH__ 60 +#endif +#if defined(__ARM_ARCH_6J__) +# define __ARM_ARCH__ 61 +#endif +#if defined(__ARM_ARCH_6K__) +# define __ARM_ARCH__ 62 +#endif +#if defined(__ARM_ARCH_6Z__) +# define __ARM_ARCH__ 63 +#endif +#if defined(__ARM_ARCH_6ZK__) +# define __ARM_ARCH__ 64 +#endif +#if defined(__ARM_ARCH_6T2__) +# define __ARM_ARCH__ 65 +#endif + +#if defined(__ARM_ARCH_7__) +# define __ARM_ARCH__ 70 +#endif +#if defined(__ARM_ARCH_7A__) +# define __ARM_ARCH__ 71 +#endif +#if defined(__ARM_ARCH_7R__) +# define __ARM_ARCH__ 72 +#endif +#if defined(__ARM_ARCH_7M__) +# define __ARM_ARCH__ 73 +#endif + +#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52) +/* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */ +#define pld(addr, off) \ + __asm__("pld [%[address], %[offset]]":: \ + [address] "r" (addr), [offset] "i" (off)) +#else +#define pld(addr, off) +#endif /* __ARMEL__ */ + +static inline unsigned int +_calc_stride(unsigned int w) +{ + unsigned int pad = w % 4; + if (!pad) return w; + else return w + 4 - pad; +} + +#define IMG_BYTE_SIZE(stride, height, has_alpha) \ + ((stride) * (height) * (!(has_alpha) ? 1 : 2)) + +typedef struct _Soft8_Image Soft8_Image; +struct _Soft8_Image +{ + Image_Entry cache_entry; + + RGBA_Image *source; + + int stride; // pixel stride + DATA8 *pixels; // 8bpp pixels gry8 + DATA8 *alpha; // 8bit alpha mask - optional. points into pixels + + void *extended_info; + + struct + { +/* unsigned char have_alpha : 1; // 1 if we have halpha */ + unsigned char free_pixels : 1; // 1 if pixels should be freed + unsigned char free_alpha : 1; // 1 if alpha mask should be freed + } flags; +}; + +/** + * Image (evas_soft8_main.c) + */ +EAPI void evas_common_soft8_image_init(void); +EAPI void evas_common_soft8_image_shutdown(void); +EAPI Evas_Cache_Image *evas_common_soft8_image_cache_get(void); + +EAPI void evas_common_soft8_image_draw(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, int smooth); +EAPI Soft8_Image *evas_common_soft8_image_alpha_set(Soft8_Image *im, int have_alpha); + +void evas_common_soft8_image_draw_unscaled(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr); +void evas_common_soft8_image_draw_scaled_sampled(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr); + +/* convert/dither functions */ +void evas_common_soft8_image_convert_from_rgb(Soft8_Image *im, const DATA32 *src); +void evas_common_soft8_image_convert_from_rgba(Soft8_Image *im, const DATA32 *src); + +/** + * Rectangle (evas_soft8_rectangle.c) + */ +EAPI void evas_common_soft8_rectangle_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); + +/** + * Polygon (evas_soft8_polygon.c) + */ +EAPI void evas_common_soft8_polygon_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); + +/** + * Line (evas_soft8_line.c) + */ +EAPI void evas_common_soft8_line_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); + +/** + * Font (evas_soft8_font.c) + */ +EAPI void *evas_common_soft8_font_glyph_new(void *data, RGBA_Font_Glyph *fg); +EAPI void evas_common_soft8_font_glyph_free(void *ext_dat); +EAPI void evas_common_soft8_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libraries/evas/src/lib/include/evas_inline.x b/libraries/evas/src/lib/include/evas_inline.x new file mode 100644 index 0000000..45f2b1f --- /dev/null +++ b/libraries/evas/src/lib/include/evas_inline.x @@ -0,0 +1,259 @@ +#ifndef EVAS_INLINE_H +#define EVAS_INLINE_H + +static inline void +_evas_object_event_new(void) +{ + _evas_event_counter++; +} + +static inline int +evas_object_was_visible(Evas_Object *obj) +{ + if ((obj->prev.visible) && + ((obj->prev.cache.clip.visible) || (obj->smart.smart)) && + ((obj->prev.cache.clip.a > 0 && obj->prev.render_op == EVAS_RENDER_BLEND) + || obj->prev.render_op != EVAS_RENDER_BLEND)) + { + if (obj->func->was_visible) + return obj->func->was_visible(obj); + return 1; + } + return 0; +} + +static inline void +evas_add_rect(Eina_Array *rects, int x, int y, int w, int h) +{ + Eina_Rectangle *r; + + NEW_RECT(r, x, y, w, h); + if (r) eina_array_push(rects, r); +} + +static inline Cutout_Rect* +evas_common_draw_context_cutouts_add(Cutout_Rects* rects, + int x, int y, int w, int h) +{ + Cutout_Rect* rect; + + if (rects->max < (rects->active + 1)) + { + rects->max += 128; + rects->rects = (Cutout_Rect *)realloc(rects->rects, sizeof(Cutout_Rect) * rects->max); + } + + rect = rects->rects + rects->active; + rect->x = x; + rect->y = y; + rect->w = w; + rect->h = h; + rects->active++; + + return rect; +} + +static inline int +evas_object_is_opaque(Evas_Object *obj) +{ + if (obj->smart.smart) return 0; + /* If a mask: Assume alpha */ + if (obj->cur.mask) return 0; + if (obj->cur.cache.clip.a == 255) + { + if (obj->func->is_opaque) + return obj->func->is_opaque(obj); + return 1; + } + if (obj->cur.render_op == EVAS_RENDER_COPY) + return 1; + return 0; +} + +static inline int +evas_event_freezes_through(Evas_Object *obj) +{ + if (obj->freeze_events) return 1; + if (obj->parent_cache.freeze_events_valid) + return obj->parent_cache.freeze_events; + if (!obj->smart.parent) return 0; + obj->parent_cache.freeze_events = + evas_event_freezes_through(obj->smart.parent); + obj->parent_cache.freeze_events_valid = EINA_TRUE; + return obj->parent_cache.freeze_events; +} + +static inline int +evas_event_passes_through(Evas_Object *obj) +{ + if (obj->pass_events) return 1; + if (obj->parent_cache.pass_events_valid) + return obj->parent_cache.pass_events; + if (!obj->smart.parent) return 0; + obj->parent_cache.pass_events = + evas_event_passes_through(obj->smart.parent); + obj->parent_cache.pass_events_valid = EINA_TRUE; + return obj->parent_cache.pass_events; +} + +static inline int +evas_object_is_visible(Evas_Object *obj) +{ /* post 1.0 -> enable? */ + if ((obj->cur.visible)/* && (obj->cur.color.a > 0)*/ && + ((obj->cur.cache.clip.visible) || (obj->smart.smart)) && + ((obj->cur.cache.clip.a > 0 && obj->cur.render_op == EVAS_RENDER_BLEND) + || obj->cur.render_op != EVAS_RENDER_BLEND)) + { + if (obj->func->is_visible) + return obj->func->is_visible(obj); + return 1; + } + return 0; +} + +static inline int +evas_object_clippers_is_visible(Evas_Object *obj) +{ + if (obj->cur.visible) + { + if (obj->cur.clipper) + return evas_object_clippers_is_visible(obj->cur.clipper); + return 1; + } + return 0; +} + +static inline int +evas_object_is_in_output_rect(Evas_Object *obj, int x, int y, int w, int h) +{ + /* assumes coords have been recalced */ + if ((RECTS_INTERSECT(x, y, w, h, + obj->cur.cache.clip.x, + obj->cur.cache.clip.y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h))) + return 1; + return 0; +} + +static inline int +evas_object_is_active(Evas_Object *obj) +{ + if (evas_object_is_visible(obj) || evas_object_was_visible(obj)) + { + if (obj->smart.smart) + { + int mapsmt = 0; + if (obj->smart.smart && (obj->cur.map && obj->cur.usemap)) mapsmt = 1; + if (!mapsmt) return 1; + if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, + obj->layer->evas->output.h) || + evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, + obj->layer->evas->output.h)) + return 1; + } + else + { + if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, + obj->layer->evas->output.h) || + evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, + obj->layer->evas->output.h)) + return 1; + } + } + return 0; +} + +static inline void +evas_object_coords_recalc(Evas_Object *obj) +{ +//// if (obj->cur.cache.geometry.validity == obj->layer->evas->output_validity) +//// return; +//// obj->cur.cache.geometry.x = +//// evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.x); +//// obj->cur.cache.geometry.y = +//// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.y); +//// obj->cur.cache.geometry.w = +//// evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.w) - +//// evas_coord_world_x_to_screen(obj->layer->evas, 0); +//// obj->cur.cache.geometry.h = +//// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.h) - +//// evas_coord_world_y_to_screen(obj->layer->evas, 0); + if (obj->func->coords_recalc) obj->func->coords_recalc(obj); +//// obj->cur.cache.geometry.validity = obj->layer->evas->output_validity; +} + +static inline void +evas_object_clip_recalc(Evas_Object *obj) +{ + int cx, cy, cw, ch, cvis, cr, cg, cb, ca; + int nx, ny, nw, nh, nvis, nr, ng, nb, na; + + if ((!obj->cur.cache.clip.dirty) && + !(!obj->cur.clipper || obj->cur.clipper->cur.cache.clip.dirty)) + return; + if (obj->layer->evas->events_frozen > 0) return; + evas_object_coords_recalc(obj); + if ((obj->cur.map) && (obj->cur.usemap)) + { + cx = obj->cur.map->normal_geometry.x; + cy = obj->cur.map->normal_geometry.y; + cw = obj->cur.map->normal_geometry.w; + ch = obj->cur.map->normal_geometry.h; + } + else + { + cx = obj->cur.geometry.x; + cy = obj->cur.geometry.y; + cw = obj->cur.geometry.w; + ch = obj->cur.geometry.h; + } +//// cx = obj->cur.cache.geometry.x; cy = obj->cur.cache.geometry.y; +//// cw = obj->cur.cache.geometry.w; ch = obj->cur.cache.geometry.h; + if (obj->cur.color.a == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) cvis = 0; + else cvis = obj->cur.visible; + cr = obj->cur.color.r; cg = obj->cur.color.g; + cb = obj->cur.color.b; ca = obj->cur.color.a; + if (obj->cur.clipper) + { +// this causes problems... hmmm ????? + if (obj->cur.clipper->cur.cache.clip.dirty) + evas_object_clip_recalc(obj->cur.clipper); + + // I don't know why this test was here in the first place. As I have + // no issue showing up due to this, I keep it and move color out of it. +// breaks cliping of mapped images!!! + if (obj->cur.clipper->cur.map_parent == obj->cur.map_parent) + { + nx = obj->cur.clipper->cur.cache.clip.x; + ny = obj->cur.clipper->cur.cache.clip.y; + nw = obj->cur.clipper->cur.cache.clip.w; + nh = obj->cur.clipper->cur.cache.clip.h; + RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh); + } + + nvis = obj->cur.clipper->cur.cache.clip.visible; + nr = obj->cur.clipper->cur.cache.clip.r; + ng = obj->cur.clipper->cur.cache.clip.g; + nb = obj->cur.clipper->cur.cache.clip.b; + na = obj->cur.clipper->cur.cache.clip.a; + cvis = cvis * nvis; + cr = (cr * (nr + 1)) >> 8; + cg = (cg * (ng + 1)) >> 8; + cb = (cb * (nb + 1)) >> 8; + ca = (ca * (na + 1)) >> 8; + } + if ((ca == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) || (cw <= 0) || (ch <= 0)) cvis = 0; + obj->cur.cache.clip.x = cx; + obj->cur.cache.clip.y = cy; + obj->cur.cache.clip.w = cw; + obj->cur.cache.clip.h = ch; + obj->cur.cache.clip.visible = cvis; + obj->cur.cache.clip.r = cr; + obj->cur.cache.clip.g = cg; + obj->cur.cache.clip.b = cb; + obj->cur.cache.clip.a = ca; + obj->cur.cache.clip.dirty = 0; +} + +#endif diff --git a/libraries/evas/src/lib/include/evas_macros.h b/libraries/evas/src/lib/include/evas_macros.h new file mode 100644 index 0000000..ed29dbd --- /dev/null +++ b/libraries/evas/src/lib/include/evas_macros.h @@ -0,0 +1,217 @@ +#ifndef EVAS_MACROS_H +#define EVAS_MACROS_H + +#undef ABS +#define ABS(x) (((x) < 0) ? -(x) : (x)) + +#undef SGN +#define SGN(x) (((x) < 0) ? -1 : 1) + +#undef MIN +#define MIN(x, y) (((x) < (y)) ? (x) : (y)) + +#undef MAX +#define MAX(x, y) (((x) > (y)) ? (x) : (y)) + +#define SWAP32(x) (x) = \ + ((((x) & 0x000000ff ) << 24) | \ + (((x) & 0x0000ff00 ) << 8) | \ + (((x) & 0x00ff0000 ) >> 8) | \ + (((x) & 0xff000000 ) >> 24)) + +#define SWAP16(x) (x) = \ + ((((x) & 0x00ff ) << 8) | \ + (((x) & 0xff00 ) >> 8)) + +#define SPANS_COMMON(x1, w1, x2, w2) \ +(!(( (int)((x2) + (int)(w2)) <= (int)(x1)) || (int)((x2) >= (int)((x1) + (int)(w1))))) + +#define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \ +((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh)))) + +#define RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \ +{ \ + if (RECTS_INTERSECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch)) \ + { \ + if ((int)_x < (int)(_cx)) \ + { \ + if ((int)_w + ((int)_x - (int)(_cx)) < 0) _w = 0; \ + else _w += ((int)_x - (int)(_cx)); \ + _x = (_cx); \ + } \ + if ((int)(_x + _w) > (int)((_cx) + (_cw))) \ + _w = (_cx) + (_cw) - _x; \ + if ((int)_y < (int)(_cy)) \ + { \ + if ((int)_h + ((int)_y - (int)(_cy)) < 0) _h = 0; \ + else _h += ((int)_y - (int)(_cy)); \ + _y = (_cy); \ + } \ + if ((int)(_y + _h) > (int)((_cy) + (_ch))) \ + _h = (_cy) + (_ch) - _y; \ + } \ + else \ + { \ + _w = 0; _h = 0; \ + } \ +} + + +#define INTERP_VAL(out, in1, in2, in3, in4, interp_x, interp_y) \ + { \ + int _v, _vv; \ + \ + _v = (256 - (interp_x)) * (in1); \ + if ((interp_x) > 0) _v += (interp_x) * (in2); \ + _v *= (256 - (interp_y)); \ + if ((interp_y) > 0) \ + { \ + _vv = (256 - (interp_x)) * (in3); \ + if ((interp_x) > 0) _vv += (interp_x) * (in4); \ + _vv *= (interp_y); \ + (out) = ((_v + _vv) >> 16); \ + } \ + else (out) = (_v >> 16); \ + } + +#define INTERP_2(in1, in2, interp, interp_inv) \ + ((in1 * interp_inv) + (in2 * interp)) >> 8 + + +#define CONVERT_LOOP_START_ROT_0() \ + src_ptr = src; \ + for (y = 0; y < h; y++) \ + { \ + for (x = 0; x < w; x++) \ + { + +#define CONVERT_LOOP_END_ROT_0() \ + dst_ptr++; \ + src_ptr++; \ + } \ + src_ptr += src_jump; \ + dst_ptr += dst_jump; \ + } + +#define CONVERT_LOOP_START_ROT_180() \ + src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \ + for (y = 0; y < h; y++) \ + { \ + for (x = 0; x < w; x++) \ + { + +#define CONVERT_LOOP_END_ROT_180() \ + dst_ptr++; \ + src_ptr--; \ + } \ + src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \ + dst_ptr += dst_jump; \ + } + +#define CONVERT_LOOP_START_ROT_270() \ + src_ptr = src + ((w - 1) * (h + src_jump)); \ + for (y = 0; y < h; y++) \ + { \ + for (x = 0; x < w; x++) \ + { + +#define CONVERT_LOOP_END_ROT_270() \ + dst_ptr++; \ + src_ptr -= (h + src_jump); \ + } \ + src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \ + dst_ptr += dst_jump; \ + } + +#define CONVERT_LOOP_START_ROT_90() \ + src_ptr = src + (h - 1); \ + for (y = 0; y < h; y++) \ + { \ + for (x = 0; x < w; x++) \ + { + +#define CONVERT_LOOP_END_ROT_90() \ + dst_ptr++; \ + src_ptr += (h + src_jump); \ + } \ + src_ptr = src + (h - 1) - y - 1; \ + dst_ptr += dst_jump; \ + } + +#define CONVERT_LOOP2_START_ROT_0() \ + src_ptr = src; \ + for (y = 0; y < h; y++) \ + { \ + for (x = 0; x < w; x++) \ + { + +#define CONVERT_LOOP2_INC_ROT_0() \ +src_ptr++; \ +x++; + +#define CONVERT_LOOP2_END_ROT_0() \ + dst_ptr+=2; \ + src_ptr++; \ + } \ + src_ptr += src_jump; \ + dst_ptr += dst_jump; \ + } + +#define CONVERT_LOOP2_START_ROT_180() \ + src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \ + for (y = 0; y < h; y++) \ + { \ + for (x = 0; x < w; x++) \ + { + +#define CONVERT_LOOP2_INC_ROT_180() \ +src_ptr--; \ +x++; + +#define CONVERT_LOOP2_END_ROT_180() \ + dst_ptr+=2; \ + src_ptr--; \ + } \ + src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \ + dst_ptr += dst_jump; \ + } + +#define CONVERT_LOOP2_START_ROT_270() \ + src_ptr = src + ((w - 1) * (h + src_jump)); \ + for (y = 0; y < h; y++) \ + { \ + for (x = 0; x < w; x++) \ + { + +#define CONVERT_LOOP2_INC_ROT_270() \ +src_ptr -= (h + src_jump); \ +x++; + +#define CONVERT_LOOP2_END_ROT_270() \ + dst_ptr+=2; \ + src_ptr -= (h + src_jump); \ + } \ + src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \ + dst_ptr += dst_jump; \ + } + +#define CONVERT_LOOP2_START_ROT_90() \ + src_ptr = src + (h - 1); \ + for (y = 0; y < h; y++) \ + { \ + for (x = 0; x < w; x++) \ + { + +#define CONVERT_LOOP2_INC_ROT_90() \ +src_ptr += (h + src_jump); \ +x++; + +#define CONVERT_LOOP2_END_ROT_90() \ + dst_ptr+=2; \ + src_ptr += (h + src_jump); \ + } \ + src_ptr = src + (h - 1) - y - 1; \ + dst_ptr += dst_jump; \ + } + +#endif diff --git a/libraries/evas/src/lib/include/evas_mmx.h b/libraries/evas/src/lib/include/evas_mmx.h new file mode 100644 index 0000000..e1095e1 --- /dev/null +++ b/libraries/evas/src/lib/include/evas_mmx.h @@ -0,0 +1,735 @@ +/* mmx.h + + MultiMedia eXtensions GCC interface library for IA32. + + To use this library, simply include this header file + and compile with GCC. You MUST have inlining enabled + in order for mmx_ok() to work; this can be done by + simply using -O on the GCC command line. + + Compiling with -DMMX_TRACE will cause detailed trace + output to be sent to stderr for each mmx operation. + This adds lots of code, and obviously slows execution to + a crawl, but can be very useful for debugging. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR ANY PARTICULAR PURPOSE. + + 1997-98 by H. Dietz and R. Fisher + + History: + 97-98* R.Fisher Early versions + 980501 R.Fisher Original Release + 980611* H.Dietz Rewrite, correctly implementing inlines, and + R.Fisher including direct register accesses. + 980616 R.Fisher Release of 980611 as 980616. + 980714 R.Fisher Minor corrections to Makefile, etc. + 980715 R.Fisher mmx_ok() now prevents optimizer from using + clobbered values. + mmx_ok() now checks if cpuid instruction is + available before trying to use it. + 980726* R.Fisher mm_support() searches for AMD 3DNow, Cyrix + Extended MMX, and standard MMX. It returns a + value which is positive if any of these are + supported, and can be masked with constants to + see which. mmx_ok() is now a call to this + 980726* R.Fisher Added i2r support for shift functions + 980919 R.Fisher Fixed AMD extended feature recognition bug. + 980921 R.Fisher Added definition/check for _MMX_H. + Added "float s[2]" to mmx_t for use with + 3DNow and EMMX. So same mmx_t can be used. + 981013 R.Fisher Fixed cpuid function 1 bug (looked at wrong reg) + Fixed psllq_i2r error in mmxtest.c + + * Unreleased (internal or interim) versions + + Notes: + It appears that the latest gas has the pand problem fixed, therefore + I'll undefine BROKEN_PAND by default. + String compares may be quicker than the multiple test/jumps in vendor + test sequence in mmx_ok(), but I'm not concerned with that right now. + + Acknowledgments: + Jussi Laako for pointing out the errors ultimately found to be + connected to the failure to notify the optimizer of clobbered values. + Roger Hardiman for reminding us that CPUID isn't everywhere, and that + someone may actually try to use this on a machine without CPUID. + Also for suggesting code for checking this. + Robert Dale for pointing out the AMD recognition bug. + Jimmy Mayfield and Carl Witty for pointing out the Intel recognition + bug. + Carl Witty for pointing out the psllq_i2r test bug. +*/ + +#ifndef _MMX_H +#define _MMX_H + +/* Warning: at this writing, the version of GAS packaged + with most Linux distributions does not handle the + parallel AND operation mnemonic correctly. If the + symbol BROKEN_PAND is defined, a slower alternative + coding will be used. If execution of mmxtest results + in an illegal instruction fault, define this symbol. +*/ +#undef BROKEN_PAND + + +/* The type of an value that fits in an MMX register + (note that long long constant values MUST be suffixed + by LL and unsigned long long values by ULL, lest + they be truncated by the compiler) +*/ +typedef union { + long long q; /* Quadword (64-bit) value */ + unsigned long long uq; /* Unsigned Quadword */ + int d[2]; /* 2 Doubleword (32-bit) values */ + unsigned int ud[2]; /* 2 Unsigned Doubleword */ + short w[4]; /* 4 Word (16-bit) values */ + unsigned short uw[4]; /* 4 Unsigned Word */ + char b[8]; /* 8 Byte (8-bit) values */ + unsigned char ub[8]; /* 8 Unsigned Byte */ + float s[2]; /* Single-precision (32-bit) value */ +} __attribute__ ((aligned (8))) mmx_t; + +/* Helper functions for the instruction macros that follow... + (note that memory-to-register, m2r, instructions are nearly + as efficient as register-to-register, r2r, instructions; + however, memory-to-memory instructions are really simulated + as a convenience, and are only 1/3 as efficient) +*/ + +/* These macros are a lot simpler without the tracing... +*/ + +#define mmx_i2r(op, imm, reg) \ + __asm__ __volatile__ (#op " $" #imm ", %%" #reg \ + : /* nothing */ \ + : /* nothing */); + +#define mmx_m2r(op, mem, reg) \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "m" (mem)) + +#define mmx_r2m(op, reg, mem) \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ + : "=m" (mem) \ + : /* nothing */ ) + +#define mmx_a2r(op, mem, reg) \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "m" (mem)) + +#define mmx_r2a(op, reg, mem) \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ + : "=m" (mem) \ + : /* nothing */ ) + +#define mmx_r2r(op, regs, regd) \ + __asm__ __volatile__ (#op " %" #regs ", %" #regd) + +#define mmx_m2m(op, mems, memd) \ + __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ + #op " %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (memd) \ + : "X" (mems)) + +/* 1x64 MOVE Quadword + (this is both a load and a store... + in fact, it is the only way to store) +*/ +#define movq_m2r(var, reg) mmx_m2r(movq, var, reg) +#define movq_r2m(reg, var) mmx_r2m(movq, reg, var) +#define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd) +#define movq(vars, vard) \ + __asm__ __volatile__ ("movq %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) +#define movntq_r2m(reg, var) mmx_r2m(movntq, reg, var) + + +/* 1x32 MOVE Doubleword + (like movq, this is both load and store... + but is most useful for moving things between + mmx registers and ordinary registers) +*/ +#define movd_m2r(var, reg) mmx_a2r(movd, var, reg) +#define movd_r2m(reg, var) mmx_r2a(movd, reg, var) +#define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd) +#define movd(vars, vard) \ + __asm__ __volatile__ ("movd %1, %%mm0\n\t" \ + "movd %%mm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) + + +/* 2x32, 4x16, and 8x8 Parallel ADDs +*/ +#define paddd_m2r(var, reg) mmx_m2r(paddd, var, reg) +#define paddd_r2r(regs, regd) mmx_r2r(paddd, regs, regd) +#define paddd(vars, vard) mmx_m2m(paddd, vars, vard) + +#define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg) +#define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd) +#define paddw(vars, vard) mmx_m2m(paddw, vars, vard) + +#define paddb_m2r(var, reg) mmx_m2r(paddb, var, reg) +#define paddb_r2r(regs, regd) mmx_r2r(paddb, regs, regd) +#define paddb(vars, vard) mmx_m2m(paddb, vars, vard) + + +/* 4x16 and 8x8 Parallel ADDs using Saturation arithmetic +*/ +#define paddsw_m2r(var, reg) mmx_m2r(paddsw, var, reg) +#define paddsw_r2r(regs, regd) mmx_r2r(paddsw, regs, regd) +#define paddsw(vars, vard) mmx_m2m(paddsw, vars, vard) + +#define paddsb_m2r(var, reg) mmx_m2r(paddsb, var, reg) +#define paddsb_r2r(regs, regd) mmx_r2r(paddsb, regs, regd) +#define paddsb(vars, vard) mmx_m2m(paddsb, vars, vard) + + +/* 4x16 and 8x8 Parallel ADDs using Unsigned Saturation arithmetic +*/ +#define paddusw_m2r(var, reg) mmx_m2r(paddusw, var, reg) +#define paddusw_r2r(regs, regd) mmx_r2r(paddusw, regs, regd) +#define paddusw(vars, vard) mmx_m2m(paddusw, vars, vard) + +#define paddusb_m2r(var, reg) mmx_m2r(paddusb, var, reg) +#define paddusb_r2r(regs, regd) mmx_r2r(paddusb, regs, regd) +#define paddusb(vars, vard) mmx_m2m(paddusb, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel SUBs +*/ +#define psubd_m2r(var, reg) mmx_m2r(psubd, var, reg) +#define psubd_r2r(regs, regd) mmx_r2r(psubd, regs, regd) +#define psubd(vars, vard) mmx_m2m(psubd, vars, vard) + +#define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg) +#define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd) +#define psubw(vars, vard) mmx_m2m(psubw, vars, vard) + +#define psubb_m2r(var, reg) mmx_m2r(psubb, var, reg) +#define psubb_r2r(regs, regd) mmx_r2r(psubb, regs, regd) +#define psubb(vars, vard) mmx_m2m(psubb, vars, vard) + + +/* 4x16 and 8x8 Parallel SUBs using Saturation arithmetic +*/ +#define psubsw_m2r(var, reg) mmx_m2r(psubsw, var, reg) +#define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd) +#define psubsw(vars, vard) mmx_m2m(psubsw, vars, vard) + +#define psubsb_m2r(var, reg) mmx_m2r(psubsb, var, reg) +#define psubsb_r2r(regs, regd) mmx_r2r(psubsb, regs, regd) +#define psubsb(vars, vard) mmx_m2m(psubsb, vars, vard) + + +/* 4x16 and 8x8 Parallel SUBs using Unsigned Saturation arithmetic +*/ +#define psubusw_m2r(var, reg) mmx_m2r(psubusw, var, reg) +#define psubusw_r2r(regs, regd) mmx_r2r(psubusw, regs, regd) +#define psubusw(vars, vard) mmx_m2m(psubusw, vars, vard) + +#define psubusb_m2r(var, reg) mmx_m2r(psubusb, var, reg) +#define psubusb_r2r(regs, regd) mmx_r2r(psubusb, regs, regd) +#define psubusb(vars, vard) mmx_m2m(psubusb, vars, vard) + + +/* 4x16 Parallel MULs giving Low 4x16 portions of results +*/ +#define pmullw_m2r(var, reg) mmx_m2r(pmullw, var, reg) +#define pmullw_r2r(regs, regd) mmx_r2r(pmullw, regs, regd) +#define pmullw(vars, vard) mmx_m2m(pmullw, vars, vard) + + +/* 4x16 Parallel MULs giving High 4x16 portions of results +*/ +#define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg) +#define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd) +#define pmulhw(vars, vard) mmx_m2m(pmulhw, vars, vard) + + +/* 4x16->2x32 Parallel Mul-ADD + (muls like pmullw, then adds adjacent 16-bit fields + in the multiply result to make the final 2x32 result) +*/ +#define pmaddwd_m2r(var, reg) mmx_m2r(pmaddwd, var, reg) +#define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd) +#define pmaddwd(vars, vard) mmx_m2m(pmaddwd, vars, vard) + + +/* 1x64 bitwise AND +*/ +#ifdef BROKEN_PAND +#define pand_m2r(var, reg) \ + { \ + mmx_m2r(pandn, (mmx_t) -1LL, reg); \ + mmx_m2r(pandn, var, reg); \ + } +#define pand_r2r(regs, regd) \ + { \ + mmx_m2r(pandn, (mmx_t) -1LL, regd); \ + mmx_r2r(pandn, regs, regd) \ + } +#define pand(vars, vard) \ + { \ + movq_m2r(vard, mm0); \ + mmx_m2r(pandn, (mmx_t) -1LL, mm0); \ + mmx_m2r(pandn, vars, mm0); \ + movq_r2m(mm0, vard); \ + } +#else +#define pand_m2r(var, reg) mmx_m2r(pand, var, reg) +#define pand_r2r(regs, regd) mmx_r2r(pand, regs, regd) +#define pand(vars, vard) mmx_m2m(pand, vars, vard) +#endif + + +/* 1x64 bitwise AND with Not the destination +*/ +#define pandn_m2r(var, reg) mmx_m2r(pandn, var, reg) +#define pandn_r2r(regs, regd) mmx_r2r(pandn, regs, regd) +#define pandn(vars, vard) mmx_m2m(pandn, vars, vard) + + +/* 1x64 bitwise OR +*/ +#define por_m2r(var, reg) mmx_m2r(por, var, reg) +#define por_r2r(regs, regd) mmx_r2r(por, regs, regd) +#define por(vars, vard) mmx_m2m(por, vars, vard) + + +/* 1x64 bitwise eXclusive OR +*/ +#define pxor_m2r(var, reg) mmx_m2r(pxor, var, reg) +#define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd) +#define pxor(vars, vard) mmx_m2m(pxor, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel CoMPare for EQuality + (resulting fields are either 0 or -1) +*/ +#define pcmpeqd_m2r(var, reg) mmx_m2r(pcmpeqd, var, reg) +#define pcmpeqd_r2r(regs, regd) mmx_r2r(pcmpeqd, regs, regd) +#define pcmpeqd(vars, vard) mmx_m2m(pcmpeqd, vars, vard) + +#define pcmpeqw_m2r(var, reg) mmx_m2r(pcmpeqw, var, reg) +#define pcmpeqw_r2r(regs, regd) mmx_r2r(pcmpeqw, regs, regd) +#define pcmpeqw(vars, vard) mmx_m2m(pcmpeqw, vars, vard) + +#define pcmpeqb_m2r(var, reg) mmx_m2r(pcmpeqb, var, reg) +#define pcmpeqb_r2r(regs, regd) mmx_r2r(pcmpeqb, regs, regd) +#define pcmpeqb(vars, vard) mmx_m2m(pcmpeqb, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel CoMPare for Greater Than + (resulting fields are either 0 or -1) +*/ +#define pcmpgtd_m2r(var, reg) mmx_m2r(pcmpgtd, var, reg) +#define pcmpgtd_r2r(regs, regd) mmx_r2r(pcmpgtd, regs, regd) +#define pcmpgtd(vars, vard) mmx_m2m(pcmpgtd, vars, vard) + +#define pcmpgtw_m2r(var, reg) mmx_m2r(pcmpgtw, var, reg) +#define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd) +#define pcmpgtw(vars, vard) mmx_m2m(pcmpgtw, vars, vard) + +#define pcmpgtb_m2r(var, reg) mmx_m2r(pcmpgtb, var, reg) +#define pcmpgtb_r2r(regs, regd) mmx_r2r(pcmpgtb, regs, regd) +#define pcmpgtb(vars, vard) mmx_m2m(pcmpgtb, vars, vard) + + +/* 1x64, 2x32, and 4x16 Parallel Shift Left Logical +*/ +#define psllq_i2r(imm, reg) mmx_i2r(psllq, imm, reg) +#define psllq_m2r(var, reg) mmx_m2r(psllq, var, reg) +#define psllq_r2r(regs, regd) mmx_r2r(psllq, regs, regd) +#define psllq(vars, vard) mmx_m2m(psllq, vars, vard) + +#define pslld_i2r(imm, reg) mmx_i2r(pslld, imm, reg) +#define pslld_m2r(var, reg) mmx_m2r(pslld, var, reg) +#define pslld_r2r(regs, regd) mmx_r2r(pslld, regs, regd) +#define pslld(vars, vard) mmx_m2m(pslld, vars, vard) + +#define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg) +#define psllw_m2r(var, reg) mmx_m2r(psllw, var, reg) +#define psllw_r2r(regs, regd) mmx_r2r(psllw, regs, regd) +#define psllw(vars, vard) mmx_m2m(psllw, vars, vard) + + +/* 1x64, 2x32, and 4x16 Parallel Shift Right Logical +*/ +#define psrlq_i2r(imm, reg) mmx_i2r(psrlq, imm, reg) +#define psrlq_m2r(var, reg) mmx_m2r(psrlq, var, reg) +#define psrlq_r2r(regs, regd) mmx_r2r(psrlq, regs, regd) +#define psrlq(vars, vard) mmx_m2m(psrlq, vars, vard) + +#define psrld_i2r(imm, reg) mmx_i2r(psrld, imm, reg) +#define psrld_m2r(var, reg) mmx_m2r(psrld, var, reg) +#define psrld_r2r(regs, regd) mmx_r2r(psrld, regs, regd) +#define psrld(vars, vard) mmx_m2m(psrld, vars, vard) + +#define psrlw_i2r(imm, reg) mmx_i2r(psrlw, imm, reg) +#define psrlw_m2r(var, reg) mmx_m2r(psrlw, var, reg) +#define psrlw_r2r(regs, regd) mmx_r2r(psrlw, regs, regd) +#define psrlw(vars, vard) mmx_m2m(psrlw, vars, vard) + + +/* 2x32 and 4x16 Parallel Shift Right Arithmetic +*/ +#define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg) +#define psrad_m2r(var, reg) mmx_m2r(psrad, var, reg) +#define psrad_r2r(regs, regd) mmx_r2r(psrad, regs, regd) +#define psrad(vars, vard) mmx_m2m(psrad, vars, vard) + +#define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg) +#define psraw_m2r(var, reg) mmx_m2r(psraw, var, reg) +#define psraw_r2r(regs, regd) mmx_r2r(psraw, regs, regd) +#define psraw(vars, vard) mmx_m2m(psraw, vars, vard) + + +/* 2x32->4x16 and 4x16->8x8 PACK and Signed Saturate + (packs source and dest fields into dest in that order) +*/ +#define packssdw_m2r(var, reg) mmx_m2r(packssdw, var, reg) +#define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd) +#define packssdw(vars, vard) mmx_m2m(packssdw, vars, vard) + +#define packsswb_m2r(var, reg) mmx_m2r(packsswb, var, reg) +#define packsswb_r2r(regs, regd) mmx_r2r(packsswb, regs, regd) +#define packsswb(vars, vard) mmx_m2m(packsswb, vars, vard) + + +/* 4x16->8x8 PACK and Unsigned Saturate + (packs source and dest fields into dest in that order) +*/ +#define packuswb_m2r(var, reg) mmx_m2r(packuswb, var, reg) +#define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd) +#define packuswb(vars, vard) mmx_m2m(packuswb, vars, vard) + + +/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK Low + (interleaves low half of dest with low half of source + as padding in each result field) +*/ +#define punpckldq_m2r(var, reg) mmx_m2r(punpckldq, var, reg) +#define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd) +#define punpckldq(vars, vard) mmx_m2m(punpckldq, vars, vard) + +#define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg) +#define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd) +#define punpcklwd(vars, vard) mmx_m2m(punpcklwd, vars, vard) + +#define punpcklbw_m2r(var, reg) mmx_m2r(punpcklbw, var, reg) +#define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd) +#define punpcklbw(vars, vard) mmx_m2m(punpcklbw, vars, vard) + + +/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK High + (interleaves high half of dest with high half of source + as padding in each result field) +*/ +#define punpckhdq_m2r(var, reg) mmx_m2r(punpckhdq, var, reg) +#define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd) +#define punpckhdq(vars, vard) mmx_m2m(punpckhdq, vars, vard) + +#define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg) +#define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd) +#define punpckhwd(vars, vard) mmx_m2m(punpckhwd, vars, vard) + +#define punpckhbw_m2r(var, reg) mmx_m2r(punpckhbw, var, reg) +#define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd) +#define punpckhbw(vars, vard) mmx_m2m(punpckhbw, vars, vard) + +#define MOVE_8DWORDS_MMX(src,dst) \ + __asm__ ( \ + "movq (%1), %%mm0 \n" \ + "movq 0x8(%1), %%mm1 \n" \ + "movq 0x10(%1), %%mm2 \n" \ + "movq 0x18(%1), %%mm3 \n" \ + "movq %%mm0, (%0) \n" \ + "movq %%mm1, 0x8(%0) \n" \ + "movq %%mm2, 0x10(%0) \n" \ + "movq %%mm3, 0x18(%0) \n" \ + : \ + : "q" (dst), "r" (src) \ + : "memory", "st"); + +#define MOVE_10DWORDS_MMX(src,dst) \ + __asm__ ( \ + "movq (%1), %%mm0 \n" \ + "movq 0x8(%1), %%mm1 \n" \ + "movq 0x10(%1), %%mm2 \n" \ + "movq 0x18(%1), %%mm3 \n" \ + "movq 0x20(%1), %%mm4 \n" \ + "movq %%mm0, (%0) \n" \ + "movq %%mm1, 0x8(%0) \n" \ + "movq %%mm2, 0x10(%0) \n" \ + "movq %%mm3, 0x18(%0) \n" \ + "movq %%mm4, 0x20(%0) \n" \ + : \ + : "q" (dst), "r" (src) \ + : "memory", "st"); + +#define MOVE_16DWORDS_MMX(src,dst) \ + __asm__ ( \ + "movq (%1), %%mm0 \n" \ + "movq 0x8(%1), %%mm1 \n" \ + "movq 0x10(%1), %%mm2 \n" \ + "movq 0x18(%1), %%mm3 \n" \ + "movq 0x20(%1), %%mm4 \n" \ + "movq 0x28(%1), %%mm5 \n" \ + "movq 0x30(%1), %%mm6 \n" \ + "movq 0x38(%1), %%mm7 \n" \ + "movq %%mm0, (%0) \n" \ + "movq %%mm1, 0x8(%0) \n" \ + "movq %%mm2, 0x10(%0) \n" \ + "movq %%mm3, 0x18(%0) \n" \ + "movq %%mm4, 0x20(%0) \n" \ + "movq %%mm5, 0x28(%0) \n" \ + "movq %%mm6, 0x30(%0) \n" \ + "movq %%mm7, 0x38(%0) \n" \ + : \ + : "q" (dst), "r" (src) \ + : "memory", "st"); + +#define MOVE_16DWORDS_MMX2(src,dst) \ + __asm__ ( \ + "movq (%1), %%mm0 \n" \ + "movq 0x8(%1), %%mm1 \n" \ + "movq 0x10(%1), %%mm2 \n" \ + "movq 0x18(%1), %%mm3 \n" \ + "movq 0x20(%1), %%mm4 \n" \ + "movq 0x28(%1), %%mm5 \n" \ + "movq 0x30(%1), %%mm6 \n" \ + "movq 0x38(%1), %%mm7 \n" \ + "movntq %%mm0, (%0) \n" \ + "movntq %%mm1, 0x8(%0) \n" \ + "movntq %%mm2, 0x10(%0) \n" \ + "movntq %%mm3, 0x18(%0) \n" \ + "movntq %%mm4, 0x20(%0) \n" \ + "movntq %%mm5, 0x28(%0) \n" \ + "movntq %%mm6, 0x30(%0) \n" \ + "movntq %%mm7, 0x38(%0) \n" \ + : \ + : "q" (dst), "r" (src) \ + : "memory", "st"); + +#define MOVE_32DWORDS_SSE2(src,dst) \ + __asm__ ( \ + "movdqu (%1), %%xmm0 \n" \ + "movdqu 0x10(%1), %%xmm1 \n" \ + "movdqu 0x20(%1), %%xmm2 \n" \ + "movdqu 0x30(%1), %%xmm3 \n" \ + "movdqu 0x40(%1), %%xmm4 \n" \ + "movdqu 0x50(%1), %%xmm5 \n" \ + "movdqu 0x60(%1), %%xmm6 \n" \ + "movdqu 0x70(%1), %%xmm7 \n" \ + "movntdq %%xmm0, (%0) \n" \ + "movntdq %%xmm1, 0x10(%0) \n" \ + "movntdq %%xmm2, 0x20(%0) \n" \ + "movntdq %%xmm3, 0x30(%0) \n" \ + "movntdq %%xmm4, 0x40(%0) \n" \ + "movntdq %%xmm5, 0x50(%0) \n" \ + "movntdq %%xmm6, 0x60(%0) \n" \ + "movntdq %%xmm7, 0x70(%0) \n" \ + : \ + : "q" (dst), "r" (src) \ + : "memory", "st"); + +#define MOVE_32DWORDS_ALIGNED_SSE2(src,dst) \ + __asm__ ( \ + "movdqa (%1), %%xmm0 \n" \ + "movdqa 0x10(%1), %%xmm1 \n" \ + "movdqa 0x20(%1), %%xmm2 \n" \ + "movdqa 0x30(%1), %%xmm3 \n" \ + "movdqa 0x40(%1), %%xmm4 \n" \ + "movdqa 0x50(%1), %%xmm5 \n" \ + "movdqa 0x60(%1), %%xmm6 \n" \ + "movdqa 0x70(%1), %%xmm7 \n" \ + "movntdq %%xmm0, (%0) \n" \ + "movntdq %%xmm1, 0x10(%0) \n" \ + "movntdq %%xmm2, 0x20(%0) \n" \ + "movntdq %%xmm3, 0x30(%0) \n" \ + "movntdq %%xmm4, 0x40(%0) \n" \ + "movntdq %%xmm5, 0x50(%0) \n" \ + "movntdq %%xmm6, 0x60(%0) \n" \ + "movntdq %%xmm7, 0x70(%0) \n" \ + : \ + : "q" (dst), "r" (src) \ + : "memory", "st"); + +/* Empty MMx State + (used to clean-up when going from mmx to float use + of the registers that are shared by both; note that + there is no float-to-mmx operation needed, because + only the float tag word info is corruptible) +*/ + +#define emms() __asm__ __volatile__ ("emms":::"memory") +#define sfence() __asm__ __volatile__ ("sfence":::"memory") + +/* additions to detect mmx - */ +/* Raster */ + +#define CPUID_MMX (1 << 23) /* flags: mmx */ +#define CPUID_SSE (1 << 25) /* flags: xmm */ +#define CPUID_SSE2 (1 << 26) /* flags: ? */ + +/* +#ifdef __amd64 +#define have_cpuid(cpuid_ret) \ + __asm__ __volatile__ ( \ + ".align 32 \n" \ + " pushq %%rbx \n" \ + " pushfq \n" \ + " popq %%rax \n" \ + " movq %%rax, %%rbx \n" \ + " xorq $0x200000, %%rax \n" \ + " pushq %%rax \n" \ + " popfq \n" \ + " pushfq \n" \ + " popq %%rax \n" \ + " cmpq %%rax, %%rbx \n" \ + " je 1f \n" \ + " movl $1, %0 \n" \ + " jmp 2f \n" \ + "1: \n" \ + " movl $0, %0 \n" \ + "2: \n" \ + " popq %%rbx \n" \ + : "=m" (cpuid_ret) \ + ); + +#define get_cpuid(cpuid_ret) \ + __asm__ __volatile__ ( \ + ".align 32 \n" \ + " pushq %%rax \n" \ + " movl $1, %%eax \n" \ + " cpuid \n" \ + " test $0x00800000, %%edx\n" \ + "1: \n" \ + " movl %%edx, %0 \n" \ + " jmp 2f \n" \ + "2: \n" \ + " movl $0, %0 \n" \ + " popq %%rax \n" \ + : "=m" (cpuid_ret) \ + ); +#else +#define have_cpuid(cpuid_ret) \ + __asm__ __volatile__ ( \ + ".align 32 \n" \ + " pushl %%ebx \n" \ + " pushfl \n" \ + " popl %%eax \n" \ + " movl %%eax, %%ebx \n" \ + " xorl $0x200000, %%eax \n" \ + " pushl %%eax \n" \ + " popfl \n" \ + " pushfl \n" \ + " popl %%eax \n" \ + " cmpl %%eax, %%ebx \n" \ + " je 1f \n" \ + " movl $1, %0 \n" \ + " jmp 2f \n" \ + "1: \n" \ + " movl $0, %0 \n" \ + "2: \n" \ + " popl %%ebx \n" \ + : "=m" (cpuid_ret) \ + ); + +#define get_cpuid(cpuid_ret) \ + __asm__ __volatile__ ( \ + ".align 32 \n" \ + " pushl %%eax \n" \ + " movl $1, %%eax \n" \ + " cpuid \n" \ + " test $0x00800000, %%edx\n" \ + "1: \n" \ + " movl %%edx, %0 \n" \ + " jmp 2f \n" \ + "2: \n" \ + " movl $0, %0 \n" \ + " popl %%eax \n" \ + : "=m" (cpuid_ret) \ + ); +#endif + */ + +#define prefetch(var) \ + __asm__ __volatile__ ( \ + "prefetchnta (%0) \n" \ + : \ + : "r" (var) \ + ); +#define prefetch0(var) \ + __asm__ __volatile__ ( \ + "prefetcht0 (%0) \n" \ + : \ + : "r" (var) \ + ); +#define prefetch1(var) \ + __asm__ __volatile__ ( \ + "prefetcht1 (%0) \n" \ + : \ + : "r" (var) \ + ); +#define prefetch2(var) \ + __asm__ __volatile__ ( \ + "prefetcht2 (%0) \n" \ + : \ + : "r" (var) \ + ); +#define pshufw(r1, r2, imm) \ + __asm__ __volatile__ ( \ + "pshufw $" #imm ", %" #r1 ", %" #r2 " \n" \ + ); + +#define pshufhw(r1, r2, imm) \ + __asm__ __volatile__ ( \ + "pshufhw $" #imm ", %" #r1 ", %" #r2 " \n" \ + ); + +#define pshuflw(r1, r2, imm) \ + __asm__ __volatile__ ( \ + "pshuflw $" #imm ", %" #r1 ", %" #r2 " \n" \ + ); +#define pshufd(r1, r2, imm) \ + __asm__ __volatile__ ( \ + "pshufd $" #imm ", %" #r1 ", %" #r2 " \n" \ + ); + +/* 1x238 MOVE Doouble Quadword + (this is both a load and a store... + in fact, it is the only way to store) +*/ +#define movdqu_m2r(var, reg) mmx_m2r(movdqu, var, reg) +#define movdqu_r2m(reg, var) mmx_r2m(movdqu, reg, var) +#define movdqu_r2r(regs, regd) mmx_r2r(movdqu, regs, regd) +#define movdqu(vars, vard) \ + __asm__ __volatile__ ("movdqu %1, %%xmm0\n\t" \ + "movdqu %%xmm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) +#define movdqa_m2r(var, reg) mmx_m2r(movdqa, var, reg) +#define movdqa_r2m(reg, var) mmx_r2m(movdqa, reg, var) +#define movdqa_r2r(regs, regd) mmx_r2r(movdqa, regs, regd) +#define movdqa(vars, vard) \ + __asm__ __volatile__ ("movdqa %1, %%xmm0\n\t" \ + "movdqa %%xmm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) +#define movntdq_r2m(reg, var) mmx_r2m(movntdq, reg, var) + + +/* end additions */ + +#endif diff --git a/libraries/evas/src/lib/include/evas_options.h b/libraries/evas/src/lib/include/evas_options.h new file mode 100644 index 0000000..f6739c0 --- /dev/null +++ b/libraries/evas/src/lib/include/evas_options.h @@ -0,0 +1,69 @@ +#ifndef EVAS_OPTIONS_H +#define EVAS_OPTIONS_H 1 + +/* these may vary per OS */ + +/* what to build *//* small dither table is MUCH faster on ipaq */ +/*#define BUILD_SMALL_DITHER_MASK*/ + +/*#define HARD_CODED_P3*/ +/*#define HARD_CODED_P2*/ + +/*#define BUILD_CONVERT_1_GRY_1*/ +/*#define BUILD_CONVERT_4_GRY_1*/ +/*#define BUILD_CONVERT_4_GRY_4*/ +/*#define BUILD_CONVERT_8_GRY_1*/ +/*#define BUILD_CONVERT_8_GRY_4*/ +/*#define BUILD_CONVERT_8_GRY_16*/ +/*#define BUILD_CONVERT_8_GRY_64*/ +/*#define BUILD_CONVERT_8_GRY_256*/ +/*#define BUILD_CONVERT_8_RGB_332*/ +/*#define BUILD_CONVERT_8_RGB_666*/ +/*#define BUILD_CONVERT_8_RGB_232*/ +/*#define BUILD_CONVERT_8_RGB_222*/ +/*#define BUILD_CONVERT_8_RGB_221*/ +/*#define BUILD_CONVERT_8_RGB_121*/ +/*#define BUILD_CONVERT_8_RGB_111*/ +/*#define BUILD_CONVERT_16_RGB_565*/ +/*#define BUILD_CONVERT_16_RGB_555*/ +/*#define BUILD_CONVERT_16_RGB_444*/ +/*#define BUILD_CONVERT_16_RGB_454645*/ +/*#define BUILD_CONVERT_16_RGB_ROT0*/ +/*#define BUILD_CONVERT_16_RGB_ROT270*/ +/*#define BUILD_CONVERT_24_RGB_888*/ +/*#define BUILD_CONVERT_24_BGR_888*/ +/*#define BUILD_CONVERT_32_RGB_8888*/ +/*#define BUILD_CONVERT_32_BGR_8888*/ +/*#define BUILD_CONVERT_32_RGB_ROT0*/ +/*#define BUILD_CONVERT_32_RGB_ROT270*/ + +/*#define BUILD_SCALE_SAMPLE*/ +/*#define BUILD_SCALE_SMOOTH*/ +/*#define BUILD_SCALE_TRILINEAR*/ + +/*#define BUILD_MMX*/ +/*#define BUILD_SSE*/ +/*#define BUILD_SSE3*/ +/*#define BUILD_C*/ + +/*#define BUILD_LOADER_PNG*/ +/*#define BUILD_LOADER_JPEG*/ +/*#define BUILD_LOADER_EET*/ +/*#define BUILD_LOADER_EDB*/ + +/*#define BUILD_FMEMOPEN*/ + +/* check in that the user configured it right */ +#ifndef BUILD_MMX +# ifndef BUILD_SSE3 +# ifndef BUILD_SSE +# ifndef BUILD_C +# error "Please Read the README" + #endif +# endif +# endif +#endif + +#define DIRECT_SCALE + +#endif diff --git a/libraries/evas/src/lib/include/evas_private.h b/libraries/evas/src/lib/include/evas_private.h new file mode 100644 index 0000000..90498d0 --- /dev/null +++ b/libraries/evas/src/lib/include/evas_private.h @@ -0,0 +1,1107 @@ +#ifndef EVAS_PRIVATE_H +#define EVAS_PRIVATE_H + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include "Evas.h" + +#include "../file/evas_module.h" +#include "../file/evas_path.h" +#include "../engines/common/evas_text_utils.h" +#include "../engines/common/language/evas_bidi_utils.h" +#include "../engines/common/language/evas_language_utils.h" + +#ifdef EVAS_MAGIC_DEBUG +/* complain when peole pass in wrong object types etc. */ +# define MAGIC_DEBUG +#endif + +#define RENDER_METHOD_INVALID 0x00000000 + +typedef struct _Evas_Layer Evas_Layer; +typedef struct _Evas_Size Evas_Size; +typedef struct _Evas_Aspect Evas_Aspect; +typedef struct _Evas_Border Evas_Border; +typedef struct _Evas_Double_Pair Evas_Double_Pair; +typedef struct _Evas_Size_Hints Evas_Size_Hints; +typedef struct _Evas_Font_Dir Evas_Font_Dir; +typedef struct _Evas_Font Evas_Font; +typedef struct _Evas_Font_Alias Evas_Font_Alias; +typedef struct _Evas_Font_Description Evas_Font_Description; +typedef struct _Evas_Data_Node Evas_Data_Node; +typedef struct _Evas_Func_Node Evas_Func_Node; +typedef RGBA_Image_Loadopts Evas_Image_Load_Opts; +typedef struct _Evas_Func Evas_Func; +typedef struct _Evas_Image_Load_Func Evas_Image_Load_Func; +typedef struct _Evas_Image_Save_Func Evas_Image_Save_Func; +typedef struct _Evas_Object_Func Evas_Object_Func; +typedef struct _Evas_Intercept_Func Evas_Intercept_Func; +typedef struct _Evas_Key_Grab Evas_Key_Grab; +typedef struct _Evas_Callbacks Evas_Callbacks; +typedef struct _Evas_Format Evas_Format; +typedef struct _Evas_Map_Point Evas_Map_Point; +typedef struct _Evas_Smart_Cb_Description_Array Evas_Smart_Cb_Description_Array; +typedef struct _Evas_Post_Callback Evas_Post_Callback; +typedef struct _Evas_Coord_Touch_Point Evas_Coord_Touch_Point; + +enum _Evas_Font_Style +{ + EVAS_FONT_STYLE_SLANT, + EVAS_FONT_STYLE_WEIGHT, + EVAS_FONT_STYLE_WIDTH +}; + +enum _Evas_Font_Slant +{ + EVAS_FONT_SLANT_NORMAL, + EVAS_FONT_SLANT_OBLIQUE, + EVAS_FONT_SLANT_ITALIC +}; + +enum _Evas_Font_Weight +{ + EVAS_FONT_WEIGHT_NORMAL, + EVAS_FONT_WEIGHT_THIN, + EVAS_FONT_WEIGHT_ULTRALIGHT, + EVAS_FONT_WEIGHT_LIGHT, + EVAS_FONT_WEIGHT_BOOK, + EVAS_FONT_WEIGHT_MEDIUM, + EVAS_FONT_WEIGHT_SEMIBOLD, + EVAS_FONT_WEIGHT_BOLD, + EVAS_FONT_WEIGHT_ULTRABOLD, + EVAS_FONT_WEIGHT_BLACK, + EVAS_FONT_WEIGHT_EXTRABLACK +}; + +enum _Evas_Font_Width +{ + EVAS_FONT_WIDTH_NORMAL, + EVAS_FONT_WIDTH_ULTRACONDENSED, + EVAS_FONT_WIDTH_EXTRACONDENSED, + EVAS_FONT_WIDTH_CONDENSED, + EVAS_FONT_WIDTH_SEMICONDENSED, + EVAS_FONT_WIDTH_SEMIEXPANDED, + EVAS_FONT_WIDTH_EXPANDED, + EVAS_FONT_WIDTH_EXTRAEXPANDED, + EVAS_FONT_WIDTH_ULTRAEXPANDED +}; + +typedef enum _Evas_Font_Style Evas_Font_Style; +typedef enum _Evas_Font_Slant Evas_Font_Slant; +typedef enum _Evas_Font_Weight Evas_Font_Weight; +typedef enum _Evas_Font_Width Evas_Font_Width; + +/* General types - used for script type chceking */ +#define OPAQUE_TYPE(type) struct __##type { int a; }; \ + typedef struct __##type type + +OPAQUE_TYPE(Evas_Font_Set); /* General type for RGBA_Font */ +OPAQUE_TYPE(Evas_Font_Instance); /* General type for RGBA_Font_Int */ +/* End of general types */ + +#define MAGIC_EVAS 0x70777770 +#define MAGIC_OBJ 0x71777770 +#define MAGIC_OBJ_RECTANGLE 0x71777771 +#define MAGIC_OBJ_LINE 0x71777772 +#define MAGIC_OBJ_POLYGON 0x71777774 +#define MAGIC_OBJ_IMAGE 0x71777775 +#define MAGIC_OBJ_TEXT 0x71777776 +#define MAGIC_OBJ_SMART 0x71777777 +#define MAGIC_OBJ_TEXTBLOCK 0x71777778 +#define MAGIC_SMART 0x72777770 +#define MAGIC_OBJ_SHAPE 0x72777773 +#define MAGIC_OBJ_CONTAINER 0x72777774 +#define MAGIC_OBJ_CUSTOM 0x72777775 +#define MAGIC_EVAS_GL 0x72777776 +#define MAGIC_MAP 0x72777777 + +#ifdef MAGIC_DEBUG +# define MAGIC_CHECK_FAILED(o, t, m) \ +{evas_debug_error(); \ + if (!o) evas_debug_input_null(); \ + else if (((t *)o)->magic == 0) evas_debug_magic_null(); \ + else evas_debug_magic_wrong((m), ((t *)o)->magic); \ +} +# define MAGIC_CHECK(o, t, m) \ +{if ((!o) || (!(((t *)o)->magic == (m)))) { \ +MAGIC_CHECK_FAILED(o, t, m) +# define MAGIC_CHECK_END() }} +#else +# define MAGIC_CHECK_FAILED(o, t, m) +# define MAGIC_CHECK(o, t, m) { if (!o) { +# define MAGIC_CHECK_END() }} +#endif + +#define NEW_RECT(_r, _x, _y, _w, _h) (_r) = eina_rectangle_new(_x, _y, _w, _h); + +#define MERR_NONE() _evas_alloc_error = EVAS_ALLOC_ERROR_NONE +#define MERR_FATAL() _evas_alloc_error = EVAS_ALLOC_ERROR_FATAL +#define MERR_BAD() _evas_alloc_error = EVAS_ALLOC_ERROR_RECOVERED + +#define EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o) \ + if ((o)->cur.file) \ + { \ + eina_stringshare_del((o)->cur.file); \ + if ((o)->prev.file == (o)->cur.file) \ + (o)->prev.file = NULL; \ + (o)->cur.file = NULL; \ + } \ + if ((o)->cur.key) \ + { \ + eina_stringshare_del((o)->cur.key); \ + if ((o)->prev.key == (o)->cur.key) \ + (o)->prev.key = NULL; \ + (o)->cur.key = NULL; \ + } \ + if ((o)->prev.file) \ + { \ + eina_stringshare_del((o)->prev.file); \ + (o)->prev.file = NULL; \ + } \ + if ((o)->prev.key) \ + { \ + eina_stringshare_del((o)->prev.key); \ + (o)->prev.key = NULL; \ + } + +struct _Evas_Coord_Touch_Point +{ + Evas_Coord x, y; // point's x, y position + int id; // id in order to distinguish each point + Evas_Touch_Point_State state; +}; + +struct _Evas_Key_Grab +{ + char *keyname; + Evas_Modifier_Mask modifiers; + Evas_Modifier_Mask not_modifiers; + Evas_Object *object; + Eina_Bool exclusive : 1; + Eina_Bool just_added : 1; + Eina_Bool delete_me : 1; +}; + +struct _Evas_Intercept_Func +{ + struct { + Evas_Object_Intercept_Show_Cb func; + void *data; + } show; + struct { + Evas_Object_Intercept_Hide_Cb func; + void *data; + } hide; + struct { + Evas_Object_Intercept_Move_Cb func; + void *data; + } move; + struct { + Evas_Object_Intercept_Resize_Cb func; + void *data; + } resize; + struct { + Evas_Object_Intercept_Raise_Cb func; + void *data; + } raise; + struct { + Evas_Object_Intercept_Lower_Cb func; + void *data; + } lower; + struct { + Evas_Object_Intercept_Stack_Above_Cb func; + void *data; + } stack_above; + struct { + Evas_Object_Intercept_Stack_Below_Cb func; + void *data; + } stack_below; + struct { + Evas_Object_Intercept_Layer_Set_Cb func; + void *data; + } layer_set; + struct { + Evas_Object_Intercept_Color_Set_Cb func; + void *data; + } color_set; + struct { + Evas_Object_Intercept_Clip_Set_Cb func; + void *data; + } clip_set; + struct { + Evas_Object_Intercept_Clip_Unset_Cb func; + void *data; + } clip_unset; +}; + +struct _Evas_Smart_Cb_Description_Array +{ + unsigned int size; + const Evas_Smart_Cb_Description **array; +}; + +struct _Evas_Smart +{ + DATA32 magic; + + int usage; + + const Evas_Smart_Class *smart_class; + + Evas_Smart_Cb_Description_Array callbacks; + + unsigned char delete_me : 1; + unsigned char class_allocated : 1; + +}; + +struct _Evas_Modifier +{ + struct { + int count; + char **list; + } mod; + Evas_Modifier_Mask mask; /* ok we have a max of 64 modifiers */ +}; + +struct _Evas_Lock +{ + struct { + int count; + char **list; + } lock; + Evas_Modifier_Mask mask; /* we have a max of 64 locks */ +}; + +struct _Evas_Post_Callback +{ + Evas_Object *obj; + Evas_Object_Event_Post_Cb func; + const void *data; + unsigned char delete_me : 1; +}; + +struct _Evas_Callbacks +{ + Eina_Inlist *callbacks; + int walking_list; + unsigned char deletions_waiting : 1; +}; + +struct _Evas +{ + EINA_INLIST; + + DATA32 magic; + + struct { + unsigned char inside : 1; + int mouse_grabbed; + DATA32 button; + Evas_Coord x, y; + struct { + Eina_List *in; + } object; + + } pointer; + + struct { + Evas_Coord x, y, w, h; + unsigned char changed : 1; + } viewport; + + struct { + int w, h; + DATA32 render_method; + unsigned char changed : 1; + } output; + + Eina_List *damages; + Eina_List *obscures; + + Evas_Layer *layers; + + Eina_Hash *name_hash; + + int output_validity; + + int walking_list; + int events_frozen; + + struct { + Evas_Module *module; + Evas_Func *func; + struct { + void *output; + + void *context; + } data; + + void *info; + int info_magic; + } engine; + + Eina_Array delete_objects; + Eina_Array active_objects; + Eina_Array restack_objects; + Eina_Array render_objects; + Eina_Array pending_objects; + Eina_Array obscuring_objects; + Eina_Array temporary_objects; + Eina_Array calculate_objects; + Eina_Array clip_changes; + + Eina_Clist calc_list; + Eina_Clist calc_done; + Eina_List *video_objects; + + Eina_List *post_events; // free me on evas_free + + Evas_Callbacks *callbacks; + + int delete_grabs; + int walking_grabs; + Eina_List *grabs; + + Eina_List *font_path; + + int in_smart_calc; + int smart_calc_count; + + Evas_Object *focused; + void *attach_data; + Evas_Modifier modifiers; + Evas_Lock locks; + unsigned int last_timestamp; + int last_mouse_down_counter; + int last_mouse_up_counter; + int nochange; + Evas_Font_Hinting_Flags hinting; + unsigned char changed : 1; + unsigned char delete_me : 1; + unsigned char invalidate : 1; + unsigned char cleanup : 1; + unsigned char focus : 1; + + Eina_List *touch_points; +}; + +struct _Evas_Layer +{ + EINA_INLIST; + + short layer; + Evas_Object *objects; + + Evas *evas; + + void *engine_data; + int usage; + unsigned char delete_me : 1; +}; + +struct _Evas_Size +{ + Evas_Coord w, h; +}; + +struct _Evas_Aspect +{ + Evas_Aspect_Control mode; + Evas_Size size; +}; + +struct _Evas_Border +{ + Evas_Coord l, r, t, b; +}; + +struct _Evas_Double_Pair +{ + double x, y; +}; + +struct _Evas_Size_Hints +{ + Evas_Size min, max, request; + Evas_Aspect aspect; + Evas_Double_Pair align, weight; + Evas_Border padding; +}; + +struct _Evas_Map_Point +{ + double x, y, z, px, py; + double u, v; + unsigned char r, g, b, a; +}; + +struct _Evas_Map +{ + DATA32 magic; + int count; // num of points + Evas_Coord_Rectangle normal_geometry; // bounding box of map geom actually + void *surface; // surface holding map if needed + int surface_w, surface_h; // current surface w & h alloc + Evas_Coord mx, my; // mouse x, y after conversion to map space + struct { + Evas_Coord px, py, z0, foc; + } persp; + Eina_Bool alpha : 1; + Eina_Bool smooth : 1; + Evas_Map_Point points[]; // actual points +}; + +#if 0 // filtering disabled +/* nash: Split into two bits */ +typedef struct Evas_Filter_Info +{ + Evas_Filter filter; + Evas_Filter_Mode mode; + + Eina_Bool dirty : 1; + + int datalen; + void *data; + void (*data_free)(void *); + + uint8_t *key; + uint32_t len; + Filtered_Image *cached; +} Evas_Filter_Info; + +typedef Eina_Bool (*Evas_Software_Filter_Fn)(Evas_Filter_Info *, RGBA_Image *, RGBA_Image *); + +int evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh, + int *outw, int *outh, Eina_Bool inv); +Eina_Bool evas_filter_always_alpha(Evas_Filter_Info *info); +uint8_t *evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp); +// expose for use in engines +EAPI Evas_Software_Filter_Fn evas_filter_software_get(Evas_Filter_Info *info); +void evas_filter_free(Evas_Object *o); +#endif + +struct _Evas_Object +{ + EINA_INLIST; + + DATA32 magic; + + const char *type; + Evas_Layer *layer; + + struct { + Evas_Map *map; + Evas_Object *clipper; + Evas_Object *mask; + Evas_Object *map_parent; + double scale; + Evas_Coord_Rectangle geometry; + struct { + struct { + Evas_Coord x, y, w, h; + unsigned char r, g, b, a; + Eina_Bool visible : 1; + Eina_Bool dirty : 1; + } clip; + } cache; + short layer; + struct { + unsigned char r, g, b, a; + } color; + Eina_Bool usemap : 1; + Eina_Bool visible : 1; + Eina_Bool have_clipees : 1; + Eina_Bool anti_alias : 1; + Evas_Render_Op render_op : 4; + } cur, prev; + + char *name; + + Evas_Intercept_Func *interceptors; + + struct { + Eina_List *elements; + } data; + + Eina_List *grabs; + + Evas_Callbacks *callbacks; + + struct { + Eina_List *clipees; + Eina_List *changes; + } clip; + + const Evas_Object_Func *func; + + void *object_data; + + struct { + Evas_Smart *smart; + Evas_Object *parent; + } smart; + + struct { + Eina_List *proxies; + void *surface; + int w,h; + Eina_Bool redraw; + } proxy; + +#if 0 // filtering disabled + Evas_Filter_Info *filter; +#endif + + Evas_Size_Hints *size_hints; + + int last_mouse_down_counter; + int last_mouse_up_counter; + int mouse_grabbed; + + int last_event; + Evas_Callback_Type last_event_type; + + struct { + int in_move, in_resize; + } doing; + + unsigned int ref; + + unsigned char delete_me; + + unsigned char recalculate_cycle; + Eina_Clist calc_entry; + + Evas_Object_Pointer_Mode pointer_mode : 1; + + Eina_Bool store : 1; + Eina_Bool pass_events : 1; + Eina_Bool freeze_events : 1; + Eina_Bool repeat_events : 1; + struct { + Eina_Bool pass_events : 1; + Eina_Bool pass_events_valid : 1; + Eina_Bool freeze_events : 1; + Eina_Bool freeze_events_valid : 1; + } parent_cache; + Eina_Bool restack : 1; + Eina_Bool is_active : 1; + Eina_Bool precise_is_inside : 1; + Eina_Bool is_static_clip : 1; + + Eina_Bool render_pre : 1; + Eina_Bool rect_del : 1; + Eina_Bool mouse_in : 1; + Eina_Bool pre_render_done : 1; + Eina_Bool intercepted : 1; + Eina_Bool focused : 1; + Eina_Bool in_layer : 1; + Eina_Bool no_propagate : 1; + + Eina_Bool changed : 1; + Eina_Bool changed_move : 1; + Eina_Bool changed_move_only : 1; + Eina_Bool changed_nomove : 1; + Eina_Bool del_ref : 1; +}; + +struct _Evas_Func_Node +{ + EINA_INLIST; + void (*func) (); + void *data; + Evas_Callback_Type type; + Evas_Callback_Priority priority; + unsigned char delete_me : 1; +}; + +struct _Evas_Data_Node +{ + char *key; + void *data; +}; + +struct _Evas_Font_Dir +{ + Eina_Hash *lookup; + Eina_List *fonts; + Eina_List *aliases; + DATA64 dir_mod_time; + DATA64 fonts_dir_mod_time; + DATA64 fonts_alias_mod_time; +}; + +struct _Evas_Font +{ + struct { + const char *prop[14]; + } x; + struct { + const char *name; + } simple; + const char *path; + char type; +}; + +struct _Evas_Font_Alias +{ + const char *alias; + Evas_Font *fn; +}; + +struct _Evas_Font_Description +{ + int ref; + /* We assume everywhere this is stringshared */ + const char *name; + const char *fallbacks; + const char *lang; + + Evas_Font_Slant slant; + Evas_Font_Weight weight; + Evas_Font_Width width; + + Eina_Bool is_new : 1; +}; + +struct _Evas_Object_Func +{ + void (*free) (Evas_Object *obj); + void (*render) (Evas_Object *obj, void *output, void *context, void *surface, int x, int y); + void (*render_pre) (Evas_Object *obj); + void (*render_post) (Evas_Object *obj); + + unsigned int (*type_id_get) (Evas_Object *obj); + unsigned int (*visual_id_get) (Evas_Object *obj); + void *(*engine_data_get) (Evas_Object *obj); + + void (*store) (Evas_Object *obj); + void (*unstore) (Evas_Object *obj); + + int (*is_visible) (Evas_Object *obj); + int (*was_visible) (Evas_Object *obj); + + int (*is_opaque) (Evas_Object *obj); + int (*was_opaque) (Evas_Object *obj); + + int (*is_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y); + int (*was_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y); + + void (*coords_recalc) (Evas_Object *obj); + + void (*scale_update) (Evas_Object *obj); + + int (*has_opaque_rect) (Evas_Object *obj); + int (*get_opaque_rect) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); + + int (*can_map) (Evas_Object *obj); +}; + +struct _Evas_Func +{ + void *(*info) (Evas *e); + void (*info_free) (Evas *e, void *info); + int (*setup) (Evas *e, void *info); + + void (*output_free) (void *data); + void (*output_resize) (void *data, int w, int h); + void (*output_tile_size_set) (void *data, int w, int h); + void (*output_redraws_rect_add) (void *data, int x, int y, int w, int h); + void (*output_redraws_rect_del) (void *data, int x, int y, int w, int h); + void (*output_redraws_clear) (void *data); + void *(*output_redraws_next_update_get) (void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); + void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h); + void (*output_flush) (void *data); + void (*output_idle_flush) (void *data); + void (*output_dump) (void *data); + + void *(*context_new) (void *data); + Eina_Bool (*canvas_alpha_get) (void *data, void *context); + void (*context_free) (void *data, void *context); + void (*context_clip_set) (void *data, void *context, int x, int y, int w, int h); + void (*context_clip_clip) (void *data, void *context, int x, int y, int w, int h); + void (*context_clip_unset) (void *data, void *context); + int (*context_clip_get) (void *data, void *context, int *x, int *y, int *w, int *h); + void (*context_mask_set) (void *data, void *context, void *mask, int x, int y, int w, int h); + void (*context_mask_unset) (void *data, void *context); + void (*context_color_set) (void *data, void *context, int r, int g, int b, int a); + int (*context_color_get) (void *data, void *context, int *r, int *g, int *b, int *a); + void (*context_multiplier_set) (void *data, void *context, int r, int g, int b, int a); + void (*context_multiplier_unset) (void *data, void *context); + int (*context_multiplier_get) (void *data, void *context, int *r, int *g, int *b, int *a); + void (*context_cutout_add) (void *data, void *context, int x, int y, int w, int h); + void (*context_cutout_clear) (void *data, void *context); + void (*context_anti_alias_set) (void *data, void *context, unsigned char aa); + unsigned char (*context_anti_alias_get) (void *data, void *context); + void (*context_color_interpolation_set) (void *data, void *context, int color_space); + int (*context_color_interpolation_get) (void *data, void *context); + void (*context_render_op_set) (void *data, void *context, int render_op); + int (*context_render_op_get) (void *data, void *context); + + void (*rectangle_draw) (void *data, void *context, void *surface, int x, int y, int w, int h); + + void (*line_draw) (void *data, void *context, void *surface, int x1, int y1, int x2, int y2); + + void *(*polygon_point_add) (void *data, void *context, void *polygon, int x, int y); + void *(*polygon_points_clear) (void *data, void *context, void *polygon); + void (*polygon_draw) (void *data, void *context, void *surface, void *polygon, int x, int y); + + void *(*image_load) (void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo); + void *(*image_new_from_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace); + void *(*image_new_from_copied_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace); + void (*image_free) (void *data, void *image); + void (*image_size_get) (void *data, void *image, int *w, int *h); + void *(*image_size_set) (void *data, void *image, int w, int h); + void (*image_stride_get) (void *data, void *image, int *stride); + void *(*image_dirty_region) (void *data, void *image, int x, int y, int w, int h); + void *(*image_data_get) (void *data, void *image, int to_write, DATA32 **image_data, int *err); + void *(*image_data_put) (void *data, void *image, DATA32 *image_data); + void (*image_data_preload_request) (void *data, void *image, const void *target); + void (*image_data_preload_cancel) (void *data, void *image, const void *target); + void *(*image_alpha_set) (void *data, void *image, int has_alpha); + int (*image_alpha_get) (void *data, void *image); + void *(*image_border_set) (void *data, void *image, int l, int r, int t, int b); + void (*image_border_get) (void *data, void *image, int *l, int *r, int *t, int *b); + void (*image_draw) (void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth); + char *(*image_comment_get) (void *data, void *image, char *key); + char *(*image_format_get) (void *data, void *image); + void (*image_colorspace_set) (void *data, void *image, int cspace); + int (*image_colorspace_get) (void *data, void *image); + void (*image_mask_create) (void *data, void *image); + void *(*image_native_set) (void *data, void *image, void *native); + void *(*image_native_get) (void *data, void *image); + + void (*image_cache_flush) (void *data); + void (*image_cache_set) (void *data, int bytes); + int (*image_cache_get) (void *data); + + Evas_Font_Set *(*font_load) (void *data, const char *name, int size, Font_Rend_Flags wanted_rend); + Evas_Font_Set *(*font_memory_load) (void *data, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend); + Evas_Font_Set *(*font_add) (void *data, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend); + Evas_Font_Set *(*font_memory_add) (void *data, Evas_Font_Set *font, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend); + void (*font_free) (void *data, Evas_Font_Set *font); + int (*font_ascent_get) (void *data, Evas_Font_Set *font); + int (*font_descent_get) (void *data, Evas_Font_Set *font); + int (*font_max_ascent_get) (void *data, Evas_Font_Set *font); + int (*font_max_descent_get) (void *data, Evas_Font_Set *font); + void (*font_string_size_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int *w, int *h); + int (*font_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props); + int (*font_h_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props); + int (*font_v_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props); + int (*font_char_coords_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch); + int (*font_char_at_coords_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch); + void (*font_draw) (void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, const Evas_Text_Props *intl_props); + + void (*font_cache_flush) (void *data); + void (*font_cache_set) (void *data, int bytes); + int (*font_cache_get) (void *data); + + /* Engine functions will over time expand from here */ + + void (*font_hinting_set) (void *data, Evas_Font_Set *font, int hinting); + int (*font_hinting_can_hint) (void *data, int hinting); + +/* void (*image_rotation_set) (void *data, void *image); */ + + void (*image_scale_hint_set) (void *data, void *image, int hint); + int (*image_scale_hint_get) (void *data, void *image); + int (*font_last_up_to_pos) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y); + + void (*image_map_draw) (void *data, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level); + void *(*image_map_surface_new) (void *data, int w, int h, int alpha); + void (*image_map_surface_free) (void *data, void *surface); + + void (*image_content_hint_set) (void *data, void *surface, int hint); + int (*image_content_hint_get) (void *data, void *surface); + int (*font_pen_coords_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch); + Eina_Bool (*font_text_props_info_create) (void *data __UNUSED__, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *intl_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len); + int (*font_right_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props); + +#if 0 // filtering disabled + void (*image_draw_filtered) (void *data, void *context, void *surface, void *image, Evas_Filter_Info *filter); + Filtered_Image *(*image_filtered_get) (void *image, uint8_t *key, size_t len); + Filtered_Image *(*image_filtered_save) (void *image, void *filtered, uint8_t *key, size_t len); + void (*image_filtered_free) (void *image, Filtered_Image *); +#endif + + /* EFL-GL Glue Layer */ + void *(*gl_surface_create) (void *data, void *config, int w, int h); + int (*gl_surface_destroy) (void *data, void *surface); + void *(*gl_context_create) (void *data, void *share_context); + int (*gl_context_destroy) (void *data, void *context); + int (*gl_make_current) (void *data, void *surface, void *context); + void *(*gl_string_query) (void *data, int name); + void *(*gl_proc_address_get) (void *data, const char *name); + int (*gl_native_surface_get) (void *data, void *surface, void *native_surface); + void *(*gl_api_get) (void *data); + + int (*image_load_error_get) (void *data, void *image); + int (*font_run_end_get) (void *data, Evas_Font_Set *font, Evas_Font_Instance **script_fi, Evas_Font_Instance **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len); + + /* animated feature */ + Eina_Bool (*image_animated_get) (void *data, void *image); + int (*image_animated_frame_count_get) (void *data, void *image); + Evas_Image_Animated_Loop_Hint (*image_animated_loop_type_get) (void *data, void *image); + int (*image_animated_loop_count_get) (void *data, void *image); + double (*image_animated_frame_duration_get) (void *data, void *image, int start_frame, int frame_num); + Eina_Bool (*image_animated_frame_set) (void *data, void *image, int frame_index); + + /* max size query */ + void (*image_max_size_get) (void *data, int *maxw, int *maxh); +}; + +struct _Evas_Image_Load_Func +{ + Eina_Bool threadable; + Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error); + Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error); + double (*frame_duration) (Image_Entry *ie, const char *file, const int start, const int frame_num); +}; + +struct _Evas_Image_Save_Func +{ + int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress); +}; + +#ifdef __cplusplus +extern "C" { +#endif + +Evas_Object *evas_object_new(Evas *e); +void evas_object_free(Evas_Object *obj, int clean_layer); +void evas_object_inject(Evas_Object *obj, Evas *e); +void evas_object_release(Evas_Object *obj, int clean_layer); +void evas_object_change(Evas_Object *obj); +void evas_object_clip_changes_clean(Evas_Object *obj); +void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v); +void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj); +void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj); +void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v); +void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh); + +void evas_object_clip_dirty(Evas_Object *obj); +void evas_object_recalc_clippees(Evas_Object *obj); +Evas_Layer *evas_layer_new(Evas *e); +void evas_layer_pre_free(Evas_Layer *lay); +void evas_layer_free_objects(Evas_Layer *lay); +void evas_layer_clean(Evas *e); +Evas_Layer *evas_layer_find(Evas *e, short layer_num); +void evas_layer_add(Evas_Layer *lay); +void evas_layer_del(Evas_Layer *lay); + +int evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h); + +int evas_object_was_opaque(Evas_Object *obj); +int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +int evas_object_clippers_was_visible(Evas_Object *obj); +void evas_object_clip_across_check(Evas_Object *obj); +void evas_object_clip_across_clippees_check(Evas_Object *obj); +void evas_object_mapped_clip_across_mark(Evas_Object *obj); +void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info); +void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info); +Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y); +int evas_mem_free(int mem_required); +int evas_mem_degrade(int mem_required); +void evas_debug_error(void); +void evas_debug_input_null(void); +void evas_debug_magic_null(void); +void evas_debug_magic_wrong(DATA32 expected, DATA32 supplied); +void evas_debug_generic(const char *str); +const char *evas_debug_magic_string_get(DATA32 magic); +void evas_object_smart_use(Evas_Smart *s); +void evas_object_smart_unuse(Evas_Smart *s); +void evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a) EINA_ARG_NONNULL(1); +Eina_Bool evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) EINA_ARG_NONNULL(1); +const Evas_Smart_Cb_Description *evas_smart_cb_description_find(const Evas_Smart_Cb_Description_Array *a, const char *name) EINA_ARG_NONNULL(1, 2) EINA_PURE; + +Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj); +void _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading); +void _evas_object_image_preloading_check(Evas_Object *obj); +Evas_Object *_evas_object_image_video_parent_get(Evas_Object *obj); +void _evas_object_image_video_overlay_show(Evas_Object *obj); +void _evas_object_image_video_overlay_hide(Evas_Object *obj); +void evas_object_smart_del(Evas_Object *obj); +void evas_object_smart_cleanup(Evas_Object *obj); +void evas_object_smart_member_raise(Evas_Object *member); +void evas_object_smart_member_lower(Evas_Object *member); +void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other); +void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other); +const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj); +void _evas_object_smart_members_all_del(Evas_Object *obj); +void evas_call_smarts_calculate(Evas *e); +void *evas_mem_calloc(int size); +void _evas_post_event_callback_call(Evas *e); +void _evas_post_event_callback_free(Evas *e); +void evas_event_callback_list_post_free(Eina_Inlist **list); +void evas_object_event_callback_all_del(Evas_Object *obj); +void evas_object_event_callback_cleanup(Evas_Object *obj); +void evas_event_callback_all_del(Evas *e); +void evas_event_callback_cleanup(Evas *e); +void evas_object_inform_call_show(Evas_Object *obj); +void evas_object_inform_call_hide(Evas_Object *obj); +void evas_object_inform_call_move(Evas_Object *obj); +void evas_object_inform_call_resize(Evas_Object *obj); +void evas_object_inform_call_restack(Evas_Object *obj); +void evas_object_inform_call_changed_size_hints(Evas_Object *obj); +void evas_object_inform_call_image_preloaded(Evas_Object *obj); +void evas_object_inform_call_image_unloaded(Evas_Object *obj); +void evas_object_intercept_cleanup(Evas_Object *obj); +int evas_object_intercept_call_show(Evas_Object *obj); +int evas_object_intercept_call_hide(Evas_Object *obj); +int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h); +int evas_object_intercept_call_raise(Evas_Object *obj); +int evas_object_intercept_call_lower(Evas_Object *obj); +int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above); +int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below); +int evas_object_intercept_call_layer_set(Evas_Object *obj, int l); +int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a); +int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip); +int evas_object_intercept_call_clip_unset(Evas_Object *obj); +void evas_object_grabs_cleanup(Evas_Object *obj); +void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers); +void evas_font_dir_cache_free(void); +const char *evas_font_dir_cache_find(char *dir, char *font); +Eina_List *evas_font_dir_available_list(const Evas* evas); +void evas_font_dir_available_list_free(Eina_List *available); +void evas_font_free(Evas *evas, void *font); +void evas_fonts_zero_free(Evas *evas); +void evas_fonts_zero_presure(Evas *evas); +void evas_font_name_parse(Evas_Font_Description *fdesc, const char *name); +int evas_font_style_find(const char *start, const char *end, Evas_Font_Style style); +Evas_Font_Description *evas_font_desc_new(void); +Evas_Font_Description *evas_font_desc_dup(const Evas_Font_Description *fdesc); +void evas_font_desc_unref(Evas_Font_Description *fdesc); +int evas_font_desc_cmp(const Evas_Font_Description *a, const Evas_Font_Description *b); +Evas_Font_Description *evas_font_desc_ref(Evas_Font_Description *fdesc); +void * evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size); +void evas_font_load_hinting_set(Evas *evas, void *font, int hinting); +void evas_object_smart_member_cache_invalidate(Evas_Object *obj, Eina_Bool pass_events, Eina_Bool freeze_events); +void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b); +void _evas_object_text_rehint(Evas_Object *obj); +void _evas_object_textblock_rehint(Evas_Object *obj); + +extern int _evas_alloc_error; +extern int _evas_event_counter; + +struct _Evas_Imaging_Image +{ + RGBA_Image *image; +}; + +struct _Evas_Imaging_Font +{ + RGBA_Font *font; +}; + +int evas_async_events_init(void); +int evas_async_events_shutdown(void); +int evas_async_target_del(const void *target); + +void _evas_preload_thread_init(void); +void _evas_preload_thread_shutdown(void); +Evas_Preload_Pthread *evas_preload_thread_run(void (*func_heavy)(void *data), + void (*func_end)(void *data), + void (*func_cancel)(void *data), + const void *data); +Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread); + +void _evas_walk(Evas *e); +void _evas_unwalk(Evas *e); + +// expose for use in engines +EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name); +EAPI const char *_evas_module_libdir_get(void); + +Eina_Bool evas_render_mapped(Evas *e, Evas_Object *obj, + void *context, void *surface, + int off_x, int off_y, int mapped, + int ecx, int ecy, int ecw, int ech); +void evas_render_invalidate(Evas *e); +void evas_render_object_recalc(Evas_Object *obj); + +Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y); +Eina_Bool evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord *mx, Evas_Coord *my, int grab); + +Eina_List *evas_module_engine_list(void); + +/* for updating touch point list */ +void _evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y); +void _evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state); +void _evas_touch_point_remove(Evas *e, int id); + +/****************************************************************************/ +/*****************************************/ +/********************/ +#define MPOOL 1 + +#ifdef MPOOL +typedef struct _Evas_Mempool Evas_Mempool; + +struct _Evas_Mempool +{ + int count; + int num_allocs; + int num_frees; + Eina_Mempool *mp; +}; +# define EVAS_MEMPOOL(x) \ + static Evas_Mempool x = {0, 0, 0, NULL} +# define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) \ + do { \ + if (!x.mp) { \ + x.mp = eina_mempool_add("chained_mempool", nam, NULL, sizeof(siz), cnt); \ + if (!x.mp) { \ + return ret; \ + } \ + } \ + } while (0) +# define EVAS_MEMPOOL_ALLOC(x, siz) \ + eina_mempool_malloc(x.mp, sizeof(siz)) +# define EVAS_MEMPOOL_PREP(x, p, siz) \ + do { \ + x.count++; \ + x.num_allocs++; \ + memset(p, 0, sizeof(siz)); \ + } while (0) +# define EVAS_MEMPOOL_FREE(x, p) \ + do { \ + eina_mempool_free(x.mp, p); \ + x.count--; \ + x.num_frees++; \ + if (x.count <= 0) { \ + eina_mempool_del(x.mp); \ + x.mp = NULL; \ + x.count = 0; \ + } \ + } while (0) +#else +# define EVAS_MEMPOOL(x) +# define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) +# define EVAS_MEMPOOL_PREP(x, p, siz) +# define EVAS_MEMPOOL_ALLOC(x, siz) \ + calloc(1, sizeof(siz)) +# define EVAS_MEMPOOL_FREE(x, p) \ + free(p) +#endif +/********************/ +/*****************************************/ +/****************************************************************************/ + +#define EVAS_API_OVERRIDE(func, api, prefix) \ + (api)->func = prefix##func +#define EVAS_API_RESET(func, api) \ + (api)->func = NULL + +#include "evas_inline.x" + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libraries/evas/src/lib/main.c b/libraries/evas/src/lib/main.c new file mode 100644 index 0000000..f999889 --- /dev/null +++ b/libraries/evas/src/lib/main.c @@ -0,0 +1,150 @@ +#include "evas_common.h" +#include "evas_private.h" + +static Evas_Version _version = { VMAJ, VMIN, VMIC, VREV }; +EAPI Evas_Version *evas_version = &_version; + +int _evas_alloc_error = 0; +static int _evas_debug_init = 0; +static int _evas_debug_show = 0; +static int _evas_debug_abort = 0; + +EAPI Evas_Alloc_Error +evas_alloc_error(void) +{ + return _evas_alloc_error; +} + +/* free cached items only in ram for speed reasons. return 0 if can't free */ +int +evas_mem_free(int mem_required __UNUSED__) +{ + return 0; +} + +/* start reducing quality of images etc. return 0 if can't free anything */ +int +evas_mem_degrade(int mem_required __UNUSED__) +{ + return 0; +} + +void * +evas_mem_calloc(int size) +{ + void *ptr; + + ptr = calloc(1, size); + if (ptr) return ptr; + MERR_BAD(); + while ((!ptr) && (evas_mem_free(size))) ptr = calloc(1, size); + if (ptr) return ptr; + while ((!ptr) && (evas_mem_degrade(size))) ptr = calloc(1, size); + if (ptr) return ptr; + MERR_FATAL(); + return NULL; +} + +void +evas_debug_error(void) +{ + if (!_evas_debug_init) + { + if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1; + if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1; + _evas_debug_init = 1; + } + if (_evas_debug_show) + CRIT("Evas Magic Check Failed!!!"); +} + +void +evas_debug_input_null(void) +{ + if (!_evas_debug_init) + { + if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1; + if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1; + _evas_debug_init = 1; + } + if (_evas_debug_show) + CRIT("Input object pointer is NULL!"); + if (_evas_debug_abort) abort(); +} + +void +evas_debug_magic_null(void) +{ + if (!_evas_debug_init) + { + if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1; + if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1; + _evas_debug_init = 1; + } + if (_evas_debug_show) + CRIT("Input object is zero'ed out (maybe a freed object or zero-filled RAM)!"); + if (_evas_debug_abort) abort(); +} + +void +evas_debug_magic_wrong(DATA32 expected, DATA32 supplied) +{ + if (!_evas_debug_init) + { + if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1; + if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1; + _evas_debug_init = 1; + } + if (_evas_debug_show) + CRIT("Input object is wrong type\n" + " Expected: %08x - %s\n" + " Supplied: %08x - %s", + expected, evas_debug_magic_string_get(expected), + supplied, evas_debug_magic_string_get(supplied)); + if (_evas_debug_abort) abort(); +} + +void +evas_debug_generic(const char *str) +{ + if (!_evas_debug_init) + { + if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1; + if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1; + _evas_debug_init = 1; + } + if (_evas_debug_show) + CRIT("%s", str); + if (_evas_debug_abort) abort(); +} + +const char * +evas_debug_magic_string_get(DATA32 magic) +{ + switch (magic) + { + case MAGIC_EVAS: + return "Evas"; + case MAGIC_OBJ: + return "Evas_Object"; + case MAGIC_OBJ_RECTANGLE: + return "Evas_Object (Rectangle)"; + case MAGIC_OBJ_LINE: + return "Evas_Object (Line)"; + case MAGIC_OBJ_POLYGON: + return "Evas_Object (Polygon)"; + case MAGIC_OBJ_IMAGE: + return "Evas_Object (Image)"; + case MAGIC_OBJ_TEXT: + return "Evas_Object (Text)"; + case MAGIC_OBJ_SMART: + return "Evas_Object (Smart)"; + case MAGIC_EVAS_GL: + return "Evas_GL"; + case MAGIC_MAP: + return "Evas_Map"; + default: + return ""; + }; + return ""; +} diff --git a/libraries/evas/src/modules/Makefile.am b/libraries/evas/src/modules/Makefile.am new file mode 100644 index 0000000..af10cbc --- /dev/null +++ b/libraries/evas/src/modules/Makefile.am @@ -0,0 +1,3 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = engines loaders savers diff --git a/libraries/evas/src/modules/Makefile.in b/libraries/evas/src/modules/Makefile.in new file mode 100644 index 0000000..9cd0201 --- /dev/null +++ b/libraries/evas/src/modules/Makefile.in @@ -0,0 +1,734 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = engines loaders savers +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/Makefile.am b/libraries/evas/src/modules/engines/Makefile.am new file mode 100644 index 0000000..7d870a1 --- /dev/null +++ b/libraries/evas/src/modules/engines/Makefile.am @@ -0,0 +1,71 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = + +if !EVAS_STATIC_BUILD_SOFTWARE_GENERIC +SUBDIRS += software_generic +endif +if !EVAS_STATIC_BUILD_BUFFER +SUBDIRS += buffer +endif +if !EVAS_STATIC_BUILD_DIRECT3D +SUBDIRS += direct3d +endif +if !EVAS_STATIC_BUILD_DIRECTFB +SUBDIRS += directfb +endif +if !EVAS_STATIC_BUILD_FB +SUBDIRS += fb +endif + +if !EVAS_STATIC_BUILD_PSL1GHT +SUBDIRS += psl1ght +endif + +if !EVAS_STATIC_BUILD_GL_COMMON +SUBDIRS += gl_common +endif +if !EVAS_STATIC_BUILD_GL_X11 +SUBDIRS += gl_x11 +endif +if !EVAS_STATIC_BUILD_GL_SDL +SUBDIRS += gl_sdl +endif +if !EVAS_STATIC_BUILD_GL_COCOA +SUBDIRS += gl_cocoa +endif + +if !EVAS_STATIC_BUILD_SOFTWARE_8 +SUBDIRS += software_8 +endif +if !EVAS_STATIC_BUILD_SOFTWARE_8_X11 +SUBDIRS += software_8_x11 +endif +if !EVAS_STATIC_BUILD_SOFTWARE_16 +SUBDIRS += software_16 +endif +if !EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW +SUBDIRS += software_16_ddraw +endif +if !EVAS_STATIC_BUILD_SOFTWARE_16_WINCE +SUBDIRS += software_16_wince +endif +if !EVAS_STATIC_BUILD_SOFTWARE_16_X11 +SUBDIRS += software_16_x11 +endif +if !EVAS_STATIC_BUILD_SOFTWARE_SDL +SUBDIRS += software_sdl +endif +if !EVAS_STATIC_BUILD_SOFTWARE_16_SDL +SUBDIRS += software_16_sdl +endif +if !EVAS_STATIC_BUILD_SOFTWARE_DDRAW +SUBDIRS += software_ddraw +endif +if !EVAS_STATIC_BUILD_SOFTWARE_GDI +SUBDIRS += software_gdi +endif +if !EVAS_STATIC_BUILD_SOFTWARE_X11 +SUBDIRS += software_x11 +endif + diff --git a/libraries/evas/src/modules/engines/Makefile.in b/libraries/evas/src/modules/engines/Makefile.in new file mode 100644 index 0000000..3994fca --- /dev/null +++ b/libraries/evas/src/modules/engines/Makefile.in @@ -0,0 +1,765 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@am__append_1 = software_generic +@EVAS_STATIC_BUILD_BUFFER_FALSE@am__append_2 = buffer +@EVAS_STATIC_BUILD_DIRECT3D_FALSE@am__append_3 = direct3d +@EVAS_STATIC_BUILD_DIRECTFB_FALSE@am__append_4 = directfb +@EVAS_STATIC_BUILD_FB_FALSE@am__append_5 = fb +@EVAS_STATIC_BUILD_PSL1GHT_FALSE@am__append_6 = psl1ght +@EVAS_STATIC_BUILD_GL_COMMON_FALSE@am__append_7 = gl_common +@EVAS_STATIC_BUILD_GL_X11_FALSE@am__append_8 = gl_x11 +@EVAS_STATIC_BUILD_GL_SDL_FALSE@am__append_9 = gl_sdl +@EVAS_STATIC_BUILD_GL_COCOA_FALSE@am__append_10 = gl_cocoa +@EVAS_STATIC_BUILD_SOFTWARE_8_FALSE@am__append_11 = software_8 +@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@am__append_12 = software_8_x11 +@EVAS_STATIC_BUILD_SOFTWARE_16_FALSE@am__append_13 = software_16 +@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@am__append_14 = software_16_ddraw +@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@am__append_15 = software_16_wince +@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@am__append_16 = software_16_x11 +@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@am__append_17 = software_sdl +@EVAS_STATIC_BUILD_SOFTWARE_16_SDL_FALSE@am__append_18 = software_16_sdl +@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@am__append_19 = software_ddraw +@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@am__append_20 = software_gdi +@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@am__append_21 = software_x11 +subdir = src/modules/engines +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = software_generic buffer direct3d directfb fb psl1ght \ + gl_common gl_x11 gl_sdl gl_cocoa software_8 software_8_x11 \ + software_16 software_16_ddraw software_16_wince \ + software_16_x11 software_sdl software_16_sdl software_ddraw \ + software_gdi software_x11 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) \ + $(am__append_4) $(am__append_5) $(am__append_6) \ + $(am__append_7) $(am__append_8) $(am__append_9) \ + $(am__append_10) $(am__append_11) $(am__append_12) \ + $(am__append_13) $(am__append_14) $(am__append_15) \ + $(am__append_16) $(am__append_17) $(am__append_18) \ + $(am__append_19) $(am__append_20) $(am__append_21) +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/buffer/Evas_Engine_Buffer.h b/libraries/evas/src/modules/engines/buffer/Evas_Engine_Buffer.h new file mode 100644 index 0000000..e6d11d1 --- /dev/null +++ b/libraries/evas/src/modules/engines/buffer/Evas_Engine_Buffer.h @@ -0,0 +1,40 @@ +#ifndef _EVAS_ENGINE_BUFFER_H +#define _EVAS_ENGINE_BUFFER_H + +#define EVAS_ENGINE_BUFFER_DEPTH_ARGB32 0 +#define EVAS_ENGINE_BUFFER_DEPTH_BGRA32 1 +#define EVAS_ENGINE_BUFFER_DEPTH_RGB24 2 +#define EVAS_ENGINE_BUFFER_DEPTH_BGR24 3 +#define EVAS_ENGINE_BUFFER_DEPTH_RGB32 4 + +typedef struct _Evas_Engine_Info_Buffer Evas_Engine_Info_Buffer; + +struct _Evas_Engine_Info_Buffer +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + struct { + int depth_type; + + void *dest_buffer; + int dest_buffer_row_bytes; + + char use_color_key : 1; + int alpha_threshold; + int color_key_r; + int color_key_g; + int color_key_b; + struct { + void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes); + void (*free_update_region) (int x, int y, int w, int h, void *data); + } func; + } info; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; +#endif + + diff --git a/libraries/evas/src/modules/engines/buffer/Makefile.am b/libraries/evas/src/modules/engines/buffer/Makefile.am new file mode 100644 index 0000000..19ac5a7 --- /dev/null +++ b/libraries/evas/src/modules/engines/buffer/Makefile.am @@ -0,0 +1,44 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_ENGINE_BUFFER + +BUFFER_SOURCES = \ +evas_engine.c \ +evas_outbuf.c + + +includes_HEADERS = Evas_Engine_Buffer.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_BUFFER + +pkgdir = $(libdir)/evas/modules/engines/buffer/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(BUFFER_SOURCES) +module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_buffer.la + +libevas_engine_buffer_la_SOURCES = $(BUFFER_SOURCES) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/buffer/Makefile.in b/libraries/evas/src/modules/engines/buffer/Makefile.in new file mode 100644 index 0000000..2311344 --- /dev/null +++ b/libraries/evas/src/modules/engines/buffer/Makefile.in @@ -0,0 +1,805 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/buffer +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_engine_buffer_la_LIBADD = +am__libevas_engine_buffer_la_SOURCES_DIST = evas_engine.c \ + evas_outbuf.c +@BUILD_ENGINE_BUFFER_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_BUFFER_TRUE@ evas_outbuf.lo +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_TRUE@am_libevas_engine_buffer_la_OBJECTS = $(am__objects_1) +libevas_engine_buffer_la_OBJECTS = \ + $(am_libevas_engine_buffer_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_TRUE@am_libevas_engine_buffer_la_rpath = +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_outbuf.c +@BUILD_ENGINE_BUFFER_TRUE@am__objects_2 = module_la-evas_engine.lo \ +@BUILD_ENGINE_BUFFER_TRUE@ module_la-evas_outbuf.lo +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_buffer_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_buffer_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Buffer.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_ENGINE_BUFFER_TRUE@BUFFER_SOURCES = \ +@BUILD_ENGINE_BUFFER_TRUE@evas_engine.c \ +@BUILD_ENGINE_BUFFER_TRUE@evas_outbuf.c + +@BUILD_ENGINE_BUFFER_TRUE@includes_HEADERS = Evas_Engine_Buffer.h +@BUILD_ENGINE_BUFFER_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_FALSE@pkgdir = $(libdir)/evas/modules/engines/buffer/$(MODULE_ARCH) +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_FALSE@module_la_SOURCES = $(BUFFER_SOURCES) +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_FALSE@module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_TRUE@noinst_LTLIBRARIES = libevas_engine_buffer.la +@BUILD_ENGINE_BUFFER_TRUE@@EVAS_STATIC_BUILD_BUFFER_TRUE@libevas_engine_buffer_la_SOURCES = $(BUFFER_SOURCES) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/buffer/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/buffer/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_buffer.la: $(libevas_engine_buffer_la_OBJECTS) $(libevas_engine_buffer_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_buffer_la_rpath) $(libevas_engine_buffer_la_OBJECTS) $(libevas_engine_buffer_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_outbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_outbuf.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_outbuf.lo: evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_outbuf.lo -MD -MP -MF $(DEPDIR)/module_la-evas_outbuf.Tpo -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_outbuf.Tpo $(DEPDIR)/module_la-evas_outbuf.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_outbuf.c' object='module_la-evas_outbuf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/buffer/evas_engine.c b/libraries/evas/src/modules/engines/buffer/evas_engine.c new file mode 100644 index 0000000..e8dff7a --- /dev/null +++ b/libraries/evas/src/modules/engines/buffer/evas_engine.c @@ -0,0 +1,403 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_engine.h" +#include "Evas_Engine_Buffer.h" + +/* domain for eina_log */ +/* the log macros are defined in evas_common.h */ +/* theirs names are EVAS_ERR, EVAS_DBG, EVAS_CRIT, EVAS_WRN and EVAS_INF */ +/* although we can use the EVAS_ERROR, etc... macros it will not work + when the -fvisibility=hidden option is passed to gcc */ + +int _evas_engine_buffer_log_dom = -1; + +/* function tables - filled in later (func and parent func) */ + +static Evas_Func func, pfunc; + + +/* engine struct data */ +typedef struct _Render_Engine Render_Engine; + +struct _Render_Engine +{ + Tilebuf *tb; + Outbuf *ob; + Tilebuf_Rect *rects; + Eina_Inlist *cur_rect; + int end : 1; +}; + +/* prototypes we will use here */ +static void *_output_setup(int w, int h, void *dest_buffer, int dest_buffer_row_bytes, int depth_type, int use_color_key, int alpha_threshold, int color_key_r, int color_key_g, int color_key_b, void *(*new_update_region) (int x, int y, int w, int h, int *row_bytes), void (*free_update_region) (int x, int y, int w, int h, void *data)); + +static void *eng_info(Evas *e __UNUSED__); +static void eng_info_free(Evas *e __UNUSED__, void *info); +static int eng_setup(Evas *e, void *info); +static void eng_output_free(void *data); +static void eng_output_resize(void *data, int w, int h); +static void eng_output_tile_size_set(void *data, int w, int h); +static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h); +static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h); +static void eng_output_redraws_clear(void *data); +static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); +static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h); +static void eng_output_flush(void *data); +static void eng_output_idle_flush(void *data); + +/* internal engine routines */ +static void * +_output_setup(int w, + int h, + void *dest_buffer, + int dest_buffer_row_bytes, + int depth_type, + int use_color_key, + int alpha_threshold, + int color_key_r, + int color_key_g, + int color_key_b, + void *(*new_update_region) (int x, int y, int w, int h, int *row_bytes), + void (*free_update_region) (int x, int y, int w, int h, void *data) + ) +{ + Render_Engine *re; + + re = calloc(1, sizeof(Render_Engine)); + if (!re) + return NULL; + /* if we haven't initialized - init (automatic abort if already done) */ + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + + evas_buffer_outbuf_buf_init(); + + { + Outbuf_Depth dep; + DATA32 color_key = 0; + + dep = OUTBUF_DEPTH_BGR_24BPP_888_888; + if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_ARGB32) + dep = OUTBUF_DEPTH_ARGB_32BPP_8888_8888; + else if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_RGB32) + dep = OUTBUF_DEPTH_RGB_32BPP_888_8888; + else if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_BGRA32) + dep = OUTBUF_DEPTH_BGRA_32BPP_8888_8888; + else if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_RGB24) + dep = OUTBUF_DEPTH_RGB_24BPP_888_888; + else if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_BGR24) + dep = OUTBUF_DEPTH_BGR_24BPP_888_888; + R_VAL(&color_key) = color_key_r; + G_VAL(&color_key) = color_key_g; + B_VAL(&color_key) = color_key_b; + A_VAL(&color_key) = 0; + re->ob = evas_buffer_outbuf_buf_setup_fb(w, + h, + dep, + dest_buffer, + dest_buffer_row_bytes, + use_color_key, + color_key, + alpha_threshold, + new_update_region, + free_update_region); + } + re->tb = evas_common_tilebuf_new(w, h); + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + return re; +} + +/* engine api this module provides */ +static void * +eng_info(Evas *e __UNUSED__) +{ + Evas_Engine_Info_Buffer *info; + info = calloc(1, sizeof(Evas_Engine_Info_Buffer)); + if (!info) return NULL; + info->magic.magic = rand(); + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; +} + +static void +eng_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_Buffer *in; + in = (Evas_Engine_Info_Buffer *)info; + free(in); +} + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_Buffer *info; + + info = (Evas_Engine_Info_Buffer *)in; + re = _output_setup(e->output.w, + e->output.h, + info->info.dest_buffer, + info->info.dest_buffer_row_bytes, + info->info.depth_type, + info->info.use_color_key, + info->info.alpha_threshold, + info->info.color_key_r, + info->info.color_key_g, + info->info.color_key_b, + info->info.func.new_update_region, + info->info.func.free_update_region); + if (e->engine.data.output) + eng_output_free(e->engine.data.output); + e->engine.data.output = re; + if (!e->engine.data.output) return 0; + if (!e->engine.data.context) + e->engine.data.context = e->engine.func->context_new(e->engine.data.output); + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_buffer_outbuf_buf_free(re->ob); + evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + { + int depth; + void *dest; + int dest_row_bytes; + int alpha_level; + DATA32 color_key; + char use_color_key; + void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes); + void (*free_update_region) (int x, int y, int w, int h, void *data); + + depth = re->ob->depth; + dest = re->ob->dest; + dest_row_bytes = re->ob->dest_row_bytes; + alpha_level = re->ob->alpha_level; + color_key = re->ob->color_key; + use_color_key = re->ob->use_color_key; + new_update_region = re->ob->func.new_update_region; + free_update_region = re->ob->func.free_update_region; + evas_buffer_outbuf_buf_free(re->ob); + re->ob = evas_buffer_outbuf_buf_setup_fb(w, + h, + depth, + dest, + dest_row_bytes, + use_color_key, + color_key, + alpha_level, + new_update_region, + free_update_region); + } + evas_common_tilebuf_free(re->tb); + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +} + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + RGBA_Image *surface; + Tilebuf_Rect *rect; + int ux, uy, uw, uh; + + re = (Render_Engine *)data; + if (re->end) + { + re->end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + re->cur_rect = EINA_INLIST_GET(re->rects); + } + if (!re->cur_rect) return NULL; + rect = (Tilebuf_Rect *)re->cur_rect; + ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h; + re->cur_rect = re->cur_rect->next; + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = 1; + } + + if ((ux + uw) > re->ob->w) uw = re->ob->w - ux; + if ((uy + uh) > re->ob->h) uh = re->ob->h - uy; + if ((uw <= 0) || (uh <= 0)) return NULL; + surface = evas_buffer_outbuf_buf_new_region_for_update(re->ob, + ux, uy, uw, uh, + cx, cy, cw, ch); + *x = ux; *y = uy; *w = uw; *h = uh; + return surface; +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +#ifdef BUILD_PIPE_RENDER + evas_common_pipe_map_begin(surface); +#endif + evas_buffer_outbuf_buf_push_updated_region(re->ob, surface, x, y, w, h); + evas_buffer_outbuf_buf_free_region_for_update(re->ob, surface); + evas_common_cpu_end_opt(); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *context __UNUSED__) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (re->ob->priv.back_buf) + return re->ob->priv.back_buf->cache_entry.flags.alpha; + return EINA_TRUE; +} + +/* module advertising code */ +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + + _evas_engine_buffer_log_dom = eina_log_domain_register + ("evas-buffer", EINA_COLOR_BLUE); + if (_evas_engine_buffer_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_buffer_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "buffer", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, buffer); + +#ifndef EVAS_STATIC_BUILD_BUFFER +EVAS_EINA_MODULE_DEFINE(engine, buffer); +#endif + diff --git a/libraries/evas/src/modules/engines/buffer/evas_engine.h b/libraries/evas/src/modules/engines/buffer/evas_engine.h new file mode 100644 index 0000000..21c988c --- /dev/null +++ b/libraries/evas/src/modules/engines/buffer/evas_engine.h @@ -0,0 +1,85 @@ +#ifndef EVAS_ENGINE_H +#define EVAS_ENGINE_H +#include "evas_common.h" +/* this thing is for eina_log */ +extern int _evas_engine_buffer_log_dom ; + +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_buffer_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_buffer_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_buffer_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_buffer_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_buffer_log_dom, __VA_ARGS__) + +typedef struct _Outbuf Outbuf; + +typedef enum _Outbuf_Depth Outbuf_Depth; + +enum _Outbuf_Depth +{ + OUTBUF_DEPTH_NONE, + OUTBUF_DEPTH_ARGB_32BPP_8888_8888, + OUTBUF_DEPTH_BGRA_32BPP_8888_8888, + OUTBUF_DEPTH_RGB_32BPP_888_8888, + OUTBUF_DEPTH_BGR_32BPP_888_8888, + OUTBUF_DEPTH_RGB_24BPP_888_888, + OUTBUF_DEPTH_BGR_24BPP_888_888, + OUTBUF_DEPTH_LAST +}; + +struct _Outbuf +{ + int w, h; + Outbuf_Depth depth; + + void *dest; + unsigned int dest_row_bytes; + + int alpha_level; + DATA32 color_key; + char use_color_key : 1; + + struct { + void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes); + void (*free_update_region) (int x, int y, int w, int h, void *data); + } func; + + struct { + RGBA_Image *back_buf; + } priv; +}; + +/****/ + +void evas_buffer_outbuf_buf_init (void); +void evas_buffer_outbuf_buf_free (Outbuf *buf); + +Outbuf *evas_buffer_outbuf_buf_setup_fb (int w, int h, Outbuf_Depth depth, void *dest, int dest_row_bytes, int use_color_key, DATA32 color_key, int alpha_level, + void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes), + void (*free_update_region) (int x, int y, int w, int h, void *data)); + + +RGBA_Image *evas_buffer_outbuf_buf_new_region_for_update (Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); +void evas_buffer_outbuf_buf_free_region_for_update (Outbuf *buf, RGBA_Image *update); +void evas_buffer_outbuf_buf_push_updated_region (Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h); + +#endif + diff --git a/libraries/evas/src/modules/engines/buffer/evas_outbuf.c b/libraries/evas/src/modules/engines/buffer/evas_outbuf.c new file mode 100644 index 0000000..27f7a2c --- /dev/null +++ b/libraries/evas/src/modules/engines/buffer/evas_outbuf.c @@ -0,0 +1,340 @@ +#include "evas_common.h" +#include "evas_engine.h" + +void +evas_buffer_outbuf_buf_init(void) +{ +} + +void +evas_buffer_outbuf_buf_free(Outbuf *buf) +{ + if (buf->priv.back_buf) + { + evas_cache_image_drop(&buf->priv.back_buf->cache_entry); + } + free(buf); +} + +Outbuf * +evas_buffer_outbuf_buf_setup_fb(int w, int h, Outbuf_Depth depth, void *dest, int dest_row_bytes, int use_color_key, DATA32 color_key, int alpha_level, + void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes), + void (*free_update_region) (int x, int y, int w, int h, void *data) + ) +{ + Outbuf *buf; + int bpp; + + buf = calloc(1, sizeof(Outbuf)); + if (!buf) return NULL; + + buf->w = w; + buf->h = h; + buf->depth = depth; + + buf->dest = dest; + buf->dest_row_bytes = dest_row_bytes; + + buf->alpha_level = alpha_level; + buf->color_key = color_key; + buf->use_color_key = use_color_key; + + buf->func.new_update_region = new_update_region; + buf->func.free_update_region = free_update_region; + + bpp = sizeof(DATA32); + if ((buf->depth == OUTBUF_DEPTH_RGB_24BPP_888_888) || + (buf->depth == OUTBUF_DEPTH_BGR_24BPP_888_888)) + bpp = 3; + + if ((buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888) && + (buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32)))) + { + memset(buf->dest, 0, h * buf->dest_row_bytes); + buf->priv.back_buf = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(), + w, h, + buf->dest, + 1, EVAS_COLORSPACE_ARGB8888); + } + else if ((buf->depth == OUTBUF_DEPTH_RGB_32BPP_888_8888) && + (buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32)))) + { + buf->priv.back_buf = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(), + w, h, + buf->dest, + 0, EVAS_COLORSPACE_ARGB8888); + } + + return buf; +} + +RGBA_Image * +evas_buffer_outbuf_buf_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch) +{ + RGBA_Image *im; + + if (buf->priv.back_buf) + { + *cx = x; *cy = y; *cw = w; *ch = h; + return buf->priv.back_buf; + } + else + { + *cx = 0; *cy = 0; *cw = w; *ch = h; + im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get()); + if (im) + { + if (((buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888)) || + ((buf->depth == OUTBUF_DEPTH_BGRA_32BPP_8888_8888))) + { + im->cache_entry.flags.alpha = 1; + im = (RGBA_Image *) evas_cache_image_size_set(&im->cache_entry, w, h); + } + } + } + return im; +} + +void +evas_buffer_outbuf_buf_free_region_for_update(Outbuf *buf, RGBA_Image *update) +{ + if (update != buf->priv.back_buf) evas_cache_image_drop(&update->cache_entry); +} + +void +evas_buffer_outbuf_buf_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h) +{ + /* copy update image to out buf & convert */ + switch (buf->depth) + { + case OUTBUF_DEPTH_RGB_24BPP_888_888: + /* copy & pack into 24bpp - if colorkey is enabled... etc. */ + { + DATA8 thresh; + int xx, yy; + int row_bytes; + DATA8 *dest; + DATA32 colorkey; + DATA32 *src; + DATA8 *dst; + + colorkey = buf->color_key; + thresh = buf->alpha_level; + row_bytes = buf->dest_row_bytes; + dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 3); + if (buf->func.new_update_region) + { + dest = buf->func.new_update_region(x, y, w, h, &row_bytes); + } + if (!dest) break; + if (buf->use_color_key) + { + for (yy = 0; yy < h; yy++) + { + dst = dest + (yy * row_bytes); + src = update->image.data + (yy * update->cache_entry.w); + for (xx = 0; xx < w; xx++) + { + if (A_VAL(src) > thresh) + { + *dst++ = R_VAL(src); + *dst++ = G_VAL(src); + *dst++ = B_VAL(src); + } + else + { + *dst++ = R_VAL(&colorkey); + *dst++ = G_VAL(&colorkey); + *dst++ = B_VAL(&colorkey); + } + src++; + } + } + } + else + { + for (yy = 0; yy < h; yy++) + { + dst = dest + (yy * row_bytes); + src = update->image.data + (yy * update->cache_entry.w); + for (xx = 0; xx < w; xx++) + { + *dst++ = R_VAL(src); + *dst++ = G_VAL(src); + *dst++ = B_VAL(src); + src++; + } + } + } + if (buf->func.free_update_region) + { + buf->func.free_update_region(x, y, w, h, dest); + } + } + break; + case OUTBUF_DEPTH_BGR_24BPP_888_888: + /* copy & pack into 24bpp - if colorkey is enabled... etc. */ + { + DATA8 thresh; + int xx, yy; + int row_bytes; + DATA8 *dest; + DATA32 colorkey; + DATA32 *src; + DATA8 *dst; + + colorkey = buf->color_key; + thresh = buf->alpha_level; + row_bytes = buf->dest_row_bytes; + dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 3); + if (buf->func.new_update_region) + { + dest = buf->func.new_update_region(x, y, w, h, &row_bytes); + } + if (!dest) break; + if (buf->use_color_key) + { + for (yy = 0; yy < h; yy++) + { + dst = dest + (yy * row_bytes); + src = update->image.data + (yy * update->cache_entry.w); + for (xx = 0; xx < w; xx++) + { + if (A_VAL(src) > thresh) + { + *dst++ = B_VAL(src); + *dst++ = G_VAL(src); + *dst++ = R_VAL(src); + } + else + { + *dst++ = B_VAL(&colorkey); + *dst++ = G_VAL(&colorkey); + *dst++ = R_VAL(&colorkey); + } + src++; + } + } + } + else + { + for (yy = 0; yy < h; yy++) + { + dst = dest + (yy * row_bytes); + src = update->image.data + (yy * update->cache_entry.w); + for (xx = 0; xx < w; xx++) + { + *dst++ = B_VAL(src); + *dst++ = G_VAL(src); + *dst++ = R_VAL(src); + src++; + } + } + } + if (buf->func.free_update_region) + { + buf->func.free_update_region(x, y, w, h, dest); + } + } + break; + case OUTBUF_DEPTH_RGB_32BPP_888_8888: + case OUTBUF_DEPTH_ARGB_32BPP_8888_8888: + { + DATA32 *dest, *src, *dst; + int yy, row_bytes; + + row_bytes = buf->dest_row_bytes; + dest = (DATA32 *)((DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4)); + if (buf->func.new_update_region) + { + dest = buf->func.new_update_region(x, y, w, h, &row_bytes); + } + /* no need src == dest */ + if (!buf->priv.back_buf) + { + Gfx_Func_Copy func; + + func = evas_common_draw_func_copy_get(w, 0); + if (func) + { + for (yy = 0; yy < h; yy++) + { + src = update->image.data + (yy * update->cache_entry.w); + dst = (DATA32 *)((DATA8 *)(buf->dest) + ((y + yy) * row_bytes)); + func(src, dst, w); + } + + } + } + if (buf->func.free_update_region) + { + buf->func.free_update_region(x, y, w, h, dest); + } + } + break; + case OUTBUF_DEPTH_BGR_32BPP_888_8888: + { + DATA32 *src, *dst; + DATA8 *dest; + int xx, yy, row_bytes; + + row_bytes = buf->dest_row_bytes; + dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4); + if (buf->func.new_update_region) + { + dest = buf->func.new_update_region(x, y, w, h, &row_bytes); + } + for (yy = 0; yy < h; yy++) + { + dst = (DATA32 *)(dest + (yy * row_bytes)); + src = update->image.data + (yy * update->cache_entry.w); + for (xx = 0; xx < w; xx++) + { + A_VAL(dst) = B_VAL(src); + R_VAL(dst) = G_VAL(src); + G_VAL(dst) = R_VAL(src); + dst++; + src++; + } + } + if (buf->func.free_update_region) + { + buf->func.free_update_region(x, y, w, h, dest); + } + } + break; + case OUTBUF_DEPTH_BGRA_32BPP_8888_8888: + { + DATA32 *src, *dst; + DATA8 *dest; + int xx, yy, row_bytes; + + row_bytes = buf->dest_row_bytes; + dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4); + if (buf->func.new_update_region) + { + dest = buf->func.new_update_region(x, y, w, h, &row_bytes); + } + for (yy = 0; yy < h; yy++) + { + dst = (DATA32 *)(dest + (yy * row_bytes)); + src = update->image.data + (yy * update->cache_entry.w); + for (xx = 0; xx < w; xx++) + { + A_VAL(dst) = B_VAL(src); + R_VAL(dst) = G_VAL(src); + G_VAL(dst) = R_VAL(src); + dst++; + src++; + } + } + if (buf->func.free_update_region) + { + buf->func.free_update_region(x, y, w, h, dest); + } + } + break; + default: + break; + } +} diff --git a/libraries/evas/src/modules/engines/direct3d/Evas_Engine_Direct3D.h b/libraries/evas/src/modules/engines/direct3d/Evas_Engine_Direct3D.h new file mode 100644 index 0000000..f9b7a9c --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/Evas_Engine_Direct3D.h @@ -0,0 +1,36 @@ +#ifndef __EVAS_ENGINE_DIRECT3D_H__ +#define __EVAS_ENGINE_DIRECT3D_H__ + + +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN + +typedef struct _Evas_Engine_Info_Direct3D Evas_Engine_Info_Direct3D; + +struct _Evas_Engine_Info_Direct3D +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + struct { + HWND window; + int rotation; + int depth; + int fullscreen : 1; + int layered : 1; + } info; + + struct { + unsigned short width; + unsigned short height; + unsigned char *mask; + } *shape; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; + + +#endif /* __EVAS_ENGINE_DIRECT3D_H__ */ diff --git a/libraries/evas/src/modules/engines/direct3d/Makefile.am b/libraries/evas/src/modules/engines/direct3d/Makefile.am new file mode 100644 index 0000000..cdbfd52 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/Makefile.am @@ -0,0 +1,71 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_direct3d_cflags@ + +if BUILD_ENGINE_DIRECT3D + +DIRECT3D_SOURCES = \ +evas_engine.c \ +evas_direct3d_context.cpp \ +evas_direct3d_device.cpp \ +evas_direct3d_image_cache.cpp \ +evas_direct3d_main.cpp \ +evas_direct3d_object.cpp \ +evas_direct3d_object_font.cpp \ +evas_direct3d_object_image.cpp \ +evas_direct3d_object_line.cpp \ +evas_direct3d_object_rect.cpp \ +evas_direct3d_scene.cpp \ +evas_direct3d_shader_pack.cpp \ +evas_direct3d_vertex_buffer_cache.cpp + +DIRECT3D_LIBADD = @evas_engine_direct3d_libs@ + + +includes_HEADERS = Evas_Engine_Direct3D.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_DIRECT3D + +pkgdir = $(libdir)/evas/modules/engines/direct3d/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = $(DIRECT3D_SOURCES) +module_la_CXXFLAGS = -fno-exceptions +module_la_LIBADD = $(top_builddir)/src/lib/libevas.la $(DIRECT3D_LIBADD) @EINA_LIBS@ +module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_direct3d.la + +libevas_engine_direct3d_la_SOURCES = $(DIRECT3D_SOURCES) +libevas_engine_direct3d_la_LIBADD = $(DIRECT3D_LIBADD) + +endif +endif + +EXTRA_DIST = \ +array.h \ +evas_direct3d_context.h \ +evas_direct3d_device.h \ +evas_direct3d_image_cache.h \ +evas_direct3d_object.h \ +evas_direct3d_object_font.h \ +evas_direct3d_object_image.h \ +evas_direct3d_object_line.h \ +evas_direct3d_object_rect.h \ +evas_direct3d_scene.h \ +evas_direct3d_shader_pack.h \ +evas_direct3d_vertex_buffer_cache.h \ +evas_engine.h \ +ref.h diff --git a/libraries/evas/src/modules/engines/direct3d/Makefile.in b/libraries/evas/src/modules/engines/direct3d/Makefile.in new file mode 100644 index 0000000..03d892e --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/Makefile.in @@ -0,0 +1,1021 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/direct3d +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_TRUE@libevas_engine_direct3d_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_direct3d_la_SOURCES_DIST = evas_engine.c \ + evas_direct3d_context.cpp evas_direct3d_device.cpp \ + evas_direct3d_image_cache.cpp evas_direct3d_main.cpp \ + evas_direct3d_object.cpp evas_direct3d_object_font.cpp \ + evas_direct3d_object_image.cpp evas_direct3d_object_line.cpp \ + evas_direct3d_object_rect.cpp evas_direct3d_scene.cpp \ + evas_direct3d_shader_pack.cpp \ + evas_direct3d_vertex_buffer_cache.cpp +@BUILD_ENGINE_DIRECT3D_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_context.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_device.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_image_cache.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_main.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_object.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_object_font.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_object_image.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_object_line.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_object_rect.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_scene.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_shader_pack.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ evas_direct3d_vertex_buffer_cache.lo +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_TRUE@am_libevas_engine_direct3d_la_OBJECTS = $(am__objects_1) +libevas_engine_direct3d_la_OBJECTS = \ + $(am_libevas_engine_direct3d_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_TRUE@am_libevas_engine_direct3d_la_rpath = +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la \ +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@ $(am__DEPENDENCIES_1) +am__module_la_SOURCES_DIST = evas_engine.c evas_direct3d_context.cpp \ + evas_direct3d_device.cpp evas_direct3d_image_cache.cpp \ + evas_direct3d_main.cpp evas_direct3d_object.cpp \ + evas_direct3d_object_font.cpp evas_direct3d_object_image.cpp \ + evas_direct3d_object_line.cpp evas_direct3d_object_rect.cpp \ + evas_direct3d_scene.cpp evas_direct3d_shader_pack.cpp \ + evas_direct3d_vertex_buffer_cache.cpp +@BUILD_ENGINE_DIRECT3D_TRUE@am__objects_2 = module_la-evas_engine.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_context.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_device.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_image_cache.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_main.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_object.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_object_font.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_object_image.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_object_line.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_object_rect.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_scene.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_shader_pack.lo \ +@BUILD_ENGINE_DIRECT3D_TRUE@ module_la-evas_direct3d_vertex_buffer_cache.lo +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(module_la_CXXFLAGS) $(CXXFLAGS) $(module_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_direct3d_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_direct3d_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Direct3D.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_direct3d_cflags@ + +@BUILD_ENGINE_DIRECT3D_TRUE@DIRECT3D_SOURCES = \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_engine.c \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_context.cpp \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_device.cpp \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_image_cache.cpp \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_main.cpp \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_object.cpp \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_object_font.cpp \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_object_image.cpp \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_object_line.cpp \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_object_rect.cpp \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_scene.cpp \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_shader_pack.cpp \ +@BUILD_ENGINE_DIRECT3D_TRUE@evas_direct3d_vertex_buffer_cache.cpp + +@BUILD_ENGINE_DIRECT3D_TRUE@DIRECT3D_LIBADD = @evas_engine_direct3d_libs@ +@BUILD_ENGINE_DIRECT3D_TRUE@includes_HEADERS = Evas_Engine_Direct3D.h +@BUILD_ENGINE_DIRECT3D_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@pkgdir = $(libdir)/evas/modules/engines/direct3d/$(MODULE_ARCH) +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@module_la_SOURCES = $(DIRECT3D_SOURCES) +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@module_la_CXXFLAGS = -fno-exceptions +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@module_la_LIBADD = $(top_builddir)/src/lib/libevas.la $(DIRECT3D_LIBADD) @EINA_LIBS@ +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_TRUE@noinst_LTLIBRARIES = libevas_engine_direct3d.la +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_TRUE@libevas_engine_direct3d_la_SOURCES = $(DIRECT3D_SOURCES) +@BUILD_ENGINE_DIRECT3D_TRUE@@EVAS_STATIC_BUILD_DIRECT3D_TRUE@libevas_engine_direct3d_la_LIBADD = $(DIRECT3D_LIBADD) +EXTRA_DIST = \ +array.h \ +evas_direct3d_context.h \ +evas_direct3d_device.h \ +evas_direct3d_image_cache.h \ +evas_direct3d_object.h \ +evas_direct3d_object_font.h \ +evas_direct3d_object_image.h \ +evas_direct3d_object_line.h \ +evas_direct3d_object_rect.h \ +evas_direct3d_scene.h \ +evas_direct3d_shader_pack.h \ +evas_direct3d_vertex_buffer_cache.h \ +evas_engine.h \ +ref.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/direct3d/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/direct3d/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_direct3d.la: $(libevas_engine_direct3d_la_OBJECTS) $(libevas_engine_direct3d_la_DEPENDENCIES) + $(AM_V_CXXLD)$(CXXLINK) $(am_libevas_engine_direct3d_la_rpath) $(libevas_engine_direct3d_la_OBJECTS) $(libevas_engine_direct3d_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CXXLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_device.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_image_cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_object.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_object_font.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_object_image.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_object_line.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_object_rect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_scene.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_shader_pack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_direct3d_vertex_buffer_cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_device.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_image_cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_object.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_object_font.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_object_image.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_object_line.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_object_rect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_scene.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_shader_pack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_direct3d_vertex_buffer_cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +module_la-evas_direct3d_context.lo: evas_direct3d_context.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_context.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_context.Tpo -c -o module_la-evas_direct3d_context.lo `test -f 'evas_direct3d_context.cpp' || echo '$(srcdir)/'`evas_direct3d_context.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_context.Tpo $(DEPDIR)/module_la-evas_direct3d_context.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_context.cpp' object='module_la-evas_direct3d_context.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_context.lo `test -f 'evas_direct3d_context.cpp' || echo '$(srcdir)/'`evas_direct3d_context.cpp + +module_la-evas_direct3d_device.lo: evas_direct3d_device.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_device.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_device.Tpo -c -o module_la-evas_direct3d_device.lo `test -f 'evas_direct3d_device.cpp' || echo '$(srcdir)/'`evas_direct3d_device.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_device.Tpo $(DEPDIR)/module_la-evas_direct3d_device.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_device.cpp' object='module_la-evas_direct3d_device.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_device.lo `test -f 'evas_direct3d_device.cpp' || echo '$(srcdir)/'`evas_direct3d_device.cpp + +module_la-evas_direct3d_image_cache.lo: evas_direct3d_image_cache.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_image_cache.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_image_cache.Tpo -c -o module_la-evas_direct3d_image_cache.lo `test -f 'evas_direct3d_image_cache.cpp' || echo '$(srcdir)/'`evas_direct3d_image_cache.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_image_cache.Tpo $(DEPDIR)/module_la-evas_direct3d_image_cache.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_image_cache.cpp' object='module_la-evas_direct3d_image_cache.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_image_cache.lo `test -f 'evas_direct3d_image_cache.cpp' || echo '$(srcdir)/'`evas_direct3d_image_cache.cpp + +module_la-evas_direct3d_main.lo: evas_direct3d_main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_main.Tpo -c -o module_la-evas_direct3d_main.lo `test -f 'evas_direct3d_main.cpp' || echo '$(srcdir)/'`evas_direct3d_main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_main.Tpo $(DEPDIR)/module_la-evas_direct3d_main.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_main.cpp' object='module_la-evas_direct3d_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_main.lo `test -f 'evas_direct3d_main.cpp' || echo '$(srcdir)/'`evas_direct3d_main.cpp + +module_la-evas_direct3d_object.lo: evas_direct3d_object.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_object.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_object.Tpo -c -o module_la-evas_direct3d_object.lo `test -f 'evas_direct3d_object.cpp' || echo '$(srcdir)/'`evas_direct3d_object.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_object.Tpo $(DEPDIR)/module_la-evas_direct3d_object.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_object.cpp' object='module_la-evas_direct3d_object.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_object.lo `test -f 'evas_direct3d_object.cpp' || echo '$(srcdir)/'`evas_direct3d_object.cpp + +module_la-evas_direct3d_object_font.lo: evas_direct3d_object_font.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_object_font.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_object_font.Tpo -c -o module_la-evas_direct3d_object_font.lo `test -f 'evas_direct3d_object_font.cpp' || echo '$(srcdir)/'`evas_direct3d_object_font.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_object_font.Tpo $(DEPDIR)/module_la-evas_direct3d_object_font.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_object_font.cpp' object='module_la-evas_direct3d_object_font.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_object_font.lo `test -f 'evas_direct3d_object_font.cpp' || echo '$(srcdir)/'`evas_direct3d_object_font.cpp + +module_la-evas_direct3d_object_image.lo: evas_direct3d_object_image.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_object_image.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_object_image.Tpo -c -o module_la-evas_direct3d_object_image.lo `test -f 'evas_direct3d_object_image.cpp' || echo '$(srcdir)/'`evas_direct3d_object_image.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_object_image.Tpo $(DEPDIR)/module_la-evas_direct3d_object_image.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_object_image.cpp' object='module_la-evas_direct3d_object_image.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_object_image.lo `test -f 'evas_direct3d_object_image.cpp' || echo '$(srcdir)/'`evas_direct3d_object_image.cpp + +module_la-evas_direct3d_object_line.lo: evas_direct3d_object_line.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_object_line.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_object_line.Tpo -c -o module_la-evas_direct3d_object_line.lo `test -f 'evas_direct3d_object_line.cpp' || echo '$(srcdir)/'`evas_direct3d_object_line.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_object_line.Tpo $(DEPDIR)/module_la-evas_direct3d_object_line.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_object_line.cpp' object='module_la-evas_direct3d_object_line.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_object_line.lo `test -f 'evas_direct3d_object_line.cpp' || echo '$(srcdir)/'`evas_direct3d_object_line.cpp + +module_la-evas_direct3d_object_rect.lo: evas_direct3d_object_rect.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_object_rect.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_object_rect.Tpo -c -o module_la-evas_direct3d_object_rect.lo `test -f 'evas_direct3d_object_rect.cpp' || echo '$(srcdir)/'`evas_direct3d_object_rect.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_object_rect.Tpo $(DEPDIR)/module_la-evas_direct3d_object_rect.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_object_rect.cpp' object='module_la-evas_direct3d_object_rect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_object_rect.lo `test -f 'evas_direct3d_object_rect.cpp' || echo '$(srcdir)/'`evas_direct3d_object_rect.cpp + +module_la-evas_direct3d_scene.lo: evas_direct3d_scene.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_scene.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_scene.Tpo -c -o module_la-evas_direct3d_scene.lo `test -f 'evas_direct3d_scene.cpp' || echo '$(srcdir)/'`evas_direct3d_scene.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_scene.Tpo $(DEPDIR)/module_la-evas_direct3d_scene.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_scene.cpp' object='module_la-evas_direct3d_scene.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_scene.lo `test -f 'evas_direct3d_scene.cpp' || echo '$(srcdir)/'`evas_direct3d_scene.cpp + +module_la-evas_direct3d_shader_pack.lo: evas_direct3d_shader_pack.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_shader_pack.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_shader_pack.Tpo -c -o module_la-evas_direct3d_shader_pack.lo `test -f 'evas_direct3d_shader_pack.cpp' || echo '$(srcdir)/'`evas_direct3d_shader_pack.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_shader_pack.Tpo $(DEPDIR)/module_la-evas_direct3d_shader_pack.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_shader_pack.cpp' object='module_la-evas_direct3d_shader_pack.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_shader_pack.lo `test -f 'evas_direct3d_shader_pack.cpp' || echo '$(srcdir)/'`evas_direct3d_shader_pack.cpp + +module_la-evas_direct3d_vertex_buffer_cache.lo: evas_direct3d_vertex_buffer_cache.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_direct3d_vertex_buffer_cache.lo -MD -MP -MF $(DEPDIR)/module_la-evas_direct3d_vertex_buffer_cache.Tpo -c -o module_la-evas_direct3d_vertex_buffer_cache.lo `test -f 'evas_direct3d_vertex_buffer_cache.cpp' || echo '$(srcdir)/'`evas_direct3d_vertex_buffer_cache.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_direct3d_vertex_buffer_cache.Tpo $(DEPDIR)/module_la-evas_direct3d_vertex_buffer_cache.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_direct3d_vertex_buffer_cache.cpp' object='module_la-evas_direct3d_vertex_buffer_cache.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_direct3d_vertex_buffer_cache.lo `test -f 'evas_direct3d_vertex_buffer_cache.cpp' || echo '$(srcdir)/'`evas_direct3d_vertex_buffer_cache.cpp + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/direct3d/array.h b/libraries/evas/src/modules/engines/direct3d/array.h new file mode 100644 index 0000000..dfd80b7 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/array.h @@ -0,0 +1,305 @@ +#ifndef __ARRAY_H__ +#define __ARRAY_H__ + +#include "ref.h" +#include + +template +class TArray : virtual public Referenc +{ +public: + TArray(); + TArray(const TArray &arr) + { + data = NULL; + size = num = 0; + block_size = arr.block_size; + keep_order = arr.keep_order; + + //assert(0 && "Direct assignment for arrays is NOT allowed"); + // risky probably, but anyway + arr.CopyTo(*this); + } + ~TArray(); + + bool Allocate(int new_num); + bool Resize(int new_size = 0); + bool Add(T &el); + bool Add(const T &el); + + inline T &operator[](int i); + inline const T &operator[](int i) const; + inline const TArray &operator =(const TArray &arr) + { + block_size = arr.block_size; + keep_order = arr.keep_order; + + //assert(0 && "Direct assignment for arrays is NOT allowed"); + // risky probably, but anyway + arr.CopyTo(*this); + return *this; + } + + T *Last() + { + if (num > 0) + return &data[num - 1]; + return NULL; + } + + inline int Length() const + { + return num; + } + + inline int Size() const + { + return size; + } + + inline int BlockSize() const + { + return block_size; + } + + inline T *Data() + { + return data; + } + + inline T **DataPtr() + { + return &data; + } + + inline const T *Data() const + { + return data; + } + + inline void SetKeepOrder(bool enable) + { + keep_order = enable; + } + + bool Find(const T &el); + + bool Add(TArray &arr); + bool CopyTo(TArray &dest) const; + bool Init(const T *arr, int len); + + void Swap(int to, int from); + void Replace(int i); + + bool SetBlockSize(int new_size); + void Set(T &el); + void Set(const T &el); + +protected: + T *data; + int size; + int num; + int block_size; + // Some operations restricted, order of the elements is fixed + bool keep_order; + +}; + +namespace Array +{ + const int default_block_size = 16; + const int max_array_size = 0xffffff; +} + + +template TArray::TArray() +: data(NULL), size(0), num(0), block_size(Array::default_block_size), keep_order(false) +{ +} + +template TArray::~TArray() +{ + if (data != NULL) + Resize(); +} + +template bool TArray::Allocate(int new_num) +{ + assert(new_num >= 0 && new_num <= Array::max_array_size); + if (new_num > size) + { + if (!Resize(new_num)) + return false; + } + num = new_num; + return true; +} + +template bool TArray::Resize(int new_size) +{ + assert(new_size >= 0 && new_size <= Array::max_array_size); + if (new_size == 0) + { + delete[] data; + data = NULL; + size = 0; + num = 0; + return true; + } + if (new_size == size) + return true; + + T *new_data = new T[new_size]; + if (new_data == NULL) + return false; + + if (data != NULL && num > 0) + { + //CopyMemory(new_data, data, num * sizeof(T)); + for (int i = 0; i < num && i < new_size; i++) + new_data[i] = data[i]; + } + delete[] data; + + data = new_data; + size = new_size; + return true; +} + +template bool TArray::Add(T &el) +{ + if (data == NULL) + Resize(1); + + if (num < size) + { + data[num++] = el; + return true; + } + // num >= size + int new_size = size + block_size; + if (!Resize(new_size)) + return false; + + data[num++] = el; + return true; +} + +template bool TArray::Add(const T &el) +{ + if (data == NULL) + Resize(1); + + if (num < size) + { + data[num++] = *(T *)⪙ + return true; + } + // num >= size + int new_size = size + block_size; + if (!Resize(new_size)) + return false; + + data[num++] = *(T *)⪙ + return true; +} + +template bool TArray::Add(TArray &arr) +{ + if (arr.Length() == 0) + return true; + int numf = num; + if (!Allocate(Length() + arr.Length())) + return false; + CopyMemory(&data[numf], arr.Data(), arr.Length() * sizeof(T)); + return true; +} + +template T &TArray::operator [](int i) +{ + assert(i >= 0 && i < num); + return data[i]; +} + +template const T &TArray::operator [](int i) const +{ + assert(i >= 0 && i < num); + return data[i]; +} + +template bool TArray::SetBlockSize(int new_size) +{ + assert(new_size >= 0 && new_size <= Array::max_array_size); + block_size = new_size; + return true; +} + +template void TArray::Set(T &el) +{ + for (int i = 0; i < num; i++) + data[i] = el; +} + +template void TArray::Set(const T &el) +{ + for (int i = 0; i < num; i++) + data[i] = el; +} + +template bool TArray::CopyTo(TArray &dest) const +{ + if (!dest.Resize(size)) + return false; + dest.num = 0; + for (int i = 0; i < num; i++) + dest.Add(data[i]); + + return true; +} + +template bool TArray::Init(const T *arr, int len) +{ + assert(arr != NULL); + if (!Resize(len)) + return false; + num = 0; + for (int i = 0; i < len; i++) + Add((T)arr[i]); + + return true; +} + +template void TArray::Swap(int to, int from) +{ + assert(to >= 0 && to < num && from >= 0 && from < num); + if (keep_order) + return; + T t = data[to]; + data[to] = data[from]; + data[from] = t; +} + +template void TArray::Replace(int i) +{ + assert(i >= 0 && i < num); + if (keep_order) + return; + if (num >= 1) + { + data[i] = data[num - 1]; + num--; + } +} + +// operator == for type T should be defined +template bool TArray::Find(const T &el) +{ + for (int i = 0; i < num; i++) + { + if (data[i] == el) + return true; + } + return false; +} + +#endif // __ARRAY_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_context.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_context.cpp new file mode 100644 index 0000000..07cfa3d --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_context.cpp @@ -0,0 +1,8 @@ + +#include "evas_direct3d_context.h" + +D3DContext::D3DContext() +{ + color = 0xff000000; + color_mul = 0xffffffff; +} diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_context.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_context.h new file mode 100644 index 0000000..763d189 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_context.h @@ -0,0 +1,22 @@ +#ifndef __EVAS_DIRECT3D_CONTEXT_H__ +#define __EVAS_DIRECT3D_CONTEXT_H__ + +#include "evas_engine.h" + +#include "ref.h" +#include "evas_direct3d_object.h" + +class D3DContext : virtual public Referenc +{ +public: + D3DContext(); + +public: + DWORD color; + DWORD color_mul; + + Ref font; + +}; + +#endif // __EVAS_DIRECT3D_CONTEXT_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_device.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_device.cpp new file mode 100644 index 0000000..ce0d985 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_device.cpp @@ -0,0 +1,393 @@ +//#define ENABLE_LOG_PRINTF + +#include "evas_direct3d_device.h" + +#include "evas_direct3d_vertex_buffer_cache.h" + +D3DDevice::D3DDevice() +{ + ResetParams(); +} + +bool D3DDevice::Init(HWND window, int depth, bool fullscreen) +{ + D3DPRESENT_PARAMETERS pp; + D3DDISPLAYMODE dm; + D3DCAPS9 caps; + RECT rect; + DWORD flag; + HRESULT hr; + + if (window == NULL) + return false; + + Destroy(); + + _object = Direct3DCreate9(D3D_SDK_VERSION); + if (_object == NULL) + return false; + + if (FAILED(hr = _object->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &dm))) + { + ERR("GetAdapterDisplayMode failed: %x", hr); + Destroy(); + return false; + } + + if (FAILED(hr = _object->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &caps))) + { + ERR("GetDeviceCaps failed: %x", hr); + Destroy(); + return false; + } + + if (!GetClientRect(window, &rect)) + { + ERR("GetClientRect failed: %x", GetLastError()); + Destroy(); + return false; + } + + if (SUCCEEDED(_object->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + dm.Format, 0, D3DRTYPE_TEXTURE, (depth == 16) ? D3DFMT_R5G6B5 : D3DFMT_A8R8G8B8))) + { + dm.Format = (depth == 16) ? D3DFMT_R5G6B5 : D3DFMT_A8R8G8B8; + } + + flag = (caps.VertexProcessingCaps != 0) ? + (D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE) : + D3DCREATE_SOFTWARE_VERTEXPROCESSING; + + ZeroMemory(&pp, sizeof(pp)); + if (!fullscreen) + { + pp.BackBufferWidth = rect.right - rect.left; + pp.BackBufferHeight = rect.bottom - rect.top; + } + else + { + pp.BackBufferWidth = ::GetSystemMetrics(SM_CXSCREEN); + pp.BackBufferHeight = ::GetSystemMetrics(SM_CYSCREEN); + } + pp.BackBufferFormat = dm.Format; + pp.BackBufferCount = 1; + pp.MultiSampleType = D3DMULTISAMPLE_NONE; + pp.MultiSampleQuality = 0; + pp.SwapEffect = D3DSWAPEFFECT_DISCARD; + pp.hDeviceWindow = window; + pp.Windowed = fullscreen ? FALSE : TRUE; + //pp.EnableAutoDepthStencil = TRUE; + //pp.AutoDepthStencilFormat = D3DFMT_D16; + pp.FullScreen_RefreshRateInHz = 0; + pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; + + if (FAILED(hr = _object->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + window, flag, &pp, &_device))) + { + WRN("CreateDevice failed: %x", hr); + Destroy(); + return false; + } + + LPDIRECT3DSURFACE9 backbuffer = NULL; + _device->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); + backbuffer->GetDesc(&_backbuffer_desc); + backbuffer->Release(); + + switch (dm.Format) { + case D3DFMT_A8R8G8B8: + case D3DFMT_X8R8G8B8: + _depth = 32; + break; + case D3DFMT_R5G6B5: + _depth = 16; + break; + default: + WRN("No supported format found"); + Destroy(); + return false; + } + + //_render_to_texture = false; + + _d3dpp = pp; + _device_lost = FALSE; + _scene_rendering = FALSE; + _width = rect.right - rect.left; + _height = rect.bottom - rect.top; + _window = window; + + if (FAILED(CreateRenderTarget())) + { + ERR("Failed to create render target"); + Destroy(); + return false; + } + + Log("initialized"); + return true; +} + +bool D3DDevice::Reset(int width, int height, int fullscreen) +{ + D3DPRESENT_PARAMETERS pp = _d3dpp; + _d3dpp.BackBufferWidth = (width > 0) ? width : _d3dpp.BackBufferWidth; + _d3dpp.BackBufferHeight = (height > 0) ? height : _d3dpp.BackBufferHeight; + _d3dpp.Windowed = (fullscreen == 1) ? FALSE : ((fullscreen == 0) ? TRUE : _d3dpp.Windowed); + if (FAILED(ResetDevice())) + { + WRN("Couldnt restore device"); + _d3dpp = pp; + return SUCCEEDED(ResetDevice()); + } + _width = _d3dpp.BackBufferWidth; + _height = _d3dpp.BackBufferHeight; + return true; +} + +void D3DDevice::Destroy() +{ + //if (_render_target != NULL) + //{ + // _render_target->Release(); + // _render_target = NULL; + //} + if (_render_target_data != NULL) + { + _render_target_data->Release(); + _render_target_data = NULL; + } + if (_device != NULL) + { + int num = _device->Release(); + assert(num == 0); + } + if (_object != NULL) + _object->Release(); + ResetParams(); + + INF("uninitialized"); +} + +void D3DDevice::ResetParams() +{ + _window = NULL; + _object = NULL; + _device = NULL; + _width = 0; + _height = 0; + _rot = 0; + _depth = 0; + _device_lost = false; + _scene_rendering = false; + ZeroMemory(&_d3dpp, sizeof(_d3dpp)); + ZeroMemory(&_backbuffer_desc, sizeof(_backbuffer_desc)); + //_render_target = NULL; + _render_target_data = NULL; + _render_data_updated = false; + _render_data.Resize(); + //_original_render_target = NULL; + //_render_to_texture = false; +} + +HRESULT D3DDevice::RestoreDevice() +{ + Log("restore"); + assert(_device != NULL); + + HRESULT hr = S_OK; + + // Test the cooperative level to see if it's okay to render + if (SUCCEEDED(hr = _device->TestCooperativeLevel())) + { + _device_lost = FALSE; + DBG("render test ok"); + return S_OK; + } + + // If the device was lost, do not render until we get it back + if (hr == D3DERR_DEVICELOST) + return E_FAIL; + + // Check if the device needs to be reset. + if (hr == D3DERR_DEVICENOTRESET) + { + if (FAILED(hr = ResetDevice())) + return hr; + } + return hr; +} + +HRESULT D3DDevice::ResetDevice() +{ + DBG("reset"); + HRESULT hr = S_OK; + + _scene_rendering = FALSE; + + // Release all video memory objects + // Bad to call such, make better + D3DVertexBufferCache::Current()->Uninitialize(); + + //if (_render_target != NULL) + //{ + // _render_target->Release(); + // _render_target = NULL; + //} + if (_render_target_data != NULL) + { + _render_target_data->Release(); + _render_target_data = NULL; + } + + // Reset the device + if (FAILED(hr = _device->Reset(&_d3dpp))) + { + ERR("D3DDevice: Reset of the device failed! Error (%X)", (DWORD)hr); + return hr; + } + + // Store render target surface desc + LPDIRECT3DSURFACE9 backbuffer = NULL; + _device->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); + if (backbuffer != NULL) + { + backbuffer->GetDesc(&_backbuffer_desc); + backbuffer->Release(); + } + + // Initialize the app's device-dependent objects + hr = CreateRenderTarget(); + + if (FAILED(hr)) + { + WRN("Restoration of device objects failed"); + // Invalidate objects + + return E_FAIL; + } + + DBG("Device objects were successfuly restored"); + _textures.Set(NULL); + + //_device_objects_restored = true; + return S_OK; +} + +bool D3DDevice::Begin() +{ + if (FAILED(RestoreDevice())) + return false; + + //if (_render_to_texture && _render_target != NULL) + //{ + // if (FAILED(_device->GetRenderTarget(0, &_original_render_target))) + // return false; + // if (FAILED(_device->SetRenderTarget(0, _render_target))) + // return false; + //} + + HRESULT hr; + if (FAILED(hr = _device->BeginScene())) + { + WRN("Cannot begin scene: %X", (DWORD)hr); + return false; + } + + //static const D3DVIEWPORT9 vp = {0, 0, _width, _height, 0.f, 1.f}; + //_device->SetViewport(&vp); + //_device->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE); + + //_device->Clear(0, NULL, D3DCLEAR_TARGET /*| D3DCLEAR_ZBUFFER*/, 0xff8080ff, 1.f, 0); + return true; +} + +bool D3DDevice::End() +{ + _device->EndScene(); + _device->Present(NULL, NULL, NULL, NULL); + + _render_data_updated = false; + + //if (_render_to_texture && _render_target != NULL && _original_render_target != NULL) + //{ + // if (FAILED(_device->SetRenderTarget(0, _original_render_target))) + // return false; + //} + + return true; +} + +TArray &D3DDevice::GetRenderData() +{ + if (_render_data_updated) + return _render_data; + _render_data.Allocate(0); + if (_render_target_data == NULL) + return _render_data; + + LPDIRECT3DSURFACE9 surf = NULL; + HRESULT hr; + if (FAILED(_device->GetRenderTarget(0, &surf))) + return _render_data; + if (FAILED(hr = _device->GetRenderTargetData(surf, _render_target_data))) + { + WRN("Failed to get render target data (%X)", (DWORD)hr); + surf->Release(); + return _render_data; + } + D3DLOCKED_RECT lr; + if (FAILED(_render_target_data->LockRect(&lr, NULL, D3DLOCK_READONLY))) + { + surf->Release(); + return _render_data; + } + _render_data.Allocate(_width * _height); + + for (int i = 0; i < _height; i++) + { + CopyMemory(&_render_data[i * _width], (BYTE *)lr.pBits + i * lr.Pitch, + _width * sizeof(DWORD)); + } + + _render_target_data->UnlockRect(); + _render_data_updated = true; + surf->Release(); + return _render_data; +} + +HRESULT D3DDevice::SetTexture(DWORD stage, LPDIRECT3DTEXTURE9 tex) +{ + if (stage >= 8) + return E_FAIL; + if (_textures.Length() <= (int)stage) + _textures.Allocate(stage + 1); + if (_textures[stage] != tex) + { + _textures[stage] = tex; + return _device->SetTexture(stage, tex); + } + return S_OK; +} + +HRESULT D3DDevice::CreateRenderTarget() +{ + if (_device == NULL) + return E_FAIL; + //if (_render_target != NULL && + if (_render_target_data != NULL) + return S_OK; + + //if (FAILED(_device->CreateRenderTarget(_width, _height, _backbuffer_desc.Format, + // D3DMULTISAMPLE_NONE, 0, FALSE, &_render_target, NULL))) + //{ + // return E_FAIL; + //} + if (FAILED(_device->CreateOffscreenPlainSurface(_backbuffer_desc.Width, + _backbuffer_desc.Height, _backbuffer_desc.Format, D3DPOOL_SYSTEMMEM, + &_render_target_data, NULL))) + { + return E_FAIL; + } + return S_OK; +} diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_device.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_device.h new file mode 100644 index 0000000..c5a4b49 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_device.h @@ -0,0 +1,87 @@ +#ifndef __EVAS_DIRECT3D_DEVICE_H__ +#define __EVAS_DIRECT3D_DEVICE_H__ + +#include "evas_engine.h" + +#include + +#include "ref.h" +#include "array.h" + + +class D3DDevice : virtual public Referenc +{ +public: + D3DDevice(); + + bool Init(HWND window, int depth, bool fullscreen = false); + bool Reset(int width, int height, int fullscreen); + void Destroy(); + bool Begin(); + bool End(); + + inline LPDIRECT3DDEVICE9 GetDevice(); + inline int GetWidth(); + inline int GetHeight(); + inline HWND GetWindow(); + inline bool GetFullscreen(); + + TArray &GetRenderData(); + + HRESULT SetTexture(DWORD stage, LPDIRECT3DTEXTURE9 tex); + +private: + HRESULT RestoreDevice(); + HRESULT ResetDevice(); + void ResetParams(); + + HRESULT CreateRenderTarget(); + +private: + HWND _window; + LPDIRECT3D9 _object; + LPDIRECT3DDEVICE9 _device; + int _width; + int _height; + int _rot; + int _depth; + bool _device_lost; + bool _scene_rendering; + D3DPRESENT_PARAMETERS _d3dpp; + D3DSURFACE_DESC _backbuffer_desc; + //LPDIRECT3DSURFACE9 _render_target; + LPDIRECT3DSURFACE9 _render_target_data; + //LPDIRECT3DSURFACE9 _original_render_target; + //bool _render_to_texture; + TArray _render_data; + bool _render_data_updated; + + TArray _textures; +}; + +LPDIRECT3DDEVICE9 D3DDevice::GetDevice() +{ + return _device; +} + +int D3DDevice::GetWidth() +{ + return _width; +} + +int D3DDevice::GetHeight() +{ + return _height; +} + +HWND D3DDevice::GetWindow() +{ + return _window; +} + +bool D3DDevice::GetFullscreen() +{ + return (_d3dpp.Windowed == 0); +} + +#endif // __EVAS_DIRECT3D_DEVICE_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_image_cache.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_image_cache.cpp new file mode 100644 index 0000000..aa44eb9 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_image_cache.cpp @@ -0,0 +1,436 @@ +#include "evas_direct3d_image_cache.h" + +#include "evas_direct3d_device.h" + +#include + +Ref D3DImageCache::_this; + +D3DImageCache::D3DImageCache() +{ + _max_width = 512; + _max_height = 512; + _margin = 0; +} + +D3DImageCache::~D3DImageCache() +{ + Uninitialize(); +} + +D3DImageCache *D3DImageCache::Current() +{ + if (_this.IsNull()) + _this = new D3DImageCache(); + return _this; +} + +void D3DImageCache::SetCurrent(D3DImageCache *obj) +{ + _this = obj; +} + +void D3DImageCache::Uninitialize() +{ + for (int i = 0; i < _cache.Length(); i++) + { + // In normal case they all will be NULL + if (_cache[i].texture != NULL) + _cache[i].texture->Release(); + } + _cache.Resize(); +} + +bool D3DImageCache::SelectImageToDevice(D3DDevice *d3d, int id) +{ + if (id < 0 || id >= _cache.Length()) + return false; + assert(_cache[id].texture != NULL); + return SUCCEEDED(d3d->SetTexture(_cache[id].stage, _cache[id].texture)); +} + +void D3DImageCache::RemoveImageUser(int id) +{ + if (id < 0 || id >= _cache.Length()) + return; + assert(_cache[id].texture != NULL); + _cache[id].users--; + if (_cache[id].users == 0) + { + _cache[id].texture->Release(); + ZeroMemory(&_cache[id], sizeof(_cache[id])); + } +} + +void D3DImageCache::AddImageUser(int id) +{ + if (id < 0 || id >= _cache.Length()) + return; + assert(_cache[id].texture != NULL); + _cache[id].users++; +} + +bool D3DImageCache::InsertImage(D3DDevice *d3d, DWORD *data, int w, int h, CacheEntryInfo &info) +{ + CacheEntry *ce = NULL; + int id = -1; + for (int i = 0; i < _cache.Length(); i++) + { + if (!_cache[i].locked && RequestInsert(_cache[i], w, h)) + { + ce = &_cache[i]; + id = i; + break; + } + } + if (ce == NULL) + { + CacheEntry new_entry; + if (!CreateEntry(d3d, new_entry, w, h)) + return false; + for (id = 0; id < _cache.Length(); id++) + { + if (_cache[id].texture == NULL) + break; + } + + if (id < _cache.Length()) + { + _cache[id] = new_entry; + ce = &_cache[id]; + } + else + { + _cache.Add(new_entry); + ce = _cache.Last(); + id = _cache.Length() - 1; + } + } + + assert(ce != NULL && ce->texture != NULL); + + if (!InsertData(*ce, data, w, h)) + return false; + + info.id = id; + info.u = FLOAT(ce->cur_x) / FLOAT(ce->width); + info.v = FLOAT(ce->cur_y) / FLOAT(ce->height); + info.du = FLOAT(w) / FLOAT(ce->width); + info.dv = FLOAT(h) / FLOAT(ce->height); + info.width = w; + info.height = h; + + UpdateInsert(*ce, w, h); + return true; +} + +bool D3DImageCache::InsertImage(D3DDevice *d3d, int id, DWORD *data, int w, int h, CacheEntryInfo &info) +{ + if (id < 0 || id >= _cache.Length()) + return false; + assert(_cache[id].texture != NULL); + CacheEntry *ce = &_cache[id]; + if (!RequestInsert(*ce, w, h)) + return false; + if (!InsertData(*ce, data, w, h)) + return false; + + info.id = id; + info.u = FLOAT(ce->cur_x) / FLOAT(ce->width); + info.v = FLOAT(ce->cur_y) / FLOAT(ce->height); + info.du = FLOAT(w) / FLOAT(ce->width); + info.dv = FLOAT(h) / FLOAT(ce->height); + info.width = w; + info.height = h; + + UpdateInsert(*ce, w, h); + return true; +} + +bool D3DImageCache::CreateImage(D3DDevice *d3d, int w, int h, bool locked, CacheEntryInfo &info) +{ + int id; + CacheEntry new_entry; + CacheEntry *ce = NULL; + + if (!CreateEntry(d3d, new_entry, w, h, true)) + return false; + for (id = 0; id < _cache.Length(); id++) + { + if (_cache[id].texture == NULL) + break; + } + + if (id < _cache.Length()) + { + _cache[id] = new_entry; + ce = &_cache[id]; + } + else + { + _cache.Add(new_entry); + ce = _cache.Last(); + id = _cache.Length() - 1; + } + + assert(ce != NULL && ce->texture != NULL); + + // Fill with zero + if (!InsertData(*ce, NULL, w, h)) + return false; + + info.id = id; + info.u = 0; + info.v = 0; + info.du = 1; + info.dv = 1; + info.width = w; + info.height = h; + + UpdateInsert(*ce, 0, 0); + ce->locked = locked; + return true; +} + +bool D3DImageCache::ResizeImage(D3DDevice *d3d, int nw, int nh, int id) +{ + if (id < 0 || id >= _cache.Length()) + return false; + assert(_cache[id].texture != NULL); + CacheEntry *ce = &_cache[id]; + + if (ce->width == nw && ce->height == nh) + return true; + + LPDIRECT3DTEXTURE9 tex = NULL; + + HRESULT hr; + if (FAILED(hr = d3d->GetDevice()->CreateTexture(nw, nh, 0, 0, D3DFMT_A8R8G8B8, + D3DPOOL_MANAGED, &tex, NULL))) + { + WRN("Failed to create texture: %X", hr); + return false; + } + assert(tex != NULL); + + ce->texture->Release(); + ce->texture = tex; + ce->width = nw; + ce->height = nh; + return true; +} + +bool D3DImageCache::RequestInsert(CacheEntry &entry, int w, int h) +{ + // If we already have large image entry + if (entry.width > _max_width || entry.height > _max_height) + return false; + // If requested size does not fit into this entry at all + if (entry.height - entry.cur_h < h + _margin * 2 || entry.width < w + _margin * 2) + return false; + + // If requested size does not fit into the current line of the entry + if (entry.width - entry.cur_x < w + _margin * 2) + { + entry.cur_y = entry.cur_h + _margin; + entry.cur_x = _margin; + return true; + } + entry.cur_x += _margin; + + return true; +} + +bool D3DImageCache::CreateEntry(D3DDevice *d3d, CacheEntry &entry, int w, int h, bool exact_size) +{ + int width = exact_size ? w : max(_max_width, w); + int height = exact_size ? h : max(_max_height, h); + HRESULT hr; + if (FAILED(hr = d3d->GetDevice()->CreateTexture(width, height, 0, 0, D3DFMT_A8R8G8B8, + D3DPOOL_MANAGED, &entry.texture, NULL))) + { + WRN("Failed to create texture: %X", hr); + return false; + } + + entry.cur_x = entry.cur_y = entry.cur_h = 0; + entry.width = width; + entry.height = height; + entry.users = 0; + entry.locked = false; + entry.stage = 0; + return true; +} + +bool D3DImageCache::InsertData(CacheEntry &entry, DWORD *data, int w, int h) +{ + if (entry.texture == NULL) + return false; + + RECT rc = {entry.cur_x, entry.cur_y, entry.cur_x + w, entry.cur_y + h}; + D3DLOCKED_RECT lr; + if (FAILED(entry.texture->LockRect(0, &lr, &rc, 0))) + { + WRN("Failed to lock texture"); + return false; + } + + if (data != NULL) + { + for (int i = 0; i < h; i++) + CopyMemory(((BYTE *)lr.pBits) + i * lr.Pitch, data + i * w, sizeof(DWORD) * w); + } + else + { + for (int i = 0; i < h; i++) + ZeroMemory(((BYTE *)lr.pBits) + i * lr.Pitch, sizeof(DWORD) * w); + } + + if (FAILED(entry.texture->UnlockRect(0))) + { + WRN("Failed to unlock texture"); + return false; + } + return true; +} + + +bool D3DImageCache::RetrieveData(CacheEntry &entry, DWORD *data, int w, int h) +{ + if (entry.texture == NULL || data == NULL) + return false; + + RECT rc = {entry.cur_x, entry.cur_y, entry.cur_x + w, entry.cur_y + h}; + D3DLOCKED_RECT lr; + if (FAILED(entry.texture->LockRect(0, &lr, &rc, D3DLOCK_READONLY))) + { + WRN("Failed to lock texture"); + return false; + } + + for (int i = 0; i < h; i++) + CopyMemory(data + i * w, ((BYTE *)lr.pBits) + i * lr.Pitch, sizeof(DWORD) * w); + + if (FAILED(entry.texture->UnlockRect(0))) + { + WRN("Failed to unlock texture"); + return false; + } + return true; +} + +void D3DImageCache::UpdateInsert(CacheEntry &entry, int w, int h) +{ + entry.cur_h = max(entry.cur_h, entry.cur_y + h + _margin); + entry.cur_x += w + _margin; + entry.users++; +} + +bool D3DImageCache::UpdateImageData(CacheEntryInfo &info, DWORD *data) +{ + assert(data != NULL); + if (info.id < 0 || info.id >= _cache.Length()) + return false; + CacheEntry ce_copy = _cache[info.id]; + ce_copy.cur_x = int(info.u * FLOAT(ce_copy.width)); + ce_copy.cur_y = int(info.v * FLOAT(ce_copy.height)); + return InsertData(ce_copy, data, info.width, info.height); +} + +bool D3DImageCache::UpdateImageDataWithDirtyInfo(CacheEntryInfo &info, DWORD *data, POINT *dirty) +{ + if (info.id < 0 || info.id >= _cache.Length()) + return false; + CacheEntry &entry = _cache[info.id]; + if (entry.texture == NULL) + return false; + + RECT rc = {0, 0, entry.width, entry.height}; + D3DLOCKED_RECT lr; + if (FAILED(entry.texture->LockRect(0, &lr, &rc, 0))) + { + WRN("Failed to lock texture"); + return false; + } + + if (data != NULL) + { + for (int i = 0; i < rc.bottom; i++) + { + if (dirty[i].x < 0 && dirty[i].y < 0) + continue; + if (dirty[i].x >= 0 && dirty[i].y >= 0) + { + CopyMemory(((BYTE *)lr.pBits) + i * lr.Pitch + dirty[i].x * 4, + data + i * rc.right + dirty[i].x, sizeof(DWORD) * (dirty[i].y - dirty[i].x + 1)); + dirty[i].y = -dirty[i].y; + } + else if (dirty[i].x >= 0 && dirty[i].y < 0) + { + ZeroMemory(((BYTE *)lr.pBits) + i * lr.Pitch + dirty[i].x * 4, + sizeof(DWORD) * (-dirty[i].y - dirty[i].x + 1)); + dirty[i].x = -dirty[i].x; + } + } + } + else + { + for (int i = 0; i < rc.bottom; i++) + { + if (dirty[i].x < 0 || dirty[i].y < 0) + continue; + ZeroMemory(((BYTE *)lr.pBits) + i * lr.Pitch + dirty[i].x * 4, + sizeof(DWORD) * (dirty[i].y - dirty[i].x + 1)); + } + } + + if (FAILED(entry.texture->UnlockRect(0))) + { + WRN("Failed to unlock texture"); + return false; + } + return true; +} + +bool D3DImageCache::UpdateImageDataDiscard(CacheEntryInfo &info, DWORD *data) +{ + assert(data != NULL); + if (info.id < 0 || info.id >= _cache.Length()) + return false; + CacheEntry &entry = _cache[info.id]; + if (entry.texture == NULL) + return false; + + RECT rc = {0, 0, entry.width, entry.height}; + D3DLOCKED_RECT lr; + if (FAILED(entry.texture->LockRect(0, &lr, &rc, 0))) + { + WRN("Failed to lock texture"); + return false; + } + + for (int i = 0; i < rc.bottom; i++) + { + CopyMemory(((BYTE *)lr.pBits) + i * lr.Pitch, + data + i * rc.right, sizeof(DWORD) * rc.right); + } + + if (FAILED(entry.texture->UnlockRect(0))) + { + WRN("Failed to unlock texture"); + return false; + } + return true; +} + +bool D3DImageCache::GetImageData(CacheEntryInfo &info, TArray &data) +{ + if (info.id < 0 || info.id >= _cache.Length()) + return false; + CacheEntry ce_copy = _cache[info.id]; + ce_copy.cur_x = int(info.u * FLOAT(ce_copy.width)); + ce_copy.cur_y = int(info.v * FLOAT(ce_copy.height)); + data.Allocate(info.width * info.height); + + return RetrieveData(ce_copy, data.Data(), info.width, info.height); +} diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_image_cache.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_image_cache.h new file mode 100644 index 0000000..6fb4c18 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_image_cache.h @@ -0,0 +1,108 @@ +#ifndef __EVAS_DIRECT3D_IMAGE_CACHE_H__ +#define __EVAS_DIRECT3D_IMAGE_CACHE_H__ + +#include "evas_engine.h" + +#include "ref.h" +#include "array.h" + +class D3DDevice; + +class D3DImageCache : virtual public Referenc +{ +public: + struct CacheEntryInfo + { + int id; + int width, height; + FLOAT u, v; + FLOAT du, dv; + }; + +public: + ~D3DImageCache(); + + static D3DImageCache *Current(); + static void SetCurrent(D3DImageCache *obj); + + inline void SetMaxSize(int w, int h); + inline void SetMargin(int margin); + + bool InsertImage(D3DDevice *d3d, DWORD *data, int w, int h, CacheEntryInfo &info); + bool InsertImage(D3DDevice *d3d, int id, DWORD *data, int w, int h, CacheEntryInfo &info); + bool CreateImage(D3DDevice *d3d, int w, int h, bool locked, CacheEntryInfo &info); + bool ResizeImage(D3DDevice *d3d, int nw, int nh, int id); + bool SelectImageToDevice(D3DDevice *d3d, int id); + void RemoveImageUser(int id); + void AddImageUser(int id); + bool UpdateImageData(CacheEntryInfo &info, DWORD *data); + bool UpdateImageDataWithDirtyInfo(CacheEntryInfo &info, DWORD *data, POINT *dirty); + bool UpdateImageDataDiscard(CacheEntryInfo &info, DWORD *data); + bool GetImageData(CacheEntryInfo &info, TArray &data); + void Uninitialize(); + + inline int GetImageWidth(int image_id); + inline int GetImageHeight(int image_id); + + inline void SetImageStage(int image_id, int stage); + +private: + struct CacheEntry + { + LPDIRECT3DTEXTURE9 texture; + int width; + int height; + int cur_x; + int cur_y; + int cur_h; + int users; + bool locked; + int stage; + }; + +private: + D3DImageCache(); + + bool RequestInsert(CacheEntry &entry, int w, int h); + bool CreateEntry(D3DDevice *d3d, CacheEntry &entry, int w, int h, bool exact_size = false); + bool InsertData(CacheEntry &entry, DWORD *data, int w, int h); + bool RetrieveData(CacheEntry &entry, DWORD *data, int w, int h); + void UpdateInsert(CacheEntry &entry, int w, int h); + +private: + TArray _cache; + int _max_width; + int _max_height; + + int _margin; + + static Ref _this; +}; + +void D3DImageCache::SetMaxSize(int w, int h) +{ + _max_width = w; + _max_height = h; +} + +void D3DImageCache::SetMargin(int margin) +{ + _margin = margin; +} + +int D3DImageCache::GetImageWidth(int image_id) +{ + return _cache[image_id].width; +} + +int D3DImageCache::GetImageHeight(int image_id) +{ + return _cache[image_id].height; +} + +void D3DImageCache::SetImageStage(int image_id, int stage) +{ + _cache[image_id].stage = stage; +} + +#endif // __EVAS_DIRECT3D_IMAGE_CACHE_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_main.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_main.cpp new file mode 100644 index 0000000..fe1e13f --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_main.cpp @@ -0,0 +1,774 @@ +// Force the layered windows APIs to be visible. +#define _WIN32_WINNT 0x0500 + +#include "evas_engine.h" +#include + +#include + +#include "evas_direct3d_device.h" +#include "evas_direct3d_context.h" +#include "evas_direct3d_shader_pack.h" +#include "evas_direct3d_scene.h" +#include "evas_direct3d_image_cache.h" +#include "evas_direct3d_object_line.h" +#include "evas_direct3d_object_rect.h" +#include "evas_direct3d_object_image.h" +#include "evas_direct3d_vertex_buffer_cache.h" +#include "evas_direct3d_object_font.h" + +// Internal structure that joins two types of objects +struct ImagePtr +{ + Ref ref; + RGBA_Image *img; +}; + +struct DevicePtr +{ + Ref device; + Ref scene; + Ref context; + Ref image_cache; + Ref shader_pack; + Ref vb_cache; + + int fonts_buffer_image_id; + + // Layered windows cannot render D3D in the normal way + bool layered; + + // Window shape mask + struct + { + // Width and height may be different from target size + int width; + int height; + // Pointer to external memory location, dont do anything with it + unsigned char *mask; + } shape; + + // GDI output target + struct + { + HBITMAP image; + HDC hdc; + BITMAPINFO info; + BYTE *data; + } dib; + +}; + +DevicePtr *SelectDevice(Direct3DDeviceHandler d3d) +{ + DevicePtr *dev_ptr = (DevicePtr *)d3d; + D3DImageCache::SetCurrent(dev_ptr->image_cache); + D3DShaderPack::SetCurrent(dev_ptr->shader_pack); + D3DVertexBufferCache::SetCurrent(dev_ptr->vb_cache); + return dev_ptr; +} + +void DeleteDIBObjects(DevicePtr *dev_ptr) +{ + assert(dev_ptr != NULL); + if (dev_ptr->dib.image != NULL) + DeleteObject(dev_ptr->dib.image); + if (dev_ptr->dib.hdc != NULL) + DeleteDC(dev_ptr->dib.hdc); + ZeroMemory(&dev_ptr->dib, sizeof(dev_ptr->dib)); +} + +bool CreateDIBObjects(DevicePtr *dev_ptr) +{ + assert(dev_ptr != NULL); + if ((dev_ptr->dib.hdc = CreateCompatibleDC(NULL)) == NULL) + { + WRN("Failed to create compatible DC"); + return false; + } + ZeroMemory(&dev_ptr->dib.info, sizeof(dev_ptr->dib.info)); + dev_ptr->dib.info.bmiHeader.biSize = sizeof(dev_ptr->dib.info.bmiHeader); + dev_ptr->dib.info.bmiHeader.biBitCount = 32; + dev_ptr->dib.info.bmiHeader.biWidth = dev_ptr->device->GetWidth(); + dev_ptr->dib.info.bmiHeader.biHeight = -dev_ptr->device->GetHeight(); + dev_ptr->dib.info.bmiHeader.biCompression = BI_RGB; + dev_ptr->dib.info.bmiHeader.biPlanes = 1; + if ((dev_ptr->dib.image = CreateDIBSection(dev_ptr->dib.hdc, &dev_ptr->dib.info, + DIB_RGB_COLORS, (void **)&dev_ptr->dib.data, NULL, 0)) == NULL) + { + WRN("Failed to create dib section"); + DeleteDIBObjects(dev_ptr); + return false; + } + assert(dev_ptr->dib.data != NULL); + GdiFlush(); + return true; +} + + + + +extern "C" { + +Direct3DDeviceHandler evas_direct3d_init(HWND window, int depth, int fullscreen) +{ + Ref device = new D3DDevice(); + if (!device->Init(window, depth, fullscreen == 1)) + return NULL; + + D3DImageCache::SetCurrent(NULL); + D3DShaderPack::SetCurrent(NULL); + D3DVertexBufferCache::SetCurrent(NULL); + + if (!D3DShaderPack::Current()->Initialize(device)) + { + ERR("Failed to build shader pack"); + device->Destroy(); + return NULL; + } + + DevicePtr *dev_ptr = new DevicePtr; + ZeroMemory(dev_ptr, sizeof(DevicePtr)); + dev_ptr->device = device; + dev_ptr->scene = new D3DScene(); + dev_ptr->context = new D3DContext(); + dev_ptr->image_cache = D3DImageCache::Current(); + dev_ptr->shader_pack = D3DShaderPack::Current(); + dev_ptr->vb_cache = D3DVertexBufferCache::Current(); + dev_ptr->fonts_buffer_image_id = -1; + + D3DImageCache::CacheEntryInfo info; + if (!D3DImageCache::Current()->CreateImage(device, device->GetWidth(), device->GetHeight(), + true, info)) + { + WRN("Failed to create fonts image buffer"); + return NULL; + } + dev_ptr->fonts_buffer_image_id = info.id; + D3DImageCache::Current()->SetImageStage(info.id, 1); + + return (Direct3DDeviceHandler)dev_ptr; +} + +void +evas_direct3d_free(Direct3DDeviceHandler d3d) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + + DeleteDIBObjects(dev_ptr); + + dev_ptr->context = NULL; + dev_ptr->scene = NULL; + dev_ptr->image_cache = NULL; + dev_ptr->shader_pack = NULL; + D3DShaderPack::Current()->Uninitialize(); + D3DImageCache::Current()->Uninitialize(); + D3DVertexBufferCache::Current()->Uninitialize(); + D3DShaderPack::SetCurrent(NULL); + D3DImageCache::SetCurrent(NULL); + D3DVertexBufferCache::SetCurrent(NULL); + + dev_ptr->device = NULL; + delete dev_ptr; + + DBG("uninitialized"); +} + +void +evas_direct3d_resize(Direct3DDeviceHandler d3d, int width, int height) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DDevice *device = dev_ptr->device; + if (!device->Reset(width, height, -1)) + { + ERR("Failed to resize"); + return; + } + if (!D3DImageCache::Current()->ResizeImage(device, width, height, + dev_ptr->fonts_buffer_image_id)) + { + WRN("Failed to resize fonts image buffer"); + } + if (dev_ptr->layered) + { + DeleteDIBObjects(dev_ptr); + if (!CreateDIBObjects(dev_ptr)) + WRN("Failed to create dib objects"); + } +} + +void +evas_direct3d_set_fullscreen(Direct3DDeviceHandler d3d, int width, int height, int fullscreen) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DDevice *device = dev_ptr->device; + + if (width < 0) + width = ::GetSystemMetrics(SM_CXSCREEN); + if (height < 0) + height = ::GetSystemMetrics(SM_CYSCREEN); + + if (!device->Reset(width, height, fullscreen)) + { + WRN("Failed to resize"); + return; + } + if (!D3DImageCache::Current()->ResizeImage(device, width, height, + dev_ptr->fonts_buffer_image_id)) + { + WRN("Failed to resize fonts image buffer"); + } + + if (fullscreen == 0) + InvalidateRect(HWND_DESKTOP, NULL, TRUE); +} + +void +evas_direct3d_set_layered(Direct3DDeviceHandler d3d, int layered, + int mask_width, int mask_height, unsigned char *mask) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + dev_ptr->layered = (layered != 0); + dev_ptr->shape.width = mask_width; + dev_ptr->shape.height = mask_height; + dev_ptr->shape.mask = mask; + + if (dev_ptr->layered && dev_ptr->dib.data == NULL) + CreateDIBObjects(dev_ptr); + else if (!dev_ptr->layered) + DeleteDIBObjects(dev_ptr); +} + +void +evas_direct3d_context_color_set(Direct3DDeviceHandler d3d, int r, int g, int b, int a) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + dev_ptr->context->color = ((a & 0xff) << 24) | ((r & 0xff) << 16) | + ((g & 0xff) << 8) | (b & 0xff); +} + +void +evas_direct3d_context_set_multiplier(Direct3DDeviceHandler d3d, int r, int g, int b, int a) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + dev_ptr->context->color_mul = ((a & 0xff) << 24) | ((r & 0xff) << 16) | + ((g & 0xff) << 8) | (b & 0xff); +} + +void +evas_direct3d_render_all(Direct3DDeviceHandler d3d) +{ + DBG("render"); + assert(d3d != NULL); + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DDevice *device = dev_ptr->device; + D3DScene *scene = dev_ptr->scene; + + if (!device->Begin()) + return; + + device->GetDevice()->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + device->GetDevice()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + device->GetDevice()->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); + + //device->GetDevice()->SetSamplerState(1, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); + //device->GetDevice()->SetSamplerState(1, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); + + D3DObjectLine::BeginCache(); + D3DObjectRect::BeginCache(); + D3DObjectImage::BeginCache(); + scene->DrawAll(device); + D3DObjectLine::EndCache(device); + D3DObjectRect::EndCache(device); + D3DObjectImage::EndCache(device); + D3DObjectFont::EndCache(device); + + device->End(); + + if (dev_ptr->layered && !device->GetFullscreen() && dev_ptr->dib.data != NULL) + { + HDC hdc = GetDC(device->GetWindow()); + if (hdc != NULL) + { + POINT dest = {0, 0}; + POINT src = {0, 0}; + SIZE client = {device->GetWidth(), device->GetHeight()}; + BLENDFUNCTION blend_func = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA}; + + if (device->GetRenderData().Length() == client.cx * client.cy) + { + CopyMemory(dev_ptr->dib.data, device->GetRenderData().Data(), + sizeof(DWORD) * client.cx * client.cy); + } + + for (int i = 0; i < client.cy; i++) + { + for (int j = 0; j < client.cx; j++) + { + int mask_i = int(dev_ptr->shape.height * float(i) / float(client.cy)); + int mask_j = int(dev_ptr->shape.width * float(j) / float(client.cx)); + if (mask_i < 0) + mask_i = 0; + else if (mask_i >= dev_ptr->shape.height) + mask_i = dev_ptr->shape.height - 1; + if (mask_j < 0) + mask_j = 0; + else if (mask_j >= dev_ptr->shape.width) + mask_j = dev_ptr->shape.width - 1; + BYTE mask_b = dev_ptr->shape.mask[mask_i * dev_ptr->shape.width + mask_j]; + float alpha = float(mask_b) / 255.f; + + dev_ptr->dib.data[j * 4 + 0 + i * 4 * client.cx] = BYTE(float(dev_ptr->dib.data[j * 4 + 0 + i * 4 * client.cx]) * alpha); + dev_ptr->dib.data[j * 4 + 1 + i * 4 * client.cx] = BYTE(float(dev_ptr->dib.data[j * 4 + 1 + i * 4 * client.cx]) * alpha); + dev_ptr->dib.data[j * 4 + 2 + i * 4 * client.cx] = BYTE(float(dev_ptr->dib.data[j * 4 + 2 + i * 4 * client.cx]) * alpha); + dev_ptr->dib.data[j * 4 + 3 + i * 4 * client.cx] = mask_b; + } + } + HGDIOBJ prev_obj = SelectObject(dev_ptr->dib.hdc, dev_ptr->dib.image); + ClientToScreen(device->GetWindow(), &dest); + + UpdateLayeredWindow(device->GetWindow(), hdc, &dest, &client, + dev_ptr->dib.hdc, &src, 0, &blend_func, ULW_ALPHA); + + SelectObject(dev_ptr->dib.hdc, prev_obj); + ReleaseDC(device->GetWindow(), hdc); + } + } + scene->FreeObjects(); +} + +void evas_direct3d_line_draw(Direct3DDeviceHandler d3d, int x1, int y1, int x2, int y2) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DDevice *device = dev_ptr->device; + D3DScene *scene = dev_ptr->scene; + D3DContext *context = dev_ptr->context; + + Ref line = scene->GetFreeObject(); + if (line == NULL) + { + line = new D3DObjectLine(); + scene->AddObject(line); + DBG("New line object (total objects: %d)", scene->GetObjectCount()); + } + else + { + line->SetFree(false); + DBG("Line reused (object: %p)", line.Addr()); + } + + line->Setup( + 2.f * float(x1) / float(device->GetWidth()) - 1.f, + 2.f * (1.f - float(y1) / float(device->GetHeight())) - 1.f, + 2.f * float(x2) / float(device->GetWidth()) - 1.f, + 2.f * (1.f - float(y2) / float(device->GetHeight())) - 1.f, + context->color); +} + +void evas_direct3d_rectangle_draw(Direct3DDeviceHandler d3d, int x, int y, int w, int h) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DDevice *device = dev_ptr->device; + D3DScene *scene = dev_ptr->scene; + D3DContext *context = dev_ptr->context; + + Ref rect = scene->GetFreeObject(); + if (rect == NULL) + { + rect = new D3DObjectRect(); + scene->AddObject(rect); + DBG("New rect object (total objects: %d)", scene->GetObjectCount()); + } + else + { + rect->SetFree(false); + DBG("Rect reused (object: %p)", rect.Addr()); + } + + rect->Setup( + 2.f * float(x) / float(device->GetWidth()) - 1.f, + 2.f * (1.f - float(y) / float(device->GetHeight())) - 1.f, + 2.f * float(w) / float(device->GetWidth()), + -2.f * float(h) / float(device->GetHeight()), + context->color); +} + +Direct3DImageHandler evas_direct3d_image_load(Direct3DDeviceHandler d3d, + const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DDevice *device = dev_ptr->device; + D3DScene *scene = dev_ptr->scene; + + RGBA_Image *evas_image = evas_common_load_image_from_file(file, key, lo); + if (evas_image == NULL) + { + WRN("Failed to load image from %s", file); + return NULL; + } + int image_width = evas_image->cache_entry.w; + int image_height = evas_image->cache_entry.h; + assert(image_width > 0 && image_height > 0); + + D3DImageCache::CacheEntryInfo info; + ZeroMemory(&info, sizeof(info)); + info.id = -1; + + Ref image = new D3DObjectImage(); + image->Init(info.u, info.v, info.du, info.dv, info.id, + info.width, info.height, evas_image->cache_entry.file); + image->SetFree(true); + scene->AddObject(image); + + DBG("New image object (total objects: %d)", scene->GetObjectCount()); + + ImagePtr *ptr = new ImagePtr; + ptr->ref = image; + ptr->img = evas_image; + + return (Direct3DImageHandler)ptr; +} + +Direct3DImageHandler evas_direct3d_image_new_from_data(Direct3DDeviceHandler d3d, + int w, int h, DWORD *image_data, int alpha, int cspace) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DDevice *device = dev_ptr->device; + D3DScene *scene = dev_ptr->scene; + + int image_width = w; + int image_height = h; + assert(image_width > 0 && image_height > 0); + + Ref image = new D3DObjectImage(); + + D3DImageCache::CacheEntryInfo info; + ZeroMemory(&info, sizeof(info)); + if (!D3DImageCache::Current()->InsertImage(device, image_data, + image_width, image_height, info)) + { + WRN("Couldnt add image to the cache"); + return NULL; + } + char buf[64]; + sprintf(buf, "%p", image_data); + image->Init(info.u, info.v, info.du, info.dv, info.id, + info.width, info.height, buf); + + image->SetFree(true); + scene->AddObject(image); + + DBG("New image object (total objects: %d)", scene->GetObjectCount()); + + ImagePtr *ptr = new ImagePtr; + ptr->ref = image; + ptr->img = NULL; + + return (Direct3DImageHandler)ptr; +} + +Direct3DImageHandler evas_direct3d_image_new_from_copied_data(Direct3DDeviceHandler d3d, + int w, int h, DWORD *image_data, int alpha, int cspace) +{ + return evas_direct3d_image_new_from_data(d3d, w, h, image_data, alpha, cspace); +} + +void evas_direct3d_image_free(Direct3DDeviceHandler d3d, Direct3DImageHandler image) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DDevice *device = dev_ptr->device; + D3DScene *scene = dev_ptr->scene; + + ImagePtr *ptr = (ImagePtr *)image; + + Ref image_ref = ptr->ref; + assert(!image_ref.IsNull()); + scene->DeleteObject(image_ref); + + delete ptr; +} + +void evas_direct3d_image_data_put(Direct3DDeviceHandler d3d, Direct3DImageHandler image, + DWORD *image_data) +{ + ImagePtr *ptr = (ImagePtr *)image; + Ref image_ref = ptr->ref; + //assert(!image_ref.IsNull()); + if (image_ref.IsNull()) + return; + + if (!image_ref->UpdateImageData(image_data)) + ERR("Failed to update image data"); +} + +void evas_direct3d_image_data_get(Direct3DDeviceHandler d3d, Direct3DImageHandler image, + int to_write, DATA32 **image_data) +{ + ImagePtr *ptr = (ImagePtr *)image; + Ref image_ref = ptr->ref; + if (image_ref.IsNull()) + return; + if (image_data == NULL) + return; + assert(sizeof(DATA32) == sizeof(DWORD)); + *image_data = (DATA32 *)image_ref->GetImageData(); +} + +void evas_direct3d_image_draw(Direct3DDeviceHandler d3d, Direct3DImageHandler image, + int src_x, int src_y, int src_w, int src_h, + int dst_x, int dst_y, int dst_w, int dst_h, int smooth) +{ + ImagePtr *ptr = (ImagePtr *)image; + Ref image_ref = ptr->ref; + RGBA_Image *evas_image = ptr->img; + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DDevice *device = dev_ptr->device; + D3DScene *scene = dev_ptr->scene; + //assert(!image_ref.IsNull()); + if (image_ref.IsNull()) + return; + + if (!image_ref->IsValid()) + { + TArray images; + scene->GetObjectsOfType(images); + bool found = false; + for (int i = 0; i < images.Length(); i++) + { + if (images[i]->IsValid() && + _stricmp(images[i]->GetSource(), image_ref->GetSource()) == 0) + { + images[i]->CopyTo(image_ref); + found = true; + WRN("Image object info reused, source: \"%s\"", image_ref->GetSource()); + break; + } + } + if (!found && evas_image != NULL) + evas_cache_image_load_data(&evas_image->cache_entry); + } + + // If the image object wasn't initialized yet + if (evas_image != NULL && evas_image->image.data != NULL && !image_ref->IsValid()) + { + D3DImageCache::CacheEntryInfo info; + ZeroMemory(&info, sizeof(info)); + if (!D3DImageCache::Current()->InsertImage(device, (DWORD *)evas_image->image.data, + evas_image->cache_entry.w, evas_image->cache_entry.h, info)) + { + WRN("Couldnt add image to the cache"); + return; + } + image_ref->Init(info.u, info.v, info.du, info.dv, info.id, + info.width, info.height, evas_image->cache_entry.file); + } + + // Do not draw invalid objects + if (!image_ref->IsValid()) + { + image_ref->SetFree(true); + return; + } + + image_ref->Setup( + 2.f * float(dst_x) / float(device->GetWidth()) - 1.f, + 2.f * (1.f - float(dst_y) / float(device->GetHeight())) - 1.f, + 2.f * float(dst_w) / float(device->GetWidth()), + -2.f * float(dst_h) / float(device->GetHeight()), + src_x, src_y, src_w, src_h); + + image_ref->SetupColorFilter(dev_ptr->context->color_mul); + + image_ref->SetFree(false); +} + +void evas_direct3d_image_size_get(Direct3DImageHandler image, int *w, int *h) +{ + ImagePtr *ptr = (ImagePtr *)image; + if (ptr == NULL) + return; + if (ptr->img != NULL) + { + if (w != NULL) + *w = ptr->img->cache_entry.w; + if (h != NULL) + *h = ptr->img->cache_entry.h; + } + else if (!ptr->ref.IsNull()) + { + if (w != NULL) + *w = ptr->ref->GetWidth(); + if (h != NULL) + *h = ptr->ref->GetHeight(); + } +} + +void evas_direct3d_image_border_set(Direct3DDeviceHandler d3d, Direct3DImageHandler image, + int l, int r, int t, int b) +{ + ImagePtr *ptr = (ImagePtr *)image; + Ref image_ref = ptr->ref; + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DDevice *device = dev_ptr->device; + if (image_ref.IsNull()) + return; + + int im_w, im_h; + if (ptr->img != NULL) + { + im_w = ptr->img->cache_entry.w; + im_h = ptr->img->cache_entry.h; + } + else + { + im_w = image_ref->GetWidth(); + im_h = image_ref->GetHeight(); + } + + image_ref->SetupBorder( + D3DXVECTOR4( + 2.f * float(l) / float(device->GetWidth()), + -2.f * float(t) / float(device->GetHeight()), + 2.f * float(r) / float(device->GetWidth()), + -2.f * float(b) / float(device->GetHeight())), + D3DXVECTOR4(float(l) / float(im_w), + float(t) / float(im_h), + float(r) / float(im_w), + float(b) / float(im_h))); +} + +void evas_direct3d_image_border_get(Direct3DDeviceHandler d3d, Direct3DImageHandler image, + int *l, int *r, int *t, int *b) +{ + ImagePtr *ptr = (ImagePtr *)image; + Ref image_ref = ptr->ref; + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DDevice *device = dev_ptr->device; + if (image_ref.IsNull()) + return; + assert(l != NULL && r != NULL && b != NULL && t != NULL); + *l = (int)(0.5f * image_ref->GetBorderLeft() * device->GetWidth()); + *r = (int)(0.5f * image_ref->GetBorderRight() * device->GetWidth()); + *t = (int)(-0.5f * image_ref->GetBorderTop() * device->GetHeight()); + *b = (int)(-0.5f * image_ref->GetBorderBottom() * device->GetHeight()); +} + + +Direct3DFontGlyphHandler evas_direct3d_font_texture_new(Direct3DDeviceHandler d3d, + RGBA_Font_Glyph *fg) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DContext *context = dev_ptr->context; + D3DDevice *device = dev_ptr->device; + + if (context->font.IsNull()) + return NULL; + + D3DObjectFont *font = (D3DObjectFont *)context->font.Addr(); + // This is not reliable + //D3DObjectFont::Glyph *glyph = (D3DObjectFont::Glyph *)fg->ext_dat; + D3DObjectFont::Glyph *glyph = font->GetGlyph(fg); + if (glyph != NULL) + { + assert(glyph->Compare(fg)); + return glyph; + } + glyph = font->AddGlyph(device, fg, fg->glyph_out->bitmap.buffer, + fg->glyph_out->bitmap.width, fg->glyph_out->bitmap.rows, fg->glyph_out->bitmap.pitch); + return (Direct3DFontGlyphHandler)glyph; +} + +void evas_direct3d_font_texture_free(Direct3DFontGlyphHandler ft) +{ + if (ft == NULL) + return; + D3DObjectFont::Glyph *glyph = (D3DObjectFont::Glyph *)ft; + RGBA_Font_Glyph *fg = (RGBA_Font_Glyph *)glyph->Source(); + fg->ext_dat = NULL; +} + +void evas_direct3d_font_texture_draw(Direct3DDeviceHandler d3d, void *, void *, + RGBA_Font_Glyph *fg, int x, int y) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DContext *context = dev_ptr->context; + D3DDevice *device = dev_ptr->device; + + if (context->font.IsNull()) + return; + + D3DObjectFont *font = (D3DObjectFont *)context->font.Addr(); + D3DObjectFont::Glyph *glyph = (D3DObjectFont::Glyph *)fg->ext_dat; + if (glyph == NULL) + return; + assert(glyph->Compare(fg)); + + font->SetColor(context->color); + font->PushForDraw(glyph, x, y); + font->SetFree(false); +} + +void evas_direct3d_select_or_create_font(Direct3DDeviceHandler d3d, void *font) +{ + // The Plan + // 1. Create D3DObjectFont with source string = "%p" (font) + // 2. Or find this object in the scene + // 3. On each texture_new call - fill internal texture with glyph, remember the + // glyph pointer - we'll use it. + + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DContext *context = dev_ptr->context; + + if (!context->font.IsNull() && ((D3DObjectFont *)context->font.Addr())->Compare(font)) + return; + + D3DScene *scene = dev_ptr->scene; + + static TArray fonts; + scene->GetObjectsOfType(fonts); + for (int i = 0; i < fonts.Length(); i++) + { + if (fonts[i]->Compare(font)) + { + context->font = fonts[i]; + return; + } + } + + D3DDevice *device = dev_ptr->device; + + assert(dev_ptr->fonts_buffer_image_id >= 0); + + Ref new_font = new D3DObjectFont(font, dev_ptr->fonts_buffer_image_id); + scene->AddObject(new_font); + context->font = new_font; +} + +void evas_direct3d_font_free(Direct3DDeviceHandler d3d, void *font) +{ + DevicePtr *dev_ptr = SelectDevice(d3d); + D3DContext *context = dev_ptr->context; + D3DScene *scene = dev_ptr->scene; + + if (context->font.IsNull() || !((D3DObjectFont *)context->font.Addr())->Compare(font)) + { + D3DScene *scene = dev_ptr->scene; + + static TArray fonts; + scene->GetObjectsOfType(fonts); + for (int i = 0; i < fonts.Length(); i++) + { + if (fonts[i]->Compare(font)) + { + context->font = fonts[i]; + break; + } + } + } + + scene->DeleteObject(context->font); + context->font = NULL; +} + + +} // extern "C" diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object.cpp new file mode 100644 index 0000000..15a801e --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object.cpp @@ -0,0 +1,12 @@ + +#include "evas_direct3d_object.h" + +D3DObject::D3DObject() +{ + _free = false; +} + +D3DObject::~D3DObject() +{ +} + diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object.h new file mode 100644 index 0000000..8c4e6df --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object.h @@ -0,0 +1,35 @@ +#ifndef __EVAS_DIRECT3D_OBJECT_H__ +#define __EVAS_DIRECT3D_OBJECT_H__ + +#include "evas_engine.h" + +#include "ref.h" + +class D3DDevice; + +class D3DObject : virtual public Referenc +{ +public: + D3DObject(); + virtual ~D3DObject(); + + virtual void Draw(D3DDevice *d3d) = 0; + + inline bool IsFree(); + inline void SetFree(bool state); + +private: + bool _free; +}; + +bool D3DObject::IsFree() +{ + return _free; +} + +void D3DObject::SetFree(bool state) +{ + _free = state; +} + +#endif // __EVAS_DIRECT3D_OBJECT_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.cpp new file mode 100644 index 0000000..f072e87 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.cpp @@ -0,0 +1,231 @@ +//#define ENABLE_LOG_PRINTF + +#include + +#include "evas_direct3d_object_font.h" +#include "evas_direct3d_image_cache.h" +#include "evas_direct3d_device.h" +#include "evas_direct3d_shader_pack.h" +#include "evas_direct3d_vertex_buffer_cache.h" + +D3DObjectFont::Cache D3DObjectFont::_cache; + +D3DObjectFont::D3DObjectFont(void *source, int image_id) +{ + _image_id = image_id; + _color = 0xff000000; + _source = source; + D3DImageCache::Current()->AddImageUser(_image_id); +} + +D3DObjectFont::~D3DObjectFont() +{ + D3DImageCache::Current()->RemoveImageUser(_image_id); +} + +void D3DObjectFont::CopyTo(D3DObjectFont *font) +{ + assert(font != NULL); + font->_image_id = _image_id; + font->_source = _source; + D3DImageCache::Current()->AddImageUser(font->_image_id); + _glyphs.CopyTo(font->_glyphs); +} + +void D3DObjectFont::BeginCache(int image_id) +{ + if (_cache.enabled) + return; + int w = D3DImageCache::Current()->GetImageWidth(image_id); + int h = D3DImageCache::Current()->GetImageHeight(image_id); + _cache.enabled = true; + _cache.image_id = image_id; + _cache.data.Allocate(w * h); + + if (_cache.dirty.Length() != h) + { + _cache.dirty.Allocate(h); + memset(_cache.dirty.Data(), 0xff, sizeof(POINT) * _cache.dirty.Length()); + } + + ZeroMemory(_cache.data.Data(), sizeof(DWORD) * _cache.data.Length()); + _cache.width = w; + _cache.height = h; + + _cache.valid_rect.left = w; + _cache.valid_rect.right = 0; + _cache.valid_rect.top = h; + _cache.valid_rect.bottom = 0; +} + +void D3DObjectFont::Draw(D3DDevice *d3d) +{ + assert(_cache.image_id == _image_id); +} + +void D3DObjectFont::EndCache(D3DDevice *d3d) +{ + if (!_cache.enabled) + return; + _cache.enabled = false; + + if (_cache.data.Length() == 0) + return; + + D3DImageCache::CacheEntryInfo info; + ZeroMemory(&info, sizeof(info)); + info.id = _cache.image_id; + info.width = _cache.width; + info.height = _cache.height; + if (!D3DImageCache::Current()->UpdateImageDataWithDirtyInfo(info, + _cache.data.Data(), _cache.dirty.Data())) + //if (!D3DImageCache::Current()->UpdateImageDataDiscard(info, _cache.data.Data())); + { + return; + } + + D3DShaderPack::Current()->SetVDecl(d3d, D3DShaderPack::VDECL_XYUV); + D3DShaderPack::Current()->SetVS(d3d, D3DShaderPack::VS_COPY_UV); + D3DShaderPack::Current()->SetPS(d3d, D3DShaderPack::PS_TEX_2); // This image is in s1 + D3DImageCache::Current()->SelectImageToDevice(d3d, _cache.image_id); + + const FLOAT half_x = 0.5f / FLOAT(_cache.width); + const FLOAT half_y = 0.5f / FLOAT(_cache.height); + FLOAT left = FLOAT(_cache.valid_rect.left - 5) / FLOAT(_cache.width), + top = FLOAT(_cache.valid_rect.top - 5) / FLOAT(_cache.height), + right = FLOAT(_cache.valid_rect.right + 5) / FLOAT(_cache.width), + bottom = FLOAT(_cache.valid_rect.bottom + 5) / FLOAT(_cache.height); + + const Vertex data[6] = { + {left * 2 - 1, 2 * (1 - bottom) - 1, left + half_x, bottom + half_y}, + {left * 2 - 1, 2 * (1 - top) - 1, left + half_x, top + half_y}, + {right * 2 - 1, 2 * (1 - bottom) - 1, right + half_x, bottom + half_y}, + {right * 2 - 1, 2 * (1 - bottom) - 1, right + half_x, bottom + half_y}, + {left * 2 - 1, 2 * (1 - top) - 1, left + half_x, top + half_y}, + {right * 2 - 1, 2 * (1 - top) - 1, right + half_x, top + half_y}}; + + d3d->GetDevice()->DrawPrimitiveUP(D3DPT_TRIANGLELIST, 2, data, sizeof(Vertex)); + + //D3DImageCache::Current()->UpdateImageDataWithDirtyInfo(info, NULL, _cache.dirty.Data()); +} + +D3DObjectFont::Glyph *D3DObjectFont::GetGlyph(void *source) +{ + if (_image_id < 0) + { + WRN("Font is not initialized"); + return NULL; + } + for (int i = 0; i < _glyphs.Length(); i++) + { + if (_glyphs[i]->Compare(source)) + return _glyphs[i]; + } + return NULL; +} + +D3DObjectFont::Glyph *D3DObjectFont::AddGlyph(D3DDevice *d3d, void *source, + BYTE *data8, int width, int height, int pitch) +{ + if (_image_id < 0) + { + WRN("Font is not initialized"); + return NULL; + } + for (int i = 0; i < _glyphs.Length(); i++) + { + if (_glyphs[i]->Compare(source)) + return _glyphs[i]; + } + Ref glyph = new Glyph(source); + glyph->_data.Allocate(width * height); + glyph->_width = width; + glyph->_height = height; + + for (int i = 0; i < height; i++) + CopyMemory(&glyph->_data[i * width], &data8[i * pitch], width); + + Log("Glyph added (%p) (%dx%d)", source, width, height); + _glyphs.Add(glyph); + return _glyphs.Last()->Addr(); +} + +void D3DObjectFont::PushForDraw(Glyph *glyph, int x, int y) +{ + BeginCache(_image_id); + + // Uff, I'm not sure about multiple windows... + +#define LERP(a, b, t1, t2) (BYTE)(FLOAT(a) * (t1) + FLOAT(b) * (t2)) + + Color dc, sc; + FLOAT a; + sc.color = _color; + + const FLOAT color_alpha = sc.Alpha(); + + DWORD *data = _cache.data.Data(); + BYTE *gdata = glyph->_data.Data(); + const int glyph_height = glyph->_height; + const int cache_height = _cache.height; + const int glyph_width = glyph->_width; + const int cache_width = _cache.width; + + for (int i = 0, yi = y; i < glyph_height && yi < cache_height; i++, yi++) + { + if (yi < 0) + continue; + DWORD *dst = data + ((yi) * cache_width + x); + BYTE *src = gdata + (i * glyph_width); + POINT *dirty_yi = &_cache.dirty[yi]; + + if (_cache.valid_rect.top > yi) + _cache.valid_rect.top = yi; + if (_cache.valid_rect.bottom < yi) + _cache.valid_rect.bottom = yi; + + for (int j = 0, xj = x; j < glyph_width && xj < cache_width; j++, xj++, dst++, src++) + { + if (xj < 0) + continue; + BYTE glyph_pix = *src; + if (glyph_pix == 0) + continue; + + if (dirty_yi->x >= 0 && dirty_yi->y < 0) + dirty_yi->x = 0, dirty_yi->y = cache_width - 1; + else + { + if (dirty_yi->x < 0 || dirty_yi->x > xj) + dirty_yi->x = xj; + if (dirty_yi->y < 0 || dirty_yi->y < xj) + dirty_yi->y = xj; + } + + if (_cache.valid_rect.left > xj) + _cache.valid_rect.left = xj; + if (_cache.valid_rect.right < xj) + _cache.valid_rect.right = xj; + + if (glyph_pix == 0xff && sc.a == 0xff) + { + *dst = sc.color; + continue; + } + a = FLOAT(glyph_pix) * color_alpha / 255.f; + if (*dst == 0) + { + *dst = (BYTE(255.f * a) << 24) | (0x00ffffff & sc.color); + continue; + } + + dc.color = *dst; + + dc.r = LERP(dc.r, sc.r, 1 - a, a); + dc.g = LERP(dc.g, sc.g, 1 - a, a); + dc.b = LERP(dc.b, sc.b, 1 - a, a); + dc.a = max(dc.a, BYTE(255.f * a)); + *dst = dc.color; + } + } +} diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.h new file mode 100644 index 0000000..e8c0196 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.h @@ -0,0 +1,113 @@ +#ifndef __EVAS_DIRECT3D_OBJECT_FONT_H__ +#define __EVAS_DIRECT3D_OBJECT_FONT_H__ + +#include "evas_engine.h" + +#include "ref.h" +#include "array.h" + +#include "evas_direct3d_object.h" + +class D3DObjectFont : public D3DObject +{ +public: + + class Glyph : public Referenc + { + public: + Glyph(void *source) + : _source(source), _width(0), _height(0) {}; + + bool Compare(void *source) + { + return (_source == source); + } + void *Source() + { + return _source; + } + + private: + friend class D3DObjectFont; + void *_source; + TArray _data; + int _width; + int _height; + }; + +public: + D3DObjectFont(void *source, int image_id); + ~D3DObjectFont(); + + inline bool Compare(void *source); + void CopyTo(D3DObjectFont *font); + + virtual void Draw(D3DDevice *d3d); + static void EndCache(D3DDevice *d3d); + + inline void SetColor(DWORD color); + + Glyph *GetGlyph(void *source); + Glyph *AddGlyph(D3DDevice *d3d, void *source, BYTE *data8, int width, int height, int pitch); + void PushForDraw(Glyph *glyph, int x, int y); + +protected: + static void BeginCache(int image_id); + +private: + struct Vertex + { + FLOAT x, y; + FLOAT u, v; + }; + + struct Color + { + union + { + struct + { + BYTE b, g, r, a; + }; + DWORD color; + }; + + FLOAT Alpha() { return FLOAT(a) / 255.f; } + }; + + class Cache + { + public: + Cache() + : enabled(false), image_id(-1), width(0), height(0) {}; + public: + TArray data; + TArray dirty; // Start, End + bool enabled; + int image_id; + int width; + int height; + RECT valid_rect; + }; + +private: + DWORD _color; + void *_source; + int _image_id; + + TArray > _glyphs; + + static Cache _cache; +}; + +bool D3DObjectFont::Compare(void *source) +{ + return (_source == source); +} + +void D3DObjectFont::SetColor(DWORD color) +{ + _color = color; +} + +#endif // __EVAS_DIRECT3D_OBJECT_FONT_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_image.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_image.cpp new file mode 100644 index 0000000..3bfbe1e --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_image.cpp @@ -0,0 +1,320 @@ +//#define ENABLE_LOG_PRINTF + +#include + +#include + +#include "evas_direct3d_object_image.h" +#include "evas_direct3d_image_cache.h" +#include "evas_direct3d_device.h" +#include "evas_direct3d_shader_pack.h" +#include "evas_direct3d_vertex_buffer_cache.h" + +TArray D3DObjectImage::_cache; +bool D3DObjectImage::_cache_enabled = false; + +D3DObjectImage::D3DObjectImage() +{ + _x = _y = _w = _h = 0; + _sx = _sy = _sw = _sh = 0; + _u = _v = _du = _dv = 0; + _image_id = -1; + _width = _height = 0; + _source[0] = 0; + _color = 0xffffffff; + _cache_i = 0; + _border = D3DXVECTOR4(0, 0, 0, 0); + _uvborder = D3DXVECTOR4(0, 0, 0, 0); + _with_border = false; + _dirty = false; + _image_data_updated = false; +} + +D3DObjectImage::~D3DObjectImage() +{ + D3DImageCache::Current()->RemoveImageUser(_image_id); +} + +void D3DObjectImage::CopyTo(D3DObjectImage *image) +{ + assert(image != NULL); + image->_u = _u; + image->_v = _v; + image->_du = _du; + image->_dv = _dv; + image->_image_id = _image_id; + image->_width = _width; + image->_height = _height; + CopyMemory(image->_source, _source, sizeof(_source)); + D3DImageCache::Current()->AddImageUser(image->_image_id); +} + +void D3DObjectImage::BeginCache() +{ + _cache.Allocate(0); + _cache_enabled = true; +} + +void D3DObjectImage::EndCache(D3DDevice *d3d) +{ + if (!_cache_enabled || _cache.Length() == 0) + return; + D3DShaderPack::Current()->SetVDecl(d3d, D3DShaderPack::VDECL_XYUVC); + D3DShaderPack::Current()->SetVS(d3d, D3DShaderPack::VS_COPY_UV_COLOR); + D3DShaderPack::Current()->SetPS(d3d, D3DShaderPack::PS_TEX_COLOR_FILTER); + + static TArray sorted; + static TArray groups; + sorted.Allocate(0); + groups.Allocate(0); + + bool found = true; + while (found) + { + found = false; + int cur_id = -1; + int num = 0; + for (int i = 0; i < _cache.Length(); i++) + { + // We have processed this + if (_cache[i]->_image_id < 0) + continue; + found = true; + if (cur_id < 0) + cur_id = _cache[i]->_image_id; + if (_cache[i]->_image_id == cur_id) + { + if (!_cache[i]->_with_border) + { + Vertex *data = _cache[i]->MakeData(); + sorted.Add(data[0]); + sorted.Add(data[1]); + sorted.Add(data[2]); + sorted.Add(data[3]); + sorted.Add(data[4]); + sorted.Add(data[5]); + _cache[i]->_image_id = -_cache[i]->_image_id - 1; + num++; + } + else + { + Vertex *data = _cache[i]->MakeDataBorder(); + int last_len = sorted.Length(); + sorted.Allocate(last_len + 6 * 9); + CopyMemory(&sorted[last_len], data, sizeof(Vertex) * 6 * 9); + _cache[i]->_image_id = -_cache[i]->_image_id - 1; + num += 9; + } + } + } + if (num > 0) + { + GroupDesc gd = {num, cur_id}; + groups.Add(gd); + } + } + + // Restore ids + for (int i = 0; i < _cache.Length(); i++) + _cache[i]->_image_id = -_cache[i]->_image_id - 1; + + D3DVertexBufferCache::CacheEntryInfo ce_info; + if (!D3DVertexBufferCache::Current()->InitBuffer(d3d, (BYTE *)sorted.Data(), + sorted.Length() * sizeof(Vertex), ce_info)) + { + return; + } + D3DVertexBufferCache::Current()->SelectBufferToDevice(d3d, ce_info.id, sizeof(Vertex)); + + HRESULT hr; + for (int i = 0, cur = 0; i < groups.Length(); i++) + { + if (FAILED(hr = D3DImageCache::Current()->SelectImageToDevice(d3d, groups[i].id))) + { + Log("Failed to select texture: %X", (DWORD)hr); + } +// d3d->GetDevice()->DrawPrimitiveUP(D3DPT_TRIANGLELIST, groups[i].num * 2, +// &sorted[cur], sizeof(Vertex)); + d3d->GetDevice()->DrawPrimitive(D3DPT_TRIANGLELIST, cur, groups[i].num * 2); + cur += groups[i].num * 6; + } + + DBG("Image cache drawn: %d items, %d groups", _cache.Length(), groups.Length()); + _cache_enabled = false; +} + +void D3DObjectImage::Draw(D3DDevice *d3d) +{ + _dirty = false; + + DBG("Image draw: (%.3f, %.3f, %.3f, %.3f)", _x, _y, _w, _h); + + if (_cache_enabled) + { + _cache.Add(this); + _cache_i = _cache.Length() - 1; + return; + } + + D3DShaderPack::Current()->SetVDecl(d3d, D3DShaderPack::VDECL_XYUVC); + D3DShaderPack::Current()->SetVS(d3d, D3DShaderPack::VS_COPY_UV_COLOR); + D3DShaderPack::Current()->SetPS(d3d, D3DShaderPack::PS_TEX_COLOR_FILTER); + D3DImageCache::Current()->SelectImageToDevice(d3d, _image_id); + + if (!_with_border) + d3d->GetDevice()->DrawPrimitiveUP(D3DPT_TRIANGLELIST, 2, MakeData(), sizeof(Vertex)); + else + d3d->GetDevice()->DrawPrimitiveUP(D3DPT_TRIANGLELIST, 18, MakeDataBorder(), sizeof(Vertex)); +} + +void D3DObjectImage::Init(FLOAT u, FLOAT v, FLOAT du, FLOAT dv, + int image_id, int width, int height, const char *source) +{ + _u = u; + _v = v; + _du = du; + _dv = dv; + _image_id = image_id; + _width = width; + _height = height; +#ifdef __MINGW32__ + strncpy(_source, source, sizeof(_source) - 1); +#else + strncpy_s(_source, sizeof(_source), source, sizeof(_source) - 1); +#endif // ! __MINGW32__ +} + +void D3DObjectImage::Setup(FLOAT x, FLOAT y, FLOAT w, FLOAT h, + int sx, int sy, int sw, int sh) +{ + if (!_dirty) + { + _x = 1.f; + _y = -1.f; + _w = _h = 0.f; + _sx = _sy = 1.f; + _sw = _sh = 0.f; + } + + if (!_with_border) + { + _x = x; + _y = y; + _w = w; + _h = h; + _sx = FLOAT(sx) / FLOAT(_width); + _sy = FLOAT(sy) / FLOAT(_height); + _sw = FLOAT(sw) / FLOAT(_width); + _sh = FLOAT(sh) / FLOAT(_height); + } + else + { + _x = min(_x, x); + _y = max(_y, y); + _w += w / 3; + _h += h / 3; + _sx = min(_sx, FLOAT(sx) / FLOAT(_width)); + _sy = min(_sy, FLOAT(sy) / FLOAT(_height)); + _sw += FLOAT(sw) / (3.f * FLOAT(_width)); + _sh += FLOAT(sh) / (3.f * FLOAT(_height)); + } + _dirty = true; + +} + +void D3DObjectImage::SetupColorFilter(DWORD color) +{ + //_color = ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); + _color = color; +} + +D3DObjectImage::Vertex *D3DObjectImage::MakeData() +{ + //FLOAT z = (FLOAT(_cache_i) + 0.5f) / _cache.Length(); + Vertex data[6] = { + {_x, _y, _u + _sx * _du, _v + _sy * _dv, _color}, + {_x + _w, _y, _u + (_sx + _sw) * _du, _v + _sy * _dv, _color}, + {_x, _y + _h, _u + _sx * _du, _v + (_sy + _sh) * _dv, _color}, + {_x, _y + _h, _u + _sx * _du, _v + (_sy + _sh) * _dv, _color}, + {_x + _w, _y, _u + (_sx + _sw) * _du, _v + _sy * _dv, _color}, + {_x + _w, _y + _h, _u + (_sx + _sw) * _du, _v + (_sy + _sh) * _dv, _color}}; + CopyMemory(_data, data, sizeof(data)); + return _data; +} + +D3DObjectImage::Vertex *D3DObjectImage::MakeDataBorder() +{ + //FLOAT z = (FLOAT(_cache_i) + 0.5f) / _cache.Length(); + if (_border.x + _border.z > _w) + _border.x = _border.z = _w / 2; + if (_border.y + _border.w < _h) + _border.y = _border.w = _h / 2; + + FLOAT ul, ut, ur, ub; + ul = _uvborder.x * _du; + ut = _uvborder.y * _dv; + ur = _uvborder.z * _du; + ub = _uvborder.w * _dv; + FLOAT bl, bt, br, bb; + bl = _border.x; + bt = _border.y; + br = _border.z; + bb = _border.w; + + const FLOAT half_x = 0.5f * _du / FLOAT(_width); + const FLOAT half_y = 0.5f * _dv / FLOAT(_height); + + // Diagonal knots + Vertex data[4] = { + {_x, _y, _u + _sx * _du + half_x, _v + _sy * _dv + half_y, _color}, + {_x + bl, _y + bt, _u + ul + _sx * _du, _v + ut + _sy * _dv, _color}, + {_x + _w - br, _y + _h - bb, _u - ur + (_sx + _sw) * _du, _v - ub + (_sy + _sh) * _dv, _color}, + {_x + _w, _y + _h, _u + (_sx + _sw) * _du - half_x, _v + (_sy + _sh) * _dv - half_y, _color}}; + + static const int yshift[6] = {0, 0, 1, 1, 0, 1}; + static const int xshift[6] = {0, 1, 0, 0, 1, 1}; + + int vi = 0; + for (int i = 0; i < 3; i++) + { + for (int j = 0; j < 3; j++) + { + for (int v = 0; v < 6; v++) + { + _data[vi].x = data[xshift[v] + j].x; + _data[vi].y = data[yshift[v] + i].y; + _data[vi].u = data[xshift[v] + j].u; + _data[vi].v = data[yshift[v] + i].v; + _data[vi].col = data[0].col; + vi++; + } + } + } + + return _data; +} + +void D3DObjectImage::SetupBorder(const D3DXVECTOR4 &world_border, const D3DXVECTOR4 &pix_border) +{ + _border = world_border; + _uvborder = pix_border; + _with_border = (_border.x > 0.0001f || _border.y > 0.0001f || + _border.z > 0.0001f || _border.w > 0.0001f); +} + +bool D3DObjectImage::UpdateImageData(DWORD *image_data) +{ + D3DImageCache::CacheEntryInfo info = {_image_id, _width, _height, _u, _v, _du, _dv}; + _image_data_updated = false; + return D3DImageCache::Current()->UpdateImageData(info, image_data); +} + +DWORD *D3DObjectImage::GetImageData() +{ + if (_image_data_updated) + return _image_data.Data(); + _image_data_updated = true; + D3DImageCache::CacheEntryInfo info = {_image_id, _width, _height, _u, _v, _du, _dv}; + D3DImageCache::Current()->GetImageData(info, _image_data); + return _image_data.Data(); +} diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_image.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_image.h new file mode 100644 index 0000000..379207b --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_image.h @@ -0,0 +1,127 @@ +#ifndef __EVAS_DIRECT3D_OBJECT_IMAGE_H__ +#define __EVAS_DIRECT3D_OBJECT_IMAGE_H__ + +#include "evas_engine.h" + +#include "ref.h" +#include "array.h" + +#include "evas_direct3d_object.h" + +class D3DObjectImage : public D3DObject +{ +public: + D3DObjectImage(); + virtual ~D3DObjectImage(); + + void CopyTo(D3DObjectImage *image); + + static void BeginCache(); + virtual void Draw(D3DDevice *d3d); + static void EndCache(D3DDevice *d3d); + + void Init(FLOAT u, FLOAT v, FLOAT du, FLOAT dv, int image_id, + int width, int height, const char *source); + void Setup(FLOAT x, FLOAT y, FLOAT w, FLOAT h, + int sx, int sy, int sw, int sh); + void SetupColorFilter(DWORD color); + void SetupBorder(const D3DXVECTOR4 &world_border, const D3DXVECTOR4 &pix_border); + + inline bool IsValid(); + inline const char *GetSource(); + inline int GetWidth(); + inline int GetHeight(); + inline FLOAT GetBorderLeft(); + inline FLOAT GetBorderRight(); + inline FLOAT GetBorderTop(); + inline FLOAT GetBorderBottom(); + + bool UpdateImageData(DWORD *image_data); + DWORD *GetImageData(); + +private: + struct Vertex + { + FLOAT x, y; + FLOAT u, v; + D3DCOLOR col; + }; + + struct GroupDesc + { + int num; + int id; + }; + +private: + Vertex *MakeData(); + Vertex *MakeDataBorder(); + +private: + FLOAT _x, _y, _w, _h; + FLOAT _sx, _sy, _sw, _sh; + D3DXVECTOR4 _border; + D3DXVECTOR4 _uvborder; + + FLOAT _u, _v, _du, _dv; + int _image_id; + int _width, _height; + + D3DCOLOR _color; + int _cache_i; + bool _with_border; + bool _dirty; + + TArray _image_data; + bool _image_data_updated; + + char _source[256]; + + Vertex _data[54]; + + static TArray _cache; + static bool _cache_enabled; +}; + +bool D3DObjectImage::IsValid() +{ + return _image_id >= 0 && _width > 0 && _height > 0; +} + +const char *D3DObjectImage::GetSource() +{ + return _source; +} + +int D3DObjectImage::GetWidth() +{ + return _width; +} + +int D3DObjectImage::GetHeight() +{ + return _height; +} + +FLOAT D3DObjectImage::GetBorderLeft() +{ + return _border.x; +} + +FLOAT D3DObjectImage::GetBorderRight() +{ + return _border.z; +} + +FLOAT D3DObjectImage::GetBorderTop() +{ + return _border.y; +} + +FLOAT D3DObjectImage::GetBorderBottom() +{ + return _border.w; +} + + +#endif // __EVAS_DIRECT3D_OBJECT_IMAGE_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_line.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_line.cpp new file mode 100644 index 0000000..9442243 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_line.cpp @@ -0,0 +1,60 @@ + +#include "evas_direct3d_object_line.h" +#include "evas_direct3d_device.h" +#include "evas_direct3d_shader_pack.h" + +TArray D3DObjectLine::_cache; +bool D3DObjectLine::_cache_enabled = false; + +D3DObjectLine::D3DObjectLine() +{ + _x1 = _y1 = 0; + _x2 = _y2 = 0; +} + +void D3DObjectLine::BeginCache() +{ + _cache.Allocate(0); + _cache_enabled = true; +} + +void D3DObjectLine::EndCache(D3DDevice *d3d) +{ + if (!_cache_enabled || _cache.Length() == 0) + return; + D3DShaderPack::Current()->SetVDecl(d3d, D3DShaderPack::VDECL_XYC); + D3DShaderPack::Current()->SetVS(d3d, D3DShaderPack::VS_COPY_COLOR); + D3DShaderPack::Current()->SetPS(d3d, D3DShaderPack::PS_COLOR); + d3d->GetDevice()->DrawPrimitiveUP(D3DPT_LINELIST, _cache.Length() / 2, + _cache.Data(), sizeof(Vertex)); + + DBG("Line cache drawn: %d items", _cache.Length() / 2); + _cache_enabled = false; +} + +void D3DObjectLine::Draw(D3DDevice *d3d) +{ + Vertex data[2] = {{_x1, _y1, _color}, {_x2, _y2, _color}}; + + if (!_cache_enabled) + { + D3DShaderPack::Current()->SetVDecl(d3d, D3DShaderPack::VDECL_XYC); + D3DShaderPack::Current()->SetVS(d3d, D3DShaderPack::VS_COPY_COLOR); + D3DShaderPack::Current()->SetPS(d3d, D3DShaderPack::PS_COLOR); + d3d->GetDevice()->DrawPrimitiveUP(D3DPT_LINELIST, 1, data, sizeof(Vertex)); + } + else + { + _cache.Add(data[0]); + _cache.Add(data[1]); + } +} + +void D3DObjectLine::Setup(FLOAT x1, FLOAT y1, FLOAT x2, FLOAT y2, DWORD color) +{ + _x1 = x1; + _y1 = y1; + _x2 = x2; + _y2 = y2; + _color = color; +} diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_line.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_line.h new file mode 100644 index 0000000..0e5d807 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_line.h @@ -0,0 +1,37 @@ +#ifndef __EVAS_DIRECT3D_OBJECT_LINE_H__ +#define __EVAS_DIRECT3D_OBJECT_LINE_H__ + +#include "evas_engine.h" + +#include "ref.h" +#include "array.h" + +#include "evas_direct3d_object.h" + +class D3DObjectLine : public D3DObject +{ +public: + D3DObjectLine(); + + static void BeginCache(); + virtual void Draw(D3DDevice *d3d); + static void EndCache(D3DDevice *d3d); + + void Setup(FLOAT x1, FLOAT y1, FLOAT x2, FLOAT y2, DWORD color); + +private: + FLOAT _x1, _y1, _x2, _y2; + DWORD _color; + +private: + struct Vertex + { + FLOAT x, y; + DWORD color; + }; + + static TArray _cache; + static bool _cache_enabled; +}; + +#endif // __EVAS_DIRECT3D_OBJECT_LINE_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_rect.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_rect.cpp new file mode 100644 index 0000000..ebdd22b --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_rect.cpp @@ -0,0 +1,65 @@ +#include "evas_direct3d_object_rect.h" +#include "evas_direct3d_device.h" +#include "evas_direct3d_shader_pack.h" + +TArray D3DObjectRect::_cache; +bool D3DObjectRect::_cache_enabled = false; + +D3DObjectRect::D3DObjectRect() +{ + _x = _y = 0; + _w = _h = 0; +} + +void D3DObjectRect::BeginCache() +{ + _cache.Allocate(0); + _cache_enabled = true; +} + +void D3DObjectRect::EndCache(D3DDevice *d3d) +{ + if (!_cache_enabled || _cache.Length() == 0) + return; + D3DShaderPack::Current()->SetVDecl(d3d, D3DShaderPack::VDECL_XYC); + D3DShaderPack::Current()->SetVS(d3d, D3DShaderPack::VS_COPY_COLOR); + D3DShaderPack::Current()->SetPS(d3d, D3DShaderPack::PS_COLOR); + d3d->GetDevice()->DrawPrimitiveUP(D3DPT_TRIANGLELIST, _cache.Length() / 3, + _cache.Data(), sizeof(Vertex)); + + DBG("Rect cache drawn: %d items", _cache.Length() / 6); + _cache_enabled = false; +} + +void D3DObjectRect::Draw(D3DDevice *d3d) +{ + Vertex data[6] = { + {_x, _y, _color}, {_x + _w, _y, _color}, {_x, _y + _h, _color}, + {_x, _y + _h, _color}, {_x + _w, _y, _color}, {_x + _w, _y + _h, _color}}; + + if (!_cache_enabled) + { + D3DShaderPack::Current()->SetVDecl(d3d, D3DShaderPack::VDECL_XYC); + D3DShaderPack::Current()->SetVS(d3d, D3DShaderPack::VS_COPY_COLOR); + D3DShaderPack::Current()->SetPS(d3d, D3DShaderPack::PS_COLOR); + d3d->GetDevice()->DrawPrimitiveUP(D3DPT_TRIANGLELIST, 2, data, sizeof(Vertex)); + } + else + { + _cache.Add(data[0]); + _cache.Add(data[1]); + _cache.Add(data[2]); + _cache.Add(data[3]); + _cache.Add(data[4]); + _cache.Add(data[5]); + } +} + +void D3DObjectRect::Setup(FLOAT x, FLOAT y, FLOAT w, FLOAT h, DWORD color) +{ + _x = x; + _y = y; + _w = w; + _h = h; + _color = color; +} diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_rect.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_rect.h new file mode 100644 index 0000000..f7ef084 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_rect.h @@ -0,0 +1,37 @@ +#ifndef __EVAS_DIRECT3D_OBJECT_RECT_H__ +#define __EVAS_DIRECT3D_OBJECT_RECT_H__ + +#include "evas_engine.h" + +#include "ref.h" +#include "array.h" + +#include "evas_direct3d_object.h" + +class D3DObjectRect : public D3DObject +{ +public: + D3DObjectRect(); + + static void BeginCache(); + virtual void Draw(D3DDevice *d3d); + static void EndCache(D3DDevice *d3d); + + void Setup(FLOAT x, FLOAT y, FLOAT w, FLOAT h, DWORD color); + +private: + FLOAT _x, _y, _w, _h; + DWORD _color; + +private: + struct Vertex + { + FLOAT x, y; + DWORD color; + }; + + static TArray _cache; + static bool _cache_enabled; +}; + +#endif // __EVAS_DIRECT3D_OBJECT_RECT_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_scene.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_scene.cpp new file mode 100644 index 0000000..b171fc0 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_scene.cpp @@ -0,0 +1,33 @@ + +#include "evas_direct3d_scene.h" + +D3DScene::D3DScene() +{ +} + +void D3DScene::FreeObjects() +{ + for (int i = 0; i < _objects.Length(); i++) + _objects[i]->SetFree(true); +} + +void D3DScene::DrawAll(D3DDevice *d3d) +{ + for (int i = 0; i < _objects.Length(); i++) + { + if (!_objects[i]->IsFree()) + _objects[i]->Draw(d3d); + } +} + +void D3DScene::DeleteObject(D3DObject *object) +{ + for (int i = 0; i < _objects.Length(); i++) + { + if (_objects[i].Addr() == object) + { + _objects.Replace(i); + return; + } + } +} diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_scene.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_scene.h new file mode 100644 index 0000000..e2f5f94 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_scene.h @@ -0,0 +1,63 @@ +#ifndef __EVAS_DIRECT3D_SCENE_H__ +#define __EVAS_DIRECT3D_SCENE_H__ + +#include "evas_engine.h" + +#include +#include + +#include "ref.h" +#include "array.h" + +#include "evas_direct3d_object.h" + +class D3DDevice; + +class D3DScene : virtual public Referenc +{ +public: + D3DScene(); + + void FreeObjects(); + + inline void AddObject(D3DObject *object); + inline int GetObjectCount(); + void DeleteObject(D3DObject *object); + + void DrawAll(D3DDevice *d3d); + + template T *GetFreeObject() + { + for (int i = 0; i < _objects.Length(); i++) + { + if (typeid(T) == typeid(*_objects[i].Addr()) && _objects[i]->IsFree()) + return (T *)_objects[i].Addr(); + } + return NULL; + } + + template void GetObjectsOfType(TArray &res) + { + for (int i = 0; i < _objects.Length(); i++) + { + if (typeid(T) == typeid(*_objects[i].Addr())) + res.Add((T *)_objects[i].Addr()); + } + } + +private: + TArray > _objects; +}; + +void D3DScene::AddObject(D3DObject *object) +{ + assert(object != NULL); + _objects.Add(object); +} + +int D3DScene::GetObjectCount() +{ + return _objects.Length(); +} + +#endif // __EVAS_DIRECT3D_SCENE_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.cpp new file mode 100644 index 0000000..d9c868f --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.cpp @@ -0,0 +1,344 @@ + +#include + +#include + +#include "evas_direct3d_shader_pack.h" +#include "evas_direct3d_device.h" + +Ref D3DShaderPack::_this; + +D3DShaderPack::D3DShaderPack() +{ +} + +D3DShaderPack::~D3DShaderPack() +{ + Uninitialize(); +} + +D3DShaderPack *D3DShaderPack::Current() +{ + if (_this.IsNull()) + _this = new D3DShaderPack(); + return _this; +} + +void D3DShaderPack::SetCurrent(D3DShaderPack *obj) +{ + _this = obj; +} + + +bool D3DShaderPack::Initialize(D3DDevice *d3d) +{ + bool res = true; + if (!(res = InitVertexDeclarations(d3d) && res)) + WRN("Failed to create vdecl set"); + if (!(res = InitVertexShaders(d3d) && res)) + WRN("Failed to create vs set"); + if (!(res = InitPixelShaders(d3d) && res)) + WRN("Failed to create ps set"); + return res; +} + +void D3DShaderPack::Uninitialize() +{ + for (int i = 0; i < _vdecl.Length(); i++) + { + if (_vdecl[i] != NULL) + { + _vdecl[i]->Release(); + _vdecl[i] = NULL; + } + } + + for (int i = 0; i < _vs.Length(); i++) + { + if (_vs[i] != NULL) + { + _vs[i]->Release(); + _vs[i] = NULL; + } + } + + for (int i = 0; i < _ps.Length(); i++) + { + if (_ps[i] != NULL) + { + _ps[i]->Release(); + _ps[i] = NULL; + } + } +} + +bool D3DShaderPack::InitVertexDeclarations(D3DDevice *d3d) +{ + _vdecl.Allocate(VDECL_NUM); + _vdecl.Set(NULL); + + LPDIRECT3DVERTEXDECLARATION9 vdecl = NULL; + { + D3DVERTEXELEMENT9 elements[] = { + {0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, + {0, 8, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, + D3DDECL_END() + }; + if (FAILED(d3d->GetDevice()->CreateVertexDeclaration(elements, &vdecl))) + return false; + if (vdecl == NULL) + return false; + } + _vdecl[VDECL_XYC] = vdecl; + vdecl = NULL; + { + D3DVERTEXELEMENT9 elements[] = { + {0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, + {0, 8, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, + D3DDECL_END() + }; + if (FAILED(d3d->GetDevice()->CreateVertexDeclaration(elements, &vdecl))) + return false; + if (vdecl == NULL) + return false; + } + _vdecl[VDECL_XYUV] = vdecl; + vdecl = NULL; + { + D3DVERTEXELEMENT9 elements[] = { + {0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, + {0, 8, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, + {0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, + D3DDECL_END() + }; + if (FAILED(d3d->GetDevice()->CreateVertexDeclaration(elements, &vdecl))) + return false; + if (vdecl == NULL) + return false; + } + _vdecl[VDECL_XYUVC] = vdecl; + vdecl = NULL; + { + D3DVERTEXELEMENT9 elements[] = { + {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, + {0, 12, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, + {0, 20, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, + D3DDECL_END() + }; + if (FAILED(d3d->GetDevice()->CreateVertexDeclaration(elements, &vdecl))) + return false; + if (vdecl == NULL) + return false; + } + _vdecl[VDECL_XYZUVC] = vdecl; + + return true; +} + +bool D3DShaderPack::InitVertexShaders(D3DDevice *d3d) +{ + _vs.Allocate(VS_NUM); + _vs.Set(NULL); + + { + char buf[] = + "struct VsInput { float2 pos : POSITION; float4 col : COLOR; };\n" + "struct VsOutput { float4 pos : POSITION; float4 col : COLOR0; };\n" + "VsOutput main(VsInput vs_in) {\n" + "VsOutput vs_out;\n" + "vs_out.pos = float4(vs_in.pos, 0, 1);\n" + "vs_out.col = vs_in.col;\n" + "return vs_out;}"; + + _vs[VS_COPY_COLOR] = (LPDIRECT3DVERTEXSHADER9) + CompileShader(d3d, true, "CopyColor", buf, sizeof(buf) - 1); + if (_vs[VS_COPY_COLOR] == NULL) + return false; + } + + { + char buf[] = + "struct VsInput { float2 pos : POSITION; float2 tex : TEXCOORD0; };\n" + "struct VsOutput { float4 pos : POSITION; float2 tex : TEXCOORD0; };\n" + "VsOutput main(VsInput vs_in) {\n" + "VsOutput vs_out;\n" + "vs_out.pos = float4(vs_in.pos, 0, 1);\n" + "vs_out.tex = vs_in.tex;\n" + "return vs_out;}"; + + _vs[VS_COPY_UV] = (LPDIRECT3DVERTEXSHADER9) + CompileShader(d3d, true, "CopyUV", buf, sizeof(buf) - 1); + if (_vs[VS_COPY_UV] == NULL) + return false; + } + + { + char buf[] = + "struct VsInput { float2 pos : POSITION; float2 tex : TEXCOORD0; float4 col : COLOR; };\n" + "struct VsOutput { float4 pos : POSITION; float2 tex : TEXCOORD0; float4 col : COLOR0; };\n" + "VsOutput main(VsInput vs_in) {\n" + "VsOutput vs_out;\n" + "vs_out.pos = float4(vs_in.pos, 0, 1);\n" + "vs_out.tex = vs_in.tex;\n" + "vs_out.col = vs_in.col;\n" + "return vs_out;}"; + + _vs[VS_COPY_UV_COLOR] = (LPDIRECT3DVERTEXSHADER9) + CompileShader(d3d, true, "CopyUVColor", buf, sizeof(buf) - 1); + if (_vs[VS_COPY_UV_COLOR] == NULL) + return false; + } + + { + char buf[] = + "struct VsInput { float3 pos : POSITION; float2 tex : TEXCOORD0; float4 col : COLOR; };\n" + "struct VsOutput { float4 pos : POSITION; float2 tex : TEXCOORD0; float4 col : COLOR0; };\n" + "VsOutput main(VsInput vs_in) {\n" + "VsOutput vs_out;\n" + "vs_out.pos = float4(vs_in.pos, 1);\n" + "vs_out.tex = vs_in.tex;\n" + "vs_out.col = vs_in.col;\n" + "return vs_out;}"; + + _vs[VS_COPY_UV_COLOR_Z] = (LPDIRECT3DVERTEXSHADER9) + CompileShader(d3d, true, "CopyUVColorZ", buf, sizeof(buf) - 1); + if (_vs[VS_COPY_UV_COLOR_Z] == NULL) + return false; + } + + return true; +} + +bool D3DShaderPack::InitPixelShaders(D3DDevice *d3d) +{ + _ps.Allocate(PS_NUM); + _ps.Set(NULL); + + { + char buf[] = + "struct VsOutput { float4 pos : POSITION; float4 col : COLOR0; };\n" + "float4 main(VsOutput ps_in) : COLOR0 {\n" + "return ps_in.col;}"; + + _ps[PS_COLOR] = (LPDIRECT3DPIXELSHADER9) + CompileShader(d3d, false, "Color", buf, sizeof(buf) - 1); + if (_ps[PS_COLOR] == NULL) + return false; + } + + { + char buf[] = + "sampler Texture : register(s0);\n" + "struct VsOutput { float4 pos : POSITION; float2 tex : TEXCOORD0; };\n" + "float4 main(VsOutput ps_in) : COLOR0 {\n" + "return tex2D(Texture, ps_in.tex);}"; + + _ps[PS_TEX] = (LPDIRECT3DPIXELSHADER9) + CompileShader(d3d, false, "Tex", buf, sizeof(buf) - 1); + if (_ps[PS_TEX] == NULL) + return false; + } + + { + char buf[] = + "sampler Texture : register(s0);\n" + "struct VsOutput { float4 pos : POSITION; float2 tex : TEXCOORD0; float4 col : COLOR0; };\n" + "float4 main(VsOutput ps_in) : COLOR0 {\n" + "return tex2D(Texture, ps_in.tex) * ps_in.col;}"; + + _ps[PS_TEX_COLOR_FILTER] = (LPDIRECT3DPIXELSHADER9) + CompileShader(d3d, false, "TexColorFilter", buf, sizeof(buf) - 1); + if (_ps[PS_TEX_COLOR_FILTER] == NULL) + return false; + } + + { + char buf[] = + "sampler Texture : register(s1);\n" + "struct VsOutput { float4 pos : POSITION; float2 tex : TEXCOORD0; };\n" + "float4 main(VsOutput ps_in) : COLOR0 {\n" + "return tex2D(Texture, ps_in.tex);}"; + + _ps[PS_TEX_2] = (LPDIRECT3DPIXELSHADER9) + CompileShader(d3d, false, "Tex2", buf, sizeof(buf) - 1); + if (_ps[PS_TEX_2] == NULL) + return false; + } + + return true; +} + +void *D3DShaderPack::CompileShader(D3DDevice *d3d, bool make_vs, + const char *name, const char *buf, int size) +{ + LPD3DXBUFFER compiled_res = NULL; + LPD3DXBUFFER error_msgs = NULL; + + HRESULT res = D3DXCompileShader(buf, size, NULL, NULL, + "main", make_vs ? "vs_2_0" : "ps_2_0", // ? + 0, &compiled_res, &error_msgs, NULL); + + if (FAILED(res)) + { + ERR("Shader %s compilation failed, code = %X", name, res); + if (error_msgs == NULL) + return NULL; + const char *mess = (const char *)error_msgs->GetBufferPointer(); + ERR("Error output:\n%s", mess); + error_msgs->Release(); + return NULL; + } + + if (error_msgs != NULL) + error_msgs->Release(); + + void *res_ptr = NULL; + if (make_vs) + { + LPDIRECT3DVERTEXSHADER9 vs; + res = d3d->GetDevice()->CreateVertexShader((DWORD *)compiled_res->GetBufferPointer(), &vs); + res_ptr = (void *)vs; + } + else + { + LPDIRECT3DPIXELSHADER9 ps; + res = d3d->GetDevice()->CreatePixelShader((DWORD *)compiled_res->GetBufferPointer(), &ps); + res_ptr = (void *)ps; + } + + compiled_res->Release(); + + if (FAILED(res)) + { + WRN("Shader %s creation failed, code = %X", name, res); + return NULL; + } + return res_ptr; +} + +bool D3DShaderPack::SetVDecl(D3DDevice *d3d, int id) +{ + if (id < 0 || id >= _vdecl.Length() || _vdecl[id] == NULL) + return false; + assert(d3d != NULL); + d3d->GetDevice()->SetVertexDeclaration(_vdecl[id]); + return true; +} + +bool D3DShaderPack::SetVS(D3DDevice *d3d, int id) +{ + if (id < 0 || id >= _vs.Length() || _vs[id] == NULL) + return false; + assert(d3d != NULL); + d3d->GetDevice()->SetVertexShader(_vs[id]); + return true; +} + +bool D3DShaderPack::SetPS(D3DDevice *d3d, int id) +{ + if (id < 0 || id >= _ps.Length() || _ps[id] == NULL) + return false; + assert(d3d != NULL); + d3d->GetDevice()->SetPixelShader(_ps[id]); + return true; +} diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.h new file mode 100644 index 0000000..b865f78 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.h @@ -0,0 +1,75 @@ +#ifndef __EVAS_DIRECT3D_SHADER_PACK_H__ +#define __EVAS_DIRECT3D_SHADER_PACK_H__ + +#include "evas_engine.h" + +#include "ref.h" +#include "array.h" + +class D3DDevice; + +class D3DShaderPack : virtual public Referenc +{ +public: + ~D3DShaderPack(); + + static D3DShaderPack *Current(); + static void SetCurrent(D3DShaderPack *obj); + + bool Initialize(D3DDevice *d3d); + void Uninitialize(); + + bool SetVDecl(D3DDevice *d3d, int id); + bool SetVS(D3DDevice *d3d, int id); + bool SetPS(D3DDevice *d3d, int id); + +public: + enum VDECL + { + VDECL_XYC = 0, + VDECL_XYUV, + VDECL_XYUVC, + VDECL_XYZUVC, + + VDECL_NUM + }; + + enum VS + { + VS_COPY_COLOR = 0, + VS_COPY_UV, + VS_COPY_UV_COLOR, + VS_COPY_UV_COLOR_Z, + + VS_NUM + }; + + enum PS + { + PS_COLOR = 0, + PS_TEX, + PS_TEX_COLOR_FILTER, + PS_TEX_2, + + PS_NUM + }; + +private: + D3DShaderPack(); + + bool InitVertexDeclarations(D3DDevice *d3d); + bool InitVertexShaders(D3DDevice *d3d); + bool InitPixelShaders(D3DDevice *d3d); + + void *CompileShader(D3DDevice *d3d, bool make_vs, const char *name, + const char *buf, int size); + +private: + TArray _vdecl; + TArray _vs; + TArray _ps; + + static Ref _this; +}; + +#endif // __EVAS_DIRECT3D_SHADER_PACK_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_vertex_buffer_cache.cpp b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_vertex_buffer_cache.cpp new file mode 100644 index 0000000..8d3dd45 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_vertex_buffer_cache.cpp @@ -0,0 +1,154 @@ + +//#define ENABLE_LOG_PRINTF + +#include "evas_direct3d_vertex_buffer_cache.h" +#include "evas_direct3d_device.h" + +#include + + +Ref D3DVertexBufferCache::_this; + +D3DVertexBufferCache::D3DVertexBufferCache() +{ + size_border_low = 0.6; // We can reuse buffer on 60% + size_border_high = 0.2; // We can reallocate the buffer on 20% +} + +D3DVertexBufferCache::~D3DVertexBufferCache() +{ + Uninitialize(); +} + +D3DVertexBufferCache *D3DVertexBufferCache::Current() +{ + if (_this.IsNull()) + _this = new D3DVertexBufferCache(); + return _this; +} + +void D3DVertexBufferCache::SetCurrent(D3DVertexBufferCache *obj) +{ + _this = obj; +} + +void D3DVertexBufferCache::Uninitialize() +{ + for (int i = 0; i < _cache.Length(); i++) + { + assert(_cache[i].vb != NULL); + _cache[i].vb->Release(); + } + _cache.Resize(); +} + +bool D3DVertexBufferCache::InitBuffer(D3DDevice *d3d, BYTE *data, int size, CacheEntryInfo &info) +{ + assert(d3d != NULL); + assert(data != NULL); + assert(size > 0); + + int best = FindBestEntry(size); + CacheEntry *ce = NULL; + + // Reallocate + if (best >= 0 && _cache[best].size < size) + { + DeleteEntry(best); + best = -1; + } + + // New + if (best < 0) + { + CacheEntry new_entry; + if (!CreateEntry(d3d, new_entry, size)) + { + WRN("Failed to create new vbcache entry"); + return false; + } + _cache.Add(new_entry); + info.id = _cache.Length() - 1; + ce = _cache.Last(); + } + else + { + info.id = best; + ce = &_cache[best]; + } + + assert(ce != NULL); + if (!InsertData(*ce, data, size)) + { + WRN("Failed to insert vbcache data"); + return false; + } + return true; +} + +bool D3DVertexBufferCache::SelectBufferToDevice(D3DDevice *device, int id, int vertex_size) +{ + if (id < 0 || id >= _cache.Length()) + return false; + return SUCCEEDED(device->GetDevice()->SetStreamSource(0, _cache[id].vb, 0, vertex_size)); +} + +int D3DVertexBufferCache::FindBestEntry(int size) +{ + // Search for buffer that fits in borders + for (int i = 0; i < _cache.Length(); i++) + { + const int vs = _cache[i].size; + if (size >= (vs - FLOAT(vs) * size_border_low) && size <= vs) + return i; + } + bool less_than_all = true; + for (int i = 0; i < _cache.Length(); i++) + { + const int vs = _cache[i].size; + if (size >= (vs - FLOAT(vs) * size_border_low)) + less_than_all = false; + } + // Requested size is too small to reuse in any buffer + if (less_than_all) + return -1; + // Search for buffer that can be reallocated + for (int i = 0; i < _cache.Length(); i++) + { + const int vs = _cache[i].size; + if (size <= (vs + FLOAT(vs) * size_border_high)) + return i; + } + // No buffer can be reused or reallocated, create a new one + return -1; +} + +bool D3DVertexBufferCache::CreateEntry(D3DDevice *d3d, CacheEntry &entry, int size) +{ + assert(d3d != NULL); + if (FAILED(d3d->GetDevice()->CreateVertexBuffer(size, D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY, + 0, D3DPOOL_DEFAULT, &entry.vb, NULL))) + { + return false; + } + entry.size = size; + return true; +} + +void D3DVertexBufferCache::DeleteEntry(int id) +{ + if (id < 0 || id >= _cache.Length()) + return; + assert(_cache[id].vb != NULL); + _cache[id].vb->Release(); + _cache.Replace(id); +} + +bool D3DVertexBufferCache::InsertData(CacheEntry &entry, BYTE *data, int size) +{ + BYTE *ptr = NULL; + if (FAILED(entry.vb->Lock(0, size, (void **)&ptr, D3DLOCK_DISCARD))) + return false; + CopyMemory(ptr, data, size); + return SUCCEEDED(entry.vb->Unlock()); +} diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_vertex_buffer_cache.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_vertex_buffer_cache.h new file mode 100644 index 0000000..822ac80 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_vertex_buffer_cache.h @@ -0,0 +1,60 @@ +#ifndef __EVAS_DIRECT3D_VERTEX_BUFFER_CACHE_H__ +#define __EVAS_DIRECT3D_VERTEX_BUFFER_CACHE_H__ + +#include "evas_engine.h" + +#include "ref.h" +#include "array.h" + +class D3DDevice; + +class D3DVertexBufferCache : virtual public Referenc +{ +public: + struct CacheEntryInfo + { + int id; + }; + +public: + ~D3DVertexBufferCache(); + + static D3DVertexBufferCache *Current(); + static void SetCurrent(D3DVertexBufferCache *obj); + + inline void SetSizeBorders(FLOAT low, FLOAT high); + + bool InitBuffer(D3DDevice *d3d, BYTE *data, int size, CacheEntryInfo &info); + bool SelectBufferToDevice(D3DDevice *device, int id, int vertex_size); + void Uninitialize(); + +private: + struct CacheEntry + { + LPDIRECT3DVERTEXBUFFER9 vb; + int size; + }; + +private: + D3DVertexBufferCache(); + + int FindBestEntry(int size); + bool CreateEntry(D3DDevice *d3d, CacheEntry &entry, int size); + void DeleteEntry(int id); + bool InsertData(CacheEntry &entry, BYTE *data, int size); + +private: + TArray _cache; + FLOAT size_border_low; + FLOAT size_border_high; + + static Ref _this; +}; + +void D3DVertexBufferCache::SetSizeBorders(FLOAT low, FLOAT high) +{ + size_border_low = low; + size_border_high = high; +} + +#endif // __EVAS_DIRECT3D_VERTEX_BUFFER_CACHE_H__ diff --git a/libraries/evas/src/modules/engines/direct3d/evas_engine.c b/libraries/evas/src/modules/engines/direct3d/evas_engine.c new file mode 100644 index 0000000..f7722d8 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_engine.c @@ -0,0 +1,503 @@ +#include "evas_common.h" /* Also includes international specific stuff */ +#include "evas_engine.h" +#include "evas_private.h" +#include "Evas_Engine_Direct3D.h" + +#undef EAPI +#define EAPI __declspec(dllexport) + +/* engine struct data */ +typedef struct _Render_Engine Render_Engine; +struct _Render_Engine +{ + Direct3DDeviceHandler d3d; + int width, height; + int end : 1; + int in_redraw : 1; +}; + +int _evas_engine_direct3d_log_dom = -1; + +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +////////////////////////////////////////////////////////////////////////////// +// Prototypes + +static void *eng_info(Evas *e); +static void eng_info_free(Evas *e, void *info); +static int eng_setup(Evas *e, void *info); +static void eng_output_free(void *data); +static void eng_output_resize(void *data, int width, int height); + +////////////////////////////////////////////////////////////////////////////// +// Init / shutdown methods +// + +static void * +_output_setup(int width, int height, int rotation, HWND window, int depth, int fullscreen) +{ + Render_Engine *re; + + re = (Render_Engine *)calloc(1, sizeof(Render_Engine)); + if (!re) + return NULL; + + /* if we haven't initialized - init (automatic abort if already done) */ + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + + if ((re->d3d = evas_direct3d_init(window, depth, fullscreen)) == 0) + { + free(re); + return NULL; + } + + re->width = width; + re->height = height; + + return re; +} + +static void * +eng_info(Evas *e) +{ + Evas_Engine_Info_Direct3D *info; + info = (Evas_Engine_Info_Direct3D *)calloc(1, sizeof(Evas_Engine_Info_Direct3D)); + if (!info) return NULL; + info->magic.magic = rand(); + memset(&info->info, 0, sizeof(info->info)); + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; + e = NULL; +} + +static void +eng_info_free(Evas *e, void *info) +{ + Evas_Engine_Info_Direct3D *in; + in = (Evas_Engine_Info_Direct3D *)info; + free(in); +} + +static int +eng_setup(Evas *e, void *info) +{ + Render_Engine *re; + Evas_Engine_Info_Direct3D *in; + re = (Render_Engine *)e->engine.data.output; + in = (Evas_Engine_Info_Direct3D *)info; + if (!e->engine.data.output) + { + e->engine.data.output = _output_setup(e->output.w, + e->output.h, + in->info.rotation, + in->info.window, + in->info.depth, + in->info.fullscreen); + } + else if (in->info.fullscreen != 0) + { + if (re) + evas_direct3d_set_layered(re->d3d, 0, 0, 0, NULL); + evas_direct3d_set_fullscreen(re->d3d, -1, -1, 1); + } + else if (in->info.fullscreen == 0) + { + evas_direct3d_set_fullscreen(re->d3d, re->width, re->height, 0); + if (re && in->info.layered == 0) + evas_direct3d_set_layered(re->d3d, 0, 0, 0, NULL); + else if (re && in->info.layered != 0 && in->shape) + evas_direct3d_set_layered(re->d3d, 1, in->shape->width, in->shape->height, in->shape->mask); + } + + if (!e->engine.data.output) + return 0; + if (!e->engine.data.context) + e->engine.data.context = e->engine.func->context_new(e->engine.data.output); + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re = (Render_Engine *)data; + + evas_direct3d_free(re->d3d); + + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); +} + +////////////////////////////////////////////////////////////////////////////// +// Context +// + +static void +eng_context_color_set(void *data, void *context, int r, int g, int b, int a) +{ + Render_Engine *re = (Render_Engine *)data; + evas_direct3d_context_color_set(re->d3d, r, g, b, a); + + evas_common_draw_context_set_color(context, r, g, b, a); +} + +static void +eng_context_multiplier_set(void *data, void *context, int r, int g, int b, int a) +{ + Render_Engine *re = (Render_Engine *)data; + evas_direct3d_context_set_multiplier(re->d3d, 255, 255, 255, a); + + evas_common_draw_context_set_multiplier(context, r, g, b, a); +} + +static void +eng_context_multiplier_unset(void *data, void *context) +{ + Render_Engine *re = (Render_Engine *)data; + evas_direct3d_context_set_multiplier(re->d3d, 255, 255, 255, 255); + + evas_common_draw_context_unset_multiplier(context); +} + + +////////////////////////////////////////////////////////////////////////////// +// Output manipulating +// + +static void +eng_output_resize(void *data, int width, int height) +{ + Render_Engine *re = (Render_Engine *)data; + re->width = width; + re->height = height; + evas_direct3d_resize(re->d3d, width, height); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int width, int height) +{ + Render_Engine *re = (Render_Engine *)data; +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int width, int height) +{ + Render_Engine *re = (Render_Engine *)data; +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re = (Render_Engine *)data; +} + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, + int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (re->end) + { + re->end = 0; + re->in_redraw = 0; + return NULL; + } + + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = 800; //re->d3d.width; + if (h) *h = 600; //re->d3d.height; + if (cx) *cx = 0; + if (cy) *cy = 0; + if (cw) *cw = 800; //re->d3d.width; + if (ch) *ch = 600; //re->d3d.height; + + re->in_redraw = 1; + + return re; +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface, + int x, int y, int w, int h) +{ + Render_Engine *re = (Render_Engine *)data; + re->end = 1; +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re = (Render_Engine *)data; + evas_direct3d_render_all(re->d3d); +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re = (Render_Engine *)data; +} + + +////////////////////////////////////////////////////////////////////////////// +// Draw objects +// + +static void +eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2) +{ + Render_Engine *re = (Render_Engine *)data; + if (re->in_redraw == 0) + return; + evas_direct3d_line_draw(re->d3d, x1, y1, x2, y2); +} + +static void +eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re = (Render_Engine *)data; + if (re->in_redraw == 0) + return; + evas_direct3d_rectangle_draw(re->d3d, x, y, w, h); +} + +static void * +eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + Render_Engine *re = (Render_Engine *)data; + *error = 0; + return evas_direct3d_image_load(re->d3d, file, key, NULL, lo); +} + +static void * +eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re = (Render_Engine *)data; + return evas_direct3d_image_new_from_data(re->d3d, w, h, image_data, alpha, cspace); +} + +static void * +eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re = (Render_Engine *)data; + return evas_direct3d_image_new_from_copied_data(re->d3d, w, h, image_data, alpha, cspace); +} + +static void +eng_image_free(void *data, void *image) +{ + Render_Engine *re = (Render_Engine *)data; + evas_direct3d_image_free(re->d3d, image); +} + +static void * +eng_image_data_put(void *data, void *image, DATA32 *image_data) +{ + Render_Engine *re = (Render_Engine *)data; + evas_direct3d_image_data_put(re->d3d, image, image_data); + return image; +} + +static void * +eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h) +{ + return image; +} + +static void * +eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, int *err) +{ + Render_Engine *re = (Render_Engine *)data; + evas_direct3d_image_data_get(re->d3d, image, to_write, image_data); + if (err) *err = EVAS_LOAD_ERROR_NONE; + return image; +} + +static void +eng_image_draw(void *data, void *context, void *surface, void *image, + int src_x, int src_y, int src_w, int src_h, + int dst_x, int dst_y, int dst_w, int dst_h, int smooth) +{ + Render_Engine *re = (Render_Engine *)data; + evas_direct3d_image_draw(re->d3d, image, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h, smooth); +} + +static void +eng_image_size_get(void *data, void *image, int *w, int *h) +{ + evas_direct3d_image_size_get(image, w, h); +} + +static int +eng_image_alpha_get(void *data, void *image) +{ + // Hm:) + if (!image) + return 1; + return 0; +} + +static int +eng_image_colorspace_get(void *data, void *image) +{ + // Well, change that when you think about other colorspace + return EVAS_COLORSPACE_ARGB8888; +} + +static void * +eng_image_border_set(void *data, void *image, int l, int r, int t, int b) +{ + Render_Engine *re = (Render_Engine *)data; + evas_direct3d_image_border_set(re->d3d, image, l, t, r, b); + return image; +} + +static void +eng_image_border_get(void *data, void *image, int *l, int *r, int *t, int *b) +{ + Render_Engine *re = (Render_Engine *)data; + evas_direct3d_image_border_get(re->d3d, image, l, t, r, b); +} + +static void +eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) +{ +} + +static int +eng_image_scale_hint_get(void *data __UNUSED__, void *image) +{ + return EVAS_IMAGE_SCALE_HINT_NONE; +} + +static void +eng_font_draw(void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, const Evas_Text_Props *intl_props) +{ + Render_Engine *re = (Render_Engine *)data; + RGBA_Image im; + im.image.data = NULL; + im.cache_entry.w = re->width; + im.cache_entry.h = re->height; + + evas_direct3d_select_or_create_font(re->d3d, font); + + evas_common_draw_context_font_ext_set(context, re->d3d, + evas_direct3d_font_texture_new, + evas_direct3d_font_texture_free, + evas_direct3d_font_texture_draw); + evas_common_font_draw(&im, context, (RGBA_Font *) font, x, y, intl_props); + evas_common_draw_context_font_ext_set(context, NULL, NULL, NULL, NULL); +} + +static void +eng_font_free(void *data, void *font) +{ + Render_Engine *re = (Render_Engine *)data; + evas_common_font_free(font); + evas_direct3d_font_free(re->d3d, font); +} + +/* module advertising code */ +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + /* Initialize the log domain */ + _evas_engine_direct3d_log_dom = eina_log_domain_register + ("evas-direct3d", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_direct3d_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(context_color_set); + ORD(context_multiplier_set); + ORD(context_multiplier_unset); + ORD(output_free); + ORD(output_resize); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + ORD(line_draw); + ORD(rectangle_draw); + ORD(image_load); + ORD(image_new_from_data); + ORD(image_new_from_copied_data); + ORD(image_free); + ORD(image_data_put); + ORD(image_dirty_region); + ORD(image_data_get); + ORD(image_draw); + ORD(image_size_get); + ORD(image_alpha_get); + ORD(image_colorspace_get); + ORD(image_border_set); + ORD(image_border_get); + ORD(font_draw); + ORD(font_free); + + ORD(image_scale_hint_set); + ORD(image_scale_hint_get); + +// ORD(image_map_draw); +// ORD(image_map_surface_new); +// ORD(image_map_surface_free); + + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em) +{ + eina_log_domain_unregister(_evas_engine_direct3d_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "direct3d", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, direct3d); + +#ifndef EVAS_STATIC_BUILD_DIRECT3D +EVAS_EINA_MODULE_DEFINE(engine, direct3d); +#endif diff --git a/libraries/evas/src/modules/engines/direct3d/evas_engine.h b/libraries/evas/src/modules/engines/direct3d/evas_engine.h new file mode 100644 index 0000000..da1ebff --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_engine.h @@ -0,0 +1,125 @@ +#ifndef __EVAS_ENGINE_H__ +#define __EVAS_ENGINE_H__ + + +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define EVAS_INLINE_ARRAY_H // We dont need that and it is buggy + +#include "evas_common.h" + +#ifdef __cplusplus +} +#endif + + +//#define ENABLE_LOG_PRINTF + +extern int _evas_engine_direct3d_log_dom ; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_direct3d_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_direct3d_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_direct3d_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_direct3d_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_direct3d_log_dom, __VA_ARGS__) + +#ifdef ENABLE_LOG_PRINTF +#define Log(str, ...) INF("D3D "str, __VA_ARGS__) +#else +#define Log(str, ...) +#endif + +typedef void * Direct3DDeviceHandler; +typedef void * Direct3DImageHandler; +typedef void * Direct3DFontGlyphHandler; + + +#ifdef __cplusplus +extern "C" { +#endif + +// Main engine functions + +Direct3DDeviceHandler evas_direct3d_init(HWND window, int depth, int fullscreen); +void evas_direct3d_free(Direct3DDeviceHandler d3d); +void evas_direct3d_render_all(Direct3DDeviceHandler d3d); +void evas_direct3d_resize(Direct3DDeviceHandler d3d, int width, int height); +void evas_direct3d_set_fullscreen(Direct3DDeviceHandler d3d, + int width, int height, int fullscreen); +void evas_direct3d_set_layered(Direct3DDeviceHandler d3d, int layered, + int mask_width, int mask_height, unsigned char *mask); + + +// Context manipulations + +void evas_direct3d_context_color_set(Direct3DDeviceHandler d3d, int r, int g, int b, int a); +void evas_direct3d_context_set_multiplier(Direct3DDeviceHandler d3d, int r, int g, int b, int a); + +// Simple objects + +void evas_direct3d_line_draw(Direct3DDeviceHandler d3d, int x1, int y1, int x2, int y2); +void evas_direct3d_rectangle_draw(Direct3DDeviceHandler d3d, int x, int y, int w, int h); + +// Images + +Direct3DImageHandler evas_direct3d_image_load(Direct3DDeviceHandler d3d, + const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo); +Direct3DImageHandler evas_direct3d_image_new_from_data(Direct3DDeviceHandler d3d, + int w, int h, DWORD *image_data, int alpha, int cspace); +Direct3DImageHandler evas_direct3d_image_new_from_copied_data(Direct3DDeviceHandler d3d, + int w, int h, DWORD *image_data, int alpha, int cspace); +void evas_direct3d_image_free(Direct3DDeviceHandler d3d, Direct3DImageHandler image); +void evas_direct3d_image_data_put(Direct3DDeviceHandler d3d, Direct3DImageHandler image, + DWORD *image_data); +void evas_direct3d_image_data_get(Direct3DDeviceHandler d3d, Direct3DImageHandler image, + int to_write, DATA32 **image_data); +void evas_direct3d_image_draw(Direct3DDeviceHandler d3d, Direct3DImageHandler image, + int src_x, int src_y, int src_w, int src_h, + int dst_x, int dst_y, int dst_w, int dst_h, int smooth); +void evas_direct3d_image_size_get(Direct3DImageHandler image, int *w, int *h); +void evas_direct3d_image_border_set(Direct3DDeviceHandler d3d, Direct3DImageHandler image, + int l, int r, int t, int b); +void evas_direct3d_image_border_get(Direct3DDeviceHandler d3d, Direct3DImageHandler image, + int *l, int *r, int *t, int *b); + +// Fonts + +Direct3DFontGlyphHandler evas_direct3d_font_texture_new(Direct3DDeviceHandler d3d, + RGBA_Font_Glyph *fg); +void evas_direct3d_font_texture_free(Direct3DFontGlyphHandler ft); +void evas_direct3d_font_texture_draw(Direct3DDeviceHandler d3d, void *dest, void *context, + RGBA_Font_Glyph *fg, int x, int y); +void evas_direct3d_select_or_create_font(Direct3DDeviceHandler d3d, void *font); +void evas_direct3d_font_free(Direct3DDeviceHandler d3d, void *font); + +#ifdef __cplusplus +} +#endif + + +#endif /* __EVAS_ENGINE_H__ */ diff --git a/libraries/evas/src/modules/engines/direct3d/ref.h b/libraries/evas/src/modules/engines/direct3d/ref.h new file mode 100644 index 0000000..0853f2e --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/ref.h @@ -0,0 +1,210 @@ +#ifndef __REF_H__ +#define __REF_H__ + +////////////////////////////////////////////////////////////////////////////// +// class Referenc +// Desc: Base class enabling reference interface +// Note: Class should derive as virtual +// +class Referenc +{ +public: + Referenc() + : refs_count(0) {}; + + inline int AddRef() + { + return ++refs_count; + } + inline int RemRef() + { + return --refs_count; + } + inline int RefCount() + { + return refs_count; + } + +private: + int refs_count; +}; + + +////////////////////////////////////////////////////////////////////////////// +// template Ref +// Desc: Holder in smart-pointers system. +// Important: Only Referenc subclasses may be used as template param. +// + +template +class Ref +{ +public: + // Constructors & destructor + Ref(); + //Ref(Ref &ref); + Ref(const Ref &ref); + Ref(T *ptr); + Ref(const T *ptr); + ~Ref(); + + Ref &operator =(Ref &ref); + Ref &operator =(T *ptr); + + inline T *Addr(); + inline T *Addr() const; + inline int RefCount(); + inline bool IsNull(); + + inline T *operator ->(); + inline operator const T *() const; + inline operator T *(); + +//private: + void RemRef(); + +private: + T *m_ptr; +}; + +////////////////////////////////////////////////////////////////////////////// +// Constructors & destructor +template Ref::Ref() +: m_ptr(NULL) +{ +} + +//template Ref::Ref(Ref &ref) +//: m_ptr(NULL) +//{ +// if (ref.Addr() != NULL) +// { +// m_ptr = ref.Addr(); +// ((Referenc *)m_ptr)->AddRef(); +// } +//} + +template Ref::Ref(const Ref &ref) +: m_ptr(NULL) +{ + if (ref.Addr() != NULL) + { + m_ptr = ref.Addr(); + ((Referenc *)m_ptr)->AddRef(); + } +} + +template Ref::Ref(T *ptr) +: m_ptr(NULL) +{ + if (ptr != NULL) + { + m_ptr = ptr; + ((Referenc *)m_ptr)->AddRef(); + } +} + +template Ref::Ref(const T *ptr) +: m_ptr(NULL) +{ + if (ptr != NULL) + { + m_ptr = ptr; + ((Referenc *)m_ptr)->AddRef(); + } +} + +template Ref::~Ref() +{ + if (m_ptr == NULL) + return; + RemRef(); +} + +// Check pointer on correctness +template bool Ref::IsNull() +{ + return (m_ptr == NULL); +} + +////////////////////////////////////////////////////////////////////////////// +// Operators + +template Ref &Ref::operator =(T *ptr) +{ + if (ptr != NULL) + { + if (m_ptr != ptr) + { + RemRef(); + m_ptr = ptr; + ((Referenc *)m_ptr)->AddRef(); + } + } + else if (m_ptr != NULL) + RemRef(); + return *this; +} + +template Ref &Ref::operator =(Ref &ref) +{ + if (ref.Addr() != NULL) + { + if (m_ptr != ref.Addr()) + { + RemRef(); + m_ptr = ref.Addr(); + ((Referenc *)m_ptr)->AddRef(); + } + } + else if (m_ptr != NULL) + RemRef(); + return *this; +} + +// Get pointer +template T *Ref::Addr() +{ + return m_ptr; +} + +template T *Ref::Addr() const +{ + return m_ptr; +} + +// Get refs count +template int Ref::RefCount() +{ + if (m_ptr == NULL) + return 0; + return ((Referenc *)m_ptr)->RefCount(); +} + +// Remove ref to the object and delete it if necessary +// WARNING: arrays cannot be deleted +template void Ref::RemRef() +{ + if (m_ptr == NULL) + return; + if (((Referenc *)m_ptr)->RemRef() == 0) + delete m_ptr; + m_ptr = NULL; +} + +template T *Ref::operator ->() +{ + return m_ptr; +} + +template Ref::operator const T *() const +{ + return m_ptr; +} + +template Ref::operator T *() +{ + return m_ptr; +} + +#endif // __REF_H__ diff --git a/libraries/evas/src/modules/engines/directfb/Evas_Engine_DirectFB.h b/libraries/evas/src/modules/engines/directfb/Evas_Engine_DirectFB.h new file mode 100644 index 0000000..53352b7 --- /dev/null +++ b/libraries/evas/src/modules/engines/directfb/Evas_Engine_DirectFB.h @@ -0,0 +1,25 @@ +#ifndef _EVAS_ENGINE_DIRECTFB_H +#define _EVAS_ENGINE_DIRECTFB_H + +#include +#include + +typedef struct _Evas_Engine_Info_DirectFB Evas_Engine_Info_DirectFB; + +struct _Evas_Engine_Info_DirectFB +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + struct Evas_Engine_DirectFB_Spec { + IDirectFB *dfb; + IDirectFBSurface *surface; + } info; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; +#endif + + diff --git a/libraries/evas/src/modules/engines/directfb/Makefile.am b/libraries/evas/src/modules/engines/directfb/Makefile.am new file mode 100644 index 0000000..5b00166 --- /dev/null +++ b/libraries/evas/src/modules/engines/directfb/Makefile.am @@ -0,0 +1,46 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_directfb_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_ENGINE_DIRECTFB + +DIRECTFB_SOURCES = evas_engine.c polygon.c +DIRECTFB_LIBADD = @evas_engine_directfb_libs@ + + +includes_HEADERS = Evas_Engine_DirectFB.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_DIRECTFB + +pkgdir = $(libdir)/evas/modules/engines/directfb/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(DIRECTFB_SOURCES) + +module_la_LIBADD = @EINA_LIBS@ $(DIRECTFB_LIBADD) $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_directfb.la + +libevas_engine_directfb_la_SOURCES = $(DIRECTFB_SOURCES) +libevas_engine_directfb_la_LIBADD = $(DIRECTFB_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/directfb/Makefile.in b/libraries/evas/src/modules/engines/directfb/Makefile.in new file mode 100644 index 0000000..cd5651a --- /dev/null +++ b/libraries/evas/src/modules/engines/directfb/Makefile.in @@ -0,0 +1,805 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/directfb +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@libevas_engine_directfb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_directfb_la_SOURCES_DIST = evas_engine.c polygon.c +@BUILD_ENGINE_DIRECTFB_TRUE@am__objects_1 = evas_engine.lo polygon.lo +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am_libevas_engine_directfb_la_OBJECTS = $(am__objects_1) +libevas_engine_directfb_la_OBJECTS = \ + $(am_libevas_engine_directfb_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am_libevas_engine_directfb_la_rpath = +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c polygon.c +@BUILD_ENGINE_DIRECTFB_TRUE@am__objects_2 = module_la-evas_engine.lo \ +@BUILD_ENGINE_DIRECTFB_TRUE@ module_la-polygon.lo +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_directfb_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_directfb_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_DirectFB.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_directfb_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_ENGINE_DIRECTFB_TRUE@DIRECTFB_SOURCES = evas_engine.c polygon.c +@BUILD_ENGINE_DIRECTFB_TRUE@DIRECTFB_LIBADD = @evas_engine_directfb_libs@ +@BUILD_ENGINE_DIRECTFB_TRUE@includes_HEADERS = Evas_Engine_DirectFB.h +@BUILD_ENGINE_DIRECTFB_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@pkgdir = $(libdir)/evas/modules/engines/directfb/$(MODULE_ARCH) +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@module_la_SOURCES = $(DIRECTFB_SOURCES) +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@module_la_LIBADD = @EINA_LIBS@ $(DIRECTFB_LIBADD) $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@module_la_LDFLAGS = -module -avoid-version +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@noinst_LTLIBRARIES = libevas_engine_directfb.la +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@libevas_engine_directfb_la_SOURCES = $(DIRECTFB_SOURCES) +@BUILD_ENGINE_DIRECTFB_TRUE@@EVAS_STATIC_BUILD_DIRECTFB_TRUE@libevas_engine_directfb_la_LIBADD = $(DIRECTFB_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/directfb/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/directfb/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_directfb.la: $(libevas_engine_directfb_la_OBJECTS) $(libevas_engine_directfb_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_directfb_la_rpath) $(libevas_engine_directfb_la_OBJECTS) $(libevas_engine_directfb_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-polygon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polygon.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-polygon.lo: polygon.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-polygon.lo -MD -MP -MF $(DEPDIR)/module_la-polygon.Tpo -c -o module_la-polygon.lo `test -f 'polygon.c' || echo '$(srcdir)/'`polygon.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-polygon.Tpo $(DEPDIR)/module_la-polygon.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polygon.c' object='module_la-polygon.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-polygon.lo `test -f 'polygon.c' || echo '$(srcdir)/'`polygon.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/directfb/evas_engine.c b/libraries/evas/src/modules/engines/directfb/evas_engine.c new file mode 100644 index 0000000..17914ab --- /dev/null +++ b/libraries/evas/src/modules/engines/directfb/evas_engine.c @@ -0,0 +1,1753 @@ +#include +#include +#include +#include +#include +#include "evas_engine.h" +#include "evas_common.h" /* Also includes international specific stuff */ + +/* Uses Evas own image_draw primitive, for comparison purposes only. */ +//#define DFB_USE_EVAS_IMAGE_DRAW 1 +//#define DFB_USE_EVAS_RECT_DRAW 1 +//#define DFB_USE_EVAS_POLYGON_DRAW 1 +//#define DFB_UPDATE_INDIVIDUAL_RECTS 1 +#define DFB_FLIP_FLAGS DSFLIP_NONE +//#define DFB_FLIP_FLAGS (DSFLIP_ONSYNC | DSFLIP_WAIT) + +/* Turn on debug */ +//#define DFB_DEBUG_IMAGE 1 +//#define DFB_DEBUG_FLAGS 1 +//#define DFB_DEBUG_ACCELERATION 1 +int _evas_engine_directfb_log_dom = -1; + +static Evas_Func func = {}; +static Evas_Func parent_func = {}; +static IDirectFB *dfb = NULL; /* XXX HACK to work around evas image cache + * lack of extra data. Fix it instead later. + */ + + +/*********************************************************************** + * Evas helpers + **********************************************************************/ +static void +_context_get_color(RGBA_Draw_Context *dc, int *r, int *g, int *b, int *a) +{ + DATA32 col; + + if (dc->mul.use) + col = dc->mul.col; + else + col = dc->col.col; + + *r = R_VAL(&col); + *g = G_VAL(&col); + *b = B_VAL(&col); + *a = A_VAL(&col); +} + + +/*********************************************************************** + * DirectFB helpers + **********************************************************************/ +static void +_dfb_surface_clear(IDirectFBSurface *surface, int x, int y, int w, int h) +{ + DFBRegion cr; + DFBResult r; + + cr.x1 = x; + cr.y1 = y; + cr.x2 = x + w - 1; + cr.y2 = y + h - 1; + r = surface->SetClip(surface, &cr); + if (r != DFB_OK) + goto error; + + r = surface->Clear(surface, 0, 0, 0, 0); + if (r != DFB_OK) + goto error; + + return; + + error: + ERR("DirectFB: could not clear surface: %s", + DirectFBErrorString(r)); +} + +static void +_image_clear(DirectFB_Engine_Image_Entry *image, int x, int y, int w, int h) +{ + if (image->cache_entry.src->flags.alpha) + _dfb_surface_clear(image->surface, x, y, w, h); +} + +static void +_image_autoset_alpha(DirectFB_Engine_Image_Entry *image) +{ + DFBResult r; + DFBSurfacePixelFormat fmt; + IDirectFBSurface *surface; + RGBA_Image *im; + int has_alpha; + + surface = image->surface; + r = surface->GetPixelFormat(surface, &fmt); + if (r != DFB_OK) + { + ERR("Could not get pixel format: %s", + DirectFBErrorString(r)); + return; + } + + /* XXX: check this in more depth in future, if other PF are supported */ + image->cache_entry.src->flags.alpha = (fmt == DSPF_ARGB); +} + +static void +_dfb_surface_update(IDirectFBSurface *surface, int x, int y, int w, int h) +{ + DFBRegion cr; + DFBResult r; + + cr.x1 = x; + cr.y1 = y; + cr.x2 = x + w - 1; + cr.y2 = y + h - 1; + r = surface->Flip(surface, &cr, DSFLIP_NONE); + if (r != DFB_OK) + WRN("Could not update surface: %s", + DirectFBErrorString(r)); +} + +static IDirectFBSurface * +_dfb_surface_from_data(IDirectFB *dfb, int w, int h, void *data) +{ + IDirectFBSurface *s; + DFBSurfaceDescription desc; + DFBResult r; + + desc.flags = (DSDESC_CAPS | DSDESC_WIDTH | DSDESC_HEIGHT | + DSDESC_PIXELFORMAT | DSDESC_PREALLOCATED); + desc.caps = DSCAPS_PREMULTIPLIED; + desc.width = w; + desc.height = h; + desc.preallocated[0].data = data; + desc.preallocated[0].pitch = w * 4; + desc.preallocated[1].data = NULL; + desc.preallocated[1].pitch = 0; + desc.pixelformat = DSPF_ARGB; + r = dfb->CreateSurface(dfb, &desc, &s); + if (r != DFB_OK) + { + ERR("Cannot create DirectFB surface: %s", + DirectFBErrorString(r)); + return NULL; + } + + s->SetPorterDuff(s, DSPD_SRC_OVER); + + return s; +} + +static void +_dfb_surface_free(IDirectFBSurface *surface) +{ + if (surface) + surface->Release(surface); +} + +static void +_dfb_blit_accel_caps_print(IDirectFBSurface *dst, IDirectFBSurface *src) +{ +#ifdef DFB_DEBUG_ACCELERATION + DFBAccelerationMask mask; + DFBResult r; + + r = dst->GetAccelerationMask(dst, src, &mask); + if (r != DFB_OK) + { + ERR("Could not retrieve acceleration mask: %s", + DirectFBErrorString(r)); + return; + } + + DBG("Acceleration: "); + +#define O(m) if (mask & m) DBG(#m " ") + O(DFXL_FILLRECTANGLE); + O(DFXL_DRAWRECTANGLE); + O(DFXL_DRAWLINE); + O(DFXL_FILLTRIANGLE); + O(DFXL_BLIT); + O(DFXL_STRETCHBLIT); + O(DFXL_TEXTRIANGLES); + O(DFXL_DRAWSTRING); +#undef O + + if (mask == DFXL_NONE) DBG(""); +#endif /* DFB_DEBUG_ACCELERATION */ +} + +#ifdef DFB_DEBUG_FLAGS +static const char * +_dfb_blit_flags_str(DFBSurfaceBlittingFlags flags) +{ + static char buf[1024]; + + buf[0] = 0; + +#define T(m, n) \ + do { \ + if (flags & m) { \ + if (buf[0] != 0) strcat(buf, " | "); \ + strcat(buf, n); \ + } \ + } while (0) + + T(DSBLIT_BLEND_ALPHACHANNEL, "BLEND_ALPHACHANNEL"); + T(DSBLIT_BLEND_COLORALPHA, "BLEND_COLORALPHA"); + T(DSBLIT_COLORIZE, "COLORIZE"); + T(DSBLIT_SRC_COLORKEY, "SRC_COLORKEY"); + T(DSBLIT_DST_COLORKEY, "DST_COLORKEY"); + T(DSBLIT_SRC_PREMULTIPLY, "SRC_PREMULTIPLY"); + T(DSBLIT_DST_PREMULTIPLY, "DST_PREMULTIPLY"); + T(DSBLIT_DEMULTIPLY, "DEMULTIPLY"); + T(DSBLIT_DEINTERLACE, "DSBLIT_DEINTERLACE"); + T(DSBLIT_SRC_PREMULTCOLOR, "SRC_PREMULTCOLOR"); + T(DSBLIT_XOR, "XOR"); + T(DSBLIT_INDEX_TRANSLATION, "INDEX_TRANSLATION"); +#undef T + + if (buf[0] == 0) + strcpy(buf, "NOFX"); + + return buf; +} + +static const char * +_dfb_draw_flags_str(DFBSurfaceDrawingFlags flags) +{ + static char buf[1024]; + + buf[0] = 0; + +#define T(m, n) \ + do { \ + if (flags & m) { \ + if (buf[0] != 0) strcat(buf, " | "); \ + strcat(buf, n); \ + } \ + } while (0) + T(DSDRAW_BLEND, "BLEND"); + T(DSDRAW_DST_COLORKEY, "DST_COLORKEY"); + T(DSDRAW_SRC_PREMULTIPLY, "SRC_PREMULTIPLY"); + T(DSDRAW_DST_PREMULTIPLY, "DST_PREMULTIPLY"); + T(DSDRAW_DEMULTIPLY, "DEMULTIPLY"); + T(DSDRAW_XOR, "DSDRAW_XOR"); +#undef T + if (buf[0] == 0) + strcpy(buf, "NOFX"); + + return buf; +} + +static const char * +_dfb_blend_func_str(DFBSurfaceBlendFunction func) +{ + static char *names[] = { + "ZERO", + "ONE", + "SRCCOLOR", + "INVSRCCOLOR", + "SRCALPHA", + "INVSRCALPHA", + "DESTALPHA", + "INVDESTALPHA", + "DESTCOLOR", + "INVDESTCOLOR", + "SRCALPHASAT" + }; + func--; + if ((func >= 0) && (func <= sizeof(names)/sizeof(*names))) + return names[func]; + else + return NULL; +} +#endif /* DFB_DEBUG_FLAGS */ + +int +_dfb_surface_set_color_from_context(IDirectFBSurface *surface, RGBA_Draw_Context *dc) +{ + DFBSurfaceDrawingFlags flags; + int r, g, b, a; + DFBResult res; + + _context_get_color(dc, &r, &g, &b, &a); + if (a == 0) + return 0; + + r = 0xff * r / a; + g = 0xff * g / a; + b = 0xff * b / a; + + res = surface->SetColor(surface, r, g, b, a); + if (res != DFB_OK) + goto error; + + flags = (a != 255) ? DSDRAW_BLEND : DSDRAW_NOFX; + res = surface->SetDrawingFlags(surface, flags); + if (res != DFB_OK) + goto error; + +#ifdef DFB_DEBUG_FLAGS + DBG("Color=%d %d %d %d, flags=%s", + r, g, b, a, _dfb_draw_flags_str(flags)); +#endif /* DFB_DEBUG_FLAGS */ + + return 1; + + error: + ERR("Could not set color from context: %s", + DirectFBErrorString(res)); + return 0; +} + +static int +_dfb_surface_set_blit_params(DirectFB_Engine_Image_Entry *d, DirectFB_Engine_Image_Entry *s, RGBA_Draw_Context *dc) +{ + IDirectFBSurface *surface; + DFBSurfaceBlittingFlags blit_flags = DSBLIT_NOFX; + DFBResult res; + int r, g, b, a; + + _context_get_color(dc, &r, &g, &b, &a); + if (a == 0) + return 0; + + if (a != 255) + blit_flags = DSBLIT_BLEND_COLORALPHA | DSBLIT_SRC_PREMULTCOLOR; + + if ((r != a) || (g != a) || (b != a)) + { + blit_flags |= DSBLIT_COLORIZE; + + r = 0xff * r / a; + g = 0xff * g / a; + b = 0xff * b / a; + } + + if (s->cache_entry.src->flags.alpha) + blit_flags |= DSBLIT_BLEND_ALPHACHANNEL; + + surface = d->surface; + + if (blit_flags & + (DSBLIT_BLEND_COLORALPHA | DSBLIT_SRC_PREMULTCOLOR | DSBLIT_COLORIZE)) + { + res = surface->SetColor(surface, r, g, b, a); + if (res != DFB_OK) + goto error; + } + + res = surface->SetBlittingFlags(surface, blit_flags); + if (res != DFB_OK) + goto error; + +#ifdef DFB_DEBUG_FLAGS + DBG("sfunc=%s, dfunc=%s, color=%d %d %d %d, blit=%s, draw=%s", + _dfb_blend_func_str(src_func), _dfb_blend_func_str(dst_func), + r, g, b, a, + _dfb_blit_flags_str(blit_flags), _dfb_draw_flags_str(draw_flags)); +#endif /* DFB_DEBUG_FLAGS */ + + return 1; + + error: + ERR("Could not set blit params: %s", + DirectFBErrorString(res)); + return 0; +} + +static int +_dfb_lock_and_sync_image(IDirectFBSurface *surface, RGBA_Image *image, DFBSurfaceLockFlags flags) +{ + DFBResult r; + int pitch, sw, sh; + void *pixels; + + r = surface->GetSize(surface, &sw, &sh); + if (r != DFB_OK) + return 0; + + r = surface->Lock(surface, flags, &pixels, &pitch); + if (r != DFB_OK) + return 0; + + if (pitch != (sw * 4)) + { + /* XXX TODO: support other pixel formats. */ + ERR("IDirectFBSurface pitch(%d) is not supported: " + "should be %d.", + pitch, sw * 4); + surface->Unlock(surface); + return 0; + } + + image->cache_entry.w = sw; + image->cache_entry.h = sh; + image->image.data = pixels; + return 1; +} + +typedef void (*_cb_for_each_cutout_t)(IDirectFBSurface *surface, RGBA_Draw_Context *dc, const DFBRegion *region, void *data); +static void +_dfb_surface_for_each_cutout(IDirectFBSurface *surface, RGBA_Draw_Context *dc, _cb_for_each_cutout_t cb, void *data) +{ + Cutout_Rects *rects; + int i; + + rects = evas_common_draw_context_apply_cutouts(dc); + if (!rects) + { + DFBRegion cr; + cr.x1 = 0; + cr.y1 = 0; + surface->GetSize(surface, &cr.x2, &cr.y2); + cr.x2 -= 1; + cr.y2 -= 1; + surface->SetClip(surface, NULL); + cb(surface, dc, &cr, data); + return; + } + + for (i = 0; i < rects->active; ++i) + { + Cutout_Rect *r; + DFBRegion cr; + + r = rects->rects + i; + + cr.x1 = r->x; + cr.y1 = r->y; + cr.x2 = r->x + r->w - 1; + cr.y2 = r->y + r->h - 1; + surface->SetClip(surface, &cr); + cb(surface, dc, &cr, data); + } + evas_common_draw_context_apply_clear_cutouts(rects); +} + +static void +_dfb_rect_set(DFBRectangle *r, int x, int y, int w, int h) +{ + r->x = x; + r->y = y; + r->w = w; + r->h = h; +} + + +/*********************************************************************** + * Image Cache + **********************************************************************/ +static Engine_Image_Entry * +evas_cache_image_dfb_alloc(void) +{ + DirectFB_Engine_Image_Entry *deie; + + deie = calloc(1, sizeof (DirectFB_Engine_Image_Entry)); + + return (Engine_Image_Entry *)deie; +} + +static void +evas_cache_image_dfb_delete(Engine_Image_Entry *eie) +{ + free(eie); +} + +static int +evas_cache_image_dfb_constructor(Engine_Image_Entry *eie, void *data) +{ + DirectFB_Engine_Image_Entry *deie = (DirectFB_Engine_Image_Entry *)eie; + Render_Engine *re = data; + IDirectFBSurface *s; + RGBA_Image *im; + + im = (RGBA_Image *)eie->src; + if (!im) + return EVAS_LOAD_ERROR_NONE; // XXX TODO: confirm? + + evas_cache_image_load_data(&im->cache_entry); + if (!im->image.data) + return EVAS_LOAD_ERROR_NONE; // XXX TODO: confirm? + + s = _dfb_surface_from_data(re->spec->dfb, eie->w, eie->h, im->image.data); + if (!s) + return EVAS_LOAD_ERROR_GENERIC; + + deie->surface = s; + deie->flags.engine_surface = 0; + + return EVAS_LOAD_ERROR_NONE; +} + +static void +evas_cache_image_dfb_destructor(Engine_Image_Entry *eie) +{ + DirectFB_Engine_Image_Entry *deie = (DirectFB_Engine_Image_Entry *)eie; + + if (!deie->flags.engine_surface) + _dfb_surface_free(deie->surface); + deie->surface = NULL; +} + +/* note: dst have some properties set, like desired size (w, h) */ +static int +_cache_image_copy(Engine_Image_Entry *dst, const Engine_Image_Entry *src) +{ + DirectFB_Engine_Image_Entry *dst_deie; + const DirectFB_Engine_Image_Entry *src_deie; + IDirectFBSurface *s; + RGBA_Image *im; + + dst_deie = (DirectFB_Engine_Image_Entry *)dst; + src_deie = (const DirectFB_Engine_Image_Entry *)src; + im = (RGBA_Image *)dst->src; + s = _dfb_surface_from_data(dfb, dst->w, dst->h, im->image.data); + if (!s) + return -1; + + dst_deie->surface = s; + dst_deie->flags.engine_surface = 0; + + return 0; +} + +static int +evas_cache_image_dfb_dirty(Engine_Image_Entry *dst, const Engine_Image_Entry *src) +{ + return _cache_image_copy(dst, src); +} + +static void +evas_cache_image_dfb_dirty_region(Engine_Image_Entry *eim, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +{ + RGBA_Image *im; + + im = (RGBA_Image *)eim->src; + im->flags |= RGBA_IMAGE_IS_DIRTY; +} + +static int +evas_cache_image_dfb_update_data(Engine_Image_Entry *dst, void *engine_data) +{ + DirectFB_Engine_Image_Entry *deie = (DirectFB_Engine_Image_Entry *)dst; + IDirectFBSurface *s = engine_data; + Image_Entry *ie; + RGBA_Image *im; + + ie = dst->src; + im = (RGBA_Image *)ie; + + if (s) + { + deie->surface = s; + + /* XXX why size is required here? */ + s->GetSize(s, &dst->w, &dst->h); + + if (im) + { + im->image.data = NULL; /* IDirectFBSurface requires lock */ + im->image.no_free = 1; + ie->w = dst->w; + ie->h = dst->h; + _image_autoset_alpha(deie); + } + } + else + { + _dfb_surface_free(deie->surface); + s = _dfb_surface_from_data(dfb, dst->w, dst->h, im->image.data); + deie->surface = s; + } + + return 0; +} + +static int +evas_cache_image_dfb_size_set(Engine_Image_Entry *dst, const Engine_Image_Entry *src) +{ + return _cache_image_copy(dst, src); +} + +static void +evas_cache_image_dfb_load(Engine_Image_Entry *eim, const Image_Entry *ie) +{ + DirectFB_Engine_Image_Entry *deie = (DirectFB_Engine_Image_Entry *)eim; + IDirectFBSurface *s; + const RGBA_Image *im; + + if (deie->surface) + return; + + im = (const RGBA_Image *)ie; + s = _dfb_surface_from_data(dfb, eim->w, eim->h, im->image.data); + deie->surface = s; +} + +static int +evas_cache_image_dfb_mem_size_get(Engine_Image_Entry *eie) +{ + DirectFB_Engine_Image_Entry *deie = (DirectFB_Engine_Image_Entry *)eie; + DFBResult r; + int size, w, h; + + if (!deie->surface) + return 0; + + size = sizeof(*deie->surface); + + r = deie->surface->GetSize(deie->surface, &w, &h); + if (r != DFB_OK) + { + ERR("Could not get surface size: %s", + DirectFBErrorString(r)); + return size; + } + + size += w * h * 4; // XXX get correct surface size using pixelformat + + return size; +} + +#ifdef DFB_DEBUG_IMAGE +static void +evas_cache_image_dfb_debug(const char *context, Engine_Image_Entry* eie) +{ + DirectFB_Engine_Image_Entry *eim = (DirectFB_Engine_Image_Entry *)eie; + + DBG("*** %s image (%p) ***", context, eim); + if (eim) + { + DBG("W: %d, H: %d, R: %d, Key: %s, DFB Surface: %p", + eie->w, eie->h, eie->references, eie->cache_key, eim->surface); + + if (eie->src) + DBG("Pixels: %p", ((RGBA_Image*) eie->src)->image.data); + } + DBG("*** ***"); +} +#endif + +static const Evas_Cache_Engine_Image_Func _dfb_cache_engine_image_cb = { + NULL /* key */, + evas_cache_image_dfb_alloc /* alloc */, + evas_cache_image_dfb_delete /* dealloc */, + evas_cache_image_dfb_constructor /* constructor */, + evas_cache_image_dfb_destructor /* destructor */, + evas_cache_image_dfb_dirty_region /* dirty_region */, + evas_cache_image_dfb_dirty /* dirty */, + evas_cache_image_dfb_size_set /* size_set */, + evas_cache_image_dfb_update_data /* update_data */, + evas_cache_image_dfb_load /* load */, + evas_cache_image_dfb_mem_size_get /* mem_size_get */, +#ifdef DFB_DEBUG_IMAGE /* debug */ + evas_cache_image_dfb_debug +#else + NULL +#endif +}; + + +/*********************************************************************** + * Evas Engine + **********************************************************************/ +static void * +evas_engine_dfb_info(Evas* e __UNUSED__) +{ + Evas_Engine_Info_DirectFB *info; + info = calloc(1, sizeof(Evas_Engine_Info_DirectFB)); + if (!info) + return NULL; + info->magic.magic = rand(); + return info; +} + +static void +evas_engine_dfb_info_free(Evas *e __UNUSED__, void *in) +{ + Evas_Engine_Info_DirectFB *info = in; + free(info); +} + +static Eina_Bool +_is_dfb_data_ok(IDirectFB *idfb, IDirectFBSurface *surface, int w, int h) +{ + DFBResult r; + int sw, sh; + + if (!idfb) + { + ERR("missing IDirectFB"); + return EINA_FALSE; + } + dfb = idfb; + + if (!surface) + { + ERR("missing IDirectFBSurface"); + return EINA_FALSE; + } + + r = surface->GetSize(surface, &sw, &sh); + if (r != DFB_OK) + { + ERR("Could not get surface %p size: %s", + surface, DirectFBErrorString(r)); + return EINA_FALSE; + } + + if ((w > sw) || (h > sh)) + { + ERR("Requested size is larger than surface: %dx%d > %dx%d", + w, h, sw, sh); + return EINA_FALSE; + } + else if ((w <= 0) || (h <= 0)) + { + w = sw; + h = sh; + } + + return EINA_TRUE; +} + +static void +_evas_common_init(void) +{ + evas_common_cpu_init(); + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); +} + +static int +evas_engine_dfb_output_reconfigure(Render_Engine *re, int w, int h) +{ + if (re->screen_image) + evas_cache_engine_image_drop(&re->screen_image->cache_entry); + + if (re->tb) + evas_common_tilebuf_free(re->tb); + + re->tb = evas_common_tilebuf_new(w, h); + if (!re->tb) + { + ERR("Could not allocate tile buffer."); + goto failed_tilebuf; + } + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + + /* We create a "fake" RGBA_Image which points to the IDirectFB surface. + * Each access to that surface is wrapped in Lock / Unlock calls whenever + * the data is manipulated directly. + */ + re->screen_image = (DirectFB_Engine_Image_Entry *) + evas_cache_engine_image_engine(re->cache, re->spec->surface); + if (!re->screen_image) + { + ERR("RGBA_Image allocation from DFB failed"); + goto failed_image; + } + re->screen_image->flags.engine_surface = 1; + + _image_autoset_alpha(re->screen_image); + _image_clear(re->screen_image, 0, 0, w, h); + + return 1; + + failed_image: + evas_common_tilebuf_free(re->tb); + re->tb = NULL; + failed_tilebuf: + re->screen_image = NULL; + ERR("Evas DirectFB reconfigure failed"); + return 0; +} + +static void * +_dfb_output_setup(int w, int h, const struct Evas_Engine_DirectFB_Spec *spec) +{ + Render_Engine *re; + + if (!_is_dfb_data_ok(spec->dfb, spec->surface, w, h)) + goto fatal; + + _evas_common_init(); + + re = calloc(1, sizeof(Render_Engine)); + if (!re) + { + perror("calloc"); + goto fatal; + } + re->dfb = spec->dfb; + re->spec = spec; + re->cache = evas_cache_engine_image_init(&_dfb_cache_engine_image_cb, + evas_common_image_cache_get()); + if (!re->cache) + { + ERR("Evas_Cache_Engine_Image allocation failed!"); + goto fatal_after_engine; + } + + if (!evas_engine_dfb_output_reconfigure(re, w, h)) + { + ERR("Could not reconfigure evas engine."); + goto fatal_after_reconfigure; + } + + _dfb_blit_accel_caps_print(spec->surface, NULL); + + return re; + + + fatal_after_reconfigure: + evas_cache_engine_image_shutdown(re->cache); + fatal_after_engine: + free(re); + fatal: + CRIT("DirectFB: unable to continue, abort()!"); + abort(); + return NULL; +} + +static int +evas_engine_dfb_setup(Evas *e, void *in) +{ + Evas_Engine_Info_DirectFB *info = in; + + if (!e->engine.data.output) + e->engine.data.output = _dfb_output_setup(e->output.w, e->output.h, + &info->info); + // XXX TODO: else reconfigure existing... + + if (!e->engine.data.output) + return 0; + + if (!e->engine.data.context) + e->engine.data.context = + e->engine.func->context_new(e->engine.data.output); + + return 1; +} + +static void +evas_engine_dfb_output_free(void *data) +{ + Render_Engine *re = data; + + if (!re) + return; + + if (re->cache) + evas_cache_engine_image_shutdown(re->cache); + + evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); +} + +static void +evas_engine_dfb_output_resize(void *data, int w, int h) +{ + if (!evas_engine_dfb_output_reconfigure(data, w, h)) + ERR("Failed to resize DirectFB evas"); +} + +static void +evas_engine_dfb_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re = data; + + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +evas_engine_dfb_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re = data; + + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +evas_engine_dfb_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re = data; + + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +evas_engine_dfb_output_redraws_clear(void *data) +{ + Render_Engine *re = data; + + evas_common_tilebuf_clear(re->tb); +} + +static void * +evas_engine_dfb_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re = data; + Tilebuf_Rect *tb_rect; + + if (re->end) + { + re->end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + re->cur_rect = EINA_INLIST_GET(re->rects); + } + if (!re->cur_rect) + return NULL; + + tb_rect = (Tilebuf_Rect*) re->cur_rect; + *cx = *x = tb_rect->x; + *cy = *y = tb_rect->y; + *cw = *w = tb_rect->w; + *ch = *h = tb_rect->h; + re->cur_rect = re->cur_rect->next; + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = 1; + } + + return re->screen_image; +} + +static void +evas_engine_dfb_output_redraws_next_update_push(void *data, void *surface __UNUSED__, int x, int y, int w, int h) +{ + Render_Engine *re = data; + DFBRegion *r; + + if (re->update_regions_count >= re->update_regions_limit) + { + void *tmp; + + re->update_regions_limit += 16; + + tmp = realloc(re->update_regions, + sizeof(DFBRegion) * re->update_regions_limit); + if (!tmp) + { + perror("realloc"); + return; + } + re->update_regions = tmp; + } + + r = re->update_regions + re->update_regions_count; + re->update_regions_count++; + + r->x1 = x; + r->y1 = y; + r->x2 = x + w - 1; + r->y2 = y + h - 1; +} + +static void +evas_engine_dfb_output_flush(void *data) +{ + Render_Engine *re = data; + IDirectFBSurface *s = re->screen_image->surface; + DFBRegion *r, *r_end; + + r = re->update_regions; + r_end = re->update_regions + re->update_regions_count; + +#ifdef DFB_UPDATE_INDIVIDUAL_RECTS + for (; r < r_end; r++) + s->Flip(s, r, DFB_FLIP_FLAGS); +#else + DFBRegion bb; + + bb.x1 = bb.y1 = 10000; + bb.x2 = bb.y2 = 0; + for (; r < r_end; r++) + { + if (bb.x1 > r->x1) + bb.x1 = r->x1; + if (bb.y1 > r->y1) + bb.y1 = r->y1; + + if (bb.x2 < r->x2) + bb.x2 = r->x2; + if (bb.y2 < r->y2) + bb.y2 = r->y2; + } + + s->Flip(s, &bb, DFB_FLIP_FLAGS); +#endif + + re->update_regions_count = 0; +} + +static void +evas_engine_dfb_output_idle_flush(void *data) +{ + Render_Engine *re = data; + + if (re->update_regions_count != 0) + ERR("update_regions_count not 0 as it should be!"); + + free(re->update_regions); + re->update_regions_count = 0; + re->update_regions_limit = 0; + re->update_regions = NULL; +} + +/* HACK!!! -- KLUDGE!!! + * + * This should really use IDirectFBFont and IDirectFBSurface::DrawString(), + * but to be edje-compatible IDirectFBFont::CreateFont() should be able to + * load fonts from non-files, which it does not. + * + * Try to find a way to create own IDirectFBFont in future and load from + * memory. + */ +static void +evas_engine_dfb_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props) +{ + DirectFB_Engine_Image_Entry *eim = surface; + IDirectFBSurface *screen; + Render_Engine *re = data; + RGBA_Image *im; + + im = (RGBA_Image *)eim->cache_entry.src; + screen = eim->surface; + if (!_dfb_lock_and_sync_image(screen, im, DSLF_READ | DSLF_WRITE)) + return; + + evas_common_font_draw(im, context, font, x, y, intl_props); + evas_common_cpu_end_opt(); + + im->image.data = NULL; + + screen->Unlock(screen); +} + + +static void +_cb_draw_line(IDirectFBSurface *surface, RGBA_Draw_Context *dc __UNUSED__, const DFBRegion *region __UNUSED__, void *data) +{ + const Eina_Rectangle *r = data; + + surface->DrawLine(surface, r->x, r->y, r->w, r->h); /* x2, y2 really */ +} + +static void +evas_engine_dfb_line_draw(void *data __UNUSED__, void *context, void *surface, int x1, int y1, int x2, int y2) +{ + DirectFB_Engine_Image_Entry *eim = surface; + Eina_Rectangle r; + + if (!_dfb_surface_set_color_from_context(eim->surface, context)) + return; + + EINA_RECTANGLE_SET(&r, x1, y1, x2, y2); /* x2, y2 (ab)used as w, h */ + _dfb_surface_for_each_cutout(eim->surface, context, _cb_draw_line, &r); +} + +#ifndef DFB_USE_EVAS_RECT_DRAW +static void +_cb_draw_rectangle(IDirectFBSurface *surface, RGBA_Draw_Context *dc __UNUSED__, const DFBRegion *region __UNUSED__, void *data) +{ + const Eina_Rectangle *r = data; + + surface->FillRectangle(surface, r->x, r->y, r->w, r->h); +} + +static void +evas_engine_dfb_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h) +{ + DirectFB_Engine_Image_Entry *eim = surface; + IDirectFBSurface *screen; + Render_Engine *re = data; + RGBA_Draw_Context *dc = context; + Eina_Rectangle r; + + screen = eim->surface; + if (!_dfb_surface_set_color_from_context(screen, context)) + { + if (dc->render_op != EVAS_RENDER_COPY) + return; + if (!eim->cache_entry.src->flags.alpha) + return; + screen->SetColor(screen, 0, 0, 0, 0); + screen->SetDrawingFlags(screen, DSDRAW_NOFX); + } + + EINA_RECTANGLE_SET(&r, x, y, w, h); + _dfb_surface_for_each_cutout(screen, context, _cb_draw_rectangle, &r); +} +#else +static void +evas_engine_dfb_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h) +{ + DirectFB_Engine_Image_Entry *eim = surface; + IDirectFBSurface *screen; + Render_Engine *re = data; + RGBA_Image *dst; + + dst = (RGBA_Image *)eim->cache_entry.src; + screen = eim->surface; + if (!_dfb_lock_and_sync_image(screen, dst, DSLF_READ | DSLF_WRITE)) + return; + + evas_common_rectangle_draw(dst, context, x, y, w, h); + evas_common_cpu_end_opt(); + + dst->image.data = NULL; + + screen->Unlock(screen); +} +#endif + +#ifndef DFB_USE_EVAS_POLYGON_DRAW +static void +evas_engine_dfb_polygon_draw(void *data __UNUSED__, void *context, void *surface, void *polygon, int x, int y) +{ + _dfb_polygon_draw(surface, context, polygon, x, y); +} +#else +static void +evas_engine_dfb_polygon_draw(void *data, void *context, void *surface, void *polygon, int x, int y) +{ + DirectFB_Engine_Image_Entry *eim = surface; + IDirectFBSurface *screen; + Render_Engine *re = data; + RGBA_Image *dst; + + dst = (RGBA_Image *)eim->cache_entry.src; + screen = eim->surface; + if (!_dfb_lock_and_sync_image(screen, dst, DSLF_READ | DSLF_WRITE)) + return; + + evas_common_polygon_draw(dst, context, polygon, x, y); + evas_common_cpu_end_opt(); + + dst->image.data = NULL; + + screen->Unlock(screen); +} +#endif + +/** Image Object *******************************************************/ +static void * +evas_engine_dfb_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + Render_Engine *re = data; + + *error = 0; + return evas_cache_engine_image_request(re->cache, file, key, lo, + data, error); +} + +static int +evas_engine_dfb_image_alpha_get(void *data __UNUSED__, void *image) +{ + DirectFB_Engine_Image_Entry *eim = image; + Image_Entry *ie; + RGBA_Image *im; + + if (!eim) return 1; + ie = eim->cache_entry.src; + im = (RGBA_Image *)ie; + switch (ie->space) + { + case EVAS_COLORSPACE_ARGB8888: + if (ie->flags.alpha) return 1; + default: + break; + } + return 0; +} + +static void +evas_engine_dfb_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) +{ + DirectFB_Engine_Image_Entry *eim = image; + Image_Entry *ie; + + ie = eim->cache_entry.src; + if (w) *w = ie->w; + if (h) *h = ie->h; +} + +static int +evas_engine_dfb_image_colorspace_get(void *data __UNUSED__, void *image) +{ + DirectFB_Engine_Image_Entry *eim = image; + + if (!eim) return EVAS_COLORSPACE_ARGB8888; + return eim->cache_entry.src->space; +} + +static void +evas_engine_dfb_image_colorspace_set(void *data, void *image, int cspace) +{ + DirectFB_Engine_Image_Entry *eim = image; + + if (!eim) return; + if (eim->cache_entry.src->space == cspace) return; + + evas_cache_engine_image_colorspace(&eim->cache_entry, cspace, data); +} + +static void * +evas_engine_dfb_image_new_from_copied_data(void *data, int w, int h, DATA32* image_data, int alpha, int cspace) +{ + Render_Engine *re = data; + + return evas_cache_engine_image_copied_data(re->cache, w, h, image_data, + alpha, cspace, NULL); +} + +static void * +evas_engine_dfb_image_new_from_data(void *data, int w, int h, DATA32* image_data, int alpha, int cspace) +{ + Render_Engine *re = data; + + return evas_cache_engine_image_data(re->cache, w, h, image_data, + alpha, cspace, NULL); +} + +static void +evas_engine_dfb_image_free(void *data __UNUSED__, void *image) +{ + DirectFB_Engine_Image_Entry *eim = image; + + evas_cache_engine_image_drop(&eim->cache_entry); +} + +static void * +evas_engine_dfb_image_size_set(void *data __UNUSED__, void *image, int w, int h) +{ + DirectFB_Engine_Image_Entry *eim = image; + + return evas_cache_engine_image_size_set(&eim->cache_entry, w, h); +} + +static void * +evas_engine_dfb_image_dirty_region(void *data __UNUSED__, void *image, int x, int y, int w, int h) +{ + DirectFB_Engine_Image_Entry *eim = image; + + return evas_cache_engine_image_dirty(&eim->cache_entry, x, y, w, h); +} + +static void * +evas_engine_dfb_image_data_get(void *data __UNUSED__, void *image, int to_write, DATA32** image_data) +{ + DirectFB_Engine_Image_Entry *deie = image; + Engine_Image_Entry *ce; + Image_Entry *ie; + RGBA_Image *im; + + if (!deie) + { + *image_data = NULL; + return NULL; + } + + ce = (Engine_Image_Entry *)deie; + ie = ce->src; + im = (RGBA_Image *)ie; + + switch (ie->space) + { + case EVAS_COLORSPACE_ARGB8888: + { + DFBResult r; + IDirectFBSurface *s; + void *pixels; + int pitch; + + if (to_write) + deie = (DirectFB_Engine_Image_Entry *) + evas_cache_engine_image_dirty(ce, 0, 0, ie->w, ie->h); + + evas_cache_engine_image_load_data(ce); + + ce = (Engine_Image_Entry *)deie; + ie = ce->src; + im = (RGBA_Image *)ie; + s = deie->surface; + + if (to_write) + { + r = s->Lock(s, DSLF_WRITE, &pixels, &pitch); + if (r != DFB_OK) + goto error; + deie->flags.is_locked = 1; + } + else + { + r = s->Lock(s, DSLF_READ, &pixels, &pitch); + if (r != DFB_OK) + goto error; + s->Unlock(s); + } + + *image_data = pixels; + im->image.data = pixels; /* remember for _put() */ + break; + + error: + ERR("Could not lock surface %p: %s", + s, DirectFBErrorString(r)); + *image_data = NULL; + break; + } + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + /* XXX untested */ + *image_data = im->cs.data; + break; + default: + abort(); + break; + } + return deie; +} + +static void * +evas_engine_dfb_image_data_put(void *data, void *image, DATA32* image_data) +{ + DirectFB_Engine_Image_Entry *deie = image; + Render_Engine *re = data; + Engine_Image_Entry *ce; + Image_Entry *ie; + RGBA_Image *im; + + if (!deie) return NULL; + + ce = (Engine_Image_Entry *)deie; + ie = ce->src; + im = (RGBA_Image*)ie; + + switch (ie->space) + { + case EVAS_COLORSPACE_ARGB8888: + if (image_data == im->image.data) + { + if (deie->flags.is_locked) + { + deie->surface->Unlock(deie->surface); + deie->flags.is_locked = 0; + } + } + else + { + int alpha, cspace; + + alpha = func.image_alpha_get(re, deie); + cspace = func.image_colorspace_get(re, deie); + + evas_cache_engine_image_drop(ce); + deie = (DirectFB_Engine_Image_Entry *) + evas_cache_engine_image_data(re->cache, ce->w, ce->h, + image_data, alpha, cspace, NULL); + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + /* XXX untested */ + if (image_data != im->cs.data) + { + if (im->cs.data) + if (!im->cs.no_free) + free(im->cs.data); + im->cs.data = image_data; + evas_common_image_colorspace_dirty(im); + } + break; + default: + abort(); + break; + } + return deie; +} + +static void +evas_engine_dfb_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) +{ + DirectFB_Engine_Image_Entry *deie = image; + RGBA_Image *im; + + if (!deie) return ; + im = (RGBA_Image*) deie->cache_entry.src; + if (!im) return ; + evas_cache_image_preload_data(&im->cache_entry, target); +} + +static void +evas_engine_dfb_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) +{ + DirectFB_Engine_Image_Entry *deie = image; + RGBA_Image *im; + + if (!deie) return ; + im = (RGBA_Image*) deie->cache_entry.src; + if (!im) return ; + evas_cache_image_preload_cancel(&im->cache_entry, target); +} + +static void * +evas_engine_dfb_image_alpha_set(void *data __UNUSED__, void *image, int has_alpha) +{ + DirectFB_Engine_Image_Entry *eim = image; + Engine_Image_Entry *ce; + Image_Entry *ie; + RGBA_Image *im; + + if (!eim) return NULL; + + ce = &eim->cache_entry; + ie = ce->src; + im = (RGBA_Image*)ie; + + if (ie->space != EVAS_COLORSPACE_ARGB8888) + { + ie->flags.alpha = 0; + return eim; + } + + eim = (DirectFB_Engine_Image_Entry *) + evas_cache_engine_image_dirty(ce, 0, 0, ce->w, ce->h); + + ie->flags.alpha = !!has_alpha; + return eim; +} + +struct _for_each_cutout_image +{ + IDirectFBSurface *image; + DFBRectangle src, dst; +}; + +static void +_cb_draw_image_unscaled(IDirectFBSurface *surface, RGBA_Draw_Context *dc __UNUSED__, const DFBRegion *region __UNUSED__, void *data) +{ + const struct _for_each_cutout_image *p = data; + + surface->Blit(surface, p->image, &p->src, p->dst.x, p->dst.y); +} + +static void +_cb_draw_image_scaled(IDirectFBSurface *surface, RGBA_Draw_Context *dc __UNUSED__, const DFBRegion *region __UNUSED__, void *data) +{ + const struct _for_each_cutout_image *p = data; + + surface->StretchBlit(surface, p->image, &p->src, &p->dst); +} + +#ifndef DFB_USE_EVAS_IMAGE_DRAW +static void +evas_engine_dfb_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth __UNUSED__) +{ + DirectFB_Engine_Image_Entry *eim = surface; + Render_Engine *re = data; + IDirectFBSurface *screen; + DirectFB_Engine_Image_Entry *deie = image; + struct _for_each_cutout_image p; + _cb_for_each_cutout_t cb; + + screen = eim->surface; + if (deie->cache_entry.src->space == EVAS_COLORSPACE_ARGB8888) + evas_cache_engine_image_load_data(&deie->cache_entry); + + evas_common_image_colorspace_normalize((RGBA_Image *)deie->cache_entry.src); + + _dfb_surface_set_blit_params(eim, deie, context); + + _dfb_rect_set(&p.src, src_x, src_y, src_w, src_h); + _dfb_rect_set(&p.dst, dst_x, dst_y, dst_w, dst_h); + p.image = deie->surface; + + if ((src_w == dst_w) && (src_h == dst_h)) + cb = _cb_draw_image_unscaled; + else + cb = _cb_draw_image_scaled; + + _dfb_blit_accel_caps_print(screen, deie->surface); + _dfb_surface_for_each_cutout(screen, context, cb, &p); +} +#else /* DFB_USE_EVAS_IMAGE_DRAW */ +static void +evas_engine_dfb_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth) +{ + DirectFB_Engine_Image_Entry *deie = image; + DirectFB_Engine_Image_Entry *eim = surface; + Render_Engine *re = data; + RGBA_Image *dst, *src; + IDirectFBSurface *screen; + + screen = eim->surface; + if (deie->cache_entry.src->space == EVAS_COLORSPACE_ARGB8888) + evas_cache_engine_image_load_data(&deie->cache_entry); + + evas_common_image_colorspace_normalize((RGBA_Image *)deie->cache_entry.src); + + dst = (RGBA_Image *)eim->cache_entry.src; + if (!_dfb_lock_and_sync_image(screen, dst, DSLF_READ | DSLF_WRITE)) + return; + + src = (RGBA_Image *)deie->cache_entry.src; + if (!_dfb_lock_and_sync_image(deie->surface, src, DSLF_READ)) + goto error_src; + + if (smooth) + evas_common_scale_rgba_in_to_out_clip_smooth(src, dst, context, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h); + else + evas_common_scale_rgba_in_to_out_clip_sample(src, dst, context, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h); + evas_common_cpu_end_opt(); + + dst->image.data = NULL; + + screen->Unlock(screen); + deie->surface->Unlock(deie->surface); + + return; + + error_src: + screen->Unlock(screen); +} +#endif + +static void +evas_engine_dfb_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) +{ + Render_Engine *re = (Render_Engine*) data; + DirectFB_Engine_Image_Entry *deie = image; + DirectFB_Engine_Image_Entry *eim = surface; + IDirectFBSurface *screen; + RGBA_Image *dst, *src; + + if (!deie || !eim) return ; + + screen = eim->surface; + dst = (RGBA_Image *) eim->cache_entry.src; + if (!_dfb_lock_and_sync_image(screen, dst, DSLF_READ | DSLF_WRITE)) + return; + + src = (RGBA_Image *)deie->cache_entry.src; + if (!_dfb_lock_and_sync_image(deie->surface, src, DSLF_READ)) + goto error_src; + + evas_common_map_rgba(src, dst, context, 4, p, smooth, level); + evas_common_cpu_end_opt(); + + screen->Unlock(screen); + deie->surface->Unlock(deie->surface); + + return ; + + error_src: + screen->Unlock(screen); +} + +static void * +evas_engine_dfb_image_map_surface_new(void *data, int w, int h, int alpha) +{ + Render_Engine *re = (Render_Engine*) data; + void *surface; + + surface = evas_cache_engine_image_copied_data(re->cache, + w, h, NULL, alpha, + EVAS_COLORSPACE_ARGB8888, + NULL); + return surface; +} + +static void +evas_engine_dfb_image_map_surface_free(void *data __UNUSED__, void *surface) +{ + evas_cache_engine_image_drop(surface); +} + + +static void +evas_engine_dfb_image_cache_flush(void *data) +{ + Render_Engine *re = data; + int size; + + size = evas_cache_engine_image_get(re->cache); + evas_cache_engine_image_set(re->cache, 0); + evas_cache_engine_image_set(re->cache, size); +} + +static void +evas_engine_dfb_image_cache_set(void *data, int bytes) +{ + Render_Engine *re = data; + + evas_cache_engine_image_set(re->cache, bytes); +} + +static int +evas_engine_dfb_image_cache_get(void *data) +{ + Render_Engine *re = data; + + return evas_cache_engine_image_get(re->cache); +} + +static char * +evas_engine_dfb_image_comment_get(void *data __UNUSED__, void *image, char *key __UNUSED__) +{ + DirectFB_Engine_Image_Entry *eim = image; + RGBA_Image *im; + + if (!eim) return NULL; + im = (RGBA_Image *)eim->cache_entry.src; + + return im->info.comment; +} + +static void +evas_engine_dfb_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) +{ +} + +static int +evas_engine_dfb_image_scale_hint_get(void *data __UNUSED__, void *image) +{ + return EVAS_IMAGE_SCALE_HINT_NONE; +} + +static Eina_Bool +evas_engine_dfb_canvas_alpha_get(void *data, void *context) +{ + Render_Engine *re = data; + + return re->screen_image->cache_entry.src->flags.alpha; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&parent_func, "software_generic")) return 0; + _evas_engine_directfb_log_dom = eina_log_domain_register + ("evas-directfb", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_directfb_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = parent_func; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, evas_engine_dfb_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + ORD(image_load); + ORD(image_new_from_data); + ORD(image_new_from_copied_data); + ORD(image_colorspace_set); + ORD(image_colorspace_get); + ORD(image_free); + ORD(image_size_set); + ORD(image_size_get); + ORD(image_dirty_region); + ORD(image_data_get); + ORD(image_data_put); + ORD(image_data_preload_request); + ORD(image_data_preload_cancel); + ORD(image_alpha_set); + ORD(image_alpha_get); + ORD(image_draw); + ORD(image_comment_get); + ORD(image_cache_flush); + ORD(image_cache_set); + ORD(image_cache_get); + ORD(font_draw); + ORD(line_draw); + ORD(rectangle_draw); + ORD(polygon_draw); + ORD(image_scale_hint_set); + ORD(image_scale_hint_get); + + ORD(image_map_draw); + ORD(image_map_surface_new); + ORD(image_map_surface_free); + + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em) +{ + eina_log_domain_unregister(_evas_engine_directfb_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "directfb", + "ProFUSION embedded systems", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, directfb); + +#ifndef EVAS_STATIC_BUILD_DIRECTFB +EVAS_EINA_MODULE_DEFINE(engine, directfb); +#endif diff --git a/libraries/evas/src/modules/engines/directfb/evas_engine.h b/libraries/evas/src/modules/engines/directfb/evas_engine.h new file mode 100644 index 0000000..7ad1e38 --- /dev/null +++ b/libraries/evas/src/modules/engines/directfb/evas_engine.h @@ -0,0 +1,71 @@ +#ifndef EVAS_ENGINE_DIRECTFB_H +#define EVAS_ENGINE_DIRECTFB_H + +#include "evas_common.h" +#include "evas_private.h" +#include "Evas_Engine_DirectFB.h" + +extern int _evas_engine_directfb_log_dom ; + +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_directfb_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_directfb_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_directfb_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_directfb_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_directfb_log_dom, __VA_ARGS__) + +typedef struct _DirectFB_Engine_Image_Entry DirectFB_Engine_Image_Entry; +struct _DirectFB_Engine_Image_Entry +{ + Engine_Image_Entry cache_entry; + IDirectFBSurface *surface; + + struct + { + Eina_Bool engine_surface : 1; + Eina_Bool is_locked : 1; + } flags; +}; + +typedef struct _Render_Engine Render_Engine; +struct _Render_Engine +{ + DirectFB_Engine_Image_Entry *screen_image; + const struct Evas_Engine_DirectFB_Spec *spec; + IDirectFB *dfb; + + Evas_Cache_Engine_Image *cache; + + Tilebuf *tb; + Tilebuf_Rect *rects; + Eina_Inlist *cur_rect; + + DFBRegion *update_regions; + unsigned int update_regions_count; + unsigned int update_regions_limit; + + Eina_Bool end : 1; +}; + +int _dfb_surface_set_color_from_context(IDirectFBSurface *surface, RGBA_Draw_Context *dc); +void _dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Eina_Inlist *points, int x, int y); + +#endif diff --git a/libraries/evas/src/modules/engines/directfb/polygon.c b/libraries/evas/src/modules/engines/directfb/polygon.c new file mode 100644 index 0000000..715fd84 --- /dev/null +++ b/libraries/evas/src/modules/engines/directfb/polygon.c @@ -0,0 +1,269 @@ +#include +#include "evas_engine.h" + +/* reduce calls to DirectFB (FillSpans), but uses twice as much memory */ +//#define USE_SPAN_RECTS 1 + +#define MAX_SPANS 512 +typedef struct _RGBA_Edge RGBA_Edge; +typedef struct _RGBA_Vertex RGBA_Vertex; + +struct _RGBA_Edge +{ + double x, dx; + int i; +}; + +struct _RGBA_Vertex +{ + double x, y; + int i; +}; + +#define POLY_EDGE_DEL(_i) \ +{ \ + int _j; \ + \ + for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ + if (_j < num_active_edges) \ + { \ + num_active_edges--; \ + memmove(&(edges[_j]), &(edges[_j + 1]), \ + (num_active_edges - _j) * sizeof(RGBA_Edge)); \ + } \ +} + +#define POLY_EDGE_ADD(_i, _y) \ +{ \ + int _j; \ + float _dx; \ + RGBA_Vertex *_p, *_q; \ + if (_i < (n - 1)) _j = _i + 1; \ + else _j = 0; \ + if (point[_i].y < point[_j].y) \ + { \ + _p = &(point[_i]); \ + _q = &(point[_j]); \ + } \ + else \ + { \ + _p = &(point[_j]); \ + _q = &(point[_i]); \ + } \ + edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ + edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ + edges[num_active_edges].i = _i; \ + num_active_edges++; \ +} + +static int +polygon_point_sorter(const void *a, const void *b) +{ + RGBA_Vertex *p, *q; + + p = (RGBA_Vertex *)a; + q = (RGBA_Vertex *)b; + if (p->y <= q->y) return -1; + return 1; +} + +static int +polygon_edge_sorter(const void *a, const void *b) +{ + RGBA_Edge *p, *q; + + p = (RGBA_Edge *)a; + q = (RGBA_Edge *)b; + if (p->x <= q->x) return -1; + return 1; +} + +#ifndef USE_SPAN_RECTS +typedef DFBSpan span_t; + +static void +polygon_span_add(span_t *span, int y __UNUSED__, int x, int w) +{ + span->x = x; + span->w = w; +} + +static void +polygon_spans_fill(IDirectFBSurface *surface, int y, const span_t *spans, int n_spans) +{ + /* directfb automatically increments y for each span */ + for (; n_spans > 0; n_spans--, spans++) + surface->FillSpans(surface, y, spans, 1); +} +#else /* USE_SPAN_RECTS */ +typedef DFBRectangle span_t; + +static void +polygon_span_add(span_t *span, int y, int x, int w) +{ + span->x = x; + span->y = y; + span->w = w; + span->h = 1; +} + +static void +polygon_spans_fill(IDirectFBSurface *surface, int y, const span_t *spans, int n_spans) +{ + surface->FillRectangles(surface, spans, n_spans); +} +#endif /* USE_SPAN_RECTS */ + + +void +_dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Eina_Inlist *points, int px, int py) +{ + RGBA_Polygon_Point *pt; + RGBA_Vertex *point; + RGBA_Edge *edges; + int num_active_edges; + int n; + int i, j, k; + int y0, y1, y; + int ext_x, ext_y, ext_w, ext_h; + int *sorted_index; + + ext_x = 0; + ext_y = 0; + surface->GetSize(surface, &ext_w, &ext_h); + if (dc->clip.use) + { + if (dc->clip.x > ext_x) + { + ext_w += ext_x - dc->clip.x; + ext_x = dc->clip.x; + } + if ((ext_x + ext_w) > (dc->clip.x + dc->clip.w)) + { + ext_w = (dc->clip.x + dc->clip.w) - ext_x; + } + if (dc->clip.y > ext_y) + { + ext_h += ext_y - dc->clip.y; + ext_y = dc->clip.y; + } + if ((ext_y + ext_h) > (dc->clip.y + dc->clip.h)) + { + ext_h = (dc->clip.y + dc->clip.h) - ext_y; + } + } + if ((ext_w <= 0) || (ext_h <= 0)) return; + + evas_common_cpu_end_opt(); + + if (!_dfb_surface_set_color_from_context(surface, dc)) + return; + + n = 0; EINA_INLIST_FOREACH(points, pt) n++; + if (n < 3) return; + edges = malloc(sizeof(RGBA_Edge) * n); + if (!edges) return; + point = malloc(sizeof(RGBA_Vertex) * n); + if (!point) + { + free(edges); + return; + } + sorted_index = malloc(sizeof(int) * n); + if (!sorted_index) + { + free(edges); + free(point); + return; + } + + k = 0; + EINA_INLIST_FOREACH(points, pt) + { + point[k].x = pt->x + px; + point[k].y = pt->y + py; + point[k].i = k; + k++; + } + qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); + for (k = 0; k < n; k++) sorted_index[k] = point[k].i; + k = 0; + EINA_INLIST_FOREACH(points, pt) + { + point[k].x = pt->x + px; + point[k].y = pt->y + py; + point[k].i = k; + k++; + } + + y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); + y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); + + k = 0; + num_active_edges = 0; + + for (y = y0; y <= y1; y++) + { + span_t spans[MAX_SPANS]; + unsigned int n_spans = 0; + + for (; (k < n) && (point[sorted_index[k]].y <= ((double)y + 0.5)); k++) + { + i = sorted_index[k]; + + if (i > 0) j = i - 1; + else j = n - 1; + if (point[j].y <= ((double)y - 0.5)) + { + POLY_EDGE_DEL(j) + } + else if (point[j].y > ((double)y + 0.5)) + { + POLY_EDGE_ADD(j, y) + } + if (i < (n - 1)) j = i + 1; + else j = 0; + if (point[j].y <= ((double)y - 0.5)) + { + POLY_EDGE_DEL(i) + } + else if (point[j].y > ((double)y + 0.5)) + { + POLY_EDGE_ADD(i, y) + } + } + + qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); + + for (j = 0; j < num_active_edges; j += 2) + { + int x0, x1; + + x0 = ceil(edges[j].x - 0.5); + if (j < (num_active_edges - 1)) + x1 = floor(edges[j + 1].x - 0.5); + else + x1 = x0; + if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) + { + if (n_spans == MAX_SPANS) + { + polygon_spans_fill(surface, y, spans, n_spans); + n_spans = 0; + } + + polygon_span_add(spans + n_spans, y, x0, (x1 - x0) + 1); + n_spans++; + } + edges[j].x += edges[j].dx; + edges[j + 1].x += edges[j + 1].dx; + } + + if (n_spans) + polygon_spans_fill(surface, y, spans, n_spans); + } + + free(edges); + free(point); + free(sorted_index); +} diff --git a/libraries/evas/src/modules/engines/fb/Evas_Engine_FB.h b/libraries/evas/src/modules/engines/fb/Evas_Engine_FB.h new file mode 100644 index 0000000..b548237 --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/Evas_Engine_FB.h @@ -0,0 +1,25 @@ +#ifndef _EVAS_ENGINE_FB_H +#define _EVAS_ENGINE_FB_H + +typedef struct _Evas_Engine_Info_FB Evas_Engine_Info_FB; + +struct _Evas_Engine_Info_FB +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + struct { + + int virtual_terminal; + int device_number; + int refresh; + int rotation; + } info; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; +#endif + + diff --git a/libraries/evas/src/modules/engines/fb/Makefile.am b/libraries/evas/src/modules/engines/fb/Makefile.am new file mode 100644 index 0000000..55127bb --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/Makefile.am @@ -0,0 +1,48 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_fb_cflags@ + +if BUILD_ENGINE_FB + +FB_SOURCES = \ +evas_engine.c \ +evas_fb_main.c \ +evas_outbuf.c + +FB_LIBADD = @evas_engine_fb_libs@ + + +includes_HEADERS = Evas_Engine_FB.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_FB + +pkgdir = $(libdir)/evas/modules/engines/fb/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = $(FB_SOURCES) +module_la_LIBADD = @EINA_LIBS@ $(FB_LIBADD) $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_fb.la + +libevas_engine_fb_la_SOURCES = $(FB_SOURCES) +libevas_engine_fb_la_LIBADD = $(FB_LIBADD) + +endif +endif + +EXTRA_DIST = \ +evas_engine.h \ +evas_fb.h diff --git a/libraries/evas/src/modules/engines/fb/Makefile.in b/libraries/evas/src/modules/engines/fb/Makefile.in new file mode 100644 index 0000000..aec24ff --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/Makefile.in @@ -0,0 +1,825 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/fb +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@libevas_engine_fb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_fb_la_SOURCES_DIST = evas_engine.c evas_fb_main.c \ + evas_outbuf.c +@BUILD_ENGINE_FB_TRUE@am__objects_1 = evas_engine.lo evas_fb_main.lo \ +@BUILD_ENGINE_FB_TRUE@ evas_outbuf.lo +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@am_libevas_engine_fb_la_OBJECTS = $(am__objects_1) +libevas_engine_fb_la_OBJECTS = $(am_libevas_engine_fb_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@am_libevas_engine_fb_la_rpath = +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_fb_main.c \ + evas_outbuf.c +@BUILD_ENGINE_FB_TRUE@am__objects_2 = module_la-evas_engine.lo \ +@BUILD_ENGINE_FB_TRUE@ module_la-evas_fb_main.lo \ +@BUILD_ENGINE_FB_TRUE@ module_la-evas_outbuf.lo +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@am_module_la_rpath = \ +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@ -rpath \ +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_fb_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_fb_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_FB.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_fb_cflags@ + +@BUILD_ENGINE_FB_TRUE@FB_SOURCES = \ +@BUILD_ENGINE_FB_TRUE@evas_engine.c \ +@BUILD_ENGINE_FB_TRUE@evas_fb_main.c \ +@BUILD_ENGINE_FB_TRUE@evas_outbuf.c + +@BUILD_ENGINE_FB_TRUE@FB_LIBADD = @evas_engine_fb_libs@ +@BUILD_ENGINE_FB_TRUE@includes_HEADERS = Evas_Engine_FB.h +@BUILD_ENGINE_FB_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@pkgdir = $(libdir)/evas/modules/engines/fb/$(MODULE_ARCH) +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@module_la_SOURCES = $(FB_SOURCES) +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@module_la_LIBADD = @EINA_LIBS@ $(FB_LIBADD) $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@module_la_LDFLAGS = -module -avoid-version +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@noinst_LTLIBRARIES = libevas_engine_fb.la +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@libevas_engine_fb_la_SOURCES = $(FB_SOURCES) +@BUILD_ENGINE_FB_TRUE@@EVAS_STATIC_BUILD_FB_TRUE@libevas_engine_fb_la_LIBADD = $(FB_LIBADD) +EXTRA_DIST = \ +evas_engine.h \ +evas_fb.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/fb/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/fb/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_fb.la: $(libevas_engine_fb_la_OBJECTS) $(libevas_engine_fb_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_fb_la_rpath) $(libevas_engine_fb_la_OBJECTS) $(libevas_engine_fb_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_fb_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_outbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_fb_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_outbuf.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_fb_main.lo: evas_fb_main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_fb_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_fb_main.Tpo -c -o module_la-evas_fb_main.lo `test -f 'evas_fb_main.c' || echo '$(srcdir)/'`evas_fb_main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_fb_main.Tpo $(DEPDIR)/module_la-evas_fb_main.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_fb_main.c' object='module_la-evas_fb_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_fb_main.lo `test -f 'evas_fb_main.c' || echo '$(srcdir)/'`evas_fb_main.c + +module_la-evas_outbuf.lo: evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_outbuf.lo -MD -MP -MF $(DEPDIR)/module_la-evas_outbuf.Tpo -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_outbuf.Tpo $(DEPDIR)/module_la-evas_outbuf.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_outbuf.c' object='module_la-evas_outbuf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/fb/evas_engine.c b/libraries/evas/src/modules/engines/fb/evas_engine.c new file mode 100644 index 0000000..7681b00 --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/evas_engine.c @@ -0,0 +1,317 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_engine.h" +#include "Evas_Engine_FB.h" + +int _evas_engine_fb_log_dom = -1; + +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +/* engine struct data */ +typedef struct _Render_Engine Render_Engine; + +struct _Render_Engine +{ + Tilebuf *tb; + Outbuf *ob; + Tilebuf_Rect *rects; + Eina_Inlist *cur_rect; + int end : 1; +}; + +/* prototypes we will use here */ +static void *_output_setup(int w, int h, int rot, int vt, int dev, int refresh); + +static void *eng_info(Evas *e); +static void eng_info_free(Evas *e, void *info); +static int eng_setup(Evas *e, void *info); +static void eng_output_free(void *data); +static void eng_output_resize(void *data, int w, int h); +static void eng_output_tile_size_set(void *data, int w, int h); +static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h); +static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h); +static void eng_output_redraws_clear(void *data); +static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); +static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h); +static void eng_output_flush(void *data); +static void eng_output_idle_flush(void *data); + +/* internal engine routines */ +static void * +_output_setup(int w, int h, int rot, int vt, int dev, int refresh) +{ + Render_Engine *re; + + re = calloc(1, sizeof(Render_Engine)); + if (!re) + return NULL; + /* if we haven't initialized - init (automatic abort if already done) */ + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + + evas_fb_outbuf_fb_init(); + + /* get any stored performance metrics from device (xserver) */ + re->ob = evas_fb_outbuf_fb_setup_fb(w, h, rot, OUTBUF_DEPTH_INHERIT, vt, dev, refresh); + re->tb = evas_common_tilebuf_new(evas_fb_outbuf_fb_get_width(re->ob), evas_fb_outbuf_fb_get_height(re->ob)); + /* no backbuf! */ + evas_fb_outbuf_fb_set_have_backbuf(re->ob, 0); + /* in preliminary tests 16x16 gave highest framerates */ + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + return re; +} + +/* engine api this module provides */ +static void * +eng_info(Evas *e) +{ + Evas_Engine_Info_FB *info; + info = calloc(1, sizeof(Evas_Engine_Info_FB)); + if (!info) return NULL; + info->magic.magic = rand(); + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; + e = NULL; +} + +static void +eng_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_FB *in; + in = (Evas_Engine_Info_FB *)info; + free(in); +} + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_FB *info; + + info = (Evas_Engine_Info_FB *)in; + re = _output_setup(e->output.w, + e->output.h, + info->info.rotation, + info->info.virtual_terminal, + info->info.device_number, + info->info.refresh); + e->engine.data.output = re; + if (!e->engine.data.output) return 0; + e->engine.data.context = e->engine.func->context_new(e->engine.data.output); + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_fb_outbuf_fb_free(re->ob); + evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_fb_outbuf_fb_reconfigure(re->ob, w, h, + evas_fb_outbuf_fb_get_rot(re->ob), + OUTBUF_DEPTH_INHERIT); + evas_common_tilebuf_free(re->tb); + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +} + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + RGBA_Image *surface; + Tilebuf_Rect *rect; + int ux, uy, uw, uh; + + re = (Render_Engine *)data; + if (re->end) + { + re->end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + re->cur_rect = EINA_INLIST_GET(re->rects); + } + if (!re->cur_rect) return NULL; + rect = (Tilebuf_Rect *)re->cur_rect; + ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h; + re->cur_rect = re->cur_rect->next; + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = 1; + } + + surface = evas_fb_outbuf_fb_new_region_for_update(re->ob, + ux, uy, uw, uh, + cx, cy, cw, ch); + *x = ux; *y = uy; *w = uw; *h = uh; + return surface; +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +#ifdef BUILD_PIPE_RENDER + evas_common_pipe_map_begin(surface); +#endif + evas_fb_outbuf_fb_push_updated_region(re->ob, surface, x, y, w, h); + evas_fb_outbuf_fb_free_region_for_update(re->ob, surface); + evas_common_cpu_end_opt(); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *context __UNUSED__) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return (re->ob->priv.fb.fb->fb_var.transp.length > 0); +} + +/* module advertising code */ +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + _evas_engine_fb_log_dom = eina_log_domain_register + ("evas-fb", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_fb_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_fb_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "fb", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, fb); + +#ifndef EVAS_STATIC_BUILD_FB +EVAS_EINA_MODULE_DEFINE(engine, fb); +#endif diff --git a/libraries/evas/src/modules/engines/fb/evas_engine.h b/libraries/evas/src/modules/engines/fb/evas_engine.h new file mode 100644 index 0000000..295e91e --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/evas_engine.h @@ -0,0 +1,85 @@ +#ifndef EVAS_ENGINE_H +#define EVAS_ENGINE_H + +#include "evas_fb.h" + +extern int _evas_engine_fb_log_dom; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_fb_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_fb_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_fb_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_fb_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_fb_log_dom, __VA_ARGS__) + +typedef struct _Outbuf Outbuf; + +typedef enum _Outbuf_Depth Outbuf_Depth; + +enum _Outbuf_Depth +{ + OUTBUF_DEPTH_NONE, + OUTBUF_DEPTH_INHERIT, + OUTBUF_DEPTH_RGB_16BPP_565_565_DITHERED, + OUTBUF_DEPTH_RGB_16BPP_555_555_DITHERED, + OUTBUF_DEPTH_RGB_16BPP_444_444_DITHERED, + OUTBUF_DEPTH_RGB_16BPP_565_444_DITHERED, + OUTBUF_DEPTH_RGB_32BPP_888_8888, + OUTBUF_DEPTH_LAST +}; + +struct _Outbuf +{ + Outbuf_Depth depth; + int w, h; + int rot; + + struct { + struct { + FB_Mode *fb; + } fb; + struct { + DATA32 r, g, b; + } mask; + RGBA_Image *back_buf; + } priv; +}; + +/****/ + +void evas_fb_outbuf_fb_init (void); +void evas_fb_outbuf_fb_free (Outbuf *buf); + +Outbuf *evas_fb_outbuf_fb_setup_fb (int w, int h, int rot, Outbuf_Depth depth, int vt_no, int dev_no, int refresh); + +void evas_fb_outbuf_fb_blit (Outbuf *buf, int src_x, int src_y, int w, int h, int dst_x, int dst_y); +void evas_fb_outbuf_fb_update (Outbuf *buf, int x, int y, int w, int h); +RGBA_Image *evas_fb_outbuf_fb_new_region_for_update (Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); +void evas_fb_outbuf_fb_free_region_for_update (Outbuf *buf, RGBA_Image *update); +void evas_fb_outbuf_fb_push_updated_region (Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h); +void evas_fb_outbuf_fb_reconfigure (Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth); +int evas_fb_outbuf_fb_get_width (Outbuf *buf); +int evas_fb_outbuf_fb_get_height (Outbuf *buf); +Outbuf_Depth evas_fb_outbuf_fb_get_depth (Outbuf *buf); +int evas_fb_outbuf_fb_get_rot (Outbuf *buf); +int evas_fb_outbuf_fb_get_have_backbuf (Outbuf *buf); +void evas_fb_outbuf_fb_set_have_backbuf (Outbuf *buf, int have_backbuf); + +#endif diff --git a/libraries/evas/src/modules/engines/fb/evas_fb.h b/libraries/evas/src/modules/engines/fb/evas_fb.h new file mode 100644 index 0000000..76ab30b --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/evas_fb.h @@ -0,0 +1,93 @@ +#ifndef _EVAS_FB_H +#define _EVAS_FB_H 1 + +/* -------------------------------------------------------------------- */ +/* LINUX FBCON FRAMEBUFFER UTILITY CODE */ +/* makes setting up the framebuffer easy. Also makes it eays to port to */ +/* some other system if needed. */ +/* Copyright (c) 1999 - Carsten Haitzler (The Rasterman) */ +/* -------------------------------------------------------------------- */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef struct _fb_mode FB_Mode; + +struct _fb_mode +{ + unsigned int width; + unsigned int height; + unsigned int refresh; + unsigned int depth; + unsigned int bpp; + int fb_fd; + void *mem; + unsigned int mem_offset; + struct fb_var_screeninfo fb_var; +}; + +/* init a framebuffer (and switch to) vt number vt. If vt == 0 use current */ +/* vt */ +void fb_init(int vt, int device); +/* call this afetr setting or getting the fb mode (whichever) to complete */ +/* the dsetup */ +int fb_postinit(FB_Mode *mode); +/* console switching - if a switch was requested this with block if block */ +/* is 1, otherwise it will return 1 if current console is active or 0 if */ +/* the user has switched away in the meantime */ +int fb_await_switch(int block); +/* list all current possible video modes listed in /etc/fb.modes */ +/* returns pointer to an aray of FB_Mode, and sets num_return to the number */ +/* of elements in the returned array */ +FB_Mode *fb_list_modes(unsigned int *num_return); +/* sets the fb mode to the resolution width x height and the depth to depth. */ +/* and if refresh > 0 attempts to use a mode with a refresh rate (in Hz) of */ +/* that. If this fails it will return NULL - if it succeeds it will return */ +/* a pointer to the FB_Mode thatwas set. only modes in /etc/fb.modes will */ +/* be used. If refresh is 0 it uses the DEFAULT mode (the one with no */ +/* refresh rate at the end of its name (WIDTHxHEIGHT-REFRESH) */ +/* NB: in 8bpp you get a 332 palette. This is fixed so all modes are */ +/* "truecolor" - the only difference is how many bits bep red, green and */ +/* blue channel. This is for speed reasons */ +FB_Mode *fb_setmode(unsigned int width, unsigned int height, unsigned int depth, unsigned int refresh); +/* returns the current fb mode being used in FB_Mode */ +FB_Mode *fb_getmode(void); +/* changes the bit depth of the current fb mode to depth and returns a new */ +/* handle to a new fb mode with updated parameters. frees cur_mode for you. */ +FB_Mode *fb_changedepth(FB_Mode *cur_mode, unsigned int depth); +/* changes resolution - retaining current depth of the current mode, */ +/* returning a handle to the new mode once done. frees cur_mode for you. */ +FB_Mode *fb_changeres(FB_Mode *cur_mode, unsigned int width, unsigned int height, unsigned int refresh); +/* chnages both resolution and depth and returns a handle to the new mode */ +/* when done. frees cur_mode for you */ +FB_Mode *fb_changemode(FB_Mode *cur_mode, unsigned int width, unsigned int height, unsigned int depth, unsigned int refresh); + +/* ------------------------------------------------------------------------- */ +/* How to init: */ +/* (Example) */ + +/* FB_Mode *mode; */ +/* int fb_fd = -1; */ +/* fb_init(0); */ +/* mode = fb_setmode(640, 480, 8, 0); */ +/* if (mode) */ +/* fb_fd = fb_postinit(mode); */ +/* if (fb_fd == -1) */ +/* { */ +/* fprintf(stderr, "Frambuffer init failed\n"); */ +/* exit(1); */ +/* } */ +/* .... code to play with the FB */ +#endif diff --git a/libraries/evas/src/modules/engines/fb/evas_fb_main.c b/libraries/evas/src/modules/engines/fb/evas_fb_main.c new file mode 100644 index 0000000..1d61f1a --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/evas_fb_main.c @@ -0,0 +1,600 @@ +/* -------------------------------------------------------------------- */ +/* LINUX FBCON FRAMEBUFFER UTILITY CODE */ +/* makes setting up the framebuffer easy. Also makes it eays to port to */ +/* some other system if needed. */ +/* Copyright (c) 1999 - Carsten Haitzler (The Rasterman) */ +/* -------------------------------------------------------------------- */ +#include "evas_common.h" +#include "evas_fb.h" + +#include +#include +#include +#include +#include + +#define FB_ACTIVE 0 +#define FB_REL_REQ 1 +#define FB_INACTIVE 2 +#define FB_ACQ_REQ 3 + +/* -------------------------------------------------------------------- */ +/* internal variables */ + +static struct fb_fix_screeninfo fb_fix; +static int fb, tty; +static int bpp, depth; +//static int orig_vt_no = 0; +static int kd_mode; +static struct vt_mode vt_omode; +static struct fb_var_screeninfo fb_ovar; +static unsigned short ored[256], ogreen[256], oblue[256]; +static unsigned short red[256], green[256], blue[256]; +static struct fb_cmap ocmap = { 0, 256, ored, ogreen, oblue, NULL }; +static struct fb_cmap cmap = { 0, 256, red, green, blue, NULL }; + +/* -------------------------------------------------------------------- */ +/* internal function prototypes */ + +static void fb_cleanup(void); +//static void fb_cleanup_fork(void); +//static void fb_setvt(int vtno); +static void fb_init_palette_332(FB_Mode *mode); +static void fb_init_palette_linear(FB_Mode *mode); + +/* -------------------------------------------------------------------- */ +/* palette setting */ + +static void +fb_init_palette_332(FB_Mode *mode) +{ + int r, g, b, i; + + if (mode->fb_var.bits_per_pixel != 8) + return; + i = 0; + + if (ioctl(fb, FBIOGETCMAP, &cmap) == -1) + perror("ioctl FBIOGETCMAP"); + + /* generate the palette */ + for (r = 0; r < 8; r++) + { + for (g = 0; g < 8; g++) + { + for (b = 0; b < 4; b++) + { + int val; + + val = (r << 5) | (r << 2) | (r >> 1); + red[i] = (val << 8) | val; + val = (g << 5) | (g << 2) | (g >> 1); + green[i] = (val << 8) | val; + val = (b << 6) | (b << 4) | (b << 2) | (b); + blue[i] = (val << 8) | val; + i++; + } + } + } + + /* set colormap */ + if (ioctl(fb, FBIOPUTCMAP, &cmap) == -1) + perror("ioctl FBIOPUTCMAP"); +} + +static void +fb_init_palette_linear(FB_Mode *mode) +{ + int i; + + if (mode->fb_var.bits_per_pixel != 8) + return; + + if (ioctl(fb, FBIOGETCMAP, &cmap) == -1) + perror("ioctl FBIOGETCMAP"); + + /* generate the palette */ + for (i = 0; i < 256; i++) + red[i] = (i << 8) | i; + for (i = 0; i < 256; i++) + green[i] = (i << 8) | i; + for (i = 0; i < 256; i++) + blue[i] = (i << 8) | i; + + /* set colormap */ + if (ioctl(fb, FBIOPUTCMAP, &cmap) == -1) + perror("ioctl FBIOPUTCMAP"); +} + +/* -------------------------------------------------------------------- */ +/* initialisation & cleanup */ + +FB_Mode * +fb_list_modes(unsigned int *num_return) +{ + FILE *f; + char line[256], label[256], value[256]; + FB_Mode *modes = NULL; + int num; + + num = 0; + f = fopen("/etc/fb.modes","r"); + if (!f) + { + *num_return = 0; + return NULL; + } + while (fgets(line, sizeof(line) - 1, f)) + { + if (sscanf(line, "mode \"%250[^\"]\"", label) == 1) + { + char f1[32], f2[32], f3[32], f4[32]; + + f1[0] = 0; f2[0] = 0; f3[0] = 0; f4[0] = 0; + sscanf(label, "%30[^x]x%30[^-]-%30[^-]-%30s", f1, f2, f3, f4); + if ((f1[0]) && (f2[0])) + { + int geometry = 0; + int timings = 0; + + num++; + modes = realloc(modes, num * sizeof(FB_Mode)); + modes[num - 1].width = atoi(f1); + modes[num - 1].height = atoi(f2); + if (f3[0]) + modes[num - 1].refresh = atoi(f3); + else + modes[num - 1].refresh = 0; + modes[num - 1].fb_var.sync = 0; + while ((fgets(line, sizeof(line) - 1, f)) && + (!strstr(line, "endmode"))) + { + + if (sscanf(line," geometry %i %i %i %i %i", + &modes[num - 1].fb_var.xres, + &modes[num - 1].fb_var.yres, + &modes[num - 1].fb_var.xres_virtual, + &modes[num - 1].fb_var.yres_virtual, + &modes[num - 1].fb_var.bits_per_pixel) == 5) + geometry = 1; + if (sscanf(line," timings %i %i %i %i %i %i %i", + &modes[num - 1].fb_var.pixclock, + &modes[num - 1].fb_var.left_margin, + &modes[num - 1].fb_var.right_margin, + &modes[num - 1].fb_var.upper_margin, + &modes[num - 1].fb_var.lower_margin, + &modes[num - 1].fb_var.hsync_len, + &modes[num - 1].fb_var.vsync_len) == 7) + timings = 1; + if ((sscanf(line, " hsync %15s", value) == 1) && + (!strcmp(value,"high"))) + modes[num - 1].fb_var.sync |= FB_SYNC_HOR_HIGH_ACT; + if ((sscanf(line, " vsync %15s", value) == 1) && + (!strcmp(value,"high"))) + modes[num - 1].fb_var.sync |= FB_SYNC_VERT_HIGH_ACT; + if ((sscanf(line, " csync %15s", value) == 1) && + (!strcmp(value,"high"))) + modes[num - 1].fb_var.sync |= FB_SYNC_COMP_HIGH_ACT; + if ((sscanf(line, " extsync %15s", value) == 1) && + (!strcmp(value,"true"))) + modes[num - 1].fb_var.sync |= FB_SYNC_EXT; + if ((sscanf(line, " laced %15s", value) == 1) && + (!strcmp(value,"true"))) + modes[num - 1].fb_var.vmode |= FB_VMODE_INTERLACED; + if ((sscanf(line, " double %15s",value) == 1) && + (!strcmp(value,"true"))) + modes[num - 1].fb_var.vmode |= FB_VMODE_DOUBLE; + } + if ((!geometry) || (!timings)) + { + num--; + if (num == 0) + { + free(modes); + modes = NULL; + } + } + else + { + modes[num - 1].fb_var.xoffset = 0; + modes[num - 1].fb_var.yoffset = 0; + } + } + } + } + fclose(f); + *num_return = num; + return modes; +} + +FB_Mode * +fb_setmode(unsigned int width, unsigned int height, unsigned int pdepth, unsigned int refresh) +{ + FB_Mode *modes, *mode = NULL; + unsigned int i, num_modes; + + modes = fb_list_modes(&num_modes); + if (modes) + { + for (i = 0; i < num_modes; i++) + { + if ((modes[i].width == width) && + (modes[i].height == height) && + (!pdepth || modes[i].fb_var.bits_per_pixel == pdepth) && + (modes[i].refresh == refresh)) + { + if (pdepth) modes[i].fb_var.bits_per_pixel = pdepth; + + if (ioctl(fb, FBIOPUT_VSCREENINFO, &modes[i].fb_var) == -1) + perror("ioctl FBIOPUT_VSCREENINFO"); + + free(modes); + return fb_getmode(); + } + } + free(modes); + } + return mode; +} + +FB_Mode * +fb_changedepth(FB_Mode *cur_mode, unsigned int pdepth) +{ + cur_mode->fb_var.bits_per_pixel = pdepth; + + if (ioctl(fb, FBIOPUT_VSCREENINFO, &cur_mode->fb_var) == -1) + perror("ioctl FBIOPUT_VSCREENINFO"); + + free(cur_mode); + return fb_getmode(); +} + +FB_Mode * +fb_changeres(FB_Mode *cur_mode, unsigned int width, unsigned int height, unsigned int refresh) +{ + FB_Mode *modes; + unsigned int i, num_modes; + + modes = fb_list_modes(&num_modes); + if (modes) + { + for (i = 0; i < num_modes; i++) + { + if ((modes[i].width == width) && + (modes[i].height == height) && + (modes[i].refresh == refresh)) + { + modes[i].fb_var.bits_per_pixel = cur_mode->depth; + + if (ioctl(fb, FBIOPUT_VSCREENINFO, &modes[i].fb_var) == -1) + perror("ioctl FBIOPUT_VSCREENINFO"); + + free(modes); + free(cur_mode); + return fb_getmode(); + } + } + free(modes); + } + return cur_mode; +} + +FB_Mode * +fb_changemode(FB_Mode *cur_mode, unsigned int width, unsigned int height, unsigned int pdepth, unsigned int refresh) +{ + FB_Mode *modes; + unsigned int i, num_modes; + + modes = fb_list_modes(&num_modes); + if (modes) + { + for (i = 0; i < num_modes; i++) + { + if ((modes[i].width == width) && + (modes[i].height == height) && + (!pdepth || modes[i].fb_var.bits_per_pixel == pdepth) && + (modes[i].refresh == refresh)) + { + if (pdepth) modes[i].fb_var.bits_per_pixel = pdepth; + + if (ioctl(fb, FBIOPUT_VSCREENINFO, &modes[i].fb_var) == -1) + perror("ioctl FBIOPUT_VSCREENINFO"); + + free(modes); + free(cur_mode); + return fb_getmode(); + } + } + free(modes); + } + return cur_mode; +} + +FB_Mode * +fb_getmode(void) +{ + FB_Mode *mode = NULL; + int hpix, lines, clockrate; + + mode = malloc(sizeof(FB_Mode)); + /* look what we have now ... */ + + if (ioctl(fb, FBIOGET_VSCREENINFO, &mode->fb_var) == -1) + { + perror("ioctl FBIOGET_VSCREENINFO"); + return NULL; + } + + mode->width = mode->fb_var.xres_virtual; + mode->height = mode->fb_var.yres_virtual; + hpix = + mode->fb_var.left_margin + + mode->fb_var.xres + + mode->fb_var.right_margin + + mode->fb_var.hsync_len; + lines = + mode->fb_var.upper_margin + + mode->fb_var.yres + + mode->fb_var.lower_margin + + mode->fb_var.vsync_len; + if (mode->fb_var.pixclock > 0) + clockrate = 1000000 / mode->fb_var.pixclock; + else + clockrate = 0; + if ((lines > 0) && (hpix > 0)) + mode->refresh = clockrate * 1000000 / (lines * hpix); + switch (mode->fb_var.bits_per_pixel) + { + case 1: + bpp = 1; + depth = 1; + break; + case 4: + bpp = 1; + depth = 4; + break; + case 8: + bpp = 1; + depth = 8; + break; + case 15: + case 16: + if (mode->fb_var.green.length == 6) + depth = 16; + else + depth = 15; + bpp = 2; + break; + case 24: + depth = 24; + bpp = mode->fb_var.bits_per_pixel / 8; + break; + case 32: + depth = 32; + bpp = mode->fb_var.bits_per_pixel / 8; + break; + default: + ERR("Cannot handle framebuffer of depth %i", + mode->fb_var.bits_per_pixel); + fb_cleanup(); + free(mode); + return NULL; + } + mode->depth = depth; + mode->bpp = bpp; + if (mode->depth == 8) fb_init_palette_332(mode); + else fb_init_palette_linear(mode); + return mode; +} + +/* XXX: unused +static void +fb_setvt(int vtno) +{ + struct vt_stat vts; + char vtname[32]; + int vtfd; + + if (vtno < 0) + { + if ((ioctl(tty,VT_OPENQRY, &vtno) == -1)) + { + perror("ioctl VT_OPENQRY"); + return; + } + if (vtno <= 0 ) + { + perror("ioctl VT_OPENQRY vtno <= 0"); + return; + } + } + vtno &= 0xff; + sprintf(vtname, "/dev/tty%i", vtno); + if (chown(vtname, getuid(), getgid()) != 0) + { + vtfd = 0; // do nothing - don't worry about chown + } + if (access(vtname,R_OK | W_OK) == -1) + { + CRIT("Access %s: %s",vtname,strerror(errno)); + return; + } + vtfd = open(vtname,O_RDWR); + + if (ioctl(tty, VT_GETSTATE, &vts) == -1) + { + perror("ioctl VT_GETSTATE"); + close(vtfd); + return; + } + + orig_vt_no = vts.v_active; + close(vtfd); +#if 0 + if (ioctl(tty, VT_ACTIVATE, vtno) == -1) + { + perror("ioctl VT_ACTIVATE"); + exit(1); + } + if (ioctl(tty, VT_WAITACTIVE, vtno) == -1) + { + perror("ioctl VT_WAITACTIVE"); + exit(1); + } +#endif +} +*/ + +void +fb_init(int vt __UNUSED__, int device) +{ + char dev[32]; + + tty = 0; +#if 0 + if (vt != 0) fb_setvt(vt); +#endif + + if ( getenv("EVAS_FB_DEV") ) + { + fb = open(getenv("EVAS_FB_DEV"), O_RDWR); + } + else + { + sprintf(dev, "/dev/fb/%i", device); + fb = open(dev, O_RDWR); + if ( fb == -1 ) + { + sprintf(dev, "/dev/fb%i", device); + fb = open(dev, O_RDWR); + } + } + if (fb == -1) + { + CRIT("open %s: %s", dev, strerror(errno)); + fb_cleanup(); + return; + } + + if (ioctl(fb, FBIOGET_VSCREENINFO, &fb_ovar) == -1) + { + perror("ioctl FBIOGET_VSCREENINFO"); + return; + } + if (ioctl(fb, FBIOGET_FSCREENINFO, &fb_fix) == -1) + { + perror("ioctl FBIOGET_FSCREENINFO"); + return; + } + + if ((fb_ovar.bits_per_pixel == 8) || + (fb_fix.visual == FB_VISUAL_DIRECTCOLOR)) + { + if (ioctl(fb,FBIOGETCMAP , &ocmap) == -1) + { + perror("ioctl FBIOGETCMAP"); + return; + } + } +#if 0 + if (isatty(0)) + tty = 0; + else if ((tty = open("/dev/tty",O_RDWR)) == -1) + { + CITICAL("open %s: %s", "/dev/tty", strerror(errno)); + return; + } + if (tty) + { + if (ioctl(tty, KDGETMODE, &kd_mode) == -1) + { + perror("ioctl KDGETMODE"); + return; + } + if (ioctl(tty, VT_GETMODE, &vt_omode) == -1) + { + perror("ioctl VT_GETMODE"); + return; + } + } +#endif +} + +int +fb_postinit(FB_Mode *mode) +{ + if (ioctl(fb,FBIOGET_FSCREENINFO, &fb_fix) == -1) + { + perror("ioctl FBIOGET_FSCREENINFO"); + fb_cleanup(); + return 0; + } + + if (fb_fix.type != FB_TYPE_PACKED_PIXELS) + { + CRIT("can handle only packed pixel frame buffers"); + fb_cleanup(); + return 0; + } + mode->mem_offset = (unsigned)(fb_fix.smem_start) & (getpagesize()-1); + mode->mem = (unsigned char *)mmap(NULL, fb_fix.smem_len + mode->mem_offset, + PROT_WRITE | PROT_READ, MAP_SHARED, fb, 0); + if (mode->mem == MAP_FAILED) + { + perror("mmap"); + fb_cleanup(); + } + /* move viewport to upper left corner */ + if ((mode->fb_var.xoffset != 0) || (mode->fb_var.yoffset != 0)) + { + mode->fb_var.xoffset = 0; + mode->fb_var.yoffset = 0; + + if (ioctl(fb, FBIOPAN_DISPLAY, &(mode->fb_var)) == -1) + { + perror("ioctl FBIOPAN_DISPLAY"); + fb_cleanup(); + } + } +#if 0 + if (tty) + { + if (ioctl(tty,KDSETMODE, KD_GRAPHICS) == -1) + { + perror("ioctl KDSETMODE"); + fb_cleanup(); + } + } +#endif + mode->fb_fd = fb; + return fb; +} + +static void +fb_cleanup(void) +{ + /* restore console */ + if (ioctl(fb, FBIOPUT_VSCREENINFO, &fb_ovar) == -1) + perror("ioctl FBIOPUT_VSCREENINFO"); + if (ioctl(fb, FBIOGET_FSCREENINFO, &fb_fix) == -1) + perror("ioctl FBIOGET_FSCREENINFO"); + if ((fb_ovar.bits_per_pixel == 8) || + (fb_fix.visual == FB_VISUAL_DIRECTCOLOR)) + { + if (ioctl(fb, FBIOPUTCMAP, &ocmap) == -1) + perror("ioctl FBIOPUTCMAP"); + } + close(fb); + if (tty) + { + if (ioctl(tty, KDSETMODE, kd_mode) == -1) + perror("ioctl KDSETMODE"); + if (ioctl(tty, VT_SETMODE, &vt_omode) == -1) + perror("ioctl VT_SETMODE"); +#if 0 + if ((ioctl(tty, VT_ACTIVATE, orig_vt_no) == -1) && (orig_vt_no)) + perror("ioctl VT_ACTIVATE"); +#endif + } + close(tty); +} diff --git a/libraries/evas/src/modules/engines/fb/evas_outbuf.c b/libraries/evas/src/modules/engines/fb/evas_outbuf.c new file mode 100644 index 0000000..57cf7a6 --- /dev/null +++ b/libraries/evas/src/modules/engines/fb/evas_outbuf.c @@ -0,0 +1,397 @@ +#include "evas_common.h" +#include "evas_engine.h" +#include +#include + +void +evas_fb_outbuf_fb_init(void) +{ +} + +void +evas_fb_outbuf_fb_free(Outbuf *buf) +{ + /* FIXME: implement */ + WRN("destroying fb info.. not implemented!!!! WARNING. LEAK!"); + if (buf->priv.back_buf) + evas_cache_image_drop(&buf->priv.back_buf->cache_entry); + free(buf); +} + +Outbuf * +evas_fb_outbuf_fb_setup_fb(int w, int h, int rot, Outbuf_Depth depth, int vt_no, int dev_no, int refresh) +{ + /* create outbuf struct */ + /* setup window and/or fb */ + /* if (dithered) create backbuf */ + Outbuf *buf; + int fb_fd = -1; + int fb_depth; + + fb_depth = -1; + if (depth == OUTBUF_DEPTH_RGB_16BPP_565_565_DITHERED) fb_depth = 16; + else if (depth == OUTBUF_DEPTH_RGB_16BPP_555_555_DITHERED) fb_depth = 15; + else if (depth == OUTBUF_DEPTH_RGB_16BPP_565_444_DITHERED) fb_depth = 16; + else if (depth == OUTBUF_DEPTH_RGB_16BPP_444_444_DITHERED) fb_depth = 12; + else if (depth == OUTBUF_DEPTH_RGB_32BPP_888_8888) fb_depth = 32; + else if (depth == OUTBUF_DEPTH_INHERIT) fb_depth = 0; + buf = calloc(1, sizeof(Outbuf)); + if (!buf) + return NULL; + + fb_init(vt_no, dev_no); + if (rot == 0 || rot == 180) + buf->priv.fb.fb = fb_setmode(w, h, fb_depth, refresh); + else if (rot == 90 || rot == 270) + buf->priv.fb.fb = fb_setmode(h, w, fb_depth, refresh); + if (!buf->priv.fb.fb) buf->priv.fb.fb = fb_getmode(); + if (!buf->priv.fb.fb) + { + free(buf); + return NULL; + } + fb_fd = fb_postinit(buf->priv.fb.fb); + + if (rot == 0 || rot == 180) + { + buf->w = buf->priv.fb.fb->width; + buf->h = buf->priv.fb.fb->height; + } + else if (rot == 90 || rot == 270) + { + buf->w = buf->priv.fb.fb->height; + buf->h = buf->priv.fb.fb->width; + } + + buf->depth = depth; + buf->rot = rot; + + { + Gfx_Func_Convert conv_func; + int i; + + buf->priv.mask.r = 0; + for (i = 0; i < (int)buf->priv.fb.fb->fb_var.red.length; i++) + buf->priv.mask.r |= (1 << (buf->priv.fb.fb->fb_var.red.offset + i)); + buf->priv.mask.g = 0; + for (i = 0; i < (int)buf->priv.fb.fb->fb_var.green.length; i++) + buf->priv.mask.g |= (1 << (buf->priv.fb.fb->fb_var.green.offset + i)); + buf->priv.mask.b = 0; + for (i = 0; i < (int)buf->priv.fb.fb->fb_var.blue.length; i++) + buf->priv.mask.b |= (1 << (buf->priv.fb.fb->fb_var.blue.offset + i)); + + conv_func = NULL; + if (buf->rot == 0 || buf->rot == 180) + conv_func = evas_common_convert_func_get(0, buf->w, buf->h, + buf->priv.fb.fb->fb_var.bits_per_pixel, + buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, + PAL_MODE_NONE, + buf->rot); + else if (buf->rot == 90 || buf->rot == 270) + conv_func = evas_common_convert_func_get(0, buf->h, buf->w, + buf->priv.fb.fb->fb_var.bits_per_pixel, + buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, + PAL_MODE_NONE, + buf->rot); + if (!conv_func) + { + free(buf); + return NULL; + } + } +// if (buf->priv.fb.fb->fb_var.bits_per_pixel < 24) +// buf->priv.back_buf = evas_common_image_create(buf->w, buf->h); + + return buf; +} + +void +evas_fb_outbuf_fb_blit(Outbuf *buf, int src_x, int src_y, int w, int h, int dst_x, int dst_y) +{ + if (buf->priv.back_buf) + { + evas_common_blit_rectangle(buf->priv.back_buf, buf->priv.back_buf, + src_x, src_y, w, h, dst_x, dst_y); + evas_fb_outbuf_fb_update(buf, dst_x, dst_y, w, h); + } + else + { + if (buf->priv.fb.fb) + { + /* FIXME: need to implement an fb call for "copy area" */ + } + } +} + +void +evas_fb_outbuf_fb_update(Outbuf *buf, int x, int y, int w, int h) +{ + if (!(buf->priv.back_buf)) return; + if (buf->priv.fb.fb) + { + Gfx_Func_Convert conv_func; + DATA8 *data; + + data = NULL; + conv_func = NULL; + if (buf->rot == 0) + { + data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset + + buf->priv.fb.fb->bpp * + (x + (y * buf->priv.fb.fb->width)); + conv_func = evas_common_convert_func_get(data, w, h, buf->priv.fb.fb->fb_var.bits_per_pixel, + buf->priv.mask.r, buf->priv.mask.g, + buf->priv.mask.b, PAL_MODE_NONE, + buf->rot); + } + else if (buf->rot == 180) + { + data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset + + buf->priv.fb.fb->bpp * + (buf->w - x - w + ((buf->h - y - h) * buf->priv.fb.fb->width)); + conv_func = evas_common_convert_func_get(data, w, h, buf->priv.fb.fb->fb_var.bits_per_pixel, + buf->priv.mask.r, buf->priv.mask.g, + buf->priv.mask.b, PAL_MODE_NONE, + buf->rot); + } + else if (buf->rot == 270) + { + data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset + + buf->priv.fb.fb->bpp * + (buf->h - y - h + (x * buf->priv.fb.fb->width)); + conv_func = evas_common_convert_func_get(data, h, w, buf->priv.fb.fb->fb_var.bits_per_pixel, + buf->priv.mask.r, buf->priv.mask.g, + buf->priv.mask.b, PAL_MODE_NONE, + buf->rot); + } + else if (buf->rot == 90) + { + data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset + + buf->priv.fb.fb->bpp * + (y + ((buf->w - x - w) * buf->priv.fb.fb->width)); + conv_func = evas_common_convert_func_get(data, h, w, buf->priv.fb.fb->fb_var.bits_per_pixel, + buf->priv.mask.r, buf->priv.mask.g, + buf->priv.mask.b, PAL_MODE_NONE, + buf->rot); + } + if (conv_func) + { + DATA32 *src_data; + + src_data = buf->priv.back_buf->image.data + (y * buf->w) + x; + if (buf->rot == 0 || buf->rot == 180) + { + conv_func(src_data, data, + buf->w - w, + buf->priv.fb.fb->width - w, + w, h, + x, y, NULL); + } + else if (buf->rot == 90 || buf->rot == 270) + { + conv_func(src_data, data, + buf->w - w, + buf->priv.fb.fb->width - h, + h, w, + x, y, NULL); + } + } + } +} + +RGBA_Image * +evas_fb_outbuf_fb_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch) +{ + if (buf->priv.back_buf) + { + *cx = x; *cy = y; *cw = w; *ch = h; + return buf->priv.back_buf; + } + else + { + RGBA_Image *im; + + *cx = 0; *cy = 0; *cw = w; *ch = h; + im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get()); + im->cache_entry.flags.alpha = 1; + im = (RGBA_Image *) evas_cache_image_size_set(&im->cache_entry, w, h); + + return im; + } + return NULL; +} + +void +evas_fb_outbuf_fb_free_region_for_update(Outbuf *buf, RGBA_Image *update) +{ + if (update != buf->priv.back_buf) evas_cache_image_drop(&update->cache_entry); +} + +void +evas_fb_outbuf_fb_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h) +{ + if (!buf->priv.fb.fb) return; + if (buf->priv.back_buf) + { + if (update != buf->priv.back_buf) + evas_common_blit_rectangle(update, buf->priv.back_buf, + 0, 0, w, h, x, y); + evas_fb_outbuf_fb_update(buf, x, y, w, h); + } + else + { + Gfx_Func_Convert conv_func; + DATA8 *data; + + data = NULL; + conv_func = NULL; + if (buf->rot == 0) + { + data = (DATA8 *)buf->priv.fb.fb->mem + + buf->priv.fb.fb->mem_offset + + buf->priv.fb.fb->bpp * + (x + (y * buf->priv.fb.fb->width)); + conv_func = evas_common_convert_func_get(data, w, h, + buf->priv.fb.fb->fb_var.bits_per_pixel, + buf->priv.mask.r, buf->priv.mask.g, + buf->priv.mask.b, PAL_MODE_NONE, + buf->rot); + } + else if (buf->rot == 180) + { + data = (DATA8 *)buf->priv.fb.fb->mem + + buf->priv.fb.fb->mem_offset + + buf->priv.fb.fb->bpp * + (buf->w - x - w + ((buf->h - y - h) * buf->priv.fb.fb->width)); + conv_func = evas_common_convert_func_get(data, w, h, + buf->priv.fb.fb->fb_var.bits_per_pixel, + buf->priv.mask.r, buf->priv.mask.g, + buf->priv.mask.b, PAL_MODE_NONE, + buf->rot); + } + else if (buf->rot == 270) + { + data = (DATA8 *)buf->priv.fb.fb->mem + + buf->priv.fb.fb->mem_offset + + buf->priv.fb.fb->bpp * + (buf->h - y - h + (x * buf->priv.fb.fb->width)); + conv_func = evas_common_convert_func_get(data, h, w, + buf->priv.fb.fb->fb_var.bits_per_pixel, + buf->priv.mask.r, buf->priv.mask.g, + buf->priv.mask.b, PAL_MODE_NONE, + buf->rot); + } + else if (buf->rot == 90) + { + data = (DATA8 *)buf->priv.fb.fb->mem + + buf->priv.fb.fb->mem_offset + + buf->priv.fb.fb->bpp * + (y + ((buf->w - x - w) * buf->priv.fb.fb->width)); + conv_func = evas_common_convert_func_get(data, h, w, + buf->priv.fb.fb->fb_var.bits_per_pixel, + buf->priv.mask.r, buf->priv.mask.g, + buf->priv.mask.b, PAL_MODE_NONE, + buf->rot); + } + if (conv_func) + { + DATA32 *src_data; + + src_data = update->image.data; + if (buf->rot == 0 || buf->rot == 180) + { + conv_func(src_data, data, + 0, + buf->priv.fb.fb->width - w, + w, h, + x, y, NULL); + } + else if (buf->rot == 90 || buf->rot == 270) + { + conv_func(src_data, data, + 0, + buf->priv.fb.fb->width - h, + h, w, + x, y, NULL); + } + } + } +} + +void +evas_fb_outbuf_fb_reconfigure(Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth) +{ + if ((w == buf->w) && (h == buf->h) && + (rot == buf->rot) && (depth == buf->depth)) + return; + if (buf->priv.back_buf) + { + evas_cache_image_drop(&buf->priv.back_buf->cache_entry); + buf->priv.back_buf = NULL; + } + if (buf->priv.fb.fb) + { + /* FIXME: implement this */ + } + /* if backbuf delet it */ + /* resize window or reset fb mode */ + /* if (dithered) create new backbuf */ +} + +int +evas_fb_outbuf_fb_get_width(Outbuf *buf) +{ + return buf->w; +} + +int +evas_fb_outbuf_fb_get_height(Outbuf *buf) +{ + return buf->h; +} + +Outbuf_Depth +evas_fb_outbuf_fb_get_depth(Outbuf *buf) +{ + return buf->depth; +} + +int +evas_fb_outbuf_fb_get_rot(Outbuf *buf) +{ + return buf->rot; +} + +int +evas_fb_outbuf_fb_get_have_backbuf(Outbuf *buf) +{ + if (buf->priv.back_buf) return 1; + return 0; +} + +void +evas_fb_outbuf_fb_set_have_backbuf(Outbuf *buf, int have_backbuf) +{ + if (buf->priv.back_buf) + { + if (have_backbuf) return; + evas_cache_image_drop(&buf->priv.back_buf->cache_entry); + buf->priv.back_buf = NULL; + } + else + { + if (!have_backbuf) return; + if (buf->priv.fb.fb) + { + if (buf->priv.fb.fb->fb_var.bits_per_pixel < 24) + { + buf->priv.back_buf = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get()); + buf->priv.back_buf = (RGBA_Image *) evas_cache_image_size_set(&buf->priv.back_buf->cache_entry, buf->w, buf->h); + } + } + } +} diff --git a/libraries/evas/src/modules/engines/gl_cocoa/Evas_Engine_GL_Cocoa.h b/libraries/evas/src/modules/engines/gl_cocoa/Evas_Engine_GL_Cocoa.h new file mode 100644 index 0000000..eb04d28 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_cocoa/Evas_Engine_GL_Cocoa.h @@ -0,0 +1,20 @@ +#ifndef __EVAS_ENGINE_GL_COCOA_H__ +#define __EVAS_ENGINE_GL_COCOA_H__ + +typedef struct _Evas_Engine_Info_GL_Cocoa Evas_Engine_Info_GL_Cocoa; + +struct _Evas_Engine_Info_GL_Cocoa +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + /* engine specific data & parameters it needs to set up */ + void *window; + void *view; + int depth; + +}; + + +#endif /* __EVAS_ENGINE_GL_COCOA_H__ */ diff --git a/libraries/evas/src/modules/engines/gl_cocoa/Makefile.am b/libraries/evas/src/modules/engines/gl_cocoa/Makefile.am new file mode 100644 index 0000000..d502846 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_cocoa/Makefile.am @@ -0,0 +1,46 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines/gl_common \ +@EINA_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@evas_engine_gl_cocoa_cflags@ + +if BUILD_ENGINE_GL_COCOA + +GL_COCOA_SOURCES = evas_engine.c\ +evas_gl_cocoa_main.m + + +GL_COCOA_LIBADD = @evas_engine_gl_cocoa_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la + + +includes_HEADERS = Evas_Engine_GL_Cocoa.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_GL_COCOA + +pkgdir = $(libdir)/evas/modules/engines/gl_cocoa/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(GL_COCOA_SOURCES) +module_la_LIBADD = @EINA_LIBS@ @GL_EET_LIBS@ $(GL_COCOA_LIBADD) $(top_builddir)/src/lib/libevas.la @dlopen_libs@ +module_la_LDFLAGS = -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_gl_cocoa.la + +libevas_engine_gl_cocoa_la_SOURCES = $(GL_COCOA_SOURCES) +libevas_engine_gl_cocoa_la_LIBADD = $(GL_COCOA_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/gl_cocoa/Makefile.in b/libraries/evas/src/modules/engines/gl_cocoa/Makefile.in new file mode 100644 index 0000000..ceea03d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_cocoa/Makefile.in @@ -0,0 +1,848 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/gl_cocoa +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +@BUILD_ENGINE_GL_COCOA_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_TRUE@libevas_engine_gl_cocoa_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_gl_cocoa_la_SOURCES_DIST = evas_engine.c \ + evas_gl_cocoa_main.m +@BUILD_ENGINE_GL_COCOA_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_GL_COCOA_TRUE@ evas_gl_cocoa_main.lo +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_TRUE@am_libevas_engine_gl_cocoa_la_OBJECTS = $(am__objects_1) +libevas_engine_gl_cocoa_la_OBJECTS = \ + $(am_libevas_engine_gl_cocoa_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_TRUE@am_libevas_engine_gl_cocoa_la_rpath = +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_gl_cocoa_main.m +@BUILD_ENGINE_GL_COCOA_TRUE@am__objects_2 = module_la-evas_engine.lo \ +@BUILD_ENGINE_GL_COCOA_TRUE@ module_la-evas_gl_cocoa_main.lo +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) $(module_la_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(OBJCLD) $(AM_OBJCFLAGS) \ + $(OBJCFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) +LTOBJCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_OBJCFLAGS) $(OBJCFLAGS) +AM_V_OBJC = $(am__v_OBJC_$(V)) +am__v_OBJC_ = $(am__v_OBJC_$(AM_DEFAULT_VERBOSITY)) +am__v_OBJC_0 = @echo " OBJC " $@; +OBJCLD = $(OBJC) +OBJCLINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_OBJCLD = $(am__v_OBJCLD_$(V)) +am__v_OBJCLD_ = $(am__v_OBJCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_OBJCLD_0 = @echo " OBJCLD" $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_gl_cocoa_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_gl_cocoa_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_GL_Cocoa.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines/gl_common \ +@EINA_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@evas_engine_gl_cocoa_cflags@ + +@BUILD_ENGINE_GL_COCOA_TRUE@GL_COCOA_SOURCES = evas_engine.c\ +@BUILD_ENGINE_GL_COCOA_TRUE@evas_gl_cocoa_main.m + +@BUILD_ENGINE_GL_COCOA_TRUE@GL_COCOA_LIBADD = @evas_engine_gl_cocoa_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +@BUILD_ENGINE_GL_COCOA_TRUE@includes_HEADERS = Evas_Engine_GL_Cocoa.h +@BUILD_ENGINE_GL_COCOA_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_FALSE@pkgdir = $(libdir)/evas/modules/engines/gl_cocoa/$(MODULE_ARCH) +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_FALSE@module_la_SOURCES = $(GL_COCOA_SOURCES) +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_FALSE@module_la_LIBADD = @EINA_LIBS@ @GL_EET_LIBS@ $(GL_COCOA_LIBADD) $(top_builddir)/src/lib/libevas.la @dlopen_libs@ +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_FALSE@module_la_LDFLAGS = -module -avoid-version +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_TRUE@noinst_LTLIBRARIES = libevas_engine_gl_cocoa.la +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_TRUE@libevas_engine_gl_cocoa_la_SOURCES = $(GL_COCOA_SOURCES) +@BUILD_ENGINE_GL_COCOA_TRUE@@EVAS_STATIC_BUILD_GL_COCOA_TRUE@libevas_engine_gl_cocoa_la_LIBADD = $(GL_COCOA_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .m .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/gl_cocoa/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/gl_cocoa/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_gl_cocoa.la: $(libevas_engine_gl_cocoa_la_OBJECTS) $(libevas_engine_gl_cocoa_la_DEPENDENCIES) + $(AM_V_OBJCLD)$(OBJCLINK) $(am_libevas_engine_gl_cocoa_la_rpath) $(libevas_engine_gl_cocoa_la_OBJECTS) $(libevas_engine_gl_cocoa_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_OBJCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_cocoa_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_gl_cocoa_main.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +.m.o: +@am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepOBJC_FALSE@ $(AM_V_OBJC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJCCOMPILE) -c -o $@ $< + +.m.obj: +@am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepOBJC_FALSE@ $(AM_V_OBJC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.m.lo: +@am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(LTOBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepOBJC_FALSE@ $(AM_V_OBJC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(LTOBJCCOMPILE) -c -o $@ $< + +module_la-evas_gl_cocoa_main.lo: evas_gl_cocoa_main.m +@am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(LIBTOOL) $(AM_V_lt) $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT module_la-evas_gl_cocoa_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_gl_cocoa_main.Tpo -c -o module_la-evas_gl_cocoa_main.lo `test -f 'evas_gl_cocoa_main.m' || echo '$(srcdir)/'`evas_gl_cocoa_main.m +@am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_gl_cocoa_main.Tpo $(DEPDIR)/module_la-evas_gl_cocoa_main.Plo +@am__fastdepOBJC_FALSE@ $(AM_V_OBJC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='evas_gl_cocoa_main.m' object='module_la-evas_gl_cocoa_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(LIBTOOL) $(AM_V_lt) $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o module_la-evas_gl_cocoa_main.lo `test -f 'evas_gl_cocoa_main.m' || echo '$(srcdir)/'`evas_gl_cocoa_main.m + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/gl_cocoa/evas_engine.c b/libraries/evas/src/modules/engines/gl_cocoa/evas_engine.c new file mode 100644 index 0000000..fd95688 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_cocoa/evas_engine.c @@ -0,0 +1,1462 @@ +#include "evas_common.h" /* Also includes international specific stuff */ +#include "evas_engine.h" + +#include "evas_private.h" + +#include /* dlopen,dlclose,etc */ +#define EVAS_GL_NO_GL_H_CHECK 1 +#include "Evas_GL.h" + + + +typedef struct _Render_Engine Render_Engine; +typedef struct _Render_Engine_GL_Surface Render_Engine_GL_Surface; +typedef struct _Render_Engine_GL_Context Render_Engine_GL_Context; + +struct _Render_Engine +{ + Evas_GL_Cocoa_Window *win; + int end; +}; + + +struct _Render_Engine_GL_Surface +{ + int initialized; + int fbo_attached; + int w, h; + int depth_bits; + int stencil_bits; + + // Render target texture/buffers + GLuint rt_tex; + GLint rt_internal_fmt; + GLenum rt_fmt; + GLuint rb_depth; + GLenum rb_depth_fmt; + GLuint rb_stencil; + GLenum rb_stencil_fmt; + + Render_Engine_GL_Context *current_ctx; +}; + +struct _Render_Engine_GL_Context +{ + int initialized; + // EGLContext context; + + GLuint fbo; + + Render_Engine_GL_Surface *current_sfc; +}; + + +int _evas_engine_gl_cocoa_log_dom = -1; +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +/* Function table for GL APIs */ +static Evas_GL_API gl_funcs; + + + +static void * +eng_info(Evas *e __UNUSED__) +{ + Evas_Engine_Info_GL_Cocoa *info; + info = calloc(1, sizeof(Evas_Engine_Info_GL_Cocoa)); + DBG("Info %p", info); + if (!info) return NULL; + info->magic.magic = rand(); + return info; +} + +static void +eng_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_GL_Cocoa *in; + + DBG("Info %p", info); + eina_log_domain_unregister(_evas_engine_gl_cocoa_log_dom); + in = (Evas_Engine_Info_GL_Cocoa *)info; + free(in); +} + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_GL_Cocoa *info; + + DBG("Engine Setup"); + + info = (Evas_Engine_Info_GL_Cocoa *)in; + if (!e->engine.data.output) + { + re = calloc(1, sizeof(Render_Engine)); + if (!re) return 0; + + e->engine.data.output = re; + re->win = eng_window_new(info->window, + e->output.w, + e->output.h); + info->view = re->win->view; + if (!re->win) + { + free(re); + e->engine.data.output = NULL; + return 0; + } + + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + } + else + { + re = e->engine.data.output; + eng_window_free(re->win); + re->win = eng_window_new(info->window, + e->output.w, + e->output.h); + info->view = re->win->view; + } + if (!e->engine.data.output) return 0; + + if (!e->engine.data.context) + e->engine.data.context = + e->engine.func->context_new(e->engine.data.output); + eng_window_use(re->win); + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + DBG("Output free"); + re = (Render_Engine *)data; + eng_window_free(re->win); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + + DBG("Output Resize %d %d", w, h); + + re = (Render_Engine *)data; + re->win->width = w; + re->win->height = h; + + eng_window_resize(re->win, w, h); + evas_gl_common_context_resize(re->win->gl_context, w, h, 0); +} + +static void +eng_output_tile_size_set(void *data __UNUSED__, int w __UNUSED__, int h __UNUSED__) +{ + DBG("tile size set"); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + DBG("Redraw rect %d %d %d %d", x, y, w, h); + re = (Render_Engine *)data; + evas_gl_common_context_resize(re->win->gl_context, re->win->width, re->win->height, 0); + /* simple bounding box */ + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, re->win->width, re->win->height); + if ((w <= 0) || (h <= 0)) return; + if (!re->win->draw.redraw) + { +#if 0 + re->win->draw.x1 = x; + re->win->draw.y1 = y; + re->win->draw.x2 = x + w - 1; + re->win->draw.y2 = y + h - 1; +#else + re->win->draw.x1 = 0; + re->win->draw.y1 = 0; + re->win->draw.x2 = re->win->width - 1; + re->win->draw.y2 = re->win->height - 1; +#endif + } + else + { + if (x < re->win->draw.x1) re->win->draw.x1 = x; + if (y < re->win->draw.y1) re->win->draw.y1 = y; + if ((x + w - 1) > re->win->draw.x2) re->win->draw.x2 = x + w - 1; + if ((y + h - 1) > re->win->draw.y2) re->win->draw.y2 = y + h - 1; + } + re->win->draw.redraw = 1; +} + +static void +eng_output_redraws_rect_del(void *data __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +{ +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + re->win->draw.redraw = 0; +} + +//#define SLOW_GL_COPY_RECT 1 +/* vsync games - not for now though */ +#define VSYNC_TO_SCREEN 1 + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_gl_common_context_flush(re->win->gl_context); + /* get the upate rect surface - return engine data as dummy */ + if (!re->win->draw.redraw) + { +// printf("GL: NO updates!\n"); + return NULL; + } +// printf("GL: update....!\n"); +#ifdef SLOW_GL_COPY_RECT + /* if any update - just return the whole canvas - works with swap + * buffers then */ + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = re->win->width; + if (h) *h = re->win->height; + if (cx) *cx = 0; + if (cy) *cy = 0; + if (cw) *cw = re->win->width; + if (ch) *ch = re->win->height; +#else + /* 1 update - INCREDIBLY SLOW if combined with swap_rect in flush. a gl + * problem where there just is no hardware path for somethnig that + * obviously SHOULD be there */ + /* only 1 update to minimise gl context games and rendering multiple update + * regions as evas does with other engines + */ + if (x) *x = re->win->draw.x1; + if (y) *y = re->win->draw.y1; + if (w) *w = re->win->draw.x2 - re->win->draw.x1 + 1; + if (h) *h = re->win->draw.y2 - re->win->draw.y1 + 1; + if (cx) *cx = re->win->draw.x1; + if (cy) *cy = re->win->draw.y1; + if (cw) *cw = re->win->draw.x2 - re->win->draw.x1 + 1; + if (ch) *ch = re->win->draw.y2 - re->win->draw.y1 + 1; +#endif +// clear buffer. only needed for dest alpha +// glClearColor(0.0f, 0.0f, 0.0f, 0.0f); +// glClear(GL_COLOR_BUFFER_BIT); +//x// printf("frame -> new\n"); + return re->win->gl_context->def_surface; +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + /* put back update surface.. in this case just unflag redraw */ + re->win->draw.redraw = 0; + re->win->draw.drew = 1; + evas_gl_common_context_flush(re->win->gl_context); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!re->win->draw.drew) return; + + re->win->draw.drew = 0; + eng_window_use(re->win); + +#ifdef VSYNC_TO_SCREEN + eng_window_vsync_set(1); +#endif + + eng_window_swap_buffers(re->win); + +} + +static void +eng_output_idle_flush(void *data __UNUSED__) +{ +} + +static void +eng_context_cutout_add(void *data __UNUSED__, void *context, int x, int y, int w, int h) +{ + evas_common_draw_context_add_cutout(context, x, y, w, h); +} + +static void +eng_context_cutout_clear(void *data __UNUSED__, void *context) +{ + evas_common_draw_context_clear_cutouts(context); +} + +static void +eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_rect_draw(re->win->gl_context, x, y, w, h); +} + +static void +eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_line_draw(re->win->gl_context, x1, y1, x2, y2); +} + +static void * +eng_polygon_point_add(void *data, void *context __UNUSED__, void *polygon, int x, int y) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_poly_point_add(polygon, x, y); +} + +static void * +eng_polygon_points_clear(void *data, void *context __UNUSED__, void *polygon) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_poly_points_clear(polygon); +} + +static void +eng_polygon_draw(void *data, void *context, void *surface __UNUSED__, void *polygon, int x, int y) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_poly_draw(re->win->gl_context, polygon, x, y); +} + +static int +eng_image_alpha_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return 1; + im = image; + return im->alpha; +} + +static int +eng_image_colorspace_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return EVAS_COLORSPACE_ARGB8888; + im = image; + return im->cs.space; +} + +static void +eng_image_mask_create(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im; + + if (!image) return; + im = image; + if (!im->im->image.data) + evas_cache_image_load_data(&im->im->cache_entry); + if (!im->tex) + im->tex = evas_gl_common_texture_new(im->gc, im->im); +} + + +static void * +eng_image_alpha_set(void *data, void *image, int has_alpha) +{ + Render_Engine *re; + Evas_GL_Image *im; + + re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (im->alpha == has_alpha) return image; + if (im->native.data) + { + im->alpha = has_alpha; + return image; + } + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt->dyn.img)) + { + im->alpha = has_alpha; + im->tex->alpha = im->alpha; + return image; + } + /* FIXME: can move to gl_common */ + if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return im; + if ((has_alpha) && (im->im->cache_entry.flags.alpha)) return image; + else if ((!has_alpha) && (!im->im->cache_entry.flags.alpha)) return image; + if (im->references > 1) + { + Evas_GL_Image *im_new; + + im_new = evas_gl_common_image_new_from_copied_data + (im->gc, im->im->cache_entry.w, im->im->cache_entry.h, + im->im->image.data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im_new) return im; + evas_gl_common_image_free(im); + im = im_new; + } + else + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + return evas_gl_common_image_alpha_set(im, has_alpha ? 1 : 0); +// im->im->cache_entry.flags.alpha = has_alpha ? 1 : 0; +// return image; +} + +static void * +eng_image_border_set(void *data __UNUSED__, void *image, int l __UNUSED__, int r __UNUSED__, int t __UNUSED__, int b __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; + return image; +} + +static void +eng_image_border_get(void *data __UNUSED__, void *image __UNUSED__, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +} + +static char * +eng_image_comment_get(void *data __UNUSED__, void *image, char *key __UNUSED__) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (!im->im) return NULL; + return im->im->info.comment; +} + +static char * +eng_image_format_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + im = image; + return NULL; +} + +static void +eng_image_colorspace_set(void *data, void *image, int cspace) +{ + Render_Engine *re; + Evas_GL_Image *im; + + re = (Render_Engine *)data; + if (!image) return; + im = image; + if (im->native.data) return; + /* FIXME: can move to gl_common */ + if (im->cs.space == cspace) return; + eng_window_use(re->win); + evas_cache_image_colorspace(&im->im->cache_entry, cspace); + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + im->cs.data = NULL; + im->cs.no_free = 0; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + if (im->tex) evas_gl_common_texture_free(im->tex); + im->tex = NULL; + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + if (im->im->cache_entry.h > 0) + im->cs.data = + calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2); + else + im->cs.data = NULL; + im->cs.no_free = 0; + break; + default: + abort(); + break; + } + im->cs.space = cspace; +} + +///////////////////////////////////////////////////////////////////////// +// +// + +// FIXME: this is enabled so updates happen - but its SLOOOOOOOOOOOOOOOW +// (i am sure this is the reason) not to mention seemingly superfluous. but +// i need to enable it for it to work on fglrx at least. havent tried nvidia. +// +// why is this the case? does anyone know? has anyone tried it on other gfx +// drivers? +// +//#define GLX_TEX_PIXMAP_RECREATE 1 +#if 0 +static void +eng_image_draw_filtered(void *data, void *context, void *surface, + void *image, Evas_Filter_Info *filter) +{ + Render_Engine *re = data; + + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + + evas_gl_common_filter_draw(re->win->gl_context, image, filter); +} + +static Filtered_Image * +eng_image_filtered_get(void *im, uint8_t *key, size_t keylen) +{ + return evas_gl_common_image_filtered_get(im, key, keylen); +} + +static Filtered_Image * +eng_image_filtered_save(void *im, void *fim, uint8_t *key, size_t keylen) +{ + return evas_gl_common_image_filtered_save(im, fim, key, keylen); +} + +static void +eng_image_filtered_free(void *im, Filtered_Image *fim) +{ + evas_gl_common_image_filtered_free(im, fim); +} + +#endif + +// +// +///////////////////////////////////////////////////////////////////////// + +static void * +eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + *error = EVAS_LOAD_ERROR_NONE; + eng_window_use(re->win); + return evas_gl_common_image_load(re->win->gl_context, file, key, lo, error); +} + +static void * +eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + return evas_gl_common_image_new_from_data(re->win->gl_context, w, h, image_data, alpha, cspace); +} + +static void * +eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + return evas_gl_common_image_new_from_copied_data(re->win->gl_context, w, h, image_data, alpha, cspace); +} + +static void +eng_image_free(void *data, void *image) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_image_free(image); +} + +static void +eng_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) +{ + if (!image) + { + *w = 0; + *h = 0; + return; + } + if (w) *w = ((Evas_GL_Image *)image)->w; + if (h) *h = ((Evas_GL_Image *)image)->h; +} + +static void * +eng_image_size_set(void *data, void *image, int w, int h) +{ + Render_Engine *re; + Evas_GL_Image *im = image; + Evas_GL_Image *im_old; + + re = (Render_Engine *)data; + if (!im) return NULL; + if (im->native.data) + { + im->w = w; + im->h = h; + return image; + } + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt->dyn.img)) + { + evas_gl_common_texture_free(im->tex); + im->tex = NULL; + im->w = w; + im->h = h; + im->tex = evas_gl_common_texture_dynamic_new(im->gc, im); + return image; + } + im_old = image; + if ((eng_image_colorspace_get(data, image) == EVAS_COLORSPACE_YCBCR422P601_PL) || + (eng_image_colorspace_get(data, image) == EVAS_COLORSPACE_YCBCR422P709_PL)) + w &= ~0x1; + if ((im_old) && + ((int)im_old->im->cache_entry.w == w) && + ((int)im_old->im->cache_entry.h == h)) + return image; + if (im_old) + { + im = evas_gl_common_image_new(re->win->gl_context, w, h, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); +/* + evas_common_load_image_data_from_file(im_old->im); + if (im_old->im->image->data) + { + evas_common_blit_rectangle(im_old->im, im->im, 0, 0, w, h, 0, 0); + evas_common_cpu_end_opt(); + } + */ + evas_gl_common_image_free(im_old); + } + else + im = evas_gl_common_image_new(re->win->gl_context, w, h, 1, EVAS_COLORSPACE_ARGB8888); + return im; +} + +static void * +eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h) +{ + Render_Engine *re; + Evas_GL_Image *im = image; + + re = (Render_Engine *)data; + if (!image) return NULL; + if (im->native.data) return image; + eng_window_use(re->win); + evas_gl_common_image_dirty(image, x, y, w, h); + return image; +} + +static void * +eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, int *err) +{ + Render_Engine *re; + Evas_GL_Image *im; + int error; + + re = (Render_Engine *)data; + if (!image) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_GENERIC; + return NULL; + } + im = image; + if (im->native.data) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.data)) + { + *image_data = im->tex->pt->dyn.data; + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + eng_window_use(re->win); + error = evas_cache_image_load_data(&im->im->cache_entry); + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (to_write) + { + if (im->references > 1) + { + Evas_GL_Image *im_new; + + im_new = evas_gl_common_image_new_from_copied_data + (im->gc, im->im->cache_entry.w, im->im->cache_entry.h, + im->im->image.data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im_new) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return im; + } + evas_gl_common_image_free(im); + im = im_new; + } + else + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + } + *image_data = im->im->image.data; + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + *image_data = im->cs.data; + break; + default: + abort(); + break; + } + if (err) *err = error; + return im; +} + +static void * +eng_image_data_put(void *data, void *image, DATA32 *image_data) +{ + Render_Engine *re; + Evas_GL_Image *im, *im2; + + re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (im->native.data) return image; + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.data)) + { + if (im->tex->pt->dyn.data == image_data) + { + return image; + } + else + { + int w, h; + + w = im->im->cache_entry.w; + h = im->im->cache_entry.h; + im2 = eng_image_new_from_data(data, w, h, image_data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im2) return im; + evas_gl_common_image_free(im); + im = im2; + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + return im; + } + } + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (image_data != im->im->image.data) + { + int w, h; + + w = im->im->cache_entry.w; + h = im->im->cache_entry.h; + im2 = eng_image_new_from_data(data, w, h, image_data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im2) return im; + evas_gl_common_image_free(im); + im = im2; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + if (image_data != im->cs.data) + { + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + im->cs.data = image_data; + } + break; + default: + abort(); + break; + } + /* hmmm - but if we wrote... why bother? */ + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + return im; +} + +static void +eng_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) +{ + Evas_GL_Image *gim = image; + RGBA_Image *im; + + if (!gim) return; + if (gim->native.data) return; + im = (RGBA_Image *)gim->im; + if (!im) return; + evas_cache_image_preload_data(&im->cache_entry, target); +} + +static void +eng_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) +{ + Evas_GL_Image *gim = image; + RGBA_Image *im; + + if (!gim) return; + if (gim->native.data) return; + im = (RGBA_Image *)gim->im; + if (!im) return; + evas_cache_image_preload_cancel(&im->cache_entry, target); +} + +static void +eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_image_draw(re->win->gl_context, image, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h, + smooth); +} + +static void +eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) +{ + if (image) evas_gl_common_image_scale_hint_set(image, hint); +} + +static int +eng_image_scale_hint_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + if (!gim) return EVAS_IMAGE_SCALE_HINT_NONE; + return gim->scale_hint; +} + +static void +eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) +{ + Evas_GL_Image *gim = image; + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + if (npoints != 4) + { + // FIXME: nash - you didnt fix this + abort(); + } + if ((p[0].x == p[3].x) && + (p[1].x == p[2].x) && + (p[0].y == p[1].y) && + (p[3].y == p[2].y) && + (p[0].x <= p[1].x) && + (p[0].y <= p[2].y) && + (p[0].u == 0) && + (p[0].v == 0) && + (p[1].u == (gim->w << FP)) && + (p[1].v == 0) && + (p[2].u == (gim->w << FP)) && + (p[2].v == (gim->h << FP)) && + (p[3].u == 0) && + (p[3].v == (gim->h << FP)) && + (p[0].col == 0xffffffff) && + (p[1].col == 0xffffffff) && + (p[2].col == 0xffffffff) && + (p[3].col == 0xffffffff)) + { + int dx, dy, dw, dh; + + dx = p[0].x >> FP; + dy = p[0].y >> FP; + dw = (p[2].x >> FP) - dx; + dh = (p[2].y >> FP) - dy; + eng_image_draw(data, context, surface, image, + 0, 0, gim->w, gim->h, dx, dy, dw, dh, smooth); + } + else + { + evas_gl_common_image_map_draw(re->win->gl_context, image, npoints, p, + smooth, level); + } +} + +static void * +eng_image_map_surface_new(void *data __UNUSED__, int w, int h, int alpha) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_image_surface_new(re->win->gl_context, w, h, alpha); +} + +static void +eng_image_map_surface_free(void *data __UNUSED__, void *surface) +{ + evas_gl_common_image_free(surface); +} + +static void +eng_image_content_hint_set(void *data __UNUSED__, void *image, int hint) +{ + if (image) evas_gl_common_image_content_hint_set(image, hint); +} + +static int +eng_image_content_hint_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + if (!gim) return EVAS_IMAGE_CONTENT_HINT_NONE; + return gim->content_hint; +} + +static void +eng_image_cache_flush(void *data __UNUSED__) +{ + Render_Engine *re; + int tmp_size; + + re = (Render_Engine *)data; + + tmp_size = evas_common_image_get_cache(); + evas_common_image_set_cache(0); + evas_common_rgba_image_scalecache_flush(); + evas_gl_common_image_cache_flush(re->win->gl_context); + evas_common_image_set_cache(tmp_size); +} + +static void +eng_image_cache_set(void *data __UNUSED__, int bytes) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_image_set_cache(bytes); + evas_common_rgba_image_scalecache_size_set(bytes); + evas_gl_common_image_cache_flush(re->win->gl_context); +} + +static int +eng_image_cache_get(void *data __UNUSED__) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_common_image_get_cache(); +} + + +static void +eng_image_stride_get(void *data __UNUSED__, void *image, int *stride) +{ + Evas_GL_Image *im = image; + *stride = im->w * 4; + if ((im->tex) && (im->tex->pt->dyn.img)) + { + *stride = im->tex->pt->dyn.w * 4; + // FIXME: for other image formats (yuv etc.) different stride needed + } +} + +static void +eng_font_draw(void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + { + // FIXME: put im into context so we can free it + static RGBA_Image *im = NULL; + + if (!im) + im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + im->cache_entry.w = re->win->width; + im->cache_entry.h = re->win->height; + evas_common_draw_context_font_ext_set(context, + re->win->gl_context, + evas_gl_font_texture_new, + evas_gl_font_texture_free, + evas_gl_font_texture_draw); + evas_common_font_draw(im, context, (RGBA_Font *) font, x, y, + intl_props); + evas_common_draw_context_font_ext_set(context, + NULL, + NULL, + NULL, + NULL); + } +} + + +static Eina_Bool +eng_canvas_alpha_get(void *data __UNUSED__, void *info __UNUSED__) +{ + // FIXME: support ARGB gl targets!!! + return EINA_FALSE; +} + + +#if 1 +static void +evgl_glBindFramebuffer(GLenum target, GLuint framebuffer) +{ + // Add logic to take care when framebuffer=0 + glBindFramebuffer(target, framebuffer); +} + +static void +evgl_glBindRenderbuffer(GLenum target, GLuint renderbuffer) +{ + // Add logic to take care when renderbuffer=0 + glBindRenderbuffer(target, renderbuffer); +} + +static void +evgl_glClearDepthf(GLclampf depth) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + glClearDepthf(depth); +#else + glClearDepth(depth); +#endif +} + +static void +evgl_glDepthRangef(GLclampf zNear, GLclampf zFar) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + glDepthRangef(zNear, zFar); +#else + glDepthRange(zNear, zFar); +#endif +} + +static void +evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); +#else + if (range) + { + range[0] = -126; // floor(log2(FLT_MIN)) + range[1] = 127; // floor(log2(FLT_MAX)) + } + if (precision) + { + precision[0] = 24; // floor(-log2((1.0/16777218.0))); + } + return; + shadertype = precisiontype = 0; +#endif +} + +static void +evgl_glReleaseShaderCompiler(void) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + glReleaseShaderCompiler(); +#else +#endif +} + +static void +evgl_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + glShaderBinary(n, shaders, binaryformat, binary, length); +#else +// FIXME: need to dlsym/getprocaddress for this + return; + n = binaryformat = length = 0; + shaders = binary = 0; +#endif +} + +#endif + +static void * +eng_gl_api_get(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + + gl_funcs.version = EVAS_GL_API_VERSION; +#if 1 +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, ) + ORD(glActiveTexture); + ORD(glAttachShader); + ORD(glBindAttribLocation); + ORD(glBindBuffer); + ORD(glBindTexture); + ORD(glBlendColor); + ORD(glBlendEquation); + ORD(glBlendEquationSeparate); + ORD(glBlendFunc); + ORD(glBlendFuncSeparate); + ORD(glBufferData); + ORD(glBufferSubData); + ORD(glCheckFramebufferStatus); + ORD(glClear); + ORD(glClearColor); +// ORD(glClearDepthf); + ORD(glClearStencil); + ORD(glColorMask); + ORD(glCompileShader); + ORD(glCompressedTexImage2D); + ORD(glCompressedTexSubImage2D); + ORD(glCopyTexImage2D); + ORD(glCopyTexSubImage2D); + ORD(glCreateProgram); + ORD(glCreateShader); + ORD(glCullFace); + ORD(glDeleteBuffers); + ORD(glDeleteFramebuffers); + ORD(glDeleteProgram); + ORD(glDeleteRenderbuffers); + ORD(glDeleteShader); + ORD(glDeleteTextures); + ORD(glDepthFunc); + ORD(glDepthMask); +// ORD(glDepthRangef); + ORD(glDetachShader); + ORD(glDisable); + ORD(glDisableVertexAttribArray); + ORD(glDrawArrays); + ORD(glDrawElements); + ORD(glEnable); + ORD(glEnableVertexAttribArray); + ORD(glFinish); + ORD(glFlush); + ORD(glFramebufferRenderbuffer); + ORD(glFramebufferTexture2D); + ORD(glFrontFace); + ORD(glGenBuffers); + ORD(glGenerateMipmap); + ORD(glGenFramebuffers); + ORD(glGenRenderbuffers); + ORD(glGenTextures); + ORD(glGetActiveAttrib); + ORD(glGetActiveUniform); + ORD(glGetAttachedShaders); + ORD(glGetAttribLocation); + ORD(glGetBooleanv); + ORD(glGetBufferParameteriv); + ORD(glGetError); + ORD(glGetFloatv); + ORD(glGetFramebufferAttachmentParameteriv); + ORD(glGetIntegerv); + ORD(glGetProgramiv); + ORD(glGetProgramInfoLog); + ORD(glGetRenderbufferParameteriv); + ORD(glGetShaderiv); + ORD(glGetShaderInfoLog); +// ORD(glGetShaderPrecisionFormat); + ORD(glGetShaderSource); + ORD(glGetString); + ORD(glGetTexParameterfv); + ORD(glGetTexParameteriv); + ORD(glGetUniformfv); + ORD(glGetUniformiv); + ORD(glGetUniformLocation); + ORD(glGetVertexAttribfv); + ORD(glGetVertexAttribiv); + ORD(glGetVertexAttribPointerv); + ORD(glHint); + ORD(glIsBuffer); + ORD(glIsEnabled); + ORD(glIsFramebuffer); + ORD(glIsProgram); + ORD(glIsRenderbuffer); + ORD(glIsShader); + ORD(glIsTexture); + ORD(glLineWidth); + ORD(glLinkProgram); + ORD(glPixelStorei); + ORD(glPolygonOffset); + ORD(glReadPixels); +// ORD(glReleaseShaderCompiler); + ORD(glRenderbufferStorage); + ORD(glSampleCoverage); + ORD(glScissor); +// ORD(glShaderBinary); + ORD(glShaderSource); + ORD(glStencilFunc); + ORD(glStencilFuncSeparate); + ORD(glStencilMask); + ORD(glStencilMaskSeparate); + ORD(glStencilOp); + ORD(glStencilOpSeparate); + ORD(glTexImage2D); + ORD(glTexParameterf); + ORD(glTexParameterfv); + ORD(glTexParameteri); + ORD(glTexParameteriv); + ORD(glTexSubImage2D); + ORD(glUniform1f); + ORD(glUniform1fv); + ORD(glUniform1i); + ORD(glUniform1iv); + ORD(glUniform2f); + ORD(glUniform2fv); + ORD(glUniform2i); + ORD(glUniform2iv); + ORD(glUniform3f); + ORD(glUniform3fv); + ORD(glUniform3i); + ORD(glUniform3iv); + ORD(glUniform4f); + ORD(glUniform4fv); + ORD(glUniform4i); + ORD(glUniform4iv); + ORD(glUniformMatrix2fv); + ORD(glUniformMatrix3fv); + ORD(glUniformMatrix4fv); + ORD(glUseProgram); + ORD(glValidateProgram); + ORD(glVertexAttrib1f); + ORD(glVertexAttrib1fv); + ORD(glVertexAttrib2f); + ORD(glVertexAttrib2fv); + ORD(glVertexAttrib3f); + ORD(glVertexAttrib3fv); + ORD(glVertexAttrib4f); + ORD(glVertexAttrib4fv); + ORD(glVertexAttribPointer); + ORD(glViewport); +#undef ORD + +// Override functions wrapped by Evas_GL +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, evgl_) + ORD(glBindFramebuffer); + ORD(glBindRenderbuffer); + +// GLES2.0 API compat on top of desktop gl + ORD(glClearDepthf); + ORD(glDepthRangef); + ORD(glGetShaderPrecisionFormat); + ORD(glReleaseShaderCompiler); + ORD(glShaderBinary); +#undef ORD + +#endif + + return &gl_funcs; +} + +static int +eng_image_load_error_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im; + + if (!image) return EVAS_LOAD_ERROR_NONE; + im = image; + return im->im->cache_entry.load_error; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + _evas_engine_gl_cocoa_log_dom = eina_log_domain_register("EvasGLCocoa", EVAS_DEFAULT_LOG_COLOR); + if(_evas_engine_gl_cocoa_log_dom < 0) + { + EINA_LOG_ERR("Impossible to create a log domain for GL (Cocoa) engine."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ + #define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(context_cutout_add); + ORD(context_cutout_clear); + ORD(output_flush); + ORD(output_idle_flush); + // ORD(output_dump); + ORD(rectangle_draw); + ORD(line_draw); + ORD(polygon_point_add); + ORD(polygon_points_clear); + ORD(polygon_draw); + + ORD(image_load); + ORD(image_new_from_data); + ORD(image_new_from_copied_data); + ORD(image_free); + ORD(image_size_get); + ORD(image_size_set); + ORD(image_dirty_region); + ORD(image_data_get); + ORD(image_data_put); + ORD(image_data_preload_request); + ORD(image_data_preload_cancel); + ORD(image_alpha_set); + ORD(image_alpha_get); + ORD(image_border_set); + ORD(image_border_get); + ORD(image_draw); + ORD(image_comment_get); + ORD(image_format_get); + ORD(image_colorspace_set); + ORD(image_colorspace_get); + ORD(image_mask_create); + // ORD(image_native_set); + // ORD(image_native_get); + // ORD(image_draw_filtered); + // ORD(image_filtered_get); + // ORD(image_filtered_save); + // ORD(image_filtered_free); + + ORD(font_draw); + + ORD(image_scale_hint_set); + ORD(image_scale_hint_get); + ORD(image_stride_get); + + ORD(image_map_draw); + ORD(image_map_surface_new); + ORD(image_map_surface_free); + + ORD(image_content_hint_set); + ORD(image_content_hint_get); + + ORD(image_cache_flush); + ORD(image_cache_set); + ORD(image_cache_get); + + ORD(gl_api_get); + + ORD(image_load_error_get); + + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em) +{ + eina_log_domain_unregister(_evas_engine_gl_cocoa_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "gl_cocoa", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, gl_cocoa); + +#ifndef EVAS_STATIC_BUILD_GL_COCOA +EVAS_EINA_MODULE_DEFINE(engine, gl_cocoa); +#endif diff --git a/libraries/evas/src/modules/engines/gl_cocoa/evas_engine.h b/libraries/evas/src/modules/engines/gl_cocoa/evas_engine.h new file mode 100644 index 0000000..a066d3e --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_cocoa/evas_engine.h @@ -0,0 +1,69 @@ +#ifndef __EVAS_ENGINE_H__ +#define __EVAS_ENGINE_H__ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include "evas_gl_common.h" +#include "Evas_Engine_GL_Cocoa.h" + +extern int _evas_engine_gl_cocoa_log_dom; + +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_gl_cocoa_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_gl_cocoa_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_gl_cocoa_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_gl_cocoa_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_gl_cocoa_log_dom, __VA_ARGS__) + +typedef struct _Evas_GL_Cocoa_Window Evas_GL_Cocoa_Window; + +struct _Evas_GL_Cocoa_Window +{ + void* window; + void* view; + int width; + int height; + int depth; + Evas_Engine_GL_Context *gl_context; + struct { + int x1; + int y1; + int x2; + int y2; + int redraw : 1; + int drew : 1; + } draw; +}; + +Evas_GL_Cocoa_Window *eng_window_new(void *window, + int width, + int height); +void eng_window_free(Evas_GL_Cocoa_Window *gw); +void eng_window_use(Evas_GL_Cocoa_Window *gw); +void eng_window_swap_buffers(Evas_GL_Cocoa_Window *gw); +void eng_window_vsync_set(int on); +void ng_window_resize(Evas_GL_Cocoa_Window *gw, int width, int height); + +#endif /* __EVAS_ENGINE_H__ */ diff --git a/libraries/evas/src/modules/engines/gl_cocoa/evas_gl_cocoa_main.m b/libraries/evas/src/modules/engines/gl_cocoa/evas_gl_cocoa_main.m new file mode 100644 index 0000000..aa6b895 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_cocoa/evas_gl_cocoa_main.m @@ -0,0 +1,134 @@ + +#include + +#include "evas_engine.h" + +static Evas_GL_Cocoa_Window *_evas_gl_cocoa_window = NULL; + +@interface EvasGLView : NSOpenGLView +{ +} + ++ (NSOpenGLPixelFormat*) basicPixelFormat; +- (id) initWithFrame: (NSRect) frameRect; + +@end + + +@implementation EvasGLView + +- (id) init +{ + self = [super init]; + return self; +} + ++ (NSOpenGLPixelFormat*) basicPixelFormat +{ + NSOpenGLPixelFormatAttribute attributes [] = { + NSOpenGLPFAWindow, + NSOpenGLPFAAccelerated, + NSOpenGLPFADoubleBuffer, + /*NSOpenGLPFAColorSize, 24, + NSOpenGLPFAAlphaSize, 8, + NSOpenGLPFADepthSize, 24,*/ + 0 + }; + return [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease]; +} + +// --------------------------------- + +-(id) initWithFrame: (NSRect) frameRect +{ + NSOpenGLPixelFormat * pf = [EvasGLView basicPixelFormat]; + self = [super initWithFrame: frameRect pixelFormat: pf]; + return self; +} + +@end + + +Evas_GL_Cocoa_Window * +eng_window_new(void *window, + int w, + int h) +{ + Evas_GL_Cocoa_Window *gw; + int context_attrs[3]; + int config_attrs[20]; + int major_version, minor_version; + int num_config; + + gw = calloc(1, sizeof(Evas_GL_Cocoa_Window)); + if (!gw) return NULL; + + _evas_gl_cocoa_window = gw; + gw->window = window; + gw->view = [[EvasGLView alloc] initWithFrame:NSMakeRect(0,0,w,h)]; + NSOpenGLContext *ctx = [(NSOpenGLView*)gw->view openGLContext]; + [ctx makeCurrentContext]; + gw->gl_context = evas_gl_common_context_new(); + + if (!gw->gl_context) + { + free(gw); + return NULL; + } + evas_gl_common_context_use(gw->gl_context); + evas_gl_common_context_resize(gw->gl_context, w, h, 0); + + return gw; +} + +void +eng_window_free(Evas_GL_Cocoa_Window *gw) +{ + if (gw == _evas_gl_cocoa_window) _evas_gl_cocoa_window = NULL; + evas_gl_common_context_free(gw->gl_context); + free(gw); +} + +void +eng_window_use(Evas_GL_Cocoa_Window *gw) +{ + if (_evas_gl_cocoa_window != gw) + { + [[(NSOpenGLView*)gw->view openGLContext] makeCurrentContext]; + if (_evas_gl_cocoa_window) + evas_gl_common_context_flush(_evas_gl_cocoa_window->gl_context); + _evas_gl_cocoa_window = gw; + + } + evas_gl_common_context_use(gw->gl_context); +} + +void +eng_window_swap_buffers(Evas_GL_Cocoa_Window *gw) +{ + [[(NSOpenGLView*)gw->view openGLContext] flushBuffer]; +} + +void +eng_window_vsync_set(int on) +{ + +} + + +void +eng_window_resize(Evas_GL_Cocoa_Window *gw, int width, int height) +{ + NSRect view_frame; + + INF("Resize %d %d\n", width, height); + + view_frame = [(EvasGLView*)gw->view frame]; + printf("view_frame : %3.3f %3.3f\n", view_frame.size.height, view_frame.size.width); + view_frame.size.height = height; + view_frame.size.width = width; + printf("view_frame : %3.3f %3.3f\n", view_frame.size.height, view_frame.size.width); + [(EvasGLView*)gw->view setFrame:view_frame]; + [[(NSOpenGLView*)gw->view openGLContext] flushBuffer]; +} + diff --git a/libraries/evas/src/modules/engines/gl_common/Makefile.am b/libraries/evas/src/modules/engines/gl_common/Makefile.am new file mode 100644 index 0000000..15acc02 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/Makefile.am @@ -0,0 +1,164 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@EINA_CFLAGS@ + +if BUILD_ENGINE_GL_COMMON + +noinst_LTLIBRARIES = libevas_engine_gl_common.la +libevas_engine_gl_common_la_SOURCES = \ +evas_gl_private.h \ +evas_gl_common.h \ +evas_gl_context.c \ +evas_gl_shader.c \ +evas_gl_rectangle.c \ +evas_gl_texture.c \ +evas_gl_image.c \ +evas_gl_font.c \ +evas_gl_polygon.c \ +evas_gl_line.c \ +evas_gl_filter.c \ +shader/rect_frag.h \ +shader/rect_frag_bin_s3c6410.h \ +shader/rect_vert.h \ +shader/rect_vert_bin_s3c6410.h \ +shader/font_frag.h \ +shader/font_frag_bin_s3c6410.h \ +shader/font_vert.h \ +shader/font_vert_bin_s3c6410.h \ +shader/img_frag.h \ +shader/img_frag_bin_s3c6410.h \ +shader/img_vert.h \ +shader/img_vert_bin_s3c6410.h \ +shader/img_nomul_frag.h \ +shader/img_nomul_frag_bin_s3c6410.h \ +shader/img_nomul_vert.h \ +shader/img_nomul_vert_bin_s3c6410.h \ +shader/img_bgra_frag.h \ +shader/img_bgra_frag_bin_s3c6410.h \ +shader/img_bgra_vert.h \ +shader/img_bgra_vert_bin_s3c6410.h \ +shader/img_bgra_nomul_frag.h \ +shader/img_bgra_nomul_frag_bin_s3c6410.h \ +shader/img_bgra_nomul_vert.h \ +shader/img_bgra_nomul_vert_bin_s3c6410.h \ +shader/img_mask_frag.h \ +shader/img_mask_vert.h \ +shader/nv12_nomul_vert.h \ +shader/nv12_vert.h \ +shader/nv12_nomul_frag.h \ +shader/nv12_frag.h \ +shader/yuv_frag.h \ +shader/yuv_frag_bin_s3c6410.h \ +shader/yuv_vert.h \ +shader/yuv_vert_bin_s3c6410.h \ +shader/yuv_nomul_frag.h \ +shader/yuv_nomul_frag_bin_s3c6410.h \ +shader/yuv_nomul_vert.h \ +shader/yuv_nomul_vert_bin_s3c6410.h \ +shader/tex_frag.h \ +shader/tex_frag_bin_s3c6410.h \ +shader/tex_vert.h \ +shader/tex_vert_bin_s3c6410.h \ +shader/tex_nomul_frag.h \ +shader/tex_nomul_frag_bin_s3c6410.h \ +shader/tex_nomul_vert.h \ +shader/tex_nomul_vert_bin_s3c6410.h \ +shader/filter_invert.h \ +shader/filter_invert_nomul.h \ +shader/filter_invert_bgra.h \ +shader/filter_invert_bgra_nomul.h \ +shader/filter_sepia.h \ +shader/filter_sepia_nomul.h \ +shader/filter_sepia_bgra.h \ +shader/filter_sepia_bgra_nomul.h \ +shader/filter_greyscale.h \ +shader/filter_greyscale_nomul.h \ +shader/filter_greyscale_bgra.h \ +shader/filter_greyscale_bgra_nomul.h \ +shader/filter_blur.h \ +shader/filter_blur_nomul.h \ +shader/filter_blur_bgra.h \ +shader/filter_blur_bgra_nomul.h \ +shader/yuy2_frag.h \ +shader/yuy2_vert.h \ +shader/yuy2_nomul_frag.h \ +shader/yuy2_nomul_vert.h + +libevas_engine_gl_common_la_LIBADD = @EINA_LIBS@ @GL_EET_LIBS@ @evas_engine_gl_common_libs@ @dlopen_libs@ +endif + +EXTRA_DIST = \ +shader/compile-s3c6410.sh \ +shader/compile-sgx.sh \ +shader/make-c-bin.sh \ +shader/make-c-str.sh \ +shader/rect_frag.shd \ +shader/rect_frag_s3c6410.asm \ +shader/rect_vert.shd \ +shader/font_frag.shd \ +shader/font_frag_s3c6410.asm \ +shader/font_vert.shd \ +shader/img_frag.shd \ +shader/img_frag_s3c6410.asm \ +shader/img_vert.shd \ +shader/img_nomul_frag.shd \ +shader/img_nomul_vert.shd \ +shader/img_bgra_vert.shd \ +shader/img_bgra_frag.shd \ +shader/img_bgra_vert.shd \ +shader/img_bgra_nomul_frag.shd \ +shader/img_bgra_nomul_vert.shd \ +shader/img_mask_frag.h \ +shader/img_mask_vert.h \ +shader/yuv_frag.shd \ +shader/yuv_frag_s3c6410.asm \ +shader/yuv_vert.shd \ +shader/yuv_nomul_frag.shd \ +shader/yuv_nomul_vert.shd \ +shader/tex_frag.shd \ +shader/tex_frag_s3c6410.asm \ +shader/tex_vert.shd \ +shader/tex_nomul_frag.shd \ +shader/tex_nomul_vert.shd \ +shader/filter_invert.shd \ +shader/filter_invert_nomul.shd \ +shader/filter_invert_bgra.shd \ +shader/filter_invert_bgra_nomul.shd \ +shader/filter_greyscale.shd \ +shader/filter_greyscale_nomul.shd \ +shader/filter_greyscale_bgra.shd \ +shader/filter_greyscale_bgra_nomul.shd \ +shader/filter_sepia.shd \ +shader/filter_sepia_nomul.shd \ +shader/filter_sepia_bgra.shd \ +shader/filter_sepia_bgra_nomul.shd \ +shader/filter_blur.shd \ +shader/filter_blur_nomul.shd \ +shader/filter_blur_bgra.shd \ +shader/filter_blur_bgra_nomul.shd \ +shader/nv12_frag.h \ +shader/nv12_frag.shd \ +shader/nv12_nomul_frag.h \ +shader/nv12_nomul_frag.shd \ +shader/nv12_nomul_vert.h \ +shader/nv12_nomul_vert.shd \ +shader/nv12_vert.h \ +shader/nv12_vert.shd \ +shader/yuy2_frag.h \ +shader/yuy2_frag.shd \ +shader/yuy2_nomul_frag.h \ +shader/yuy2_nomul_frag.shd \ +shader/yuy2_nomul_vert.h \ +shader/yuy2_nomul_vert.shd \ +shader/yuy2_vert.h \ +shader/yuy2_vert.shd + + diff --git a/libraries/evas/src/modules/engines/gl_common/Makefile.in b/libraries/evas/src/modules/engines/gl_common/Makefile.in new file mode 100644 index 0000000..61ed478 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/Makefile.in @@ -0,0 +1,871 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/gl_common +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libevas_engine_gl_common_la_DEPENDENCIES = +am__libevas_engine_gl_common_la_SOURCES_DIST = evas_gl_private.h \ + evas_gl_common.h evas_gl_context.c evas_gl_shader.c \ + evas_gl_rectangle.c evas_gl_texture.c evas_gl_image.c \ + evas_gl_font.c evas_gl_polygon.c evas_gl_line.c \ + evas_gl_filter.c shader/rect_frag.h \ + shader/rect_frag_bin_s3c6410.h shader/rect_vert.h \ + shader/rect_vert_bin_s3c6410.h shader/font_frag.h \ + shader/font_frag_bin_s3c6410.h shader/font_vert.h \ + shader/font_vert_bin_s3c6410.h shader/img_frag.h \ + shader/img_frag_bin_s3c6410.h shader/img_vert.h \ + shader/img_vert_bin_s3c6410.h shader/img_nomul_frag.h \ + shader/img_nomul_frag_bin_s3c6410.h shader/img_nomul_vert.h \ + shader/img_nomul_vert_bin_s3c6410.h shader/img_bgra_frag.h \ + shader/img_bgra_frag_bin_s3c6410.h shader/img_bgra_vert.h \ + shader/img_bgra_vert_bin_s3c6410.h \ + shader/img_bgra_nomul_frag.h \ + shader/img_bgra_nomul_frag_bin_s3c6410.h \ + shader/img_bgra_nomul_vert.h \ + shader/img_bgra_nomul_vert_bin_s3c6410.h \ + shader/img_mask_frag.h shader/img_mask_vert.h \ + shader/nv12_nomul_vert.h shader/nv12_vert.h \ + shader/nv12_nomul_frag.h shader/nv12_frag.h shader/yuv_frag.h \ + shader/yuv_frag_bin_s3c6410.h shader/yuv_vert.h \ + shader/yuv_vert_bin_s3c6410.h shader/yuv_nomul_frag.h \ + shader/yuv_nomul_frag_bin_s3c6410.h shader/yuv_nomul_vert.h \ + shader/yuv_nomul_vert_bin_s3c6410.h shader/tex_frag.h \ + shader/tex_frag_bin_s3c6410.h shader/tex_vert.h \ + shader/tex_vert_bin_s3c6410.h shader/tex_nomul_frag.h \ + shader/tex_nomul_frag_bin_s3c6410.h shader/tex_nomul_vert.h \ + shader/tex_nomul_vert_bin_s3c6410.h shader/filter_invert.h \ + shader/filter_invert_nomul.h shader/filter_invert_bgra.h \ + shader/filter_invert_bgra_nomul.h shader/filter_sepia.h \ + shader/filter_sepia_nomul.h shader/filter_sepia_bgra.h \ + shader/filter_sepia_bgra_nomul.h shader/filter_greyscale.h \ + shader/filter_greyscale_nomul.h shader/filter_greyscale_bgra.h \ + shader/filter_greyscale_bgra_nomul.h shader/filter_blur.h \ + shader/filter_blur_nomul.h shader/filter_blur_bgra.h \ + shader/filter_blur_bgra_nomul.h shader/yuy2_frag.h \ + shader/yuy2_vert.h shader/yuy2_nomul_frag.h \ + shader/yuy2_nomul_vert.h +@BUILD_ENGINE_GL_COMMON_TRUE@am_libevas_engine_gl_common_la_OBJECTS = \ +@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_context.lo \ +@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_shader.lo \ +@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_rectangle.lo \ +@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_texture.lo \ +@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_image.lo evas_gl_font.lo \ +@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_polygon.lo \ +@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_line.lo evas_gl_filter.lo +libevas_engine_gl_common_la_OBJECTS = \ + $(am_libevas_engine_gl_common_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_GL_COMMON_TRUE@am_libevas_engine_gl_common_la_rpath = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_gl_common_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_gl_common_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@EINA_CFLAGS@ + +@BUILD_ENGINE_GL_COMMON_TRUE@noinst_LTLIBRARIES = libevas_engine_gl_common.la +@BUILD_ENGINE_GL_COMMON_TRUE@libevas_engine_gl_common_la_SOURCES = \ +@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_private.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_common.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_context.c \ +@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_shader.c \ +@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_rectangle.c \ +@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_texture.c \ +@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_image.c \ +@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_font.c \ +@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_polygon.c \ +@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_line.c \ +@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_filter.c \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/rect_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/rect_frag_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/rect_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/rect_vert_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/font_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/font_frag_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/font_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/font_vert_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_frag_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_vert_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_nomul_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_nomul_frag_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_nomul_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_nomul_vert_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_frag_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_vert_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_nomul_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_nomul_frag_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_nomul_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_nomul_vert_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_mask_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_mask_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/nv12_nomul_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/nv12_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/nv12_nomul_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/nv12_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_frag_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_vert_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_nomul_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_nomul_frag_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_nomul_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_nomul_vert_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_frag_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_vert_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_nomul_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_nomul_frag_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_nomul_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_nomul_vert_bin_s3c6410.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_invert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_invert_nomul.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_invert_bgra.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_invert_bgra_nomul.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_sepia.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_sepia_nomul.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_sepia_bgra.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_sepia_bgra_nomul.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_greyscale.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_greyscale_nomul.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_greyscale_bgra.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_greyscale_bgra_nomul.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_blur.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_blur_nomul.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_blur_bgra.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_blur_bgra_nomul.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuy2_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuy2_vert.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuy2_nomul_frag.h \ +@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuy2_nomul_vert.h + +@BUILD_ENGINE_GL_COMMON_TRUE@libevas_engine_gl_common_la_LIBADD = @EINA_LIBS@ @GL_EET_LIBS@ @evas_engine_gl_common_libs@ @dlopen_libs@ +EXTRA_DIST = \ +shader/compile-s3c6410.sh \ +shader/compile-sgx.sh \ +shader/make-c-bin.sh \ +shader/make-c-str.sh \ +shader/rect_frag.shd \ +shader/rect_frag_s3c6410.asm \ +shader/rect_vert.shd \ +shader/font_frag.shd \ +shader/font_frag_s3c6410.asm \ +shader/font_vert.shd \ +shader/img_frag.shd \ +shader/img_frag_s3c6410.asm \ +shader/img_vert.shd \ +shader/img_nomul_frag.shd \ +shader/img_nomul_vert.shd \ +shader/img_bgra_vert.shd \ +shader/img_bgra_frag.shd \ +shader/img_bgra_vert.shd \ +shader/img_bgra_nomul_frag.shd \ +shader/img_bgra_nomul_vert.shd \ +shader/img_mask_frag.h \ +shader/img_mask_vert.h \ +shader/yuv_frag.shd \ +shader/yuv_frag_s3c6410.asm \ +shader/yuv_vert.shd \ +shader/yuv_nomul_frag.shd \ +shader/yuv_nomul_vert.shd \ +shader/tex_frag.shd \ +shader/tex_frag_s3c6410.asm \ +shader/tex_vert.shd \ +shader/tex_nomul_frag.shd \ +shader/tex_nomul_vert.shd \ +shader/filter_invert.shd \ +shader/filter_invert_nomul.shd \ +shader/filter_invert_bgra.shd \ +shader/filter_invert_bgra_nomul.shd \ +shader/filter_greyscale.shd \ +shader/filter_greyscale_nomul.shd \ +shader/filter_greyscale_bgra.shd \ +shader/filter_greyscale_bgra_nomul.shd \ +shader/filter_sepia.shd \ +shader/filter_sepia_nomul.shd \ +shader/filter_sepia_bgra.shd \ +shader/filter_sepia_bgra_nomul.shd \ +shader/filter_blur.shd \ +shader/filter_blur_nomul.shd \ +shader/filter_blur_bgra.shd \ +shader/filter_blur_bgra_nomul.shd \ +shader/nv12_frag.h \ +shader/nv12_frag.shd \ +shader/nv12_nomul_frag.h \ +shader/nv12_nomul_frag.shd \ +shader/nv12_nomul_vert.h \ +shader/nv12_nomul_vert.shd \ +shader/nv12_vert.h \ +shader/nv12_vert.shd \ +shader/yuy2_frag.h \ +shader/yuy2_frag.shd \ +shader/yuy2_nomul_frag.h \ +shader/yuy2_nomul_frag.shd \ +shader/yuy2_nomul_vert.h \ +shader/yuy2_nomul_vert.shd \ +shader/yuy2_vert.h \ +shader/yuy2_vert.shd + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/gl_common/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/gl_common/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_gl_common.la: $(libevas_engine_gl_common_la_OBJECTS) $(libevas_engine_gl_common_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_gl_common_la_rpath) $(libevas_engine_gl_common_la_OBJECTS) $(libevas_engine_gl_common_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_filter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_font.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_image.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_line.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_polygon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_rectangle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_shader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_texture.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h b/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h new file mode 100644 index 0000000..a088748 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h @@ -0,0 +1,659 @@ +#ifndef EVAS_GL_COMMON_H +#define EVAS_GL_COMMON_H + +#include "evas_common.h" +#include "evas_private.h" +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include + +#define GL_GLEXT_PROTOTYPES + +#ifdef BUILD_ENGINE_GL_QUARTZ +# include +# include +#else +# ifdef _EVAS_ENGINE_SDL_H +# if defined(GLES_VARIETY_S3C6410) || defined(GLES_VARIETY_SGX) +# include +# else +# include +# endif +# else +# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +# if defined(GLES_VARIETY_S3C6410) +# include +# elif defined(GLES_VARIETY_SGX) +# include +# include +# endif +# else +# include +# include +# endif +# endif +#endif + +#ifndef GL_TEXTURE_RECTANGLE_NV +# define GL_TEXTURE_RECTANGLE_NV 0x84F5 +#endif +#ifndef GL_BGRA +# define GL_BGRA 0x80E1 +#endif + +#ifndef EGL_NO_CONTEXT +# define EGL_NO_CONTEXT 0 +#endif +#ifndef EGL_NONE +# define EGL_NONE 0x3038 +#endif +#ifndef EGL_TRUE +# define EGL_TRUE 1 +#endif +#ifndef EGL_FALSE +# define EGL_FALSE 0 +#endif + +#ifndef EGL_MAP_GL_TEXTURE_2D_SEC +# define EGL_MAP_GL_TEXTURE_2D_SEC 0x3201 +#endif +#ifndef EGL_MAP_GL_TEXTURE_HEIGHT_SEC +# define EGL_MAP_GL_TEXTURE_HEIGHT_SEC 0x3202 +#endif +#ifndef EGL_MAP_GL_TEXTURE_WIDTH_SEC +# define EGL_MAP_GL_TEXTURE_WIDTH_SEC 0x3203 +#endif +#ifndef EGL_MAP_GL_TEXTURE_FORMAT_SEC +# define EGL_MAP_GL_TEXTURE_FORMAT_SEC 0x3204 +#endif +#ifndef EGL_MAP_GL_TEXTURE_RGB_SEC +# define EGL_MAP_GL_TEXTURE_RGB_SEC 0x3205 +#endif +#ifndef EGL_MAP_GL_TEXTURE_RGBA_SEC +# define EGL_MAP_GL_TEXTURE_RGBA_SEC 0x3206 +#endif +#ifndef EGL_MAP_GL_TEXTURE_BGRA_SEC +# define EGL_MAP_GL_TEXTURE_BGRA_SEC 0x3207 +#endif +#ifndef EGL_MAP_GL_TEXTURE_LUMINANCE_SEC +# define EGL_MAP_GL_TEXTURE_LUMINANCE_SEC 0x3208 +#endif +#ifndef EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC +# define EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC 0x3209 +#endif +#ifndef EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC +# define EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC 0x320a +#endif +#ifndef EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC +# define EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC 0x320b +#endif +#ifndef EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC +# define EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC 0x320c +#endif +#ifndef GL_PROGRAM_BINARY_LENGTH +# define GL_PROGRAM_BINARY_LENGTH 0x8741 +#endif +#ifndef GL_NUM_PROGRAM_BINARY_FORMATS +# define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#endif +#ifndef GL_PROGRAM_BINARY_FORMATS +# define GL_PROGRAM_BINARY_FORMATS 0x87FF +#endif +#ifndef GL_PROGRAM_BINARY_RETRIEVABLE_HINT +# define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#endif + +#define SHAD_VERTEX 0 +#define SHAD_COLOR 1 +#define SHAD_TEXUV 2 +#define SHAD_TEXUV2 3 +#define SHAD_TEXUV3 4 +#define SHAD_TEXM 5 + +typedef struct _Evas_GL_Program Evas_GL_Program; +typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source; +typedef struct _Evas_GL_Shared Evas_GL_Shared; +typedef struct _Evas_Engine_GL_Context Evas_Engine_GL_Context; +typedef struct _Evas_GL_Texture_Pool Evas_GL_Texture_Pool; +typedef struct _Evas_GL_Texture Evas_GL_Texture; +typedef struct _Evas_GL_Image Evas_GL_Image; +typedef struct _Evas_GL_Font_Texture Evas_GL_Font_Texture; +typedef struct _Evas_GL_Polygon Evas_GL_Polygon; +typedef struct _Evas_GL_Polygon_Point Evas_GL_Polygon_Point; + +typedef enum { + SHADER_RECT, + SHADER_FONT, + SHADER_IMG, + SHADER_IMG_NOMUL, + SHADER_IMG_BGRA, + SHADER_IMG_BGRA_NOMUL, + SHADER_IMG_MASK, + SHADER_YUV, + SHADER_YUV_NOMUL, + SHADER_YUY2, + SHADER_YUY2_NOMUL, + SHADER_NV12, + SHADER_NV12_NOMUL, + SHADER_TEX, + SHADER_TEX_NOMUL, + SHADER_FILTER_INVERT, + SHADER_FILTER_INVERT_NOMUL, + SHADER_FILTER_INVERT_BGRA, + SHADER_FILTER_INVERT_BGRA_NOMUL, + SHADER_FILTER_GREYSCALE, + SHADER_FILTER_GREYSCALE_NOMUL, + SHADER_FILTER_GREYSCALE_BGRA, + SHADER_FILTER_GREYSCALE_BGRA_NOMUL, + SHADER_FILTER_SEPIA, + SHADER_FILTER_SEPIA_NOMUL, + SHADER_FILTER_SEPIA_BGRA, + SHADER_FILTER_SEPIA_BGRA_NOMUL, + /* SHADER_FILTER_BLUR, */ + /* SHADER_FILTER_BLUR_NOMUL, */ + /* SHADER_FILTER_BLUR_BGRA, */ + /* SHADER_FILTER_BLUR_BGRA_NOMUL, */ + SHADER_LAST +} Evas_GL_Shader; + +struct _Evas_GL_Program +{ + GLuint vert, frag, prog; + + int tex_count; +}; + +struct _Evas_GL_Program_Source +{ + const char *src; + const unsigned int *bin; + int bin_size; +}; + +struct _Evas_GL_Shared +{ + Eina_List *images; + + int images_size; + + struct { + GLint max_texture_units; + GLint max_texture_size; + GLint max_vertex_elements; + GLfloat anisotropic; + Eina_Bool rgb : 1; + Eina_Bool bgra : 1; + Eina_Bool tex_npo2 : 1; + Eina_Bool tex_rect : 1; + Eina_Bool sec_image_map : 1; + Eina_Bool bin_program : 1; + // tuning params - per gpu/cpu combo? +#define MAX_CUTOUT 512 +#define DEF_CUTOUT 512 + +// FIXME bug with pipes > 1 right now, should default to 32 +#define MAX_PIPES 128 +#define DEF_PIPES 32 +#define DEF_PIPES_SGX_540 32 +#define DEF_PIPES_TEGRA_2 1 + +#define MIN_ATLAS_ALLOC 16 +#define MAX_ATLAS_ALLOC 1024 +#define DEF_ATLAS_ALLOC 1024 + +#define MIN_ATLAS_ALLOC_ALPHA 16 +#define MAX_ATLAS_ALLOC_ALPHA 4096 +#define DEF_ATLAS_ALLOC_ALPHA 4096 + +#define MAX_ATLAS_W 512 +#define DEF_ATLAS_W 512 + +#define MAX_ATLAS_H 512 +#define DEF_ATLAS_H 512 + +#define MIN_ATLAS_SLOT 16 +#define MAX_ATLAS_SLOT 512 +#define DEF_ATLAS_SLOT 16 + + struct { + struct { + int max; + } cutout; + struct { + int max; + } pipes; + struct { + int max_alloc_size; + int max_alloc_alpha_size; + int max_w; + int max_h; + int slot_size; + } atlas; + } tune; + } info; + + struct { + Eina_List *whole; + Eina_List *atlas[33][3]; + } tex; + + Eina_Hash *native_pm_hash; + Eina_Hash *native_tex_hash; + + Evas_GL_Program shader[SHADER_LAST]; + + int references; + int w, h; + int rot; + int mflip; + // persp map + int foc, z0, px, py; + int ax, ay; +}; + +#define RTYPE_RECT 1 +#define RTYPE_IMAGE 2 +#define RTYPE_FONT 3 +#define RTYPE_YUV 4 +#define RTYPE_MAP 5 /* need to merge with image */ +#define RTYPE_IMASK 6 +#define RTYPE_YUY2 7 +#define RTYPE_NV12 8 + +struct _Evas_Engine_GL_Context +{ + int references; + int w, h; + int rot; + int foc, z0, px, py; + RGBA_Draw_Context *dc; + + Evas_GL_Shared *shared; + + int flushnum; + struct { + int top_pipe; + struct { + GLuint cur_prog; + GLuint cur_tex, cur_texu, cur_texv; + GLuint cur_texm, cur_texmu, cur_texmv; + int render_op; + int cx, cy, cw, ch; + int smooth; + int blend; + int clip; + } current; + } state; + + struct { + struct { + int x, y, w, h; + int type; + } region; + struct { + int x, y, w, h; + Eina_Bool active : 1; + } clip; + struct { + Evas_GL_Image *surface; + GLuint cur_prog; + GLuint cur_tex, cur_texu, cur_texv, cur_texm; + void *cur_tex_dyn, *cur_texu_dyn, *cur_texv_dyn; + int render_op; + int cx, cy, cw, ch; + int smooth; + int blend; + int clip; + } shader; + struct { + int num, alloc; + GLshort *vertex; + GLubyte *color; + GLfloat *texuv; + GLfloat *texuv2; + GLfloat *texuv3; + GLfloat *texm; + Eina_Bool line: 1; + Eina_Bool use_vertex : 1; + Eina_Bool use_color : 1; + Eina_Bool use_texuv : 1; + Eina_Bool use_texuv2 : 1; + Eina_Bool use_texuv3 : 1; + Eina_Bool use_texm : 1; + Evas_GL_Image *im; + } array; + } pipe[MAX_PIPES]; + + struct { + Eina_Bool size : 1; + } change; + + Eina_Bool havestuff : 1; + + Evas_GL_Image *def_surface; + + /* If this is set: Force drawing with a particular filter */ + GLuint filter_prog; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +// FIXME: hack. expose egl display to gl core for egl image sec extn. + void *egldisp; +#endif +}; + +struct _Evas_GL_Texture_Pool +{ + Evas_Engine_GL_Context *gc; + GLuint texture, fb; + GLuint intformat, format, dataformat; + int w, h; + int references; + int slot, fslot; + struct { + void *img; + unsigned int *data; + int w, h; + int stride; + int checked_out; + } dyn; + Eina_List *allocations; + Eina_Bool whole : 1; + Eina_Bool render : 1; + Eina_Bool native : 1; + Eina_Bool dynamic : 1; +}; + +struct _Evas_GL_Texture +{ + Evas_Engine_GL_Context *gc; + Evas_GL_Image *im; + Evas_GL_Texture_Pool *pt, *ptu, *ptv, *ptuv; + int x, y, w, h; + double sx1, sy1, sx2, sy2; + int references; + + struct + { + Evas_GL_Texture_Pool *pt[2], *ptuv[2]; + int source; + } double_buffer; + + Eina_Bool alpha : 1; + Eina_Bool dyn : 1; +}; + +struct _Evas_GL_Image +{ + Evas_Engine_GL_Context *gc; + RGBA_Image *im; + Evas_GL_Texture *tex; + RGBA_Image_Loadopts load_opts; + int references; + // if im->im == NULL, it's a render-surface so these here are used + int w, h; + struct { + int space; + void *data; + unsigned char no_free : 1; + } cs; + + struct { + void *data; + struct { + void (*bind) (void *data, void *image); + void (*unbind) (void *data, void *image); + void (*free) (void *data, void *image); + void *data; + } func; + int yinvert; + int target; + int mipmap; + unsigned char loose : 1; + } native; + + int scale_hint, content_hint; + int csize; + + Eina_List *filtered; + + unsigned char dirty : 1; + unsigned char cached : 1; + unsigned char alpha : 1; + unsigned char tex_only : 1; +}; + +struct _Evas_GL_Font_Texture +{ + Evas_GL_Texture *tex; +}; + +struct _Evas_GL_Polygon +{ + Eina_List *points; + Eina_Bool changed : 1; +}; + +struct _Evas_GL_Polygon_Point +{ + int x, y; +}; + +#if 0 +extern Evas_GL_Program_Source shader_rect_frag_src; +extern Evas_GL_Program_Source shader_rect_vert_src; +extern Evas_GL_Program_Source shader_font_frag_src; +extern Evas_GL_Program_Source shader_font_vert_src; + +extern Evas_GL_Program_Source shader_img_frag_src; +extern Evas_GL_Program_Source shader_img_vert_src; +extern Evas_GL_Program_Source shader_img_nomul_frag_src; +extern Evas_GL_Program_Source shader_img_nomul_vert_src; +extern Evas_GL_Program_Source shader_img_bgra_frag_src; +extern Evas_GL_Program_Source shader_img_bgra_vert_src; +extern Evas_GL_Program_Source shader_img_bgra_nomul_frag_src; +extern Evas_GL_Program_Source shader_img_bgra_nomul_vert_src; +extern Evas_GL_Program_Source shader_img_mask_frag_src; +extern Evas_GL_Program_Source shader_img_mask_vert_src; + +extern Evas_GL_Program_Source shader_yuv_frag_src; +extern Evas_GL_Program_Source shader_yuv_vert_src; +extern Evas_GL_Program_Source shader_yuv_nomul_frag_src; +extern Evas_GL_Program_Source shader_yuv_nomul_vert_src; + +extern Evas_GL_Program_Source shader_yuy2_frag_src; +extern Evas_GL_Program_Source shader_yuy2_vert_src; +extern Evas_GL_Program_Source shader_yuy2_nomul_frag_src; +extern Evas_GL_Program_Source shader_yuy2_nomul_vert_src; + +extern Evas_GL_Program_Source shader_tex_frag_src; +extern Evas_GL_Program_Source shader_tex_vert_src; +extern Evas_GL_Program_Source shader_tex_nomul_frag_src; +extern Evas_GL_Program_Source shader_tex_nomul_vert_src; + +extern Evas_GL_Program_Source shader_filter_invert_frag_src; +extern Evas_GL_Program_Source shader_filter_invert_nomul_frag_src; +extern Evas_GL_Program_Source shader_filter_invert_bgra_frag_src; +extern Evas_GL_Program_Source shader_filter_invert_bgra_nomul_frag_src; +extern Evas_GL_Program_Source shader_filter_sepia_frag_src; +extern Evas_GL_Program_Source shader_filter_sepia_nomul_frag_src; +extern Evas_GL_Program_Source shader_filter_sepia_bgra_frag_src; +extern Evas_GL_Program_Source shader_filter_sepia_bgra_nomul_frag_src; +extern Evas_GL_Program_Source shader_filter_greyscale_frag_src; +extern Evas_GL_Program_Source shader_filter_greyscale_nomul_frag_src; +extern Evas_GL_Program_Source shader_filter_greyscale_bgra_frag_src; +extern Evas_GL_Program_Source shader_filter_greyscale_bgra_nomul_frag_src; +/* blur (annoyingly) needs (aka is faster with) a vertex shader */ +extern Evas_GL_Program_Source shader_filter_blur_vert_src; +extern Evas_GL_Program_Source shader_filter_blur_frag_src; +extern Evas_GL_Program_Source shader_filter_blur_nomul_frag_src; +extern Evas_GL_Program_Source shader_filter_blur_bgra_frag_src; +extern Evas_GL_Program_Source shader_filter_blur_bgra_nomul_frag_src; +#endif + +void glerr(int err, const char *file, const char *func, int line, const char *op); + +Evas_Engine_GL_Context *evas_gl_common_context_new(void); +void evas_gl_common_context_free(Evas_Engine_GL_Context *gc); +void evas_gl_common_context_use(Evas_Engine_GL_Context *gc); +void evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc); +void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot); +void evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, Evas_GL_Image *surface); + +void evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc, + int x1, int y1, int x2, int y2, + int clip, int cx, int cy, int cw, int ch, + int r, int g, int b, int a); +void evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc, + int x, int y, int w, int h, + int r, int g, int b, int a); +void evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + double sx, double sy, double sw, double sh, + int x, int y, int w, int h, + int r, int g, int b, int a, + Eina_Bool smooth, Eina_Bool tex_only); +void evas_gl_common_context_image_mask_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + Evas_GL_Texture *texm, + double sx, double sy, double sw, double sh, + double sxm, double sym, double swm, double shm, + int x, int y, int w, int h, + int r, int g, int b, int a, + Eina_Bool smooth); + + +void evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + double sx, double sy, double sw, double sh, + int x, int y, int w, int h, + int r, int g, int b, int a); +void evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + double sx, double sy, double sw, double sh, + int x, int y, int w, int h, + int r, int g, int b, int a, + Eina_Bool smooth); +void evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + double sx, double sy, double sw, double sh, + int x, int y, int w, int h, + int r, int g, int b, int a, + Eina_Bool smooth); +void evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + double sx, double sy, double sw, double sh, + int x, int y, int w, int h, + int r, int g, int b, int a, + Eina_Bool smooth); +void evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + int npoints, + RGBA_Map_Point *p, + int clip, int cx, int cy, int cw, int ch, + int r, int g, int b, int a, + Eina_Bool smooth, + Eina_Bool tex_only, + Evas_Colorspace cspace); +void evas_gl_common_context_flush(Evas_Engine_GL_Context *gc); + +int evas_gl_common_shader_program_init(Evas_GL_Shared *shared); +void evas_gl_common_shader_program_init_done(void); +void evas_gl_common_shader_program_shutdown(Evas_GL_Program *p); + +void evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, int x, int y, int w, int h); + +void evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt); +Evas_GL_Texture *evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im); +Evas_GL_Texture *evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im); +Evas_GL_Texture *evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha); +Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im); +void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im); +void evas_gl_common_texture_free(Evas_GL_Texture *tex); +Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh); +void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, unsigned int w, unsigned int h, int fh); +Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); +void evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h); +Evas_GL_Texture *evas_gl_common_texture_yuy2_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); +void evas_gl_common_texture_yuy2_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h); +Evas_GL_Texture *evas_gl_common_texture_nv12_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); +void evas_gl_common_texture_nv12_update(Evas_GL_Texture *tex, DATA8 **row, unsigned int w, unsigned int h); +Evas_GL_Texture *evas_gl_common_texture_nv12tiled_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); +void evas_gl_common_texture_nv12tiled_update(Evas_GL_Texture *tex, DATA8 **row, unsigned int w, unsigned int h); + +void evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc); + +void evas_gl_common_image_ref(Evas_GL_Image *im); +void evas_gl_common_image_unref(Evas_GL_Image *im); +Evas_GL_Image *evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error); +Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace); +Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace); +Evas_GL_Image *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace); +Evas_GL_Image *evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha); +void evas_gl_common_image_native_enable(Evas_GL_Image *im); +void evas_gl_common_image_native_disable(Evas_GL_Image *im); +void evas_gl_common_image_scale_hint_set(Evas_GL_Image *im, int hint); +void evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint); +void evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc); +void evas_gl_common_image_free(Evas_GL_Image *im); +Evas_GL_Image *evas_gl_common_image_surface_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha); +void evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); +void evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im); +void evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int npoints, RGBA_Map_Point *p, int smooth, int level); +void evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth); + +void *evas_gl_font_texture_new(void *gc, RGBA_Font_Glyph *fg); +void evas_gl_font_texture_free(void *); +void evas_gl_font_texture_draw(void *gc, void *surface, void *dc, RGBA_Font_Glyph *fg, int x, int y); + +Evas_GL_Polygon *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y); +Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly); +void evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int x, int y); + +void evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2); + +#if 0 // filtering disabled +void evas_gl_common_filter_draw(Evas_Engine_GL_Context *context, Evas_GL_Image *im, Evas_Filter_Info *filter); +Filtered_Image *evas_gl_common_image_filtered_get(Evas_GL_Image *im, uint8_t *key, size_t keylen); +Filtered_Image *evas_gl_common_image_filtered_save(Evas_GL_Image *im, Evas_GL_Image *fimage, uint8_t *key, size_t keylen); +void evas_gl_common_image_filtered_free(Evas_GL_Image *im, Filtered_Image *); +#endif + +extern void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b); +extern void (*glsym_glBindFramebuffer) (GLenum a, GLuint b); +extern void (*glsym_glFramebufferTexture2D) (GLenum a, GLenum b, GLenum c, GLuint d, GLint e); +extern void (*glsym_glDeleteFramebuffers) (GLsizei a, const GLuint *b); +extern void (*glsym_glGetProgramBinary) (GLuint a, GLsizei b, GLsizei *c, GLenum *d, void *e); +extern void (*glsym_glProgramBinary) (GLuint a, GLenum b, const void *c, GLint d); +extern void (*glsym_glProgramParameteri) (GLuint a, GLuint b, GLint d); + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +extern void *(*secsym_eglCreateImage) (void *a, void *b, GLenum c, void *d, const int *e); +extern unsigned int (*secsym_eglDestroyImage) (void *a, void *b); +extern void (*secsym_glEGLImageTargetTexture2DOES) (int a, void *b); +extern void *(*secsym_eglMapImageSEC) (void *a, void *b); +extern unsigned int (*secsym_eglUnmapImageSEC) (void *a, void *b); +extern unsigned int (*secsym_eglGetImageAttribSEC) (void *a, void *b, int c, int *d); +#endif + +//#define GL_ERRORS 1 + +#ifdef GL_ERRORS +# define GLERR(fn, fl, ln, op) \ + { \ + int __gl_err = glGetError(); \ + if (__gl_err != GL_NO_ERROR) glerr(__gl_err, fl, fn, ln, op); \ + } +#else +# define GLERR(fn, fl, ln, op) +#endif + +Eina_Bool evas_gl_common_module_open(void); +void evas_gl_common_module_close(void); + +#endif diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_context.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_context.c new file mode 100644 index 0000000..62e72bd --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_context.c @@ -0,0 +1,2723 @@ +#include "evas_gl_private.h" + +#ifdef HAVE_DLSYM +# include /* dlopen,dlclose,etc */ +#else +# error gl_common should not get compiled if dlsym is not found on the system! +#endif + +#define PRG_INVALID 0xffffffff +#define GLPIPES 1 + +static int sym_done = 0; +int _evas_engine_GL_common_log_dom = -1; + +typedef void (*glsym_func_void) (); + +void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b) = NULL; +void (*glsym_glBindFramebuffer) (GLenum a, GLuint b) = NULL; +void (*glsym_glFramebufferTexture2D) (GLenum a, GLenum b, GLenum c, GLuint d, GLint e) = NULL; +void (*glsym_glDeleteFramebuffers) (GLsizei a, const GLuint *b) = NULL; +void (*glsym_glGetProgramBinary) (GLuint a, GLsizei b, GLsizei *c, GLenum *d, void *e) = NULL; +void (*glsym_glProgramBinary) (GLuint a, GLenum b, const void *c, GLint d) = NULL; +void (*glsym_glProgramParameteri) (GLuint a, GLuint b, GLint d) = NULL; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +// just used for finding symbols :) +typedef void (*_eng_fn) (void); + +typedef _eng_fn (*secsym_func_eng_fn) (); +typedef unsigned int (*secsym_func_uint) (); +typedef void *(*secsym_func_void_ptr) (); + +static _eng_fn (*secsym_eglGetProcAddress) (const char *a) = NULL; + +void *(*secsym_eglCreateImage) (void *a, void *b, GLenum c, void *d, const int *e) = NULL; +unsigned int (*secsym_eglDestroyImage) (void *a, void *b) = NULL; +void (*secsym_glEGLImageTargetTexture2DOES) (int a, void *b) = NULL; +void *(*secsym_eglMapImageSEC) (void *a, void *b) = NULL; +unsigned int (*secsym_eglUnmapImageSEC) (void *a, void *b) = NULL; +unsigned int (*secsym_eglGetImageAttribSEC) (void *a, void *b, int c, int *d) = NULL; +#endif + +static int dbgflushnum = -1; + +static void +sym_missing(void) +{ + ERR("GL symbols missing!"); +} + +static void +gl_symbols(void) +{ + if (sym_done) return; + sym_done = 1; + + /* FIXME: If using the SDL engine, we should use SDL_GL_GetProcAddress + * instead of dlsym + * if (!dst) dst = (typ)SDL_GL_GetProcAddress(sym) + */ +#define FINDSYM(dst, sym, typ) if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) +#define FALLBAK(dst, typ) if (!dst) dst = (typ)sym_missing; + + FINDSYM(glsym_glGenFramebuffers, "glGenFramebuffers", glsym_func_void); + FINDSYM(glsym_glGenFramebuffers, "glGenFramebuffersEXT", glsym_func_void); + FINDSYM(glsym_glGenFramebuffers, "glGenFramebuffersARB", glsym_func_void); + FALLBAK(glsym_glGenFramebuffers, glsym_func_void); + + FINDSYM(glsym_glBindFramebuffer, "glBindFramebuffer", glsym_func_void); + FINDSYM(glsym_glBindFramebuffer, "glBindFramebufferEXT", glsym_func_void); + FINDSYM(glsym_glBindFramebuffer, "glBindFramebufferARB", glsym_func_void); + FALLBAK(glsym_glBindFramebuffer, glsym_func_void); + + FINDSYM(glsym_glFramebufferTexture2D, "glFramebufferTexture2D", glsym_func_void); + FINDSYM(glsym_glFramebufferTexture2D, "glFramebufferTexture2DEXT", glsym_func_void); + FINDSYM(glsym_glFramebufferTexture2D, "glFramebufferTexture2DARB", glsym_func_void); + FALLBAK(glsym_glFramebufferTexture2D, glsym_func_void); + + FINDSYM(glsym_glDeleteFramebuffers, "glDeleteFramebuffers", glsym_func_void); + FINDSYM(glsym_glDeleteFramebuffers, "glDeleteFramebuffersEXT", glsym_func_void); + FINDSYM(glsym_glDeleteFramebuffers, "glDeleteFramebuffersARB", glsym_func_void); + FALLBAK(glsym_glDeleteFramebuffers, glsym_func_void); + + FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinary", glsym_func_void); + FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryEXT", glsym_func_void); + FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryARB", glsym_func_void); + FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryOES", glsym_func_void); + + FINDSYM(glsym_glProgramBinary, "glProgramBinary", glsym_func_void); + FINDSYM(glsym_glProgramBinary, "glProgramBinaryEXT", glsym_func_void); + FINDSYM(glsym_glProgramBinary, "glProgramBinaryARB", glsym_func_void); + + FINDSYM(glsym_glProgramParameteri, "glProgramParameteri", glsym_func_void); + FINDSYM(glsym_glProgramParameteri, "glProgramParameteriEXT", glsym_func_void); + FINDSYM(glsym_glProgramParameteri, "glProgramParameteriARB", glsym_func_void); + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +#undef FINDSYM +#define FINDSYM(dst, sym, typ) \ + if ((!dst) && (secsym_eglGetProcAddress)) dst = (typ)secsym_eglGetProcAddress(sym); \ + if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) +// yes - gl core looking for egl stuff. i know it's odd. a reverse-layer thing +// but it will work as the egl/glx layer calls gl core common stuff and thus +// these symbols will work. making the glx/egl + x11 layer do this kind-of is +// wrong as this is not x11 (output) layer specific like the native surface +// stuff. this is generic zero-copy textures for gl + + FINDSYM(secsym_eglGetProcAddress, "eglGetProcAddress", secsym_func_eng_fn); + FINDSYM(secsym_eglGetProcAddress, "eglGetProcAddressEXT", secsym_func_eng_fn); + FINDSYM(secsym_eglGetProcAddress, "eglGetProcAddressARB", secsym_func_eng_fn); + FINDSYM(secsym_eglGetProcAddress, "eglGetProcAddressKHR", secsym_func_eng_fn); + + FINDSYM(secsym_eglCreateImage, "eglCreateImage", secsym_func_void_ptr); + FINDSYM(secsym_eglCreateImage, "eglCreateImageEXT", secsym_func_void_ptr); + FINDSYM(secsym_eglCreateImage, "eglCreateImageARB", secsym_func_void_ptr); + FINDSYM(secsym_eglCreateImage, "eglCreateImageKHR", secsym_func_void_ptr); + + FINDSYM(secsym_eglDestroyImage, "eglDestroyImage", secsym_func_uint); + FINDSYM(secsym_eglDestroyImage, "eglDestroyImageEXT", secsym_func_uint); + FINDSYM(secsym_eglDestroyImage, "eglDestroyImageARB", secsym_func_uint); + FINDSYM(secsym_eglDestroyImage, "eglDestroyImageKHR", secsym_func_uint); + + FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinary", glsym_func_void); + FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryEXT", glsym_func_void); + FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryARB", glsym_func_void); + FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryOES", glsym_func_void); + FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryKHR", glsym_func_void); + + FINDSYM(glsym_glProgramBinary, "glProgramBinary", glsym_func_void); + FINDSYM(glsym_glProgramBinary, "glProgramBinaryEXT", glsym_func_void); + FINDSYM(glsym_glProgramBinary, "glProgramBinaryARB", glsym_func_void); + FINDSYM(glsym_glProgramBinary, "glProgramBinaryOES", glsym_func_void); + FINDSYM(glsym_glProgramBinary, "glProgramBinaryKHR", glsym_func_void); + + FINDSYM(glsym_glProgramParameteri, "glProgramParameteri", glsym_func_void); + FINDSYM(glsym_glProgramParameteri, "glProgramParameteriEXT", glsym_func_void); + FINDSYM(glsym_glProgramParameteri, "glProgramParameteriARB", glsym_func_void); + FINDSYM(glsym_glProgramParameteri, "glProgramParameteriOES", glsym_func_void); + FINDSYM(glsym_glProgramParameteri, "glProgramParameteriKHR", glsym_func_void); + + FINDSYM(secsym_glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES", glsym_func_void); + + FINDSYM(secsym_eglMapImageSEC, "eglMapImageSEC", secsym_func_void_ptr); + + FINDSYM(secsym_eglUnmapImageSEC, "eglUnmapImageSEC", secsym_func_uint); + + FINDSYM(secsym_eglGetImageAttribSEC, "eglGetImageAttribSEC", secsym_func_uint); +#endif +} + +static void shader_array_flush(Evas_Engine_GL_Context *gc); + +static Evas_Engine_GL_Context *_evas_gl_common_context = NULL; +static Evas_GL_Shared *shared = NULL; + +void +glerr(int err, const char *file, const char *func, int line, const char *op) +{ + const char *errmsg; + char buf[32]; + + switch (err) + { + case GL_INVALID_ENUM: + errmsg = "GL_INVALID_ENUM"; + break; + case GL_INVALID_VALUE: + errmsg = "GL_INVALID_VALUE"; + break; + case GL_INVALID_OPERATION: + errmsg = "GL_INVALID_OPERATION"; + break; + case GL_OUT_OF_MEMORY: + errmsg = "GL_OUT_OF_MEMORY"; + break; + default: + snprintf(buf, sizeof(buf), "%#x", err); + errmsg = buf; + } + + eina_log_print(_evas_engine_GL_common_log_dom, EINA_LOG_LEVEL_ERR, + file, func, line, "%s: %s", op, errmsg); +} + +static void +matrix_ortho(GLfloat *m, + GLfloat l, GLfloat r, + GLfloat t, GLfloat b, + GLfloat near, GLfloat far, + int rot, int vw, int vh, + int foc, GLfloat orth) +{ + GLfloat rotf; + GLfloat cosv, sinv; + GLfloat tx, ty; + + rotf = (((rot / 90) & 0x3) * M_PI) / 2.0; + + tx = -0.5 * (1.0 - orth); + ty = -0.5 * (1.0 - orth); + + if (rot == 90) + { + tx += -(vw * 1.0); + ty += -(vh * 0.0); + } + if (rot == 180) + { + tx += -(vw * 1.0); + ty += -(vh * 1.0); + } + if (rot == 270) + { + tx += -(vw * 0.0); + ty += -(vh * 1.0); + } + + cosv = cos(rotf); + sinv = sin(rotf); + + m[0] = (2.0 / (r - l)) * ( cosv); + m[1] = (2.0 / (r - l)) * ( sinv); + m[2] = 0.0; + m[3] = 0.0; + + m[4] = (2.0 / (t - b)) * (-sinv); + m[5] = (2.0 / (t - b)) * ( cosv); + m[6] = 0.0; + m[7] = 0.0; + + m[8] = 0.0; + m[9] = 0.0; + m[10] = -(2.0 / (far - near)); + m[11] = 1.0 / (GLfloat)foc; + + m[12] = (m[0] * tx) + (m[4] * ty) - ((r + l) / (r - l)); + m[13] = (m[1] * tx) + (m[5] * ty) - ((t + b) / (t - b)); + m[14] = (m[2] * tx) + (m[6] * ty) - ((near + far) / (far - near)); + m[15] = (m[3] * tx) + (m[7] * ty) + orth; +} + +static int +_evas_gl_common_version_check() +{ + char *version; + char *tmp; + char *tmp2; + int major; + int minor; + + /* + * glGetString returns a string describing the current GL connection. + * GL_VERSION is used to get the version of the connection + */ + + version = (char *)glGetString(GL_VERSION); + + /* + * OpengL ES + * + * 1.* : The form is: + * + * OpenGL ES- . + * + * where is either "CM" or "CL". The minor can be followed by the vendor + * specific information + * + * 2.0 : The form is: + * + * OpenGLES + */ + + /* OpenGL ES 1.* ? */ + + if ((tmp = strstr(version, "OpenGL ES-CM ")) || (tmp = strstr(version, "OpenGL ES-CL "))) + { + /* Not supported */ + return 0; + } + + /* OpenGL ES 2.* ? */ + + if ((tmp = strstr(version, "OpenGL ES "))) + { + /* Supported */ + return 1; + } + + /* + * OpenGL + * + * The GL_VERSION and GL_SHADING_LANGUAGE_VERSION strings begin with a + * version number. The version number uses one of these forms: + * + * major_number.minor_number + * major_number.minor_number.release_number + * + * Vendor-specific information may follow the version number. Its format + * depends on the implementation, but a space always separates the + * version number and the vendor-specific information. + */ + + /* glGetString() returns a static string, and we are going to */ + /* modify it, so we get a copy first */ + version = strdup(version); + if (!version) + return 0; + + tmp = strchr(version, '.'); + /* the first '.' always exists */ + *tmp = '\0'; + major = atoi(version); + /* FIXME: maybe we can assume that minor in only a cipher */ + tmp2 = ++tmp; + while ((*tmp != '.') && (*tmp != ' ') && (*tmp != '\0')) + tmp++; + /* *tmp is '\0' : version is major_number.minor_number */ + /* *tmp is '.' : version is major_number.minor_number.release_number */ + /* *tmp is ' ' : version is major_number.minor_number followed by vendor */ + *tmp = '\0'; + minor = atoi(tmp2); + free(version); + + if (((major == 1) && (minor >= 4)) || (major >= 2)) + return 1; + + return 0; +} + +static void +_evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc) +{ + GLfloat proj[16]; + unsigned int i; + int w = 1, h = 1, m = 1, rot = 1, foc = 0; + + EINA_SAFETY_ON_NULL_RETURN(gc); + foc = gc->foc; + // surface in pipe 0 will be the same as all pipes + if ((gc->pipe[0].shader.surface == gc->def_surface) || + (!gc->pipe[0].shader.surface)) + { + w = gc->w; + h = gc->h; + rot = gc->rot; + } + else + { + w = gc->pipe[0].shader.surface->w; + h = gc->pipe[0].shader.surface->h; + rot = 0; + m = -1; + } + + if ((!gc->change.size) || + ((gc->shared->w == w) && (gc->shared->h == h) && + (gc->shared->rot == rot) && (gc->shared->foc == gc->foc) && + (gc->shared->mflip == m))) + return; + + gc->shared->w = w; + gc->shared->h = h; + gc->shared->rot = rot; + gc->shared->mflip = m; + gc->shared->foc = foc; + gc->shared->z0 = gc->z0; + gc->shared->px = gc->px; + gc->shared->py = gc->py; + gc->change.size = 0; + + if (foc == 0) + { + if ((rot == 0) || (rot == 180)) + glViewport(0, 0, w, h); + else + glViewport(0, 0, h, w); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + // std matrix + if (m == 1) + matrix_ortho(proj, + 0, w, 0, h, + -1000000.0, 1000000.0, + rot, w, h, + 1, 1.0); + // v flipped matrix for render-to-texture + else + matrix_ortho(proj, + 0, w, h, 0, + -1000000.0, 1000000.0, + rot, w, h, + 1, 1.0); + } + else + { + int px, py, vx, vy, vw = 0, vh = 0, ax = 0, ay = 0, ppx = 0, ppy = 0; + + px = gc->shared->px; + py = gc->shared->py; + + if ((rot == 0 ) || (rot == 90 )) ppx = px; + else if ((rot == 180) || (rot == 270)) ppx = w - px; + if ((rot == 0 ) || (rot == 270)) ppy = py; + else if ((rot == 90 ) || (rot == 180)) ppy = h - py; + + vx = ((w / 2) - ppx); + if (vx >= 0) + { + vw = w + (2 * vx); + if ((rot == 0 ) || (rot == 90 )) ax = 2 * vx; + else if ((rot == 180) || (rot == 270)) ax = 0; + } + else + { + vw = w - (2 * vx); + if ((rot == 0 ) || (rot == 90 )) ax = 0; + else if ((rot == 180) || (rot == 270)) ax = ppx - px; + vx = 0; + } + + vy = ((h / 2) - ppy); + if (vy < 0) + { + vh = h - (2 * vy); + if ((rot == 0 )) ay = 0; + else if ((rot == 90 ) || (rot == 180) || (rot == 270)) ay = ppy - py; + vy = -vy; + } + else + { + vh = h + (2 * vy); + if ((rot == 0 ) || (rot == 270)) ay = 2 * vy; + else if ((rot == 90 ) || (rot == 180)) ay = 0; + vy = 0; + } + + if (m == -1) ay = vy * 2; + + if ((rot == 0) || (rot == 180)) + glViewport(-2 * vx, -2 * vy, vw, vh); + else + glViewport(-2 * vy, -2 * vx, vh, vw); + if (m == 1) + matrix_ortho(proj, 0, vw, 0, vh, + -1000000.0, 1000000.0, + rot, vw, vh, + foc, 0.0); + else + matrix_ortho(proj, 0, vw, vh, 0, + -1000000.0, 1000000.0, + rot, vw, vh, + foc, 0.0); + gc->shared->ax = ax; + gc->shared->ay = ay; + } + + for (i = 0; i < SHADER_LAST; ++i) + { + glUseProgram(gc->shared->shader[i].prog); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader[i].prog, "mvp"), 1, GL_FALSE, proj); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + + if (gc->state.current.cur_prog == PRG_INVALID) + glUseProgram(gc->shared->shader[0].prog); + else glUseProgram(gc->state.current.cur_prog); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +} + +Evas_Engine_GL_Context * +evas_gl_common_context_new(void) +{ + Evas_Engine_GL_Context *gc; + const char *s; + int i; + +#if 1 + if (_evas_gl_common_context) + { + _evas_gl_common_context->references++; + return _evas_gl_common_context; + } +#endif + if (!_evas_gl_common_version_check()) + return NULL; + gc = calloc(1, sizeof(Evas_Engine_GL_Context)); + if (!gc) return NULL; + + gl_symbols(); + + gc->references = 1; + + _evas_gl_common_context = gc; + + for (i = 0; i < MAX_PIPES; i++) + gc->pipe[i].shader.render_op = EVAS_RENDER_BLEND; + + if (!shared) + { + const GLubyte *ext; + + shared = calloc(1, sizeof(Evas_GL_Shared)); + ext = glGetString(GL_EXTENSIONS); + if (ext) + { + if (getenv("EVAS_GL_INFO")) + fprintf(stderr, "EXT:\n%s\n", ext); + if ((strstr((char *)ext, "GL_ARB_texture_non_power_of_two")) || + (strstr((char *)ext, "OES_texture_npot")) || + (strstr((char *)ext, "GL_IMG_texture_npot"))) + shared->info.tex_npo2 = 1; + if ((strstr((char *)ext, "GL_NV_texture_rectangle")) || + (strstr((char *)ext, "GL_EXT_texture_rectangle")) || + (strstr((char *)ext, "GL_ARB_texture_rectangle"))) + shared->info.tex_rect = 1; + if ((strstr((char *)ext, "GL_ARB_get_program_binary")) || + (strstr((char *)ext, "GL_OES_get_program_binary"))) + shared->info.bin_program = 1; +#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT + if ((strstr((char *)ext, "GL_EXT_texture_filter_anisotropic"))) + glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, + &(shared->info.anisotropic)); +#endif +#ifdef GL_BGRA + if ((strstr((char *)ext, "GL_EXT_bgra")) || + (strstr((char *)ext, "GL_EXT_texture_format_BGRA8888"))) + shared->info.bgra = 1; +#endif +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // FIXME: there should be an extension name/string to check for + // not just symbols in the lib + i = 0; + s = getenv("EVAS_GL_NO_MAP_IMAGE_SEC"); + if (s) i = atoi(s); + if (!i) + { + // test for all needed symbols - be "conservative" and + // need all of it + if ((secsym_eglCreateImage) && + (secsym_eglDestroyImage) && + (secsym_glEGLImageTargetTexture2DOES) && + (secsym_eglMapImageSEC) && + (secsym_eglUnmapImageSEC) && + (secsym_eglGetImageAttribSEC)) + shared->info.sec_image_map = 1; + } +#endif + } + glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, + &(shared->info.max_texture_units)); + glGetIntegerv(GL_MAX_TEXTURE_SIZE, + &(shared->info.max_texture_size)); + shared->info.max_vertex_elements = 6 * 100000; +#ifdef GL_MAX_ELEMENTS_VERTICES +/* only applies to glDrawRangeElements. don't really need to get it. + glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, + &(shared->info.max_vertex_elements)); + */ +#endif + s = getenv("EVAS_GL_VERTEX_MAX"); + if (s) shared->info.max_vertex_elements = atoi(s); + if (shared->info.max_vertex_elements < 6) + shared->info.max_vertex_elements = 6; + + // magic numbers that are a result of imperical testing and getting + // "best case" performance across a range of systems + shared->info.tune.cutout.max = DEF_CUTOUT; + shared->info.tune.pipes.max = DEF_PIPES; + shared->info.tune.atlas.max_alloc_size = DEF_ATLAS_ALLOC; + shared->info.tune.atlas.max_alloc_alpha_size = DEF_ATLAS_ALLOC_ALPHA; + shared->info.tune.atlas.max_w = DEF_ATLAS_W; + shared->info.tune.atlas.max_h = DEF_ATLAS_H; + shared->info.tune.atlas.slot_size = DEF_ATLAS_SLOT; + + // per gpu hacks. based on impirical measurement of some known gpu's + s = (const char *)glGetString(GL_RENDERER); + if (s) + { + if (strstr(s, "PowerVR SGX 540")) + shared->info.tune.pipes.max = DEF_PIPES_SGX_540; + else if (strstr(s, "NVIDIA Tegra")) + shared->info.tune.pipes.max = DEF_PIPES_TEGRA_2; + } + +#define GETENVOPT(name, tune_param, min, max) \ + do { \ + const char *__v = getenv(name); \ + if (__v) { \ + shared->info.tune.tune_param = atoi(__v); \ + if (shared->info.tune.tune_param > max) \ + shared->info.tune.tune_param = max; \ + else if (shared->info.tune.tune_param < min) \ + shared->info.tune.tune_param = min; \ + } \ + } while (0) + + GETENVOPT("EVAS_GL_CUTOUT_MAX", cutout.max, -1, 0x7fffffff); + GETENVOPT("EVAS_GL_PIPES_MAX", pipes.max, 1, MAX_PIPES); + GETENVOPT("EVAS_GL_ATLAS_ALLOC_SIZE", atlas.max_alloc_size, MIN_ATLAS_ALLOC, MAX_ATLAS_ALLOC); + GETENVOPT("EVAS_GL_ATLAS_ALLOC_ALPHA_SIZE", atlas.max_alloc_alpha_size, MIN_ATLAS_ALLOC_ALPHA, MAX_ATLAS_ALLOC_ALPHA); + GETENVOPT("EVAS_GL_ATLAS_MAX_W", atlas.max_w, 0, MAX_ATLAS_W); + GETENVOPT("EVAS_GL_ATLAS_MAX_H", atlas.max_h, 0, MAX_ATLAS_H); + GETENVOPT("EVAS_GL_ATLAS_SLOT_SIZE", atlas.slot_size, MIN_ATLAS_SLOT, MAX_ATLAS_SLOT); + s = (const char *)getenv("EVAS_GL_GET_PROGRAM_BINARY"); + if (s) + { + if (atoi(s) == 0) shared->info.bin_program = 0; + } + + if (getenv("EVAS_GL_INFO")) + fprintf(stderr, + "max tex size %ix%i\n" + "max units %i\n" + "non-power-2 tex %i\n" + "rect tex %i\n" + "bgra : %i\n" + "max ansiotropic filtering: %3.3f\n" + "egl sec map image: %i\n" + "max vertex count: %i\n" + "\n" + "(can set EVAS_GL_VERTEX_MAX EVAS_GL_NO_MAP_IMAGE_SEC EVAS_GL_INFO EVAS_GL_MEMINFO )\n" + "\n" + "EVAS_GL_GET_PROGRAM_BINARY: %i\n" + "EVAS_GL_CUTOUT_MAX: %i\n" + "EVAS_GL_PIPES_MAX: %i\n" + "EVAS_GL_ATLAS_ALLOC_SIZE: %i\n" + "EVAS_GL_ATLAS_ALLOC_ALPHA_SIZE: %i\n" + "EVAS_GL_ATLAS_MAX_W x EVAS_GL_ATLAS_MAX_H: %i x %i\n" + "EVAS_GL_ATLAS_SLOT_SIZE: %i\n" + , + (int)shared->info.max_texture_size, (int)shared->info.max_texture_size, + (int)shared->info.max_texture_units, + (int)shared->info.tex_npo2, + (int)shared->info.tex_rect, + (int)shared->info.bgra, + (double)shared->info.anisotropic, + (int)shared->info.sec_image_map, + (int)shared->info.max_vertex_elements, + + (int)shared->info.bin_program, + (int)shared->info.tune.cutout.max, + (int)shared->info.tune.pipes.max, + (int)shared->info.tune.atlas.max_alloc_size, + (int)shared->info.tune.atlas.max_alloc_alpha_size, + (int)shared->info.tune.atlas.max_w, (int)shared->info.tune.atlas.max_h, + (int)shared->info.tune.atlas.slot_size + ); + + glDisable(GL_DEPTH_TEST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glEnable(GL_DITHER); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glDisable(GL_BLEND); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + // no dest alpha +// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // dest alpha +// glBlendFunc(GL_SRC_ALPHA, GL_ONE); // ??? + glDepthMask(GL_FALSE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT + if (shared->info.anisotropic > 0.0) + { + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } +#endif + + glEnableVertexAttribArray(SHAD_VERTEX); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glEnableVertexAttribArray(SHAD_COLOR); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + if (!evas_gl_common_shader_program_init(shared)) goto error; + +#define SHADER_TEXTURE_ADD(Shared, Shader, Name) \ + glUseProgram(Shared->shader[SHADER_##Shader].prog); \ + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); \ + glUniform1i(glGetUniformLocation(Shared->shader[SHADER_##Shader].prog, #Name), Shared->shader[SHADER_##Shader].tex_count++); \ + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + SHADER_TEXTURE_ADD(shared, YUV, tex); + SHADER_TEXTURE_ADD(shared, YUV, texu); + SHADER_TEXTURE_ADD(shared, YUV, texv); + + SHADER_TEXTURE_ADD(shared, YUY2, tex); + SHADER_TEXTURE_ADD(shared, YUY2, texuv); + + SHADER_TEXTURE_ADD(shared, NV12, tex); + SHADER_TEXTURE_ADD(shared, NV12, texuv); + + SHADER_TEXTURE_ADD(shared, YUV_NOMUL, tex); + SHADER_TEXTURE_ADD(shared, YUV_NOMUL, texu); + SHADER_TEXTURE_ADD(shared, YUV_NOMUL, texv); + + SHADER_TEXTURE_ADD(shared, YUY2_NOMUL, tex); + SHADER_TEXTURE_ADD(shared, YUY2_NOMUL, texuv); + + SHADER_TEXTURE_ADD(shared, NV12_NOMUL, tex); + SHADER_TEXTURE_ADD(shared, NV12_NOMUL, texuv); + + SHADER_TEXTURE_ADD(shared, IMG_MASK, tex); + SHADER_TEXTURE_ADD(shared, IMG_MASK, texm); + + if (gc->state.current.cur_prog == PRG_INVALID) + glUseProgram(gc->shared->shader[0].prog); + else glUseProgram(gc->state.current.cur_prog); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + evas_gl_common_shader_program_init_done(); + // in shader: + // uniform sampler2D tex[8]; + // + // in code: + // GLuint texes[8]; + // GLint loc = glGetUniformLocation(prog, "tex"); + // glUniform1iv(loc, 8, texes); + + shared->native_pm_hash = eina_hash_int32_new(NULL); + shared->native_tex_hash = eina_hash_int32_new(NULL); + } + gc->shared = shared; + gc->shared->references++; + _evas_gl_common_viewport_set(gc); + + gc->def_surface = evas_gl_common_image_surface_new(gc, 1, 1, 1); + + return gc; + error: + evas_gl_common_context_free(gc); + return NULL; +} + +void +evas_gl_common_context_free(Evas_Engine_GL_Context *gc) +{ + int i, j; + Eina_List *l; + + gc->references--; + if (gc->references > 0) return; + if (gc->shared) gc->shared->references--; + + if (gc->def_surface) evas_gl_common_image_free(gc->def_surface); + + if (gc->shared) + { + for (i = 0; i < gc->shared->info.tune.pipes.max; i++) + { + if (gc->pipe[i].array.vertex) free(gc->pipe[i].array.vertex); + if (gc->pipe[i].array.color) free(gc->pipe[i].array.color); + if (gc->pipe[i].array.texuv) free(gc->pipe[i].array.texuv); + if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm); + if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2); + if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3); + } + } + + if ((gc->shared) && (gc->shared->references == 0)) + { + Evas_GL_Texture_Pool *pt; + + for (i = 0; i < SHADER_LAST; ++i) + evas_gl_common_shader_program_shutdown(&(gc->shared->shader[i])); + + while (gc->shared->images) + { + evas_gl_common_image_free(gc->shared->images->data); + } + + EINA_LIST_FOREACH(gc->shared->tex.whole, l, pt) + evas_gl_texture_pool_empty(pt); + for (i = 0; i < 33; i++) + { + for (j = 0; j < 3; j++) + { + EINA_LIST_FOREACH(gc->shared->tex.atlas[i][j], l, pt) + evas_gl_texture_pool_empty(pt); + } + } + eina_hash_free(gc->shared->native_pm_hash); + eina_hash_free(gc->shared->native_tex_hash); + free(gc->shared); + shared = NULL; + } + if (gc == _evas_gl_common_context) _evas_gl_common_context = NULL; + free(gc); +} + +void +evas_gl_common_context_use(Evas_Engine_GL_Context *gc) +{ + if (_evas_gl_common_context == gc) return; + _evas_gl_common_context = gc; + if (gc) _evas_gl_common_viewport_set(gc); +} + +void +evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc) +{ + int i; + + if (dbgflushnum < 0) + { + dbgflushnum = 0; + if (getenv("EVAS_GL_DBG")) dbgflushnum = 1; + } + if (dbgflushnum) printf("----prev-flushnum: %i -----------------------------------\n", gc->flushnum); + + gc->flushnum = 0; + gc->state.current.cur_prog = 0; + gc->state.current.cur_tex = 0; + gc->state.current.cur_texu = 0; + gc->state.current.cur_texv = 0; + gc->state.current.cur_texm = 0; + gc->state.current.cur_texmu = 0; + gc->state.current.cur_texmv = 0; + gc->state.current.render_op = 0; + gc->state.current.smooth = 0; + gc->state.current.blend = 0; + gc->state.current.clip = 0; + gc->state.current.cx = 0; + gc->state.current.cy = 0; + gc->state.current.cw = 0; + gc->state.current.ch = 0; + + for (i = 0; i < gc->shared->info.tune.pipes.max; i++) + { + gc->pipe[i].region.x = 0; + gc->pipe[i].region.y = 0; + gc->pipe[i].region.w = 0; + gc->pipe[i].region.h = 0; + gc->pipe[i].region.type = 0; + gc->pipe[i].clip.active = 0; + gc->pipe[i].clip.x = 0; + gc->pipe[i].clip.y = 0; + gc->pipe[i].clip.w = 0; + gc->pipe[i].clip.h = 0; + gc->pipe[i].shader.surface = NULL; + gc->pipe[i].shader.cur_prog = 0; + gc->pipe[i].shader.cur_tex = 0; + gc->pipe[i].shader.cur_texu = 0; + gc->pipe[i].shader.cur_texv = 0; + gc->pipe[i].shader.cur_texm = 0; + gc->pipe[i].shader.render_op = EVAS_RENDER_BLEND; + gc->pipe[i].shader.smooth = 0; + gc->pipe[i].shader.blend = 0; + gc->pipe[i].shader.clip = 0; + gc->pipe[i].shader.cx = 0; + gc->pipe[i].shader.cy = 0; + gc->pipe[i].shader.cw = 0; + gc->pipe[i].shader.ch = 0; + } + gc->change.size = 1; + + glDisable(GL_SCISSOR_TEST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glScissor(0, 0, 0, 0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + glDisable(GL_DEPTH_TEST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glEnable(GL_DITHER); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glDisable(GL_BLEND); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + // no dest alpha +// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // dest alpha +// glBlendFunc(GL_SRC_ALPHA, GL_ONE); // ??? + glDepthMask(GL_FALSE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT + if (shared->info.anisotropic > 0.0) + { + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } +#endif + + glEnableVertexAttribArray(SHAD_VERTEX); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glEnableVertexAttribArray(SHAD_COLOR); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + if (gc->state.current.cur_prog == PRG_INVALID) + glUseProgram(gc->shared->shader[0].prog); + else glUseProgram(gc->state.current.cur_prog); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + glActiveTexture(GL_TEXTURE0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + _evas_gl_common_viewport_set(gc); +} + +void +evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot) +{ + if ((gc->w == w) && (gc->h == h) && (gc->rot == rot)) return; + evas_gl_common_context_flush(gc); + gc->change.size = 1; + gc->rot = rot; + gc->w = w; + gc->h = h; + if (_evas_gl_common_context == gc) _evas_gl_common_viewport_set(gc); +} + +void +evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, + Evas_GL_Image *surface) +{ + if (surface == gc->pipe[0].shader.surface) return; + + evas_gl_common_context_flush(gc); + + gc->state.current.cur_prog = PRG_INVALID; + gc->state.current.cur_tex = -1; + gc->state.current.cur_texu = -1; + gc->state.current.cur_texv = -1; + gc->state.current.render_op = -1; + gc->state.current.smooth = -1; + gc->state.current.blend = -1; + gc->state.current.clip = -1; + gc->state.current.cx = -1; + gc->state.current.cy = -1; + gc->state.current.cw = -1; + gc->state.current.ch = -1; + + gc->pipe[0].shader.surface = surface; + gc->change.size = 1; +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +# ifndef GL_FRAMEBUFFER +# define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES +# endif +#else +# ifndef GL_FRAMEBUFFER +# define GL_FRAMEBUFFER GL_FRAMEBUFFER_EXT +# endif +#endif + if (gc->pipe[0].shader.surface == gc->def_surface) + { + glsym_glBindFramebuffer(GL_FRAMEBUFFER, 0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + { + glsym_glBindFramebuffer(GL_FRAMEBUFFER, surface->tex->pt->fb); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + _evas_gl_common_viewport_set(gc); +} + +#define PUSH_VERTEX(n, x, y, z) \ + gc->pipe[n].array.vertex[nv++] = x; \ + gc->pipe[n].array.vertex[nv++] = y; \ + gc->pipe[n].array.vertex[nv++] = z +#define PUSH_COLOR(n, r, g, b, a) \ + gc->pipe[n].array.color[nc++] = r; \ + gc->pipe[n].array.color[nc++] = g; \ + gc->pipe[n].array.color[nc++] = b; \ + gc->pipe[n].array.color[nc++] = a +#define PUSH_TEXUV(n, u, v) \ + gc->pipe[n].array.texuv[nu++] = u; \ + gc->pipe[n].array.texuv[nu++] = v +#define PUSH_TEXUV2(n, u, v) \ + gc->pipe[n].array.texuv2[nu2++] = u; \ + gc->pipe[n].array.texuv2[nu2++] = v +#define PUSH_TEXUV3(n, u, v) \ + gc->pipe[n].array.texuv3[nu3++] = u; \ + gc->pipe[n].array.texuv3[nu3++] = v +#define PUSH_TEXM(n, u, v) \ + gc->pipe[n].array.texm[nm++] = u; \ + gc->pipe[n].array.texm[nm++] = v + + +static inline void +array_alloc(Evas_Engine_GL_Context *gc, int n) +{ + gc->havestuff = EINA_TRUE; + if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc) return; + gc->pipe[n].array.alloc += 6 * 1024; + if (gc->pipe[n].array.use_vertex) + gc->pipe[n].array.vertex = realloc(gc->pipe[n].array.vertex, + gc->pipe[n].array.alloc * sizeof(GLshort) * 3); + if (gc->pipe[n].array.use_color) + gc->pipe[n].array.color = realloc(gc->pipe[n].array.color, + gc->pipe[n].array.alloc * sizeof(GLubyte) * 4); + if (gc->pipe[n].array.use_texuv) + gc->pipe[n].array.texuv = realloc(gc->pipe[n].array.texuv, + gc->pipe[n].array.alloc * sizeof(GLfloat) * 2); + if (gc->pipe[n].array.use_texm) + gc->pipe[n].array.texm = realloc(gc->pipe[n].array.texm, + gc->pipe[n].array.alloc * sizeof(GLfloat) * 2); + if (gc->pipe[n].array.use_texuv2) + gc->pipe[n].array.texuv2 = realloc(gc->pipe[n].array.texuv2, + gc->pipe[n].array.alloc * sizeof(GLfloat) * 2); + if (gc->pipe[n].array.use_texuv3) + gc->pipe[n].array.texuv3 = realloc(gc->pipe[n].array.texuv3, + gc->pipe[n].array.alloc * sizeof(GLfloat) * 2); +} + +#ifdef GLPIPES +static int +pipe_region_intersects(Evas_Engine_GL_Context *gc, int n, + int x, int y, int w, int h) +{ + int i, rx, ry, rw, rh, ii; + + rx = gc->pipe[n].region.x; + ry = gc->pipe[n].region.y; + rw = gc->pipe[n].region.w; + rh = gc->pipe[n].region.h; + if (!RECTS_INTERSECT(x, y, w, h, rx, ry, rw, rh)) + return 0; + + // a hack for now. map pipes use their whole bounding box for intersects + // which at worst case reduces to old pipeline flushes, but cheaper than + // full quad region or triangle intersects right now + if (gc->pipe[n].region.type == RTYPE_MAP) return 1; + + for (i = 0, + ii = 0; + + i < gc->pipe[n].array.num; + + i += (3 * 2), + ii += (3 * 3 * 2)) + { // tri 1... + // 0, 1, 2 < top left + // 3, 4, 5 < top right + // 6. 7, 8 < bottom left + rx = gc->pipe[n].array.vertex[ii + 0]; + ry = gc->pipe[n].array.vertex[ii + 1]; + rw = gc->pipe[n].array.vertex[ii + 3] - rx; + rh = gc->pipe[n].array.vertex[ii + 7] - ry; + if (RECTS_INTERSECT(x, y, w, h, rx, ry, rw, rh)) + return 1; + } + return 0; +} +#endif + +static void +pipe_region_expand(Evas_Engine_GL_Context *gc, int n, + int x, int y, int w, int h) +{ + int x1, y1, x2, y2; + + if (gc->pipe[n].region.w <= 0) + { + gc->pipe[n].region.x = x; + gc->pipe[n].region.y = y; + gc->pipe[n].region.w = w; + gc->pipe[n].region.h = h; + return; + } + x1 = gc->pipe[n].region.x; + y1 = gc->pipe[n].region.y; + x2 = gc->pipe[n].region.x + gc->pipe[n].region.w; + y2 = gc->pipe[n].region.y + gc->pipe[n].region.h; + if (x < x1) x1 = x; + if (y < y1) y1 = y; + if ((x + w) > x2) x2 = x + w; + if ((y + h) > y2) y2 = y + h; + gc->pipe[n].region.x = x1; + gc->pipe[n].region.y = y1; + gc->pipe[n].region.w = x2 - x1; + gc->pipe[n].region.h = y2 - y1; +} + +static Eina_Bool +vertex_array_size_check(Evas_Engine_GL_Context *gc, int pn, int n) +{ + return 1; +// this fixup breaks for expedite test 32. why? + if ((gc->pipe[pn].array.num + n) > gc->shared->info.max_vertex_elements) + { + shader_array_flush(gc); + return 0; + } + return 1; +} + +static inline Evas_GL_Shader +evas_gl_common_shader_choice(int npoints __UNUSED__, + RGBA_Map_Point *p, + int r, int g, int b, int a, + Evas_GL_Shader nomul, + Evas_GL_Shader mul) +{ + if ((a == 255) && (r == 255) && (g == 255) && (b == 255)) + { + if (!p) return nomul; + + if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) && + (p[2].col == 0xffffffff) && (p[3].col == 0xffffffff)) + return nomul; + } + return mul; +} + +static int +_evas_gl_common_context_push(int rtype, + Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + Evas_GL_Texture *texm, + GLuint prog, + int x, int y, int w, int h, + Eina_Bool blend, + Eina_Bool smooth, + Eina_Bool clip, + int cx, int cy, int cw, int ch) +{ + int pn = 0; + +#ifdef GLPIPES + again: +#endif + vertex_array_size_check(gc, gc->state.top_pipe, 6); + pn = gc->state.top_pipe; +#ifdef GLPIPES + if (!((pn == 0) && (gc->pipe[pn].array.num == 0))) + { + int found = 0; + int i; + + for (i = pn; i >= 0; i--) + { + if ((gc->pipe[i].region.type == rtype) + && (!tex || gc->pipe[i].shader.cur_tex == tex->pt->texture) + && (!texm || gc->pipe[i].shader.cur_texm == texm->pt->texture) + && (gc->pipe[i].shader.cur_prog == prog) + && (gc->pipe[i].shader.smooth == smooth) + && (gc->pipe[i].shader.blend == blend) + && (gc->pipe[i].shader.render_op == gc->dc->render_op) + && (gc->pipe[i].shader.clip == clip) + && (!clip || ((gc->pipe[i].shader.cx == cx) + && (gc->pipe[i].shader.cy == cy) + && (gc->pipe[i].shader.cw == cw) + && (gc->pipe[i].shader.ch == ch)))) + { + found = 1; + pn = i; + break; + } + if (pipe_region_intersects(gc, i, x, y, w, h)) break; + } + if (!found) + { + pn = gc->state.top_pipe + 1; + if (pn >= gc->shared->info.tune.pipes.max) + { + shader_array_flush(gc); + goto again; + } + gc->state.top_pipe = pn; + } + } + if ((tex) && (((tex->im) && (tex->im->native.data)) || tex->pt->dyn.img)) + { + if (gc->pipe[pn].array.im != tex->im) + { + shader_array_flush(gc); + pn = gc->state.top_pipe; + gc->pipe[pn].array.im = tex->im; + goto again; + } + } +#else + if (!((gc->pipe[pn].region.type == rtype) + && (!tex || gc->pipe[pn].shader.cur_tex == tex->pt->texture) + && (!texm || gc->pipe[pn].shader.cur_texm == texm->pt->texture) + && (gc->pipe[pn].shader.cur_prog == prog) + && (gc->pipe[pn].shader.smooth == smooth) + && (gc->pipe[pn].shader.blend == blend) + && (gc->pipe[pn].shader.render_op == gc->dc->render_op) + && (gc->pipe[pn].shader.clip == clip) + && (!clip || ((gc->pipe[pn].shader.cx == cx) + && (gc->pipe[pn].shader.cy == cy) + && (gc->pipe[pn].shader.cw == cw) + && (gc->pipe[pn].shader.ch == ch))))) + { + shader_array_flush(gc); + } + if ((tex) && (((tex->im) && (tex->im->native.data)) || tex->pt->dyn.img)) + { + if (gc->pipe[pn].array.im != tex->im) + { + shader_array_flush(gc); + gc->pipe[pn].array.im = tex->im; + } + } +#endif + + return pn; +} + +void +evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc, + int x1, int y1, int x2, int y2, + int clip, int cx, int cy, int cw, int ch, + int r, int g, int b, int a) +{ + int pnum, nv, nc, nu, nt, i; + Eina_Bool blend = 0; + GLuint prog = gc->shared->shader[SHADER_RECT].prog; + int pn = 0; + + if (a < 255) blend = 1; + if (gc->dc->render_op == EVAS_RENDER_COPY) blend = 0; + + shader_array_flush(gc); + vertex_array_size_check(gc, gc->state.top_pipe, 2); + pn = gc->state.top_pipe; + gc->pipe[pn].shader.cur_tex = 0; + gc->pipe[pn].shader.cur_prog = prog; + gc->pipe[pn].shader.blend = blend; + gc->pipe[pn].shader.render_op = gc->dc->render_op; + gc->pipe[pn].shader.clip = clip; + gc->pipe[pn].shader.cx = cx; + gc->pipe[pn].shader.cy = cy; + gc->pipe[pn].shader.cw = cw; + gc->pipe[pn].shader.ch = ch; + + gc->pipe[pn].array.line = 1; + gc->pipe[pn].array.use_vertex = 1; + gc->pipe[pn].array.use_color = 1; + gc->pipe[pn].array.use_texuv = 0; + gc->pipe[pn].array.use_texuv2 = 0; + gc->pipe[pn].array.use_texuv3 = 0; + + pnum = gc->pipe[pn].array.num; + nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nt = pnum * 4; + gc->pipe[pn].array.num += 2; + array_alloc(gc, pn); + + PUSH_VERTEX(pn, x1, y1, 0); + PUSH_VERTEX(pn, x2, y2, 0); + + for (i = 0; i < 2; i++) + { + PUSH_COLOR(pn, r, g, b, a); + } + + shader_array_flush(gc); + gc->pipe[pn].array.line = 0; + gc->pipe[pn].array.use_vertex = 0; + gc->pipe[pn].array.use_color = 0; + gc->pipe[pn].array.use_texuv = 0; + gc->pipe[pn].array.use_texuv2 = 0; + gc->pipe[pn].array.use_texuv3 = 0; +} + +void +evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc, + int x, int y, int w, int h, + int r, int g, int b, int a) +{ + int pnum, nv, nc, nu, nt, i; + Eina_Bool blend = 0; + GLuint prog = gc->shared->shader[SHADER_RECT].prog; + int pn = 0; + + if (gc->dc->mask.mask) + { + RGBA_Draw_Context *dc; + dc = gc->dc; + Evas_GL_Image *im; + im = (void *)dc->mask.mask; + evas_gl_common_context_font_push(gc, im->tex, + x - dc->mask.x,y - dc->mask.y, + dc->mask.w,dc->mask.h, + x,y,w,h,r,g,b,a); + return; + } + + if (a < 255) blend = 1; + if (gc->dc->render_op == EVAS_RENDER_COPY) blend = 0; + +again: + vertex_array_size_check(gc, gc->state.top_pipe, 6); + pn = gc->state.top_pipe; +#ifdef GLPIPES + if ((pn == 0) && (gc->pipe[pn].array.num == 0)) + { + gc->pipe[pn].region.type = RTYPE_RECT; + gc->pipe[pn].shader.cur_tex = 0; + gc->pipe[pn].shader.cur_prog = prog; + gc->pipe[pn].shader.blend = blend; + gc->pipe[pn].shader.render_op = gc->dc->render_op; + gc->pipe[pn].shader.clip = 0; + gc->pipe[pn].shader.cx = 0; + gc->pipe[pn].shader.cy = 0; + gc->pipe[pn].shader.cw = 0; + gc->pipe[pn].shader.ch = 0; + gc->pipe[pn].array.line = 0; + gc->pipe[pn].array.use_vertex = 1; + gc->pipe[pn].array.use_color = 1; + gc->pipe[pn].array.use_texuv = 0; + gc->pipe[pn].array.use_texuv2 = 0; + gc->pipe[pn].array.use_texuv3 = 0; + } + else + { + int found = 0; + + for (i = pn; i >= 0; i--) + { + if ((gc->pipe[i].region.type == RTYPE_RECT) + && (gc->pipe[i].shader.cur_tex == 0) + && (gc->pipe[i].shader.cur_prog == prog) + && (gc->pipe[i].shader.blend == blend) + && (gc->pipe[i].shader.render_op == gc->dc->render_op) + && (gc->pipe[i].shader.clip == 0) + ) + { + found = 1; + pn = i; + break; + } + if (pipe_region_intersects(gc, i, x, y, w, h)) break; + } + if (!found) + { + pn = gc->state.top_pipe + 1; + if (pn >= gc->shared->info.tune.pipes.max) + { + shader_array_flush(gc); + goto again; + } + gc->state.top_pipe = pn; + gc->pipe[pn].region.type = RTYPE_RECT; + gc->pipe[pn].shader.cur_tex = 0; + gc->pipe[pn].shader.cur_prog = prog; + gc->pipe[pn].shader.blend = blend; + gc->pipe[pn].shader.render_op = gc->dc->render_op; + gc->pipe[pn].shader.clip = 0; + gc->pipe[pn].shader.cx = 0; + gc->pipe[pn].shader.cy = 0; + gc->pipe[pn].shader.cw = 0; + gc->pipe[pn].shader.ch = 0; + gc->pipe[pn].array.line = 0; + gc->pipe[pn].array.use_vertex = 1; + gc->pipe[pn].array.use_color = 1; + gc->pipe[pn].array.use_texuv = 0; + gc->pipe[pn].array.use_texuv2 = 0; + gc->pipe[pn].array.use_texuv3 = 0; + } + } +#else + if ((gc->pipe[pn].shader.cur_tex != 0) + || (gc->pipe[pn].shader.cur_prog != prog) + || (gc->pipe[pn].shader.blend != blend) + || (gc->pipe[pn].shader.render_op != gc->dc->render_op) + || (gc->pipe[pn].shader.clip != 0) + ) + { + shader_array_flush(gc); + pn = gc->state.top_pipe; + gc->pipe[pn].shader.cur_tex = 0; + gc->pipe[pn].shader.cur_prog = prog; + gc->pipe[pn].shader.blend = blend; + gc->pipe[pn].shader.render_op = gc->dc->render_op; + gc->pipe[pn].shader.clip = 0; + gc->pipe[pn].shader.cx = 0; + gc->pipe[pn].shader.cy = 0; + gc->pipe[pn].shader.cw = 0; + gc->pipe[pn].shader.ch = 0; + } + + gc->pipe[pn].region.type = RTYPE_RECT; + gc->pipe[pn].array.line = 0; + gc->pipe[pn].array.use_vertex = 1; + gc->pipe[pn].array.use_color = 1; + gc->pipe[pn].array.use_texuv = 0; + gc->pipe[pn].array.use_texuv2 = 0; + gc->pipe[pn].array.use_texuv3 = 0; +#endif + + pipe_region_expand(gc, pn, x, y, w, h); + + pnum = gc->pipe[pn].array.num; + nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nt = pnum * 4; + gc->pipe[pn].array.num += 6; + array_alloc(gc, pn); + + PUSH_VERTEX(pn, x , y , 0); + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x + w, y + h, 0); + PUSH_VERTEX(pn, x , y + h, 0); + + for (i = 0; i < 6; i++) + { + PUSH_COLOR(pn, r, g, b, a); + } +} + +void +evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + double sx, double sy, double sw, double sh, + int x, int y, int w, int h, + int r, int g, int b, int a, + Eina_Bool smooth, Eina_Bool tex_only) +{ + int pnum, nv, nc, nu, nu2, nt, i; + GLfloat tx1, tx2, ty1, ty2; + Eina_Bool blend = 1; + GLuint prog = gc->shared->shader[SHADER_IMG].prog; + int pn = 0; + + if (!tex->alpha) blend = 0; + if (a < 255) blend = 1; + + if (gc->filter_prog) + { + prog = gc->filter_prog; + } + else if (tex_only) + { + if (tex->pt->dyn.img) + { + prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, + SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog; + } + else + { + prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, + SHADER_TEX_NOMUL, SHADER_TEX)].prog; + } + } + else + { + if (tex->gc->shared->info.bgra) + { + prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, + SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog; + } + else + { + prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, + SHADER_IMG_NOMUL, SHADER_IMG)].prog; + } + } + + pn = _evas_gl_common_context_push(RTYPE_IMAGE, + gc, tex, NULL, + prog, + x, y, w, h, + blend, + smooth, + 0, 0, 0, 0, 0); + + gc->pipe[pn].region.type = RTYPE_IMAGE; + gc->pipe[pn].shader.cur_tex = tex->pt->texture; + gc->pipe[pn].shader.cur_prog = prog; + gc->pipe[pn].shader.smooth = smooth; + gc->pipe[pn].shader.blend = blend; + gc->pipe[pn].shader.render_op = gc->dc->render_op; + gc->pipe[pn].shader.clip = 0; + gc->pipe[pn].shader.cx = 0; + gc->pipe[pn].shader.cy = 0; + gc->pipe[pn].shader.cw = 0; + gc->pipe[pn].shader.ch = 0; + gc->pipe[pn].array.line = 0; + gc->pipe[pn].array.use_vertex = 1; + // if nomul... dont need this + gc->pipe[pn].array.use_color = 1; + gc->pipe[pn].array.use_texuv = 1; + gc->pipe[pn].array.use_texuv2 = 0; + gc->pipe[pn].array.use_texuv3 = 0; + + pipe_region_expand(gc, pn, x, y, w, h); + + pnum = gc->pipe[pn].array.num; + nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nu2 = pnum * 2; + nt = pnum * 4; + gc->pipe[pn].array.num += 6; + array_alloc(gc, pn); + + if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert)) + { + tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w; + ty1 = 1.0 - ((double)(tex->y) + sy) / (double)tex->pt->h; + tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w; + ty2 = 1.0 - ((double)(tex->y) + sy + sh) / (double)tex->pt->h; + } + else + { + tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w; + ty1 = ((double)(tex->y) + sy) / (double)tex->pt->h; + tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w; + ty2 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h; + } + + PUSH_VERTEX(pn, x , y , 0); + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx1, ty1); + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx1, ty2); + + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x + w, y + h, 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx2, ty2); + PUSH_TEXUV(pn, tx1, ty2); + + // if nomul... dont need this + for (i = 0; i < 6; i++) + { + PUSH_COLOR(pn, r, g, b, a); + } +} + +void +evas_gl_common_context_image_mask_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + Evas_GL_Texture *texm, + double sx, double sy, double sw, double sh, + double sxm, double sym, double swm,double shm, + int x, int y, int w, int h, + int r, int g, int b, int a, + Eina_Bool smooth) +{ + int pnum, nv, nc, nu, nm, nt, i; + GLfloat tx1, tx2, ty1, ty2; + GLfloat txm1, txm2, tym1, tym2; + Eina_Bool blend = 1; + GLuint prog = gc->shared->shader[SHADER_IMG_MASK].prog; + int pn = 0; + +#if 0 + if (tex->gc->shared->info.bgra) + { + prog = gc->shared->shader[SHADER_IMG_MASK].prog; + } + else + { +#warning Nash: FIXME: Need two shaders? + printf("Not good: Need other texture\n"); + prog = gc->shared->shader[SHADER_IMG].prog; + } +#endif + + pn = _evas_gl_common_context_push(RTYPE_IMASK, + gc, tex, texm, + prog, + x, y, w, h, + blend, + smooth, + 0, 0, 0, 0, 0); + + gc->pipe[pn].region.type = RTYPE_IMASK; + gc->pipe[pn].shader.cur_tex = tex->pt->texture; + gc->pipe[pn].shader.cur_texm = texm->pt->texture; + gc->pipe[pn].shader.cur_prog = prog; + gc->pipe[pn].shader.smooth = smooth; + gc->pipe[pn].shader.blend = blend; + gc->pipe[pn].shader.render_op = gc->dc->render_op; + gc->pipe[pn].shader.clip = 0; + gc->pipe[pn].shader.cx = 0; + gc->pipe[pn].shader.cy = 0; + gc->pipe[pn].shader.cw = 0; + gc->pipe[pn].shader.ch = 0; + gc->pipe[pn].array.line = 0; + gc->pipe[pn].array.use_vertex = 1; + // if nomul... dont need this + gc->pipe[pn].array.use_color = 1; + gc->pipe[pn].array.use_texuv = 1; + gc->pipe[pn].array.use_texuv2 = 0; + gc->pipe[pn].array.use_texuv3 = 0; + gc->pipe[pn].array.use_texm = 1; + + pipe_region_expand(gc, pn, x, y, w, h); + + pnum = gc->pipe[pn].array.num; + nv = pnum * 3; nc = pnum * 4; nm = pnum * 2; nu = pnum * 2; + nt = pnum * 4; + gc->pipe[pn].array.num += 6; + array_alloc(gc, pn); + + if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert)) + { + tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w; + ty1 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h; + tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w; + ty2 = ((double)(tex->y) + sy) / (double)tex->pt->h; + + txm1 = ((double)(texm->x) + sxm) / (double)texm->pt->w; + tym1 = ((double)(texm->y) + sym + shm) / (double)texm->pt->h; + txm2 = ((double)(texm->x) + sxm + swm) / (double)texm->pt->w; + tym2 = ((double)(texm->y) + sym) / (double)texm->pt->h; + } + else + { + tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w; + ty1 = ((double)(tex->y) + sy) / (double)tex->pt->h; + tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w; + ty2 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h; + + txm1 = (texm->x + sxm) / (double)texm->pt->w; + tym1 = (texm->y + sym) / (double)texm->pt->h; + txm2 = (texm->x + sxm + swm) / (double)texm->pt->w; + tym2 = (texm->y + sym + shm) / (double)texm->pt->h; + } + // printf(" %3.6lf %3.6lf %3.6lf %3.6lf\n",sx,sy,sw,sh); + // printf("m%3.6lf %3.6lf %3.6lf %3.6lf\n",sxm,sym,swm,shm); + // printf(" %3f %3f %3f %3f\n",tx1,ty1,tx2,ty2); + // printf("m%3f %3f %3f %3f\n",txm1,tym1,txm2,tym2); + + PUSH_VERTEX(pn, x , y , 0); + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx1, ty1); + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx1, ty2); + + PUSH_TEXM(pn, txm1, tym1); + PUSH_TEXM(pn, txm2, tym1); + PUSH_TEXM(pn, txm1, tym2); + + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x + w, y + h, 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx2, ty2); + PUSH_TEXUV(pn, tx1, ty2); + + PUSH_TEXM(pn, txm2, tym1); + PUSH_TEXM(pn, txm2, tym2); + PUSH_TEXM(pn, txm1, tym2); + + // if nomul... dont need this + for (i = 0; i < 6; i++) + { + PUSH_COLOR(pn, r, g, b, a); + } +} + + +void +evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + double sx, double sy, double sw, double sh, + int x, int y, int w, int h, + int r, int g, int b, int a) +{ + int pnum, nv, nc, nu, nt, i; + GLfloat tx1, tx2, ty1, ty2; + GLuint prog = gc->shared->shader[SHADER_FONT].prog; + int pn = 0; + + pn = _evas_gl_common_context_push(RTYPE_FONT, + gc, tex, NULL, + prog, + x, y, w, h, + 1, + 0, + 0, 0, 0, 0, 0); + + gc->pipe[pn].region.type = RTYPE_FONT; + gc->pipe[pn].shader.cur_tex = tex->pt->texture; + gc->pipe[pn].shader.cur_prog = prog; + gc->pipe[pn].shader.smooth = 0; + gc->pipe[pn].shader.blend = 1; + gc->pipe[pn].shader.render_op = gc->dc->render_op; + gc->pipe[pn].shader.clip = 0; + gc->pipe[pn].shader.cx = 0; + gc->pipe[pn].shader.cy = 0; + gc->pipe[pn].shader.cw = 0; + gc->pipe[pn].shader.ch = 0; + gc->pipe[pn].array.line = 0; + gc->pipe[pn].array.use_vertex = 1; + gc->pipe[pn].array.use_color = 1; + gc->pipe[pn].array.use_texuv = 1; + gc->pipe[pn].array.use_texuv2 = 0; + gc->pipe[pn].array.use_texuv3 = 0; + + pipe_region_expand(gc, pn, x, y, w, h); + + pnum = gc->pipe[pn].array.num; + nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nt = pnum * 4; + gc->pipe[pn].array.num += 6; + array_alloc(gc, pn); + + if (sw == 0.0) + { + tx1 = tex->sx1; + ty1 = tex->sy1; + tx2 = tex->sx2; + ty2 = tex->sy2; + } + else + { + tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w; + ty1 = ((double)(tex->y) + sy) / (double)tex->pt->h; + tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w; + ty2 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h; + } + + PUSH_VERTEX(pn, x , y , 0); + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx1, ty1); + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx1, ty2); + + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x + w, y + h, 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx2, ty2); + PUSH_TEXUV(pn, tx1, ty2); + + for (i = 0; i < 6; i++) + { + PUSH_COLOR(pn, r, g, b, a); + } +} + +void +evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + double sx, double sy, double sw, double sh, + int x, int y, int w, int h, + int r, int g, int b, int a, + Eina_Bool smooth) +{ + int pnum, nv, nc, nu, nu2, nu3, nt, i; + GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2; + Eina_Bool blend = 0; + GLuint prog; + int pn = 0; + + if (a < 255) blend = 1; + + prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, + SHADER_YUV_NOMUL, SHADER_YUV)].prog; + + pn = _evas_gl_common_context_push(RTYPE_YUV, + gc, tex, NULL, + prog, + x, y, w, h, + blend, + smooth, + 0, 0, 0, 0, 0); + + gc->pipe[pn].region.type = RTYPE_YUV; + gc->pipe[pn].shader.cur_tex = tex->pt->texture; + gc->pipe[pn].shader.cur_texu = tex->ptu->texture; + gc->pipe[pn].shader.cur_texv = tex->ptv->texture; + gc->pipe[pn].shader.cur_prog = prog; + gc->pipe[pn].shader.smooth = smooth; + gc->pipe[pn].shader.blend = blend; + gc->pipe[pn].shader.render_op = gc->dc->render_op; + gc->pipe[pn].shader.clip = 0; + gc->pipe[pn].shader.cx = 0; + gc->pipe[pn].shader.cy = 0; + gc->pipe[pn].shader.cw = 0; + gc->pipe[pn].shader.ch = 0; + gc->pipe[pn].array.line = 0; + gc->pipe[pn].array.use_vertex = 1; + gc->pipe[pn].array.use_color = 1; + gc->pipe[pn].array.use_texuv = 1; + gc->pipe[pn].array.use_texuv2 = 1; + gc->pipe[pn].array.use_texuv3 = 1; + + pipe_region_expand(gc, pn, x, y, w, h); + + pnum = gc->pipe[pn].array.num; + nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; + nu2 = pnum * 2; nu3 = pnum * 2; nt = pnum * 4; + gc->pipe[pn].array.num += 6; + array_alloc(gc, pn); + + tx1 = (sx) / (double)tex->pt->w; + ty1 = (sy) / (double)tex->pt->h; + tx2 = (sx + sw) / (double)tex->pt->w; + ty2 = (sy + sh) / (double)tex->pt->h; + + t2x1 = ((sx) / 2) / (double)tex->ptu->w; + t2y1 = ((sy) / 2) / (double)tex->ptu->h; + t2x2 = ((sx + sw) / 2) / (double)tex->ptu->w; + t2y2 = ((sy + sh) / 2) / (double)tex->ptu->h; + + PUSH_VERTEX(pn, x , y , 0); + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx1, ty1); + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx1, ty2); + + PUSH_TEXUV2(pn, t2x1, t2y1); + PUSH_TEXUV2(pn, t2x2, t2y1); + PUSH_TEXUV2(pn, t2x1, t2y2); + + PUSH_TEXUV3(pn, t2x1, t2y1); + PUSH_TEXUV3(pn, t2x2, t2y1); + PUSH_TEXUV3(pn, t2x1, t2y2); + + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x + w, y + h, 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx2, ty2); + PUSH_TEXUV(pn, tx1, ty2); + + PUSH_TEXUV2(pn, t2x2, t2y1); + PUSH_TEXUV2(pn, t2x2, t2y2); + PUSH_TEXUV2(pn, t2x1, t2y2); + + PUSH_TEXUV3(pn, t2x2, t2y1); + PUSH_TEXUV3(pn, t2x2, t2y2); + PUSH_TEXUV3(pn, t2x1, t2y2); + + for (i = 0; i < 6; i++) + { + PUSH_COLOR(pn, r, g, b, a); + } +} + +void +evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + double sx, double sy, double sw, double sh, + int x, int y, int w, int h, + int r, int g, int b, int a, + Eina_Bool smooth) +{ + int pnum, nv, nc, nu, nu2, nu3, nt, i; + GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2; + Eina_Bool blend = 0; + GLuint prog; + int pn = 0; + + if (a < 255) blend = 1; + + prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, + SHADER_YUY2_NOMUL, SHADER_YUY2)].prog; + + pn = _evas_gl_common_context_push(RTYPE_YUY2, + gc, tex, NULL, + prog, + x, y, w, h, + blend, + smooth, + 0, 0, 0, 0, 0); + + gc->pipe[pn].region.type = RTYPE_YUY2; + gc->pipe[pn].shader.cur_tex = tex->pt->texture; + gc->pipe[pn].shader.cur_texu = tex->ptuv->texture; + gc->pipe[pn].shader.cur_prog = prog; + gc->pipe[pn].shader.smooth = smooth; + gc->pipe[pn].shader.blend = blend; + gc->pipe[pn].shader.render_op = gc->dc->render_op; + gc->pipe[pn].shader.clip = 0; + gc->pipe[pn].shader.cx = 0; + gc->pipe[pn].shader.cy = 0; + gc->pipe[pn].shader.cw = 0; + gc->pipe[pn].shader.ch = 0; + gc->pipe[pn].array.line = 0; + gc->pipe[pn].array.use_vertex = 1; + gc->pipe[pn].array.use_color = 1; + gc->pipe[pn].array.use_texuv = 1; + gc->pipe[pn].array.use_texuv2 = 1; + gc->pipe[pn].array.use_texuv3 = 0; + + pipe_region_expand(gc, pn, x, y, w, h); + + pnum = gc->pipe[pn].array.num; + nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; + nu2 = pnum * 2; nu3 = pnum * 2; nt = pnum * 4; + gc->pipe[pn].array.num += 6; + array_alloc(gc, pn); + + tx1 = (sx) / (double)tex->pt->w; + ty1 = (sy) / (double)tex->pt->h; + tx2 = (sx + sw) / (double)tex->pt->w; + ty2 = (sy + sh) / (double)tex->pt->h; + + t2x1 = sx / (double)tex->ptuv->w; + t2y1 = sy / (double)tex->ptuv->h; + t2x2 = (sx + sw) / (double)tex->ptuv->w; + t2y2 = (sy + sh) / (double)tex->ptuv->h; + + PUSH_VERTEX(pn, x , y , 0); + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx1, ty1); + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx1, ty2); + + PUSH_TEXUV2(pn, t2x1, t2y1); + PUSH_TEXUV2(pn, t2x2, t2y1); + PUSH_TEXUV2(pn, t2x1, t2y2); + + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x + w, y + h, 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx2, ty2); + PUSH_TEXUV(pn, tx1, ty2); + + PUSH_TEXUV2(pn, t2x2, t2y1); + PUSH_TEXUV2(pn, t2x2, t2y2); + PUSH_TEXUV2(pn, t2x1, t2y2); + + for (i = 0; i < 6; i++) + { + PUSH_COLOR(pn, r, g, b, a); + } +} + +void +evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + double sx, double sy, double sw, double sh, + int x, int y, int w, int h, + int r, int g, int b, int a, + Eina_Bool smooth) +{ + int pnum, nv, nc, nu, nu2, nu3, nt, i; + GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2; + Eina_Bool blend = 0; + GLuint prog; + int pn = 0; + + if (a < 255) blend = 1; + + prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, + SHADER_NV12_NOMUL, SHADER_NV12)].prog; + + pn = _evas_gl_common_context_push(RTYPE_NV12, + gc, tex, NULL, + prog, + x, y, w, h, + blend, + smooth, + 0, 0, 0, 0, 0); + + gc->pipe[pn].region.type = RTYPE_NV12; + gc->pipe[pn].shader.cur_tex = tex->pt->texture; + gc->pipe[pn].shader.cur_tex_dyn = tex->pt->dyn.img; + gc->pipe[pn].shader.cur_texu = tex->ptuv->texture; + gc->pipe[pn].shader.cur_texu_dyn = tex->ptuv->dyn.img; + gc->pipe[pn].shader.cur_prog = prog; + gc->pipe[pn].shader.smooth = smooth; + gc->pipe[pn].shader.blend = blend; + gc->pipe[pn].shader.render_op = gc->dc->render_op; + gc->pipe[pn].shader.clip = 0; + gc->pipe[pn].shader.cx = 0; + gc->pipe[pn].shader.cy = 0; + gc->pipe[pn].shader.cw = 0; + gc->pipe[pn].shader.ch = 0; + gc->pipe[pn].array.line = 0; + gc->pipe[pn].array.use_vertex = 1; + gc->pipe[pn].array.use_color = 1; + gc->pipe[pn].array.use_texuv = 1; + gc->pipe[pn].array.use_texuv2 = 1; + gc->pipe[pn].array.use_texuv3 = 0; + + pipe_region_expand(gc, pn, x, y, w, h); + + pnum = gc->pipe[pn].array.num; + nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; + nu2 = pnum * 2; nu3 = pnum * 2; nt = pnum * 4; + gc->pipe[pn].array.num += 6; + array_alloc(gc, pn); + + tx1 = (sx) / (double)tex->pt->w; + ty1 = (sy) / (double)tex->pt->h; + tx2 = (sx + sw) / (double)tex->pt->w; + ty2 = (sy + sh) / (double)tex->pt->h; + + t2x1 = sx / (double)tex->ptuv->w; + t2y1 = sy / (double)tex->ptuv->h; + t2x2 = (sx + sw) / (double)tex->ptuv->w; + t2y2 = (sy + sh) / (double)tex->ptuv->h; + + PUSH_VERTEX(pn, x , y , 0); + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx1, ty1); + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx1, ty2); + + PUSH_TEXUV2(pn, t2x1, t2y1); + PUSH_TEXUV2(pn, t2x2, t2y1); + PUSH_TEXUV2(pn, t2x1, t2y2); + + PUSH_VERTEX(pn, x + w, y , 0); + PUSH_VERTEX(pn, x + w, y + h, 0); + PUSH_VERTEX(pn, x , y + h, 0); + + PUSH_TEXUV(pn, tx2, ty1); + PUSH_TEXUV(pn, tx2, ty2); + PUSH_TEXUV(pn, tx1, ty2); + + PUSH_TEXUV2(pn, t2x2, t2y1); + PUSH_TEXUV2(pn, t2x2, t2y2); + PUSH_TEXUV2(pn, t2x1, t2y2); + + for (i = 0; i < 6; i++) + { + PUSH_COLOR(pn, r, g, b, a); + } +} + +void +evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc, + Evas_GL_Texture *tex, + int npoints, + RGBA_Map_Point *p, + int clip, int cx, int cy, int cw, int ch, + int r, int g, int b, int a, + Eina_Bool smooth, Eina_Bool tex_only, + Evas_Colorspace cspace) +{ + int pnum, nv, nc, nu, nu2, nu3, nt, i; + const int points[6] = { 0, 1, 2, 0, 2, 3 }; + int x = 0, y = 0, w = 0, h = 0, px = 0, py = 0; + GLfloat tx[4], ty[4], t2x[4], t2y[4]; + Eina_Bool blend = 1; + DATA32 cmul; + GLuint prog = gc->shared->shader[SHADER_IMG].prog; + Eina_Bool utexture = EINA_FALSE; + Eina_Bool uvtexture = EINA_FALSE; + int pn = 0; + int flat = 0; + + if (!tex->alpha) blend = 0; + if (a < 255) blend = 1; + if (npoints != 4) + { + // FIXME: nash - you didn't fix this for n points. its still all + // 4 point stuff!!! grrrr. + abort(); + } + if ((A_VAL(&(p[0].col)) < 0xff) || (A_VAL(&(p[1].col)) < 0xff) || + (A_VAL(&(p[2].col)) < 0xff) || (A_VAL(&(p[3].col)) < 0xff)) + blend = 1; + + if ((p[0].z == p[1].z) && (p[1].z == p[2].z) && (p[2].z == p[3].z)) + flat = 1; + + if (!clip) cx = cy = cw = ch = 0; + + if (!flat) + { + if (p[0].foc <= 0) flat = 1; + } + + switch (cspace) + { + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, + SHADER_YUV_NOMUL, SHADER_YUV)].prog; + utexture = EINA_TRUE; + break; + case EVAS_COLORSPACE_YCBCR422601_PL: + prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, + SHADER_YUY2_NOMUL, SHADER_YUY2)].prog; + uvtexture = EINA_TRUE; + break; + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, + SHADER_NV12_NOMUL, SHADER_NV12)].prog; + uvtexture = EINA_TRUE; + break; + + default: + if (tex_only) + { + if (tex->pt->dyn.img) + { + prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, + SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog; + } + else + { + prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, + SHADER_TEX_NOMUL, SHADER_TEX)].prog; + } + } + else + { + if (tex->gc->shared->info.bgra) + { + prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, + SHADER_IMG_BGRA_NOMUL, + SHADER_IMG_BGRA)].prog; + } + else + { + prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, + SHADER_IMG_NOMUL, + SHADER_IMG)].prog; + } + } + } + + x = w = (p[0].x >> FP); + y = h = (p[0].y >> FP); + for (i = 0; i < 4; i++) + { + tx[i] = ((double)(tex->x) + (((double)p[i].u) / FP1)) / + (double)tex->pt->w; + ty[i] = ((double)(tex->y) + (((double)p[i].v) / FP1)) / + (double)tex->pt->h; + px = (p[i].x >> FP); + if (px < x) x = px; + else if (px > w) w = px; + py = (p[i].y >> FP); + if (py < y) y = py; + else if (py > h) h = py; + if (utexture) + { + t2x[i] = ((((double)p[i].u / 2) / FP1)) / (double)tex->ptu->w; + t2y[i] = ((((double)p[i].v / 2) / FP1)) / (double)tex->ptu->h; + } + else if (uvtexture) + { + t2x[i] = ((((double)p[i].u / 2) / FP1)) / (double)tex->ptuv->w; + t2y[i] = ((((double)p[i].v / 2) / FP1)) / (double)tex->ptuv->h; + } + } + w = w - x; + h = h - y; + + if (clip) + { + int nx = x, ny = y, nw = w, nh = h; + + RECTS_CLIP_TO_RECT(nx, ny, nw, nh, cx, cy, cw, ch); + if ((nx == x) && (ny == y) && (nw == w) && (nh == h)) + { + clip = 0; cx = 0; cy = 0; cw = 0; ch = 0; + } + x = nx; y = nw; w = nw; h = nh; + } + + if (!flat) + { + shader_array_flush(gc); + gc->foc = p[0].foc >> FP; + gc->z0 = p[0].z0 >> FP; + gc->px = p[0].px >> FP; + gc->py = p[0].py >> FP; + gc->change.size = 1; + _evas_gl_common_viewport_set(gc); + } + + pn = _evas_gl_common_context_push(RTYPE_MAP, + gc, tex, NULL, + prog, + x, y, w, h, + blend, + smooth, + clip, cx, cy, cw, ch); + gc->pipe[pn].region.type = RTYPE_MAP; + gc->pipe[pn].shader.cur_tex = tex->pt->texture; + if (utexture) + { + gc->pipe[pn].shader.cur_texu = tex->ptu->texture; + gc->pipe[pn].shader.cur_texu_dyn = tex->ptu->dyn.img; + gc->pipe[pn].shader.cur_texv = tex->ptv->texture; + gc->pipe[pn].shader.cur_texv_dyn = tex->ptv->dyn.img; + } + else if (uvtexture) + { + gc->pipe[pn].shader.cur_texu = tex->ptuv->texture; + gc->pipe[pn].shader.cur_texu_dyn = tex->ptuv->dyn.img; + } + gc->pipe[pn].shader.cur_prog = prog; + gc->pipe[pn].shader.smooth = smooth; + gc->pipe[pn].shader.blend = blend; + gc->pipe[pn].shader.render_op = gc->dc->render_op; + gc->pipe[pn].shader.clip = clip; + gc->pipe[pn].shader.cx = cx; + gc->pipe[pn].shader.cy = cy; + gc->pipe[pn].shader.cw = cw; + gc->pipe[pn].shader.ch = ch; + gc->pipe[pn].array.line = 0; + gc->pipe[pn].array.use_vertex = 1; + gc->pipe[pn].array.use_color = 1; + gc->pipe[pn].array.use_texuv = 1; + gc->pipe[pn].array.use_texuv2 = (utexture || uvtexture) ? 1 : 0; + gc->pipe[pn].array.use_texuv3 = (utexture) ? 1 : 0; + + pipe_region_expand(gc, pn, x, y, w, h); + + pnum = gc->pipe[pn].array.num; + nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nu2 = pnum * 2; + nu2 = pnum * 2; nu3 = pnum * 2; nt = pnum * 4; + gc->pipe[pn].array.num += 6; + array_alloc(gc, pn); + + if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert)) + { + for (i = 0; i < 4; i++) + { + ty[i] = 1.0 - ty[i]; + if (utexture || uvtexture) + t2y[i] = 1.0 - t2y[i]; + } + } + + cmul = ARGB_JOIN(a, r, g, b); + for (i = 0; i < 6; i++) + { + DATA32 cl = MUL4_SYM(cmul, p[points[i]].col); + if (flat) + { + PUSH_VERTEX(pn, + (p[points[i]].x >> FP), + (p[points[i]].y >> FP), + 0); + } + else + { + PUSH_VERTEX(pn, + (p[points[i]].fx) + gc->shared->ax, + (p[points[i]].fy) + gc->shared->ay, + (p[points[i]].fz) + + (gc->shared->foc - gc->shared->z0)); + } + PUSH_TEXUV(pn, + tx[points[i]], + ty[points[i]]); + if (utexture) + { + PUSH_TEXUV2(pn, + t2x[points[i]], + t2y[points[i]]); + PUSH_TEXUV3(pn, + t2x[points[i]], + t2y[points[i]]); + } + else if (uvtexture) + { + PUSH_TEXUV2(pn, + t2x[points[i]], + t2y[points[i]]); + } + + PUSH_COLOR(pn, + R_VAL(&cl), + G_VAL(&cl), + B_VAL(&cl), + A_VAL(&cl)); + } + if (!flat) + { + shader_array_flush(gc); + gc->foc = 0; + gc->z0 = 0; + gc->px = 0; + gc->py = 0; + gc->change.size = 1; + _evas_gl_common_viewport_set(gc); + } +} + +void +evas_gl_common_context_flush(Evas_Engine_GL_Context *gc) +{ + shader_array_flush(gc); +} + +static void +scissor_rot(Evas_Engine_GL_Context *gc __UNUSED__, + int rot, int gw, int gh, int cx, int cy, int cw, int ch) +{ + switch (rot) + { + case 0: // UP this way: ^ + glScissor(cx, cy, cw, ch); + break; + case 90: // UP this way: < + glScissor(gh - (cy + ch), cx, ch, cw); + break; + case 180: // UP this way: v + glScissor(gw - (cx + cw), gh - (cy + ch), cw, ch); + break; + case 270: // UP this way: > + glScissor(cy, gw - (cx + cw), ch, cw); + break; + default: // assume up is up + glScissor(cx, cy, cw, ch); + break; + } +} + +static void +shader_array_flush(Evas_Engine_GL_Context *gc) +{ + int i, gw, gh, setclip, cy, fbo = 0, done = 0; + + if (!gc->havestuff) return; + gw = gc->w; + gh = gc->h; + if (!((gc->pipe[0].shader.surface == gc->def_surface) || + (!gc->pipe[0].shader.surface))) + { + gw = gc->pipe[0].shader.surface->w; + gh = gc->pipe[0].shader.surface->h; + fbo = 1; + } + for (i = 0; i < gc->shared->info.tune.pipes.max; i++) + { + if (gc->pipe[i].array.num <= 0) break; + setclip = 0; + done++; + gc->flushnum++; + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + if (gc->pipe[i].shader.cur_prog != gc->state.current.cur_prog) + { + glUseProgram(gc->pipe[i].shader.cur_prog); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + + if (gc->pipe[i].shader.cur_tex != gc->state.current.cur_tex) + { +#if 0 + if (gc->pipe[i].shader.cur_tex) + { + glEnable(GL_TEXTURE_2D); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + { + glDisable(GL_TEXTURE_2D); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } +#endif + glActiveTexture(GL_TEXTURE0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_tex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + if (gc->pipe[i].array.im) + { +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (gc->pipe[i].array.im->tex->pt->dyn.img) + { + secsym_glEGLImageTargetTexture2DOES + (GL_TEXTURE_2D, gc->pipe[i].array.im->tex->pt->dyn.img); + } + else +#endif + { + if (!gc->pipe[i].array.im->native.loose) + { + if (gc->pipe[i].array.im->native.func.bind) + gc->pipe[i].array.im->native.func.bind(gc->pipe[i].array.im->native.func.data, + gc->pipe[i].array.im); + } + } + } + if (gc->pipe[i].shader.render_op != gc->state.current.render_op) + { + switch (gc->pipe[i].shader.render_op) + { + case EVAS_RENDER_BLEND: /**< default op: d = d*(1-sa) + s */ + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + break; + case EVAS_RENDER_COPY: /**< d = s */ + gc->pipe[i].shader.blend = 0; + glBlendFunc(GL_ONE, GL_ONE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + break; + // FIXME: fix blend funcs below! + case EVAS_RENDER_BLEND_REL: /**< d = d*(1 - sa) + s*da */ + case EVAS_RENDER_COPY_REL: /**< d = s*da */ + case EVAS_RENDER_ADD: /**< d = d + s */ + case EVAS_RENDER_ADD_REL: /**< d = d + s*da */ + case EVAS_RENDER_SUB: /**< d = d - s */ + case EVAS_RENDER_SUB_REL: /**< d = d - s*da */ + case EVAS_RENDER_TINT: /**< d = d*s + d*(1 - sa) + s*(1 - da) */ + case EVAS_RENDER_TINT_REL: /**< d = d*(1 - sa + s) */ + case EVAS_RENDER_MASK: /**< d = d*sa */ + case EVAS_RENDER_MUL: /**< d = d*s */ + default: + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + break; + } + } + if (gc->pipe[i].shader.blend != gc->state.current.blend) + { + if (gc->pipe[i].shader.blend) + { + glEnable(GL_BLEND); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + { + glDisable(GL_BLEND); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + } + if ((gc->pipe[i].shader.smooth != gc->state.current.smooth) || + (gc->pipe[i].shader.cur_tex != gc->state.current.cur_tex)) + { + if (gc->pipe[i].shader.smooth) + { +#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT + if (shared->info.anisotropic > 0.0) + { + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, shared->info.anisotropic); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } +#endif + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + { +#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT + if (shared->info.anisotropic > 0.0) + { + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } +#endif + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + } + if (gc->pipe[i].shader.clip != gc->state.current.clip) + { + + if (gc->pipe[i].shader.clip) + { + cy = gh - gc->pipe[i].shader.cy - gc->pipe[i].shader.ch; + if (fbo) cy = gc->pipe[i].shader.cy; + glEnable(GL_SCISSOR_TEST); + if (!fbo) + scissor_rot(gc, gc->rot, gw, gh, + gc->pipe[i].shader.cx, + cy, + gc->pipe[i].shader.cw, + gc->pipe[i].shader.ch); + else + glScissor(gc->pipe[i].shader.cx, cy, + gc->pipe[i].shader.cw, gc->pipe[i].shader.ch); + setclip = 1; + } + else + { + glDisable(GL_SCISSOR_TEST); + glScissor(0, 0, 0, 0); + } + } + if ((gc->pipe[i].shader.clip) && (!setclip)) + { + if ((gc->pipe[i].shader.cx != gc->state.current.cx) || + (gc->pipe[i].shader.cy != gc->state.current.cy) || + (gc->pipe[i].shader.cw != gc->state.current.cw) || + (gc->pipe[i].shader.ch != gc->state.current.ch)) + { + cy = gh - gc->pipe[i].shader.cy - gc->pipe[i].shader.ch; + if (fbo) cy = gc->pipe[i].shader.cy; + if (!fbo) + scissor_rot(gc, gc->rot, gw, gh, + gc->pipe[i].shader.cx, + cy, + gc->pipe[i].shader.cw, + gc->pipe[i].shader.ch); + else + glScissor(gc->pipe[i].shader.cx, cy, + gc->pipe[i].shader.cw, gc->pipe[i].shader.ch); + } + } + + glVertexAttribPointer(SHAD_VERTEX, 3, GL_SHORT, GL_FALSE, 0, gc->pipe[i].array.vertex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glVertexAttribPointer(SHAD_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, 0, gc->pipe[i].array.color); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + if (gc->pipe[i].array.use_texuv) + { + glEnableVertexAttribArray(SHAD_TEXUV); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glVertexAttribPointer(SHAD_TEXUV, 2, GL_FLOAT, GL_FALSE, 0, gc->pipe[i].array.texuv); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + { + glDisableVertexAttribArray(SHAD_TEXUV); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + + if (gc->pipe[i].array.line) + { + glDisableVertexAttribArray(SHAD_TEXUV); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glDisableVertexAttribArray(SHAD_TEXUV2); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glDisableVertexAttribArray(SHAD_TEXUV3); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glDrawArrays(GL_LINES, 0, gc->pipe[i].array.num); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + { + if (gc->pipe[i].array.use_texm) + { + glEnableVertexAttribArray(SHAD_TEXM); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glVertexAttribPointer(SHAD_TEXM, 2, GL_FLOAT, GL_FALSE, 0, gc->pipe[i].array.texm); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glActiveTexture(GL_TEXTURE1); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texm); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glActiveTexture(GL_TEXTURE0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + { + glDisableVertexAttribArray(SHAD_TEXM); + } + if ((gc->pipe[i].array.use_texuv2) && (gc->pipe[i].array.use_texuv3)) + { + glEnableVertexAttribArray(SHAD_TEXUV2); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glEnableVertexAttribArray(SHAD_TEXUV3); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glVertexAttribPointer(SHAD_TEXUV2, 2, GL_FLOAT, GL_FALSE, 0, gc->pipe[i].array.texuv2); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glVertexAttribPointer(SHAD_TEXUV3, 2, GL_FLOAT, GL_FALSE, 0, gc->pipe[i].array.texuv3); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + glActiveTexture(GL_TEXTURE1); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (gc->pipe[i].shader.cur_texu_dyn) + secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn); +#endif + + glActiveTexture(GL_TEXTURE2); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texv); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (gc->pipe[i].shader.cur_texv_dyn) + secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texv_dyn); +#endif + glActiveTexture(GL_TEXTURE0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else if (gc->pipe[i].array.use_texuv2) + { + glEnableVertexAttribArray(SHAD_TEXUV2); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glVertexAttribPointer(SHAD_TEXUV2, 2, GL_FLOAT, GL_FALSE, 0, gc->pipe[i].array.texuv2); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + glActiveTexture(GL_TEXTURE1); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (gc->pipe[i].shader.cur_texu_dyn) + secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn); +#endif + glActiveTexture(GL_TEXTURE0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + { + glDisableVertexAttribArray(SHAD_TEXUV2); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glDisableVertexAttribArray(SHAD_TEXUV3); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + if (dbgflushnum) + { + const char *types[6] = + {"----", "RECT", "IMAG", "FONT", "YUV-", "MAP"}; + printf(" DRAW#%3i %4i -> %p[%4ix%4i] @ %4ix%4i -{ tex %4i type %s }-\n", + i, + gc->pipe[i].array.num / 6, + gc->pipe[0].shader.surface, + gc->pipe[0].shader.surface->w, + gc->pipe[0].shader.surface->h, + gw, gh, + gc->pipe[i].shader.cur_tex, + types[gc->pipe[i].region.type] + ); + } + glDrawArrays(GL_TRIANGLES, 0, gc->pipe[i].array.num); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + if (gc->pipe[i].array.im) + { + if (!gc->pipe[i].array.im->native.loose) + { + if (gc->pipe[i].array.im->native.func.unbind) + gc->pipe[i].array.im->native.func.unbind(gc->pipe[i].array.im->native.func.data, + gc->pipe[i].array.im); + } + gc->pipe[i].array.im = NULL; + } + + gc->state.current.cur_prog = gc->pipe[i].shader.cur_prog; + gc->state.current.cur_tex = gc->pipe[i].shader.cur_tex; + gc->state.current.render_op = gc->pipe[i].shader.render_op; + gc->state.current.cx = gc->pipe[i].shader.cx; + gc->state.current.cy = gc->pipe[i].shader.cy; + gc->state.current.cw = gc->pipe[i].shader.cw; + gc->state.current.ch = gc->pipe[i].shader.ch; + gc->state.current.smooth = gc->pipe[i].shader.smooth; + gc->state.current.blend = gc->pipe[i].shader.blend; + gc->state.current.clip = gc->pipe[i].shader.clip; + + if (gc->pipe[i].array.vertex) free(gc->pipe[i].array.vertex); + if (gc->pipe[i].array.color) free(gc->pipe[i].array.color); + if (gc->pipe[i].array.texuv) free(gc->pipe[i].array.texuv); + if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm); + if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2); + if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3); + + gc->pipe[i].array.vertex = NULL; + gc->pipe[i].array.color = NULL; + gc->pipe[i].array.texuv = NULL; + gc->pipe[i].array.texm = NULL; + gc->pipe[i].array.texuv2 = NULL; + gc->pipe[i].array.texuv3 = NULL; + + gc->pipe[i].array.num = 0; + gc->pipe[i].array.alloc = 0; + + gc->pipe[i].region.x = 0; + gc->pipe[i].region.y = 0; + gc->pipe[i].region.w = 0; + gc->pipe[i].region.h = 0; + gc->pipe[i].region.type = 0; + } + gc->state.top_pipe = 0; + if (dbgflushnum) + { + if (done > 0) printf("DONE (pipes): %i\n", done); + } + gc->havestuff = EINA_FALSE; +} + +Eina_Bool +evas_gl_common_module_open(void) +{ + if (_evas_engine_GL_common_log_dom < 0) + _evas_engine_GL_common_log_dom = eina_log_domain_register + ("evas-gl_common", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_GL_common_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return EINA_FALSE; + } + return EINA_TRUE; +} + +void +evas_gl_common_module_close(void) +{ + if (_evas_engine_GL_common_log_dom < 0) return; + eina_log_domain_unregister(_evas_engine_GL_common_log_dom); + _evas_engine_GL_common_log_dom = -1; +} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_filter.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_filter.c new file mode 100644 index 0000000..a9d18d8 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_filter.c @@ -0,0 +1,181 @@ +#include "evas_gl_private.h" + +#if 0 // filtering disabled +void +evas_gl_common_filter_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, Evas_Filter_Info *filter) +{ + RGBA_Draw_Context *dc; + GLuint prog; + int r,g,b,a; + int nomul, bgra; + + dc = gc->dc; + + if (dc->mul.use) + { + a = (dc->mul.col >> 24) & 0xff; + r = (dc->mul.col >> 16) & 0xff; + g = (dc->mul.col >> 8 ) & 0xff; + b = (dc->mul.col ) & 0xff; + } + else + { + r = g = b = a = 255; + } + + nomul = (a == 255 && r == 255 && g == 255 && b == 255) ? 1 : 0; + bgra = (gc->shared->info.bgra) ? 1 : 0; + + /* FIXME: This should so be a table */ +#if 0 + if (filter->filter == EVAS_FILTER_BLUR) + { + if (bgra) + { + if (nomul) + prog = gc->shared->shader.filter_blur_bgra_nomul.prog; + else + prog = gc->shared->shader.filter_blur_bgra.prog; + } + else + { + if (a == 255 && r == 255 && g == 255 && b == 255) + prog = gc->shared->shader.filter_blur_nomul.prog; + else + prog = gc->shared->shader.filter_blur.prog; + } + } + else +#endif + if (filter->filter == EVAS_FILTER_INVERT) + { + if (bgra) + { + if (nomul) + prog = gc->shared->shader.filter_invert_bgra_nomul.prog; + else + prog = gc->shared->shader.filter_invert_bgra.prog; + } + else + { + if (a == 255 && r == 255 && g == 255 && b == 255) + prog = gc->shared->shader.filter_invert_nomul.prog; + else + prog = gc->shared->shader.filter_invert.prog; + } + } + else if (filter->filter == EVAS_FILTER_SEPIA) + { + if (bgra) + { + if (nomul) + prog = gc->shared->shader.filter_sepia_bgra_nomul.prog; + else + prog = gc->shared->shader.filter_sepia_bgra.prog; + } + else + { + if (nomul) + prog = gc->shared->shader.filter_sepia_nomul.prog; + else + prog = gc->shared->shader.filter_sepia.prog; + } + + } + else /*if (filter->filter == EVAS_FILTER_GREYSCALE)*/ + { + printf("BGRA: %s Nomul: %s\n",bgra?"true":"false",nomul?"nomul":"mul"); + if (bgra) + { + if (nomul) + prog = gc->shared->shader.filter_greyscale_bgra_nomul.prog; + else + prog = gc->shared->shader.filter_greyscale_bgra.prog; + } + else + { + if (nomul) + prog = gc->shared->shader.filter_greyscale_nomul.prog; + else + prog = gc->shared->shader.filter_greyscale.prog; + } + + } + + printf("Prog: %d %d %d\n",prog,im->w,im->h); + gc->filter_prog = prog; + evas_gl_common_image_update(gc, im); + evas_gl_common_context_image_push(gc, im->tex, 0, 0, im->w, im->h, + 0, 0, im->w, im->h, + r,g,b,a, + 1, im->tex_only); + gc->filter_prog = 0; +} + + +Filtered_Image * +evas_gl_common_image_filtered_get(Evas_GL_Image *im, uint8_t *key, size_t len) +{ + Filtered_Image *fi; + Eina_List *l; + + for (l = im->filtered ; l ; l = l->next) + { + fi = l->data; + if (fi->keylen != len) continue; + if (memcmp(key, fi->key, len) != 0) continue; + fi->ref ++; + return fi; + } + + return NULL; +} + +Filtered_Image * +evas_gl_common_image_filtered_save(Evas_GL_Image *im, Evas_GL_Image *fimage, + uint8_t *key, size_t keylen) +{ + Filtered_Image *fi; + Eina_List *l; + + for (l = im->filtered ; l ; l = l->next) + { + fi = l->data; + if (fi->keylen != keylen) continue; + if (memcmp(key, fi->key, keylen) != 0) continue; + + fi->image = (void *)fimage; + fi->ref ++; + return fi; + } + + fi = calloc(1,sizeof(Filtered_Image)); + if (!fi) return NULL; + + fi->keylen = keylen; + fi->key = malloc(keylen); + memcpy(fi->key, key, keylen); + fi->image = (void *)fimage; + fi->ref = 1; + + im->filtered = eina_list_prepend(im->filtered, fi); + + return fi; +} + +void +evas_gl_common_image_filtered_free(Evas_GL_Image *image, Filtered_Image *fi) +{ + fi->ref --; + if (fi->ref) return; + + free(fi->key); + evas_gl_common_image_free((void *)fi->image); + fi->image = NULL; + + image->filtered = eina_list_remove(image->filtered, fi); +} +#endif + + +/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_font.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_font.c new file mode 100644 index 0000000..e5f3a4a --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_font.c @@ -0,0 +1,203 @@ +#include "evas_gl_private.h" + +void * +evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg) +{ + Evas_Engine_GL_Context *gc = context; + Evas_GL_Texture *tex; + DATA8 *data; + int w, h, j, nw; + DATA8 *ndata; + int fh; + + if (fg->ext_dat) return fg->ext_dat; // FIXME: one engine at a time can do this :( + + w = fg->glyph_out->bitmap.width; + h = fg->glyph_out->bitmap.rows; + if ((w == 0) || (h == 0)) return NULL; + + data = fg->glyph_out->bitmap.buffer; + j = fg->glyph_out->bitmap.pitch; + if (j < w) j = w; + + nw = ((w + 3) / 4) * 4; + ndata = alloca(nw *h); + if (!ndata) return NULL; + if (fg->glyph_out->bitmap.num_grays == 256) + { + int x, y; + DATA8 *p1, *p2; + + for (y = 0; y < h; y++) + { + p1 = data + (j * y); + p2 = ndata + (nw * y); + for (x = 0; x < w; x++) + { + *p2 = *p1; + p1++; + p2++; + } + } + } + else if (fg->glyph_out->bitmap.num_grays == 0) + { + DATA8 *tmpbuf = NULL, *dp, *tp, bits; + int bi, bj, end; + const DATA8 bitrepl[2] = {0x0, 0xff}; + + tmpbuf = alloca(w); + if (tmpbuf) + { + int x, y; + DATA8 *p1, *p2; + + for (y = 0; y < h; y++) + { + p1 = tmpbuf; + p2 = ndata + (nw * y); + tp = tmpbuf; + dp = data + (y * fg->glyph_out->bitmap.pitch); + for (bi = 0; bi < w; bi += 8) + { + bits = *dp; + if ((w - bi) < 8) end = w - bi; + else end = 8; + for (bj = 0; bj < end; bj++) + { + *tp = bitrepl[(bits >> (7 - bj)) & 0x1]; + tp++; + } + dp++; + } + for (x = 0; x < w; x++) + { + *p2 = *p1; + p1++; + p2++; + } + } + } + } +// fh = h; + fh = fg->fi->max_h; + tex = evas_gl_common_texture_alpha_new(gc, ndata, w, h, fh); + tex->sx1 = ((double)(tex->x)) / (double)tex->pt->w; + tex->sy1 = ((double)(tex->y)) / (double)tex->pt->h; + tex->sx2 = ((double)(tex->x + tex->w)) / (double)tex->pt->w; + tex->sy2 = ((double)(tex->y + tex->h)) / (double)tex->pt->h; + return tex; +} + +void +evas_gl_font_texture_free(void *tex) +{ + if (!tex) return; + evas_gl_common_texture_free(tex); +} + +void +evas_gl_font_texture_draw(void *context, void *surface __UNUSED__, void *draw_context, RGBA_Font_Glyph *fg, int x, int y) +{ + Evas_Engine_GL_Context *gc = context; + RGBA_Draw_Context *dc = draw_context; + Evas_GL_Texture *tex; + Cutout_Rects *rects; + Cutout_Rect *rct; + int r, g, b, a; + double ssx, ssy, ssw, ssh; + int c, cx, cy, cw, ch; + int i; + int sx, sy, sw, sh; + + if (dc != gc->dc) return; + tex = fg->ext_dat; + if (!tex) return; + a = (dc->col.col >> 24) & 0xff; + if (a == 0) return; + r = (dc->col.col >> 16) & 0xff; + g = (dc->col.col >> 8 ) & 0xff; + b = (dc->col.col ) & 0xff; + sx = 0; sy = 0; sw = tex->w, sh = tex->h; + if ((!gc->dc->cutout.rects) || + ((gc->shared->info.tune.cutout.max > 0) && + (gc->dc->cutout.active > gc->shared->info.tune.cutout.max))) + { + if (gc->dc->clip.use) + { + int nx, ny, nw, nh; + + nx = x; ny = y; nw = tex->w; nh = tex->h; + RECTS_CLIP_TO_RECT(nx, ny, nw, nh, + gc->dc->clip.x, gc->dc->clip.y, + gc->dc->clip.w, gc->dc->clip.h); + if ((nw < 1) || (nh < 1)) return; + if ((nx == x) && (ny == y) && (nw == tex->w) && (nh == tex->h)) + { + evas_gl_common_context_font_push(gc, tex, + 0.0, 0.0, 0.0, 0.0, +// sx, sy, sw, sh, + x, y, tex->w, tex->h, + r, g, b, a); + return; + } + ssx = (double)sx + ((double)(sw * (nx - x)) / (double)(tex->w)); + ssy = (double)sy + ((double)(sh * (ny - y)) / (double)(tex->h)); + ssw = ((double)sw * (double)(nw)) / (double)(tex->w); + ssh = ((double)sh * (double)(nh)) / (double)(tex->h); + evas_gl_common_context_font_push(gc, tex, + ssx, ssy, ssw, ssh, + nx, ny, nw, nh, + r, g, b, a); + } + else + { + evas_gl_common_context_font_push(gc, tex, + 0.0, 0.0, 0.0, 0.0, +// sx, sy, sw, sh, + x, y, tex->w, tex->h, + r, g, b, a); + } + return; + } + /* save out clip info */ + c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h; + evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h); + evas_common_draw_context_clip_clip(gc->dc, x, y, tex->w, tex->h); + /* our clip is 0 size.. abort */ + if ((gc->dc->clip.w <= 0) || (gc->dc->clip.h <= 0)) + { + gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; + return; + } + rects = evas_common_draw_context_apply_cutouts(dc); + for (i = 0; i < rects->active; ++i) + { + int nx, ny, nw, nh; + + rct = rects->rects + i; + nx = x; ny = y; nw = tex->w; nh = tex->h; + RECTS_CLIP_TO_RECT(nx, ny, nw, nh, rct->x, rct->y, rct->w, rct->h); + if ((nw < 1) || (nh < 1)) continue; + if ((nx == x) && (ny == y) && (nw == tex->w) && (nh == tex->h)) + { + evas_gl_common_context_font_push(gc, tex, + 0.0, 0.0, 0.0, 0.0, +// sx, sy, sw, sh, + x, y, tex->w, tex->h, + r, g, b, a); + continue; + } + ssx = (double)sx + ((double)(sw * (nx - x)) / (double)(tex->w)); + ssy = (double)sy + ((double)(sh * (ny - y)) / (double)(tex->h)); + ssw = ((double)sw * (double)(nw)) / (double)(tex->w); + ssh = ((double)sh * (double)(nh)) / (double)(tex->h); + evas_gl_common_context_font_push(gc, tex, + ssx, ssy, ssw, ssh, + nx, ny, nw, nh, + r, g, b, a); + } + evas_common_draw_context_apply_clear_cutouts(rects); + /* restore clip info */ + gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; +} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_image.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_image.c new file mode 100644 index 0000000..1d4b1f8 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_image.c @@ -0,0 +1,968 @@ +#include "evas_gl_private.h" + +void +evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc) +{ + Eina_List *l; + Evas_GL_Image *im; + + EINA_LIST_FOREACH(gc->shared->images, l, im) + { + if (im->im) evas_cache_image_unload_data(&im->im->cache_entry); + if (im->tex) + { + if (!im->tex->pt->dyn.img) + { + evas_gl_common_texture_free(im->tex); + im->tex = NULL; + } + } + } +} + +static void +_evas_gl_image_cache_trim(Evas_Engine_GL_Context *gc) +{ + int size = evas_common_image_get_cache(); + + while (gc->shared->images_size > size) + { + Evas_GL_Image *im2; + Eina_List *l = NULL; + + EINA_LIST_REVERSE_FOREACH(gc->shared->images, l, im2) + { + if (im2->references == 0) + { + im2->cached = 0; + im2->gc->shared->images = + eina_list_remove_list(im2->gc->shared->images, l); + im2->gc->shared->images_size -= (im2->csize); + evas_gl_common_image_free(im2); + l = NULL; + break; + } + } + if ((gc->shared->images_size > size) && (l)) + { +// printf("EEK %i > %i, no 0 ref imgs\n", +// gc->shared->images_size, size); + break; + } + if (!gc->shared->images) + { +// printf("EEK %i > %i, no imgs\n", +// gc->shared->images_size, size); + break; + } + } +} + +static Eina_Bool +_evas_gl_image_cache_add(Evas_GL_Image *im) +{ + if (im->references == 0) + { + im->csize = im->w * im->h * 4; + im->gc->shared->images_size += im->csize; + _evas_gl_image_cache_trim(im->gc); + return EINA_TRUE; + } + else + { + im->gc->shared->images = eina_list_remove(im->gc->shared->images, im); + im->cached = 0; + } + return EINA_FALSE; +} + +void +evas_gl_common_image_ref(Evas_GL_Image *im) +{ + if (im->references == 0) + { + im->gc->shared->images_size -= (im->csize); + } + im->references++; +} + +void +evas_gl_common_image_unref(Evas_GL_Image *im) +{ + im->references--; + if (im->references == 0) + { + _evas_gl_image_cache_add(im); + } +} + +Evas_GL_Image * +evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error) +{ + Evas_GL_Image *im; + RGBA_Image *im_im; + Eina_List *l; + + im_im = evas_common_load_image_from_file(file, key, lo, error); + if (!im_im) return NULL; + + /* i'd LOVe to do this, but we can't because we load to load header + * to get image size to know if its too big or not! so this disallows + * us to know that - photocam thus suffers + if (((int)im_im->cache_entry.w > gc->shared->info.max_texture_size) || + ((int)im_im->cache_entry.h > gc->shared->info.max_texture_size)) + { + evas_cache_image_drop(&(im_im->cache_entry)); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return NULL; + } + */ + + // FIXME: keep unreffed shared images around + EINA_LIST_FOREACH(gc->shared->images, l, im) + { + if (im->im == im_im) + { +// why did i put this here? i think to free the rgba pixel data once a texture +// exists. +// evas_cache_image_drop(&(im_im->cache_entry)); + gc->shared->images = eina_list_remove_list(gc->shared->images, l); + gc->shared->images = eina_list_prepend(gc->shared->images, im); + evas_gl_common_image_ref(im); + *error = EVAS_LOAD_ERROR_NONE; + return im; + } + } + + im = calloc(1, sizeof(Evas_GL_Image)); + if (!im) + { + evas_cache_image_drop(&(im_im->cache_entry)); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return NULL; + } + im->references = 1; + im->im = im_im; + im->gc = gc; + im->cached = 1; + im->cs.space = EVAS_COLORSPACE_ARGB8888; + im->alpha = im->im->cache_entry.flags.alpha; + im->w = im->im->cache_entry.w; + im->h = im->im->cache_entry.h; + if (lo) im->load_opts = *lo; + gc->shared->images = eina_list_prepend(gc->shared->images, im); + return im; +} + +Evas_GL_Image * +evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace) +{ + Evas_GL_Image *im; + Eina_List *l; + + if (((int)w > gc->shared->info.max_texture_size) || + ((int)h > gc->shared->info.max_texture_size)) + return NULL; + + if (data) + { + EINA_LIST_FOREACH(gc->shared->images, l, im) + { + if (((void *)(im->im->image.data) == (void *)data) && + (im->im->cache_entry.w == w) && + (im->im->cache_entry.h == h)) + { + gc->shared->images = eina_list_remove_list(gc->shared->images, l); + gc->shared->images = eina_list_prepend(gc->shared->images, im); + evas_gl_common_image_ref(im); + return im; + } + } + } + im = calloc(1, sizeof(Evas_GL_Image)); + if (!im) return NULL; + im->references = 1; + im->im = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(), + w, h, data, alpha, cspace); + if (!im->im) + { + free(im); + return NULL; + } + im->gc = gc; + im->cs.space = cspace; + im->alpha = im->im->cache_entry.flags.alpha; + im->w = im->im->cache_entry.w; + im->h = im->im->cache_entry.h; + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + if (im->tex) evas_gl_common_texture_free(im->tex); + im->tex = NULL; + im->cs.data = data; + im->cs.no_free = 1; + break; + default: + abort(); + break; + } + return im; +} + +Evas_GL_Image * +evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace) +{ + Evas_GL_Image *im; + + if (((int)w > gc->shared->info.max_texture_size) || + ((int)h > gc->shared->info.max_texture_size)) + return NULL; + + im = calloc(1, sizeof(Evas_GL_Image)); + if (!im) return NULL; + im->references = 1; + im->im = (RGBA_Image *) evas_cache_image_copied_data(evas_common_image_cache_get(), + w, h, data, alpha, cspace); + if (!im->im) + { + free(im); + return NULL; + } + im->gc = gc; + im->cs.space = cspace; + im->alpha = im->im->cache_entry.flags.alpha; + im->w = im->im->cache_entry.w; + im->h = im->im->cache_entry.h; + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + if (im->tex) evas_gl_common_texture_free(im->tex); + im->tex = NULL; + im->cs.no_free = 0; + if (im->im->cache_entry.h > 0) + im->cs.data = calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2); + if ((data) && (im->cs.data)) + memcpy(im->cs.data, data, im->im->cache_entry.h * sizeof(unsigned char *) * 2); + break; + default: + abort(); + break; + } + return im; +} + +Evas_GL_Image * +evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace) +{ + Evas_GL_Image *im; + + if (((int)w > gc->shared->info.max_texture_size) || + ((int)h > gc->shared->info.max_texture_size)) + return NULL; + + im = calloc(1, sizeof(Evas_GL_Image)); + if (!im) return NULL; + im->references = 1; + im->im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + if (!im->im) + { + free(im); + return NULL; + } + im->gc = gc; + im->im->cache_entry.flags.alpha = alpha ? 1 : 0; + im->cs.space = cspace; + im->alpha = im->im->cache_entry.flags.alpha; + im->im->cache_entry.w = w; + im->im->cache_entry.h = h; + im->w = im->im->cache_entry.w; + im->h = im->im->cache_entry.h; + evas_cache_image_colorspace(&im->im->cache_entry, cspace); + im->im = (RGBA_Image *)evas_cache_image_size_set(&im->im->cache_entry, w, h); + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: +// if (im->tex) evas_gl_common_texture_free(im->tex); + im->tex = NULL; + im->cs.no_free = 0; + if (im->im->cache_entry.h > 0) + im->cs.data = calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2); + break; + default: + abort(); + break; + } + return im; +} + +Evas_GL_Image * +evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha) +{ + if (!im) return NULL; + if (im->alpha == alpha) return im; + im->alpha = alpha; + if (!im->im) return im; + im->im->cache_entry.flags.alpha = alpha ? 1 : 0; + if (im->tex) + { + evas_gl_common_texture_free(im->tex); + im->tex = NULL; + } + if (!im->tex) + im->tex = evas_gl_common_texture_new(im->gc, im->im); + return im; +} + +void +evas_gl_common_image_native_enable(Evas_GL_Image *im) +{ + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + im->cs.data = NULL; + } + im->cs.no_free = 0; + if (im->cached) + { + if (im->references == 0) + im->gc->shared->images_size -= (im->csize); + im->gc->shared->images = eina_list_remove(im->gc->shared->images, im); + im->cached = 0; + } + if (im->im) + { + evas_cache_image_drop(&im->im->cache_entry); + im->im = NULL; + } + if (im->tex) + { + evas_gl_common_texture_free(im->tex); + im->tex = NULL; + } + + im->cs.space = EVAS_COLORSPACE_ARGB8888; + im->tex = evas_gl_common_texture_native_new(im->gc, im->w, im->h, im->alpha, im); + im->tex_only = 1; +} + +void +evas_gl_common_image_native_disable(Evas_GL_Image *im) +{ + if (im->im) + { + evas_cache_image_drop(&im->im->cache_entry); + im->im = NULL; + } + if (im->tex) + { + evas_gl_common_texture_free(im->tex); + im->tex = NULL; + } + im->tex_only = 0; + + im->im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + im->im->cache_entry.flags.alpha = im->alpha; + im->cs.space = EVAS_COLORSPACE_ARGB8888; + evas_cache_image_colorspace(&im->im->cache_entry, im->cs.space); + im->im = (RGBA_Image *)evas_cache_image_size_set(&im->im->cache_entry, im->w, im->h); + if (!im->tex) + im->tex = evas_gl_common_texture_new(im->gc, im->im); +} + +void +evas_gl_common_image_scale_hint_set(Evas_GL_Image *im, int hint) +{ + im->scale_hint = hint; + // FIXME: take advantage of this even in gl (eg if image is + // 1600x1200 but we always use it at 800x600 or even less - drop + // the texture res down for "non dynamic" stuff to save memory) +} + +void +evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint) +{ + if (im->content_hint == hint) return; + im->content_hint = hint; + if (!im->gc) return; + if (!im->gc->shared->info.sec_image_map) return; + if (!im->gc->shared->info.bgra) return; + // does not handle yuv yet. + if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return; + if (im->content_hint == EVAS_IMAGE_CONTENT_HINT_DYNAMIC) + { + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + im->cs.data = NULL; + } + im->cs.no_free = 0; + if (im->cached) + { + if (im->references == 0) + im->gc->shared->images_size -= im->csize; + im->gc->shared->images = eina_list_remove(im->gc->shared->images, im); + im->cached = 0; + } + if (im->im) + { + evas_cache_image_drop(&im->im->cache_entry); + im->im = NULL; + } + if (im->tex) + { + evas_gl_common_texture_free(im->tex); + im->tex = NULL; + } + im->tex = evas_gl_common_texture_dynamic_new(im->gc, im); + im->tex_only = 1; + } + else + { + if (im->im) + { + evas_cache_image_drop(&im->im->cache_entry); + im->im = NULL; + } + if (im->tex) + { + evas_gl_common_texture_free(im->tex); + im->tex = NULL; + } + im->tex_only = 0; + + im->im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + im->im->cache_entry.flags.alpha = im->alpha; + im->cs.space = EVAS_COLORSPACE_ARGB8888; + evas_cache_image_colorspace(&im->im->cache_entry, im->cs.space); + im->im = (RGBA_Image *)evas_cache_image_size_set(&im->im->cache_entry, im->w, im->h); + if (!im->tex) + im->tex = evas_gl_common_texture_new(im->gc, im->im); + } +} + +void +evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc) +{ + _evas_gl_image_cache_trim(gc); +} + +void +evas_gl_common_image_free(Evas_GL_Image *im) +{ +#if 0 // filtering disabled + Filtered_Image *fi; +#endif + + evas_gl_common_context_flush(im->gc); + im->references--; + if (im->references > 0) return; + + if (im->native.func.free) + im->native.func.free(im->native.func.data, im); + + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + if (im->cached) + { + if (_evas_gl_image_cache_add(im)) return; + } + if (im->im) evas_cache_image_drop(&im->im->cache_entry); + if (im->tex) evas_gl_common_texture_free(im->tex); + +#if 0 // filtering disabled + EINA_LIST_FREE(im->filtered, fi) + { + free(fi->key); + evas_gl_common_image_free((Evas_GL_Image *)fi->image); + free(fi); + } +#endif + + free(im); +} + +Evas_GL_Image * +evas_gl_common_image_surface_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha) +{ + Evas_GL_Image *im; + + if (((int)w > gc->shared->info.max_texture_size) || + ((int)h > gc->shared->info.max_texture_size)) + return NULL; + + im = calloc(1, sizeof(Evas_GL_Image)); + if (!im) return NULL; + im->references = 1; + im->gc = gc; + im->cs.space = EVAS_COLORSPACE_ARGB8888; + im->alpha = alpha; + im->w = w; + im->h = h; + im->tex = evas_gl_common_texture_render_new(gc, w, h, alpha); + im->tex_only = 1; + return im; +} + +void +evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h) +{ + if ((w == 0) && (h == 0) && (x == 0) && (y == 0)) + { + w = im->w; + h = im->h; + } + if (im->im) + { + im->im = (RGBA_Image *)evas_cache_image_dirty(&im->im->cache_entry, x, y, w, h); + } + im->dirty = 1; +} + +void +evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im) +{ + Image_Entry *ie; + if (!im->im) return; + ie = (Image_Entry *)(im->im); +/* + if ((im->cs.space == EVAS_COLORSPACE_YCBCR422P601_PL) || + (im->cs.space == EVAS_COLORSPACE_YCBCR422P709_PL)) + { + // SOFTWARE convert. do multi texture later + if ((im->cs.data) && (*((unsigned char **)im->cs.data))) + { + if (im->dirty || !im->im->image.data) + { + free(im->im->image.data); + im->im->image.data = malloc(im->im->cache_entry.w * im->im->cache_entry.h * sizeof(DATA32)); + if (im->im->image.data) + evas_common_convert_yuv_420p_601_rgba(im->cs.data, + (void *)im->im->image.data, + im->im->cache_entry.w, im->im->cache_entry.h); + } + } + space = EVAS_COLORSPACE_ARGB8888; + } + else + */ + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if ((im->tex) && + ((im->dirty) || (ie->flags.animated))) + { + evas_cache_image_load_data(&im->im->cache_entry); + evas_gl_common_texture_update(im->tex, im->im); + evas_cache_image_unload_data(&im->im->cache_entry); + } + if (!im->tex) + { + evas_cache_image_load_data(&im->im->cache_entry); + im->tex = evas_gl_common_texture_new(gc, im->im); + evas_cache_image_unload_data(&im->im->cache_entry); + } + im->dirty = 0; + if (!im->tex) return; + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + if ((im->tex) && (im->dirty)) + { + evas_gl_common_texture_yuv_update(im->tex, im->cs.data, + im->im->cache_entry.w, + im->im->cache_entry.h); + im->dirty = 0; + } + if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) + { + im->tex = evas_gl_common_texture_yuv_new(gc, im->cs.data, + im->im->cache_entry.w, + im->im->cache_entry.h); + im->dirty = 0; + } + if (!im->tex) return; + break; + case EVAS_COLORSPACE_YCBCR422601_PL: + if ((im->tex) && (im->dirty)) + { + evas_gl_common_texture_yuy2_update(im->tex, im->cs.data, + im->im->cache_entry.w, + im->im->cache_entry.h); + im->dirty = 0; + } + if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) + { + im->tex = evas_gl_common_texture_yuy2_new(gc, im->cs.data, + im->im->cache_entry.w, + im->im->cache_entry.h); + im->dirty = 0; + } + if (!im->tex) return; + break; + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + if ((im->tex) && (im->dirty)) + { + evas_gl_common_texture_nv12_update(im->tex, im->cs.data, + im->im->cache_entry.w, + im->im->cache_entry.h); + im->dirty = 0; + } + if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) + { + im->tex = evas_gl_common_texture_nv12_new(gc, im->cs.data, + im->im->cache_entry.w, + im->im->cache_entry.h); + im->dirty = 0; + } + if (!im->tex) return; + break; + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + if ((im->tex) && (im->dirty)) + { + evas_gl_common_texture_nv12tiled_update(im->tex, im->cs.data, + im->im->cache_entry.w, + im->im->cache_entry.h); + im->dirty = 0; + } + if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) + { + im->tex = evas_gl_common_texture_nv12tiled_new(gc, im->cs.data, + im->im->cache_entry.w, + im->im->cache_entry.h); + im->dirty = 0; + } + if (!im->tex) return; + break; + default: + ERR("unhandled img format colorspace=%d", im->cs.space); + break; + } +} + +void +evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, + int npoints, RGBA_Map_Point *p, int smooth, int level __UNUSED__) +{ + RGBA_Draw_Context *dc; + int r, g, b, a; + int c, cx, cy, cw, ch; + + dc = gc->dc; + if (dc->mul.use) + { + a = (dc->mul.col >> 24) & 0xff; + r = (dc->mul.col >> 16) & 0xff; + g = (dc->mul.col >> 8 ) & 0xff; + b = (dc->mul.col ) & 0xff; + } + else + { + r = g = b = a = 255; + } + + evas_gl_common_image_update(gc, im); + + c = gc->dc->clip.use; + cx = gc->dc->clip.x; cy = gc->dc->clip.y; + cw = gc->dc->clip.w; ch = gc->dc->clip.h; + im->tex->im = im; + + evas_gl_common_context_image_map_push(gc, im->tex, npoints, p, + c, cx, cy, cw, ch, + r, g, b, a, smooth, im->tex_only, + im->cs.space); +} + +void +evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth) +{ + RGBA_Draw_Context *dc; + Evas_GL_Image *imm; + int r, g, b, a; + double ssx, ssy, ssw, ssh; + double mssx, mssy, mssw, mssh; + Cutout_Rects *rects; + Cutout_Rect *rct; + int c, cx, cy, cw, ch; + int i; + int yuv = 0; + int yuy2 = 0; + int nv12 = 0; + + if (sw < 1) sw = 1; + if (sh < 1) sh = 1; + dc = gc->dc; + imm = (Evas_GL_Image *)dc->mask.mask; + if (dc->mul.use) + { + a = (dc->mul.col >> 24) & 0xff; + r = (dc->mul.col >> 16) & 0xff; + g = (dc->mul.col >> 8 ) & 0xff; + b = (dc->mul.col ) & 0xff; + } + else + { + r = g = b = a = 255; + } + + evas_gl_common_image_update(gc, im); + if (!im->tex) + { + evas_gl_common_rect_draw(gc, dx, dy, dw, dh); + return; + } + if (imm) + { + evas_gl_common_image_update(gc, imm); + if (!imm->tex) imm = NULL; /* Turn of mask on error */ + } + + if ((im->cs.space == EVAS_COLORSPACE_YCBCR422P601_PL) || + (im->cs.space == EVAS_COLORSPACE_YCBCR422P709_PL)) + yuv = 1; + if (im->cs.space == EVAS_COLORSPACE_YCBCR422601_PL) + yuy2 = 1; + if ((im->cs.space == EVAS_COLORSPACE_YCBCR420NV12601_PL) || + (im->cs.space == EVAS_COLORSPACE_YCBCR420TM12601_PL)) + nv12 = 1; + + im->tex->im = im; + if (imm) imm->tex->im = imm; + if ((!gc->dc->cutout.rects) || + ((gc->shared->info.tune.cutout.max > 0) && + (gc->dc->cutout.active > gc->shared->info.tune.cutout.max))) + { + if (gc->dc->clip.use) + { + int nx, ny, nw, nh; + double scalex,scaley; + + nx = dx; ny = dy; nw = dw; nh = dh; + RECTS_CLIP_TO_RECT(nx, ny, nw, nh, + gc->dc->clip.x, gc->dc->clip.y, + gc->dc->clip.w, gc->dc->clip.h); + if ((nw < 1) || (nh < 1)) return; + if ((!imm) && (nx == dx) && (ny == dy) && (nw == dw) && (nh == dh)) + { + if (yuv) + evas_gl_common_context_yuv_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth); + else if (yuy2) + evas_gl_common_context_yuy2_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth); + else if (nv12) + evas_gl_common_context_nv12_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth); + else + + evas_gl_common_context_image_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth, im->tex_only); + return; + } + + ssx = (double)sx + ((double)(sw * (nx - dx)) / (double)(dw)); + ssy = (double)sy + ((double)(sh * (ny - dy)) / (double)(dh)); + ssw = ((double)sw * (double)(nw)) / (double)(dw); + ssh = ((double)sh * (double)(nh)) / (double)(dh); + if (imm) + { + /* Correct ones here */ + scalex = imm->w / (double)dc->mask.w; + scaley = imm->h / (double)dc->mask.h; + mssx = scalex * (nx - dc->mask.x); + mssy = scaley * (ny - dc->mask.y); + mssw = scalex * nw; + mssh = scaley * nh; + + /* No yuv + imm I'm afraid */ + evas_gl_common_context_image_mask_push(gc, + im->tex, + imm->tex, + ssx, ssy, ssw, ssh, + mssx, mssy, mssw, mssh, + //dc->mask.x, dc->mask.y, dc->mask.w, dc->mask.h, + nx, ny, nw, nh, + r, g, b, a, + smooth); + } + else if (yuv) + evas_gl_common_context_yuv_push(gc, + im->tex, + ssx, ssy, ssw, ssh, + nx, ny, nw, nh, + r, g, b, a, + smooth); + else if (yuy2) + evas_gl_common_context_yuy2_push(gc, + im->tex, + ssx, ssy, ssw, ssh, + nx, ny, nw, nh, + r, g, b, a, + smooth); + else if (nv12) + evas_gl_common_context_nv12_push(gc, + im->tex, + ssx, ssy, ssw, ssh, + nx, ny, nw, nh, + r, g, b, a, + smooth); + else + evas_gl_common_context_image_push(gc, + im->tex, + ssx, ssy, ssw, ssh, + nx, ny, nw, nh, + r, g, b, a, + smooth, im->tex_only); + } + else + { + if (yuv) + evas_gl_common_context_yuv_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth); + else if (yuy2) + evas_gl_common_context_yuy2_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth); + else if (nv12) + evas_gl_common_context_nv12_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth); + else + evas_gl_common_context_image_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth, im->tex_only); + } + return; + } + + /* save out clip info */ + c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h; + evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h); + evas_common_draw_context_clip_clip(gc->dc, dx, dy, dw, dh); + /* our clip is 0 size.. abort */ + if ((gc->dc->clip.w <= 0) || (gc->dc->clip.h <= 0)) + { + gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; + return; + } + rects = evas_common_draw_context_apply_cutouts(dc); + for (i = 0; i < rects->active; ++i) + { + int nx, ny, nw, nh; + + rct = rects->rects + i; + nx = dx; ny = dy; nw = dw; nh = dh; + RECTS_CLIP_TO_RECT(nx, ny, nw, nh, rct->x, rct->y, rct->w, rct->h); + if ((nw < 1) || (nh < 1)) continue; + if ((nx == dx) && (ny == dy) && (nw == dw) && (nh == dh)) + { + if (yuv) + evas_gl_common_context_yuv_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth); + else if (yuy2) + evas_gl_common_context_yuy2_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth); + else if (nv12) + evas_gl_common_context_nv12_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth); + else + evas_gl_common_context_image_push(gc, + im->tex, + sx, sy, sw, sh, + dx, dy, dw, dh, + r, g, b, a, + smooth, im->tex_only); + continue; + } + ssx = (double)sx + ((double)(sw * (nx - dx)) / (double)(dw)); + ssy = (double)sy + ((double)(sh * (ny - dy)) / (double)(dh)); + ssw = ((double)sw * (double)(nw)) / (double)(dw); + ssh = ((double)sh * (double)(nh)) / (double)(dh); + if (yuv) + evas_gl_common_context_yuv_push(gc, + im->tex, + ssx, ssy, ssw, ssh, + nx, ny, nw, nh, + r, g, b, a, + smooth); + else if (yuy2) + evas_gl_common_context_yuy2_push(gc, + im->tex, + ssx, ssy, ssw, ssh, + nx, ny, nw, nh, + r, g, b, a, + smooth); + else if (nv12) + evas_gl_common_context_nv12_push(gc, + im->tex, + ssx, ssy, ssw, ssh, + nx, ny, nw, nh, + r, g, b, a, + smooth); + else + evas_gl_common_context_image_push(gc, + im->tex, + ssx, ssy, ssw, ssh, + nx, ny, nw, nh, + r, g, b, a, + smooth, im->tex_only); + } + evas_common_draw_context_apply_clear_cutouts(rects); + /* restore clip info */ + gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; +} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_line.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_line.c new file mode 100644 index 0000000..48499ea --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_line.c @@ -0,0 +1,32 @@ +#include "evas_gl_private.h" + +void +evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2) +{ + RGBA_Draw_Context *dc; + int r, g, b, a; + int c, cx, cy, cw, ch; + + dc = gc->dc; + if (dc->mul.use) + { + a = (dc->mul.col >> 24) & 0xff; + r = (dc->mul.col >> 16) & 0xff; + g = (dc->mul.col >> 8 ) & 0xff; + b = (dc->mul.col ) & 0xff; + } + else + { + r = g = b = a = 255; + } + + glFlush(); + + c = gc->dc->clip.use; + cx = gc->dc->clip.x; cy = gc->dc->clip.y; + cw = gc->dc->clip.w; ch = gc->dc->clip.h; + + evas_gl_common_context_line_push(gc, x1, y1, x2, y2, + c, cx, cy, cw, ch, + r, g, b, a); +} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_polygon.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_polygon.c new file mode 100644 index 0000000..06647cd --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_polygon.c @@ -0,0 +1,307 @@ +#include "evas_gl_private.h" + +// FIXME: this is a verbatim copy of the software poly renderer. it just +// use gl to draw 1 pixel high spans like software does. this is to make +// sure rendering correctness matches the software engine but also to save +// time in coming up with a good triangulation algorithm. if you want to +// feel free to turn this into a real triangulation system and use gl to its +// fullest, but as such polygons are used so little, it's not worth it. + +typedef struct _RGBA_Span RGBA_Span; +typedef struct _RGBA_Edge RGBA_Edge; +typedef struct _RGBA_Vertex RGBA_Vertex; + +struct _RGBA_Span +{ + EINA_INLIST; + int x, y, w; +}; + +struct _RGBA_Edge +{ + double x, dx; + int i; +}; + +struct _RGBA_Vertex +{ + double x, y; + int i; +}; + +#define POLY_EDGE_DEL(_i) \ + { \ + int _j; \ + \ + for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ + if (_j < num_active_edges) \ + { \ + num_active_edges--; \ + memmove(&(edges[_j]), &(edges[_j + 1]), \ + (num_active_edges - _j) * sizeof(RGBA_Edge)); \ + } \ + } + +#define POLY_EDGE_ADD(_i, _y) \ + { \ + int _j; \ + float _dx; \ + RGBA_Vertex *_p, *_q; \ + if (_i < (n - 1)) _j = _i + 1; \ + else _j = 0; \ + if (point[_i].y < point[_j].y) \ + { \ + _p = &(point[_i]); \ + _q = &(point[_j]); \ + } \ + else \ + { \ + _p = &(point[_j]); \ + _q = &(point[_i]); \ + } \ + edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ + edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ + edges[num_active_edges].i = _i; \ + num_active_edges++; \ + } + +Evas_GL_Polygon * +evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y) +{ + Evas_GL_Polygon_Point *pt; + + if (!poly) poly = calloc(1, sizeof(Evas_GL_Polygon)); + if (!poly) return NULL; + pt = calloc(1, sizeof(Evas_GL_Polygon_Point)); + if (!pt) return NULL; + pt->x = x; + pt->y = y; + poly->points = eina_list_append(poly->points, pt); + poly->changed = 1; + return poly; +} + +Evas_GL_Polygon * +evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly) +{ + if (!poly) return NULL; + while (poly->points) + { + Evas_GL_Polygon_Point *pt; + + pt = poly->points->data; + poly->points = eina_list_remove(poly->points, pt); + free(pt); + } + free(poly); + return NULL; +} + +static int +polygon_point_sorter(const void *a, const void *b) +{ + RGBA_Vertex *p, *q; + + p = (RGBA_Vertex *)a; + q = (RGBA_Vertex *)b; + if (p->y <= q->y) return -1; + return 1; +} + +static int +polygon_edge_sorter(const void *a, const void *b) +{ + RGBA_Edge *p, *q; + + p = (RGBA_Edge *)a; + q = (RGBA_Edge *)b; + if (p->x <= q->x) return -1; + return 1; +} + +void +evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int dx, int dy) +{ + Cutout_Rects *rects; + Cutout_Rect *r; + int c, cx, cy, cw, ch, cr, cg, cb, ca, i; + int x = 0, y = 0, w = 0, h = 0; + + Eina_List *l; + int n, k, num_active_edges, y0, y1, *sorted_index, j; + RGBA_Edge *edges; + RGBA_Vertex *point; + Evas_GL_Polygon_Point *pt; + Eina_Inlist *spans; + + /* save out clip info */ + c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h; + + ca = (gc->dc->col.col >> 24) & 0xff; + if (ca <= 0) return; + cr = (gc->dc->col.col >> 16) & 0xff; + cg = (gc->dc->col.col >> 8 ) & 0xff; + cb = (gc->dc->col.col ) & 0xff; + + n = eina_list_count(poly->points); + if (n < 3) return; + edges = malloc(sizeof(RGBA_Edge) * n); + if (!edges) return; + point = malloc(sizeof(RGBA_Vertex) * n); + if (!point) + { + free(edges); + return; + } + sorted_index = malloc(sizeof(int) * n); + if (!sorted_index) + { + free(edges); + free(point); + return; + } + + k = 0; + EINA_LIST_FOREACH(poly->points, l, pt) + { + point[k].x = pt->x + dx; + point[k].y = pt->y + dy; + point[k].i = k; + k++; + } + qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); + for (k = 0; k < n; k++) sorted_index[k] = point[k].i; + k = 0; + + EINA_LIST_FOREACH(poly->points, l, pt) + { + point[k].x = pt->x + dx; + point[k].y = pt->y + dy; + point[k].i = k; + k++; + } + + y0 = MAX(cy, ceil(point[sorted_index[0]].y - 0.5)); + y1 = MIN(cy + ch - 1, floor(point[sorted_index[n - 1]].y - 0.5)); + + k = 0; + num_active_edges = 0; + spans = NULL; + + for (y = y0; y <= y1; y++) + { + for (; (k < n) && (point[sorted_index[k]].y <= ((double)y + 0.5)); k++) + { + i = sorted_index[k]; + + if (i > 0) j = i - 1; + else j = n - 1; + if (point[j].y <= ((double)y - 0.5)) + { + POLY_EDGE_DEL(j) + } + else if (point[j].y > ((double)y + 0.5)) + { + POLY_EDGE_ADD(j, y) + } + if (i < (n - 1)) j = i + 1; + else j = 0; + if (point[j].y <= ((double)y - 0.5)) + { + POLY_EDGE_DEL(i) + } + else if (point[j].y > ((double)y + 0.5)) + { + POLY_EDGE_ADD(i, y) + } + } + + qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); + + for (j = 0; j < num_active_edges; j += 2) + { + int x0, x1; + + x0 = ceil(edges[j].x - 0.5); + if (j < (num_active_edges - 1)) + x1 = floor(edges[j + 1].x - 0.5); + else + x1 = x0; + if ((x1 >= cx) && (x0 < (cx + cw)) && (x0 <= x1)) + { + RGBA_Span *span; + + if (x0 < cx) x0 = cx; + if (x1 >= (cx + cw)) x1 = cx + cw - 1; + span = malloc(sizeof(RGBA_Span)); + spans = eina_inlist_append(spans, EINA_INLIST_GET(span)); + span->y = y; + span->x = x0; + span->w = (x1 - x0) + 1; + } + edges[j].x += edges[j].dx; + edges[j + 1].x += edges[j + 1].dx; + } + } + + free(edges); + free(point); + free(sorted_index); + + evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h); + + if (spans) + { + RGBA_Span *span; + + /* no cutouts - cut right to the chase */ + if (!gc->dc->cutout.rects) + { + EINA_INLIST_FOREACH(spans, span) + { + x = span->x; + y = span->y; + w = span->w; + h = 1; + evas_gl_common_context_rectangle_push(gc, x, y, w, h, cr, cg, cb, ca); + } + } + else + { + evas_common_draw_context_clip_clip(gc->dc, x, y, w, h); + /* our clip is 0 size.. abort */ + if ((gc->dc->clip.w > 0) && (gc->dc->clip.h > 0)) + { + rects = evas_common_draw_context_apply_cutouts(gc->dc); + for (i = 0; i < rects->active; ++i) + { + r = rects->rects + i; + if ((r->w > 0) && (r->h > 0)) + { + EINA_INLIST_FOREACH(spans, span) + { + x = span->x; + y = span->y; + w = span->w; + h = 1; + RECTS_CLIP_TO_RECT(x, y, w, h, r->x, r->y, r->w, r->h); + if ((w > 0) && (h > 0)) + evas_gl_common_context_rectangle_push(gc, x, y, w, h, cr, cg, cb, ca); + } + } + } + evas_common_draw_context_apply_clear_cutouts(rects); + } + } + while (spans) + { + span = (RGBA_Span *)spans; + spans = eina_inlist_remove(spans, spans); + free(span); + } + } + + /* restore clip info */ + gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; + +} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_private.h b/libraries/evas/src/modules/engines/gl_common/evas_gl_private.h new file mode 100644 index 0000000..a178823 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_private.h @@ -0,0 +1,32 @@ +#ifndef _EVAS_GL_PRIVATE_H +#define _EVAS_GL_PRIVATE_H +#include "evas_gl_common.h" + +extern int _evas_engine_GL_common_log_dom; + +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_GL_common_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_GL_common_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_GL_common_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_GL_common_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_GL_common_log_dom, __VA_ARGS__) + +#endif diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_rectangle.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_rectangle.c new file mode 100644 index 0000000..1903314 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_rectangle.c @@ -0,0 +1,53 @@ +#include "evas_gl_private.h" + +void +evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, int x, int y, int w, int h) +{ + Cutout_Rects *rects; + Cutout_Rect *r; + int c, cx, cy, cw, ch, cr, cg, cb, ca, i; + + if ((w <= 0) || (h <= 0)) return; + if (!(RECTS_INTERSECT(x, y, w, h, 0, 0, gc->w, gc->h))) return; + /* save out clip info */ + c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h; + + ca = (gc->dc->col.col >> 24) & 0xff; + if ((gc->dc->render_op != EVAS_RENDER_COPY) && (ca <= 0)) return; + cr = (gc->dc->col.col >> 16) & 0xff; + cg = (gc->dc->col.col >> 8 ) & 0xff; + cb = (gc->dc->col.col ) & 0xff; + evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h); + /* no cutouts - cut right to the chase */ + if ((gc->dc) && (gc->dc->clip.use)) + { + RECTS_CLIP_TO_RECT(x, y, w, h, + gc->dc->clip.x, gc->dc->clip.y, + gc->dc->clip.w, gc->dc->clip.h); + } + + if (!gc->dc->cutout.rects) + { + evas_gl_common_context_rectangle_push(gc, x, y, w, h, cr, cg, cb, ca); + } + else + { + evas_common_draw_context_clip_clip(gc->dc, x, y, w, h); + /* our clip is 0 size.. abort */ + if ((gc->dc->clip.w > 0) && (gc->dc->clip.h > 0)) + { + rects = evas_common_draw_context_apply_cutouts(gc->dc); + for (i = 0; i < rects->active; ++i) + { + r = rects->rects + i; + if ((r->w > 0) && (r->h > 0)) + { + evas_gl_common_context_rectangle_push(gc, r->x, r->y, r->w, r->h, cr, cg, cb, ca); + } + } + evas_common_draw_context_apply_clear_cutouts(rects); + } + } + /* restore clip info */ + gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; +} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_shader.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_shader.c new file mode 100644 index 0000000..6666ac5 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_shader.c @@ -0,0 +1,1262 @@ +#include "evas_gl_private.h" + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int rect_frag_bin[] = +{ +# include "shader/rect_frag_bin_s3c6410.h" +}; +#endif + +const char rect_frag_glsl[] = +#include "shader/rect_frag.h" + ; +Evas_GL_Program_Source shader_rect_frag_src = +{ + rect_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + rect_frag_bin, sizeof(rect_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int rect_vert_bin[] = +{ +# include "shader/rect_vert_bin_s3c6410.h" +}; +#endif +const char rect_vert_glsl[] = +#include "shader/rect_vert.h" + ; +Evas_GL_Program_Source shader_rect_vert_src = +{ + rect_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + rect_vert_bin, sizeof(rect_vert_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int font_frag_bin[] = +{ +# include "shader/font_frag_bin_s3c6410.h" +}; +#endif + +const char font_frag_glsl[] = +#include "shader/font_frag.h" + ; +Evas_GL_Program_Source shader_font_frag_src = +{ + font_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + font_frag_bin, sizeof(font_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int font_vert_bin[] = +{ +# include "shader/font_vert_bin_s3c6410.h" +}; +#endif +const char font_vert_glsl[] = +#include "shader/font_vert.h" + ; +Evas_GL_Program_Source shader_font_vert_src = +{ + font_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + font_vert_bin, sizeof(font_vert_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int yuv_frag_bin[] = +{ +# include "shader/yuv_frag_bin_s3c6410.h" +}; +#endif + +const char yuv_frag_glsl[] = +#include "shader/yuv_frag.h" + ; +Evas_GL_Program_Source shader_yuv_frag_src = +{ + yuv_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + yuv_frag_bin, sizeof(yuv_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int yuv_vert_bin[] = +{ +# include "shader/yuv_vert_bin_s3c6410.h" +}; +#endif +const char yuv_vert_glsl[] = +#include "shader/yuv_vert.h" + ; +Evas_GL_Program_Source shader_yuv_vert_src = +{ + yuv_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + yuv_vert_bin, sizeof(yuv_vert_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int yuy2_frag_bin[] = +{ +# include "shader/yuy2_frag_bin_s3c6410.h" +}; +#endif + +const char yuy2_frag_glsl[] = +#include "shader/yuy2_frag.h" + ; +Evas_GL_Program_Source shader_yuy2_frag_src = +{ + yuy2_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + yuy2_frag_bin, sizeof(yuy2_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int yuy2_vert_bin[] = +{ +# include "shader/yuy2_vert_bin_s3c6410.h" +}; +#endif +const char yuy2_vert_glsl[] = +#include "shader/yuy2_vert.h" + ; +Evas_GL_Program_Source shader_yuy2_vert_src = +{ + yuy2_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + yuy2_vert_bin, sizeof(yuy2_vert_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int yuy2_nomul_frag_bin[] = +{ +# include "shader/yuy2_nomul_frag_bin_s3c6410.h" +}; +#endif + +const char yuy2_nomul_frag_glsl[] = +#include "shader/yuy2_nomul_frag.h" + ; +Evas_GL_Program_Source shader_yuy2_nomul_frag_src = +{ + yuy2_nomul_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + yuy2_nomul_frag_bin, sizeof(yuy2_nomul_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int yuy2_nomul_vert_bin[] = +{ +# include "shader/yuy2_nomul_vert_bin_s3c6410.h" +}; +#endif +const char yuy2_nomul_vert_glsl[] = +#include "shader/yuy2_nomul_vert.h" + ; +Evas_GL_Program_Source shader_yuy2_nomul_vert_src = +{ + yuy2_nomul_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + yuy2_nomul_vert_bin, sizeof(yuy2_nomul_vert_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int nv12_nomul_vert_bin[] = +{ +# include "shader/nv12_nomul_vert_bin_s3c6410.h" +}; +#endif +const char nv12_nomul_vert_glsl[] = +#include "shader/nv12_nomul_vert.h" + ; +Evas_GL_Program_Source shader_nv12_nomul_vert_src = +{ + nv12_nomul_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + nv12_nomul_vert_bin, sizeof(nv12_nomul_vert_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int nv12_vert_bin[] = +{ +# include "shader/nv12_vert_bin_s3c6410.h" +}; +#endif +const char nv12_vert_glsl[] = +#include "shader/nv12_vert.h" + ; +Evas_GL_Program_Source shader_nv12_vert_src = +{ + nv12_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + nv12_vert_bin, sizeof(nv12_vert_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int nv12_nomul_frag_bin[] = +{ +# include "shader/nv12_nomul_frag_bin_s3c6410.h" +}; +#endif + +const char nv12_frag_glsl[] = +#include "shader/nv12_frag.h" + ; +Evas_GL_Program_Source shader_nv12_frag_src = +{ + nv12_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + nv12_frag_bin, sizeof(nv12_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int nv12_nomul_frag_bin[] = +{ +# include "shader/nv12_nomul_frag_bin_s3c6410.h" +}; +#endif + +const char nv12_nomul_frag_glsl[] = +#include "shader/nv12_nomul_frag.h" + ; +Evas_GL_Program_Source shader_nv12_nomul_frag_src = +{ + nv12_nomul_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + nv12_nomul_frag_bin, sizeof(nv12_nomul_frag_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int yuv_nomul_frag_bin[] = +{ +# include "shader/yuv_nomul_frag_bin_s3c6410.h" +}; +#endif + +const char yuv_nomul_frag_glsl[] = +#include "shader/yuv_nomul_frag.h" + ; +Evas_GL_Program_Source shader_yuv_nomul_frag_src = +{ + yuv_nomul_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + yuv_nomul_frag_bin, sizeof(yuv_nomul_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int yuv_nomul_vert_bin[] = +{ +# include "shader/yuv_nomul_vert_bin_s3c6410.h" +}; +#endif +const char yuv_nomul_vert_glsl[] = +#include "shader/yuv_nomul_vert.h" + ; +Evas_GL_Program_Source shader_yuv_nomul_vert_src = +{ + yuv_nomul_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + yuv_nomul_vert_bin, sizeof(yuv_nomul_vert_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int tex_frag_bin[] = +{ +# include "shader/tex_frag_bin_s3c6410.h" +}; +#endif + +const char tex_frag_glsl[] = +#include "shader/tex_frag.h" + ; +Evas_GL_Program_Source shader_tex_frag_src = +{ + tex_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + tex_frag_bin, sizeof(tex_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int tex_vert_bin[] = +{ +# include "shader/tex_vert_bin_s3c6410.h" +}; +#endif +const char tex_vert_glsl[] = +#include "shader/tex_vert.h" + ; +Evas_GL_Program_Source shader_tex_vert_src = +{ + tex_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + tex_vert_bin, sizeof(tex_vert_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int tex_nomul_frag_bin[] = +{ +# include "shader/tex_nomul_frag_bin_s3c6410.h" +}; +#endif + +const char tex_nomul_frag_glsl[] = +#include "shader/tex_nomul_frag.h" + ; +Evas_GL_Program_Source shader_tex_nomul_frag_src = +{ + tex_nomul_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + tex_nomul_frag_bin, sizeof(tex_nomul_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int tex_nomul_vert_bin[] = +{ +# include "shader/tex_nomul_vert_bin_s3c6410.h" +}; +#endif +const char tex_nomul_vert_glsl[] = +#include "shader/tex_nomul_vert.h" + ; +Evas_GL_Program_Source shader_tex_nomul_vert_src = +{ + tex_nomul_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + tex_nomul_vert_bin, sizeof(tex_nomul_vert_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int img_frag_bin[] = +{ +# include "shader/img_frag_bin_s3c6410.h" +}; +#endif + +const char img_frag_glsl[] = +#include "shader/img_frag.h" + ; +Evas_GL_Program_Source shader_img_frag_src = +{ + img_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + img_frag_bin, sizeof(img_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int img_vert_bin[] = +{ +# include "shader/img_vert_bin_s3c6410.h" +}; +#endif +const char img_vert_glsl[] = +#include "shader/img_vert.h" + ; +Evas_GL_Program_Source shader_img_vert_src = +{ + img_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + img_vert_bin, sizeof(img_vert_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int img_nomul_frag_bin[] = +{ +# include "shader/img_nomul_frag_bin_s3c6410.h" +}; +#endif + +const char img_nomul_frag_glsl[] = +#include "shader/img_nomul_frag.h" + ; +Evas_GL_Program_Source shader_img_nomul_frag_src = +{ + img_nomul_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + img_nomul_frag_bin, sizeof(img_nomul_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int img_nomul_vert_bin[] = +{ +# include "shader/img_nomul_vert_bin_s3c6410.h" +}; +#endif +const char img_nomul_vert_glsl[] = +#include "shader/img_nomul_vert.h" + ; +Evas_GL_Program_Source shader_img_nomul_vert_src = +{ + img_nomul_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + img_nomul_vert_bin, sizeof(img_nomul_vert_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int img_bgra_frag_bin[] = +{ +# include "shader/img_bgra_frag_bin_s3c6410.h" +}; +#endif + +const char img_bgra_frag_glsl[] = +#include "shader/img_bgra_frag.h" + ; +Evas_GL_Program_Source shader_img_bgra_frag_src = +{ + img_bgra_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + img_bgra_frag_bin, sizeof(img_bgra_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int img_bgra_vert_bin[] = +{ +# include "shader/img_bgra_vert_bin_s3c6410.h" +}; +#endif +const char img_bgra_vert_glsl[] = +#include "shader/img_bgra_vert.h" + ; +Evas_GL_Program_Source shader_img_bgra_vert_src = +{ + img_bgra_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + img_bgra_vert_bin, sizeof(img_bgra_vert_bin) +#else + NULL, 0 +#endif +}; + + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int img_mask_frag_bin[] = +{ +# include "shader/img_mask_frag_bin_s3c6410.h" +}; +#endif + +const char img_mask_frag_glsl[] = +#include "shader/img_mask_frag.h" + ; +Evas_GL_Program_Source shader_img_mask_frag_src = +{ + img_mask_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + img_mask_frag_bin, sizeof(img_mask_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int img_mask_vert_bin[] = +{ +# include "shader/img_mask_vert_bin_s3c6410.h" +}; +#endif +const char img_mask_vert_glsl[] = +#include "shader/img_mask_vert.h" + ; +Evas_GL_Program_Source shader_img_mask_vert_src = +{ + img_mask_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + img_mask_vert_bin, sizeof(img_mask_vert_bin) +#else + NULL, 0 +#endif +}; + + +///////////////////////////////////////////// +#if defined (GLES_VARIETY_S3C6410) +const unsigned int img_bgra_nomul_frag_bin[] = +{ +# include "shader/img_bgra_nomul_frag_bin_s3c6410.h" +}; +#endif + +const char img_bgra_nomul_frag_glsl[] = +#include "shader/img_bgra_nomul_frag.h" + ; +Evas_GL_Program_Source shader_img_bgra_nomul_frag_src = +{ + img_bgra_nomul_frag_glsl, +#if defined (GLES_VARIETY_S3C6410) + img_bgra_nomul_frag_bin, sizeof(img_bgra_nomul_frag_bin) +#else + NULL, 0 +#endif +}; + +#if defined (GLES_VARIETY_S3C6410) +const unsigned int img_bgra_nomul_vert_bin[] = +{ +# include "shader/img_bgra_nomul_vert_bin_s3c6410.h" +}; +#endif +const char img_bgra_nomul_vert_glsl[] = +#include "shader/img_bgra_nomul_vert.h" + ; +Evas_GL_Program_Source shader_img_bgra_nomul_vert_src = +{ + img_bgra_nomul_vert_glsl, +#if defined (GLES_VARIETY_S3C6410) + img_bgra_nomul_vert_bin, sizeof(img_bgra_nomul_vert_bin) +#else + NULL, 0 +#endif +}; + +///////////////////////////////////////////// +const char filter_invert_frag_glsl[] = +#include "shader/filter_invert.h" + ; +Evas_GL_Program_Source shader_filter_invert_frag_src = +{ + filter_invert_frag_glsl, + NULL, 0 +}; + +const char filter_invert_nomul_frag_glsl[] = +#include "shader/filter_invert_nomul.h" + ; +Evas_GL_Program_Source shader_filter_invert_nomul_frag_src = +{ + filter_invert_nomul_frag_glsl, + NULL, 0 +}; + +const char filter_invert_bgra_frag_glsl[] = +#include "shader/filter_invert_bgra.h" + ; +Evas_GL_Program_Source shader_filter_invert_bgra_frag_src = +{ + filter_invert_bgra_frag_glsl, + NULL, 0 +}; +const char filter_invert_bgra_nomul_frag_glsl[] = +#include "shader/filter_invert_bgra_nomul.h" + ; +Evas_GL_Program_Source shader_filter_invert_bgra_nomul_frag_src = +{ + filter_invert_bgra_nomul_frag_glsl, + NULL, 0 +}; + +///////////////////////////////////////////// +const char filter_greyscale_frag_glsl[] = +#include "shader/filter_greyscale.h" + ; +Evas_GL_Program_Source shader_filter_greyscale_frag_src = +{ + filter_greyscale_frag_glsl, + NULL, 0 +}; + +const char filter_greyscale_nomul_frag_glsl[] = +#include "shader/filter_greyscale_nomul.h" + ; +Evas_GL_Program_Source shader_filter_greyscale_nomul_frag_src = +{ + filter_greyscale_nomul_frag_glsl, + NULL, 0 +}; + +const char filter_greyscale_bgra_frag_glsl[] = +#include "shader/filter_greyscale_bgra.h" + ; +Evas_GL_Program_Source shader_filter_greyscale_bgra_frag_src = +{ + filter_greyscale_bgra_frag_glsl, + NULL, 0 +}; +const char filter_greyscale_bgra_nomul_frag_glsl[] = +#include "shader/filter_greyscale_bgra_nomul.h" + ; +Evas_GL_Program_Source shader_filter_greyscale_bgra_nomul_frag_src = +{ + filter_greyscale_bgra_nomul_frag_glsl, + NULL, 0 +}; + +///////////////////////////////////////////// +const char filter_sepia_frag_glsl[] = +#include "shader/filter_sepia.h" + ; +Evas_GL_Program_Source shader_filter_sepia_frag_src = +{ + filter_sepia_frag_glsl, + NULL, 0 +}; + +const char filter_sepia_nomul_frag_glsl[] = +#include "shader/filter_sepia_nomul.h" + ; +Evas_GL_Program_Source shader_filter_sepia_nomul_frag_src = +{ + filter_sepia_nomul_frag_glsl, + NULL, 0 +}; + +const char filter_sepia_bgra_frag_glsl[] = +#include "shader/filter_sepia_bgra.h" + ; +Evas_GL_Program_Source shader_filter_sepia_bgra_frag_src = +{ + filter_sepia_bgra_frag_glsl, + NULL, 0 +}; +const char filter_sepia_bgra_nomul_frag_glsl[] = +#include "shader/filter_sepia_bgra_nomul.h" + ; +Evas_GL_Program_Source shader_filter_sepia_bgra_nomul_frag_src = +{ + filter_sepia_bgra_nomul_frag_glsl, + NULL, 0 +}; + +///////////////////////////////////////////// +#if 0 + Blur is a work in progress currently. + Mostly because GPUs are so hopeless. +const char filter_blur_vert_glsl[] = +#include "shader/filter_blur_vert.h" + ; + +Evas_GL_Program_Source shader_filter_blur_vert_src = +{ + filter_blur_vert_glsl, + NULL, 0 +}; + +const char filter_blur_frag_glsl[] = +#include "shader/filter_blur.h" + ; +Evas_GL_Program_Source shader_filter_blur_frag_src = +{ + filter_blur_frag_glsl, + NULL, 0 +}; + +const char filter_blur_nomul_frag_glsl[] = +#include "shader/filter_blur_nomul.h" + ; +Evas_GL_Program_Source shader_filter_blur_nomul_frag_src = +{ + filter_blur_nomul_frag_glsl, + NULL, 0 +}; + +const char filter_blur_bgra_frag_glsl[] = +#include "shader/filter_blur_bgra.h" + ; +Evas_GL_Program_Source shader_filter_blur_bgra_frag_src = +{ + filter_blur_bgra_frag_glsl, + NULL, 0 +}; +const char filter_blur_bgra_nomul_frag_glsl[] = +#include "shader/filter_blur_bgra_nomul.h" + ; +Evas_GL_Program_Source shader_filter_blur_bgra_nomul_frag_src = +{ + filter_blur_bgra_nomul_frag_glsl, + NULL, 0 +}; + +#endif + + + +///////////////////////////////////////////// +static void +gl_compile_link_error(GLuint target, const char *action) +{ + int loglen = 0, chars = 0; + char *logtxt; + + /* Shader info log */ + glGetShaderiv(target, GL_INFO_LOG_LENGTH, &loglen); + if (loglen > 0) + { + logtxt = calloc(loglen, sizeof(char)); + if (logtxt) + { + glGetShaderInfoLog(target, loglen, &chars, logtxt); + ERR("Failed to %s: %s", action, logtxt); + free(logtxt); + } + } + + /* Program info log */ + glGetProgramiv(target, GL_INFO_LOG_LENGTH, &loglen); + if (loglen > 0) + { + logtxt = calloc(loglen, sizeof(char)); + if (logtxt) + { + glGetProgramInfoLog(target, loglen, &chars, logtxt); + ERR("Failed to %s: %s", action, logtxt); + free(logtxt); + } + } +} + +static mode_t default_mode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; + +static Eina_Bool +_evas_gl_shader_file_is_dir(const char *file) +{ + struct stat st; + + if (stat(file, &st) < 0) return EINA_FALSE; + if (S_ISDIR(st.st_mode)) return EINA_TRUE; + return EINA_FALSE; +} + +static Eina_Bool +_evas_gl_shader_file_mkdir(const char *dir) +{ + /* evas gl shader only call this function when the dir is not exist */ + if (mkdir(dir, default_mode) < 0) return EINA_FALSE; + return EINA_TRUE; +} + +static Eina_Bool +_evas_gl_shader_file_exists(const char *file) +{ + struct stat st; + if (!file) return EINA_FALSE; + if (stat(file, &st) < 0) return EINA_FALSE; + return EINA_TRUE; +} + +static inline Eina_Bool +_evas_gl_shader_file_mkpath_if_not_exists(const char *path) +{ + struct stat st; + + if (stat(path, &st) < 0) + return _evas_gl_shader_file_mkdir(path); + else if (!S_ISDIR(st.st_mode)) + return EINA_FALSE; + else + return EINA_TRUE; +} + +static Eina_Bool +_evas_gl_shader_file_mkpath(const char *path) +{ + char ss[PATH_MAX]; + unsigned int i; + + if (_evas_gl_shader_file_is_dir(path)) return EINA_TRUE; + + for (i = 0; path[i]; ss[i] = path[i], i++) + { + if (i == sizeof(ss) - 1) return EINA_FALSE; + if ((path[i] == '/') && (i > 0)) + { + ss[i] = 0; + if (!_evas_gl_shader_file_mkpath_if_not_exists(ss)) + return EINA_FALSE; + } + } + ss[i] = 0; + return _evas_gl_shader_file_mkpath_if_not_exists(ss); +} + +static int +_evas_gl_shader_dir_check(char *bin_shader_dir, int num) +{ + char *home = NULL; + char *subdir = ".cache/evas_gl_common_shaders"; + + home = getenv("HOME"); + if ((!home) || (!home[0])) return 0; + + snprintf(bin_shader_dir, num, "%s/%s", home, subdir); + return _evas_gl_shader_file_exists(bin_shader_dir); +} + +static int +_evas_gl_shader_file_check(const char *bin_shader_dir, char *bin_shader_file, int dir_num) +{ + char before_name[PATH_MAX]; + char after_name[PATH_MAX]; + int new_path_len = 0; + int i = 0, j = 0; + + char *vendor = NULL; + char *driver = NULL; + char *version = NULL; + + vendor = (char *)glGetString(GL_VENDOR); + driver = (char *)glGetString(GL_RENDERER); + version = (char *)glGetString(GL_VERSION); + + new_path_len = snprintf(before_name, sizeof(before_name), "%s::%s::%s::%s::binary_shader.eet", vendor, version, driver, MODULE_ARCH); + + /* remove '/' from file name */ + for (i = 0; i < new_path_len; i++) + { + if (before_name[i] != '/') + { + after_name[j] = before_name[i]; + j++; + } + } + after_name[j] = 0; + + snprintf(bin_shader_file, dir_num, "%s/%s", bin_shader_dir, after_name); + + return _evas_gl_shader_file_exists(bin_shader_file); +} + +static int +_evas_gl_common_shader_program_binary_init(Evas_GL_Program *p, + const char *pname, + Eet_File *ef) +{ + int res = 0, num = 0, length = 0; + int *formats = NULL; + void *data = NULL; + GLint ok = 0; + + if (!ef) return res; + + data = eet_read(ef, pname, &length); + if ((!data) || (length <= 0)) goto finish; + + glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &num); + if (num <= 0) goto finish; + + formats = calloc(num, sizeof(int)); + if (!formats) goto finish; + + glGetIntegerv(GL_PROGRAM_BINARY_FORMATS, formats); + if (!formats[0]) goto finish; + + p->prog = glCreateProgram(); + + glsym_glProgramBinary(p->prog, formats[0], data, length); + + glBindAttribLocation(p->prog, SHAD_VERTEX, "vertex"); + glBindAttribLocation(p->prog, SHAD_COLOR, "color"); + glBindAttribLocation(p->prog, SHAD_TEXUV, "tex_coord"); + glBindAttribLocation(p->prog, SHAD_TEXUV2, "tex_coord2"); + glBindAttribLocation(p->prog, SHAD_TEXUV3, "tex_coord3"); + glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm"); + + glGetProgramiv(p->prog, GL_LINK_STATUS, &ok); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + if (!ok) + { + gl_compile_link_error(p->prog, "load a program object"); + ERR("Abort load of program (%s)", pname); + goto finish; + } + + res = 1; + +finish: + if (formats) free(formats); + if (data) free(data); + if ((!res) && (p->prog)) + { + glDeleteProgram(p->prog); + p->prog = 0; + } + return res; +} + +static int +_evas_gl_common_shader_program_binary_save(Evas_GL_Program *p, + const char *pname, + Eet_File *ef) +{ + void* data = NULL; + GLenum format; + int length = 0, size = 0; + + if (!glsym_glGetProgramBinary) return 0; + + glGetProgramiv(p->prog, GL_PROGRAM_BINARY_LENGTH, &length); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + if (length <= 0) return 0; + + data = malloc(length); + if (!data) return 0; + + glsym_glGetProgramBinary(p->prog, length, &size, &format, data); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + if (length != size) + { + free(data); + return 0; + } + + if (eet_write(ef, pname, data, length, 0) < 0) + { + if (data) free(data); + return 0; + } + if (data) free(data); + return 1; +} + +static int +_evas_gl_common_shader_program_source_init(Evas_GL_Program *p, + Evas_GL_Program_Source *vert, + Evas_GL_Program_Source *frag, + const char *name) +{ + GLint ok; + + p->vert = glCreateShader(GL_VERTEX_SHADER); + p->frag = glCreateShader(GL_FRAGMENT_SHADER); +#if defined (GLES_VARIETY_S3C6410) + glShaderBinary(1, &(p->vert), 0, vert->bin, vert->bin_size); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glShaderBinary(1, &(p->frag), 0, frag->bin, frag->bin_size); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#else + glShaderSource(p->vert, 1, + (const char **)&(vert->src), NULL); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glCompileShader(p->vert); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + ok = 0; + glGetShaderiv(p->vert, GL_COMPILE_STATUS, &ok); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + if (!ok) + { + gl_compile_link_error(p->vert, "compile vertex shader"); + ERR("Abort compile of shader vert (%s): %s", name, vert->src); + return 0; + } + glShaderSource(p->frag, 1, + (const char **)&(frag->src), NULL); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glCompileShader(p->frag); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + ok = 0; + glGetShaderiv(p->frag, GL_COMPILE_STATUS, &ok); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + if (!ok) + { + gl_compile_link_error(p->frag, "compile fragment shader"); + ERR("Abort compile of shader frag (%s): %s", name, frag->src); + return 0; + } +#endif + p->prog = glCreateProgram(); +#if defined(GLES_VARIETY_S3C6410) || defined(GLES_VARIETY_SGX) +#else + if ((glsym_glGetProgramBinary) && (glsym_glProgramParameteri)) + glsym_glProgramParameteri(p->prog, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, + GL_TRUE); +#endif + glAttachShader(p->prog, p->vert); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glAttachShader(p->prog, p->frag); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + glBindAttribLocation(p->prog, SHAD_VERTEX, "vertex"); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindAttribLocation(p->prog, SHAD_COLOR, "color"); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindAttribLocation(p->prog, SHAD_TEXUV, "tex_coord"); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindAttribLocation(p->prog, SHAD_TEXUV2, "tex_coord2"); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindAttribLocation(p->prog, SHAD_TEXUV3, "tex_coord3"); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm"); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + glLinkProgram(p->prog); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + ok = 0; + glGetProgramiv(p->prog, GL_LINK_STATUS, &ok); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + if (!ok) + { + gl_compile_link_error(p->prog, "link fragment and vertex shaders"); + ERR("Abort compile of shader frag (%s): %s", name, frag->src); + ERR("Abort compile of shader vert (%s): %s", name, vert->src); + return 0; + } + return 1; +} + +#define SHADER_SOURCE_LINE(Big, Small) \ + { SHADER_##Big, &(shader_##Small##_vert_src), &(shader_##Small##_frag_src), #Small } + +#define SHADER_SOURCE_FILTER_LINE(Big, Small) \ + { SHADER_##Big, &(shader_img_vert_src), &(shader_##Small##_frag_src), #Small } + +static const struct { + Evas_GL_Shader id; + Evas_GL_Program_Source *vert; + Evas_GL_Program_Source *frag; + const char *name; +} _shaders_source[] = { + SHADER_SOURCE_LINE(RECT, rect), + SHADER_SOURCE_LINE(FONT, font), + SHADER_SOURCE_LINE(IMG, img), + SHADER_SOURCE_LINE(IMG_NOMUL, img_nomul), + SHADER_SOURCE_LINE(IMG_BGRA, img_bgra), + SHADER_SOURCE_LINE(IMG_BGRA_NOMUL, img_bgra_nomul), + SHADER_SOURCE_LINE(IMG_MASK, img_mask), + SHADER_SOURCE_LINE(YUV, yuv), + SHADER_SOURCE_LINE(YUV_NOMUL, yuv_nomul), + SHADER_SOURCE_LINE(YUY2, yuy2), + SHADER_SOURCE_LINE(YUY2_NOMUL, yuy2_nomul), + SHADER_SOURCE_LINE(NV12, nv12), + SHADER_SOURCE_LINE(NV12_NOMUL, nv12_nomul), + SHADER_SOURCE_LINE(TEX, tex), + SHADER_SOURCE_LINE(TEX_NOMUL, tex_nomul), + /* Most of the filters use the image fragment shader */ + SHADER_SOURCE_FILTER_LINE(FILTER_INVERT, filter_invert), + SHADER_SOURCE_FILTER_LINE(FILTER_INVERT_NOMUL, filter_invert_nomul), + SHADER_SOURCE_FILTER_LINE(FILTER_INVERT_BGRA, filter_invert_bgra), + SHADER_SOURCE_FILTER_LINE(FILTER_INVERT_BGRA_NOMUL, filter_invert_bgra_nomul), + SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE, filter_greyscale), + SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE_NOMUL, filter_greyscale_nomul), + SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE_BGRA, filter_greyscale_bgra), + SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE_BGRA_NOMUL, filter_greyscale_bgra_nomul), + SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA, filter_sepia), + SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA_NOMUL, filter_sepia_nomul), + SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA_BGRA, filter_sepia_bgra), + SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA_BGRA_NOMUL, filter_sepia_bgra_nomul)/* , */ + /* SHADER_SOURCE_LINE(FILTER_BLUR, filter_blur), */ + /* SHADER_SOURCE_LINE(FILTER_BLUR_NOMUL, filter_blur_nomul), */ + /* SHADER_SOURCE_LINE(FILTER_BLUR_BGRA, filter_blur_bgra), */ + /* SHADER_SOURCE_LINE(FILTER_BLUR_BGRA_NOMUL, filter_blur_bgra_nomul) */ +}; + +static int +_evas_gl_common_shader_source_init(Evas_GL_Shared *shared) +{ + unsigned int i; + + for (i = 0; i < sizeof (_shaders_source) / sizeof (_shaders_source[0]); ++i) + if (!_evas_gl_common_shader_program_source_init(&(shared->shader[_shaders_source[i].id]), + _shaders_source[i].vert, + _shaders_source[i].frag, + _shaders_source[i].name)) + return 0; + + return 1; +} + +static int +_evas_gl_common_shader_binary_init(Evas_GL_Shared *shared) +{ + /* check eet */ + Eet_File *et = NULL; + char bin_dir_path[PATH_MAX]; + char bin_file_path[PATH_MAX]; + unsigned int i; + + if (!_evas_gl_shader_dir_check(bin_dir_path, sizeof(bin_dir_path))) + return 0; + + if (!_evas_gl_shader_file_check(bin_dir_path, bin_file_path, + sizeof(bin_dir_path))) + return 0; + + /* use eet */ + if (!eet_init()) return 0; + et = eet_open(bin_file_path, EET_FILE_MODE_READ); + if (!et) goto error; + + for (i = 0; i < sizeof (_shaders_source) / sizeof (_shaders_source[0]); ++i) + if (!_evas_gl_common_shader_program_binary_init(&(shared->shader[_shaders_source[i].id]), + _shaders_source[i].name, + et)) + goto error; + + if (et) eet_close(et); + eet_shutdown(); + return 1; + +error: + if (et) eet_close(et); + eet_shutdown(); + return 0; +} + +static int +_evas_gl_common_shader_binary_save(Evas_GL_Shared *shared) +{ + /* check eet */ + Eet_File *et = NULL; //check eet file + int tmpfd; + int res = 0; + char bin_dir_path[PATH_MAX]; + char bin_file_path[PATH_MAX]; + char tmp_file[PATH_MAX]; + unsigned int i; + + if (!_evas_gl_shader_dir_check(bin_dir_path, sizeof(bin_dir_path))) + res = _evas_gl_shader_file_mkpath(bin_dir_path); + if (!res) return 0; /* we can't make directory */ + + _evas_gl_shader_file_check(bin_dir_path, bin_file_path, + sizeof(bin_dir_path)); + + /* use mkstemp for writing */ + snprintf(tmp_file, sizeof(tmp_file), "%s.XXXXXX", bin_file_path); + tmpfd = mkstemp(tmp_file); + if (tmpfd < 0) goto error; + close(tmpfd); + + /* use eet */ + if (!eet_init()) goto error; + + et = eet_open(tmp_file, EET_FILE_MODE_WRITE); + if (!et) goto error; + + for (i = 0; i < sizeof (_shaders_source) / sizeof (_shaders_source[0]); ++i) + if (!_evas_gl_common_shader_program_binary_save(&(shared->shader[_shaders_source[i].id]), + _shaders_source[i].name, + et)) + goto error; + + if (eet_close(et) != EET_ERROR_NONE) goto error; + if (rename(tmp_file,bin_file_path) < 0) goto error; + eet_shutdown(); + return 1; + +error: + if (et) eet_close(et); + if (_evas_gl_shader_file_exists(tmp_file)) unlink(tmp_file); + eet_shutdown(); + return 0; +} + +int +evas_gl_common_shader_program_init(Evas_GL_Shared *shared) +{ + // gl support binary shader and get env of binary shader path + if (shared->info.bin_program && + _evas_gl_common_shader_binary_init(shared)) return 1; + /* compile all shader.*/ + if (!_evas_gl_common_shader_source_init(shared)) return 0; + /* success compile all shader. if gl support binary shader, we need to save */ + if (shared->info.bin_program) _evas_gl_common_shader_binary_save(shared); + return 1; +} + +void +evas_gl_common_shader_program_init_done(void) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + glReleaseShaderCompiler(); +#endif +} + +void +evas_gl_common_shader_program_shutdown(Evas_GL_Program *p) +{ + if (p->vert) glDeleteShader(p->vert); + if (p->frag) glDeleteShader(p->frag); + if (p->prog) glDeleteProgram(p->prog); +} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c new file mode 100644 index 0000000..c99f4bd --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c @@ -0,0 +1,1668 @@ +#include "evas_gl_private.h" + +static const GLenum rgba_fmt = GL_RGBA; +static const GLenum rgba_ifmt = GL_RGBA; +//#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +//static const GLenum rgb_fmt = GL_RGBA; +//static const GLenum rgb_ifmt = GL_RGBA; +//#else +static const GLenum rgb_fmt = GL_RGBA; +static const GLenum rgb_ifmt = GL_RGB; +//#endif +#ifdef GL_BGRA +# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +static const GLenum bgra_fmt = GL_BGRA; +static const GLenum bgra_ifmt = GL_BGRA; +static const GLenum bgr_fmt = GL_BGRA; +static const GLenum bgr_ifmt = GL_BGRA; +# else +static const GLenum bgra_fmt = GL_BGRA; +static const GLenum bgra_ifmt = GL_RGBA; +static const GLenum bgr_fmt = GL_BGRA; +static const GLenum bgr_ifmt = GL_RGB; +# endif +#endif +static const GLenum alpha_fmt = GL_ALPHA; +static const GLenum alpha_ifmt = GL_ALPHA; +static const GLenum lum_fmt = GL_LUMINANCE; +static const GLenum lum_ifmt = GL_LUMINANCE; +static const GLenum lum_alpha_fmt = GL_LUMINANCE_ALPHA; +static const GLenum lum_alpha_ifmt = GL_LUMINANCE_ALPHA; +static const GLenum rgba8_ifmt = GL_RGBA; +static const GLenum rgba8_fmt = GL_BGRA; + +static struct { + struct { + int num, pix; + } c, a, v, r, n, d; +} texinfo = {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}; + +static void +_print_tex_count(void) +{ + if (getenv("EVAS_GL_MEMINFO")) + { + fprintf(stderr, + "T: c:%i/%ik | a:%i/%ik | v:%i/%ik | r:%i/%ik | n:%i/%ik | d:%i/%ik\n", + texinfo.c.num, (texinfo.c.pix * 4) / 1024, + texinfo.a.num, (texinfo.a.pix ) / 1024, + texinfo.v.num, (texinfo.v.pix ) / 1024, + texinfo.r.num, (texinfo.r.pix * 4) / 1024, + texinfo.n.num, (texinfo.n.pix * 4) / 1024, + texinfo.d.num, (texinfo.d.pix * 4) / 1024 + ); + } +} + +static int +_nearest_pow2(int num) +{ + unsigned int n = num - 1; + n |= n >> 1; + n |= n >> 2; + n |= n >> 4; + n |= n >> 8; + n |= n >> 16; + return n + 1; +} + +static void +_tex_adjust(Evas_Engine_GL_Context *gc, int *w, int *h) +{ + if (gc->shared->info.tex_npo2) return; + /*if (gc->shared->info.tex_rect) return;*/ + *w = _nearest_pow2(*w); + *h = _nearest_pow2(*h); +} + +static int +_tex_round_slot(Evas_Engine_GL_Context *gc, int h) +{ + if (!gc->shared->info.tex_npo2) + h = _nearest_pow2(h); + return (h + gc->shared->info.tune.atlas.slot_size - 1) / + gc->shared->info.tune.atlas.slot_size; +} + +static int +_tex_format_index(GLuint format) +{ + switch (format) + { + case GL_RGBA: +#ifdef GL_BGRA + case GL_BGRA: +#endif + return 0; + case GL_RGB: + return 1; + case GL_ALPHA: + return 2; + case GL_LUMINANCE: // never used in atlas + return 3; + default: + return 0; + } + return 0; +} + +static void +_tex_2d(int intfmt, int w, int h, int fmt, int type) +{ + int intfmtret = -1; + glTexImage2D(GL_TEXTURE_2D, 0, intfmt, w, h, 0, fmt, type, NULL); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#ifdef GL_TEXTURE_INTERNAL_FORMAT +// this is not in opengles!!! hrrrm + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, + GL_TEXTURE_INTERNAL_FORMAT, &intfmtret); + if (intfmtret != intfmt) + { + ERR("Fail tex alloc %ix%i", w, h); +// XXX send async err to evas + } +#endif +} + +static void +_tex_sub_2d(int x, int y, int w, int h, int fmt, int type, const void *pix) +{ + glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h, fmt, type, pix); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +} + +static Evas_GL_Texture_Pool * +_pool_tex_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, GLenum format) +{ + Evas_GL_Texture_Pool *pt; + + pt = calloc(1, sizeof(Evas_GL_Texture_Pool)); + if (!pt) return NULL; + h = _tex_round_slot(gc, h) * gc->shared->info.tune.atlas.slot_size; + _tex_adjust(gc, &w, &h); + pt->gc = gc; + pt->w = w; + pt->h = h; + pt->intformat = intformat; + pt->format = format; + pt->dataformat = GL_UNSIGNED_BYTE; + pt->references = 0; + + if (format == alpha_fmt) + { + texinfo.a.num++; + texinfo.a.pix += pt->w * pt->h; + } + else if (format == lum_fmt) + { + texinfo.v.num++; + texinfo.v.pix += pt->w * pt->h; + } + else + { + texinfo.c.num++; + texinfo.c.pix += pt->w * pt->h; + } + + _print_tex_count(); + + glGenTextures(1, &(pt->texture)); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(pt->intformat, w, h, pt->format, pt->dataformat); + glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + return pt; +} + +static int +_pool_tex_alloc(Evas_GL_Texture_Pool *pt, int w, int h __UNUSED__, int *u, int *v, Eina_List **l_after) +{ + Eina_List *l; + Evas_GL_Texture *tex, *tex2; + int nx, d, b; + + if (pt->allocations) + { + tex = pt->allocations->data; + // if firest tex is not at left edge... + if (tex->x > (0 + 1)) + { + if ((tex->x - 1) >= w) + { + *u = 0; + *v = 0; + *l_after = NULL; + return 1; + } + } + } + EINA_LIST_FOREACH(pt->allocations, l, tex) + { + b = tex->x + tex->w + 2; + if (l->next) + { + tex2 = l->next->data; + nx = tex2->x - 1; + } + else + nx = pt->w - 1; + d = nx - b; + if (d >= w) + { + *u = b; + *v = 0; + *l_after = l; + return 1; + } + } + *l_after = NULL; + return 0; +} + +static Evas_GL_Texture_Pool * +_pool_tex_find(Evas_Engine_GL_Context *gc, int w, int h, + int intformat, int format, int *u, int *v, + Eina_List **l_after, int atlas_w) +{ + Evas_GL_Texture_Pool *pt = NULL; + Eina_List *l; + int th, th2; + + if (atlas_w > gc->shared->info.max_texture_size) + atlas_w = gc->shared->info.max_texture_size; + if ((w > gc->shared->info.tune.atlas.max_w) || + (h > gc->shared->info.tune.atlas.max_h)) + { + pt = _pool_tex_new(gc, w, h, intformat, format); + gc->shared->tex.whole = eina_list_prepend(gc->shared->tex.whole, pt); + pt->slot = -1; + pt->fslot = -1; + pt->whole = 1; + *u = 0; + *v = 0; + *l_after = NULL; + return pt; + } + + th = _tex_round_slot(gc, h); + th2 = _tex_format_index(intformat); + EINA_LIST_FOREACH(gc->shared->tex.atlas[th][th2], l, pt) + { + if (_pool_tex_alloc(pt, w, h, u, v, l_after)) + { + gc->shared->tex.atlas[th][th2] = + eina_list_remove_list(gc->shared->tex.atlas[th][th2], l); + gc->shared->tex.atlas[th][th2] = + eina_list_prepend(gc->shared->tex.atlas[th][th2], pt); + return pt; + } + } + pt = _pool_tex_new(gc, atlas_w, h, intformat, format); + gc->shared->tex.atlas[th][th2] = + eina_list_prepend(gc->shared->tex.atlas[th][th2], pt); + pt->slot = th; + pt->fslot = th2; + *u = 0; + *v = 0; + *l_after = NULL; + return pt; +} + +Evas_GL_Texture * +evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im) +{ + Evas_GL_Texture *tex; + Eina_List *l_after = NULL; + int u = 0, v = 0; + + tex = calloc(1, sizeof(Evas_GL_Texture)); + if (!tex) return NULL; + + tex->gc = gc; + tex->references = 1; + + if (im->cache_entry.flags.alpha) + { + if (gc->shared->info.bgra) + tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2, + im->cache_entry.h + 1, bgra_ifmt, bgra_fmt, + &u, &v, &l_after, + gc->shared->info.tune.atlas.max_alloc_size); + else + tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2, + im->cache_entry.h + 1, rgba_ifmt, rgba_fmt, + &u, &v, &l_after, + gc->shared->info.tune.atlas.max_alloc_size); + tex->alpha = 1; + } + else + { + if (gc->shared->info.bgra) + tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3, + im->cache_entry.h + 1, bgr_ifmt, bgr_fmt, + &u, &v, &l_after, + gc->shared->info.tune.atlas.max_alloc_size); + else +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3, + im->cache_entry.h + 1, rgba_ifmt, rgba_fmt, + &u, &v, &l_after, + gc->shared->info.tune.atlas.max_alloc_size); +#else + tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3, + im->cache_entry.h + 1, rgb_ifmt, rgb_fmt, + &u, &v, &l_after, + gc->shared->info.tune.atlas.max_alloc_size); +#endif + } + if (!tex->pt) + { + free(tex); + return NULL; + } + tex->x = u + 1; + tex->y = v; + tex->w = im->cache_entry.w; + tex->h = im->cache_entry.h; + if (l_after) + tex->pt->allocations = + eina_list_append_relative_list(tex->pt->allocations, tex, l_after); + else + tex->pt->allocations = + eina_list_prepend(tex->pt->allocations, tex); + tex->pt->references++; + evas_gl_common_texture_update(tex, im); + return tex; +} + +static Evas_GL_Texture_Pool * +_pool_tex_render_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format) +{ + Evas_GL_Texture_Pool *pt; + + pt = calloc(1, sizeof(Evas_GL_Texture_Pool)); + if (!pt) return NULL; + h = _tex_round_slot(gc, h) * gc->shared->info.tune.atlas.slot_size; + _tex_adjust(gc, &w, &h); + pt->gc = gc; + pt->w = w; + pt->h = h; + pt->intformat = intformat; + pt->format = format; + pt->dataformat = GL_UNSIGNED_BYTE; + pt->render = 1; + pt->references = 0; +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +# ifndef GL_FRAMEBUFFER +# define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES +# endif +# ifndef GL_COLOR_ATTACHMENT0 +# define GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0_OES +# endif +#else +# ifndef GL_FRAMEBUFFER +# define GL_FRAMEBUFFER GL_FRAMEBUFFER_EXT +# endif +# ifndef GL_COLOR_ATTACHMENT0 +# define GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0_EXT +# endif +#endif + texinfo.r.num++; + texinfo.r.pix += pt->w * pt->h; + + _print_tex_count(); + + glGenTextures(1, &(pt->texture)); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(pt->intformat, w, h, pt->format, pt->dataformat); + + glsym_glGenFramebuffers(1, &(pt->fb)); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glsym_glBindFramebuffer(GL_FRAMEBUFFER, pt->fb); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glsym_glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, pt->texture, 0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glsym_glBindFramebuffer(GL_FRAMEBUFFER, 0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + return pt; +} + +static Evas_GL_Texture_Pool * +_pool_tex_native_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format, Evas_GL_Image *im) +{ + Evas_GL_Texture_Pool *pt; + + pt = calloc(1, sizeof(Evas_GL_Texture_Pool)); + if (!pt) return NULL; + pt->gc = gc; +#ifdef GL_TEXTURE_RECTANGLE_ARB + if (im->native.target == GL_TEXTURE_RECTANGLE_ARB) + { + printf("REEEEEEEEECT\n"); + pt->w = w; + pt->h = h; + } + else +#endif + { + // FIXME: handle po2 only textures + pt->w = w; + pt->h = h; + } + pt->intformat = intformat; + pt->format = format; + pt->dataformat = GL_UNSIGNED_BYTE; + pt->references = 0; + pt->native = 1; + texinfo.n.num++; + texinfo.n.pix += pt->w * pt->h; + + _print_tex_count(); + + glGenTextures(1, &(pt->texture)); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(im->native.target, pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +#else + if (im->native.loose) + { + if (im->native.func.bind) + im->native.func.bind(im->native.func.data, im); + } +#endif + + glTexParameteri(im->native.target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(im->native.target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(im->native.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(im->native.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(im->native.target, 0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(im->native.target, gc->pipe[0].shader.cur_tex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + return pt; +} + +static Evas_GL_Texture_Pool * +_pool_tex_dynamic_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format) +{ + Evas_GL_Texture_Pool *pt = NULL; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + int fmt; // EGL_MAP_GL_TEXTURE_RGBA_SEC or EGL_MAP_GL_TEXTURE_RGB_SEC or bust + int pixtype; // EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC or bust + int glformat; + int attr[] = + { + EGL_MAP_GL_TEXTURE_WIDTH_SEC, 32, + EGL_MAP_GL_TEXTURE_HEIGHT_SEC, 32, + EGL_MAP_GL_TEXTURE_FORMAT_SEC, EGL_MAP_GL_TEXTURE_RGBA_SEC, + EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC, EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC, + EGL_NONE + }; + void *egldisplay; + + if (intformat != format) return NULL; + + switch (intformat) + { +#ifdef EGL_MAP_GL_TEXTURE_LUMINANCE_SEC + case GL_LUMINANCE: attr[5] = EGL_MAP_GL_TEXTURE_LUMINANCE_SEC; break; +#endif +#ifdef EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC + case GL_LUMINANCE_ALPHA: attr[5] = EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC; break; +#endif + case GL_RGBA: attr[5] = EGL_MAP_GL_TEXTURE_RGBA_SEC; break; + case GL_BGRA: attr[5] = EGL_MAP_GL_TEXTURE_BGRA_SEC; break; + default: fprintf(stderr, "unknown format\n"); return NULL; + } + + pt = calloc(1, sizeof(Evas_GL_Texture_Pool)); + if (!pt) return NULL; + h = _tex_round_slot(gc, h) * gc->shared->info.tune.atlas.slot_size; + _tex_adjust(gc, &w, &h); + pt->gc = gc; + pt->w = w; + pt->h = h; + pt->intformat = intformat; + pt->format = format; + pt->dataformat = GL_UNSIGNED_BYTE; + pt->render = 1; + pt->references = 0; + texinfo.d.num++; + texinfo.d.pix += pt->w * pt->h; + + _print_tex_count(); + + glGenTextures(1, &(pt->texture)); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + egldisplay = pt->gc->egldisp; + + attr[1] = pt->w; + attr[3] = pt->h; + + // FIXME: seems a bit slower than i'd like - maybe too many flushes? + // FIXME: YCbCr no support as yet + pt->dyn.img = secsym_eglCreateImage(egldisplay, + EGL_NO_CONTEXT, + EGL_MAP_GL_TEXTURE_2D_SEC, + 0, attr); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + if (!pt->dyn.img) + { + glBindTexture(GL_TEXTURE_2D, 0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glDeleteTextures(1, &(pt->texture)); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + free(pt); + return NULL; + } + if (secsym_eglGetImageAttribSEC(egldisplay, + pt->dyn.img, + EGL_MAP_GL_TEXTURE_WIDTH_SEC, + &(pt->dyn.w)) != EGL_TRUE) goto error; + if (secsym_eglGetImageAttribSEC(egldisplay, + pt->dyn.img, + EGL_MAP_GL_TEXTURE_HEIGHT_SEC, + &(pt->dyn.h)) != EGL_TRUE) goto error; + if (secsym_eglGetImageAttribSEC(egldisplay, + pt->dyn.img, + EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC, + &(pt->dyn.stride)) != EGL_TRUE) goto error; + if (secsym_eglGetImageAttribSEC(egldisplay, + pt->dyn.img, + EGL_MAP_GL_TEXTURE_FORMAT_SEC, + &(fmt)) != EGL_TRUE) goto error; + + if (secsym_eglGetImageAttribSEC(egldisplay, + pt->dyn.img, + EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC, + &(pixtype)) != EGL_TRUE) goto error; + + if (pixtype != EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC) goto error; + + glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#else + gc = NULL; + w = 0; + h = 0; + intformat = 0; + format = 0; +#endif + return pt; + +/* ERROR HANDLING */ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +error: + secsym_eglDestroyImage(egldisplay, pt->dyn.img); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + pt->dyn.img = NULL; + glBindTexture(GL_TEXTURE_2D, 0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glDeleteTextures(1, &(pt->texture)); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + free(pt); + return NULL; +#endif +} + +void +evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt) +{ + if (!pt->gc) return; + + if (pt->format == alpha_fmt) + { + texinfo.a.num--; + texinfo.a.pix -= pt->w * pt->h; + } + else if (pt->format == lum_fmt) + { + texinfo.v.num--; + texinfo.v.pix -= pt->w * pt->h; + } + else if (pt->dyn.img) + { + texinfo.d.num--; + texinfo.d.pix -= pt->w * pt->h; + } + else if (pt->render) + { + texinfo.r.num--; + texinfo.r.pix -= pt->w * pt->h; + } + else if (pt->native) + { + texinfo.n.num--; + texinfo.n.pix -= pt->w * pt->h; + } + else + { + texinfo.c.num--; + texinfo.c.pix -= pt->w * pt->h; + } + + _print_tex_count(); + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (pt->dyn.img) + { + if (pt->dyn.checked_out > 0) + secsym_eglUnmapImageSEC(pt->gc->egldisp, pt->dyn.img); + secsym_eglDestroyImage(pt->gc->egldisp, pt->dyn.img); + pt->dyn.img = NULL; + pt->dyn.data = NULL; + pt->dyn.w = 0; + pt->dyn.h = 0; + pt->dyn.stride = 0; + pt->dyn.checked_out = 0; + } +#endif + + glDeleteTextures(1, &(pt->texture)); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + if (pt->fb) + { + glsym_glDeleteFramebuffers(1, &(pt->fb)); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + pt->fb = 0; + } + while (pt->allocations) + pt->allocations = + eina_list_remove_list(pt->allocations, pt->allocations); + pt->texture = 0; + pt->gc = NULL; + pt->w = 0; + pt->h = 0; +} + +static void +pt_unref(Evas_GL_Texture_Pool *pt) +{ + if (!pt) return; + if (!pt->gc) return; + pt->references--; + if (pt->references != 0) return; + + if (!((pt->render) || (pt->native))) + { + if (pt->whole) + pt->gc->shared->tex.whole = + eina_list_remove(pt->gc->shared->tex.whole, pt); + else + pt->gc->shared->tex.atlas [pt->slot][pt->fslot] = + eina_list_remove(pt->gc->shared->tex.atlas[pt->slot][pt->fslot], pt); + } + evas_gl_texture_pool_empty(pt); + free(pt); +} + +static void +pt_link(Evas_Engine_GL_Context *gc, Evas_GL_Texture *tex, Evas_GL_Texture_Pool *pt) +{ + gc->shared->tex.whole = eina_list_prepend(gc->shared->tex.whole, pt); + pt->slot = -1; + pt->fslot = -1; + pt->whole = 1; + pt->allocations = eina_list_prepend(pt->allocations, tex); + pt->references++; +} + +Evas_GL_Texture * +evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im) +{ + Evas_GL_Texture *tex; + + tex = calloc(1, sizeof(Evas_GL_Texture)); + if (!tex) return NULL; + + tex->gc = gc; + tex->references = 1; + tex->alpha = alpha; + if (alpha) + { + if (gc->shared->info.bgra) + tex->pt = _pool_tex_native_new(gc, w, h, rgba_ifmt, rgba_fmt, im); + else + tex->pt = _pool_tex_native_new(gc, w, h, rgba_ifmt, rgba_fmt, im); + } + else + { + if (gc->shared->info.bgra) + tex->pt = _pool_tex_native_new(gc, w, h, rgb_ifmt, rgb_fmt, im); + else + tex->pt = _pool_tex_native_new(gc, w, h, rgb_ifmt, rgb_fmt, im); + } + if (!tex->pt) + { + free(tex); + return NULL; + } + tex->x = 0; + tex->y = 0; + tex->w = w; + tex->h = h; + tex->pt->references++; + return tex; +} + +Evas_GL_Texture * +evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha) +{ + Evas_GL_Texture *tex; + + tex = calloc(1, sizeof(Evas_GL_Texture)); + if (!tex) return NULL; + + tex->gc = gc; + tex->references = 1; + tex->alpha = alpha; + if (alpha) + { + if (gc->shared->info.bgra) + tex->pt = _pool_tex_render_new(gc, w, h, rgba_ifmt, rgba_fmt); + else + tex->pt = _pool_tex_render_new(gc, w, h, rgba_ifmt, rgba_fmt); + } + else + { + if (gc->shared->info.bgra) + tex->pt = _pool_tex_render_new(gc, w, h, rgb_ifmt, rgb_fmt); + else + tex->pt = _pool_tex_render_new(gc, w, h, rgb_ifmt, rgb_fmt); + } + if (!tex->pt) + { + free(tex); + return NULL; + } + tex->x = 0; + tex->y = 0; + tex->w = w; + tex->h = h; + tex->pt->references++; + return tex; +} + +Evas_GL_Texture * +evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im) +{ + Evas_GL_Texture *tex; + + tex = calloc(1, sizeof(Evas_GL_Texture)); + if (!tex) return NULL; + + tex->gc = gc; + tex->references = 1; + tex->alpha = im->alpha; + tex->x = 0; + tex->y = 0; + tex->w = im->w; + tex->h = im->h; + if (tex->alpha) + { + if (gc->shared->info.bgra) + tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt); + else + tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt); + } + else + { + if (gc->shared->info.bgra) + tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt); + else + tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt); + } + if (!tex->pt) + { + free(tex); + return NULL; + } + tex->pt->references++; + return tex; +} + +void +evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im) +{ + GLuint fmt; + + if (tex->alpha != im->cache_entry.flags.alpha) + { + tex->pt->allocations = eina_list_remove(tex->pt->allocations, tex); + pt_unref(tex->pt); + tex->alpha = im->cache_entry.flags.alpha; + if (tex->alpha) + { + if (tex->gc->shared->info.bgra) + tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, bgra_ifmt, bgra_fmt); + else + tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, rgba_ifmt, rgba_fmt); + } + else + { + if (tex->gc->shared->info.bgra) + tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, bgr_ifmt, bgr_fmt); + else + tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, rgb_ifmt, rgb_fmt); + } + } + if (!tex->pt) return; + if (!im->image.data) return; + + fmt = tex->pt->format; + glBindTexture(GL_TEXTURE_2D, tex->pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#ifdef GL_UNPACK_ROW_LENGTH + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#endif + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + +// printf("tex upload %ix%i\n", im->cache_entry.w, im->cache_entry.h); + // +-+ + // +-+ + // + _tex_sub_2d(tex->x, tex->y, + im->cache_entry.w, im->cache_entry.h, + fmt, tex->pt->dataformat, + im->image.data); + // xxx + // xxx + // --- + _tex_sub_2d(tex->x, tex->y + im->cache_entry.h, + im->cache_entry.w, 1, + fmt, tex->pt->dataformat, + im->image.data + ((im->cache_entry.h - 1) * im->cache_entry.w)); + // xxx + // xxx + // o + _tex_sub_2d(tex->x - 1, tex->y + im->cache_entry.h, + 1, 1, + fmt, tex->pt->dataformat, + im->image.data + ((im->cache_entry.h - 1) * im->cache_entry.w)); + // xxx + // xxx + // o + _tex_sub_2d(tex->x + im->cache_entry.w, tex->y + im->cache_entry.h, + 1, 1, + fmt, tex->pt->dataformat, + im->image.data + ((im->cache_entry.h - 1) * im->cache_entry.w) + (im->cache_entry.w - 1)); +#ifdef GL_UNPACK_ROW_LENGTH + glPixelStorei(GL_UNPACK_ROW_LENGTH, im->cache_entry.w); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + // |xxx + // |xxx + // + _tex_sub_2d(tex->x - 1, tex->y, + 1, im->cache_entry.h, + fmt, tex->pt->dataformat, + im->image.data); + // xxx| + // xxx| + // + _tex_sub_2d(tex->x + im->cache_entry.w, tex->y, + 1, im->cache_entry.h, + fmt, tex->pt->dataformat, + im->image.data + (im->cache_entry.w - 1)); +#else + { + DATA32 *tpix, *ps, *pd; + int i; + + tpix = alloca(im->cache_entry.h * sizeof(DATA32)); + pd = tpix; + ps = im->image.data; + for (i = 0; i < im->cache_entry.h; i++) + { + *pd = *ps; + pd++; + ps += im->cache_entry.w; + } + // |xxx + // |xxx + // + _tex_sub_2d(tex->x - 1, tex->y, + 1, im->cache_entry.h, + fmt, tex->pt->dataformat, + tpix); + pd = tpix; + ps = im->image.data + (im->cache_entry.w - 1); + for (i = 0; i < im->cache_entry.h; i++) + { + *pd = *ps; + pd++; + ps += im->cache_entry.w; + } + // xxx| + // xxx| + // + _tex_sub_2d(tex->x + im->cache_entry.w, tex->y, + 1, im->cache_entry.h, + fmt, tex->pt->dataformat, + tpix); + } +#endif + if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex) + { + glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } +} + +void +evas_gl_common_texture_free(Evas_GL_Texture *tex) +{ + if (!tex) return; + tex->references--; + if (tex->references != 0) return; + if (tex->double_buffer.pt[0]) + { + tex->double_buffer.pt[0]->allocations = eina_list_remove(tex->double_buffer.pt[0]->allocations, tex); + tex->double_buffer.pt[1]->allocations = eina_list_remove(tex->double_buffer.pt[1]->allocations, tex); + tex->double_buffer.ptuv[0]->allocations = eina_list_remove(tex->double_buffer.ptuv[0]->allocations, tex); + tex->double_buffer.ptuv[1]->allocations = eina_list_remove(tex->double_buffer.ptuv[1]->allocations, tex); + } + else + { + if (tex->pt) + { + tex->pt->allocations = eina_list_remove(tex->pt->allocations, tex); + pt_unref(tex->pt); + } + if (tex->ptu) + { + tex->ptu->allocations = eina_list_remove(tex->ptu->allocations, tex); + pt_unref(tex->ptu); + } + if (tex->ptv) + { + tex->ptv->allocations = eina_list_remove(tex->ptv->allocations, tex); + pt_unref(tex->ptv); + } + if (tex->ptuv) + { + tex->ptuv->allocations = eina_list_remove(tex->ptuv->allocations, tex); + pt_unref(tex->ptuv); + } + } + free(tex); +} + +Evas_GL_Texture * +evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, + unsigned int w, unsigned int h, int fh) +{ + Evas_GL_Texture *tex; + Eina_List *l_after = NULL; + int u = 0, v = 0; + + tex = calloc(1, sizeof(Evas_GL_Texture)); + if (!tex) return NULL; + + tex->gc = gc; + tex->references = 1; + tex->pt = _pool_tex_find(gc, w + 3, fh, alpha_ifmt, alpha_fmt, &u, &v, + &l_after, + gc->shared->info.tune.atlas.max_alloc_alpha_size); + if (!tex->pt) + { + free(tex); + return NULL; + } + tex->x = u + 1; + tex->y = v; + tex->w = w; + tex->h = h; + if (l_after) + tex->pt->allocations = + eina_list_append_relative_list(tex->pt->allocations, tex, l_after); + else + tex->pt->allocations = eina_list_prepend(tex->pt->allocations, tex); + tex->pt->references++; + evas_gl_common_texture_alpha_update(tex, pixels, w, h, fh); + return tex; +} + +void +evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, + unsigned int w, unsigned int h, int fh __UNUSED__) +{ + if (!tex->pt) return; + glBindTexture(GL_TEXTURE_2D, tex->pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#ifdef GL_UNPACK_ROW_LENGTH + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); +#endif + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_sub_2d(tex->x, tex->y, w, h, tex->pt->format, tex->pt->dataformat, + pixels); + if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex) + { + glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } +} + +Evas_GL_Texture * +evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h) +{ + Evas_GL_Texture *tex; + + tex = calloc(1, sizeof(Evas_GL_Texture)); + if (!tex) return NULL; + + tex->gc = gc; + tex->references = 1; + tex->ptu = _pool_tex_new(gc, w / 2 + 1, h / 2 + 1, lum_ifmt, lum_fmt); + if (!tex->ptu) + { + free(tex); + return NULL; + } + gc->shared->tex.whole = eina_list_prepend(gc->shared->tex.whole, tex->ptu); + tex->ptu->slot = -1; + tex->ptu->fslot = -1; + tex->ptu->whole = 1; + tex->ptv = _pool_tex_new(gc, tex->ptu->w, tex->ptu->h, lum_ifmt, lum_fmt); + if (!tex->ptv) + { + pt_unref(tex->pt); + pt_unref(tex->ptu); + free(tex); + return NULL; + } + gc->shared->tex.whole = eina_list_prepend(gc->shared->tex.whole, tex->ptv); + tex->ptv->slot = -1; + tex->ptv->fslot = -1; + tex->ptv->whole = 1; + tex->pt = _pool_tex_new(gc, tex->ptu->w * 2, tex->ptu->h * 2, lum_ifmt, lum_fmt); + if (!tex->pt) + { + free(tex); + return NULL; + } + gc->shared->tex.whole = eina_list_prepend(gc->shared->tex.whole, tex->pt); + tex->pt->slot = -1; + tex->pt->fslot = -1; + tex->pt->whole = 1; + tex->x = 0; + tex->y = 0; + tex->w = w; + tex->h = h; + tex->pt->allocations = eina_list_prepend(tex->pt->allocations, tex); + tex->ptu->allocations = eina_list_prepend(tex->ptu->allocations, tex); + tex->ptv->allocations = eina_list_prepend(tex->ptv->allocations, tex); + tex->pt->references++; + tex->ptu->references++; + tex->ptv->references++; + evas_gl_common_texture_yuv_update(tex, rows, w, h); + return tex; +} + +void +evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h) +{ + if (!tex->pt) return; + // FIXME: works on lowest size 4 pixel high buffers. must also be multiple of 2 +#ifdef GL_UNPACK_ROW_LENGTH + glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[1] - rows[0]); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, tex->pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); + _tex_sub_2d(0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]); + glBindTexture(GL_TEXTURE_2D, tex->ptu->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[h + 1] - rows[h]); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->ptu->intformat, w / 2, h / 2, tex->ptu->format, tex->ptu->dataformat); + _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptu->format, tex->ptu->dataformat, rows[h]); + glBindTexture(GL_TEXTURE_2D, tex->ptv->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[h + (h / 2) + 1] - rows[h + (h / 2)]); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->ptv->intformat, w / 2, h / 2, tex->ptv->format, tex->ptv->dataformat); + _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptv->format, tex->ptv->dataformat, rows[h + (h / 2)]); +#else + unsigned int y; + + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, tex->pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); + if ((rows[1] - rows[0]) == (int)w) + _tex_sub_2d(0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]); + else + { + for (y = 0; y < h; y++) + _tex_sub_2d(0, y, w, 1, tex->pt->format, tex->pt->dataformat, rows[y]); + } + + glBindTexture(GL_TEXTURE_2D, tex->ptu->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->ptu->intformat, w / 2, h / 2, tex->ptu->format, tex->ptu->dataformat); + if ((rows[h + 1] - rows[h]) == (int)(w / 2)) + _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptu->format, tex->ptu->dataformat, rows[h]); + else + { + for (y = 0; y < (h / 2); y++) + _tex_sub_2d(0, y, w / 2, 1, tex->ptu->format, tex->ptu->dataformat, rows[h + y]); + } + + glBindTexture(GL_TEXTURE_2D, tex->ptv->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->ptv->intformat, w / 2, h / 2, tex->ptv->format, tex->ptv->dataformat); + if ((rows[h + (h / 2) + 1] - rows[h + (h / 2)]) == (int)(w / 2)) + _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptv->format, tex->ptv->dataformat, rows[h + (h / 2)]); + else + { + for (y = 0; y < (h / 2); y++) + _tex_sub_2d(0, y, w / 2, 1, tex->ptv->format, tex->ptv->dataformat, rows[h + (h / 2) + y]); + } +#endif + if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex) + { + glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } +} + +static Evas_GL_Texture * +_evas_gl_common_texture_y2uv_new(Evas_Engine_GL_Context *gc, + unsigned int yw, unsigned int yh, + Eina_Bool uv2w, Eina_Bool uv2h, + GLenum y_ifmt, GLenum y_fmt, + GLenum uv_ifmt, GLenum uv_fmt, + Eina_Bool dynamic) +{ + Evas_GL_Texture_Pool *pt[2] = { NULL, NULL }; + Evas_GL_Texture_Pool *ptuv[2] = { NULL, NULL }; + Evas_GL_Texture *tex; + unsigned int uvw, uvh; + + uvw = uv2w ? yw / 2 + 1 : yw + 1; + uvh = uv2h ? yh / 2 + 1 : yh + 1; + + if (!dynamic) + { + ptuv[0] = _pool_tex_new(gc, uvw, uvh, uv_ifmt, uv_fmt); + ptuv[1] = _pool_tex_new(gc, uvw, uvh, uv_ifmt, uv_fmt); + + if (ptuv[0] && ptuv[1]) + { + pt[0] = _pool_tex_new(gc, + ptuv[0]->w * (uv2w ? 2 : 1), + ptuv[0]->h * (uv2h ? 2 : 1), + y_ifmt, y_fmt); + pt[1] = _pool_tex_new(gc, + ptuv[1]->w * (uv2w ? 2 : 1), + ptuv[1]->h * (uv2h ? 2 : 1), + y_ifmt, y_fmt); + } + } + else + { + ptuv[0] = _pool_tex_dynamic_new(gc, uvw, uvh, uv_ifmt, uv_fmt); + ptuv[1] = _pool_tex_dynamic_new(gc, uvw, uvh, uv_ifmt, uv_fmt); + + if (ptuv[0] && ptuv[1]) + { + pt[0] = _pool_tex_dynamic_new(gc, + ptuv[0]->w * (uv2w ? 2 : 1), + ptuv[0]->h * (uv2h ? 2 : 1), + y_ifmt, y_fmt); + pt[1] = _pool_tex_dynamic_new(gc, + ptuv[1]->w * (uv2w ? 2 : 1), + ptuv[1]->h * (uv2h ? 2 : 1), + y_ifmt, y_fmt); + } + } + + if (!pt[0] || !pt[1] || !ptuv[0] || !ptuv[1]) + goto on_error; + + INF("YUV [%i, %i] => Y[%i, %i], UV[%i, %i]", + yw, yh, + pt[0]->w, pt[0]->h, + ptuv[0]->w, ptuv[0]->h); + tex = calloc(1, sizeof(Evas_GL_Texture)); + if (!tex) + goto on_error; + + tex->gc = gc; + tex->references = 1; + tex->pt = pt[0]; + tex->ptuv = ptuv[0]; + tex->dyn = dynamic; + + pt_link(gc, tex, pt[0]); + pt_link(gc, tex, pt[1]); + pt_link(gc, tex, ptuv[0]); + pt_link(gc, tex, ptuv[1]); + + tex->x = 0; + tex->y = 0; + tex->w = yw; + tex->h = yh; + tex->double_buffer.source = 0; + memcpy(tex->double_buffer.pt, pt, sizeof (Evas_GL_Texture_Pool *) * 2); + memcpy(tex->double_buffer.ptuv, ptuv, sizeof (Evas_GL_Texture_Pool *) * 2); + + return tex; + + on_error: + pt_unref(pt[0]); + pt_unref(pt[1]); + pt_unref(ptuv[0]); + pt_unref(ptuv[1]); + return NULL; +} + +Evas_GL_Texture * +evas_gl_common_texture_yuy2_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h) +{ + Evas_GL_Texture *tex; + + tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_FALSE, lum_alpha_ifmt, lum_alpha_fmt, rgba8_ifmt, rgba8_fmt, 0); + evas_gl_common_texture_yuy2_update(tex, rows, w, h); + return tex; +} + +Evas_GL_Texture * +evas_gl_common_texture_nv12_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h) +{ + Evas_GL_Texture *tex; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 1); + if (!tex) +#endif + tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 0); + + evas_gl_common_texture_nv12_update(tex, rows, w, h); + return tex; +} + +Evas_GL_Texture * +evas_gl_common_texture_nv12tiled_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h) +{ + Evas_GL_Texture *tex = NULL; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 1); + if (!tex) +#endif + tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 0); + + evas_gl_common_texture_nv12tiled_update(tex, rows, w, h); + return tex; +} + +void +evas_gl_common_texture_yuy2_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h) +{ + if (!tex->pt) return; + // FIXME: works on lowest size 4 pixel high buffers. must also be multiple of 2 + unsigned int y; + + tex->double_buffer.source = 1 - tex->double_buffer.source; + tex->pt = tex->double_buffer.pt[tex->double_buffer.source]; + tex->ptuv = tex->double_buffer.ptuv[tex->double_buffer.source]; + + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, tex->pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); + if ((rows[1] - rows[0]) == (int)w * 4) + _tex_sub_2d(0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]); + else + { + for (y = 0; y < h; y++) + _tex_sub_2d(0, y, w, 1, tex->pt->format, tex->pt->dataformat, rows[y]); + } + + glBindTexture(GL_TEXTURE_2D, tex->ptuv->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->ptuv->intformat, w / 2, h, tex->ptuv->format, tex->ptuv->dataformat); +#if 0 + /* + FIXME: this piece of code doesn't work anymore since texture width + is not anymore exactly w / 2. I don't understand why. + */ + if ((rows[1] - rows[0]) == (int)(w * 2)) + _tex_sub_2d(0, 0, w / 2, h, tex->ptuv->format, tex->ptuv->dataformat, rows[0]); + else +#endif + { + for (y = 0; y < h; y++) + _tex_sub_2d(0, y, w / 2, 1, tex->ptuv->format, tex->ptuv->dataformat, rows[y]); + } + + if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex) + { + glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } +} + +void +evas_gl_common_texture_nv12_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h) +{ + if (!tex->pt) return; + + tex->double_buffer.source = 1 - tex->double_buffer.source; + tex->pt = tex->double_buffer.pt[tex->double_buffer.source]; + tex->ptuv = tex->double_buffer.ptuv[tex->double_buffer.source]; + + // FIXME: works on lowest size 4 pixel high buffers. must also be multiple of 2 +#ifdef GL_UNPACK_ROW_LENGTH + glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[1] - rows[0]); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, tex->pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); + _tex_sub_2d(0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]); + glBindTexture(GL_TEXTURE_2D, tex->ptuv->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[h + 1] - rows[h]); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->ptuv->intformat, w / 2, h / 2, tex->ptuv->format, tex->ptuv->dataformat); + _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptuv->format, tex->ptuv->dataformat, rows[h]); +#else + unsigned int y; + + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + glBindTexture(GL_TEXTURE_2D, tex->pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); + if ((rows[1] - rows[0]) == (int)w) + _tex_sub_2d(0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]); + else + { + for (y = 0; y < h; y++) + _tex_sub_2d(0, y, w, 1, tex->pt->format, tex->pt->dataformat, rows[y]); + } + + glBindTexture(GL_TEXTURE_2D, tex->ptuv->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + _tex_2d(tex->ptuv->intformat, w / 2, h / 2, tex->ptuv->format, tex->ptuv->dataformat); + if ((rows[h + 1] - rows[h]) == (int)(w / 2)) + _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptuv->format, tex->ptuv->dataformat, rows[h]); + else + { + for (y = 0; y < (h / 2); y++) + _tex_sub_2d(0, y, w / 2, 1, tex->ptuv->format, tex->ptuv->dataformat, rows[h + y]); + } +#endif + if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex) + { + glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } +} + +void +evas_gl_common_texture_nv12tiled_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h) +{ + unsigned int mb_x, mb_y, mb_w, mb_h; + unsigned int base_h; + + if (!tex->pt) return; + + tex->double_buffer.source = 1 - tex->double_buffer.source; + tex->pt = tex->double_buffer.pt[tex->double_buffer.source]; + tex->ptuv = tex->double_buffer.ptuv[tex->double_buffer.source]; + + mb_w = w / 64 + (w % 64 ? 1 : 0); + mb_h = h / 32 + (h % 32 ? 1 : 0); + +#if ( defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) ) + if (tex->dyn) + { + char *texture_addr; + char *tmp; + + texture_addr = secsym_eglMapImageSEC(tex->gc->egldisp, tex->pt->dyn.img); + + /* Iterate each Y macroblock like we do in evas_convert_yuv.c */ + for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) + { + int step = 2; + int offset = 0; + int x = 0; + int rmb_x = 0; + int ry[2]; + + ry[0] = mb_y * 2 * 32 * tex->pt->dyn.stride; + ry[1] = ry[0] + 32 * tex->pt->dyn.stride; + + for (mb_x = 0; mb_x < mb_w * 2; mb_x++, rmb_x += 64 * 32) + { + unsigned int i; + + tmp = texture_addr + x + ry[offset]; + + for (i = 0; i < 32 * 64; i += 64, tmp += tex->pt->dyn.stride) + memcpy(tmp, rows[mb_y] + rmb_x + i, 64); + + step++; + if ((step & 0x3) == 0) + { + offset = 1 - offset; + x -= 64; + } + else + { + x += 64; + } + } + } + + if (mb_h & 0x1) + { + int rmb_x = 0; + int x = 0; + int ry; + + ry = mb_y * 2 * 32 * tex->pt->dyn.stride; + + for (mb_x = 0; mb_x < mb_w; mb_x++, x += 64, rmb_x += 64 * 32) + { + unsigned int i; + + tmp = texture_addr + x + ry; + + for (i = 0; i < 32 * 64; i += 64, tmp += tex->pt->dyn.stride) + memcpy(tmp, rows[mb_y] + rmb_x + i, 64); + } + } + + secsym_eglUnmapImageSEC(tex->gc->egldisp, tex->pt->dyn.img); + + texture_addr = secsym_eglMapImageSEC(tex->gc->egldisp, tex->ptuv->dyn.img); + + /* Iterate each UV macroblock like we do in evas_convert_yuv.c */ + base_h = (mb_h >> 1) + (mb_h & 0x1); + + /* h is always a multiple of 32 */ + mb_h = h / 2; + mb_h = (mb_h / 32 + (mb_h % 32 ? 1 : 0)); + + mb_w = w / 2; + mb_w = (mb_w / 32 + (mb_w % 32 ? 1 : 0)); + + for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) + { + int step = 2; + int offset = 0; + int x = 0; + int rmb_x = 0; + int ry[2]; + + ry[0] = mb_y * 2 * 32 * tex->ptuv->dyn.stride; + ry[1] = ry[0] + 32 * tex->ptuv->dyn.stride; + + for (mb_x = 0; mb_x < mb_w * 4; mb_x++, rmb_x += 64 * 32) + { + unsigned int i = 0; + + tmp = texture_addr + x + ry[offset]; + + for (i = 0; i < 32 * 64; i += 64, tmp += tex->ptuv->dyn.stride) + memcpy(tmp, rows[mb_y + base_h] + rmb_x + i, 64); + + step++; + if ((step & 0x3) == 0) + { + offset = 1 - offset; + x -= 64; + } + else + { + x += 64; + } + } + } + + if (mb_h & 0x1) + { + int rmb_x = 0; + int x = 0; + int ry; + + ry = mb_y * 2 * 32 * tex->ptuv->dyn.stride; + + for (mb_x = 0; mb_x < mb_w * 2; mb_x++, x += 64, rmb_x += 64 * 32) + { + unsigned int i; + + tmp = texture_addr + x + ry; + + /* It has horizontaly half the pixels, but they are double the size*/ + for (i = 0; i < 32 * 64; i += 64, tmp += tex->ptuv->dyn.stride) + memcpy(tmp, rows[mb_y + base_h] + rmb_x + i, 64); + } + } + + secsym_eglUnmapImageSEC(tex->gc->egldisp, tex->ptuv->dyn.img); + return ; + } +#endif + + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + glBindTexture(GL_TEXTURE_2D, tex->pt->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + // We are telling the driver to not swizzle back the buffer as we are going to replace all pixel + _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); + + /* Iterate each Y macroblock like we do in evas_convert_yuv.c */ + for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) + { + int step = 2; + int offset = 0; + int x = 0; + int rmb_x = 0; + int ry[2]; + + ry[0] = mb_y * 2 * 32; + ry[1] = ry[0] + 32; + + for (mb_x = 0; mb_x < mb_w * 2; mb_x++, rmb_x += 64 * 32) + { + _tex_sub_2d(x, ry[offset], 64, 32, tex->pt->format, tex->pt->dataformat, rows[mb_y] + rmb_x); + + step++; + if ((step & 0x3) == 0) + { + offset = 1 - offset; + x -= 64; + } + else + { + x += 64; + } + } + } + + if (mb_h & 0x1) + { + int rmb_x = 0; + int x = 0; + int ry; + + ry = mb_y * 2 * 32; + + for (mb_x = 0; mb_x < mb_w; mb_x++, x += 64, rmb_x += 64 * 32) + _tex_sub_2d(x, ry, 64, 32, tex->pt->format, tex->pt->dataformat, rows[mb_y] + rmb_x); + } + + glBindTexture(GL_TEXTURE_2D, tex->ptuv->texture); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + + _tex_2d(tex->ptuv->intformat, w, h, tex->ptuv->format, tex->ptuv->dataformat); + + /* Iterate each UV macroblock like we do in evas_convert_yuv.c */ + base_h = (mb_h >> 1) + (mb_h & 0x1); + + /* h is always a multiple of 32 */ + mb_h = h / 2; + mb_h = (mb_h / 32 + (mb_h % 32 ? 1 : 0)); + + mb_w = w / 2; + mb_w = (mb_w / 32 + (mb_w % 32 ? 1 : 0)); + + for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) + { + int step = 2; + int offset = 0; + int x = 0; + int rmb_x = 0; + int ry[2]; + + ry[0] = mb_y * 2 * 32; + ry[1] = ry[0] + 32; + + for (mb_x = 0; mb_x < mb_w * 2; mb_x++, rmb_x += 64 * 32) + { + _tex_sub_2d(x, ry[offset], 32, 32, + tex->ptuv->format, tex->ptuv->dataformat, + rows[mb_y + base_h] + rmb_x); + step++; + if ((step & 0x3) == 0) + { + offset = 1 - offset; + x -= 32; + } + else + { + x += 32; + } + } + } + + if (mb_h & 0x1) + { + int rmb_x = 0; + int x = 0; + int ry; + + ry = mb_y * 2 * 32; + + for (mb_x = 0; mb_x < mb_w; mb_x++, x += 32, rmb_x += 64 * 32) + _tex_sub_2d(x, ry, 64, 32, tex->ptuv->format, tex->ptuv->dataformat, rows[mb_y + base_h] + rmb_x); + } +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/compile-s3c6410.sh b/libraries/evas/src/modules/engines/gl_common/shader/compile-s3c6410.sh new file mode 100755 index 0000000..450e5de --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/compile-s3c6410.sh @@ -0,0 +1,47 @@ +#!/bin/sh +ORIONEXE=/home/raster/Data/orion/orion.exe +OPTS="-O --nolodcalc -lp" + +function compile() +{ + F=$1 + + make-c-str.sh $F"_frag.shd" > $F"_frag.h" + if test -f $F"_frag_s3c6410.asm"; then + wine $ORIONEXE -a $OPTS -f $F"_frag_s3c6410.asm" + make-c-bin.sh $F"_frag_s3c6410.bin" > $F"_frag_bin_s3c6410.h" + rm -f $F"_frag_s3c6410.bin" $F"_frag_s3c6410.h" + else + wine $ORIONEXE $OPTS -f $F"_frag.shd" + make-c-bin.sh $F"_frag.shd.bin" > $F"_frag_bin_s3c6410.h" + rm -f $F"_frag.shd.bin" $F"_frag.shd.asm" $F"_frag.shd.h" + fi + + make-c-str.sh $F"_vert.shd" > $F"_vert.h" + if test -f $F"_vert_s3c6410.asm"; then + wine $ORIONEXE -a $OPTS -v $F"_vert_s3c6410.asm" + make-c-bin.sh $F"_vert_s3c6410.bin" > $F"_vert_bin_s3c6410.h" + rm -f $F"_vert_s3c6410.bin" $F"_vert_s3c6410.h" + else + wine $ORIONEXE $OPTS -v $F"_vert.shd" + make-c-bin.sh $F"_vert.shd.bin" > $F"_vert_bin_s3c6410.h" + rm -f $F"_vert.shd.bin" $F"_vert.shd.asm" $F"_vert.shd.h" + fi +} + +compile rect +compile font +compile img +compile img_nomul +compile img_bgra +compile img_bgra_nomul +compile img_mask +compile yuv +compile yuv_nomul +compile tex +compile tex_nomul +compile nv12 +compile nv12_nomul +compile yuy2 +compile yuy2_nomul +## FIXME: compile filter_* diff --git a/libraries/evas/src/modules/engines/gl_common/shader/compile-sgx.sh b/libraries/evas/src/modules/engines/gl_common/shader/compile-sgx.sh new file mode 100755 index 0000000..a96b58c --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/compile-sgx.sh @@ -0,0 +1,48 @@ +#!/bin/bash +function compile() +{ + F=$1 + + if [ -f $F".shd" ]; then + make-c-str.sh $F".shd" > $F".h" + fi + if [ -f $F"_frag.shd" ]; then + make-c-str.sh $F"_frag.shd" > $F"_frag.h" + fi + if [ -f $F"_vert.shd" ]; then + make-c-str.sh $F"_vert.shd" > $F"_vert.h" + fi +} + +compile rect +compile font +compile img +compile img_nomul +compile img_bgra +compile img_bgra_nomul +compile img_mask +compile yuv +compile yuv_nomul +compile tex +compile tex_nomul +compile filter_blur_bgra +compile filter_blur_bgra_nomul +compile filter_blur +compile filter_blur_nomul +compile filter_greyscale_bgra +compile filter_greyscale_bgra_nomul +compile filter_greyscale +compile filter_greyscale_nomul +compile filter_invert_bgra +compile filter_invert_bgra_nomul +compile filter_invert +compile filter_invert_nomul +compile filter_sepia_bgra +compile filter_sepia_bgra_nomul +compile filter_sepia +compile filter_sepia_nomul +compile nv12 +compile nv12_nomul +compile yuy2 +compile yuy2_nomul + diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.h new file mode 100644 index 0000000..7c3a369 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.h @@ -0,0 +1,24 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"uniform sampler1D gaussian;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"varying weight;\n" +"uniform radius;\n" +"void main()\n" +"{\n" +" int i;\n" +" vec4 fc = vec4(0,0,0,0);\n" +" \n" +" for (i = 0 ; i < radius ; i ++){\n" +" fc += texture2D(tex, tex_c.xy).rgba *\n" +" texture1D(gaussian,i/radius).aaaa;\n" +" }\n" +" gl_FragColor = fc / 4 * col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.shd new file mode 100644 index 0000000..5f13a47 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.shd @@ -0,0 +1,24 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +uniform sampler1D gaussian; +varying vec4 col; +varying vec2 tex_c; +varying weight; +uniform radius; +void main() +{ + int i; + vec4 fc = vec4(0,0,0,0); + + for (i = 0 ; i < radius ; i ++){ + fc += texture2D(tex, tex_c.xy).rgba * + texture1D(gaussian,i/radius).aaaa; + } + gl_FragColor = fc / 4 * col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.h new file mode 100644 index 0000000..0862e4f --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.h @@ -0,0 +1,24 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"uniform sampler1D gaussian;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"varying weight;\n" +"uniform radius;\n" +"void main()\n" +"{\n" +" int i;\n" +" vec4 fc = vec4(0,0,0,0);\n" +" \n" +" for (i = 0 ; i < radius ; i ++){\n" +" fc += texture2D(tex, tex_c.xy).rgba *\n" +" texture1D(gaussian,i/radius).aaaa;\n" +" }\n" +" gl_FragColor = fc / 4;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.shd new file mode 100644 index 0000000..a9134df --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.shd @@ -0,0 +1,24 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +uniform sampler1D gaussian; +varying vec4 col; +varying vec2 tex_c; +varying weight; +uniform radius; +void main() +{ + int i; + vec4 fc = vec4(0,0,0,0); + + for (i = 0 ; i < radius ; i ++){ + fc += texture2D(tex, tex_c.xy).rgba * + texture1D(gaussian,i/radius).aaaa; + } + gl_FragColor = fc / 4; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.h new file mode 100644 index 0000000..0862e4f --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.h @@ -0,0 +1,24 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"uniform sampler1D gaussian;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"varying weight;\n" +"uniform radius;\n" +"void main()\n" +"{\n" +" int i;\n" +" vec4 fc = vec4(0,0,0,0);\n" +" \n" +" for (i = 0 ; i < radius ; i ++){\n" +" fc += texture2D(tex, tex_c.xy).rgba *\n" +" texture1D(gaussian,i/radius).aaaa;\n" +" }\n" +" gl_FragColor = fc / 4;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.shd new file mode 100644 index 0000000..a9134df --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.shd @@ -0,0 +1,24 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +uniform sampler1D gaussian; +varying vec4 col; +varying vec2 tex_c; +varying weight; +uniform radius; +void main() +{ + int i; + vec4 fc = vec4(0,0,0,0); + + for (i = 0 ; i < radius ; i ++){ + fc += texture2D(tex, tex_c.xy).rgba * + texture1D(gaussian,i/radius).aaaa; + } + gl_FragColor = fc / 4; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.h new file mode 100644 index 0000000..0862e4f --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.h @@ -0,0 +1,24 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"uniform sampler1D gaussian;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"varying weight;\n" +"uniform radius;\n" +"void main()\n" +"{\n" +" int i;\n" +" vec4 fc = vec4(0,0,0,0);\n" +" \n" +" for (i = 0 ; i < radius ; i ++){\n" +" fc += texture2D(tex, tex_c.xy).rgba *\n" +" texture1D(gaussian,i/radius).aaaa;\n" +" }\n" +" gl_FragColor = fc / 4;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.shd new file mode 100644 index 0000000..a9134df --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.shd @@ -0,0 +1,24 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +uniform sampler1D gaussian; +varying vec4 col; +varying vec2 tex_c; +varying weight; +uniform radius; +void main() +{ + int i; + vec4 fc = vec4(0,0,0,0); + + for (i = 0 ; i < radius ; i ++){ + fc += texture2D(tex, tex_c.xy).rgba * + texture1D(gaussian,i/radius).aaaa; + } + gl_FragColor = fc / 4; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.h new file mode 100644 index 0000000..850538a --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.h @@ -0,0 +1,15 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" float inten = dot(texture2D(tex,tex_c.xy).agb,vec3(.3, .59, .11));\n" +" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r) * col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd new file mode 100644 index 0000000..78ecf08 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd @@ -0,0 +1,15 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + float inten = dot(texture2D(tex,tex_c.xy).agb,vec3(.3, .59, .11)); + gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r) * col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.h new file mode 100644 index 0000000..3caef35 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.h @@ -0,0 +1,15 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));\n" +" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a) * col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.shd new file mode 100644 index 0000000..5dca381 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.shd @@ -0,0 +1,15 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11)); + gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a) * col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.h new file mode 100644 index 0000000..4cb36a8 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.h @@ -0,0 +1,14 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));\n" +" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a);\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.shd new file mode 100644 index 0000000..a077eea --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.shd @@ -0,0 +1,14 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec2 tex_c; +void main() +{ + float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11)); + gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a); +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.h new file mode 100644 index 0000000..f501a02 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.h @@ -0,0 +1,14 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" float inten = dot(texture2D(tex,tex_c.xy).abg,vec3(.3, .59, .11));\n" +" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r);\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.shd new file mode 100644 index 0000000..b5b8ec6 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.shd @@ -0,0 +1,14 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec2 tex_c; +void main() +{ + float inten = dot(texture2D(tex,tex_c.xy).abg,vec3(.3, .59, .11)); + gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r); +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.h new file mode 100644 index 0000000..46373e0 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.h @@ -0,0 +1,14 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.shd new file mode 100644 index 0000000..a75b058 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.shd @@ -0,0 +1,14 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.h new file mode 100644 index 0000000..3e3011d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.h @@ -0,0 +1,14 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_FragColor = (vec4(1.0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy))*col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.shd new file mode 100644 index 0000000..8d7df2d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.shd @@ -0,0 +1,14 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + gl_FragColor = (vec4(1.0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy))*col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.h new file mode 100644 index 0000000..b9f1e25 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.h @@ -0,0 +1,15 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" vec3 inv = vec3(1.0, 1.0, 1.0) - texture2D(tex,tex_c.xy).rgb;\n" +" gl_FragColor = vec4(inv.r, inv.g, inv.b, 1.0);\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.shd new file mode 100644 index 0000000..682acb2 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.shd @@ -0,0 +1,15 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + vec3 inv = vec3(1.0, 1.0, 1.0) - texture2D(tex,tex_c.xy).rgb; + gl_FragColor = vec4(inv.r, inv.g, inv.b, 1.0); +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.h new file mode 100644 index 0000000..46373e0 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.h @@ -0,0 +1,14 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.shd new file mode 100644 index 0000000..a75b058 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.shd @@ -0,0 +1,14 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.h new file mode 100644 index 0000000..50fbf12 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.h @@ -0,0 +1,20 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" vec3 inp = texture2D(tex,tex_c.xy).abg;\n" +" vec4 sep;\n" +" sep.r = dot(inp, vec3(.393, .769, .189));\n" +" sep.g = dot(inp, vec3(.349, .686, .168));\n" +" sep.b = dot(inp, vec3(.272, .534, .131));\n" +" sep.a = texture2D(tex,tex_c.xy).r;\n" +" gl_FragColor = sep * col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.shd new file mode 100644 index 0000000..027ecfb --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.shd @@ -0,0 +1,20 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + vec3 inp = texture2D(tex,tex_c.xy).abg; + vec4 sep; + sep.r = dot(inp, vec3(.393, .769, .189)); + sep.g = dot(inp, vec3(.349, .686, .168)); + sep.b = dot(inp, vec3(.272, .534, .131)); + sep.a = texture2D(tex,tex_c.xy).r; + gl_FragColor = sep * col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.h new file mode 100644 index 0000000..41e4283 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.h @@ -0,0 +1,20 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" vec3 inp = texture2D(tex,tex_c.xy).rgb;\n" +" vec4 sep;\n" +" sep.r = dot(inp, vec3(.393, .769, .189));\n" +" sep.g = dot(inp, vec3(.349, .686, .168));\n" +" sep.b = dot(inp, vec3(.272, .534, .131));\n" +" sep.a = texture2D(tex,tex_c.xy).a;\n" +" gl_FragColor = sep * col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd new file mode 100644 index 0000000..caed378 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd @@ -0,0 +1,20 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + vec3 inp = texture2D(tex,tex_c.xy).rgb; + vec4 sep; + sep.r = dot(inp, vec3(.393, .769, .189)); + sep.g = dot(inp, vec3(.349, .686, .168)); + sep.b = dot(inp, vec3(.272, .534, .131)); + sep.a = texture2D(tex,tex_c.xy).a; + gl_FragColor = sep * col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.h new file mode 100644 index 0000000..0c4fe1b --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.h @@ -0,0 +1,18 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" vec3 inp = texture2D(tex,tex_c.xy).rgb;\n" +" gl_FragColor.r = dot(inp, vec3(.393, .769, .189));\n" +" gl_FragColor.g = dot(inp, vec3(.349, .686, .168));\n" +" gl_FragColor.b = dot(inp, vec3(.272, .534, .131));\n" +" gl_FragColor.a = texture2D(tex,tex_c.xy).a;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.shd new file mode 100644 index 0000000..9c6c1d4 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.shd @@ -0,0 +1,18 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + vec3 inp = texture2D(tex,tex_c.xy).rgb; + gl_FragColor.r = dot(inp, vec3(.393, .769, .189)); + gl_FragColor.g = dot(inp, vec3(.349, .686, .168)); + gl_FragColor.b = dot(inp, vec3(.272, .534, .131)); + gl_FragColor.a = texture2D(tex,tex_c.xy).a; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.h new file mode 100644 index 0000000..23af9ec --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.h @@ -0,0 +1,18 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" vec3 inp = texture2D(tex,tex_c.xy).abg;\n" +" gl_FragColor.r = dot(inp, vec3(.393, .769, .189));\n" +" gl_FragColor.g = dot(inp, vec3(.349, .686, .168));\n" +" gl_FragColor.b = dot(inp, vec3(.272, .534, .131));\n" +" gl_FragColor.a = texture2D(tex,tex_c.xy).r;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.shd new file mode 100644 index 0000000..f9871bd --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.shd @@ -0,0 +1,18 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + vec3 inp = texture2D(tex,tex_c.xy).abg; + gl_FragColor.r = dot(inp, vec3(.393, .769, .189)); + gl_FragColor.g = dot(inp, vec3(.349, .686, .168)); + gl_FragColor.b = dot(inp, vec3(.272, .534, .131)); + gl_FragColor.a = texture2D(tex,tex_c.xy).r; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/font_frag.h new file mode 100644 index 0000000..f27dcdc --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/font_frag.h @@ -0,0 +1,14 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_FragColor = texture2D(tex, tex_c.xy).aaaa * col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/font_frag.shd new file mode 100644 index 0000000..a8eb9b7 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/font_frag.shd @@ -0,0 +1,14 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + gl_FragColor = texture2D(tex, tex_c.xy).aaaa * col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/font_frag_bin_s3c6410.h new file mode 100644 index 0000000..daca692 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/font_frag_bin_s3c6410.h @@ -0,0 +1,9 @@ +0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000000, +0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000001, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000000, +0x00000000, 0x0000e407, 0x307820e4, 0x00000000, 0x01000000, 0x0100e400, +0x237a10ff, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000004, 0x00000003, 0x00000009, 0x00000000, 0x00000004, 0x00000008, +0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000003, +0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x006c6f63, 0x5f786574, +0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_frag_s3c6410.asm b/libraries/evas/src/modules/engines/gl_common/shader/font_frag_s3c6410.asm new file mode 100644 index 0000000..4ed116f --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/font_frag_s3c6410.asm @@ -0,0 +1,26 @@ +#------------------------------------------------- +# ORION - OpenGL ES 2.0 Shading Language Compiler +# SAMSUNG INDIA SOFTWARE OPERATIONS PVT. LTD. +# Compiler Version : v04.00.09 +# Release Date : 19.01.2009 +# FIMG VERSION : FIMGv1.5 +# Optimizer Options : -O --nolodcalc +#------------------------------------------------- + +# hand optimised - removed useless ops + +ps_3_0 + +fimg_version 0x01020000 + +dcl_s2_tex s0 +dcl_f4_col v1.x +dcl_f2_tex_c v0.x + +label start +label main_ +texld r0.xyzw, v0.xyzw, s0 # tex=s0 +mul_sat oColor.xyzw, r0.wwww, v1.xyzw # gl_FragColor=oColor.xyzw, col=v1.xyzw +label main_end +ret +# 4 instructions, 4 C regs, 1 R regs diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/font_vert.h new file mode 100644 index 0000000..8921d9d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/font_vert.h @@ -0,0 +1,15 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec4 color;\n" +"attribute vec2 tex_coord;\n" +"uniform mat4 mvp;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" col = color;\n" +" tex_c = tex_coord;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/font_vert.shd new file mode 100644 index 0000000..606c297 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/font_vert.shd @@ -0,0 +1,15 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec4 color; +attribute vec2 tex_coord; +uniform mat4 mvp; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + gl_Position = mvp * vertex; + col = color; + tex_c = tex_coord; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/font_vert_bin_s3c6410.h new file mode 100644 index 0000000..1402448 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/font_vert_bin_s3c6410.h @@ -0,0 +1,20 @@ +0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000006, +0x00000000, 0x00000000, 0x00000003, 0x00000003, 0x00000001, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000031, 0x00000000, +0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, +0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, +0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, +0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, +0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000c, 0x00000006, +0x00000009, 0x00000000, 0x00000000, 0x00000013, 0x00000005, 0x00000009, +0x00000000, 0x00000004, 0x00000019, 0x00000009, 0x00000003, 0x00000000, +0x00000008, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000, +0x00000027, 0x00000003, 0x00000009, 0x00010004, 0x00000004, 0x0000002b, +0x00000005, 0x00000003, 0x00010004, 0x00000008, 0x00000023, 0x00000003, +0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, +0x74726576, 0x63007865, 0x726f6c6f, 0x78657400, 0x6f6f635f, 0x6d006472, +0x63007076, 0x74006c6f, 0x635f7865, 0x00000000, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.h new file mode 100644 index 0000000..1ced5e0 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.h @@ -0,0 +1,14 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_FragColor = texture2D(tex, tex_c.xy) * col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.shd new file mode 100644 index 0000000..2bc8d79 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.shd @@ -0,0 +1,14 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + gl_FragColor = texture2D(tex, tex_c.xy) * col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag_bin_s3c6410.h new file mode 100644 index 0000000..feb5bf5 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag_bin_s3c6410.h @@ -0,0 +1,11 @@ +0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000004, 0x00000003, +0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000001, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000000, +0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, +0x307820e4, 0x00000000, 0x01000000, 0x0100e400, 0x237a10e4, 0x00000000, +0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, +0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000003, +0x00000009, 0x00000000, 0x00000004, 0x00000008, 0x00000005, 0x00000003, +0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x0000000f, 0x00030005, +0x00000000, 0x00786574, 0x006c6f63, 0x5f786574, 0x00000063, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.h new file mode 100644 index 0000000..459611f --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.h @@ -0,0 +1,13 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_FragColor = texture2D(tex, tex_c.xy);\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.shd new file mode 100644 index 0000000..877df62 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.shd @@ -0,0 +1,13 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec2 tex_c; +void main() +{ + gl_FragColor = texture2D(tex, tex_c.xy); +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag_bin_s3c6410.h new file mode 100644 index 0000000..b89eeb1 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag_bin_s3c6410.h @@ -0,0 +1,10 @@ +0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000003, +0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000001, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000a, 0x00000000, +0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, +0x307a10e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, +0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, +0x00000004, 0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, +0x00000003, 0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x5f786574, +0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.h new file mode 100644 index 0000000..13d5edd --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.h @@ -0,0 +1,12 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec2 tex_coord;\n" +"uniform mat4 mvp;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" tex_c = tex_coord;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.shd new file mode 100644 index 0000000..74f3207 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.shd @@ -0,0 +1,12 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec2 tex_coord; +uniform mat4 mvp; +varying vec2 tex_c; +void main() +{ + gl_Position = mvp * vertex; + tex_c = tex_coord; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert_bin_s3c6410.h new file mode 100644 index 0000000..314b5f3 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert_bin_s3c6410.h @@ -0,0 +1,17 @@ +0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000006, 0x00000006, +0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x00000001, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000027, 0x00000000, +0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, +0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, +0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, +0x20980154, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, +0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013, +0x00000009, 0x00000003, 0x00000000, 0x00000004, 0x00000000, 0x0000000b, +0x00000009, 0x00010004, 0x00000000, 0x00000021, 0x00000005, 0x00000003, +0x00010004, 0x00000004, 0x0000001d, 0x00000003, 0x0000000e, 0x00020001, +0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x74007865, +0x635f7865, 0x64726f6f, 0x70766d00, 0x78657400, 0x0000635f, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.h new file mode 100644 index 0000000..8921d9d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.h @@ -0,0 +1,15 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec4 color;\n" +"attribute vec2 tex_coord;\n" +"uniform mat4 mvp;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" col = color;\n" +" tex_c = tex_coord;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.shd new file mode 100644 index 0000000..606c297 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.shd @@ -0,0 +1,15 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec4 color; +attribute vec2 tex_coord; +uniform mat4 mvp; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + gl_Position = mvp * vertex; + col = color; + tex_c = tex_coord; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert_bin_s3c6410.h new file mode 100644 index 0000000..1402448 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert_bin_s3c6410.h @@ -0,0 +1,20 @@ +0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000006, +0x00000000, 0x00000000, 0x00000003, 0x00000003, 0x00000001, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000031, 0x00000000, +0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, +0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, +0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, +0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, +0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000c, 0x00000006, +0x00000009, 0x00000000, 0x00000000, 0x00000013, 0x00000005, 0x00000009, +0x00000000, 0x00000004, 0x00000019, 0x00000009, 0x00000003, 0x00000000, +0x00000008, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000, +0x00000027, 0x00000003, 0x00000009, 0x00010004, 0x00000004, 0x0000002b, +0x00000005, 0x00000003, 0x00010004, 0x00000008, 0x00000023, 0x00000003, +0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, +0x74726576, 0x63007865, 0x726f6c6f, 0x78657400, 0x6f6f635f, 0x6d006472, +0x63007076, 0x74006c6f, 0x635f7865, 0x00000000, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/img_frag.h new file mode 100644 index 0000000..0a95502 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_frag.h @@ -0,0 +1,14 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_FragColor = texture2D(tex, tex_c.xy).bgra * col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_frag.shd new file mode 100644 index 0000000..9faa414 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_frag.shd @@ -0,0 +1,14 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + gl_FragColor = texture2D(tex, tex_c.xy).bgra * col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_frag_bin_s3c6410.h new file mode 100644 index 0000000..3518e8d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_frag_bin_s3c6410.h @@ -0,0 +1,9 @@ +0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000000, +0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000001, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000000, +0x00000000, 0x0000e407, 0x307820e4, 0x00000000, 0x01000000, 0x0100e400, +0x237a10c6, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000004, 0x00000003, 0x00000009, 0x00000000, 0x00000004, 0x00000008, +0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000003, +0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x006c6f63, 0x5f786574, +0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_frag_s3c6410.asm b/libraries/evas/src/modules/engines/gl_common/shader/img_frag_s3c6410.asm new file mode 100644 index 0000000..3716bce --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_frag_s3c6410.asm @@ -0,0 +1,26 @@ + +#------------------------------------------------- +# ORION - OpenGL ES 2.0 Shading Language Compiler +# SAMSUNG INDIA SOFTWARE OPERATIONS PVT. LTD. +# Compiler Version : v04.00.09 +# Release Date : 19.01.2009 +# FIMG VERSION : FIMGv1.5 +# Optimizer Options : -O --nolodcalc +#------------------------------------------------- + +# hand optimised - removed useless ops + +ps_3_0 + +fimg_version 0x01020000 + +dcl_s2_tex s0 +dcl_f4_col v1.x +dcl_f2_tex_c v0.x + +label start +label main_ +texld r0.xyzw, v0.xyzw, s0 # tex=s0 +mul_sat oColor.xyzw, r0.zyxw, v1.xyzw # gl_FragColor=oColor.xyzw, col=v1.xyzw +label main_end +ret diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_mask_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/img_mask_frag.h new file mode 100644 index 0000000..1b28128 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_mask_frag.h @@ -0,0 +1,15 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex, texm;\n" +"varying vec4 col;\n" +"varying vec2 tex_c, tex_cm;\n" +"void main()\n" +"{\n" +" gl_FragColor = texture2D(texm, tex_cm.xy).aaaa * texture2D(tex, tex_c.xy).rgba * col;\n" +"}\n" +"\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_mask_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/img_mask_vert.h new file mode 100644 index 0000000..7508c98 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_mask_vert.h @@ -0,0 +1,16 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec4 color;\n" +"attribute vec2 tex_coord, tex_coordm;\n" +"uniform mat4 mvp;\n" +"varying vec4 col;\n" +"varying vec2 tex_c, tex_cm;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" col = color;\n" +" tex_c = tex_coord;\n" +" tex_cm = tex_coordm;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.h new file mode 100644 index 0000000..0343b34 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.h @@ -0,0 +1,13 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_FragColor = texture2D(tex, tex_c.xy).bgra;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.shd new file mode 100644 index 0000000..222d635 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.shd @@ -0,0 +1,13 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec2 tex_c; +void main() +{ + gl_FragColor = texture2D(tex, tex_c.xy).bgra; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag_bin_s3c6410.h new file mode 100644 index 0000000..61662c8 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag_bin_s3c6410.h @@ -0,0 +1,10 @@ +0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000003, +0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000001, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000a, 0x00000000, +0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, +0x307a10c6, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, +0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, +0x00000004, 0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, +0x00000003, 0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x5f786574, +0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.h new file mode 100644 index 0000000..13d5edd --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.h @@ -0,0 +1,12 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec2 tex_coord;\n" +"uniform mat4 mvp;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" tex_c = tex_coord;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.shd new file mode 100644 index 0000000..74f3207 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.shd @@ -0,0 +1,12 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec2 tex_coord; +uniform mat4 mvp; +varying vec2 tex_c; +void main() +{ + gl_Position = mvp * vertex; + tex_c = tex_coord; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert_bin_s3c6410.h new file mode 100644 index 0000000..314b5f3 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert_bin_s3c6410.h @@ -0,0 +1,17 @@ +0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000006, 0x00000006, +0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x00000001, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000027, 0x00000000, +0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, +0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, +0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, +0x20980154, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, +0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013, +0x00000009, 0x00000003, 0x00000000, 0x00000004, 0x00000000, 0x0000000b, +0x00000009, 0x00010004, 0x00000000, 0x00000021, 0x00000005, 0x00000003, +0x00010004, 0x00000004, 0x0000001d, 0x00000003, 0x0000000e, 0x00020001, +0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x74007865, +0x635f7865, 0x64726f6f, 0x70766d00, 0x78657400, 0x0000635f, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/img_vert.h new file mode 100644 index 0000000..8921d9d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_vert.h @@ -0,0 +1,15 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec4 color;\n" +"attribute vec2 tex_coord;\n" +"uniform mat4 mvp;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" col = color;\n" +" tex_c = tex_coord;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_vert.shd new file mode 100644 index 0000000..606c297 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_vert.shd @@ -0,0 +1,15 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec4 color; +attribute vec2 tex_coord; +uniform mat4 mvp; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + gl_Position = mvp * vertex; + col = color; + tex_c = tex_coord; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_vert_bin_s3c6410.h new file mode 100644 index 0000000..1402448 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/img_vert_bin_s3c6410.h @@ -0,0 +1,20 @@ +0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000006, +0x00000000, 0x00000000, 0x00000003, 0x00000003, 0x00000001, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000031, 0x00000000, +0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, +0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, +0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, +0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, +0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000c, 0x00000006, +0x00000009, 0x00000000, 0x00000000, 0x00000013, 0x00000005, 0x00000009, +0x00000000, 0x00000004, 0x00000019, 0x00000009, 0x00000003, 0x00000000, +0x00000008, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000, +0x00000027, 0x00000003, 0x00000009, 0x00010004, 0x00000004, 0x0000002b, +0x00000005, 0x00000003, 0x00010004, 0x00000008, 0x00000023, 0x00000003, +0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, +0x74726576, 0x63007865, 0x726f6c6f, 0x78657400, 0x6f6f635f, 0x6d006472, +0x63007076, 0x74006c6f, 0x635f7865, 0x00000000, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/make-c-bin.sh b/libraries/evas/src/modules/engines/gl_common/shader/make-c-bin.sh new file mode 100755 index 0000000..2902df6 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/make-c-bin.sh @@ -0,0 +1,3 @@ +#!/bin/sh +od --width=4 -t x4 -v $1 | \ +awk '{ if (NF > 1) printf("0x%s, ", $2); L = L + 1; if (L > 5) { L = 0; printf("\n");}}' diff --git a/libraries/evas/src/modules/engines/gl_common/shader/make-c-str.sh b/libraries/evas/src/modules/engines/gl_common/shader/make-c-str.sh new file mode 100755 index 0000000..fe7e80a --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/make-c-str.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +awk '{printf("\"%s\\n\"\n", $0);}' $1 diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.h new file mode 100644 index 0000000..fec4b23 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.h @@ -0,0 +1,31 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex, texuv;\n" +"varying vec4 col;\n" +"varying vec2 tex_c, tex_cuv;\n" +"void main()\n" +"{\n" +" float y,u,v,vmu,r,g,b;\n" +" y=texture2D(tex,tex_c).g;\n" +" u=texture2D(texuv,tex_cuv).g;\n" +" v=texture2D(texuv,tex_cuv).a;\n" +"\n" +" u=u-0.5;\n" +" v=v-0.5;\n" +" vmu=v*0.813+u*0.391;\n" +" u=u*2.018;\n" +" v=v*1.596;\n" +" y=(y-0.062)*1.164;\n" +"\n" +" r=y+v;\n" +" g=y-vmu;\n" +" b=y+u;\n" +"\n" +" gl_FragColor=vec4(r,g,b,1.0) * col;\n" +"}\n" +"\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.shd new file mode 100644 index 0000000..34748fc --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.shd @@ -0,0 +1,31 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex, texuv; +varying vec4 col; +varying vec2 tex_c, tex_cuv; +void main() +{ + float y,u,v,vmu,r,g,b; + y=texture2D(tex,tex_c).g; + u=texture2D(texuv,tex_cuv).g; + v=texture2D(texuv,tex_cuv).a; + + u=u-0.5; + v=v-0.5; + vmu=v*0.813+u*0.391; + u=u*2.018; + v=v*1.596; + y=(y-0.062)*1.164; + + r=y+v; + g=y-vmu; + b=y+u; + + gl_FragColor=vec4(r,g,b,1.0) * col; +} + diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.h new file mode 100644 index 0000000..df52d19 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.h @@ -0,0 +1,31 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex, texuv;\n" +"varying vec2 tex_c, tex_cuv;\n" +"void main()\n" +"{\n" +" float y,u,v,vmu,r,g,b;\n" +" y=texture2D(tex,tex_c).g;\n" +" u=texture2D(texuv,tex_cuv).g;\n" +" v=texture2D(texuv,tex_cuv).a;\n" +"\n" +" u=u-0.5;\n" +" v=v-0.5;\n" +" vmu=v*0.813+u*0.391;\n" +" u=u*2.018;\n" +" v=v*1.596;\n" +" y=(y-0.062)*1.164;\n" +"\n" +" r=y+v;\n" +" g=y-vmu;\n" +" b=y+u;\n" +"\n" +" gl_FragColor=vec4(r,g,b,1.0);\n" +"}\n" +"\n" +"\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.shd new file mode 100644 index 0000000..6910933 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.shd @@ -0,0 +1,31 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex, texuv; +varying vec2 tex_c, tex_cuv; +void main() +{ + float y,u,v,vmu,r,g,b; + y=texture2D(tex,tex_c).g; + u=texture2D(texuv,tex_cuv).g; + v=texture2D(texuv,tex_cuv).a; + + u=u-0.5; + v=v-0.5; + vmu=v*0.813+u*0.391; + u=u*2.018; + v=v*1.596; + y=(y-0.062)*1.164; + + r=y+v; + g=y-vmu; + b=y+u; + + gl_FragColor=vec4(r,g,b,1.0); +} + + diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.h new file mode 100644 index 0000000..6ff1040 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.h @@ -0,0 +1,14 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec4 color;\n" +"attribute vec2 tex_coord, tex_coord2;\n" +"uniform mat4 mvp;\n" +"varying vec2 tex_c, tex_cuv;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" tex_c = tex_coord;\n" +" tex_cuv = tex_coord2 * 0.25;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.shd new file mode 100644 index 0000000..994f5e6 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.shd @@ -0,0 +1,14 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec4 color; +attribute vec2 tex_coord, tex_coord2; +uniform mat4 mvp; +varying vec2 tex_c, tex_cuv; +void main() +{ + gl_Position = mvp * vertex; + tex_c = tex_coord; + tex_cuv = tex_coord2 * 0.25; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.h new file mode 100644 index 0000000..38d6d9e --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.h @@ -0,0 +1,16 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec4 color;\n" +"attribute vec2 tex_coord, tex_coord2;\n" +"uniform mat4 mvp;\n" +"varying vec4 col;\n" +"varying vec2 tex_c, tex_cuv;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" col = color;\n" +" tex_c = tex_coord;\n" +" tex_cuv = tex_coord2 * 0.25;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.shd new file mode 100644 index 0000000..eb7cc36 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.shd @@ -0,0 +1,16 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec4 color; +attribute vec2 tex_coord, tex_coord2; +uniform mat4 mvp; +varying vec4 col; +varying vec2 tex_c, tex_cuv; +void main() +{ + gl_Position = mvp * vertex; + col = color; + tex_c = tex_coord; + tex_cuv = tex_coord2 * 0.25; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.h new file mode 100644 index 0000000..4a102a4 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.h @@ -0,0 +1,13 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"void main()\n" +"{\n" +" gl_FragColor = col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.shd new file mode 100644 index 0000000..02251ee --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.shd @@ -0,0 +1,13 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +void main() +{ + gl_FragColor = col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_bin_s3c6410.h new file mode 100644 index 0000000..ee94467 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_bin_s3c6410.h @@ -0,0 +1,6 @@ +0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000002, 0x00000000, +0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000000, +0x00000000, 0x00000000, 0x20fa10e4, 0x00000000, 0x00000000, 0x00000000, +0x1e000000, 0x00000000, 0x00000000, 0x00000003, 0x00000009, 0x00000000, +0x00000000, 0x006c6f63, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_s3c6410.asm b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_s3c6410.asm new file mode 100644 index 0000000..24c47ac --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_s3c6410.asm @@ -0,0 +1,24 @@ + +#------------------------------------------------- +# ORION - OpenGL ES 2.0 Shading Language Compiler +# SAMSUNG INDIA SOFTWARE OPERATIONS PVT. LTD. +# Compiler Version : v04.00.09 +# Release Date : 19.01.2009 +# FIMG VERSION : FIMGv1.5 +# Optimizer Options : -O --nolodcalc +#------------------------------------------------- + +# hand optimised - removed useless ops + +ps_3_0 + +fimg_version 0x01020000 + +dcl_f4_col v0.x + +label start +label main_ +label main_end +mov_sat oColor.xyzw, v0.xyzw +ret + diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.h new file mode 100644 index 0000000..51d41aa --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.h @@ -0,0 +1,12 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec4 color;\n" +"uniform mat4 mvp;\n" +"varying vec4 col;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" col = color;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.shd new file mode 100644 index 0000000..63fea5d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.shd @@ -0,0 +1,12 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec4 color; +uniform mat4 mvp; +varying vec4 col; +void main() +{ + gl_Position = mvp * vertex; + col = color; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/rect_vert_bin_s3c6410.h new file mode 100644 index 0000000..3130684 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/rect_vert_bin_s3c6410.h @@ -0,0 +1,17 @@ +0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000006, 0x00000006, +0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x00000001, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000021, 0x00000000, +0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, +0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, +0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, +0x20f801e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, +0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013, +0x00000005, 0x00000009, 0x00000000, 0x00000004, 0x00000000, 0x0000000b, +0x00000009, 0x00010004, 0x00000000, 0x0000001d, 0x00000003, 0x00000009, +0x00010004, 0x00000004, 0x00000019, 0x00000003, 0x0000000e, 0x00020001, +0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x63007865, +0x726f6c6f, 0x70766d00, 0x6c6f6300, 0x00000000, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.h new file mode 100644 index 0000000..1ced5e0 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.h @@ -0,0 +1,14 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_FragColor = texture2D(tex, tex_c.xy) * col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.shd new file mode 100644 index 0000000..2bc8d79 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.shd @@ -0,0 +1,14 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + gl_FragColor = texture2D(tex, tex_c.xy) * col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_bin_s3c6410.h new file mode 100644 index 0000000..24af537 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_bin_s3c6410.h @@ -0,0 +1,9 @@ +0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000000, +0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000001, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000000, +0x00000000, 0x0000e407, 0x307820e4, 0x00000000, 0x01000000, 0x0100e400, +0x237a10e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000004, 0x00000003, 0x00000009, 0x00000000, 0x00000004, 0x00000008, +0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000003, +0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x006c6f63, 0x5f786574, +0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_s3c6410.asm b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_s3c6410.asm new file mode 100644 index 0000000..14bbfa1 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_s3c6410.asm @@ -0,0 +1,26 @@ + +#------------------------------------------------- +# ORION - OpenGL ES 2.0 Shading Language Compiler +# SAMSUNG INDIA SOFTWARE OPERATIONS PVT. LTD. +# Compiler Version : v04.00.09 +# Release Date : 19.01.2009 +# FIMG VERSION : FIMGv1.5 +# Optimizer Options : -O --nolodcalc +#------------------------------------------------- + +# hand optimised - removed useless ops + +ps_3_0 + +fimg_version 0x01020000 + +dcl_s2_tex s0 +dcl_f4_col v1.x +dcl_f2_tex_c v0.x + +label start +label main_ +texld r0.xyzw, v0.xyzw, s0 # tex=s0 +mul_sat oColor.xyzw, r0.xyzw, v1.xyzw # gl_FragColor=oColor.xyzw, col=v1.xyzw +label main_end +ret diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.h new file mode 100644 index 0000000..459611f --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.h @@ -0,0 +1,13 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_FragColor = texture2D(tex, tex_c.xy);\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.shd new file mode 100644 index 0000000..877df62 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.shd @@ -0,0 +1,13 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex; +varying vec2 tex_c; +void main() +{ + gl_FragColor = texture2D(tex, tex_c.xy); +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag_bin_s3c6410.h new file mode 100644 index 0000000..b89eeb1 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag_bin_s3c6410.h @@ -0,0 +1,10 @@ +0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000003, +0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000001, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000a, 0x00000000, +0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, +0x307a10e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, +0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, +0x00000004, 0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, +0x00000003, 0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x5f786574, +0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.h new file mode 100644 index 0000000..13d5edd --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.h @@ -0,0 +1,12 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec2 tex_coord;\n" +"uniform mat4 mvp;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" tex_c = tex_coord;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.shd new file mode 100644 index 0000000..74f3207 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.shd @@ -0,0 +1,12 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec2 tex_coord; +uniform mat4 mvp; +varying vec2 tex_c; +void main() +{ + gl_Position = mvp * vertex; + tex_c = tex_coord; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert_bin_s3c6410.h new file mode 100644 index 0000000..314b5f3 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert_bin_s3c6410.h @@ -0,0 +1,17 @@ +0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000006, 0x00000006, +0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x00000001, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000027, 0x00000000, +0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, +0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, +0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, +0x20980154, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, +0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013, +0x00000009, 0x00000003, 0x00000000, 0x00000004, 0x00000000, 0x0000000b, +0x00000009, 0x00010004, 0x00000000, 0x00000021, 0x00000005, 0x00000003, +0x00010004, 0x00000004, 0x0000001d, 0x00000003, 0x0000000e, 0x00020001, +0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x74007865, +0x635f7865, 0x64726f6f, 0x70766d00, 0x78657400, 0x0000635f, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.h new file mode 100644 index 0000000..8921d9d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.h @@ -0,0 +1,15 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec4 color;\n" +"attribute vec2 tex_coord;\n" +"uniform mat4 mvp;\n" +"varying vec4 col;\n" +"varying vec2 tex_c;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" col = color;\n" +" tex_c = tex_coord;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.shd new file mode 100644 index 0000000..606c297 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.shd @@ -0,0 +1,15 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec4 color; +attribute vec2 tex_coord; +uniform mat4 mvp; +varying vec4 col; +varying vec2 tex_c; +void main() +{ + gl_Position = mvp * vertex; + col = color; + tex_c = tex_coord; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_vert_bin_s3c6410.h new file mode 100644 index 0000000..1402448 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/tex_vert_bin_s3c6410.h @@ -0,0 +1,20 @@ +0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000006, +0x00000000, 0x00000000, 0x00000003, 0x00000003, 0x00000001, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000031, 0x00000000, +0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, +0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, +0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, +0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, +0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000c, 0x00000006, +0x00000009, 0x00000000, 0x00000000, 0x00000013, 0x00000005, 0x00000009, +0x00000000, 0x00000004, 0x00000019, 0x00000009, 0x00000003, 0x00000000, +0x00000008, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000, +0x00000027, 0x00000003, 0x00000009, 0x00010004, 0x00000004, 0x0000002b, +0x00000005, 0x00000003, 0x00010004, 0x00000008, 0x00000023, 0x00000003, +0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, +0x74726576, 0x63007865, 0x726f6c6f, 0x78657400, 0x6f6f635f, 0x6d006472, +0x63007076, 0x74006c6f, 0x635f7865, 0x00000000, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h new file mode 100644 index 0000000..de9acf8 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h @@ -0,0 +1,20 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex, texu, texv;\n" +"varying vec4 col;\n" +"varying vec2 tex_c, tex_c2, tex_c3;\n" +"void main()\n" +"{\n" +" const mat4 yuv2rgb = mat4( 1.16400, 1.16400, 1.16400, 0.00000,\n" +" 0.00000, -0.34410, 1.77200, 0.00000,\n" +" 1.40200, -0.71410, 0.00000, 0.00000,\n" +" -0.77380, 0.45630, -0.95880, 1.00000);\n" +" gl_FragColor = (yuv2rgb * vec4(texture2D(tex, tex_c.xy).r,\n" +" texture2D(texu, tex_c2.xy).r,\n" +" texture2D(texv, tex_c3.xy).r, 1.0)) * col;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.shd new file mode 100644 index 0000000..8e55d14 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.shd @@ -0,0 +1,20 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex, texu, texv; +varying vec4 col; +varying vec2 tex_c, tex_c2, tex_c3; +void main() +{ + const mat4 yuv2rgb = mat4( 1.16400, 1.16400, 1.16400, 0.00000, + 0.00000, -0.34410, 1.77200, 0.00000, + 1.40200, -0.71410, 0.00000, 0.00000, + -0.77380, 0.45630, -0.95880, 1.00000); + gl_FragColor = (yuv2rgb * vec4(texture2D(tex, tex_c.xy).r, + texture2D(texu, tex_c2.xy).r, + texture2D(texv, tex_c3.xy).r, 1.0)) * col; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_bin_s3c6410.h new file mode 100644 index 0000000..cd301dc --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_bin_s3c6410.h @@ -0,0 +1,24 @@ +0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x0000000d, 0x00000007, +0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000003, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000026, 0x00000000, +0x00000000, 0x02065400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, +0x307820e4, 0x00000000, 0x01000000, 0x02065400, 0x23782150, 0x00000000, +0x01000000, 0x0101e407, 0x307821e4, 0x00000000, 0x02000000, 0x02065400, +0x23782250, 0x00000000, 0x02000000, 0x0102e407, 0x307822e4, 0x00000000, +0x00000000, 0x02020001, 0x237823e4, 0x00000000, 0x01e40103, 0x02030001, +0x2ef823e4, 0x00000000, 0x02e40103, 0x02040001, 0x2ef823e4, 0x00000000, +0x00000000, 0x02050000, 0x20f824e4, 0x00000000, 0x06e40103, 0x01040002, +0x2ef823e4, 0x00000000, 0x03000000, 0x0103e400, 0x237a10e4, 0x00000000, +0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x3f94fdf4, 0x3f94fdf4, 0x3f94fdf4, 0x00000000, 0x00000000, 0xbeb02de0, +0x3fe2d0e5, 0x00000000, 0x3fb374bc, 0xbf36cf42, 0x00000000, 0x00000000, +0xbf4617c2, 0x3ee9a027, 0xbf7573eb, 0x3f800000, 0x3f800000, 0x00000000, +0x00000000, 0x00000000, 0x0000000e, 0x00000003, 0x00000009, 0x00000000, +0x0000000c, 0x00000012, 0x00000005, 0x00000003, 0x00000000, 0x00000000, +0x00000018, 0x00000006, 0x00000003, 0x00000000, 0x00000004, 0x0000001f, +0x00000006, 0x00000003, 0x00000000, 0x00000008, 0x00000000, 0x00000003, +0x0000000f, 0x00030005, 0x00000000, 0x00000004, 0x00000004, 0x0000000f, +0x00030005, 0x00000004, 0x00000009, 0x00000004, 0x0000000f, 0x00030005, +0x00000008, 0x00786574, 0x75786574, 0x78657400, 0x6f630076, 0x6574006c, +0x00635f78, 0x5f786574, 0x74003263, 0x635f7865, 0x00000033, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_s3c6410.asm b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_s3c6410.asm new file mode 100644 index 0000000..9a10bf0 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_s3c6410.asm @@ -0,0 +1,46 @@ + +#------------------------------------------------- +# ORION - OpenGL ES 2.0 Shading Language Compiler +# SAMSUNG INDIA SOFTWARE OPERATIONS PVT. LTD. +# Compiler Version : v04.00.09 +# Release Date : 19.01.2009 +# FIMG VERSION : FIMGv1.5 +# Optimizer Options : -O --nolodcalc +#------------------------------------------------- + +# hand optimised - removed useless ops + +ps_3_0 + +fimg_version 0x01020000 + +dcl_s2_tex s0 +dcl_s2_texu s1 +dcl_s2_texv s2 +dcl_f4_col v3.x +dcl_f2_tex_c v0.x +dcl_f2_tex_c2 v1.x +dcl_f2_tex_c3 v2.x + +def c2, 1.164000, 1.164000, 1.164000, 0.000000 +def c3, 0.000000, -0.344100, 1.772000, 0.000000 +def c4, 1.402000, -0.714100, 0.000000, 0.000000 +def c5, -0.773800, 0.456300, -0.958800, 1.000000 +def c6, 1.000000, 0.000000, 0.000000, 0.000000 + +label start +label main_ +mul r0.xyzw, c6.xxyy, v0.xyyy # tex_c=v0.xyyy +texld r0.xyzw, r0.xyzw, s0 # tex=s0 +mul r1.xyzw, c6.xxyy, v1.xyyy # tex_c2=v1.xyyy +texld r1.xyzw, r1.xyzw, s1 # texu=s1 +mul r2.xyzw, c6.xxyy, v2.xyyy # tex_c3=v2.xyyy +texld r2.xyzw, r2.xyzw, s2 # texv=s2 +mul r3.xyzw, c2.xyzw, r0.xxxx # yuv=r0.xxxx +mad r3.xyzw, c3.xyzw, r1.xxxx, r3.xyzw # yuv=r1.xxxx +mad r3.xyzw, c4.xyzw, r2.xxxx, r3.xyzw # yuv=r2.xxxx +mov r4.xyzw, c5.xyzw +mad r3.xyzw, r4.xyzw, c6.xxxx, r3.xyzw # yuv=c6.xxxx +mul_sat oColor.xyzw, r3.xyzw, v3.xyzw # gl_FragColor=oColor.xyzw, col=v3.xyzw +label main_end +ret diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.h new file mode 100644 index 0000000..ee5855c --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.h @@ -0,0 +1,19 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex, texu, texv;\n" +"varying vec2 tex_c, tex_c2, tex_c3;\n" +"void main()\n" +"{\n" +" const mat4 yuv2rgb = mat4( 1.16400, 1.16400, 1.16400, 0.00000,\n" +" 0.00000, -0.34410, 1.77200, 0.00000,\n" +" 1.40200, -0.71410, 0.00000, 0.00000,\n" +" -0.77380, 0.45630, -0.95880, 1.00000);\n" +" gl_FragColor = yuv2rgb * vec4(texture2D(tex, tex_c.xy).r,\n" +" texture2D(texu, tex_c2.xy).r,\n" +" texture2D(texv, tex_c3.xy).r, 1.0);\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.shd new file mode 100644 index 0000000..3ec4311 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.shd @@ -0,0 +1,19 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex, texu, texv; +varying vec2 tex_c, tex_c2, tex_c3; +void main() +{ + const mat4 yuv2rgb = mat4( 1.16400, 1.16400, 1.16400, 0.00000, + 0.00000, -0.34410, 1.77200, 0.00000, + 1.40200, -0.71410, 0.00000, 0.00000, + -0.77380, 0.45630, -0.95880, 1.00000); + gl_FragColor = yuv2rgb * vec4(texture2D(tex, tex_c.xy).r, + texture2D(texu, tex_c2.xy).r, + texture2D(texv, tex_c3.xy).r, 1.0); +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag_bin_s3c6410.h new file mode 100644 index 0000000..45aa66d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag_bin_s3c6410.h @@ -0,0 +1,23 @@ +0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x0000000c, 0x00000007, +0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000003, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000022, 0x00000000, +0x00000000, 0x02065400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, +0x307820e4, 0x00000000, 0x01000000, 0x02065400, 0x23782150, 0x00000000, +0x01000000, 0x0101e407, 0x307821e4, 0x00000000, 0x02000000, 0x02065400, +0x23782250, 0x00000000, 0x02000000, 0x0102e407, 0x307822e4, 0x00000000, +0x00000000, 0x02020001, 0x237823e4, 0x00000000, 0x01e40103, 0x02030001, +0x2ef823e4, 0x00000000, 0x02e40103, 0x02040001, 0x2ef823e4, 0x00000000, +0x00000000, 0x02050000, 0x20f824e4, 0x00000000, 0x06e40103, 0x01040002, +0x2efa10e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, +0x3f800000, 0x3f800000, 0x3f94fdf4, 0x3f94fdf4, 0x3f94fdf4, 0x00000000, +0x00000000, 0xbeb02de0, 0x3fe2d0e5, 0x00000000, 0x3fb374bc, 0xbf36cf42, +0x00000000, 0x00000000, 0xbf4617c2, 0x3ee9a027, 0xbf7573eb, 0x3f800000, +0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000005, +0x00000003, 0x00000000, 0x00000000, 0x00000014, 0x00000006, 0x00000003, +0x00000000, 0x00000004, 0x0000001b, 0x00000006, 0x00000003, 0x00000000, +0x00000008, 0x00000000, 0x00000003, 0x0000000f, 0x00030005, 0x00000000, +0x00000004, 0x00000004, 0x0000000f, 0x00030005, 0x00000004, 0x00000009, +0x00000004, 0x0000000f, 0x00030005, 0x00000008, 0x00786574, 0x75786574, +0x78657400, 0x65740076, 0x00635f78, 0x5f786574, 0x74003263, 0x635f7865, +0x00000033, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.h new file mode 100644 index 0000000..c3f585f --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.h @@ -0,0 +1,14 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec2 tex_coord, tex_coord2, tex_coord3;\n" +"uniform mat4 mvp;\n" +"varying vec2 tex_c, tex_c2, tex_c3;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" tex_c = tex_coord;\n" +" tex_c2 = tex_coord2;\n" +" tex_c3 = tex_coord3;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.shd new file mode 100644 index 0000000..a83d505 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.shd @@ -0,0 +1,14 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec2 tex_coord, tex_coord2, tex_coord3; +uniform mat4 mvp; +varying vec2 tex_c, tex_c2, tex_c3; +void main() +{ + gl_Position = mvp * vertex; + tex_c = tex_coord; + tex_c2 = tex_coord2; + tex_c3 = tex_coord3; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert_bin_s3c6410.h new file mode 100644 index 0000000..5942b4b --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert_bin_s3c6410.h @@ -0,0 +1,23 @@ +0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000008, 0x00000006, +0x00000000, 0x00000000, 0x00000004, 0x00000004, 0x00000001, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000004b, 0x00000000, +0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, +0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, +0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, +0x20980154, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, +0x00000000, 0x00030000, 0x20980354, 0x00000000, 0x00000000, 0x00000000, +0x1e000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x0000000c, 0x00000006, 0x00000009, 0x00000000, +0x00000000, 0x00000013, 0x00000009, 0x00000003, 0x00000000, 0x00000004, +0x0000001d, 0x0000000a, 0x00000003, 0x00000000, 0x00000008, 0x00000028, +0x0000000a, 0x00000003, 0x00000000, 0x0000000c, 0x00000000, 0x0000000b, +0x00000009, 0x00010004, 0x00000000, 0x00000037, 0x00000005, 0x00000003, +0x00010004, 0x00000004, 0x0000003d, 0x00000006, 0x00000003, 0x00010004, +0x00000008, 0x00000044, 0x00000006, 0x00000003, 0x00010004, 0x0000000c, +0x00000033, 0x00000003, 0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, +0x7469736f, 0x006e6f69, 0x74726576, 0x74007865, 0x635f7865, 0x64726f6f, +0x78657400, 0x6f6f635f, 0x00326472, 0x5f786574, 0x726f6f63, 0x6d003364, +0x74007076, 0x635f7865, 0x78657400, 0x0032635f, 0x5f786574, 0x00003363, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.h new file mode 100644 index 0000000..6ccf06d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.h @@ -0,0 +1,17 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec4 color;\n" +"attribute vec2 tex_coord, tex_coord2, tex_coord3;\n" +"uniform mat4 mvp;\n" +"varying vec4 col;\n" +"varying vec2 tex_c, tex_c2, tex_c3;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" col = color;\n" +" tex_c = tex_coord;\n" +" tex_c2 = tex_coord2;\n" +" tex_c3 = tex_coord3;\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.shd new file mode 100644 index 0000000..0ea0b2f --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.shd @@ -0,0 +1,17 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec4 color; +attribute vec2 tex_coord, tex_coord2, tex_coord3; +uniform mat4 mvp; +varying vec4 col; +varying vec2 tex_c, tex_c2, tex_c3; +void main() +{ + gl_Position = mvp * vertex; + col = color; + tex_c = tex_coord; + tex_c2 = tex_coord2; + tex_c3 = tex_coord3; +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert_bin_s3c6410.h new file mode 100644 index 0000000..e757b6d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert_bin_s3c6410.h @@ -0,0 +1,26 @@ +0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000009, 0x00000006, +0x00000000, 0x00000000, 0x00000005, 0x00000005, 0x00000001, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000055, 0x00000000, +0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, +0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, +0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, +0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, +0x00000000, 0x00030000, 0x20980354, 0x00000000, 0x00000000, 0x00040000, +0x20980454, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, +0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013, +0x00000005, 0x00000009, 0x00000000, 0x00000004, 0x00000019, 0x00000009, +0x00000003, 0x00000000, 0x00000008, 0x00000023, 0x0000000a, 0x00000003, +0x00000000, 0x0000000c, 0x0000002e, 0x0000000a, 0x00000003, 0x00000000, +0x00000010, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000, +0x0000003d, 0x00000003, 0x00000009, 0x00010004, 0x00000004, 0x00000041, +0x00000005, 0x00000003, 0x00010004, 0x00000008, 0x00000047, 0x00000006, +0x00000003, 0x00010004, 0x0000000c, 0x0000004e, 0x00000006, 0x00000003, +0x00010004, 0x00000010, 0x00000039, 0x00000003, 0x0000000e, 0x00020001, +0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x63007865, +0x726f6c6f, 0x78657400, 0x6f6f635f, 0x74006472, 0x635f7865, 0x64726f6f, +0x65740032, 0x6f635f78, 0x3364726f, 0x70766d00, 0x6c6f6300, 0x78657400, +0x7400635f, 0x635f7865, 0x65740032, 0x33635f78, 0x00000000, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.h new file mode 100644 index 0000000..abe4b03 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.h @@ -0,0 +1,30 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex, texuv;\n" +"varying vec4 col;\n" +"varying vec2 tex_c, tex_cuv;\n" +"void main()\n" +"{\n" +" float y,u,v,vmu,r,g,b;\n" +" y=texture2D(tex,tex_c).r;\n" +" u=texture2D(texuv,tex_cuv).g;\n" +" v=texture2D(texuv,tex_cuv).a;\n" +"\n" +" u=u-0.5;\n" +" v=v-0.5;\n" +" vmu=v*0.813+u*0.391;\n" +" u=u*2.018;\n" +" v=v*1.596;\n" +"\n" +" r=y+v;\n" +" g=y-vmu;\n" +" b=y+u;\n" +"\n" +" gl_FragColor=vec4(r,g,b,1.0) * col;\n" +"}\n" +"\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.shd new file mode 100644 index 0000000..98dd91b --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.shd @@ -0,0 +1,30 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex, texuv; +varying vec4 col; +varying vec2 tex_c, tex_cuv; +void main() +{ + float y,u,v,vmu,r,g,b; + y=texture2D(tex,tex_c).r; + u=texture2D(texuv,tex_cuv).g; + v=texture2D(texuv,tex_cuv).a; + + u=u-0.5; + v=v-0.5; + vmu=v*0.813+u*0.391; + u=u*2.018; + v=v*1.596; + + r=y+v; + g=y-vmu; + b=y+u; + + gl_FragColor=vec4(r,g,b,1.0) * col; +} + diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.h new file mode 100644 index 0000000..618fa50 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.h @@ -0,0 +1,30 @@ +"#ifdef GL_ES\n" +"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" +"precision highp float;\n" +"#else\n" +"precision mediump float;\n" +"#endif\n" +"#endif\n" +"uniform sampler2D tex, texuv;\n" +"varying vec2 tex_c, tex_cuv;\n" +"void main()\n" +"{\n" +" float y,u,v,vmu,r,g,b;\n" +" y=texture2D(tex,tex_c).r;\n" +" u=texture2D(texuv,tex_cuv).g;\n" +" v=texture2D(texuv,tex_cuv).a;\n" +"\n" +" u=u-0.5;\n" +" v=v-0.5;\n" +" vmu=v*0.813+u*0.391;\n" +" u=u*2.018;\n" +" v=v*1.596;\n" +" y=(y-0.062)*1.164;\n" +"\n" +" r=y+v;\n" +" g=y-vmu;\n" +" b=y+u;\n" +"\n" +" gl_FragColor=vec4(r,g,b,1.0);\n" +"}\n" +"\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.shd new file mode 100644 index 0000000..fd82e2a --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.shd @@ -0,0 +1,30 @@ +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#endif +uniform sampler2D tex, texuv; +varying vec2 tex_c, tex_cuv; +void main() +{ + float y,u,v,vmu,r,g,b; + y=texture2D(tex,tex_c).r; + u=texture2D(texuv,tex_cuv).g; + v=texture2D(texuv,tex_cuv).a; + + u=u-0.5; + v=v-0.5; + vmu=v*0.813+u*0.391; + u=u*2.018; + v=v*1.596; + y=(y-0.062)*1.164; + + r=y+v; + g=y-vmu; + b=y+u; + + gl_FragColor=vec4(r,g,b,1.0); +} + diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.h new file mode 100644 index 0000000..4620b66 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.h @@ -0,0 +1,13 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec2 tex_coord, tex_coord2;\n" +"uniform mat4 mvp;\n" +"varying vec2 tex_c, tex_cuv;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" tex_c = tex_coord;\n" +" tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y);\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.shd new file mode 100644 index 0000000..05acc9c --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.shd @@ -0,0 +1,13 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec2 tex_coord, tex_coord2; +uniform mat4 mvp; +varying vec2 tex_c, tex_cuv; +void main() +{ + gl_Position = mvp * vertex; + tex_c = tex_coord; + tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y); +} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.h new file mode 100644 index 0000000..1e49018 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.h @@ -0,0 +1,16 @@ +"#ifdef GL_ES\n" +"precision highp float;\n" +"#endif\n" +"attribute vec4 vertex;\n" +"attribute vec4 color;\n" +"attribute vec2 tex_coord, tex_coord2;\n" +"uniform mat4 mvp;\n" +"varying vec4 col;\n" +"varying vec2 tex_c, tex_cuv;\n" +"void main()\n" +"{\n" +" gl_Position = mvp * vertex;\n" +" col = color;\n" +" tex_c = tex_coord;\n" +" tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y);\n" +"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.shd new file mode 100644 index 0000000..54efb1e --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.shd @@ -0,0 +1,16 @@ +#ifdef GL_ES +precision highp float; +#endif +attribute vec4 vertex; +attribute vec4 color; +attribute vec2 tex_coord, tex_coord2; +uniform mat4 mvp; +varying vec4 col; +varying vec2 tex_c, tex_cuv; +void main() +{ + gl_Position = mvp * vertex; + col = color; + tex_c = tex_coord; + tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y); +} diff --git a/libraries/evas/src/modules/engines/gl_sdl/Evas_Engine_GL_SDL.h b/libraries/evas/src/modules/engines/gl_sdl/Evas_Engine_GL_SDL.h new file mode 100644 index 0000000..3804aa0 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_sdl/Evas_Engine_GL_SDL.h @@ -0,0 +1,24 @@ +#ifndef _EVAS_ENGINE_GL_SDL_H +#define _EVAS_ENGINE_GL_SDL_H + +#include + +typedef struct _Evas_Engine_Info_GL_SDL Evas_Engine_Info_GL_SDL; + +struct _Evas_Engine_Info_GL_SDL +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + /* engine specific data & parameters it needs to set up */ + struct { + int rotation; + int fullscreen : 1; + int noframe : 1; + } flags; + +}; +#endif + + diff --git a/libraries/evas/src/modules/engines/gl_sdl/Makefile.am b/libraries/evas/src/modules/engines/gl_sdl/Makefile.am new file mode 100644 index 0000000..abdeaf0 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_sdl/Makefile.am @@ -0,0 +1,46 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines/gl_common \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@evas_engine_gl_sdl_cflags@ + +if BUILD_ENGINE_GL_SDL + +GL_SDL_SOURCES = \ +evas_engine.c + +GL_SDL_LIBADD = @evas_engine_gl_sdl_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la + + +includes_HEADERS = Evas_Engine_GL_SDL.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_GL_SDL + +pkgdir = $(libdir)/evas/modules/engines/gl_sdl/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(GL_SDL_SOURCES) +module_la_LIBADD = @EINA_LIBS@ $(GL_SDL_LIBADD) $(top_builddir)/src/lib/libevas.la @dlopen_libs@ +module_la_LDFLAGS = -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_gl_sdl.la + +libevas_engine_gl_sdl_la_SOURCES = $(GL_SDL_SOURCES) +libevas_engine_gl_sdl_la_LIBADD = $(GL_SDL_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/gl_sdl/Makefile.in b/libraries/evas/src/modules/engines/gl_sdl/Makefile.in new file mode 100644 index 0000000..5d4135d --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_sdl/Makefile.in @@ -0,0 +1,796 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/gl_sdl +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +@BUILD_ENGINE_GL_SDL_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_TRUE@libevas_engine_gl_sdl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_gl_sdl_la_SOURCES_DIST = evas_engine.c +@BUILD_ENGINE_GL_SDL_TRUE@am__objects_1 = evas_engine.lo +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_TRUE@am_libevas_engine_gl_sdl_la_OBJECTS = $(am__objects_1) +libevas_engine_gl_sdl_la_OBJECTS = \ + $(am_libevas_engine_gl_sdl_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_TRUE@am_libevas_engine_gl_sdl_la_rpath = +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c +@BUILD_ENGINE_GL_SDL_TRUE@am__objects_2 = module_la-evas_engine.lo +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_gl_sdl_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_gl_sdl_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_GL_SDL.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines/gl_common \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@evas_engine_gl_sdl_cflags@ + +@BUILD_ENGINE_GL_SDL_TRUE@GL_SDL_SOURCES = \ +@BUILD_ENGINE_GL_SDL_TRUE@evas_engine.c + +@BUILD_ENGINE_GL_SDL_TRUE@GL_SDL_LIBADD = @evas_engine_gl_sdl_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +@BUILD_ENGINE_GL_SDL_TRUE@includes_HEADERS = Evas_Engine_GL_SDL.h +@BUILD_ENGINE_GL_SDL_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_FALSE@pkgdir = $(libdir)/evas/modules/engines/gl_sdl/$(MODULE_ARCH) +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_FALSE@module_la_SOURCES = $(GL_SDL_SOURCES) +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_FALSE@module_la_LIBADD = @EINA_LIBS@ $(GL_SDL_LIBADD) $(top_builddir)/src/lib/libevas.la @dlopen_libs@ +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_FALSE@module_la_LDFLAGS = -module -avoid-version +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_TRUE@noinst_LTLIBRARIES = libevas_engine_gl_sdl.la +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_TRUE@libevas_engine_gl_sdl_la_SOURCES = $(GL_SDL_SOURCES) +@BUILD_ENGINE_GL_SDL_TRUE@@EVAS_STATIC_BUILD_GL_SDL_TRUE@libevas_engine_gl_sdl_la_LIBADD = $(GL_SDL_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/gl_sdl/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/gl_sdl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_gl_sdl.la: $(libevas_engine_gl_sdl_la_OBJECTS) $(libevas_engine_gl_sdl_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_gl_sdl_la_rpath) $(libevas_engine_gl_sdl_la_OBJECTS) $(libevas_engine_gl_sdl_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/gl_sdl/evas_engine.c b/libraries/evas/src/modules/engines/gl_sdl/evas_engine.c new file mode 100644 index 0000000..46588d9 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_sdl/evas_engine.c @@ -0,0 +1,1081 @@ +#include "evas_common.h" /* Also includes international specific stuff */ +#include "evas_engine.h" + +static void* _sdl_output_setup (int w, int h, int fullscreen, int noframe); + +int _evas_engine_GL_SDL_log_dom = -1; +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +static void * +eng_info(Evas *e) +{ + Evas_Engine_Info_GL_SDL *info; + + info = calloc(1, sizeof(Evas_Engine_Info_GL_SDL)); + if (!info) return NULL; + info->magic.magic = rand(); + return info; +} + +static void +eng_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_GL_SDL *in; + in = (Evas_Engine_Info_GL_SDL *)info; + free(in); +} + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_GL_SDL *info; + + info = (Evas_Engine_Info_GL_SDL *)in; + + SDL_Init(SDL_INIT_NOPARACHUTE); + + if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) + { + ERR("SDL_Init failed with %s", SDL_GetError()); + SDL_Quit(); + return 0; + } + + re = _sdl_output_setup(e->output.w, e->output.h, + info->flags.fullscreen, + info->flags.noframe); + re->info = info; + e->engine.data.output = re; + if (!e->engine.data.output) + return 0; + + e->engine.func = &func; + e->engine.data.context = e->engine.func->context_new(e->engine.data.output); + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_gl_common_context_free(re->gl_context); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); + + SDL_QuitSubSystem(SDL_INIT_VIDEO); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + SDL_Surface *surface; + + re = (Render_Engine *)data; + re->w = w; + re->h = h; + + if(SDL_GetVideoSurface()->flags & SDL_RESIZABLE) + { + surface = SDL_SetVideoMode(w, h, 32, EVAS_SDL_GL_FLAG + | (re->info->flags.fullscreen ? SDL_FULLSCREEN : 0) + | (re->info->flags.noframe ? SDL_NOFRAME : 0)); + if (!surface) + { + ERR("Unable to change the resolution to : %ix%i", w, h); + SDL_Quit(); + exit(-1); + } + } + + evas_gl_common_context_resize(re->gl_context, w, h, re->gl_context->rot); +} + +static void +eng_output_tile_size_set(void *data, int w __UNUSED__, int h __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_gl_common_context_resize(re->gl_context, re->w, re->h, re->gl_context->rot); + /* smple bounding box */ + if (!re->draw.redraw) + { +#if 0 + re->draw.x1 = x; + re->draw.y1 = y; + re->draw.x2 = x + w - 1; + re->draw.y2 = y + h - 1; +#else + re->draw.x1 = 0; + re->draw.y1 = 0; + re->draw.x2 = re->w - 1; + re->draw.y2 = re->h - 1; +#endif + } + else + { + if (x < re->draw.x1) re->draw.x1 = x; + if (y < re->draw.y1) re->draw.y1 = y; + if ((x + w - 1) > re->draw.x2) re->draw.x2 = x + w - 1; + if ((y + h - 1) > re->draw.y2) re->draw.y2 = y + h - 1; + } + re->draw.redraw = 1; +} + +static void +eng_output_redraws_rect_del(void *data, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + re->draw.redraw = 0; +// INF("GL: finish update cycle!"); +} + +/* at least the nvidia drivers are so abysmal that copying from the backbuffer + * to the front using glCopyPixels() that you literally can WATCH it draw the + * pixels slowly across the screen with a window update taking multiple + * seconds - so workaround by doing a full buffer render as frankly GL isn't + * up to doing anything that isn't done by quake (etc.) + */ +#define SLOW_GL_COPY_RECT 1 +/* vsync games - not for now though */ +//#define VSYNC_TO_SCREEN 1 + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_gl_common_context_flush(re->gl_context); + evas_gl_common_context_newframe(re->gl_context); + /* get the upate rect surface - return engine data as dummy */ + if (!re->draw.redraw) + { +// printf("GL: NO updates!\n"); + return NULL; + } +// printf("GL: update....!\n"); +#ifdef SLOW_GL_COPY_RECT + /* if any update - just return the whole canvas - works with swap + * buffers then */ + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = re->w; + if (h) *h = re->h; + if (cx) *cx = 0; + if (cy) *cy = 0; + if (cw) *cw = re->w; + if (ch) *ch = re->h; +#else + /* 1 update - INCREDIBLY SLOW if combined with swap_rect in flush. a gl + * problem where there just is no hardware path for somethnig that + * obviously SHOULD be there */ + /* only 1 update to minimise gl context games and rendering multiple update + * regions as evas does with other engines + */ + if (x) *x = re->draw.x1; + if (y) *y = re->draw.y1; + if (w) *w = re->draw.x2 - re->draw.x1 + 1; + if (h) *h = re->draw.y2 - re->draw.y1 + 1; + if (cx) *cx = re->draw.x1; + if (cy) *cy = re->draw.y1; + if (cw) *cw = re->draw.x2 - re->draw.x1 + 1; + if (ch) *ch = re->draw.y2 - re->draw.y1 + 1; +#endif +// clear buffer. only needed for dest alpha +// glClearColor(0.0f, 0.0f, 0.0f, 0.0f); +// glClear(GL_COLOR_BUFFER_BIT); +//x// printf("frame -> new\n"); + return re->gl_context->def_surface; +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + /* put back update surface.. in this case just unflag redraw */ + re->draw.redraw = 0; + re->draw.drew = 1; + evas_gl_common_context_flush(re->gl_context); +//x// printf("frame -> push\n"); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!re->draw.drew) return; +//x// printf("frame -> flush\n"); + re->draw.drew = 0; + +#if 0 +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +// glFlush(); + eglSwapBuffers(re->egl_disp, re->egl_surface[0]); +#else + glXSwapBuffers(re->win->disp, re->win); +#endif +#else + SDL_GL_SwapBuffers(); +#endif +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +} + +static void +eng_output_dump(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_image_image_all_unload(); + evas_common_font_font_all_unload(); + evas_gl_common_image_all_unload(re->gl_context); +} + +static void +eng_context_cutout_add(void *data, void *context, int x, int y, int w, int h) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +// re->gl_context->dc = context; + evas_common_draw_context_add_cutout(context, x, y, w, h); +} + +static void +eng_context_cutout_clear(void *data, void *context) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +// re->gl_context->dc = context; + evas_common_draw_context_clear_cutouts(context); +} + +static void +eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_gl_common_context_target_surface_set(re->gl_context, surface); + re->gl_context->dc = context; + evas_gl_common_rect_draw(re->gl_context, x, y, w, h); +} + +static void +eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_gl_common_context_target_surface_set(re->gl_context, surface); + re->gl_context->dc = context; + evas_gl_common_line_draw(re->gl_context, x1, y1, x2, y2); +} + +static void * +eng_polygon_point_add(void *data, void *context __UNUSED__, void *polygon, int x, int y) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_poly_point_add(polygon, x, y); +} + +static void * +eng_polygon_points_clear(void *data, void *context __UNUSED__, void *polygon) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_poly_points_clear(polygon); +} + +static void +eng_polygon_draw(void *data, void *context, void *surface, void *polygon, int x, int y) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_gl_common_context_target_surface_set(re->gl_context, surface); + re->gl_context->dc = context; + evas_gl_common_poly_draw(re->gl_context, polygon, x, y); +} + +static int +eng_image_alpha_get(void *data, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return 1; + im = image; + return im->alpha; +} + +static int +eng_image_colorspace_get(void *data, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return EVAS_COLORSPACE_ARGB8888; + im = image; + return im->cs.space; +} + +static void * +eng_image_alpha_set(void *data, void *image, int has_alpha) +{ + Render_Engine *re; + Evas_GL_Image *im; + + re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (im->native.data) + { + im->alpha = has_alpha; + return image; + } + /* FIXME: can move to gl_common */ + if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return im; + if ((has_alpha) && (im->im->cache_entry.flags.alpha)) return image; + else if ((!has_alpha) && (!im->im->cache_entry.flags.alpha)) return image; + if (im->references > 1) + { + Evas_GL_Image *im_new; + + im_new = evas_gl_common_image_new_from_copied_data(im->gc, im->im->cache_entry.w, im->im->cache_entry.h, im->im->image.data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im_new) return im; + evas_gl_common_image_free(im); + im = im_new; + } + else + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + im->im->cache_entry.flags.alpha = has_alpha ? 1 : 0; + return image; +} + +static void * +eng_image_border_set(void *data, void *image, int l __UNUSED__, int r __UNUSED__, int t __UNUSED__, int b __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; + return image; +} + +static void +eng_image_border_get(void *data, void *image __UNUSED__, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +} + +static char * +eng_image_comment_get(void *data, void *image, char *key __UNUSED__) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (!im->im) return NULL; + return im->im->info.comment; +} + +static char * +eng_image_format_get(void *data, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + im = image; + return NULL; +} + +static void +eng_image_colorspace_set(void *data, void *image, int cspace) +{ + Render_Engine *re; + Evas_GL_Image *im; + + re = (Render_Engine *)data; + if (!image) return; + im = image; + if (im->native.data) return; + /* FIXME: can move to gl_common */ + if (im->cs.space == cspace) return; + evas_cache_image_colorspace(&im->im->cache_entry, cspace); + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + im->cs.data = NULL; + im->cs.no_free = 0; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + if (im->tex) evas_gl_common_texture_free(im->tex); + im->tex = NULL; + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + im->cs.data = calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2); + im->cs.no_free = 0; + break; + default: + abort(); + break; + } + im->cs.space = cspace; +} + +///////////////////////////////////////////////////////////////////////// +// +// +typedef struct _Native Native; + +struct _Native +{ + Evas_Native_Surface ns; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + EGLSurface egl_surface; +#endif +}; + +static void +_native_bind_cb(void *data, void *image) +{ +} + +static void +_native_unbind_cb(void *data, void *image) +{ +} + +static void +_native_free_cb(void *data, void *image) +{ +} + +static void * +eng_image_native_set(void *data, void *image, void *native) +{ + return NULL; +} + +static void * +eng_image_native_get(void *data, void *image) +{ + return NULL; +} + +// +// +///////////////////////////////////////////////////////////////////////// + +static void * +eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + *error = EVAS_LOAD_ERROR_NONE; + return evas_gl_common_image_load(re->gl_context, file, key, lo, error); +} + +static void * +eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_image_new_from_data(re->gl_context, w, h, image_data, alpha, cspace); +} + +static void * +eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_image_new_from_copied_data(re->gl_context, w, h, image_data, alpha, cspace); +} + +static void +eng_image_free(void *data, void *image) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + evas_gl_common_image_free(image); +} + +static void +eng_image_size_get(void *data, void *image, int *w, int *h) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; + if (!image) + { + *w = 0; + *h = 0; + return; + } + if (w) *w = ((Evas_GL_Image *)image)->w; + if (h) *h = ((Evas_GL_Image *)image)->h; +} + +static void * +eng_image_size_set(void *data, void *image, int w, int h) +{ + Render_Engine *re; + Evas_GL_Image *im = image; + Evas_GL_Image *im_old; + + re = (Render_Engine *)data; + if (!im) return NULL; + if (im->native.data) + { + im->w = w; + im->h = h; + return image; + } + im_old = image; + + switch (eng_image_colorspace_get(data, image)) + { + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + w &= ~0x1; + break; + } + + if ((im_old) && (im_old->im->cache_entry.w == w) && (im_old->im->cache_entry.h == h)) + return image; + if (im_old) + { + im = evas_gl_common_image_new(re->gl_context, w, h, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); +/* + evas_common_load_image_data_from_file(im_old->im); + if (im_old->im->image->data) + { + evas_common_blit_rectangle(im_old->im, im->im, 0, 0, w, h, 0, 0); + evas_common_cpu_end_opt(); + } + */ + evas_gl_common_image_free(im_old); + } + else + im = evas_gl_common_image_new(re->gl_context, w, h, 1, EVAS_COLORSPACE_ARGB8888); + return im; +} + +static void * +eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h) +{ + Render_Engine *re; + Evas_GL_Image *im = image; + + re = (Render_Engine *)data; + if (!image) return NULL; + if (im->native.data) return image; + evas_gl_common_image_dirty(image, x, y, w, h); + return image; +} + +static void * +eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, int *err) +{ + Render_Engine *re; + Evas_GL_Image *im; + int error; + + re = (Render_Engine *)data; + if (!image) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_GENERIC; + return NULL; + } + im = image; + if (im->native.data) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + error = evas_cache_image_load_data(&im->im->cache_entry); + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (to_write) + { + if (im->references > 1) + { + Evas_GL_Image *im_new; + + im_new = evas_gl_common_image_new_from_copied_data(im->gc, im->im->cache_entry.w, im->im->cache_entry.h, im->im->image.data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im_new) + { + *image_data = NULL; + if (err) *err = error; + return im; + } + evas_gl_common_image_free(im); + im = im_new; + } + else + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + } + *image_data = im->im->image.data; + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + *image_data = im->cs.data; + break; + default: + abort(); + break; + } + if (err) *err = error; + return im; +} + +static void * +eng_image_data_put(void *data, void *image, DATA32 *image_data) +{ + Render_Engine *re; + Evas_GL_Image *im, *im2; + + re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (im->native.data) return image; + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (image_data != im->im->image.data) + { + int w, h; + + w = im->im->cache_entry.w; + h = im->im->cache_entry.h; + im2 = eng_image_new_from_data(data, w, h, image_data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im2) return im; + evas_gl_common_image_free(im); + im = im2; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + if (image_data != im->cs.data) + { + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + im->cs.data = image_data; + } + break; + default: + abort(); + break; + } + /* hmmm - but if we wrote... why bother? */ + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + return im; +} + +static void +eng_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) +{ + Evas_GL_Image *gim = image; + RGBA_Image *im; + + if (!gim) return; + if (gim->native.data) return; + im = (RGBA_Image *)gim->im; + if (!im) return; + evas_cache_image_preload_data(&im->cache_entry, target); +} + +static void +eng_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) +{ + Evas_GL_Image *gim = image; + RGBA_Image *im; + + if (!gim) return; + if (gim->native.data) return; + im = (RGBA_Image *)gim->im; + if (!im) return; + evas_cache_image_preload_cancel(&im->cache_entry, target); +} + +static void +eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + evas_gl_common_context_target_surface_set(re->gl_context, surface); + re->gl_context->dc = context; + evas_gl_common_image_draw(re->gl_context, image, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h, + smooth); +} + +static void +eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) +{ +} + +static void +eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_gl_common_context_target_surface_set(re->gl_context, surface); + re->gl_context->dc = context; + evas_gl_common_image_map_draw(re->gl_context, image, npoints, p, smooth, level); +} + +static void * +eng_image_map_surface_new(void *data __UNUSED__, int w, int h, int alpha) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_image_surface_new(re->gl_context, w, h, alpha); +} + +static void +eng_image_map_surface_free(void *data __UNUSED__, void *surface) +{ + evas_gl_common_image_free(surface); +} + +static int +eng_image_scale_hint_get(void *data __UNUSED__, void *image) +{ + return EVAS_IMAGE_SCALE_HINT_NONE; +} + +static void +eng_font_draw(void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_gl_common_context_target_surface_set(re->gl_context, surface); + re->gl_context->dc = context; + { + // FIXME: put im into context so we can free it + static RGBA_Image *im = NULL; + + if (!im) + im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + im->cache_entry.w = re->w; + im->cache_entry.h = re->h; + evas_common_draw_context_font_ext_set(context, + re->gl_context, + evas_gl_font_texture_new, + evas_gl_font_texture_free, + evas_gl_font_texture_draw); + evas_common_font_draw(im, context, (RGBA_Font *) font, x, y, + intl_props); + evas_common_draw_context_font_ext_set(context, + NULL, + NULL, + NULL, + NULL); + } +} + +static Eina_Bool +eng_canvas_alpha_get(void *data __UNUSED__, void *info __UNUSED__) +{ + // FIXME: support ARGB gl targets!!! + return EINA_FALSE; +} + +static int +eng_image_load_error_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im; + + if (!image) return EVAS_LOAD_ERROR_NONE; + im = image; + return im->im->cache_entry.load_error; +} + + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + if (!evas_gl_common_module_open()) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + if (_evas_engine_GL_SDL_log_dom < 0) + _evas_engine_GL_SDL_log_dom = eina_log_domain_register + ("evas-gl_sdl", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_GL_SDL_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ + #define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(context_cutout_add); + ORD(context_cutout_clear); + ORD(output_flush); + ORD(output_idle_flush); + ORD(output_dump); + ORD(rectangle_draw); + ORD(line_draw); + ORD(polygon_point_add); + ORD(polygon_points_clear); + ORD(polygon_draw); + + ORD(image_load); + ORD(image_new_from_data); + ORD(image_new_from_copied_data); + ORD(image_free); + ORD(image_size_get); + ORD(image_size_set); + ORD(image_dirty_region); + ORD(image_data_get); + ORD(image_data_put); + ORD(image_data_preload_request); + ORD(image_data_preload_cancel); + ORD(image_alpha_set); + ORD(image_alpha_get); + ORD(image_border_set); + ORD(image_border_get); + ORD(image_draw); + ORD(image_comment_get); + ORD(image_format_get); + ORD(image_colorspace_set); + ORD(image_colorspace_get); + ORD(image_native_set); + ORD(image_native_get); +#if 0 // filtering disabled +// ORD(image_draw_filtered); +// ORD(image_filtered_get); +// ORD(image_filtered_save); +// ORD(image_filtered_free); +#endif + ORD(font_draw); + + ORD(image_scale_hint_set); + ORD(image_scale_hint_get); + + ORD(image_map_draw); + ORD(image_map_surface_new); + ORD(image_map_surface_free); + +// ORD(image_content_hint_set); +// ORD(image_content_hint_get); + +// ORD(image_cache_flush); +// ORD(image_cache_set); +// ORD(image_cache_get); + +// ORD(gl_surface_create); +// ORD(gl_surface_destroy); +// ORD(gl_context_create); +// ORD(gl_context_destroy); +// ORD(gl_make_current); +// ORD(gl_proc_address_get); +// ORD(gl_native_surface_get); + +// ORD(gl_api_get); + + ORD(image_load_error_get); + + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em) +{ + eina_log_domain_unregister(_evas_engine_GL_SDL_log_dom); + evas_gl_common_module_close(); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "gl_sdl", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, gl_sdl); + +#ifndef EVAS_STATIC_BUILD_GL_SDL +EVAS_EINA_MODULE_DEFINE(engine, gl_sdl); +#endif + +static void* +_sdl_output_setup (int w, int h, int fullscreen, int noframe) +{ + Render_Engine *re = calloc(1, sizeof(Render_Engine)); + SDL_Surface *surface; + int context_attrs[3]; + int config_attrs[20]; + int major_version, minor_version; + int num_config; + + /* if we haven't initialized - init (automatic abort if already done) */ + evas_common_cpu_init(); + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + + if (w <= 0) w = 640; + if (h <= 0) h = 480; + + /* GL Initialization */ +#ifdef HAVE_SDL_GL_CONTEXT_VERSION + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); +#endif + SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); + SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); + SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8); + SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); + SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 0); + + surface = SDL_SetVideoMode(w, h, 32, EVAS_SDL_GL_FLAG + | (fullscreen ? SDL_FULLSCREEN : 0) + | (noframe ? SDL_NOFRAME : 0)); + + if (!surface) + { + CRIT("SDL_SetVideoMode [ %i x %i x 32 ] failed. %s", w, h, SDL_GetError()); + SDL_Quit(); + exit(-1); + } + + INF("Screen Depth: %d, Vendor: '%s', Renderer: '%s', Version: '%s'", SDL_GetVideoSurface()->format->BitsPerPixel, glGetString(GL_VENDOR), glGetString(GL_RENDERER), glGetString(GL_VERSION)); + + re->gl_context = evas_gl_common_context_new(); + if (!re->gl_context) + { + free(re); + return NULL; + } + evas_gl_common_context_use(re->gl_context); + evas_gl_common_context_resize(re->gl_context, w, h, re->gl_context->rot); + + /* End GL Initialization */ + re->w = w; + re->h = h; + return re; +} + diff --git a/libraries/evas/src/modules/engines/gl_sdl/evas_engine.h b/libraries/evas/src/modules/engines/gl_sdl/evas_engine.h new file mode 100644 index 0000000..7d46720 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_sdl/evas_engine.h @@ -0,0 +1,73 @@ +#ifndef EVAS_ENGINE_H +#define EVAS_ENGINE_H + +#define _EVAS_ENGINE_SDL_H + +#include "config.h" +#include +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +# include +# include +# ifdef HAVE_SDL_FLAG_OPENGLES +# define EVAS_SDL_GL_FLAG SDL_OPENGLES +# else +# define EVAS_SDL_GL_FLAG SDL_OPENGL /* This probably won't work? */ +# endif +#else +# include +# define EVAS_SDL_GL_FLAG SDL_OPENGL +#endif +#include "evas_common.h" +#include "evas_private.h" +#include "evas_gl_common.h" +#include "Evas.h" +#include "Evas_Engine_GL_SDL.h" + +extern int _evas_engine_GL_SDL_log_dom ; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_GL_SDL_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_GL_SDL_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_GL_SDL_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_GL_SDL_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_GL_SDL_log_dom, __VA_ARGS__) + +typedef struct _Render_Engine Render_Engine; +struct _Render_Engine +{ + Evas_Engine_Info_GL_SDL *info; + int w, h; + + Evas_Engine_GL_Context *gl_context; + struct { + int redraw : 1; + int drew : 1; + int x1, y1, x2, y2; + } draw; +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + EGLContext egl_context[1]; + EGLSurface egl_surface[1]; + EGLConfig egl_config; + EGLDisplay egl_disp; +#endif + +}; + +#endif diff --git a/libraries/evas/src/modules/engines/gl_x11/Evas_Engine_GL_X11.h b/libraries/evas/src/modules/engines/gl_x11/Evas_Engine_GL_X11.h new file mode 100644 index 0000000..fb2c81c --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_x11/Evas_Engine_GL_X11.h @@ -0,0 +1,46 @@ +#ifndef _EVAS_ENGINE_GL_X11_H +#define _EVAS_ENGINE_GL_X11_H + +#include + +typedef struct _Evas_Engine_Info_GL_X11 Evas_Engine_Info_GL_X11; + +struct _Evas_Engine_Info_GL_X11 +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + /* engine specific data & parameters it needs to set up */ + struct { + Display *display; + Drawable drawable; + Visual *visual; + Colormap colormap; + int depth; + int screen; + int rotation; + unsigned int destination_alpha : 1; + } info; + /* engine specific function calls to query stuff about the destination */ + /* engine (what visual & colormap & depth to use, performance info etc. */ + struct { + Visual * (*best_visual_get) (Evas_Engine_Info_GL_X11 *einfo); + Colormap (*best_colormap_get) (Evas_Engine_Info_GL_X11 *einfo); + int (*best_depth_get) (Evas_Engine_Info_GL_X11 *einfo); + } func; + + struct { + void (*pre_swap) (void *data, Evas *e); + void (*post_swap) (void *data, Evas *e); + + void *data; // data for callback calls + } callback; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; + + unsigned char vsync : 1; // does nothing right now + unsigned char indirect : 1; // use indirect rendering +}; +#endif diff --git a/libraries/evas/src/modules/engines/gl_x11/Makefile.am b/libraries/evas/src/modules/engines/gl_x11/Makefile.am new file mode 100644 index 0000000..8b0e622 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_x11/Makefile.am @@ -0,0 +1,47 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines/gl_common \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@evas_engine_gl_xlib_cflags@ + +if BUILD_ENGINE_GL_X11 + +GL_X11_SOURCES = \ +evas_engine.c \ +evas_x_main.c + +GL_X11_LIBADD = @evas_engine_gl_xlib_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la + + +includes_HEADERS = Evas_Engine_GL_X11.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_GL_X11 + +pkgdir = $(libdir)/evas/modules/engines/gl_x11/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(GL_X11_SOURCES) +module_la_LIBADD = @EINA_LIBS@ @GL_EET_LIBS@ $(GL_X11_LIBADD) $(top_builddir)/src/lib/libevas.la @dlopen_libs@ +module_la_LDFLAGS = -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_gl_x11.la + +libevas_engine_gl_x11_la_SOURCES = $(GL_X11_SOURCES) +libevas_engine_gl_x11_la_LIBADD = $(GL_X11_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/gl_x11/Makefile.in b/libraries/evas/src/modules/engines/gl_x11/Makefile.in new file mode 100644 index 0000000..f589e61 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_x11/Makefile.in @@ -0,0 +1,810 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/gl_x11 +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +@BUILD_ENGINE_GL_X11_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_TRUE@libevas_engine_gl_x11_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_gl_x11_la_SOURCES_DIST = evas_engine.c \ + evas_x_main.c +@BUILD_ENGINE_GL_X11_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_GL_X11_TRUE@ evas_x_main.lo +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_TRUE@am_libevas_engine_gl_x11_la_OBJECTS = $(am__objects_1) +libevas_engine_gl_x11_la_OBJECTS = \ + $(am_libevas_engine_gl_x11_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_TRUE@am_libevas_engine_gl_x11_la_rpath = +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_x_main.c +@BUILD_ENGINE_GL_X11_TRUE@am__objects_2 = module_la-evas_engine.lo \ +@BUILD_ENGINE_GL_X11_TRUE@ module_la-evas_x_main.lo +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_gl_x11_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_gl_x11_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_GL_X11.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines/gl_common \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@evas_engine_gl_xlib_cflags@ + +@BUILD_ENGINE_GL_X11_TRUE@GL_X11_SOURCES = \ +@BUILD_ENGINE_GL_X11_TRUE@evas_engine.c \ +@BUILD_ENGINE_GL_X11_TRUE@evas_x_main.c + +@BUILD_ENGINE_GL_X11_TRUE@GL_X11_LIBADD = @evas_engine_gl_xlib_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +@BUILD_ENGINE_GL_X11_TRUE@includes_HEADERS = Evas_Engine_GL_X11.h +@BUILD_ENGINE_GL_X11_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_FALSE@pkgdir = $(libdir)/evas/modules/engines/gl_x11/$(MODULE_ARCH) +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_FALSE@module_la_SOURCES = $(GL_X11_SOURCES) +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_FALSE@module_la_LIBADD = @EINA_LIBS@ @GL_EET_LIBS@ $(GL_X11_LIBADD) $(top_builddir)/src/lib/libevas.la @dlopen_libs@ +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_FALSE@module_la_LDFLAGS = -module -avoid-version +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_TRUE@noinst_LTLIBRARIES = libevas_engine_gl_x11.la +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_TRUE@libevas_engine_gl_x11_la_SOURCES = $(GL_X11_SOURCES) +@BUILD_ENGINE_GL_X11_TRUE@@EVAS_STATIC_BUILD_GL_X11_TRUE@libevas_engine_gl_x11_la_LIBADD = $(GL_X11_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/gl_x11/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/gl_x11/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_gl_x11.la: $(libevas_engine_gl_x11_la_OBJECTS) $(libevas_engine_gl_x11_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_gl_x11_la_rpath) $(libevas_engine_gl_x11_la_OBJECTS) $(libevas_engine_gl_x11_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_x_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_x_main.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_x_main.lo: evas_x_main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_x_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_x_main.Tpo -c -o module_la-evas_x_main.lo `test -f 'evas_x_main.c' || echo '$(srcdir)/'`evas_x_main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_x_main.Tpo $(DEPDIR)/module_la-evas_x_main.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_x_main.c' object='module_la-evas_x_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_x_main.lo `test -f 'evas_x_main.c' || echo '$(srcdir)/'`evas_x_main.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/gl_x11/evas_engine.c b/libraries/evas/src/modules/engines/gl_x11/evas_engine.c new file mode 100644 index 0000000..38e0c13 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_x11/evas_engine.c @@ -0,0 +1,3993 @@ +#include "evas_common.h" /* Also includes international specific stuff */ +#include "evas_engine.h" + +#ifdef HAVE_DLSYM +# include /* dlopen,dlclose,etc */ +#else +# error gl_x11 should not get compiled if dlsym is not found on the system! +#endif + +#define EVAS_GL_NO_GL_H_CHECK 1 +#include "Evas_GL.h" + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +// EGL / GLES +# if defined(GLES_VARIETY_S3C6410) +# elif defined(GLES_VARIETY_SGX) +# endif +#else +// GLX +#endif + +typedef struct _Render_Engine Render_Engine; +typedef struct _Render_Engine_GL_Surface Render_Engine_GL_Surface; +typedef struct _Render_Engine_GL_Context Render_Engine_GL_Context; +typedef struct _Render_Engine_GL_Resource Render_Engine_GL_Resource; +typedef struct _Extension_Entry Extension_Entry; + +struct _Render_Engine +{ + Evas_GL_X11_Window *win; + Evas_Engine_Info_GL_X11 *info; + Evas *evas; + Tilebuf *tb; + int end; +/* + XrmDatabase xrdb; // xres - dpi + struct { // xres - dpi + int dpi; // xres - dpi + } xr; // xres - dpi + */ + int w, h; + int vsync; + +}; + +struct _Render_Engine_GL_Surface +{ + int initialized; + int fbo_attached; + int w, h; + int depth_bits; + int stencil_bits; + + // Render target texture/buffers + GLuint rt_tex; + GLint rt_internal_fmt; + GLenum rt_fmt; + GLuint rb_depth; + GLenum rb_depth_fmt; + GLuint rb_stencil; + GLenum rb_stencil_fmt; + + Render_Engine_GL_Context *current_ctx; +}; + +struct _Render_Engine_GL_Context +{ + int initialized; +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + EGLContext context; +#else + GLXContext context; +#endif + GLuint context_fbo; + GLuint current_fbo; + + Render_Engine_GL_Surface *current_sfc; +}; + +// Resources used per thread +struct _Render_Engine_GL_Resource +{ + // Resource context/surface per Thread in TLS for evasgl use +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + EGLContext context; + EGLSurface surface; +#else + GLXContext context; +#endif +}; + +// Extension Handling +struct _Extension_Entry +{ + const char *name; + const char *real_name; + int supported; +}; + +static int initted = 0; +static int gl_wins = 0; +static Render_Engine_GL_Context *current_evgl_ctx; +static Render_Engine *current_engine; + +static char _gl_ext_string[1024]; +static char _evasgl_ext_string[1024]; + +// Resource context/surface per Thread in TLS for evasgl use +static Eina_TLS resource_key; +static Eina_List *resource_list; +LK(resource_lock); + +typedef void (*_eng_fn) (void); +typedef _eng_fn (*glsym_func_eng_fn) (); +typedef void (*glsym_func_void) (); +typedef void *(*glsym_func_void_ptr) (); +typedef int (*glsym_func_int) (); +typedef unsigned int (*glsym_func_uint) (); +typedef unsigned char (*glsym_func_uchar) (); +typedef unsigned char *(*glsym_func_uchar_ptr) (); +typedef const char *(*glsym_func_const_char_ptr) (); + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + +#ifndef EGL_NATIVE_PIXMAP_KHR +# define EGL_NATIVE_PIXMAP_KHR 0x30b0 +#endif +_eng_fn (*glsym_eglGetProcAddress) (const char *a) = NULL; +void (*glsym_eglBindTexImage) (EGLDisplay a, EGLSurface b, int c) = NULL; +void (*glsym_eglReleaseTexImage) (EGLDisplay a, EGLSurface b, int c) = NULL; +void *(*glsym_eglCreateImage) (EGLDisplay a, EGLContext b, EGLenum c, EGLClientBuffer d, const int *e) = NULL; +void (*glsym_eglDestroyImage) (EGLDisplay a, void *b) = NULL; +void (*glsym_glEGLImageTargetTexture2DOES) (int a, void *b) = NULL; +void (*glsym_glEGLImageTargetRenderbufferStorageOES) (int a, void *b) = NULL; +void *(*glsym_eglMapImageSEC) (void *a, void *b) = NULL; +unsigned int (*glsym_eglUnmapImageSEC) (void *a, void *b) = NULL; +const char *(*glsym_eglQueryString) (EGLDisplay a, int name) = NULL; + +unsigned int (*glsym_eglLockSurface) (EGLDisplay a, EGLSurface b, const int *attrib_list) = NULL; +unsigned int (*glsym_eglUnlockSurface) (EGLDisplay a, EGLSurface b) = NULL; + +#else +typedef XID (*glsym_func_xid) (); + +_eng_fn (*glsym_glXGetProcAddress) (const char *a) = NULL; +void (*glsym_glXBindTexImage) (Display *a, GLXDrawable b, int c, int *d) = NULL; +void (*glsym_glXReleaseTexImage) (Display *a, GLXDrawable b, int c) = NULL; +int (*glsym_glXGetVideoSync) (unsigned int *a) = NULL; +int (*glsym_glXWaitVideoSync) (int a, int b, unsigned int *c) = NULL; +XID (*glsym_glXCreatePixmap) (Display *a, void *b, Pixmap c, const int *d) = NULL; +void (*glsym_glXDestroyPixmap) (Display *a, XID b) = NULL; +void (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d) = NULL; +int (*glsym_glXSwapIntervalSGI) (int a) = NULL; +void (*glsym_glXSwapIntervalEXT) (Display *s, GLXDrawable b, int c) = NULL; + +const char *(*glsym_glXQueryExtensionsString) (Display *a, int screen) = NULL; +#endif + +// GLES2 Extensions +void (*glsym_glGetProgramBinaryOES) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) = NULL; +void (*glsym_glProgramBinaryOES) (GLuint program, GLenum binaryFormat, const void *binary, GLint length) = NULL; +void* (*glsym_glMapBufferOES) (GLenum target, GLenum access) = NULL; +unsigned char (*glsym_glUnmapBufferOES) (GLenum target) = NULL; +void (*glsym_glGetBufferPointervOES) (GLenum target, GLenum pname, void** params) = NULL; +void (*glsym_glTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) = NULL; +void (*glsym_glTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) = NULL; +void (*glsym_glCopyTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) = NULL; +void (*glsym_glCompressedTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data) = NULL; +void (*glsym_glCompressedTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) = NULL; +void (*glsym_glFramebufferTexture3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) = NULL; +void (*glsym_glGetPerfMonitorGroupsAMD) (GLint* numGroups, GLsizei groupsSize, GLuint* groups) = NULL; +void (*glsym_glGetPerfMonitorCountersAMD) (GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters) = NULL; +void (*glsym_glGetPerfMonitorGroupStringAMD) (GLuint group, GLsizei bufSize, GLsizei* length, char* groupString) = NULL; +void (*glsym_glGetPerfMonitorCounterStringAMD) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, char* counterString) = NULL; +void (*glsym_glGetPerfMonitorCounterInfoAMD) (GLuint group, GLuint counter, GLenum pname, void* data) = NULL; +void (*glsym_glGenPerfMonitorsAMD) (GLsizei n, GLuint* monitors) = NULL; +void (*glsym_glDeletePerfMonitorsAMD) (GLsizei n, GLuint* monitors) = NULL; +void (*glsym_glSelectPerfMonitorCountersAMD) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList) = NULL; +void (*glsym_glBeginPerfMonitorAMD) (GLuint monitor) = NULL; +void (*glsym_glEndPerfMonitorAMD) (GLuint monitor) = NULL; +void (*glsym_glGetPerfMonitorCounterDataAMD) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten) = NULL; +void (*glsym_glDiscardFramebufferEXT) (GLenum target, GLsizei numAttachments, const GLenum* attachments) = NULL; +void (*glsym_glMultiDrawArraysEXT) (GLenum mode, GLint* first, GLsizei* count, GLsizei primcount) = NULL; +void (*glsym_glMultiDrawElementsEXT) (GLenum mode, const GLsizei* count, GLenum type, const GLvoid** indices, GLsizei primcount) = NULL; +void (*glsym_glDeleteFencesNV) (GLsizei n, const GLuint* fences) = NULL; +void (*glsym_glGenFencesNV) (GLsizei n, GLuint* fences) = NULL; +unsigned char (*glsym_glIsFenceNV) (GLuint fence) = NULL; +unsigned char (*glsym_glTestFenceNV) (GLuint fence) = NULL; +void (*glsym_glGetFenceivNV) (GLuint fence, GLenum pname, GLint* params) = NULL; +void (*glsym_glFinishFenceNV) (GLuint fence) = NULL; +void (*glsym_glSetFenceNV) (GLuint, GLenum) = NULL; +void (*glsym_glGetDriverControlsQCOM) (GLint* num, GLsizei size, GLuint* driverControls) = NULL; +void (*glsym_glGetDriverControlStringQCOM) (GLuint driverControl, GLsizei bufSize, GLsizei* length, char* driverControlString) = NULL; +void (*glsym_glEnableDriverControlQCOM) (GLuint driverControl) = NULL; +void (*glsym_glDisableDriverControlQCOM) (GLuint driverControl) = NULL; +void (*glsym_glExtGetTexturesQCOM) (GLuint* textures, GLint maxTextures, GLint* numTextures) = NULL; +void (*glsym_glExtGetBuffersQCOM) (GLuint* buffers, GLint maxBuffers, GLint* numBuffers) = NULL; +void (*glsym_glExtGetRenderbuffersQCOM) (GLuint* renderbuffers, GLint maxRenderbuffers, GLint* numRenderbuffers) = NULL; +void (*glsym_glExtGetFramebuffersQCOM) (GLuint* framebuffers, GLint maxFramebuffers, GLint* numFramebuffers) = NULL; +void (*glsym_glExtGetTexLevelParameterivQCOM) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint* params) = NULL; +void (*glsym_glExtTexObjectStateOverrideiQCOM) (GLenum target, GLenum pname, GLint param) = NULL; +void (*glsym_glExtGetTexSubImageQCOM) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void* texels) = NULL; +void (*glsym_glExtGetBufferPointervQCOM) (GLenum target, void** params) = NULL; +void (*glsym_glExtGetShadersQCOM) (GLuint* shaders, GLint maxShaders, GLint* numShaders) = NULL; +void (*glsym_glExtGetProgramsQCOM) (GLuint* programs, GLint maxPrograms, GLint* numPrograms) = NULL; +unsigned char (*glsym_glExtIsProgramBinaryQCOM) (GLuint program) = NULL; +void (*glsym_glExtGetProgramBinarySourceQCOM) (GLuint program, GLenum shadertype, char* source, GLint* length) = NULL; + + +//------ GLES 2.0 Extensions supported in EvasGL -----// +static Extension_Entry _gl_ext_entries[] = { +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + //--- Function Extensions ---// + { "GL_OES_get_program_binary", "get_program_binary", 0 }, + { "GL_OES_mapbuffer", "mapbuffer", 0 }, + { "GL_OES_texture_3D", "texture_3D", 0 }, + { "AMD_performance_monitor", "AMD_performance_monitor", 0 }, + { "GL_EXT_discard_framebuffer", "discard_framebuffer", 0 }, + { "GL_EXT_multi_draw_arrays", "multi_draw_arrays", 0 }, + { "GL_NV_fence", "NV_fence", 0 }, + { "GL_QCOM_driver_control", "QCOM_driver_control", 0 }, + { "GL_QCOM_extended_get", "QCOM_extended_get", 0 }, + { "GL_QCOM_extended_get2", "QCOM_extended_get2", 0 }, + + //--- Define Extensions ---// + { "GL_OES_compressed_ETC1_RGB8_texture", "compressed_ETC1_RGB8_texture", 0 }, + { "GL_OES_compressed_paletted_texture", "compressed_paletted_texture", 0 }, + { "GL_OES_depth24", "depth24", 0 }, + { "GL_OES_depth32", "depth32", 0 }, + { "GL_OES_EvasGL_image", "EGL_image", 0 }, + { "GL_OES_packed_depth_stencil", "packed_depth_stencil", 0 }, + { "GL_OES_rgb8_rgba8", "rgb8_rgba8", 0 }, + { "GL_OES_standard_derivatives", "standard_derivatives", 0 }, + { "GL_OES_stencil1", "stencil1", 0 }, + { "GL_OES_stencil4", "stencil4", 0 }, + { "GL_OES_texture_float", "texture_float", 0 }, + { "GL_OES_texture_half_float", "texture_half_float", 0 }, + { "GL_OES_texture_half_float_linear", "texture_half_float_linear", 0 }, + { "GL_OES_texture_npot", "texture_npot", 0 }, + { "GL_OES_vertex_half_float", "vertex_half_float", 0 }, + { "GL_OES_vertex_type_10_10_10_2", "vertex_type_10_10_10_2", 0 }, + { "GL_AMD_compressed_3DC_texture", "compressed_3DC_texture", 0 }, + { "GL_AMD_compressed_ATC_texture", "compressed_ATC_texture", 0 }, + { "GL_AMD_program_binary_Z400", "program_binary_Z400", 0 }, + { "GL_EXT_blend_minmax", "blend_minmax", 0 }, + { "GL_EXT_read_format_bgra", "read_format_bgra", 0 }, + { "GL_EXT_texture_filter_anisotropic", "texture_filter_anisotrophic", 0 }, + { "GL_EXT_texture_format_BGRA8888", "texture_format_BGRA8888", 0 }, + { "GL_EXT_texture_type_2_10_10_10_REV", "texture_type_2_10_10_10_rev", 0 }, + { "GL_IMG_program_binary", "IMG_program_binary", 0 }, + { "GL_IMG_read_format", "IMG_read_format", 0 }, + { "GL_IMG_shader_binary", "IMG_shader_binary", 0 }, + { "GL_IMG_texture_compression_pvrtc", "IMG_texture_compression_pvrtc", 0 }, + { "GL_QCOM_perfmon_global_mode", "QCOM_perfmon_global_mode", 0 }, + { "GL_QCOM_writeonly_rendering", "QCOM_writeonly_rendering", 0 }, +#else + //--- Function Extensions ---// + { "GL_OES_get_program_binary", "get_program_binary", 0 }, + { "GL_OES_mapbuffer", "mapbuffer", 0 }, + { "GL_OES_texture_3D", "texture_3D", 0 }, + { "AMD_performance_monitor", "AMD_performance_monitor", 0 }, + { "GL_EXT_discard_framebuffer", "discard_framebuffer", 0 }, + { "GL_EXT_multi_draw_arrays", "multi_draw_arrays", 0 }, + { "GL_NV_fence", "NV_fence", 0 }, + { "GL_QCOM_driver_control", "QCOM_driver_control", 0 }, + { "GL_QCOM_extended_get", "QCOM_extended_get", 0 }, + { "GL_QCOM_extended_get2", "QCOM_extended_get2", 0 }, + + //--- Define Extensions ---// + { "GL_OES_compressed_ETC1_RGB8_texture", "compressed_ETC1_RGB8_texture", 0 }, + { "GL_OES_compressed_paletted_texture", "compressed_paletted_texture", 0 }, + { "GL_OES_depth24", "depth24", 0 }, + { "GL_OES_depth32", "depth32", 0 }, + { "GL_OES_EvasGL_image", "EGL_image", 0 }, + { "GL_OES_packed_depth_stencil", "packed_depth_stencil", 0 }, + { "GL_OES_rgb8_rgba8", "rgb8_rgba8", 0 }, + { "GL_OES_standard_derivatives", "standard_derivatives", 0 }, + { "GL_OES_stencil1", "stencil1", 0 }, + { "GL_OES_stencil4", "stencil4", 0 }, + { "GL_OES_texture_float", "texture_float", 0 }, + { "GL_OES_texture_half_float", "texture_half_float", 0 }, + { "GL_OES_texture_half_float_linear", "texture_half_float_linear", 0 }, + { "GL_OES_texture_npot", "texture_non_power_of_two", 0 }, // Desktop differs + { "GL_OES_vertex_half_float", "half_float_vertex", 0 }, // Desktop differs + { "GL_OES_vertex_type_10_10_10_2", "vertex_type_10_10_10_2", 0 }, + { "GL_AMD_compressed_3DC_texture", "compressed_3DC_texture", 0 }, + { "GL_AMD_compressed_ATC_texture", "compressed_ATC_texture", 0 }, + { "GL_AMD_program_binary_Z400", "program_binary_Z400", 0 }, + { "GL_EXT_blend_minmax", "blend_minmax", 0 }, + { "GL_EXT_read_format_bgra", "bgra", 0 }, // Desktop differs + { "GL_EXT_texture_filter_anisotropic", "texture_filter_anisotrophic", 0 }, + { "GL_EXT_texture_format_BGRA8888", "bgra", 0 }, // Desktop differs + { "GL_EXT_texture_type_2_10_10_10_REV", "vertex_type_2_10_10_10_rev", 0 }, // Desktop differs ??? + { "GL_IMG_program_binary", "IMG_program_binary", 0 }, + { "GL_IMG_read_format", "IMG_read_format", 0 }, + { "GL_IMG_shader_binary", "IMG_shader_binary", 0 }, + { "GL_IMG_texture_compression_pvrtc", "IMG_texture_compression_pvrtc", 0 }, + { "GL_QCOM_perfmon_global_mode", "QCOM_perfmon_global_mode", 0 }, + { "GL_QCOM_writeonly_rendering", "QCOM_writeonly_rendering", 0 }, + +#endif + { NULL, NULL, 0} +}; + +//------ Extensions supported in EvasGL -----// +static Extension_Entry _evasgl_ext_entries[] = { +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + { "EvasGL_KHR_image", "EGL_KHR_image", 0 }, + { "EvasGL_KHR_vg_parent_image", "EGL_KHR_vg_parent_image", 0 }, + { "EvasGL_KHR_gl_texture_2D_image", "EGL_KHR_gl_texture_2D_image", 0 }, + { "EvasGL_KHR_gl_texture_cubemap_image", "EGL_KHR_gl_texture_cubemap_image", 0 }, + { "EvasGL_KHR_gl_texture_3D_image", "EGL_KHR_gl_texture_3D_image", 0 }, + { "EvasGL_KHR_gl_renderbuffer_image", "EGL_KHR_gl_renderbuffer_image", 0 }, +#else +#endif + { NULL, NULL, 0 } +}; + +static void +_sym_init(void) +{ + static int done = 0; + + if (done) return; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +#define FINDSYM(dst, sym, typ) \ + if ((!dst) && (glsym_eglGetProcAddress)) dst = (typ)glsym_eglGetProcAddress(sym); \ + if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) + + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddress", glsym_func_eng_fn); + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressEXT", glsym_func_eng_fn); + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressARB", glsym_func_eng_fn); + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressKHR", glsym_func_eng_fn); + + FINDSYM(glsym_eglBindTexImage, "eglBindTexImage", glsym_func_void); + FINDSYM(glsym_eglBindTexImage, "eglBindTexImageEXT", glsym_func_void); + FINDSYM(glsym_eglBindTexImage, "eglBindTexImageARB", glsym_func_void); + FINDSYM(glsym_eglBindTexImage, "eglBindTexImageKHR", glsym_func_void); + + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImage", glsym_func_void); + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImageEXT", glsym_func_void); + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImageARB", glsym_func_void); + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImageKHR", glsym_func_void); + + FINDSYM(glsym_eglCreateImage, "eglCreateImage", glsym_func_void_ptr); + FINDSYM(glsym_eglCreateImage, "eglCreateImageEXT", glsym_func_void_ptr); + FINDSYM(glsym_eglCreateImage, "eglCreateImageARB", glsym_func_void_ptr); + FINDSYM(glsym_eglCreateImage, "eglCreateImageKHR", glsym_func_void_ptr); + + FINDSYM(glsym_eglDestroyImage, "eglDestroyImage", glsym_func_void); + FINDSYM(glsym_eglDestroyImage, "eglDestroyImageEXT", glsym_func_void); + FINDSYM(glsym_eglDestroyImage, "eglDestroyImageARB", glsym_func_void); + FINDSYM(glsym_eglDestroyImage, "eglDestroyImageKHR", glsym_func_void); + + FINDSYM(glsym_glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES", glsym_func_void); + + FINDSYM(glsym_glEGLImageTargetRenderbufferStorageOES, "glEGLImageTargetRenderbufferStorageOES", glsym_func_void); + + FINDSYM(glsym_eglMapImageSEC, "eglMapImageSEC", glsym_func_void_ptr); + FINDSYM(glsym_eglUnmapImageSEC, "eglUnmapImageSEC", glsym_func_uint); + + FINDSYM(glsym_eglQueryString, "eglQueryString", glsym_func_const_char_ptr); + + FINDSYM(glsym_eglLockSurface, "eglLockSurface", glsym_func_uint); + FINDSYM(glsym_eglLockSurface, "eglLockSurfaceEXT", glsym_func_uint); + FINDSYM(glsym_eglLockSurface, "eglLockSurfaceARB", glsym_func_uint); + FINDSYM(glsym_eglLockSurface, "eglLockSurfaceKHR", glsym_func_uint); + + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurface", glsym_func_uint); + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurfaceEXT", glsym_func_uint); + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurfaceARB", glsym_func_uint); + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurfaceKHR", glsym_func_uint); + +#else +#define FINDSYM(dst, sym, typ) \ + if ((!dst) && (glsym_glXGetProcAddress)) dst = (typ)glsym_glXGetProcAddress(sym); \ + if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) + + FINDSYM(glsym_glXGetProcAddress, "glXGetProcAddress", glsym_func_eng_fn); + FINDSYM(glsym_glXGetProcAddress, "glXGetProcAddressEXT", glsym_func_eng_fn); + FINDSYM(glsym_glXGetProcAddress, "glXGetProcAddressARB", glsym_func_eng_fn); + + FINDSYM(glsym_glXBindTexImage, "glXBindTexImage", glsym_func_void); + FINDSYM(glsym_glXBindTexImage, "glXBindTexImageEXT", glsym_func_void); + FINDSYM(glsym_glXBindTexImage, "glXBindTexImageARB", glsym_func_void); + + FINDSYM(glsym_glXReleaseTexImage, "glXReleaseTexImage", glsym_func_void); + FINDSYM(glsym_glXReleaseTexImage, "glXReleaseTexImageEXT", glsym_func_void); + FINDSYM(glsym_glXReleaseTexImage, "glXReleaseTexImageARB", glsym_func_void); + + FINDSYM(glsym_glXGetVideoSync, "glXGetVideoSyncSGI", glsym_func_int); + + FINDSYM(glsym_glXWaitVideoSync, "glXWaitVideoSyncSGI", glsym_func_int); + + FINDSYM(glsym_glXCreatePixmap, "glXCreatePixmap", glsym_func_xid); + FINDSYM(glsym_glXCreatePixmap, "glXCreatePixmapEXT", glsym_func_xid); + FINDSYM(glsym_glXCreatePixmap, "glXCreatePixmapARB", glsym_func_xid); + + FINDSYM(glsym_glXDestroyPixmap, "glXDestroyPixmap", glsym_func_void); + FINDSYM(glsym_glXDestroyPixmap, "glXDestroyPixmapEXT", glsym_func_void); + FINDSYM(glsym_glXDestroyPixmap, "glXDestroyPixmapARB", glsym_func_void); + + FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawable", glsym_func_void); + FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawableEXT", glsym_func_void); + FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawableARB", glsym_func_void); + + FINDSYM(glsym_glXSwapIntervalSGI, "glXSwapIntervalMESA", glsym_func_int); + FINDSYM(glsym_glXSwapIntervalSGI, "glXSwapIntervalSGI", glsym_func_int); + + FINDSYM(glsym_glXSwapIntervalEXT, "glXSwapIntervalEXT", glsym_func_void); + + FINDSYM(glsym_glXQueryExtensionsString, "glXQueryExtensionsString", glsym_func_const_char_ptr); +#endif + + //----------- GLES 2.0 Extensions ------------// + // If the symbol's not found, they get set to NULL + // If one of the functions in the extension exists, the extension in supported + /* GL_OES_get_program_binary */ + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinary", glsym_func_void); + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinaryEXT", glsym_func_void); + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinaryARB", glsym_func_void); + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinaryOES", glsym_func_void); + + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinary", glsym_func_void); + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinaryEXT", glsym_func_void); + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinaryARB", glsym_func_void); + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinaryOES", glsym_func_void); + + // Check the first function to see if the extension is supported... + if (glsym_glGetProgramBinaryOES) _gl_ext_entries[0].supported = 1; + + + /* GL_OES_mapbuffer */ + FINDSYM(glsym_glMapBufferOES, "glMapBuffer", glsym_func_void_ptr); + FINDSYM(glsym_glMapBufferOES, "glMapBufferEXT", glsym_func_void_ptr); + FINDSYM(glsym_glMapBufferOES, "glMapBufferARB", glsym_func_void_ptr); + FINDSYM(glsym_glMapBufferOES, "glMapBufferOES", glsym_func_void_ptr); + + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBuffer", glsym_func_uchar); + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBufferEXT", glsym_func_uchar); + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBufferARB", glsym_func_uchar); + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBufferOES", glsym_func_uchar); + + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointerv", glsym_func_void); + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointervEXT", glsym_func_void); + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointervARB", glsym_func_void); + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointervOES", glsym_func_void); + + if (glsym_glMapBufferOES) _gl_ext_entries[1].supported = 1; + + /* GL_OES_texture_3D */ + FINDSYM(glsym_glTexImage3DOES, "glTexImage3D", glsym_func_void); + FINDSYM(glsym_glTexImage3DOES, "glTexImage3DEXT", glsym_func_void); + FINDSYM(glsym_glTexImage3DOES, "glTexImage3DARB", glsym_func_void); + FINDSYM(glsym_glTexImage3DOES, "glTexImage3DOES", glsym_func_void); + + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3D", glsym_func_void); + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3DEXT", glsym_func_void); + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3DARB", glsym_func_void); + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3DOES", glsym_func_void); + + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3D", glsym_func_void); + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3DARB", glsym_func_void); + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3DEXT", glsym_func_void); + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3DOES", glsym_func_void); + + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3D", glsym_func_void); + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3DARB", glsym_func_void); + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3DEXT", glsym_func_void); + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3DOES", glsym_func_void); + + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3D", glsym_func_void); + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3DARB", glsym_func_void); + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3DEXT", glsym_func_void); + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3DOES", glsym_func_void); + + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3D", glsym_func_void); + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3DARB", glsym_func_void); + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3DEXT", glsym_func_void); + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3DOES", glsym_func_void); + + if (glsym_glTexSubImage3DOES) _gl_ext_entries[2].supported = 1; + + /* AMD_performance_monitor */ + FINDSYM(glsym_glGetPerfMonitorGroupsAMD, "glGetPerfMonitorGroupsAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCountersAMD, "glGetPerfMonitorCountersAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorGroupStringAMD, "glGetPerfMonitorGroupStringAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCounterStringAMD, "glGetPerfMonitorCounterStringAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCounterInfoAMD, "glGetPerfMonitorCounterInfoAMD", glsym_func_void); + FINDSYM(glsym_glGenPerfMonitorsAMD, "glGenPerfMonitorsAMD", glsym_func_void); + FINDSYM(glsym_glDeletePerfMonitorsAMD, "glDeletePerfMonitorsAMD", glsym_func_void); + FINDSYM(glsym_glSelectPerfMonitorCountersAMD, "glSelectPerfMonitorCountersAMD", glsym_func_void); + FINDSYM(glsym_glBeginPerfMonitorAMD, "glBeginPerfMonitorAMD", glsym_func_void); + FINDSYM(glsym_glEndPerfMonitorAMD, "glEndPerfMonitorAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCounterDataAMD, "glGetPerfMonitorCounterDataAMD", glsym_func_void); + + if (glsym_glGetPerfMonitorGroupsAMD) _gl_ext_entries[3].supported = 1; + + /* GL_EXT_discard_framebuffer */ + FINDSYM(glsym_glDiscardFramebufferEXT, "glDiscardFramebuffer", glsym_func_void); + FINDSYM(glsym_glDiscardFramebufferEXT, "glDiscardFramebufferARB", glsym_func_void); + FINDSYM(glsym_glDiscardFramebufferEXT, "glDiscardFramebufferEXT", glsym_func_void); + + if (glsym_glDiscardFramebufferEXT) _gl_ext_entries[4].supported = 1; + + /* GL_EXT_multi_draw_arrays */ + FINDSYM(glsym_glMultiDrawArraysEXT, "glMultiDrawArrays", glsym_func_void); + FINDSYM(glsym_glMultiDrawArraysEXT, "glMultiDrawArraysARB", glsym_func_void); + FINDSYM(glsym_glMultiDrawArraysEXT, "glMultiDrawArraysEXT", glsym_func_void); + + FINDSYM(glsym_glMultiDrawElementsEXT, "glMultiDrawElements", glsym_func_void); + FINDSYM(glsym_glMultiDrawElementsEXT, "glMultiDrawElementsARB", glsym_func_void); + FINDSYM(glsym_glMultiDrawElementsEXT, "glMultiDrawElementsEXT", glsym_func_void); + + if (glsym_glMultiDrawArraysEXT) _gl_ext_entries[5].supported = 1; + + /* GL_NV_fence */ + FINDSYM(glsym_glDeleteFencesNV, "glDeleteFencesNV", glsym_func_void); + FINDSYM(glsym_glGenFencesNV, "glGenFencesNV", glsym_func_void); + FINDSYM(glsym_glIsFenceNV, "glIsFenceNV", glsym_func_uchar); + FINDSYM(glsym_glTestFenceNV, "glTestFenceNV", glsym_func_uchar); + FINDSYM(glsym_glGetFenceivNV, "glGetFenceivNV", glsym_func_void); + FINDSYM(glsym_glFinishFenceNV, "glFinishFenceNV", glsym_func_void); + FINDSYM(glsym_glSetFenceNV, "glSetFenceNV", glsym_func_void); + + if (glsym_glDeleteFencesNV) _gl_ext_entries[6].supported = 1; + + /* GL_QCOM_driver_control */ + FINDSYM(glsym_glGetDriverControlsQCOM, "glGetDriverControlsQCOM", glsym_func_void); + FINDSYM(glsym_glGetDriverControlStringQCOM, "glGetDriverControlStringQCOM", glsym_func_void); + FINDSYM(glsym_glEnableDriverControlQCOM, "glEnableDriverControlQCOM", glsym_func_void); + FINDSYM(glsym_glDisableDriverControlQCOM, "glDisableDriverControlQCOM", glsym_func_void); + + if (glsym_glGetDriverControlsQCOM) _gl_ext_entries[7].supported = 1; + + /* GL_QCOM_extended_get */ + FINDSYM(glsym_glExtGetTexturesQCOM, "glExtGetTexturesQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetBuffersQCOM, "glExtGetBuffersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetRenderbuffersQCOM, "glExtGetRenderbuffersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetFramebuffersQCOM, "glExtGetFramebuffersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetTexLevelParameterivQCOM, "glExtGetTexLevelParameterivQCOM", glsym_func_void); + FINDSYM(glsym_glExtTexObjectStateOverrideiQCOM, "glExtTexObjectStateOverrideiQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetTexSubImageQCOM, "glExtGetTexSubImageQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetBufferPointervQCOM, "glExtGetBufferPointervQCOM", glsym_func_void); + + if (glsym_glExtGetTexturesQCOM) _gl_ext_entries[8].supported = 1; + + /* GL_QCOM_extended_get2 */ + FINDSYM(glsym_glExtGetShadersQCOM, "glExtGetShadersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetProgramsQCOM, "glExtGetProgramsQCOM", glsym_func_void); + FINDSYM(glsym_glExtIsProgramBinaryQCOM, "glExtIsProgramBinaryQCOM", glsym_func_uchar); + FINDSYM(glsym_glExtGetProgramBinarySourceQCOM, "glExtGetProgramBinarySourceQCOM", glsym_func_void); + + if (glsym_glExtGetShadersQCOM) _gl_ext_entries[9].supported = 1; +} + +static void +_extensions_init(Render_Engine *re) +{ + int i; + const char *glexts, *evasglexts; + + memset(_gl_ext_string, 0, 1024); + memset(_evasgl_ext_string, 0, 1024); + + // GLES 2.0 Extensions + glexts = (const char*)glGetString(GL_EXTENSIONS); + + DBG("--------GLES 2.0 Extensions--------"); + for (i = 0; _gl_ext_entries[i].name != NULL; i++) + { + if ( (strstr(glexts, _gl_ext_entries[i].name) != NULL) || + (strstr(glexts, _gl_ext_entries[i].real_name) != NULL) ) + { + _gl_ext_entries[i].supported = 1; + strcat(_gl_ext_string, _gl_ext_entries[i].name); + strcat(_gl_ext_string, " "); + DBG("\t%s", _gl_ext_entries[i].name); + } + + } + DBG(" "); + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // EGL Extensions + evasglexts = glsym_eglQueryString(re->win->egl_disp, EGL_EXTENSIONS); +#else + evasglexts = glXQueryExtensionsString(re->info->info.display, + re->info->info.screen); +#endif + + DBG("--------EvasGL Extensions----------"); + for (i = 0; _evasgl_ext_entries[i].name != NULL; i++) + { + if ( (strstr(evasglexts, _evasgl_ext_entries[i].name) != NULL) || + (strstr(evasglexts, _evasgl_ext_entries[i].real_name) != NULL) ) + { + _evasgl_ext_entries[i].supported = 1; + strcat(_evasgl_ext_string, _evasgl_ext_entries[i].name); + strcat(_evasgl_ext_string, " "); + DBG("\t%s", _evasgl_ext_entries[i].name); + } + } + DBG(" "); +} + +int _evas_engine_GL_X11_log_dom = -1; +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +/* Function table for GL APIs */ +static Evas_GL_API gl_funcs; +/* +struct xrdb_user +{ + time_t last_stat; + time_t last_mtime; + XrmDatabase db; +}; +static struct xrdb_user xrdb_user = {0, 0, NULL}; + +static Eina_Bool +xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val) +{ + time_t last = xrdb_user.last_stat, now = time(NULL); + + xrdb_user.last_stat = now; + if (last != now) // don't stat() more than once every second + { + struct stat st; + const char *home = getenv("HOME"); + char tmp[PATH_MAX]; + + if (!home) goto failed; + snprintf(tmp, sizeof(tmp), "%s/.Xdefaults", home); + if (stat(tmp, &st) != 0) goto failed; + if (xrdb_user.last_mtime != st.st_mtime) + { + if (xrdb_user.db) XrmDestroyDatabase(xrdb_user.db); + xrdb_user.db = XrmGetFileDatabase(tmp); + if (!xrdb_user.db) goto failed; + xrdb_user.last_mtime = st.st_mtime; + } + } + + if (!xrdb_user.db) return EINA_FALSE; + return XrmGetResource(xrdb_user.db, name, cls, type, val); + + failed: + if (xrdb_user.db) + { + XrmDestroyDatabase(xrdb_user.db); + xrdb_user.db = NULL; + } + xrdb_user.last_mtime = 0; + return EINA_FALSE; +} +*/ + +static void * +eng_info(Evas *e) +{ + Evas_Engine_Info_GL_X11 *info; + + info = calloc(1, sizeof(Evas_Engine_Info_GL_X11)); + info->magic.magic = rand(); + info->func.best_visual_get = eng_best_visual_get; + info->func.best_colormap_get = eng_best_colormap_get; + info->func.best_depth_get = eng_best_depth_get; + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; + e = NULL; +} + +static void +eng_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_GL_X11 *in; +// dont free! why bother? its not worth it +// eina_log_domain_unregister(_evas_engine_GL_X11_log_dom); + in = (Evas_Engine_Info_GL_X11 *)info; + free(in); +} + +static int +_re_wincheck(Render_Engine *re) +{ + if (re->win->surf) return 1; + eng_window_resurf(re->win); + if (!re->win->surf) + { + ERR("GL engine can't re-create window surface!"); + } + return 0; +} + +static void +_re_winfree(Render_Engine *re) +{ + if (!re->win->surf) return; + eng_window_unsurf(re->win); +} + +static Render_Engine_GL_Resource * +_create_internal_glue_resources(void *data) +{ + Render_Engine *re = (Render_Engine *)data; + Render_Engine_GL_Resource *rsc; + + rsc = calloc(1, sizeof(Render_Engine_GL_Resource)); + + if (!rsc) return NULL; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // EGL + int context_attrs[3]; + context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; + context_attrs[1] = 2; + context_attrs[2] = EGL_NONE; + + // Create resource surface for EGL + rsc->surface = eglCreateWindowSurface(re->win->egl_disp, + re->win->egl_config, + (EGLNativeWindowType)DefaultRootWindow(re->info->info.display), + NULL); + if (!rsc->surface) + { + ERR("Creating internal resource surface failed."); + free(rsc); + return NULL; + } + + // Create a resource context for EGL + rsc->context = eglCreateContext(re->win->egl_disp, + re->win->egl_config, + re->win->egl_context[0], // Evas' GL Context + context_attrs); + if (!rsc->context) + { + ERR("Internal Resource Context Creations Failed."); + free(rsc); + return NULL; + } + + // Add to the resource resource list for cleanup + LKL(resource_lock); + resource_list = eina_list_prepend(resource_list, rsc); + LKU(resource_lock); + + // Set the resource in TLS + if (eina_tls_set(resource_key, (void*)rsc) == EINA_FALSE) + { + ERR("Failed setting TLS Resource"); + free(rsc); + return NULL; + } + +#else + // GLX + rsc->context = glXCreateContext(re->info->info.display, + re->win->visualinfo, + re->win->context, // Evas' GL Context + 1); + if (!rsc->context) + { + ERR("Internal Resource Context Creations Failed."); + free(rsc); + return NULL; + } + + // Add to the resource resource list for cleanup + LKL(resource_lock); + resource_list = eina_list_prepend(resource_list, rsc); + LKU(resource_lock); + + // Set the resource in TLS + if (eina_tls_set(resource_key, (void*)rsc) == EINA_FALSE) + { + ERR("Failed setting TLS Resource"); + free(rsc); + return NULL; + } + +#endif + + + return rsc; +} + +static int +_destroy_internal_glue_resources(void *data) +{ + Render_Engine *re = (Render_Engine *)data; + Eina_List *l; + Render_Engine_GL_Resource *rsc; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // EGL + // Delete the Resources + LKL(resource_lock); + EINA_LIST_FOREACH(resource_list, l, rsc) + { + if (rsc->surface) eglDestroySurface(re->win->egl_disp, rsc->surface); + if (rsc->context) eglDestroyContext(re->win->egl_disp, rsc->context); + free(rsc); + } + eina_list_free(resource_list); + LKU(resource_lock); + + // Destroy TLS + eina_tls_free(resource_key); +#else + // GLX + // Delete the Resources + LKL(resource_lock); + EINA_LIST_FOREACH(resource_list, l, rsc) + { + if (rsc) + { + glXDestroyContext(re->info->info.display, rsc->context); + free(rsc); + } + } + eina_list_free(resource_list); + LKU(resource_lock); + + // Destroy TLS + eina_tls_free(resource_key); +#endif + + return 1; +} + + + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_GL_X11 *info; + + info = (Evas_Engine_Info_GL_X11 *)in; + if (!e->engine.data.output) + { +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +#else + int eb, evb; + + if (!glXQueryExtension(info->info.display, &eb, &evb)) return 0; +#endif + re = calloc(1, sizeof(Render_Engine)); + if (!re) return 0; + re->info = info; + re->evas = e; + e->engine.data.output = re; + re->w = e->output.w; + re->h = e->output.h; + re->win = eng_window_new(re->info->info.display, + re->info->info.drawable, + re->info->info.screen, + re->info->info.visual, + re->info->info.colormap, + re->info->info.depth, + re->w, + re->h, + re->info->indirect, + re->info->info.destination_alpha, + re->info->info.rotation); + if (!re->win) + { + free(re); + e->engine.data.output = NULL; + return 0; + } + + gl_wins++; +/* + { + int status; + char *type = NULL; + XrmValue val; + + re->xr.dpi = 75000; // dpy * 1000 + + status = xrdb_user_query("Xft.dpi", "Xft.Dpi", &type, &val); + if ((!status) || (!type)) + { + if (!re->xrdb) re->xrdb = XrmGetDatabase(re->info->info.display); + if (re->xrdb) + status = XrmGetResource(re->xrdb, + "Xft.dpi", "Xft.Dpi", &type, &val); + } + + if ((status) && (type)) + { + if (!strcmp(type, "String")) + { + const char *str, *dp; + + str = val.addr; + dp = strchr(str, '.'); + if (!dp) dp = strchr(str, ','); + + if (dp) + { + int subdpi, len, i; + char *buf; + + buf = alloca(dp - str + 1); + strncpy(buf, str, dp - str); + buf[dp - str] = 0; + len = strlen(dp + 1); + subdpi = atoi(dp + 1); + + if (len < 3) + { + for (i = len; i < 3; i++) subdpi *= 10; + } + else if (len > 3) + { + for (i = len; i > 3; i--) subdpi /= 10; + } + re->xr.dpi = atoi(buf) * 1000; + } + else + re->xr.dpi = atoi(str) * 1000; + evas_common_font_dpi_set(re->xr.dpi / 1000); + } + } + } + */ + if (!initted) + { + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + + // Initialize TLS + if (eina_tls_new(&resource_key) == EINA_FALSE) + ERR("Error creating tls key"); + DBG("TLS KEY create... %d", resource_key); + + initted = 1; + } + } + else + { + re = e->engine.data.output; + if (_re_wincheck(re)) + { + if ((re->info->info.display != re->win->disp) || + (re->info->info.drawable != re->win->win) || + (re->info->info.screen != re->win->screen) || + (re->info->info.visual != re->win->visual) || + (re->info->info.colormap != re->win->colormap) || + (re->info->info.depth != re->win->depth) || + (re->info->info.destination_alpha != re->win->alpha) || + (re->info->info.rotation != re->win->rot)) + { + int inc = 0; + + if (re->win) + { + re->win->gl_context->references++; + eng_window_free(re->win); + inc = 1; + gl_wins--; + } + re->w = e->output.w; + re->h = e->output.h; + re->win = eng_window_new(re->info->info.display, + re->info->info.drawable, + re->info->info.screen, + re->info->info.visual, + re->info->info.colormap, + re->info->info.depth, + re->w, + re->h, + re->info->indirect, + re->info->info.destination_alpha, + re->info->info.rotation); + eng_window_use(re->win); + if (re->win) gl_wins++; + if ((re->win) && (inc)) + re->win->gl_context->references--; + } + else if ((re->win->w != e->output.w) || + (re->win->h != e->output.h)) + { + re->w = e->output.w; + re->h = e->output.h; + re->win->w = e->output.w; + re->win->h = e->output.h; + eng_window_use(re->win); + evas_gl_common_context_resize(re->win->gl_context, re->win->w, re->win->h, re->win->rot); + } + } + } + if (!re->win) + { + free(re); + return 0; + } + + if (!e->engine.data.output) + { + if (re->win) + { + eng_window_free(re->win); + gl_wins--; + } + free(re); + return 0; + } + re->tb = evas_common_tilebuf_new(re->win->w, re->win->h); + if (!re->tb) + { + if (re->win) + { + eng_window_free(re->win); + gl_wins--; + } + free(re); + return 0; + } + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + + if (!e->engine.data.context) + e->engine.data.context = + e->engine.func->context_new(e->engine.data.output); + eng_window_use(re->win); + + re->vsync = 0; + _sym_init(); + _extensions_init(re); + + // This is used in extensions. Not pretty but can't get display otherwise. + current_engine = re; + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + + if (re) + { +// NOTE: XrmGetDatabase() result is shared per connection, do not free it. +// if (re->xrdb) XrmDestroyDatabase(re->xrdb); + +#if 0 +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // Destroy the resource surface + // Only required for EGL case + if (re->surface) + eglDestroySurface(re->win->egl_disp, re->surface); +#endif + + // Destroy the resource context + _destroy_internal_context(re, context); +#endif + if (re->win) + { + if ((initted == 1) && (gl_wins == 1)) + _destroy_internal_glue_resources(re); + eng_window_free(re->win); + gl_wins--; + } + evas_common_tilebuf_free(re->tb); + free(re); + } + if ((initted == 1) && (gl_wins == 0)) + { + evas_common_image_shutdown(); + evas_common_font_shutdown(); + initted = 0; + } +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + re->win->w = w; + re->win->h = h; + eng_window_use(re->win); + evas_gl_common_context_resize(re->win->gl_context, w, h, re->win->rot); + evas_common_tilebuf_free(re->tb); + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_resize(re->win->gl_context, re->win->w, re->win->h, re->win->rot); + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +/* + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, re->win->w, re->win->h); + if ((w <= 0) || (h <= 0)) return; + if (!re->win->draw.redraw) + { +#if 0 + re->win->draw.x1 = x; + re->win->draw.y1 = y; + re->win->draw.x2 = x + w - 1; + re->win->draw.y2 = y + h - 1; +#else + re->win->draw.x1 = 0; + re->win->draw.y1 = 0; + re->win->draw.x2 = re->win->w - 1; + re->win->draw.y2 = re->win->h - 1; +#endif + } + else + { + if (x < re->win->draw.x1) re->win->draw.x1 = x; + if (y < re->win->draw.y1) re->win->draw.y1 = y; + if ((x + w - 1) > re->win->draw.x2) re->win->draw.x2 = x + w - 1; + if ((y + h - 1) > re->win->draw.y2) re->win->draw.y2 = y + h - 1; + } + re->win->draw.redraw = 1; + */ +} + +static void +eng_output_redraws_rect_del(void *data __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +/* re->win->draw.redraw = 0;*/ +// INF("GL: finish update cycle!"); +} + +/* vsync games - not for now though */ +#define VSYNC_TO_SCREEN 1 + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + Tilebuf_Rect *rects; + + re = (Render_Engine *)data; + /* get the upate rect surface - return engine data as dummy */ + rects = evas_common_tilebuf_get_render_rects(re->tb); + if (rects) + { +/* + Tilebuf_Rect *r; + + printf("REAAAAACCTS\n"); + EINA_INLIST_FOREACH(EINA_INLIST_GET(rects), r) + { + printf(" %i %i %ix%i\n", r->x, r->y, r->w, r->h); + } + */ + evas_common_tilebuf_free_render_rects(rects); + evas_common_tilebuf_clear(re->tb); +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // dont need to for egl - eng_window_use() can check for other ctxt's +#else + eng_window_use(NULL); +#endif + eng_window_use(re->win); + if (!_re_wincheck(re)) return NULL; + evas_gl_common_context_flush(re->win->gl_context); + evas_gl_common_context_newframe(re->win->gl_context); + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = re->win->w; + if (h) *h = re->win->h; + if (cx) *cx = 0; + if (cy) *cy = 0; + if (cw) *cw = re->win->w; + if (ch) *ch = re->win->h; + return re->win->gl_context->def_surface; + } + return NULL; +/* + if (!re->win->draw.redraw) return NULL; +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // dont need to for egl - eng_window_use() can check for other ctxt's +#else + eng_window_use(NULL); +#endif + eng_window_use(re->win); + if (!_re_wincheck(re)) return NULL; + evas_gl_common_context_flush(re->win->gl_context); + evas_gl_common_context_newframe(re->win->gl_context); + if (x) *x = re->win->draw.x1; + if (y) *y = re->win->draw.y1; + if (w) *w = re->win->draw.x2 - re->win->draw.x1 + 1; + if (h) *h = re->win->draw.y2 - re->win->draw.y1 + 1; + if (cx) *cx = re->win->draw.x1; + if (cy) *cy = re->win->draw.y1; + if (cw) *cw = re->win->draw.x2 - re->win->draw.x1 + 1; + if (ch) *ch = re->win->draw.y2 - re->win->draw.y1 + 1; + return re->win->gl_context->def_surface; + */ +} + +//#define FRAMECOUNT 1 + +#ifdef FRAMECOUNT +double +get_time(void) +{ + struct timeval timev; + + gettimeofday(&timev, NULL); + return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000); +} +#endif + +static int safe_native = -1; + +static void +eng_output_redraws_next_update_push(void *data, void *surface __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +{ + Render_Engine *re; +#ifdef FRAMECOUNT + static double pt = 0.0; + double ta, tb; +#endif + + re = (Render_Engine *)data; + /* put back update surface.. in this case just unflag redraw */ + if (!_re_wincheck(re)) return; + re->win->draw.redraw = 0; + re->win->draw.drew = 1; + evas_gl_common_context_flush(re->win->gl_context); + if (safe_native == -1) + { + const char *s = getenv("EVAS_GL_SAFE_NATIVE"); + safe_native = 0; + if (s) safe_native = atoi(s); + else + { + s = (const char *)glGetString(GL_RENDERER); + if (s) + { + if (strstr(s, "PowerVR SGX 540") || + strstr(s, "Mali-400 MP")) + safe_native = 1; + } + } + } +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // this is needed to make sure all previous rendering is flushed to + // buffers/surfaces +#ifdef FRAMECOUNT + double t0 = get_time(); + ta = t0 - pt; + pt = t0; +#endif + // previous rendering should be done and swapped + if (!safe_native) eglWaitNative(EGL_CORE_NATIVE_ENGINE); +#ifdef FRAMECOUNT + double t1 = get_time(); + tb = t1 - t0; + printf("... %1.5f -> %1.5f | ", ta, tb); +#endif +// if (eglGetError() != EGL_SUCCESS) +// { +// printf("Error: eglWaitNative(EGL_CORE_NATIVE_ENGINE) fail.\n"); +// } +#else + // previous rendering should be done and swapped + if (!safe_native) glXWaitX(); +#endif +//x// printf("frame -> push\n"); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!_re_wincheck(re)) return; + if (!re->win->draw.drew) return; +//x// printf("frame -> flush\n"); + re->win->draw.drew = 0; + eng_window_use(re->win); + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +#ifdef FRAMECOUNT + double t0 = get_time(); +#endif + if (!re->vsync) + { + if (re->info->vsync) eglSwapInterval(re->win->egl_disp, 1); + else eglSwapInterval(re->win->egl_disp, 0); + re->vsync = 1; + } + if (re->info->callback.pre_swap) + { + re->info->callback.pre_swap(re->info->callback.data, re->evas); + } + eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]); + if (!safe_native) eglWaitGL(); + if (re->info->callback.post_swap) + { + re->info->callback.post_swap(re->info->callback.data, re->evas); + } +#ifdef FRAMECOUNT + double t1 = get_time(); + printf("%1.5f\n", t1 - t0); +#endif +// if (eglGetError() != EGL_SUCCESS) +// { +// printf("Error: eglSwapBuffers() fail.\n"); +// } +#else +#ifdef VSYNC_TO_SCREEN + if ((re->info->vsync)/* || (1)*/) + { + if (glsym_glXSwapIntervalEXT) + { + if (!re->vsync) + { + if (re->info->vsync) glsym_glXSwapIntervalEXT(re->win->disp, re->win->win, 1); + else glsym_glXSwapIntervalEXT(re->win->disp, re->win->win, 0); + re->vsync = 1; + } + } + if (glsym_glXSwapIntervalSGI) + { + if (!re->vsync) + { + if (re->info->vsync) glsym_glXSwapIntervalSGI(1); + else glsym_glXSwapIntervalSGI(0); + re->vsync = 1; + } + } + else + { + if ((glsym_glXGetVideoSync) && (glsym_glXWaitVideoSync)) + { + unsigned int rc; + + glsym_glXGetVideoSync(&rc); + glsym_glXWaitVideoSync(1, 0, &rc); + } + } + } +# endif + if (re->info->callback.pre_swap) + { + re->info->callback.pre_swap(re->info->callback.data, re->evas); + } +/* + if ((1) +// (re->win->draw.x1 == 0) && +// (re->win->draw.y1 == 0) && +// (re->win->draw.x2 == (re->win->w - 1)) && +// (re->win->draw.y2 == (re->win->h - 1)) + ) + */ + { + glXSwapBuffers(re->win->disp, re->win->win); + if (!safe_native) glXWaitGL(); + } +/* + else + { +// FIXME: this doesn't work.. why oh why? + int sx, sy, sw, sh; + + // fimxe - reset when done +// glEnable(GL_SCISSOR_TEST); + glDrawBuffer(GL_FRONT); + + sx = re->win->draw.x1; + sy = re->win->draw.y1; + sw = (re->win->draw.x2 - re->win->draw.x1) + 1; + sh = (re->win->draw.y2 - re->win->draw.y1) + 1; + sy = re->win->h - sy - sh; + +// glScissor(sx, sy, sw, sh); + glRasterPos2i(sx, re->win->h - sy); + glCopyPixels(sx, sy, sw, sh, GL_COLOR); + glRasterPos2i(0, 0); + +// glDisable(GL_SCISSOR_TEST); + glDrawBuffer(GL_BACK); + glFlush(); + } + */ + if (re->info->callback.post_swap) + { + re->info->callback.post_swap(re->info->callback.data, re->evas); + } +#endif +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +} + +static void +eng_output_dump(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_image_image_all_unload(); + evas_common_font_font_all_unload(); + evas_gl_common_image_all_unload(re->win->gl_context); + _re_winfree(re); +} + +static void +eng_context_cutout_add(void *data __UNUSED__, void *context, int x, int y, int w, int h) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +// re->win->gl_context->dc = context; + evas_common_draw_context_add_cutout(context, x, y, w, h); +} + +static void +eng_context_cutout_clear(void *data __UNUSED__, void *context) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +// re->win->gl_context->dc = context; + evas_common_draw_context_clear_cutouts(context); +} + +static void +eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_rect_draw(re->win->gl_context, x, y, w, h); +} + +static void +eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_line_draw(re->win->gl_context, x1, y1, x2, y2); +} + +static void * +eng_polygon_point_add(void *data, void *context __UNUSED__, void *polygon, int x, int y) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_poly_point_add(polygon, x, y); +} + +static void * +eng_polygon_points_clear(void *data, void *context __UNUSED__, void *polygon) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_poly_points_clear(polygon); +} + +static void +eng_polygon_draw(void *data, void *context, void *surface __UNUSED__, void *polygon, int x, int y) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_poly_draw(re->win->gl_context, polygon, x, y); +} + +static int +eng_image_alpha_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return 1; + im = image; + return im->alpha; +} + +static int +eng_image_colorspace_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return EVAS_COLORSPACE_ARGB8888; + im = image; + return im->cs.space; +} + +static void +eng_image_mask_create(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im; + + if (!image) return; + im = image; + if (!im->im->image.data) + evas_cache_image_load_data(&im->im->cache_entry); + if (!im->tex) + im->tex = evas_gl_common_texture_new(im->gc, im->im); +} + + +static void * +eng_image_alpha_set(void *data, void *image, int has_alpha) +{ + Render_Engine *re; + Evas_GL_Image *im; + + re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (im->alpha == has_alpha) return image; + if (im->native.data) + { + im->alpha = has_alpha; + return image; + } + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt->dyn.img)) + { + im->alpha = has_alpha; + im->tex->alpha = im->alpha; + return image; + } + /* FIXME: can move to gl_common */ + if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return im; + if ((has_alpha) && (im->im->cache_entry.flags.alpha)) return image; + else if ((!has_alpha) && (!im->im->cache_entry.flags.alpha)) return image; + if (im->references > 1) + { + Evas_GL_Image *im_new; + + im_new = evas_gl_common_image_new_from_copied_data + (im->gc, im->im->cache_entry.w, im->im->cache_entry.h, + im->im->image.data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im_new) return im; + evas_gl_common_image_free(im); + im = im_new; + } + else + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + return evas_gl_common_image_alpha_set(im, has_alpha ? 1 : 0); +// im->im->cache_entry.flags.alpha = has_alpha ? 1 : 0; +// return image; +} + +static void * +eng_image_border_set(void *data __UNUSED__, void *image, int l __UNUSED__, int r __UNUSED__, int t __UNUSED__, int b __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; + return image; +} + +static void +eng_image_border_get(void *data __UNUSED__, void *image __UNUSED__, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +} + +static char * +eng_image_comment_get(void *data __UNUSED__, void *image, char *key __UNUSED__) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (!im->im) return NULL; + return im->im->info.comment; +} + +static char * +eng_image_format_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + im = image; + return NULL; +} + +static void +eng_image_colorspace_set(void *data, void *image, int cspace) +{ + Render_Engine *re; + Evas_GL_Image *im; + + re = (Render_Engine *)data; + if (!image) return; + im = image; + if (im->native.data) return; + /* FIXME: can move to gl_common */ + if (im->cs.space == cspace) return; + eng_window_use(re->win); + evas_cache_image_colorspace(&im->im->cache_entry, cspace); + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + im->cs.data = NULL; + im->cs.no_free = 0; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + if (im->tex) evas_gl_common_texture_free(im->tex); + im->tex = NULL; + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + if (im->im->cache_entry.h > 0) + im->cs.data = + calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2); + else + im->cs.data = NULL; + im->cs.no_free = 0; + break; + default: + abort(); + break; + } + im->cs.space = cspace; +} + +///////////////////////////////////////////////////////////////////////// +// +// +typedef struct _Native Native; + +struct _Native +{ + Evas_Native_Surface ns; + Pixmap pixmap; + Visual *visual; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + void *egl_surface; +#else + void *fbc; + XID glx_pixmap; +#endif +}; + +// FIXME: this is enabled so updates happen - but its SLOOOOOOOOOOOOOOOW +// (i am sure this is the reason) not to mention seemingly superfluous. but +// i need to enable it for it to work on fglrx at least. havent tried nvidia. +// +// why is this the case? does anyone know? has anyone tried it on other gfx +// drivers? +// +//#define GLX_TEX_PIXMAP_RECREATE 1 + +static void +_native_bind_cb(void *data, void *image) +{ + Evas_GL_Image *im = image; + Native *n = im->native.data; + + if (n->ns.type == EVAS_NATIVE_SURFACE_X11) + { +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (n->egl_surface) + { + if (glsym_glEGLImageTargetTexture2DOES) + { + glsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, n->egl_surface); + if (eglGetError() != EGL_SUCCESS) + ERR("glEGLImageTargetTexture2DOES() failed."); + } + else + ERR("Try glEGLImageTargetTexture2DOES on EGL with no support"); + } +#else +# ifdef GLX_BIND_TO_TEXTURE_TARGETS_EXT + Render_Engine *re = data; + + if (glsym_glXBindTexImage) + { + glsym_glXBindTexImage(re->win->disp, n->glx_pixmap, + GLX_FRONT_LEFT_EXT, NULL); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + ERR("Try glXBindTexImage on GLX with no support"); +# endif +#endif + } + else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) + { + glBindTexture(GL_TEXTURE_2D, n->ns.data.opengl.texture_id); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + return; + data = NULL; +} + +static void +_native_unbind_cb(void *data, void *image) +{ + Evas_GL_Image *im = image; + Native *n = im->native.data; + + if (n->ns.type == EVAS_NATIVE_SURFACE_X11) + { +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // nothing +#else +# ifdef GLX_BIND_TO_TEXTURE_TARGETS_EXT + Render_Engine *re = data; + + if (glsym_glXReleaseTexImage) + { + glsym_glXReleaseTexImage(re->win->disp, n->glx_pixmap, + GLX_FRONT_LEFT_EXT); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + ERR("Try glXReleaseTexImage on GLX with no support"); +# endif +#endif + } + else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) + { + glBindTexture(GL_TEXTURE_2D, 0); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + return; + data = NULL; +} + +static void +_native_free_cb(void *data, void *image) +{ + Render_Engine *re = data; + Evas_GL_Image *im = image; + Native *n = im->native.data; + uint32_t pmid, texid; + + if (n->ns.type == EVAS_NATIVE_SURFACE_X11) + { + pmid = n->pixmap; + eina_hash_del(re->win->gl_context->shared->native_pm_hash, &pmid, im); +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (n->egl_surface) + { + if (glsym_eglDestroyImage) + { + glsym_eglDestroyImage(re->win->egl_disp, + n->egl_surface); + if (eglGetError() != EGL_SUCCESS) + ERR("eglDestroyImage() failed."); + } + else + ERR("Try eglDestroyImage on EGL with no support"); + } +#else +# ifdef GLX_BIND_TO_TEXTURE_TARGETS_EXT + if (n->glx_pixmap) + { + if (im->native.loose) + { + if (glsym_glXReleaseTexImage) + { + glsym_glXReleaseTexImage(re->win->disp, n->glx_pixmap, + GLX_FRONT_LEFT_EXT); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + ERR("Try glXReleaseTexImage on GLX with no support"); + } + if (glsym_glXDestroyPixmap) + { + glsym_glXDestroyPixmap(re->win->disp, n->glx_pixmap); + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + } + else + ERR("Try glXDestroyPixmap on GLX with no support"); + n->glx_pixmap = 0; + } +# endif +#endif + } + else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) + { + texid = n->ns.data.opengl.texture_id; + eina_hash_del(re->win->gl_context->shared->native_tex_hash, &texid, im); + } + im->native.data = NULL; + im->native.func.data = NULL; + im->native.func.bind = NULL; + im->native.func.unbind = NULL; + im->native.func.free = NULL; + free(n); +} + +static void * +eng_image_native_set(void *data, void *image, void *native) +{ + Render_Engine *re = (Render_Engine *)data; + Evas_Native_Surface *ns = native; + Evas_GL_Image *im = image, *im2 = NULL; + Visual *vis = NULL; + Pixmap pm = 0; + Native *n = NULL; + uint32_t pmid, texid; + unsigned int tex = 0; + unsigned int fbo = 0; + + if (!im) + { + if ((!ns) && (ns->type == EVAS_NATIVE_SURFACE_OPENGL)) + { + im = evas_gl_common_image_new_from_data(re->win->gl_context, + ns->data.opengl.w, + ns->data.opengl.h, + NULL, 1, + EVAS_COLORSPACE_ARGB8888); + } + else + return NULL; + } + + if (ns) + { + if (ns->type == EVAS_NATIVE_SURFACE_X11) + { + vis = ns->data.x11.visual; + pm = ns->data.x11.pixmap; + if (im->native.data) + { + Evas_Native_Surface *ens = im->native.data; + if ((ens->data.x11.visual == vis) && + (ens->data.x11.pixmap == pm)) + return im; + } + } + else if (ns->type == EVAS_NATIVE_SURFACE_OPENGL) + { + tex = ns->data.opengl.texture_id; + fbo = ns->data.opengl.framebuffer_id; + if (im->native.data) + { + Evas_Native_Surface *ens = im->native.data; + if ((ens->data.opengl.texture_id == tex) && + (ens->data.opengl.framebuffer_id == fbo)) + return im; + } + } + } + if ((!ns) && (!im->native.data)) return im; + + eng_window_use(re->win); + + if (im->native.data) + { + if (im->native.func.free) + im->native.func.free(im->native.func.data, im); + evas_gl_common_image_native_disable(im); + } + + if (!ns) return im; + + if (ns->type == EVAS_NATIVE_SURFACE_X11) + { + pmid = pm; + im2 = eina_hash_find(re->win->gl_context->shared->native_pm_hash, &pmid); + if (im2 == im) return im; + if (im2) + { + n = im2->native.data; + if (n) + { + evas_gl_common_image_ref(im2); + evas_gl_common_image_free(im); + return im2; + } + } + } + else if (ns->type == EVAS_NATIVE_SURFACE_OPENGL) + { + texid = tex; + im2 = eina_hash_find(re->win->gl_context->shared->native_tex_hash, &texid); + if (im2 == im) return im; + if (im2) + { + n = im2->native.data; + if (n) + { + evas_gl_common_image_ref(im2); + evas_gl_common_image_free(im); + return im2; + } + } + + } + im2 = evas_gl_common_image_new_from_data(re->win->gl_context, + im->w, im->h, NULL, im->alpha, + EVAS_COLORSPACE_ARGB8888); + evas_gl_common_image_free(im); + im = im2; + if (ns->type == EVAS_NATIVE_SURFACE_X11) + { +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (native) + { + n = calloc(1, sizeof(Native)); + if (n) + { + EGLConfig egl_config; + int config_attrs[20]; + int num_config, i = 0; + + eina_hash_add(re->win->gl_context->shared->native_pm_hash, &pmid, im); + + config_attrs[i++] = EGL_RED_SIZE; + config_attrs[i++] = 8; + config_attrs[i++] = EGL_GREEN_SIZE; + config_attrs[i++] = 8; + config_attrs[i++] = EGL_BLUE_SIZE; + config_attrs[i++] = 8; + config_attrs[i++] = EGL_ALPHA_SIZE; + config_attrs[i++] = 8; + config_attrs[i++] = EGL_DEPTH_SIZE; + config_attrs[i++] = 0; + config_attrs[i++] = EGL_STENCIL_SIZE; + config_attrs[i++] = 0; + config_attrs[i++] = EGL_RENDERABLE_TYPE; + config_attrs[i++] = EGL_OPENGL_ES2_BIT; + config_attrs[i++] = EGL_SURFACE_TYPE; + config_attrs[i++] = EGL_PIXMAP_BIT; + config_attrs[i++] = EGL_NONE; + + if (!eglChooseConfig(re->win->egl_disp, config_attrs, + &egl_config, 1, &num_config)) + ERR("eglChooseConfig() failed for pixmap 0x%x, num_config = %i", (unsigned int)pm, num_config); + memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface)); + n->pixmap = pm; + n->visual = vis; + if (glsym_eglCreateImage) + n->egl_surface = glsym_eglCreateImage(re->win->egl_disp, + EGL_NO_CONTEXT, + EGL_NATIVE_PIXMAP_KHR, + (void *)pm, + NULL); + else + ERR("Try eglCreateImage on EGL with no support"); + if (!n->egl_surface) + ERR("eglCreatePixmapSurface() for 0x%x failed", (unsigned int)pm); + im->native.yinvert = 1; + im->native.loose = 0; + im->native.data = n; + im->native.func.data = re; + im->native.func.bind = _native_bind_cb; + im->native.func.unbind = _native_unbind_cb; + im->native.func.free = _native_free_cb; + im->native.target = GL_TEXTURE_2D; + im->native.mipmap = 0; + evas_gl_common_image_native_enable(im); + } + } +#else +# ifdef GLX_BIND_TO_TEXTURE_TARGETS_EXT + if (native) + { + int dummy; + unsigned int w, h, depth = 32, border; + Window wdummy; + + // fixme: round trip :( + XGetGeometry(re->win->disp, pm, &wdummy, &dummy, &dummy, + &w, &h, &border, &depth); + n = calloc(1, sizeof(Native)); + if (n) + { + int pixmap_att[20]; + unsigned int target = 0; + unsigned int i = 0; + + eina_hash_add(re->win->gl_context->shared->native_pm_hash, &pmid, im); + if ((re->win->depth_cfg[depth].tex_target & + GLX_TEXTURE_2D_BIT_EXT) + // && (1) // we assume npo2 for now + // size is pow2 || mnpo2 supported + ) + target = GLX_TEXTURE_2D_EXT; + else if ((re->win->depth_cfg[depth].tex_target & + GLX_TEXTURE_RECTANGLE_BIT_EXT)) + { + ERR("rect!!! (not handled)"); + target = GLX_TEXTURE_RECTANGLE_EXT; + } + if (!target) + { + ERR("broken text-from-pixmap"); + if (!(re->win->depth_cfg[depth].tex_target & + GLX_TEXTURE_2D_BIT_EXT)) + target = GLX_TEXTURE_RECTANGLE_EXT; + else if (!(re->win->depth_cfg[depth].tex_target & + GLX_TEXTURE_RECTANGLE_BIT_EXT)) + target = GLX_TEXTURE_2D_EXT; + } + + + pixmap_att[i++] = GLX_TEXTURE_FORMAT_EXT; + pixmap_att[i++] = re->win->depth_cfg[depth].tex_format; + pixmap_att[i++] = GLX_MIPMAP_TEXTURE_EXT; + pixmap_att[i++] = re->win->depth_cfg[depth].mipmap; + + if (target) + { + pixmap_att[i++] = GLX_TEXTURE_TARGET_EXT; + pixmap_att[i++] = target; + } + + pixmap_att[i++] = 0; + + memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface)); + n->pixmap = pm; + n->visual = vis; + n->fbc = re->win->depth_cfg[depth].fbc; + if (glsym_glXCreatePixmap) + n->glx_pixmap = glsym_glXCreatePixmap(re->win->disp, + n->fbc, + n->pixmap, + pixmap_att); + else + ERR("Try glXCreatePixmap on GLX with no support"); + if (n->glx_pixmap) + { +// printf("%p: new native texture for %x | %4i x %4i @ %2i = %p\n", +// n, pm, w, h, depth, n->glx_pixmap); + if (!target) + { + ERR("no target :("); + if (glsym_glXQueryDrawable) + glsym_glXQueryDrawable(re->win->disp, + n->pixmap, + GLX_TEXTURE_TARGET_EXT, + &target); + } + if (target == GLX_TEXTURE_2D_EXT) + { + im->native.target = GL_TEXTURE_2D; + im->native.mipmap = re->win->depth_cfg[depth].mipmap; + } +# ifdef GL_TEXTURE_RECTANGLE_ARB + else if (target == GLX_TEXTURE_RECTANGLE_EXT) + { + im->native.target = GL_TEXTURE_RECTANGLE_ARB; + im->native.mipmap = 0; + } +# endif + else + { + im->native.target = GL_TEXTURE_2D; + im->native.mipmap = 0; + ERR("still unknown target"); + } + } + else + ERR("GLX Pixmap create fail"); + im->native.yinvert = re->win->depth_cfg[depth].yinvert; + im->native.loose = re->win->detected.loose_binding; + im->native.data = n; + im->native.func.data = re; + im->native.func.bind = _native_bind_cb; + im->native.func.unbind = _native_unbind_cb; + im->native.func.free = _native_free_cb; + + evas_gl_common_image_native_enable(im); + } + } +# endif +#endif + } + else if (ns->type == EVAS_NATIVE_SURFACE_OPENGL) + { + if (native) + { + n = calloc(1, sizeof(Native)); + if (n) + { + memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface)); + + eina_hash_add(re->win->gl_context->shared->native_tex_hash, &texid, im); + + n->pixmap = 0; + n->visual = 0; +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + n->egl_surface = 0; +#else + n->fbc = 0; + n->glx_pixmap = 0; +#endif + + im->native.yinvert = 0; + im->native.loose = 0; + im->native.data = n; + im->native.func.data = re; + im->native.func.bind = _native_bind_cb; + im->native.func.unbind = _native_unbind_cb; + im->native.func.free = _native_free_cb; + im->native.target = GL_TEXTURE_2D; + im->native.mipmap = 0; + + // FIXME: need to implement mapping sub texture regions + // x, y, w, h for possible texture atlasing + + evas_gl_common_image_native_enable(im); + } + } + + } + return im; +} + +static void * +eng_image_native_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im = image; + Native *n; + if (!im) return NULL; + n = im->native.data; + if (!n) return NULL; + return &(n->ns); +} + +#if 0 // filtering disabled +static void +eng_image_draw_filtered(void *data, void *context, void *surface, + void *image, Evas_Filter_Info *filter) +{ + Render_Engine *re = data; + + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + + evas_gl_common_filter_draw(re->win->gl_context, image, filter); +} + +static Filtered_Image * +eng_image_filtered_get(void *im, uint8_t *key, size_t keylen) +{ + return evas_gl_common_image_filtered_get(im, key, keylen); +} + +static Filtered_Image * +eng_image_filtered_save(void *im, void *fim, uint8_t *key, size_t keylen) +{ + return evas_gl_common_image_filtered_save(im, fim, key, keylen); +} + +static void +eng_image_filtered_free(void *im, Filtered_Image *fim) +{ + evas_gl_common_image_filtered_free(im, fim); +} +#endif + + +// +// +///////////////////////////////////////////////////////////////////////// + +static void * +eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + *error = EVAS_LOAD_ERROR_NONE; + eng_window_use(re->win); + return evas_gl_common_image_load(re->win->gl_context, file, key, lo, error); +} + +static void * +eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + return evas_gl_common_image_new_from_data(re->win->gl_context, w, h, image_data, alpha, cspace); +} + +static void * +eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + return evas_gl_common_image_new_from_copied_data(re->win->gl_context, w, h, image_data, alpha, cspace); +} + +static void +eng_image_free(void *data, void *image) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_image_free(image); +} + +static void +eng_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) +{ + if (!image) + { + *w = 0; + *h = 0; + return; + } + if (w) *w = ((Evas_GL_Image *)image)->w; + if (h) *h = ((Evas_GL_Image *)image)->h; +} + +static void * +eng_image_size_set(void *data, void *image, int w, int h) +{ + Render_Engine *re; + Evas_GL_Image *im = image; + Evas_GL_Image *im_old; + + re = (Render_Engine *)data; + if (!im) return NULL; + if (im->native.data) + { + im->w = w; + im->h = h; + return image; + } + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt->dyn.img)) + { + evas_gl_common_texture_free(im->tex); + im->tex = NULL; + im->w = w; + im->h = h; + im->tex = evas_gl_common_texture_dynamic_new(im->gc, im); + return image; + } + im_old = image; + + switch (eng_image_colorspace_get(data, image)) + { + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + w &= ~0x1; + break; + } + + if ((im_old) && + ((int)im_old->im->cache_entry.w == w) && + ((int)im_old->im->cache_entry.h == h)) + return image; + if (im_old) + { + im = evas_gl_common_image_new(re->win->gl_context, w, h, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + /* + evas_common_load_image_data_from_file(im_old->im); + if (im_old->im->image->data) + { + evas_common_blit_rectangle(im_old->im, im->im, 0, 0, w, h, 0, 0); + evas_common_cpu_end_opt(); + } + */ + evas_gl_common_image_free(im_old); + } + else + im = evas_gl_common_image_new(re->win->gl_context, w, h, 1, EVAS_COLORSPACE_ARGB8888); + return im; +} + +static void * +eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h) +{ + Render_Engine *re; + Evas_GL_Image *im = image; + + re = (Render_Engine *)data; + if (!image) return NULL; + if (im->native.data) return image; + eng_window_use(re->win); + evas_gl_common_image_dirty(image, x, y, w, h); + return image; +} + +static void * +eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, int *err) +{ + Render_Engine *re; + Evas_GL_Image *im; + int error; + + re = (Render_Engine *)data; + if (!image) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_GENERIC; + return NULL; + } + im = image; + if (im->native.data) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + eng_window_use(re->win); + + if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.img) && (im->cs.space == EVAS_COLORSPACE_ARGB8888)) + { + if (im->tex->pt->dyn.checked_out > 0) + { + im->tex->pt->dyn.checked_out++; + *image_data = im->tex->pt->dyn.data; + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + *image_data = im->tex->pt->dyn.data = glsym_eglMapImageSEC(re->win->egl_disp, im->tex->pt->dyn.img); + + if (!im->tex->pt->dyn.data) + { + if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + return im; + } + im->tex->pt->dyn.checked_out++; + + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } +#else + if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.data)) + { + *image_data = im->tex->pt->dyn.data; + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + + eng_window_use(re->win); +#endif + + /* Engine can be fail to create texture after cache drop like eng_image_content_hint_set function, + so it is need to add code which check im->im's NULL value*/ + + if (!im->im) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return NULL; + } + + error = evas_cache_image_load_data(&im->im->cache_entry); + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (to_write) + { + if (im->references > 1) + { + Evas_GL_Image *im_new; + + im_new = evas_gl_common_image_new_from_copied_data + (im->gc, im->im->cache_entry.w, im->im->cache_entry.h, + im->im->image.data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im_new) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return NULL; + } + evas_gl_common_image_free(im); + im = im_new; + } + else + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + } + *image_data = im->im->image.data; + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + *image_data = im->cs.data; + break; + default: + abort(); + break; + } + if (err) *err = error; + return im; +} + +static void * +eng_image_data_put(void *data, void *image, DATA32 *image_data) +{ + Render_Engine *re; + Evas_GL_Image *im, *im2; + + re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (im->native.data) return image; + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt) + && (im->tex->pt->dyn.data) + && (im->cs.space == EVAS_COLORSPACE_ARGB8888)) + { + int w, h; + + if (im->tex->pt->dyn.data == image_data) + { + im->tex->pt->dyn.checked_out--; +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (im->tex->pt->dyn.checked_out == 0) + glsym_eglUnmapImageSEC(re->win->egl_disp, im->tex->pt->dyn.img); +#endif + return image; + } + + w = im->im->cache_entry.w; + h = im->im->cache_entry.h; + im2 = eng_image_new_from_data(data, w, h, image_data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im2) return im; + evas_gl_common_image_free(im); + im = im2; + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + return im; + } + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (image_data != im->im->image.data) + { + int w, h; + + w = im->im->cache_entry.w; + h = im->im->cache_entry.h; + im2 = eng_image_new_from_data(data, w, h, image_data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im2) return im; + evas_gl_common_image_free(im); + im = im2; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + if (image_data != im->cs.data) + { + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + im->cs.data = image_data; + } + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + break; + default: + abort(); + break; + } + return im; +} + +static void +eng_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) +{ + Evas_GL_Image *gim = image; + RGBA_Image *im; + + if (!gim) return; + if (gim->native.data) return; + im = (RGBA_Image *)gim->im; + if (!im) return; + evas_cache_image_preload_data(&im->cache_entry, target); +} + +static void +eng_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) +{ + Evas_GL_Image *gim = image; + RGBA_Image *im; + + if (!gim) return; + if (gim->native.data) return; + im = (RGBA_Image *)gim->im; + if (!im) return; + evas_cache_image_preload_cancel(&im->cache_entry, target); +} + +static void +eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_image_draw(re->win->gl_context, image, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h, + smooth); +} + +static void +eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) +{ + if (image) evas_gl_common_image_scale_hint_set(image, hint); +} + +static int +eng_image_scale_hint_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + if (!gim) return EVAS_IMAGE_SCALE_HINT_NONE; + return gim->scale_hint; +} + +static void +eng_image_map_draw(void *data, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) +{ + Evas_GL_Image *gim = image; + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + if (npoints != 4) + { + // FIXME: nash - you didn't fix this + abort(); + } + if ((p[0].x == p[3].x) && + (p[1].x == p[2].x) && + (p[0].y == p[1].y) && + (p[3].y == p[2].y) && + (p[0].x <= p[1].x) && + (p[0].y <= p[2].y) && + (p[0].u == 0) && + (p[0].v == 0) && + (p[1].u == (gim->w << FP)) && + (p[1].v == 0) && + (p[2].u == (gim->w << FP)) && + (p[2].v == (gim->h << FP)) && + (p[3].u == 0) && + (p[3].v == (gim->h << FP)) && + (p[0].col == 0xffffffff) && + (p[1].col == 0xffffffff) && + (p[2].col == 0xffffffff) && + (p[3].col == 0xffffffff)) + { + int dx, dy, dw, dh; + + dx = p[0].x >> FP; + dy = p[0].y >> FP; + dw = (p[2].x >> FP) - dx; + dh = (p[2].y >> FP) - dy; + eng_image_draw(data, context, surface, image, + 0, 0, gim->w, gim->h, dx, dy, dw, dh, smooth); + } + else + { + evas_gl_common_image_map_draw(re->win->gl_context, image, npoints, p, + smooth, level); + } +} + +static void * +eng_image_map_surface_new(void *data, int w, int h, int alpha) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_image_surface_new(re->win->gl_context, w, h, alpha); +} + +static void +eng_image_map_surface_free(void *data __UNUSED__, void *surface) +{ + evas_gl_common_image_free(surface); +} + +static void +eng_image_content_hint_set(void *data __UNUSED__, void *image, int hint) +{ + if (image) evas_gl_common_image_content_hint_set(image, hint); +} + +static int +eng_image_content_hint_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + if (!gim) return EVAS_IMAGE_CONTENT_HINT_NONE; + return gim->content_hint; +} + +static void +eng_image_cache_flush(void *data) +{ + Render_Engine *re; + int tmp_size; + + re = (Render_Engine *)data; + + tmp_size = evas_common_image_get_cache(); + evas_common_image_set_cache(0); + evas_common_rgba_image_scalecache_flush(); + evas_gl_common_image_cache_flush(re->win->gl_context); + evas_common_image_set_cache(tmp_size); +} + +static void +eng_image_cache_set(void *data, int bytes) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_image_set_cache(bytes); + evas_common_rgba_image_scalecache_size_set(bytes); + evas_gl_common_image_cache_flush(re->win->gl_context); +} + +static int +eng_image_cache_get(void *data __UNUSED__) +{ + return evas_common_image_get_cache(); +} + +static void +eng_image_stride_get(void *data __UNUSED__, void *image, int *stride) +{ + Evas_GL_Image *im = image; + + if ((im->tex) && (im->tex->pt->dyn.img)) + *stride = im->tex->pt->dyn.stride; + else + *stride = im->w * 4; +} + +static void +eng_font_draw(void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + { + // FIXME: put im into context so we can free it + static RGBA_Image *im = NULL; + + if (!im) + im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + im->cache_entry.w = re->win->w; + im->cache_entry.h = re->win->h; + evas_common_draw_context_font_ext_set(context, + re->win->gl_context, + evas_gl_font_texture_new, + evas_gl_font_texture_free, + evas_gl_font_texture_draw); + evas_common_font_draw(im, context, (RGBA_Font *) font, x, y, + intl_props); + evas_common_draw_context_font_ext_set(context, + NULL, + NULL, + NULL, + NULL); + } +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *info __UNUSED__) +{ + Render_Engine *re = (Render_Engine *)data; + return re->win->alpha; +} + +static int +_set_internal_config(Render_Engine_GL_Surface *sfc, Evas_GL_Config *cfg) +{ + // Also initialize pixel format here as well... + switch(cfg->color_format) + { + case EVAS_GL_RGB_888: + sfc->rt_fmt = GL_RGB; + sfc->rt_internal_fmt = GL_RGB; + break; + case EVAS_GL_RGBA_8888: + sfc->rt_fmt = GL_RGBA; + sfc->rt_internal_fmt = GL_RGBA; + break; + default: + ERR("Invalid Color Format!"); + return 0; + } + + switch(cfg->depth_bits) + { + case EVAS_GL_DEPTH_NONE: + break; + case EVAS_GL_DEPTH_BIT_8: + case EVAS_GL_DEPTH_BIT_16: + case EVAS_GL_DEPTH_BIT_24: +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // 24 bit doesn't work... just cover it with 16 for now.. + sfc->rb_depth_fmt = GL_DEPTH_COMPONENT16; +#else + sfc->rb_depth_fmt = GL_DEPTH_COMPONENT; +#endif + break; + case EVAS_GL_DEPTH_BIT_32: + default: + ERR("Unsupported Depth Bits Format!"); + return 0; + } + + switch(cfg->stencil_bits) + { + case EVAS_GL_STENCIL_NONE: + break; + case EVAS_GL_STENCIL_BIT_1: + case EVAS_GL_STENCIL_BIT_2: + case EVAS_GL_STENCIL_BIT_4: + case EVAS_GL_STENCIL_BIT_8: +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + sfc->rb_stencil_fmt = GL_STENCIL_INDEX8; +#else + sfc->rb_stencil_fmt = GL_STENCIL_INDEX; +#endif + break; + case EVAS_GL_STENCIL_BIT_16: + default: + ERR("Unsupported Stencil Bits Format!"); + return 0; + } + + // Do Packed Depth24_Stencil8 Later... + + return 1; +} + +static int +_create_rt_buffers(Render_Engine *data __UNUSED__, + Render_Engine_GL_Surface *sfc) +{ + // Render Target texture + glGenTextures(1, &sfc->rt_tex ); + + // Depth RenderBuffer - Create storage here... + if (sfc->depth_bits != EVAS_GL_DEPTH_NONE) + glGenRenderbuffers(1, &sfc->rb_depth); + + // Stencil RenderBuffer - Create Storage here... + if (sfc->stencil_bits != EVAS_GL_STENCIL_NONE) + glGenRenderbuffers(1, &sfc->rb_stencil); + + return 1; +} + +static int +_attach_fbo_surface(Render_Engine *data __UNUSED__, + Render_Engine_GL_Surface *sfc, + Render_Engine_GL_Context *ctx) +{ + int fb_status; + + // Initialize Texture + glBindTexture(GL_TEXTURE_2D, sfc->rt_tex ); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, sfc->w, sfc->h, 0, + GL_RGBA, GL_UNSIGNED_BYTE, NULL); + glBindTexture(GL_TEXTURE_2D, 0); + + + // Attach texture to FBO + glBindFramebuffer(GL_FRAMEBUFFER, ctx->context_fbo); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, sfc->rt_tex, 0); + + // Depth RenderBuffer - Attach it to FBO + if (sfc->depth_bits != EVAS_GL_DEPTH_NONE) + { + glBindRenderbuffer(GL_RENDERBUFFER, sfc->rb_depth); + glRenderbufferStorage(GL_RENDERBUFFER, sfc->rb_depth_fmt, + sfc->w, sfc->h); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, sfc->rb_depth); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + } + + // Stencil RenderBuffer - Attach it to FBO + if (sfc->stencil_bits != EVAS_GL_STENCIL_NONE) + { + glBindRenderbuffer(GL_RENDERBUFFER, sfc->rb_stencil); + glRenderbufferStorage(GL_RENDERBUFFER, sfc->rb_stencil_fmt, + sfc->w, sfc->h); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, + GL_RENDERBUFFER, sfc->rb_stencil); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + } + + // Check FBO for completeness + fb_status = glCheckFramebufferStatus(GL_FRAMEBUFFER); + if (fb_status != GL_FRAMEBUFFER_COMPLETE) + { + ERR("FBO not complete!"); + return 0; + } + + return 1; +} + + +static void * +eng_gl_surface_create(void *data, void *config, int w, int h) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Render_Engine_GL_Resource *rsc; + Evas_GL_Config *cfg; + int ret; + + sfc = calloc(1, sizeof(Render_Engine_GL_Surface)); + if (!sfc) return NULL; + + re = (Render_Engine *)data; + cfg = (Evas_GL_Config *)config; + + sfc->initialized = 0; + sfc->fbo_attached = 0; + sfc->w = w; + sfc->h = h; + sfc->depth_bits = cfg->depth_bits; + sfc->stencil_bits = cfg->stencil_bits; + sfc->rt_tex = 0; + sfc->rb_depth = 0; + sfc->rb_stencil = 0; + + // Set the internal format based on the config + if (!_set_internal_config(sfc, cfg)) + { + ERR("Unsupported Format!"); + free(sfc); + return NULL; + } + + // Create internal resource context if it hasn't been created already + if ((rsc = eina_tls_get(resource_key)) == NULL) + { + if ((rsc = _create_internal_glue_resources(re)) == NULL) + { + ERR("Error creating internal resources."); + free(sfc); + return NULL; + } + } + + // I'm using evas's original context to create the render target texture + // This is to prevent awkwardness in using native_surface_get() function + // If the rt texture creation is deferred till the context is created and + // make_current called, the user can't call native_surface_get() right + // after the surface is created. hence this is done here using evas' context. +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, rsc->surface, rsc->context); +#else + ret = glXMakeCurrent(re->info->info.display, re->win->win, rsc->context); +#endif + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + free(sfc); + return NULL; + } + + // Create Render texture + if (!_create_rt_buffers(re, sfc)) + { + ERR("_create_rt_buffers() failed."); + free(sfc); + return NULL; + } + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); +#else + ret = glXMakeCurrent(re->info->info.display, None, NULL); +#endif + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + free(sfc); + return NULL; + } + + return sfc; +} + +static int +eng_gl_surface_destroy(void *data, void *surface) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Render_Engine_GL_Resource *rsc; + int ret; + + re = (Render_Engine *)data; + sfc = (Render_Engine_GL_Surface*)surface; + + if (!sfc) return 0; + + if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, rsc->surface, rsc->context); +#else + ret = glXMakeCurrent(re->info->info.display, re->win->win, rsc->context); +#endif + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + // Delete FBO/RBO and Texture here + if (sfc->rt_tex) + glDeleteTextures(1, &sfc->rt_tex); + + if (sfc->rb_depth) + glDeleteRenderbuffers(1, &sfc->rb_depth); + + if (sfc->rb_stencil) + glDeleteRenderbuffers(1, &sfc->rb_stencil); + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); +#else + ret = glXMakeCurrent(re->info->info.display, None, NULL); +#endif + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + free(sfc); + return 0; + } + + free(sfc); + surface = NULL; + + return 1; +} + +static void * +eng_gl_context_create(void *data, void *share_context) +{ + Render_Engine *re; + Render_Engine_GL_Context *ctx; + Render_Engine_GL_Context *share_ctx; +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + int context_attrs[3]; +#endif + + ctx = calloc(1, sizeof(Render_Engine_GL_Context)); + + if (!ctx) return NULL; + + re = (Render_Engine *)data; + share_ctx = (Render_Engine_GL_Context *)share_context; + + // Set the share context to Evas' GL context if share_context is NULL. + // Otherwise set it to the given share_context. +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // EGL + context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; + context_attrs[1] = 2; + context_attrs[2] = EGL_NONE; + + if (share_ctx) + { + ctx->context = eglCreateContext(re->win->egl_disp, + re->win->egl_config, + share_ctx->context, // Share Context + context_attrs); + } + else + { + ctx->context = eglCreateContext(re->win->egl_disp, + re->win->egl_config, + re->win->egl_context[0], // Evas' GL Context + context_attrs); + } + + if (!ctx->context) + { + ERR("eglCreateContext() fail. code=%#x", eglGetError()); + return NULL; + } +#else + // GLX + if (share_context) + { + ctx->context = glXCreateContext(re->info->info.display, + re->win->visualinfo, + share_ctx->context, // Share Context + 1); + } + else + { + ctx->context = glXCreateContext(re->info->info.display, + re->win->visualinfo, + re->win->context, // Evas' GL Context + 1); + } + + if (!ctx->context) + { + ERR("glXCreateContext() fail."); + return NULL; + } +#endif + + ctx->initialized = 0; + ctx->context_fbo = 0; + ctx->current_sfc = NULL; + + return ctx; +} + +static int +eng_gl_context_destroy(void *data, void *context) +{ + Render_Engine *re; + Render_Engine_GL_Context *ctx; + Render_Engine_GL_Resource *rsc; + int ret; + + re = (Render_Engine *)data; + ctx = (Render_Engine_GL_Context*)context; + + if (!ctx) return 0; + + if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0; + + // 1. Do a make current with the given context +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, + rsc->surface, ctx->context); +#else + ret = glXMakeCurrent(re->info->info.display, re->win->win, + ctx->context); +#endif + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + // 2. Delete the FBO + if (ctx->context_fbo) + glDeleteFramebuffers(1, &ctx->context_fbo); + + // 3. Destroy the Context +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + eglDestroyContext(re->win->egl_disp, ctx->context); + + ctx->context = EGL_NO_CONTEXT; + + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, + EGL_NO_SURFACE, EGL_NO_CONTEXT); +#else + glXDestroyContext(re->info->info.display, ctx->context); + + ctx->context = 0; + + ret = glXMakeCurrent(re->info->info.display, None, NULL); +#endif + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + free(ctx); + context = NULL; + + return 1; +} + +static int +eng_gl_make_current(void *data __UNUSED__, void *surface, void *context) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Render_Engine_GL_Context *ctx; + int ret = 0; +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + Render_Engine_GL_Resource *rsc; +#endif + + re = (Render_Engine *)data; + sfc = (Render_Engine_GL_Surface*)surface; + ctx = (Render_Engine_GL_Context*)context; + + // Unset surface/context + if ((!sfc) || (!ctx)) + { +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, + EGL_NO_SURFACE, EGL_NO_CONTEXT); +#else + ret = glXMakeCurrent(re->info->info.display, None, NULL); +#endif + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + if (ctx) ctx->current_sfc = NULL; + if (sfc) sfc->current_ctx = NULL; + current_evgl_ctx = NULL; + return 1; + } + + // Do a make current only if it's not already current +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0; + + if ((eglGetCurrentContext() != ctx->context) || + (eglGetCurrentSurface(EGL_READ) != rsc->surface) || + (eglGetCurrentSurface(EGL_DRAW) != rsc->surface) ) + { + // Flush remainder of what's in Evas' pipeline + if (re->win) eng_window_use(NULL); + + // Do a make current + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, + rsc->surface, ctx->context); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + } +#else + if ((glXGetCurrentContext() != ctx->context) || + (glXGetCurrentDrawable() != re->win->win) ) + { + // Flush remainder of what's in Evas' pipeline + if (re->win) eng_window_use(NULL); + + // Do a make current + ret = glXMakeCurrent(re->info->info.display, re->win->win, ctx->context); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + } +#endif + + // Create FBO if not already created + if (!ctx->initialized) + { + glGenFramebuffers(1, &ctx->context_fbo); + ctx->initialized = 1; + } + + // Attach FBO if it hasn't been attached or if surface changed + if ((!sfc->fbo_attached) || (ctx->current_sfc != sfc)) + { + if (!_attach_fbo_surface(re, sfc, ctx)) + { + ERR("_attach_fbo_surface() failed."); + return 0; + } + + if (ctx->current_fbo) + // Bind to the previously bound buffer + glBindFramebuffer(GL_FRAMEBUFFER, ctx->current_fbo); + else + // Bind FBO + glBindFramebuffer(GL_FRAMEBUFFER, ctx->context_fbo); + + sfc->fbo_attached = 1; + } + + // Set the current surface/context + ctx->current_sfc = sfc; + sfc->current_ctx = ctx; + current_evgl_ctx = ctx; + + return 1; +} + +static void * +eng_gl_string_query(void *data __UNUSED__, int name) +{ + switch(name) + { + case EVAS_GL_EXTENSIONS: + return (void*)_evasgl_ext_string; + default: + return NULL; + }; +} + +static void * +eng_gl_proc_address_get(void *data __UNUSED__, const char *name) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (glsym_eglGetProcAddress) return glsym_eglGetProcAddress(name); + return dlsym(RTLD_DEFAULT, name); +#else + if (glsym_glXGetProcAddress) return glsym_glXGetProcAddress(name); + return dlsym(RTLD_DEFAULT, name); +#endif +} + +static int +eng_gl_native_surface_get(void *data, void *surface, void *native_surface) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Evas_Native_Surface *ns; + + re = (Render_Engine *)data; + sfc = (Render_Engine_GL_Surface*)surface; + ns = (Evas_Native_Surface*)native_surface; + + ns->type = EVAS_NATIVE_SURFACE_OPENGL; + ns->version = EVAS_NATIVE_SURFACE_VERSION; + ns->data.opengl.texture_id = sfc->rt_tex; + ns->data.opengl.x = 0; + ns->data.opengl.y = 0; + ns->data.opengl.w = sfc->w; + ns->data.opengl.h = sfc->h; + + return 1; +} + + +static const GLubyte * +evgl_glGetString(GLenum name) +{ + if (name == GL_EXTENSIONS) + return (GLubyte *)_gl_ext_string; //glGetString(GL_EXTENSIONS); + else + return glGetString(name); +} + +static void +evgl_glBindFramebuffer(GLenum target, GLuint framebuffer) +{ + Render_Engine_GL_Context *ctx = current_evgl_ctx; + + // Take care of BindFramebuffer 0 issue + if (framebuffer==0) + { + if (ctx) + { + glBindFramebuffer(target, ctx->context_fbo); + ctx->current_fbo = 0; + } + } + else + { + glBindFramebuffer(target, framebuffer); + + // Save this for restore when doing make current + if (ctx) + ctx->current_fbo = framebuffer; + } +} + +static void +evgl_glBindRenderbuffer(GLenum target, GLuint renderbuffer) +{ + // Add logic to take care when renderbuffer=0 + // On a second thought we don't need this + glBindRenderbuffer(target, renderbuffer); +} + +static void +evgl_glClearDepthf(GLclampf depth) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + glClearDepthf(depth); +#else + glClearDepth(depth); +#endif +} + +static void +evgl_glDepthRangef(GLclampf zNear, GLclampf zFar) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + glDepthRangef(zNear, zFar); +#else + glDepthRange(zNear, zFar); +#endif +} + +static void +evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); +#else + if (range) + { + range[0] = -126; // floor(log2(FLT_MIN)) + range[1] = 127; // floor(log2(FLT_MAX)) + } + if (precision) + { + precision[0] = 24; // floor(-log2((1.0/16777218.0))); + } + return; + shadertype = precisiontype = 0; +#endif +} + +static void +evgl_glReleaseShaderCompiler(void) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + glReleaseShaderCompiler(); +#else +#endif +} + +static void +evgl_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) +{ +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + glShaderBinary(n, shaders, binaryformat, binary, length); +#else +// FIXME: need to dlsym/getprocaddress for this + return; + n = binaryformat = length = 0; + shaders = binary = 0; +#endif +} + +//--------------------------------// +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +// EGL Extensions +static void * +evgl_evasglCreateImage(int target, void* buffer, int *attrib_list) +{ + if (current_engine) + { + return glsym_eglCreateImage(current_engine->win->egl_disp, + EGL_NO_CONTEXT, + target, + buffer, + attrib_list); + } + else + ERR("Invalid Engine... (Can't acccess EGL Display)\n"); +} + +static void +evgl_evasglDestroyImage(EvasGLImage image) +{ + if (current_engine) + glsym_eglDestroyImage(current_engine->win->egl_disp, image); + else + ERR("Invalid Engine... (Can't acccess EGL Display)\n"); +} + +static void +evgl_glEvasGLImageTargetTexture2DOES(GLenum target, EvasGLImage image) +{ + glsym_glEGLImageTargetTexture2DOES(target, image); +} + +static void +evgl_glEvasGLImageTargetRenderbufferStorageOES(GLenum target, EvasGLImage image) +{ + glsym_glEGLImageTargetTexture2DOES(target, image); +} +#else +#endif + +//--------------------------------// + + +static void * +eng_gl_api_get(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + + gl_funcs.version = EVAS_GL_API_VERSION; + +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, ) + // GLES 2.0 + ORD(glActiveTexture); + ORD(glAttachShader); + ORD(glBindAttribLocation); + ORD(glBindBuffer); + ORD(glBindTexture); + ORD(glBlendColor); + ORD(glBlendEquation); + ORD(glBlendEquationSeparate); + ORD(glBlendFunc); + ORD(glBlendFuncSeparate); + ORD(glBufferData); + ORD(glBufferSubData); + ORD(glCheckFramebufferStatus); + ORD(glClear); + ORD(glClearColor); +// ORD(glClearDepthf); + ORD(glClearStencil); + ORD(glColorMask); + ORD(glCompileShader); + ORD(glCompressedTexImage2D); + ORD(glCompressedTexSubImage2D); + ORD(glCopyTexImage2D); + ORD(glCopyTexSubImage2D); + ORD(glCreateProgram); + ORD(glCreateShader); + ORD(glCullFace); + ORD(glDeleteBuffers); + ORD(glDeleteFramebuffers); + ORD(glDeleteProgram); + ORD(glDeleteRenderbuffers); + ORD(glDeleteShader); + ORD(glDeleteTextures); + ORD(glDepthFunc); + ORD(glDepthMask); +// ORD(glDepthRangef); + ORD(glDetachShader); + ORD(glDisable); + ORD(glDisableVertexAttribArray); + ORD(glDrawArrays); + ORD(glDrawElements); + ORD(glEnable); + ORD(glEnableVertexAttribArray); + ORD(glFinish); + ORD(glFlush); + ORD(glFramebufferRenderbuffer); + ORD(glFramebufferTexture2D); + ORD(glFrontFace); + ORD(glGenBuffers); + ORD(glGenerateMipmap); + ORD(glGenFramebuffers); + ORD(glGenRenderbuffers); + ORD(glGenTextures); + ORD(glGetActiveAttrib); + ORD(glGetActiveUniform); + ORD(glGetAttachedShaders); + ORD(glGetAttribLocation); + ORD(glGetBooleanv); + ORD(glGetBufferParameteriv); + ORD(glGetError); + ORD(glGetFloatv); + ORD(glGetFramebufferAttachmentParameteriv); + ORD(glGetIntegerv); + ORD(glGetProgramiv); + ORD(glGetProgramInfoLog); + ORD(glGetRenderbufferParameteriv); + ORD(glGetShaderiv); + ORD(glGetShaderInfoLog); +// ORD(glGetShaderPrecisionFormat); + ORD(glGetShaderSource); +// ORD(glGetString); + ORD(glGetTexParameterfv); + ORD(glGetTexParameteriv); + ORD(glGetUniformfv); + ORD(glGetUniformiv); + ORD(glGetUniformLocation); + ORD(glGetVertexAttribfv); + ORD(glGetVertexAttribiv); + ORD(glGetVertexAttribPointerv); + ORD(glHint); + ORD(glIsBuffer); + ORD(glIsEnabled); + ORD(glIsFramebuffer); + ORD(glIsProgram); + ORD(glIsRenderbuffer); + ORD(glIsShader); + ORD(glIsTexture); + ORD(glLineWidth); + ORD(glLinkProgram); + ORD(glPixelStorei); + ORD(glPolygonOffset); + ORD(glReadPixels); +// ORD(glReleaseShaderCompiler); + ORD(glRenderbufferStorage); + ORD(glSampleCoverage); + ORD(glScissor); +// ORD(glShaderBinary); + ORD(glShaderSource); + ORD(glStencilFunc); + ORD(glStencilFuncSeparate); + ORD(glStencilMask); + ORD(glStencilMaskSeparate); + ORD(glStencilOp); + ORD(glStencilOpSeparate); + ORD(glTexImage2D); + ORD(glTexParameterf); + ORD(glTexParameterfv); + ORD(glTexParameteri); + ORD(glTexParameteriv); + ORD(glTexSubImage2D); + ORD(glUniform1f); + ORD(glUniform1fv); + ORD(glUniform1i); + ORD(glUniform1iv); + ORD(glUniform2f); + ORD(glUniform2fv); + ORD(glUniform2i); + ORD(glUniform2iv); + ORD(glUniform3f); + ORD(glUniform3fv); + ORD(glUniform3i); + ORD(glUniform3iv); + ORD(glUniform4f); + ORD(glUniform4fv); + ORD(glUniform4i); + ORD(glUniform4iv); + ORD(glUniformMatrix2fv); + ORD(glUniformMatrix3fv); + ORD(glUniformMatrix4fv); + ORD(glUseProgram); + ORD(glValidateProgram); + ORD(glVertexAttrib1f); + ORD(glVertexAttrib1fv); + ORD(glVertexAttrib2f); + ORD(glVertexAttrib2fv); + ORD(glVertexAttrib3f); + ORD(glVertexAttrib3fv); + ORD(glVertexAttrib4f); + ORD(glVertexAttrib4fv); + ORD(glVertexAttribPointer); + ORD(glViewport); +#undef ORD + +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, glsym_) + // Extensions + ORD(glGetProgramBinaryOES); + ORD(glProgramBinaryOES); + ORD(glMapBufferOES); + ORD(glUnmapBufferOES); + ORD(glGetBufferPointervOES); + ORD(glTexImage3DOES); + ORD(glTexSubImage3DOES); + ORD(glCopyTexSubImage3DOES); + ORD(glCompressedTexImage3DOES); + ORD(glCompressedTexSubImage3DOES); + ORD(glFramebufferTexture3DOES); + ORD(glGetPerfMonitorGroupsAMD); + ORD(glGetPerfMonitorCountersAMD); + ORD(glGetPerfMonitorGroupStringAMD); + ORD(glGetPerfMonitorCounterStringAMD); + ORD(glGetPerfMonitorCounterInfoAMD); + ORD(glGenPerfMonitorsAMD); + ORD(glDeletePerfMonitorsAMD); + ORD(glSelectPerfMonitorCountersAMD); + ORD(glBeginPerfMonitorAMD); + ORD(glEndPerfMonitorAMD); + ORD(glGetPerfMonitorCounterDataAMD); + ORD(glDiscardFramebufferEXT); + ORD(glMultiDrawArraysEXT); + ORD(glMultiDrawElementsEXT); + ORD(glDeleteFencesNV); + ORD(glGenFencesNV); + ORD(glIsFenceNV); + ORD(glTestFenceNV); + ORD(glGetFenceivNV); + ORD(glFinishFenceNV); + ORD(glSetFenceNV); + ORD(glGetDriverControlsQCOM); + ORD(glGetDriverControlStringQCOM); + ORD(glEnableDriverControlQCOM); + ORD(glDisableDriverControlQCOM); + ORD(glExtGetTexturesQCOM); + ORD(glExtGetBuffersQCOM); + ORD(glExtGetRenderbuffersQCOM); + ORD(glExtGetFramebuffersQCOM); + ORD(glExtGetTexLevelParameterivQCOM); + ORD(glExtTexObjectStateOverrideiQCOM); + ORD(glExtGetTexSubImageQCOM); + ORD(glExtGetBufferPointervQCOM); + ORD(glExtGetShadersQCOM); + ORD(glExtGetProgramsQCOM); + ORD(glExtIsProgramBinaryQCOM); + ORD(glExtGetProgramBinarySourceQCOM); +#undef ORD + +// Override functions wrapped by Evas_GL +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, evgl_) + ORD(glBindFramebuffer); + ORD(glBindRenderbuffer); + + // GLES2.0 API compat on top of desktop gl + ORD(glClearDepthf); + ORD(glDepthRangef); + ORD(glGetShaderPrecisionFormat); + ORD(glReleaseShaderCompiler); + ORD(glShaderBinary); + + ORD(glGetString); + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + // GLES 2.0 Extensions that needs wrapping + ORD(evasglCreateImage); + ORD(evasglDestroyImage); + ORD(glEvasGLImageTargetTexture2DOES); + ORD(glEvasGLImageTargetRenderbufferStorageOES); +#endif + +#undef ORD + + return &gl_funcs; +} + +static int +eng_image_load_error_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im; + + if (!image) return EVAS_LOAD_ERROR_NONE; + im = image; + return im->im->cache_entry.load_error; +} + +static Eina_Bool +eng_image_animated_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return EINA_FALSE; + im = (Image_Entry *)gim->im; + if (!im) return EINA_FALSE; + + return im->flags.animated; +} + +static int +eng_image_animated_frame_count_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return -1; + im = (Image_Entry *)gim->im; + if (!im) return -1; + + if (!im->flags.animated) return -1; + return im->frame_count; +} + +static Evas_Image_Animated_Loop_Hint +eng_image_animated_loop_type_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return EVAS_IMAGE_ANIMATED_HINT_NONE; + im = (Image_Entry *)gim->im; + if (!im) return EVAS_IMAGE_ANIMATED_HINT_NONE; + + if (!im->flags.animated) return EVAS_IMAGE_ANIMATED_HINT_NONE; + return im->loop_hint; +} + +static int +eng_image_animated_loop_count_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return -1; + im = (Image_Entry *)gim->im; + if (!im) return -1; + + if (!im->flags.animated) return -1; + return im->loop_count; +} + +static double +eng_image_animated_frame_duration_get(void *data __UNUSED__, void *image, int start_frame, int frame_num) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return -1; + im = (Image_Entry *)gim->im; + if (!im) return -1; + + if (!im->flags.animated) return -1; + return evas_common_load_rgba_image_frame_duration_from_file(im, start_frame, frame_num); +} + +static Eina_Bool +eng_image_animated_frame_set(void *data __UNUSED__, void *image, int frame_index) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return EINA_FALSE; + im = (Image_Entry *)gim->im; + if (!im) return EINA_FALSE; + + if (!im->flags.animated) return EINA_FALSE; + if (im->cur_frame == frame_index) return EINA_FALSE; + + im->cur_frame = frame_index; + return EINA_TRUE; +} + +static void +eng_image_max_size_get(void *data, int *maxw, int *maxh) +{ + Render_Engine *re = (Render_Engine *)data; + if (maxw) *maxw = re->win->gl_context->shared->info.max_texture_size; + if (maxh) *maxh = re->win->gl_context->shared->info.max_texture_size; +} + +static int +module_open(Evas_Module *em) +{ + static Eina_Bool xrm_inited = EINA_FALSE; + if (!xrm_inited) + { + xrm_inited = EINA_TRUE; + XrmInitialize(); + } + + if (!em) return 0; + if (!evas_gl_common_module_open()) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + if (_evas_engine_GL_X11_log_dom < 0) + _evas_engine_GL_X11_log_dom = eina_log_domain_register + ("evas-gl_x11", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_GL_X11_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ + #define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(context_cutout_add); + ORD(context_cutout_clear); + ORD(output_flush); + ORD(output_idle_flush); + ORD(output_dump); + ORD(rectangle_draw); + ORD(line_draw); + ORD(polygon_point_add); + ORD(polygon_points_clear); + ORD(polygon_draw); + + ORD(image_load); + ORD(image_new_from_data); + ORD(image_new_from_copied_data); + ORD(image_free); + ORD(image_size_get); + ORD(image_size_set); + ORD(image_dirty_region); + ORD(image_data_get); + ORD(image_data_put); + ORD(image_data_preload_request); + ORD(image_data_preload_cancel); + ORD(image_alpha_set); + ORD(image_alpha_get); + ORD(image_border_set); + ORD(image_border_get); + ORD(image_draw); + ORD(image_comment_get); + ORD(image_format_get); + ORD(image_colorspace_set); + ORD(image_colorspace_get); + ORD(image_mask_create); + ORD(image_native_set); + ORD(image_native_get); +#if 0 // filtering disabled + ORD(image_draw_filtered); + ORD(image_filtered_get); + ORD(image_filtered_save); + ORD(image_filtered_free); +#endif + + ORD(font_draw); + + ORD(image_scale_hint_set); + ORD(image_scale_hint_get); + ORD(image_stride_get); + + ORD(image_map_draw); + ORD(image_map_surface_new); + ORD(image_map_surface_free); + + ORD(image_content_hint_set); + ORD(image_content_hint_get); + + ORD(image_cache_flush); + ORD(image_cache_set); + ORD(image_cache_get); + + ORD(gl_surface_create); + ORD(gl_surface_destroy); + ORD(gl_context_create); + ORD(gl_context_destroy); + ORD(gl_make_current); + ORD(gl_string_query); + ORD(gl_proc_address_get); + ORD(gl_native_surface_get); + ORD(gl_api_get); + + ORD(image_load_error_get); + + /* now advertise out own api */ + ORD(image_animated_get); + ORD(image_animated_frame_count_get); + ORD(image_animated_loop_type_get); + ORD(image_animated_loop_count_get); + ORD(image_animated_frame_duration_get); + ORD(image_animated_frame_set); + + ORD(image_max_size_get); + + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_GL_X11_log_dom); +/* + if (xrdb_user.db) + { + XrmDestroyDatabase(xrdb_user.db); + xrdb_user.last_stat = 0; + xrdb_user.last_mtime = 0; + xrdb_user.db = NULL; + } + */ + evas_gl_common_module_close(); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "gl_x11", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, gl_x11); + +#ifndef EVAS_STATIC_BUILD_GL_XLIB +EVAS_EINA_MODULE_DEFINE(engine, gl_x11); +#endif + +/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/modules/engines/gl_x11/evas_engine.h b/libraries/evas/src/modules/engines/gl_x11/evas_engine.h new file mode 100644 index 0000000..4f62c58 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_x11/evas_engine.h @@ -0,0 +1,126 @@ +#ifndef EVAS_ENGINE_H +#define EVAS_ENGINE_H + +#include "config.h" +#include "evas_common.h" +#include "evas_private.h" +#include "evas_gl_common.h" +#include "Evas.h" +#include "Evas_Engine_GL_X11.h" + +#define GL_GLEXT_PROTOTYPES + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +# if defined(GLES_VARIETY_S3C6410) +# include +# include +# include +# include +# include +# include +# include // xres - dpi +# elif defined(GLES_VARIETY_SGX) +# define SUPPORT_X11 1 +# include +# include +# include +# include +# include +# include +# include +# include // xres - dpi +# endif +#else +# include +# include +# include +# include +# include // xres - dpi +# include +# include +# include +#endif + +extern int _evas_engine_GL_X11_log_dom ; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_GL_X11_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_GL_X11_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_GL_X11_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_GL_X11_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_GL_X11_log_dom, __VA_ARGS__) + +typedef struct _Evas_GL_X11_Window Evas_GL_X11_Window; + +struct _Evas_GL_X11_Window +{ + Display *disp; + Window win; + int w, h; + int screen; + XVisualInfo *visualinfo; + Visual *visual; + Colormap colormap; + int depth; + int alpha; + int rot; + Evas_Engine_GL_Context *gl_context; + struct { + int redraw : 1; + int drew : 1; + int x1, y1, x2, y2; + } draw; +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + EGLContext egl_context[1]; + EGLSurface egl_surface[1]; + EGLConfig egl_config; + EGLDisplay egl_disp; +#else + GLXContext context; + GLXWindow glxwin; + struct { + GLXFBConfig fbc; + int tex_format; + int tex_target; + int mipmap; + unsigned char yinvert : 1; + } depth_cfg[33]; // config for all 32 possible depths! + + struct { + unsigned int loose_binding : 1; + } detected; +#endif + int surf : 1; +}; + +Evas_GL_X11_Window *eng_window_new(Display *disp, Window win, int screen, + Visual *vis, Colormap cmap, + int depth, int w, int h, int indirect, + int alpha, int rot); +void eng_window_free(Evas_GL_X11_Window *gw); +void eng_window_use(Evas_GL_X11_Window *gw); +void eng_window_unsurf(Evas_GL_X11_Window *gw); +void eng_window_resurf(Evas_GL_X11_Window *gw); + +Visual *eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo); +Colormap eng_best_colormap_get(Evas_Engine_Info_GL_X11 *einfo); +int eng_best_depth_get(Evas_Engine_Info_GL_X11 *einfo); + +#endif diff --git a/libraries/evas/src/modules/engines/gl_x11/evas_x_main.c b/libraries/evas/src/modules/engines/gl_x11/evas_x_main.c new file mode 100644 index 0000000..323c976 --- /dev/null +++ b/libraries/evas/src/modules/engines/gl_x11/evas_x_main.c @@ -0,0 +1,901 @@ +#include "evas_engine.h" + +static Evas_GL_X11_Window *_evas_gl_x11_window = NULL; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +static EGLContext context = EGL_NO_CONTEXT; +#else +// FIXME: this will only work for 1 display connection (glx land can have > 1) +static GLXContext context = 0; +static GLXContext rgba_context = 0; +static GLXFBConfig fbconf = 0; +static GLXFBConfig rgba_fbconf = 0; +#endif + +// fixme: something is up/wrong here - dont know what tho... +//#define NEWGL 1 + +static XVisualInfo *_evas_gl_x11_vi = NULL; +static XVisualInfo *_evas_gl_x11_rgba_vi = NULL; +static Colormap _evas_gl_x11_cmap = 0; +static Colormap _evas_gl_x11_rgba_cmap = 0; + +static int win_count = 0; + +Evas_GL_X11_Window * +eng_window_new(Display *disp, + Window win, + int screen, + Visual *vis, + Colormap cmap, + int depth, + int w, + int h, + int indirect, + int alpha, + int rot) +{ + Evas_GL_X11_Window *gw; +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + int context_attrs[3]; + int config_attrs[40]; + int major_version, minor_version; + int num_config, n = 0; +#endif + XVisualInfo *vi_use; + const GLubyte *vendor, *renderer, *version; + + if (!_evas_gl_x11_vi) return NULL; + + gw = calloc(1, sizeof(Evas_GL_X11_Window)); + if (!gw) return NULL; + + win_count++; + gw->disp = disp; + gw->win = win; + gw->screen = screen; + gw->visual = vis; + gw->colormap = cmap; + gw->depth = depth; + gw->alpha = alpha; + gw->w = w; + gw->h = h; + gw->rot = rot; + + vi_use = _evas_gl_x11_vi; + if (gw->alpha) + { +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (_evas_gl_x11_rgba_vi) + { + vi_use = _evas_gl_x11_rgba_vi; + } +#else +//#ifdef NEWGL + if (_evas_gl_x11_rgba_vi) + { + vi_use = _evas_gl_x11_rgba_vi; + } +//#endif +#endif + } + gw->visualinfo = vi_use; + +// EGL / GLES +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; + context_attrs[1] = 2; + context_attrs[2] = EGL_NONE; + +# if defined(GLES_VARIETY_S3C6410) + if (gw->visualinfo->depth == 16) // 16bpp + { + config_attrs[n++] = EGL_SURFACE_TYPE; + config_attrs[n++] = EGL_WINDOW_BIT; + config_attrs[n++] = EGL_RENDERABLE_TYPE; + config_attrs[n++] = EGL_OPENGL_ES2_BIT; + config_attrs[n++] = EGL_RED_SIZE; + config_attrs[n++] = 5; + config_attrs[n++] = EGL_GREEN_SIZE; + config_attrs[n++] = 6; + config_attrs[n++] = EGL_BLUE_SIZE; + config_attrs[n++] = 5; + config_attrs[n++] = EGL_DEPTH_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_STENCIL_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_NONE; + } + else // 24/32bit. no one does 8bpp anymore. and 15bpp... dead + { + config_attrs[n++] = EGL_SURFACE_TYPE; + config_attrs[n++] = EGL_WINDOW_BIT; + config_attrs[n++] = EGL_RENDERABLE_TYPE; + config_attrs[n++] = EGL_OPENGL_ES2_BIT; + config_attrs[n++] = EGL_RED_SIZE; + config_attrs[n++] = 8; + config_attrs[n++] = EGL_GREEN_SIZE; + config_attrs[n++] = 8; + config_attrs[n++] = EGL_BLUE_SIZE; + config_attrs[n++] = 8; + config_attrs[n++] = EGL_DEPTH_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_STENCIL_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_NONE; + } +# elif defined(GLES_VARIETY_SGX) + config_attrs[n++] = EGL_SURFACE_TYPE; + config_attrs[n++] = EGL_WINDOW_BIT; + config_attrs[n++] = EGL_RENDERABLE_TYPE; + config_attrs[n++] = EGL_OPENGL_ES2_BIT; +#if 0 +// FIXME: n900 - omap3 sgx libs break here + config_attrs[n++] = EGL_RED_SIZE; + config_attrs[n++] = 1; + config_attrs[n++] = EGL_GREEN_SIZE; + config_attrs[n++] = 1; + config_attrs[n++] = EGL_BLUE_SIZE; + config_attrs[n++] = 1; +// FIXME: end n900 breakage +#endif + if (gw->alpha) + { + config_attrs[n++] = EGL_ALPHA_SIZE; + config_attrs[n++] = 1; + } + else + { + config_attrs[n++] = EGL_ALPHA_SIZE; + config_attrs[n++] = 0; + } + config_attrs[n++] = EGL_DEPTH_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_STENCIL_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_NONE; +# endif + + gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)(gw->disp)); + if (!gw->egl_disp) + { + ERR("eglGetDisplay() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + if (!eglInitialize(gw->egl_disp, &major_version, &minor_version)) + { + ERR("eglInitialize() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + eglBindAPI(EGL_OPENGL_ES_API); + if (eglGetError() != EGL_SUCCESS) + { + ERR("eglBindAPI() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + + num_config = 0; + if (!eglChooseConfig(gw->egl_disp, config_attrs, &gw->egl_config, + 1, &num_config) || (num_config != 1)) + { + ERR("eglChooseConfig() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + gw->egl_surface[0] = eglCreateWindowSurface(gw->egl_disp, gw->egl_config, + (EGLNativeWindowType)gw->win, + NULL); + if (gw->egl_surface[0] == EGL_NO_SURFACE) + { + ERR("eglCreateWindowSurface() fail for %#x. code=%#x", + (unsigned int)gw->win, eglGetError()); + eng_window_free(gw); + return NULL; + } + if (context == EGL_NO_CONTEXT) + context = eglCreateContext(gw->egl_disp, gw->egl_config, NULL, + context_attrs); + gw->egl_context[0] = context; + if (gw->egl_context[0] == EGL_NO_CONTEXT) + { + ERR("eglCreateContext() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + if (eglMakeCurrent(gw->egl_disp, + gw->egl_surface[0], + gw->egl_surface[0], + gw->egl_context[0]) == EGL_FALSE) + { + ERR("eglMakeCurrent() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + + vendor = glGetString(GL_VENDOR); + renderer = glGetString(GL_RENDERER); + version = glGetString(GL_VERSION); + if (!vendor) vendor = (unsigned char *)"-UNKNOWN-"; + if (!renderer) renderer = (unsigned char *)"-UNKNOWN-"; + if (!version) version = (unsigned char *)"-UNKNOWN-"; + if (getenv("EVAS_GL_INFO")) + { + fprintf(stderr, "vendor: %s\n", vendor); + fprintf(stderr, "renderer: %s\n", renderer); + fprintf(stderr, "version: %s\n", version); + } +// GLX +#else + if (!context) + { +#ifdef NEWGL + if (indirect) + context = glXCreateNewContext(gw->disp, fbconf, + GLX_RGBA_TYPE, NULL, + GL_FALSE); + else + context = glXCreateNewContext(gw->disp, fbconf, + GLX_RGBA_TYPE, NULL, + GL_TRUE); +#else + if (indirect) + context = glXCreateContext(gw->disp, gw->visualinfo, NULL, GL_FALSE); + else + context = glXCreateContext(gw->disp, gw->visualinfo, NULL, GL_TRUE); +#endif + } +#ifdef NEWGL + if ((gw->alpha) && (!rgba_context)) + { + if (indirect) + rgba_context = glXCreateNewContext(gw->disp, rgba_fbconf, + GLX_RGBA_TYPE, context, + GL_FALSE); + else + rgba_context = glXCreateNewContext(gw->disp, rgba_fbconf, + GLX_RGBA_TYPE, context, + GL_TRUE); + } + if (gw->alpha) + gw->glxwin = glXCreateWindow(gw->disp, rgba_fbconf, gw->win, NULL); + else + gw->glxwin = glXCreateWindow(gw->disp, fbconf, gw->win, NULL); + if (!gw->glxwin) + { + eng_window_free(gw); + return NULL; + } + + if (gw->alpha) gw->context = rgba_context; + else gw->context = context; +#else + gw->context = context; +#endif + + if (!gw->context) + { + eng_window_free(gw); + return NULL; + } + if (gw->context) + { + int i, j, num; + GLXFBConfig *fbc; + int blacklist = 0; + + if (gw->glxwin) + { + if (!glXMakeContextCurrent(gw->disp, gw->glxwin, gw->glxwin, + gw->context)) + { + printf("Error: glXMakeContextCurrent(%p, %p, %p, %p)\n", (void *)gw->disp, (void *)gw->glxwin, (void *)gw->glxwin, (void *)gw->context); + eng_window_free(gw); + return NULL; + } + } + else + { + if (!glXMakeCurrent(gw->disp, gw->win, gw->context)) + { + printf("Error: glXMakeCurrent(%p, 0x%x, %p) failed\n", (void *)gw->disp, (unsigned int)gw->win, (void *)gw->context); + eng_window_free(gw); + return NULL; + } + } + + // FIXME: move this up to context creation + + vendor = glGetString(GL_VENDOR); + renderer = glGetString(GL_RENDERER); + version = glGetString(GL_VERSION); + if (getenv("EVAS_GL_INFO")) + { + fprintf(stderr, "vendor: %s\n", vendor); + fprintf(stderr, "renderer: %s\n", renderer); + fprintf(stderr, "version: %s\n", version); + } + // examples: + // vendor: NVIDIA Corporation + // renderer: NVIDIA Tegra + // version: OpenGL ES 2.0 + // or + // vendor: Imagination Technologies + // renderer: PowerVR SGX 540 + // version: OpenGL ES 2.0 + // or + // vendor: NVIDIA Corporation + // renderer: GeForce GT 330M/PCI/SSE2 + // version: 3.3.0 NVIDIA 256.53 + // or + // vendor: NVIDIA Corporation + // renderer: GeForce GT 220/PCI/SSE2 + // version: 3.2.0 NVIDIA 195.36.24 + // or + // vendor: NVIDIA Corporation + // renderer: GeForce 8600 GTS/PCI/SSE2 + // version: 3.3.0 NVIDIA 260.19.36 + // or + // vendor: ATI Technologies Inc. + // renderer: ATI Mobility Radeon HD 4650 + // version: 3.2.9756 Compatibility Profile Context + // or + // vendor: Tungsten Graphics, Inc + // renderer: Mesa DRI Mobile Intel® GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2 + // version: 2.1 Mesa 7.9-devel + // or + // vendor: Advanced Micro Devices, Inc. + // renderer: Mesa DRI R600 (RS780 9610) 20090101 TCL DRI2 + // version: 2.1 Mesa 7.9-devel + // or + // vendor: NVIDIA Corporation + // renderer: GeForce 9600 GT/PCI/SSE2 + // version: 3.3.0 NVIDIA 260.19.29 + // or + // vendor: ATI Technologies Inc. + // renderer: ATI Radeon HD 4800 Series + // version: 3.3.10237 Compatibility Profile Context + // or + // vendor: Advanced Micro Devices, Inc. + // renderer: Mesa DRI R600 (RV770 9442) 20090101 TCL DRI2 + // version: 2.0 Mesa 7.8.2 + // or + // vendor: Tungsten Graphics, Inc + // renderer: Mesa DRI Mobile Intel® GM45 Express Chipset GEM 20100330 DEVELOPMENT + // version: 2.1 Mesa 7.9-devel + // or (bad - software renderer) + // vendor: Mesa Project + // renderer: Software Rasterizer + // version: 2.1 Mesa 7.9-devel + // or (bad - software renderer) + // vendor: VMware, Inc. + // renderer: Gallium 0.4 on softpipe + // version: 2.1 Mesa 7.9-devel + + if (strstr((const char *)vendor, "Mesa Project")) + { + if (strstr((const char *)renderer, "Software Rasterizer")) + blacklist = 1; + } + if (strstr((const char *)renderer, "softpipe")) + blacklist = 1; + if (blacklist) + { + ERR("OpenGL Driver blacklisted:"); + ERR("Vendor: %s", (const char *)vendor); + ERR("Renderer: %s", (const char *)renderer); + ERR("Version: %s", (const char *)version); + eng_window_free(gw); + return NULL; + } + if (strstr((const char *)vendor, "NVIDIA")) + { + if (!strstr((const char *)renderer, "NVIDIA Tegra")) + { + int v1 = 0, v2 = 0, v3 = 0; + + if (sscanf((const char *)version, + "%*s %*s %i.%i.%i", + &v1, &v2, &v3) != 3) + { + v1 = v2 = v3 = 0; + if (sscanf((const char *)version, + "%*s %*s %i.%i", + &v1, &v2) != 2) + v1 = 0; + } + // ALSO as of some nvidia driver version loose binding is + // probably not needed + if (v1 < 195) gw->detected.loose_binding = 1; + } + } + else + { + // noothing yet. add more cases and options over time + } + + fbc = glXGetFBConfigs(gw->disp, screen, &num); + if (!fbc) + { + ERR("glXGetFBConfigs() returned no fb configs"); + eng_window_free(gw); + return NULL; + } + for (i = 0; i <= 32; i++) + { + for (j = 0; j < num; j++) + { + XVisualInfo *vi; + int vd; + int alph, val, dbuf, stencil, tdepth; + int rgba; + + vi = glXGetVisualFromFBConfig(gw->disp, fbc[j]); + if (!vi) continue; + vd = vi->depth; + XFree(vi); + + if (vd != i) continue; + + glXGetFBConfigAttrib(gw->disp, fbc[j], GLX_ALPHA_SIZE, &alph); + glXGetFBConfigAttrib(gw->disp, fbc[j], GLX_BUFFER_SIZE, &val); + + if ((val != i) && ((val - alph) != i)) continue; + + val = 0; + rgba = 0; + + if (i == 32) + { + glXGetFBConfigAttrib(gw->disp, fbc[j], GLX_BIND_TO_TEXTURE_RGBA_EXT, &val); + if (val) + { + rgba = 1; + gw->depth_cfg[i].tex_format = GLX_TEXTURE_FORMAT_RGBA_EXT; + } + } + if (!val) + { + if (rgba) continue; + glXGetFBConfigAttrib(gw->disp, fbc[j], GLX_BIND_TO_TEXTURE_RGB_EXT, &val); + if (!val) continue; + gw->depth_cfg[i].tex_format = GLX_TEXTURE_FORMAT_RGB_EXT; + } + + dbuf = 0x7fff; + glXGetFBConfigAttrib(gw->disp, fbc[j], GLX_DOUBLEBUFFER, &val); + if (val > dbuf) continue; + dbuf = val; + + stencil = 0x7fff; + glXGetFBConfigAttrib(gw->disp, fbc[j], GLX_STENCIL_SIZE, &val); + if (val > stencil) continue; + stencil = val; + + tdepth = 0x7fff; + glXGetFBConfigAttrib(gw->disp, fbc[j], GLX_DEPTH_SIZE, &val); + if (val > tdepth) continue; + tdepth = val; + + glXGetFBConfigAttrib(gw->disp, fbc[j], GLX_BIND_TO_MIPMAP_TEXTURE_EXT, &val); + if (val < 0) continue; + gw->depth_cfg[i].mipmap = val; + + glXGetFBConfigAttrib(gw->disp, fbc[j], GLX_Y_INVERTED_EXT, &val); + gw->depth_cfg[i].yinvert = val; + + glXGetFBConfigAttrib(gw->disp, fbc[j], GLX_BIND_TO_TEXTURE_TARGETS_EXT, &val); + gw->depth_cfg[i].tex_target = val; + + gw->depth_cfg[i].fbc = fbc[j]; + } + } + XFree(fbc); + if (!gw->depth_cfg[DefaultDepth(gw->disp, screen)].fbc) + { + WRN("texture from pixmap not going to work"); + } + } +#endif + + gw->gl_context = evas_gl_common_context_new(); + if (!gw->gl_context) + { + eng_window_free(gw); + return NULL; + } +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + gw->gl_context->egldisp = gw->egl_disp; +#endif + eng_window_use(gw); + evas_gl_common_context_resize(gw->gl_context, w, h, rot); + gw->surf = 1; + return gw; + indirect = 0; +} + +void +eng_window_free(Evas_GL_X11_Window *gw) +{ + int ref = 0; + win_count--; + eng_window_use(gw); + if (gw == _evas_gl_x11_window) _evas_gl_x11_window = NULL; + if (gw->gl_context) + { + ref = gw->gl_context->references - 1; + evas_gl_common_context_free(gw->gl_context); + } +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (gw->egl_surface[0] != EGL_NO_SURFACE) + eglDestroySurface(gw->egl_disp, gw->egl_surface[0]); + if (ref == 0) + { + if (context) eglDestroyContext(gw->egl_disp, context); + eglTerminate(gw->egl_disp); + context = EGL_NO_CONTEXT; + } + eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); +#else + if (gw->glxwin) glXDestroyWindow(gw->disp, gw->glxwin); + if (ref == 0) + { + if (context) glXDestroyContext(gw->disp, context); + if (rgba_context) glXDestroyContext(gw->disp, rgba_context); + context = 0; + rgba_context = 0; + fbconf = 0; + rgba_fbconf = 0; + } +#endif + free(gw); +} + +void +eng_window_use(Evas_GL_X11_Window *gw) +{ + Eina_Bool force_use = EINA_FALSE; + +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (_evas_gl_x11_window) + { + if ((eglGetCurrentContext() != + _evas_gl_x11_window->egl_context[0]) || + (eglGetCurrentSurface(EGL_READ) != + _evas_gl_x11_window->egl_surface[0]) || + (eglGetCurrentSurface(EGL_DRAW) != + _evas_gl_x11_window->egl_surface[0])) + force_use = EINA_TRUE; + } +#else + if (_evas_gl_x11_window) + { + if (glXGetCurrentContext() != _evas_gl_x11_window->context) + force_use = EINA_TRUE; + } +#endif + if ((_evas_gl_x11_window != gw) || (force_use)) + { + if (_evas_gl_x11_window) + { + evas_gl_common_context_use(_evas_gl_x11_window->gl_context); + evas_gl_common_context_flush(_evas_gl_x11_window->gl_context); + } + _evas_gl_x11_window = gw; + if (gw) + { +// EGL / GLES +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (gw->egl_surface[0] != EGL_NO_SURFACE) + { + if (eglMakeCurrent(gw->egl_disp, + gw->egl_surface[0], + gw->egl_surface[0], + gw->egl_context[0]) == EGL_FALSE) + { + ERR("eglMakeCurrent() failed!"); + } + } +// GLX +#else + if (gw->glxwin) + { + if (!glXMakeContextCurrent(gw->disp, gw->glxwin, gw->glxwin, + gw->context)) + { + ERR("glXMakeContextCurrent(%p, %p, %p, %p)", (void *)gw->disp, (void *)gw->glxwin, (void *)gw->glxwin, (void *)gw->context); + } + } + else + { + if (!glXMakeCurrent(gw->disp, gw->win, gw->context)) + { + ERR("glXMakeCurrent(%p, 0x%x, %p) failed", gw->disp, (unsigned int)gw->win, (void *)gw->context); + } + } +#endif + } + } + if (gw) evas_gl_common_context_use(gw->gl_context); +} + +void +eng_window_unsurf(Evas_GL_X11_Window *gw) +{ + if (!gw->surf) return; + if (!getenv("EVAS_GL_WIN_RESURF")) return; + if (getenv("EVAS_GL_INFO")) + printf("unsurf %p\n", gw); +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (_evas_gl_x11_window) + evas_gl_common_context_flush(_evas_gl_x11_window->gl_context); + if (_evas_gl_x11_window == gw) + { + eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (gw->egl_surface[0] != EGL_NO_SURFACE) + eglDestroySurface(gw->egl_disp, gw->egl_surface[0]); + gw->egl_surface[0] = EGL_NO_SURFACE; + _evas_gl_x11_window = NULL; + } +#else + if (gw->glxwin) + { + glXDestroyWindow(gw->disp, gw->glxwin); + } + else + { + } +#endif + gw->surf = 0; +} + +void +eng_window_resurf(Evas_GL_X11_Window *gw) +{ + if (gw->surf) return; + if (getenv("EVAS_GL_INFO")) + printf("resurf %p\n", gw); +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + gw->egl_surface[0] = eglCreateWindowSurface(gw->egl_disp, gw->egl_config, + (EGLNativeWindowType)gw->win, + NULL); + if (gw->egl_surface[0] == EGL_NO_SURFACE) + { + ERR("eglCreateWindowSurface() fail for %#x. code=%#x", + (unsigned int)gw->win, eglGetError()); + return; + } + if (eglMakeCurrent(gw->egl_disp, + gw->egl_surface[0], + gw->egl_surface[0], + gw->egl_context[0]) == EGL_FALSE) + { + ERR("eglMakeCurrent() failed!"); + } +#else +#ifdef NEWGL + if (gw->alpha) + gw->glxwin = glXCreateWindow(gw->disp, rgba_fbconf, gw->win, NULL); + else + gw->glxwin = glXCreateWindow(gw->disp, fbconf, gw->win, NULL); + if (!glXMakeContextCurrent(gw->disp, gw->glxwin, gw->glxwin, + gw->context)) + { + ERR("glXMakeContextCurrent(%p, %p, %p, %p)", (void *)gw->disp, (void *)gw->glxwin, (void *)gw->glxwin, (void *)gw->context); + } +#else + if (!glXMakeCurrent(gw->disp, gw->win, gw->context)) + { + ERR("glXMakeCurrent(%p, 0x%x, %p) failed", (void *)gw->disp, (unsigned int)gw->win, (void *)gw->context); + } +#endif +#endif + gw->surf = 1; +} + +Visual * +eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo) +{ + if (!einfo) return NULL; + if (!einfo->info.display) return NULL; + if (!_evas_gl_x11_vi) + { + int alpha; + +// EGL / GLES +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + for (alpha = 0; alpha < 2; alpha++) + { + int depth = DefaultDepth(einfo->info.display, + einfo->info.screen); + if (alpha) + { + XVisualInfo *xvi, vi_in; + int nvi, i; + XRenderPictFormat *fmt; + + vi_in.screen = einfo->info.screen; + vi_in.depth = 32; + vi_in.class = TrueColor; + xvi = XGetVisualInfo(einfo->info.display, + VisualScreenMask | VisualDepthMask | + VisualClassMask, + &vi_in, &nvi); + if (xvi) + { + for (i = 0; i < nvi; i++) + { + fmt = XRenderFindVisualFormat(einfo->info.display, + xvi[i].visual); + if ((fmt->type == PictTypeDirect) && + (fmt->direct.alphaMask)) + { + _evas_gl_x11_rgba_vi = + calloc(1, sizeof(XVisualInfo)); + if (_evas_gl_x11_rgba_vi) + memcpy(_evas_gl_x11_rgba_vi, + &(xvi[i]), sizeof(XVisualInfo)); + break; + } + } + XFree (xvi); + } + } + else + { + _evas_gl_x11_vi = calloc(1, sizeof(XVisualInfo)); + XMatchVisualInfo(einfo->info.display, + einfo->info.screen, depth, TrueColor, + _evas_gl_x11_vi); + } + } +// GLX +#else + for (alpha = 0; alpha < 2; alpha++) + { + int config_attrs[40]; + GLXFBConfig *configs = NULL, config = 0; + int i, num; + + i = 0; + config_attrs[i++] = GLX_DRAWABLE_TYPE; + config_attrs[i++] = GLX_WINDOW_BIT; + config_attrs[i++] = GLX_DOUBLEBUFFER; + config_attrs[i++] = 1; + config_attrs[i++] = GLX_RED_SIZE; + config_attrs[i++] = 1; + config_attrs[i++] = GLX_GREEN_SIZE; + config_attrs[i++] =1; + config_attrs[i++] = GLX_BLUE_SIZE; + config_attrs[i++] = 1; + if (alpha) + { + config_attrs[i++] = GLX_RENDER_TYPE; + config_attrs[i++] = GLX_RGBA_BIT; + config_attrs[i++] = GLX_ALPHA_SIZE; + config_attrs[i++] = 1; + } + else + { + config_attrs[i++] = GLX_ALPHA_SIZE; + config_attrs[i++] = 0; + } + config_attrs[i++] = GLX_DEPTH_SIZE; + config_attrs[i++] = 0; + config_attrs[i++] = GLX_STENCIL_SIZE; + config_attrs[i++] = 0; + config_attrs[i++] = GLX_AUX_BUFFERS; + config_attrs[i++] = 0; + config_attrs[i++] = GLX_STEREO; + config_attrs[i++] = 0; + config_attrs[i++] = GLX_TRANSPARENT_TYPE; + config_attrs[i++] = GLX_NONE;//GLX_NONE;//GLX_TRANSPARENT_INDEX//GLX_TRANSPARENT_RGB; + config_attrs[i++] = 0; + + configs = glXChooseFBConfig(einfo->info.display, + einfo->info.screen, + config_attrs, &num); + if ((!configs) || (num < 1)) + { + ERR("glXChooseFBConfig returned no configs"); + return NULL; + } + for (i = 0; i < num; i++) + { + XVisualInfo *visinfo; + XRenderPictFormat *format = NULL; + + visinfo = glXGetVisualFromFBConfig(einfo->info.display, + configs[i]); + if (!visinfo) continue; + if (!alpha) + { + config = configs[i]; + _evas_gl_x11_vi = malloc(sizeof(XVisualInfo)); + memcpy(_evas_gl_x11_vi, visinfo, sizeof(XVisualInfo)); + fbconf = config; + XFree(visinfo); + break; + } + else + { + format = XRenderFindVisualFormat + (einfo->info.display, visinfo->visual); + if (!format) + { + XFree(visinfo); + continue; + } + if (format->direct.alphaMask > 0) + { + config = configs[i]; + _evas_gl_x11_rgba_vi = malloc(sizeof(XVisualInfo)); + memcpy(_evas_gl_x11_rgba_vi, visinfo, sizeof(XVisualInfo)); + rgba_fbconf = config; + XFree(visinfo); + break; + } + } + XFree(visinfo); + } + } +#endif + } + if (!_evas_gl_x11_vi) return NULL; + if (einfo->info.destination_alpha) + { +// EGL / GLES +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if (_evas_gl_x11_rgba_vi) return _evas_gl_x11_rgba_vi->visual; +#else +//# ifdef NEWGL + if (_evas_gl_x11_rgba_vi) return _evas_gl_x11_rgba_vi->visual; +//# endif +#endif + } + return _evas_gl_x11_vi->visual; +} + +Colormap +eng_best_colormap_get(Evas_Engine_Info_GL_X11 *einfo) +{ + if (!einfo) return 0; + if (!einfo->info.display) return 0; + if (!_evas_gl_x11_vi) eng_best_visual_get(einfo); + if (!_evas_gl_x11_vi) return 0; + if (einfo->info.destination_alpha) + { + if (!_evas_gl_x11_rgba_cmap) + _evas_gl_x11_rgba_cmap = + XCreateColormap(einfo->info.display, + RootWindow(einfo->info.display, + einfo->info.screen), + _evas_gl_x11_rgba_vi->visual, + 0); + return _evas_gl_x11_rgba_cmap; + } + if (!_evas_gl_x11_cmap) + _evas_gl_x11_cmap = + XCreateColormap(einfo->info.display, + RootWindow(einfo->info.display, + einfo->info.screen), + _evas_gl_x11_vi->visual, + 0); + return _evas_gl_x11_cmap; +} + +int +eng_best_depth_get(Evas_Engine_Info_GL_X11 *einfo) +{ + if (!einfo) return 0; + if (!einfo->info.display) return 0; + if (!_evas_gl_x11_vi) eng_best_visual_get(einfo); + if (!_evas_gl_x11_vi) return 0; + if (einfo->info.destination_alpha) + { + if (_evas_gl_x11_rgba_vi) return _evas_gl_x11_rgba_vi->depth; + } + return _evas_gl_x11_vi->depth; +} diff --git a/libraries/evas/src/modules/engines/psl1ght/Evas_Engine_PSL1GHT.h b/libraries/evas/src/modules/engines/psl1ght/Evas_Engine_PSL1GHT.h new file mode 100644 index 0000000..f1d5636 --- /dev/null +++ b/libraries/evas/src/modules/engines/psl1ght/Evas_Engine_PSL1GHT.h @@ -0,0 +1,16 @@ +#ifndef _EVAS_ENGINE_PSL1GHT_H +#define _EVAS_ENGINE_PSL1GHT_H + +typedef struct _Evas_Engine_Info_PSL1GHT Evas_Engine_Info_PSL1GHT; + +struct _Evas_Engine_Info_PSL1GHT +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; +#endif + diff --git a/libraries/evas/src/modules/engines/psl1ght/Makefile.am b/libraries/evas/src/modules/engines/psl1ght/Makefile.am new file mode 100644 index 0000000..92ccea7 --- /dev/null +++ b/libraries/evas/src/modules/engines/psl1ght/Makefile.am @@ -0,0 +1,47 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_psl1ght_cflags@ + +if BUILD_ENGINE_PSL1GHT + +PSL1GHT_SOURCES = \ +evas_engine.c \ +rsxutil.c + +PSL1GHT_LIBADD = @evas_engine_psl1ght_libs@ + + +includes_HEADERS = Evas_Engine_PSL1GHT.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_PSL1GHT + +pkgdir = $(libdir)/evas/modules/engines/psl1ght/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = $(PSL1GHT_SOURCES) +module_la_LIBADD = @EINA_LIBS@ $(PSL1GHT_LIBADD) $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_psl1ght.la + +libevas_engine_psl1ght_la_SOURCES = $(PSL1GHT_SOURCES) +libevas_engine_psl1ght_la_LIBADD = $(PSL1GHT_LIBADD) + +endif +endif + +EXTRA_DIST = \ +evas_engine.h \ +rsxutil.h diff --git a/libraries/evas/src/modules/engines/psl1ght/Makefile.in b/libraries/evas/src/modules/engines/psl1ght/Makefile.in new file mode 100644 index 0000000..6b553ac --- /dev/null +++ b/libraries/evas/src/modules/engines/psl1ght/Makefile.in @@ -0,0 +1,810 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/psl1ght +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_TRUE@libevas_engine_psl1ght_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_psl1ght_la_SOURCES_DIST = evas_engine.c rsxutil.c +@BUILD_ENGINE_PSL1GHT_TRUE@am__objects_1 = evas_engine.lo rsxutil.lo +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_TRUE@am_libevas_engine_psl1ght_la_OBJECTS = $(am__objects_1) +libevas_engine_psl1ght_la_OBJECTS = \ + $(am_libevas_engine_psl1ght_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_TRUE@am_libevas_engine_psl1ght_la_rpath = +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c rsxutil.c +@BUILD_ENGINE_PSL1GHT_TRUE@am__objects_2 = module_la-evas_engine.lo \ +@BUILD_ENGINE_PSL1GHT_TRUE@ module_la-rsxutil.lo +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_psl1ght_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_psl1ght_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_PSL1GHT.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_psl1ght_cflags@ + +@BUILD_ENGINE_PSL1GHT_TRUE@PSL1GHT_SOURCES = \ +@BUILD_ENGINE_PSL1GHT_TRUE@evas_engine.c \ +@BUILD_ENGINE_PSL1GHT_TRUE@rsxutil.c + +@BUILD_ENGINE_PSL1GHT_TRUE@PSL1GHT_LIBADD = @evas_engine_psl1ght_libs@ +@BUILD_ENGINE_PSL1GHT_TRUE@includes_HEADERS = Evas_Engine_PSL1GHT.h +@BUILD_ENGINE_PSL1GHT_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_FALSE@pkgdir = $(libdir)/evas/modules/engines/psl1ght/$(MODULE_ARCH) +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_FALSE@module_la_SOURCES = $(PSL1GHT_SOURCES) +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_FALSE@module_la_LIBADD = @EINA_LIBS@ $(PSL1GHT_LIBADD) $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_FALSE@module_la_LDFLAGS = -module -avoid-version +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_TRUE@noinst_LTLIBRARIES = libevas_engine_psl1ght.la +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_TRUE@libevas_engine_psl1ght_la_SOURCES = $(PSL1GHT_SOURCES) +@BUILD_ENGINE_PSL1GHT_TRUE@@EVAS_STATIC_BUILD_PSL1GHT_TRUE@libevas_engine_psl1ght_la_LIBADD = $(PSL1GHT_LIBADD) +EXTRA_DIST = \ +evas_engine.h \ +rsxutil.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/psl1ght/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/psl1ght/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_psl1ght.la: $(libevas_engine_psl1ght_la_OBJECTS) $(libevas_engine_psl1ght_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_psl1ght_la_rpath) $(libevas_engine_psl1ght_la_OBJECTS) $(libevas_engine_psl1ght_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-rsxutil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsxutil.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-rsxutil.lo: rsxutil.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-rsxutil.lo -MD -MP -MF $(DEPDIR)/module_la-rsxutil.Tpo -c -o module_la-rsxutil.lo `test -f 'rsxutil.c' || echo '$(srcdir)/'`rsxutil.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-rsxutil.Tpo $(DEPDIR)/module_la-rsxutil.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rsxutil.c' object='module_la-rsxutil.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-rsxutil.lo `test -f 'rsxutil.c' || echo '$(srcdir)/'`rsxutil.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/psl1ght/evas_engine.c b/libraries/evas/src/modules/engines/psl1ght/evas_engine.c new file mode 100644 index 0000000..750c098 --- /dev/null +++ b/libraries/evas/src/modules/engines/psl1ght/evas_engine.c @@ -0,0 +1,511 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_engine.h" +#include "rsxutil.h" +#include "Evas_Engine_PSL1GHT.h" + +#include + +int _evas_engine_psl1ght_log_dom = -1; + +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +/* engine struct data */ +typedef struct _Render_Engine Render_Engine; + +#define MAX_BUFFERS 2 + +struct _Render_Engine +{ + Tilebuf *tb; + Tilebuf_Rect *rects; + Eina_Inlist *cur_rect; + + /* RSX device context */ + gcmContextData *context; + void *host_addr; + + /* The buffers we will be drawing into. */ + rsxBuffer buffers[MAX_BUFFERS]; + int currentBuffer; + int width; + int height; + RGBA_Image *rgba_image; + uint32_t rgba_image_offset; + + int end : 1; +}; + +/* prototypes we will use here */ +static void *_output_setup(int w, int h); + +static void *eng_info(Evas *e); +static void + eng_info_free(Evas *e, void *info); +static int + eng_setup(Evas *e, void *info); +static void + eng_output_free(void *data); +static void + eng_output_resize(void *data, int w, int h); +static void + eng_output_tile_size_set(void *data, int w, int h); +static void + eng_output_redraws_rect_add(void *data, int x, int y, int w, int h); +static void + eng_output_redraws_rect_del(void *data, int x, int y, int w, int h); +static void + eng_output_redraws_clear(void *data); +static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); +static void + eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h); +static void + eng_output_flush(void *data); +static void + eng_output_idle_flush(void *data); + +/* internal engine routines */ +static void * +_output_setup(int w, int h) +{ + Render_Engine *re; + int i; + u16 width, height; + DATA32 *image_data = NULL; + int image_size; + + printf ("_output_setup called : %dx%d\n", w, h); + re = calloc(1, sizeof(Render_Engine)); + if (!re) + return NULL; + + /* Allocate a 1Mb buffer, alligned to a 1Mb boundary + * to be our shared IO memory with the RSX. */ + re->host_addr = memalign (1024 * 1024, HOST_SIZE); + if (re->host_addr == NULL) + { + free (re); + return NULL; + } + re->context = initScreen (re->host_addr, HOST_SIZE); + if (re->context == NULL) + { + free (re->host_addr); + free (re); + return NULL; + } + width = w; + height = h; + setResolution (re->context, &width, &height); + re->currentBuffer = 0; + re->width = width; + re->height = height; + + for (i = 0; i < MAX_BUFFERS; i++) + makeBuffer (&re->buffers[i], width, height, i); + + flipBuffer(re->context, MAX_BUFFERS - 1); + + /* if we haven't initialized - init (automatic abort if already done) */ + evas_common_cpu_init(); + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + + re->tb = evas_common_tilebuf_new(w, h); + + /* in preliminary tests 16x16 gave highest framerates */ + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + + /* Allocate our memaligned backbuffer */ + image_size = ((w * h * sizeof(u32)) + 0xfffff) & - 0x100000; + image_data = memalign (1024 * 1024, image_size); + re->rgba_image = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), + w, h, image_data, 1, EVAS_COLORSPACE_ARGB8888); + gcmMapMainMemory(image_data, image_size, &re->rgba_image_offset); + + return re; +} + +/* engine api this module provides */ +static void * +eng_info(Evas *e) +{ + Evas_Engine_Info_PSL1GHT *info; + + printf ("eng_info called\n"); + info = calloc(1, sizeof(Evas_Engine_Info_PSL1GHT)); + if (!info) + return NULL; + + info->magic.magic = rand(); + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + + return info; +} + +static void +eng_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_PSL1GHT *in; + + printf ("eng_info_free called\n"); + in = (Evas_Engine_Info_PSL1GHT *)info; + free(in); +} + +static int +eng_setup(Evas *e, void *in) +{ + Evas_Engine_Info_PSL1GHT *info; + + printf ("eng_setup called\n"); + info = (Evas_Engine_Info_PSL1GHT *)in; + + e->engine.data.output = _output_setup(e->output.w, e->output.h); + if (!e->engine.data.output) + return 0; + + e->engine.func = &func; + e->engine.data.context = e->engine.func->context_new(e->engine.data.output); + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + int i; + + printf ("eng_output_free called\n"); + re = (Render_Engine *)data; + + gcmSetWaitFlip(re->context); + for (i = 0; i < MAX_BUFFERS; i++) + rsxFree (re->buffers[i].ptr); + + if (re->rgba_image) + { + DATA32 *image_data; + + image_data = re->rgba_image->image.data; + evas_cache_image_drop(&re->rgba_image->cache_entry); + free (image_data); + } + + freeScreen (re->context); + free (re->host_addr); + + evas_common_tilebuf_free(re->tb); + if (re->rects) + evas_common_tilebuf_free_render_rects(re->rects); + + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + int i; + u16 width, height; + DATA32 *image_data; + int image_size; + + printf ("eng_output_resize called : %dx%d\n", w, h); + re = (Render_Engine *)data; + + width = w; + height = h; + if (setResolution (re->context, &width, &height)) + { + re->width = width; + re->height = height; + + gcmSetWaitFlip(re->context); + for (i = 0; i < MAX_BUFFERS; i++) { + rsxFree (re->buffers[i].ptr); + makeBuffer (&re->buffers[i], width, height, i); + } + + flipBuffer(re->context, MAX_BUFFERS - 1); + + evas_common_tilebuf_free(re->tb); + re->tb = evas_common_tilebuf_new(w, h); + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + + /* Realloc our backbuf image */ + if (re->rgba_image) + { + image_data = re->rgba_image->image.data; + evas_cache_image_drop(&re->rgba_image->cache_entry); + free (image_data); + } + image_size = ((w * h * sizeof(u32)) + 0xfffff) & - 0x100000; + image_data = memalign (1024 * 1024, image_size); + re->rgba_image = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), + w, h, image_data, 1, EVAS_COLORSPACE_ARGB8888); + gcmMapMainMemory(image_data, image_size, &re->rgba_image_offset); + } +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + printf ("eng_output_tile_size_set called : %dx%d\n", w, h); + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + //printf ("eng_output_redraws_rect_add called : %d,%d %dx%d\n", x, y, w, h); + re = (Render_Engine *)data; + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + //printf ("eng_output_redraws_rect_del called : %d,%d %dx%d\n", x, y, w, h); + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + //printf ("eng_output_redraws_clear called\n"); + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +} + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + Tilebuf_Rect *rect; + int ux, uy, uw, uh; + + re = (Render_Engine *)data; + /*printf ("eng_output_redraws_next_update_get called : %d,%d %dx%d -- %d,%d %dx%d\n", + *x, *y, *w, *h, *cx, *cy, *cw, *ch);*/ + if (re->end) + { + re->end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + re->cur_rect = EINA_INLIST_GET(re->rects); + } + if (!re->cur_rect) + return NULL; + + rect = (Tilebuf_Rect *)re->cur_rect; + ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h; + re->cur_rect = re->cur_rect->next; + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = 1; + } + + *x = *cx = ux; + *y = *cy = uy; + *w = *cw = uw; + *h = *ch = uh; + /*printf ("eng_output_redraws_next_update_get returning : %d,%d %dx%d -- %d,%d %dx%d\n", + *x, *y, *w, *h, *cx, *cy, *cw, *ch);*/ + + return re->rgba_image; +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) +{ + /* Don't do anything, we'll just coy the whole buffer when it's time to flush */ +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + rsxBuffer *buffer; + int width; + int height; + + //printf ("eng_output_flush called\n"); + re = (Render_Engine *)data; + buffer = &re->buffers[re->currentBuffer]; + width = re->rgba_image->cache_entry.w; + height = re->rgba_image->cache_entry.h; + + /* Wait for the flip before copying the buffer */ + waitFlip (); + + if (re->width == width && + re->height == height) + { + /* DMA the back buffer into the rsx buffer */ + rsxSetTransferImage (re->context, + GCM_TRANSFER_MAIN_TO_LOCAL, + buffer->offset, buffer->width * sizeof(u32), + 0, 0, + re->rgba_image_offset, re->width * sizeof(u32), + 0, 0, re->width, re->height, sizeof(u32)); + } + else + { + gcmTransferScale gcm_scale; + gcmTransferSurface gcm_surface; + + gcm_surface.format = GCM_TRANSFER_SURFACE_FORMAT_A8R8G8B8; + gcm_surface.pitch = buffer->width * sizeof(u32); + gcm_surface._pad0[0] = gcm_surface._pad0[1] = 0; + gcm_surface.offset = buffer->offset; + + gcm_scale.interp = GCM_TRANSFER_INTERPOLATOR_LINEAR; + gcm_scale.conversion = GCM_TRANSFER_CONVERSION_TRUNCATE; + gcm_scale.format = GCM_TRANSFER_SCALE_FORMAT_A8R8G8B8; + gcm_scale.origin = GCM_TRANSFER_ORIGIN_CORNER; + gcm_scale.operation = GCM_TRANSFER_OPERATION_SRCCOPY; + gcm_scale.offset = re->rgba_image_offset; + gcm_scale.clipX = 0; + gcm_scale.clipY = 0; + gcm_scale.clipW = re->width; + gcm_scale.clipH = re->height; + gcm_scale.outX = 0; + gcm_scale.outY = 0; + gcm_scale.outW = re->width; + gcm_scale.outH = re->height; + gcm_scale.ratioX = rsxGetFixedSint32 ((float)width / (float)re->width); + gcm_scale.ratioY = rsxGetFixedSint32 ((float)height / (float)re->height); + gcm_scale.inX = 0; + gcm_scale.inY = 0; + gcm_scale.inW = (width & ~1); // Width must be a multiple of 2 + gcm_scale.inH = height; + if (gcm_scale.inW < 2) // Minimum inW value is 2 + gcm_scale.inW = 2; + if (gcm_scale.inW > 2046) // Maximum inW value is 2046 + gcm_scale.inW = 2046; + if (gcm_scale.inH < 1) // Minimum inH value is 1 + gcm_scale.inH = 1; + if (gcm_scale.inH > 2047) // Maximum inW value is 2047 + gcm_scale.inH = 2047; + gcm_scale.pitch = sizeof(u32) * width; + + rsxSetTransferScaleMode (re->context, GCM_TRANSFER_MAIN_TO_LOCAL, GCM_TRANSFER_SURFACE); + rsxSetTransferScaleSurface (re->context, &gcm_scale, &gcm_surface); + } + /* Wait for the DMA to finish */ + flushRSX (re->context); + + /* Flip buffer onto screen */ + flipBuffer (re->context, re->currentBuffer); + re->currentBuffer = (re->currentBuffer + 1) % MAX_BUFFERS; +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + printf ("eng_output_idle_flush called\n"); + re = (Render_Engine *)data; +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *context __UNUSED__) +{ + Render_Engine *re; + + // printf ("eng_output_alpha_get called\n"); + re = (Render_Engine *)data; + return EINA_TRUE; +} + +/* module advertising code */ +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + _evas_engine_psl1ght_log_dom = eina_log_domain_register + ("evas-psl1ght", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_psl1ght_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_psl1ght_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "psl1ght", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, psl1ght); + +#ifndef EVAS_STATIC_BUILD_PSL1GHT +EVAS_EINA_MODULE_DEFINE(engine, psl1ght); +#endif diff --git a/libraries/evas/src/modules/engines/psl1ght/evas_engine.h b/libraries/evas/src/modules/engines/psl1ght/evas_engine.h new file mode 100644 index 0000000..0ea6cb1 --- /dev/null +++ b/libraries/evas/src/modules/engines/psl1ght/evas_engine.h @@ -0,0 +1,30 @@ +#ifndef EVAS_ENGINE_H +#define EVAS_ENGINE_H + +extern int _evas_engine_psl1ght_log_dom; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_psl1ght_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_psl1ght_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_psl1ght_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_psl1ght_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_psl1ght_log_dom, __VA_ARGS__) + +#endif diff --git a/libraries/evas/src/modules/engines/psl1ght/rsxutil.c b/libraries/evas/src/modules/engines/psl1ght/rsxutil.c new file mode 100644 index 0000000..7567a8c --- /dev/null +++ b/libraries/evas/src/modules/engines/psl1ght/rsxutil.c @@ -0,0 +1,275 @@ +/* + * This software is distributed under the terms of the MIT License + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "rsxutil.h" + +#define GCM_LABEL_INDEX 255 + +static void +waitRSXIdle(gcmContextData *context); + +static int flipped = FALSE; + +void +waitFlip() +{ + if (flipped) + { + while (gcmGetFlipStatus () != 0) + usleep (200); /* Sleep, to not stress the cpu. */ + gcmResetFlipStatus (); + flipped = FALSE; + } +} + +int +flipBuffer(gcmContextData *context, s32 buffer) +{ + if (gcmSetFlip (context, buffer) == 0) + { + rsxFlushBuffer (context); + // Prevent the RSX from continuing until the flip has finished. + gcmSetWaitFlip (context); + + flipped = TRUE; + return TRUE; + } + return FALSE; +} + +int +makeBuffer(rsxBuffer *buffer, u16 width, u16 height, int id) +{ + int depth = sizeof(u32); + int pitch = depth * width; + int size = depth * width * height; + + buffer->ptr = (uint32_t *)rsxMemalign (64, size); + + if (buffer->ptr == NULL) + goto error; + + if (rsxAddressToOffset (buffer->ptr, &buffer->offset) != 0) + goto error; + + /* Register the display buffer with the RSX */ + if (gcmSetDisplayBuffer (id, buffer->offset, pitch, width, height) != 0) + goto error; + + buffer->width = width; + buffer->height = height; + buffer->id = id; + + return TRUE; + +error: + if (buffer->ptr != NULL) + rsxFree (buffer->ptr); + + return FALSE; +} + +int +copyBuffer(gcmContextData *context, rsxBuffer *source, rsxBuffer *destination) +{ + rsxSetTransferData(context, GCM_TRANSFER_LOCAL_TO_LOCAL, + destination->offset, + destination->width * sizeof(u32), + source->offset, + source->width * sizeof(u32), + source->width * sizeof(u32), + source->height); +} + +int +getResolution(u16 *width, u16 *height) +{ + videoState state; + videoResolution resolution; + + /* Get the state of the display */ + if (videoGetState (0, 0, &state) == 0 && + videoGetResolution (state.displayMode.resolution, &resolution) == 0) + { + if (width) + *width = resolution.width; + if (height) + *height = resolution.height; + + return TRUE; + } + return FALSE; +} + +static u8 +getPreferredResolution(u16 width, u16 height) +{ + videoDeviceInfo info; + videoResolution res; + int area = width * height; + int mode_area; + int min_area_diff = abs (area - (720 * 480)); + int area_diff; + u8 resolution = VIDEO_RESOLUTION_480; + int i; + + videoGetDeviceInfo(0, 0, &info); + + for (i = 0; i < info.availableModeCount; i++) { + videoGetResolution (info.availableModes[i].resolution, &res); + mode_area = res.width * res.height; + area_diff = abs (area - mode_area); + if (area_diff < min_area_diff) + { + min_area_diff = area_diff; + resolution = info.availableModes[i].resolution; + } + } + + return resolution; +} + +int +setResolution(gcmContextData *context, u16 *width, u16 *height) +{ + videoState state; + videoConfiguration vconfig; + videoResolution res; + u8 resolution; + + resolution = getPreferredResolution (*width, *height); + + /* Get the state of the display */ + if (videoGetState (0, 0, &state) != 0) + return FALSE; + + /* Make sure display is enabled */ + if (state.state != 0) + return FALSE; + + if (videoGetResolution (resolution, &res) != 0) + return FALSE; + + /* Configure the buffer format to xRGB */ + memset (&vconfig, 0, sizeof(videoConfiguration)); + vconfig.resolution = resolution; + vconfig.format = VIDEO_BUFFER_FORMAT_XRGB; + vconfig.pitch = res.width * sizeof(u32); + vconfig.aspect = VIDEO_ASPECT_AUTO; + + flushRSX(context); + + if (videoConfigure (0, &vconfig, NULL, 0) != 0) + return FALSE; + + *width = res.width; + *height = res.height; + + return TRUE; +} + +gcmContextData * +initScreen(void *host_addr, u32 size) +{ + gcmContextData *context = NULL; /* Context to keep track of the RSX buffer. */ + videoState state; + videoConfiguration vconfig; + videoResolution res; /* Screen Resolution */ + + /* Initilise Reality, which sets up the command buffer and shared IO memory */ + context = rsxInit (CB_SIZE, size, host_addr); + if (context == NULL) + goto error; + + /* Get the state of the display */ + if (videoGetState (0, 0, &state) != 0) + goto error; + + /* Make sure display is enabled */ + if (state.state != 0) + goto error; + + /* Get the current resolution */ + if (videoGetResolution (state.displayMode.resolution, &res) != 0) + goto error; + + /* Configure the buffer format to xRGB */ + memset (&vconfig, 0, sizeof(videoConfiguration)); + vconfig.resolution = state.displayMode.resolution; + vconfig.format = VIDEO_BUFFER_FORMAT_XRGB; + vconfig.pitch = res.width * sizeof(u32); + vconfig.aspect = state.displayMode.aspect; + + flushRSX(context); + + if (videoConfigure (0, &vconfig, NULL, 0) != 0) + goto error; + + if (videoGetState (0, 0, &state) != 0) + goto error; + + gcmSetFlipMode (GCM_FLIP_VSYNC); // Wait for VSYNC to flip + + gcmResetFlipStatus(); + + return context; + +error: + if (context) + rsxFinish (context, 0); + + return NULL; +} + +void +freeScreen(gcmContextData *context) +{ + rsxFinish (context, 0); +} + +static void +waitFinish(gcmContextData *context, u32 sLabelVal) +{ + rsxSetWriteBackendLabel (context, GCM_LABEL_INDEX, sLabelVal); + + rsxFlushBuffer (context); + + while (*(vu32 *)gcmGetLabelAddress (GCM_LABEL_INDEX) != sLabelVal) + usleep(30); +} + +static void +waitRSXIdle(gcmContextData *context) +{ + static u32 sLabelVal = 1; + + rsxSetWriteBackendLabel (context, GCM_LABEL_INDEX, sLabelVal); + rsxSetWaitLabel (context, GCM_LABEL_INDEX, sLabelVal); + + sLabelVal++; + + waitFinish(context, sLabelVal++); +} + +void +flushRSX(gcmContextData *context) +{ + if (flipped) + waitFlip (); + waitRSXIdle(context); +} + diff --git a/libraries/evas/src/modules/engines/psl1ght/rsxutil.h b/libraries/evas/src/modules/engines/psl1ght/rsxutil.h new file mode 100644 index 0000000..838a751 --- /dev/null +++ b/libraries/evas/src/modules/engines/psl1ght/rsxutil.h @@ -0,0 +1,43 @@ +/* + * This software is distributed under the terms of the MIT License + */ + +#ifndef __RSXUTIL_H__ +#define __RSXUTIL_H__ + +#include +#include + +#define CB_SIZE 0x100000 +#define HOST_SIZE (32 * 1024 * 1024) + +typedef struct +{ + int height; + int width; + int id; + uint32_t *ptr; + // Internal stuff + uint32_t offset; +} rsxBuffer; + +/* Initilize the RSX properly. Returns NULL on error */ +gcmContextData *initScreen(void *host_addr, u32 size); +/* Block the PPU thread untill the previous flip operation has finished. */ +void waitFlip(void); +/* Flip a buffer onto the screen. Returns TRUE on success */ +int flipBuffer(gcmContextData *context, s32 buffer); +/* Create a buffer to draw into and assign it to @id. Returns NULL on error */ +int makeBuffer(rsxBuffer *buffer, u16 width, u16 height, int id); +/* Copy the contents of a buffer to another buffer */ +int copyBuffer(gcmContextData *context, rsxBuffer *source, rsxBuffer *destination); +/* Get current screen resolution. returns TRUE on success */ +int getResolution(u16 *width, u16 *height); +/* Set screen resolution to closest matching and. returns TRUE on success */ +int setResolution(gcmContextData *context, u16 *width, u16 *height); +/* Initilize the RSX properly. Returns NULL on error */ +void freeScreen(gcmContextData *context); +/* Flush the RSX pipeline (any commands and wait for flip) */ +void flushRSX(gcmContextData *context); + +#endif /* __RSXUTIL_H__ */ diff --git a/libraries/evas/src/modules/engines/software_16/Makefile.am b/libraries/evas/src/modules/engines/software_16/Makefile.am new file mode 100644 index 0000000..070d610 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16/Makefile.am @@ -0,0 +1,39 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_ENGINE_SOFTWARE_16 + +SOFTWARE_16_SOURCES = evas_engine.c + + +if !EVAS_STATIC_BUILD_SOFTWARE_16 + +pkgdir = $(libdir)/evas/modules/engines/software_16/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = $(SOFTWARE_16_SOURCES) +module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_software_16.la + +libevas_engine_software_16_la_SOURCES = $(SOFTWARE_16_SOURCES) + +endif +endif + +EXTRA_DIST = \ +evas_engine.c diff --git a/libraries/evas/src/modules/engines/software_16/Makefile.in b/libraries/evas/src/modules/engines/software_16/Makefile.in new file mode 100644 index 0000000..1fc95cf --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16/Makefile.in @@ -0,0 +1,765 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/software_16 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_engine_software_16_la_LIBADD = +am__libevas_engine_software_16_la_SOURCES_DIST = evas_engine.c +@BUILD_ENGINE_SOFTWARE_16_TRUE@am__objects_1 = evas_engine.lo +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@am_libevas_engine_software_16_la_OBJECTS = $(am__objects_1) +libevas_engine_software_16_la_OBJECTS = \ + $(am_libevas_engine_software_16_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@am_libevas_engine_software_16_la_rpath = +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c +@BUILD_ENGINE_SOFTWARE_16_TRUE@am__objects_2 = \ +@BUILD_ENGINE_SOFTWARE_16_TRUE@ module_la-evas_engine.lo +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_16_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_software_16_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_ENGINE_SOFTWARE_16_TRUE@SOFTWARE_16_SOURCES = evas_engine.c +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_16/$(MODULE_ARCH) +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_FALSE@module_la_SOURCES = $(SOFTWARE_16_SOURCES) +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_FALSE@module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@noinst_LTLIBRARIES = libevas_engine_software_16.la +@BUILD_ENGINE_SOFTWARE_16_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@libevas_engine_software_16_la_SOURCES = $(SOFTWARE_16_SOURCES) +EXTRA_DIST = \ +evas_engine.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_16/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/software_16/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_16.la: $(libevas_engine_software_16_la_OBJECTS) $(libevas_engine_software_16_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_software_16_la_rpath) $(libevas_engine_software_16_la_OBJECTS) $(libevas_engine_software_16_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_16/evas_engine.c b/libraries/evas/src/modules/engines/software_16/evas_engine.c new file mode 100644 index 0000000..643e24f --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16/evas_engine.c @@ -0,0 +1,399 @@ +#include "evas_common.h"/* Also includes international specific stuff */ +#include "evas_common_soft16.h" + +/* + ***** + ** + ** ENGINE ROUTINES + ** + ***** + */ +int _evas_soft16_log_dom = -1; +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; +#ifdef ERR +#undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR( _evas_soft16_log_dom, __VA_ARGS__) + +#ifdef DBG +#undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_soft16_log_dom, __VA_ARGS__) + +#ifdef INF +#undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_soft16_log_dom, __VA_ARGS__) + +#ifdef WRN +#undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_soft16_log_dom, __VA_ARGS__) + +#ifdef CRIT +#undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_soft16_log_dom, __VA_ARGS__) + +#define NOT_IMPLEMENTED() \ + WRN("NOT_IMPLEMENTED: %s() at %s:%d", \ + __FUNCTION__, __FILE__, __LINE__) + +static void +eng_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x, int y, int w, int h) +{ + evas_common_soft16_rectangle_draw(surface, context, x, y, w, h); +} + +static void +eng_line_draw(void *data __UNUSED__, void *context, void *surface, int x1, int y1, int x2, int y2) +{ + evas_common_soft16_line_draw(surface, context, x1, y1, x2, y2); +} + +static void +eng_polygon_draw(void *data __UNUSED__, void *context, void *surface, void *polygon, int x, int y) +{ + evas_common_soft16_polygon_draw(surface, context, polygon, x, y); +} + +static int +eng_image_alpha_get(void *data __UNUSED__, void *image) +{ + Soft16_Image *im; + + if (!image) return 0; + im = image; + return im->cache_entry.flags.alpha; +} + +static void * +eng_image_alpha_set(void *data __UNUSED__, void *image, int have_alpha) +{ + if (!image) return NULL; + have_alpha = !!have_alpha; + image = evas_common_soft16_image_alpha_set(image, have_alpha); + return image; +} + +static char * +eng_image_comment_get(void *data __UNUSED__, void *image __UNUSED__, char *key __UNUSED__) +{ + return NULL; +} + +static char * +eng_image_format_get(void *data __UNUSED__, void *image __UNUSED__) +{ + NOT_IMPLEMENTED(); + return NULL; +} + +static int +eng_image_colorspace_get(void *data __UNUSED__, void *image __UNUSED__) +{ + return EVAS_COLORSPACE_RGB565_A5P; +} + + +static void +eng_image_colorspace_set(void *data __UNUSED__, void *image __UNUSED__, int cspace __UNUSED__) +{ + NOT_IMPLEMENTED(); +} + +static void * +eng_image_native_set(void *data __UNUSED__, void *image __UNUSED__, void *native __UNUSED__) +{ + NOT_IMPLEMENTED(); + return NULL; +} + +static void * +eng_image_native_get(void *data __UNUSED__, void *image __UNUSED__) +{ + NOT_IMPLEMENTED(); + return NULL; +} + +static void * +eng_image_load(void *data __UNUSED__, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + return evas_cache_image_request(evas_common_soft16_image_cache_get(), file, key, lo, error); +} + +static void * +eng_image_new_from_data(void *data __UNUSED__, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + if ((image_data) && (cspace != EVAS_COLORSPACE_RGB565_A5P)) + { + WRN("Unsupported colorspace %d in %s() (%s:%d)", + cspace, __FUNCTION__, __FILE__, __LINE__); + return NULL; + } + return evas_cache_image_data(evas_common_soft16_image_cache_get(), w, h, image_data, alpha, EVAS_COLORSPACE_RGB565_A5P); +} + +static void * +eng_image_new_from_copied_data(void *data __UNUSED__, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + if ((image_data) && (cspace != EVAS_COLORSPACE_RGB565_A5P)) + { + WRN("Unsupported colorspace %d in %s() (%s:%d)", + cspace, __FUNCTION__, __FILE__, __LINE__); + return NULL; + } + return evas_cache_image_copied_data(evas_common_soft16_image_cache_get(), w, h, image_data, alpha, EVAS_COLORSPACE_RGB565_A5P); +} + +static void +eng_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) +{ + Soft16_Image *im; + + if (w) *w = 0; + if (h) *h = 0; + if (!image) return; + im = image; + if (w) *w = im->cache_entry.w; + if (h) *h = im->cache_entry.h; +} + +static void * +eng_image_size_set(void *data __UNUSED__, void *image, int w, int h) +{ + if (!image) return NULL; + if ((w <= 0) || (h <= 0)) + { + evas_cache_image_drop((Image_Entry *) image); + return NULL; + } + return evas_cache_image_size_set((Image_Entry *) image, w, h); +} + +static void +eng_image_stride_get(void *data __UNUSED__, void *image, int *stride) +{ + Soft16_Image *im; + + if (stride) *stride = 0; + if (!image) return; + im = image; + if (stride) *stride = im->stride; +} + +static void * +eng_image_dirty_region(void *data __UNUSED__, void *image, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +{ + /* FIXME: is this required? */ + //NOT_IMPLEMENTED(); + return image; +} + +static void * +eng_image_data_get(void *data __UNUSED__, void *image, int to_write, DATA32 **image_data, int *err) +{ + Soft16_Image *im; + int error; + + if (!image) + { + *image_data = NULL; + return NULL; + } + + im = image; + error = evas_cache_image_load_data(&im->cache_entry); + + if (to_write) + im = (Soft16_Image *) evas_cache_image_alone(&im->cache_entry); + + if (image_data) *image_data = (DATA32 *) im->pixels; + + if (err) *err = error; + return im; +} + +static void * +eng_image_data_put(void *data __UNUSED__, void *image, DATA32 *image_data) +{ + Soft16_Image *old_im, *new_im; + + if (!image) return NULL; + + old_im = image; + if ((DATA16 *)image_data == old_im->pixels) return old_im; + + new_im = (Soft16_Image *) evas_cache_image_data(evas_common_soft16_image_cache_get(), old_im->cache_entry.w, old_im->cache_entry.h, image_data, old_im->cache_entry.flags.alpha, EVAS_COLORSPACE_RGB565_A5P); + evas_cache_image_drop(&old_im->cache_entry); + return new_im; +} + +static void +eng_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) +{ + Soft16_Image *im = image; + + if (!im) return ; + evas_cache_image_preload_data(&im->cache_entry, target); +} + +static void +eng_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) +{ + Soft16_Image *im = image; + + if (!im) return ; + evas_cache_image_preload_cancel(&im->cache_entry, target); +} + +static void +eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth) +{ + Soft16_Image *im; + + im = (Soft16_Image *) image; + + evas_cache_image_load_data(&im->cache_entry); + evas_common_soft16_image_draw(im, surface, context, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h, + smooth); +} + +static void +eng_image_scale_hint_set(void *data __UNUSED__, void *image __UNUSED__, int hint __UNUSED__) +{ +} + +static int +eng_image_scale_hint_get(void *data __UNUSED__, void *image __UNUSED__) +{ + return EVAS_IMAGE_SCALE_HINT_NONE; +} + +static void +eng_image_cache_flush(void *data __UNUSED__) +{ + evas_cache_image_flush(evas_common_soft16_image_cache_get()); +} + +static void +eng_image_cache_set(void *data __UNUSED__, int bytes) +{ + evas_cache_image_set(evas_common_soft16_image_cache_get(), bytes); +} + +static int +eng_image_cache_get(void *data __UNUSED__) +{ + return evas_cache_image_get(evas_common_soft16_image_cache_get()); +} + +static void +eng_font_draw(void *data __UNUSED__, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *text_props) +{ + static RGBA_Image *im = NULL; + Soft16_Image *dst = surface; + + if (!im) + im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get()); + evas_cache_image_surface_alloc(&im->cache_entry, dst->cache_entry.w, dst->cache_entry.h); + evas_common_draw_context_font_ext_set(context, + surface, + evas_common_soft16_font_glyph_new, + evas_common_soft16_font_glyph_free, + evas_common_soft16_font_glyph_draw); + evas_common_font_draw(im, context, (RGBA_Font *) font, x, y, text_props); + evas_common_draw_context_font_ext_set(context, + NULL, + NULL, + NULL, + NULL); +} + +/* + ***** + ** + ** MODULE ACCESSIBLE API API + ** + ***** + */ + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + _evas_soft16_log_dom = eina_log_domain_register + ("evas-software_16", EVAS_DEFAULT_LOG_COLOR); + if (_evas_soft16_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ + EVAS_API_RESET(info, &func); + EVAS_API_RESET(info_free, &func); + EVAS_API_RESET(setup, &func); +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(rectangle_draw); + ORD(line_draw); + ORD(polygon_draw); + ORD(image_load); + ORD(image_new_from_data); + ORD(image_new_from_copied_data); + ORD(image_size_get); + ORD(image_size_set); + ORD(image_stride_get); + ORD(image_dirty_region); + ORD(image_data_get); + ORD(image_data_put); + ORD(image_data_preload_request); + ORD(image_data_preload_cancel); + ORD(image_alpha_set); + ORD(image_alpha_get); + ORD(image_draw); + ORD(image_comment_get); + ORD(image_format_get); + ORD(image_colorspace_set); + ORD(image_colorspace_get); + ORD(image_native_set); + ORD(image_native_get); + ORD(image_cache_flush); + ORD(image_cache_set); + ORD(image_cache_get); + ORD(font_draw); + ORD(image_scale_hint_set); + ORD(image_scale_hint_get); + + em->functions = (void *)(&func); + + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_soft16_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "software_16", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_16); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_16 +EVAS_EINA_MODULE_DEFINE(engine, software_16); +#endif diff --git a/libraries/evas/src/modules/engines/software_16_ddraw/Evas_Engine_Software_16_DDraw.h b/libraries/evas/src/modules/engines/software_16_ddraw/Evas_Engine_Software_16_DDraw.h new file mode 100644 index 0000000..3c1547a --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_ddraw/Evas_Engine_Software_16_DDraw.h @@ -0,0 +1,32 @@ +#ifndef __EVAS_ENGINE_SOFTWARE_16_DDRAW_H__ +#define __EVAS_ENGINE_SOFTWARE_16_DDRAW_H__ + + +#include +#include + +typedef struct _Evas_Engine_Info_Software_16_DDraw Evas_Engine_Info_Software_16_DDraw; + +struct _Evas_Engine_Info_Software_16_DDraw +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + struct { + HWND window; + LPDIRECTDRAW object; /* DirectDraw object */ + LPDIRECTDRAWSURFACE surface_primary; /* DirectDraw primary surface */ + LPDIRECTDRAWSURFACE surface_back; /* DirectDraw back surface */ + LPDIRECTDRAWSURFACE surface_source; /* DirectDraw source surface */ + int depth; + + int rotation; + } info; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; + + +#endif /* __EVAS_ENGINE_SOFTWARE_16_DDRAW_H__ */ diff --git a/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.am b/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.am new file mode 100644 index 0000000..adbf477 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.am @@ -0,0 +1,49 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +-I$(top_srcdir)/src/modules/engines/software_16 \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_software_16_ddraw_cflags@ + +if BUILD_ENGINE_SOFTWARE_16_DDRAW + +SOFTWARE_16_DDRAW_SOURCES = \ +evas_engine.c \ +evas_ddraw_buffer.cpp \ +evas_ddraw_main.cpp + +SOFTWARE_16_DDRAW_LIBADD = @evas_engine_software_16_ddraw_libs@ + + +includes_HEADERS = Evas_Engine_Software_16_DDraw.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW + +pkgdir = $(libdir)/evas/modules/engines/software_16_ddraw/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(SOFTWARE_16_DDRAW_SOURCES) +module_la_CXXFLAGS = -fno-rtti -fno-exceptions +module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_16_DDRAW_LIBADD) +module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_software_16_ddraw.la + +libevas_engine_software_16_ddraw_la_SOURCES = $(SOFTWARE_16_DDRAW_SOURCES) +libevas_engine_software_16_ddraw_la_LIBADD = $(SOFTWARE_16_DDRAW_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in b/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in new file mode 100644 index 0000000..f588c4f --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in @@ -0,0 +1,869 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/software_16_ddraw +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@libevas_engine_software_16_ddraw_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_software_16_ddraw_la_SOURCES_DIST = evas_engine.c \ + evas_ddraw_buffer.cpp evas_ddraw_main.cpp +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@ evas_ddraw_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@ evas_ddraw_main.lo +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@am_libevas_engine_software_16_ddraw_la_OBJECTS = $(am__objects_1) +libevas_engine_software_16_ddraw_la_OBJECTS = \ + $(am_libevas_engine_software_16_ddraw_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@am_libevas_engine_software_16_ddraw_la_rpath = +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la \ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@ $(am__DEPENDENCIES_1) +am__module_la_SOURCES_DIST = evas_engine.c evas_ddraw_buffer.cpp \ + evas_ddraw_main.cpp +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@am__objects_2 = \ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@ module_la-evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@ module_la-evas_ddraw_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@ module_la-evas_ddraw_main.lo +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(module_la_CXXFLAGS) $(CXXFLAGS) $(module_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_16_ddraw_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = \ + $(am__libevas_engine_software_16_ddraw_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Software_16_DDraw.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +-I$(top_srcdir)/src/modules/engines/software_16 \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_software_16_ddraw_cflags@ + +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@SOFTWARE_16_DDRAW_SOURCES = \ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@evas_engine.c \ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@evas_ddraw_buffer.cpp \ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@evas_ddraw_main.cpp + +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@SOFTWARE_16_DDRAW_LIBADD = @evas_engine_software_16_ddraw_libs@ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@includes_HEADERS = Evas_Engine_Software_16_DDraw.h +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_16_ddraw/$(MODULE_ARCH) +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@module_la_SOURCES = $(SOFTWARE_16_DDRAW_SOURCES) +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@module_la_CXXFLAGS = -fno-rtti -fno-exceptions +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_16_DDRAW_LIBADD) +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@noinst_LTLIBRARIES = libevas_engine_software_16_ddraw.la +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@libevas_engine_software_16_ddraw_la_SOURCES = $(SOFTWARE_16_DDRAW_SOURCES) +@BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@libevas_engine_software_16_ddraw_la_LIBADD = $(SOFTWARE_16_DDRAW_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_16_ddraw/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/software_16_ddraw/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_16_ddraw.la: $(libevas_engine_software_16_ddraw_la_OBJECTS) $(libevas_engine_software_16_ddraw_la_DEPENDENCIES) + $(AM_V_CXXLD)$(CXXLINK) $(am_libevas_engine_software_16_ddraw_la_rpath) $(libevas_engine_software_16_ddraw_la_OBJECTS) $(libevas_engine_software_16_ddraw_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CXXLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_ddraw_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_ddraw_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_ddraw_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_ddraw_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +module_la-evas_ddraw_buffer.lo: evas_ddraw_buffer.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_ddraw_buffer.lo -MD -MP -MF $(DEPDIR)/module_la-evas_ddraw_buffer.Tpo -c -o module_la-evas_ddraw_buffer.lo `test -f 'evas_ddraw_buffer.cpp' || echo '$(srcdir)/'`evas_ddraw_buffer.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_ddraw_buffer.Tpo $(DEPDIR)/module_la-evas_ddraw_buffer.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_ddraw_buffer.cpp' object='module_la-evas_ddraw_buffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_ddraw_buffer.lo `test -f 'evas_ddraw_buffer.cpp' || echo '$(srcdir)/'`evas_ddraw_buffer.cpp + +module_la-evas_ddraw_main.lo: evas_ddraw_main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_ddraw_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_ddraw_main.Tpo -c -o module_la-evas_ddraw_main.lo `test -f 'evas_ddraw_main.cpp' || echo '$(srcdir)/'`evas_ddraw_main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_ddraw_main.Tpo $(DEPDIR)/module_la-evas_ddraw_main.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_ddraw_main.cpp' object='module_la-evas_ddraw_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_ddraw_main.lo `test -f 'evas_ddraw_main.cpp' || echo '$(srcdir)/'`evas_ddraw_main.cpp + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_16_ddraw/evas_ddraw_buffer.cpp b/libraries/evas/src/modules/engines/software_16_ddraw/evas_ddraw_buffer.cpp new file mode 100644 index 0000000..7a0a8b7 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_ddraw/evas_ddraw_buffer.cpp @@ -0,0 +1,87 @@ +#include "evas_common.h" +#include "evas_engine.h" + + +DDraw_Output_Buffer * +evas_software_ddraw_output_buffer_new(HWND window, + LPDIRECTDRAW object, + LPDIRECTDRAWSURFACE surface_primary, + LPDIRECTDRAWSURFACE surface_back, + LPDIRECTDRAWSURFACE surface_source, + int width, + int height) +{ + DDSURFACEDESC surface_desc; + DDraw_Output_Buffer *ddob; + + ddob = (DDraw_Output_Buffer *)calloc(1, sizeof(DDraw_Output_Buffer)); + if (!ddob) return NULL; + + ddob->dd.window = window; + ddob->dd.object = object; + ddob->dd.surface_primary = surface_primary; + ddob->dd.surface_back = surface_back; + ddob->dd.surface_source = surface_source; + ddob->width = width; + ddob->height = height; + ddob->pitch = width * 2; + + ZeroMemory(&surface_desc, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + + if (FAILED(ddob->dd.surface_source->Lock(NULL, + &surface_desc, + DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR, + NULL))) + { + free(ddob); + return NULL; + } + + ddob->data = (DATA16 *)surface_desc.lpSurface; + + if (FAILED(ddob->dd.surface_source->Unlock(NULL))) + { + free(ddob); + return NULL; + } + if (ddob->im) + evas_cache_image_drop(&ddob->im->cache_entry); + + ddob->im = (Soft16_Image *) evas_cache_image_data(evas_common_soft16_image_cache_get(), width, height, (DATA32 *) ddob->data, 0, EVAS_COLORSPACE_RGB565_A5P); + if (ddob->im) + ddob->im->stride = ddob->pitch; + + return ddob; +} + +void +evas_software_ddraw_output_buffer_free(DDraw_Output_Buffer *ddob, int sync) +{ + free(ddob); +} + +void +evas_software_ddraw_output_buffer_paste(DDraw_Output_Buffer *ddob) +{ + RECT dst_rect; + RECT src_rect; + POINT p; + + SetRect(&src_rect, 0, 0, ddob->width, ddob->height); + + if (FAILED(ddob->dd.surface_back->BltFast(0, 0, + ddob->dd.surface_source, + &src_rect, + DDBLTFAST_NOCOLORKEY | DDBLTFAST_WAIT))) + return; + + p.x = 0; + p.y = 0; + ClientToScreen(ddob->dd.window, &p); + GetClientRect(ddob->dd.window, &dst_rect); + OffsetRect(&dst_rect, p.x, p.y); + ddob->dd.surface_primary->Blt(&dst_rect, + ddob->dd.surface_back, &src_rect, + DDBLT_WAIT, NULL); +} diff --git a/libraries/evas/src/modules/engines/software_16_ddraw/evas_ddraw_main.cpp b/libraries/evas/src/modules/engines/software_16_ddraw/evas_ddraw_main.cpp new file mode 100644 index 0000000..7a2eb7f --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_ddraw/evas_ddraw_main.cpp @@ -0,0 +1,71 @@ +#include "evas_engine.h" + + +void * +evas_software_ddraw_lock(DDraw_Output_Buffer *ddob, int *ddraw_width, int *ddraw_height, int *ddraw_pitch, int *ddraw_depth) +{ + DDSURFACEDESC surface_desc; + + ZeroMemory(&surface_desc, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + + if (FAILED(ddob->dd.surface_back->Lock(NULL, + &surface_desc, + DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR | DDLOCK_WRITEONLY, + NULL))) + return NULL; + + *ddraw_width = surface_desc.dwWidth; + *ddraw_height = surface_desc.dwHeight; + *ddraw_pitch = surface_desc.lPitch; + *ddraw_depth = surface_desc.ddpfPixelFormat.dwRGBBitCount >> 3; + + return surface_desc.lpSurface; +} + +void +evas_software_ddraw_unlock_and_flip(DDraw_Output_Buffer *ddob) +{ + RECT dst_rect; + RECT src_rect; + POINT p; + + if (FAILED(ddob->dd.surface_back->Unlock(NULL))) + return; + + /* we figure out where on the primary surface our window lives */ + p.x = 0; + p.y = 0; + ClientToScreen(ddob->dd.window, &p); + GetClientRect(ddob->dd.window, &dst_rect); + OffsetRect(&dst_rect, p.x, p.y); + SetRect(&src_rect, 0, 0, ddob->width, ddob->height); + + /* nothing to do if the function fails, so we don't check the result */ + ddob->dd.surface_primary->BltFast(0, 0, + ddob->dd.surface_back, &dst_rect, + DDBLTFAST_WAIT || DDBLTFAST_NOCOLORKEY); +} + +void +evas_software_ddraw_surface_resize(DDraw_Output_Buffer *ddob) +{ + DDSURFACEDESC surface_desc; + + ddob->dd.surface_back->Release(); + memset (&surface_desc, 0, sizeof (surface_desc)); + surface_desc.dwSize = sizeof (surface_desc); + /* FIXME: that code does not compile. Must know why */ +#if 0 + surface_desc.dwFlags = DDSD_HEIGHT | DDSD_WIDTH; + surface_desc.dwWidth = width; + surface_desc.dwHeight = height; + IDirectDrawSurface7_SetSurfaceDesc(ddob->dd.surface_back, &surface_desc, NULL); +#else + surface_desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; + surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + surface_desc.dwWidth = ddob->width; + surface_desc.dwHeight = ddob->height; + ddob->dd.object->CreateSurface(&surface_desc, &ddob->dd.surface_back, NULL); +#endif +} diff --git a/libraries/evas/src/modules/engines/software_16_ddraw/evas_engine.c b/libraries/evas/src/modules/engines/software_16_ddraw/evas_engine.c new file mode 100644 index 0000000..9629781 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_ddraw/evas_engine.c @@ -0,0 +1,628 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_engine.h" +#include "Evas_Engine_Software_16_DDraw.h" +#include "evas_common_soft16.h" + +int _evas_engine_soft16_ddraw_log_dom = -1; +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +/* engine struct data */ +typedef struct _Render_Engine Render_Engine; + +struct _Render_Engine +{ + HWND window; + LPDIRECTDRAW object; + LPDIRECTDRAWSURFACE surface_primary; + LPDIRECTDRAWSURFACE surface_back; + LPDIRECTDRAWSURFACE surface_source; + int width; + int height; + int rotation; + Tilebuf *tb; + Tilebuf_Rect *rects; + Tilebuf_Rect *cur_rect; + DDraw_Output_Buffer *ddob; + Soft16_Image *tmp_out; /* used by indirect render, like rotation */ + HRGN clip_rects; + unsigned char end : 1; +}; + +/* prototypes we will use here */ + +static void *eng_info(Evas *e); +static void eng_info_free(Evas *e, void *info); +static int eng_setup(Evas *e, void *info); +static void eng_output_free(void *data); +static void eng_output_resize(void *data, int w, int h); +static void eng_output_tile_size_set(void *data, int w, int h); +static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h); +static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h); +static void eng_output_redraws_clear(void *data); +static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); +static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h); +static void eng_output_flush(void *data); +static void eng_output_idle_flush(void *data); + +/* engine api this module provides */ +static void * +eng_info(Evas *e) +{ + Evas_Engine_Info_Software_16_DDraw *info; + info = calloc(1, sizeof(Evas_Engine_Info_Software_16_DDraw)); + if (!info) return NULL; + info->magic.magic = rand(); + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; + e = NULL; +} + +static void +eng_info_free(Evas *e, void *info) +{ + Evas_Engine_Info_Software_16_DDraw *in; + in = (Evas_Engine_Info_Software_16_DDraw *)info; + free(in); +} + +static void +_tmp_out_alloc(Render_Engine *re) +{ + Tilebuf_Rect *r; + int w = 0, h = 0; + + EINA_INLIST_FOREACH(re->rects, r) + { + if (r->w > w) w = r->w; + if (r->h > h) h = r->h; + } + + if (re->tmp_out) + { + if ((re->tmp_out->cache_entry.w < w) || (re->tmp_out->cache_entry.h < h)) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } + } + + if (!re->tmp_out) + { + Soft16_Image *im; + + im = (Soft16_Image *) evas_cache_image_empty(evas_common_soft16_image_cache_get()); + im->cache_entry.flags.alpha = 0; + evas_cache_image_surface_alloc(&im->cache_entry, w, h); + + re->tmp_out = im; + } +} + + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_Software_16_DDraw *info; + + info = (Evas_Engine_Info_Software_16_DDraw *)in; + if (!e->engine.data.output) + { + /* the only check - simplistic, i know, but enough for this + * "special purpose" engine. Remember it is meant to be used + * for limited power devices that have a 16bit display mode + * and no real other acceleration, and high resolution so we + * can pre-dither into 16bpp. */ + if (info->info.depth != 16) + return 0; + /* do common routine init - we wil at least use it for core + * image loading and font loading/glyph rendering & placement */ + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + evas_common_soft16_image_init(); + + /* render engine specific data */ + re = calloc(1, sizeof(Render_Engine)); + if (!re) + return 0; + e->engine.data.output = re; + re->window = info->info.window; + re->object = info->info.object; + re->surface_primary = info->info.surface_primary; + re->surface_back = info->info.surface_back; + re->surface_source = info->info.surface_source; + re->width = e->output.w; + re->height = e->output.h; + re->rotation = info->info.rotation; + re->tb = evas_common_tilebuf_new(e->output.w, e->output.h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + } + else + { + /* we changed the info after first init - do a re-eval where + * appropriate */ + if (info->info.depth != 16) + return 0; + re = e->engine.data.output; + if (re->tb) evas_common_tilebuf_free(re->tb); + re->window = info->info.window; + re->object = info->info.object; + re->surface_primary = info->info.surface_primary; + re->surface_back = info->info.surface_back; + re->surface_source = info->info.surface_source; + re->width = e->output.w; + re->height = e->output.h; + re->rotation = info->info.rotation; + re->tb = evas_common_tilebuf_new(e->output.w, e->output.h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } + } + if (!e->engine.data.output) return 0; + /* add a draw context if we dont have one */ + if (!e->engine.data.context) + e->engine.data.context = + e->engine.func->context_new(e->engine.data.output); + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (re->ddob) evas_software_ddraw_output_buffer_free(re->ddob, 0); + if (re->clip_rects) DeleteObject(re->clip_rects); + if (re->tb) evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + if (re->tmp_out) evas_cache_image_drop(&re->tmp_out->cache_entry); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); + evas_common_soft16_image_shutdown(); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + + if ((re->width == w) && (re->height == h)) return; + + if (re->ddob) + evas_software_ddraw_surface_resize(re->ddob); + + evas_common_tilebuf_free(re->tb); + re->width = w; + re->height = h; + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + if (re->ddob) + { + evas_software_ddraw_output_buffer_free(re->ddob, 0); + re->ddob = NULL; + } + if (re->clip_rects) + { + DeleteObject(re->clip_rects); + re->clip_rects = NULL; + } + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +} + +static inline void +_output_buffer_alloc(Render_Engine *re) +{ + int width; + int height; + + if (re->ddob) return; + + if ((re->rotation == 0) || (re->rotation == 180)) + { + width = re->width; + height = re->height; + } + else + { + width = re->height; + height = re->width; + } + + re->ddob = evas_software_ddraw_output_buffer_new(re->window, + re->object, + re->surface_primary, + re->surface_back, + re->surface_source, + width, + height); +} + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + Tilebuf_Rect *rect; + int ux, uy, uw, uh; + + re = (Render_Engine *)data; + if (re->end) + { + re->end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + if (!re->rects) return NULL; + + re->cur_rect = re->rects; + _output_buffer_alloc(re); + if (re->rotation != 0) _tmp_out_alloc(re); /* grows if required */ + } + if (!re->cur_rect) + { + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + return NULL; + } + rect = re->cur_rect; + ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h; + re->cur_rect = (Tilebuf_Rect *)((EINA_INLIST_GET(re->cur_rect))->next); + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = 1; + } + + *x = ux; *y = uy; *w = uw; *h = uh; + if (re->rotation == 0) + { + *cx = ux; *cy = uy; *cw = uw; *ch = uh; + return &re->ddob->im; + } + else + { + *cx = 0; *cy = 0; *cw = uw; *ch = uh; + return re->tmp_out; + } +} + +static void +_blit_rot_90(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + (out_x + + (w + out_y - 1) * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr -= dst->stride; + } + sp += src->stride; + dp++; + } +} + +static void +_blit_rot_180(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + ((w + out_x - 1) + + (h + out_y - 1) * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr--; + } + sp += src->stride; + dp -= dst->stride; + } +} + +static void +_blit_rot_270(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + ((h + out_x - 1) + + out_y * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr += dst->stride; + } + sp += src->stride; + dp--; + } +} + +static void +_tmp_out_process(Render_Engine *re, int out_x, int out_y, int w, int h) +{ + Soft16_Image *d, *s; + + d = &re->ddob->im; + s = re->tmp_out; + + if ((w < 1) || (h < 1) || (out_x >= d->cache_entry.w) || (out_y >= d->cache_entry.h)) + return; + + if (re->rotation == 90) + _blit_rot_90(d, s, out_x, out_y, w, h); + else if (re->rotation == 180) + _blit_rot_180(d, s, out_x, out_y, w, h); + else if (re->rotation == 270) + _blit_rot_270(d, s, out_x, out_y, w, h); +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + HRGN region; + int xx; + int yy; + int width; + int height; + + re = (Render_Engine *)data; + + if (!re->clip_rects) + re->clip_rects = CreateRectRgn(0, 0, 0, 0); + + if (re->rotation == 0) + { + xx = x; + yy = y; + width = w; + height = h; + } + else if (re->rotation == 90) + { + xx = y; + yy = re->width - w - x; + width = h; + height = w; + } + else if (re->rotation == 180) + { + xx = re->width - w - x; + yy = re->height - h - y; + width = w; + height = h; + } + else if (re->rotation == 270) + { + xx = re->height - h - y; + yy = x; + width = h; + height = w; + } + + region = CreateRectRgn(xx, yy, xx + width, yy + height); + + if (re->rotation != 0) + _tmp_out_process(re, xx, yy, w, h); + CombineRgn(re->clip_rects, re->clip_rects, region, RGN_OR); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + void *ddraw_data; + int ddraw_width; + int ddraw_height; + int ddraw_pitch; + int ddraw_depth; + + re = (Render_Engine *)data; + if (re->clip_rects) + { + /* FIXME : i have to manage that */ +/* XSetRegion(re->disp, re->gc, re->clip_rects); */ + DeleteObject(re->clip_rects); + re->clip_rects = NULL; + } + else return; + + evas_software_ddraw_output_buffer_paste(re->ddob); + + /* FIXME : i have to manage that */ +/* XSetClipMask(re->disp, re->gc, None); */ +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (re->ddob) + { + evas_software_ddraw_output_buffer_free(re->ddob, 0); + re->ddob = NULL; + } + if (re->clip_rects) + { + DeleteObject(re->clip_rects); + re->clip_rects = NULL; + } + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *context) +{ + return EINA_FALSE; +} + +/* module advertising code */ +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_16")) return 0; + _evas_engine_soft16_ddraw_log_dom = eina_log_domain_register + ("evas-software_16_ddraw", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_soft16_ddraw_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em) +{ + eina_log_domain_unregister(_evas_engine_soft16_ddraw_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "software_16_ddraw", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_16_ddraw); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW +EVAS_EINA_MODULE_DEFINE(engine, software_16_ddraw); +#endif diff --git a/libraries/evas/src/modules/engines/software_16_ddraw/evas_engine.h b/libraries/evas/src/modules/engines/software_16_ddraw/evas_engine.h new file mode 100644 index 0000000..fe85e97 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_ddraw/evas_engine.h @@ -0,0 +1,85 @@ +#ifndef __EVAS_ENGINE_H__ +#define __EVAS_ENGINE_H__ + +#include +#include + +#include "evas_common_soft16.h" + +extern int _evas_engine_soft16_ddraw_log_dom ; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft16_ddraw_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft16_ddraw_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft16_ddraw_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft16_ddraw_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft16_ddraw_log_dom, __VA_ARGS__) + +typedef struct _DDraw_Output_Buffer DDraw_Output_Buffer; + +struct _DDraw_Output_Buffer +{ + Soft16_Image *im; + struct { + HWND window; + LPDIRECTDRAW object; + LPDIRECTDRAWSURFACE surface_primary; + LPDIRECTDRAWSURFACE surface_back; + LPDIRECTDRAWSURFACE surface_source; + } dd; + void *data; + int x; + int y; + int width; + int height; + int depth; + int pitch; +}; + +/****/ + +#ifdef __cplusplus +extern "C" { +#endif + + +DDraw_Output_Buffer *evas_software_ddraw_output_buffer_new (HWND window, + LPDIRECTDRAW object, + LPDIRECTDRAWSURFACE surface_primary, + LPDIRECTDRAWSURFACE surface_back, + LPDIRECTDRAWSURFACE surface_source, + int width, + int height); +void evas_software_ddraw_output_buffer_free (DDraw_Output_Buffer *ddob, int sync); +void evas_software_ddraw_output_buffer_paste (DDraw_Output_Buffer *ddob); + + +void *evas_software_ddraw_lock(DDraw_Output_Buffer *ddob, int *ddraw_width, int *ddraw_height, int *ddraw_pitch, int *ddraw_depth); + +void evas_software_ddraw_unlock_and_flip(DDraw_Output_Buffer *ddob); + +void evas_software_ddraw_surface_resize(DDraw_Output_Buffer *ddob); + + +#ifdef __cplusplus +} +#endif + +#endif /* __EVAS_ENGINE_H__ */ diff --git a/libraries/evas/src/modules/engines/software_16_sdl/Evas_Engine_SDL_16.h b/libraries/evas/src/modules/engines/software_16_sdl/Evas_Engine_SDL_16.h new file mode 100644 index 0000000..5a133fe --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_sdl/Evas_Engine_SDL_16.h @@ -0,0 +1,25 @@ +#ifndef _EVAS_ENGINE_SDL_16_H +# define _EVAS_ENGINE_SDL_16_H + +#include + +typedef struct _Evas_Engine_Info_SDL_16 Evas_Engine_Info_SDL_16; +struct _Evas_Engine_Info_SDL_16 +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + struct { + int rotation; + int fullscreen : 1; + int hwsurface : 1; + int noframe : 1; + int alpha : 1; + } info; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; + +#endif diff --git a/libraries/evas/src/modules/engines/software_16_sdl/Makefile.am b/libraries/evas/src/modules/engines/software_16_sdl/Makefile.am new file mode 100644 index 0000000..af0197d --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_sdl/Makefile.am @@ -0,0 +1,40 @@ +AUTOMAKE_OPTIONS = 1.4 foreign + +MAINTAINERCLEANFILES = Makefile.in + +INCLUDES = -I. -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/lib/include @FREETYPE_CFLAGS@ @PIXMAN_CFLAGS@ @SDL_CFLAGS@ @EINA_CFLAGS@ + +if BUILD_ENGINE_SOFTWARE_SDL + +SOFTWARE_SDL_SOURCES = \ +evas_engine.c \ +evas_engine.h + + +includes_HEADERS = Evas_Engine_SDL_16.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_SOFTWARE_SDL + +pkgdir = $(libdir)/evas/modules/engines/software_16_sdl/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(SOFTWARE_SDL_SOURCES) + +module_la_LIBADD = @EINA_LIBS@ @SDL_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs + +else + +noinst_LTLIBRARIES = libevas_engine_software_16_sdl.la + +libevas_engine_software_16_sdl_la_SOURCES = $(SOFTWARE_SDL_SOURCES) +libevas_engine_software_16_sdl_la_LIBADD = @SDL_LIBS@ + +endif +endif + +EXTRA_DIST = \ +evas_engine.c \ +evas_engine.h \ +Evas_Engine_SDL_16.h diff --git a/libraries/evas/src/modules/engines/software_16_sdl/Makefile.in b/libraries/evas/src/modules/engines/software_16_sdl/Makefile.in new file mode 100644 index 0000000..219e392 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_sdl/Makefile.in @@ -0,0 +1,780 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/software_16_sdl +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_engine_software_16_sdl_la_DEPENDENCIES = +am__libevas_engine_software_16_sdl_la_SOURCES_DIST = evas_engine.c \ + evas_engine.h +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@am__objects_1 = evas_engine.lo +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@am_libevas_engine_software_16_sdl_la_OBJECTS = $(am__objects_1) +libevas_engine_software_16_sdl_la_OBJECTS = \ + $(am_libevas_engine_software_16_sdl_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@am_libevas_engine_software_16_sdl_la_rpath = +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_engine.h +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@am_module_la_OBJECTS = $(am__objects_1) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_16_sdl_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_software_16_sdl_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_SDL_16.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +AUTOMAKE_OPTIONS = 1.4 foreign +MAINTAINERCLEANFILES = Makefile.in +INCLUDES = -I. -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/lib/include @FREETYPE_CFLAGS@ @PIXMAN_CFLAGS@ @SDL_CFLAGS@ @EINA_CFLAGS@ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@SOFTWARE_SDL_SOURCES = \ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@evas_engine.c \ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@evas_engine.h + +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@includes_HEADERS = Evas_Engine_SDL_16.h +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_16_sdl/$(MODULE_ARCH) +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_SOURCES = $(SOFTWARE_SDL_SOURCES) +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_LIBADD = @EINA_LIBS@ @SDL_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_LDFLAGS = -no-undefined -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@noinst_LTLIBRARIES = libevas_engine_software_16_sdl.la +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@libevas_engine_software_16_sdl_la_SOURCES = $(SOFTWARE_SDL_SOURCES) +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@libevas_engine_software_16_sdl_la_LIBADD = @SDL_LIBS@ +EXTRA_DIST = \ +evas_engine.c \ +evas_engine.h \ +Evas_Engine_SDL_16.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/modules/engines/software_16_sdl/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/modules/engines/software_16_sdl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_16_sdl.la: $(libevas_engine_software_16_sdl_la_OBJECTS) $(libevas_engine_software_16_sdl_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_software_16_sdl_la_rpath) $(libevas_engine_software_16_sdl_la_OBJECTS) $(libevas_engine_software_16_sdl_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_16_sdl/evas_engine.c b/libraries/evas/src/modules/engines/software_16_sdl/evas_engine.c new file mode 100644 index 0000000..02f9341 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_sdl/evas_engine.c @@ -0,0 +1,1337 @@ +#include +#include +#include +#include +#include +#include + +#include "evas_common.h"/* Also includes international specific stuff */ +#include "evas_engine.h" +int _evas_engine_soft16_sdl_log_dom = -1; + +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +static Engine_Image_Entry *_sdl16_image_alloc (void); +static void _sdl16_image_delete (Engine_Image_Entry *eim); + +static int _sdl16_image_constructor (Engine_Image_Entry *ie, void* data); +static void _sdl16_image_destructor (Engine_Image_Entry *eim); + +static void _sdl16_image_dirty_region(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h); + +static int _sdl16_image_dirty (Engine_Image_Entry *dst, const Engine_Image_Entry *src); + +static int _sdl16_image_size_set (Engine_Image_Entry *dst, const Engine_Image_Entry *src); + +static int _sdl16_image_update_data (Engine_Image_Entry* dst, void* engine_data); + +static void _sdl16_image_load (Engine_Image_Entry *eim, const Image_Entry* im); +static int _sdl16_image_mem_size_get(Engine_Image_Entry *eim); + +#ifdef DEBUG_SDL +static void _sdl16_image_debug (const char* context, Engine_Image_Entry* im); +#endif + +static const Evas_Cache_Engine_Image_Func _sdl16_cache_engine_image_cb = { + NULL /* key */, + _sdl16_image_alloc /* alloc */, + _sdl16_image_delete /* dealloc */, + _sdl16_image_constructor /* constructor */, + _sdl16_image_destructor /* destructor */, + _sdl16_image_dirty_region /* dirty_region */, + _sdl16_image_dirty /* dirty */, + _sdl16_image_size_set /* size_set */, + _sdl16_image_update_data /* update_data */, + _sdl16_image_load /* load */, + _sdl16_image_mem_size_get /* mem_size_get */, +#ifdef DEBUG_SDL /* debug */ + _sdl16_image_debug +#else + NULL +#endif +}; + +#define _SDL_UPDATE_PIXELS(EIM) \ + ((Soft16_Image *) EIM->cache_entry.src)->pixels = EIM->surface->pixels; + +#define RMASK565 0xf800 +#define GMASK565 0x07e0 +#define BMASK565 0x001f +#define AMASK565 0x0000 + +/* engine api this module provides */ +static void * +evas_engine_sdl16_info(Evas *e __UNUSED__) +{ + Evas_Engine_Info_SDL_16 *info; + info = calloc(1, sizeof(Evas_Engine_Info_SDL_16)); + if (!info) return NULL; + info->magic.magic = rand(); + return info; +} + +static void +evas_engine_sdl16_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_SDL_16 *in; + in = (Evas_Engine_Info_SDL_16 *)info; + free(in); +} + +static void +_tmp_out_alloc(Render_Engine *re) +{ + Tilebuf_Rect *r; + unsigned int w = 0, h = 0; + + EINA_INLIST_FOREACH(re->rects, r) + { + if (r->w > (int)w) w = r->w; + if (r->h > (int)h) h = r->h; + } + + if (re->tmp_out) + { + if ((re->tmp_out->cache_entry.w < w) || (re->tmp_out->cache_entry.h < h)) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } + } + + if (!re->tmp_out) + { + Soft16_Image *im; + + im = (Soft16_Image *) evas_cache_image_empty(evas_common_soft16_image_cache_get()); + im->cache_entry.flags.alpha = 0; + evas_cache_image_surface_alloc(&im->cache_entry, w, h); + + re->tmp_out = im; + } +} + +static void* +_sdl16_output_setup(int w, int h, int rotation, int fullscreen, int noframe, int hwsurface) +{ + Render_Engine *re; + SDL_Surface *surface; + + re = calloc(1, sizeof(Render_Engine)); + if (!re) + return NULL; + /* if we haven't initialized - init (automatic abort if already done) */ + evas_common_cpu_init(); + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + evas_common_soft16_image_init(); + + if (w <= 0) w = 640; + if (h <= 0) h = 480; + + re->cache = evas_cache_engine_image_init(&_sdl16_cache_engine_image_cb, evas_common_soft16_image_cache_get()); + if (!re->cache) + { + ERR("Evas_Cache_Engine_Image allocation failed!"); + free(re); + return NULL; + } + + re->tb = evas_common_tilebuf_new(w, h); + /* in preliminary tests 16x16 gave highest framerates */ + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + re->w = w; + re->h = h; + re->rot = rotation; + re->flags.hwsurface = hwsurface; + re->flags.fullscreen = fullscreen; + re->flags.noframe = noframe; + re->flags.end = 0; + + re->update_rects_count = 0; + re->update_rects_limit = 0; + re->update_rects = NULL; + + surface = SDL_SetVideoMode(w, h, 16, + (hwsurface ? SDL_HWSURFACE : SDL_SWSURFACE) + | (fullscreen ? SDL_FULLSCREEN : 0) + | (noframe ? SDL_NOFRAME : 0)); + if (!surface) + { + ERR("SDL_SetVideoMode [ %i x %i x 16 ] failed", w, h); + evas_cache_engine_image_shutdown(re->cache); + free(re); + return NULL; + } + + SDL_SetAlpha(surface, SDL_RLEACCEL, 0); + SDL_FillRect(surface, NULL, 0); + + re->soft16_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface); + if (!re->soft16_engine_image) + { + ERR("Soft16_Image allocation from SDL failed"); + evas_cache_engine_image_shutdown(re->cache); + free(re); + return NULL; + } + + return re; +} + + +static int +evas_engine_sdl16_setup(Evas *e, void *in) +{ + Evas_Engine_Info_SDL_16 *info = (Evas_Engine_Info_SDL_16 *) in; + + if (evas_output_method_get(e) != evas_render_method_lookup("software_16_sdl")) + return 0; + + SDL_Init(SDL_INIT_NOPARACHUTE); + + if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) + { + ERR("SDL_Init failed with %s", SDL_GetError()); + SDL_Quit(); + return 0; + } + + e->engine.data.output = _sdl16_output_setup(e->output.w, e->output.h, + info->info.rotation, + info->info.fullscreen, + info->info.noframe, + info->info.hwsurface); + if (!e->engine.data.output) + return 0; + + e->engine.func = &func; + e->engine.data.context = e->engine.func->context_new(e->engine.data.output); + + return 1; +} + +static void +evas_engine_sdl16_output_free(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (re->tb) evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + if (re->tmp_out) evas_cache_image_drop(&re->tmp_out->cache_entry); + if (re->soft16_engine_image) + evas_cache_engine_image_drop(&re->soft16_engine_image->cache_entry); + if (re->cache) evas_cache_engine_image_shutdown(re->cache); + + if (re->update_rects) + free(re->update_rects); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); + evas_common_soft16_image_shutdown(); + + SDL_QuitSubSystem(SDL_INIT_VIDEO); +} + +static void +evas_engine_sdl16_output_resize(void *data, int w, int h) +{ + Render_Engine *re = data; + SDL_Surface *surface; + + if ((re->tb->outbuf_w == w) && (re->tb->outbuf_h == h)) return; + + evas_cache_engine_image_drop(&re->soft16_engine_image->cache_entry); + + evas_common_tilebuf_free(re->tb); + re->w = w; + re->h = h; + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + + surface = SDL_SetVideoMode(w, h, 16, + (re->flags.hwsurface ? SDL_HWSURFACE : SDL_SWSURFACE) + | (re->flags.fullscreen ? SDL_FULLSCREEN : 0) + | (re->flags.noframe ? SDL_NOFRAME : 0)); + if (!surface) + { + ERR("Unable to change the resolution to : %ix%i", w, h); + exit(-1); + } + re->soft16_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface); + if (!re->soft16_engine_image) + { + ERR("RGBA_Image allocation from SDL failed"); + exit(-1); + } + + SDL_FillRect(surface, NULL, 0); + + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } +} + +static void +evas_engine_sdl16_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +evas_engine_sdl16_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +evas_engine_sdl16_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +evas_engine_sdl16_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +} + +static void * +evas_engine_sdl16_output_redraws_next_update_get(void *data, + int *x, int *y, int *w, int *h, + int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re = data; + Tilebuf_Rect *tb_rect; + SDL_Rect rect; + + if (re->flags.end) + { + re->flags.end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + re->cur_rect = re->rects; + if (re->rot != 0) _tmp_out_alloc(re); /* grows if required */ + } + + if (!re->cur_rect) + { + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + return NULL; + } + + tb_rect = re->cur_rect; + *cx = *x = tb_rect->x; + *cy = *y = tb_rect->y; + *cw = *w = tb_rect->w; + *ch = *h = tb_rect->h; + re->cur_rect = (Tilebuf_Rect *)((EINA_INLIST_GET(re->cur_rect))->next); + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->flags.end = 1; + } + + if (re->rot != 0) + { + *cx = 0; + *cy = 0; + } + + rect.x = *x; + rect.y = *y; + rect.w = *w; + rect.h = *h; + + /* Return the "fake" surface so it is passed to the drawing routines. */ + return re->soft16_engine_image; +} + +static void +_blit_rot_90(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + (out_x + + (w + out_y - 1) * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr -= dst->stride; + } + sp += src->stride; + dp++; + } +} + +static void +_blit_rot_180(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + ((w + out_x - 1) + + (h + out_y - 1) * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr--; + } + sp += src->stride; + dp -= dst->stride; + } +} + +static void +_blit_rot_270(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + ((h + out_x - 1) + + out_y * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr += dst->stride; + } + sp += src->stride; + dp--; + } +} + +static void +_tmp_out_process(Render_Engine *re, int out_x, int out_y, int w, int h) +{ + Soft16_Image *d, *s; + + d = (Soft16_Image *) re->soft16_engine_image->cache_entry.src; + s = re->tmp_out; + + if ((w < 1) || (h < 1) || + (out_x >= (int)d->cache_entry.w) || (out_y >= (int)d->cache_entry.h)) + return; + + if (re->rot == 90) + _blit_rot_90(d, s, out_x, out_y, w, h); + else if (re->rot == 180) + _blit_rot_180(d, s, out_x, out_y, w, h); + else if (re->rot == 270) + _blit_rot_270(d, s, out_x, out_y, w, h); +} + +static void +evas_engine_sdl16_output_redraws_next_update_push(void *data, void *surface __UNUSED__, + int x, int y, int w, int h) +{ + Render_Engine *re = data; + SDL_Rect rect; + + if (re->update_rects_count + 1 > re->update_rects_limit) + { + re->update_rects_limit += 8; + re->update_rects = realloc(re->update_rects, sizeof (SDL_Rect) * re->update_rects_limit); + } + + rect.x = x; + rect.y = y; + rect.w = w; + rect.h = h; + + switch (re->rot) + { + case 0: + break; + case 90: + rect.x = y; + rect.y = re->w - w - x; + rect.w = h; + rect.h = w; + break; + case 180: + rect.x = re->w - w - x; + rect.y = re->h - h - y; + break; + case 270: + rect.x = re->h - h - y; + rect.y = x; + rect.w = h; + rect.h = w; + break; + default: + abort(); + } + + re->update_rects[re->update_rects_count] = rect; + + if (re->rot != 0) + _tmp_out_process(re, rect.x, rect.y, w, h); + + ++re->update_rects_count; + + evas_common_cpu_end_opt(); +} + +static void +evas_engine_sdl16_output_flush(void *data) +{ + Render_Engine *re = data; + + if (re->update_rects_count > 0) + SDL_UpdateRects(re->soft16_engine_image->surface, re->update_rects_count, re->update_rects); + + re->update_rects_count = 0; +} + +static void +evas_engine_sdl16_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } +} + +static void* +evas_engine_sdl16_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + Render_Engine* re = (Render_Engine*) data;; + + *error = 0; + return evas_cache_engine_image_request(re->cache, file, key, lo, NULL, error); +} + +static int +evas_engine_sdl16_image_alpha_get(void *data __UNUSED__, void *image) +{ + SDL_Engine_Image_Entry *eim = image; + Soft16_Image *im; + + if (!eim) return 1; + im = (Soft16_Image *) eim->cache_entry.src; + switch (eim->cache_entry.src->space) + { + case EVAS_COLORSPACE_ARGB8888: + if (im->cache_entry.flags.alpha) return 1; + default: + break; + } + return 0; +} + +static void +evas_engine_sdl16_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) +{ + SDL_Engine_Image_Entry *eim; + + eim = image; + if (w) *w = eim->cache_entry.src->w; + if (h) *h = eim->cache_entry.src->h; +} + +static int +evas_engine_sdl16_image_colorspace_get(void *data __UNUSED__, void *image __UNUSED__) +{ + SDL_Engine_Image_Entry *eim = image; + + if (!eim) return EVAS_COLORSPACE_RGB565_A5P; + return eim->cache_entry.src->space; +} + +static void +evas_engine_sdl16_image_colorspace_set(void *data __UNUSED__, void *image __UNUSED__, int cspace __UNUSED__) +{ + SDL_Engine_Image_Entry *eim = image; + + if (!eim) return; + if (eim->cache_entry.src->space == cspace) return; + + evas_cache_engine_image_colorspace(&eim->cache_entry, cspace, NULL); +} + +static void* +evas_engine_sdl16_image_new_from_copied_data(void *data, + int w, int h, + DATA32* image_data, + int alpha, int cspace) +{ + Render_Engine *re = data; + + if (cspace != EVAS_COLORSPACE_RGB565_A5P) + { + WRN("Unsupported colorspace %d in %s() (%s:%d)", + cspace, __FUNCTION__, __FILE__, __LINE__); + return NULL; + } + + WRN("s image_data: %p", image_data); + + return evas_cache_engine_image_copied_data(re->cache, + w, h, + image_data, + alpha, cspace, NULL); +} + +static void* +evas_engine_sdl16_image_new_from_data(void *data, int w, int h, DATA32* image_data, int alpha, int cspace) +{ + Render_Engine *re = data; + + if (cspace != EVAS_COLORSPACE_RGB565_A5P) + { + WRN("Unsupported colorspace %d in %s() (%s:%d)", + cspace, __FUNCTION__, __FILE__, __LINE__); + return NULL; + } + + return evas_cache_engine_image_data(re->cache, + w, h, + image_data, + alpha, cspace, NULL); +} + +static void +evas_engine_sdl16_image_free(void *data __UNUSED__, void *image) +{ + SDL_Engine_Image_Entry *eim = image; + + evas_cache_engine_image_drop(&eim->cache_entry); +} + +static void* +evas_engine_sdl16_image_size_set(void *data __UNUSED__, void *image, int w, int h) +{ + SDL_Engine_Image_Entry *eim = image; + + return evas_cache_engine_image_size_set(&eim->cache_entry, w, h); +} + +static void* +evas_engine_sdl16_image_dirty_region(void *data __UNUSED__, + void *image, + int x, int y, int w, int h) +{ + SDL_Engine_Image_Entry *eim = image; + + return evas_cache_engine_image_dirty(&eim->cache_entry, x, y, w, h); +} + +static void* +evas_engine_sdl16_image_data_get(void *data __UNUSED__, void *image, + int to_write, DATA32** image_data, int *err) +{ + SDL_Engine_Image_Entry *eim = image; + Soft16_Image *im; + int error; + + if (!eim) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_GENERIC; + return NULL; + } + im = (Soft16_Image *) eim->cache_entry.src; + + if (to_write) + eim = (SDL_Engine_Image_Entry *) evas_cache_engine_image_dirty(&eim->cache_entry, + 0, 0, eim->cache_entry.src->w, eim->cache_entry.src->h); + + error = evas_cache_image_load_data(&im->cache_entry); + /* FIXME: Handle colorspace conversion correctly. */ + if (image_data) *image_data = (DATA32 *) im->pixels; + + if (err) *err = error; + return eim; +} + +static void* +evas_engine_sdl16_image_data_put(void *data, void *image, DATA32* image_data) +{ + SDL_Engine_Image_Entry *eim = image; + SDL_Engine_Image_Entry *eim_new; + Render_Engine *re = data; + Soft16_Image *im; + + if (!eim) return NULL; + im = (Soft16_Image *) eim->cache_entry.src; + + /* FIXME: Handle colorspace conversion correctly. */ + if ((DATA16 *) image_data == im->pixels) return eim; + + eim_new = (SDL_Engine_Image_Entry *) evas_cache_engine_image_data(re->cache, + eim->cache_entry.w, eim->cache_entry.h, + image_data, + func.image_alpha_get(data, eim), + func.image_colorspace_get(data, eim), + NULL); + evas_cache_engine_image_drop(&eim->cache_entry); + + return eim_new; +} + +static void +evas_engine_sdl16_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) +{ + SDL_Engine_Image_Entry *eim = image; + Soft16_Image *im; + + if (!eim) return ; + im = (Soft16_Image *) eim->cache_entry.src; + if (!im) return ; + evas_cache_image_preload_data(&im->cache_entry, target); +} + +static void +evas_engine_sdl16_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) +{ + SDL_Engine_Image_Entry *eim = image; + Soft16_Image *im; + + if (!eim) return ; + im = (Soft16_Image *) eim->cache_entry.src; + if (!im) return ; + evas_cache_image_preload_cancel(&im->cache_entry, target); +} + +static void* +evas_engine_sdl16_image_alpha_set(void *data __UNUSED__, void *image, int has_alpha) +{ + SDL_Engine_Image_Entry *eim = image; + Soft16_Image *im; + + if (!eim) return NULL; + + im = (Soft16_Image *) eim->cache_entry.src; + + if (im->cache_entry.flags.alpha == has_alpha) return eim; + + //eim = (SDL_Engine_Image_Entry *) evas_cache_engine_image_alone(&eim->cache_entry, NULL); + //im = (Soft16_Image *) eim->cache_entry.src; + + im->cache_entry.flags.alpha = has_alpha; + eim = (SDL_Engine_Image_Entry *) evas_cache_engine_image_dirty(&eim->cache_entry, 0, 0, eim->cache_entry.w, eim->cache_entry.h); + + return eim; +} + +static void* +evas_engine_sdl16_image_border_set(void *data __UNUSED__, void *image, int l __UNUSED__, int r __UNUSED__, int t __UNUSED__, int b __UNUSED__) +{ + return image; +} + +static void +evas_engine_sdl16_image_border_get(void *data __UNUSED__, void *image __UNUSED__, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__) +{ + /* FIXME: need to know what evas expect from this call */ +} + +static void +evas_engine_sdl16_image_draw(void *data __UNUSED__, void *context, void *surface, void *image, + int src_region_x, int src_region_y, int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, + int smooth) +{ + SDL_Engine_Image_Entry *eim = image; + SDL_Engine_Image_Entry *dst = surface; + int mustlock_im = 0; + int mustlock_dst = 0; + + evas_cache_engine_image_load_data(&eim->cache_entry); + + /* Fallback to software method */ + if (SDL_MUSTLOCK(dst->surface)) + { + mustlock_dst = 1; + SDL_LockSurface(dst->surface); + _SDL_UPDATE_PIXELS(dst); + } + + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + + evas_common_soft16_image_draw((Soft16_Image *) eim->cache_entry.src, + (Soft16_Image *) dst->cache_entry.src, + context, + src_region_x, src_region_y, src_region_w, src_region_h, + dst_region_x, dst_region_y, dst_region_w, dst_region_h, + smooth); + + evas_common_cpu_end_opt (); + if (mustlock_im) + SDL_UnlockSurface(eim->surface); + + if (mustlock_dst) + SDL_UnlockSurface(dst->surface); +} + +static void +evas_engine_sdl16_image_map_draw(void *data __UNUSED__, void *context __UNUSED__, void *surface __UNUSED__, void *image __UNUSED__, int npoints __UNUSED__, RGBA_Map_Point *p __UNUSED__, int smooth __UNUSED__, int level __UNUSED__) +{ +} + +static void +evas_engine_sdl16_image_scale_hint_set(void *data __UNUSED__, void *image __UNUSED__, int hint __UNUSED__) +{ +} + +static int +evas_engine_sdl16_image_scale_hint_get(void *data __UNUSED__, void *image __UNUSED__) +{ + return EVAS_IMAGE_SCALE_HINT_NONE; +} + + +static void +evas_engine_sdl16_image_cache_flush(void *data) +{ + Render_Engine *re = (Render_Engine*) data; + int size; + + size = evas_cache_engine_image_get(re->cache); + evas_cache_engine_image_set(re->cache, 0); + evas_cache_engine_image_set(re->cache, size); +} + +static void +evas_engine_sdl16_image_cache_set(void *data, int bytes) +{ + Render_Engine *re = (Render_Engine*) data; + + evas_cache_engine_image_set(re->cache, bytes); +} + +static int +evas_engine_sdl16_image_cache_get(void *data) +{ + Render_Engine *re = (Render_Engine*) data; + + return evas_cache_engine_image_get(re->cache); +} + +static char* +evas_engine_sdl16_image_comment_get(void *data __UNUSED__, void *image __UNUSED__, char *key __UNUSED__) +{ + return NULL; +} + +static char* +evas_engine_sdl16_image_format_get(void *data __UNUSED__, void *image __UNUSED__) +{ + /* FIXME: need to know what evas expect from this call */ + return NULL; +} + +static void +evas_engine_sdl16_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props) +{ + static RGBA_Image *im = NULL; + SDL_Engine_Image_Entry *eim = surface; + Soft16_Image *dst = (Soft16_Image *) eim->cache_entry.src; + int mustlock_im = 0; + + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + evas_common_draw_context_font_ext_set(context, + dst, + evas_common_soft16_font_glyph_new, + evas_common_soft16_font_glyph_free, + evas_common_soft16_font_glyph_draw); + evas_common_font_draw((RGBA_Image *) eim->cache_entry.src, context, font, x, y, intl_props); + evas_common_draw_context_font_ext_set(context, + NULL, + NULL, + NULL, + NULL); + + if (mustlock_im) + SDL_UnlockSurface(eim->surface); +} + +static void +evas_engine_sdl16_line_draw(void *data __UNUSED__, void *context, void *surface, int x1, int y1, int x2, int y2) +{ + SDL_Engine_Image_Entry *eim = surface; + int mustlock_im = 0; + + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + + evas_common_soft16_line_draw((Soft16_Image *) eim->cache_entry.src, + context, + x1, y1, x2, y2); + evas_common_cpu_end_opt(); + + if (mustlock_im) + SDL_UnlockSurface(eim->surface); +} + +static void +evas_engine_sdl16_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x, int y, int w, int h) +{ + SDL_Engine_Image_Entry *eim = surface; +#if ENGINE_SDL_PRIMITIVE + RGBA_Draw_Context *dc = context; +#endif + Soft16_Image *im; + int mustlock_im = 0; + +#if ENGINE_SDL_PRIMITIVE + if (A_VAL(&dc->col.col) != 0x00) + { + if (A_VAL(&dc->col.col) != 0xFF) + { +#endif + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + + im = (Soft16_Image *) eim->cache_entry.src; + + evas_common_soft16_rectangle_draw(im, context, x, y, w, h); + evas_common_cpu_end_opt(); + + if (mustlock_im) + SDL_UnlockSurface(eim->surface); +#if ENGINE_SDL_PRIMITIVE + } + else + { + SDL_Rect dstrect; + + if (dc->clip.use) + { + SDL_Rect cliprect; + + cliprect.x = dc->clip.x; + cliprect.y = dc->clip.y; + cliprect.w = dc->clip.w; + cliprect.h = dc->clip.h; + + SDL_SetClipRect(eim->surface, &cliprect); + } + + dstrect.x = x; + dstrect.y = y; + dstrect.w = w; + dstrect.h = h; + + SDL_FillRect(eim->surface, &dstrect, SDL_MapRGBA(eim->surface->format, R_VAL(&dc->col.col), G_VAL(&dc->col.col), B_VAL(&dc->col.col), 0xFF)); + + if (dc->clip.use) + SDL_SetClipRect(eim->surface, NULL); + } + } +#endif +} + +static void +evas_engine_sdl16_polygon_draw(void *data __UNUSED__, void *context, void *surface, void *polygon, int x, int y) +{ + SDL_Engine_Image_Entry *eim = surface; + int mustlock_im = 0; + + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + + evas_common_soft16_polygon_draw((Soft16_Image *) eim->cache_entry.src, context, polygon, x, y); + evas_common_cpu_end_opt(); + + if (mustlock_im) + SDL_UnlockSurface(eim->surface); +} + +static void +evas_engine_sdl16_image_stride_get(void *data __UNUSED__, void *image, int *stride) +{ + SDL_Engine_Image_Entry *eim = image; + + if (stride) *stride = 0; + if (!image) return; + if (stride) *stride = ((Soft16_Image*) eim->cache_entry.src)->stride; +} + +static Eina_Bool +evas_engine_sdl16_canvas_alpha_get(void *data __UNUSED__, void *context __UNUSED__) +{ + return EINA_FALSE; +} + +/* module advertising code */ +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_16")) return 0; + _evas_engine_soft16_sdl_log_dom = eina_log_domain_register + ("evas-software_16_sdl", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_soft16_sdl_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, evas_engine_sdl16_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + ORD(image_load); + ORD(image_alpha_get); + ORD(image_size_get); + ORD(image_colorspace_get); + ORD(image_colorspace_set); + ORD(image_new_from_copied_data); + ORD(image_new_from_data); + ORD(image_free); + ORD(image_size_set); + ORD(image_dirty_region); + ORD(image_data_get); + ORD(image_data_put); + ORD(image_data_preload_request); + ORD(image_data_preload_cancel); + ORD(image_alpha_set); + ORD(image_border_set); + ORD(image_border_get); + ORD(image_draw); + ORD(image_map_draw); + ORD(image_cache_flush); + ORD(image_cache_set); + ORD(image_cache_get); + ORD(image_comment_get); + ORD(image_format_get); + ORD(image_stride_get); + ORD(font_draw); + ORD(line_draw); + ORD(rectangle_draw); + ORD(polygon_draw); + + ORD(image_scale_hint_set); + ORD(image_scale_hint_get); + + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_soft16_sdl_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "software_16_sdl", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_16_sdl); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_SDL +EVAS_EINA_MODULE_DEFINE(engine, software_16_sdl); +#endif + +static Engine_Image_Entry* +_sdl16_image_alloc(void) +{ + SDL_Engine_Image_Entry *new; + + new = calloc(1, sizeof (SDL_Engine_Image_Entry)); + + return (Engine_Image_Entry *) new; +} + +static void +_sdl16_image_delete(Engine_Image_Entry *eim) +{ + free(eim); +} + +static int +_sdl16_image_constructor(Engine_Image_Entry *ie, void* data __UNUSED__) +{ + SDL_Surface *sdl = NULL; + SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) ie; + Soft16_Image *im; + + im = (Soft16_Image *) ie->src; + + if (im) + { + evas_cache_image_load_data(&im->cache_entry); + + if (im->pixels) + { + /* FIXME: Take care of CSPACE */ + sdl = SDL_CreateRGBSurfaceFrom(im->pixels, + ie->w, ie->h, + 16, ie->w * 2, + RMASK565, GMASK565, BMASK565, AMASK565); + eim->surface = sdl; + eim->flags.engine_surface = 0; + } + } + + return EVAS_LOAD_ERROR_NONE; +} + +static void +_sdl16_image_destructor(Engine_Image_Entry *eim) +{ + SDL_Engine_Image_Entry *seie = (SDL_Engine_Image_Entry *) eim; + + if (seie->surface && !seie->flags.engine_surface) + SDL_FreeSurface(seie->surface); + seie->surface = NULL; +} + +static void +_sdl16_image_dirty_region(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h) +{ + SDL_Engine_Image_Entry *dst; + RGBA_Image *im; + + dst = (SDL_Engine_Image_Entry *) eim; + + SDL_UpdateRect(dst->surface, x, y, w, h); + + im = (RGBA_Image *)eim->src; + im->flags |= RGBA_IMAGE_IS_DIRTY; +} + +static int +_sdl16_image_dirty(Engine_Image_Entry *dst, const Engine_Image_Entry *src __UNUSED__) +{ + SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) dst; + SDL_Surface *sdl = NULL; + Soft16_Image *im; + + im = (Soft16_Image *) dst->src; + + /* FIXME: Take care of CSPACE */ + sdl = SDL_CreateRGBSurfaceFrom(im->pixels, + dst->w, dst->h, + 16, dst->w * 2, + RMASK565, GMASK565, BMASK565, AMASK565); + eim->surface = sdl; + eim->flags.engine_surface = 0; + + return 0; +} + +static int +_sdl16_image_size_set(Engine_Image_Entry *dst, const Engine_Image_Entry *src __UNUSED__) +{ + SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) dst; + SDL_Surface *sdl; + Soft16_Image *im; + + im = (Soft16_Image *) dst->src; + + /* FIXME: handle im == NULL */ + sdl = SDL_CreateRGBSurfaceFrom(im->pixels, + dst->w, dst->h, + 16, dst->w * 2, + RMASK565, GMASK565, BMASK565, AMASK565); + + eim->surface = sdl; + + return 0; +} + +static int +_sdl16_image_update_data(Engine_Image_Entry* dst, void* engine_data) +{ + SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) dst; + SDL_Surface *sdl = NULL; + Soft16_Image *im; + + im = (Soft16_Image *) dst->src; + + if (engine_data) + { + sdl = engine_data; + + if (im) + { + im->pixels = sdl->pixels; + im->stride = sdl->pitch / 2; + im->flags.free_pixels = 0; +/* im->alpha = calloc(1, sizeof (DATA8) * _calc_stride(sdl->w) * sdl->h); */ +/* im->flags.free_alpha = 0; */ +/* im->flags.have_alpha = 1; */ + im->alpha = NULL; + im->flags.free_alpha = 0; + im->cache_entry.flags.alpha = 0; + + dst->src->w = sdl->w; + dst->src->h = sdl->h; + } + dst->w = sdl->w; + dst->h = sdl->h; + } + else + { + SDL_FreeSurface(eim->surface); + /* FIXME: Take care of CSPACE */ + sdl = SDL_CreateRGBSurfaceFrom(im->pixels, + dst->w, dst->h, + 16, dst->w * 2, + RMASK565, GMASK565, BMASK565, AMASK565); + } + + eim->surface = sdl; + + return 0; +} + +static void +_sdl16_image_load(Engine_Image_Entry *eim, const Image_Entry* ie_im) +{ + SDL_Engine_Image_Entry *load = (SDL_Engine_Image_Entry *) eim; + SDL_Surface *sdl; + + if (!load->surface) + { + Soft16_Image *im; + + im = (Soft16_Image *) ie_im; + + sdl = SDL_CreateRGBSurfaceFrom(im->pixels, + eim->w, eim->h, + 16, eim->w * 2, + RMASK565, GMASK565, BMASK565, AMASK565); + load->surface = sdl; + } +} + +static int +_sdl16_image_mem_size_get(Engine_Image_Entry *eim) +{ + SDL_Engine_Image_Entry *seie = (SDL_Engine_Image_Entry *) eim; + int size = 0; + + /* FIXME: Count surface size. */ + if (seie->surface) + size = sizeof (SDL_Surface) + sizeof (SDL_PixelFormat); + + return size; +} + +#ifdef DEBUG_SDL +static void +_sdl16_image_debug(const char* context, Engine_Image_Entry* im) +{ +} +#endif diff --git a/libraries/evas/src/modules/engines/software_16_sdl/evas_engine.h b/libraries/evas/src/modules/engines/software_16_sdl/evas_engine.h new file mode 100644 index 0000000..a1b0ee0 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_sdl/evas_engine.h @@ -0,0 +1,79 @@ +#ifndef EVAS_ENGINE_SDL_16_H +#define EVAS_ENGINE_SDL_16_H + +#include "evas_common.h" +#include "evas_private.h" +#include "evas_common_soft16.h" +#include "Evas_Engine_SDL_16.h" +extern int _evas_engine_soft16_sdl_log_dom ; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft16_sdl_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft16_sdl_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft16_sdl_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft16_sdl_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft16_sdl_log_dom, __VA_ARGS__) + +typedef struct _SDL_Engine_Image_Entry SDL_Engine_Image_Entry; +struct _SDL_Engine_Image_Entry +{ + Engine_Image_Entry cache_entry; + + SDL_Surface *surface; + + struct + { + unsigned int engine_surface : 1; + } flags; +}; + + +typedef struct _Render_Engine Render_Engine; +struct _Render_Engine +{ + SDL_Engine_Image_Entry *soft16_engine_image; + + Evas_Cache_Engine_Image *cache; + + Soft16_Image *tmp_out; + + int w; + int h; + int rot; + + Tilebuf *tb; + Tilebuf_Rect *rects; + Tilebuf_Rect *cur_rect; + + SDL_Rect *update_rects; + int update_rects_count; + int update_rects_limit; + + struct + { + unsigned int fullscreen : 1; + unsigned int noframe : 1; + unsigned int alpha : 1; + unsigned int hwsurface : 1; + unsigned int end : 1; + } flags; +}; + +#endif diff --git a/libraries/evas/src/modules/engines/software_16_wince/Evas_Engine_Software_16_WinCE.h b/libraries/evas/src/modules/engines/software_16_wince/Evas_Engine_Software_16_WinCE.h new file mode 100644 index 0000000..e94b7c2 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_wince/Evas_Engine_Software_16_WinCE.h @@ -0,0 +1,35 @@ +#ifndef __EVAS_ENGINE_SOFTWARE_16_WINCE_H__ +#define __EVAS_ENGINE_SOFTWARE_16_WINCE_H__ + + +#include + + +typedef struct _Evas_Engine_Info_Software_16_WinCE Evas_Engine_Info_Software_16_WinCE; + +struct _Evas_Engine_Info_Software_16_WinCE +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + struct { + HWND window; + int width; + int height; + int backend; /* 0: auto, 1: raw, 2: gapi, 3: ddraw, 4: gdi */ + int rotation; + unsigned int fullscreen : 1; + } info; + /* engine specific function calls to query stuff about messages */ + struct { + int (*suspend) (int backend); + int (*resume) (int backend); + } func; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; + + +#endif /* __EVAS_ENGINE_SOFTWARE_16_WINCE_H__ */ diff --git a/libraries/evas/src/modules/engines/software_16_wince/Makefile.am b/libraries/evas/src/modules/engines/software_16_wince/Makefile.am new file mode 100644 index 0000000..7f0c666 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_wince/Makefile.am @@ -0,0 +1,52 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +-I$(top_srcdir)/src/modules/engines/software_16 \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_software_16_wince_cflags@ + +if BUILD_ENGINE_SOFTWARE_16_WINCE + +SOFTWARE_16_WINCE_SOURCE = \ +evas_engine.c \ +evas_wince_ddraw_buffer.cpp \ +evas_wince_fb_buffer.c \ +evas_wince_gapi_buffer.c \ +evas_wince_gdi_buffer.c + +SOFTWARE_16_WINCE_LIBADD = @evas_engine_software_16_wince_libs@ + + +includes_HEADERS = Evas_Engine_Software_16_WinCE.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_SOFTWARE_16_WINCE + +pkgdir = $(libdir)/evas/modules/engines/software_16_wince/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(SOFTWARE_16_WINCE_SOURCE) +module_la_CFLAGS = @WIN32_CFLAGS@ +module_la_CXXFLAGS = -fno-rtti -fno-exceptions +module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la $(SOFTWARE_16_WINCE_LIBADD) +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_software_16_wince.la + +libevas_engine_software_16_wince_la_SOURCES = $(SOFTWARE_16_WINCE_SOURCE) +libevas_engine_software_16_wince_la_LIBADD = $(SOFTWARE_16_WINCE_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/software_16_wince/Makefile.in b/libraries/evas/src/modules/engines/software_16_wince/Makefile.in new file mode 100644 index 0000000..571891e --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_wince/Makefile.in @@ -0,0 +1,898 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/software_16_wince +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@libevas_engine_software_16_wince_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_software_16_wince_la_SOURCES_DIST = evas_engine.c \ + evas_wince_ddraw_buffer.cpp evas_wince_fb_buffer.c \ + evas_wince_gapi_buffer.c evas_wince_gdi_buffer.c +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@ evas_wince_ddraw_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@ evas_wince_fb_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@ evas_wince_gapi_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@ evas_wince_gdi_buffer.lo +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am_libevas_engine_software_16_wince_la_OBJECTS = $(am__objects_1) +libevas_engine_software_16_wince_la_OBJECTS = \ + $(am_libevas_engine_software_16_wince_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am_libevas_engine_software_16_wince_la_rpath = +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@ $(am__DEPENDENCIES_1) +am__module_la_SOURCES_DIST = evas_engine.c evas_wince_ddraw_buffer.cpp \ + evas_wince_fb_buffer.c evas_wince_gapi_buffer.c \ + evas_wince_gdi_buffer.c +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@am__objects_2 = \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@ module_la-evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@ module_la-evas_wince_ddraw_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@ module_la-evas_wince_fb_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@ module_la-evas_wince_gapi_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@ module_la-evas_wince_gdi_buffer.lo +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(module_la_CXXFLAGS) $(CXXFLAGS) $(module_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_16_wince_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = \ + $(am__libevas_engine_software_16_wince_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Software_16_WinCE.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +-I$(top_srcdir)/src/modules/engines/software_16 \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_software_16_wince_cflags@ + +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@SOFTWARE_16_WINCE_SOURCE = \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@evas_engine.c \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@evas_wince_ddraw_buffer.cpp \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@evas_wince_fb_buffer.c \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@evas_wince_gapi_buffer.c \ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@evas_wince_gdi_buffer.c + +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@SOFTWARE_16_WINCE_LIBADD = @evas_engine_software_16_wince_libs@ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@includes_HEADERS = Evas_Engine_Software_16_WinCE.h +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_16_wince/$(MODULE_ARCH) +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@module_la_SOURCES = $(SOFTWARE_16_WINCE_SOURCE) +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@module_la_CFLAGS = @WIN32_CFLAGS@ +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@module_la_CXXFLAGS = -fno-rtti -fno-exceptions +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la $(SOFTWARE_16_WINCE_LIBADD) +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@noinst_LTLIBRARIES = libevas_engine_software_16_wince.la +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@libevas_engine_software_16_wince_la_SOURCES = $(SOFTWARE_16_WINCE_SOURCE) +@BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@libevas_engine_software_16_wince_la_LIBADD = $(SOFTWARE_16_WINCE_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_16_wince/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/software_16_wince/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_16_wince.la: $(libevas_engine_software_16_wince_la_OBJECTS) $(libevas_engine_software_16_wince_la_DEPENDENCIES) + $(AM_V_CXXLD)$(CXXLINK) $(am_libevas_engine_software_16_wince_la_rpath) $(libevas_engine_software_16_wince_la_OBJECTS) $(libevas_engine_software_16_wince_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CXXLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_wince_ddraw_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_wince_fb_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_wince_gapi_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_wince_gdi_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_wince_ddraw_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_wince_fb_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_wince_gapi_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_wince_gdi_buffer.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_wince_fb_buffer.lo: evas_wince_fb_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CFLAGS) $(CFLAGS) -MT module_la-evas_wince_fb_buffer.lo -MD -MP -MF $(DEPDIR)/module_la-evas_wince_fb_buffer.Tpo -c -o module_la-evas_wince_fb_buffer.lo `test -f 'evas_wince_fb_buffer.c' || echo '$(srcdir)/'`evas_wince_fb_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_wince_fb_buffer.Tpo $(DEPDIR)/module_la-evas_wince_fb_buffer.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_wince_fb_buffer.c' object='module_la-evas_wince_fb_buffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CFLAGS) $(CFLAGS) -c -o module_la-evas_wince_fb_buffer.lo `test -f 'evas_wince_fb_buffer.c' || echo '$(srcdir)/'`evas_wince_fb_buffer.c + +module_la-evas_wince_gapi_buffer.lo: evas_wince_gapi_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CFLAGS) $(CFLAGS) -MT module_la-evas_wince_gapi_buffer.lo -MD -MP -MF $(DEPDIR)/module_la-evas_wince_gapi_buffer.Tpo -c -o module_la-evas_wince_gapi_buffer.lo `test -f 'evas_wince_gapi_buffer.c' || echo '$(srcdir)/'`evas_wince_gapi_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_wince_gapi_buffer.Tpo $(DEPDIR)/module_la-evas_wince_gapi_buffer.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_wince_gapi_buffer.c' object='module_la-evas_wince_gapi_buffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CFLAGS) $(CFLAGS) -c -o module_la-evas_wince_gapi_buffer.lo `test -f 'evas_wince_gapi_buffer.c' || echo '$(srcdir)/'`evas_wince_gapi_buffer.c + +module_la-evas_wince_gdi_buffer.lo: evas_wince_gdi_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CFLAGS) $(CFLAGS) -MT module_la-evas_wince_gdi_buffer.lo -MD -MP -MF $(DEPDIR)/module_la-evas_wince_gdi_buffer.Tpo -c -o module_la-evas_wince_gdi_buffer.lo `test -f 'evas_wince_gdi_buffer.c' || echo '$(srcdir)/'`evas_wince_gdi_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_wince_gdi_buffer.Tpo $(DEPDIR)/module_la-evas_wince_gdi_buffer.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_wince_gdi_buffer.c' object='module_la-evas_wince_gdi_buffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CFLAGS) $(CFLAGS) -c -o module_la-evas_wince_gdi_buffer.lo `test -f 'evas_wince_gdi_buffer.c' || echo '$(srcdir)/'`evas_wince_gdi_buffer.c + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +module_la-evas_wince_ddraw_buffer.lo: evas_wince_ddraw_buffer.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_wince_ddraw_buffer.lo -MD -MP -MF $(DEPDIR)/module_la-evas_wince_ddraw_buffer.Tpo -c -o module_la-evas_wince_ddraw_buffer.lo `test -f 'evas_wince_ddraw_buffer.cpp' || echo '$(srcdir)/'`evas_wince_ddraw_buffer.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_wince_ddraw_buffer.Tpo $(DEPDIR)/module_la-evas_wince_ddraw_buffer.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_wince_ddraw_buffer.cpp' object='module_la-evas_wince_ddraw_buffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_wince_ddraw_buffer.lo `test -f 'evas_wince_ddraw_buffer.cpp' || echo '$(srcdir)/'`evas_wince_ddraw_buffer.cpp + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_16_wince/evas_engine.c b/libraries/evas/src/modules/engines/software_16_wince/evas_engine.c new file mode 100644 index 0000000..74d56e6 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_wince/evas_engine.c @@ -0,0 +1,770 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_engine.h" +#include "Evas_Engine_Software_16_WinCE.h" +#include "evas_common_soft16.h" + +int _evas_engine_soft16_wince_log_dom = -1; + +typedef enum +{ + EVAS_ENGINE_WINCE_FB, + EVAS_ENGINE_WINCE_GAPI, + EVAS_ENGINE_WINCE_DDRAW, + EVAS_ENGINE_WINCE_GDI +} Evas_Engine_WinCE_Backend; + + +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +/* engine struct data */ +typedef struct _Render_Engine Render_Engine; + +struct _Render_Engine +{ + Evas_Engine_WinCE_Backend backend; /* 1: raw, 2: gapi, 3: ddraw, 4: GDI */ + void *backend_priv; + void (*backend_shutdown)(void *priv); + FB_Output_Buffer *(*backend_output_buffer_new)(void *priv, + int width, + int height); + void (*backend_output_buffer_free)(FB_Output_Buffer *fbob); + void (*backend_output_buffer_paste)(FB_Output_Buffer *fbob); + void (*backend_surface_resize)(FB_Output_Buffer *fbob); + + int width; + int height; + int rotation; + Tilebuf *tb; + Tilebuf_Rect *rects; + Tilebuf_Rect *cur_rect; + FB_Output_Buffer *fbob; + Soft16_Image *tmp_out; /* used by indirect render, like rotation */ + HRGN clip_rects; + unsigned char end : 1; +}; + +/* prototypes we will use here */ + +static void *eng_info(Evas *e); +static void eng_info_free(Evas *e, void *info); +static int eng_setup(Evas *e, void *info); +static void eng_output_free(void *data); +static void eng_output_resize(void *data, int w, int h); +static void eng_output_tile_size_set(void *data, int w, int h); +static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h); +static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h); +static void eng_output_redraws_clear(void *data); +static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); +static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h); +static void eng_output_flush(void *data); +static void eng_output_idle_flush(void *data); + +static int +_suspend(int backend) +{ + switch (backend) + { + case 2: /* gapi */ + return evas_software_wince_gapi_suspend(); + default: /* other engines do not need it */ + return 0; + } +} + +static int +_resume(int backend) +{ + switch (backend) + { + case 2: /* gapi */ + return evas_software_wince_gapi_resume(); + default: /* other engines do not need it */ + return 0; + } +} + +/* engine api this module provides */ +static void * +eng_info(Evas *e) +{ + Evas_Engine_Info_Software_16_WinCE *info; + info = calloc(1, sizeof(Evas_Engine_Info_Software_16_WinCE)); + if (!info) return NULL; + info->magic.magic = rand(); + info->func.suspend = _suspend; + info->func.resume = _resume; + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; + e = NULL; +} + +static void +eng_info_free(Evas *e, void *info) +{ + Evas_Engine_Info_Software_16_WinCE *in; + in = (Evas_Engine_Info_Software_16_WinCE *)info; + free(in); +} + +static void +_tmp_out_alloc(Render_Engine *re) +{ + Tilebuf_Rect *r; + int w = 0, h = 0; + + EINA_INLIST_FOREACH(re->rects, r) + { + if (r->w > w) w = r->w; + if (r->h > h) h = r->h; + } + + if (re->tmp_out) + { + if ((re->tmp_out->cache_entry.w < w) || (re->tmp_out->cache_entry.h < h)) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } + } + + if (!re->tmp_out) + { + Soft16_Image *im; + + im = (Soft16_Image *) evas_cache_image_empty(evas_common_soft16_image_cache_get()); + im->cache_entry.flags.alpha = 0; + evas_cache_image_surface_alloc(&im->cache_entry, w, h); + + re->tmp_out = im; + } +} + + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_Software_16_WinCE *info; + + info = (Evas_Engine_Info_Software_16_WinCE *)in; + if (!e->engine.data.output) + { + /* do common routine init - we wil at least use it for core + * image loading and font loading/glyph rendering & placement */ + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + evas_common_soft16_image_init(); + + /* render engine specific data */ + re = calloc(1, sizeof(Render_Engine)); + if (!re) + return 0; + e->engine.data.output = re; + + switch(info->info.backend) + { + case 1: /* FB */ + re->backend = EVAS_ENGINE_WINCE_FB; + re->backend_priv = evas_software_wince_fb_init(info->info.window, info->info.width, info->info.height); + if (!re->backend_priv) + { + free(re); + return 0; + } + re->backend_shutdown = evas_software_wince_fb_shutdown; + re->backend_output_buffer_new = evas_software_wince_fb_output_buffer_new; + re->backend_output_buffer_free = evas_software_wince_fb_output_buffer_free; + re->backend_output_buffer_paste = evas_software_wince_fb_output_buffer_paste; + re->backend_surface_resize = evas_software_wince_fb_surface_resize; + break; + case 2: /* GAPI */ + re->backend = EVAS_ENGINE_WINCE_GAPI; + re->backend_priv = evas_software_wince_gapi_init(info->info.window, info->info.width, info->info.height); + if (!re->backend_priv) + { + free(re); + return 0; + } + re->backend_shutdown = evas_software_wince_gapi_shutdown; + re->backend_output_buffer_new = evas_software_wince_gapi_output_buffer_new; + re->backend_output_buffer_free = evas_software_wince_gapi_output_buffer_free; + re->backend_output_buffer_paste = evas_software_wince_gapi_output_buffer_paste; + re->backend_surface_resize = evas_software_wince_gapi_surface_resize; + break; + case 3: /* DirectDraw */ + re->backend = EVAS_ENGINE_WINCE_DDRAW; + re->backend_priv = evas_software_wince_ddraw_init(info->info.window, info->info.width, info->info.height); + if (!re->backend_priv) + { + free(re); + return 0; + } + re->backend_shutdown = evas_software_wince_ddraw_shutdown; + re->backend_output_buffer_new = evas_software_wince_ddraw_output_buffer_new; + re->backend_output_buffer_free = evas_software_wince_ddraw_output_buffer_free; + re->backend_output_buffer_paste = evas_software_wince_ddraw_output_buffer_paste; + re->backend_surface_resize = evas_software_wince_ddraw_surface_resize; + break; + case 4: /* GDI */ + re->backend = EVAS_ENGINE_WINCE_GDI; + re->backend_priv = evas_software_wince_gdi_init(info->info.window, info->info.width, info->info.height, info->info.fullscreen); + if (!re->backend_priv) + { + free(re); + return 0; + } + re->backend_shutdown = evas_software_wince_gdi_shutdown; + re->backend_output_buffer_new = evas_software_wince_gdi_output_buffer_new; + re->backend_output_buffer_free = evas_software_wince_gdi_output_buffer_free; + re->backend_output_buffer_paste = evas_software_wince_gdi_output_buffer_paste; + re->backend_surface_resize = evas_software_wince_gdi_surface_resize; + break; + default: + free(re); + return 0; + } + + re->width = e->output.w; + re->height = e->output.h; + re->rotation = info->info.rotation; + re->tb = evas_common_tilebuf_new(e->output.w, e->output.h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + } + else + { + re = e->engine.data.output; + if (re->tb) evas_common_tilebuf_free(re->tb); + + switch(info->info.backend) + { + case 1: /* FB */ + re->backend = EVAS_ENGINE_WINCE_FB; + re->backend_priv = evas_software_wince_fb_init(info->info.window, info->info.width, info->info.height); + if (!re->backend_priv) + { + free(re); + return 0; + } + re->backend_shutdown = evas_software_wince_fb_shutdown; + re->backend_output_buffer_new = evas_software_wince_fb_output_buffer_new; + re->backend_output_buffer_free = evas_software_wince_fb_output_buffer_free; + re->backend_output_buffer_paste = evas_software_wince_fb_output_buffer_paste; + re->backend_surface_resize = evas_software_wince_fb_surface_resize; + break; + case 2: /* GAPI */ + re->backend = EVAS_ENGINE_WINCE_GAPI; + re->backend_priv = evas_software_wince_gapi_init(info->info.window, info->info.width, info->info.height); + if (!re->backend_priv) + { + free(re); + return 0; + } + re->backend_shutdown = evas_software_wince_gapi_shutdown; + re->backend_output_buffer_new = evas_software_wince_gapi_output_buffer_new; + re->backend_output_buffer_free = evas_software_wince_gapi_output_buffer_free; + re->backend_output_buffer_paste = evas_software_wince_gapi_output_buffer_paste; + re->backend_surface_resize = evas_software_wince_gapi_surface_resize; + break; + case 3: /* DirectDraw */ + re->backend = EVAS_ENGINE_WINCE_DDRAW; + re->backend_priv = evas_software_wince_ddraw_init(info->info.window, info->info.width, info->info.height); + if (!re->backend_priv) + { + free(re); + return 0; + } + re->backend_shutdown = evas_software_wince_ddraw_shutdown; + re->backend_output_buffer_new = evas_software_wince_ddraw_output_buffer_new; + re->backend_output_buffer_free = evas_software_wince_ddraw_output_buffer_free; + re->backend_output_buffer_paste = evas_software_wince_ddraw_output_buffer_paste; + re->backend_surface_resize = evas_software_wince_ddraw_surface_resize; + break; + case 4: /* GDI */ + re->backend = EVAS_ENGINE_WINCE_GDI; + re->backend_priv = evas_software_wince_gdi_init(info->info.window, info->info.width, info->info.height, info->info.fullscreen); + if (!re->backend_priv) + { + free(re); + return 0; + } + re->backend_shutdown = evas_software_wince_gdi_shutdown; + re->backend_output_buffer_new = evas_software_wince_gdi_output_buffer_new; + re->backend_output_buffer_free = evas_software_wince_gdi_output_buffer_free; + re->backend_output_buffer_paste = evas_software_wince_gdi_output_buffer_paste; + re->backend_surface_resize = evas_software_wince_gdi_surface_resize; + break; + default: + free(re); + return 0; + } + + re->width = e->output.w; + re->height = e->output.h; + re->rotation = info->info.rotation; + re->tb = evas_common_tilebuf_new(e->output.w, e->output.h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } + } + if (!e->engine.data.output) return 0; + /* add a draw context if we dont have one */ + if (!e->engine.data.context) + e->engine.data.context = + e->engine.func->context_new(e->engine.data.output); + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (re->fbob) re->backend_output_buffer_free(re->backend_priv); + re->backend_shutdown(re->backend_priv); + if (re->clip_rects) DeleteObject(re->clip_rects); + if (re->tb) evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + if (re->tmp_out) evas_cache_image_drop(&re->tmp_out->cache_entry); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); + evas_common_soft16_image_shutdown(); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + + if ((re->width == w) && (re->height == h)) return; + + /* FIXME: is it needed ?? */ + if (re->fbob) + re->backend_surface_resize(re->fbob); + + evas_common_tilebuf_free(re->tb); + re->width = w; + re->height = h; + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + if (re->fbob) + { + re->backend_output_buffer_free(re->fbob); + re->fbob = NULL; + } + if (re->clip_rects) + { + DeleteObject(re->clip_rects); + re->clip_rects = NULL; + } + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +} + +static inline void +_output_buffer_alloc(Render_Engine *re) +{ + int width; + int height; + + if (re->fbob) return; + + if ((re->rotation == 0) || (re->rotation == 180)) + { + width = re->width; + height = re->height; + } + else + { + width = re->height; + height = re->width; + } + + re->fbob = re->backend_output_buffer_new(re->backend_priv, + width, + height); +} + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + Tilebuf_Rect *rect; + int ux, uy, uw, uh; + + re = (Render_Engine *)data; + if (re->end) + { + re->end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + if (!re->rects) return NULL; + + re->cur_rect = re->rects; + _output_buffer_alloc(re); + if (re->rotation != 0) _tmp_out_alloc(re); /* grows if required */ + } + if (!re->cur_rect) + { + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + return NULL; + } + rect = re->cur_rect; + ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h; + re->cur_rect = (Tilebuf_Rect *)((EINA_INLIST_GET(re->cur_rect))->next); + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = 1; + } + + *x = ux; *y = uy; *w = uw; *h = uh; + if (re->rotation == 0) + { + *cx = ux; *cy = uy; *cw = uw; *ch = uh; + return re->fbob->im; + } + else + { + *cx = 0; *cy = 0; *cw = uw; *ch = uh; + return re->tmp_out; + } +} + +static void +_blit_rot_90(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + (out_x + + (w + out_y - 1) * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr -= dst->stride; + } + sp += src->stride; + dp++; + } +} + +static void +_blit_rot_180(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + ((w + out_x - 1) + + (h + out_y - 1) * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr--; + } + sp += src->stride; + dp -= dst->stride; + } +} + +static void +_blit_rot_270(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + ((h + out_x - 1) + + out_y * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr += dst->stride; + } + sp += src->stride; + dp--; + } +} + +static void +_tmp_out_process(Render_Engine *re, int out_x, int out_y, int w, int h) +{ + Soft16_Image *d, *s; + + d = re->fbob->im; + s = re->tmp_out; + + if ((w < 1) || (h < 1) || (out_x >= d->cache_entry.w) || (out_y >= d->cache_entry.h)) + return; + + if (re->rotation == 90) + _blit_rot_90(d, s, out_x, out_y, w, h); + else if (re->rotation == 180) + _blit_rot_180(d, s, out_x, out_y, w, h); + else if (re->rotation == 270) + _blit_rot_270(d, s, out_x, out_y, w, h); +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + HRGN region; + int xx; + int yy; + int width; + int height; + + re = (Render_Engine *)data; + + if (!re->clip_rects) + re->clip_rects = CreateRectRgn(0, 0, 0, 0); + + if (re->rotation == 0) + { + xx = x; + yy = y; + width = w; + height = h; + } + else if (re->rotation == 90) + { + xx = y; + yy = re->width - w - x; + width = h; + height = w; + } + else if (re->rotation == 180) + { + xx = re->width - w - x; + yy = re->height - h - y; + width = w; + height = h; + } + else if (re->rotation == 270) + { + xx = re->height - h - y; + yy = x; + width = h; + height = w; + } + + region = CreateRectRgn(xx, yy, xx + width, yy + height); + + if (re->rotation != 0) + _tmp_out_process(re, xx, yy, w, h); + CombineRgn(re->clip_rects, re->clip_rects, region, RGN_OR); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (re->clip_rects) + { + /* FIXME : i have to manage that */ +/* XSetRegion(re->disp, re->gc, re->clip_rects); */ + DeleteObject(re->clip_rects); + re->clip_rects = NULL; + } + else return; + + re->backend_output_buffer_paste(re->fbob); + + /* FIXME : i have to manage that */ +/* XSetClipMask(re->disp, re->gc, None); */ +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (re->fbob) + { + re->backend_output_buffer_free(re->fbob); + re->fbob = NULL; + } + if (re->clip_rects) + { + DeleteObject(re->clip_rects); + re->clip_rects = NULL; + } + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *context) +{ + return EINA_FALSE; +} + +/* module advertising code */ +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_16")) return 0; + _evas_engine_soft16_wince_log_dom = eina_log_domain_register + ("evas-software_16_wince", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_soft16_wince_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em) +{ + eina_log_domain_unregister(_evas_engine_soft16_wince_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "software_16_wince", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_16_wince); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_16_WINCE +EVAS_EINA_MODULE_DEFINE(engine, software_16_wince); +#endif diff --git a/libraries/evas/src/modules/engines/software_16_wince/evas_engine.h b/libraries/evas/src/modules/engines/software_16_wince/evas_engine.h new file mode 100644 index 0000000..344e7b9 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_wince/evas_engine.h @@ -0,0 +1,120 @@ +#ifndef __EVAS_ENGINE_H__ +#define __EVAS_ENGINE_H__ + +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN +#include "evas_common.h" +#include "evas_common_soft16.h" + +extern int _evas_engine_soft16_wince_log_dom; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft16_wince_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft16_wince_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft16_wince_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft16_wince_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft16_wince_log_dom, __VA_ARGS__) + +typedef struct _FB_Output_Buffer FB_Output_Buffer; + +struct _FB_Output_Buffer +{ + Soft16_Image *im; + void *priv; +}; + + +/* Raw FrameBuffer */ + +void *evas_software_wince_fb_init (HWND window, + int width, + int height); +FB_Output_Buffer *evas_software_wince_fb_output_buffer_new (void *priv, + int width, + int height); +void evas_software_wince_fb_shutdown(void *priv); +void evas_software_wince_fb_output_buffer_free (FB_Output_Buffer *fbob); +void evas_software_wince_fb_output_buffer_paste (FB_Output_Buffer *fbob); + +void evas_software_wince_fb_surface_resize(FB_Output_Buffer *fbob); + + +/* GAPI */ + +void *evas_software_wince_gapi_init (HWND window, + int width, + int height); +FB_Output_Buffer *evas_software_wince_gapi_output_buffer_new (void *priv, + int width, + int height); +void evas_software_wince_gapi_shutdown(void *priv); +void evas_software_wince_gapi_output_buffer_free (FB_Output_Buffer *fbob); +void evas_software_wince_gapi_output_buffer_paste (FB_Output_Buffer *fbob); + +void evas_software_wince_gapi_surface_resize(FB_Output_Buffer *fbob); + +void *evas_software_wince_gapi_default_keys(void); +int evas_software_wince_gapi_suspend(void); +int evas_software_wince_gapi_resume(void); + + +/* DirectDraw */ + +#ifdef __cplusplus +extern "C" { +#endif + + +void *evas_software_wince_ddraw_init (HWND window, + int width, + int height); +FB_Output_Buffer *evas_software_wince_ddraw_output_buffer_new (void *priv, + int width, + int height); +void evas_software_wince_ddraw_shutdown(void *priv); +void evas_software_wince_ddraw_output_buffer_free (FB_Output_Buffer *fbob); +void evas_software_wince_ddraw_output_buffer_paste (FB_Output_Buffer *fbob); + +void evas_software_wince_ddraw_surface_resize(FB_Output_Buffer *fbob); + + +#ifdef __cplusplus +} +#endif + + +/* GDI */ + +void *evas_software_wince_gdi_init (HWND window, + int width, + int height, + int fullscreen); +FB_Output_Buffer *evas_software_wince_gdi_output_buffer_new (void *priv, + int width, + int height); +void evas_software_wince_gdi_shutdown(void *priv); +void evas_software_wince_gdi_output_buffer_free (FB_Output_Buffer *fbob); +void evas_software_wince_gdi_output_buffer_paste (FB_Output_Buffer *fbob); + +void evas_software_wince_gdi_surface_resize(FB_Output_Buffer *fbob); + + +#endif /* __EVAS_ENGINE_H__ */ diff --git a/libraries/evas/src/modules/engines/software_16_wince/evas_wince_ddraw_buffer.cpp b/libraries/evas/src/modules/engines/software_16_wince/evas_wince_ddraw_buffer.cpp new file mode 100644 index 0000000..944ed53 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_wince/evas_wince_ddraw_buffer.cpp @@ -0,0 +1,195 @@ + +#include + +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN +#include + +#include "evas_common.h" +#include "evas_engine.h" + + +typedef LONG (*fct_DirectDrawCreate)(LPGUID, LPUNKNOWN *, LPUNKNOWN *); + +fct_DirectDrawCreate lib_DirectDrawCreate; + +typedef struct Evas_Engine_WinCE_DDraw_Priv Evas_Engine_WinCE_DDraw_Priv; + +struct Evas_Engine_WinCE_DDraw_Priv +{ + HMODULE module; + LPDIRECTDRAW object; + LPDIRECTDRAWSURFACE surface; + int width; + int height; + int stride; +}; + +void * +evas_software_wince_ddraw_init(HWND window, + int width, + int height) +{ + DDSURFACEDESC surface_desc; + Evas_Engine_WinCE_DDraw_Priv *priv; + HRESULT res; + + priv = (Evas_Engine_WinCE_DDraw_Priv *)malloc(sizeof(Evas_Engine_WinCE_DDraw_Priv)); + if (!priv) + return NULL; + + priv->module = LoadLibrary(L"ddraw.dll"); + if (!priv->module) + { + fprintf(stderr, "[Engine] [WinCE DDraw] Can not load ddraw.dll\n"); + goto free_priv; + } + + lib_DirectDrawCreate = (fct_DirectDrawCreate)GetProcAddress(priv->module, L"DirectDrawCreate"); + if (!lib_DirectDrawCreate) + { + fprintf(stderr, "[Engine] [WinCE DDraw] Can not initialize DirectDraw\n"); + goto free_lib; + } + + res = lib_DirectDrawCreate(NULL, (IUnknown**)&priv->object, NULL); + if (FAILED(res)) + { + fprintf(stderr, "[Engine] [WinCE DDraw] Can not create DirectDraw object\n"); + goto free_lib; + } + + res = priv->object->SetCooperativeLevel(window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); + if (FAILED(res)) + { + fprintf(stderr, "[Engine] [WinCE DDraw] Can not set window to fullscreen\n"); + goto release_object; + } + + memset(&surface_desc, 0, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + surface_desc.dwFlags = DDSD_CAPS; + surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + + res = priv->object->CreateSurface(&surface_desc, &priv->surface, NULL); + if (FAILED(res)) + { + fprintf(stderr, "[Engine] [WinCE DDraw] Can not create surface\n"); + goto release_object; + } + + memset(&surface_desc, 0, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + res = priv->surface->Lock(NULL, &surface_desc, DDLOCK_READONLY, NULL); + if (FAILED(res)) + { + fprintf(stderr, "[Evas] [Engine] [WinCE DDraw] Can not lock surface\n"); + goto release_surface; + } + + priv->width = surface_desc.dwWidth; + priv->height = surface_desc.dwHeight; + priv->stride = surface_desc.lPitch / 2; + + if ((priv->width != width) || + (priv->height != height)) + { + fprintf(stderr, "[Engine] [WinCE DDraw] Size mismatch\n"); + fprintf(stderr, "[Engine] [WinCE DDraw] asked : %dx%d\n", width, height); + fprintf(stderr, "[Engine] [WinCE DDraw] got : %dx%d\n", priv->width, priv->height); + goto release_surface; + } + + res = priv->surface->Unlock(NULL); + if (FAILED(res)) + { + fprintf(stderr, "[Engine] [WinCE DDraw] Can not unlock surface\n"); + goto release_surface; + } + + return priv; + + release_surface: + priv->surface->Release(); + release_object: + priv->object->Release(); + free_lib: + FreeLibrary(priv->module); + free_priv: + free(priv); + + return 0; +} + +void +evas_software_wince_ddraw_shutdown(void *priv) +{ + ((Evas_Engine_WinCE_DDraw_Priv *)priv)->surface->Release(); + ((Evas_Engine_WinCE_DDraw_Priv *)priv)->object->Release(); + FreeLibrary(((Evas_Engine_WinCE_DDraw_Priv *)priv)->module); + free(priv); +} + + +FB_Output_Buffer * +evas_software_wince_ddraw_output_buffer_new(void *priv, + int width, + int height) +{ + FB_Output_Buffer *fbob; + void *buffer; + + fbob = (FB_Output_Buffer *)calloc(1, sizeof(FB_Output_Buffer)); + if (!fbob) return NULL; + + buffer = malloc (width * height * 2); /* we are sure to have 16bpp */ + if (!buffer) + { + free(fbob); + return NULL; + } + + fbob->priv = priv; + + fbob->im = (Soft16_Image *) evas_cache_image_data(evas_common_soft16_image_cache_get(), width, height, (DATA32 *)buffer, 0, EVAS_COLORSPACE_RGB565_A5P); + if (fbob->im) + fbob->im->stride = ((Evas_Engine_WinCE_DDraw_Priv *)priv)->stride; + + return fbob; +} + +void +evas_software_wince_ddraw_output_buffer_free(FB_Output_Buffer *fbob) +{ + free(fbob->im->pixels); + free(fbob); +} + +void +evas_software_wince_ddraw_output_buffer_paste(FB_Output_Buffer *fbob) +{ + DDSURFACEDESC surface_desc; + Evas_Engine_WinCE_DDraw_Priv *priv; + HRESULT res; + + priv = (Evas_Engine_WinCE_DDraw_Priv *)fbob->priv; + + memset(&surface_desc, 0, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + res = priv->surface->Lock(NULL, &surface_desc, DDLOCK_WRITEONLY, NULL); + if (FAILED(res)) + return; + + if ((fbob->im->cache_entry.w == surface_desc.dwWidth) && + (fbob->im->cache_entry.h == surface_desc.dwHeight)) + memcpy(surface_desc.lpSurface, fbob->im->pixels, + surface_desc.dwWidth * surface_desc.dwHeight * 2); + + priv->surface->Unlock(NULL); +} + +void +evas_software_wince_ddraw_surface_resize(FB_Output_Buffer *fbob) +{ +} diff --git a/libraries/evas/src/modules/engines/software_16_wince/evas_wince_fb_buffer.c b/libraries/evas/src/modules/engines/software_16_wince/evas_wince_fb_buffer.c new file mode 100644 index 0000000..6a81bf4 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_wince/evas_wince_fb_buffer.c @@ -0,0 +1,210 @@ +#include "evas_common.h" +#include "evas_engine.h" + + +#define GETGXINFO 0x00020000 + +typedef struct GXDeviceInfo +{ + long Version; //00 (should filled with 100 before calling ExtEscape) + void *pvFrameBuffer; //04 + unsigned long cbStride; //08 + unsigned long cxWidth; //0c + unsigned long cyHeight; //10 + unsigned long cBPP; //14 + unsigned long ffFormat; //18 + char Unused[0x84 - 7 * 4]; +} GXDeviceInfo; + + +#define GETRAWFRAMEBUFFER 0x00020001 + +typedef struct _RawFrameBufferInfo +{ + WORD wFormat; + WORD wBPP; + VOID *pFramePointer; + int cxStride; + int cyStride; + int cxPixels; + int cyPixels; +} RawFrameBufferInfo; + + +typedef struct Evas_Engine_WinCE_FB_Priv Evas_Engine_WinCE_FB_Priv; + +struct Evas_Engine_WinCE_FB_Priv +{ + int width; + int height; + void *buffer; +}; + +static int +_evas_software_wince_gxinfo_init(HDC dc, int *width, int *height, void **buffer) +{ + GXDeviceInfo gxInfo = { 0 }; + int result; + + gxInfo.Version = 100; + result = ExtEscape(dc, GETGXINFO, 0, NULL, sizeof(gxInfo), + (char *) &gxInfo); + if (result <= 0) + { + ERR("ExtEscape() with GETGXINFO failed"); + return 0; + } + + *width = gxInfo.cyHeight; + *height = gxInfo.cxWidth; + *buffer = gxInfo.pvFrameBuffer; + + return 1; +} + +void * +evas_software_wince_fb_init(HWND window, + int width, + int height) +{ + WCHAR oemstr[100]; + RawFrameBufferInfo rfbi; + HDC dc; + Evas_Engine_WinCE_FB_Priv *priv; + + priv = (Evas_Engine_WinCE_FB_Priv *)malloc(sizeof(Evas_Engine_WinCE_FB_Priv)); + if (!priv) + return NULL; + + dc = GetDC (window); + if (!dc) + { + ERR("Can not get DC"); + free(priv); + return NULL; + } + + SystemParametersInfo (SPI_GETOEMINFO, sizeof (oemstr), oemstr, 0); + if (((oemstr[12] == 'H') && + (oemstr[13] == '3') && + (oemstr[14] == '8')) || + ((oemstr[12] == 'H') && + (oemstr[13] == '3') && + (oemstr[14] == '9'))) + { + if (!_evas_software_wince_gxinfo_init(dc, &priv->width, &priv->height, &priv->buffer)) + { + ReleaseDC(window, dc); + free(priv); + return NULL; + } + + if ((priv->width != width) || + (priv->height != height)) + { + ERR("Size mismatch: asked: %dx%d, got: %dx%d", + width, height, priv->width, priv->height); + ReleaseDC(window, dc); + free(priv); + return NULL; + } + + ReleaseDC(window, dc); + + return priv; + } + + if (!ExtEscape(dc, GETRAWFRAMEBUFFER, 0, 0, sizeof(rfbi), (char *) &rfbi)|| + (rfbi.wBPP != 16) || + (rfbi.wFormat != 1)) + { + ERR("ExtEscape() with GETRAWFRAMEBUFFER failed. " + "Trying ExtEscape() with GETGXINFO"); + if (!_evas_software_wince_gxinfo_init(dc, &priv->width, &priv->height, &priv->buffer)) + { + ReleaseDC(window, dc); + free(priv); + return NULL; + } + + ReleaseDC(window, dc); + return priv; + } + + priv->width = rfbi.cxPixels; + priv->height = rfbi.cyPixels; + priv->buffer = rfbi.pFramePointer; + + if ((priv->width != width) || + (priv->height != height)) + { + ERR("Size mismatch: asked: %dx%d, got: %dx%d", + width, height, priv->width, priv->height); + ReleaseDC(window, dc); + free(priv); + return NULL; + } + + ReleaseDC(window, dc); + + return priv; +} + +void +evas_software_wince_fb_shutdown(void *priv) +{ + free(priv); +} + + +FB_Output_Buffer * +evas_software_wince_fb_output_buffer_new(void *priv, + int width, + int height) +{ + FB_Output_Buffer *fbob; + void *buffer; + + fbob = calloc(1, sizeof(FB_Output_Buffer)); + if (!fbob) return NULL; + + buffer = malloc (width * height * 2); /* we are sure to have 16bpp */ + if (!buffer) + { + free(fbob); + return NULL; + } + + fbob->priv = priv; + + fbob->im = (Soft16_Image *) evas_cache_image_data(evas_common_soft16_image_cache_get(), width, height, (DATA32 *)buffer, 0, EVAS_COLORSPACE_RGB565_A5P); + if (fbob->im) + fbob->im->stride = width; + + return fbob; +} + +void +evas_software_wince_fb_output_buffer_free(FB_Output_Buffer *fbob) +{ + free(fbob->im->pixels); + free(fbob); +} + +void +evas_software_wince_fb_output_buffer_paste(FB_Output_Buffer *fbob) +{ + Evas_Engine_WinCE_FB_Priv *priv; + + priv = (Evas_Engine_WinCE_FB_Priv *)fbob->priv; + + if ((fbob->im->cache_entry.w == priv->width) && + (fbob->im->cache_entry.h == priv->height)) + memcpy(priv->buffer, fbob->im->pixels, + priv->width * priv->height * 2); +} + +void +evas_software_wince_fb_surface_resize(FB_Output_Buffer *fbob) +{ +} diff --git a/libraries/evas/src/modules/engines/software_16_wince/evas_wince_gapi_buffer.c b/libraries/evas/src/modules/engines/software_16_wince/evas_wince_gapi_buffer.c new file mode 100644 index 0000000..c23c863 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_wince/evas_wince_gapi_buffer.c @@ -0,0 +1,341 @@ +#include "evas_common.h" +#include "evas_engine.h" + + +typedef int (*evas_engine_wince_close_display)(); + +typedef struct Evas_Engine_WinCE_GAPI_Priv Evas_Engine_WinCE_GAPI_Priv; + + +#define GETGXINFO 0x00020000 + +typedef struct +{ + long Version; //00 (should filled with 100 before calling ExtEscape) + void *pvFrameBuffer; //04 + unsigned long cbStride; //08 + unsigned long cxWidth; //0c + unsigned long cyHeight; //10 + unsigned long cBPP; //14 + unsigned long ffFormat; //18 + char Unused[0x84 - 7 * 4]; +} _GXDeviceInfo; + + +#define LINK(type,name,import) \ + name = (gapi_##type)GetProcAddress (gapi_lib, import) + +#define GX_FULLSCREEN 0x01 +#define GX_NORMALKEYS 0x02 + +#define kfDirect555 0x40 +#define kfDirect565 0x80 + + +typedef struct +{ + DWORD cxWidth; + DWORD cyHeight; + LONG cbxPitch; + LONG cbyPitch; + LONG cBPP; + DWORD ffFormat; +} _GAPI_Display_Properties; + +typedef int (*gapi_display_open)(HWND hWnd, DWORD dwFlags); +typedef int (*gapi_display_close)(); +typedef _GAPI_Display_Properties (*gapi_display_properties_get)(void); +typedef void* (*gapi_draw_begin)(void); +typedef int (*gapi_draw_end)(void); +typedef int (*gapi_suspend)(void); +typedef int (*gapi_resume)(void); + +gapi_suspend suspend = NULL; +gapi_resume resume = NULL; + +int +evas_software_wince_gapi_suspend(void) +{ + if (suspend) + return suspend(); + else + return 0; +} + +int +evas_software_wince_gapi_resume(void) +{ + if (resume) + return resume(); + else + return 0; +} + + +struct Evas_Engine_WinCE_GAPI_Priv +{ + HMODULE lib; + gapi_display_close close_display; + gapi_draw_begin draw_begin; + gapi_draw_end draw_end; + void *buffer; + int width; + int height; + int stride; +}; + +void * +evas_software_wince_gapi_init(HWND window, + int width, + int height) +{ + WCHAR oemstr[100]; + _GAPI_Display_Properties prop; + HMODULE gapi_lib; + Evas_Engine_WinCE_GAPI_Priv *priv; + + gapi_display_open display_open = NULL; + gapi_display_close display_close = NULL; + gapi_display_properties_get display_properties_get = NULL; + gapi_draw_begin draw_begin = NULL; + gapi_draw_end draw_end = NULL; + + priv = (Evas_Engine_WinCE_GAPI_Priv *)malloc(sizeof(Evas_Engine_WinCE_GAPI_Priv)); + if (!priv) + return NULL; + + gapi_lib = LoadLibrary(L"\\Windows\\gx.dll"); + if (!gapi_lib) + { + gapi_lib = LoadLibrary(L"gx.dll"); + if (!gapi_lib) + { + ERR("[Engine] [WinCE GAPI] Can not load gx.dll"); + goto free_priv; + } + } + + LINK(display_open, display_open, L"?GXOpenDisplay@@YAHPAUHWND__@@K@Z"); + LINK(display_close, display_close, L"?GXCloseDisplay@@YAHXZ"); + LINK(display_properties_get, display_properties_get, L"?GXGetDisplayProperties@@YA?AUGXDisplayProperties@@XZ"); + LINK(draw_begin, draw_begin, L"?GXBeginDraw@@YAPAXXZ"); + LINK(draw_end, draw_end, L"?GXEndDraw@@YAHXZ"); + LINK(suspend, suspend, L"?GXSuspend@@YAHXZ" ); + LINK(resume, resume, L"?GXResume@@YAHXZ" ); + + if (!display_open || + !display_close || + !display_properties_get || + !draw_begin || + !draw_end || + !suspend || + !resume) + { + ERR("[Engine] [WinCE GAPI] Can not find valid symbols"); + goto free_lib; + } + + if (!display_open(window, GX_FULLSCREEN)) + { + ERR("[Engine] [WinCE GAPI] Can not open display"); + goto free_lib; + } + + prop = display_properties_get(); + + // verify pixel format + if(!(prop.ffFormat & kfDirect565) || (prop.cBPP != 16)) + { + ERR("display format mismatch"); + goto close_display; + } + + // verify we have a vga device + if ((GetSystemMetrics(SM_CXSCREEN) != (int)prop.cxWidth) || + (GetSystemMetrics(SM_CYSCREEN) != (int)prop.cyHeight)) + { + ERR("display size mismatch"); + goto close_display; + } + + priv->lib = gapi_lib; + priv->close_display = display_close; + priv->draw_begin = draw_begin; + priv->draw_end = draw_end; + + /* GAPI on Ipaq H38** and H39** is completely buggy */ + /* They are detected as portrait device (width = 240 and height = 320) */ + /* but the framebuffer is managed like a landscape device : */ + /* + 240 + +---------+ + | | + | | + | | + | | + | | 320 + | ^^^ | + | ||| | + | ||| | + | ||| | + +---------+ + ----> + + */ + /* So these devices are considered as landscape devices */ + /* and width and height are switched. */ + /* Other devices are managed normally : */ + /* + 240 + +---------+ +| |---> | +| |---> | +| |---> | +v | | + | | 320 + | | + | | + | | + | | + +---------+ + + */ + + SystemParametersInfo (SPI_GETOEMINFO, sizeof (oemstr), oemstr, 0); + + if (((oemstr[12] == 'H') && + (oemstr[13] == '3') && + (oemstr[14] == '8')) || + ((oemstr[12] == 'H') && + (oemstr[13] == '3') && + (oemstr[14] == '9'))) + { + _GXDeviceInfo gxInfo = { 0 }; + HDC dc; + int result; + + priv->width = prop.cyHeight; + priv->height = prop.cxWidth; + priv->stride = prop.cbxPitch; + + dc = GetDC (window); + if (!dc) + { + ERR("Can not get device"); + goto close_display; + } + + gxInfo.Version = 100; + result = ExtEscape(dc, GETGXINFO, 0, NULL, sizeof(gxInfo), + (char *) &gxInfo); + if (result <= 0) + { + ERR("ExtEscape failed"); + ReleaseDC(window, dc); + goto close_display; + } + + priv->buffer = gxInfo.pvFrameBuffer; + ReleaseDC(window, dc); + } + else + { + priv->width = prop.cxWidth; + priv->height = prop.cyHeight; + priv->stride = prop.cbyPitch; + priv->buffer = NULL; + } + + if ((priv->width != width) || + (priv->height != height)) + { + ERR("Size mismatch: asked: %dx%d, got: %dx%d", + width, height, priv->width, priv->height); + goto close_display; + } + + return priv; + + close_display: + display_close(); + free_lib: + FreeLibrary(gapi_lib); + free_priv: + free(priv); + return NULL; +} + +void +evas_software_wince_gapi_shutdown(void *priv) +{ + Evas_Engine_WinCE_GAPI_Priv *p; + + p = (Evas_Engine_WinCE_GAPI_Priv *)priv; + p->close_display(); + suspend = NULL; + resume = NULL; + FreeLibrary(p->lib); + free(p); +} + + +FB_Output_Buffer * +evas_software_wince_gapi_output_buffer_new(void *priv, + int width, + int height) +{ + FB_Output_Buffer *fbob; + void *buffer; + + fbob = calloc(1, sizeof(FB_Output_Buffer)); + if (!fbob) return NULL; + + buffer = malloc (width * height * 2); /* we are sure to have 16bpp */ + if (!buffer) + { + free(fbob); + return NULL; + } + + fbob->priv = priv; + + fbob->im = (Soft16_Image *) evas_cache_image_data(evas_common_soft16_image_cache_get(), width, height, (DATA32 *)buffer, 0, EVAS_COLORSPACE_RGB565_A5P); + if (fbob->im) + fbob->im->stride = ((Evas_Engine_WinCE_GAPI_Priv *)priv)->stride >> 1; + + return fbob; +} + +void +evas_software_wince_gapi_output_buffer_free(FB_Output_Buffer *fbob) +{ + free(fbob->im->pixels); + free(fbob); +} + +void +evas_software_wince_gapi_output_buffer_paste(FB_Output_Buffer *fbob) +{ + Evas_Engine_WinCE_GAPI_Priv *priv; + void *buffer; + + priv = (Evas_Engine_WinCE_GAPI_Priv *)fbob->priv; + + buffer = priv->draw_begin(); + if (!buffer) + return; + + if (priv->buffer) buffer = priv->buffer; + + if ((fbob->im->cache_entry.w == priv->width) && + (fbob->im->cache_entry.h == priv->height)) + memcpy(buffer, fbob->im->pixels, + priv->width * priv->height * 2); + + priv->draw_end(); +} + +void +evas_software_wince_gapi_surface_resize(FB_Output_Buffer *fbob) +{ +} diff --git a/libraries/evas/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c b/libraries/evas/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c new file mode 100644 index 0000000..f32db4a --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c @@ -0,0 +1,165 @@ +#include "evas_common.h" +#include "evas_engine.h" + + +typedef struct BITMAPINFO_16bpp BITMAPINFO_16bpp; +typedef struct Evas_Engine_WinCE_GDI_Priv Evas_Engine_WinCE_GDI_Priv; + +struct BITMAPINFO_16bpp +{ + BITMAPINFOHEADER bih; + DWORD masks[3]; +}; + +struct Evas_Engine_WinCE_GDI_Priv +{ + HWND window; + HDC dc; + BITMAPINFO_16bpp *bitmap_info; + HBITMAP bitmap; + int width; + int height; +}; + +void * +evas_software_wince_gdi_init(HWND window, + int width, + int height, + int fullscreen) +{ + Evas_Engine_WinCE_GDI_Priv *priv; + + priv = (Evas_Engine_WinCE_GDI_Priv *)malloc(sizeof(Evas_Engine_WinCE_GDI_Priv)); + if (!priv) + return NULL; + + priv->window = window; + priv->dc = GetDC(window); + if (!priv->dc) + { + ERR("Can not get DC"); + free(priv); + return NULL; + } + + if (fullscreen) + { + priv->width = GetSystemMetrics(SM_CXSCREEN); + priv->height = GetSystemMetrics(SM_CYSCREEN); + } + else + { + priv->width = width; + priv->height = height; + } + + priv->bitmap_info = (BITMAPINFO_16bpp *)malloc(sizeof(BITMAPINFO_16bpp)); + if (!priv->bitmap_info) + { + ERR("Can not allocate bitmap info"); + ReleaseDC(window, priv->dc); + free(priv); + return NULL; + } + + priv->bitmap_info->bih.biSize = sizeof(BITMAPINFOHEADER); + priv->bitmap_info->bih.biWidth = priv->width; + priv->bitmap_info->bih.biHeight = -priv->height; + priv->bitmap_info->bih.biPlanes = 1; + priv->bitmap_info->bih.biSizeImage = 2 * priv->width * priv->height; + priv->bitmap_info->bih.biXPelsPerMeter = 0; + priv->bitmap_info->bih.biYPelsPerMeter = 0; + priv->bitmap_info->bih.biClrUsed = 0; + priv->bitmap_info->bih.biClrImportant = 0; + priv->bitmap_info->bih.biBitCount = 16; + priv->bitmap_info->bih.biCompression = BI_BITFIELDS; + priv->bitmap_info->masks[0] = 0x0000f800; + priv->bitmap_info->masks[1] = 0x000007e0; + priv->bitmap_info->masks[2] = 0x0000001f; + + return priv; +} + +void +evas_software_wince_gdi_shutdown(void *priv) +{ + free(((Evas_Engine_WinCE_GDI_Priv *)priv)->bitmap_info); + ReleaseDC(((Evas_Engine_WinCE_GDI_Priv *)priv)->window, ((Evas_Engine_WinCE_GDI_Priv *)priv)->dc); + free(priv); +} + + +FB_Output_Buffer * +evas_software_wince_gdi_output_buffer_new(void *priv, + int width, + int height) +{ + Evas_Engine_WinCE_GDI_Priv *priv2; + FB_Output_Buffer *fbob; + void *buffer; + + fbob = calloc(1, sizeof(FB_Output_Buffer)); + if (!fbob) return NULL; + + fbob->priv = priv; + + priv2 = (Evas_Engine_WinCE_GDI_Priv *)fbob->priv; + + priv2->bitmap = CreateDIBSection(priv2->dc, + (const BITMAPINFO *)priv2->bitmap_info, + DIB_RGB_COLORS, + (void **)(&buffer), + NULL, + 0); + if (!priv2->bitmap) + { + free(fbob); + return NULL; + } + + fbob->im = (Soft16_Image *) evas_cache_image_data(evas_common_soft16_image_cache_get(), width, height, (DATA32 *)buffer, 0, EVAS_COLORSPACE_RGB565_A5P); + if (fbob->im) + fbob->im->stride = width; + + return fbob; +} + +void +evas_software_wince_gdi_output_buffer_free(FB_Output_Buffer *fbob) +{ + Evas_Engine_WinCE_GDI_Priv *priv; + + priv = (Evas_Engine_WinCE_GDI_Priv *)fbob->priv; + DeleteObject(priv->bitmap); + free(fbob); +} + +void +evas_software_wince_gdi_output_buffer_paste(FB_Output_Buffer *fbob) +{ + Evas_Engine_WinCE_GDI_Priv *priv; + + priv = (Evas_Engine_WinCE_GDI_Priv *)fbob->priv; + + if ((fbob->im->cache_entry.w == priv->width) && + (fbob->im->cache_entry.h == priv->height)) + { + HDC dc; + + dc = CreateCompatibleDC(priv->dc); + SelectObject(dc, priv->bitmap); + BitBlt(priv->dc, + 0, 0, + priv->width, priv->height, + dc, + 0, 0, + SRCCOPY); + DeleteDC(dc); + + } +} + +void +evas_software_wince_gdi_surface_resize(FB_Output_Buffer *fbob) +{ +} diff --git a/libraries/evas/src/modules/engines/software_16_x11/Evas_Engine_Software_16_X11.h b/libraries/evas/src/modules/engines/software_16_x11/Evas_Engine_Software_16_X11.h new file mode 100644 index 0000000..9768f0a --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_x11/Evas_Engine_Software_16_X11.h @@ -0,0 +1,26 @@ +#ifndef _EVAS_ENGINE_SOFTWARE_16_X11_H +#define _EVAS_ENGINE_SOFTWARE_16_X11_H + +#include + +typedef struct _Evas_Engine_Info_Software_16_X11 Evas_Engine_Info_Software_16_X11; + +struct _Evas_Engine_Info_Software_16_X11 +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + /* engine specific data & parameters it needs to set up */ + struct { + Display *display; + Drawable drawable; + int rotation; + } info; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; +#endif + + diff --git a/libraries/evas/src/modules/engines/software_16_x11/Makefile.am b/libraries/evas/src/modules/engines/software_16_x11/Makefile.am new file mode 100644 index 0000000..812492e --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_x11/Makefile.am @@ -0,0 +1,47 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +-I$(top_srcdir)/src/modules/engines/software_16 \ +@FREETYPE_CFLAGS@ \ +@EINA_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_software_16_x11_cflags@ + +if BUILD_ENGINE_SOFTWARE_16_X11 + +SOFTWARE_16_X11_SOURCES = \ +evas_engine.c \ +evas_x_buffer.c + +SOFTWARE_16_X11_LIBADD = @evas_engine_software_16_x11_libs@ + + +includes_HEADERS = Evas_Engine_Software_16_X11.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_SOFTWARE_16_X11 + +pkgdir = $(libdir)/evas/modules/engines/software_16_x11/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(SOFTWARE_16_X11_SOURCES) +module_la_LIBADD = @EINA_LIBS@ $(SOFTWARE_16_X11_LIBADD) $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_software_16_x11.la + +libevas_engine_software_16_x11_la_SOURCES = $(SOFTWARE_16_X11_SOURCES) +libevas_engine_software_16_x11_la_LIBADD = $(SOFTWARE_16_X11_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/software_16_x11/Makefile.in b/libraries/evas/src/modules/engines/software_16_x11/Makefile.in new file mode 100644 index 0000000..be43dad --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_x11/Makefile.in @@ -0,0 +1,812 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/software_16_x11 +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@libevas_engine_software_16_x11_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_software_16_x11_la_SOURCES_DIST = evas_engine.c \ + evas_x_buffer.c +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@ evas_x_buffer.lo +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am_libevas_engine_software_16_x11_la_OBJECTS = $(am__objects_1) +libevas_engine_software_16_x11_la_OBJECTS = \ + $(am_libevas_engine_software_16_x11_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am_libevas_engine_software_16_x11_la_rpath = +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_x_buffer.c +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@am__objects_2 = \ +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@ module_la-evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@ module_la-evas_x_buffer.lo +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_16_x11_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_software_16_x11_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Software_16_X11.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +-I$(top_srcdir)/src/modules/engines/software_16 \ +@FREETYPE_CFLAGS@ \ +@EINA_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_software_16_x11_cflags@ + +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@SOFTWARE_16_X11_SOURCES = \ +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@evas_engine.c \ +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@evas_x_buffer.c + +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@SOFTWARE_16_X11_LIBADD = @evas_engine_software_16_x11_libs@ +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@includes_HEADERS = Evas_Engine_Software_16_X11.h +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_16_x11/$(MODULE_ARCH) +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@module_la_SOURCES = $(SOFTWARE_16_X11_SOURCES) +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@module_la_LIBADD = @EINA_LIBS@ $(SOFTWARE_16_X11_LIBADD) $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@module_la_LDFLAGS = -no-undefined -module -avoid-version +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@noinst_LTLIBRARIES = libevas_engine_software_16_x11.la +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@libevas_engine_software_16_x11_la_SOURCES = $(SOFTWARE_16_X11_SOURCES) +@BUILD_ENGINE_SOFTWARE_16_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@libevas_engine_software_16_x11_la_LIBADD = $(SOFTWARE_16_X11_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_16_x11/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/software_16_x11/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_16_x11.la: $(libevas_engine_software_16_x11_la_OBJECTS) $(libevas_engine_software_16_x11_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_software_16_x11_la_rpath) $(libevas_engine_software_16_x11_la_OBJECTS) $(libevas_engine_software_16_x11_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_x_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_x_buffer.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_x_buffer.lo: evas_x_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_x_buffer.lo -MD -MP -MF $(DEPDIR)/module_la-evas_x_buffer.Tpo -c -o module_la-evas_x_buffer.lo `test -f 'evas_x_buffer.c' || echo '$(srcdir)/'`evas_x_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_x_buffer.Tpo $(DEPDIR)/module_la-evas_x_buffer.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_x_buffer.c' object='module_la-evas_x_buffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_x_buffer.lo `test -f 'evas_x_buffer.c' || echo '$(srcdir)/'`evas_x_buffer.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_16_x11/evas_engine.c b/libraries/evas/src/modules/engines/software_16_x11/evas_engine.c new file mode 100644 index 0000000..5378972 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_x11/evas_engine.c @@ -0,0 +1,741 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_engine.h" +#include "Evas_Engine_Software_16_X11.h" +#include "evas_common_soft16.h" + +int _evas_engine_soft16_x11_log_dom = -1; +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; +/* +struct xrdb_user +{ + time_t last_stat; + time_t last_mtime; + XrmDatabase db; +}; +static struct xrdb_user xrdb_user = {0, 0, NULL}; + +static Eina_Bool +xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val) +{ + time_t last = xrdb_user.last_stat, now = time(NULL); + + xrdb_user.last_stat = now; + if (last != now) // don't stat() more than once every second + { + struct stat st; + const char *home = getenv("HOME"); + char tmp[PATH_MAX]; + + if (!home) goto failed; + snprintf(tmp, sizeof(tmp), "%s/.Xdefaults", home); + if (stat(tmp, &st) != 0) goto failed; + if (xrdb_user.last_mtime != st.st_mtime) + { + if (xrdb_user.db) XrmDestroyDatabase(xrdb_user.db); + xrdb_user.db = XrmGetFileDatabase(tmp); + if (!xrdb_user.db) goto failed; + xrdb_user.last_mtime = st.st_mtime; + } + } + + if (!xrdb_user.db) return EINA_FALSE; + return XrmGetResource(xrdb_user.db, name, cls, type, val); + + failed: + if (xrdb_user.db) + { + XrmDestroyDatabase(xrdb_user.db); + xrdb_user.db = NULL; + } + xrdb_user.last_mtime = 0; + return EINA_FALSE; +} +*/ + +/* engine struct data */ +typedef struct _Render_Engine Render_Engine; + +struct _Render_Engine +{ + Display *disp; + Drawable draw; + GC gc; + int w, h, rot; + Tilebuf *tb; + Tilebuf_Rect *rects; + Tilebuf_Rect *cur_rect; +/* + XrmDatabase xrdb; // xres - dpi + struct { // xres - dpi + int dpi; // xres - dpi + } xr; // xres - dpi + */ + X_Output_Buffer *shbuf; + Soft16_Image *tmp_out; /* used by indirect render, like rotation */ + Region clip_rects; + unsigned char end : 1; + unsigned char shm : 1; +}; + +/* prototypes we will use here */ + +static void *eng_info(Evas *e); +static void eng_info_free(Evas *e, void *info); +static int eng_setup(Evas *e, void *info); +static void eng_output_free(void *data); +static void eng_output_resize(void *data, int w, int h); +static void eng_output_tile_size_set(void *data, int w, int h); +static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h); +static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h); +static void eng_output_redraws_clear(void *data); +static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); +static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h); +static void eng_output_flush(void *data); +static void eng_output_idle_flush(void *data); + +/* engine api this module provides */ +static void * +eng_info(Evas *e) +{ + Evas_Engine_Info_Software_16_X11 *info; + + info = calloc(1, sizeof(Evas_Engine_Info_Software_16_X11)); + if (!info) return NULL; + info->magic.magic = rand(); + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; + e = NULL; +} + +static void +eng_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_Software_16_X11 *in; + in = (Evas_Engine_Info_Software_16_X11 *)info; + free(in); +} + +static void +_tmp_out_alloc(Render_Engine *re) +{ + Tilebuf_Rect *r; + unsigned int w = 0, h = 0; + + EINA_INLIST_FOREACH(re->rects, r) + { + if (r->w > (int)w) w = r->w; + if (r->h > (int)h) h = r->h; + } + + if (re->tmp_out) + { + if ((re->tmp_out->cache_entry.w < w) || (re->tmp_out->cache_entry.h < h)) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } + } + + if (!re->tmp_out) + { + Soft16_Image *im; + + im = (Soft16_Image *) evas_cache_image_empty(evas_common_soft16_image_cache_get()); + im->cache_entry.flags.alpha = 0; + evas_cache_image_surface_alloc(&im->cache_entry, w, h); + + re->tmp_out = im; + } +} + + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_Software_16_X11 *info; +/* X_Output_Buffer *xob; */ + XGCValues gcv; + + info = (Evas_Engine_Info_Software_16_X11 *)in; + if (!e->engine.data.output) + { + /* the only check - simplistic, i know, but enough for this + * "special purpose" engine. Remember it is meant to be used + * for limited power devices that have a 16bit display mode + * and no real other acceleration, and high resolution so we + * can pre-dither into 16bpp. */ +// if (DefaultDepth(info->info.display, +// DefaultScreen(info->info.display)) != 16) +// return; + /* do common routine init - we wil at least use it for core + * image loading and font loading/glyph rendering & placement */ + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + evas_common_soft16_image_init(); + + /* render engine specific data */ + re = calloc(1, sizeof(Render_Engine)); + if (!re) + return 0; + e->engine.data.output = re; + re->disp = info->info.display; + re->draw = info->info.drawable; + re->gc = XCreateGC(re->disp, re->draw, 0, &gcv); + re->w = e->output.w; + re->h = e->output.h; + re->rot = info->info.rotation; + re->tb = evas_common_tilebuf_new(e->output.w, e->output.h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + } + else + { + /* we changed the info after first init - do a re-eval where + * appropriate */ +// if (DefaultDepth(info->info.display, +// DefaultScreen(info->info.display)) != 16) +// return; + re = e->engine.data.output; + if (re->tb) evas_common_tilebuf_free(re->tb); + re->disp = info->info.display; + re->draw = info->info.drawable; + XFreeGC(re->disp, re->gc); + re->gc = XCreateGC(re->disp, re->draw, 0, &gcv); + re->w = e->output.w; + re->h = e->output.h; + re->rot = info->info.rotation; + re->tb = evas_common_tilebuf_new(e->output.w, e->output.h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } + } + if (!e->engine.data.output) return 0; + +/* + { + int status; + char *type = NULL; + XrmValue val; + + re->xr.dpi = 75000; // dpy * 1000 + + status = xrdb_user_query("Xft.dpi", "Xft.Dpi", &type, &val); + if ((!status) || (!type)) + { + if (!re->xrdb) re->xrdb = XrmGetDatabase(re->disp); + if (re->xrdb) + status = XrmGetResource(re->xrdb, + "Xft.dpi", "Xft.Dpi", &type, &val); + } + + if ((status) && (type)) + { + if (!strcmp(type, "String")) + { + const char *str, *dp; + + str = val.addr; + dp = strchr(str, '.'); + if (!dp) dp = strchr(str, ','); + + if (dp) + { + int subdpi, len, i; + char *buf; + + buf = alloca(dp - str + 1); + strncpy(buf, str, dp - str); + buf[dp - str] = 0; + len = strlen(dp + 1); + subdpi = atoi(dp + 1); + + if (len < 3) + { + for (i = len; i < 3; i++) subdpi *= 10; + } + else if (len > 3) + { + for (i = len; i > 3; i--) subdpi /= 10; + } + re->xr.dpi = atoi(buf) * 1000; + } + else + re->xr.dpi = atoi(str) * 1000; + } + } + evas_common_font_dpi_set(re->xr.dpi / 1000); + } + */ + + /* add a draw context if we dont have one */ + if (!e->engine.data.context) + e->engine.data.context = + e->engine.func->context_new(e->engine.data.output); + /* check if the display can do shm */ + re->shm = evas_software_16_x11_x_can_do_shm(re->disp); + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + +// NOTE: XrmGetDatabase() result is shared per connection, do not free it. +// if (re->xrdb) XrmDestroyDatabase(re->xrdb); + + if (re->shbuf) evas_software_16_x11_x_output_buffer_free(re->shbuf, 0); + if (re->clip_rects) XDestroyRegion(re->clip_rects); + if (re->gc) XFreeGC(re->disp, re->gc); + if (re->tb) evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + if (re->tmp_out) evas_cache_image_drop(&re->tmp_out->cache_entry); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); + evas_common_soft16_image_shutdown(); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + + if ((re->w == w) && (re->h == h)) return; + + evas_common_tilebuf_free(re->tb); + re->w = w; + re->h = h; + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + if (re->shbuf) + { + evas_software_16_x11_x_output_buffer_free(re->shbuf, 0); + re->shbuf = NULL; + } + if (re->clip_rects) + { + XDestroyRegion(re->clip_rects); + re->clip_rects = NULL; + } + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +} + +static inline void +_output_buffer_alloc(Render_Engine *re) +{ + int w, h; + if (re->shbuf) return; + + if ((re->rot == 0) || (re->rot == 180)) + { + w = re->w; + h = re->h; + } + else + { + w = re->h; + h = re->w; + } + + re->shbuf = evas_software_16_x11_x_output_buffer_new + (re->disp, DefaultVisual(re->disp, DefaultScreen(re->disp)), + DefaultDepth(re->disp, DefaultScreen(re->disp)), + w, h, 1, NULL); +} + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + Tilebuf_Rect *rect; + int ux, uy, uw, uh; + + re = (Render_Engine *)data; + if (re->end) + { + re->end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + if (!re->rects) return NULL; + + re->cur_rect = re->rects; + _output_buffer_alloc(re); + if (re->rot != 0) _tmp_out_alloc(re); /* grows if required */ + } + if (!re->cur_rect) + { + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + return NULL; + } + rect = re->cur_rect; + ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h; + re->cur_rect = (Tilebuf_Rect *)((EINA_INLIST_GET(re->cur_rect))->next); + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = 1; + } + + *x = ux; *y = uy; *w = uw; *h = uh; + if (re->rot == 0) + { + *cx = ux; *cy = uy; *cw = uw; *ch = uh; + return re->shbuf->im; + } + else + { + *cx = 0; *cy = 0; *cw = uw; *ch = uh; + return re->tmp_out; + } +} + +static void +_blit_rot_90(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + (out_x + + (w + out_y - 1) * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr -= dst->stride; + } + sp += src->stride; + dp++; + } +} + +static void +_blit_rot_180(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + ((w + out_x - 1) + + (h + out_y - 1) * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr--; + } + sp += src->stride; + dp -= dst->stride; + } +} + +static void +_blit_rot_270(Soft16_Image *dst, const Soft16_Image *src, + int out_x, int out_y, int w, int h) +{ + DATA16 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + ((h + out_x - 1) + + out_y * dst->stride); + + for (y = 0; y < h; y++) + { + DATA16 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr += dst->stride; + } + sp += src->stride; + dp--; + } +} + +static void +_tmp_out_process(Render_Engine *re, int out_x, int out_y, int w, int h) +{ + Soft16_Image *d, *s; + + d = re->shbuf->im; + s = re->tmp_out; + + if ((w < 1) || (h < 1) || + (out_x >= (int)d->cache_entry.w) || (out_y >= (int)d->cache_entry.h)) + return; + + if (re->rot == 90) + _blit_rot_90(d, s, out_x, out_y, w, h); + else if (re->rot == 180) + _blit_rot_180(d, s, out_x, out_y, w, h); + else if (re->rot == 270) + _blit_rot_270(d, s, out_x, out_y, w, h); +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface __UNUSED__, int x, int y, int w, int h) +{ + Render_Engine *re; + XRectangle r = { 0, 0, 0, 0 }; + + re = (Render_Engine *)data; + + if (!re->clip_rects) + re->clip_rects = XCreateRegion(); + + if (re->rot == 0) + { + r.x = x; + r.y = y; + r.width = w; + r.height = h; + } + else if (re->rot == 90) + { + r.x = y; + r.y = re->w - w - x; + r.width = h; + r.height = w; + } + else if (re->rot == 180) + { + r.x = re->w - w - x; + r.y = re->h - h - y; + r.width = w; + r.height = h; + } + else if (re->rot == 270) + { + r.x = re->h - h - y; + r.y = x; + r.width = h; + r.height = w; + } + + if (re->rot != 0) + _tmp_out_process(re, r.x, r.y, w, h); + XUnionRectWithRegion(&r, re->clip_rects, re->clip_rects); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (re->clip_rects) + { + XSetRegion(re->disp, re->gc, re->clip_rects); + XDestroyRegion(re->clip_rects); + re->clip_rects = NULL; + } + else return; + + evas_software_16_x11_x_output_buffer_paste + (re->shbuf, re->draw, re->gc, 0, 0, re->shbuf->im->cache_entry.w, re->shbuf->im->cache_entry.h, 1); + XSetClipMask(re->disp, re->gc, None); +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (re->shbuf) + { + evas_software_16_x11_x_output_buffer_free(re->shbuf, 0); + re->shbuf = NULL; + } + if (re->clip_rects) + { + XDestroyRegion(re->clip_rects); + re->clip_rects = NULL; + } + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } +} + +static Eina_Bool +eng_canvas_alpha_get(void *data __UNUSED__, void *context __UNUSED__) +{ + return EINA_FALSE; +} + +/* module advertising code */ +static int +module_open(Evas_Module *em) +{ + static Eina_Bool xrm_inited = EINA_FALSE; + if (!xrm_inited) + { + xrm_inited = EINA_TRUE; + XrmInitialize(); + } + + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_16")) return 0; + _evas_engine_soft16_x11_log_dom = eina_log_domain_register + ("evas-software_16_x11", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_soft16_x11_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_soft16_x11_log_dom); +/* + if (xrdb_user.db) + { + XrmDestroyDatabase(xrdb_user.db); + xrdb_user.last_stat = 0; + xrdb_user.last_mtime = 0; + xrdb_user.db = NULL; + } + */ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "software_16_x11", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_16_x11); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_16_X11 +EVAS_EINA_MODULE_DEFINE(engine, software_16_x11); +#endif + diff --git a/libraries/evas/src/modules/engines/software_16_x11/evas_engine.h b/libraries/evas/src/modules/engines/software_16_x11/evas_engine.h new file mode 100644 index 0000000..066ef50 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_x11/evas_engine.h @@ -0,0 +1,63 @@ +#ifndef EVAS_ENGINE_H +#define EVAS_ENGINE_H + +#include +#include +#include +#include +#include // xres - dpi +#include +#include +#include "evas_common.h" +#include "evas_common_soft16.h" + +extern int _evas_engine_soft16_x11_log_dom; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft16_x11_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft16_x11_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft16_x11_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft16_x11_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft16_x11_log_dom, __VA_ARGS__) + +typedef struct _X_Output_Buffer X_Output_Buffer; + +struct _X_Output_Buffer +{ + Soft16_Image *im; + Display *display; + XImage *xim; + XShmSegmentInfo *shm_info; + void *data; +}; + +/****/ +void evas_software_16_x11_x_init (void); + +int evas_software_16_x11_x_can_do_shm (Display *d); +X_Output_Buffer *evas_software_16_x11_x_output_buffer_new (Display *d, Visual *v, int depth, int w, int h, int try_shm, void *data); +void evas_software_16_x11_x_output_buffer_free (X_Output_Buffer *xob, int sync); +void evas_software_16_x11_x_output_buffer_paste (X_Output_Buffer *xob, Drawable d, GC gc, int x, int y, int w, int h, int sync); +DATA8 *evas_software_16_x11_x_output_buffer_data (X_Output_Buffer *xob, int *bytes_per_line_ret); +int evas_software_16_x11_x_output_buffer_depth (X_Output_Buffer *xob); +int evas_software_16_x11_x_output_buffer_byte_order (X_Output_Buffer *xob); +int evas_software_16_x11_x_output_buffer_bit_order (X_Output_Buffer *xob); + +#endif diff --git a/libraries/evas/src/modules/engines/software_16_x11/evas_x_buffer.c b/libraries/evas/src/modules/engines/software_16_x11/evas_x_buffer.c new file mode 100644 index 0000000..32784b0 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_16_x11/evas_x_buffer.c @@ -0,0 +1,186 @@ +#include "evas_common.h" +#include "evas_engine.h" + +static int _x_err = 0; + +int +evas_software_16_x11_x_can_do_shm(Display *d) +{ + static Display *cached_d = NULL; + static int cached_result = 0; + + if (d == cached_d) return cached_result; + cached_d = d; + if (XShmQueryExtension(d)) + { + X_Output_Buffer *xob; + + xob = evas_software_16_x11_x_output_buffer_new + (d, DefaultVisual(d, DefaultScreen(d)), + DefaultDepth(d, DefaultScreen(d)), 16, 16, 2, NULL); + if (!xob) + { + cached_result = 0; + return 0; + } + evas_software_16_x11_x_output_buffer_free(xob, 1); + cached_result = 1; + return 1; + } + cached_result = 0; + return 0; +} + +static void +x_output_tmp_x_err(Display * d __UNUSED__, XErrorEvent * ev __UNUSED__) +{ + _x_err = 1; + return; +} + +X_Output_Buffer * +evas_software_16_x11_x_output_buffer_new(Display *d, Visual *v, int depth, int w, int h, int try_shm, void *data) +{ + X_Output_Buffer *xob; + + xob = calloc(1, sizeof(X_Output_Buffer)); + if (!xob) return NULL; + + xob->display = d; + xob->xim = NULL; + xob->shm_info = NULL; + + if (try_shm > 0) + { + xob->shm_info = malloc(sizeof(XShmSegmentInfo)); + if (xob->shm_info) + { + xob->xim = XShmCreateImage(d, v, depth, ZPixmap, NULL, + xob->shm_info, w, h); + if (xob->xim) + { + xob->shm_info->shmid = shmget(IPC_PRIVATE, + xob->xim->bytes_per_line * + xob->xim->height, + IPC_CREAT | 0777); + if (xob->shm_info->shmid >= 0) + { + xob->shm_info->readOnly = False; + xob->shm_info->shmaddr = xob->xim->data = + shmat(xob->shm_info->shmid, 0, 0); + if (xob->shm_info->shmaddr) + { + XErrorHandler ph; + + XSync(d, False); + _x_err = 0; + ph = XSetErrorHandler((XErrorHandler) + x_output_tmp_x_err); + XShmAttach(d, xob->shm_info); + XSync(d, False); + XSetErrorHandler((XErrorHandler)ph); + if (!_x_err) + { + xob->im = (Soft16_Image *) evas_cache_image_data(evas_common_soft16_image_cache_get(), w, h, (DATA32 *) xob->xim->data, 0, EVAS_COLORSPACE_RGB565_A5P); + if (xob->im) + xob->im->stride = xob->xim->bytes_per_line / sizeof(DATA16); + return xob; + } + } + shmdt(xob->shm_info->shmaddr); + shmctl(xob->shm_info->shmid, IPC_RMID, 0); + } + if (xob->xim) XDestroyImage(xob->xim); + xob->xim = NULL; + } + if (xob->shm_info) free(xob->shm_info); + xob->shm_info = NULL; + } + } + + if (try_shm > 1) return NULL; + + xob->xim = XCreateImage(d, v, depth, ZPixmap, 0, data, w, h, 32, 0); + if (!xob->xim) + { + free(xob); + return NULL; + } + + xob->data = data; + + if (!xob->xim->data) + { + xob->xim->data = malloc(xob->xim->bytes_per_line * xob->xim->height); + if (!xob->xim->data) + { + XDestroyImage(xob->xim); + free(xob); + return NULL; + } + } + if (xob->im) + evas_cache_image_drop(&xob->im->cache_entry); + + xob->im = (Soft16_Image *) evas_cache_image_data(evas_common_soft16_image_cache_get(), w, h, (DATA32 *) xob->xim->data, 0, EVAS_COLORSPACE_RGB565_A5P); + if (xob->im) + xob->im->stride = xob->xim->bytes_per_line / sizeof(DATA16); + return xob; +} + +void +evas_software_16_x11_x_output_buffer_free(X_Output_Buffer *xob, int sync) +{ + if (xob->shm_info) + { + if (sync) XSync(xob->display, False); + XShmDetach(xob->display, xob->shm_info); + XDestroyImage(xob->xim); + shmdt(xob->shm_info->shmaddr); + shmctl(xob->shm_info->shmid, IPC_RMID, 0); + free(xob->shm_info); + } + else + { + if (xob->data) xob->xim->data = NULL; + XDestroyImage(xob->xim); + } + free(xob); +} + +void +evas_software_16_x11_x_output_buffer_paste(X_Output_Buffer *xob, Drawable d, GC gc, int x, int y, int w, int h, int sync) +{ + if (xob->shm_info) + { + XShmPutImage(xob->display, d, gc, xob->xim, 0, 0, x, y, w, h, False); + if (sync) XSync(xob->display, False); + } + else + XPutImage(xob->display, d, gc, xob->xim, 0, 0, x, y, w, h); +} + +DATA8 * +evas_software_16_x11_x_output_buffer_data(X_Output_Buffer *xob, int *bytes_per_line_ret) +{ + if (bytes_per_line_ret) *bytes_per_line_ret = xob->xim->bytes_per_line; + return (DATA8*) xob->xim->data; +} + +int +evas_software_16_x11_x_output_buffer_depth(X_Output_Buffer *xob) +{ + return xob->xim->bits_per_pixel; +} + +int +evas_software_16_x11_x_output_buffer_byte_order(X_Output_Buffer *xob) +{ + return xob->xim->byte_order; +} + +int +evas_software_16_x11_x_output_buffer_bit_order(X_Output_Buffer *xob) +{ + return xob->xim->bitmap_bit_order; +} diff --git a/libraries/evas/src/modules/engines/software_8/Makefile.am b/libraries/evas/src/modules/engines/software_8/Makefile.am new file mode 100644 index 0000000..145b766 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_8/Makefile.am @@ -0,0 +1,39 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_ENGINE_SOFTWARE_8 + +SOFTWARE_8_SOURCES = evas_engine.c + + +if !EVAS_STATIC_BUILD_SOFTWARE_8_X11 + +pkgdir = $(libdir)/evas/modules/engines/software_8/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = $(SOFTWARE_8_SOURCES) +module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_software_8.la + +libevas_engine_software_8_la_SOURCES = $(SOFTWARE_8_SOURCES) + +endif +endif + +EXTRA_DIST = \ +evas_engine.c diff --git a/libraries/evas/src/modules/engines/software_8/Makefile.in b/libraries/evas/src/modules/engines/software_8/Makefile.in new file mode 100644 index 0000000..bf16fcf --- /dev/null +++ b/libraries/evas/src/modules/engines/software_8/Makefile.in @@ -0,0 +1,764 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/software_8 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_engine_software_8_la_LIBADD = +am__libevas_engine_software_8_la_SOURCES_DIST = evas_engine.c +@BUILD_ENGINE_SOFTWARE_8_TRUE@am__objects_1 = evas_engine.lo +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am_libevas_engine_software_8_la_OBJECTS = $(am__objects_1) +libevas_engine_software_8_la_OBJECTS = \ + $(am_libevas_engine_software_8_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am_libevas_engine_software_8_la_rpath = +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c +@BUILD_ENGINE_SOFTWARE_8_TRUE@am__objects_2 = \ +@BUILD_ENGINE_SOFTWARE_8_TRUE@ module_la-evas_engine.lo +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_8_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_software_8_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_ENGINE_SOFTWARE_8_TRUE@SOFTWARE_8_SOURCES = evas_engine.c +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_8/$(MODULE_ARCH) +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@module_la_SOURCES = $(SOFTWARE_8_SOURCES) +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@noinst_LTLIBRARIES = libevas_engine_software_8.la +@BUILD_ENGINE_SOFTWARE_8_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@libevas_engine_software_8_la_SOURCES = $(SOFTWARE_8_SOURCES) +EXTRA_DIST = \ +evas_engine.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_8/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/software_8/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_8.la: $(libevas_engine_software_8_la_OBJECTS) $(libevas_engine_software_8_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_software_8_la_rpath) $(libevas_engine_software_8_la_OBJECTS) $(libevas_engine_software_8_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_8/evas_engine.c b/libraries/evas/src/modules/engines/software_8/evas_engine.c new file mode 100644 index 0000000..c7c123a --- /dev/null +++ b/libraries/evas/src/modules/engines/software_8/evas_engine.c @@ -0,0 +1,440 @@ +#include "evas_common.h" +#include "evas_common_soft8.h" + +/* + ***** + ** + ** ENGINE ROUTINES + ** + ***** + */ +int _evas_soft8_log_dom = -1; + +static Evas_Func func, pfunc; + +#ifdef ERR +#undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR( _evas_soft8_log_dom, __VA_ARGS__) + +#ifdef DBG +#undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_soft8_log_dom, __VA_ARGS__) + +#ifdef INF +#undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_soft8_log_dom, __VA_ARGS__) + +#ifdef WRN +#undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_soft8_log_dom, __VA_ARGS__) + +#ifdef CRIT +#undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_soft8_log_dom, __VA_ARGS__) + +#define NOT_IMPLEMENTED() \ + WRN("NOT_IMPLEMENTED: %s() at %s:%d", \ + __FUNCTION__, __FILE__, __LINE__) + +static void +eng_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x, + int y, int w, int h) +{ + evas_common_soft8_rectangle_draw(surface, context, x, y, w, h); +} + +static void +eng_line_draw(void *data __UNUSED__, void *context, void *surface, int x1, + int y1, int x2, int y2) +{ + evas_common_soft8_line_draw(surface, context, x1, y1, x2, y2); +} + +static void +eng_polygon_draw(void *data __UNUSED__, void *context, void *surface, + void *polygon, int x, int y) +{ + evas_common_soft8_polygon_draw(surface, context, polygon, x, y); +} + +static int +eng_image_alpha_get(void *data __UNUSED__, void *image) +{ + Soft8_Image *im; + + if (!image) + return 0; + im = image; + return im->cache_entry.flags.alpha; +} + +static int +eng_image_colorspace_get(void *data __UNUSED__, void *image __UNUSED__) +{ + return EVAS_COLORSPACE_GRY8; +} + +static void * +eng_image_alpha_set(void *data __UNUSED__, void *image, int have_alpha) +{ + if (!image) + return NULL; + have_alpha = !!have_alpha; + image = evas_common_soft8_image_alpha_set(image, have_alpha); + return image; +} + +static char * +eng_image_comment_get(void *data __UNUSED__, void *image __UNUSED__, + char *key __UNUSED__) +{ + return NULL; +} + +static char * +eng_image_format_get(void *data __UNUSED__, void *image __UNUSED__) +{ + NOT_IMPLEMENTED(); + return NULL; +} + +static void +eng_image_colorspace_set(void *data __UNUSED__, void *image __UNUSED__, + int cspace __UNUSED__) +{ + NOT_IMPLEMENTED(); +} + +static void * +eng_image_native_set(void *data __UNUSED__, void *image, + void *native __UNUSED__) +{ + NOT_IMPLEMENTED(); + return image; +} + +static void * +eng_image_native_get(void *data __UNUSED__, void *image __UNUSED__) +{ + NOT_IMPLEMENTED(); + return NULL; +} + +static void * +eng_image_load(void *data __UNUSED__, const char *file, const char *key, + int *error, Evas_Image_Load_Opts * lo) +{ + return evas_cache_image_request(evas_common_soft8_image_cache_get(), file, + key, lo, error); +} + +static void * +eng_image_new_from_data(void *data __UNUSED__, int w, int h, + DATA32 * image_data, int alpha, int cspace) +{ + if ((image_data) && (cspace != EVAS_COLORSPACE_GRY8)) + { + WRN("Unsupported colorspace %d in %s() (%s:%d)", + cspace, __FUNCTION__, __FILE__, __LINE__); + return NULL; + } + return evas_cache_image_data(evas_common_soft8_image_cache_get(), w, h, + image_data, alpha, EVAS_COLORSPACE_GRY8); +} + +static void * +eng_image_new_from_copied_data(void *data __UNUSED__, int w, int h, + DATA32 * image_data, int alpha, int cspace) +{ + if ((image_data) && (cspace != EVAS_COLORSPACE_GRY8)) + { + WRN("Unsupported colorspace %d in %s() (%s:%d)", + cspace, __FUNCTION__, __FILE__, __LINE__); + return NULL; + } + return evas_cache_image_copied_data(evas_common_soft8_image_cache_get(), w, + h, image_data, alpha, + EVAS_COLORSPACE_GRY8); +} + +static void +eng_image_free(void *data __UNUSED__, void *image) +{ + evas_cache_image_drop((Image_Entry *) image); +} + +static void +eng_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) +{ + Soft8_Image *im; + + if (w) + *w = 0; + if (h) + *h = 0; + if (!image) + return; + im = image; + if (w) + *w = im->cache_entry.w; + if (h) + *h = im->cache_entry.h; +} + +static void * +eng_image_size_set(void *data __UNUSED__, void *image, int w, int h) +{ + if (!image) + return NULL; + if ((w <= 0) || (h <= 0)) + { + evas_cache_image_drop((Image_Entry *) image); + return NULL; + } + return evas_cache_image_size_set((Image_Entry *) image, w, h); +} + +static void +eng_image_stride_get(void *data __UNUSED__, void *image, int *stride) +{ + Soft8_Image *im; + + if (stride) + *stride = 0; + if (!image) + return; + im = image; + if (stride) + *stride = im->stride; +} + +static void * +eng_image_dirty_region(void *data __UNUSED__, void *image __UNUSED__, + int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, + int h __UNUSED__) +{ + /* FIXME: is this required? */ + //NOT_IMPLEMENTED(); + return image; +} + +static void * +eng_image_data_get(void *data __UNUSED__, void *image, int to_write, + DATA32 ** image_data, int *err) +{ + Soft8_Image *im; + int error; + + if (!image) + { + *image_data = NULL; + return NULL; + } + + im = image; + error = evas_cache_image_load_data(&im->cache_entry); + + if (to_write) + im = (Soft8_Image *) evas_cache_image_alone(&im->cache_entry); + + if (image_data) + *image_data = (DATA32 *) im->pixels; + + if (err) *err = error; + return im; +} + +static void * +eng_image_data_put(void *data __UNUSED__, void *image, DATA32 * image_data) +{ + Soft8_Image *old_im, *new_im; + + if (!image) + return NULL; + + old_im = image; + if ((DATA8 *) image_data == old_im->pixels) + return old_im; + + new_im = + (Soft8_Image *) + evas_cache_image_data(evas_common_soft8_image_cache_get(), + old_im->cache_entry.w, old_im->cache_entry.h, + image_data, old_im->cache_entry.flags.alpha, + EVAS_COLORSPACE_GRY8); + evas_cache_image_drop(&old_im->cache_entry); + return new_im; +} + +static void +eng_image_data_preload_request(void *data __UNUSED__, void *image, + const void *target) +{ + Soft8_Image *im = image; + + if (!im) + return; + evas_cache_image_preload_data(&im->cache_entry, target); +} + +static void +eng_image_data_preload_cancel(void *data __UNUSED__, void *image, + const void *target) +{ + Soft8_Image *im = image; + + if (!im) + return; + evas_cache_image_preload_cancel(&im->cache_entry, target); +} + +static void +eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image, + int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, + int dst_w, int dst_h, int smooth) +{ + Soft8_Image *im; + + im = (Soft8_Image *) image; + + evas_cache_image_load_data(&im->cache_entry); + evas_common_soft8_image_draw(im, surface, context, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h, smooth); +} + +static void +eng_image_scale_hint_set(void *data __UNUSED__, void *image __UNUSED__, + int hint __UNUSED__) +{ +} + +static int +eng_image_scale_hint_get(void *data __UNUSED__, void *image __UNUSED__) +{ + return EVAS_IMAGE_SCALE_HINT_NONE; +} + +static void +eng_image_cache_flush(void *data __UNUSED__) +{ + evas_cache_image_flush(evas_common_soft8_image_cache_get()); +} + +static void +eng_image_cache_set(void *data __UNUSED__, int bytes) +{ + evas_cache_image_set(evas_common_soft8_image_cache_get(), bytes); +} + +static int +eng_image_cache_get(void *data __UNUSED__) +{ + return evas_cache_image_get(evas_common_soft8_image_cache_get()); +} + +static void +eng_font_draw(void *data __UNUSED__, void *context, void *surface, + Evas_Font_Set *font, int x, int y, int w __UNUSED__, int h __UNUSED__, + int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *text_props) +{ + evas_common_font_draw(surface, context, (RGBA_Font *) font, x, y, + text_props); + evas_common_draw_context_font_ext_set(context, NULL, NULL, NULL, NULL); +} + +static void +eng_font_cache_flush(void *data __UNUSED__) +{ + evas_common_font_flush(); +} + +/* + ***** + ** + ** MODULE ACCESSIBLE API API + ** + ***** + */ + +static int +module_open(Evas_Module * em) +{ + if (!em) + return 0; + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + _evas_soft8_log_dom = eina_log_domain_register + ("evas-software_8", EVAS_DEFAULT_LOG_COLOR); + if (_evas_soft8_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ + EVAS_API_RESET(info, &func); + EVAS_API_RESET(info_free, &func); + EVAS_API_RESET(setup, &func); +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(rectangle_draw); + ORD(line_draw); + ORD(polygon_draw); + ORD(image_load); + ORD(image_new_from_data); + ORD(image_new_from_copied_data); + ORD(image_free); + ORD(image_size_get); + ORD(image_size_set); + ORD(image_stride_get); + ORD(image_dirty_region); + ORD(image_data_get); + ORD(image_data_put); + ORD(image_data_preload_request); + ORD(image_data_preload_cancel); + ORD(image_alpha_set); + ORD(image_alpha_get); + ORD(image_draw); + ORD(image_comment_get); + ORD(image_format_get); + ORD(image_colorspace_set); + ORD(image_colorspace_get); + ORD(image_native_set); + ORD(image_native_get); + ORD(image_cache_flush); + ORD(image_cache_set); + ORD(image_cache_get); + ORD(font_draw); + ORD(image_scale_hint_set); + ORD(image_scale_hint_get); + + em->functions = (void *)(&func); + + return 1; +} + +static void +module_close(Evas_Module * em __UNUSED__) +{ + eina_log_domain_unregister(_evas_soft8_log_dom); +} + +static Evas_Module_Api evas_modapi = { + EVAS_MODULE_API_VERSION, + "software_8", + "none", + { + module_open, + module_close} +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_8); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_8 +EVAS_EINA_MODULE_DEFINE(engine, software_8); +#endif diff --git a/libraries/evas/src/modules/engines/software_8_x11/Evas_Engine_Software_8_X11.h b/libraries/evas/src/modules/engines/software_8_x11/Evas_Engine_Software_8_X11.h new file mode 100644 index 0000000..fac3d8e --- /dev/null +++ b/libraries/evas/src/modules/engines/software_8_x11/Evas_Engine_Software_8_X11.h @@ -0,0 +1,38 @@ +#ifndef _EVAS_ENGINE_SOFTWARE_8_X11_H +#define _EVAS_ENGINE_SOFTWARE_8_X11_H + +#include + +typedef struct _Evas_Engine_Info_Software_8_X11 Evas_Engine_Info_Software_8_X11; + +struct _Evas_Engine_Info_Software_8_X11 +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + /* engine specific data & parameters it needs to set up */ + struct { + xcb_connection_t *connection; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + xcb_screen_t *screen; + + unsigned int mask; + void *visual; + unsigned int colormap; + int depth; + int rotation; + + int alloc_grayscale : 1; + int debug : 1; + int shape_dither : 1; + int destination_alpha : 1; + int track_mask_changes : 1; + } info; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; + +#endif diff --git a/libraries/evas/src/modules/engines/software_8_x11/Makefile.am b/libraries/evas/src/modules/engines/software_8_x11/Makefile.am new file mode 100644 index 0000000..3689577 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_8_x11/Makefile.am @@ -0,0 +1,49 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +-I$(top_srcdir)/src/modules/engines/software_8 \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_software_8_x11_cflags@ \ +-I/usr/include/pixman-1 + +if BUILD_ENGINE_SOFTWARE_8_X11 + +SOFTWARE_8_X11_SOURCES = \ +evas_engine.c \ +evas_x_buffer.c + +SOFTWARE_8_X11_LIBADD = @evas_engine_software_8_x11_libs@ + + +includes_HEADERS = Evas_Engine_Software_8_X11.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_SOFTWARE_8_X11 + +pkgdir = $(libdir)/evas/modules/engines/software_8_x11/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(SOFTWARE_8_X11_SOURCES) +module_la_LIBADD = @EINA_LIBS@ $(SOFTWARE_8_X11_LIBADD) $(top_builddir)/src/lib/libevas.la +#-lxcb-image -lxcb-shm -lxcb -lpixman-1 +module_la_LDFLAGS = -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_software_8_x11.la + +libevas_engine_software_8_x11_la_SOURCES = $(SOFTWARE_8_X11_SOURCES) +libevas_engine_software_8_x11_la_LIBADD = $(SOFTWARE_8_X11_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/software_8_x11/Makefile.in b/libraries/evas/src/modules/engines/software_8_x11/Makefile.in new file mode 100644 index 0000000..fa88a4d --- /dev/null +++ b/libraries/evas/src/modules/engines/software_8_x11/Makefile.in @@ -0,0 +1,814 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/software_8_x11 +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@libevas_engine_software_8_x11_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_software_8_x11_la_SOURCES_DIST = evas_engine.c \ + evas_x_buffer.c +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@ evas_x_buffer.lo +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am_libevas_engine_software_8_x11_la_OBJECTS = $(am__objects_1) +libevas_engine_software_8_x11_la_OBJECTS = \ + $(am_libevas_engine_software_8_x11_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am_libevas_engine_software_8_x11_la_rpath = +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_x_buffer.c +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@am__objects_2 = \ +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@ module_la-evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@ module_la-evas_x_buffer.lo +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_8_x11_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_software_8_x11_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Software_8_X11.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +-I$(top_srcdir)/src/modules/engines/software_8 \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_software_8_x11_cflags@ \ +-I/usr/include/pixman-1 + +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@SOFTWARE_8_X11_SOURCES = \ +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@evas_engine.c \ +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@evas_x_buffer.c + +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@SOFTWARE_8_X11_LIBADD = @evas_engine_software_8_x11_libs@ +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@includes_HEADERS = Evas_Engine_Software_8_X11.h +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_8_x11/$(MODULE_ARCH) +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@module_la_SOURCES = $(SOFTWARE_8_X11_SOURCES) +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@module_la_LIBADD = @EINA_LIBS@ $(SOFTWARE_8_X11_LIBADD) $(top_builddir)/src/lib/libevas.la +#-lxcb-image -lxcb-shm -lxcb -lpixman-1 +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@module_la_LDFLAGS = -no-undefined -module -avoid-version +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@noinst_LTLIBRARIES = libevas_engine_software_8_x11.la +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@libevas_engine_software_8_x11_la_SOURCES = $(SOFTWARE_8_X11_SOURCES) +@BUILD_ENGINE_SOFTWARE_8_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@libevas_engine_software_8_x11_la_LIBADD = $(SOFTWARE_8_X11_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_8_x11/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/software_8_x11/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_8_x11.la: $(libevas_engine_software_8_x11_la_OBJECTS) $(libevas_engine_software_8_x11_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_software_8_x11_la_rpath) $(libevas_engine_software_8_x11_la_OBJECTS) $(libevas_engine_software_8_x11_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_x_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_x_buffer.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_x_buffer.lo: evas_x_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_x_buffer.lo -MD -MP -MF $(DEPDIR)/module_la-evas_x_buffer.Tpo -c -o module_la-evas_x_buffer.lo `test -f 'evas_x_buffer.c' || echo '$(srcdir)/'`evas_x_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_x_buffer.Tpo $(DEPDIR)/module_la-evas_x_buffer.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_x_buffer.c' object='module_la-evas_x_buffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_x_buffer.lo `test -f 'evas_x_buffer.c' || echo '$(srcdir)/'`evas_x_buffer.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_8_x11/evas_engine.c b/libraries/evas/src/modules/engines/software_8_x11/evas_engine.c new file mode 100644 index 0000000..c8efb24 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_8_x11/evas_engine.c @@ -0,0 +1,699 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_engine.h" +#include "Evas_Engine_Software_8_X11.h" +#include "evas_common_soft8.h" +#include + +int _evas_engine_soft8_x11_log_dom = -1; +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +/* engine struct data */ +typedef struct _Render_Engine Render_Engine; + +struct _Render_Engine { + xcb_connection_t *connection; + xcb_drawable_t drawable; + xcb_screen_t *screen; + unsigned char pal[256]; + int depth; + + int w, h, rot; + Tilebuf *tb; + Tilebuf_Rect *rects; + Tilebuf_Rect *cur_rect; + + X_Output_Buffer *shbuf; + Soft8_Image *tmp_out; /* used by indirect render, like rotation */ + + pixman_region16_t *clip_rects; + unsigned char end:1; + unsigned char shm:1; +}; + +/* prototypes we will use here */ + +static void *eng_info(Evas * e); +static void eng_info_free(Evas * e, void *info); +static int eng_setup(Evas * e, void *info); +static void eng_output_free(void *data); +static void eng_output_resize(void *data, int w, int h); +static void eng_output_tile_size_set(void *data, int w, int h); +static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h); +static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h); +static void eng_output_redraws_clear(void *data); +static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, + int *w, int *h, int *cx, + int *cy, int *cw, int *ch); +static void eng_output_redraws_next_update_push(void *data, void *surface, + int x, int y, int w, int h); +static void eng_output_flush(void *data); +static void eng_output_idle_flush(void *data); + +/* engine api this module provides */ +static void * +eng_info(Evas * e) +{ + Evas_Engine_Info_Software_8_X11 *info; + + info = calloc(1, sizeof(Evas_Engine_Info_Software_8_X11)); + if (!info) + return NULL; + info->magic.magic = rand(); + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; + e = NULL; +} + +static void +eng_info_free(Evas * e __UNUSED__, void *info) +{ + Evas_Engine_Info_Software_8_X11 *in; + in = (Evas_Engine_Info_Software_8_X11 *) info; + free(in); +} + +static void +_tmp_out_alloc(Render_Engine * re) +{ + Tilebuf_Rect *r; + unsigned int w = 0, h = 0; + + EINA_INLIST_FOREACH(re->rects, r) + { + if (r->w > (int)w) + w = r->w; + if (r->h > (int)h) + h = r->h; + } + + if (re->tmp_out) + { + if ((re->tmp_out->cache_entry.w < w) + || (re->tmp_out->cache_entry.h < h)) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } + } + + if (!re->tmp_out) + { + Soft8_Image *im; + + im = (Soft8_Image *) + evas_cache_image_empty(evas_common_soft8_image_cache_get()); + im->cache_entry.flags.alpha = 0; + evas_cache_image_surface_alloc(&im->cache_entry, w, h); + + re->tmp_out = im; + } +} + +static void +alloc_colors(Render_Engine * re) +{ + xcb_alloc_color_cookie_t color_rq[256]; + xcb_alloc_color_reply_t *rep; + xcb_colormap_t colormap = re->screen->default_colormap; + + int i; + for (i = 0; i < 256; i++) + color_rq[i] = + xcb_alloc_color(re->connection, colormap, i << 8, i << 8, i << 8); + + for (i = 0; i < 256; i++) + { + rep = xcb_alloc_color_reply(re->connection, color_rq[i], NULL); + re->pal[i] = rep->pixel; + free(rep); + } +} + +static int +eng_setup(Evas * e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_Software_8_X11 *info; +/* X_Output_Buffer *xob; */ + + info = (Evas_Engine_Info_Software_8_X11 *) in; + if (!e->engine.data.output) + { + /* the only check - simplistic, i know, but enough for this + * "special purpose" engine. Remember it is meant to be used + * for limited power devices that have a 8bit display mode + * and no real other acceleration, and high resolution so we + * can pre-dither into 8bpp. */ +// if (DefaultDepth(info->info.display, +// DefaultScreen(info->info.display)) != 8) +// return; + /* do common routine init - we wil at least use it for core + * image loading and font loading/glyph rendering & placement */ + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + evas_common_soft8_image_init(); + + /* render engine specific data */ + re = calloc(1, sizeof(Render_Engine)); + if (!re) + return 0; + e->engine.data.output = re; + re->connection = info->info.connection; + re->screen = info->info.screen; + re->drawable = info->info.drawable; + re->depth = info->info.depth; + re->w = e->output.w; + re->h = e->output.h; + re->rot = info->info.rotation; + re->tb = evas_common_tilebuf_new(e->output.w, e->output.h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + alloc_colors(re); + } + else + { + /* we changed the info after first init - do a re-eval where + * appropriate */ + re = e->engine.data.output; + if (re->tb) + evas_common_tilebuf_free(re->tb); + re->connection = info->info.connection; + re->screen = info->info.screen; + re->drawable = info->info.drawable; + re->w = e->output.w; + re->h = e->output.h; + re->rot = info->info.rotation; + re->tb = evas_common_tilebuf_new(e->output.w, e->output.h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } + alloc_colors(re); + } + if (!e->engine.data.output) + return 0; + + /* add a draw context if we dont have one */ + if (!e->engine.data.context) + e->engine.data.context = + e->engine.func->context_new(e->engine.data.output); + /* check if the display can do shm */ + re->shm = evas_software_8_x11_x_can_do_shm(re->connection, re->screen); + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *) data; + if (re->shbuf) + evas_software_8_x11_x_output_buffer_free(re->shbuf, 0); + if (re->clip_rects) + { + pixman_region_fini(re->clip_rects); + free(re->clip_rects); + re->clip_rects = NULL; + } + if (re->tb) + evas_common_tilebuf_free(re->tb); + if (re->rects) + evas_common_tilebuf_free_render_rects(re->rects); + if (re->tmp_out) + evas_cache_image_drop(&re->tmp_out->cache_entry); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); + evas_common_soft8_image_shutdown(); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *) data; + + if ((re->w == w) && (re->h == h)) + return; + + evas_common_tilebuf_free(re->tb); + re->w = w; + re->h = h; + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + if (re->shbuf) + { + evas_software_8_x11_x_output_buffer_free(re->shbuf, 0); + re->shbuf = NULL; + } + if (re->clip_rects) + { + pixman_region_fini(re->clip_rects); + free(re->clip_rects); + re->clip_rects = NULL; + } + + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *) data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *) data; + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *) data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *) data; + evas_common_tilebuf_clear(re->tb); +} + +static inline void +_output_buffer_alloc(Render_Engine * re) +{ + int w, h; + if (re->shbuf) + return; + + if ((re->rot == 0) || (re->rot == 180)) + { + w = re->w; + h = re->h; + } + else + { + w = re->h; + h = re->w; + } + + re->shbuf = evas_software_8_x11_x_output_buffer_new + (re->connection, re->screen, re->depth, re->pal, w, h, 1, NULL); + + re->shbuf->drawable = re->drawable; + re->shbuf->screen = re->screen; + if (re->shbuf->gc) + { + xcb_free_gc(re->shbuf->connection, re->shbuf->gc); + re->shbuf->gc = 0; + } + + re->shbuf->gc = xcb_generate_id(re->shbuf->connection); + xcb_create_gc(re->shbuf->connection, re->shbuf->gc, re->shbuf->drawable, 0, + NULL); +} + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, + int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + Tilebuf_Rect *rect; + int ux, uy, uw, uh; + + re = (Render_Engine *) data; + if (re->end) + { + re->end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + if (!re->rects) + return NULL; + + re->cur_rect = re->rects; + _output_buffer_alloc(re); + if (re->rot != 0) + _tmp_out_alloc(re); /* grows if required */ + } + if (!re->cur_rect) + { + if (re->rects) + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + return NULL; + } + rect = re->cur_rect; + ux = rect->x; + uy = rect->y; + uw = rect->w; + uh = rect->h; + re->cur_rect = (Tilebuf_Rect *) ((EINA_INLIST_GET(re->cur_rect))->next); + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = 1; + } + + *x = ux; + *y = uy; + *w = uw; + *h = uh; + if (re->rot == 0) + { + *cx = ux; + *cy = uy; + *cw = uw; + *ch = uh; + return re->shbuf->im; + } + else + { + *cx = 0; + *cy = 0; + *cw = uw; + *ch = uh; + return re->tmp_out; + } +} + +static void +_blit_rot_90(Soft8_Image * dst, const Soft8_Image * src, + int out_x, int out_y, int w, int h) +{ + DATA8 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + (out_x + (w + out_y - 1) * dst->stride); + + for (y = 0; y < h; y++) + { + DATA8 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr -= dst->stride; + } + sp += src->stride; + dp++; + } +} + +static void +_blit_rot_180(Soft8_Image * dst, const Soft8_Image * src, + int out_x, int out_y, int w, int h) +{ + DATA8 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + ((w + out_x - 1) + (h + out_y - 1) * dst->stride); + + for (y = 0; y < h; y++) + { + DATA8 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr--; + } + sp += src->stride; + dp -= dst->stride; + } +} + +static void +_blit_rot_270(Soft8_Image * dst, const Soft8_Image * src, + int out_x, int out_y, int w, int h) +{ + DATA8 *dp, *sp; + int x, y; + + sp = src->pixels; + dp = dst->pixels + ((h + out_x - 1) + out_y * dst->stride); + + for (y = 0; y < h; y++) + { + DATA8 *dp_itr, *sp_itr; + + sp_itr = sp; + dp_itr = dp; + + for (x = 0; x < w; x++) + { + *dp_itr = *sp_itr; + + sp_itr++; + dp_itr += dst->stride; + } + sp += src->stride; + dp--; + } +} + +static void +_tmp_out_process(Render_Engine * re, int out_x, int out_y, int w, int h) +{ + Soft8_Image *d, *s; + + d = re->shbuf->im; + s = re->tmp_out; + + if ((w < 1) || (h < 1) || + (out_x >= (int)d->cache_entry.w) || + (out_y >= (int)d->cache_entry.h)) + return; + + if (re->rot == 90) + _blit_rot_90(d, s, out_x, out_y, w, h); + else if (re->rot == 180) + _blit_rot_180(d, s, out_x, out_y, w, h); + else if (re->rot == 270) + _blit_rot_270(d, s, out_x, out_y, w, h); +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface __UNUSED__, int x, + int y, int w, int h) +{ + Render_Engine *re; + struct { + int x, y, width, height; + } r = + { + 0, 0, 0, 0}; + + re = (Render_Engine *) data; + + if (!re->clip_rects) + { + re->clip_rects = + (pixman_region16_t *) malloc(sizeof(pixman_region16_t)); + pixman_region_init(re->clip_rects); + } + + if (re->rot == 0) + { + r.x = x; + r.y = y; + r.width = w; + r.height = h; + } + else if (re->rot == 90) + { + r.x = y; + r.y = re->w - w - x; + r.width = h; + r.height = w; + } + else if (re->rot == 180) + { + r.x = re->w - w - x; + r.y = re->h - h - y; + r.width = w; + r.height = h; + } + else if (re->rot == 270) + { + r.x = re->h - h - y; + r.y = x; + r.width = h; + r.height = w; + } + + if (re->rot != 0) + _tmp_out_process(re, r.x, r.y, w, h); + + pixman_region_union_rect(re->clip_rects, re->clip_rects, + r.x, r.y, r.width, r.height); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *) data; + + if (re->clip_rects) + { + re->shbuf->drawable = re->drawable; + { + int i; + pixman_box16_t *rects = + pixman_region_rectangles(re->clip_rects, NULL); + for (i = 0; i < pixman_region_n_rects(re->clip_rects); i++, rects++) + evas_software_8_x11_x_output_buffer_paste + (re->shbuf, re->drawable, re->shbuf->gc, rects->x1, rects->y1, + rects->x2 - rects->x1, rects->y2 - rects->y1, 1); + } + + pixman_region_fini(re->clip_rects); + free(re->clip_rects); + re->clip_rects = NULL; + } +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *) data; + if (re->shbuf) + { + evas_software_8_x11_x_output_buffer_free(re->shbuf, 0); + re->shbuf = NULL; + } + if (re->clip_rects) + { + pixman_region_fini(re->clip_rects); + free(re->clip_rects); + re->clip_rects = NULL; + } + if (re->tmp_out) + { + evas_cache_image_drop(&re->tmp_out->cache_entry); + re->tmp_out = NULL; + } +} + +static Eina_Bool +eng_canvas_alpha_get(void *data __UNUSED__, void *context __UNUSED__) +{ + return EINA_FALSE; +} + +/* module advertising code */ +static int +module_open(Evas_Module * em) +{ + if (!em) + return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_8")) + return 0; + _evas_engine_soft8_x11_log_dom = eina_log_domain_register + ("evas-software_8_x11", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_soft8_x11_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module * em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_soft8_x11_log_dom); +} + +static Evas_Module_Api evas_modapi = { + EVAS_MODULE_API_VERSION, + "software_8_x11", + "none", + { + module_open, + module_close} +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_8_x11); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_8_X11 +EVAS_EINA_MODULE_DEFINE(engine, software_8_x11); +#endif diff --git a/libraries/evas/src/modules/engines/software_8_x11/evas_engine.h b/libraries/evas/src/modules/engines/software_8_x11/evas_engine.h new file mode 100644 index 0000000..1fa12df --- /dev/null +++ b/libraries/evas/src/modules/engines/software_8_x11/evas_engine.h @@ -0,0 +1,65 @@ +#ifndef EVAS_ENGINE_H +#define EVAS_ENGINE_H + +#include +#include + +#include +#include +#include + +#include "evas_common.h" +#include "evas_common_soft8.h" + +extern int _evas_engine_soft8_x11_log_dom; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft8_x11_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft8_x11_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft8_x11_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft8_x11_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft8_x11_log_dom, __VA_ARGS__) + +typedef struct _X_Output_Buffer X_Output_Buffer; + +struct _X_Output_Buffer +{ + Soft8_Image *im; + xcb_connection_t *connection; + xcb_screen_t *screen; + xcb_image_t *xim; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + xcb_shm_segment_info_t *shm_info; + unsigned char *pal; + void *data; +}; + +/****/ +int evas_software_8_x11_x_can_do_shm (xcb_connection_t *c, xcb_screen_t *screen); +X_Output_Buffer *evas_software_8_x11_x_output_buffer_new (xcb_connection_t *, xcb_screen_t *screen, int depth, unsigned char *pal, int w, int h, int try_shm, void *data); +void evas_software_8_x11_x_output_buffer_free (X_Output_Buffer *xob, int sync); +void evas_software_8_x11_x_output_buffer_paste (X_Output_Buffer *xob, xcb_drawable_t d, xcb_gcontext_t gc, int x, int y, int w, int h, int sync); +DATA8 *evas_software_8_x11_x_output_buffer_data (X_Output_Buffer *xob, int *bytes_per_line_ret); +int evas_software_8_x11_x_output_buffer_depth (X_Output_Buffer *xob); +int evas_software_8_x11_x_output_buffer_byte_order (X_Output_Buffer *xob); +int evas_software_8_x11_x_output_buffer_bit_order (X_Output_Buffer *xob); + +#endif diff --git a/libraries/evas/src/modules/engines/software_8_x11/evas_x_buffer.c b/libraries/evas/src/modules/engines/software_8_x11/evas_x_buffer.c new file mode 100644 index 0000000..a2c40b1 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_8_x11/evas_x_buffer.c @@ -0,0 +1,243 @@ +#include "evas_common.h" +#include "evas_engine.h" + +static int _xcb_err = 0; + +int +evas_software_8_x11_x_can_do_shm(xcb_connection_t * c, xcb_screen_t * screen) +{ + static xcb_connection_t *cached_c = NULL; + static int cached_result = 0; + + if (c == cached_c) + return cached_result; + cached_c = c; + + if (xcb_get_extension_data(c, &xcb_shm_id)) + { + X_Output_Buffer *xob; + + xob = evas_software_8_x11_x_output_buffer_new + (c, screen, screen->root_depth, (unsigned char *)NULL, + 16, 16, 2, NULL); + if (!xob) + { + cached_result = 0; + return 0; + } + evas_software_8_x11_x_output_buffer_free(xob, 1); + cached_result = 1; + return 1; + } + cached_result = 0; + return 0; +} + +X_Output_Buffer * +evas_software_8_x11_x_output_buffer_new(xcb_connection_t * c, + xcb_screen_t * s, + int depth, + unsigned char *pal, + int w, int h, int try_shm, void *data) +{ + X_Output_Buffer *xob; + + xob = calloc(1, sizeof(X_Output_Buffer)); + if (!xob) + return NULL; + + xob->connection = c; + xob->screen = s; + xob->xim = NULL; + xob->shm_info = NULL; + xob->pal = pal; + + if (try_shm > 0) + { + xob->shm_info = malloc(sizeof(xcb_shm_segment_info_t)); + if (xob->shm_info) + { + xob->shm_info->shmseg = xcb_generate_id(c); + xob->xim = xcb_image_create_native(c, w, h, + XCB_IMAGE_FORMAT_Z_PIXMAP, + depth, NULL, ~0, NULL); + if (xob->xim) + { + int shmid = shmget + (IPC_PRIVATE, xob->xim->size, IPC_CREAT | 0777); + + if (shmid >= 0) + { + xob->shm_info->shmid = shmid; + xob->shm_info->shmaddr = xob->xim->data = + shmat(xob->shm_info->shmid, 0, 0); + + if (xob->shm_info->shmaddr) + { + /* + * FIXME: no error mechanism + */ + + /* XErrorHandler ph; */ + /* EventHandlers eh; */ + + free(xcb_get_input_focus_reply + (c, xcb_get_input_focus_unchecked(c), NULL)); + _xcb_err = 0; + /* ph = XSetErrorHandler((XErrorHandler) */ + /* x_output_tmp_x_err); */ + xcb_shm_attach(c, + xob->shm_info->shmseg, + xob->shm_info->shmid, 0); + free(xcb_get_input_focus_reply + (c, xcb_get_input_focus_unchecked(c), NULL)); + /* XSetErrorHandler((XErrorHandler)ph); */ + if (!_xcb_err) + { + xob->im = + (Soft8_Image *) + evas_cache_image_data + (evas_common_soft8_image_cache_get(), w, h, + (DATA32 *) xob->xim->data, 0, + EVAS_COLORSPACE_GRY8); + + if (xob->im) + xob->im->stride = + xob->xim->stride / sizeof(DATA8); + return xob; + } + } + shmdt(xob->shm_info->shmaddr); + shmctl(xob->shm_info->shmid, IPC_RMID, 0); + } + if (xob->xim) + xcb_image_destroy(xob->xim); + xob->xim = NULL; + } + if (xob->shm_info) + free(xob->shm_info); + xob->shm_info = NULL; + } + } + + if (try_shm > 1) + return NULL; + + xob->xim = xcb_image_create_native(c, w, h, XCB_IMAGE_FORMAT_Z_PIXMAP, + depth, NULL, ~0, NULL); + if (!xob->xim) + { + free(xob); + return NULL; + } + + xob->data = data; + + if (!xob->xim->data) + { + xob->xim->data = malloc(xob->xim->stride * xob->xim->height); + if (!xob->xim->data) + { + xcb_image_destroy(xob->xim); + free(xob); + return NULL; + } + } + if (xob->im) + evas_cache_image_drop(&xob->im->cache_entry); + + xob->im = + (Soft8_Image *) + evas_cache_image_data(evas_common_soft8_image_cache_get(), w, h, + (DATA32 *) xob->xim->data, 0, + EVAS_COLORSPACE_GRY8); + if (xob->im) + xob->im->stride = xob->xim->stride / sizeof(DATA8); + return xob; +} + +void +evas_software_8_x11_x_output_buffer_free(X_Output_Buffer * xob, int sync) +{ + if (xob->shm_info) + { + if (sync) + free(xcb_get_input_focus_reply(xob->connection, + xcb_get_input_focus_unchecked(xob-> + connection), + NULL)); + xcb_shm_detach(xob->connection, xob->shm_info->shmseg); + xcb_image_destroy(xob->xim); + shmdt(xob->shm_info->shmaddr); + shmctl(xob->shm_info->shmid, IPC_RMID, 0); + free(xob->shm_info); + } + else + { + if (xob->data) + xob->xim->data = NULL; + free(xob->xim->data); + xcb_image_destroy(xob->xim); + } + free(xob); +} + +void +evas_software_8_x11_x_output_buffer_paste(X_Output_Buffer * xob, + xcb_drawable_t d, + xcb_gcontext_t gc, + int x, int y, int w, int h, int sync) +{ + unsigned char *data; + int i, j; + + if (xob->shm_info) + { + for (i = y; i < y + h; i++) + { + data = xob->xim->data + i * xob->xim->width + x; + for (j = x; j < x + w; j++, data++) + *data = xob->pal[*data]; + } + + xcb_image_shm_put(xob->connection, d, gc, + xob->xim, *xob->shm_info, x, y, x, y, w, h, 0); + + if (sync) + free(xcb_get_input_focus_reply(xob->connection, + xcb_get_input_focus_unchecked(xob-> + connection), + NULL)); + } + else + { + xcb_image_put(xob->connection, d, gc, xob->xim, x, y, 0); + } +} + +DATA8 * +evas_software_8_x11_x_output_buffer_data(X_Output_Buffer * xob, + int *bytes_per_line_ret) +{ + if (bytes_per_line_ret) + *bytes_per_line_ret = xob->xim->stride; + return (DATA8 *) xob->xim->data; +} + +int +evas_software_8_x11_x_output_buffer_depth(X_Output_Buffer * xob) +{ + return xob->xim->bpp; +} + +int +evas_software_8_x11_x_output_buffer_byte_order(X_Output_Buffer * xob) +{ + return xob->xim->byte_order; +} + +int +evas_software_8_x11_x_output_buffer_bit_order(X_Output_Buffer * xob) +{ + return xob->xim->bit_order; +} diff --git a/libraries/evas/src/modules/engines/software_ddraw/Evas_Engine_Software_DDraw.h b/libraries/evas/src/modules/engines/software_ddraw/Evas_Engine_Software_DDraw.h new file mode 100644 index 0000000..9735bb7 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_ddraw/Evas_Engine_Software_DDraw.h @@ -0,0 +1,30 @@ +#ifndef __EVAS_ENGINE_SOFTWARE_DDRAW_H__ +#define __EVAS_ENGINE_SOFTWARE_DDRAW_H__ + + +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN + + +typedef struct _Evas_Engine_Info_Software_DDraw Evas_Engine_Info_Software_DDraw; + +struct _Evas_Engine_Info_Software_DDraw +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + struct { + HWND window; + int depth; + int rotation; + unsigned int fullscreen : 1; + } info; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; + + +#endif /* __EVAS_ENGINE_SOFTWARE_DDRAW_H__ */ diff --git a/libraries/evas/src/modules/engines/software_ddraw/Makefile.am b/libraries/evas/src/modules/engines/software_ddraw/Makefile.am new file mode 100644 index 0000000..594c7ab --- /dev/null +++ b/libraries/evas/src/modules/engines/software_ddraw/Makefile.am @@ -0,0 +1,48 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_software_ddraw_cflags@ + +if BUILD_ENGINE_SOFTWARE_DDRAW + +SOFTWARE_DDRAW_SOURCES = \ +evas_engine.c \ +evas_outbuf.c \ +evas_ddraw_buffer.c \ +evas_ddraw_main.cpp + +SOFTWARE_DDRAW_LIBADD = @evas_engine_software_ddraw_libs@ + + +includes_HEADERS = Evas_Engine_Software_DDraw.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_SOFTWARE_DDRAW + +pkgdir = $(libdir)/evas/modules/engines/software_ddraw/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = $(SOFTWARE_DDRAW_SOURCES) +module_la_CXXFLAGS = -fno-rtti -fno-exceptions +module_la_LIBADD = @EINA_LIBS@ $(SOFTWARE_DDRAW_LIBADD) $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_software_ddraw.la + +libevas_engine_software_ddraw_la_SOURCES = $(SOFTWARE_DDRAW_SOURCES) +libevas_engine_software_ddraw_la_LIBADD = $(SOFTWARE_DDRAW_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/software_ddraw/Makefile.in b/libraries/evas/src/modules/engines/software_ddraw/Makefile.in new file mode 100644 index 0000000..be4c977 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_ddraw/Makefile.in @@ -0,0 +1,880 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/software_ddraw +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@libevas_engine_software_ddraw_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_software_ddraw_la_SOURCES_DIST = evas_engine.c \ + evas_outbuf.c evas_ddraw_buffer.c evas_ddraw_main.cpp +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@ evas_outbuf.lo \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@ evas_ddraw_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@ evas_ddraw_main.lo +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am_libevas_engine_software_ddraw_la_OBJECTS = $(am__objects_1) +libevas_engine_software_ddraw_la_OBJECTS = \ + $(am_libevas_engine_software_ddraw_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am_libevas_engine_software_ddraw_la_rpath = +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_outbuf.c \ + evas_ddraw_buffer.c evas_ddraw_main.cpp +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@am__objects_2 = \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@ module_la-evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@ module_la-evas_outbuf.lo \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@ module_la-evas_ddraw_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@ module_la-evas_ddraw_main.lo +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(module_la_CXXFLAGS) $(CXXFLAGS) $(module_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_ddraw_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_software_ddraw_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Software_DDraw.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_software_ddraw_cflags@ + +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@SOFTWARE_DDRAW_SOURCES = \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@evas_engine.c \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@evas_outbuf.c \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@evas_ddraw_buffer.c \ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@evas_ddraw_main.cpp + +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@SOFTWARE_DDRAW_LIBADD = @evas_engine_software_ddraw_libs@ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@includes_HEADERS = Evas_Engine_Software_DDraw.h +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_ddraw/$(MODULE_ARCH) +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@module_la_SOURCES = $(SOFTWARE_DDRAW_SOURCES) +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@module_la_CXXFLAGS = -fno-rtti -fno-exceptions +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@module_la_LIBADD = @EINA_LIBS@ $(SOFTWARE_DDRAW_LIBADD) $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@noinst_LTLIBRARIES = libevas_engine_software_ddraw.la +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@libevas_engine_software_ddraw_la_SOURCES = $(SOFTWARE_DDRAW_SOURCES) +@BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@libevas_engine_software_ddraw_la_LIBADD = $(SOFTWARE_DDRAW_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_ddraw/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/software_ddraw/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_ddraw.la: $(libevas_engine_software_ddraw_la_OBJECTS) $(libevas_engine_software_ddraw_la_DEPENDENCIES) + $(AM_V_CXXLD)$(CXXLINK) $(am_libevas_engine_software_ddraw_la_rpath) $(libevas_engine_software_ddraw_la_OBJECTS) $(libevas_engine_software_ddraw_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CXXLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_ddraw_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_ddraw_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_outbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_ddraw_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_ddraw_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_outbuf.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_outbuf.lo: evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_outbuf.lo -MD -MP -MF $(DEPDIR)/module_la-evas_outbuf.Tpo -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_outbuf.Tpo $(DEPDIR)/module_la-evas_outbuf.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_outbuf.c' object='module_la-evas_outbuf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c + +module_la-evas_ddraw_buffer.lo: evas_ddraw_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_ddraw_buffer.lo -MD -MP -MF $(DEPDIR)/module_la-evas_ddraw_buffer.Tpo -c -o module_la-evas_ddraw_buffer.lo `test -f 'evas_ddraw_buffer.c' || echo '$(srcdir)/'`evas_ddraw_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_ddraw_buffer.Tpo $(DEPDIR)/module_la-evas_ddraw_buffer.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_ddraw_buffer.c' object='module_la-evas_ddraw_buffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_ddraw_buffer.lo `test -f 'evas_ddraw_buffer.c' || echo '$(srcdir)/'`evas_ddraw_buffer.c + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +module_la-evas_ddraw_main.lo: evas_ddraw_main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -MT module_la-evas_ddraw_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_ddraw_main.Tpo -c -o module_la-evas_ddraw_main.lo `test -f 'evas_ddraw_main.cpp' || echo '$(srcdir)/'`evas_ddraw_main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_ddraw_main.Tpo $(DEPDIR)/module_la-evas_ddraw_main.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='evas_ddraw_main.cpp' object='module_la-evas_ddraw_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(module_la_CXXFLAGS) $(CXXFLAGS) -c -o module_la-evas_ddraw_main.lo `test -f 'evas_ddraw_main.cpp' || echo '$(srcdir)/'`evas_ddraw_main.cpp + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_buffer.c b/libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_buffer.c new file mode 100644 index 0000000..7ef9211 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_buffer.c @@ -0,0 +1,92 @@ +#include + +#include "evas_common.h" +#include "evas_engine.h" + + +DD_Output_Buffer * +evas_software_ddraw_output_buffer_new(int depth, + int width, + int height, + void *data) +{ + DD_Output_Buffer *ddob; + + ddob = calloc(1, sizeof(DD_Output_Buffer)); + if (!ddob) return NULL; + + ddob->data = data; + ddob->depth = depth; + ddob->width = width; + ddob->height = height; + ddob->pitch = width * depth / 8; + ddob->psize = ddob->pitch * height; + + if (!ddob->data) + { + ddob->data = malloc(ddob->pitch * height); + if (!ddob->data) + { + free(ddob); + return NULL; + } + } + + return ddob; +} + +void +evas_software_ddraw_output_buffer_free(DD_Output_Buffer *ddob) +{ + if (ddob->data) free(ddob->data); + free(ddob); +} + +void +evas_software_ddraw_output_buffer_paste(DD_Output_Buffer *ddob, + void *ddraw_data, + int ddraw_width, + int ddraw_height, + int ddraw_pitch, + int ddraw_depth, + int x, + int y) +{ + DATA8 *dd_data; + DATA8 *evas_data; + int width; + int height; + int pitch; + int j; + + if ((x >= ddraw_width) || (y >= ddraw_height)) + return; + + /* compute the size of the data to copy on the back surface */ + width = ((x + ddob->width) > ddraw_width) + ? ddraw_width - x + : ddob->width; + height = ((y + ddob->height) > ddraw_height) + ? ddraw_height - y + : ddob->height; + pitch = width * ddob->depth / 8; + + dd_data = (DATA8 *)ddraw_data + y * ddraw_pitch + x * ddraw_depth; + evas_data = (unsigned char *)ddob->data; + for (j = 0; j < height; j++, evas_data += ddob->pitch, dd_data += ddraw_pitch) + memcpy(dd_data, evas_data, pitch); +} + +DATA8 * +evas_software_ddraw_output_buffer_data(DD_Output_Buffer *ddob, + int *bytes_per_line_ret) +{ + if (bytes_per_line_ret) *bytes_per_line_ret = ddob->pitch; + return ddob->data; +} + +int +evas_software_ddraw_output_buffer_depth(DD_Output_Buffer *ddob) +{ + return ddob->depth; +} diff --git a/libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_main.cpp b/libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_main.cpp new file mode 100644 index 0000000..2c467c8 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_main.cpp @@ -0,0 +1,248 @@ +#include "evas_common.h" +#include "evas_engine.h" + +int +evas_software_ddraw_init (HWND window, + int depth, + int fullscreen, + Outbuf *buf) +{ + DDSURFACEDESC surface_desc; + DDPIXELFORMAT pixel_format; + HRESULT res; + int width; + int height; + + if (!buf) + return 0; + + buf->priv.dd.window = window; + + res = DirectDrawCreate(NULL, &buf->priv.dd.object, NULL); + if (FAILED(res)) + return 0; + + if (buf->priv.dd.fullscreen) + { + DDSCAPS caps; + + res = buf->priv.dd.object->SetCooperativeLevel(window, + DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); + if (FAILED(res)) + goto release_object; + + width = GetSystemMetrics(SM_CXSCREEN); + height = GetSystemMetrics(SM_CYSCREEN); + + ZeroMemory(&pixel_format, sizeof(pixel_format)); + pixel_format.dwSize = sizeof(pixel_format); + buf->priv.dd.surface_primary->GetPixelFormat(&pixel_format); + + if (pixel_format.dwRGBBitCount != (DWORD)depth) + goto release_object; + + buf->priv.dd.depth = depth; + + res = buf->priv.dd.object->SetDisplayMode(width, height, depth); + if (FAILED(res)) + goto release_object; + + memset(&surface_desc, 0, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + surface_desc.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT; + surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_COMPLEX; + surface_desc.dwBackBufferCount = 1; + + res = buf->priv.dd.object->CreateSurface(&surface_desc, + &buf->priv.dd.surface_primary, NULL); + if (FAILED(res)) + goto release_object; + + caps.dwCaps = DDSCAPS_BACKBUFFER; + res = buf->priv.dd.surface_primary->GetAttachedSurface(&caps, + &buf->priv.dd.surface_back); + if (FAILED(res)) + goto release_surface_primary; + } + else + { + RECT rect; + + if (!GetClientRect(window, &rect)) + goto release_object; + + width = rect.right - rect.left; + height = rect.bottom - rect.top; + + res = buf->priv.dd.object->SetCooperativeLevel(window, DDSCL_NORMAL); + if (FAILED(res)) + goto release_object; + + res = buf->priv.dd.object->CreateClipper(0, &buf->priv.dd.clipper, NULL); + if (FAILED(res)) + goto release_object; + + res = buf->priv.dd.clipper->SetHWnd(0, window); + if (FAILED(res)) + goto release_clipper; + + memset(&surface_desc, 0, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + surface_desc.dwFlags = DDSD_CAPS; + surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + + res = buf->priv.dd.object->CreateSurface(&surface_desc, &buf->priv.dd.surface_primary, NULL); + if (FAILED(res)) + goto release_clipper; + + res = buf->priv.dd.surface_primary->SetClipper(buf->priv.dd.clipper); + if (FAILED(res)) + goto release_surface_primary; + + memset (&surface_desc, 0, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + surface_desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; + surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + surface_desc.dwWidth = width; + surface_desc.dwHeight = height; + + res = buf->priv.dd.object->CreateSurface(&surface_desc, &buf->priv.dd.surface_back, NULL); + if (FAILED(res)) + goto release_surface_primary; + + ZeroMemory(&pixel_format, sizeof(pixel_format)); + pixel_format.dwSize = sizeof(pixel_format); + buf->priv.dd.surface_primary->GetPixelFormat(&pixel_format); + + if (pixel_format.dwRGBBitCount != (DWORD)depth) + goto release_surface_back; + + buf->priv.dd.depth = depth; + } + + return 1; + + release_surface_back: + buf->priv.dd.surface_back->Release(); + release_surface_primary: + buf->priv.dd.surface_primary->Release(); + release_clipper: + if (!buf->priv.dd.fullscreen) + buf->priv.dd.clipper->Release(); + release_object: + buf->priv.dd.object->Release(); + + return 0; +} + +void +evas_software_ddraw_shutdown(Outbuf *buf) +{ + if (!buf) + return; + + if (buf->priv.dd.fullscreen) + if (buf->priv.dd.surface_back) + buf->priv.dd.surface_back->Release(); + if (buf->priv.dd.surface_primary) + buf->priv.dd.surface_primary->Release(); + if (!buf->priv.dd.fullscreen) + if (buf->priv.dd.clipper) + buf->priv.dd.clipper->Release(); + if (buf->priv.dd.object) + buf->priv.dd.object->Release(); +} + +int +evas_software_ddraw_masks_get(Outbuf *buf) +{ + DDPIXELFORMAT pixel_format; + + ZeroMemory(&pixel_format, sizeof(pixel_format)); + pixel_format.dwSize = sizeof(pixel_format); + + if (FAILED(buf->priv.dd.surface_primary->GetPixelFormat(&pixel_format))) + return 0; + + buf->priv.mask.r = pixel_format.dwRBitMask; + buf->priv.mask.g = pixel_format.dwGBitMask; + buf->priv.mask.b = pixel_format.dwBBitMask; + + return 1; +} + +void * +evas_software_ddraw_lock(Outbuf *buf, + int *ddraw_width, + int *ddraw_height, + int *ddraw_pitch, + int *ddraw_depth) +{ + DDSURFACEDESC surface_desc; + + ZeroMemory(&surface_desc, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + + if (FAILED(buf->priv.dd.surface_back->Lock(NULL, + &surface_desc, + DDLOCK_WAIT | DDLOCK_WRITEONLY | DDLOCK_SURFACEMEMORYPTR | DDLOCK_NOSYSLOCK, + NULL))) + return NULL; + + *ddraw_width = surface_desc.dwWidth; + *ddraw_height = surface_desc.dwHeight; + *ddraw_pitch = surface_desc.lPitch; + *ddraw_depth = surface_desc.ddpfPixelFormat.dwRGBBitCount >> 3; + + return surface_desc.lpSurface; +} + +void +evas_software_ddraw_unlock_and_flip(Outbuf *buf) +{ + RECT dst_rect; + RECT src_rect; + POINT p; + + if (FAILED(buf->priv.dd.surface_back->Unlock(NULL))) + return; + + /* we figure out where on the primary surface our window lives */ + p.x = 0; + p.y = 0; + ClientToScreen(buf->priv.dd.window, &p); + GetClientRect(buf->priv.dd.window, &dst_rect); + OffsetRect(&dst_rect, p.x, p.y); + SetRect(&src_rect, 0, 0, buf->width, buf->height); + + /* nothing to do if the function fails, so we don't check the result */ + buf->priv.dd.surface_primary->Blt(&dst_rect, + buf->priv.dd.surface_back, + &src_rect, + DDBLT_WAIT, NULL); +} + +void +evas_software_ddraw_surface_resize(Outbuf *buf) +{ + DDSURFACEDESC surface_desc; + + buf->priv.dd.surface_back->Release(); + memset (&surface_desc, 0, sizeof (surface_desc)); + surface_desc.dwSize = sizeof (surface_desc); + /* FIXME: that code does not compile. Must know why */ +#if 0 + surface_desc.dwFlags = DDSD_HEIGHT | DDSD_WIDTH; + surface_desc.dwWidth = width; + surface_desc.dwHeight = height; + buf->priv.dd.surface_back->SetSurfaceDesc(&surface_desc, NULL); +#else + surface_desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; + surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + surface_desc.dwWidth = buf->width; + surface_desc.dwHeight = buf->height; + buf->priv.dd.object->CreateSurface(&surface_desc, + &buf->priv.dd.surface_back, + NULL); +#endif +} diff --git a/libraries/evas/src/modules/engines/software_ddraw/evas_engine.c b/libraries/evas/src/modules/engines/software_ddraw/evas_engine.c new file mode 100644 index 0000000..5bfc87f --- /dev/null +++ b/libraries/evas/src/modules/engines/software_ddraw/evas_engine.c @@ -0,0 +1,379 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_engine.h" +#include "Evas_Engine_Software_DDraw.h" + +int _evas_engine_soft_ddraw_log_dom = -1; +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +/* engine struct data */ +typedef struct _Render_Engine Render_Engine; + +struct _Render_Engine +{ + Tilebuf *tb; + Outbuf *ob; + Tilebuf_Rect *rects; + Eina_Inlist *cur_rect; + int end : 1; +}; + + +/* log domain variable */ +int _evas_log_dom_module = -1; + + +static void * +_output_setup(int width, + int height, + int rot, + HWND window, + int depth, + int fullscreen) +{ + Render_Engine *re; + + re = calloc(1, sizeof(Render_Engine)); + if (!re) + return NULL; + + /* if we haven't initialized - init (automatic abort if already done) */ + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + + evas_software_ddraw_outbuf_init(); + + re->ob = evas_software_ddraw_outbuf_setup(width, height, rot, + OUTBUF_DEPTH_INHERIT, + window, depth, fullscreen); + if (!re->ob) + { + free(re); + return NULL; + } + + /* for updates return 1 big buffer, but only use portions of it, also cache + it and keep it around until an idle_flush */ + /* disable for now - i am hunting down why some expedite tests are slower, + * as well as shaped stuff is broken and probable non-32bpp is broken as + * convert funcs dont do the right thing + * + re->ob->onebuf = 1; + */ + + re->tb = evas_common_tilebuf_new(width, height); + if (!re->tb) + { + evas_software_ddraw_outbuf_free(re->ob); + free(re); + return NULL; + } + /* in preliminary tests 16x16 gave highest framerates */ + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + + return re; +} + + +/* engine api this module provides */ + +static void * +eng_info(Evas *e) +{ + Evas_Engine_Info_Software_DDraw *info; + + info = calloc(1, sizeof(Evas_Engine_Info_Software_DDraw)); + if (!info) return NULL; + info->magic.magic = rand(); + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; + e = NULL; +} + +static void +eng_info_free(Evas *e, void *info) +{ + Evas_Engine_Info_Software_DDraw *in; + in = (Evas_Engine_Info_Software_DDraw *)info; + free(in); +} + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_Software_DDraw *info; + + info = (Evas_Engine_Info_Software_DDraw *)in; + if (!e->engine.data.output) + e->engine.data.output = _output_setup(e->output.w, + e->output.h, + info->info.rotation, + info->info.window, + info->info.depth, + info->info.fullscreen); + else + { + int ponebuf = 0; + + re = e->engine.data.output; + ponebuf = re->ob->onebuf; + evas_software_ddraw_outbuf_free(re->ob); + re->ob = evas_software_ddraw_outbuf_setup(e->output.w, + e->output.h, + info->info.rotation, + OUTBUF_DEPTH_INHERIT, + info->info.window, + info->info.depth, + info->info.fullscreen); + re->ob->onebuf = ponebuf; + } + if (!e->engine.data.output) return 0; + if (!e->engine.data.context) + e->engine.data.context = e->engine.func->context_new(e->engine.data.output); + + re = e->engine.data.output; + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + if (!data) return; + + re = (Render_Engine *)data; + evas_software_ddraw_outbuf_free(re->ob); + evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); +} + +static void +eng_output_resize(void *data, int width, int height) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_software_ddraw_outbuf_reconfigure(re->ob, + width, + height, + evas_software_ddraw_outbuf_rot_get(re->ob), + OUTBUF_DEPTH_INHERIT); + evas_common_tilebuf_free(re->tb); + re->tb = evas_common_tilebuf_new(width, height); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +} + +static void * +eng_output_redraws_next_update_get(void *data, + int *x, + int *y, + int *w, + int *h, + int *cx, + int *cy, + int *cw, + int *ch) +{ + Render_Engine *re; + RGBA_Image *surface; + Tilebuf_Rect *rect; + int ux; + int uy; + int uw; + int uh; + + re = (Render_Engine *)data; + if (re->end) + { + re->end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + re->cur_rect = EINA_INLIST_GET(re->rects); + } + if (!re->cur_rect) return NULL; + rect = (Tilebuf_Rect *)re->cur_rect; + ux = rect->x; + uy = rect->y; + uw = rect->w; + uh = rect->h; + re->cur_rect = re->cur_rect->next; + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = 1; + } + + surface = evas_software_ddraw_outbuf_new_region_for_update(re->ob, + ux, + uy, + uw, + uh, + cx, + cy, + cw, + ch); + + *x = ux; + *y = uy; + *w = uw; + *h = uh; + + return surface; +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +#ifdef BUILD_PIPE_RENDER + evas_common_pipe_map_begin(surface); +#endif + evas_software_ddraw_outbuf_push_updated_region(re->ob, surface, x, y, w, h); + evas_software_ddraw_outbuf_free_region_for_update(re->ob, surface); + evas_common_cpu_end_opt(); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_software_ddraw_outbuf_flush(re->ob); +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_software_ddraw_outbuf_idle_flush(re->ob); +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *context) +{ + return EINA_FALSE; +} + +/* module advertising code */ +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + _evas_log_dom_module = eina_log_domain_register + ("evas-software_ddraw", EVAS_DEFAULT_LOG_COLOR); + if (_evas_log_dom_module < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em) +{ + eina_log_domain_unregister(_evas_log_dom_module); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "software_ddraw", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_ddraw); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_DDRAW +EVAS_EINA_MODULE_DEFINE(engine, software_ddraw); +#endif diff --git a/libraries/evas/src/modules/engines/software_ddraw/evas_engine.h b/libraries/evas/src/modules/engines/software_ddraw/evas_engine.h new file mode 100644 index 0000000..2f59170 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_ddraw/evas_engine.h @@ -0,0 +1,220 @@ +#ifndef __EVAS_ENGINE_H__ +#define __EVAS_ENGINE_H__ + + +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN +#include + +typedef struct _Outbuf Outbuf; +typedef struct _Outbuf_Region Outbuf_Region; +typedef struct _DD_Output_Buffer DD_Output_Buffer; + +enum _Outbuf_Depth +{ + OUTBUF_DEPTH_NONE, + OUTBUF_DEPTH_INHERIT, + OUTBUF_DEPTH_RGB_16BPP_565_565_DITHERED, + OUTBUF_DEPTH_RGB_16BPP_555_555_DITHERED, + OUTBUF_DEPTH_RGB_16BPP_444_444_DITHERED, + OUTBUF_DEPTH_RGB_16BPP_565_444_DITHERED, + OUTBUF_DEPTH_RGB_32BPP_888_8888, + OUTBUF_DEPTH_LAST +}; + +typedef enum _Outbuf_Depth Outbuf_Depth; + +struct _Outbuf +{ + Outbuf_Depth depth; + int width; + int height; + int rot; + int onebuf; + + struct { + Convert_Pal *pal; + struct { + HWND window; + LPDIRECTDRAW object; + LPDIRECTDRAWSURFACE surface_primary; + LPDIRECTDRAWSURFACE surface_back; + LPDIRECTDRAWCLIPPER clipper; + int depth; + unsigned char fullscreen : 1; + unsigned char swap : 1; + unsigned char bit_swap : 1; + } dd; + struct { + DATA32 r, g, b; + } mask; + + /* 1 big buffer for updates - flush on idle_flush */ + RGBA_Image *onebuf; + Eina_List *onebuf_regions; + + /* a list of pending regions to write to the target */ + Eina_List *pending_writes; + /* a list of previous frame pending regions to write to the target */ + Eina_List *prev_pending_writes; + + unsigned char mask_dither : 1; + unsigned char destination_alpha : 1; + unsigned char debug : 1; + unsigned char synced : 1; + } priv; +}; + +struct _Outbuf_Region +{ + DD_Output_Buffer *ddob; + int x; + int y; + int width; + int height; +}; + +struct _DD_Output_Buffer +{ + void *data; + int width; + int height; + int depth; + int pitch; + int psize; +}; + +extern int _evas_log_dom_module; + +#ifdef EVAS_DEFAULT_LOG_COLOR +# undef EVAS_DEFAULT_LOG_COLOR +#endif +#define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_CYAN +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_log_dom_module, __VA_ARGS__) +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_log_dom_module, __VA_ARGS__) +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_log_dom_module, __VA_ARGS__) +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_log_dom_module, __VA_ARGS__) +#ifdef CRT +# undef CRT +#endif +#define CRT(...) EINA_LOG_DOM_CRIT(_evas_log_dom_module, __VA_ARGS__) + +/* evas_outbuf.c */ + +void evas_software_ddraw_outbuf_init(void); + +void evas_software_ddraw_outbuf_free(Outbuf *buf); + +Outbuf *evas_software_ddraw_outbuf_setup(int width, + int height, + int rotation, + Outbuf_Depth depth, + HWND window, + int w_depth, + int fullscreen); + +void evas_software_ddraw_outbuf_reconfigure(Outbuf *buf, + int width, + int height, + int rotation, + Outbuf_Depth depth); + +RGBA_Image *evas_software_ddraw_outbuf_new_region_for_update(Outbuf *buf, + int x, + int y, + int w, + int h, + int *cx, + int *cy, + int *cw, + int *ch); + +void evas_software_ddraw_outbuf_push_updated_region(Outbuf *buf, + RGBA_Image *update, + int x, + int y, + int w, + int h); + +void evas_software_ddraw_outbuf_free_region_for_update(Outbuf *buf, + RGBA_Image *update); + +void evas_software_ddraw_outbuf_flush(Outbuf *buf); + +void evas_software_ddraw_outbuf_idle_flush(Outbuf *buf); + +int evas_software_ddraw_outbuf_width_get(Outbuf *buf); + +int evas_software_ddraw_outbuf_height_get(Outbuf *buf); + +Outbuf_Depth evas_software_ddraw_outbuf_depth_get(Outbuf *buf); + +int evas_software_ddraw_outbuf_rot_get(Outbuf *buf); + +/* evas_ddraw_buffer.c */ + +DD_Output_Buffer *evas_software_ddraw_output_buffer_new(int depth, + int width, + int height, + void *data); + +void evas_software_ddraw_output_buffer_free(DD_Output_Buffer *ddob); + +void evas_software_ddraw_output_buffer_paste(DD_Output_Buffer *ddob, + void *ddraw_data, + int ddraw_width, + int ddraw_height, + int ddraw_pitch, + int ddraw_depth, + int x, + int y); + +DATA8 *evas_software_ddraw_output_buffer_data(DD_Output_Buffer *ddob, + int *bytes_per_line_ret); + +int evas_software_ddraw_output_buffer_depth(DD_Output_Buffer *ddob); + +/* evas_ddraw_main.cpp */ + +#ifdef __cplusplus +extern "C" { +#endif + +int evas_software_ddraw_init (HWND window, + int depth, + int fullscreen, + Outbuf *buf); + +void evas_software_ddraw_shutdown(Outbuf *buf); + +int evas_software_ddraw_masks_get(Outbuf *buf); + +void *evas_software_ddraw_lock(Outbuf *buf, + int *ddraw_width, + int *ddraw_height, + int *ddraw_pitch, + int *ddraw_depth); + +void evas_software_ddraw_unlock_and_flip(Outbuf *buf); + +void evas_software_ddraw_surface_resize(Outbuf *buf); + +#ifdef __cplusplus +} +#endif + + +#endif /* __EVAS_ENGINE_H__ */ diff --git a/libraries/evas/src/modules/engines/software_ddraw/evas_outbuf.c b/libraries/evas/src/modules/engines/software_ddraw/evas_outbuf.c new file mode 100644 index 0000000..5a5f0a2 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_ddraw/evas_outbuf.c @@ -0,0 +1,460 @@ +#include "evas_common.h" +#include "evas_engine.h" + + +static Eina_List *ddpool = NULL; +static int ddsize = 0; +static int ddmemlimit = 10 * 1024 * 1024; +static int ddcountlimit = 32; + +static DD_Output_Buffer * +_find_ddob(int depth, int w, int h, void *data) +{ + Eina_List *l; + Eina_List *ddl; + DD_Output_Buffer *ddob = NULL; + DD_Output_Buffer *ddob2; + int sz; + int lbytes; + int bpp; + + bpp = depth / 8; + if (bpp == 3) bpp = 4; + lbytes = (((w * bpp) + 3) / 4) * 4; + sz = lbytes * h; + EINA_LIST_FOREACH(ddpool, l, ddob2) + { + if (ddob2->depth != depth) + continue; + if (ddob2->psize == sz) + { + ddob = ddob2; + ddl = l; + goto have_ddob; + } + } + if (!ddob) + return evas_software_ddraw_output_buffer_new(depth, w, h, data); + + have_ddob: + ddpool = eina_list_remove_list(ddpool, ddl); + ddob->width = w; + ddob->height = h; + ddob->pitch = lbytes; + ddsize -= ddob->psize * (ddob->depth / 8); + + return ddob; +} + +static void +_unfind_ddob(DD_Output_Buffer *ddob) +{ + ddpool = eina_list_prepend(ddpool, ddob); + ddsize += ddob->psize * ddob->depth / 8; + while ((ddsize > (ddmemlimit)) || + (eina_list_count(ddpool) > ddcountlimit)) + { + Eina_List *xl; + + xl = eina_list_last(ddpool); + if (!xl) + { + ddsize = 0; + break; + } + ddob = xl->data; + ddpool = eina_list_remove_list(ddpool, xl); + evas_software_ddraw_output_buffer_free(ddob); + } +} + +static void +_clear_ddob(int sync) +{ + while (ddpool) + { + DD_Output_Buffer *ddob; + + ddob = ddpool->data; + ddpool = eina_list_remove_list(ddpool, ddpool); + evas_software_ddraw_output_buffer_free(ddob); + } + ddsize = 0; +} + +void +evas_software_ddraw_outbuf_init(void) +{ +} + +void +evas_software_ddraw_outbuf_free(Outbuf *buf) +{ + if (!buf) + return; + + evas_software_ddraw_shutdown(buf); + free(buf); +} + +Outbuf * +evas_software_ddraw_outbuf_setup(int width, + int height, + int rotation, + Outbuf_Depth depth, + HWND window, + int w_depth, + int fullscreen) +{ + Outbuf *buf; + + buf = (Outbuf *)calloc(1, sizeof(Outbuf)); + if (!buf) + return NULL; + + buf->width = width; + buf->height = height; + buf->depth = depth; + buf->rot = rotation; + + if (!evas_software_ddraw_init(window, w_depth, fullscreen, buf)) + { + free(buf); + return NULL; + } + + { + Gfx_Func_Convert conv_func; + DD_Output_Buffer *ddob; + + ddob = evas_software_ddraw_output_buffer_new(w_depth, 1, 1, NULL); + + conv_func = NULL; + if (ddob) + { + if (evas_software_ddraw_masks_get(buf)) + { + if ((rotation == 0) || (rotation == 180)) + conv_func = evas_common_convert_func_get(0, + width, + height, + evas_software_ddraw_output_buffer_depth (ddob), + buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, + PAL_MODE_NONE, + rotation); + else if ((rotation == 90) || (rotation == 270)) + conv_func = evas_common_convert_func_get(0, + height, + width, + evas_software_ddraw_output_buffer_depth (ddob), + buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, + PAL_MODE_NONE, + rotation); + } + + evas_software_ddraw_output_buffer_free(ddob); + + if (!conv_func) + { + ERR("DDraw engine Error" + " {" + " At depth %i:" + " RGB format mask: %08x, %08x, %08x" + " Not supported by and compiled in converters!" + " }", + buf->priv.dd.depth, + buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b); + } + } + } + + return buf; +} + +void +evas_software_ddraw_outbuf_reconfigure(Outbuf *buf, + int width, + int height, + int rotation, + Outbuf_Depth depth) +{ + if ((width == buf->width) && (height == buf->height) && + (rotation == buf->rot) && (depth == buf->depth)) + return; + buf->width = width; + buf->height = height; + buf->rot = rotation; + evas_software_ddraw_surface_resize(buf); +} + +RGBA_Image * +evas_software_ddraw_outbuf_new_region_for_update(Outbuf *buf, + int x, + int y, + int w, + int h, + int *cx, + int *cy, + int *cw, + int *ch) +{ + RGBA_Image *im; + Outbuf_Region *obr; + int bpl = 0; + int alpha = 0; + + obr = calloc(1, sizeof(Outbuf_Region)); + obr->x = x; + obr->y = y; + obr->width = w; + obr->height = h; + *cx = 0; + *cy = 0; + *cw = w; + *ch = h; + + if ((buf->rot == 0) && + (buf->priv.mask.r == 0xff0000) && + (buf->priv.mask.g == 0x00ff00) && + (buf->priv.mask.b == 0x0000ff)) + { + obr->ddob = _find_ddob(buf->priv.dd.depth, w, h, NULL); +/* obr->ddob = evas_software_x11_x_output_buffer_new(buf->priv.dd.disp, */ +/* buf->priv.dd.vis, */ +/* buf->priv.dd.depth, */ +/* w, h, */ +/* use_shm, */ +/* NULL); */ + im = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), + w, h, + (DATA32 *) evas_software_ddraw_output_buffer_data(obr->ddob, &bpl), + alpha, EVAS_COLORSPACE_ARGB8888); + im->extended_info = obr; + } + else + { + im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get()); + im->cache_entry.flags.alpha |= alpha ? 1 : 0; + evas_cache_image_surface_alloc(&im->cache_entry, w, h); + im->extended_info = obr; + if ((buf->rot == 0) || (buf->rot == 180)) + obr->ddob = _find_ddob(buf->priv.dd.depth, w, h, NULL); +/* + obr->ddob = evas_software_x11_x_output_buffer_new(buf->priv.dd.disp, + buf->priv.dd.vis, + buf->priv.dd.depth, + w, h, + use_shm, + NULL); + */ + else if ((buf->rot == 90) || (buf->rot == 270)) + obr->ddob = _find_ddob(buf->priv.dd.depth, h, w, NULL); +/* + obr->ddob = evas_software_x11_x_output_buffer_new(buf->priv.dd.disp, + buf->priv.dd.vis, + buf->priv.dd.depth, + h, w, + use_shm, + NULL); + */ + } + + buf->priv.pending_writes = eina_list_append(buf->priv.pending_writes, im); + return im; +} + +void +evas_software_ddraw_outbuf_push_updated_region(Outbuf *buf, + RGBA_Image *update, + int x, + int y, + int w, + int h) +{ + Gfx_Func_Convert conv_func; + Outbuf_Region *obr; + DATA32 *src_data; + void *data; + int bpl = 0; + + conv_func = NULL; + obr = update->extended_info; + + if ((buf->rot == 0) || (buf->rot == 180)) + conv_func = evas_common_convert_func_get(0, w, h, + evas_software_ddraw_output_buffer_depth(obr->ddob), + buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, + PAL_MODE_NONE, + buf->rot); + else if ((buf->rot == 90) || (buf->rot == 270)) + conv_func = evas_common_convert_func_get(0, h, w, + evas_software_ddraw_output_buffer_depth(obr->ddob), + buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, + PAL_MODE_NONE, buf->rot); + if (!conv_func) return; + + data = evas_software_ddraw_output_buffer_data(obr->ddob, &bpl); + src_data = update->image.data; + if (buf->rot == 0) + { + obr->x = x; + obr->y = y; + } + else if (buf->rot == 90) + { + obr->x = y; + obr->y = buf->width - x - w; + } + else if (buf->rot == 180) + { + obr->x = buf->width - x - w; + obr->y = buf->height - y - h; + } + else if (buf->rot == 270) + { + obr->x = buf->height - y - h; + obr->y = x; + } + if ((buf->rot == 0) || (buf->rot == 180)) + { + obr->width = w; + obr->height = h; + } + else if ((buf->rot == 90) || (buf->rot == 270)) + { + obr->width = h; + obr->height = w; + } + + if (data != src_data) + conv_func(src_data, data, + 0, + bpl / ((evas_software_ddraw_output_buffer_depth(obr->ddob) / 8)) - obr->width, + obr->width, + obr->height, + x, + y, + NULL); +} + +void +evas_software_ddraw_outbuf_free_region_for_update(Outbuf *buf, + RGBA_Image *update) +{ + /* no need to do anything - they are cleaned up on flush */ +} + +void +evas_software_ddraw_outbuf_flush(Outbuf *buf) +{ + Eina_List *l; + RGBA_Image *im; + Outbuf_Region *obr; + void *ddraw_data; + int ddraw_width; + int ddraw_height; + int ddraw_pitch; + int ddraw_depth; + + /* lock the back surface */ + if (!(ddraw_data = evas_software_ddraw_lock(buf, + &ddraw_width, + &ddraw_height, + &ddraw_pitch, + &ddraw_depth))) + goto free_images; + + /* copy safely the images that need to be drawn onto the back surface */ + EINA_LIST_FOREACH(buf->priv.pending_writes, l, im) + { + DD_Output_Buffer *ddob; + + obr = im->extended_info; + ddob = obr->ddob; + evas_software_ddraw_output_buffer_paste(ddob, + ddraw_data, + ddraw_width, + ddraw_height, + ddraw_pitch, + ddraw_depth, + obr->x, + obr->y); + } + + /* unlock the back surface and flip the surface */ + evas_software_ddraw_unlock_and_flip(buf); + + free_images: + while (buf->priv.prev_pending_writes) + { + im = buf->priv.prev_pending_writes->data; + buf->priv.prev_pending_writes = + eina_list_remove_list(buf->priv.prev_pending_writes, + buf->priv.prev_pending_writes); + obr = im->extended_info; + evas_cache_image_drop(&im->cache_entry); + if (obr->ddob) _unfind_ddob(obr->ddob); +/* + if (obr->ddob) evas_software_x11_x_output_buffer_free(obr->ddob); + */ + free(obr); + } + buf->priv.prev_pending_writes = buf->priv.pending_writes; + buf->priv.pending_writes = NULL; + + evas_common_cpu_end_opt(); +} + +void +evas_software_ddraw_outbuf_idle_flush(Outbuf *buf) +{ + while (buf->priv.prev_pending_writes) + { + RGBA_Image *im; + Outbuf_Region *obr; + + im = buf->priv.prev_pending_writes->data; + buf->priv.prev_pending_writes = + eina_list_remove_list(buf->priv.prev_pending_writes, + buf->priv.prev_pending_writes); + obr = im->extended_info; + evas_cache_image_drop((Image_Entry *)im); + if (obr->ddob) _unfind_ddob(obr->ddob); + free(obr); + } + _clear_ddob(0); +} + +int +evas_software_ddraw_outbuf_width_get(Outbuf *buf) +{ + return buf->width; +} + +int +evas_software_ddraw_outbuf_height_get(Outbuf *buf) +{ + return buf->height; +} + +Outbuf_Depth +evas_software_ddraw_outbuf_depth_get(Outbuf *buf) +{ + return buf->depth; +} + +int +evas_software_ddraw_outbuf_rot_get(Outbuf *buf) +{ + return buf->rot; +} diff --git a/libraries/evas/src/modules/engines/software_gdi/Evas_Engine_Software_Gdi.h b/libraries/evas/src/modules/engines/software_gdi/Evas_Engine_Software_Gdi.h new file mode 100644 index 0000000..deac5b2 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_gdi/Evas_Engine_Software_Gdi.h @@ -0,0 +1,32 @@ +#ifndef __EVAS_ENGINE_SOFTWARE_GDI_H__ +#define __EVAS_ENGINE_SOFTWARE_GDI_H__ + + +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN + + +typedef struct _Evas_Engine_Info_Software_Gdi Evas_Engine_Info_Software_Gdi; + +struct _Evas_Engine_Info_Software_Gdi +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + struct { + HWND window; + int depth; + int rotation; + unsigned int borderless : 1; + unsigned int fullscreen : 1; + unsigned int region : 1; + } info; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; + + +#endif /* __EVAS_ENGINE_SOFTWARE_GDI_H__ */ diff --git a/libraries/evas/src/modules/engines/software_gdi/Makefile.am b/libraries/evas/src/modules/engines/software_gdi/Makefile.am new file mode 100644 index 0000000..ccb8084 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_gdi/Makefile.am @@ -0,0 +1,47 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_software_gdi_cflags@ + +if BUILD_ENGINE_SOFTWARE_GDI + +SOFTWARE_GDI_SOURCES = \ +evas_engine.c \ +evas_outbuf.c \ +evas_gdi_buffer.c \ +evas_gdi_main.c + +SOFTWARE_GDI_LIBADD = @evas_engine_software_gdi_libs@ + + +includes_HEADERS = Evas_Engine_Software_Gdi.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_SOFTWARE_GDI + +pkgdir = $(libdir)/evas/modules/engines/software_gdi/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = $(SOFTWARE_GDI_SOURCES) +module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_GDI_LIBADD) +module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_software_gdi.la + +libevas_engine_software_gdi_la_SOURCES = $(SOFTWARE_GDI_SOURCES) +libevas_engine_software_gdi_la_LIBADD = $(SOFTWARE_GDI_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/software_gdi/Makefile.in b/libraries/evas/src/modules/engines/software_gdi/Makefile.in new file mode 100644 index 0000000..5dea632 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_gdi/Makefile.in @@ -0,0 +1,838 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/software_gdi +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@libevas_engine_software_gdi_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_software_gdi_la_SOURCES_DIST = evas_engine.c \ + evas_outbuf.c evas_gdi_buffer.c evas_gdi_main.c +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@ evas_outbuf.lo \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@ evas_gdi_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@ evas_gdi_main.lo +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am_libevas_engine_software_gdi_la_OBJECTS = $(am__objects_1) +libevas_engine_software_gdi_la_OBJECTS = \ + $(am_libevas_engine_software_gdi_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am_libevas_engine_software_gdi_la_rpath = +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@ $(am__DEPENDENCIES_1) +am__module_la_SOURCES_DIST = evas_engine.c evas_outbuf.c \ + evas_gdi_buffer.c evas_gdi_main.c +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@am__objects_2 = \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@ module_la-evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@ module_la-evas_outbuf.lo \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@ module_la-evas_gdi_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@ module_la-evas_gdi_main.lo +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_gdi_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_software_gdi_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Software_Gdi.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_engine_software_gdi_cflags@ + +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@SOFTWARE_GDI_SOURCES = \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@evas_engine.c \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@evas_outbuf.c \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@evas_gdi_buffer.c \ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@evas_gdi_main.c + +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@SOFTWARE_GDI_LIBADD = @evas_engine_software_gdi_libs@ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@includes_HEADERS = Evas_Engine_Software_Gdi.h +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_gdi/$(MODULE_ARCH) +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@module_la_SOURCES = $(SOFTWARE_GDI_SOURCES) +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_GDI_LIBADD) +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@noinst_LTLIBRARIES = libevas_engine_software_gdi.la +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@libevas_engine_software_gdi_la_SOURCES = $(SOFTWARE_GDI_SOURCES) +@BUILD_ENGINE_SOFTWARE_GDI_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@libevas_engine_software_gdi_la_LIBADD = $(SOFTWARE_GDI_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_gdi/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/software_gdi/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_gdi.la: $(libevas_engine_software_gdi_la_OBJECTS) $(libevas_engine_software_gdi_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_software_gdi_la_rpath) $(libevas_engine_software_gdi_la_OBJECTS) $(libevas_engine_software_gdi_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gdi_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gdi_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_outbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_gdi_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_gdi_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_outbuf.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_outbuf.lo: evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_outbuf.lo -MD -MP -MF $(DEPDIR)/module_la-evas_outbuf.Tpo -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_outbuf.Tpo $(DEPDIR)/module_la-evas_outbuf.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_outbuf.c' object='module_la-evas_outbuf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c + +module_la-evas_gdi_buffer.lo: evas_gdi_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_gdi_buffer.lo -MD -MP -MF $(DEPDIR)/module_la-evas_gdi_buffer.Tpo -c -o module_la-evas_gdi_buffer.lo `test -f 'evas_gdi_buffer.c' || echo '$(srcdir)/'`evas_gdi_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_gdi_buffer.Tpo $(DEPDIR)/module_la-evas_gdi_buffer.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_gdi_buffer.c' object='module_la-evas_gdi_buffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_gdi_buffer.lo `test -f 'evas_gdi_buffer.c' || echo '$(srcdir)/'`evas_gdi_buffer.c + +module_la-evas_gdi_main.lo: evas_gdi_main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_gdi_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_gdi_main.Tpo -c -o module_la-evas_gdi_main.lo `test -f 'evas_gdi_main.c' || echo '$(srcdir)/'`evas_gdi_main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_gdi_main.Tpo $(DEPDIR)/module_la-evas_gdi_main.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_gdi_main.c' object='module_la-evas_gdi_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_gdi_main.lo `test -f 'evas_gdi_main.c' || echo '$(srcdir)/'`evas_gdi_main.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_gdi/evas_engine.c b/libraries/evas/src/modules/engines/software_gdi/evas_engine.c new file mode 100644 index 0000000..414e880 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_gdi/evas_engine.c @@ -0,0 +1,387 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_engine.h" +#include "Evas_Engine_Software_Gdi.h" + +int _evas_engine_soft_gdi_log_dom = -1; +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +/* engine struct data */ +typedef struct _Render_Engine Render_Engine; + +struct _Render_Engine +{ + Tilebuf *tb; + Outbuf *ob; + Tilebuf_Rect *rects; + Eina_Inlist *cur_rect; + int end : 1; +}; + + +static void * +_output_setup(int width, + int height, + int rot, + HWND window, + int depth, + unsigned int borderless, + unsigned int fullscreen, + unsigned int region) +{ + Render_Engine *re; + + re = calloc(1, sizeof(Render_Engine)); + if (!re) + return NULL; + + /* if we haven't initialized - init (automatic abort if already done) */ + evas_common_cpu_init(); + + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + + evas_software_gdi_outbuf_init(); + + if (width <= 0) + width = 1; + if (height <= 0) + height = 1; + + re->ob = evas_software_gdi_outbuf_setup(width, height, rot, + OUTBUF_DEPTH_INHERIT, + window, depth, borderless, fullscreen, region, + 0, 0); + if (!re->ob) + { + free(re); + return NULL; + } + + /* for updates return 1 big buffer, but only use portions of it, also cache + it and keep it around until an idle_flush */ + /* disable for now - i am hunting down why some expedite tests are slower, + * as well as shaped stuff is broken and probable non-32bpp is broken as + * convert funcs dont do the right thing + * + re->ob->onebuf = 1; + */ + + re->tb = evas_common_tilebuf_new(width, height); + if (!re->tb) + { + evas_software_gdi_outbuf_free(re->ob); + free(re); + return NULL; + } + /* in preliminary tests 16x16 gave highest framerates */ + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + + return re; +} + + +/* engine api this module provides */ + +static void * +eng_info(Evas *e __UNUSED__) +{ + Evas_Engine_Info_Software_Gdi *info; + info = calloc(1, sizeof(Evas_Engine_Info_Software_Gdi)); + if (!info) return NULL; + info->magic.magic = rand(); + return info; +} + +static void +eng_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_Software_Gdi *in; + in = (Evas_Engine_Info_Software_Gdi *)info; + free(in); +} + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_Software_Gdi *info; + + info = (Evas_Engine_Info_Software_Gdi *)in; + if (!e->engine.data.output) + e->engine.data.output = _output_setup(e->output.w, + e->output.h, + info->info.rotation, + info->info.window, + info->info.depth, + info->info.borderless, + info->info.fullscreen, + info->info.region); + else + { + int ponebuf = 0; + + re = e->engine.data.output; + ponebuf = re->ob->onebuf; + evas_software_gdi_outbuf_free(re->ob); + re->ob = evas_software_gdi_outbuf_setup(e->output.w, + e->output.h, + info->info.rotation, + OUTBUF_DEPTH_INHERIT, + info->info.window, + info->info.depth, + info->info.borderless, + info->info.fullscreen, + info->info.region, + 0, 0); + re->ob->onebuf = ponebuf; + } + if (!e->engine.data.output) return 0; + if (!e->engine.data.context) + e->engine.data.context = e->engine.func->context_new(e->engine.data.output); + + re = e->engine.data.output; + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + if (!data) return; + + re = (Render_Engine *)data; + evas_software_gdi_outbuf_free(re->ob); + evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); +} + +static void +eng_output_resize(void *data, int width, int height) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_software_gdi_outbuf_reconfigure(re->ob, + width, + height, + evas_software_gdi_outbuf_rot_get(re->ob), + OUTBUF_DEPTH_INHERIT); + evas_common_tilebuf_free(re->tb); + re->tb = evas_common_tilebuf_new(width, height); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +} + +static void * +eng_output_redraws_next_update_get(void *data, + int *x, + int *y, + int *w, + int *h, + int *cx, + int *cy, + int *cw, + int *ch) +{ + Render_Engine *re; + RGBA_Image *surface; + Tilebuf_Rect *rect; + int ux; + int uy; + int uw; + int uh; + + re = (Render_Engine *)data; + if (re->end) + { + re->end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + re->cur_rect = EINA_INLIST_GET(re->rects); + } + if (!re->cur_rect) return NULL; + rect = (Tilebuf_Rect *)re->cur_rect; + ux = rect->x; + uy = rect->y; + uw = rect->w; + uh = rect->h; + re->cur_rect = re->cur_rect->next; + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = 1; + } + + surface = evas_software_gdi_outbuf_new_region_for_update(re->ob, + ux, + uy, + uw, + uh, + cx, + cy, + cw, + ch); + + *x = ux; + *y = uy; + *w = uw; + *h = uh; + + return surface; +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +#ifdef BUILD_PIPE_RENDER + evas_common_pipe_map_begin(surface); +#endif + evas_software_gdi_outbuf_push_updated_region(re->ob, surface, x, y, w, h); + evas_software_gdi_outbuf_free_region_for_update(re->ob, surface); + evas_common_cpu_end_opt(); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_software_gdi_outbuf_flush(re->ob); +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_software_gdi_outbuf_idle_flush(re->ob); +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *context) +{ + return EINA_FALSE; +} + +/* module advertising code */ +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + + _evas_engine_soft_gdi_log_dom = eina_log_domain_register + ("evas-software_gdi", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_soft_gdi_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em) +{ + eina_log_domain_unregister(_evas_engine_soft_gdi_log_dom); + _evas_engine_soft_gdi_log_dom = -1; +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "software_gdi", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_gdi); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_GDI +EVAS_EINA_MODULE_DEFINE(engine, software_gdi); +#endif diff --git a/libraries/evas/src/modules/engines/software_gdi/evas_engine.h b/libraries/evas/src/modules/engines/software_gdi/evas_engine.h new file mode 100644 index 0000000..b8ddc85 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_gdi/evas_engine.h @@ -0,0 +1,209 @@ +#ifndef EVAS_ENGINE_H +#define EVAS_ENGINE_H + + +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN + +extern int _evas_engine_soft_gdi_log_dom; + +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft_gdi_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft_gdi_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft_gdi_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft_gdi_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft_gdi_log_dom, __VA_ARGS__) + +typedef enum _Outbuf_Depth Outbuf_Depth; + +enum _Outbuf_Depth +{ + OUTBUF_DEPTH_NONE, + OUTBUF_DEPTH_INHERIT, + OUTBUF_DEPTH_RGB_16BPP_565_565_DITHERED, + OUTBUF_DEPTH_RGB_32BPP_888_8888, + OUTBUF_DEPTH_LAST +}; + +typedef struct BITMAPINFO_GDI BITMAPINFO_GDI; +typedef struct _Outbuf Outbuf; +typedef struct _Outbuf_Region Outbuf_Region; +typedef struct _Gdi_Output_Buffer Gdi_Output_Buffer; + +struct BITMAPINFO_GDI +{ + BITMAPINFOHEADER bih; + DWORD masks[3]; +}; + +struct _Outbuf +{ + Outbuf_Depth depth; + int width; + int height; + int rot; + int onebuf; + + struct { + Convert_Pal *pal; + struct { + BITMAPINFO_GDI *bitmap_info; + HWND window; + HDC dc; + HRGN regions; + int depth; + unsigned char borderless : 1; + unsigned char fullscreen : 1; + unsigned char region : 1; + } gdi; + + /* 1 big buffer for updates - flush on idle_flush */ + RGBA_Image *onebuf; + Eina_List *onebuf_regions; + + /* a list of pending regions to write to the target */ + Eina_List *pending_writes; + /* a list of previous frame pending regions to write to the target */ + Eina_List *prev_pending_writes; + + unsigned char mask_dither : 1; + unsigned char destination_alpha : 1; + unsigned char debug : 1; + unsigned char synced : 1; + + unsigned char region_built : 1; + } priv; +}; + +struct _Outbuf_Region +{ + Gdi_Output_Buffer *gdiob; + int x; + int y; + int width; + int height; +}; + +struct _Gdi_Output_Buffer +{ + BITMAPINFO_GDI *bitmap_info; + HBITMAP bitmap; + HDC dc; + int width; + int height; + void *data; + int depth; + int pitch; + int psize; +}; + +/* evas_gdi_main.c */ + +int evas_software_gdi_init (HWND window, + int depth, + unsigned int borderless, + unsigned int fullscreen, + unsigned int region, + Outbuf *buf); + +void evas_software_gdi_shutdown(Outbuf *buf); + +void evas_software_gdi_bitmap_resize(Outbuf *buf); + +/* evas_gdi_buffer.c */ + +Gdi_Output_Buffer *evas_software_gdi_output_buffer_new(HDC dc, + BITMAPINFO_GDI *bitmap_info, + int depth, + int width, + int height, + void *data); + +void evas_software_gdi_output_buffer_free(Gdi_Output_Buffer *gdiob); + +void evas_software_gdi_output_buffer_paste(Gdi_Output_Buffer *gdiob, + int x, + int y); + +DATA8 *evas_software_gdi_output_buffer_data(Gdi_Output_Buffer *gdiob, + int *pitch); + +int evas_software_gdi_output_buffer_depth(Gdi_Output_Buffer *gdiob); + +/* evas_outbuf.c */ + +void evas_software_gdi_outbuf_init(void); + +void evas_software_gdi_outbuf_free(Outbuf *buf); + +Outbuf *evas_software_gdi_outbuf_setup(int width, + int height, + int rotation, + Outbuf_Depth depth, + HWND window, + int w_depth, + unsigned int borderless, + unsigned int fullscreen, + unsigned int region, + int mask_dither, + int destination_alpha); + +void evas_software_gdi_outbuf_reconfigure(Outbuf *buf, + int width, + int height, + int rotation, + Outbuf_Depth depth); + +RGBA_Image *evas_software_gdi_outbuf_new_region_for_update(Outbuf *buf, + int x, + int y, + int w, + int h, + int *cx, + int *cy, + int *cw, + int *ch); + +void evas_software_gdi_outbuf_push_updated_region(Outbuf *buf, + RGBA_Image *update, + int x, + int y, + int w, + int h); + +void evas_software_gdi_outbuf_free_region_for_update(Outbuf *buf, + RGBA_Image *update); + +void evas_software_gdi_outbuf_flush(Outbuf *buf); + +void evas_software_gdi_outbuf_idle_flush(Outbuf *buf); + +int evas_software_gdi_outbuf_width_get(Outbuf *buf); + +int evas_software_gdi_outbuf_height_get(Outbuf *buf); + +Outbuf_Depth evas_software_gdi_outbuf_depth_get(Outbuf *buf); + +int evas_software_gdi_outbuf_rot_get(Outbuf *buf); + + +#endif /* EVAS_ENGINE_H */ diff --git a/libraries/evas/src/modules/engines/software_gdi/evas_gdi_buffer.c b/libraries/evas/src/modules/engines/software_gdi/evas_gdi_buffer.c new file mode 100644 index 0000000..66a5abf --- /dev/null +++ b/libraries/evas/src/modules/engines/software_gdi/evas_gdi_buffer.c @@ -0,0 +1,88 @@ +#include + +#include "evas_common.h" +#include "evas_engine.h" + +Gdi_Output_Buffer * +evas_software_gdi_output_buffer_new(HDC dc, + BITMAPINFO_GDI *bitmap_info, + int depth, + int width, + int height, + void *data) +{ + Gdi_Output_Buffer *gdiob; + + gdiob = calloc(1, sizeof(Gdi_Output_Buffer)); + if (!gdiob) return NULL; + + if (!data) + { + bitmap_info->bih.biWidth = width; + bitmap_info->bih.biHeight = -height; + bitmap_info->bih.biSizeImage = (depth >> 3) * width * height; + gdiob->bitmap = CreateDIBSection(dc, + (const BITMAPINFO *)bitmap_info, + DIB_RGB_COLORS, + (void **)(&data), + NULL, + 0); + if (!gdiob->bitmap) + { + free(gdiob); + return NULL; + } + } + + gdiob->bitmap_info = bitmap_info; + gdiob->dc = dc; + gdiob->data = data; + gdiob->width = width; + gdiob->height = height; + gdiob->depth = depth; + gdiob->pitch = width * (depth >> 3); +/* gdiob->psize = gdiob->pitch * height; */ + + return gdiob; +} + +void +evas_software_gdi_output_buffer_free(Gdi_Output_Buffer *gdiob) +{ + DeleteObject(gdiob->bitmap); + free(gdiob); +} + +void +evas_software_gdi_output_buffer_paste(Gdi_Output_Buffer *gdiob, + int x, + int y) +{ + HDC dc; + + dc = CreateCompatibleDC(gdiob->dc); + if (!dc) + return; + SelectObject(dc, gdiob->bitmap); + BitBlt(gdiob->dc, + x, y, + gdiob->width, gdiob->height, + dc, + 0, 0, + SRCCOPY); + DeleteDC(dc); +} + +DATA8 * +evas_software_gdi_output_buffer_data(Gdi_Output_Buffer *gdiob, + int *pitch) +{ + if (pitch) *pitch = gdiob->pitch; + return gdiob->data; +} + +int +evas_software_gdi_output_buffer_depth(Gdi_Output_Buffer *gdiob) +{ + return gdiob->depth; +} diff --git a/libraries/evas/src/modules/engines/software_gdi/evas_gdi_main.c b/libraries/evas/src/modules/engines/software_gdi/evas_gdi_main.c new file mode 100644 index 0000000..4a63959 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_gdi/evas_gdi_main.c @@ -0,0 +1,100 @@ +#include "evas_common.h" +#include "evas_engine.h" + + +int +evas_software_gdi_init (HWND window, + int depth, + unsigned int borderless, + unsigned int fullscreen __UNUSED__, + unsigned int region, + Outbuf *buf) +{ + if (!window) + { + ERR("[Engine] [GDI] Window is NULL"); + return 0; + } + + buf->priv.gdi.window = window; + buf->priv.gdi.dc = GetDC(window); + buf->priv.gdi.borderless = borderless; + buf->priv.gdi.region = region; + if (!buf->priv.gdi.dc) + { + ERR("[Engine] [GDI] Can not get DC"); + return 0; + } + + /* FIXME: check depth */ + if (depth != GetDeviceCaps(buf->priv.gdi.dc, BITSPIXEL)) + { + ERR("[Engine] [GDI] no compatible depth"); + ReleaseDC(window, buf->priv.gdi.dc); + return 0; + } + buf->priv.gdi.depth = depth; + + /* FIXME: support fullscreen */ + + buf->priv.gdi.bitmap_info = (BITMAPINFO_GDI *)malloc(sizeof(BITMAPINFO_GDI)); + if (!buf->priv.gdi.bitmap_info) + { + ERR("[Engine] [GDI] Can not allocate bitmap info"); + ReleaseDC(window, buf->priv.gdi.dc); + return 0; + } + + buf->priv.gdi.bitmap_info->bih.biSize = sizeof(BITMAPINFOHEADER); + buf->priv.gdi.bitmap_info->bih.biWidth = buf->width; + buf->priv.gdi.bitmap_info->bih.biHeight = -buf->height; + buf->priv.gdi.bitmap_info->bih.biPlanes = 1; + buf->priv.gdi.bitmap_info->bih.biSizeImage = (buf->priv.gdi.depth >> 3) * buf->width * buf->height; + buf->priv.gdi.bitmap_info->bih.biXPelsPerMeter = 0; + buf->priv.gdi.bitmap_info->bih.biYPelsPerMeter = 0; + buf->priv.gdi.bitmap_info->bih.biClrUsed = 0; + buf->priv.gdi.bitmap_info->bih.biClrImportant = 0; + buf->priv.gdi.bitmap_info->bih.biBitCount = buf->priv.gdi.depth; + buf->priv.gdi.bitmap_info->bih.biCompression = BI_BITFIELDS; + + switch (depth) + { + case 16: + buf->priv.gdi.bitmap_info->masks[0] = 0x0000f800; + buf->priv.gdi.bitmap_info->masks[1] = 0x000007e0; + buf->priv.gdi.bitmap_info->masks[2] = 0x0000001f; + break; + case 32: + buf->priv.gdi.bitmap_info->masks[0] = 0x00ff0000; + buf->priv.gdi.bitmap_info->masks[1] = 0x0000ff00; + buf->priv.gdi.bitmap_info->masks[2] = 0x000000ff; + break; + default: + ERR("[Engine] [GDI] wrong depth"); + free(buf->priv.gdi.bitmap_info); + ReleaseDC(window, buf->priv.gdi.dc); + return 0; + } + + return 1; +} + +void +evas_software_gdi_shutdown(Outbuf *buf) +{ + if (!buf) + return; + + free(buf->priv.gdi.bitmap_info); + ReleaseDC(buf->priv.gdi.window, buf->priv.gdi.dc); + if (buf->priv.gdi.regions) + DeleteObject(buf->priv.gdi.regions); +} + +void +evas_software_gdi_bitmap_resize(Outbuf *buf) +{ + buf->priv.gdi.bitmap_info->bih.biWidth = buf->width; + buf->priv.gdi.bitmap_info->bih.biHeight = -buf->height; + buf->priv.gdi.bitmap_info->bih.biSizeImage = (buf->priv.gdi.depth >> 3) * buf->width * buf->height; +} diff --git a/libraries/evas/src/modules/engines/software_gdi/evas_outbuf.c b/libraries/evas/src/modules/engines/software_gdi/evas_outbuf.c new file mode 100644 index 0000000..6841baa --- /dev/null +++ b/libraries/evas/src/modules/engines/software_gdi/evas_outbuf.c @@ -0,0 +1,656 @@ +#include "evas_common.h" +#include "evas_engine.h" + + +static Eina_List *gdipool = NULL; +static int gdisize = 0; +static int gdimemlimit = 10 * 1024 * 1024; +static int gdicountlimit = 32; + +static Gdi_Output_Buffer * +_find_gdiob(HDC dc, BITMAPINFO_GDI *bitmap_info, int depth, int w, int h, void *data) +{ + Eina_List *l = NULL; + Eina_List *gdil = NULL; + Gdi_Output_Buffer *gdiob = NULL; + Gdi_Output_Buffer *gdiob2; + int sz; + int lbytes; + int bpp; + int fitness = 0x7fffffff; + + bpp = depth >> 3; + if (bpp == 3) bpp = 4; + lbytes = (((w * bpp) + 3) / 4) * 4; + sz = lbytes * h; + EINA_LIST_FOREACH(gdipool, l, gdiob2) + { + int szdif; + + if ((gdiob2->dc != dc) || + (gdiob2->bitmap_info != bitmap_info) || + (gdiob2->depth != depth)) + continue; + szdif = gdiob2->psize - sz; + if (szdif < 0) continue; + if (szdif == 0) + { + gdiob = gdiob2; + gdil = l; + goto have_gdiob; + } + if (szdif < fitness) + { + fitness = szdif; + gdiob = gdiob2; + gdil = l; + } + } + if ((fitness > (100 * 100)) || (!gdiob)) + return evas_software_gdi_output_buffer_new(dc, bitmap_info, depth, w, h, data); + + have_gdiob: + gdipool = eina_list_remove_list(gdipool, gdil); + gdiob->width = w; + gdiob->height = h; + gdiob->pitch = lbytes; + gdisize -= gdiob->psize * (gdiob->depth >> 3); + + return gdiob; +} + +static void +_unfind_gdiob(Gdi_Output_Buffer *gdiob) +{ + gdipool = eina_list_prepend(gdipool, gdiob); + gdisize += gdiob->psize * (gdiob->depth >> 3); + while ((gdisize > (gdimemlimit)) || + (eina_list_count(gdipool) > gdicountlimit)) + { + Eina_List *xl; + + xl = eina_list_last(gdipool); + if (!xl) + { + gdisize = 0; + break; + } + gdiob = xl->data; + gdipool = eina_list_remove_list(gdipool, xl); + evas_software_gdi_output_buffer_free(gdiob); + } +} + +static void +_clear_gdiob() +{ + while (gdipool) + { + Gdi_Output_Buffer *gdiob; + + gdiob = gdipool->data; + gdipool = eina_list_remove_list(gdipool, gdipool); + evas_software_gdi_output_buffer_free(gdiob); + } + gdisize = 0; +} + +void +evas_software_gdi_outbuf_init(void) +{ +} + +void +evas_software_gdi_outbuf_free(Outbuf *buf) +{ + if (!buf) + return; + + while (buf->priv.pending_writes) + { + RGBA_Image *im; + Outbuf_Region *obr; + + im = buf->priv.pending_writes->data; + buf->priv.pending_writes = eina_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes); + obr = im->extended_info; + evas_cache_image_drop(&im->cache_entry); + if (obr->gdiob) _unfind_gdiob(obr->gdiob); +/* if (obr->mxob) _unfind_xob(obr->mxob, 0); */ + free(obr); + } + evas_software_gdi_outbuf_idle_flush(buf); + evas_software_gdi_outbuf_flush(buf); + + evas_software_gdi_shutdown(buf); + free(buf); +} + +Outbuf * +evas_software_gdi_outbuf_setup(int width, + int height, + int rotation, + Outbuf_Depth depth, + HWND window, + int w_depth, + unsigned int borderless, + unsigned int fullscreen, + unsigned int region, + int mask_dither, + int destination_alpha) +{ + Outbuf *buf; + + buf = (Outbuf *)calloc(1, sizeof(Outbuf)); + if (!buf) + return NULL; + + buf->width = width; + buf->height = height; + buf->depth = depth; + buf->rot = rotation; + + buf->priv.mask_dither = mask_dither; + buf->priv.destination_alpha = destination_alpha; + + if (!evas_software_gdi_init(window, w_depth, borderless, fullscreen, region, buf)) + { + free(buf); + return NULL; + } + + { + Gfx_Func_Convert conv_func; + Gdi_Output_Buffer *gdiob; + + gdiob = evas_software_gdi_output_buffer_new(buf->priv.gdi.dc, buf->priv.gdi.bitmap_info, w_depth, 1, 1, NULL); + + conv_func = NULL; + if (gdiob) + { + if ((rotation == 0) || (rotation == 180)) + conv_func = evas_common_convert_func_get(0, + width, + height, + evas_software_gdi_output_buffer_depth (gdiob), + buf->priv.gdi.bitmap_info->masks[0], + buf->priv.gdi.bitmap_info->masks[1], + buf->priv.gdi.bitmap_info->masks[2], + PAL_MODE_NONE, + rotation); + else if ((rotation == 90) || (rotation == 270)) + conv_func = evas_common_convert_func_get(0, + height, + width, + evas_software_gdi_output_buffer_depth (gdiob), + buf->priv.gdi.bitmap_info->masks[0], + buf->priv.gdi.bitmap_info->masks[1], + buf->priv.gdi.bitmap_info->masks[2], + PAL_MODE_NONE, + rotation); + + evas_software_gdi_output_buffer_free(gdiob); + + if (!conv_func) + { + ERR(".[ soft_gdi engine Error ]." + " {" + " At depth %i:" + " RGB format mask: %08lx, %08lx, %08lx" + " Not supported by and compiled in converters!" + " }", + buf->priv.gdi.depth, + buf->priv.gdi.bitmap_info->masks[0], + buf->priv.gdi.bitmap_info->masks[1], + buf->priv.gdi.bitmap_info->masks[2]); + } + } + } + + return buf; +} + +void +evas_software_gdi_outbuf_reconfigure(Outbuf *buf, + int width, + int height, + int rotation, + Outbuf_Depth depth) +{ + if ((width == buf->width) && (height == buf->height) && + (rotation == buf->rot) && (depth == buf->depth)) + return; + buf->width = width; + buf->height = height; + buf->rot = rotation; + evas_software_gdi_bitmap_resize(buf); + buf->priv.region_built = 0; +} + +RGBA_Image * +evas_software_gdi_outbuf_new_region_for_update(Outbuf *buf, + int x, + int y, + int w, + int h, + int *cx, + int *cy, + int *cw, + int *ch) +{ + RGBA_Image *im; + Outbuf_Region *obr; + int bpl = 0; + int alpha = 0; + + obr = calloc(1, sizeof(Outbuf_Region)); + obr->x = x; + obr->y = y; + obr->width = w; + obr->height = h; + *cx = 0; + *cy = 0; + *cw = w; + *ch = h; + + alpha = ((buf->priv.gdi.region) || (buf->priv.destination_alpha)); + + if ((buf->rot == 0) && + (buf->priv.gdi.bitmap_info->masks[0] == 0xff0000) && + (buf->priv.gdi.bitmap_info->masks[1] == 0x00ff00) && + (buf->priv.gdi.bitmap_info->masks[2] == 0x0000ff)) + { + obr->gdiob = _find_gdiob(buf->priv.gdi.dc, + buf->priv.gdi.bitmap_info, + buf->priv.gdi.depth, + w, h, NULL); +/* obr->gdiob = evas_software_gdi_output_buffer_new(buf->priv.gdi.dc, */ +/* buf->priv.gdi.bitmap_info, */ +/* buf->priv.gdi.depth, */ +/* w, h, */ +/* NULL); */ + im = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), + w, h, + (DATA32 *)evas_software_gdi_output_buffer_data(obr->gdiob, &bpl), + alpha, EVAS_COLORSPACE_ARGB8888); + im->extended_info = obr; +/* if (buf->priv.gdi.mask) */ +/* obr->mgdiob = _find_gdiob(buf->priv.gdi.dc, */ +/* buf->priv.gdi.bitmap_info, */ +/* 1, */ +/* w, h, NULL); */ + } + else + { + im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get()); + im->cache_entry.flags.alpha |= alpha ? 1 : 0; + evas_cache_image_surface_alloc(&im->cache_entry, w, h); + im->extended_info = obr; + if ((buf->rot == 0) || (buf->rot == 180)) + obr->gdiob = _find_gdiob(buf->priv.gdi.dc, + buf->priv.gdi.bitmap_info, + buf->priv.gdi.depth, + w, h, NULL); +/* + obr->gdiob = evas_software_x11_x_output_buffer_new(buf->priv.dd.disp, + buf->priv.dd.vis, + buf->priv.dd.depth, + w, h, + use_shm, + NULL); + */ + else if ((buf->rot == 90) || (buf->rot == 270)) + obr->gdiob = _find_gdiob(buf->priv.gdi.dc, + buf->priv.gdi.bitmap_info, + buf->priv.gdi.depth, + h, w, NULL); +/* + obr->gdiob = evas_software_x11_x_output_buffer_new(buf->priv.dd.disp, + buf->priv.dd.vis, + buf->priv.dd.depth, + h, w, + use_shm, + NULL); + */ +/* if (buf->priv.gdi.mask) */ +/* obr->mgdiob = _find_gdiob(buf->priv.gdi.dc, */ +/* buf->priv.gdi.bitmap_info, */ +/* 1, */ +/* w, h, NULL); */ + } + if ((buf->priv.gdi.region) || (buf->priv.destination_alpha)) + /* FIXME: faster memset! */ + memset(im->image.data, 0, w * h * sizeof(DATA32)); + + buf->priv.pending_writes = eina_list_append(buf->priv.pending_writes, im); + return im; +} + +void +evas_software_gdi_outbuf_push_updated_region(Outbuf *buf, + RGBA_Image *update, + int x, + int y, + int w, + int h) +{ + HRGN regions = NULL; + Gfx_Func_Convert conv_func; + Outbuf_Region *obr; + DATA32 *src_data; + void *data; + int bpl = 0; + + conv_func = NULL; + obr = update->extended_info; + + if ((buf->rot == 0) || (buf->rot == 180)) + conv_func = evas_common_convert_func_get(0, w, h, + evas_software_gdi_output_buffer_depth(obr->gdiob), + buf->priv.gdi.bitmap_info->masks[0], + buf->priv.gdi.bitmap_info->masks[1], + buf->priv.gdi.bitmap_info->masks[2], + PAL_MODE_NONE, + buf->rot); + else if ((buf->rot == 90) || (buf->rot == 270)) + conv_func = evas_common_convert_func_get(0, h, w, + evas_software_gdi_output_buffer_depth(obr->gdiob), + buf->priv.gdi.bitmap_info->masks[0], + buf->priv.gdi.bitmap_info->masks[1], + buf->priv.gdi.bitmap_info->masks[2], + PAL_MODE_NONE, + buf->rot); + if (!conv_func) return; + + data = evas_software_gdi_output_buffer_data(obr->gdiob, &bpl); + src_data = update->image.data; + if (buf->rot == 0) + { + obr->x = x; + obr->y = y; + } + else if (buf->rot == 90) + { + obr->x = y; + obr->y = buf->width - x - w; + } + else if (buf->rot == 180) + { + obr->x = buf->width - x - w; + obr->y = buf->height - y - h; + } + else if (buf->rot == 270) + { + obr->x = buf->height - y - h; + obr->y = x; + } + if ((buf->rot == 0) || (buf->rot == 180)) + { + obr->width = w; + obr->height = h; + } + else if ((buf->rot == 90) || (buf->rot == 270)) + { + obr->width = h; + obr->height = w; + } + + if (data != src_data) + conv_func(src_data, data, + 0, + bpl / (evas_software_gdi_output_buffer_depth(obr->gdiob) >> 3) - obr->width, + obr->width, + obr->height, + x, + y, + NULL); + + /* Region code */ + if (!buf->priv.gdi.region) + { + if (buf->priv.gdi.regions) + DeleteObject(buf->priv.gdi.regions); + buf->priv.gdi.regions = NULL; + SetWindowRgn(buf->priv.gdi.window, NULL, 1); + return; + } + + if (!buf->priv.region_built) + { + RECT rect; + POINT pt = { 0, 0 }; + HRGN region; + int *tmp; + int i; + int j; + int ww; + int wh; + int dx; + int dy; + int xmin; + int xmax; + + if (!GetClientRect(buf->priv.gdi.window, &rect)) + return; + + ww = rect.right - rect.left; + wh = rect.bottom - rect.top; + + if (!GetWindowRect(buf->priv.gdi.window, &rect)) + return; + if (!ClientToScreen(buf->priv.gdi.window, &pt)) + return; + dx = x + pt.x - rect.left; + dy = y + pt.y - rect.top; + + tmp = src_data; + + for (j = 0; j < h; j++) + { + i = 0; + while (i < w) + { + if ((*tmp & 0xff000000) == 0xff000000) + { + xmin = dx + i; + if ((i + 1) == w) + { + xmax = dx + i; + region = CreateRectRgn(xmin, dy + j, xmax + 1, dy + j + 1); + if (regions == NULL) + regions = region; + else + { + CombineRgn(regions, regions, region, RGN_OR); + DeleteObject(region); + } + } + else + { + i++; + tmp++; + + while (i < w) + { + if ((*tmp & 0xff000000) == 0xff000000) + { + if ((i + 1) == w) + { + xmax = dx + i; + region = CreateRectRgn(xmin, dy + j, xmax + 1, dy + j + 1); + if (regions == NULL) + regions = region; + else + { + CombineRgn(regions, regions, region, RGN_OR); + DeleteObject(region); + } + break; + } + } + else + { + xmax = dx + i - 1; + region = CreateRectRgn(xmin, dy + j, xmax + 1, dy + j + 1); + if (regions == NULL) + regions = region; + else + { + CombineRgn(regions, regions, region, RGN_OR); + DeleteObject(region); + } + break; + } + i++; + tmp++; + } + } + } + i++; + tmp++; + } + } + + if (!buf->priv.gdi.borderless) + { + RECT rnc; + RECT rc; + POINT pt = { 0, 0 }; + LONG ncw; + LONG nch; + LONG cw; + LONG ch; + + if (!GetWindowRect(buf->priv.gdi.window, &rnc)) + return; + if (!GetClientRect(buf->priv.gdi.window, &rc)) + return; + if (!ClientToScreen(buf->priv.gdi.window, &pt)) + return; + + ncw = rnc.right - rnc.left; + nch = rnc.bottom - rnc.top; + cw = rc.right - rc.left; + ch = rc.bottom - rc.top; + + region = CreateRectRgn(0, 0, ncw, pt.y - rnc.top); + if (!regions) + regions = region; + else + { + CombineRgn(regions, regions, region, RGN_OR); + DeleteObject(region); + } + region = CreateRectRgn(0, pt.y - rnc.top, pt.x - rnc.left, nch); + CombineRgn(regions, regions, region, RGN_OR); + DeleteObject(region); + region = CreateRectRgn(pt.x - rnc.left, pt.y - rnc.top + ch, pt.x - rnc.left + cw, nch); + CombineRgn(regions, regions, region, RGN_OR); + DeleteObject(region); + region = CreateRectRgn(pt.x - rnc.left + cw, pt.y - rnc.top, ncw, nch); + CombineRgn(regions, regions, region, RGN_OR); + DeleteObject(region); + } + + if (regions) + SetWindowRgn(buf->priv.gdi.window, regions, 1); + buf->priv.gdi.regions = regions; + + buf->priv.region_built = 1; + } +} + +void +evas_software_gdi_outbuf_free_region_for_update(Outbuf *buf __UNUSED__, + RGBA_Image *update __UNUSED__) +{ + /* no need to do anything - they are cleaned up on flush */ +} + +void +evas_software_gdi_outbuf_flush(Outbuf *buf) +{ + Eina_List *l; + RGBA_Image *im; + Outbuf_Region *obr; + + /* copy safely the images that need to be drawn onto the back surface */ + EINA_LIST_FOREACH(buf->priv.pending_writes, l, im) + { + Gdi_Output_Buffer *gdiob; + + obr = im->extended_info; + gdiob = obr->gdiob; + evas_software_gdi_output_buffer_paste(gdiob, + obr->x, + obr->y); +/* if (obr->mgdiob) */ +/* evas_software_gdi_output_buffer_paste(obr->mgdiob, */ +/* buf->priv.x11.xlib.mask, */ +/* buf->priv.x11.xlib.gcm, */ +/* obr->x, obr->y, 0); */ + } + + while (buf->priv.prev_pending_writes) + { + im = buf->priv.prev_pending_writes->data; + buf->priv.prev_pending_writes = + eina_list_remove_list(buf->priv.prev_pending_writes, + buf->priv.prev_pending_writes); + obr = im->extended_info; + evas_cache_image_drop(&im->cache_entry); + if (obr->gdiob) _unfind_gdiob(obr->gdiob); +/* if (obr->mgdiob) _unfind_gdiob(obr->mgdiob); */ +/* if (obr->gdiob) evas_software_x11_x_output_buffer_free(obr->gdiob); */ + free(obr); + } + buf->priv.prev_pending_writes = buf->priv.pending_writes; + buf->priv.pending_writes = NULL; + + evas_common_cpu_end_opt(); +} + +void +evas_software_gdi_outbuf_idle_flush(Outbuf *buf) +{ + while (buf->priv.prev_pending_writes) + { + RGBA_Image *im; + Outbuf_Region *obr; + + im = buf->priv.prev_pending_writes->data; + buf->priv.prev_pending_writes = + eina_list_remove_list(buf->priv.prev_pending_writes, + buf->priv.prev_pending_writes); + obr = im->extended_info; + evas_cache_image_drop((Image_Entry *)im); + if (obr->gdiob) _unfind_gdiob(obr->gdiob); +/* if (obr->mxob) _unfind_xob(obr->mxob, 0); */ + free(obr); + } + _clear_gdiob(); +} + +int +evas_software_gdi_outbuf_width_get(Outbuf *buf) +{ + return buf->width; +} + +int +evas_software_gdi_outbuf_height_get(Outbuf *buf) +{ + return buf->height; +} + +Outbuf_Depth +evas_software_gdi_outbuf_depth_get(Outbuf *buf) +{ + return buf->depth; +} + +int +evas_software_gdi_outbuf_rot_get(Outbuf *buf) +{ + return buf->rot; +} diff --git a/libraries/evas/src/modules/engines/software_generic/Makefile.am b/libraries/evas/src/modules/engines/software_generic/Makefile.am new file mode 100644 index 0000000..d7986f1 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_generic/Makefile.am @@ -0,0 +1,35 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +SOFTWARE_GENERIC_SOURCES = evas_engine.c + + +if !EVAS_STATIC_BUILD_SOFTWARE_GENERIC + +pkgdir = $(libdir)/evas/modules/engines/software_generic/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(SOFTWARE_GENERIC_SOURCES) + +module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_software_generic.la + +libevas_engine_software_generic_la_SOURCES = $(SOFTWARE_GENERIC_SOURCES) + +endif diff --git a/libraries/evas/src/modules/engines/software_generic/Makefile.in b/libraries/evas/src/modules/engines/software_generic/Makefile.in new file mode 100644 index 0000000..6d75f23 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_generic/Makefile.in @@ -0,0 +1,763 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/software_generic +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_engine_software_generic_la_LIBADD = +am__libevas_engine_software_generic_la_SOURCES_DIST = evas_engine.c +am__objects_1 = evas_engine.lo +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@am_libevas_engine_software_generic_la_OBJECTS = \ +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@ $(am__objects_1) +libevas_engine_software_generic_la_OBJECTS = \ + $(am_libevas_engine_software_generic_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@am_libevas_engine_software_generic_la_rpath = +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c +am__objects_2 = module_la-evas_engine.lo +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@am_module_la_OBJECTS = \ +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@ $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@am_module_la_rpath = -rpath \ +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_generic_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_software_generic_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@EINA_CFLAGS@ \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +SOFTWARE_GENERIC_SOURCES = evas_engine.c +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_generic/$(MODULE_ARCH) +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@pkg_LTLIBRARIES = module.la +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@module_la_SOURCES = $(SOFTWARE_GENERIC_SOURCES) +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@noinst_LTLIBRARIES = libevas_engine_software_generic.la +@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@libevas_engine_software_generic_la_SOURCES = $(SOFTWARE_GENERIC_SOURCES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_generic/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/software_generic/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_generic.la: $(libevas_engine_software_generic_la_OBJECTS) $(libevas_engine_software_generic_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_software_generic_la_rpath) $(libevas_engine_software_generic_la_OBJECTS) $(libevas_engine_software_generic_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_generic/evas_engine.c b/libraries/evas/src/modules/engines/software_generic/evas_engine.c new file mode 100644 index 0000000..b2c53c5 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_generic/evas_engine.c @@ -0,0 +1,1230 @@ +#include "evas_common.h" /* Also includes international specific stuff */ +#include "evas_private.h" + +/* + ***** + ** + ** ENGINE ROUTINES + ** + ***** + */ +static int cpunum = 0; +static int _evas_soft_gen_log_dom = -1; + +static void +eng_output_dump(void *data __UNUSED__) +{ + evas_common_image_image_all_unload(); + evas_common_font_font_all_unload(); +} + +static void * +eng_context_new(void *data __UNUSED__) +{ + return evas_common_draw_context_new(); +} + +static void +eng_context_free(void *data __UNUSED__, void *context) +{ + evas_common_draw_context_free(context); +} + +static void +eng_context_clip_set(void *data __UNUSED__, void *context, int x, int y, int w, int h) +{ + evas_common_draw_context_set_clip(context, x, y, w, h); +} + +static void +eng_context_clip_clip(void *data __UNUSED__, void *context, int x, int y, int w, int h) +{ + evas_common_draw_context_clip_clip(context, x, y, w, h); +} + +static void +eng_context_clip_unset(void *data __UNUSED__, void *context) +{ + evas_common_draw_context_unset_clip(context); +} + +static int +eng_context_clip_get(void *data __UNUSED__, void *context, int *x, int *y, int *w, int *h) +{ + *x = ((RGBA_Draw_Context *)context)->clip.x; + *y = ((RGBA_Draw_Context *)context)->clip.y; + *w = ((RGBA_Draw_Context *)context)->clip.w; + *h = ((RGBA_Draw_Context *)context)->clip.h; + return ((RGBA_Draw_Context *)context)->clip.use; +} + +static void +eng_context_color_set(void *data __UNUSED__, void *context, int r, int g, int b, int a) +{ + evas_common_draw_context_set_color(context, r, g, b, a); +} + +static int +eng_context_color_get(void *data __UNUSED__, void *context, int *r, int *g, int *b, int *a) +{ + *r = (int)(R_VAL(&((RGBA_Draw_Context *)context)->col.col)); + *g = (int)(G_VAL(&((RGBA_Draw_Context *)context)->col.col)); + *b = (int)(B_VAL(&((RGBA_Draw_Context *)context)->col.col)); + *a = (int)(A_VAL(&((RGBA_Draw_Context *)context)->col.col)); + return 1; +} + +static void +eng_context_multiplier_set(void *data __UNUSED__, void *context, int r, int g, int b, int a) +{ + evas_common_draw_context_set_multiplier(context, r, g, b, a); +} + +static void +eng_context_multiplier_unset(void *data __UNUSED__, void *context) +{ + evas_common_draw_context_unset_multiplier(context); +} + +static int +eng_context_multiplier_get(void *data __UNUSED__, void *context, int *r, int *g, int *b, int *a) +{ + *r = (int)(R_VAL(&((RGBA_Draw_Context *)context)->mul.col)); + *g = (int)(G_VAL(&((RGBA_Draw_Context *)context)->mul.col)); + *b = (int)(B_VAL(&((RGBA_Draw_Context *)context)->mul.col)); + *a = (int)(A_VAL(&((RGBA_Draw_Context *)context)->mul.col)); + return ((RGBA_Draw_Context *)context)->mul.use; +} + +static void +eng_context_mask_set(void *data __UNUSED__, void *context, void *mask, int x, int y, int w, int h) +{ + evas_common_draw_context_set_mask(context, mask, x, y, w, h); +} + +static void +eng_context_mask_unset(void *data __UNUSED__, void *context) +{ + evas_common_draw_context_unset_mask(context); +} +/* +static void * +eng_context_mask_get(void *data __UNUSED__, void *context) +{ + return ((RGBA_Draw_Context *)context)->mask.mask; +} +*/ + +static void +eng_context_cutout_add(void *data __UNUSED__, void *context, int x, int y, int w, int h) +{ + evas_common_draw_context_add_cutout(context, x, y, w, h); +} + +static void +eng_context_cutout_clear(void *data __UNUSED__, void *context) +{ + evas_common_draw_context_clear_cutouts(context); +} + +static void +eng_context_anti_alias_set(void *data __UNUSED__, void *context, unsigned char aa) +{ + evas_common_draw_context_set_anti_alias(context, aa); +} + +static unsigned char +eng_context_anti_alias_get(void *data __UNUSED__, void *context) +{ + return ((RGBA_Draw_Context *)context)->anti_alias; +} + +static void +eng_context_color_interpolation_set(void *data __UNUSED__, void *context, int color_space) +{ + evas_common_draw_context_set_color_interpolation(context, color_space); +} + +static int +eng_context_color_interpolation_get(void *data __UNUSED__, void *context) +{ + return ((RGBA_Draw_Context *)context)->interpolation.color_space; +} + +static void +eng_context_render_op_set(void *data __UNUSED__, void *context, int op) +{ + evas_common_draw_context_set_render_op(context, op); +} + +static int +eng_context_render_op_get(void *data __UNUSED__, void *context) +{ + return ((RGBA_Draw_Context *)context)->render_op; +} + + + +static void +eng_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x, int y, int w, int h) +{ +#ifdef BUILD_PIPE_RENDER + if ((cpunum > 1) +#ifdef EVAS_FRAME_QUEUING + && evas_common_frameq_enabled() +#endif + ) + evas_common_pipe_rectangle_draw(surface, context, x, y, w, h); + else +#endif + { + evas_common_rectangle_draw(surface, context, x, y, w, h); + evas_common_cpu_end_opt(); + } +} + +static void +eng_line_draw(void *data __UNUSED__, void *context, void *surface, int x1, int y1, int x2, int y2) +{ +#ifdef BUILD_PIPE_RENDER + if ((cpunum > 1) + #ifdef EVAS_FRAME_QUEUING + && evas_common_frameq_enabled() +#endif + ) + evas_common_pipe_line_draw(surface, context, x1, y1, x2, y2); + else +#endif + { + evas_common_line_draw(surface, context, x1, y1, x2, y2); + evas_common_cpu_end_opt(); + } +} + +static void * +eng_polygon_point_add(void *data __UNUSED__, void *context __UNUSED__, void *polygon, int x, int y) +{ + return evas_common_polygon_point_add(polygon, x, y); +} + +static void * +eng_polygon_points_clear(void *data __UNUSED__, void *context __UNUSED__, void *polygon) +{ + return evas_common_polygon_points_clear(polygon); +} + +static void +eng_polygon_draw(void *data __UNUSED__, void *context, void *surface, void *polygon, int x, int y) +{ +#ifdef BUILD_PIPE_RENDER + if ((cpunum > 1) +#ifdef EVAS_FRAME_QUEUING + && evas_common_frameq_enabled() +#endif + ) + evas_common_pipe_poly_draw(surface, context, polygon, x, y); + else +#endif + { + evas_common_polygon_draw(surface, context, polygon, x, y); + evas_common_cpu_end_opt(); + } +} + +static int +eng_image_alpha_get(void *data __UNUSED__, void *image) +{ + Image_Entry *im; + + if (!image) return 1; + im = image; + switch (im->space) + { + case EVAS_COLORSPACE_ARGB8888: + if (im->flags.alpha) return 1; + default: + break; + } + return 0; +} + +static int +eng_image_colorspace_get(void *data __UNUSED__, void *image) +{ + Image_Entry *im; + + if (!image) return EVAS_COLORSPACE_ARGB8888; + im = image; + return im->space; +} + +static void +eng_image_mask_create(void *data __UNUSED__, void *image) +{ + RGBA_Image *im; + int sz; + uint8_t *dst,*end; + uint32_t *src; + + if (!image) return; + im = image; + if (im->mask.mask && !im->mask.dirty) return; + + if (im->mask.mask) free(im->mask.mask); + sz = im->cache_entry.w * im->cache_entry.h; + im->mask.mask = malloc(sz); + dst = im->mask.mask; + if (!im->image.data) + evas_cache_image_load_data(&im->cache_entry); + src = (void*) im->image.data; + if (!src) return; + for (end = dst + sz ; dst < end ; dst ++, src ++) + *dst = *src >> 24; + im->mask.dirty = 0; +} + + +static void * +eng_image_alpha_set(void *data __UNUSED__, void *image, int has_alpha) +{ + RGBA_Image *im; + + if (!image) return NULL; + im = image; + if (im->cache_entry.space != EVAS_COLORSPACE_ARGB8888) + { + im->cache_entry.flags.alpha = 0; + return im; + } + im = (RGBA_Image *) evas_cache_image_alone(&im->cache_entry); + evas_common_image_colorspace_dirty(im); + + im->cache_entry.flags.alpha = has_alpha ? 1 : 0; + return im; +} + +static void * +eng_image_border_set(void *data __UNUSED__, void *image, int l __UNUSED__, int r __UNUSED__, int t __UNUSED__, int b __UNUSED__) +{ + RGBA_Image *im; + + im = image; + return im; +} + +static void +eng_image_border_get(void *data __UNUSED__, void *image, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__) +{ + RGBA_Image *im; + + im = image; +} + +static char * +eng_image_comment_get(void *data __UNUSED__, void *image, char *key __UNUSED__) +{ + RGBA_Image *im; + + if (!image) return NULL; + im = image; + return im->info.comment; +} + +static char * +eng_image_format_get(void *data __UNUSED__, void *image __UNUSED__) +{ + return NULL; +} + +static void +eng_image_colorspace_set(void *data __UNUSED__, void *image, int cspace) +{ + Image_Entry *im; + + if (!image) return; + im = image; + evas_cache_image_colorspace(im, cspace); +} + +static void * +eng_image_native_set(void *data __UNUSED__, void *image, void *native __UNUSED__) +{ + return image; +} + +static void * +eng_image_native_get(void *data __UNUSED__, void *image __UNUSED__) +{ + return NULL; +} + +static void * +eng_image_load(void *data __UNUSED__, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + *error = EVAS_LOAD_ERROR_NONE; + return evas_common_load_image_from_file(file, key, lo, error); +} + +static void * +eng_image_new_from_data(void *data __UNUSED__, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + return evas_cache_image_data(evas_common_image_cache_get(), w, h, image_data, alpha, cspace); +} + +static void * +eng_image_new_from_copied_data(void *data __UNUSED__, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + return evas_cache_image_copied_data(evas_common_image_cache_get(), w, h, image_data, alpha, cspace); +} + +static void +eng_image_free(void *data __UNUSED__, void *image) +{ + evas_cache_image_drop(image); +} + +static void +eng_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) +{ + Image_Entry *im; + + im = image; + if (w) *w = im->w; + if (h) *h = im->h; +} + +static void * +eng_image_size_set(void *data __UNUSED__, void *image, int w, int h) +{ + Image_Entry *im; + + im = image; + return evas_cache_image_size_set(image, w, h); +} + +static void * +eng_image_dirty_region(void *data __UNUSED__, void *image, int x, int y, int w, int h) +{ + Image_Entry *im = image; + + if (!image) return NULL; + return evas_cache_image_dirty(im, x, y, w, h); +} + +static void * +eng_image_data_get(void *data __UNUSED__, void *image, int to_write, DATA32 **image_data, int *err) +{ + RGBA_Image *im; + int error; + + if (!image) + { + *image_data = NULL; + return NULL; + } + im = image; + error = evas_cache_image_load_data(&im->cache_entry); + switch (im->cache_entry.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (to_write) + im = (RGBA_Image *)evas_cache_image_alone(&im->cache_entry); + *image_data = im->image.data; + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + *image_data = im->cs.data; + break; + default: + abort(); + break; + } + if (err) *err = error; + return im; +} + +static void * +eng_image_data_put(void *data, void *image, DATA32 *image_data) +{ + RGBA_Image *im, *im2; + + if (!image) return NULL; + im = image; + switch (im->cache_entry.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (image_data != im->image.data) + { + int w, h; + + w = im->cache_entry.w; + h = im->cache_entry.h; + im2 = eng_image_new_from_data(data, w, h, image_data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + evas_cache_image_drop(&im->cache_entry); + im = im2; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + if (image_data != im->cs.data) + { + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + im->cs.data = image_data; + } + evas_common_image_colorspace_dirty(im); + break; + default: + abort(); + break; + } + return im; +} + +static void +eng_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) +{ + RGBA_Image *im = image; + + if (!im) return ; + evas_cache_image_preload_data(&im->cache_entry, target); +} + +static void +eng_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) +{ + RGBA_Image *im = image; + + if (!im) return ; + evas_cache_image_preload_cancel(&im->cache_entry, target); +} + +static void +eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth) +{ + RGBA_Image *im; + + if (!image) return; + im = image; +#ifdef BUILD_PIPE_RENDER + if ((cpunum > 1) +#ifdef EVAS_FRAME_QUEUING + && evas_common_frameq_enabled() +#endif + ) + { + evas_common_rgba_image_scalecache_prepare((Image_Entry *)(im), + surface, context, smooth, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h); + + evas_common_pipe_image_draw(im, surface, context, smooth, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h); + } + else +#endif + { +// if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) +// evas_cache_image_load_data(&im->cache_entry); +// evas_common_image_colorspace_normalize(im); + evas_common_rgba_image_scalecache_prepare(&im->cache_entry, surface, context, smooth, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h); + evas_common_rgba_image_scalecache_do(&im->cache_entry, surface, context, smooth, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h); +/* + if (smooth) + evas_common_scale_rgba_in_to_out_clip_smooth(im, surface, context, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h); + else + evas_common_scale_rgba_in_to_out_clip_sample(im, surface, context, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h); + */ + evas_common_cpu_end_opt(); + } +} + +static void +eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) +{ + RGBA_Image *im; + + if (!image) return; + if (npoints < 3) return; + im = image; + + if ((p[0].x == p[3].x) && + (p[1].x == p[2].x) && + (p[0].y == p[1].y) && + (p[3].y == p[2].y) && + (p[0].x <= p[1].x) && + (p[0].y <= p[2].y) && + (p[0].u == 0) && + (p[0].v == 0) && + (p[1].u == (int)(im->cache_entry.w << FP)) && + (p[1].v == 0) && + (p[2].u == (int)(im->cache_entry.w << FP)) && + (p[2].v == (int)(im->cache_entry.h << FP)) && + (p[3].u == 0) && + (p[3].v == (int)(im->cache_entry.h << FP)) && + (p[0].col == 0xffffffff) && + (p[1].col == 0xffffffff) && + (p[2].col == 0xffffffff) && + (p[3].col == 0xffffffff)) + { + int dx, dy, dw, dh; + + dx = p[0].x >> FP; + dy = p[0].y >> FP; + dw = (p[2].x >> FP) - dx; + dh = (p[2].y >> FP) - dy; + eng_image_draw + (data, context, surface, image, + 0, 0, im->cache_entry.w, im->cache_entry.h, + dx, dy, dw, dh, smooth); + } + else + { +#ifdef BUILD_PIPE_RENDER + if ((cpunum > 1) +# ifdef EVAS_FRAME_QUEUING + && evas_common_frameq_enabled() +# endif + ) + evas_common_pipe_map_draw(im, surface, context, npoints, p, smooth, level); + else +#endif + evas_common_map_rgba(im, surface, context, npoints, p, smooth, level); + } + evas_common_cpu_end_opt(); + + if (npoints > 4) + { + eng_image_map_draw(data, context, surface, image, npoints - 2, p + 2, + smooth, level); + } +} + +static void * +eng_image_map_surface_new(void *data __UNUSED__, int w, int h, int alpha) +{ + void *surface; + DATA32 *pixels; + surface = evas_cache_image_copied_data(evas_common_image_cache_get(), + w, h, NULL, alpha, + EVAS_COLORSPACE_ARGB8888); + pixels = evas_cache_image_pixels(surface); + return surface; +} + +static void +eng_image_map_surface_free(void *data __UNUSED__, void *surface) +{ + evas_cache_image_drop(surface); +} + +static void +eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) +{ + Image_Entry *im; + + if (!image) return; + im = image; + im->scale_hint = hint; +} + +static int +eng_image_scale_hint_get(void *data __UNUSED__, void *image) +{ + Image_Entry *im; + + if (!image) return EVAS_IMAGE_SCALE_HINT_NONE; + im = image; + return im->scale_hint; +} + +static Eina_Bool +eng_image_animated_get(void *data __UNUSED__, void *image) +{ + Image_Entry *im; + + if (!image) return EINA_FALSE; + im = image; + return im->flags.animated; +} + +static int +eng_image_animated_frame_count_get(void *data __UNUSED__, void *image) +{ + Image_Entry *im; + + if (!image) return -1; + im = image; + if (!im->flags.animated) return -1; + return im->frame_count; +} + +static Evas_Image_Animated_Loop_Hint +eng_image_animated_loop_type_get(void *data __UNUSED__, void *image) +{ + Image_Entry *im; + + if (!image) return EVAS_IMAGE_ANIMATED_HINT_NONE; + im = image; + if (!im->flags.animated) return EVAS_IMAGE_ANIMATED_HINT_NONE; + return im->loop_hint; +} + +static int +eng_image_animated_loop_count_get(void *data __UNUSED__, void *image) +{ + Image_Entry *im; + + if (!image) return -1; + im = image; + if (!im->flags.animated) return -1; + return im->loop_count; +} + +static double +eng_image_animated_frame_duration_get(void *data __UNUSED__, void *image, int start_frame, int frame_num) +{ + Image_Entry *im; + + if (!image) return -1; + im = image; + if (!im->flags.animated) return -1; + return evas_common_load_rgba_image_frame_duration_from_file(im, start_frame, frame_num); +} + +static Eina_Bool +eng_image_animated_frame_set(void *data __UNUSED__, void *image, int frame_index) +{ + Image_Entry *im; + + if (!image) return EINA_FALSE; + im = image; + if (!im->flags.animated) return EINA_FALSE; + if (im->cur_frame == frame_index) return EINA_FALSE; + im->cur_frame = frame_index; + return EINA_TRUE; +} + +static void +eng_image_cache_flush(void *data __UNUSED__) +{ + int tmp_size; + + tmp_size = evas_common_image_get_cache(); + evas_common_image_set_cache(0); + evas_common_rgba_image_scalecache_flush(); + evas_common_image_set_cache(tmp_size); +} + +static void +eng_image_cache_set(void *data __UNUSED__, int bytes) +{ + evas_common_image_set_cache(bytes); + evas_common_rgba_image_scalecache_size_set(bytes); +} + +static int +eng_image_cache_get(void *data __UNUSED__) +{ + return evas_common_image_get_cache(); +} + +static Evas_Font_Set * +eng_font_load(void *data __UNUSED__, const char *name, int size, + Font_Rend_Flags wanted_rend) +{ + return (Evas_Font_Set *) evas_common_font_load(name, size, wanted_rend); +} + +static Evas_Font_Set * +eng_font_memory_load(void *data __UNUSED__, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend) +{ + return (Evas_Font_Set *) evas_common_font_memory_load(name, size, fdata, + fdata_size, wanted_rend); +} + +static Evas_Font_Set * +eng_font_add(void *data __UNUSED__, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend) +{ + return (Evas_Font_Set *) evas_common_font_add((RGBA_Font *) font, name, + size, wanted_rend); +} + +static Evas_Font_Set * +eng_font_memory_add(void *data __UNUSED__, Evas_Font_Set *font, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend) +{ + return (Evas_Font_Set *) evas_common_font_memory_add((RGBA_Font *) font, + name, size, fdata, fdata_size, wanted_rend); +} + +static void +eng_font_free(void *data __UNUSED__, Evas_Font_Set *font) +{ + evas_common_font_free((RGBA_Font *) font); +} + +static int +eng_font_ascent_get(void *data __UNUSED__, Evas_Font_Set *font) +{ + return evas_common_font_ascent_get((RGBA_Font *) font); +} + +static int +eng_font_descent_get(void *data __UNUSED__, Evas_Font_Set *font) +{ + return evas_common_font_descent_get((RGBA_Font *) font); +} + +static int +eng_font_max_ascent_get(void *data __UNUSED__, Evas_Font_Set *font) +{ + return evas_common_font_max_ascent_get((RGBA_Font *) font); +} + +static int +eng_font_max_descent_get(void *data __UNUSED__, Evas_Font_Set *font) +{ + return evas_common_font_max_descent_get((RGBA_Font *) font); +} + +static void +eng_font_string_size_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props, int *w, int *h) +{ + evas_common_font_query_size((RGBA_Font *) font, text_props, w, h); +} + +static int +eng_font_inset_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props) +{ + return evas_common_font_query_inset((RGBA_Font *) font, text_props); +} + +static int +eng_font_right_inset_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props) +{ + return evas_common_font_query_right_inset((RGBA_Font *) font, text_props); +} + +static int +eng_font_h_advance_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props) +{ + int h, v; + + evas_common_font_query_advance((RGBA_Font *) font, text_props, &h, &v); + return h; +} + +static int +eng_font_v_advance_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props) +{ + int h, v; + + evas_common_font_query_advance((RGBA_Font *) font, text_props, &h, &v); + return v; +} + +static int +eng_font_pen_coords_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch) +{ + return evas_common_font_query_pen_coords((RGBA_Font *) font, text_props, pos, cpen_x, cy, cadv, ch); +} + +static Eina_Bool +eng_font_text_props_info_create(void *data __UNUSED__, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t par_pos, size_t len) +{ + return evas_common_text_props_content_create((RGBA_Font_Int *) fi, text, + text_props, par_props, par_pos, len); +} + +static int +eng_font_char_coords_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch) +{ + return evas_common_font_query_char_coords((RGBA_Font *) font, text_props, pos, cx, cy, cw, ch); +} + +static int +eng_font_char_at_coords_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) +{ + return evas_common_font_query_char_at_coords((RGBA_Font *) font, text_props, x, y, cx, cy, cw, ch); +} + +static int +eng_font_last_up_to_pos(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props, int x, int y) +{ + return evas_common_font_query_last_up_to_pos((RGBA_Font *) font, text_props, x, y); +} + +static int +eng_font_run_font_end_get(void *data __UNUSED__, Evas_Font_Set *font, Evas_Font_Instance **script_fi, Evas_Font_Instance **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len) +{ + return evas_common_font_query_run_font_end_get((RGBA_Font *) font, + (RGBA_Font_Int **) script_fi, (RGBA_Font_Int **) cur_fi, + script, text, run_len); +} + +static void +eng_font_draw(void *data __UNUSED__, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *text_props) +{ +#ifdef BUILD_PIPE_RENDER + if ((cpunum > 1) +#ifdef EVAS_FRAME_QUEUING + && evas_common_frameq_enabled() +#endif + ) + evas_common_pipe_text_draw(surface, context, (RGBA_Font *) font, x, y, + text_props); + else +#endif + { + evas_common_font_draw(surface, context, (RGBA_Font *) font, x, y, + text_props); + evas_common_cpu_end_opt(); + } +} + +static void +eng_font_cache_flush(void *data __UNUSED__) +{ + int tmp_size; + + tmp_size = evas_common_font_cache_get(); + evas_common_font_cache_set(0); + evas_common_font_flush(); + evas_common_font_cache_set(tmp_size); +} + +static void +eng_font_cache_set(void *data __UNUSED__, int bytes) +{ + evas_common_font_cache_set(bytes); +} + +static int +eng_font_cache_get(void *data __UNUSED__) +{ + return evas_common_font_cache_get(); +} + +static void +eng_font_hinting_set(void *data __UNUSED__, Evas_Font_Set *font, int hinting) +{ + evas_common_font_hinting_set((RGBA_Font *) font, hinting); +} + +static int +eng_font_hinting_can_hint(void *data __UNUSED__, int hinting) +{ + return evas_common_hinting_available(hinting); +} + +static Eina_Bool +eng_canvas_alpha_get(void *data __UNUSED__, void *info __UNUSED__) +{ + return EINA_TRUE; +} + + +/* Filter API */ +#if 0 // filtering disabled +static void +eng_image_draw_filtered(void *data __UNUSED__, void *context __UNUSED__, + void *surface, void *image, Evas_Filter_Info *filter) +{ + Evas_Software_Filter_Fn fn; + RGBA_Image *im = image; + + fn = evas_filter_software_get(filter); + if (!fn) return; + if (im->cache_entry.cache) evas_cache_image_load_data(&im->cache_entry); + fn(filter, image, surface); + return; +} + +static Filtered_Image * +eng_image_filtered_get(void *image, uint8_t *key, size_t keylen) +{ + RGBA_Image *im = image; + Filtered_Image *fi; + Eina_List *l; + + for (l = im->filtered ; l ; l = l->next) + { + fi = l->data; + if (fi->keylen != keylen) continue; + if (memcmp(key, fi->key, keylen) != 0) continue; + fi->ref ++; + return fi; + } + + return NULL; +} + +static Filtered_Image * +eng_image_filtered_save(void *image, void *fimage, uint8_t *key, size_t keylen) +{ + RGBA_Image *im = image; + Filtered_Image *fi; + Eina_List *l; + + for (l = im->filtered ; l ; l = l->next) + { + fi = l->data; + if (fi->keylen != keylen) continue; + if (memcmp(key, fi->key, keylen) == 0) continue; + evas_cache_image_drop((void *)fi->image); + fi->image = fimage; + return fi; + } + + fi = calloc(1,sizeof(Filtered_Image)); + if (!fi) return NULL; + + fi->keylen = keylen; + fi->key = malloc(keylen); + memcpy(fi->key, key, keylen); + fi->image = fimage; + fi->ref = 1; + + im->filtered = eina_list_prepend(im->filtered, fi); + + return fi; +} + +static void +eng_image_filtered_free(void *image, Filtered_Image *fi) +{ + RGBA_Image *im = image; + + fi->ref --; + if (fi->ref) return; + + free(fi->key); + evas_cache_image_drop(&fi->image->cache_entry); + fi->image = NULL; + + im->filtered = eina_list_remove(im->filtered, fi); +} +#endif + +static int +eng_image_load_error_get(void *data __UNUSED__, void *image) +{ + RGBA_Image *im; + + if (!image) return EVAS_LOAD_ERROR_NONE; + im = image; + return im->cache_entry.load_error; +} + +/* + ***** + ** + ** ENGINE API + ** + ***** + */ + +static Evas_Func func = +{ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + eng_output_dump, + /* draw context virtual methods */ + eng_context_new, + eng_canvas_alpha_get, + eng_context_free, + eng_context_clip_set, + eng_context_clip_clip, + eng_context_clip_unset, + eng_context_clip_get, + eng_context_mask_set, + eng_context_mask_unset, + eng_context_color_set, + eng_context_color_get, + eng_context_multiplier_set, + eng_context_multiplier_unset, + eng_context_multiplier_get, + eng_context_cutout_add, + eng_context_cutout_clear, + eng_context_anti_alias_set, + eng_context_anti_alias_get, + eng_context_color_interpolation_set, + eng_context_color_interpolation_get, + eng_context_render_op_set, + eng_context_render_op_get, + /* rect draw funcs */ + eng_rectangle_draw, + /* line draw funcs */ + eng_line_draw, + /* polygon draw funcs */ + eng_polygon_point_add, + eng_polygon_points_clear, + eng_polygon_draw, + /* image draw funcs */ + eng_image_load, + eng_image_new_from_data, + eng_image_new_from_copied_data, + eng_image_free, + eng_image_size_get, + eng_image_size_set, + NULL, + eng_image_dirty_region, + eng_image_data_get, + eng_image_data_put, + eng_image_data_preload_request, + eng_image_data_preload_cancel, + eng_image_alpha_set, + eng_image_alpha_get, + eng_image_border_set, + eng_image_border_get, + eng_image_draw, + eng_image_comment_get, + eng_image_format_get, + eng_image_colorspace_set, + eng_image_colorspace_get, + eng_image_mask_create, + eng_image_native_set, + eng_image_native_get, + /* image cache funcs */ + eng_image_cache_flush, + eng_image_cache_set, + eng_image_cache_get, + /* font draw functions */ + eng_font_load, + eng_font_memory_load, + eng_font_add, + eng_font_memory_add, + eng_font_free, + eng_font_ascent_get, + eng_font_descent_get, + eng_font_max_ascent_get, + eng_font_max_descent_get, + eng_font_string_size_get, + eng_font_inset_get, + eng_font_h_advance_get, + eng_font_v_advance_get, + eng_font_char_coords_get, + eng_font_char_at_coords_get, + eng_font_draw, + /* font cache functions */ + eng_font_cache_flush, + eng_font_cache_set, + eng_font_cache_get, + /* font hinting functions */ + eng_font_hinting_set, + eng_font_hinting_can_hint, + eng_image_scale_hint_set, + eng_image_scale_hint_get, + /* more font draw functions */ + eng_font_last_up_to_pos, + eng_image_map_draw, + eng_image_map_surface_new, + eng_image_map_surface_free, + NULL, // eng_image_content_hint_set - software doesn't use it + NULL, // eng_image_content_hint_get - software doesn't use it + eng_font_pen_coords_get, + eng_font_text_props_info_create, + eng_font_right_inset_get, +#if 0 // filtering disabled + eng_image_draw_filtered, + eng_image_filtered_get, + eng_image_filtered_save, + eng_image_filtered_free, +#endif + NULL, // FIXME: need software mesa for gl rendering <- gl_surface_create + NULL, // FIXME: need software mesa for gl rendering <- gl_surface_destroy + NULL, // FIXME: need software mesa for gl rendering <- gl_context_create + NULL, // FIXME: need software mesa for gl rendering <- gl_context_destroy + NULL, // FIXME: need software mesa for gl rendering <- gl_make_current + NULL, // FIXME: need software mesa for gl rendering <- gl_string_query + NULL, // FIXME: need software mesa for gl rendering <- gl_proc_address_get + NULL, // FIXME: need software mesa for gl rendering <- gl_native_surface_get + NULL, // FIXME: need software mesa for gl rendering <- gl_api_get + eng_image_load_error_get, + eng_font_run_font_end_get, + eng_image_animated_get, + eng_image_animated_frame_count_get, + eng_image_animated_loop_type_get, + eng_image_animated_loop_count_get, + eng_image_animated_frame_duration_get, + eng_image_animated_frame_set, + NULL + /* FUTURE software generic calls go here */ +}; + +/* + ***** + ** + ** MODULE ACCESSIBLE API API + ** + ***** + */ + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + _evas_soft_gen_log_dom = eina_log_domain_register + ("evas-software_generic", EVAS_DEFAULT_LOG_COLOR); + if(_evas_soft_gen_log_dom<0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + em->functions = (void *)(&func); + cpunum = eina_cpu_count(); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_soft_gen_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "software_generic", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_generic); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_GENERIC +EVAS_EINA_MODULE_DEFINE(engine, software_generic); +#endif diff --git a/libraries/evas/src/modules/engines/software_sdl/Evas_Engine_SDL.h b/libraries/evas/src/modules/engines/software_sdl/Evas_Engine_SDL.h new file mode 100644 index 0000000..3cce6ec --- /dev/null +++ b/libraries/evas/src/modules/engines/software_sdl/Evas_Engine_SDL.h @@ -0,0 +1,27 @@ +#ifndef _EVAS_ENGINE_SDL_H +#define _EVAS_ENGINE_SDL_H + +#include + +typedef struct _Evas_Engine_Info_SDL Evas_Engine_Info_SDL; + +struct _Evas_Engine_Info_SDL +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + struct { + int rotation; + int fullscreen : 1; + int hwsurface : 1; + int noframe : 1; + int alpha : 1; + } info; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; +#endif + + diff --git a/libraries/evas/src/modules/engines/software_sdl/Makefile.am b/libraries/evas/src/modules/engines/software_sdl/Makefile.am new file mode 100644 index 0000000..dc548ba --- /dev/null +++ b/libraries/evas/src/modules/engines/software_sdl/Makefile.am @@ -0,0 +1,45 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_software_sdl_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_ENGINE_SOFTWARE_SDL + +SOFTWARE_SDL_SOURCES = evas_engine.c +SOFTWARE_SDL_LIBADD = @evas_engine_software_sdl_libs@ + + +includes_HEADERS = Evas_Engine_SDL.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_SOFTWARE_SDL + +pkgdir = $(libdir)/evas/modules/engines/software_sdl/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(SOFTWARE_SDL_SOURCES) +module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_SDL_LIBADD) +module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_software_sdl.la + +libevas_engine_software_sdl_la_SOURCES = $(SOFTWARE_SDL_SOURCES) +libevas_engine_software_sdl_la_LIBADD = $(SOFTWARE_SDL_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/software_sdl/Makefile.in b/libraries/evas/src/modules/engines/software_sdl/Makefile.in new file mode 100644 index 0000000..d1052c1 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_sdl/Makefile.in @@ -0,0 +1,796 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/software_sdl +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@libevas_engine_software_sdl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_software_sdl_la_SOURCES_DIST = evas_engine.c +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@am__objects_1 = evas_engine.lo +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@am_libevas_engine_software_sdl_la_OBJECTS = $(am__objects_1) +libevas_engine_software_sdl_la_OBJECTS = \ + $(am_libevas_engine_software_sdl_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@am_libevas_engine_software_sdl_la_rpath = +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la \ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@ $(am__DEPENDENCIES_1) +am__module_la_SOURCES_DIST = evas_engine.c +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@am__objects_2 = \ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@ module_la-evas_engine.lo +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_sdl_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_software_sdl_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_SDL.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_software_sdl_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@SOFTWARE_SDL_SOURCES = evas_engine.c +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@SOFTWARE_SDL_LIBADD = @evas_engine_software_sdl_libs@ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@includes_HEADERS = Evas_Engine_SDL.h +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_sdl/$(MODULE_ARCH) +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_SOURCES = $(SOFTWARE_SDL_SOURCES) +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_SDL_LIBADD) +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@noinst_LTLIBRARIES = libevas_engine_software_sdl.la +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@libevas_engine_software_sdl_la_SOURCES = $(SOFTWARE_SDL_SOURCES) +@BUILD_ENGINE_SOFTWARE_SDL_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE@libevas_engine_software_sdl_la_LIBADD = $(SOFTWARE_SDL_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_sdl/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/software_sdl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_sdl.la: $(libevas_engine_software_sdl_la_OBJECTS) $(libevas_engine_software_sdl_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_software_sdl_la_rpath) $(libevas_engine_software_sdl_la_OBJECTS) $(libevas_engine_software_sdl_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_sdl/evas_engine.c b/libraries/evas/src/modules/engines/software_sdl/evas_engine.c new file mode 100644 index 0000000..22c11b0 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_sdl/evas_engine.c @@ -0,0 +1,1218 @@ +#include +#include +#include +#include +#include +#include + +#include "evas_common.h" /* Also includes international specific stuff */ +#include "evas_engine.h" + +int _evas_engine_soft_sdl_log_dom = -1; +/* #define DEBUG_SDL */ + +static Evas_Func func, pfunc; + +static void* _sdl_output_setup (int w, int h, int fullscreen, int noframe, int alpha, int hwsurface); + +static Engine_Image_Entry *_sdl_image_alloc (void); +static void _sdl_image_delete (Engine_Image_Entry *eim); + +static int _sdl_image_constructor (Engine_Image_Entry*, void* data); +static void _sdl_image_destructor (Engine_Image_Entry *eim); + +static void _sdl_image_dirty_region(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h); + +static int _sdl_image_dirty (Engine_Image_Entry *dst, const Engine_Image_Entry *src); + +static int _sdl_image_size_set (Engine_Image_Entry *dst, const Engine_Image_Entry *src); + +static int _sdl_image_update_data (Engine_Image_Entry* dst, void* engine_data); + +static void _sdl_image_load (Engine_Image_Entry *eim, const Image_Entry* im); +static int _sdl_image_mem_size_get(Engine_Image_Entry *eim); + +#ifdef DEBUG_SDL +static void _sdl_image_debug (const char* context, Engine_Image_Entry* im); +#endif + +static const Evas_Cache_Engine_Image_Func _sdl_cache_engine_image_cb = { + NULL /* key */, + _sdl_image_alloc /* alloc */, + _sdl_image_delete /* dealloc */, + _sdl_image_constructor /* constructor */, + _sdl_image_destructor /* destructor */, + _sdl_image_dirty_region /* dirty_region */, + _sdl_image_dirty /* dirty */, + _sdl_image_size_set /* size_set */, + _sdl_image_update_data /* update_data */, + _sdl_image_load /* load */, + _sdl_image_mem_size_get /* mem_size_get */, +#ifdef DEBUG_SDL /* debug */ + _sdl_image_debug +#else + NULL +#endif +}; + +#define _SDL_UPDATE_PIXELS(EIM) \ + ((RGBA_Image *) EIM->cache_entry.src)->image.data = EIM->surface->pixels; + +#define RMASK 0x00ff0000 +#define GMASK 0x0000ff00 +#define BMASK 0x000000ff +#define AMASK 0xff000000 + +/* SDL engine info function */ +static void* +evas_engine_sdl_info (Evas* e __UNUSED__) +{ + Evas_Engine_Info_SDL* info; + info = calloc(1, sizeof (Evas_Engine_Info_SDL)); + if (!info) return NULL; + info->magic.magic = rand(); + return info; +} + +static void +evas_engine_sdl_info_free (Evas* e __UNUSED__, void* info) +{ + Evas_Engine_Info_SDL* in; + in = (Evas_Engine_Info_SDL*) info; + free(in); +} + +/* SDL engine output manipulation function */ +static int +evas_engine_sdl_setup (Evas* e, void* in) +{ + Evas_Engine_Info_SDL* info = (Evas_Engine_Info_SDL*) in; + + /* if we arent set to sdl, why the hell do we get called?! */ + if (evas_output_method_get(e) != evas_render_method_lookup("software_sdl")) + return 0; + + SDL_Init(SDL_INIT_NOPARACHUTE); + + if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) + { + ERR("SDL_Init failed with %s", SDL_GetError()); + SDL_Quit(); + return 0; + } + + /* lets just set up */ + e->engine.data.output = _sdl_output_setup(e->output.w, e->output.h, + info->info.fullscreen, + info->info.noframe, + info->info.alpha, + info->info.hwsurface); + + if (!e->engine.data.output) + return 0; + + e->engine.func = &func; + e->engine.data.context = e->engine.func->context_new(e->engine.data.output); + + return 1; +} + +static void +evas_engine_sdl_output_free (void *data) +{ + Render_Engine* re = data; + + if (re->tb) + evas_common_tilebuf_free(re->tb); + if (re->rects) + evas_common_tilebuf_free_render_rects(re->rects); + if (re->rgba_engine_image) + evas_cache_engine_image_drop(&re->rgba_engine_image->cache_entry); + if (re->cache) + evas_cache_engine_image_shutdown(re->cache); + + if (re->update_rects) + free(re->update_rects); + free(re); + + evas_common_font_shutdown(); + evas_common_image_shutdown(); + + SDL_QuitSubSystem(SDL_INIT_VIDEO); +} + +static void +evas_engine_sdl_output_resize (void *data, int w, int h) +{ + /* FIXME */ + Render_Engine *re = data; + SDL_Surface *surface; + + if (w == re->tb->outbuf_w && h == re->tb->outbuf_h) + return; + + /* Destroy the current screen */ + evas_cache_engine_image_drop(&re->rgba_engine_image->cache_entry); + + /* Rebuil tilebuf */ + evas_common_tilebuf_free(re->tb); + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + + /* Build the new screen */ + surface = SDL_SetVideoMode(w, h, 32, + (re->flags.hwsurface ? SDL_HWSURFACE : SDL_SWSURFACE) + | (re->flags.fullscreen ? SDL_FULLSCREEN : 0) + | (re->flags.noframe ? SDL_NOFRAME : 0) + | (re->flags.alpha ? SDL_SRCALPHA : 0)); + + if (!surface) + { + ERR("Unable to change the resolution to : %ix%i", w, h); + exit(-1); + } + re->rgba_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface); + if (!re->rgba_engine_image) + { + ERR("RGBA_Image allocation from SDL failed"); + exit(-1); + } + + SDL_FillRect(surface, NULL, 0); +} + +static void +evas_engine_sdl_output_tile_size_set (void *data, int w, int h) +{ + Render_Engine* re = (Render_Engine*) data; + + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +evas_engine_sdl_output_redraws_rect_add (void *data, int x, int y, int w, int h) +{ + Render_Engine* re = (Render_Engine*) data; + + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +evas_engine_sdl_output_redraws_rect_del (void *data, int x, int y, int w, int h) +{ + Render_Engine* re = (Render_Engine*) data; + + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +evas_engine_sdl_output_redraws_clear (void *data) +{ + Render_Engine* re = (Render_Engine*) data; + + evas_common_tilebuf_clear(re->tb); +} + +static void* +evas_engine_sdl_output_redraws_next_update_get (void *data, + int *x, int *y, int *w, int *h, + int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re = data; + Tilebuf_Rect *tb_rect; + SDL_Rect rect; + + if (re->flags.end) + { + re->flags.end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + re->cur_rect = EINA_INLIST_GET(re->rects); + } + if (!re->cur_rect) + { + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + return NULL; + } + + tb_rect = (Tilebuf_Rect*) re->cur_rect; + *cx = *x = tb_rect->x; + *cy = *y = tb_rect->y; + *cw = *w = tb_rect->w; + *ch = *h = tb_rect->h; + re->cur_rect = re->cur_rect->next; + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->flags.end = 1; + } + + rect.x = *x; + rect.y = *y; + rect.w = *w; + rect.h = *h; + + /* Return the "fake" surface so it is passed to the drawing routines. */ + return re->rgba_engine_image; +} + +static void +evas_engine_sdl_output_redraws_next_update_push (void *data, void *surface __UNUSED__, + int x, int y, int w, int h) +{ + Render_Engine *re = (Render_Engine *) data; + + if (re->update_rects_count + 1 > re->update_rects_limit) + { + re->update_rects_limit += 8; + re->update_rects = realloc(re->update_rects, sizeof (SDL_Rect) * re->update_rects_limit); + } + + re->update_rects[re->update_rects_count].x = x; + re->update_rects[re->update_rects_count].y = y; + re->update_rects[re->update_rects_count].w = w; + re->update_rects[re->update_rects_count].h = h; + + ++re->update_rects_count; + + evas_common_cpu_end_opt(); +} + +static void +_sdl_image_dirty_region(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h) +{ + SDL_Engine_Image_Entry *dst; + RGBA_Image *im; + + dst = (SDL_Engine_Image_Entry *) eim; + + SDL_UpdateRect(dst->surface, x, y, w, h); + + im = (RGBA_Image *)eim->src; + im->flags |= RGBA_IMAGE_IS_DIRTY; +} + +static void +evas_engine_sdl_output_flush(void *data) +{ + Render_Engine *re = (Render_Engine *) data; + + if (re->update_rects_count > 0) + SDL_UpdateRects(re->rgba_engine_image->surface, re->update_rects_count, re->update_rects); + + re->update_rects_count = 0; +} + + +static void +evas_engine_sdl_output_idle_flush(void *data) +{ + (void) data; +} + +/* + * Image objects + */ + +static void* +evas_engine_sdl_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + Render_Engine* re = (Render_Engine*) data;; + + *error = 0; + return evas_cache_engine_image_request(re->cache, file, key, lo, NULL, error); +} + +static int +evas_engine_sdl_image_alpha_get(void *data __UNUSED__, void *image) +{ + SDL_Engine_Image_Entry *eim = image; + RGBA_Image *im; + + if (!eim) return 1; + im = (RGBA_Image *) eim->cache_entry.src; + switch (eim->cache_entry.src->space) + { + case EVAS_COLORSPACE_ARGB8888: + if (im->cache_entry.flags.alpha) return 1; + default: + break; + } + return 0; +} + +static void +evas_engine_sdl_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) +{ + SDL_Engine_Image_Entry *eim; + + eim = image; + if (w) *w = eim->cache_entry.src->w; + if (h) *h = eim->cache_entry.src->h; +} + +static int +evas_engine_sdl_image_colorspace_get(void *data __UNUSED__, void *image) +{ + SDL_Engine_Image_Entry *eim = image; + + if (!eim) return EVAS_COLORSPACE_ARGB8888; + return eim->cache_entry.src->space; +} + +static void +evas_engine_sdl_image_colorspace_set(void *data __UNUSED__, void *image, int cspace) +{ + SDL_Engine_Image_Entry *eim = image; + + if (!eim) return; + if (eim->cache_entry.src->space == cspace) return; + + evas_cache_engine_image_colorspace(&eim->cache_entry, cspace, NULL); +} + +static void* +evas_engine_sdl_image_new_from_copied_data(void *data, + int w, int h, + DATA32* image_data, + int alpha, int cspace) +{ + Render_Engine *re = (Render_Engine*) data; + + return evas_cache_engine_image_copied_data(re->cache, w, h, image_data, alpha, cspace, NULL); +} + +static void* +evas_engine_sdl_image_new_from_data(void *data, int w, int h, DATA32* image_data, int alpha, int cspace) +{ + Render_Engine *re = (Render_Engine*) data; + + return evas_cache_engine_image_data(re->cache, w, h, image_data, alpha, cspace, NULL); +} + +static void +evas_engine_sdl_image_free(void *data, void *image) +{ + SDL_Engine_Image_Entry *eim = image; + + (void) data; + + evas_cache_engine_image_drop(&eim->cache_entry); +} + +static void* +evas_engine_sdl_image_size_set(void *data, void *image, int w, int h) +{ + SDL_Engine_Image_Entry *eim = image; + + (void) data; + + return evas_cache_engine_image_size_set(&eim->cache_entry, w, h); +} + +static void* +evas_engine_sdl_image_dirty_region(void *data, + void *image, + int x, int y, int w, int h) +{ + SDL_Engine_Image_Entry *eim = image; + + (void) data; + + return evas_cache_engine_image_dirty(&eim->cache_entry, x, y, w, h); +} + +static void* +evas_engine_sdl_image_data_get(void *data, void *image, + int to_write, DATA32** image_data, int *err) +{ + SDL_Engine_Image_Entry *eim = image; + RGBA_Image *im; + + (void) data; + + if (!eim) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_GENERIC; + return NULL; + } + im = (RGBA_Image *) eim->cache_entry.src; + + switch (eim->cache_entry.src->space) + { + case EVAS_COLORSPACE_ARGB8888: + if (to_write) + eim = (SDL_Engine_Image_Entry *) evas_cache_engine_image_dirty(&eim->cache_entry, 0, 0, eim->cache_entry.src->w, eim->cache_entry.src->h); + + evas_cache_engine_image_load_data(&eim->cache_entry); + *image_data = im->image.data; + break; + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + *image_data = im->cs.data; + break; + default: + abort(); + break; + } + if (err) *err = EVAS_LOAD_ERROR_NONE; + return eim; +} + +static void* +evas_engine_sdl_image_data_put(void *data, void *image, DATA32* image_data) +{ + SDL_Engine_Image_Entry *eim = image; + Render_Engine *re = data; + RGBA_Image *im; + + if (!eim) return NULL; + im = (RGBA_Image*) eim->cache_entry.src; + + switch (eim->cache_entry.src->space) + { + case EVAS_COLORSPACE_ARGB8888: + if (image_data != im->image.data) + { + evas_cache_engine_image_drop(&eim->cache_entry); + eim = (SDL_Engine_Image_Entry *) evas_cache_engine_image_data(re->cache, + eim->cache_entry.w, eim->cache_entry.h, + image_data, + func.image_alpha_get(data, eim), + func.image_colorspace_get(data, eim), + NULL); + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + if (image_data != im->cs.data) + { + if (im->cs.data) + if (!im->cs.no_free) + free(im->cs.data); + im->cs.data = image_data; + evas_common_image_colorspace_dirty(im); + } + break; + default: + abort(); + break; + } + return eim; +} + +static void +evas_engine_sdl_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) +{ + SDL_Engine_Image_Entry *eim = image; + RGBA_Image *im; + + if (!eim) return ; + im = (RGBA_Image*) eim->cache_entry.src; + if (!im) return ; + evas_cache_image_preload_data(&im->cache_entry, target); +} + +static void +evas_engine_sdl_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) +{ + SDL_Engine_Image_Entry *eim = image; + RGBA_Image *im; + + if (!eim) return ; + im = (RGBA_Image*) eim->cache_entry.src; + if (!im) return ; + evas_cache_image_preload_cancel(&im->cache_entry, target); +} + +static void* +evas_engine_sdl_image_alpha_set(void *data, void *image, int has_alpha) +{ + SDL_Engine_Image_Entry *eim = image; + RGBA_Image *im; + + (void) data; + + if (!eim) return NULL; + + im = (RGBA_Image *) eim->cache_entry.src; + + if (eim->cache_entry.src->space != EVAS_COLORSPACE_ARGB8888) + { + im->cache_entry.flags.alpha = 0; + return eim; + } + + eim = (SDL_Engine_Image_Entry *) evas_cache_engine_image_dirty(&eim->cache_entry, 0, 0, eim->cache_entry.w, eim->cache_entry.h); + + /* FIXME: update SDL_Surface flags */ + im->cache_entry.flags.alpha = has_alpha ? 1 : 0; + return eim; +} + +static void* +evas_engine_sdl_image_border_set(void *data __UNUSED__, void *image, int l __UNUSED__, int r __UNUSED__, int t __UNUSED__, int b __UNUSED__) +{ + return image; +} + +static void +evas_engine_sdl_image_border_get(void *data __UNUSED__, void *image __UNUSED__, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__) +{ + /* FIXME: need to know what evas expect from this call */ +} + +static void +evas_engine_sdl_image_draw(void *data, void *context, void *surface, void *image, + int src_region_x, int src_region_y, int src_region_w, int src_region_h, + int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, + int smooth) +{ + SDL_Engine_Image_Entry *eim = image; + SDL_Engine_Image_Entry *dst = surface; + RGBA_Draw_Context *dc = (RGBA_Draw_Context*) context; + int mustlock_im = 0; + int mustlock_dst = 0; + + (void) data; + + if (eim->cache_entry.src->space == EVAS_COLORSPACE_ARGB8888) + evas_cache_engine_image_load_data(&eim->cache_entry); + + /* Fallback to software method */ + if (SDL_MUSTLOCK(dst->surface)) + { + mustlock_dst = 1; + SDL_LockSurface(dst->surface); + _SDL_UPDATE_PIXELS(dst); + } + + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + + evas_common_image_colorspace_normalize((RGBA_Image *) eim->cache_entry.src); + + if (smooth) + evas_common_scale_rgba_in_to_out_clip_smooth((RGBA_Image *) eim->cache_entry.src, + (RGBA_Image *) dst->cache_entry.src, + dc, + src_region_x, src_region_y, src_region_w, src_region_h, + dst_region_x, dst_region_y, dst_region_w, dst_region_h); + else + evas_common_scale_rgba_in_to_out_clip_sample((RGBA_Image *) eim->cache_entry.src, + (RGBA_Image *) dst->cache_entry.src, + dc, + src_region_x, src_region_y, src_region_w, src_region_h, + dst_region_x, dst_region_y, dst_region_w, dst_region_h); + evas_common_cpu_end_opt (); + + if (mustlock_im) + SDL_UnlockSurface(eim->surface); + + if (mustlock_dst) + SDL_UnlockSurface(dst->surface); +} + +static void +evas_engine_sdl_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) +{ + SDL_Engine_Image_Entry *eim = image; + SDL_Engine_Image_Entry *dst = surface; + int mustlock_im = 0; + int mustlock_dst = 0; + + if (!eim || !dst) return; + + if (SDL_MUSTLOCK(dst->surface)) + { + mustlock_dst = 1; + SDL_LockSurface(dst->surface); + _SDL_UPDATE_PIXELS(dst); + } + + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + + evas_common_map_rgba((RGBA_Image*) eim->cache_entry.src, + (RGBA_Image*) dst->cache_entry.src, context, npoints, p, smooth, level); + evas_common_cpu_end_opt(); + + if (mustlock_im) + SDL_UnlockSurface(eim->surface); + + if (mustlock_dst) + SDL_UnlockSurface(dst->surface); +} + +static void * +evas_engine_sdl_image_map_surface_new(void *data, int w, int h, int alpha) +{ + Render_Engine *re = (Render_Engine*) data; + void *surface; + + surface = evas_cache_engine_image_copied_data(re->cache, + w, h, NULL, alpha, + EVAS_COLORSPACE_ARGB8888, + NULL); + return surface; +} + +static void +evas_engine_sdl_image_map_surface_free(void *data __UNUSED__, void *surface) +{ + evas_cache_engine_image_drop(surface); +} + +static void +evas_engine_sdl_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) +{ + SDL_Engine_Image_Entry *eim; + + if (!image) return ; + eim = image; + eim->cache_entry.src->scale_hint = hint; +} + +static int +evas_engine_sdl_image_scale_hint_get(void *data __UNUSED__, void *image) +{ + SDL_Engine_Image_Entry *eim; + + if (!image) return EVAS_IMAGE_SCALE_HINT_NONE; + eim = image; + return eim->cache_entry.src->scale_hint; +} + +static void +evas_engine_sdl_image_cache_flush(void *data) +{ + Render_Engine *re = (Render_Engine*) data; + int size; + + size = evas_cache_engine_image_get(re->cache); + evas_cache_engine_image_set(re->cache, 0); + evas_cache_engine_image_set(re->cache, size); +} + +static void +evas_engine_sdl_image_cache_set(void *data, int bytes) +{ + Render_Engine *re = (Render_Engine*) data; + + evas_cache_engine_image_set(re->cache, bytes); +} + +static int +evas_engine_sdl_image_cache_get(void *data) +{ + Render_Engine *re = (Render_Engine*) data; + + return evas_cache_engine_image_get(re->cache); +} + +static char* +evas_engine_sdl_image_comment_get(void *data __UNUSED__, void *image, char *key __UNUSED__) +{ + SDL_Engine_Image_Entry *eim = image; + RGBA_Image *im; + + if (!eim) return NULL; + im = (RGBA_Image *) eim->cache_entry.src; + + return im->info.comment; +} + +static char* +evas_engine_sdl_image_format_get(void *data __UNUSED__, void *image __UNUSED__) +{ + /* FIXME: need to know what evas expect from this call */ + return NULL; +} + +static void +evas_engine_sdl_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props) +{ + SDL_Engine_Image_Entry *eim = surface; + int mustlock_im = 0; + + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + + evas_common_font_draw((RGBA_Image *) eim->cache_entry.src, context, font, x, y, intl_props); + evas_common_cpu_end_opt(); + + if (mustlock_im) + SDL_UnlockSurface(eim->surface); +} + +static void +evas_engine_sdl_line_draw(void *data __UNUSED__, void *context, void *surface, int x1, int y1, int x2, int y2) +{ + SDL_Engine_Image_Entry *eim = surface; + int mustlock_im = 0; + + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + + evas_common_line_draw((RGBA_Image *) eim->cache_entry.src, context, x1, y1, x2, y2); + evas_common_cpu_end_opt(); + + if (mustlock_im) + SDL_UnlockSurface(eim->surface); +} + +static void +evas_engine_sdl_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x, int y, int w, int h) +{ + SDL_Engine_Image_Entry *eim = surface; +#if ENGINE_SDL_PRIMITIVE + RGBA_Draw_Context *dc = context; +#endif + int mustlock_im = 0; + +#if ENGINE_SDL_PRIMITIVE + if (A_VAL(&dc->col.col) != 0x00) + { + if (A_VAL(&dc->col.col) != 0xFF) + { +#endif + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + + evas_common_rectangle_draw((RGBA_Image *) eim->cache_entry.src, context, x, y, w, h); + evas_common_cpu_end_opt(); + + if (mustlock_im) + SDL_UnlockSurface(eim->surface); +#if ENGINE_SDL_PRIMITIVE + } + else + { + SDL_Rect dstrect; + + if (dc->clip.use) + { + SDL_Rect cliprect; + + cliprect.x = dc->clip.x; + cliprect.y = dc->clip.y; + cliprect.w = dc->clip.w; + cliprect.h = dc->clip.h; + + SDL_SetClipRect(eim->surface, &cliprect); + } + + dstrect.x = x; + dstrect.y = y; + dstrect.w = w; + dstrect.h = h; + + SDL_FillRect(eim->surface, &dstrect, SDL_MapRGBA(eim->surface->format, R_VAL(&dc->col.col), G_VAL(&dc->col.col), B_VAL(&dc->col.col), 0xFF)); + + if (dc->clip.use) + SDL_SetClipRect(eim->surface, NULL); + } + } +#endif +} + +static void +evas_engine_sdl_polygon_draw(void *data __UNUSED__, void *context, void *surface, void *polygon, int x, int y) +{ + SDL_Engine_Image_Entry *eim = surface; + int mustlock_im = 0; + + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + + evas_common_polygon_draw((RGBA_Image *) eim->cache_entry.src, context, polygon, x, y); + evas_common_cpu_end_opt(); + + if (mustlock_im) + SDL_UnlockSurface(eim->surface); +} + +static int module_open(Evas_Module *em) +{ + if (!em) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + _evas_engine_soft_sdl_log_dom = eina_log_domain_register + ("evas-software_sdl", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_soft_sdl_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, evas_engine_sdl_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + ORD(image_load); + ORD(image_new_from_data); + ORD(image_new_from_copied_data); + ORD(image_colorspace_set); + ORD(image_colorspace_get); + ORD(image_free); + ORD(image_size_set); + ORD(image_size_get); + ORD(image_dirty_region); + ORD(image_data_get); + ORD(image_data_put); + ORD(image_data_preload_request); + ORD(image_data_preload_cancel); + ORD(image_alpha_set); + ORD(image_alpha_get); + ORD(image_border_set); + ORD(image_border_get); + ORD(image_draw); + ORD(image_map_draw); + ORD(image_map_surface_new); + ORD(image_map_surface_free); + ORD(image_comment_get); + ORD(image_format_get); + ORD(image_cache_flush); + ORD(image_cache_set); + ORD(image_cache_get); + ORD(font_draw); + ORD(line_draw); + ORD(rectangle_draw); + ORD(polygon_draw); + + ORD(image_scale_hint_set); + ORD(image_scale_hint_get); + + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_soft_sdl_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "software_sdl", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_sdl); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_SDL +EVAS_EINA_MODULE_DEFINE(engine, software_sdl); +#endif + +/* Private routines. */ + +static void* +_sdl_output_setup (int w, int h, int fullscreen, int noframe, int alpha, int hwsurface) +{ + Render_Engine *re = calloc(1, sizeof(Render_Engine)); + SDL_Surface *surface; + + if (!re) + return NULL; + + /* if we haven't initialized - init (automatic abort if already done) */ + evas_common_cpu_init(); + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + + if (w <= 0) w = 640; + if (h <= 0) h = 480; + + re->cache = evas_cache_engine_image_init(&_sdl_cache_engine_image_cb, evas_common_image_cache_get()); + if (!re->cache) + { + ERR("Evas_Cache_Engine_Image allocation failed!"); + free (re); + return NULL; + } + + re->tb = evas_common_tilebuf_new(w, h); + /* in preliminary tests 16x16 gave highest framerates */ + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + surface = SDL_SetVideoMode(w, h, 32, + (hwsurface ? SDL_HWSURFACE : SDL_SWSURFACE) + | (fullscreen ? SDL_FULLSCREEN : 0) + | (noframe ? SDL_NOFRAME : 0) + | (alpha ? SDL_SRCALPHA : 0)); + + if (!surface) + { + ERR("SDL_SetVideoMode [ %i x %i x 32 ] failed.", w, h); + evas_cache_engine_image_shutdown(re->cache); + free (re); + return NULL; + } + + SDL_SetAlpha(surface, SDL_SRCALPHA | SDL_RLEACCEL, 0); + + /* We create a "fake" RGBA_Image which points to the SDL surface. Each access + * to that surface is wrapped in Lock / Unlock calls whenever the data is + * manipulated directly. */ + re->rgba_engine_image = (SDL_Engine_Image_Entry *) evas_cache_engine_image_engine(re->cache, surface); + if (!re->rgba_engine_image) + { + CRIT("RGBA_Image allocation from SDL failed"); + evas_cache_engine_image_shutdown(re->cache); + free (re); + return NULL; + } + + SDL_FillRect(surface, NULL, 0); + + re->flags.alpha = alpha; + re->flags.hwsurface = hwsurface; + re->flags.fullscreen = fullscreen; + re->flags.noframe = noframe; + return re; +} + +static Engine_Image_Entry* +_sdl_image_alloc(void) +{ + SDL_Engine_Image_Entry *new; + + new = calloc(1, sizeof (SDL_Engine_Image_Entry)); + + return (Engine_Image_Entry *) new; +} + +static void +_sdl_image_delete(Engine_Image_Entry *eim) +{ + free(eim); +} + +static int +_sdl_image_constructor(Engine_Image_Entry *ie, void *data __UNUSED__) +{ + SDL_Surface *sdl = NULL; + SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) ie; + RGBA_Image *im; + + im = (RGBA_Image *) ie->src; + + if (im) + { + evas_cache_image_load_data(&im->cache_entry); + + if (im->image.data) + { + /* FIXME: Take care of CSPACE */ + sdl = SDL_CreateRGBSurfaceFrom(im->image.data, + ie->w, ie->h, + 32, ie->w * 4, + RMASK, GMASK, BMASK, AMASK); + eim->surface = sdl; + eim->flags.engine_surface = 0; + } + } + + return EVAS_LOAD_ERROR_NONE; +} + +static void +_sdl_image_destructor(Engine_Image_Entry *eie) +{ + SDL_Engine_Image_Entry *seie = (SDL_Engine_Image_Entry *) eie; + + if (seie->surface && !seie->flags.engine_surface) + SDL_FreeSurface(seie->surface); + seie->surface = NULL; +} + +static int +_sdl_image_dirty(Engine_Image_Entry *dst, const Engine_Image_Entry *src __UNUSED__) +{ + SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) dst; + SDL_Surface *sdl = NULL; + RGBA_Image *im; + + im = (RGBA_Image *) dst->src; + + /* FIXME: Take care of CSPACE */ + sdl = SDL_CreateRGBSurfaceFrom(im->image.data, + dst->w, dst->h, + 32, dst->w * 4, + 0xff0000, 0xff00, 0xff, 0xff000000); + eim->surface = sdl; + eim->flags.engine_surface = 0; + + return 0; +} + +static int +_sdl_image_update_data(Engine_Image_Entry *dst, void* engine_data) +{ + SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) dst; + SDL_Surface *sdl = NULL; + RGBA_Image *im; + + im = (RGBA_Image *) dst->src; + + if (engine_data) + { + sdl = engine_data; + + if (im) + { + im->image.data = sdl->pixels; + im->image.no_free = 1; + im->cache_entry.flags.alpha = 0; + dst->src->w = sdl->w; + dst->src->h = sdl->h; + } + dst->w = sdl->w; + dst->h = sdl->h; + } + else + { + /* FIXME: Take care of CSPACE */ + SDL_FreeSurface(eim->surface); + sdl = SDL_CreateRGBSurfaceFrom(im->image.data, + dst->w, dst->h, + 32, dst->w * 4, + RMASK, GMASK, BMASK, AMASK); + } + + eim->surface = sdl; + + return 0; +} + +static int +_sdl_image_size_set(Engine_Image_Entry *dst, const Engine_Image_Entry *src __UNUSED__) +{ + SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) dst; + SDL_Surface *sdl; + RGBA_Image *im; + + im = (RGBA_Image *) dst->src; + + /* FIXME: handle im == NULL */ + sdl = SDL_CreateRGBSurfaceFrom(im->image.data, + dst->w, dst->h, + 32, dst->w * 4, + RMASK, GMASK, BMASK, AMASK); + + eim->surface = sdl; + + return 0; +} + +static void +_sdl_image_load(Engine_Image_Entry *eim, const Image_Entry *ie_im) +{ + SDL_Engine_Image_Entry *load = (SDL_Engine_Image_Entry *) eim; + SDL_Surface *sdl; + + if (!load->surface) + { + RGBA_Image *im; + + im = (RGBA_Image *) ie_im; + + sdl = SDL_CreateRGBSurfaceFrom(im->image.data, + eim->w, eim->h, + 32, eim->w * 4, + RMASK, GMASK, BMASK, AMASK); + load->surface = sdl; + } +} + +static int +_sdl_image_mem_size_get(Engine_Image_Entry *eim) +{ + SDL_Engine_Image_Entry *seie = (SDL_Engine_Image_Entry *) eim; + int size = 0; + + /* FIXME: Count surface size. */ + if (seie->surface) + size = sizeof (SDL_Surface) + sizeof (SDL_PixelFormat); + + return size; +} + +#ifdef DEBUG_SDL +static void +_sdl_image_debug(const char* context, Engine_Image_Entry* eie) +{ + SDL_Engine_Image_Entry *eim = (SDL_Engine_Image_Entry *) eie; + + DBG("*** %s image (%p) ***", context, eim); + if (eim) + { + DBG("W: %i, H: %i, R: %i", eim->cache_entry.w, eim->cache_entry.h, eim->cache_entry.references); + if (eim->cache_entry.src) + DBG("Pixels: %p, SDL Surface: %p",((RGBA_Image*) eim->cache_entry.src)->image.data, eim->surface); + if (eim->surface) + DBG("Surface->pixels: %p", eim->surface->pixels); + DBG("Key: %s", eim->cache_entry.cache_key); + DBG("Reference: %i", eim->cache_entry.references); + } + DBG("*** ***"); +} +#endif diff --git a/libraries/evas/src/modules/engines/software_sdl/evas_engine.h b/libraries/evas/src/modules/engines/software_sdl/evas_engine.h new file mode 100644 index 0000000..5133fec --- /dev/null +++ b/libraries/evas/src/modules/engines/software_sdl/evas_engine.h @@ -0,0 +1,72 @@ +#ifndef EVAS_ENGINE_SDL_H +#define EVAS_ENGINE_SDL_H + +#include "evas_common.h" +#include "evas_private.h" +#include "Evas_Engine_SDL.h" + +extern int _evas_engine_soft_sdl_log_dom ; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft_sdl_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft_sdl_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft_sdl_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft_sdl_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_soft_sdl_log_dom, __VA_ARGS__) + +typedef struct _SDL_Engine_Image_Entry SDL_Engine_Image_Entry; +struct _SDL_Engine_Image_Entry +{ + Engine_Image_Entry cache_entry; + + SDL_Surface *surface; + + struct + { + unsigned int engine_surface : 1; + } flags; +}; + +typedef struct _Render_Engine Render_Engine; +struct _Render_Engine +{ + SDL_Engine_Image_Entry *rgba_engine_image; + + Tilebuf *tb; + Tilebuf_Rect *rects; + Eina_Inlist *cur_rect; + + Evas_Cache_Engine_Image *cache; + + SDL_Rect *update_rects; + int update_rects_count; + int update_rects_limit; + + struct + { + unsigned int fullscreen : 1; + unsigned int noframe : 1; + unsigned int alpha : 1; + unsigned int hwsurface : 1; + unsigned int end : 1; + } flags; +}; + +#endif diff --git a/libraries/evas/src/modules/engines/software_x11/Evas_Engine_Software_X11.h b/libraries/evas/src/modules/engines/software_x11/Evas_Engine_Software_X11.h new file mode 100644 index 0000000..e42c10a --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/Evas_Engine_Software_X11.h @@ -0,0 +1,52 @@ +#ifndef _EVAS_ENGINE_SOFTWARE_X11_H +# define _EVAS_ENGINE_SOFTWARE_X11_H + +typedef enum +{ + EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB, + EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB +} Evas_Engine_Info_Software_X11_Backend; + +typedef struct _Evas_Engine_Info_Software_X11 Evas_Engine_Info_Software_X11; + +struct _Evas_Engine_Info_Software_X11 +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + /* engine specific data & parameters it needs to set up */ + struct + { + Evas_Engine_Info_Software_X11_Backend backend; + + void *connection, *screen; + unsigned int drawable, mask; + void *visual; + unsigned int colormap; + int depth, rotation; + + Eina_Bool alloc_grayscale : 1; + Eina_Bool debug : 1; + Eina_Bool shape_dither : 1; + Eina_Bool destination_alpha : 1; + Eina_Bool track_mask_changes : 1; + + int alloc_colors_max; + } info; + + /* engine specific function calls to query stuff about the destination */ + struct + { + void *(*best_visual_get) (int backend, void *connection, int screen); + unsigned int (*best_colormap_get) (int backend, void *connection, int screen); + int (*best_depth_get) (int backend, void *connection, int screen); + } func; + + unsigned char mask_changed : 1; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; +}; + +#endif diff --git a/libraries/evas/src/modules/engines/software_x11/Makefile.am b/libraries/evas/src/modules/engines/software_x11/Makefile.am new file mode 100644 index 0000000..5a2e345 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/Makefile.am @@ -0,0 +1,85 @@ + +MAINTAINERCLEANFILES = Makefile.in + +if BUILD_ENGINE_SOFTWARE_X11 + +SOFTWARE_X11_SOURCES = evas_engine.c + +if BUILD_ENGINE_SOFTWARE_XLIB + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_software_xlib_cflags@ + +SOFTWARE_X11_SOURCES += \ +evas_xlib_outbuf.c \ +evas_xlib_buffer.c \ +evas_xlib_color.c \ +evas_xlib_main.c + +SOFTWARE_X11_LIBADD = @FREETYPE_LIBS@ @EINA_LIBS@ @evas_engine_software_xlib_libs@ + +endif + +if BUILD_ENGINE_SOFTWARE_XCB + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_software_xcb_cflags@ + +SOFTWARE_X11_SOURCES += \ +evas_xcb_xdefaults.c \ +evas_xcb_outbuf.c \ +evas_xcb_buffer.c \ +evas_xcb_color.c \ +evas_xcb_main.c + +SOFTWARE_X11_LIBADD = @FREETYPE_LIBS@ @PIXMAN_LIBS@ @EINA_LIBS@ @evas_engine_software_xcb_libs@ + +endif + +includes_HEADERS = Evas_Engine_Software_X11.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_SOFTWARE_X11 + +pkgdir = $(libdir)/evas/modules/engines/software_x11/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(SOFTWARE_X11_SOURCES) +module_la_LIBADD = $(top_builddir)/src/lib/libevas.la $(SOFTWARE_X11_LIBADD) +module_la_LDFLAGS = -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_software_x11.la + +libevas_engine_software_x11_la_SOURCES = $(SOFTWARE_X11_SOURCES) +libevas_engine_software_x11_la_LIBADD = $(SOFTWARE_X11_LIBADD) + +endif +endif + +EXTRA_DIST = \ +evas_engine.h \ +evas_xlib_outbuf.h \ +evas_xlib_buffer.h \ +evas_xlib_color.h \ +evas_xcb_outbuf.h \ +evas_xcb_buffer.h \ +evas_xcb_color.h \ +evas_xcb_xdefaults.h + diff --git a/libraries/evas/src/modules/engines/software_x11/Makefile.in b/libraries/evas/src/modules/engines/software_x11/Makefile.in new file mode 100644 index 0000000..f5c73af --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/Makefile.in @@ -0,0 +1,948 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@am__append_1 = \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@evas_xlib_outbuf.c \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@evas_xlib_buffer.c \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@evas_xlib_color.c \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@evas_xlib_main.c + +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@am__append_2 = \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@evas_xcb_xdefaults.c \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@evas_xcb_outbuf.c \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@evas_xcb_buffer.c \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@evas_xcb_color.c \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@evas_xcb_main.c + +subdir = src/modules/engines/software_x11 +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@libevas_engine_software_x11_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_software_x11_la_SOURCES_DIST = evas_engine.c \ + evas_xlib_outbuf.c evas_xlib_buffer.c evas_xlib_color.c \ + evas_xlib_main.c evas_xcb_xdefaults.c evas_xcb_outbuf.c \ + evas_xcb_buffer.c evas_xcb_color.c evas_xcb_main.c +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@am__objects_1 = evas_xlib_outbuf.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@ evas_xlib_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@ evas_xlib_color.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@ evas_xlib_main.lo +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@am__objects_2 = evas_xcb_xdefaults.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@ evas_xcb_outbuf.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@ evas_xcb_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@ evas_xcb_color.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@ evas_xcb_main.lo +@BUILD_ENGINE_SOFTWARE_X11_TRUE@am__objects_3 = evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@ $(am__objects_1) \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@ $(am__objects_2) +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am_libevas_engine_software_x11_la_OBJECTS = $(am__objects_3) +libevas_engine_software_x11_la_OBJECTS = \ + $(am_libevas_engine_software_x11_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am_libevas_engine_software_x11_la_rpath = +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@ $(am__DEPENDENCIES_1) +am__module_la_SOURCES_DIST = evas_engine.c evas_xlib_outbuf.c \ + evas_xlib_buffer.c evas_xlib_color.c evas_xlib_main.c \ + evas_xcb_xdefaults.c evas_xcb_outbuf.c evas_xcb_buffer.c \ + evas_xcb_color.c evas_xcb_main.c +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@am__objects_4 = module_la-evas_xlib_outbuf.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@ module_la-evas_xlib_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@ module_la-evas_xlib_color.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@ module_la-evas_xlib_main.lo +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@am__objects_5 = module_la-evas_xcb_xdefaults.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@ module_la-evas_xcb_outbuf.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@ module_la-evas_xcb_buffer.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@ module_la-evas_xcb_color.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@ module_la-evas_xcb_main.lo +@BUILD_ENGINE_SOFTWARE_X11_TRUE@am__objects_6 = \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@ module_la-evas_engine.lo \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@ $(am__objects_4) \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@ $(am__objects_5) +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@am_module_la_OBJECTS = $(am__objects_6) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_software_x11_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_software_x11_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Software_X11.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +@BUILD_ENGINE_SOFTWARE_X11_TRUE@SOFTWARE_X11_SOURCES = evas_engine.c \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@ $(am__append_1) \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@ $(am__append_2) +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@AM_CPPFLAGS = \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@-I. \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@-I$(top_srcdir)/src/lib \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@-I$(top_srcdir)/src/lib/include \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@-I$(top_srcdir)/src/modules/engines \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@@FREETYPE_CFLAGS@ \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@@PIXMAN_CFLAGS@ \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@@EINA_CFLAGS@ \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@@evas_engine_software_xcb_cflags@ + +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@AM_CPPFLAGS = \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@-I. \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@-I$(top_srcdir)/src/lib \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@-I$(top_srcdir)/src/lib/include \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@-I$(top_srcdir)/src/modules/engines \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@@FREETYPE_CFLAGS@ \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@@PIXMAN_CFLAGS@ \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@@EINA_CFLAGS@ \ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@@evas_engine_software_xlib_cflags@ + +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XCB_TRUE@SOFTWARE_X11_LIBADD = @FREETYPE_LIBS@ @PIXMAN_LIBS@ @EINA_LIBS@ @evas_engine_software_xcb_libs@ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@BUILD_ENGINE_SOFTWARE_XLIB_TRUE@SOFTWARE_X11_LIBADD = @FREETYPE_LIBS@ @EINA_LIBS@ @evas_engine_software_xlib_libs@ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@includes_HEADERS = Evas_Engine_Software_X11.h +@BUILD_ENGINE_SOFTWARE_X11_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@pkgdir = $(libdir)/evas/modules/engines/software_x11/$(MODULE_ARCH) +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@module_la_SOURCES = $(SOFTWARE_X11_SOURCES) +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@module_la_LIBADD = $(top_builddir)/src/lib/libevas.la $(SOFTWARE_X11_LIBADD) +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@module_la_LDFLAGS = -no-undefined -module -avoid-version +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@noinst_LTLIBRARIES = libevas_engine_software_x11.la +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@libevas_engine_software_x11_la_SOURCES = $(SOFTWARE_X11_SOURCES) +@BUILD_ENGINE_SOFTWARE_X11_TRUE@@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@libevas_engine_software_x11_la_LIBADD = $(SOFTWARE_X11_LIBADD) +EXTRA_DIST = \ +evas_engine.h \ +evas_xlib_outbuf.h \ +evas_xlib_buffer.h \ +evas_xlib_color.h \ +evas_xcb_outbuf.h \ +evas_xcb_buffer.h \ +evas_xcb_color.h \ +evas_xcb_xdefaults.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/software_x11/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/software_x11/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_software_x11.la: $(libevas_engine_software_x11_la_OBJECTS) $(libevas_engine_software_x11_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_software_x11_la_rpath) $(libevas_engine_software_x11_la_OBJECTS) $(libevas_engine_software_x11_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_xcb_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_xcb_color.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_xcb_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_xcb_outbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_xcb_xdefaults.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_xlib_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_xlib_color.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_xlib_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_xlib_outbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_xcb_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_xcb_color.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_xcb_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_xcb_outbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_xcb_xdefaults.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_xlib_buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_xlib_color.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_xlib_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_xlib_outbuf.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_xlib_outbuf.lo: evas_xlib_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_xlib_outbuf.lo -MD -MP -MF $(DEPDIR)/module_la-evas_xlib_outbuf.Tpo -c -o module_la-evas_xlib_outbuf.lo `test -f 'evas_xlib_outbuf.c' || echo '$(srcdir)/'`evas_xlib_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_xlib_outbuf.Tpo $(DEPDIR)/module_la-evas_xlib_outbuf.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_xlib_outbuf.c' object='module_la-evas_xlib_outbuf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_xlib_outbuf.lo `test -f 'evas_xlib_outbuf.c' || echo '$(srcdir)/'`evas_xlib_outbuf.c + +module_la-evas_xlib_buffer.lo: evas_xlib_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_xlib_buffer.lo -MD -MP -MF $(DEPDIR)/module_la-evas_xlib_buffer.Tpo -c -o module_la-evas_xlib_buffer.lo `test -f 'evas_xlib_buffer.c' || echo '$(srcdir)/'`evas_xlib_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_xlib_buffer.Tpo $(DEPDIR)/module_la-evas_xlib_buffer.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_xlib_buffer.c' object='module_la-evas_xlib_buffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_xlib_buffer.lo `test -f 'evas_xlib_buffer.c' || echo '$(srcdir)/'`evas_xlib_buffer.c + +module_la-evas_xlib_color.lo: evas_xlib_color.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_xlib_color.lo -MD -MP -MF $(DEPDIR)/module_la-evas_xlib_color.Tpo -c -o module_la-evas_xlib_color.lo `test -f 'evas_xlib_color.c' || echo '$(srcdir)/'`evas_xlib_color.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_xlib_color.Tpo $(DEPDIR)/module_la-evas_xlib_color.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_xlib_color.c' object='module_la-evas_xlib_color.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_xlib_color.lo `test -f 'evas_xlib_color.c' || echo '$(srcdir)/'`evas_xlib_color.c + +module_la-evas_xlib_main.lo: evas_xlib_main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_xlib_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_xlib_main.Tpo -c -o module_la-evas_xlib_main.lo `test -f 'evas_xlib_main.c' || echo '$(srcdir)/'`evas_xlib_main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_xlib_main.Tpo $(DEPDIR)/module_la-evas_xlib_main.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_xlib_main.c' object='module_la-evas_xlib_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_xlib_main.lo `test -f 'evas_xlib_main.c' || echo '$(srcdir)/'`evas_xlib_main.c + +module_la-evas_xcb_xdefaults.lo: evas_xcb_xdefaults.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_xcb_xdefaults.lo -MD -MP -MF $(DEPDIR)/module_la-evas_xcb_xdefaults.Tpo -c -o module_la-evas_xcb_xdefaults.lo `test -f 'evas_xcb_xdefaults.c' || echo '$(srcdir)/'`evas_xcb_xdefaults.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_xcb_xdefaults.Tpo $(DEPDIR)/module_la-evas_xcb_xdefaults.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_xcb_xdefaults.c' object='module_la-evas_xcb_xdefaults.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_xcb_xdefaults.lo `test -f 'evas_xcb_xdefaults.c' || echo '$(srcdir)/'`evas_xcb_xdefaults.c + +module_la-evas_xcb_outbuf.lo: evas_xcb_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_xcb_outbuf.lo -MD -MP -MF $(DEPDIR)/module_la-evas_xcb_outbuf.Tpo -c -o module_la-evas_xcb_outbuf.lo `test -f 'evas_xcb_outbuf.c' || echo '$(srcdir)/'`evas_xcb_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_xcb_outbuf.Tpo $(DEPDIR)/module_la-evas_xcb_outbuf.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_xcb_outbuf.c' object='module_la-evas_xcb_outbuf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_xcb_outbuf.lo `test -f 'evas_xcb_outbuf.c' || echo '$(srcdir)/'`evas_xcb_outbuf.c + +module_la-evas_xcb_buffer.lo: evas_xcb_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_xcb_buffer.lo -MD -MP -MF $(DEPDIR)/module_la-evas_xcb_buffer.Tpo -c -o module_la-evas_xcb_buffer.lo `test -f 'evas_xcb_buffer.c' || echo '$(srcdir)/'`evas_xcb_buffer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_xcb_buffer.Tpo $(DEPDIR)/module_la-evas_xcb_buffer.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_xcb_buffer.c' object='module_la-evas_xcb_buffer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_xcb_buffer.lo `test -f 'evas_xcb_buffer.c' || echo '$(srcdir)/'`evas_xcb_buffer.c + +module_la-evas_xcb_color.lo: evas_xcb_color.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_xcb_color.lo -MD -MP -MF $(DEPDIR)/module_la-evas_xcb_color.Tpo -c -o module_la-evas_xcb_color.lo `test -f 'evas_xcb_color.c' || echo '$(srcdir)/'`evas_xcb_color.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_xcb_color.Tpo $(DEPDIR)/module_la-evas_xcb_color.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_xcb_color.c' object='module_la-evas_xcb_color.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_xcb_color.lo `test -f 'evas_xcb_color.c' || echo '$(srcdir)/'`evas_xcb_color.c + +module_la-evas_xcb_main.lo: evas_xcb_main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_xcb_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_xcb_main.Tpo -c -o module_la-evas_xcb_main.lo `test -f 'evas_xcb_main.c' || echo '$(srcdir)/'`evas_xcb_main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_xcb_main.Tpo $(DEPDIR)/module_la-evas_xcb_main.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_xcb_main.c' object='module_la-evas_xcb_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_xcb_main.lo `test -f 'evas_xcb_main.c' || echo '$(srcdir)/'`evas_xcb_main.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/software_x11/evas_engine.c b/libraries/evas/src/modules/engines/software_x11/evas_engine.c new file mode 100644 index 0000000..0a2d2a3 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_engine.c @@ -0,0 +1,929 @@ +#include "evas_common.h" +#include "evas_private.h" + +#include "Evas_Engine_Software_X11.h" +#include "evas_engine.h" + +#ifdef BUILD_ENGINE_SOFTWARE_XLIB +# include "evas_xlib_outbuf.h" +# include "evas_xlib_color.h" +#endif + +#ifdef BUILD_ENGINE_SOFTWARE_XCB +# include "evas_xcb_outbuf.h" +# include "evas_xcb_color.h" +# include "evas_xcb_xdefaults.h" +#endif + +int _evas_engine_soft_x11_log_dom = -1; + +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +#ifdef BUILD_ENGINE_SOFTWARE_XLIB +/* +struct xrdb_user +{ + time_t last_stat; + time_t last_mtime; + XrmDatabase db; +}; +static struct xrdb_user xrdb_user = {0, 0, NULL}; + +static Eina_Bool +xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val) +{ + time_t last, now; + + last = xrdb_user.last_stat; + now = time(NULL); + + xrdb_user.last_stat = now; + if (last != now) // don't stat() more than once every second + { + struct stat st; + const char *home; + char tmp[PATH_MAX]; + + if (!(home = getenv("HOME"))) + goto failed; + + snprintf(tmp, sizeof(tmp), "%s/.Xdefaults", home); + if (stat(tmp, &st) != 0) goto failed; + if (xrdb_user.last_mtime != st.st_mtime) + { + if (xrdb_user.db) XrmDestroyDatabase(xrdb_user.db); + xrdb_user.db = XrmGetFileDatabase(tmp); + if (!xrdb_user.db) goto failed; + xrdb_user.last_mtime = st.st_mtime; + } + } + + if (!xrdb_user.db) return EINA_FALSE; + return XrmGetResource(xrdb_user.db, name, cls, type, val); + + failed: + if (xrdb_user.db) + { + XrmDestroyDatabase(xrdb_user.db); + xrdb_user.db = NULL; + } + xrdb_user.last_mtime = 0; + return EINA_FALSE; +} +*/ +#endif + +/* engine struct data */ +typedef struct _Render_Engine Render_Engine; + +struct _Render_Engine +{ + Tilebuf *tb; + Outbuf *ob; + Tilebuf_Rect *rects; + Eina_Inlist *cur_rect; + unsigned char end : 1; +/* +#ifdef BUILD_ENGINE_SOFTWARE_XLIB + XrmDatabase xrdb; +#endif + struct + { + int dpi; + } xr; + */ +#ifdef EVAS_FRAME_QUEUING + Evas_Engine_Render_Mode render_mode; +#endif + + void (*outbuf_free)(Outbuf *ob); + void (*outbuf_reconfigure)(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth); + int (*outbuf_get_rot)(Outbuf *ob); + RGBA_Image *(*outbuf_new_region_for_update)(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); + void (*outbuf_push_updated_region)(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); + void (*outbuf_free_region_for_update)(Outbuf *ob, RGBA_Image *update); + void (*outbuf_flush)(Outbuf *ob); + void (*outbuf_idle_flush)(Outbuf *ob); + Eina_Bool (*outbuf_alpha_get)(Outbuf *ob); +#ifdef EVAS_FRAME_QUEUING + void (*outbuf_set_priv)(Outbuf *ob, void *cur, void *prev); +#endif +}; + +/* prototypes we will use here */ +static void *_best_visual_get(int backend, void *connection, int screen); +static unsigned int _best_colormap_get(int backend, void *connection, int screen); +static int _best_depth_get(int backend, void *connection, int screen); + +static void *eng_info(Evas *e); +static void eng_info_free(Evas *e, void *info); +static int eng_setup(Evas *e, void *info); +static void eng_output_free(void *data); +static void eng_output_resize(void *data, int w, int h); +static void eng_output_tile_size_set(void *data, int w, int h); +static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h); +static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h); +static void eng_output_redraws_clear(void *data); +static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); +static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h); +static void eng_output_flush(void *data); +static void eng_output_idle_flush(void *data); + +/* internal engine routines */ + +#ifdef BUILD_ENGINE_SOFTWARE_XLIB +static void * +_output_xlib_setup(int w, int h, int rot, Display *disp, Drawable draw, + Visual *vis, Colormap cmap, int depth, int debug, + int grayscale, int max_colors, Pixmap mask, + int shape_dither, int destination_alpha) +{ + Render_Engine *re; +// int status; +// char *type = NULL; +// XrmValue val; + + if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL; + + evas_software_xlib_x_init(); + evas_software_xlib_x_color_init(); + evas_software_xlib_outbuf_init(); +/* + re->xr.dpi = 75000; // dpy * 1000 + + status = xrdb_user_query("Xft.dpi", "Xft.Dpi", &type, &val); + if ((!status) || (!type)) + { + if (!re->xrdb) re->xrdb = XrmGetDatabase(disp); + if (re->xrdb) + status = XrmGetResource(re->xrdb, + "Xft.dpi", "Xft.Dpi", &type, &val); + } + + if ((status) && (type)) + { + if (!strcmp(type, "String")) + { + const char *str, *dp; + + str = val.addr; + dp = strchr(str, '.'); + if (!dp) dp = strchr(str, ','); + + if (dp) + { + int subdpi, len, i; + char *buf; + + buf = alloca(dp - str + 1); + strncpy(buf, str, dp - str); + buf[dp - str] = 0; + len = strlen(dp + 1); + subdpi = atoi(dp + 1); + + if (len < 3) + { + for (i = len; i < 3; i++) + subdpi *= 10; + } + else if (len > 3) + { + for (i = len; i > 3; i--) + subdpi /= 10; + } + re->xr.dpi = atoi(buf) * 1000; + } + else + re->xr.dpi = atoi(str) * 1000; + evas_common_font_dpi_set(re->xr.dpi / 1000); + } + } + */ + re->ob = + evas_software_xlib_outbuf_setup_x(w, h, rot, OUTBUF_DEPTH_INHERIT, disp, + draw, vis, cmap, depth, grayscale, + max_colors, mask, shape_dither, + destination_alpha); + if (!re->ob) + { + free(re); + return NULL; + } + + /* for updates return 1 big buffer, but only use portions of it, also cache + * it and keepit around until an idle_flush */ + + /* disable for now - i am hunting down why some expedite tests are slower, + * as well as shaped stuff is broken and probable non-32bpp is broken as + * convert funcs dont do the right thing + * + */ +// re->ob->onebuf = 1; + + evas_software_xlib_outbuf_debug_set(re->ob, debug); + re->tb = evas_common_tilebuf_new(w, h); + if (!re->tb) + { + evas_software_xlib_outbuf_free(re->ob); + free(re); + return NULL; + } + + /* in preliminary tests 16x16 gave highest framerates */ + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + return re; +} +#endif + +#ifdef BUILD_ENGINE_SOFTWARE_XCB +static void * +_output_xcb_setup(int w, int h, int rot, xcb_connection_t *conn, + xcb_screen_t *screen, xcb_drawable_t draw, + xcb_visualtype_t *vis, xcb_colormap_t cmap, int depth, + int debug, int grayscale, int max_colors, xcb_drawable_t mask, + int shape_dither, int destination_alpha) +{ + Render_Engine *re; +// int v = 0; + + if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL; + + evas_software_xcb_init(); + evas_software_xcb_color_init(); + evas_software_xcb_outbuf_init(); +/* + // FIXME: re->xrdb + _evas_xcb_xdefaults_init(); + v = _evas_xcb_xdefaults_int_get("Xft", "dpi"); + _evas_xcb_xdefaults_shutdown(); + if (v) re->xr.dpi = (v * 1000); + else re->xr.dpi = 75000; // dpy * 1000 + + evas_common_font_dpi_set(re->xr.dpi / 1000); + */ + re->ob = + evas_software_xcb_outbuf_setup(w, h, rot, OUTBUF_DEPTH_INHERIT, conn, + screen, draw, vis, cmap, depth, + grayscale, max_colors, mask, + shape_dither, destination_alpha); + if (!re->ob) + { + free(re); + return NULL; + } + + /* for updates return 1 big buffer, but only use portions of it, also cache + * it and keepit around until an idle_flush */ + + /* disable for now - i am hunting down why some expedite tests are slower, + * as well as shaped stuff is broken and probable non-32bpp is broken as + * convert funcs dont do the right thing + * + */ +// re->ob->onebuf = 1; + + evas_software_xcb_outbuf_debug_set(re->ob, debug); + + re->tb = evas_common_tilebuf_new(w, h); + if (!re->tb) + { + evas_software_xcb_outbuf_free(re->ob); + free(re); + return NULL; + } + + /* in preliminary tests 16x16 gave highest framerates */ + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + return re; +} +#endif + +static void * +_best_visual_get(int backend, void *connection, int screen) +{ + if (!connection) return NULL; + +#ifdef BUILD_ENGINE_SOFTWARE_XLIB + if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB) + return DefaultVisual((Display *)connection, screen); +#endif + +#ifdef BUILD_ENGINE_SOFTWARE_XCB + if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB) + { + xcb_screen_iterator_t iter_screen; + xcb_depth_iterator_t iter_depth; + xcb_screen_t *s = NULL; + + iter_screen = + xcb_setup_roots_iterator(xcb_get_setup((xcb_connection_t *)connection)); + for (; iter_screen.rem; --screen, xcb_screen_next(&iter_screen)) + if (screen == 0) + { + s = iter_screen.data; + break; + } + + iter_depth = xcb_screen_allowed_depths_iterator(s); + for (; iter_depth.rem; xcb_depth_next(&iter_depth)) + { + xcb_visualtype_iterator_t iter_vis; + + iter_vis = xcb_depth_visuals_iterator(iter_depth.data); + for (; iter_vis.rem; xcb_visualtype_next(&iter_vis)) + { + if (s->root_visual == iter_vis.data->visual_id) + return iter_vis.data; + } + } + } +#endif + + return NULL; +} + +static unsigned int +_best_colormap_get(int backend, void *connection, int screen) +{ + if (!connection) return 0; + +#ifdef BUILD_ENGINE_SOFTWARE_XLIB + if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB) + return DefaultColormap((Display *)connection, screen); +#endif + +#ifdef BUILD_ENGINE_SOFTWARE_XCB + if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB) + { + xcb_screen_iterator_t iter_screen; + xcb_screen_t *s = NULL; + + iter_screen = + xcb_setup_roots_iterator(xcb_get_setup((xcb_connection_t *)connection)); + for (; iter_screen.rem; --screen, xcb_screen_next(&iter_screen)) + if (screen == 0) + { + s = iter_screen.data; + break; + } + + return s->default_colormap; + } +#endif + + return 0; +} + +static int +_best_depth_get(int backend, void *connection, int screen) +{ + if (!connection) return 0; + +#ifdef BUILD_ENGINE_SOFTWARE_XLIB + if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB) + return DefaultDepth((Display *)connection, screen); +#endif + +#ifdef BUILD_ENGINE_SOFTWARE_XCB + if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB) + { + xcb_screen_iterator_t iter_screen; + xcb_screen_t *s = NULL; + + iter_screen = + xcb_setup_roots_iterator(xcb_get_setup((xcb_connection_t *)connection)); + for (; iter_screen.rem; --screen, xcb_screen_next(&iter_screen)) + if (screen == 0) + { + s = iter_screen.data; + break; + } + + return s->root_depth; + } +#endif + + return 0; +} + +/* engine api this module provides */ +static void * +eng_info(Evas *e __UNUSED__) +{ + Evas_Engine_Info_Software_X11 *info; + + if (!(info = calloc(1, sizeof(Evas_Engine_Info_Software_X11)))) + return NULL; + + info->magic.magic = rand(); + info->info.debug = 0; + info->info.alloc_grayscale = 0; + info->info.alloc_colors_max = 216; + info->func.best_visual_get = _best_visual_get; + info->func.best_colormap_get = _best_colormap_get; + info->func.best_depth_get = _best_depth_get; + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; +} + +static void +eng_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_Software_X11 *in; + + in = (Evas_Engine_Info_Software_X11 *)info; + free(in); +} + +static int +eng_setup(Evas *e, void *in) +{ + Evas_Engine_Info_Software_X11 *info; + Render_Engine *re = NULL; + + info = (Evas_Engine_Info_Software_X11 *)in; + if (!e->engine.data.output) + { + /* if we haven't initialized - init (automatic abort if already done) */ + evas_common_cpu_init(); + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + +#ifdef BUILD_ENGINE_SOFTWARE_XLIB + if (info->info.backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB) + { + re = _output_xlib_setup(e->output.w, e->output.h, + info->info.rotation, info->info.connection, + info->info.drawable, info->info.visual, + info->info.colormap, + info->info.depth, info->info.debug, + info->info.alloc_grayscale, + info->info.alloc_colors_max, + info->info.mask, info->info.shape_dither, + info->info.destination_alpha); + + re->outbuf_free = evas_software_xlib_outbuf_free; + re->outbuf_reconfigure = evas_software_xlib_outbuf_reconfigure; + re->outbuf_get_rot = evas_software_xlib_outbuf_get_rot; + re->outbuf_new_region_for_update = + evas_software_xlib_outbuf_new_region_for_update; + re->outbuf_push_updated_region = + evas_software_xlib_outbuf_push_updated_region; + re->outbuf_free_region_for_update = + evas_software_xlib_outbuf_free_region_for_update; + re->outbuf_flush = evas_software_xlib_outbuf_flush; + re->outbuf_idle_flush = evas_software_xlib_outbuf_idle_flush; + re->outbuf_alpha_get = evas_software_xlib_outbuf_alpha_get; +# ifdef EVAS_FRAME_QUEUING + re->outbuf_set_priv = evas_software_xlib_outbuf_set_priv; + re->render_mode = info->render_mode; +# endif + } +#endif + +#ifdef BUILD_ENGINE_SOFTWARE_XCB + if (info->info.backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB) + { + re = _output_xcb_setup(e->output.w, e->output.h, + info->info.rotation, info->info.connection, + info->info.screen, info->info.drawable, + info->info.visual, info->info.colormap, + info->info.depth, info->info.debug, + info->info.alloc_grayscale, + info->info.alloc_colors_max, + info->info.mask, info->info.shape_dither, + info->info.destination_alpha); + + re->outbuf_free = evas_software_xcb_outbuf_free; + re->outbuf_reconfigure = evas_software_xcb_outbuf_reconfigure; + re->outbuf_get_rot = evas_software_xcb_outbuf_rotation_get; + re->outbuf_new_region_for_update = + evas_software_xcb_outbuf_new_region_for_update; + re->outbuf_push_updated_region = + evas_software_xcb_outbuf_push_updated_region; + re->outbuf_free_region_for_update = + evas_software_xcb_outbuf_free_region_for_update; + re->outbuf_flush = evas_software_xcb_outbuf_flush; + re->outbuf_idle_flush = evas_software_xcb_outbuf_idle_flush; + re->outbuf_alpha_get = evas_software_xcb_outbuf_alpha_get; +# ifdef EVAS_FRAME_QUEUING + re->outbuf_set_priv = evas_software_xcb_outbuf_priv_set; + re->render_mode = info->render_mode; +# endif + } +#endif + + e->engine.data.output = re; + } + else + { + int ponebuf = 0; + +#ifdef EVAS_FRAME_QUEUING + evas_common_frameq_flush(); +#endif + re = e->engine.data.output; + ponebuf = re->ob->onebuf; + +#ifdef BUILD_ENGINE_SOFTWARE_XLIB + if (info->info.backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB) + { + evas_software_xlib_outbuf_free(re->ob); + re->ob = + evas_software_xlib_outbuf_setup_x(e->output.w, e->output.h, + info->info.rotation, + OUTBUF_DEPTH_INHERIT, + info->info.connection, + info->info.drawable, + info->info.visual, + info->info.colormap, + info->info.depth, + info->info.alloc_grayscale, + info->info.alloc_colors_max, + info->info.mask, + info->info.shape_dither, + info->info.destination_alpha); + + evas_software_xlib_outbuf_debug_set(re->ob, info->info.debug); +# ifdef EVAS_FRAME_QUEUING + re->render_mode = info->render_mode; +# endif + } +#endif + +#ifdef BUILD_ENGINE_SOFTWARE_XCB + if (info->info.backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB) + { + evas_software_xcb_outbuf_free(re->ob); + re->ob = + evas_software_xcb_outbuf_setup(e->output.w, e->output.h, + info->info.rotation, + OUTBUF_DEPTH_INHERIT, + info->info.connection, + info->info.screen, + info->info.drawable, + info->info.visual, + info->info.colormap, + info->info.depth, + info->info.alloc_grayscale, + info->info.alloc_colors_max, + info->info.mask, + info->info.shape_dither, + info->info.destination_alpha); + + evas_software_xcb_outbuf_debug_set(re->ob, info->info.debug); +#ifdef EVAS_FRAME_QUEUING + re->render_mode = info->render_mode; +#endif + } +#endif + re->ob->onebuf = ponebuf; + } + if (!e->engine.data.output) return 0; + if (!e->engine.data.context) + { + e->engine.data.context = + e->engine.func->context_new(e->engine.data.output); + } + + re = e->engine.data.output; + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + +#ifdef BUILD_ENGINE_SOFTWARE_XLIB +// NOTE: XrmGetDatabase() result is shared per connection, do not free it. +// if (re->xrdb) XrmDestroyDatabase(re->xrdb); +#endif + + if ((re = (Render_Engine *)data)) + { + re->outbuf_free(re->ob); + evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + free(re); + } + + evas_common_font_shutdown(); + evas_common_image_shutdown(); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + re->outbuf_reconfigure(re->ob, w, h, re->outbuf_get_rot(re->ob), + OUTBUF_DEPTH_INHERIT); + evas_common_tilebuf_free(re->tb); + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +} + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + RGBA_Image *surface; + Tilebuf_Rect *rect; + int ux, uy, uw, uh; + + re = (Render_Engine *)data; + if (re->end) + { + re->end = 0; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + re->cur_rect = EINA_INLIST_GET(re->rects); + } + if (!re->cur_rect) return NULL; + rect = (Tilebuf_Rect *)re->cur_rect; + ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h; + re->cur_rect = re->cur_rect->next; + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = 1; + } + + surface = + re->outbuf_new_region_for_update(re->ob, ux, uy, uw, uh, cx, cy, cw, ch); + + *x = ux; *y = uy; *w = uw; *h = uh; + return surface; +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; +#ifdef EVAS_FRAME_QUEUING + Evas_Surface *e_surface; +#endif + + re = (Render_Engine *)data; +#if defined(BUILD_PIPE_RENDER) && !defined(EVAS_FRAME_QUEUING) + evas_common_pipe_map_begin(surface); +#endif /* BUILD_PIPE_RENDER && !EVAS_FRAME_QUEUING*/ + +#ifdef EVAS_FRAME_QUEUING + if (re->render_mode == EVAS_RENDER_MODE_NONBLOCKING) + { + /* create a new frame if this is the first surface of this frame */ + evas_common_frameq_prepare_frame(); + /* add surface into the frame */ + e_surface = evas_common_frameq_new_surface(surface, x, y, w, h); + evas_common_frameq_add_surface(e_surface); + return; + } +#endif + + re->outbuf_push_updated_region(re->ob, surface, x, y, w, h); + re->outbuf_free_region_for_update(re->ob, surface); + evas_common_cpu_end_opt(); +} + +#ifdef EVAS_FRAME_QUEUING +static void * +eng_image_map_surface_new(void *data , int w, int h, int alpha) +{ + void *surface; + DATA32 *pixels; + Render_Engine *re; + Evas_Surface *e_surface; + + re = (Render_Engine *)data; + + surface = + evas_cache_image_copied_data(evas_common_image_cache_get(), w, h, NULL, + alpha, EVAS_COLORSPACE_ARGB8888); + pixels = evas_cache_image_pixels(surface); + + if (re->render_mode == EVAS_RENDER_MODE_NONBLOCKING) + { + /* create a new frame if this is the first surface of this frame */ + evas_common_frameq_prepare_frame(); + + /* add surface into the frame */ + e_surface = evas_common_frameq_new_surface(surface, 0, 0, w, h); + + /* this surface is not going to be pushed to screen */ + e_surface->dontpush = 1; + evas_common_frameq_add_surface(e_surface); + } + return surface; +} + +static void +eng_output_frameq_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + re->outbuf_push_updated_region(re->ob, surface, x, y, w, h); + re->outbuf_free_region_for_update(re->ob, surface); + evas_common_cpu_end_opt(); +} + +static void +eng_output_frameq_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + re->outbuf_flush(re->ob); +} + +static void +eng_output_frameq_set_priv(void *data, void *cur, void *prev) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + re->outbuf_set_priv(re->ob, cur, prev); +} +#endif + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +#ifdef EVAS_FRAME_QUEUING + if (re->render_mode == EVAS_RENDER_MODE_NONBLOCKING) + { + evas_common_frameq_set_frame_data(data, + eng_output_frameq_redraws_next_update_push, + eng_output_frameq_flush, + eng_output_frameq_set_priv); + evas_common_frameq_ready_frame(); + evas_common_frameq_begin(); + } + else +#endif + re->outbuf_flush(re->ob); +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + re->outbuf_idle_flush(re->ob); +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *context __UNUSED__) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return (re->ob->priv.destination_alpha) || (re->outbuf_alpha_get(re->ob)); +} + + +/* module advertising code */ +static int +module_open(Evas_Module *em) +{ +#ifdef BUILD_ENGINE_SOFTWARE_XLIB + static Eina_Bool xrm_inited = EINA_FALSE; + + if (!xrm_inited) + { + xrm_inited = EINA_TRUE; + XrmInitialize(); + } +#endif + + if (!em) return 0; + + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + + _evas_engine_soft_x11_log_dom = + eina_log_domain_register("evas-software_x11", EVAS_DEFAULT_LOG_COLOR); + + if (_evas_engine_soft_x11_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + + /* store it for later use */ + func = pfunc; + + /* now to override methods */ +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); +#ifdef EVAS_FRAME_QUEUING + ORD(image_map_surface_new); +#endif + + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_soft_x11_log_dom); +#ifdef BUILD_ENGINE_SOFTWARE_XLIB +/* + if (xrdb_user.db) + { + XrmDestroyDatabase(xrdb_user.db); + xrdb_user.last_stat = 0; + xrdb_user.last_mtime = 0; + xrdb_user.db = NULL; + } + */ +#endif +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, "software_x11", "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_x11); + +#ifndef EVAS_STATIC_BUILD_SOFTWARE_X11 +EVAS_EINA_MODULE_DEFINE(engine, software_x11); +#endif diff --git a/libraries/evas/src/modules/engines/software_x11/evas_engine.h b/libraries/evas/src/modules/engines/software_x11/evas_engine.h new file mode 100644 index 0000000..80b71b7 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_engine.h @@ -0,0 +1,137 @@ +#ifndef EVAS_ENGINE_H +# define EVAS_ENGINE_H + +# include +# include + +# ifdef BUILD_ENGINE_SOFTWARE_XLIB +# include +# include +# include +# include +# include // xres - dpi +# endif + +# ifdef BUILD_ENGINE_SOFTWARE_XCB +# include +# include +# include +# endif + +extern int _evas_engine_soft_x11_log_dom; + +# ifdef ERR +# undef ERR +# endif +# define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft_x11_log_dom, __VA_ARGS__) + +# ifdef DBG +# undef DBG +# endif +# define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft_x11_log_dom, __VA_ARGS__) + +# ifdef INF +# undef INF +# endif +# define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft_x11_log_dom, __VA_ARGS__) + +# ifdef WRN +# undef WRN +# endif +# define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft_x11_log_dom, __VA_ARGS__) + +# ifdef CRIT +# undef CRIT +# endif +# define CRIT(...) \ + EINA_LOG_DOM_CRIT(_evas_engine_soft_x11_log_dom, __VA_ARGS__) + +typedef enum _Outbuf_Depth Outbuf_Depth; + +enum _Outbuf_Depth +{ + OUTBUF_DEPTH_NONE, + OUTBUF_DEPTH_INHERIT, + OUTBUF_DEPTH_RGB_16BPP_565_565_DITHERED, + OUTBUF_DEPTH_RGB_16BPP_555_555_DITHERED, + OUTBUF_DEPTH_RGB_16BPP_444_444_DITHERED, + OUTBUF_DEPTH_RGB_16BPP_565_444_DITHERED, + OUTBUF_DEPTH_RGB_32BPP_888_8888, + OUTBUF_DEPTH_LAST +}; + +typedef struct _Outbuf Outbuf; + +struct _Outbuf +{ + Outbuf_Depth depth; + int w, h; + int rot; + int onebuf; + + struct + { + Convert_Pal *pal; + union + { +# ifdef BUILD_ENGINE_SOFTWARE_XLIB + struct + { + Display *disp; + Window win; + Pixmap mask; + Visual *vis; + Colormap cmap; + int depth, shm; + GC gc, gcm; + unsigned char swap : 1; + unsigned char bit_swap : 1; + } xlib; +# endif +# ifdef BUILD_ENGINE_SOFTWARE_XCB + struct + { + xcb_connection_t *conn; + xcb_screen_t *screen; + xcb_window_t win; + xcb_pixmap_t mask; + xcb_visualtype_t *visual; + xcb_colormap_t cmap; + int depth, shm; + xcb_gcontext_t gc, gcm; + unsigned char swap : 1; + unsigned char bit_swap : 1; + } xcb; +# endif + } x11; + struct + { + DATA32 r, g, b; + } mask; + + /* 1 big buffer for updates - flush on idle_flush */ + RGBA_Image *onebuf; + Eina_List *onebuf_regions; + + /* a list of pending regions to write to the target */ + Eina_List *pending_writes; + + /* a list of previous frame pending regions to write to the target */ + Eina_List *prev_pending_writes; + +# ifdef EVAS_FRAME_QUEUING + /* protecting prev_pending_writes */ + LK(lock); +# endif + + unsigned char mask_dither : 1; + unsigned char destination_alpha : 1; + unsigned char debug : 1; + unsigned char synced : 1; + } priv; +}; + +void evas_software_xlib_x_init(void); +void evas_software_xcb_init(void); + +#endif diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xcb_buffer.c b/libraries/evas/src/modules/engines/software_x11/evas_xcb_buffer.c new file mode 100644 index 0000000..49ce721 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xcb_buffer.c @@ -0,0 +1,498 @@ +#include "evas_common.h" +#include "evas_xcb_buffer.h" + +/* local function prototypes */ +static void _xcbob_sync(xcb_connection_t *conn); +static xcb_image_t *_xcbob_create_native(xcb_connection_t *conn, int w, int h, xcb_image_format_t format, uint8_t depth, void *base, uint32_t bytes, uint8_t *data); +static xcb_format_t *_xcbob_find_format(const xcb_setup_t *setup, uint8_t depth); +static xcb_visualtype_t *_xcbob_find_visual_by_id(xcb_screen_t *screen, xcb_visualid_t id); + +void +evas_software_xcb_write_mask_line(Outbuf *buf, Xcb_Output_Buffer *xcbob, DATA32 *src, int w, int y) +{ + int x, bpl = 0; + DATA32 *src_ptr; + DATA8 *dst_ptr; + + src_ptr = src; + dst_ptr = evas_software_xcb_output_buffer_data(xcbob, &bpl); + dst_ptr = dst_ptr + (bpl * y); + w -= 7; + if (buf->priv.x11.xcb.bit_swap) + { + for (x = 0; x < w; x += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[0])) >> 7) << 7) | + ((A_VAL(&(src_ptr[1])) >> 7) << 6) | + ((A_VAL(&(src_ptr[2])) >> 7) << 5) | + ((A_VAL(&(src_ptr[3])) >> 7) << 4) | + ((A_VAL(&(src_ptr[4])) >> 7) << 3) | + ((A_VAL(&(src_ptr[5])) >> 7) << 2) | + ((A_VAL(&(src_ptr[6])) >> 7) << 1) | + ((A_VAL(&(src_ptr[7])) >> 7) << 0); + src_ptr += 8; + dst_ptr++; + } + } + else + { + for (x = 0; x < w; x += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[0])) >> 7) << 0) | + ((A_VAL(&(src_ptr[1])) >> 7) << 1) | + ((A_VAL(&(src_ptr[2])) >> 7) << 2) | + ((A_VAL(&(src_ptr[3])) >> 7) << 3) | + ((A_VAL(&(src_ptr[4])) >> 7) << 4) | + ((A_VAL(&(src_ptr[5])) >> 7) << 5) | + ((A_VAL(&(src_ptr[6])) >> 7) << 6) | + ((A_VAL(&(src_ptr[7])) >> 7) << 7); + src_ptr += 8; + dst_ptr++; + } + } + w += 7; + for (; x < w; x ++) + { + xcb_image_put_pixel(xcbob->xim, x, y, A_VAL(src_ptr) >> 7); + src_ptr++; + } +} + +void +evas_software_xcb_write_mask_line_rev(Outbuf *buf, Xcb_Output_Buffer *xcbob, DATA32 *src, int w, int y) +{ + int x, bpl = 0; + DATA32 *src_ptr; + DATA8 *dst_ptr; + + src_ptr = src + w - 1; + dst_ptr = evas_software_xcb_output_buffer_data(xcbob, &bpl); + dst_ptr = dst_ptr + (bpl * y); + w -= 7; + if (buf->priv.x11.xcb.bit_swap) + { + for (x = 0; x < w; x += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[ 0])) >> 7) << 7) | + ((A_VAL(&(src_ptr[-1])) >> 7) << 6) | + ((A_VAL(&(src_ptr[-2])) >> 7) << 5) | + ((A_VAL(&(src_ptr[-3])) >> 7) << 4) | + ((A_VAL(&(src_ptr[-4])) >> 7) << 3) | + ((A_VAL(&(src_ptr[-5])) >> 7) << 2) | + ((A_VAL(&(src_ptr[-6])) >> 7) << 1) | + ((A_VAL(&(src_ptr[-7])) >> 7) << 0); + src_ptr -= 8; + dst_ptr++; + } + } + else + { + for (x = 0; x < w; x += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[ 0])) >> 7) << 0) | + ((A_VAL(&(src_ptr[-1])) >> 7) << 1) | + ((A_VAL(&(src_ptr[-2])) >> 7) << 2) | + ((A_VAL(&(src_ptr[-3])) >> 7) << 3) | + ((A_VAL(&(src_ptr[-4])) >> 7) << 4) | + ((A_VAL(&(src_ptr[-5])) >> 7) << 5) | + ((A_VAL(&(src_ptr[-6])) >> 7) << 6) | + ((A_VAL(&(src_ptr[-7])) >> 7) << 7); + src_ptr -= 8; + dst_ptr++; + } + } + w += 7; + for (; x < w; x ++) + { + xcb_image_put_pixel(xcbob->xim, x, y, A_VAL(src_ptr) >> 7); + src_ptr--; + } +} + +void +evas_software_xcb_write_mask_line_vert(Outbuf *buf, Xcb_Output_Buffer *xcbob, DATA32 *src, int h, int y, int w) +{ + int yy, bpl = 0; + DATA32 *src_ptr; + DATA8 *dst_ptr; + + src_ptr = src; + dst_ptr = evas_software_xcb_output_buffer_data(xcbob, &bpl); + dst_ptr = dst_ptr + (bpl * y); + h -= 7; + if (buf->priv.x11.xcb.bit_swap) + { + for (yy = 0; yy < h; yy += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[0 * w])) >> 7) << 7) | + ((A_VAL(&(src_ptr[1 * w])) >> 7) << 6) | + ((A_VAL(&(src_ptr[2 * w])) >> 7) << 5) | + ((A_VAL(&(src_ptr[3 * w])) >> 7) << 4) | + ((A_VAL(&(src_ptr[4 * w])) >> 7) << 3) | + ((A_VAL(&(src_ptr[5 * w])) >> 7) << 2) | + ((A_VAL(&(src_ptr[6 * w])) >> 7) << 1) | + ((A_VAL(&(src_ptr[7 * w])) >> 7) << 0); + src_ptr += 8 * w; + dst_ptr++; + } + } + else + { + for (yy = 0; yy < h; yy += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[0 * w])) >> 7) << 0) | + ((A_VAL(&(src_ptr[1 * w])) >> 7) << 1) | + ((A_VAL(&(src_ptr[2 * w])) >> 7) << 2) | + ((A_VAL(&(src_ptr[3 * w])) >> 7) << 3) | + ((A_VAL(&(src_ptr[4 * w])) >> 7) << 4) | + ((A_VAL(&(src_ptr[5 * w])) >> 7) << 5) | + ((A_VAL(&(src_ptr[6 * w])) >> 7) << 6) | + ((A_VAL(&(src_ptr[7 * w])) >> 7) << 7); + src_ptr += 8 * w; + dst_ptr++; + } + } + h += 7; + for (; yy < h; yy ++) + { + xcb_image_put_pixel(xcbob->xim, yy, y, A_VAL(src_ptr) >> 7); + src_ptr += w; + } +} + +void +evas_software_xcb_write_mask_line_vert_rev(Outbuf *buf, Xcb_Output_Buffer *xcbob, DATA32 *src, int h, int y, int w) +{ + int yy, bpl = 0; + DATA32 *src_ptr; + DATA8 *dst_ptr; + + src_ptr = src + ((h - 1) * w); + dst_ptr = evas_software_xcb_output_buffer_data(xcbob, &bpl); + dst_ptr = dst_ptr + (bpl * y); + h -= 7; + if (buf->priv.x11.xcb.bit_swap) + { + for (yy = 0; yy < h; yy += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[ 0 * w])) >> 7) << 7) | + ((A_VAL(&(src_ptr[-1 * w])) >> 7) << 6) | + ((A_VAL(&(src_ptr[-2 * w])) >> 7) << 5) | + ((A_VAL(&(src_ptr[-3 * w])) >> 7) << 4) | + ((A_VAL(&(src_ptr[-4 * w])) >> 7) << 3) | + ((A_VAL(&(src_ptr[-5 * w])) >> 7) << 2) | + ((A_VAL(&(src_ptr[-6 * w])) >> 7) << 1) | + ((A_VAL(&(src_ptr[-7 * w])) >> 7) << 0); + src_ptr -= 8 * w; + dst_ptr++; + } + } + else + { + for (yy = 0; yy < h; yy += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[ 0 * w])) >> 7) << 0) | + ((A_VAL(&(src_ptr[-1 * w])) >> 7) << 1) | + ((A_VAL(&(src_ptr[-2 * w])) >> 7) << 2) | + ((A_VAL(&(src_ptr[-3 * w])) >> 7) << 3) | + ((A_VAL(&(src_ptr[-4 * w])) >> 7) << 4) | + ((A_VAL(&(src_ptr[-5 * w])) >> 7) << 5) | + ((A_VAL(&(src_ptr[-6 * w])) >> 7) << 6) | + ((A_VAL(&(src_ptr[-7 * w])) >> 7) << 7); + src_ptr -= 8 * w; + dst_ptr++; + } + } + h += 7; + for (; yy < h; yy ++) + { + xcb_image_put_pixel(xcbob->xim, yy, y, A_VAL(src_ptr) >> 7); + src_ptr -= w; + } +} + +Eina_Bool +evas_software_xcb_can_do_shm(xcb_connection_t *conn, xcb_screen_t *screen) +{ + const xcb_query_extension_reply_t *reply; + static xcb_connection_t *cached_conn = NULL; + static int cached_result = 0; + + if (conn == cached_conn) return cached_result; + cached_conn = conn; + + reply = xcb_get_extension_data(conn, &xcb_shm_id); + if ((reply) && (reply->present)) + { + xcb_visualtype_t *visual; + Xcb_Output_Buffer *xcbob = NULL; + + visual = _xcbob_find_visual_by_id(screen, screen->root_visual); + xcbob = + evas_software_xcb_output_buffer_new(conn, visual, screen->root_depth, + 16, 16, 2, NULL); + if (!xcbob) + cached_result = 0; + else + { + evas_software_xcb_output_buffer_free(xcbob, EINA_TRUE); + cached_result = 1; + } + } + else + cached_result = 0; + + return cached_result; +} + +Xcb_Output_Buffer * +evas_software_xcb_output_buffer_new(xcb_connection_t *conn, xcb_visualtype_t *vis, int depth, int w, int h, int try_shm, unsigned char *data) +{ + Xcb_Output_Buffer *xcbob = NULL; + + if (!(xcbob = calloc(1, sizeof(Xcb_Output_Buffer)))) + return NULL; + + xcbob->connection = conn; + xcbob->visual = vis; + xcbob->xim = NULL; + xcbob->shm_info = NULL; + xcbob->w = w; + xcbob->h = h; + + if (try_shm > 0) + { + xcbob->shm_info = malloc(sizeof(xcb_shm_segment_info_t)); + if (xcbob->shm_info) + { + xcbob->shm_info->shmseg = xcb_generate_id(conn); + xcbob->xim = + _xcbob_create_native(conn, w, h, XCB_IMAGE_FORMAT_Z_PIXMAP, + depth, NULL, ~0, NULL); + if (xcbob->xim) + { + xcbob->shm_info->shmid = + shmget(IPC_PRIVATE, + xcbob->xim->stride * xcbob->xim->height, + (IPC_CREAT | 0777)); + if (xcbob->shm_info->shmid == (uint32_t)-1) + { + xcb_image_destroy(xcbob->xim); + free(xcbob->shm_info); + free(xcbob); + return NULL; + } + xcbob->shm_info->shmaddr = xcbob->xim->data = + shmat(xcbob->shm_info->shmid, 0, 0); + if (xcbob->shm_info->shmaddr != ((void *)-1)) + { + /* Sync only needed for testing */ + if (try_shm == 2) _xcbob_sync(conn); + +#if defined(EVAS_FRAME_QUEUING) && defined(LIBXEXT_VERSION_LOW) + if (evas_common_frameq_enabled()) + xcb_grab_server(conn); +#endif + xcb_shm_attach(conn, xcbob->shm_info->shmseg, + xcbob->shm_info->shmid, 0); +#if defined(EVAS_FRAME_QUEUING) && defined(LIBXEXT_VERSION_LOW) + if (evas_common_frameq_enabled()) + xcb_ungrab_server(conn); +#endif + if (try_shm == 2) _xcbob_sync(conn); + + xcbob->bpl = xcbob->xim->stride; + xcbob->psize = (xcbob->bpl * xcbob->h); + return xcbob; + } + shmdt(xcbob->shm_info->shmaddr); + shmctl(xcbob->shm_info->shmid, IPC_RMID, 0); + } + if (xcbob->xim) xcb_image_destroy(xcbob->xim); + xcbob->xim = NULL; + } + if (xcbob->shm_info) free(xcbob->shm_info); + xcbob->shm_info = NULL; + } + + if (try_shm > 1) return NULL; + + /* no shm */ + xcbob->xim = + _xcbob_create_native(conn, w, h, XCB_IMAGE_FORMAT_Z_PIXMAP, + depth, NULL, ~0, NULL); + if (!xcbob->xim) + { + free(xcbob); + return NULL; + } + + xcbob->data = data; + + if (!xcbob->xim->data) + { + xcbob->xim->data = malloc(xcbob->xim->stride * xcbob->xim->height); + if (!xcbob->xim->data) + { + xcb_image_destroy(xcbob->xim); + free(xcbob); + return NULL; + } + } + xcbob->bpl = xcbob->xim->stride; + xcbob->psize = (xcbob->bpl * xcbob->h); + return xcbob; +} + +void +evas_software_xcb_output_buffer_free(Xcb_Output_Buffer *xcbob, Eina_Bool sync) +{ + if (xcbob->shm_info) + { + if (sync) _xcbob_sync(xcbob->connection); + xcb_shm_detach(xcbob->connection, xcbob->shm_info->shmseg); + xcb_image_destroy(xcbob->xim); + shmdt(xcbob->shm_info->shmaddr); + shmctl(xcbob->shm_info->shmid, IPC_RMID, 0); + free(xcbob->shm_info); + } + else + { + if (xcbob->data) xcbob->xim->data = NULL; +// free(xcbob->xim->data); + xcb_image_destroy(xcbob->xim); + } + free(xcbob); +} + +void +evas_software_xcb_output_buffer_paste(Xcb_Output_Buffer *xcbob, xcb_drawable_t drawable, xcb_gcontext_t gc, int x, int y, Eina_Bool sync) +{ + if (xcbob->shm_info) + { + xcb_image_shm_put(xcbob->connection, drawable, gc, xcbob->xim, + *xcbob->shm_info, 0, 0, x, y, xcbob->w, xcbob->h, 0); + if (sync) _xcbob_sync(xcbob->connection); + } + else + xcb_image_put(xcbob->connection, drawable, gc, xcbob->xim, x, y, 0); +} + +DATA8 * +evas_software_xcb_output_buffer_data(Xcb_Output_Buffer *xcbob, int *bpl_ret) +{ + if (bpl_ret) *bpl_ret = xcbob->xim->stride; + return (DATA8 *)xcbob->xim->data; +} + +int +evas_software_xcb_output_buffer_depth(Xcb_Output_Buffer *xcbob) +{ + return xcbob->xim->bpp; +} + +int +evas_software_xcb_output_buffer_byte_order(Xcb_Output_Buffer *xcbob) +{ + return xcbob->xim->byte_order; +} + +int +evas_software_xcb_output_buffer_bit_order(Xcb_Output_Buffer *xcbob) +{ + return xcbob->xim->bit_order; +} + +/* local functions */ +static void +_xcbob_sync(xcb_connection_t *conn) +{ + free(xcb_get_input_focus_reply(conn, + xcb_get_input_focus_unchecked(conn), NULL)); +} + +static xcb_image_t * +_xcbob_create_native(xcb_connection_t *conn, int w, int h, xcb_image_format_t format, uint8_t depth, void *base, uint32_t bytes, uint8_t *data) +{ + static uint8_t dpth = 0; + static xcb_format_t *fmt = NULL; + const xcb_setup_t *setup; + xcb_image_format_t xif; + + /* NB: We cannot use xcb_image_create_native as it only creates images + * using MSB_FIRST, so this routine recreates that function and uses + * the endian-ness of the server setup */ + setup = xcb_get_setup(conn); + xif = format; + + if ((xif == XCB_IMAGE_FORMAT_Z_PIXMAP) && (depth == 1)) + xif = XCB_IMAGE_FORMAT_XY_PIXMAP; + + if (dpth != depth) + { + dpth = depth; + fmt = _xcbob_find_format(setup, depth); + if (!fmt) return 0; + } + + switch (xif) + { + case XCB_IMAGE_FORMAT_XY_BITMAP: + if (depth != 1) return 0; + case XCB_IMAGE_FORMAT_XY_PIXMAP: + case XCB_IMAGE_FORMAT_Z_PIXMAP: + return xcb_image_create(w, h, xif, + fmt->scanline_pad, + fmt->depth, fmt->bits_per_pixel, + setup->bitmap_format_scanline_unit, + setup->image_byte_order, + setup->bitmap_format_bit_order, + base, bytes, data); + default: + break; + } + + return 0; +} + +static xcb_format_t * +_xcbob_find_format(const xcb_setup_t *setup, uint8_t depth) +{ + xcb_format_t *fmt, *fmtend; + + fmt = xcb_setup_pixmap_formats(setup); + fmtend = fmt + xcb_setup_pixmap_formats_length(setup); + for (; fmt != fmtend; ++fmt) + if (fmt->depth == depth) + return fmt; + + return 0; +} + +static xcb_visualtype_t * +_xcbob_find_visual_by_id(xcb_screen_t *screen, xcb_visualid_t id) +{ + xcb_depth_iterator_t diter; + xcb_visualtype_iterator_t viter; + + diter = xcb_screen_allowed_depths_iterator(screen); + for (; diter.rem; xcb_depth_next(&diter)) + { + viter = xcb_depth_visuals_iterator(diter.data); + for (; viter.rem; xcb_visualtype_next(&viter)) + { + if (viter.data->visual_id == id) + return viter.data; + } + } + + return 0; +} diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xcb_buffer.h b/libraries/evas/src/modules/engines/software_x11/evas_xcb_buffer.h new file mode 100644 index 0000000..dc1f0b4 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xcb_buffer.h @@ -0,0 +1,30 @@ +#ifndef EVAS_XCB_BUFFER_H +# define EVAS_XCB_BUFFER_H + +# include "evas_engine.h" + +typedef struct _Xcb_Output_Buffer Xcb_Output_Buffer; +struct _Xcb_Output_Buffer +{ + xcb_connection_t *connection; + xcb_visualtype_t *visual; + xcb_image_t *xim; + xcb_shm_segment_info_t *shm_info; + unsigned char *data; + int w, h, bpl, psize; +}; + +void evas_software_xcb_write_mask_line(Outbuf *buf, Xcb_Output_Buffer *xcbob, DATA32 *src, int w, int y); +void evas_software_xcb_write_mask_line_rev(Outbuf *buf, Xcb_Output_Buffer *xcbob, DATA32 *src, int w, int y); +void evas_software_xcb_write_mask_line_vert(Outbuf *buf, Xcb_Output_Buffer *xcbob, DATA32 *src, int h, int y, int w); +void evas_software_xcb_write_mask_line_vert_rev(Outbuf *buf, Xcb_Output_Buffer *xcbob, DATA32 *src, int h, int y, int w); +Eina_Bool evas_software_xcb_can_do_shm(xcb_connection_t *conn, xcb_screen_t *screen); +Xcb_Output_Buffer *evas_software_xcb_output_buffer_new(xcb_connection_t *conn, xcb_visualtype_t *vis, int depth, int w, int h, int try_shm, unsigned char *data); +void evas_software_xcb_output_buffer_free(Xcb_Output_Buffer *xcbob, Eina_Bool sync); +void evas_software_xcb_output_buffer_paste(Xcb_Output_Buffer *xcbob, xcb_drawable_t drawable, xcb_gcontext_t gc, int x, int y, Eina_Bool sync); +DATA8 *evas_software_xcb_output_buffer_data(Xcb_Output_Buffer *xcbob, int *bpl_ret); +int evas_software_xcb_output_buffer_depth(Xcb_Output_Buffer *xcbob); +int evas_software_xcb_output_buffer_byte_order(Xcb_Output_Buffer *xcbob); +int evas_software_xcb_output_buffer_bit_order(Xcb_Output_Buffer *xcbob); + +#endif diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xcb_color.c b/libraries/evas/src/modules/engines/software_x11/evas_xcb_color.c new file mode 100644 index 0000000..3ed6037 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xcb_color.c @@ -0,0 +1,424 @@ +#include "evas_common.h" + +#include "evas_engine.h" + +typedef struct _Convert_Pal_Priv Convert_Pal_Priv; + +struct _Convert_Pal_Priv +{ + xcb_connection_t *conn; + xcb_colormap_t cmap; + xcb_visualtype_t *vis; +}; + +typedef DATA8 * (*Xcb_Func_Alloc_Colors) (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); + +static Xcb_Func_Alloc_Colors x_color_alloc[PAL_MODE_LAST + 1]; +static int x_color_count[PAL_MODE_LAST + 1]; +static Eina_List *palettes = NULL; + +static DATA8 * x_color_alloc_rgb(int nr, int ng, int nb, xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_gray(int ng, xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); + +static DATA8 * x_color_alloc_rgb_332 (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_rgb_666 (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_rgb_232 (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_rgb_222 (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_rgb_221 (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_rgb_121 (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_rgb_111 (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_gray_256 (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_gray_64 (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_gray_16 (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_gray_4 (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); +static DATA8 * x_color_alloc_mono (xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v); + +static DATA8 * +x_color_alloc_rgb(int nr, + int ng, + int nb, + xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + int r, g, b, i; + DATA8 *color_lut; + int sig_mask = 0; + int delt = 0; + + for (i = 0; i < v->bits_per_rgb_value; i++) sig_mask |= (0x1 << i); + sig_mask <<= (16 - v->bits_per_rgb_value); + i = 0; + color_lut = malloc((nr) * (ng) * (nb)); + if (!color_lut) return NULL; + delt = 0x0101 * 3; + /* FIXME: remove the round-trip ? */ + for (r = 0; r < (nr); r++) + { + for (g = 0; g < (ng); g++) + { + for (b = 0; b < (nb); b++) + { + xcb_coloritem_t xcl; + xcb_coloritem_t xcl_in; + xcb_alloc_color_reply_t *rep; + int val; + int dr, dg, db; + + val = (int)((((double)r) / ((nr) - 1)) * 255); + val = (val << 8) | val; + xcl.red = (uint16_t)(val); + val = (int)((((double)g) / ((ng) - 1)) * 255); + val = (val << 8) | val; + xcl.green = (uint16_t)(val); + val = (int)((((double)b) / ((nb) - 1)) * 255); + val = (val << 8) | val; + xcl.blue = (uint16_t)(val); + xcl_in = xcl; + rep = xcb_alloc_color_reply(conn, + xcb_alloc_color_unchecked(conn, + cmap, + xcl.red, + xcl.green, + xcl.blue), + 0); + dr = (int)xcl_in.red - (int)xcl.red; + if (dr < 0) dr = -dr; + dg = (int)xcl_in.green - (int)xcl.green; + if (dg < 0) dg = -dg; + db = (int)xcl_in.blue - (int)xcl.blue; + if (db < 0) db = -db; +/* + printf("ASK [%i]: %04x %04x %04x = %04x %04x %04x | dif = %04x / %04x\n", + ret, + xcl_in.red, xcl_in.green, xcl_in.blue, + xcl.red, xcl.green, xcl.blue, + (dr + dg +db), delt); + */ + + /* TODO: XAllocColor tries to approach the color */ + /* in case the allocation fails */ + /* XCB does not that (i think). It should be done */ + /* So if rep == NULL, the other following tests */ + /* should be always satisfied */ + if ((!rep) || + ((dr + dg + db) > delt) + /* + ((xcl_in.red & sig_mask) != (xcl.red & sig_mask)) || + ((xcl_in.green & sig_mask) != (xcl.green & sig_mask)) || + ((xcl_in.blue & sig_mask) != (xcl.blue & sig_mask)) + */ + ) + { + uint32_t pixels[256]; + int j; + + if (i > 0) + { + for (j = 0; j < i; j++) + pixels[j] = (uint32_t)color_lut[j]; + xcb_free_colors(conn, cmap, 0, i, pixels); + } + free(color_lut); + return NULL; + } + color_lut[i] = rep->pixel; + i++; + free(rep); + } + } + } + return color_lut; +} + +static DATA8 * +x_color_alloc_gray(int ng, + xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + int g, i; + DATA8 *color_lut; + int sig_mask = 0; + + for (i = 0; i < v->bits_per_rgb_value; i++) sig_mask |= (0x1 << i); + sig_mask <<= (16 - v->bits_per_rgb_value); + i = 0; + color_lut = malloc(ng); + if (!color_lut) return NULL; + /* FIXME: remove the round-trip ? */ + for (g = 0; g < (ng); g++) + { + xcb_coloritem_t xcl; + xcb_coloritem_t xcl_in; + int val; + xcb_alloc_color_reply_t *rep; + + val = (int)((((double)g) / ((ng) - 1)) * 255); + val = (val << 8) | val; + xcl.red = (uint16_t)(val); + xcl.green = (uint16_t)(val); + xcl.blue = (uint16_t)(val); + xcl_in = xcl; + rep = xcb_alloc_color_reply(conn, + xcb_alloc_color_unchecked(conn, + cmap, + xcl.red, + xcl.green, + xcl.blue), + 0); + /* FIXME: XAllocColor tries to approach the color */ + /* in case the allocation fails */ + /* XCB does not that (i think). It should be done */ + /* So if rep == NULL, the other following tests */ + /* should be always satisfied */ + if ((!rep) || + ((xcl_in.red & sig_mask) != (xcl.red & sig_mask)) || + ((xcl_in.green & sig_mask) != (xcl.green & sig_mask)) || + ((xcl_in.blue & sig_mask) != (xcl.blue & sig_mask))) + { + uint32_t pixels[256]; + int j; + + if (i > 0) + { + for (j = 0; j < i; j++) + pixels[j] = (uint32_t) color_lut[j]; + xcb_free_colors(conn, cmap, 0, i, pixels); + } + free(color_lut); + return NULL; + } + color_lut[i] = rep->pixel; + i++; + free(rep); + } + return color_lut; +} + +static DATA8 * +x_color_alloc_rgb_332(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_rgb(8, 8, 4, conn, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_666(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_rgb(6, 6, 6, conn, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_232(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_rgb(4, 8, 4, conn, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_222(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_rgb(4, 4, 4, conn, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_221(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_rgb(4, 4, 2, conn, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_121(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_rgb(2, 4, 2, conn, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_111(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_rgb(2, 2, 2, conn, cmap, v); +} + +static DATA8 * +x_color_alloc_gray_256(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_gray(256, conn, cmap, v); +} + +static DATA8 * +x_color_alloc_gray_64(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_gray(64, conn, cmap, v); +} + +static DATA8 * +x_color_alloc_gray_16(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_gray(32, conn, cmap, v); +} + +static DATA8 * +x_color_alloc_gray_4(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_gray(16, conn, cmap, v); +} + +static DATA8 * +x_color_alloc_mono(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *v) +{ + return x_color_alloc_gray(2, conn, cmap, v); +} + +void +evas_software_xcb_color_init(void) +{ + static int initialised = 0; + + if (initialised) return; + x_color_alloc[PAL_MODE_NONE] = NULL; + x_color_count[PAL_MODE_NONE] = 0; + + x_color_alloc[PAL_MODE_MONO] = x_color_alloc_mono; + x_color_count[PAL_MODE_MONO] = 2; + + x_color_alloc[PAL_MODE_GRAY4] = x_color_alloc_gray_4; + x_color_count[PAL_MODE_GRAY4] = 4; + + x_color_alloc[PAL_MODE_GRAY16] = x_color_alloc_gray_16; + x_color_count[PAL_MODE_GRAY16] = 16; + + x_color_alloc[PAL_MODE_GRAY64] = x_color_alloc_gray_64; + x_color_count[PAL_MODE_GRAY64] = 64; + + x_color_alloc[PAL_MODE_GRAY256] = x_color_alloc_gray_256; + x_color_count[PAL_MODE_GRAY256] = 256; + + x_color_alloc[PAL_MODE_RGB111] = x_color_alloc_rgb_111; + x_color_count[PAL_MODE_RGB111] = 2 * 2 * 2; + + x_color_alloc[PAL_MODE_RGB121] = x_color_alloc_rgb_121; + x_color_count[PAL_MODE_RGB121] = 2 * 4 * 2; + + x_color_alloc[PAL_MODE_RGB221] = x_color_alloc_rgb_221; + x_color_count[PAL_MODE_RGB221] = 4 * 4 * 2; + + x_color_alloc[PAL_MODE_RGB222] = x_color_alloc_rgb_222; + x_color_count[PAL_MODE_RGB222] = 4 * 4 * 4; + + x_color_alloc[PAL_MODE_RGB232] = x_color_alloc_rgb_232; + x_color_count[PAL_MODE_RGB232] = 4 * 8 * 4; + + x_color_alloc[PAL_MODE_RGB666] = x_color_alloc_rgb_666; + x_color_count[PAL_MODE_RGB666] = 6 * 6 * 6; + + x_color_alloc[PAL_MODE_RGB332] = x_color_alloc_rgb_332; + x_color_count[PAL_MODE_RGB332] = 8 * 8 * 4; + + x_color_alloc[PAL_MODE_LAST] = NULL; + x_color_count[PAL_MODE_LAST] = 0; + initialised = 1; +} + +Convert_Pal * +evas_software_xcb_color_allocate(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *vis, + Convert_Pal_Mode colors) +{ + Convert_Pal_Priv *palpriv; + Convert_Pal *pal; + Convert_Pal_Mode c; + Eina_List *l; + +/* printf("ALLOC cmap=%i vis=%p\n", cmap, vis);*/ + EINA_LIST_FOREACH(palettes, l, pal) + { + palpriv = pal->data; + if ((conn == palpriv->conn) && + (vis == palpriv->vis) && + (cmap == palpriv->cmap)) + { + pal->references++; + return pal; + } + } + pal = calloc(1, sizeof(struct _Convert_Pal)); + if (!pal) return NULL; + for (c = colors; c > PAL_MODE_NONE; c--) + { + if (x_color_alloc[c]) + { +/* printf("TRY PAL %i\n", c);*/ + pal->lookup = (x_color_alloc[c])(conn, cmap, vis); + if (pal->lookup) break; + } + } + pal->references = 1; + pal->colors = c; + pal->count = x_color_count[c]; + palpriv = calloc(1, sizeof(Convert_Pal_Priv)); + pal->data = palpriv; + if (!palpriv) + { + if (pal->lookup) free(pal->lookup); + free(pal); + return NULL; + } + palpriv->conn = conn; + palpriv->vis = vis; + palpriv->cmap = cmap; + if (pal->colors == PAL_MODE_NONE) + { + if (pal->lookup) free(pal->lookup); + free(pal); + return NULL; + } + palettes = eina_list_append(palettes, pal); + return pal; +} + +void +evas_software_xcb_color_deallocate(xcb_connection_t *conn, + xcb_colormap_t cmap, + xcb_visualtype_t *vis __UNUSED__, + Convert_Pal *pal) +{ + uint32_t pixels[256]; + int j; + + pal->references--; + if (pal->references > 0) return; + if (pal->lookup) + { + for(j = 0; j < pal->count; j++) + pixels[j] = (uint32_t) pal->lookup[j]; + xcb_free_colors(conn, cmap, 0, pal->count, pixels); + free(pal->lookup); + } + free(pal->data); + palettes = eina_list_remove(palettes, pal); + free(pal); +} diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xcb_color.h b/libraries/evas/src/modules/engines/software_x11/evas_xcb_color.h new file mode 100644 index 0000000..7dcaeaf --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xcb_color.h @@ -0,0 +1,10 @@ +#ifndef EVAS_XCB_COLOR_H +# define EVAS_XCB_COLOR_H + +# include "evas_engine.h" + +void evas_software_xcb_color_init(void); +Convert_Pal *evas_software_xcb_color_allocate(xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *vis, Convert_Pal_Mode colors); +void evas_software_xcb_color_deallocate(xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *vis, Convert_Pal *pal); + +#endif diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xcb_main.c b/libraries/evas/src/modules/engines/software_x11/evas_xcb_main.c new file mode 100644 index 0000000..d187016 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xcb_main.c @@ -0,0 +1,8 @@ +#include "evas_common.h" +#include "evas_engine.h" + +void +evas_software_xcb_init(void) +{ + +} diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xcb_outbuf.c b/libraries/evas/src/modules/engines/software_x11/evas_xcb_outbuf.c new file mode 100644 index 0000000..71759be --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xcb_outbuf.c @@ -0,0 +1,1092 @@ +#include "evas_common.h" +#include "evas_macros.h" +#include "evas_xcb_outbuf.h" +#include "evas_xcb_buffer.h" +#include "evas_xcb_color.h" +#include + +/* local structures */ +typedef struct _Outbuf_Region Outbuf_Region; +struct _Outbuf_Region +{ + Xcb_Output_Buffer *xcbob, *mask; + int x, y, w, h; +}; + +/* local function prototypes */ +static Xcb_Output_Buffer *_find_xcbob(xcb_connection_t *conn, xcb_visualtype_t *vis, int depth, int w, int h, Eina_Bool shm, void *data); +static void _unfind_xcbob(Xcb_Output_Buffer *xcbob, Eina_Bool sync); +static void _clear_xcbob(Eina_Bool sync); +static void _xcbob_sync(xcb_connection_t *conn); + +/* local variables */ +static Eina_List *_shmpool = NULL; +static int _shmsize = 0; +static int _shmlimit = (10 * 1024 * 1024); +static const unsigned int _shmcountlimit = 32; + +#ifdef EVAS_FRAME_QUEUING +static LK(lock_shmpool); +# define SHMPOOL_LOCK() LKL(lock_shmpool); +# define SHMPOOL_UNLOCK() LKU(lock_shmpool); +#else +# define SHMPOOL_LOCK() +# define SHMPOOL_UNLOCK() +#endif + +void +evas_software_xcb_outbuf_init(void) +{ +#ifdef EVAS_FRAME_QUEUING + LKI(lock_shmpool); +#endif +} + +void +evas_software_xcb_outbuf_free(Outbuf *buf) +{ +#ifdef EVAS_FRAME_QUEUING + LKL(buf->priv.lock); +#endif + while (buf->priv.pending_writes) + { + RGBA_Image *im = NULL; + Outbuf_Region *obr = NULL; + + im = buf->priv.pending_writes->data; + buf->priv.pending_writes = + eina_list_remove_list(buf->priv.pending_writes, + buf->priv.pending_writes); + obr = im->extended_info; + evas_cache_image_drop(&im->cache_entry); + if (obr->xcbob) _unfind_xcbob(obr->xcbob, EINA_FALSE); + if (obr->mask) _unfind_xcbob(obr->mask, EINA_FALSE); + free(obr); + } +#ifdef EVAS_FRAME_QUEUING + LKU(buf->priv.lock); +#endif + evas_software_xcb_outbuf_idle_flush(buf); + evas_software_xcb_outbuf_flush(buf); + if (buf->priv.x11.xcb.gc) + xcb_free_gc(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.gc); + if (buf->priv.x11.xcb.gcm) + xcb_free_gc(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.gcm); + if (buf->priv.pal) + evas_software_xcb_color_deallocate(buf->priv.x11.xcb.conn, + buf->priv.x11.xcb.cmap, + buf->priv.x11.xcb.visual, + buf->priv.pal); +#ifdef EVAS_FRAME_QUEUING + LKD(buf->priv.lock); +#endif + free(buf); + _clear_xcbob(EINA_FALSE); +} + +Outbuf * +evas_software_xcb_outbuf_setup(int w, int h, int rot, Outbuf_Depth depth, xcb_connection_t *conn, xcb_screen_t *screen, xcb_drawable_t draw, xcb_visualtype_t *vis, xcb_colormap_t cmap, int xdepth, Eina_Bool grayscale, int max_colors, xcb_drawable_t mask, Eina_Bool shape_dither, Eina_Bool alpha) +{ + Outbuf *buf = NULL; + Gfx_Func_Convert func_conv= NULL; + const xcb_setup_t *setup; + + if (!(buf = calloc(1, sizeof(Outbuf)))) + return NULL; + + setup = xcb_get_setup(conn); + + buf->w = w; + buf->h = h; + buf->depth = depth; + buf->rot = rot; + buf->priv.x11.xcb.conn = conn; + buf->priv.x11.xcb.screen = screen; + buf->priv.x11.xcb.visual = vis; + buf->priv.x11.xcb.cmap = cmap; + buf->priv.x11.xcb.depth = xdepth; + buf->priv.mask_dither = shape_dither; + buf->priv.destination_alpha = alpha; + buf->priv.x11.xcb.shm = evas_software_xcb_can_do_shm(conn, screen); + +#ifdef WORDS_BIGENDIAN + if (setup->image_byte_order == XCB_IMAGE_ORDER_LSB_FIRST) + buf->priv.x11.xcb.swap = EINA_TRUE; +#else + if (setup->image_byte_order == XCB_IMAGE_ORDER_MSB_FIRST) + buf->priv.x11.xcb.swap = EINA_TRUE; +#endif + if (setup->bitmap_format_bit_order == XCB_IMAGE_ORDER_MSB_FIRST) + buf->priv.x11.xcb.bit_swap = EINA_TRUE; + + if (((vis->_class == XCB_VISUAL_CLASS_TRUE_COLOR) || + (vis->_class == XCB_VISUAL_CLASS_DIRECT_COLOR)) && (xdepth > 8)) + { + buf->priv.mask.r = (DATA32)vis->red_mask; + buf->priv.mask.g = (DATA32)vis->green_mask; + buf->priv.mask.b = (DATA32)vis->blue_mask; + if (buf->priv.x11.xcb.swap) + { + SWAP32(buf->priv.mask.r); + SWAP32(buf->priv.mask.g); + SWAP32(buf->priv.mask.b); + } + } + else if ((vis->_class == XCB_VISUAL_CLASS_PSEUDO_COLOR) || + (vis->_class == XCB_VISUAL_CLASS_STATIC_COLOR) || + (vis->_class == XCB_VISUAL_CLASS_GRAY_SCALE) || + (vis->_class == XCB_VISUAL_CLASS_STATIC_GRAY) || + (xdepth <= 8)) + { + Convert_Pal_Mode pm = PAL_MODE_RGB332; + + if ((vis->_class == XCB_VISUAL_CLASS_GRAY_SCALE) || + (vis->_class == XCB_VISUAL_CLASS_STATIC_GRAY)) + grayscale = EINA_TRUE; + if (grayscale) + { + if (max_colors >= 256) + pm = PAL_MODE_GRAY256; + else if (max_colors >= 64) + pm = PAL_MODE_GRAY64; + else if (max_colors >= 16) + pm = PAL_MODE_GRAY16; + else if (max_colors >= 4) + pm = PAL_MODE_GRAY4; + else + pm = PAL_MODE_MONO; + } + else + { + if (max_colors >= 256) + pm = PAL_MODE_RGB332; + else if (max_colors >= 216) + pm = PAL_MODE_RGB666; + else if (max_colors >= 128) + pm = PAL_MODE_RGB232; + else if (max_colors >= 64) + pm = PAL_MODE_RGB222; + else if (max_colors >= 32) + pm = PAL_MODE_RGB221; + else if (max_colors >= 16) + pm = PAL_MODE_RGB121; + else if (max_colors >= 8) + pm = PAL_MODE_RGB111; + else if (max_colors >= 4) + pm = PAL_MODE_GRAY4; + else + pm = PAL_MODE_MONO; + } + /* FIXME: Only allocate once per display & colormap */ + buf->priv.pal = + evas_software_xcb_color_allocate(conn, cmap, vis, pm); + if (!buf->priv.pal) + { + free(buf); + return NULL; + } + } + if ((buf->rot == 0) || (buf->rot == 180)) + { + w = buf->w; + h = buf->h; + } + else if ((buf->rot == 90) || (buf->rot == 270)) + { + w = buf->h; + h = buf->w; + } + + if (buf->priv.pal) + { + func_conv = + evas_common_convert_func_get(0, w, h, xdepth, + buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, + buf->priv.pal->colors, buf->rot); + } + else + { + func_conv = + evas_common_convert_func_get(0, w, h, xdepth, + buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, + PAL_MODE_NONE, buf->rot); + } + if (!func_conv) + { + ERR("XCB Engine" + " {" + " At depth %i:" + " RGB format mask: %08x, %08x, %08x" + " Palette mode: %i" + " Not supported by any compiled in converters!" + " }", buf->priv.x11.xcb.depth, buf->priv.mask.r, + buf->priv.mask.g, buf->priv.mask.b, + buf->priv.pal ? (int)buf->priv.pal->colors : -1); + } + + evas_software_xcb_outbuf_drawable_set(buf, draw); + evas_software_xcb_outbuf_mask_set(buf, mask); + +#ifdef EVAS_FRAME_QUEUING + LKI(buf->priv.lock); +#endif + + return buf; +} + +RGBA_Image * +evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch) +{ + RGBA_Image *im = NULL; + Outbuf_Region *obr = NULL; + Eina_Bool use_shm = EINA_TRUE; + Eina_Bool alpha = EINA_FALSE; + int bpl = 0; + + if ((buf->onebuf) && (buf->priv.x11.xcb.shm)) + { + Eina_Rectangle *rect; + + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, buf->w, buf->h); + + if (!(obr = calloc(1, sizeof(Outbuf_Region)))) + return NULL; + + if (!(rect = eina_rectangle_new(x, y, w, h))) + { + free(obr); + return NULL; + } + + buf->priv.onebuf_regions = + eina_list_append(buf->priv.onebuf_regions, rect); + if (buf->priv.onebuf) + { + if (cx) *cx = x; + if (cy) *cy = y; + if (cw) *cw = w; + if (ch) *ch = h; + if (!buf->priv.synced) + { + _xcbob_sync(buf->priv.x11.xcb.conn); + buf->priv.synced = EINA_TRUE; + } + return buf->priv.onebuf; + } + obr->x = 0; + obr->y = 0; + obr->w = buf->w; + obr->h = buf->h; + if (cx) *cx = x; + if (cy) *cy = y; + if (cw) *cw = w; + if (ch) *ch = h; + + alpha = ((buf->priv.x11.xcb.mask) || (buf->priv.destination_alpha)); + use_shm = buf->priv.x11.xcb.shm; + + if ((buf->rot == 0) && (buf->priv.mask.r == 0xff0000) && + (buf->priv.mask.g == 0x00ff00) && (buf->priv.mask.b == 0x0000ff)) + { + obr->xcbob = + evas_software_xcb_output_buffer_new(buf->priv.x11.xcb.conn, + buf->priv.x11.xcb.visual, + buf->priv.x11.xcb.depth, + buf->w, buf->h, use_shm, + NULL); + if (!obr->xcbob) + { + free(obr); + return NULL; + } + im = + (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), + buf->w, buf->h, + (DATA32 *)evas_software_xcb_output_buffer_data(obr->xcbob, &bpl), + alpha, EVAS_COLORSPACE_ARGB8888); + if (!im) + { + evas_software_xcb_output_buffer_free(obr->xcbob, EINA_FALSE); + free(obr); + return NULL; + } + im->extended_info = obr; + if (buf->priv.x11.xcb.mask) + { + obr->mask = + evas_software_xcb_output_buffer_new(buf->priv.x11.xcb.conn, + buf->priv.x11.xcb.visual, + 1, buf->w, buf->h, + use_shm, NULL); + } + } + else + { + int bw = 0, bh = 0; + + im = + (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + if (!im) + { + free(obr); + return NULL; + } + im->cache_entry.flags.alpha |= (alpha ? 1 : 0); + evas_cache_image_surface_alloc(&im->cache_entry, buf->w, buf->h); + im->extended_info = obr; + if ((buf->rot == 0) || (buf->rot == 180)) + { + bw = buf->w; + bh = buf->h; + } + else if ((buf->rot == 90) || (buf->rot == 270)) + { + bw = buf->h; + bh = buf->w; + } + obr->xcbob = + evas_software_xcb_output_buffer_new(buf->priv.x11.xcb.conn, + buf->priv.x11.xcb.visual, + buf->priv.x11.xcb.depth, + bw, bh, use_shm, NULL); + if (!obr->xcbob) + { + evas_cache_image_drop(&im->cache_entry); + free(obr); + return NULL; + } + if (buf->priv.x11.xcb.mask) + { + obr->mask = + evas_software_xcb_output_buffer_new(buf->priv.x11.xcb.conn, + buf->priv.x11.xcb.visual, + 1, bw, bh, use_shm, + NULL); + } + } + /* FIXME: We should be able to remove this memset. */ + if ((alpha) && (im->image.data)) + { + /* FIXME: Faster memset */ +// memset(im->image.data, 0, (w * h * sizeof(DATA32))); + } + buf->priv.onebuf = im; + return im; + } + + if (!(obr = calloc(1, sizeof(Outbuf_Region)))) + return NULL; + + obr->x = x; + obr->y = y; + obr->w = w; + obr->h = h; + if (cx) *cx = 0; + if (cy) *cy = 0; + if (cw) *cw = w; + if (ch) *ch = h; + + use_shm = buf->priv.x11.xcb.shm; + alpha = ((buf->priv.x11.xcb.mask) || (buf->priv.destination_alpha)); + if ((buf->rot == 0) && (buf->priv.mask.r == 0xff0000) && + (buf->priv.mask.g == 0x00ff00) && (buf->priv.mask.b == 0x0000ff)) + { + obr->xcbob = + _find_xcbob(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.visual, + buf->priv.x11.xcb.depth, w, h, use_shm, NULL); + if (!obr->xcbob) + { + free(obr); + return NULL; + } + im = + (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), + w, h, + (DATA32 *)evas_software_xcb_output_buffer_data(obr->xcbob, &bpl), + alpha, EVAS_COLORSPACE_ARGB8888); + if (!im) + { + _unfind_xcbob(obr->xcbob, EINA_FALSE); + free(obr); + return NULL; + } + im->extended_info = obr; + if (buf->priv.x11.xcb.mask) + { + obr->mask = + _find_xcbob(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.visual, + 1, w, h, use_shm, NULL); + } + } + else + { + int bw = 0, bh = 0; + + im = + (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + if (!im) + { + free(obr); + return NULL; + } + im->cache_entry.flags.alpha |= (alpha ? 1 : 0); + evas_cache_image_surface_alloc(&im->cache_entry, w, h); + im->extended_info = obr; + if ((buf->rot == 0) || (buf->rot == 180)) + { + bw = w; + bh = h; + } + else if ((buf->rot == 90) || (buf->rot == 270)) + { + bw = h; + bh = w; + } + obr->xcbob = + _find_xcbob(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.visual, + buf->priv.x11.xcb.depth, bw, bh, use_shm, NULL); + if (!obr->xcbob) + { + evas_cache_image_drop(&im->cache_entry); + free(obr); + return NULL; + } + if (buf->priv.x11.xcb.mask) + { + obr->mask = + _find_xcbob(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.visual, 1, + bw, bh, use_shm, NULL); + } + } + /* FIXME: We should be able to remove this memset. */ + if (((buf->priv.x11.xcb.mask) || (buf->priv.destination_alpha)) && + (im->image.data)) + { + /* FIXME: Faster memset */ +// memset(im->image.data, 0, (w * h * sizeof(DATA32))); + } + +#ifdef EVAS_FRAME_QUEUING + if (!evas_common_frameq_enabled()) +#endif + buf->priv.pending_writes = eina_list_append(buf->priv.pending_writes, im); + + return im; +} + +void +evas_software_xcb_outbuf_free_region_for_update(Outbuf *buf __UNUSED__, RGBA_Image *update __UNUSED__) +{ + /* NOOP: Cleaned up on flush */ +} + +void +evas_software_xcb_outbuf_flush(Outbuf *buf) +{ + Eina_List *l = NULL; + RGBA_Image *im = NULL; + Outbuf_Region *obr = NULL; + + if ((buf->priv.onebuf) && (buf->priv.onebuf_regions)) + { + pixman_region16_t tmpr; + + im = buf->priv.onebuf; + obr = im->extended_info; + pixman_region_init(&tmpr); + while (buf->priv.onebuf_regions) + { + Eina_Rectangle *rect, xr = { 0, 0, 0, 0 }; + + rect = buf->priv.onebuf_regions->data; + buf->priv.onebuf_regions = + eina_list_remove_list(buf->priv.onebuf_regions, + buf->priv.onebuf_regions); + if (buf->rot == 0) + { + xr.x = rect->x; + xr.y = rect->y; + xr.w = rect->w; + xr.h = rect->h; + } + else if (buf->rot == 90) + { + xr.x = rect->y; + xr.y = buf->w - rect->x - rect->w; + xr.w = rect->h; + xr.h = rect->w; + } + else if (buf->rot == 180) + { + xr.x = buf->w - rect->x - rect->w; + xr.y = buf->h - rect->y - rect->h; + xr.w = rect->w; + xr.h = rect->h; + } + else if (buf->rot == 270) + { + xr.x = buf->h - rect->y - rect->h; + xr.y = rect->x; + xr.w = rect->h; + xr.h = rect->w; + } + pixman_region_union_rect(&tmpr, &tmpr, xr.x, xr.y, xr.w, xr.h); + if (buf->priv.debug) + evas_software_xcb_outbuf_debug_show(buf, buf->priv.x11.xcb.win, + xr.x, xr.y, xr.w, xr.h); + eina_rectangle_free(rect); + } + xcb_set_clip_rectangles(buf->priv.x11.xcb.conn, + XCB_CLIP_ORDERING_YX_BANDED, + buf->priv.x11.xcb.gc, 0, 0, + pixman_region_n_rects(&tmpr), + (const xcb_rectangle_t *)pixman_region_rectangles(&tmpr, NULL)); + if (obr->xcbob) + evas_software_xcb_output_buffer_paste(obr->xcbob, + buf->priv.x11.xcb.win, + buf->priv.x11.xcb.gc, 0, 0, 0); + if (obr->mask) + { + xcb_set_clip_rectangles(buf->priv.x11.xcb.conn, + XCB_CLIP_ORDERING_YX_BANDED, + buf->priv.x11.xcb.gcm, 0, 0, + pixman_region_n_rects(&tmpr), + (const xcb_rectangle_t *)pixman_region_rectangles(&tmpr, NULL)); + evas_software_xcb_output_buffer_paste(obr->mask, + buf->priv.x11.xcb.mask, + buf->priv.x11.xcb.gcm, + 0, 0, 0); + } + pixman_region_fini(&tmpr); + buf->priv.synced = EINA_FALSE; + } + else + { +#if 1 + _xcbob_sync(buf->priv.x11.xcb.conn); + EINA_LIST_FOREACH(buf->priv.pending_writes, l, im) + { + obr = im->extended_info; + if (buf->priv.debug) + evas_software_xcb_outbuf_debug_show(buf, buf->priv.x11.xcb.win, + obr->x, obr->y, obr->w, obr->h); + if (obr->xcbob) + evas_software_xcb_output_buffer_paste(obr->xcbob, + buf->priv.x11.xcb.win, + buf->priv.x11.xcb.gc, + obr->x, obr->y, 0); + if (obr->mask) + evas_software_xcb_output_buffer_paste(obr->mask, + buf->priv.x11.xcb.mask, + buf->priv.x11.xcb.gcm, + obr->x, obr->y, 0); + } +# ifdef EVAS_FRAME_QUEUING + LKL(buf->priv.lock); +# endif + while (buf->priv.prev_pending_writes) + { + im = buf->priv.prev_pending_writes->data; + buf->priv.prev_pending_writes = + eina_list_remove_list(buf->priv.prev_pending_writes, + buf->priv.prev_pending_writes); + obr = im->extended_info; + evas_cache_image_drop(&im->cache_entry); + if (obr->xcbob) _unfind_xcbob(obr->xcbob, EINA_FALSE); + if (obr->mask) _unfind_xcbob(obr->mask, EINA_FALSE); + free(obr); + } + buf->priv.prev_pending_writes = buf->priv.pending_writes; +# ifdef EVAS_FRAME_QUEUING + LKU(buf->priv.lock); +# endif + buf->priv.pending_writes = NULL; + xcb_flush(buf->priv.x11.xcb.conn); +#else + /* FIXME: Async Push Disabled */ + + _xcbob_sync(buf->priv.x11.xcb.conn); + while (buf->priv.pending_writes) + { + im = eina_list_data_get(buf->priv.pending_writes); + buf->priv.pending_writes = + eina_list_remove_list(buf->priv.pending_writes, + buf->priv.pending_writes); + obr = im->extended_info; + evas_cache_image_drop(&im->cache_entry); + if (obr->xcbob) _unfind_xcbob(obr->xcbob, EINA_FALSE); + if (obr->mask) _unfind_xcbob(obr->mask, EINA_FALSE); + free(obr); + evas_cache_image_drop(&im->cache_entry); + } +#endif + } + evas_common_cpu_end_opt(); +} + +void +evas_software_xcb_outbuf_idle_flush(Outbuf *buf) +{ + if (buf->priv.onebuf) + { + RGBA_Image *im; + Outbuf_Region *obr; + + im = buf->priv.onebuf; + buf->priv.onebuf = NULL; + obr = im->extended_info; + if (obr->xcbob) + evas_software_xcb_output_buffer_free(obr->xcbob, EINA_FALSE); + if (obr->mask) + evas_software_xcb_output_buffer_free(obr->mask, EINA_FALSE); + free(obr); + evas_cache_image_drop(&im->cache_entry); + } + else + { +#ifdef EVAS_FRAME_QUEUING + LKL(buf->priv.lock); +#endif + if (buf->priv.prev_pending_writes) + _xcbob_sync(buf->priv.x11.xcb.conn); + while (buf->priv.prev_pending_writes) + { + RGBA_Image *im; + Outbuf_Region *obr; + + im = buf->priv.prev_pending_writes->data; + buf->priv.prev_pending_writes = + eina_list_remove_list(buf->priv.prev_pending_writes, + buf->priv.prev_pending_writes); + obr = im->extended_info; + evas_cache_image_drop(&im->cache_entry); + if (obr->xcbob) _unfind_xcbob(obr->xcbob, EINA_FALSE); + if (obr->mask) _unfind_xcbob(obr->mask, EINA_FALSE); + free(obr); + } +#ifdef EVAS_FRAME_QUEUING + LKU(buf->priv.lock); +#endif + _clear_xcbob(EINA_FALSE); + } +} + +void +evas_software_xcb_outbuf_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h) +{ + Gfx_Func_Convert func_conv = NULL; + Outbuf_Region *obr = NULL; + DATA32 *src_data = NULL; + unsigned char *data = NULL; + int bpl = 0, yy = 0; + int bw = 0, bh = 0; + + obr = update->extended_info; + if (!obr->xcbob) return; + + if ((buf->rot == 0) || (buf->rot == 180)) + { + bw = w; + bh = h; + } + else if ((buf->rot == 90) || (buf->rot == 270)) + { + bw = h; + bh = w; + } + if (buf->priv.pal) + { + func_conv = + evas_common_convert_func_get(0, bw, bh, buf->depth, buf->priv.mask.r, + buf->priv.mask.g, buf->priv.mask.b, + buf->priv.pal->colors, buf->rot); + } + else + { + func_conv = + evas_common_convert_func_get(0, bw, bh, buf->depth, buf->priv.mask.r, + buf->priv.mask.g, buf->priv.mask.b, + PAL_MODE_NONE, buf->rot); + } + if (!func_conv) return; + + if (!(data = evas_software_xcb_output_buffer_data(obr->xcbob, &bpl))) + return; + if (!(src_data = update->image.data)) return; + if (buf->rot == 0) + { + obr->x = x; + obr->y = y; + obr->w = w; + obr->h = h; + } + else if (buf->rot == 90) + { + obr->x = y; + obr->y = (buf->w - x - w); + obr->w = h; + obr->h = w; + } + else if (buf->rot == 180) + { + obr->x = (buf->w - x - w); + obr->y = (buf->h - y - h); + obr->w = w; + obr->h = h; + } + else if (buf->rot == 270) + { + obr->x = (buf->h - y - h); + obr->y = x; + obr->w = h; + obr->h = w; + } + if (buf->onebuf) + { + src_data += x + (y * update->cache_entry.w); + data += (bpl * obr->y) + (obr->x * (buf->depth / 8)); + } + if (data != (unsigned char *)src_data) + { + if (buf->priv.pal) + func_conv(src_data, data, update->cache_entry.w - w, + (bpl / (buf->depth / 8)) - obr->w, + obr->w, obr->h, x, y, buf->priv.pal->lookup); + else + func_conv(src_data, data, update->cache_entry.w - w, + (bpl / (buf->depth / 8)) - obr->w, + obr->w, obr->h, x, y, NULL); + } +#if 1 +#else + /* Async Push */ + if (!((buf->priv.onebuf) && (buf->priv.onebuf_regions))) + { + if (buf->priv.debug) + evas_software_xcb_outbuf_debug_show(buf, buf->priv.x11.xcb.win, + obr->x, obr->y, obr->w, obr->h); + if (obr->xcbob) + evas_software_xcb_output_buffer_paste(obr->xcbob, + buf->priv.x11.xcb.win, + buf->priv.x11.xcb.gc, + obr->x, obr->y, 0); + } +#endif + if (obr->mask) + { + if (buf->rot == 0) + { + for (yy = 0; yy < obr->h; yy++) + evas_software_xcb_write_mask_line(buf, obr->mask, + src_data + (yy * obr->w), + obr->w, yy); + } + else if (buf->rot == 90) + { + for (yy = 0; yy < obr->h; yy++) + evas_software_xcb_write_mask_line_vert(buf, obr->mask, + src_data + yy, + h, (obr->h - yy - 1), w); + } + else if (buf->rot == 180) + { + for (yy = 0; yy < obr->h; yy++) + evas_software_xcb_write_mask_line_rev(buf, obr->mask, + src_data + (yy * obr->w), + obr->w, (obr->h - yy - 1)); + } + else if (buf->rot == 270) + { + for (yy = 0; yy < obr->h; yy++) + evas_software_xcb_write_mask_line_vert_rev(buf, obr->mask, + src_data + yy, + h, yy, w); + } +#if 1 +#else + /* Async Push */ + if (!((buf->priv.onebuf) && (buf->priv.onebuf_regions))) + evas_software_xcb_output_buffer_paste(obr->mask, + buf->priv.x11.xcb.mask, + buf->priv.x11.xcb.gcm, + obr->x, obr->y, 0); +#endif + } +#if 1 +#else + xcb_flush(buf->priv.x11.xcb.conn); +#endif +} + +void +evas_software_xcb_outbuf_reconfigure(Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth) +{ + if ((w == buf->w) && (h == buf->h) && (rot == buf->rot) && + (depth == buf->depth)) return; + buf->w = w; + buf->h = h; + buf->rot = rot; + evas_software_xcb_outbuf_idle_flush(buf); +} + +int +evas_software_xcb_outbuf_width_get(Outbuf *buf) +{ + return buf->w; +} + +int +evas_software_xcb_outbuf_height_get(Outbuf *buf) +{ + return buf->h; +} + +Outbuf_Depth +evas_software_xcb_outbuf_depth_get(Outbuf *buf) +{ + return buf->depth; +} + +void +evas_software_xcb_outbuf_drawable_set(Outbuf *buf, xcb_drawable_t drawable) +{ + if (buf->priv.x11.xcb.win == drawable) return; + if (buf->priv.x11.xcb.gc) + { + xcb_free_gc(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.gc); + buf->priv.x11.xcb.gc = 0; + } + buf->priv.x11.xcb.win = drawable; + buf->priv.x11.xcb.gc = xcb_generate_id(buf->priv.x11.xcb.conn); + xcb_create_gc(buf->priv.x11.xcb.conn, + buf->priv.x11.xcb.gc, buf->priv.x11.xcb.win, 0, NULL); +} + +void +evas_software_xcb_outbuf_mask_set(Outbuf *buf, xcb_drawable_t mask) +{ + if (buf->priv.x11.xcb.mask == mask) return; + if (buf->priv.x11.xcb.gcm) + { + xcb_free_gc(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.gcm); + buf->priv.x11.xcb.gcm = 0; + } + buf->priv.x11.xcb.mask = mask; + if (buf->priv.x11.xcb.mask) + { + buf->priv.x11.xcb.gcm = xcb_generate_id(buf->priv.x11.xcb.conn); + xcb_create_gc(buf->priv.x11.xcb.conn, + buf->priv.x11.xcb.gcm, buf->priv.x11.xcb.mask, 0, NULL); + } +} + +int +evas_software_xcb_outbuf_rotation_get(Outbuf *buf) +{ + return buf->rot; +} + +void +evas_software_xcb_outbuf_rotation_set(Outbuf *buf, int rotation) +{ + buf->rot = rotation; +} + +Eina_Bool +evas_software_xcb_outbuf_alpha_get(Outbuf *buf) +{ + return buf->priv.x11.xcb.mask; +} + +void +evas_software_xcb_outbuf_debug_set(Outbuf *buf, Eina_Bool debug) +{ + buf->priv.debug = debug; +} + +void +evas_software_xcb_outbuf_debug_show(Outbuf *buf, xcb_drawable_t drawable, int x, int y, int w, int h) +{ + int i; + xcb_screen_t *screen = NULL; + xcb_get_geometry_reply_t *geom; + xcb_drawable_t root; + xcb_screen_iterator_t si; + + geom = + xcb_get_geometry_reply(buf->priv.x11.xcb.conn, + xcb_get_geometry_unchecked(buf->priv.x11.xcb.conn, + drawable), 0); + root = geom->root; + free(geom); + geom = + xcb_get_geometry_reply(buf->priv.x11.xcb.conn, + xcb_get_geometry_unchecked(buf->priv.x11.xcb.conn, + root), 0); + + si = xcb_setup_roots_iterator((xcb_setup_t *)xcb_get_setup(buf->priv.x11.xcb.conn)); + for (; si.rem; xcb_screen_next(&si)) + { + if (si.data->root == geom->root) + { + screen = si.data; + break; + } + } + free(geom); + + for (i = 0; i < 20; i++) + { + xcb_rectangle_t rect = { x, y, w, h}; + uint32_t mask; + uint32_t value[2]; + + mask = XCB_GC_FOREGROUND | XCB_GC_GRAPHICS_EXPOSURES; + value[0] = screen->black_pixel; + value[1] = XCB_EXPOSURES_NOT_ALLOWED; + xcb_change_gc(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.gc, + mask, value); + xcb_poly_fill_rectangle(buf->priv.x11.xcb.conn, drawable, + buf->priv.x11.xcb.gc, 1, &rect); + _xcbob_sync(buf->priv.x11.xcb.conn); + _xcbob_sync(buf->priv.x11.xcb.conn); + + mask = XCB_GC_FOREGROUND | XCB_GC_GRAPHICS_EXPOSURES; + value[0] = screen->white_pixel; + value[1] = XCB_EXPOSURES_NOT_ALLOWED; + xcb_change_gc(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.gc, + mask, value); + xcb_poly_fill_rectangle(buf->priv.x11.xcb.conn, drawable, + buf->priv.x11.xcb.gc, 1, &rect); + _xcbob_sync(buf->priv.x11.xcb.conn); + _xcbob_sync(buf->priv.x11.xcb.conn); + } +} + +#ifdef EVAS_FRAME_QUEUING +void +evas_software_xcb_outbuf_priv_set(Outbuf *buf, void *cur, void *prev __UNUSED__) +{ + buf->priv.pending_writes = (Eina_List *)cur; +} +#endif + +/* local functions */ +static Xcb_Output_Buffer * +_find_xcbob(xcb_connection_t *conn, xcb_visualtype_t *vis, int depth, int w, int h, Eina_Bool shm, void *data) +{ + Eina_List *l = NULL, *xl = NULL; + Xcb_Output_Buffer *xcbob = NULL, *xcbob2 = NULL; + int lbytes = 0, bpp = 0, sz = 0; + int fitness = 0x7fffffff; + + if (!shm) + return evas_software_xcb_output_buffer_new(conn, vis, depth, w, h, + shm, data); + + lbytes = (((w + 31) / 32) * 4); + if (depth > 1) + { + bpp = (depth / 8); + if (bpp == 3) bpp = 4; + lbytes = ((((w * bpp) + 3) / 4) * 4); + } + + sz = (lbytes * h); + SHMPOOL_LOCK(); + EINA_LIST_FOREACH(_shmpool, l, xcbob2) + { + int szdif = 0; + + if ((xcbob2->xim->depth != depth) || (xcbob2->visual != vis) || + (xcbob2->connection != conn)) continue; + szdif = (xcbob2->psize - sz); + if (szdif < 0) continue; + if (szdif == 0) + { + xcbob = xcbob2; + xl = l; + goto have_xcbob; + } + if (szdif < fitness) + { + xcbob = xcbob2; + xl = l; + fitness = szdif; + } + } + if ((fitness > (100 * 100)) || (!xcbob)) + { + SHMPOOL_UNLOCK(); + return evas_software_xcb_output_buffer_new(conn, vis, depth, + w, h, shm, data); + } + +have_xcbob: + _shmpool = eina_list_remove_list(_shmpool, xl); + xcbob->w = w; + xcbob->h = h; + xcbob->bpl = lbytes; + xcbob->xim->width = xcbob->w; + xcbob->xim->height = xcbob->h; + xcbob->xim->stride = xcbob->bpl; + _shmsize -= (xcbob->psize * (xcbob->xim->depth / 8)); + SHMPOOL_UNLOCK(); + return xcbob; +} + +static void +_unfind_xcbob(Xcb_Output_Buffer *xcbob, Eina_Bool sync) +{ + if (xcbob->shm_info) + { + SHMPOOL_LOCK(); + _shmpool = eina_list_prepend(_shmpool, xcbob); + _shmsize += xcbob->psize * xcbob->xim->depth / 8; + while ((_shmsize > _shmlimit) || + (eina_list_count(_shmpool) > _shmcountlimit)) + { + Eina_List *xl = NULL; + + if (!(xl = eina_list_last(_shmpool))) + { + _shmsize = 0; + break; + } + xcbob = xl->data; + _shmpool = eina_list_remove_list(_shmpool, xl); + _shmsize -= xcbob->psize * xcbob->xim->depth / 8; + evas_software_xcb_output_buffer_free(xcbob, sync); + } + SHMPOOL_UNLOCK(); + } + else + evas_software_xcb_output_buffer_free(xcbob, sync); +} + +static void +_clear_xcbob(Eina_Bool sync) +{ + SHMPOOL_LOCK(); + while (_shmpool) + { + Xcb_Output_Buffer *xcbob; + + xcbob = _shmpool->data; + _shmpool = eina_list_remove_list(_shmpool, _shmpool); + evas_software_xcb_output_buffer_free(xcbob, sync); + } + _shmsize = 0; + SHMPOOL_UNLOCK(); +} + +static void +_xcbob_sync(xcb_connection_t *conn) +{ + free(xcb_get_input_focus_reply(conn, + xcb_get_input_focus_unchecked(conn), NULL)); +} diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xcb_outbuf.h b/libraries/evas/src/modules/engines/software_x11/evas_xcb_outbuf.h new file mode 100644 index 0000000..b711848 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xcb_outbuf.h @@ -0,0 +1,30 @@ +#ifndef EVAS_XCB_OUTBUF_H +# define EVAS_XCB_OUTBUF_H + +# include "evas_engine.h" + +void evas_software_xcb_outbuf_init(void); +void evas_software_xcb_outbuf_free(Outbuf *buf); +Outbuf *evas_software_xcb_outbuf_setup(int w, int h, int rot, Outbuf_Depth depth, xcb_connection_t *conn, xcb_screen_t *screen, xcb_drawable_t draw, xcb_visualtype_t *vis, xcb_colormap_t cmap, int xdepth, Eina_Bool grayscale, int max_colors, xcb_drawable_t mask, Eina_Bool shape_dither, Eina_Bool alpha); +RGBA_Image *evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); +void evas_software_xcb_outbuf_free_region_for_update(Outbuf *buf, RGBA_Image *update); +void evas_software_xcb_outbuf_flush(Outbuf *buf); +void evas_software_xcb_outbuf_idle_flush(Outbuf *buf); +void evas_software_xcb_outbuf_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h); +void evas_software_xcb_outbuf_reconfigure(Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth); +int evas_software_xcb_outbuf_width_get(Outbuf *buf); +int evas_software_xcb_outbuf_height_get(Outbuf *buf); +Outbuf_Depth evas_software_xcb_outbuf_depth_get(Outbuf *buf); +void evas_software_xcb_outbuf_drawable_set(Outbuf *buf, xcb_drawable_t drawable); +void evas_software_xcb_outbuf_mask_set(Outbuf *buf, xcb_drawable_t mask); +int evas_software_xcb_outbuf_rotation_get(Outbuf *buf); +void evas_software_xcb_outbuf_rotation_set(Outbuf *buf, int rotation); +Eina_Bool evas_software_xcb_outbuf_alpha_get(Outbuf *buf); +void evas_software_xcb_outbuf_debug_set(Outbuf *buf, Eina_Bool debug); +void evas_software_xcb_outbuf_debug_show(Outbuf *buf, xcb_drawable_t drawable, int x, int y, int w, int h); + +# ifdef EVAS_FRAME_QUEUING +void evas_software_xcb_outbuf_priv_set(Outbuf *buf, void *cur, void *prev); +# endif + +#endif diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xcb_xdefaults.c b/libraries/evas/src/modules/engines/software_x11/evas_xcb_xdefaults.c new file mode 100644 index 0000000..3a0bda5 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xcb_xdefaults.c @@ -0,0 +1,108 @@ +#include "evas_common.h" +#include "evas_xcb_xdefaults.h" +#include + +/* local function prototypes */ +static Eina_Bool _evas_xcb_xdefaults_glob_match(const char *str, const char *glob); + +/* local variables */ +static Eina_File *_evas_xcb_xdefaults_file = NULL; +static char *_evas_xcb_xdefaults_data = NULL; + +void +_evas_xcb_xdefaults_init(void) +{ + char buff[PATH_MAX]; + + snprintf(buff, sizeof(buff), "%s/.Xdefaults", getenv("HOME")); + if ((_evas_xcb_xdefaults_file = eina_file_open(buff, EINA_FALSE))) + { + eina_mmap_safety_enabled_set(EINA_TRUE); + + _evas_xcb_xdefaults_data = + eina_file_map_all(_evas_xcb_xdefaults_file, EINA_FILE_SEQUENTIAL); + } +} + +void +_evas_xcb_xdefaults_shutdown(void) +{ + if (!_evas_xcb_xdefaults_file) return; + if (_evas_xcb_xdefaults_data) + eina_file_map_free(_evas_xcb_xdefaults_file, _evas_xcb_xdefaults_data); + if (_evas_xcb_xdefaults_file) eina_file_close(_evas_xcb_xdefaults_file); +} + +char * +_evas_xcb_xdefaults_string_get(const char *prog, const char *param) +{ + char buff[1024], ret[1024]; + char *str = NULL; + char **ea = NULL; + unsigned int count = 0, i = 0; + + if ((!_evas_xcb_xdefaults_data) || (!_evas_xcb_xdefaults_file)) + return NULL; + + snprintf(buff, sizeof(buff), "*%s*.*%s*", prog, param); + + str = _evas_xcb_xdefaults_data; + ea = eina_str_split_full(str, "\n", -1, &count); + for (i = 0; i < count; i++) + { + if (_evas_xcb_xdefaults_glob_match(ea[i], buff)) + sscanf(ea[i], "%*[^:]:%*[ ]%s", ret); + } + if ((ea) && (ea[0])) + { + free(ea[0]); + free(ea); + } + + return strdup(ret); +} + +int +_evas_xcb_xdefaults_int_get(const char *prog, const char *param) +{ + char buff[1024]; + char *str = NULL; + char **ea = NULL; + unsigned int count = 0, i = 0; + int ret = -1; + + if ((!_evas_xcb_xdefaults_data) || (!_evas_xcb_xdefaults_file)) + return 0; + + snprintf(buff, sizeof(buff), "*%s*.*%s*", prog, param); + + str = _evas_xcb_xdefaults_data; + ea = eina_str_split_full(str, "\n", -1, &count); + for (i = 0; i < count; i++) + { + if (_evas_xcb_xdefaults_glob_match(ea[i], buff)) + sscanf(ea[i], "%*[^:]:%*[ ]%d", &ret); + } + if ((ea) && (ea[0])) + { + free(ea[0]); + free(ea); + } + + return ret; +} + +/* local functions */ +static Eina_Bool +_evas_xcb_xdefaults_glob_match(const char *str, const char *glob) +{ + if ((!str) || (!glob)) return EINA_FALSE; + if (glob[0] == 0) + { + if (str[0] == 0) return EINA_TRUE; + return EINA_FALSE; + } + if (!strcmp(glob, "*")) return EINA_TRUE; + if (!fnmatch(glob, str, 0)) return EINA_TRUE; + return EINA_FALSE; +} diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xcb_xdefaults.h b/libraries/evas/src/modules/engines/software_x11/evas_xcb_xdefaults.h new file mode 100644 index 0000000..c5f4ab8 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xcb_xdefaults.h @@ -0,0 +1,11 @@ +#ifndef EVAS_XCB_XDEFAULTS_H +# define EVAS_XCB_XDEFAULTS_H + +# include "evas_engine.h" + +void _evas_xcb_xdefaults_init(void); +void _evas_xcb_xdefaults_shutdown(void); +char *_evas_xcb_xdefaults_string_get(const char *prog, const char *param); +int _evas_xcb_xdefaults_int_get(const char *prog, const char *param); + +#endif diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xlib_buffer.c b/libraries/evas/src/modules/engines/software_x11/evas_xlib_buffer.c new file mode 100644 index 0000000..594041c --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xlib_buffer.c @@ -0,0 +1,428 @@ +#include "evas_common.h" + +#include "evas_xlib_buffer.h" + +static int _x_err = 0; + +void +evas_software_xlib_x_write_mask_line(Outbuf *buf, X_Output_Buffer *xob, DATA32 *src, int w, int y) +{ + int x; + DATA32 *src_ptr; + DATA8 *dst_ptr; + int bpl = 0; + + src_ptr = src; + dst_ptr = evas_software_xlib_x_output_buffer_data(xob, &bpl); + dst_ptr = dst_ptr + (bpl * y); + w -= 7; + if (buf->priv.x11.xlib.bit_swap) + { + for (x = 0; x < w; x += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[0])) >> 7) << 7) | + ((A_VAL(&(src_ptr[1])) >> 7) << 6) | + ((A_VAL(&(src_ptr[2])) >> 7) << 5) | + ((A_VAL(&(src_ptr[3])) >> 7) << 4) | + ((A_VAL(&(src_ptr[4])) >> 7) << 3) | + ((A_VAL(&(src_ptr[5])) >> 7) << 2) | + ((A_VAL(&(src_ptr[6])) >> 7) << 1) | + ((A_VAL(&(src_ptr[7])) >> 7) << 0); + src_ptr += 8; + dst_ptr++; + } + } + else + { + for (x = 0; x < w; x += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[0])) >> 7) << 0) | + ((A_VAL(&(src_ptr[1])) >> 7) << 1) | + ((A_VAL(&(src_ptr[2])) >> 7) << 2) | + ((A_VAL(&(src_ptr[3])) >> 7) << 3) | + ((A_VAL(&(src_ptr[4])) >> 7) << 4) | + ((A_VAL(&(src_ptr[5])) >> 7) << 5) | + ((A_VAL(&(src_ptr[6])) >> 7) << 6) | + ((A_VAL(&(src_ptr[7])) >> 7) << 7); + src_ptr += 8; + dst_ptr++; + } + } + w += 7; + for (; x < w; x ++) + { + XPutPixel(xob->xim, x, y, A_VAL(src_ptr) >> 7); + src_ptr++; + } +} + +void +evas_software_xlib_x_write_mask_line_rev(Outbuf *buf, X_Output_Buffer *xob, DATA32 *src, int w, int y) +{ + int x; + DATA32 *src_ptr; + DATA8 *dst_ptr; + int bpl = 0; + + src_ptr = src + w - 1; + dst_ptr = evas_software_xlib_x_output_buffer_data(xob, &bpl); + dst_ptr = dst_ptr + (bpl * y); + w -= 7; + if (buf->priv.x11.xlib.bit_swap) + { + for (x = 0; x < w; x += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[ 0])) >> 7) << 7) | + ((A_VAL(&(src_ptr[-1])) >> 7) << 6) | + ((A_VAL(&(src_ptr[-2])) >> 7) << 5) | + ((A_VAL(&(src_ptr[-3])) >> 7) << 4) | + ((A_VAL(&(src_ptr[-4])) >> 7) << 3) | + ((A_VAL(&(src_ptr[-5])) >> 7) << 2) | + ((A_VAL(&(src_ptr[-6])) >> 7) << 1) | + ((A_VAL(&(src_ptr[-7])) >> 7) << 0); + src_ptr -= 8; + dst_ptr++; + } + } + else + { + for (x = 0; x < w; x += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[ 0])) >> 7) << 0) | + ((A_VAL(&(src_ptr[-1])) >> 7) << 1) | + ((A_VAL(&(src_ptr[-2])) >> 7) << 2) | + ((A_VAL(&(src_ptr[-3])) >> 7) << 3) | + ((A_VAL(&(src_ptr[-4])) >> 7) << 4) | + ((A_VAL(&(src_ptr[-5])) >> 7) << 5) | + ((A_VAL(&(src_ptr[-6])) >> 7) << 6) | + ((A_VAL(&(src_ptr[-7])) >> 7) << 7); + src_ptr -= 8; + dst_ptr++; + } + } + w += 7; + for (; x < w; x ++) + { + XPutPixel(xob->xim, x, y, A_VAL(src_ptr) >> 7); + src_ptr--; + } +} + +void +evas_software_xlib_x_write_mask_line_vert(Outbuf *buf, X_Output_Buffer *xob, + DATA32 *src, + int h, int ym, int w) +{ + int y; + DATA32 *src_ptr; + DATA8 *dst_ptr; + int bpl = 0; + + src_ptr = src; + dst_ptr = evas_software_xlib_x_output_buffer_data(xob, &bpl); + dst_ptr = dst_ptr + (bpl * ym); + h -= 7; + if (buf->priv.x11.xlib.bit_swap) + { + for (y = 0; y < h; y += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[0 * w])) >> 7) << 7) | + ((A_VAL(&(src_ptr[1 * w])) >> 7) << 6) | + ((A_VAL(&(src_ptr[2 * w])) >> 7) << 5) | + ((A_VAL(&(src_ptr[3 * w])) >> 7) << 4) | + ((A_VAL(&(src_ptr[4 * w])) >> 7) << 3) | + ((A_VAL(&(src_ptr[5 * w])) >> 7) << 2) | + ((A_VAL(&(src_ptr[6 * w])) >> 7) << 1) | + ((A_VAL(&(src_ptr[7 * w])) >> 7) << 0); + src_ptr += 8 * w; + dst_ptr++; + } + } + else + { + for (y = 0; y < h; y += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[0 * w])) >> 7) << 0) | + ((A_VAL(&(src_ptr[1 * w])) >> 7) << 1) | + ((A_VAL(&(src_ptr[2 * w])) >> 7) << 2) | + ((A_VAL(&(src_ptr[3 * w])) >> 7) << 3) | + ((A_VAL(&(src_ptr[4 * w])) >> 7) << 4) | + ((A_VAL(&(src_ptr[5 * w])) >> 7) << 5) | + ((A_VAL(&(src_ptr[6 * w])) >> 7) << 6) | + ((A_VAL(&(src_ptr[7 * w])) >> 7) << 7); + src_ptr += 8 * w; + dst_ptr++; + } + } + h += 7; + for (; y < h; y ++) + { + XPutPixel(xob->xim, y, ym, A_VAL(src_ptr) >> 7); + src_ptr += w; + } +} + +void +evas_software_xlib_x_write_mask_line_vert_rev(Outbuf *buf, X_Output_Buffer *xob, + DATA32 *src, + int h, int ym, int w) +{ + int y; + DATA32 *src_ptr; + DATA8 *dst_ptr; + int bpl = 0; + + src_ptr = src + ((h - 1) * w); + dst_ptr = evas_software_xlib_x_output_buffer_data(xob, &bpl); + dst_ptr = dst_ptr + (bpl * ym); + h -= 7; + if (buf->priv.x11.xlib.bit_swap) + { + for (y = 0; y < h; y += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[ 0 * w])) >> 7) << 7) | + ((A_VAL(&(src_ptr[-1 * w])) >> 7) << 6) | + ((A_VAL(&(src_ptr[-2 * w])) >> 7) << 5) | + ((A_VAL(&(src_ptr[-3 * w])) >> 7) << 4) | + ((A_VAL(&(src_ptr[-4 * w])) >> 7) << 3) | + ((A_VAL(&(src_ptr[-5 * w])) >> 7) << 2) | + ((A_VAL(&(src_ptr[-6 * w])) >> 7) << 1) | + ((A_VAL(&(src_ptr[-7 * w])) >> 7) << 0); + src_ptr -= 8 * w; + dst_ptr++; + } + } + else + { + for (y = 0; y < h; y += 8) + { + *dst_ptr = + ((A_VAL(&(src_ptr[ 0 * w])) >> 7) << 0) | + ((A_VAL(&(src_ptr[-1 * w])) >> 7) << 1) | + ((A_VAL(&(src_ptr[-2 * w])) >> 7) << 2) | + ((A_VAL(&(src_ptr[-3 * w])) >> 7) << 3) | + ((A_VAL(&(src_ptr[-4 * w])) >> 7) << 4) | + ((A_VAL(&(src_ptr[-5 * w])) >> 7) << 5) | + ((A_VAL(&(src_ptr[-6 * w])) >> 7) << 6) | + ((A_VAL(&(src_ptr[-7 * w])) >> 7) << 7); + src_ptr -= 8 * w; + dst_ptr++; + } + } + h += 7; + for (; y < h; y ++) + { + XPutPixel(xob->xim, y, ym, A_VAL(src_ptr) >> 7); + src_ptr -= w; + } +} + +int +evas_software_xlib_x_can_do_shm(Display *d) +{ + static Display *cached_d = NULL; + static int cached_result = 0; + + if (d == cached_d) return cached_result; + cached_d = d; + if (XShmQueryExtension(d)) + { + X_Output_Buffer *xob; + + xob = evas_software_xlib_x_output_buffer_new + (d, DefaultVisual(d, DefaultScreen(d)), + DefaultDepth(d, DefaultScreen(d)), 16, 16, 2, NULL); + if (!xob) + { + cached_result = 0; + return 0; + } + evas_software_xlib_x_output_buffer_free(xob, 1); + cached_result = 1; + return 1; + } + cached_result = 0; + return 0; +} + +static void +x_output_tmp_x_err(Display *d __UNUSED__, XErrorEvent *ev __UNUSED__) +{ + _x_err = 1; + return; +} + +//static int creates = 0; + +X_Output_Buffer * +evas_software_xlib_x_output_buffer_new(Display *d, Visual *v, int depth, int w, int h, int try_shm, void *data) +{ + X_Output_Buffer *xob; + + xob = calloc(1, sizeof(X_Output_Buffer)); + if (!xob) return NULL; + + xob->display = d; + xob->visual = v; + xob->xim = NULL; + xob->shm_info = NULL; + xob->w = w; + xob->h = h; + + if (try_shm > 0) + { + xob->shm_info = malloc(sizeof(XShmSegmentInfo)); + if (xob->shm_info) + { + xob->xim = XShmCreateImage(d, v, depth, ZPixmap, NULL, + xob->shm_info, w, h); + if (xob->xim) + { + xob->shm_info->shmid = shmget(IPC_PRIVATE, + xob->xim->bytes_per_line * + xob->xim->height, + IPC_CREAT | 0777); + if (xob->shm_info->shmid >= 0) + { + xob->shm_info->readOnly = False; + xob->shm_info->shmaddr = xob->xim->data = + shmat(xob->shm_info->shmid, 0, 0); + if (xob->shm_info->shmaddr != ((void *)-1)) + { + XErrorHandler ph; + + if (try_shm == 2) // only needed during testing + { + XSync(d, False); + _x_err = 0; + ph = XSetErrorHandler((XErrorHandler) + x_output_tmp_x_err); + } +#if defined(EVAS_FRAME_QUEUING) && defined(LIBXEXT_VERSION_LOW) + /* workaround for libXext of lower then 1.1.1 */ + if (evas_common_frameq_enabled()) + XLockDisplay(d); +#endif + XShmAttach(d, xob->shm_info); +#if defined(EVAS_FRAME_QUEUING) && defined(LIBXEXT_VERSION_LOW) + /* workaround for libXext of lower then 1.1.1 */ + if (evas_common_frameq_enabled()) + XUnlockDisplay(d); +#endif + + if (try_shm == 2) // only needed during testing + { + XSync(d, False); + XSetErrorHandler((XErrorHandler)ph); + } + if (!_x_err) + { + xob->bpl = xob->xim->bytes_per_line; + xob->psize = xob->bpl * xob->h; + return xob; + } + } + shmdt(xob->shm_info->shmaddr); + shmctl(xob->shm_info->shmid, IPC_RMID, 0); + } + if (xob->xim) XDestroyImage(xob->xim); + xob->xim = NULL; + } + if (xob->shm_info) free(xob->shm_info); + xob->shm_info = NULL; + } + } + + if (try_shm > 1) return NULL; + + xob->xim = XCreateImage(d, v, depth, ZPixmap, 0, data, w, h, 32, 0); + if (!xob->xim) + { + free(xob); + return NULL; + } + + xob->data = data; + + if (!xob->xim->data) + { + xob->xim->data = malloc(xob->xim->bytes_per_line * xob->xim->height); + if (!xob->xim->data) + { + XDestroyImage(xob->xim); + free(xob); + return NULL; + } + } + xob->bpl = xob->xim->bytes_per_line; + xob->psize = xob->bpl * xob->h; + return xob; +} + +void +evas_software_xlib_x_output_buffer_free(X_Output_Buffer *xob, int psync) +{ + if (xob->shm_info) + { + if (psync) XSync(xob->display, False); + XShmDetach(xob->display, xob->shm_info); + XDestroyImage(xob->xim); + shmdt(xob->shm_info->shmaddr); + shmctl(xob->shm_info->shmid, IPC_RMID, 0); + free(xob->shm_info); + } + else + { + if (xob->data) xob->xim->data = NULL; + XDestroyImage(xob->xim); + } + free(xob); +} + +void +evas_software_xlib_x_output_buffer_paste(X_Output_Buffer *xob, Drawable d, GC gc, int x, int y, int psync) +{ + if (xob->shm_info) + { + XShmPutImage(xob->display, d, gc, xob->xim, 0, 0, x, y, + xob->w, xob->h, False); + if (psync) XSync(xob->display, False); + } + else + { + XPutImage(xob->display, d, gc, xob->xim, 0, 0, x, y, + xob->w, xob->h); + } +} + +DATA8 * +evas_software_xlib_x_output_buffer_data(X_Output_Buffer *xob, int *bytes_per_line_ret) +{ + if (bytes_per_line_ret) *bytes_per_line_ret = xob->xim->bytes_per_line; + return (DATA8 *)xob->xim->data; +} + +int +evas_software_xlib_x_output_buffer_depth(X_Output_Buffer *xob) +{ + return xob->xim->bits_per_pixel; +} + +int +evas_software_xlib_x_output_buffer_byte_order(X_Output_Buffer *xob) +{ + return xob->xim->byte_order; +} + +int +evas_software_xlib_x_output_buffer_bit_order(X_Output_Buffer *xob) +{ + return xob->xim->bitmap_bit_order; +} diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xlib_buffer.h b/libraries/evas/src/modules/engines/software_x11/evas_xlib_buffer.h new file mode 100644 index 0000000..01c4db0 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xlib_buffer.h @@ -0,0 +1,45 @@ +#ifndef EVAS_XLIB_BUFFER_H +#define EVAS_XLIB_BUFFER_H + + +#include "evas_engine.h" + + +typedef struct _X_Output_Buffer X_Output_Buffer; + +struct _X_Output_Buffer +{ + Display *display; + XImage *xim; + XShmSegmentInfo *shm_info; + Visual *visual; + void *data; + int w; + int h; + int bpl; + int psize; +}; + +void evas_software_xlib_x_write_mask_line (Outbuf *buf, X_Output_Buffer *xob, DATA32 *src, int w, int y); +void evas_software_xlib_x_write_mask_line_rev (Outbuf *buf, X_Output_Buffer *xob, DATA32 *src, int w, int y); +void evas_software_xlib_x_write_mask_line_vert (Outbuf *buf, X_Output_Buffer *xob, DATA32 *src, int h, int ym, int w); +void evas_software_xlib_x_write_mask_line_vert_rev (Outbuf *buf, X_Output_Buffer *xob, DATA32 *src, int h, int ym, int w); + +int evas_software_xlib_x_can_do_shm (Display *d); + +X_Output_Buffer *evas_software_xlib_x_output_buffer_new (Display *d, Visual *v, int depth, int w, int h, int try_shm, void *data); + +void evas_software_xlib_x_output_buffer_free (X_Output_Buffer *xob, int sync); + +void evas_software_xlib_x_output_buffer_paste (X_Output_Buffer *xob, Drawable d, GC gc, int x, int y, int sync); + +DATA8 *evas_software_xlib_x_output_buffer_data (X_Output_Buffer *xob, int *bytes_per_line_ret); + +int evas_software_xlib_x_output_buffer_depth (X_Output_Buffer *xob); + +int evas_software_xlib_x_output_buffer_byte_order (X_Output_Buffer *xob); + +int evas_software_xlib_x_output_buffer_bit_order (X_Output_Buffer *xob); + + +#endif diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xlib_color.c b/libraries/evas/src/modules/engines/software_x11/evas_xlib_color.c new file mode 100644 index 0000000..1df0406 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xlib_color.c @@ -0,0 +1,368 @@ +#include "evas_common.h" + +#include "evas_engine.h" + +#include +#include + +typedef struct _Convert_Pal_Priv Convert_Pal_Priv; + +struct _Convert_Pal_Priv +{ + Display *disp; + Colormap cmap; + Visual *vis; +}; + +typedef DATA8 * (*X_Func_Alloc_Colors) (Display *d, Colormap cmap, Visual *v); + +static X_Func_Alloc_Colors x_color_alloc[PAL_MODE_LAST + 1]; +static int x_color_count[PAL_MODE_LAST + 1]; +static Eina_List *palettes = NULL; + +static DATA8 * x_color_alloc_rgb(int nr, int ng, int nb, Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_gray(int ng, Display *d, Colormap cmap, Visual *v); + +static DATA8 * x_color_alloc_rgb_332(Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_rgb_666(Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_rgb_232(Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_rgb_222(Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_rgb_221(Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_rgb_121(Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_rgb_111(Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_gray_256(Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_gray_64(Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_gray_16(Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_gray_4(Display *d, Colormap cmap, Visual *v); +static DATA8 * x_color_alloc_mono(Display *d, Colormap cmap, Visual *v); + +static DATA8 * +x_color_alloc_rgb(int nr, int ng, int nb, Display *d, Colormap cmap, Visual *v) +{ + int r, g, b, i; + DATA8 *color_lut; + int sig_mask = 0, delt = 0; + + for (i = 0; i < v->bits_per_rgb; i++) sig_mask |= (0x1 << i); + sig_mask <<= (16 - v->bits_per_rgb); + i = 0; + color_lut = malloc((nr) * (ng) * (nb)); + if (!color_lut) return NULL; + delt = 0x0101 * 3; + for (r = 0; r < (nr); r++) + { + for (g = 0; g < (ng); g++) + { + for (b = 0; b < (nb); b++) + { + XColor xcl; + XColor xcl_in; + int val; + Status ret; + int dr, dg, db; + + val = (int)((((double)r) / ((nr) - 1)) * 255); + val = (val << 8) | val; + xcl.red = (unsigned short)(val); + val = (int)((((double)g) / ((ng) - 1)) * 255); + val = (val << 8) | val; + xcl.green = (unsigned short)(val); + val = (int)((((double)b) / ((nb) - 1)) * 255); + val = (val << 8) | val; + xcl.blue = (unsigned short)(val); + xcl_in = xcl; + ret = XAllocColor(d, cmap, &xcl); + dr = (int)xcl_in.red - (int)xcl.red; + if (dr < 0) dr = -dr; + dg = (int)xcl_in.green - (int)xcl.green; + if (dg < 0) dg = -dg; + db = (int)xcl_in.blue - (int)xcl.blue; + if (db < 0) db = -db; +/* + printf("ASK [%i]: %04x %04x %04x = %04x %04x %04x | dif = %04x / %04x\n", + ret, + xcl_in.red, xcl_in.green, xcl_in.blue, + xcl.red, xcl.green, xcl.blue, + (dr + dg +db), delt); + */ + if ((ret == 0) || + ((dr + dg + db) > delt) +/* + || + ((xcl_in.red & sig_mask) != (xcl.red & sig_mask)) || + ((xcl_in.green & sig_mask) != (xcl.green & sig_mask)) || + ((xcl_in.blue & sig_mask) != (xcl.blue & sig_mask)) + */ + ) + { + unsigned long pixels[256]; + int j; + + if (i > 0) + { + for (j = 0; j < i; j++) + pixels[j] = (unsigned long) color_lut[j]; + XFreeColors(d, cmap, pixels, i, 0); + } + free(color_lut); + return NULL; + } + color_lut[i] = xcl.pixel; + i++; + } + } + } + return color_lut; +} + +static DATA8 * +x_color_alloc_gray(int ng, Display *d, Colormap cmap, Visual *v) +{ + int g, i; + DATA8 *color_lut; + int sig_mask = 0; + + for (i = 0; i < v->bits_per_rgb; i++) sig_mask |= (0x1 << i); + sig_mask <<= (16 - v->bits_per_rgb); + i = 0; + color_lut = malloc(ng); + if (!color_lut) return NULL; + for (g = 0; g < (ng); g++) + { + XColor xcl; + XColor xcl_in; + int val; + Status ret; + + val = (int)((((double)g) / ((ng) - 1)) * 255); + val = (val << 8) | val; + xcl.red = (unsigned short)(val); + xcl.green = (unsigned short)(val); + xcl.blue = (unsigned short)(val); + xcl_in = xcl; + ret = XAllocColor(d, cmap, &xcl); + if ((ret == 0) || + ((xcl_in.red & sig_mask) != (xcl.red & sig_mask)) || + ((xcl_in.green & sig_mask) != (xcl.green & sig_mask)) || + ((xcl_in.blue & sig_mask) != (xcl.blue & sig_mask))) + { + unsigned long pixels[256]; + int j; + + if (i > 0) + { + for (j = 0; j < i; j++) + pixels[j] = (unsigned long) color_lut[j]; + XFreeColors(d, cmap, pixels, i, 0); + } + free(color_lut); + return NULL; + } + color_lut[i] = xcl.pixel; + i++; + } + return color_lut; +} + +static DATA8 * +x_color_alloc_rgb_332(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_rgb(8, 8, 4, d, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_666(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_rgb(6, 6, 6, d, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_232(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_rgb(4, 8, 4, d, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_222(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_rgb(4, 4, 4, d, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_221(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_rgb(4, 4, 2, d, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_121(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_rgb(2, 4, 2, d, cmap, v); +} + +static DATA8 * +x_color_alloc_rgb_111(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_rgb(2, 2, 2, d, cmap, v); +} + +static DATA8 * +x_color_alloc_gray_256(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_gray(256, d, cmap, v); +} + +static DATA8 * +x_color_alloc_gray_64(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_gray(64, d, cmap, v); +} + +static DATA8 * +x_color_alloc_gray_16(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_gray(32, d, cmap, v); +} + +static DATA8 * +x_color_alloc_gray_4(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_gray(16, d, cmap, v); +} + +static DATA8 * +x_color_alloc_mono(Display *d, Colormap cmap, Visual *v) +{ + return x_color_alloc_gray(2, d, cmap, v); +} + +void +evas_software_xlib_x_color_init(void) +{ + static int initialised = 0; + + if (initialised) return; + x_color_alloc[PAL_MODE_NONE] = NULL; + x_color_count[PAL_MODE_NONE] = 0; + + x_color_alloc[PAL_MODE_MONO] = x_color_alloc_mono; + x_color_count[PAL_MODE_MONO] = 2; + + x_color_alloc[PAL_MODE_GRAY4] = x_color_alloc_gray_4; + x_color_count[PAL_MODE_GRAY4] = 4; + + x_color_alloc[PAL_MODE_GRAY16] = x_color_alloc_gray_16; + x_color_count[PAL_MODE_GRAY16] = 16; + + x_color_alloc[PAL_MODE_GRAY64] = x_color_alloc_gray_64; + x_color_count[PAL_MODE_GRAY64] = 64; + + x_color_alloc[PAL_MODE_GRAY256] = x_color_alloc_gray_256; + x_color_count[PAL_MODE_GRAY256] = 256; + + x_color_alloc[PAL_MODE_RGB111] = x_color_alloc_rgb_111; + x_color_count[PAL_MODE_RGB111] = 2 * 2 * 2; + + x_color_alloc[PAL_MODE_RGB121] = x_color_alloc_rgb_121; + x_color_count[PAL_MODE_RGB121] = 2 * 4 * 2; + + x_color_alloc[PAL_MODE_RGB221] = x_color_alloc_rgb_221; + x_color_count[PAL_MODE_RGB221] = 4 * 4 * 2; + + x_color_alloc[PAL_MODE_RGB222] = x_color_alloc_rgb_222; + x_color_count[PAL_MODE_RGB222] = 4 * 4 * 4; + + x_color_alloc[PAL_MODE_RGB232] = x_color_alloc_rgb_232; + x_color_count[PAL_MODE_RGB232] = 4 * 8 * 4; + + x_color_alloc[PAL_MODE_RGB666] = x_color_alloc_rgb_666; + x_color_count[PAL_MODE_RGB666] = 6 * 6 * 6; + + x_color_alloc[PAL_MODE_RGB332] = x_color_alloc_rgb_332; + x_color_count[PAL_MODE_RGB332] = 8 * 8 * 4; + + x_color_alloc[PAL_MODE_LAST] = NULL; + x_color_count[PAL_MODE_LAST] = 0; + initialised = 1; +} + +Convert_Pal * +evas_software_xlib_x_color_allocate(Display *disp, + Colormap cmap, + Visual *vis, + Convert_Pal_Mode colors) +{ + Convert_Pal_Priv *palpriv; + Convert_Pal *pal; + Convert_Pal_Mode c; + Eina_List *l; + +/* printf("ALLOC cmap=%i vis=%p\n", cmap, vis);*/ + EINA_LIST_FOREACH(palettes, l, pal) + { + palpriv = pal->data; + if ((disp == palpriv->disp) && + (vis == palpriv->vis) && + (cmap == palpriv->cmap)) + { + pal->references++; + return pal; + } + } + pal = calloc(1, sizeof(struct _Convert_Pal)); + if (!pal) return NULL; + for (c = colors; c > PAL_MODE_NONE; c--) + { + if (x_color_alloc[c]) + { +/* printf("TRY PAL %i\n", c);*/ + pal->lookup = (x_color_alloc[c])(disp, cmap, vis); + if (pal->lookup) break; + } + } + pal->references = 1; + pal->colors = c; + pal->count = x_color_count[c]; + palpriv = calloc(1, sizeof(Convert_Pal_Priv)); + pal->data = palpriv; + if (!palpriv) + { + if (pal->lookup) free(pal->lookup); + free(pal); + return NULL; + } + palpriv->disp = disp; + palpriv->vis = vis; + palpriv->cmap = cmap; + if (pal->colors == PAL_MODE_NONE) + { + if (pal->lookup) free(pal->lookup); + free(pal); + return NULL; + } + palettes = eina_list_append(palettes, pal); + return pal; +} + +void +evas_software_xlib_x_color_deallocate(Display *disp, + Colormap cmap, + Visual *vis __UNUSED__, + Convert_Pal *pal) +{ + unsigned long pixels[256]; + int j; + + pal->references--; + if (pal->references > 0) return; + if (pal->lookup) + { + for(j = 0; j < pal->count; j++) + pixels[j] = (unsigned long) pal->lookup[j]; + XFreeColors(disp, cmap, pixels, pal->count, 0); + free(pal->lookup); + } + free(pal->data); + palettes = eina_list_remove(palettes, pal); + free(pal); +} diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xlib_color.h b/libraries/evas/src/modules/engines/software_x11/evas_xlib_color.h new file mode 100644 index 0000000..e9f8afb --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xlib_color.h @@ -0,0 +1,16 @@ +#ifndef EVAS_XLIB_COLOR_H +#define EVAS_XLIB_COLOR_H + +void evas_software_xlib_x_color_init (void); + +Convert_Pal *evas_software_xlib_x_color_allocate (Display *disp, + Colormap cmap, + Visual *vis, + Convert_Pal_Mode colors); + +void evas_software_xlib_x_color_deallocate (Display *disp, + Colormap cmap, + Visual *vis, + Convert_Pal *pal); + +#endif diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xlib_main.c b/libraries/evas/src/modules/engines/software_x11/evas_xlib_main.c new file mode 100644 index 0000000..3c153e1 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xlib_main.c @@ -0,0 +1,7 @@ +#include "evas_common.h" +#include "evas_engine.h" + +void +evas_software_xlib_x_init(void) +{ +} diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c b/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c new file mode 100644 index 0000000..1b1d3d9 --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c @@ -0,0 +1,1135 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include "evas_common.h" +#include "evas_macros.h" +#include "evas_xlib_outbuf.h" +#include "evas_xlib_buffer.h" +#include "evas_xlib_color.h" + + +typedef struct _Outbuf_Region Outbuf_Region; + +struct _Outbuf_Region +{ + X_Output_Buffer *xob; + X_Output_Buffer *mxob; + int x; + int y; + int w; + int h; +}; + +static Eina_List *shmpool = NULL; +static int shmsize = 0; +static int shmmemlimit = 10 * 1024 * 1024; +static const unsigned int shmcountlimit = 32; + +#ifdef EVAS_FRAME_QUEUING +static LK(lock_shmpool); +#define SHMPOOL_LOCK() LKL(lock_shmpool) +#define SHMPOOL_UNLOCK() LKU(lock_shmpool) +#else +#define SHMPOOL_LOCK() +#define SHMPOOL_UNLOCK() +#endif + +static X_Output_Buffer * +_find_xob(Display *d, Visual *v, int depth, int w, int h, int shm, void *data) +{ + Eina_List *l, *xl = NULL; + X_Output_Buffer *xob = NULL; + X_Output_Buffer *xob2; + int fitness = 0x7fffffff; + int sz, lbytes, bpp; + + if (!shm) + return evas_software_xlib_x_output_buffer_new(d, v, depth, w, h, shm, data); + if (depth > 1) + { + bpp = depth / 8; + if (bpp == 3) bpp = 4; + lbytes = (((w * bpp) + 3) / 4) * 4; + } + else + lbytes = ((w + 31) / 32) * 4; + sz = lbytes * h; + SHMPOOL_LOCK(); + EINA_LIST_FOREACH(shmpool, l, xob2) + { + int szdif; + + if ((xob2->xim->depth != depth) || (xob2->visual != v) || + (xob2->display != d)) + continue; + szdif = xob2->psize - sz; + if (szdif < 0) continue; + if (szdif == 0) + { + xob = xob2; + xl = l; + goto have_xob; + } + if (szdif < fitness) + { + fitness = szdif; + xob = xob2; + xl = l; + } + } + if ((fitness > (100 * 100)) || (!xob)) + { + SHMPOOL_UNLOCK(); + xob = evas_software_xlib_x_output_buffer_new(d, v, depth, w, h, shm, data); + return xob; + } + + have_xob: + shmpool = eina_list_remove_list(shmpool, xl); + xob->w = w; + xob->h = h; + xob->bpl = lbytes; + xob->xim->width = xob->w; + xob->xim->height = xob->h; + xob->xim->bytes_per_line = xob->bpl; + shmsize -= xob->psize * (xob->xim->depth / 8); + SHMPOOL_UNLOCK(); + return xob; +} + +static void +_unfind_xob(X_Output_Buffer *xob, int psync) +{ + if (xob->shm_info) + { + SHMPOOL_LOCK(); + shmpool = eina_list_prepend(shmpool, xob); + shmsize += xob->psize * xob->xim->depth / 8; + while ((shmsize > (shmmemlimit)) || + (eina_list_count(shmpool) > shmcountlimit)) + { + Eina_List *xl; + + xl = eina_list_last(shmpool); + if (!xl) + { + shmsize = 0; + break; + } + xob = xl->data; + shmpool = eina_list_remove_list(shmpool, xl); + shmsize -= xob->psize * xob->xim->depth / 8; + evas_software_xlib_x_output_buffer_free(xob, psync); + } + SHMPOOL_UNLOCK(); + } + else + evas_software_xlib_x_output_buffer_free(xob, psync); +} + +static void +_clear_xob(int psync) +{ + SHMPOOL_LOCK(); + while (shmpool) + { + X_Output_Buffer *xob; + + xob = shmpool->data; + shmpool = eina_list_remove_list(shmpool, shmpool); + evas_software_xlib_x_output_buffer_free(xob, psync); + } + shmsize = 0; + SHMPOOL_UNLOCK(); +} + +void +evas_software_xlib_outbuf_init(void) +{ +#ifdef EVAS_FRAME_QUEUING + LKI(lock_shmpool); +#endif +} + +void +evas_software_xlib_outbuf_free(Outbuf *buf) +{ +#ifdef EVAS_FRAME_QUEUING + LKL(buf->priv.lock); +#endif + while (buf->priv.pending_writes) + { + RGBA_Image *im; + Outbuf_Region *obr; + + im = buf->priv.pending_writes->data; + buf->priv.pending_writes = eina_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes); + obr = im->extended_info; + evas_cache_image_drop(&im->cache_entry); + if (obr->xob) _unfind_xob(obr->xob, 0); + if (obr->mxob) _unfind_xob(obr->mxob, 0); + free(obr); + } +#ifdef EVAS_FRAME_QUEUING + LKU(buf->priv.lock); +#endif + evas_software_xlib_outbuf_idle_flush(buf); + evas_software_xlib_outbuf_flush(buf); + if (buf->priv.x11.xlib.gc) + XFreeGC(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc); + if (buf->priv.x11.xlib.gcm) + XFreeGC(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gcm); + if (buf->priv.pal) + evas_software_xlib_x_color_deallocate(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.cmap, + buf->priv.x11.xlib.vis, buf->priv.pal); +#ifdef EVAS_FRAME_QUEUING + LKD(buf->priv.lock); +#endif + free(buf); + _clear_xob(0); +} + +Outbuf * +evas_software_xlib_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth, + Display *disp, Drawable draw, Visual *vis, + Colormap cmap, int x_depth, + int grayscale, int max_colors, Pixmap mask, + int shape_dither, int destination_alpha) +{ + Outbuf *buf; + + buf = calloc(1, sizeof(Outbuf)); + if (!buf) + return NULL; + + buf->w = w; + buf->h = h; + buf->depth = depth; + buf->rot = rot; + + buf->priv.x11.xlib.disp = disp; + buf->priv.x11.xlib.vis = vis; + buf->priv.x11.xlib.cmap = cmap; + buf->priv.x11.xlib.depth = x_depth; + + buf->priv.mask_dither = shape_dither; + buf->priv.destination_alpha = destination_alpha; + + { + Gfx_Func_Convert conv_func; + X_Output_Buffer *xob; + + buf->priv.x11.xlib.shm = evas_software_xlib_x_can_do_shm(buf->priv.x11.xlib.disp); + xob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + buf->priv.x11.xlib.depth, + 1, 1, buf->priv.x11.xlib.shm, NULL); + + conv_func = NULL; + if (xob) + { +#ifdef WORDS_BIGENDIAN + if (evas_software_xlib_x_output_buffer_byte_order(xob) == LSBFirst) + buf->priv.x11.xlib.swap = 1; + if (evas_software_xlib_x_output_buffer_bit_order(xob) == MSBFirst) + buf->priv.x11.xlib.bit_swap = 1; +#else + if (evas_software_xlib_x_output_buffer_byte_order(xob) == MSBFirst) + buf->priv.x11.xlib.swap = 1; + if (evas_software_xlib_x_output_buffer_bit_order(xob) == MSBFirst) + buf->priv.x11.xlib.bit_swap = 1; +#endif + if (((vis->class == TrueColor) || (vis->class == DirectColor)) && + (x_depth > 8)) + { + buf->priv.mask.r = (DATA32) vis->red_mask; + buf->priv.mask.g = (DATA32) vis->green_mask; + buf->priv.mask.b = (DATA32) vis->blue_mask; + if (buf->priv.x11.xlib.swap) + { + SWAP32(buf->priv.mask.r); + SWAP32(buf->priv.mask.g); + SWAP32(buf->priv.mask.b); + } + } + else if ((vis->class == PseudoColor) || + (vis->class == StaticColor) || + (vis->class == GrayScale) || + (vis->class == StaticGray) || + (x_depth <= 8)) + { + Convert_Pal_Mode pm = PAL_MODE_RGB332; + + if ((vis->class == GrayScale) || (vis->class == StaticGray)) + grayscale = 1; + if (grayscale) + { + if (max_colors >= 256) + pm = PAL_MODE_GRAY256; + else if (max_colors >= 64) + pm = PAL_MODE_GRAY64; + else if (max_colors >= 16) + pm = PAL_MODE_GRAY16; + else if (max_colors >= 4) + pm = PAL_MODE_GRAY4; + else + pm = PAL_MODE_MONO; + } + else + { + if (max_colors >= 256) + pm = PAL_MODE_RGB332; + else if (max_colors >= 216) + pm = PAL_MODE_RGB666; + else if (max_colors >= 128) + pm = PAL_MODE_RGB232; + else if (max_colors >= 64) + pm = PAL_MODE_RGB222; + else if (max_colors >= 32) + pm = PAL_MODE_RGB221; + else if (max_colors >= 16) + pm = PAL_MODE_RGB121; + else if (max_colors >= 8) + pm = PAL_MODE_RGB111; + else if (max_colors >= 4) + pm = PAL_MODE_GRAY4; + else + pm = PAL_MODE_MONO; + } + /* FIXME: only alloc once per display+cmap */ + buf->priv.pal = evas_software_xlib_x_color_allocate(disp, cmap, vis, + pm); + if (!buf->priv.pal) + { + free(buf); + return NULL; + } + } + if (buf->priv.pal) + { + if (buf->rot == 0 || buf->rot == 180) + conv_func = evas_common_convert_func_get(0, buf->w, buf->h, + evas_software_xlib_x_output_buffer_depth + (xob), buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, + buf->priv.pal->colors, + buf->rot); + else if (buf->rot == 90 || buf->rot == 270) + conv_func = evas_common_convert_func_get(0, buf->h, buf->w, + evas_software_xlib_x_output_buffer_depth + (xob), buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, + buf->priv.pal->colors, + buf->rot); + } + else + { + if (buf->rot == 0 || buf->rot == 180) + conv_func = evas_common_convert_func_get(0, buf->w, buf->h, + evas_software_xlib_x_output_buffer_depth + (xob), buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, PAL_MODE_NONE, + buf->rot); + else if (buf->rot == 90 || buf->rot == 270) + conv_func = evas_common_convert_func_get(0, buf->h, buf->w, + evas_software_xlib_x_output_buffer_depth + (xob), buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, PAL_MODE_NONE, + buf->rot); + } + evas_software_xlib_x_output_buffer_free(xob, 1); + if (!conv_func) + { + ERR("At depth: %i, RGB format mask: %08x %08x %08x, " + "Palette mode: %i. " + "Not supported by compiled in converters!", + buf->priv.x11.xlib.depth, + buf->priv.mask.r, + buf->priv.mask.g, + buf->priv.mask.b, + buf->priv.pal ? (int)buf->priv.pal->colors : -1); + } + } + evas_software_xlib_outbuf_drawable_set(buf, draw); + evas_software_xlib_outbuf_mask_set(buf, mask); + } +#ifdef EVAS_FRAME_QUEUING + LKI(buf->priv.lock); +#endif + return buf; +} + +RGBA_Image * +evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch) +{ + RGBA_Image *im; + Outbuf_Region *obr; + int bpl = 0; + int use_shm = 1; + int alpha; + + if ((buf->onebuf) && (buf->priv.x11.xlib.shm)) + { + Eina_Rectangle *rect; + + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, buf->w, buf->h); + obr = calloc(1, sizeof(Outbuf_Region)); + if (!obr) return NULL; + rect = eina_rectangle_new(x, y, w, h); + if (!rect) + { + free(obr); + return NULL; + } + + buf->priv.onebuf_regions = eina_list_append(buf->priv.onebuf_regions, rect); + if (buf->priv.onebuf) + { + *cx = x; + *cy = y; + *cw = w; + *ch = h; + if (!buf->priv.synced) + { + XSync(buf->priv.x11.xlib.disp, False); + buf->priv.synced = 1; + } + return buf->priv.onebuf; + } + obr->x = 0; + obr->y = 0; + obr->w = buf->w; + obr->h = buf->h; + *cx = x; + *cy = y; + *cw = w; + *ch = h; + + alpha = ((buf->priv.x11.xlib.mask) || (buf->priv.destination_alpha)); + + use_shm = buf->priv.x11.xlib.shm; + if ((buf->rot == 0) && + (buf->priv.mask.r == 0xff0000) && + (buf->priv.mask.g == 0x00ff00) && + (buf->priv.mask.b == 0x0000ff)) + { + obr->xob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + buf->priv.x11.xlib.depth, + buf->w, buf->h, + use_shm, + NULL); + if (!obr->xob) + { + free(obr); + return NULL; + } + im = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), + buf->w, buf->h, + (DATA32 *) evas_software_xlib_x_output_buffer_data(obr->xob, &bpl), + alpha, EVAS_COLORSPACE_ARGB8888); + if (!im) + { + evas_software_xlib_x_output_buffer_free(obr->xob, 0); + free(obr); + return NULL; + } + im->extended_info = obr; + if (buf->priv.x11.xlib.mask) + obr->mxob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + 1, + buf->w, buf->h, + use_shm, + NULL); + } + else + { + im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + if (!im) + { + free(obr); + return NULL; + } + im->cache_entry.flags.alpha |= alpha ? 1 : 0; + evas_cache_image_surface_alloc(&im->cache_entry, buf->w, buf->h); + im->extended_info = obr; + if ((buf->rot == 0) || (buf->rot == 180)) + { + obr->xob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + buf->priv.x11.xlib.depth, + buf->w, buf->h, + use_shm, + NULL); + if (!obr->xob) + { + evas_cache_image_drop(&im->cache_entry); + free(obr); + return NULL; + } + if (buf->priv.x11.xlib.mask) + obr->mxob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + 1, buf->w, buf->h, + use_shm, + NULL); + } + else if ((buf->rot == 90) || (buf->rot == 270)) + { + obr->xob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + buf->priv.x11.xlib.depth, + buf->h, buf->w, + use_shm, + NULL); + if (!obr->xob) + { + evas_cache_image_drop(&im->cache_entry); + free(obr); + return NULL; + } + if (buf->priv.x11.xlib.mask) + obr->mxob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + 1, buf->h, buf->w, + use_shm, + NULL); + } + } + /* FIXME: We should be able to remove this memset, but somewhere in the process + we copy too much to the destination surface and some area are not cleaned before copy. */ + if ((alpha) && (im->image.data)) + { + /* FIXME: faster memset! */ +// memset(im->image.data, 0, w * h * sizeof(DATA32)); + } + + buf->priv.onebuf = im; + return im; + } + + obr = calloc(1, sizeof(Outbuf_Region)); + if (!obr) return NULL; + obr->x = x; + obr->y = y; + obr->w = w; + obr->h = h; + *cx = 0; + *cy = 0; + *cw = w; + *ch = h; + + use_shm = buf->priv.x11.xlib.shm; + /* FIXME: magic - i found if shm regions are smaller than 200x200 its + * faster to use ximages over unix sockets - trial and error + */ +// use_shm = 0; /* 630 -> 1006 fps */ +// if ((w * h) < (200 * 200)) use_shm = 0; /* 630 -> 962 fps */ + + alpha = ((buf->priv.x11.xlib.mask) || (buf->priv.destination_alpha)); + + if ((buf->rot == 0) && + (buf->priv.mask.r == 0xff0000) && + (buf->priv.mask.g == 0x00ff00) && + (buf->priv.mask.b == 0x0000ff)) + { + obr->xob = _find_xob(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + buf->priv.x11.xlib.depth, + w, h, + use_shm, + NULL); + if (!obr->xob) + { + free(obr); + return NULL; + } + im = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), + w, h, + (DATA32 *) evas_software_xlib_x_output_buffer_data(obr->xob, &bpl), + alpha, EVAS_COLORSPACE_ARGB8888); + if (!im) + { + _unfind_xob(obr->xob, 0); + free(obr); + return NULL; + } + im->extended_info = obr; + if (buf->priv.x11.xlib.mask) + obr->mxob = _find_xob(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + 1, w, h, + use_shm, + NULL); + } + else + { + im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + if (!im) + { + free(obr); + return NULL; + } + im->cache_entry.flags.alpha |= alpha ? 1 : 0; + evas_cache_image_surface_alloc(&im->cache_entry, w, h); + im->extended_info = obr; + if ((buf->rot == 0) || (buf->rot == 180)) + { + obr->xob = _find_xob(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + buf->priv.x11.xlib.depth, + w, h, + use_shm, + NULL); + if (!obr->xob) + { + evas_cache_image_drop(&im->cache_entry); + free(obr); + return NULL; + } + if (buf->priv.x11.xlib.mask) + obr->mxob = _find_xob(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + 1, w, h, + use_shm, + NULL); + } + else if ((buf->rot == 90) || (buf->rot == 270)) + { + obr->xob = _find_xob(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + buf->priv.x11.xlib.depth, + h, w, + use_shm, + NULL); + if (!obr->xob) + { + evas_cache_image_drop(&im->cache_entry); + free(obr); + return NULL; + } + if (buf->priv.x11.xlib.mask) + obr->mxob = _find_xob(buf->priv.x11.xlib.disp, + buf->priv.x11.xlib.vis, + 1, h, w, + use_shm, + NULL); + } + } + /* FIXME: We should be able to remove this memset, but somewhere in the process + we copy too much to the destination surface and some area are not cleaned before copy. */ + if (((buf->priv.x11.xlib.mask) || (buf->priv.destination_alpha)) && + (im->image.data)) + { + /* FIXME: faster memset! */ +// memset(im->image.data, 0, w * h * sizeof(DATA32)); + } + +#ifdef EVAS_FRAME_QUEUING + if (!evas_common_frameq_enabled()) +#endif + buf->priv.pending_writes = eina_list_append(buf->priv.pending_writes, im); + return im; +} + +void +evas_software_xlib_outbuf_free_region_for_update(Outbuf *buf __UNUSED__, RGBA_Image *update __UNUSED__) +{ + /* no need to do anything - they are cleaned up on flush */ +} + +void +evas_software_xlib_outbuf_flush(Outbuf *buf) +{ + Eina_List *l; + RGBA_Image *im; + Outbuf_Region *obr; + + if ((buf->priv.onebuf) && (buf->priv.onebuf_regions)) + { + Region tmpr; + + im = buf->priv.onebuf; + obr = im->extended_info; + tmpr = XCreateRegion(); + while (buf->priv.onebuf_regions) + { + Eina_Rectangle *rect; + XRectangle xr; + + rect = buf->priv.onebuf_regions->data; + buf->priv.onebuf_regions = eina_list_remove_list(buf->priv.onebuf_regions, buf->priv.onebuf_regions); + if (buf->rot == 0) + { + xr.x = rect->x; + xr.y = rect->y; + xr.width = rect->w; + xr.height = rect->h; + } + else if (buf->rot == 90) + { + xr.x = rect->y; + xr.y = buf->w - rect->x - rect->w; + xr.width = rect->h; + xr.height = rect->w; + } + else if (buf->rot == 180) + { + xr.x = buf->w - rect->x - rect->w; + xr.y = buf->h - rect->y - rect->h; + xr.width = rect->w; + xr.height = rect->h; + } + else if (buf->rot == 270) + { + xr.x = buf->h - rect->y - rect->h; + xr.y = rect->x; + xr.width = rect->h; + xr.height = rect->w; + } + XUnionRectWithRegion(&xr, tmpr, tmpr); + if (buf->priv.debug) + evas_software_xlib_outbuf_debug_show(buf, buf->priv.x11.xlib.win, + xr.x, xr.y, xr.width, xr.height); + eina_rectangle_free(rect); + } + XSetRegion(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc, tmpr); + if (obr->xob) + evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win, + buf->priv.x11.xlib.gc, + 0, 0, 0); + if (obr->mxob) + { + XSetRegion(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gcm, tmpr); + evas_software_xlib_x_output_buffer_paste(obr->mxob, + buf->priv.x11.xlib.mask, + buf->priv.x11.xlib.gcm, + 0, 0, 0); + } + XDestroyRegion(tmpr); + buf->priv.synced = 0; + } + else + { +#if 1 + XSync(buf->priv.x11.xlib.disp, False); + EINA_LIST_FOREACH(buf->priv.pending_writes, l, im) + { + obr = im->extended_info; + if (buf->priv.debug) + evas_software_xlib_outbuf_debug_show(buf, buf->priv.x11.xlib.win, + obr->x, obr->y, obr->w, obr->h); + if (obr->xob) + evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win, + buf->priv.x11.xlib.gc, + obr->x, obr->y, 0); + if (obr->mxob) + evas_software_xlib_x_output_buffer_paste(obr->mxob, + buf->priv.x11.xlib.mask, + buf->priv.x11.xlib.gcm, + obr->x, obr->y, 0); + } +#ifdef EVAS_FRAME_QUEUING + LKL(buf->priv.lock); +#endif + while (buf->priv.prev_pending_writes) + { + im = buf->priv.prev_pending_writes->data; + buf->priv.prev_pending_writes = + eina_list_remove_list(buf->priv.prev_pending_writes, + buf->priv.prev_pending_writes); + obr = im->extended_info; + evas_cache_image_drop(&im->cache_entry); + if (obr->xob) _unfind_xob(obr->xob, 0); + if (obr->mxob) _unfind_xob(obr->mxob, 0); + free(obr); + } + buf->priv.prev_pending_writes = buf->priv.pending_writes; +#ifdef EVAS_FRAME_QUEUING + LKU(buf->priv.lock); +#endif + buf->priv.pending_writes = NULL; + XFlush(buf->priv.x11.xlib.disp); +#else + /* XX async push - disable */ + /* + EINA_LIST_FOREACH(buf->priv.pending_writes, l, im) + { + obr = im->extended_info; + if (buf->priv.debug) + evas_software_xlib_outbuf_debug_show(buf, buf->priv.x11.xlib.win, + obr->x, obr->y, obr->w, obr->h); + evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win, + buf->priv.x11.xlib.gc, + obr->x, obr->y, 0); + if (obr->mxob) + evas_software_xlib_x_output_buffer_paste(obr->mxob, + buf->priv.x11.xlib.mask, + buf->priv.x11.xlib.gcm, + obr->x, obr->y, 0); + } + */ + XSync(buf->priv.x11.xlib.disp, False); + + while (buf->priv.pending_writes) + { + RGBA_Image *im; + Outbuf_Region *obr; + + im = eina_list_data_get(buf->priv.pending_writes); + buf->priv.pending_writes = eina_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes); + obr = im->extended_info; + evas_cache_image_drop(&im->cache_entry); + if (obr->xob) _unfind_xob(obr->xob, 0); + if (obr->mxob) _unfind_xob(obr->mxob, 0); + free(obr); + evas_cache_image_drop(&im->cache_entry); + } +#endif + } + evas_common_cpu_end_opt(); +} + +void +evas_software_xlib_outbuf_idle_flush(Outbuf *buf) +{ + if (buf->priv.onebuf) + { + RGBA_Image *im; + Outbuf_Region *obr; + + im = buf->priv.onebuf; + buf->priv.onebuf = NULL; + obr = im->extended_info; + if (obr->xob) evas_software_xlib_x_output_buffer_free(obr->xob, 0); + if (obr->mxob) evas_software_xlib_x_output_buffer_free(obr->mxob, 0); + free(obr); + evas_cache_image_drop(&im->cache_entry); + } + else + { +#ifdef EVAS_FRAME_QUEUING + LKL(buf->priv.lock); +#endif + if (buf->priv.prev_pending_writes) XSync(buf->priv.x11.xlib.disp, False); + while (buf->priv.prev_pending_writes) + { + RGBA_Image *im; + Outbuf_Region *obr; + + im = buf->priv.prev_pending_writes->data; + buf->priv.prev_pending_writes = + eina_list_remove_list(buf->priv.prev_pending_writes, + buf->priv.prev_pending_writes); + obr = im->extended_info; + evas_cache_image_drop(&im->cache_entry); + if (obr->xob) _unfind_xob(obr->xob, 0); + if (obr->mxob) _unfind_xob(obr->mxob, 0); + free(obr); + } +#ifdef EVAS_FRAME_QUEUING + LKU(buf->priv.lock); +#endif + _clear_xob(0); + } +} + +void +evas_software_xlib_outbuf_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h) +{ + Gfx_Func_Convert conv_func = NULL; + Outbuf_Region *obr; + DATA32 *src_data; + unsigned char *data; + int bpl = 0, yy; + + obr = update->extended_info; + if (buf->priv.pal) + { + if ((buf->rot == 0) || (buf->rot == 180)) + conv_func = evas_common_convert_func_get(0, w, h, + evas_software_xlib_x_output_buffer_depth + (obr->xob), buf->priv.mask.r, + buf->priv.mask.g, buf->priv.mask.b, + buf->priv.pal->colors, buf->rot); + else if ((buf->rot == 90) || (buf->rot == 270)) + conv_func = evas_common_convert_func_get(0, h, w, + evas_software_xlib_x_output_buffer_depth + (obr->xob), buf->priv.mask.r, + buf->priv.mask.g, buf->priv.mask.b, + buf->priv.pal->colors, buf->rot); + } + else + { + if ((buf->rot == 0) || (buf->rot == 180)) + conv_func = evas_common_convert_func_get(0, w, h, + evas_software_xlib_x_output_buffer_depth + (obr->xob), buf->priv.mask.r, + buf->priv.mask.g, buf->priv.mask.b, + PAL_MODE_NONE, buf->rot); + else if ((buf->rot == 90) || (buf->rot == 270)) + conv_func = evas_common_convert_func_get(0, h, w, + evas_software_xlib_x_output_buffer_depth + (obr->xob), buf->priv.mask.r, + buf->priv.mask.g, buf->priv.mask.b, + PAL_MODE_NONE, buf->rot); + } + if (!conv_func) return; + + if (!obr->xob) return; + data = evas_software_xlib_x_output_buffer_data(obr->xob, &bpl); + if (!data) return; + src_data = update->image.data; + if (!src_data) return; + if (buf->rot == 0) + { + obr->x = x; + obr->y = y; + } + else if (buf->rot == 90) + { + obr->x = y; + obr->y = buf->w - x - w; + } + else if (buf->rot == 180) + { + obr->x = buf->w - x - w; + obr->y = buf->h - y - h; + } + else if (buf->rot == 270) + { + obr->x = buf->h - y - h; + obr->y = x; + } + if ((buf->rot == 0) || (buf->rot == 180)) + { + obr->w = w; + obr->h = h; + } + else if ((buf->rot == 90) || (buf->rot == 270)) + { + obr->w = h; + obr->h = w; + } + if (buf->onebuf) + { + src_data += x + (y * update->cache_entry.w); + data += (bpl * obr->y) + + (obr->x * (evas_software_xlib_x_output_buffer_depth(obr->xob) / 8)); + } + if (buf->priv.pal) + { + if (data != (unsigned char *)src_data) + conv_func(src_data, data, + update->cache_entry.w - w, + bpl / + ((evas_software_xlib_x_output_buffer_depth(obr->xob) / + 8)) - obr->w, obr->w, obr->h, x, y, + buf->priv.pal->lookup); + } + else + { + if (data != (unsigned char *)src_data) + conv_func(src_data, data, + update->cache_entry.w - w, + bpl / + ((evas_software_xlib_x_output_buffer_depth(obr->xob) / + 8)) - obr->w, obr->w, obr->h, x, y, NULL); + } +#if 1 +#else + /* XX async push */ + if (!((buf->priv.onebuf) && (buf->priv.onebuf_regions))) + { + if (buf->priv.debug) + evas_software_xlib_outbuf_debug_show(buf, buf->priv.x11.xlib.win, + obr->x, obr->y, obr->w, obr->h); + if (obr->xob) + evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win, + buf->priv.x11.xlib.gc, + obr->x, obr->y, 0); + } +#endif + if (obr->mxob) + { + if (buf->rot == 0) + { + for (yy = 0; yy < obr->h; yy++) + evas_software_xlib_x_write_mask_line(buf, obr->mxob, + src_data + + (yy * obr->w), obr->w, yy); + } + else if (buf->rot == 90) + { + for (yy = 0; yy < obr->h; yy++) + evas_software_xlib_x_write_mask_line_vert(buf, obr->mxob, + src_data + yy, + h, // h + obr->h - yy - 1, // ym + w); // w + } + else if (buf->rot == 180) + { + for (yy = 0; yy < obr->h; yy++) + { + evas_software_xlib_x_write_mask_line_rev(buf, obr->mxob, + src_data + + (yy * obr->w), + obr->w, obr->h - yy - 1); + } + } + else if (buf->rot == 270) + { + for (yy = 0; yy < obr->h; yy++) + evas_software_xlib_x_write_mask_line_vert_rev(buf, obr->mxob, + src_data + yy, + h, // h + yy, // ym + w); // w + } +#if 1 +#else + /* XX async push */ + if (!((buf->priv.onebuf) && (buf->priv.onebuf_regions))) + evas_software_xlib_x_output_buffer_paste(obr->mxob, + buf->priv.x11.xlib.mask, + buf->priv.x11.xlib.gcm, + obr->x, obr->y, 0); +#endif + } +#if 1 +#else + XFlush(buf->priv.x11.xlib.disp); +#endif +} + +void +evas_software_xlib_outbuf_reconfigure(Outbuf * buf, int w, int h, int rot, + Outbuf_Depth depth) +{ + if ((w == buf->w) && + (h == buf->h) && + (rot == buf->rot) && + (depth == buf->depth)) return; + buf->w = w; + buf->h = h; + buf->rot = rot; + evas_software_xlib_outbuf_idle_flush(buf); +} + +int +evas_software_xlib_outbuf_get_width(Outbuf * buf) +{ + return buf->w; +} + +int +evas_software_xlib_outbuf_get_height(Outbuf * buf) +{ + return buf->h; +} + +Outbuf_Depth +evas_software_xlib_outbuf_get_depth(Outbuf * buf) +{ + return buf->depth; +} + +int +evas_software_xlib_outbuf_get_rot(Outbuf * buf) +{ + return buf->rot; +} + +void +evas_software_xlib_outbuf_drawable_set(Outbuf * buf, Drawable draw) +{ + XGCValues gcv; + + if (buf->priv.x11.xlib.win == draw) return; + if (buf->priv.x11.xlib.gc) + { + XFreeGC(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc); + buf->priv.x11.xlib.gc = NULL; + } + buf->priv.x11.xlib.win = draw; + buf->priv.x11.xlib.gc = XCreateGC(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.win, 0, &gcv); +} + +void +evas_software_xlib_outbuf_mask_set(Outbuf * buf, Pixmap mask) +{ + XGCValues gcv; + + if (buf->priv.x11.xlib.mask == mask) return; + if (buf->priv.x11.xlib.gcm) + { + XFreeGC(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gcm); + buf->priv.x11.xlib.gcm = NULL; + } + buf->priv.x11.xlib.mask = mask; + if (buf->priv.x11.xlib.mask) + buf->priv.x11.xlib.gcm = XCreateGC(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.mask, 0, &gcv); +} + +void +evas_software_xlib_outbuf_debug_set(Outbuf * buf, int debug) +{ + buf->priv.debug = debug; +} + +void +evas_software_xlib_outbuf_debug_show(Outbuf * buf, Drawable draw, int x, int y, int w, + int h) +{ + int i; + int screen_num = 0; + + { + int wx, wy; + unsigned int ww, wh, bd, dp; + Window wdum, root; + XWindowAttributes wattr; + + XGetGeometry(buf->priv.x11.xlib.disp, draw, &root, &wx, &wy, &ww, &wh, &bd, &dp); + XGetGeometry(buf->priv.x11.xlib.disp, root, &wdum, &wx, &wy, &ww, &wh, &bd, &dp); + XGetWindowAttributes(buf->priv.x11.xlib.disp, root, &wattr); + screen_num = XScreenNumberOfScreen(wattr.screen); + } + for (i = 0; i < 20; i++) + { + XSetForeground(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc, + BlackPixel(buf->priv.x11.xlib.disp, screen_num)); + XFillRectangle(buf->priv.x11.xlib.disp, draw, buf->priv.x11.xlib.gc, x, y, w, h); + XSync(buf->priv.x11.xlib.disp, False); + XSync(buf->priv.x11.xlib.disp, False); + XSetForeground(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc, + WhitePixel(buf->priv.x11.xlib.disp, screen_num)); + XFillRectangle(buf->priv.x11.xlib.disp, draw, buf->priv.x11.xlib.gc, x, y, w, h); + XSync(buf->priv.x11.xlib.disp, False); + XSync(buf->priv.x11.xlib.disp, False); + } +} + +Eina_Bool +evas_software_xlib_outbuf_alpha_get(Outbuf *buf) +{ + return buf->priv.x11.xlib.mask; +} + +#ifdef EVAS_FRAME_QUEUING +void +evas_software_xlib_outbuf_set_priv(Outbuf *buf, void *cur, void *prev __UNUSED__) +{ + buf->priv.pending_writes = (Eina_List *)cur; +} +#endif diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.h b/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.h new file mode 100644 index 0000000..d70eb8d --- /dev/null +++ b/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.h @@ -0,0 +1,92 @@ +#ifndef EVAS_XLIB_OUTBUF_H +#define EVAS_XLIB_OUTBUF_H + + +#include "evas_engine.h" + + +void evas_software_xlib_outbuf_init (void); + +void evas_software_xlib_outbuf_free (Outbuf *buf); + +Outbuf *evas_software_xlib_outbuf_setup_x (int w, + int h, + int rot, + Outbuf_Depth depth, + Display *disp, + Drawable draw, + Visual *vis, + Colormap cmap, + int x_depth, + int grayscale, + int max_colors, + Pixmap mask, + int shape_dither, + int destination_alpha); + + +RGBA_Image *evas_software_xlib_outbuf_new_region_for_update (Outbuf *buf, + int x, + int y, + int w, + int h, + int *cx, + int *cy, + int *cw, + int *ch); + +void evas_software_xlib_outbuf_free_region_for_update (Outbuf *buf, + RGBA_Image *update); + +void evas_software_xlib_outbuf_flush (Outbuf *buf); + +void evas_software_xlib_outbuf_idle_flush (Outbuf *buf); + +void evas_software_xlib_outbuf_push_updated_region (Outbuf *buf, + RGBA_Image *update, + int x, + int y, + int w, + int h); + +void evas_software_xlib_outbuf_reconfigure (Outbuf *buf, + int w, + int h, + int rot, + Outbuf_Depth depth); + +int evas_software_xlib_outbuf_get_width (Outbuf *buf); + +int evas_software_xlib_outbuf_get_height (Outbuf *buf); + +Outbuf_Depth evas_software_xlib_outbuf_get_depth (Outbuf *buf); + +int evas_software_xlib_outbuf_get_rot (Outbuf *buf); + +void evas_software_xlib_outbuf_drawable_set (Outbuf *buf, + Drawable draw); + +void evas_software_xlib_outbuf_mask_set (Outbuf *buf, + Pixmap mask); + +void evas_software_xlib_outbuf_rotation_set (Outbuf *buf, + int rot); + +void evas_software_xlib_outbuf_debug_set (Outbuf *buf, + int debug); + +void evas_software_xlib_outbuf_debug_show (Outbuf *buf, + Drawable draw, + int x, + int y, + int w, + int h); + +Eina_Bool evas_software_xlib_outbuf_alpha_get (Outbuf *buf); +#ifdef EVAS_FRAME_QUEUING +void evas_software_xlib_outbuf_set_priv (Outbuf *buf, + void *cur, + void *prev); +#endif + +#endif diff --git a/libraries/evas/src/modules/loaders/Makefile.am b/libraries/evas/src/modules/loaders/Makefile.am new file mode 100644 index 0000000..b7ed9a5 --- /dev/null +++ b/libraries/evas/src/modules/loaders/Makefile.am @@ -0,0 +1,93 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = + +if BUILD_LOADER_BMP +if !EVAS_STATIC_BUILD_BMP +SUBDIRS += bmp +endif +endif + +if BUILD_LOADER_EDB +if !EVAS_STATIC_BUILD_EDB +SUBDIRS += edb +endif +endif + +if BUILD_LOADER_EET +if !EVAS_STATIC_BUILD_EET +SUBDIRS += eet +endif +endif + +if BUILD_LOADER_GENERIC +if !EVAS_STATIC_BUILD_GENERIC +SUBDIRS += generic +endif +endif + +if BUILD_LOADER_GIF +if !EVAS_STATIC_BUILD_GIF +SUBDIRS += gif +endif +endif + +if BUILD_LOADER_ICO +if !EVAS_STATIC_BUILD_ICO +SUBDIRS += ico +endif +endif + +if BUILD_LOADER_JPEG +if !EVAS_STATIC_BUILD_JPEG +SUBDIRS += jpeg +endif +endif + +if BUILD_LOADER_PMAPS +if !EVAS_STATIC_BUILD_PMAPS +SUBDIRS += pmaps +endif +endif + +if BUILD_LOADER_PNG +if !EVAS_STATIC_BUILD_PNG +SUBDIRS += png +endif +endif + +if BUILD_LOADER_PSD +if !EVAS_STATIC_BUILD_PSD +SUBDIRS += psd +endif +endif + +if BUILD_LOADER_SVG +if !EVAS_STATIC_BUILD_SVG +SUBDIRS += svg +endif +endif + +if BUILD_LOADER_TGA +if !EVAS_STATIC_BUILD_TGA +SUBDIRS += tga +endif +endif + +if BUILD_LOADER_TIFF +if !EVAS_STATIC_BUILD_TIFF +SUBDIRS += tiff +endif +endif + +if BUILD_LOADER_WBMP +if !EVAS_STATIC_BUILD_WBMP +SUBDIRS += wbmp +endif +endif + +if BUILD_LOADER_XPM +if !EVAS_STATIC_BUILD_XPM +SUBDIRS += xpm +endif +endif diff --git a/libraries/evas/src/modules/loaders/Makefile.in b/libraries/evas/src/modules/loaders/Makefile.in new file mode 100644 index 0000000..2120a33 --- /dev/null +++ b/libraries/evas/src/modules/loaders/Makefile.in @@ -0,0 +1,754 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@am__append_1 = bmp +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@am__append_2 = edb +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@am__append_3 = eet +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_FALSE@am__append_4 = generic +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@am__append_5 = gif +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@am__append_6 = ico +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@am__append_7 = jpeg +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_FALSE@am__append_8 = pmaps +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@am__append_9 = png +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@am__append_10 = psd +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@am__append_11 = svg +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@am__append_12 = tga +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@am__append_13 = tiff +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@am__append_14 = wbmp +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@am__append_15 = xpm +subdir = src/modules/loaders +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = bmp edb eet generic gif ico jpeg pmaps png psd svg tga \ + tiff wbmp xpm +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) \ + $(am__append_4) $(am__append_5) $(am__append_6) \ + $(am__append_7) $(am__append_8) $(am__append_9) \ + $(am__append_10) $(am__append_11) $(am__append_12) \ + $(am__append_13) $(am__append_14) $(am__append_15) +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/TODO b/libraries/evas/src/modules/loaders/TODO new file mode 100644 index 0000000..3b82543 --- /dev/null +++ b/libraries/evas/src/modules/loaders/TODO @@ -0,0 +1,5 @@ +DONE -> bmp tga ico +id3 gz bz2 <- extraction loaders +lbm <- aaah amiga days +ani <- why> + diff --git a/libraries/evas/src/modules/loaders/bmp/Makefile.am b/libraries/evas/src/modules/loaders/bmp/Makefile.am new file mode 100644 index 0000000..857f3b9 --- /dev/null +++ b/libraries/evas/src/modules/loaders/bmp/Makefile.am @@ -0,0 +1,33 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +if BUILD_LOADER_BMP +if !EVAS_STATIC_BUILD_BMP + +pkgdir = $(libdir)/evas/modules/loaders/bmp/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_bmp.c + +module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_bmp.la +libevas_loader_bmp_la_SOURCES = evas_image_load_bmp.c +libevas_loader_bmp_la_LIBADD = + +endif +endif diff --git a/libraries/evas/src/modules/loaders/bmp/Makefile.in b/libraries/evas/src/modules/loaders/bmp/Makefile.in new file mode 100644 index 0000000..f2c3e20 --- /dev/null +++ b/libraries/evas/src/modules/loaders/bmp/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/bmp +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_bmp_la_DEPENDENCIES = +am__libevas_loader_bmp_la_SOURCES_DIST = evas_image_load_bmp.c +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_TRUE@am_libevas_loader_bmp_la_OBJECTS = evas_image_load_bmp.lo +libevas_loader_bmp_la_OBJECTS = $(am_libevas_loader_bmp_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_TRUE@am_libevas_loader_bmp_la_rpath = +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_bmp.c +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_bmp.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@ -rpath \ +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_bmp_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_bmp_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@pkgdir = $(libdir)/evas/modules/loaders/bmp/$(MODULE_ARCH) +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@module_la_SOURCES = evas_image_load_bmp.c +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_TRUE@noinst_LTLIBRARIES = libevas_loader_bmp.la +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_TRUE@libevas_loader_bmp_la_SOURCES = evas_image_load_bmp.c +@BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_TRUE@libevas_loader_bmp_la_LIBADD = +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/bmp/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/bmp/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_bmp.la: $(libevas_loader_bmp_la_OBJECTS) $(libevas_loader_bmp_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_bmp_la_rpath) $(libevas_loader_bmp_la_OBJECTS) $(libevas_loader_bmp_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_bmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_bmp.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_bmp.lo: evas_image_load_bmp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_bmp.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_bmp.Tpo -c -o module_la-evas_image_load_bmp.lo `test -f 'evas_image_load_bmp.c' || echo '$(srcdir)/'`evas_image_load_bmp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_bmp.Tpo $(DEPDIR)/module_la-evas_image_load_bmp.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_bmp.c' object='module_la-evas_image_load_bmp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_bmp.lo `test -f 'evas_image_load_bmp.c' || echo '$(srcdir)/'`evas_image_load_bmp.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c b/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c new file mode 100644 index 0000000..38e3680 --- /dev/null +++ b/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c @@ -0,0 +1,1451 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef HAVE_EVIL +# include +#endif + +#include + +#include "evas_common.h" +#include "evas_private.h" + +static Eina_Bool evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +static Evas_Image_Load_Func evas_image_load_bmp_func = +{ + EINA_TRUE, + evas_image_load_file_head_bmp, + evas_image_load_file_data_bmp, + NULL +}; + +static int +read_short(FILE *file, short *ret) +{ + unsigned char b[2]; + if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + *ret = (b[1] << 8) | b[0]; + return 1; +} + +static int +read_ushort(FILE *file, unsigned short *ret) +{ + unsigned char b[2]; + if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + *ret = (b[1] << 8) | b[0]; + return 1; +} + +static int +read_int(FILE *file, int *ret) +{ + unsigned char b[4]; + if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); + return 1; +} + +static int +read_uint(FILE *file, unsigned int *ret) +{ + unsigned char b[4]; + if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); + return 1; +} + +static Eina_Bool +evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + FILE *f; + char buf[4096]; + char hasa = 0; + int w = 0, h = 0, planes = 0, bit_count = 0, + image_size = 0, comp = 0, hdpi = 0, vdpi = 0, + palette_size = -1, important_colors = 0; + unsigned int offset, head_size, rmask = 0, gmask = 0, bmask = 0, amask = 0; + unsigned int pal_num = 0; + int right_way_up = 0; + int fsize = 0; + unsigned int bmpsize; + unsigned short res1, res2; + + f = fopen(file, "rb"); + if (!f) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + fseek(f, 0, SEEK_END); + fsize = ftell(f); + fseek(f, 0, SEEK_SET); + if (fsize < 2) goto close_file; + + if (fread(buf, 2, 1, f) != 1) goto close_file; + if (strncmp(buf, "BM", 2)) goto close_file; // magic number + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + if (!read_uint(f, &bmpsize)) goto close_file; + if (!read_ushort(f, &res1)) goto close_file; + if (!read_ushort(f, &res2)) goto close_file; + if (!read_uint(f, &offset)) goto close_file; + if (!read_uint(f, &head_size)) goto close_file; + if (head_size == 12) // OS/2 V1 + Windows 3.0 + { + short tmp; + + if (!read_short(f, &tmp)) goto close_file; + w = tmp; // width + if (!read_short(f, &tmp)) goto close_file; + h = tmp; // height + if (!read_short(f, &tmp)) goto close_file; + planes = tmp; // must be 1 + if (!read_short(f, &tmp)) goto close_file; + bit_count = tmp; // bits per pixel: 1, 4, 8 & 24 + } + else if (head_size == 64) // OS/2 V2 + { + short tmp; + int tmp2; + + if (!read_int(f, &tmp2)) goto close_file; + w = tmp2; // width + if (!read_int(f, &tmp2)) goto close_file; + h = tmp2; // height + if (!read_short(f, &tmp)) goto close_file; + planes = tmp; // must be 1 + if (!read_short(f, &tmp)) goto close_file; + bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 + if (!read_int(f, &tmp2)) goto close_file; + comp = tmp2; // compression method + if (!read_int(f, &tmp2)) goto close_file; + image_size = tmp2; // bitmap data size + if (!read_int(f, &tmp2)) goto close_file; + hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter + if (!read_int(f, &tmp2)) goto close_file; + vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter + if (!read_int(f, &tmp2)) goto close_file; + palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) + if (!read_int(f, &tmp2)) goto close_file; + important_colors = tmp2; // number of important colors - 0 if all + if (fread(buf, 24, 1, f) != 1) goto close_file; // skip unused header + if (image_size == 0) image_size = fsize - offset; + } + else if (head_size == 40) // Windows 3.0 + (v3) + { + short tmp; + int tmp2; + + if (!read_int(f, &tmp2)) goto close_file; + w = tmp2; // width + if (!read_int(f, &tmp2)) goto close_file; + h = tmp2; // height + if (!read_short(f, &tmp)) goto close_file; + planes = tmp; // must be 1 + if (!read_short(f, &tmp)) goto close_file; + bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 + if (!read_int(f, &tmp2)) goto close_file; + comp = tmp2; // compression method + if (!read_int(f, &tmp2)) goto close_file; + image_size = tmp2; // bitmap data size + if (!read_int(f, &tmp2)) goto close_file; + hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter + if (!read_int(f, &tmp2)) goto close_file; + vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter + if (!read_int(f, &tmp2)) goto close_file; + palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) + if (!read_int(f, &tmp2)) goto close_file; + important_colors = tmp2; // number of important colors - 0 if all + if (image_size == 0) image_size = fsize - offset; + if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way + } + else if (head_size == 108) // Windows 95/NT4 + (v4) + { + short tmp; + int tmp2; + + if (!read_int(f, &tmp2)) goto close_file; + w = tmp2; // width + if (!read_int(f, &tmp2)) goto close_file; + h = tmp2; // height + if (!read_short(f, &tmp)) goto close_file; + planes = tmp; // must be 1 + if (!read_short(f, &tmp)) goto close_file; + bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 + if (!read_int(f, &tmp2)) goto close_file; + comp = tmp2; // compression method + if (!read_int(f, &tmp2)) goto close_file; + image_size = tmp2; // bitmap data size + if (!read_int(f, &tmp2)) goto close_file; + hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter + if (!read_int(f, &tmp2)) goto close_file; + vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter + if (!read_int(f, &tmp2)) goto close_file; + palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) + if (!read_int(f, &tmp2)) goto close_file; + important_colors = tmp2; // number of important colors - 0 if all + if (!read_int(f, &tmp2)) goto close_file; + rmask = tmp2; // red mask + if (!read_int(f, &tmp2)) goto close_file; + gmask = tmp2; // green mask + if (!read_int(f, &tmp2)) goto close_file; + bmask = tmp2; // blue mask + if (!read_int(f, &tmp2)) goto close_file; + amask = tmp2; // alpha mask + if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie + if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma + if (image_size == 0) image_size = fsize - offset; + if ((amask) && (bit_count == 32)) hasa = 1; + } + else if (head_size == 124) // Windows 98/2000 + (v5) + { + short tmp; + int tmp2; + + if (!read_int(f, &tmp2)) goto close_file; + w = tmp2; // width + if (!read_int(f, &tmp2)) goto close_file; + h = tmp2; // height + if (!read_short(f, &tmp)) goto close_file; + planes = tmp; // must be 1 + if (!read_short(f, &tmp)) goto close_file; + bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 + if (!read_int(f, &tmp2)) goto close_file; + comp = tmp2; // compression method + if (!read_int(f, &tmp2)) goto close_file; + image_size = tmp2; // bitmap data size + if (!read_int(f, &tmp2)) goto close_file; + hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter + if (!read_int(f, &tmp2)) goto close_file; + vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter + if (!read_int(f, &tmp2)) goto close_file; + palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) + if (!read_int(f, &tmp2)) goto close_file; + important_colors = tmp2; // number of important colors - 0 if all + if (!read_int(f, &tmp2)) goto close_file; + rmask = tmp2; // red mask + if (!read_int(f, &tmp2)) goto close_file; + gmask = tmp2; // green mask + if (!read_int(f, &tmp2)) goto close_file; + bmask = tmp2; // blue mask + if (!read_int(f, &tmp2)) goto close_file; + amask = tmp2; // alpha mask + if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie + if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma + if (fread(buf, 16, 1, f) != 1) goto close_file; // skip others + if (image_size == 0) image_size = fsize - offset; + if ((amask) && (bit_count == 32)) hasa = 1; + } + else + goto close_file; + + if (h < 0) + { + h = -h; + right_way_up = 1; + } + + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + if (IMG_TOO_BIG(w, h)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + goto close_file; + } + /* It is not bad idea that bmp loader support scale down decoding + * because of memory issue in mobile world.*/ + if (ie->load_opts.scale_down_by > 1) + { + w /= ie->load_opts.scale_down_by; + h /= ie->load_opts.scale_down_by; + } + + if (bit_count < 16) + { + if ((palette_size < 0) || (palette_size > 256)) pal_num = 256; + else pal_num = palette_size; + if (bit_count == 1) + { + if (comp == 0) // no compression + { + } + else + goto close_file; + } + else if (bit_count == 4) + { + if (comp == 0) // no compression + { + } + else if (comp == 2) // rle 4bit/pixel + { + } + else + goto close_file; + } + else if (bit_count == 8) + { + if (comp == 0) // no compression + { + } + else if (comp == 1) // rle 8bit/pixel + { + } + else + goto close_file; + } + } + else if ((bit_count == 16) || (bit_count == 24) || (bit_count == 32)) + { + if (comp == 0) // no compression + { + // handled + } + else if (comp == 3) // bit field + { + // handled + } + else if (comp == 4) // jpeg - only printer drivers + goto close_file; + else if (comp == 3) // png - only printer drivers + goto close_file; + else + goto close_file; + } + else + goto close_file; + + ie->w = w; + ie->h = h; + if (hasa) ie->flags.alpha = 1; + + fclose(f); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + + close_file: + fclose(f); + return EINA_FALSE; +} + +static Eina_Bool +evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + FILE *f; + char buf[4096]; + unsigned char *buffer = NULL, *buffer_end = NULL, *p; + char hasa = 0; + int x = 0, y = 0, w = 0, h = 0, planes = 0, bit_count = 0, image_size = 0, + comp = 0, hdpi = 0, vdpi = 0, palette_size = -1, important_colors = 0; + unsigned int offset = 0, head_size = 0; + unsigned int *pal = NULL, pal_num = 0, *pix = NULL, *surface = NULL, fix, + rmask = 0, gmask = 0, bmask = 0, amask = 0; + int right_way_up = 0; + unsigned char r, g, b, a; + int fsize = 0; + unsigned int bmpsize; + unsigned short res1, res2; + + /* for scale decoding */ + unsigned int *scale_surface = NULL, *scale_pix = NULL; + int scale_ratio = 1, image_w = 0, image_h = 0; + int row_size = 0; /* Row size is rounded up to a multiple of 4bytes */ + int read_line = 0; /* total read line */ + + + f = fopen(file, "rb"); + if (!f) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + fseek(f, 0, SEEK_END); + fsize = ftell(f); + fseek(f, 0, SEEK_SET); + if (fsize < 2) goto close_file; + + if (fread(buf, 2, 1, f) != 1) goto close_file; + if (strncmp(buf, "BM", 2)) goto close_file; // magic number + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + if (!read_uint(f, &bmpsize)) goto close_file; + if (!read_ushort(f, &res1)) goto close_file; + if (!read_ushort(f, &res2)) goto close_file; + if (!read_uint(f, &offset)) goto close_file; + if (!read_uint(f, &head_size)) goto close_file; + image_size = fsize - offset; + if (image_size < 1) goto close_file; + + if (head_size == 12) // OS/2 V1 + Windows 3.0 + { + short tmp; + + if (!read_short(f, &tmp)) goto close_file; + w = tmp; // width + if (!read_short(f, &tmp)) goto close_file; + h = tmp; // height + if (!read_short(f, &tmp)) goto close_file; + planes = tmp; // must be 1 + if (!read_short(f, &tmp)) goto close_file; + bit_count = tmp; // bits per pixel: 1, 4, 8 & 24 + } + else if (head_size == 64) // OS/2 V2 + { + short tmp; + int tmp2; + + if (!read_int(f, &tmp2)) goto close_file; + w = tmp2; // width + if (!read_int(f, &tmp2)) goto close_file; + h = tmp2; // height + if (!read_short(f, &tmp)) goto close_file; + planes = tmp; // must be 1 + if (!read_short(f, &tmp)) goto close_file; + bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 + if (!read_int(f, &tmp2)) goto close_file; + comp = tmp2; // compression method + if (!read_int(f, &tmp2)) goto close_file; + image_size = tmp2; // bitmap data size + if (!read_int(f, &tmp2)) goto close_file; + hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter + if (!read_int(f, &tmp2)) goto close_file; + vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter + if (!read_int(f, &tmp2)) goto close_file; + palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) + if (!read_int(f, &tmp2)) goto close_file; + important_colors = tmp2; // number of important colors - 0 if all + if (fread(buf, 24, 1, f) != 1) goto close_file; // skip unused header + if (image_size == 0) image_size = fsize - offset; + } + else if (head_size == 40) // Windows 3.0 + (v3) + { + short tmp; + int tmp2; + + if (!read_int(f, &tmp2)) goto close_file; + w = tmp2; // width + if (!read_int(f, &tmp2)) goto close_file; + h = tmp2; // height + if (!read_short(f, &tmp)) goto close_file; + planes = tmp; // must be 1 + if (!read_short(f, &tmp)) goto close_file; + bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 + if (!read_int(f, &tmp2)) goto close_file; + comp = tmp2; // compression method + if (!read_int(f, &tmp2)) goto close_file; + image_size = tmp2; // bitmap data size + if (!read_int(f, &tmp2)) goto close_file; + hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter + if (!read_int(f, &tmp2)) goto close_file; + vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter + if (!read_int(f, &tmp2)) goto close_file; + palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) + if (!read_int(f, &tmp2)) goto close_file; + important_colors = tmp2; // number of important colors - 0 if all + if (image_size == 0) image_size = fsize - offset; + if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way + } + else if (head_size == 108) // Windows 95/NT4 + (v4) + { + short tmp; + int tmp2; + + if (!read_int(f, &tmp2)) goto close_file; + w = tmp2; // width + if (!read_int(f, &tmp2)) goto close_file; + h = tmp2; // height + if (!read_short(f, &tmp)) goto close_file; + planes = tmp; // must be 1 + if (!read_short(f, &tmp)) goto close_file; + bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 + if (!read_int(f, &tmp2)) goto close_file; + comp = tmp2; // compression method + if (!read_int(f, &tmp2)) goto close_file; + image_size = tmp2; // bitmap data size + if (!read_int(f, &tmp2)) goto close_file; + hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter + if (!read_int(f, &tmp2)) goto close_file; + vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter + if (!read_int(f, &tmp2)) goto close_file; + palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) + if (!read_int(f, &tmp2)) goto close_file; + important_colors = tmp2; // number of important colors - 0 if all + if (!read_int(f, &tmp2)) goto close_file; + rmask = tmp2; // red mask + if (!read_int(f, &tmp2)) goto close_file; + gmask = tmp2; // green mask + if (!read_int(f, &tmp2)) goto close_file; + bmask = tmp2; // blue mask + if (!read_int(f, &tmp2)) goto close_file; + amask = tmp2; // alpha mask + if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie + if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma + if (image_size == 0) image_size = fsize - offset; + if ((amask) && (bit_count == 32)) hasa = 1; + } + else if (head_size == 124) // Windows 98/2000 + (v5) + { + short tmp; + int tmp2; + + if (!read_int(f, &tmp2)) goto close_file; + w = tmp2; // width + if (!read_int(f, &tmp2)) goto close_file; + h = tmp2; // height + if (!read_short(f, &tmp)) goto close_file; + planes = tmp; // must be 1 + if (!read_short(f, &tmp)) goto close_file; + bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 + if (!read_int(f, &tmp2)) goto close_file; + comp = tmp2; // compression method + if (!read_int(f, &tmp2)) goto close_file; + image_size = tmp2; // bitmap data size + if (!read_int(f, &tmp2)) goto close_file; + hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter + if (!read_int(f, &tmp2)) goto close_file; + vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter + if (!read_int(f, &tmp2)) goto close_file; + palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) + if (!read_int(f, &tmp2)) goto close_file; + important_colors = tmp2; // number of important colors - 0 if all + if (!read_int(f, &tmp2)) goto close_file; + rmask = tmp2; // red mask + if (!read_int(f, &tmp2)) goto close_file; + gmask = tmp2; // green mask + if (!read_int(f, &tmp2)) goto close_file; + bmask = tmp2; // blue mask + if (!read_int(f, &tmp2)) goto close_file; + amask = tmp2; // alpha mask + if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie + if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma + if (fread(buf, 16, 1, f) != 1) goto close_file; // skip others + if (image_size == 0) image_size = fsize - offset; + if ((amask) && (bit_count == 32)) hasa = 1; + } + else + goto close_file; + + if (h < 0) + { + h = -h; + right_way_up = 1; + } + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + if (IMG_TOO_BIG(w, h)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + goto close_file; + } + /* It is not bad idea that bmp loader support scale down decoding + * because of memory issue in mobile world. */ + if (ie->load_opts.scale_down_by > 1) + scale_ratio = ie->load_opts.scale_down_by; + image_w = w; + image_h = h; + + if (scale_ratio > 1) + { + w /= scale_ratio; + h /= scale_ratio; + + if ((w < 1) || (h < 1) ) + { + *error = EVAS_LOAD_ERROR_GENERIC; + goto close_file; + } + } + + if ((w != (int)ie->w) || (h != (int)ie->h)) + { + *error = EVAS_LOAD_ERROR_GENERIC; + goto close_file; + } + evas_cache_image_surface_alloc(ie, ie->w, ie->h); + surface = evas_cache_image_pixels(ie); + if (!surface) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + + row_size = ceil((double)(image_w * bit_count) / 32) * 4; + + if (bit_count < 16) + { + unsigned int i; + + if (bit_count == 1) + { + if ((palette_size <= 0) || (palette_size > 2)) pal_num = 2; + else pal_num = palette_size; + } + else if (bit_count == 4) + { + if ((palette_size <= 0) || (palette_size > 16)) pal_num = 16; + else pal_num = palette_size; + } + else if (bit_count == 8) + { + if ((palette_size <= 0) || (palette_size > 256)) pal_num = 256; + else pal_num = palette_size; + } + pal = alloca(256 * 4); + for (i = 0; i < pal_num; i++) + { + if (fread(&b, 1, 1, f) != 1) goto close_file; + if (fread(&g, 1, 1, f) != 1) goto close_file; + if (fread(&r, 1, 1, f) != 1) goto close_file; + if ((head_size != 12) /*&& (palette_size != 0)*/) + { // OS/2 V1 doesn't do the pad byte + if (fread(&a, 1, 1, f) != 1) goto close_file; + } + a = 0xff; // fillin a as solid for paletted images + pal[i] = ARGB_JOIN(a, r, g, b); + } + fseek(f, offset, SEEK_SET); + + if ((scale_ratio == 1) || (comp !=0)) + buffer = malloc(image_size + 8); // add 8 for padding to avoid checks + else + { + scale_surface = malloc(image_w * sizeof(DATA32)); //for one line decoding + if (!scale_surface) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + buffer = malloc(row_size); // scale down is usually set because of memory issue, so read line by line + } + + if (!buffer) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + if ((scale_ratio == 1) || (comp !=0)) + buffer_end = buffer + image_size; + else + buffer_end = buffer + row_size; + p = buffer; + + if ((scale_ratio == 1) || (comp !=0)) + { + if (fread(buffer, image_size, 1, f) != 1) goto close_file; + } + else + { + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + } + + if (bit_count == 1) + { + if (comp == 0) // no compression + { + pix = surface; + + for (y = 0; y < h; y++) + { + if (!right_way_up) pix = surface + ((h - 1 - y) * w); + if (scale_ratio > 1) pix = scale_surface; // one line decoding + + for (x = 0; x < image_w; x++) + { + if ((x & 0x7) == 0x0) + { + *pix = pal[*p >> 7]; + } + else if ((x & 0x7) == 0x1) + { + *pix = pal[(*p >> 6) & 0x1]; + } + else if ((x & 0x7) == 0x2) + { + *pix = pal[(*p >> 5) & 0x1]; + } + else if ((x & 0x7) == 0x3) + { + *pix = pal[(*p >> 4) & 0x1]; + } + else if ((x & 0x7) == 0x4) + { + *pix = pal[(*p >> 3) & 0x1]; + } + else if ((x & 0x7) == 0x5) + { + *pix = pal[(*p >> 2) & 0x1]; + } + else if ((x & 0x7) == 0x6) + { + *pix = pal[(*p >> 1) & 0x1]; + } + else + { + *pix = pal[*p & 0x1]; + p++; + } + if (p >= buffer_end) break; + pix++; + } + + if (scale_ratio > 1) + { + if (!right_way_up) scale_pix = surface + ((h - 1 - y) * w); + else scale_pix = surface + (y * w); + + pix = scale_surface; + for (x = 0; x < w; x++) + { + *scale_pix = *pix; + scale_pix ++; + pix += scale_ratio; + } + read_line += scale_ratio; + if (read_line >= image_h) break; + + fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + p = buffer; + buffer_end = buffer + row_size; + } + else + { + if ((x & 0x7) != 0) p++; + fix = (int)(((unsigned long)p) & 0x3); + if (fix > 0) p += 4 - fix; // align row read + if (p >= buffer_end) break; + } + } + } + else + goto close_file; + } + else if (bit_count == 4) + { + if (comp == 0) // no compression + { + pix = surface; + for (y = 0; y < h; y++) + { + if (!right_way_up) pix = surface + ((h - 1 - y) * w); + if (scale_ratio > 1) pix = scale_surface; // one line decoding + for (x = 0; x < image_w; x++) + { + if ((x & 0x1) == 0x1) + { + *pix = pal[*p & 0x0f]; + p++; + } + else + { + *pix = pal[*p >> 4]; + } + if (p >= buffer_end) break; + pix++; + } + if (scale_ratio > 1) + { + if (!right_way_up) scale_pix = surface + ((h - 1 - y) * w); + else scale_pix = surface + (y * w); + + pix = scale_surface; + for (x = 0; x < w; x++) + { + *scale_pix = *pix; + scale_pix ++; + pix += scale_ratio; + } + read_line += scale_ratio; + if (read_line >= image_h) break; + + fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + p = buffer; + buffer_end = buffer + row_size; + } + else + { + if ((x & 0x1) != 0) p++; + fix = (int)(((unsigned long)p) & 0x3); + if (fix > 0) p += 4 - fix; // align row read + if (p >= buffer_end) break; + } + } + } + else if (comp == 2) // rle 4bit/pixel + { + int count = 0, done = 0, wpad; + int scale_x = 0, scale_y = 0; + Eina_Bool scale_down_line = EINA_TRUE; + + pix = surface; + if (!right_way_up) pix = surface + ((h - 1 - y) * w); + wpad = ((image_w + 1) / 2) * 2; + while (p < buffer_end) + { + if (p[0]) + { + if (scale_down_line) + { + if ((x + p[0]) <= wpad) + { + unsigned int col1 = pal[p[1] >> 4]; + unsigned int col2 = pal[p[1] & 0xf]; + + count = p[0] / 2; + while (count > 0) + { + if (x < w) + { + if (((x % scale_ratio) == 0) && (scale_x < w)) + { + *pix = col1; + pix++; + scale_x++; + } + x++; + } + if (x < w) + { + if (((x % scale_ratio) == 0) && (scale_x < w)) + { + *pix = col2; + pix++; + scale_x++; + } + x++; + } + count--; + } + if (p[0] & 0x1) + { + if (((x % scale_ratio) == 0) && (scale_x < w)) + { + *pix = col1; + pix++; + scale_x++; + } + x++; + } + } + } + p += 2; + } + else + { + switch (p[1]) + { + case 0: // EOL + x = 0; + scale_x = 0; + y++; + if ((y % scale_ratio) == 0) + { + scale_y++; + scale_down_line = EINA_TRUE; + if (!right_way_up) + pix = surface + ((h - 1 - scale_y) * w); + else + pix = surface + (scale_y * w); + } + else + scale_down_line = EINA_FALSE; + if (scale_y >= h) + { + p = buffer_end; + } + p += 2; + break; + case 1: // EOB + p = buffer_end; + break; + case 2: // DELTA + x += p[2]; + y += p[3]; + scale_x = x / scale_ratio; + scale_y = y / scale_ratio; + if ((scale_x >= w) || (scale_y >= h)) + { + p = buffer_end; + } + if (!right_way_up) + pix = surface + scale_x + ((h - 1 - scale_y) * w); + else + pix = surface + scale_x + (scale_y * w); + p += 4; + break; + default: + count = p[1]; + if (((p + count) > buffer_end) || + ((x + count) > w)) + { + p = buffer_end; + break; + } + p += 2; + done = count; + count /= 2; + while (count > 0) + { + if (((x % scale_ratio) == 0) && (scale_x < w)) + { + *pix = pal[*p >> 4]; + pix++; + scale_x++; + } + x++; + if (((x % scale_ratio) == 0) && (scale_x < w)) + { + *pix = pal[*p & 0xf]; + pix++; + scale_x++; + } + x++; + + p++; + count--; + } + + if (done & 0x1) + { + if (((x % scale_ratio) == 0) && (scale_x < w)) + { + *pix = pal[*p >> 4]; + scale_x++; + } + x++; + p++; + } + if ((done & 0x3) == 0x1) + p += 2; + else if ((done & 0x3) == 0x2) + p += 1; + break; + } + } + } + } + else + goto close_file; + } + else if (bit_count == 8) + { + if (comp == 0) // no compression + { + pix = surface; + for (y = 0; y < h; y++) + { + if (!right_way_up) pix = surface + ((h - 1 - y) * w); + for (x = 0; x < w; x++) + { + *pix = pal[*p]; + p += scale_ratio; + if (p >= buffer_end) break; + pix++; + } + if (scale_ratio > 1) + { + read_line += scale_ratio; + if (read_line >= image_h) break; + + fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + p = buffer; + buffer_end = buffer + row_size; + } + else + { + fix = (int)(((unsigned long)p) & 0x3); + if (fix > 0) p += 4 - fix; // align row read + if (p >= buffer_end) break; + } + } + } + else if (comp == 1) // rle 8bit/pixel + { + int count = 0, done = 0; + int scale_x = 0, scale_y = 0; + Eina_Bool scale_down_line = EINA_TRUE; + + pix = surface; + if (!right_way_up) pix = surface + ((h - 1 - y) * w); + + while (p < buffer_end) + { + if (p[0]) + { + if (scale_down_line) + { + if ((x + p[0]) <= image_w) + { + unsigned int col = pal[p[1]]; + + count = p[0]; + while (count > 0) + { + if (((x % scale_ratio) == 0) && (scale_x < w)) + { + *pix = col; + pix++; + scale_x ++; + } + x++; + count--; + } + } + } + p += 2; + } + else + { + switch (p[1]) + { + case 0: // EOL + x = 0; + scale_x = 0; + y++; + if ((y % scale_ratio) == 0) + { + scale_y++; + scale_down_line = EINA_TRUE; + if (!right_way_up) + pix = surface + ((h - 1 - scale_y) * w); + else + pix = surface + (scale_y * w); + } + else + scale_down_line = EINA_FALSE; + + if (scale_y >= h) + { + p = buffer_end; + } + p += 2; + break; + case 1: // EOB + p = buffer_end; + break; + case 2: // DELTA + x += p[2]; + y += p[3]; + scale_x = x / scale_ratio; + scale_y = y / scale_ratio; + if ((scale_x >= w) || (scale_y >= h)) + { + p = buffer_end; + } + if (!right_way_up) + pix = surface + scale_x + ((h - 1 - scale_y) * w); + else + pix = surface + scale_x + (scale_y * w); + p += 4; + break; + default: + count = p[1]; + if (((p + count) > buffer_end) || + ((x + count) > image_w)) + { + p = buffer_end; + break; + } + p += 2; + done = count; + while (count > 0) + { + if (((x % scale_ratio) == 0) && (scale_x < w)) + { + *pix = pal[*p]; + pix++; + scale_x ++; + } + p++; + x++; + count--; + } + if (done & 0x1) p++; + break; + } + } + } + } + else + goto close_file; + } + } + else if ((bit_count == 16) || (bit_count == 24) || (bit_count == 32)) + { + if (comp == 0) // no compression + { + fseek(f, offset, SEEK_SET); + if (scale_ratio == 1) + buffer = malloc(image_size + 8); // add 8 for padding to avoid checks + else + buffer = malloc(row_size); // scale down is usually set because of memory issue, so read line by line + if (!buffer) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + if (scale_ratio == 1) + buffer_end = buffer + image_size; + else + buffer_end = buffer + row_size; + + p = buffer; + if (scale_ratio == 1) + { + if (fread(buffer, image_size, 1, f) != 1) goto close_file; + } + else + { + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + } + if (bit_count == 16) + { + unsigned short tmp; + + pix = surface; + for (y = 0; y < h; y++) + { + if (!right_way_up) pix = surface + ((h - 1 - y) * w); + for (x = 0; x < w; x++) + { + tmp = *((unsigned short *)(p)); + + r = (tmp >> 7) & 0xf8; r |= r >> 5; + g = (tmp >> 2) & 0xf8; g |= g >> 5; + b = (tmp << 3) & 0xf8; b |= b >> 5; + *pix = ARGB_JOIN(0xff, r, g, b); + + p += 2 * scale_ratio; + + if (p >= buffer_end) break; + pix++; + } + if (scale_ratio > 1) + { + read_line += scale_ratio; + if (read_line >= image_h) break; + + fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + p = buffer; + buffer_end = buffer + row_size; + } + else + { + fix = (int)(((unsigned long)p) & 0x3); + if (fix > 0) p += 4 - fix; // align row read + if (p >= buffer_end) break; + } + } + } + else if (bit_count == 24) + { + pix = surface; + for (y = 0; y < h; y++) + { + if (!right_way_up) pix = surface + ((h - 1 - y) * w); + for (x = 0; x < w; x++) + { + b = p[0]; + g = p[1]; + r = p[2]; + *pix = ARGB_JOIN(0xff, r, g, b); + p += 3 * scale_ratio; + if (p >= buffer_end) break; + pix++; + } + if (scale_ratio > 1) + { + read_line += scale_ratio; + if (read_line >= image_h) break; + + fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + p = buffer; + buffer_end = buffer + row_size; + } + else + { + fix = (int)(((unsigned long)p) & 0x3); + if (fix > 0) p += 4 - fix; // align row read + if (p >= buffer_end) break; + } + } + } + else if (bit_count == 32) + { + int none_zero_alpha = 0; + pix = surface; + for (y = 0; y < h; y++) + { + if (!right_way_up) pix = surface + ((h - 1 - y) * w); + for (x = 0; x < w; x++) + { + b = p[0]; + g = p[1]; + r = p[2]; + a = p[3]; + if (a) none_zero_alpha = 1; + if (!hasa) a = 0xff; + *pix = ARGB_JOIN(a, r, g, b); + p += 4 * scale_ratio; + + if (p >= buffer_end) break; + pix++; + } + if (scale_ratio > 1) + { + read_line += scale_ratio; + if (read_line >= image_h) break; + + fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + p = buffer; + buffer_end = buffer + row_size; + } + else + { + fix = (int)(((unsigned long)p) & 0x3); + if (fix > 0) p += 4 - fix; // align row read + if (p >= buffer_end) break; + } + } + if (!none_zero_alpha) + { + ie->flags.alpha = 0; + if (hasa) + { + unsigned int *pixend = surface + (w * h); + + for (pix = surface; pix < pixend; pix++) + A_VAL(pix) = 0xff; + } + } + } + else + goto close_file; + } + else if (comp == 3) // bit field + { + if (!read_uint(f, &rmask)) goto close_file; + if (!read_uint(f, &gmask)) goto close_file; + if (!read_uint(f, &bmask)) goto close_file; + + fseek(f, offset, SEEK_SET); + if (scale_ratio == 1) + buffer = malloc(image_size + 8); // add 8 for padding to avoid checks + else + buffer = malloc(row_size); // scale down is usually set because of memory issue, so read line by line + + if (!buffer) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + if (scale_ratio == 1) + buffer_end = buffer + image_size; + else + buffer_end = buffer + row_size; + + p = buffer; + if (scale_ratio == 1) + { + if (fread(buffer, image_size, 1, f) != 1) goto close_file; + } + else + { + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + } + + if ((bit_count == 16) && + (rmask == 0xf800) && (gmask == 0x07e0) && (bmask == 0x001f) + ) + { + unsigned short tmp; + + pix = surface; + for (y = 0; y < h; y++) + { + if (!right_way_up) pix = surface + ((h - 1 - y) * w); + for (x = 0; x < w; x++) + { + tmp = *((unsigned short *)(p)); + + r = (tmp >> 8) & 0xf8; r |= r >> 5; + g = (tmp >> 3) & 0xfc; g |= g >> 6; + b = (tmp << 3) & 0xf8; b |= b >> 5; + *pix = ARGB_JOIN(0xff, r, g, b); + + p += 2 * scale_ratio; + + if (p >= buffer_end) break; + pix++; + } + if (scale_ratio > 1) + { + read_line += scale_ratio; + if (read_line >= image_h) break; + fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + p = buffer; + buffer_end = buffer + row_size; + } + else + { + fix = (int)(((unsigned long)p) & 0x3); + if (fix > 0) p += 4 - fix; // align row read + if (p >= buffer_end) break; + } + } + } + else if ((bit_count == 16) && + (rmask == 0x7c00) && (gmask == 0x03e0) && (bmask == 0x001f) + ) + { + unsigned short tmp; + pix = surface; + for (y = 0; y < h; y++) + { + if (!right_way_up) pix = surface + ((h - 1 - y) * w); + for (x = 0; x < w; x++) + { + tmp = *((unsigned short *)(p)); + + r = (tmp >> 7) & 0xf8; r |= r >> 5; + g = (tmp >> 2) & 0xf8; g |= g >> 5; + b = (tmp << 3) & 0xf8; b |= b >> 5; + *pix = ARGB_JOIN(0xff, r, g, b); + p += 2 * scale_ratio; + + if (p >= buffer_end) break; + pix++; + } + if (scale_ratio > 1) + { + read_line += scale_ratio; + if (read_line >= image_h) break; + fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + p = buffer; + buffer_end = buffer + row_size; + } + else + { + fix = (int)(((unsigned long)p) & 0x3); + if (fix > 0) p += 4 - fix; // align row read + if (p >= buffer_end) break; + } + } + } + else if (bit_count == 32) + { + pix = surface; + for (y = 0; y < h; y++) + { + if (!right_way_up) pix = surface + ((h - 1 - y) * w); + for (x = 0; x < w; x++) + { + b = p[0]; + g = p[1]; + r = p[2]; + a = p[3]; + if (!hasa) a = 0xff; + *pix = ARGB_JOIN(a, r, g, b); + + p += 4 * scale_ratio; + + if (p >= buffer_end) break; + pix++; + } + if (scale_ratio > 1) + { + read_line += scale_ratio; + if (read_line >= image_h) break; + fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); + if (fread(buffer, row_size, 1, f) != 1) goto close_file; + p = buffer; + buffer_end = buffer + row_size; + } + else + { + fix = (int)(((unsigned long)p) & 0x3); + if (fix > 0) p += 4 - fix; // align row read + if (p >= buffer_end) break; + } + } + } + else + goto close_file; + } + else if (comp == 4) // jpeg - only printer drivers + { + goto close_file; + } + else if (comp == 3) // png - only printer drivers + { + goto close_file; + } + else + goto close_file; + } + else + goto close_file; + + if (buffer) free(buffer); + if (scale_surface) free(scale_surface); + fclose(f); + + evas_common_image_premul(ie); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + + close_file: + if (buffer) free(buffer); + if (scale_surface) free(scale_surface); + fclose(f); + return EINA_FALSE; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_bmp_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "bmp", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, bmp); + +#ifndef EVAS_STATIC_BUILD_BMP +EVAS_EINA_MODULE_DEFINE(image_loader, bmp); +#endif diff --git a/libraries/evas/src/modules/loaders/edb/Makefile.am b/libraries/evas/src/modules/loaders/edb/Makefile.am new file mode 100644 index 0000000..a0baf6b --- /dev/null +++ b/libraries/evas/src/modules/loaders/edb/Makefile.am @@ -0,0 +1,34 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_image_loader_edb_cflags@ \ +@EINA_CFLAGS@ + + +if BUILD_LOADER_EDB +if !EVAS_STATIC_BUILD_EDB + +pkgdir = $(libdir)/evas/modules/loaders/edb/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_edb.c + +module_la_LIBADD = @evas_image_loader_edb_libs@ @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_edb.la + +libevas_loader_edb_la_SOURCES = evas_image_load_edb.c +libevas_loader_edb_la_LIBADD = @evas_image_loader_edb_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/loaders/edb/Makefile.in b/libraries/evas/src/modules/loaders/edb/Makefile.in new file mode 100644 index 0000000..38c1fa2 --- /dev/null +++ b/libraries/evas/src/modules/loaders/edb/Makefile.in @@ -0,0 +1,757 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/edb +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_edb_la_DEPENDENCIES = +am__libevas_loader_edb_la_SOURCES_DIST = evas_image_load_edb.c +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_TRUE@am_libevas_loader_edb_la_OBJECTS = evas_image_load_edb.lo +libevas_loader_edb_la_OBJECTS = $(am_libevas_loader_edb_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_TRUE@am_libevas_loader_edb_la_rpath = +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_edb.c +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_edb.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@ -rpath \ +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_edb_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_edb_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_image_loader_edb_cflags@ \ +@EINA_CFLAGS@ + +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@pkgdir = $(libdir)/evas/modules/loaders/edb/$(MODULE_ARCH) +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@module_la_SOURCES = evas_image_load_edb.c +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@module_la_LIBADD = @evas_image_loader_edb_libs@ @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@module_la_LDFLAGS = -no-undefined -module -avoid-version +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_TRUE@noinst_LTLIBRARIES = libevas_loader_edb.la +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_TRUE@libevas_loader_edb_la_SOURCES = evas_image_load_edb.c +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_TRUE@libevas_loader_edb_la_LIBADD = @evas_image_loader_edb_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/edb/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/edb/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_edb.la: $(libevas_loader_edb_la_OBJECTS) $(libevas_loader_edb_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_edb_la_rpath) $(libevas_loader_edb_la_OBJECTS) $(libevas_loader_edb_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_edb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_edb.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_edb.lo: evas_image_load_edb.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_edb.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_edb.Tpo -c -o module_la-evas_image_load_edb.lo `test -f 'evas_image_load_edb.c' || echo '$(srcdir)/'`evas_image_load_edb.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_edb.Tpo $(DEPDIR)/module_la-evas_image_load_edb.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_edb.c' object='module_la-evas_image_load_edb.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_edb.lo `test -f 'evas_image_load_edb.c' || echo '$(srcdir)/'`evas_image_load_edb.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c b/libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c new file mode 100644 index 0000000..94b121e --- /dev/null +++ b/libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c @@ -0,0 +1,250 @@ +#include "evas_common.h" +#include "evas_private.h" + +#include +#include + + +#define SWAP32(x) (x) = ((((x) & 0x000000ff ) << 24) | (((x) & 0x0000ff00 ) << 8) | (((x) & 0x00ff0000 ) >> 8) | (((x) & 0xff000000 ) >> 24)) + + +static Eina_Bool evas_image_load_file_head_edb(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_edb(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +static Evas_Image_Load_Func evas_image_load_edb_func = +{ + EINA_TRUE, + evas_image_load_file_head_edb, + evas_image_load_file_data_edb, + NULL +}; + +static Eina_Bool +evas_image_load_file_head_edb(Image_Entry *ie, const char *file, const char *key, int *error) +{ + int w, h, alpha, compression, size; + E_DB_File *db; + DATA32 *ret; + DATA32 header[8]; + + if (!key) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + db = e_db_open_read((char *)file); + if (!db) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + ret = e_db_data_get(db, (char *)key, &size); + if (!ret) + { + e_db_close(db); + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + if (size < 32) + { + free(ret); + e_db_close(db); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + memcpy(header, ret, 32); +#ifdef WORDS_BIGENDIAN + { + int i; + + for (i = 0; i < 8; i++) SWAP32(header[i]); + } +#endif + if (header[0] != 0xac1dfeed) + { + free(ret); + e_db_close(db); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + w = header[1]; + h = header[2]; + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + free(ret); + e_db_close(db); + if (IMG_TOO_BIG(w, h)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + alpha = header[3]; + compression = header[4]; + + if ((compression == 0) && (size < ((w * h * 4) + 32))) + { + free(ret); + e_db_close(db); + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + if (alpha) ie->flags.alpha = 1; + ie->w = w; + ie->h = h; + free(ret); + e_db_close(db); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +static Eina_Bool +evas_image_load_file_data_edb(Image_Entry *ie, const char *file, const char *key, int *error) +{ + int w, h, alpha, compression, size; + E_DB_File *db; + DATA32 *ret; + DATA32 *body; + DATA32 *surface; + DATA32 header[8]; + + if (!key) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + db = e_db_open_read((char *)file); + if (!db) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + ret = e_db_data_get(db, (char *)key, &size); + if (!ret) + { + e_db_close(db); + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + if (size < 32) + { + free(ret); + e_db_close(db); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + memcpy(header, ret, 32); +#ifdef WORDS_BIGENDIAN + { + int i; + + for (i = 0; i < 8; i++) SWAP32(header[i]); + } +#endif + if (header[0] != 0xac1dfeed) + { + free(ret); + e_db_close(db); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + w = header[1]; + h = header[2]; + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + free(ret); + e_db_close(db); + if (IMG_TOO_BIG(w, h)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + + alpha = header[3]; + compression = header[4]; + + if ((compression == 0) && (size < ((w * h * 4) + 32))) + { + free(ret); + e_db_close(db); + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + if (alpha) ie->flags.alpha = 1; + body = &(ret[8]); + evas_cache_image_surface_alloc(ie, w, h); + surface = evas_cache_image_pixels(ie); + if (!surface) + { + free(ret); + e_db_close(db); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + if (!compression) + { +#ifdef WORDS_BIGENDIAN + { + int x; + + memcpy(surface, body, w * h * sizeof(DATA32)); + for (x = 0; x < (w * h); x++) SWAP32(surface[x]); + } +#else + memcpy(surface, body, w * h * sizeof(DATA32)); +#endif + } + else + { + uLongf dlen; + + dlen = w * h * sizeof(DATA32); + uncompress((Bytef *)surface, &dlen, (Bytef *)body, + (uLongf)(size - 32)); +#ifdef WORDS_BIGENDIAN + { + int x; + + for (x = 0; x < (w * h); x++) SWAP32(surface[x]); + } +#endif + } + evas_common_image_premul(ie); + free(ret); + e_db_close(db); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_edb_func); + return 1; +} + +static void +module_close(Evas_Module *em) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "edb", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, edb); + +#ifndef EVAS_STATIC_BUILD_EDB +EVAS_EINA_MODULE_DEFINE(image_loader, edb); +#endif diff --git a/libraries/evas/src/modules/loaders/eet/Makefile.am b/libraries/evas/src/modules/loaders/eet/Makefile.am new file mode 100644 index 0000000..c96a8d3 --- /dev/null +++ b/libraries/evas/src/modules/loaders/eet/Makefile.am @@ -0,0 +1,36 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_image_loader_eet_cflags@ \ +@EINA_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + + +if BUILD_LOADER_EET +if !EVAS_STATIC_BUILD_EET + +pkgdir = $(libdir)/evas/modules/loaders/eet/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_eet.c + +module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_eet_libs@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_eet.la + +libevas_loader_eet_la_SOURCES = evas_image_load_eet.c +libevas_loader_eet_la_LIBADD = @evas_image_loader_eet_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/loaders/eet/Makefile.in b/libraries/evas/src/modules/loaders/eet/Makefile.in new file mode 100644 index 0000000..6a6c40e --- /dev/null +++ b/libraries/evas/src/modules/loaders/eet/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/eet +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_eet_la_DEPENDENCIES = +am__libevas_loader_eet_la_SOURCES_DIST = evas_image_load_eet.c +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_TRUE@am_libevas_loader_eet_la_OBJECTS = evas_image_load_eet.lo +libevas_loader_eet_la_OBJECTS = $(am_libevas_loader_eet_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_TRUE@am_libevas_loader_eet_la_rpath = +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_eet.c +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_eet.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@ -rpath \ +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_eet_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_eet_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_image_loader_eet_cflags@ \ +@EINA_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@pkgdir = $(libdir)/evas/modules/loaders/eet/$(MODULE_ARCH) +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@module_la_SOURCES = evas_image_load_eet.c +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_eet_libs@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_TRUE@noinst_LTLIBRARIES = libevas_loader_eet.la +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_TRUE@libevas_loader_eet_la_SOURCES = evas_image_load_eet.c +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_TRUE@libevas_loader_eet_la_LIBADD = @evas_image_loader_eet_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/eet/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/eet/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_eet.la: $(libevas_loader_eet_la_OBJECTS) $(libevas_loader_eet_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_eet_la_rpath) $(libevas_loader_eet_la_OBJECTS) $(libevas_loader_eet_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_eet.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_eet.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_eet.lo: evas_image_load_eet.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_eet.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_eet.Tpo -c -o module_la-evas_image_load_eet.lo `test -f 'evas_image_load_eet.c' || echo '$(srcdir)/'`evas_image_load_eet.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_eet.Tpo $(DEPDIR)/module_la-evas_image_load_eet.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_eet.c' object='module_la-evas_image_load_eet.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_eet.lo `test -f 'evas_image_load_eet.c' || echo '$(srcdir)/'`evas_image_load_eet.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c b/libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c new file mode 100644 index 0000000..a187b9e --- /dev/null +++ b/libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c @@ -0,0 +1,182 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" /* so that EAPI in Eet.h is correctly defined */ +#endif + +#include + +#include "evas_common.h" +#include "evas_private.h" + + +static Eina_Bool evas_image_load_file_head_eet(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_eet(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +Evas_Image_Load_Func evas_image_load_eet_func = +{ + EINA_TRUE, + evas_image_load_file_head_eet, + evas_image_load_file_data_eet, + NULL +}; + + +static Eina_Bool +evas_image_load_file_head_eet(Image_Entry *ie, const char *file, const char *key, int *error) +{ + int alpha, compression, quality, lossy; + unsigned int w, h; + Eet_File *ef; + int ok; + Eina_Bool res = EINA_FALSE; + + if (!key) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + ef = eet_open((char *)file, EET_FILE_MODE_READ); + if (!ef) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + ok = eet_data_image_header_read(ef, key, + &w, &h, &alpha, &compression, &quality, &lossy); + if (!ok) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + goto on_error; + } + if (IMG_TOO_BIG(w, h)) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto on_error; + } + if (alpha) ie->flags.alpha = 1; + ie->w = w; + ie->h = h; + res = EINA_TRUE; + *error = EVAS_LOAD_ERROR_NONE; + + on_error: + eet_close(ef); + return res; +} + +Eina_Bool +evas_image_load_file_data_eet(Image_Entry *ie, const char *file, const char *key, int *error) +{ + unsigned int w, h; + int alpha, compression, quality, lossy, ok; + Eet_File *ef; + DATA32 *body, *p, *end, *data; + DATA32 nas = 0; + Eina_Bool res = EINA_FALSE; + + if (!key) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + if (ie->flags.loaded) + { + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + } + ef = eet_open(file, EET_FILE_MODE_READ); + if (!ef) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + ok = eet_data_image_header_read(ef, key, + &w, &h, &alpha, &compression, &quality, &lossy); + if (IMG_TOO_BIG(w, h)) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto on_error; + } + if (!ok) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + goto on_error; + } + evas_cache_image_surface_alloc(ie, w, h); + data = evas_cache_image_pixels(ie); + if (!data) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto on_error; + } + ok = eet_data_image_read_to_surface(ef, key, 0, 0, + data, w, h, w * 4, + &alpha, &compression, &quality, &lossy); + if (!ok) + { + *error = EVAS_LOAD_ERROR_GENERIC; + goto on_error; + } + if (alpha) + { + ie->flags.alpha = 1; + + body = evas_cache_image_pixels(ie); + + end = body +(w * h); + for (p = body; p < end; p++) + { + DATA32 r, g, b, a; + + a = A_VAL(p); + r = R_VAL(p); + g = G_VAL(p); + b = B_VAL(p); + if ((a == 0) || (a == 255)) nas++; + if (r > a) r = a; + if (g > a) g = a; + if (b > a) b = a; + *p = ARGB_JOIN(a, r, g, b); + } + if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ie->w * ie->h)) + ie->flags.alpha_sparse = 1; + } +// result is already premultiplied now if u compile with edje +// evas_common_image_premul(im); + *error = EVAS_LOAD_ERROR_NONE; + res = EINA_TRUE; + + on_error: + eet_close(ef); + return res; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_eet_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "eet", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, eet); + +#ifndef EVAS_STATIC_BUILD_EET +EVAS_EINA_MODULE_DEFINE(image_loader, eet); +#endif diff --git a/libraries/evas/src/modules/loaders/generic/Makefile.am b/libraries/evas/src/modules/loaders/generic/Makefile.am new file mode 100644 index 0000000..a9e522e --- /dev/null +++ b/libraries/evas/src/modules/loaders/generic/Makefile.am @@ -0,0 +1,38 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_image_loader_generic_cflags@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + + +if BUILD_LOADER_GENERIC +if !EVAS_STATIC_BUILD_GENERIC + +pkgdir = $(libdir)/evas/modules/loaders/generic/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_generic.c + +module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_generic_libs@ @SHM_OPEN_LINK@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_generic.la + +libevas_loader_generic_la_SOURCES = evas_image_load_generic.c +libevas_loader_generic_la_LIBADD = @evas_image_loader_generic_libs@ @SHM_OPEN_LINK@ + +endif +endif diff --git a/libraries/evas/src/modules/loaders/generic/Makefile.in b/libraries/evas/src/modules/loaders/generic/Makefile.in new file mode 100644 index 0000000..65a0bac --- /dev/null +++ b/libraries/evas/src/modules/loaders/generic/Makefile.in @@ -0,0 +1,761 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/generic +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_generic_la_DEPENDENCIES = +am__libevas_loader_generic_la_SOURCES_DIST = \ + evas_image_load_generic.c +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_TRUE@am_libevas_loader_generic_la_OBJECTS = evas_image_load_generic.lo +libevas_loader_generic_la_OBJECTS = \ + $(am_libevas_loader_generic_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_TRUE@am_libevas_loader_generic_la_rpath = +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_generic.c +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_generic.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_FALSE@am_module_la_rpath = -rpath \ +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_generic_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_generic_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_image_loader_generic_cflags@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_FALSE@pkgdir = $(libdir)/evas/modules/loaders/generic/$(MODULE_ARCH) +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_FALSE@module_la_SOURCES = evas_image_load_generic.c +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_FALSE@module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_generic_libs@ @SHM_OPEN_LINK@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_TRUE@noinst_LTLIBRARIES = libevas_loader_generic.la +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_TRUE@libevas_loader_generic_la_SOURCES = evas_image_load_generic.c +@BUILD_LOADER_GENERIC_TRUE@@EVAS_STATIC_BUILD_GENERIC_TRUE@libevas_loader_generic_la_LIBADD = @evas_image_loader_generic_libs@ @SHM_OPEN_LINK@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/generic/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/generic/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_generic.la: $(libevas_loader_generic_la_OBJECTS) $(libevas_loader_generic_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_generic_la_rpath) $(libevas_loader_generic_la_OBJECTS) $(libevas_loader_generic_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_generic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_generic.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_generic.lo: evas_image_load_generic.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_generic.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_generic.Tpo -c -o module_la-evas_image_load_generic.lo `test -f 'evas_image_load_generic.c' || echo '$(srcdir)/'`evas_image_load_generic.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_generic.Tpo $(DEPDIR)/module_la-evas_image_load_generic.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_generic.c' object='module_la-evas_image_load_generic.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_generic.lo `test -f 'evas_image_load_generic.c' || echo '$(srcdir)/'`evas_image_load_generic.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c b/libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c new file mode 100644 index 0000000..88c189d --- /dev/null +++ b/libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c @@ -0,0 +1,430 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifdef HAVE_EVIL +# include +#endif + +#include "evas_common.h" +#include "evas_private.h" + +#include +#include +#include +#include +#include +#include + +static Eina_Bool evas_image_load_file_head_generic(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_generic(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +Evas_Image_Load_Func evas_image_load_generic_func = +{ + EINA_TRUE, + evas_image_load_file_head_generic, + evas_image_load_file_data_generic, + NULL +}; + +static Eina_Bool +illegal_char(const char *str) +{ + const char *p; + + for (p = str; *p; p++) + { + if (*p < '-') return EINA_TRUE; + if (*p == '/') return EINA_TRUE; + if (*p == ';') return EINA_TRUE; + if (*p == ':') return EINA_TRUE; + if (*p == '<') return EINA_TRUE; + if (*p == '>') return EINA_TRUE; + if (*p == '?') return EINA_TRUE; + if (*p == '[') return EINA_TRUE; + if (*p == '\\') return EINA_TRUE; + if (*p == ']') return EINA_TRUE; + if (*p == '`') return EINA_TRUE; + if (*p == '{') return EINA_TRUE; + if (*p == '|') return EINA_TRUE; + if (*p == '}') return EINA_TRUE; + if (*p == '~') return EINA_TRUE; + if (*p == 0x7f) return EINA_TRUE; + } + return EINA_FALSE; +} + +static void +escape_copy(const char *src, char *dst) +{ + const char *s; + char *d; + + for (s = src, d = dst; *s; s++, d++) + { + // FIXME: escape tab, newline linefeed and friends + if ((*s == ' ') || + (*s == '!') || + (*s == '"') || + (*s == '#') || + (*s == '$') || + (*s == '%') || + (*s == '&') || + (*s == '\'') || + (*s == '(') || + (*s == ')') || + (*s == '*') || + (*s == '[') || + (*s == '\\') || + (*s == ']') || + (*s == '`') || + (*s == '{') || + (*s == '|') || + (*s == '}') || + (*s == '~')) + { + *d = '\\'; + d++; + } + *d = *s; + } + *d = 0; +} + +static void +dotcat(char *dest, const char *src) +{ + int len = strlen(dest); + const char *s; + char *d; + + for (d = dest + len, s = src; *s; d++, s++) *d = tolower(*s); + *d = 0; +} + +static Eina_Bool +_load(Image_Entry *ie, const char *file, const char *key, int *error, Eina_Bool get_data) +{ + Eina_Bool res = EINA_FALSE; + int w = 0, h = 0, alpha = 0; + const char *dot1 = NULL, *dot2 = NULL, *end, *p; + char *cmd = NULL, decoders[3][128], buf[4096]; + char *loader = "/evas/utils/evas_image_loader"; + char *img_loader = NULL; + const char *libdir; + // eg $libdir/evas/generic_loaders + int cmd_len, len, decoders_num = 0, try_count = 0; + int read_data = 0; + char *tmpfname = NULL, *shmfname = NULL; + DATA32 *body; + FILE *f; + + libdir = _evas_module_libdir_get(); + cmd_len = strlen(libdir); + cmd_len += strlen(loader); + img_loader = alloca(cmd_len + 1); + strcpy(img_loader, libdir); + strcat(img_loader, loader); + // params excluding file, key and loadopts + cmd_len += 1024; + cmd_len += strlen(file) * 2; + if (key) cmd_len += strlen(key) * 2; + cmd = alloca(cmd_len + 1); + + len = strlen(file); + if (len < 1) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + end = file + len; + for (p = end - 1; p >= file; p--) + { + if ((!dot1) && (*p == '.')) dot1 = p; + else if ((!dot2) && (*p == '.')) dot2 = p; + else if ((dot1) && (dot2)) break; + } + if (dot2) + { + // double extn not too long + if (((end - dot2) <= 10) && (!illegal_char(dot2))) + { + strcpy(&(decoders[decoders_num][0]), img_loader); + dotcat(&(decoders[decoders_num][0]), dot2); + decoders_num++; + } + // single extn not too long + if (((end - dot1) <= 5) && (!illegal_char(dot1))) + { + strcpy(&(decoders[decoders_num][0]), img_loader); + dotcat(&(decoders[decoders_num][0]), dot1); + decoders_num++; + } + strcpy(decoders[decoders_num], img_loader); + decoders_num++; + } + else if (dot1) + { + // single extn not too long + if (((end - dot1) <= 5) && (!illegal_char(dot1))) + { + strcpy(&(decoders[decoders_num][0]), img_loader); + dotcat(&(decoders[decoders_num][0]), dot1); + decoders_num++; + } + strcpy(decoders[decoders_num], img_loader); + decoders_num++; + } + else + { + strcpy(decoders[decoders_num], img_loader); + decoders_num++; + } + + for (try_count = 0; try_count < decoders_num; try_count++) + { + // FIXME: strcats could be more efficient, not that it matters much + // here as we are about to build a cmd to exec via a shell that + // will interpret shell stuff and path hunt that will then exec the + // program itself that will dynamically link that will again + // parse the arguments and finally do something... + strcpy(cmd, decoders[try_count]); + strcat(cmd, " "); + // filename first arg + len = strlen(cmd); + escape_copy(file, cmd + len); + if (!get_data) + { + strcat(cmd, " -head "); + } + if (key) + { + strcat(cmd, " -key "); + len = strlen(cmd); + escape_copy(key, cmd + len); + } + if (ie->load_opts.scale_down_by > 1) + { + strcat(cmd, " -opt-scale-down-by "); + snprintf(buf, sizeof(buf), "%i", ie->load_opts.scale_down_by); + strcat(cmd, buf); + } + if (ie->load_opts.dpi > 0.0) + { + strcat(cmd, " -opt-dpi "); + snprintf(buf, sizeof(buf), "%i", (int)(ie->load_opts.dpi * 1000.0)); + strcat(cmd, buf); + } + if ((ie->load_opts.w > 0) && + (ie->load_opts.h > 0)) + { + strcat(cmd, " -opt-size "); + snprintf(buf, sizeof(buf), "%i %i", ie->load_opts.w, ie->load_opts.h); + strcat(cmd, buf); + } + f = popen(cmd, "r"); + if (f) break; + } + if (!f) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + while (fgets(buf, sizeof(buf), f)) + { + len = strlen(buf); + if (len > 0) + { + if (buf[len - 1] == '\n') buf[len - 1] = 0; + if (!strncmp(buf, "size ", 5)) + { + int tw = 0, th = 0; + + len = sscanf(buf, "%*s %i %i", &tw, &th); + if (len == 2) + { + if ((tw > 0) && (th > 0)) + { + w = tw; + h = th; + } + } + } + else if (!strncmp(buf, "alpha ", 6)) + { + int ta; + + len = sscanf(buf, "%*s %i", &ta); + if (len == 1) + { + alpha = ta; + } + } + else if (!strncmp(buf, "tmpfile ", 8)) + { + tmpfname = buf + 8; + goto getdata; + } +#ifdef HAVE_SHM_OPEN + else if (!strncmp(buf, "shmfile ", 8)) + { + shmfname = buf + 8; + goto getdata; + } +#endif + else if (!strncmp(buf, "data", 4)) + { + read_data = 1; + goto getdata; + } + else if (!strncmp(buf, "done", 4)) + { + read_data = 2; + goto getdata; + } + } + } +getdata: + if ((!read_data) && (!tmpfname) && (!shmfname)) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + goto on_error; + } + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto on_error; + } + body = evas_cache_image_pixels(ie); + if (body) + { + if ((w != (int)ie->w) || (h != (int)ie->h)) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + goto on_error; + } + } + if (alpha) ie->flags.alpha = 1; + ie->w = w; + ie->h = h; + + if (get_data) + { + if (!body) evas_cache_image_surface_alloc(ie, ie->w, ie->h); + body = evas_cache_image_pixels(ie); + if (!body) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto on_error; + } + + if ((tmpfname) || (shmfname)) + { + int fd = -1; + + // open + if (tmpfname) + fd = open(tmpfname, O_RDONLY, S_IRUSR); +#ifdef HAVE_SHM_OPEN + else if (shmfname) + fd = shm_open(shmfname, O_RDONLY, S_IRUSR); +#endif + if (fd >= 0) + { + void *addr; + + eina_mmap_safety_enabled_set(EINA_TRUE); + + // mmap + addr = mmap(NULL, w * h * sizeof(DATA32), + PROT_READ, MAP_SHARED, fd, 0); + if (addr != MAP_FAILED) + { + memcpy(body, addr, w * h * sizeof(DATA32)); + munmap(addr, w * h * sizeof(DATA32)); + } + // close + if (tmpfname) + { + close(fd); + unlink(tmpfname); + } +#ifdef HAVE_SHM_OPEN + else if (shmfname) + { + close(fd); + shm_unlink(shmfname); + } +#endif + } + else + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto on_error; + } + } + else if (read_data) + { + if (fread(body, w * h * sizeof(DATA32), 1, f) != 1) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + goto on_error; + } + } + } + + res = EINA_TRUE; + *error = EVAS_LOAD_ERROR_NONE; + + on_error: + if (f) pclose(f); + return res; +} + +static Eina_Bool +evas_image_load_file_head_generic(Image_Entry *ie, const char *file, const char *key, int *error) +{ + return _load(ie, file, key, error, EINA_FALSE); +} + +static Eina_Bool +evas_image_load_file_data_generic(Image_Entry *ie, const char *file, const char *key, int *error) +{ + DATA32 *body; + + body = evas_cache_image_pixels(ie); + if (!body) return _load(ie, file, key, error, EINA_TRUE); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_generic_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "generic", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, generic); + +#ifndef EVAS_STATIC_BUILD_GENERIC +EVAS_EINA_MODULE_DEFINE(image_loader, generic); +#endif diff --git a/libraries/evas/src/modules/loaders/gif/Makefile.am b/libraries/evas/src/modules/loaders/gif/Makefile.am new file mode 100644 index 0000000..9234370 --- /dev/null +++ b/libraries/evas/src/modules/loaders/gif/Makefile.am @@ -0,0 +1,35 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_image_loader_gif_cflags@ \ +@EINA_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_LOADER_GIF +if !EVAS_STATIC_BUILD_GIF + +pkgdir = $(libdir)/evas/modules/loaders/gif/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_gif.c + +module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_gif_libs@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_gif.la + +libevas_loader_gif_la_SOURCES = evas_image_load_gif.c +libevas_loader_gif_la_LIBADD = @evas_image_loader_gif_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/loaders/gif/Makefile.in b/libraries/evas/src/modules/loaders/gif/Makefile.in new file mode 100644 index 0000000..7fcd6a7 --- /dev/null +++ b/libraries/evas/src/modules/loaders/gif/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/gif +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_gif_la_DEPENDENCIES = +am__libevas_loader_gif_la_SOURCES_DIST = evas_image_load_gif.c +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_TRUE@am_libevas_loader_gif_la_OBJECTS = evas_image_load_gif.lo +libevas_loader_gif_la_OBJECTS = $(am_libevas_loader_gif_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_TRUE@am_libevas_loader_gif_la_rpath = +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_gif.c +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_gif.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@ -rpath \ +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_gif_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_gif_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@evas_image_loader_gif_cflags@ \ +@EINA_CFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@pkgdir = $(libdir)/evas/modules/loaders/gif/$(MODULE_ARCH) +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@module_la_SOURCES = evas_image_load_gif.c +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_gif_libs@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_TRUE@noinst_LTLIBRARIES = libevas_loader_gif.la +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_TRUE@libevas_loader_gif_la_SOURCES = evas_image_load_gif.c +@BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_TRUE@libevas_loader_gif_la_LIBADD = @evas_image_loader_gif_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/gif/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/gif/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_gif.la: $(libevas_loader_gif_la_OBJECTS) $(libevas_loader_gif_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_gif_la_rpath) $(libevas_loader_gif_la_OBJECTS) $(libevas_loader_gif_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_gif.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_gif.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_gif.lo: evas_image_load_gif.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_gif.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_gif.Tpo -c -o module_la-evas_image_load_gif.lo `test -f 'evas_image_load_gif.c' || echo '$(srcdir)/'`evas_image_load_gif.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_gif.Tpo $(DEPDIR)/module_la-evas_image_load_gif.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_gif.c' object='module_la-evas_image_load_gif.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_gif.lo `test -f 'evas_image_load_gif.c' || echo '$(srcdir)/'`evas_image_load_gif.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c b/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c new file mode 100644 index 0000000..976df0d --- /dev/null +++ b/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c @@ -0,0 +1,1030 @@ +#include "evas_common.h" +#include "evas_private.h" + +#include +#include +#include +#include + +#include + +typedef struct _Gif_Frame Gif_Frame; + +typedef enum _Frame_Load_Type +{ + LOAD_FRAME_NONE = 0, + LOAD_FRAME_INFO = 1, + LOAD_FRAME_DATA = 2, + LOAD_FRAME_DATA_INFO = 3 +} Frame_Load_Type; + +struct _Gif_Frame +{ + struct { + /* Image descriptor */ + int x; + int y; + int w; + int h; + int interlace; + } image_des; + + struct { + /* Graphic Control*/ + int disposal; + int transparent; + int delay; + int input; + } frame_info; +}; + +static Eina_Bool evas_image_load_file_data_gif_internal(Image_Entry *ie, Image_Entry_Frame *frame, int *error); + +static Eina_Bool evas_image_load_file_head_gif(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_gif(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static double evas_image_load_frame_duration_gif(Image_Entry *ie, const char *file, int start_frame, int frame_num) ; +static Eina_Bool evas_image_load_specific_frame(Image_Entry *ie, const char *file, int frame_index, int *error); + +static Evas_Image_Load_Func evas_image_load_gif_func = +{ + EINA_TRUE, + evas_image_load_file_head_gif, + evas_image_load_file_data_gif, + evas_image_load_frame_duration_gif +}; +#define byte2_to_int(a,b) (((b)<<8)|(a)) + +#define FRAME_MAX 1024 + +/* find specific frame in image entry */ +static Eina_Bool +_find_frame(Image_Entry *ie, int frame_index, Image_Entry_Frame **frame) +{ + Eina_List *l; + Image_Entry_Frame *hit_frame = NULL; + + if (!ie) return EINA_FALSE; + if (!ie->frames) return EINA_FALSE; + + EINA_LIST_FOREACH(ie->frames, l, hit_frame) + { + if (hit_frame->index == frame_index) + { + *frame = hit_frame; + return EINA_TRUE; + } + } + return EINA_FALSE; +} + +static Eina_Bool +_find_close_frame(Image_Entry *ie, int frame_index, Image_Entry_Frame **frame) +{ + int i; + Eina_Bool hit = EINA_FALSE; + i = frame_index -1; + + if (!ie) return EINA_FALSE; + if (!ie->frames) return EINA_FALSE; + + for (; i > 0; i--) + { + hit = _find_frame(ie, i, frame); + if (hit) + return EINA_TRUE; + } + return EINA_FALSE; +} + +static Eina_Bool +_evas_image_skip_frame(GifFileType *gif, int frame) +{ + int remain_frame = 0; + GifRecordType rec; + + if (!gif) return EINA_FALSE; + if (frame == 0) return EINA_TRUE; /* no need to skip */ + if (frame < 0 || frame > FRAME_MAX) return EINA_FALSE; + + remain_frame = frame; + + do + { + if (DGifGetRecordType(gif, &rec) == GIF_ERROR) return EINA_FALSE; + + if (rec == EXTENSION_RECORD_TYPE) + { + int ext_code; + GifByteType *ext; + + ext = NULL; + DGifGetExtension(gif, &ext_code, &ext); + while (ext) + { /*skip extention */ + ext = NULL; + DGifGetExtensionNext(gif, &ext); + } + } + + if (rec == IMAGE_DESC_RECORD_TYPE) + { + int img_code; + GifByteType *img; + + if (DGifGetImageDesc(gif) == GIF_ERROR) return EINA_FALSE; + + remain_frame --; + /* we have to count frame, so use DGifGetCode and skip decoding */ + if (DGifGetCode(gif, &img_code, &img) == GIF_ERROR) return EINA_FALSE; + + while (img) + { + img = NULL; + DGifGetCodeNext(gif, &img); + } + if (remain_frame < 1) return EINA_TRUE; + } + if (rec == TERMINATE_RECORD_TYPE) return EINA_FALSE; /* end of file */ + + } while ((rec != TERMINATE_RECORD_TYPE) && (remain_frame > 0)); + return EINA_FALSE; +} + +static Eina_Bool +_evas_image_load_frame_graphic_info(Image_Entry_Frame *frame, GifByteType *ext) +{ + Gif_Frame *gif_frame = NULL; + if ((!frame) || (!ext)) return EINA_FALSE; + + gif_frame = (Gif_Frame *) frame->info; + + /* transparent */ + if ((ext[1] & 0x1) != 0) + gif_frame->frame_info.transparent = ext[4]; + else + gif_frame->frame_info.transparent = -1; + + gif_frame->frame_info.input = (ext[1] >>1) & 0x1; + gif_frame->frame_info.disposal = (ext[1] >>2) & 0x7; + gif_frame->frame_info.delay = byte2_to_int(ext[2], ext[3]); + return EINA_TRUE; +} + +static Eina_Bool +_evas_image_load_frame_image_des_info(GifFileType *gif, Image_Entry_Frame *frame) +{ + Gif_Frame *gif_frame = NULL; + if ((!gif) || (!frame)) return EINA_FALSE; + + gif_frame = (Gif_Frame *) frame->info; + gif_frame->image_des.x = gif->Image.Left; + gif_frame->image_des.y = gif->Image.Top; + gif_frame->image_des.w = gif->Image.Width; + gif_frame->image_des.h = gif->Image.Height; + gif_frame->image_des.interlace = gif->Image.Interlace; + return EINA_TRUE; +} + +static Eina_Bool +_evas_image_load_frame_image_data(Image_Entry *ie, GifFileType *gif, Image_Entry_Frame *frame, int *error) +{ + int w; + int h; + int x; + int y; + int i,j; + int bg; + int r; + int g; + int b; + int alpha; + double per; + double per_inc; + ColorMapObject *cmap; + GifRowType *rows; + int intoffset[] = { 0, 4, 2, 1 }; + int intjump[] = { 8, 8, 4, 2 }; + size_t siz; + int cache_w; + int cache_h; + int cur_h; + int cur_w; + int disposal = 0; + int bg_val = 0; + DATA32 *ptr; + Gif_Frame *gif_frame = NULL; + + if ((!gif) || (!frame)) return EINA_FALSE; + + gif_frame = (Gif_Frame *) frame->info; + w = gif->Image.Width; + h = gif->Image.Height; + x = gif->Image.Left; + y = gif->Image.Top; + cache_w = ie->w; + cache_h = ie->h; + + rows = malloc(h * sizeof(GifRowType *)); + if (!rows) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + for (i = 0; i < h; i++) + { + rows[i] = NULL; + } + for (i = 0; i < h; i++) + { + rows[i] = malloc(w * sizeof(GifPixelType)); + if (!rows[i]) + { + for (i = 0; i < h; i++) + { + if (rows[i]) + { + free(rows[i]); + } + } + free(rows); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + } + if (gif->Image.Interlace) + { + for (i = 0; i < 4; i++) + { + for (j = intoffset[i]; j < h; j += intjump[i]) + { + DGifGetLine(gif, rows[j], w); + } + } + } + else + { + for (i = 0; i < h; i++) + { + if (DGifGetLine(gif, rows[i], w) != GIF_OK) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto error; + } + } + } + alpha = gif_frame->frame_info.transparent; + siz = cache_w *cache_h * sizeof(DATA32); + frame->data = malloc(siz); + if (!frame->data) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto error; + } + ptr = frame->data; + bg = gif->SBackGroundColor; + cmap = (gif->Image.ColorMap ? gif->Image.ColorMap : gif->SColorMap); + + if (!cmap) + { + DGifCloseFile(gif); + for (i = 0; i < h; i++) + { + free(rows[i]); + } + free(rows); + if (frame->data) free(frame->data); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + + /* get the background value */ + r = cmap->Colors[bg].Red; + g = cmap->Colors[bg].Green; + b = cmap->Colors[bg].Blue; + bg_val = ARGB_JOIN(0xff, r, g, b); + + per_inc = 100.0 / (((double)w) * h); + cur_h = h; + cur_w = w; + if (cur_h > cache_h) cur_h = cache_h; + if (cur_w > cache_w) cur_w = cache_w; + + if (frame->index > 1) + { + /* get previous frame only frame index is bigger than 1 */ + DATA32 *ptr_src; + Image_Entry_Frame *new_frame = NULL; + int cur_frame = frame->index; + int start_frame = 1; + int j = 0; + + if (_find_close_frame(ie, cur_frame, &new_frame)) + start_frame = new_frame->index + 1; + + if ((start_frame < 1) || (start_frame > cur_frame)) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + goto error; + } + /* load previous frame of cur_frame */ + for (j = start_frame; j < cur_frame ; j++) + { + if (!evas_image_load_specific_frame(ie, ie->file, j, error)) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + goto error; + } + } + if (!_find_frame(ie, cur_frame - 1, &new_frame)) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + goto error; + } + else + { + Gif_Frame *gif_frame = NULL; + ptr_src = new_frame->data; + if (new_frame->info) + { + gif_frame = (Gif_Frame *)(new_frame->info); + disposal = gif_frame->frame_info.disposal; + } + switch(disposal) /* we only support disposal flag 0,1,2 */ + { + case 1: /* Do not dispose. need previous frame*/ + memcpy(ptr, ptr_src, siz); + /* composite frames */ + ptr = ptr + cache_w * y; + + for (i = 0; i < cur_h; i++) + { + ptr = ptr + x; + for (j = 0; j < cur_w; j++) + { + if (rows[i][j] == alpha) + { + ptr++ ; + } + else + { + r = cmap->Colors[rows[i][j]].Red; + g = cmap->Colors[rows[i][j]].Green; + b = cmap->Colors[rows[i][j]].Blue; + *ptr++ = ARGB_JOIN(0xff, r, g, b); + } + per += per_inc; + } + ptr = ptr + (cache_w - (x + cur_w)); + } + break; + case 2: /* Restore to background color */ + memcpy(ptr, ptr_src, siz); + /* composite frames */ + for (i = 0; i < cache_h; i++) + { + if ((i < y) || (i >= (y + cur_h))) + { + for (j = 0; j < cache_w; j++) + { + *ptr = bg_val; + ptr++; + } + } + else + { + int i1, j1; + i1 = i -y; + + for (j = 0; j < cache_w; j++) + { + j1 = j - x; + if ((j < x) || (j >= (x + cur_w))) + { + *ptr = bg_val; + ptr++; + } + else + { + r = cmap->Colors[rows[i1][j1]].Red; + g = cmap->Colors[rows[i1][j1]].Green; + b = cmap->Colors[rows[i1][j1]].Blue; + *ptr++ = ARGB_JOIN(0xff, r, g, b); + } + } + } + } + break; + case 0: /* No disposal specified */ + default: + memset(ptr, 0, siz); + for (i = 0; i < cache_h; i++) + { + if ((i < y) || (i >= (y + cur_h))) + { + for (j = 0; j < cache_w; j++) + { + *ptr = bg_val; + ptr++; + } + } + else + { + int i1, j1; + i1 = i -y; + + for (j = 0; j < cache_w; j++) + { + j1 = j - x; + if ((j < x) || (j >= (x + cur_w))) + { + *ptr = bg_val; + ptr++; + } + else + { + r = cmap->Colors[rows[i1][j1]].Red; + g = cmap->Colors[rows[i1][j1]].Green; + b = cmap->Colors[rows[i1][j1]].Blue; + *ptr++ = ARGB_JOIN(0xff, r, g, b); + } + } + } + } + break; + } + } + } + else /* first frame decoding */ + { + /* fill background color */ + for (i = 0; i < cache_h; i++) + { + if ((i < y) || (i >= (y + cur_h))) + { + for (j = 0; j < cache_w; j++) + { + *ptr = bg_val; + ptr++; + } + } + else + { + int i1, j1; + i1 = i -y; + + for (j = 0; j < cache_w; j++) + { + j1 = j - x; + if ((j < x) || (j >= (x + cur_w))) + { + *ptr = bg_val; + ptr++; + } + else + { + r = cmap->Colors[rows[i1][j1]].Red; + g = cmap->Colors[rows[i1][j1]].Green; + b = cmap->Colors[rows[i1][j1]].Blue; + *ptr++ = ARGB_JOIN(0xff, r, g, b); + } + } + } + } + } + + for (i = 0; i < h; i++) + { + if (rows[i]) free(rows[i]); + } + if (rows) free(rows); + frame->loaded = EINA_TRUE; + return EINA_TRUE; +error: + for (i = 0; i < h; i++) + { + if (rows[i]) free(rows[i]); + } + if (rows) free(rows); + return EINA_FALSE; +} + +static Eina_Bool +_evas_image_load_frame(Image_Entry *ie, GifFileType *gif, Image_Entry_Frame *frame, Frame_Load_Type type, int *error) +{ + GifRecordType rec; + int gra_res = 0, img_res = 0; + Eina_Bool res = EINA_FALSE; + Gif_Frame *gif_frame = NULL; + + if ((!gif) || (!frame)) return EINA_FALSE; + gif_frame = (Gif_Frame *) frame->info; + + if (type > LOAD_FRAME_DATA_INFO) return EINA_FALSE; + + do + { + if (DGifGetRecordType(gif, &rec) == GIF_ERROR) return EINA_FALSE; + if (rec == IMAGE_DESC_RECORD_TYPE) + { + img_res++; + break; + } + else if (rec == EXTENSION_RECORD_TYPE) + { + int ext_code; + GifByteType *ext; + + ext = NULL; + DGifGetExtension(gif, &ext_code, &ext); + while (ext) + { + if (ext_code == 0xf9) /* Graphic Control Extension */ + { + gra_res++; + /* fill frame info */ + if ((type == LOAD_FRAME_INFO) || (type == LOAD_FRAME_DATA_INFO)) + _evas_image_load_frame_graphic_info(frame,ext); + } + ext = NULL; + DGifGetExtensionNext(gif, &ext); + } + } + } while ((rec != TERMINATE_RECORD_TYPE) && (img_res == 0)); + if (img_res != 1) return EINA_FALSE; + if (DGifGetImageDesc(gif) == GIF_ERROR) return EINA_FALSE; + if ((type == LOAD_FRAME_INFO) || (type == LOAD_FRAME_DATA_INFO)) + _evas_image_load_frame_image_des_info(gif, frame); + + if ((type == LOAD_FRAME_DATA) || (type == LOAD_FRAME_DATA_INFO)) + { + res = _evas_image_load_frame_image_data(ie, gif,frame, error); + if (!res) return EINA_FALSE; + } + return EINA_TRUE; +} + + +/* set frame data to cache entry's data */ +static Eina_Bool +evas_image_load_file_data_gif_internal(Image_Entry *ie, Image_Entry_Frame *frame, int *error) +{ + int w; + int h; + int dst_x; + int dst_y; + DATA32 *dst; + DATA32 *src; + int cache_w, cache_h; + size_t siz; + Gif_Frame *gif_frame = NULL; + + gif_frame = (Gif_Frame *) frame->info; + cache_w = ie->w; + cache_h = ie->h; + w = gif_frame->image_des.w; + h = gif_frame->image_des.h; + dst_x = gif_frame->image_des.x; + dst_y = gif_frame->image_des.y; + + src = frame->data; + + if (!evas_cache_image_pixels(ie)) + { + evas_cache_image_surface_alloc(ie, cache_w, cache_h); + } + + if (!evas_cache_image_pixels(ie)) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + + /* only copy real frame part */ + siz = cache_w * cache_h * sizeof(DATA32); + dst = evas_cache_image_pixels(ie); + + memcpy(dst, src, siz); + + evas_common_image_premul(ie); + + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +static Eina_Bool +evas_image_load_file_head_gif(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + int fd; + GifFileType *gif; + GifRecordType rec; + int w; + int h; + int alpha; + int loop_count = -1; + + w = 0; + h = 0; + alpha = -1; + +#ifndef __EMX__ + fd = open(file, O_RDONLY); +#else + fd = open(file, O_RDONLY | O_BINARY); +#endif + if (fd < 0) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + gif = DGifOpenFileHandle(fd); + if (!gif) + { + if (fd) close(fd); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + /* check logical screen size */ + w = gif->SWidth; + h = gif->SHeight; + + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + DGifCloseFile(gif); + if (IMG_TOO_BIG(w, h)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + ie->w = w; + ie->h = h; + + do + { + if (DGifGetRecordType(gif, &rec) == GIF_ERROR) + { + /* PrintGifError(); */ + DGifCloseFile(gif); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + /* image descript info */ + if (rec == IMAGE_DESC_RECORD_TYPE) + { + int img_code; + GifByteType *img; + + if (DGifGetImageDesc(gif) == GIF_ERROR) + { + /* PrintGifError(); */ + DGifCloseFile(gif); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + /* we have to count frame, so use DGifGetCode and skip decoding */ + if (DGifGetCode(gif, &img_code, &img) == GIF_ERROR) + { + /* PrintGifError(); */ + DGifCloseFile(gif); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + while (img) + { + img = NULL; + DGifGetCodeNext(gif, &img); + } + } + else if (rec == EXTENSION_RECORD_TYPE) + { + int ext_code; + GifByteType *ext; + + ext = NULL; + DGifGetExtension(gif, &ext_code, &ext); + while (ext) + { + if (ext_code == 0xf9) /* Graphic Control Extension */ + { + if ((ext[1] & 1) && (alpha < 0)) alpha = (int)ext[4]; + } + else if (ext_code == 0xff) /* application extension */ + { + if (!strncmp ((char*)(&ext[1]), "NETSCAPE2.0", 11) || + !strncmp ((char*)(&ext[1]), "ANIMEXTS1.0", 11)) + { + ext=NULL; + DGifGetExtensionNext(gif, &ext); + + if (ext[1] == 0x01) + { + loop_count = ext[2] + (ext[3] << 8); + if (loop_count > 0) loop_count++; + } + } + } + + ext = NULL; + DGifGetExtensionNext(gif, &ext); + } + } + } while (rec != TERMINATE_RECORD_TYPE); + + if (alpha >= 0) ie->flags.alpha = 1; + + if (gif->ImageCount > 1) + { + ie->flags.animated = 1; + ie->loop_count = loop_count; + ie->loop_hint = EVAS_IMAGE_ANIMATED_HINT_LOOP; + ie->frame_count = gif->ImageCount; + ie->frames = NULL; + } + + DGifCloseFile(gif); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +static Eina_Bool +evas_image_load_specific_frame(Image_Entry *ie, const char *file, int frame_index, int *error) +{ + int fd; + GifFileType *gif; + Image_Entry_Frame *frame = NULL; + Gif_Frame *gif_frame = NULL; + +#ifndef __EMX__ + fd = open(file, O_RDONLY); +#else + fd = open(file, O_RDONLY | O_BINARY); +#endif + if (fd < 0) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + gif = DGifOpenFileHandle(fd); + if (!gif) + { + if (fd) close(fd); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + if (!_evas_image_skip_frame(gif, frame_index-1)) + { + if (fd) close(fd); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + frame = malloc(sizeof (Image_Entry_Frame)); + if (!frame) + { + if (fd) close(fd); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + + gif_frame = malloc(sizeof (Gif_Frame)); + if (!gif_frame) + { + if (fd) close(fd); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + frame->info = gif_frame; + frame->index = frame_index; + if (!_evas_image_load_frame(ie,gif, frame, LOAD_FRAME_DATA_INFO,error)) + { + if (fd) close(fd); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + ie->frames = eina_list_append(ie->frames, frame); + DGifCloseFile(gif); + return EINA_TRUE; +} + +static Eina_Bool +evas_image_load_file_data_gif(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + int cur_frame_index; + Image_Entry_Frame *frame = NULL; + Eina_Bool hit; + + if(!ie->flags.animated) + cur_frame_index = 1; + else + cur_frame_index = ie->cur_frame; + + if ((ie->flags.animated) && + ((cur_frame_index <0) || (cur_frame_index > FRAME_MAX) || (cur_frame_index > ie->frame_count))) + { + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + + /* first time frame is set to be 0. so default is 1 */ + if (cur_frame_index == 0) cur_frame_index++; + + /* Check current frame exists in hash table */ + hit = _find_frame(ie, cur_frame_index, &frame); + + /* if current frame exist in has table, check load flag */ + if (hit) + { + if (frame->loaded) + evas_image_load_file_data_gif_internal(ie,frame,error); + else + { + int fd; + GifFileType *gif; + +#ifndef __EMX__ + fd = open(file, O_RDONLY); +#else + fd = open(file, O_RDONLY | O_BINARY); +#endif + if (fd < 0) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + gif = DGifOpenFileHandle(fd); + if (!gif) + { + if (fd) close(fd); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + _evas_image_skip_frame(gif, cur_frame_index-1); + if (!_evas_image_load_frame(ie, gif, frame, LOAD_FRAME_DATA,error)) + { + if (fd) close(fd); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + if (!evas_image_load_file_data_gif_internal(ie, frame, error)) + { + if (fd) close(fd); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + DGifCloseFile(gif); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + } + } + /* current frame does is not exist */ + else + { + if (!evas_image_load_specific_frame(ie, file, cur_frame_index, error)) + { + return EINA_FALSE; + } + hit = EINA_FALSE; + frame = NULL; + hit = _find_frame(ie, cur_frame_index, &frame); + if (!hit) return EINA_FALSE; + if (!evas_image_load_file_data_gif_internal(ie, frame, error)) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + return EINA_TRUE; + } + return EINA_FALSE; +} + +static double +evas_image_load_frame_duration_gif(Image_Entry *ie, const char *file, const int start_frame, const int frame_num) +{ + int fd; + GifFileType *gif; + GifRecordType rec; + int done; + int current_frame = 1; + int remain_frames = frame_num; + double duration = 0; + int frame_count = 0; + + frame_count = ie->frame_count; + + if (!ie->flags.animated) return -1; + if ((start_frame + frame_num) > frame_count) return -1; + if (frame_num < 0) return -1; + + done = 0; + +#ifndef __EMX__ + fd = open(file, O_RDONLY); +#else + fd = open(file, O_RDONLY | O_BINARY); +#endif + if (fd < 0) return -1; + + gif = DGifOpenFileHandle(fd); + if (!gif) + { + if (fd) close(fd); + return -1; + } + + do + { + if (DGifGetRecordType(gif, &rec) == GIF_ERROR) + { + rec = TERMINATE_RECORD_TYPE; + } + if (rec == IMAGE_DESC_RECORD_TYPE) + { + int img_code; + GifByteType *img; + + if (DGifGetImageDesc(gif) == GIF_ERROR) + { + /* PrintGifError(); */ + rec = TERMINATE_RECORD_TYPE; + } + current_frame++; + /* we have to count frame, so use DGifGetCode and skip decoding */ + if (DGifGetCode(gif, &img_code, &img) == GIF_ERROR) + { + rec = TERMINATE_RECORD_TYPE; + } + while (img) + { + img = NULL; + DGifGetExtensionNext(gif, &img); + } + } + else if (rec == EXTENSION_RECORD_TYPE) + { + int ext_code; + GifByteType *ext; + + ext = NULL; + DGifGetExtension(gif, &ext_code, &ext); + while (ext) + { + if (ext_code == 0xf9) /* Graphic Control Extension */ + { + if ((current_frame >= start_frame) && (current_frame <= frame_count)) + { + int frame_duration = 0; + if (remain_frames < 0) break; + frame_duration = byte2_to_int (ext[2], ext[3]); + if (frame_duration == 0) + duration += 0.1; + else + duration += (double)frame_duration/100; + remain_frames --; + } + } + ext = NULL; + DGifGetExtensionNext(gif, &ext); + } + } + } while (rec != TERMINATE_RECORD_TYPE); + + DGifCloseFile(gif); + return duration; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_gif_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "gif", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, gif); + +#ifndef EVAS_STATIC_BUILD_GIF +EVAS_EINA_MODULE_DEFINE(image_loader, gif); +#endif diff --git a/libraries/evas/src/modules/loaders/ico/Makefile.am b/libraries/evas/src/modules/loaders/ico/Makefile.am new file mode 100644 index 0000000..044dd0d --- /dev/null +++ b/libraries/evas/src/modules/loaders/ico/Makefile.am @@ -0,0 +1,33 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +if BUILD_LOADER_ICO +if !EVAS_STATIC_BUILD_ICO + +pkgdir = $(libdir)/evas/modules/loaders/ico/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_ico.c + +module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_ico.la +libevas_loader_ico_la_SOURCES = evas_image_load_ico.c +libevas_loader_ico_la_LIBADD = + +endif +endif diff --git a/libraries/evas/src/modules/loaders/ico/Makefile.in b/libraries/evas/src/modules/loaders/ico/Makefile.in new file mode 100644 index 0000000..5c26adf --- /dev/null +++ b/libraries/evas/src/modules/loaders/ico/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/ico +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_ico_la_DEPENDENCIES = +am__libevas_loader_ico_la_SOURCES_DIST = evas_image_load_ico.c +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_TRUE@am_libevas_loader_ico_la_OBJECTS = evas_image_load_ico.lo +libevas_loader_ico_la_OBJECTS = $(am_libevas_loader_ico_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_TRUE@am_libevas_loader_ico_la_rpath = +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_ico.c +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_ico.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@ -rpath \ +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_ico_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_ico_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@pkgdir = $(libdir)/evas/modules/loaders/ico/$(MODULE_ARCH) +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@module_la_SOURCES = evas_image_load_ico.c +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_TRUE@noinst_LTLIBRARIES = libevas_loader_ico.la +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_TRUE@libevas_loader_ico_la_SOURCES = evas_image_load_ico.c +@BUILD_LOADER_ICO_TRUE@@EVAS_STATIC_BUILD_ICO_TRUE@libevas_loader_ico_la_LIBADD = +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/ico/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/ico/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_ico.la: $(libevas_loader_ico_la_OBJECTS) $(libevas_loader_ico_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_ico_la_rpath) $(libevas_loader_ico_la_OBJECTS) $(libevas_loader_ico_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_ico.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_ico.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_ico.lo: evas_image_load_ico.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_ico.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_ico.Tpo -c -o module_la-evas_image_load_ico.lo `test -f 'evas_image_load_ico.c' || echo '$(srcdir)/'`evas_image_load_ico.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_ico.Tpo $(DEPDIR)/module_la-evas_image_load_ico.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_ico.c' object='module_la-evas_image_load_ico.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_ico.lo `test -f 'evas_image_load_ico.c' || echo '$(srcdir)/'`evas_image_load_ico.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c b/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c new file mode 100644 index 0000000..17a7f7e --- /dev/null +++ b/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c @@ -0,0 +1,770 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef HAVE_EVIL +# include +#endif + +#include "evas_common.h" +#include "evas_private.h" + +static Eina_Bool evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +static Evas_Image_Load_Func evas_image_load_ico_func = +{ + EINA_TRUE, + evas_image_load_file_head_ico, + evas_image_load_file_data_ico, + NULL +}; + +static int +read_ushort(FILE *file, unsigned short *ret) +{ + unsigned char b[2]; + if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + *ret = (b[1] << 8) | b[0]; + return 1; +} + +static int +read_uint(FILE *file, unsigned int *ret) +{ + unsigned char b[4]; + if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); + return 1; +} + +enum +{ + SMALLEST, + BIGGEST, + SMALLER, + BIGGER +}; + +enum +{ + ICON = 1, + CURSOR = 2 +}; + +static Eina_Bool +evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key, int *error) +{ + unsigned short word; + unsigned char byte; + FILE *f; + int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0, + hot_x = 0, hot_y = 0, bpp = 0, pdelta, search = -1, have_choice = 0, + hasa = 1; + unsigned int bmoffset, bmsize, fsize; + unsigned short reserved, type, count; + struct { + int pdelta; + int w, h; + int cols; + int bpp, planes; + int hot_x, hot_y; + unsigned int bmoffset, bmsize; + } chosen = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + f = fopen(file, "rb"); + if (!f) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + fseek(f, 0, SEEK_END); + fsize = ftell(f); + fseek(f, 0, SEEK_SET); + if (fsize < (6 + 16 + 40)) goto close_file; + + // key: + // NULL == highest res + // biggest == highest res + // smallest == lowest res + // + // smaller == next size SMALLER than load opts WxH (if possible) + // bigger == next size BIGGER than load opts WxH (if possible) + // more ? + + search = BIGGEST; + if ((ie->load_opts.w > 0) && (ie->load_opts.h > 0)) + { + wanted_w = ie->load_opts.w; + wanted_h = ie->load_opts.h; + search = SMALLER; + } + + if (!read_ushort(f, &reserved)) goto close_file; + if (!read_ushort(f, &type)) goto close_file; + if (!read_ushort(f, &count)) goto close_file; + if (!((reserved == 0) && + ((type == ICON) || (type == CURSOR)) && (count > 0))) + goto close_file; + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + + if (key) + { + if (!strcmp(key, "biggest")) + { + wanted_w = 0; + wanted_h = 0; + search = BIGGEST; + chosen.pdelta = 0; + } + else if (!strcmp(key, "smallest")) + { + wanted_w = 1; + wanted_h = 1; + search = SMALLEST; + chosen.pdelta = 0x7fffffff; + } + else if (!strcmp(key, "smaller")) + { + chosen.pdelta = 0x7fffffff; + search = SMALLER; + } + else if (!strcmp(key, "bigger")) + { + chosen.pdelta = 0x7fffffff; + search = BIGGER; + } + } + for (i = 0; i < count; i++) + { + if (fread(&byte, 1, 1, f) != 1) goto close_file; + w = byte; + if (w <= 0) w = 256; + if (fread(&byte, 1, 1, f) != 1) goto close_file; + h = byte; + if (h <= 0) h = 256; + if (fread(&byte, 1, 1, f) != 1) goto close_file; + cols = byte; + if (cols <= 0) cols = 256; + if (fread(&byte, 1, 1, f) != 1) goto close_file; + if (!read_ushort(f, &word)) goto close_file; + if (type == CURSOR) planes = word; + else hot_x = word; + if (!read_ushort(f, &word)) goto close_file; + if (type == CURSOR) bpp = word; + else hot_y = word; + if (!read_uint(f, &bmsize)) goto close_file; + if (!read_uint(f, &bmoffset)) goto close_file; + if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file; + if (search == BIGGEST) + { + pdelta = w * h; + if ((!have_choice) || + ((pdelta >= chosen.pdelta) && + (((bpp >= 3) && (bpp >= chosen.bpp)) || + ((bpp < 3) && (cols >= chosen.cols))))) + { + have_choice = 1; + chosen.pdelta = pdelta; + chosen.w = w; + chosen.h = h; + chosen.cols = cols; + chosen.bpp = bpp; + chosen.planes = planes; + chosen.bmsize = bmsize; + chosen.bmoffset = bmoffset; + } + } + else + { + if (search == SMALLEST) + { + pdelta = w * h; + if ((!have_choice) || + ((pdelta <= chosen.pdelta) && + (((bpp >= 3) && (bpp >= chosen.bpp)) || + ((bpp < 3) && (cols >= chosen.cols))))) + { + have_choice = 1; + chosen.pdelta = pdelta; + chosen.w = w; + chosen.h = h; + chosen.cols = cols; + chosen.bpp = bpp; + chosen.planes = planes; + chosen.bmsize = bmsize; + chosen.bmoffset = bmoffset; + } + } + else if (search == SMALLER) + { + pdelta = (wanted_w * wanted_h) - (w * h); + if ((!have_choice) || + ((w <= wanted_w) && (h <= wanted_h) && + (pdelta <= chosen.pdelta) && + (((bpp >= 3) && (bpp >= chosen.bpp)) || + ((bpp < 3) && (cols >= chosen.cols))))) + { + have_choice = 1; + if (pdelta < 0) pdelta = 0x7fffffff; + chosen.pdelta = pdelta; + chosen.w = w; + chosen.h = h; + chosen.cols = cols; + chosen.bpp = bpp; + chosen.planes = planes; + chosen.bmsize = bmsize; + chosen.bmoffset = bmoffset; + } + } + else if (search == BIGGER) + { + pdelta = (w * h) - (wanted_w * wanted_h); + if ((!have_choice) || + ((w >= wanted_w) && (h >= wanted_h) && + (pdelta <= chosen.pdelta) && + (((bpp >= 3) && (bpp >= chosen.bpp)) || + ((bpp < 3) && (cols >= chosen.cols))))) + { + have_choice = 1; + if (pdelta < 0) pdelta = 0x7fffffff; + chosen.pdelta = pdelta; + chosen.w = w; + chosen.h = h; + chosen.cols = cols; + chosen.bpp = bpp; + chosen.planes = planes; + chosen.bmsize = bmsize; + chosen.bmoffset = bmoffset; + } + } + } + } + if (chosen.bmoffset == 0) goto close_file; + if (fseek(f, chosen.bmoffset, SEEK_SET) != 0) goto close_file; + + w = chosen.w; + h = chosen.h; + if ((w > 256) || (h > 256)) goto close_file; + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + if (IMG_TOO_BIG(w, h)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + goto close_file; + } + + ie->w = w; + ie->h = h; + if (hasa) ie->flags.alpha = 1; + + fclose(f); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + + close_file: + fclose(f); + return EINA_FALSE; +} + +static Eina_Bool +evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key, int *error) +{ + unsigned short word; + unsigned char byte; + unsigned int dword; + FILE *f; + int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0, + hot_x = 0, hot_y = 0, bpp = 0, pdelta, search = -1, have_choice = 0, + stride, pstride, j, right_way_up = 0, diff_size = 0, cols2; + unsigned int bmoffset, bmsize, bitcount, compression, imagesize, fsize, + colorsused, colorsimportant, *pal, *surface, *pix, none_zero_alpha = 0; + unsigned short reserved, type, count, planes2; + unsigned char *maskbuf, *pixbuf, *p; + struct { + int pdelta; + int w, h; + int cols; + int bpp, planes; + int hot_x, hot_y; + unsigned int bmoffset, bmsize; + } chosen = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + f = fopen(file, "rb"); + if (!f) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + fseek(f, 0, SEEK_END); + fsize = ftell(f); + fseek(f, 0, SEEK_SET); + if (fsize < (6 + 16 + 40)) goto close_file; + + // key: + // NULL == highest res + // biggest == highest res + // smallest == lowest res + // + // smaller == next size SMALLER than load opts WxH (if possible) + // bigger == next size BIGGER than load opts WxH (if possible) + // more ? + + search = BIGGEST; + if ((ie->load_opts.w > 0) && (ie->load_opts.h > 0)) + { + wanted_w = ie->load_opts.w; + wanted_h = ie->load_opts.h; + search = SMALLER; + } + + if (!read_ushort(f, &reserved)) goto close_file; + if (!read_ushort(f, &type)) goto close_file; + if (!read_ushort(f, &count)) goto close_file; + if (!((reserved == 0) && + ((type == ICON) || (type == CURSOR)) && (count > 0))) + goto close_file; + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + + if (key) + { + if (!strcmp(key, "biggest")) + { + wanted_w = 0; + wanted_h = 0; + search = BIGGEST; + chosen.pdelta = 0; + } + else if (!strcmp(key, "smallest")) + { + wanted_w = 1; + wanted_h = 1; + search = SMALLEST; + chosen.pdelta = 0x7fffffff; + } + else if (!strcmp(key, "smaller")) + { + chosen.pdelta = 0x7fffffff; + search = SMALLER; + } + else if (!strcmp(key, "bigger")) + { + chosen.pdelta = 0x7fffffff; + search = BIGGER; + } + } + for (i = 0; i < count; i++) + { + if (fread(&byte, 1, 1, f) != 1) goto close_file; + w = byte; + if (w <= 0) w = 256; + if (fread(&byte, 1, 1, f) != 1) goto close_file; + h = byte; + if (h <= 0) h = 256; + if (fread(&byte, 1, 1, f) != 1) goto close_file; + cols = byte; + if (cols <= 0) cols = 256; + if (fread(&byte, 1, 1, f) != 1) goto close_file; + if (!read_ushort(f, &word)) goto close_file; + if (type == 1) planes = word; + else hot_x = word; + if (!read_ushort(f, &word)) goto close_file; + if (type == 1) bpp = word; + else hot_y = word; + if (!read_uint(f, &bmsize)) goto close_file; + if (!read_uint(f, &bmoffset)) goto close_file; + if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file; + if (search == BIGGEST) + { + pdelta = w * h; + if ((!have_choice) || + ((pdelta >= chosen.pdelta) && + (((bpp >= 3) && (bpp >= chosen.bpp)) || + ((bpp < 3) && (cols >= chosen.cols))))) + { + have_choice = 1; + chosen.pdelta = pdelta; + chosen.w = w; + chosen.h = h; + chosen.cols = cols; + chosen.bpp = bpp; + chosen.planes = planes; + chosen.bmsize = bmsize; + chosen.bmoffset = bmoffset; + } + } + else + { + if (search == SMALLEST) + { + pdelta = w * h; + if ((!have_choice) || + ((pdelta <= chosen.pdelta) && + (((bpp >= 3) && (bpp >= chosen.bpp)) || + ((bpp < 3) && (cols >= chosen.cols))))) + { + have_choice = 1; + chosen.pdelta = pdelta; + chosen.w = w; + chosen.h = h; + chosen.cols = cols; + chosen.bpp = bpp; + chosen.planes = planes; + chosen.bmsize = bmsize; + chosen.bmoffset = bmoffset; + } + } + else if (search == SMALLER) + { + pdelta = (wanted_w * wanted_h) - (w * h); + if ((!have_choice) || + ((w <= wanted_w) && (h <= wanted_h) && + (pdelta <= chosen.pdelta) && + (((bpp >= 3) && (bpp >= chosen.bpp)) || + ((bpp < 3) && (cols >= chosen.cols))))) + { + have_choice = 1; + if (pdelta < 0) pdelta = 0x7fffffff; + chosen.pdelta = pdelta; + chosen.w = w; + chosen.h = h; + chosen.cols = cols; + chosen.bpp = bpp; + chosen.planes = planes; + chosen.bmsize = bmsize; + chosen.bmoffset = bmoffset; + } + } + else if (search == BIGGER) + { + pdelta = (w * h) - (wanted_w * wanted_h); + if ((!have_choice) || + ((w >= wanted_w) && (h >= wanted_h) && + (pdelta <= chosen.pdelta) && + (((bpp >= 3) && (bpp >= chosen.bpp)) || + ((bpp < 3) && (cols >= chosen.cols))))) + { + have_choice = 1; + if (pdelta < 0) pdelta = 0x7fffffff; + chosen.pdelta = pdelta; + chosen.w = w; + chosen.h = h; + chosen.cols = cols; + chosen.bpp = bpp; + chosen.planes = planes; + chosen.bmsize = bmsize; + chosen.bmoffset = bmoffset; + } + } + } + } + if (chosen.bmoffset == 0) goto close_file; + if (fseek(f, chosen.bmoffset, SEEK_SET) != 0) goto close_file; + + w = chosen.w; + h = chosen.h; + cols = chosen.cols; + bpp = chosen.bpp; + // changed since we loaded header? + if (((int)ie->w != w) || ((int)ie->h != h)) goto close_file; + + // read bmp header time... let's do some checking + if (!read_uint(f, &dword)) goto close_file; // headersize - dont care + if (!read_uint(f, &dword)) goto close_file; // width + if (dword > 0) + { + if ((int)dword != w) + { + w = dword; + diff_size = 1; + } + } + if (!read_uint(f, &dword)) goto close_file; // height + if (dword > 0) + { + if ((int)dword != (h * 2)) + { + h = dword / 2; + diff_size = 1; + } + } + if (diff_size) + { + ERR("Broken ICO file: %s - " + " Reporting size of %ix%i in index, but bitmap is %ix%i. " + " May be expanded or cropped.", + file, ie->w, ie->h, w, h); + } + if (!read_ushort(f, &word)) goto close_file; // planes + planes2 = word; + if (!read_ushort(f, &word)) goto close_file; // bitcount + bitcount = word; + if (!read_uint(f, &dword)) goto close_file; // compression + compression = dword; + if (!read_uint(f, &dword)) goto close_file; // imagesize + imagesize = dword; + if (!read_uint(f, &dword)) goto close_file; // z pixels per m + if (!read_uint(f, &dword)) goto close_file; // y pizels per m + if (!read_uint(f, &dword)) goto close_file; // colors used + colorsused = dword; + if (!read_uint(f, &dword)) goto close_file; // colors important + colorsimportant = dword; + + evas_cache_image_surface_alloc(ie, ie->w, ie->h); + surface = evas_cache_image_pixels(ie); + if (!surface) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + memset(surface, 0, ie->w * ie->h * 4); + + if (!((bitcount == 1) || (bitcount == 4) || (bitcount == 8) || + (bitcount == 24) || (bitcount == 32))) + goto close_file; + if (bitcount <= 8) + { + cols2 = 1 << bitcount; + if (cols == 0) cols = cols2; + if (cols > cols2) cols = cols2; + if (cols > 256) cols = 256; + } + else + cols = 0; + if (bitcount > 8) cols = 0; + + pal = alloca(256 * 4); + for (i = 0; i < cols; i++) + { + unsigned char a, r, g, b; + + if (fread(&b, 1, 1, f) != 1) goto close_file; + if (fread(&g, 1, 1, f) != 1) goto close_file; + if (fread(&r, 1, 1, f) != 1) goto close_file; + if (fread(&a, 1, 1, f) != 1) goto close_file; + a = 0xff; + pal[i] = ARGB_JOIN(a, r, g, b); + } + stride = ((w + 31) / 32); + maskbuf = alloca(stride * h); + pixbuf = alloca(stride * 32 * 4); // more than enough + if (bitcount == 1) + { + pstride = stride * 4; + for (i = 0; i < h; i++) + { + pix = surface + (i * ie->w); + if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); + if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + p = pixbuf; + if (i >= (int)ie->h) continue; + for (j = 0; j < w; j++) + { + if (j >= (int)ie->w) break; + if ((j & 0x7) == 0x0) + { + *pix = pal[*p >> 7]; + } + else if ((j & 0x7) == 0x1) + { + *pix = pal[(*p >> 6) & 0x1]; + } + else if ((j & 0x7) == 0x2) + { + *pix = pal[(*p >> 5) & 0x1]; + } + else if ((j & 0x7) == 0x3) + { + *pix = pal[(*p >> 4) & 0x1]; + } + else if ((j & 0x7) == 0x4) + { + *pix = pal[(*p >> 3) & 0x1]; + } + else if ((j & 0x7) == 0x5) + { + *pix = pal[(*p >> 2) & 0x1]; + } + else if ((j & 0x7) == 0x6) + { + *pix = pal[(*p >> 1) & 0x1]; + } + else + { + *pix = pal[*p & 0x1]; + p++; + } + pix++; + } + } + } + else if (bitcount == 4) + { + pstride = ((w + 7) / 8) * 4; + for (i = 0; i < h; i++) + { + pix = surface + (i * ie->w); + if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); + if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + p = pixbuf; + if (i >= (int)ie->h) continue; + for (j = 0; j < w; j++) + { + if (j >= (int)ie->w) break; + if ((j & 0x1) == 0x1) + { + *pix = pal[*p & 0x0f]; + p++; + } + else + { + *pix = pal[*p >> 4]; + } + pix++; + } + } + } + else if (bitcount == 8) + { + pstride = ((w + 3) / 4) * 4; + for (i = 0; i < h; i++) + { + pix = surface + (i * ie->w); + if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); + if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + p = pixbuf; + if (i >= (int)ie->h) continue; + for (j = 0; j < w; j++) + { + if (j >= (int)ie->w) break; + *pix = pal[*p]; + p++; + pix++; + } + } + } + else if (bitcount == 24) + { + pstride = w * 3; + for (i = 0; i < h; i++) + { + pix = surface + (i * ie->w); + if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); + if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + p = pixbuf; + if (i >= (int)ie->h) continue; + for (j = 0; j < w; j++) + { + unsigned char a, r, g, b; + + if (j >= (int)ie->w) break; + b = p[0]; + g = p[1]; + r = p[2]; + p += 3; + a = 0xff; + *pix = ARGB_JOIN(a, r, g, b); + pix++; + } + } + } + else if (bitcount == 32) + { + pstride = w * 4; + for (i = 0; i < h; i++) + { + pix = surface + (i * ie->w); + if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); + if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + p = pixbuf; + if (i >= (int)ie->h) continue; + for (j = 0; j < w; j++) + { + unsigned char a, r, g, b; + + if (j >= (int)ie->w) break; + b = p[0]; + g = p[1]; + r = p[2]; + a = p[3]; + p += 4; + if (a) none_zero_alpha = 1; + *pix = ARGB_JOIN(a, r, g, b); + pix++; + } + } + } + if (!none_zero_alpha) + { + if (fread(maskbuf, stride * 4 * h, 1, f) != 1) goto close_file; + // apply mask + pix = surface; + for (i = 0; i < h; i++) + { + unsigned char *m; + + pix = surface + (i * ie->w); + if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); + m = maskbuf + (stride * i * 4); + if (i >= (int)ie->h) continue; + for (j = 0; j < w; j++) + { + if (j >= (int)ie->w) break; + if (*m & (1 << (7 - (j & 0x7)))) + A_VAL(pix) = 0x00; + else + A_VAL(pix) = 0xff; + if ((j & 0x7) == 0x7) m++; + pix++; + } + } + } + + fclose(f); + + evas_common_image_premul(ie); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + + close_file: + fclose(f); + return EINA_FALSE; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_ico_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "ico", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, ico); + +#ifndef EVAS_STATIC_BUILD_ICO +EVAS_EINA_MODULE_DEFINE(image_loader, ico); +#endif diff --git a/libraries/evas/src/modules/loaders/jpeg/Makefile.am b/libraries/evas/src/modules/loaders/jpeg/Makefile.am new file mode 100644 index 0000000..2088ba8 --- /dev/null +++ b/libraries/evas/src/modules/loaders/jpeg/Makefile.am @@ -0,0 +1,36 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_jpeg_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_LOADER_JPEG +if !EVAS_STATIC_BUILD_JPEG + +pkgdir = $(libdir)/evas/modules/loaders/jpeg/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_jpeg.c + +module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ @evas_image_loader_jpeg_libs@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_jpeg.la +libevas_loader_jpeg_la_SOURCES = evas_image_load_jpeg.c +libevas_loader_jpeg_la_LIBADD = @evas_image_loader_jpeg_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/loaders/jpeg/Makefile.in b/libraries/evas/src/modules/loaders/jpeg/Makefile.in new file mode 100644 index 0000000..ce4b194 --- /dev/null +++ b/libraries/evas/src/modules/loaders/jpeg/Makefile.in @@ -0,0 +1,760 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/jpeg +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_jpeg_la_DEPENDENCIES = +am__libevas_loader_jpeg_la_SOURCES_DIST = evas_image_load_jpeg.c +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am_libevas_loader_jpeg_la_OBJECTS = evas_image_load_jpeg.lo +libevas_loader_jpeg_la_OBJECTS = $(am_libevas_loader_jpeg_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am_libevas_loader_jpeg_la_rpath = +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_jpeg.c +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_jpeg.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@ -rpath \ +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_jpeg_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_jpeg_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_jpeg_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@pkgdir = $(libdir)/evas/modules/loaders/jpeg/$(MODULE_ARCH) +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_SOURCES = evas_image_load_jpeg.c +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ @evas_image_loader_jpeg_libs@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@noinst_LTLIBRARIES = libevas_loader_jpeg.la +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@libevas_loader_jpeg_la_SOURCES = evas_image_load_jpeg.c +@BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@libevas_loader_jpeg_la_LIBADD = @evas_image_loader_jpeg_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/jpeg/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/jpeg/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_jpeg.la: $(libevas_loader_jpeg_la_OBJECTS) $(libevas_loader_jpeg_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_jpeg_la_rpath) $(libevas_loader_jpeg_la_OBJECTS) $(libevas_loader_jpeg_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_jpeg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_jpeg.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_jpeg.lo: evas_image_load_jpeg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_jpeg.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_jpeg.Tpo -c -o module_la-evas_image_load_jpeg.lo `test -f 'evas_image_load_jpeg.c' || echo '$(srcdir)/'`evas_image_load_jpeg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_jpeg.Tpo $(DEPDIR)/module_la-evas_image_load_jpeg.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_jpeg.c' object='module_la-evas_image_load_jpeg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_jpeg.lo `test -f 'evas_image_load_jpeg.c' || echo '$(srcdir)/'`evas_image_load_jpeg.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c b/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c new file mode 100644 index 0000000..0dbabab --- /dev/null +++ b/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c @@ -0,0 +1,1265 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef HAVE_EVIL +# include +#endif + +#include +#include + +#include "evas_common.h" +#include "evas_private.h" + + +typedef struct _JPEG_error_mgr *emptr; +struct _JPEG_error_mgr +{ + struct jpeg_error_mgr pub; + jmp_buf setjmp_buffer; +}; + +static void _JPEGFatalErrorHandler(j_common_ptr cinfo); +static void _JPEGErrorHandler(j_common_ptr cinfo); +static void _JPEGErrorHandler2(j_common_ptr cinfo, int msg_level); + +static Eina_Bool evas_image_load_file_head_jpeg_internal(Image_Entry *ie, + void *map, + size_t len, + int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_jpeg_internal(Image_Entry *ie, + void *map, + size_t len, + int *error) EINA_ARG_NONNULL(1, 2, 4); +#if 0 /* not used at the moment */ +static int evas_image_load_file_data_jpeg_alpha_internal(Image_Entry *ie, FILE *f) EINA_ARG_NONNULL(1, 2); +#endif + +static Eina_Bool evas_image_load_file_head_jpeg(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_jpeg(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +static Evas_Image_Load_Func evas_image_load_jpeg_func = +{ + EINA_TRUE, + evas_image_load_file_head_jpeg, + evas_image_load_file_data_jpeg, + NULL +}; + + +static void +_JPEGFatalErrorHandler(j_common_ptr cinfo) +{ + emptr errmgr; + + errmgr = (emptr) cinfo->err; + /* cinfo->err->output_message(cinfo);*/ + longjmp(errmgr->setjmp_buffer, 1); + return; +} + +static void +_JPEGErrorHandler(j_common_ptr cinfo __UNUSED__) +{ +/* emptr errmgr; */ + +/* errmgr = (emptr) cinfo->err; */ + /* cinfo->err->output_message(cinfo);*/ + /* longjmp(errmgr->setjmp_buffer, 1);*/ + return; +} + +static void +_JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, int msg_level __UNUSED__) +{ +/* emptr errmgr; */ + +/* errmgr = (emptr) cinfo->err; */ + /* cinfo->err->output_message(cinfo);*/ + /* longjmp(errmgr->setjmp_buffer, 1);*/ + return; +} + +struct jpeg_membuf_src +{ + struct jpeg_source_mgr pub; + + const unsigned char *buf; + size_t len; + struct jpeg_membuf_src *self; +}; + +static void +_evas_jpeg_membuf_src_init(j_decompress_ptr cinfo __UNUSED__) +{ +} + +static boolean +_evas_jpeg_membuf_src_fill(j_decompress_ptr cinfo) +{ + static const JOCTET jpeg_eoi[2] = { 0xFF, JPEG_EOI }; + struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src; + + src->pub.bytes_in_buffer = sizeof(jpeg_eoi); + src->pub.next_input_byte = jpeg_eoi; + + return TRUE; +} + +static void +_evas_jpeg_membuf_src_skip(j_decompress_ptr cinfo, + long num_bytes) +{ + struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src; + + if ((((long)src->pub.bytes_in_buffer - (long)src->len) > num_bytes) || + ((long)src->pub.bytes_in_buffer < num_bytes)) + { + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)); + return; + } + src->pub.bytes_in_buffer -= num_bytes; + src->pub.next_input_byte += num_bytes; +} + +static void +_evas_jpeg_membuf_src_term(j_decompress_ptr cinfo) +{ + struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src; + if (!src) return; + free(src); + cinfo->src = NULL; +} + +static int +_evas_jpeg_membuf_src(j_decompress_ptr cinfo, + void *map, size_t length) +{ + struct jpeg_membuf_src *src; + + src = calloc(1, sizeof(*src)); + if (!src) + return -1; + + src->self = src; + + cinfo->src = &src->pub; + src->buf = map; + src->len = length; + src->pub.init_source = _evas_jpeg_membuf_src_init; + src->pub.fill_input_buffer = _evas_jpeg_membuf_src_fill; + src->pub.skip_input_data = _evas_jpeg_membuf_src_skip; + src->pub.resync_to_restart = jpeg_resync_to_restart; + src->pub.term_source = _evas_jpeg_membuf_src_term; + src->pub.bytes_in_buffer = src->len; + src->pub.next_input_byte = src->buf; + + return 0; +} + +/*! Magic number for EXIF header & App1*/ +static const unsigned char ExifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00}; +static const unsigned char App1[] = {0xff, 0xe1}; +typedef enum { + EXIF_BYTE_ALIGN_II, + EXIF_BYTE_ALIGN_MM +} ExifByteAlign; + +static int +_get_orientation(void *map, size_t length) +{ + char *buf; + char orientation[2]; + ExifByteAlign byte_align; + unsigned int num_directory = 0; + unsigned int i, j; + int direction; + + /* open file and get 22 byte frome file */ + if (!map) return 0; + /* 1. read 22byte */ + if (length < 22) return 0; + buf = (char *)map; + + /* 2. check 2,3 bypte with APP1(0xFFE1) */ + if (memcmp(buf + 2, App1, sizeof (App1))) return 0; + + /* 3. check 6~11bype with Exif Header (0x45786966 0000) */ + if (memcmp(buf + 6, ExifHeader, sizeof (ExifHeader))) return 0; + + /* 4. get 12&13 byte get info of "II(0x4949)" or "MM(0x4d4d)" */ + /* 5. get [20]&[21] get directory entry # */ + if (!strncmp(buf + 12, "MM", 2)) + { + byte_align = EXIF_BYTE_ALIGN_MM; + num_directory = ((*(buf + 20) << 8) + *(buf + 21)); + orientation[0] = 0x01; + orientation[1] = 0x12; + } + else if (!strncmp(buf + 12, "II", 2)) + { + byte_align = EXIF_BYTE_ALIGN_II; + num_directory = ((*(buf + 21) << 8) + *(buf + 20)); + orientation[0] = 0x12; + orientation[1] = 0x01; + } + else return 0; + + buf = map + 22; + + if (length < (12 * num_directory + 22)) return 0; + + j = 0; + + for (i = 0; i < num_directory; i++ ) + { + if (!strncmp(buf + j, orientation, 2)) + { + /*get orientation tag */ + if (byte_align == EXIF_BYTE_ALIGN_MM) + direction = *(buf+ j + 11); + else direction = *(buf+ j + 8); + switch (direction) + { + case 3: + case 4: + return 180; + case 6: + case 7: + return 90; + case 5: + case 8: + return 270; + default: + return 0; + } + } + else + j = j + 12; + } + return 0; +} + +static Eina_Bool +evas_image_load_file_head_jpeg_internal(Image_Entry *ie, + void *map, size_t length, + int *error) +{ + unsigned int w, h, scalew, scaleh; + struct jpeg_decompress_struct cinfo; + struct _JPEG_error_mgr jerr; + + /* for rotation decoding */ + int degree = 0; + Eina_Bool change_wh = EINA_FALSE; + unsigned int load_opts_w = 0, load_opts_h = 0; + + cinfo.err = jpeg_std_error(&(jerr.pub)); + jerr.pub.error_exit = _JPEGFatalErrorHandler; + jerr.pub.emit_message = _JPEGErrorHandler2; + jerr.pub.output_message = _JPEGErrorHandler; + if (setjmp(jerr.setjmp_buffer)) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + if (cinfo.saw_JFIF_marker) + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + else + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + jpeg_create_decompress(&cinfo); + + if (_evas_jpeg_membuf_src(&cinfo, map, length)) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + + jpeg_read_header(&cinfo, TRUE); + cinfo.do_fancy_upsampling = FALSE; + cinfo.do_block_smoothing = FALSE; + cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss) + cinfo.dither_mode = JDITHER_ORDERED; + jpeg_start_decompress(&cinfo); + + /* rotation decoding */ + if (ie->load_opts.orientation) + { + degree = _get_orientation(map, length); + if (degree != 0) + { + ie->load_opts.degree = degree; + ie->flags.rotated = EINA_TRUE; + + if (degree == 90 || degree == 270) + change_wh = EINA_TRUE; + } + + } + + /* head decoding */ + w = cinfo.output_width; + h = cinfo.output_height; + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + (IMG_TOO_BIG(w, h))) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + if (IMG_TOO_BIG(w, h)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + if (ie->load_opts.scale_down_by > 1) + { + w /= ie->load_opts.scale_down_by; + h /= ie->load_opts.scale_down_by; + } + else if (ie->load_opts.dpi > 0.0) + { + w = (w * ie->load_opts.dpi) / 90.0; + h = (h * ie->load_opts.dpi) / 90.0; + } + else if ((ie->load_opts.w > 0) && (ie->load_opts.h > 0)) + { + unsigned int w2 = w, h2 = h; + /* user set load_opts' w,h on the assumption + that image already rotated according to it's orientation info */ + if (change_wh) + { + load_opts_w = ie->load_opts.w; + load_opts_h = ie->load_opts.h; + ie->load_opts.w = load_opts_h; + ie->load_opts.h = load_opts_w; + } + + if (ie->load_opts.w > 0) + { + w2 = ie->load_opts.w; + h2 = (ie->load_opts.w * h) / w; + if ((ie->load_opts.h > 0) && (h2 > ie->load_opts.h)) + { + unsigned int w3; + h2 = ie->load_opts.h; + w3 = (ie->load_opts.h * w) / h; + if (w3 > w2) + w2 = w3; + } + } + else if (ie->load_opts.h > 0) + { + h2 = ie->load_opts.h; + w2 = (ie->load_opts.h * w) / h; + } + w = w2; + h = h2; + if (change_wh) + { + ie->load_opts.w = load_opts_w; + ie->load_opts.h = load_opts_h; + } + } + if (w < 1) w = 1; + if (h < 1) h = 1; + + if ((w != cinfo.output_width) || (h != cinfo.output_height)) + { + scalew = cinfo.output_width / w; + scaleh = cinfo.output_height / h; + + ie->scale = scalew; + if (scaleh < scalew) ie->scale = scaleh; + + if (ie->scale > 8) ie->scale = 8; + else if (ie->scale < 1) ie->scale = 1; + + if (ie->scale == 3) ie->scale = 2; + else if (ie->scale == 5) ie->scale = 4; + else if (ie->scale == 6) ie->scale = 4; + else if (ie->scale == 7) ie->scale = 4; + } + + if (ie->scale > 1) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + jpeg_create_decompress(&cinfo); + + if (_evas_jpeg_membuf_src(&cinfo, map, length)) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + + jpeg_read_header(&cinfo, TRUE); + cinfo.do_fancy_upsampling = FALSE; + cinfo.do_block_smoothing = FALSE; + cinfo.scale_num = 1; + cinfo.scale_denom = ie->scale; + jpeg_calc_output_dimensions(&(cinfo)); + jpeg_start_decompress(&cinfo); + } + + ie->w = cinfo.output_width; + ie->h = cinfo.output_height; + + // be nice and clip region to image. if its totally outside, fail load + if ((ie->load_opts.region.w > 0) && (ie->load_opts.region.h > 0)) + { + unsigned int load_region_x = 0, load_region_y = 0; + unsigned int load_region_w = 0, load_region_h = 0; + if (ie->flags.rotated) + { + load_region_x = ie->load_opts.region.x; + load_region_y = ie->load_opts.region.y; + load_region_w = ie->load_opts.region.w; + load_region_h = ie->load_opts.region.h; + + switch (degree) + { + case 90: + ie->load_opts.region.x = load_region_y; + ie->load_opts.region.y = h - (load_region_x + load_region_w); + ie->load_opts.region.w = load_region_h; + ie->load_opts.region.h = load_region_w; + break; + case 180: + ie->load_opts.region.x = w - (load_region_x+ load_region_w); + ie->load_opts.region.y = h - (load_region_y + load_region_h); + + break; + case 270: + ie->load_opts.region.x = w - (load_region_y + load_region_h); + ie->load_opts.region.y = load_region_x; + ie->load_opts.region.w = load_region_h; + ie->load_opts.region.h = load_region_w; + break; + default: + break; + } + + } + RECTS_CLIP_TO_RECT(ie->load_opts.region.x, ie->load_opts.region.y, + ie->load_opts.region.w, ie->load_opts.region.h, + 0, 0, ie->w, ie->h); + if ((ie->load_opts.region.w <= 0) || (ie->load_opts.region.h <= 0)) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + ie->w = ie->load_opts.region.w; + ie->h = ie->load_opts.region.h; + if (ie->flags.rotated) + { + ie->load_opts.region.x = load_region_x; + ie->load_opts.region.y = load_region_y; + ie->load_opts.region.w = load_region_w; + ie->load_opts.region.h = load_region_h; + } + } +/* end head decoding */ + + if (change_wh) + { + unsigned int tmp; + tmp = ie->w; + ie->w = ie->h; + ie->h = tmp; + } + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +/* +static double +get_time(void) +{ + struct timeval timev; + + gettimeofday(&timev, NULL); + return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000); +} +*/ + +static Eina_Bool +evas_image_load_file_data_jpeg_internal(Image_Entry *ie, + void *map, size_t size, + int *error) +{ + unsigned int w, h; + struct jpeg_decompress_struct cinfo; + struct _JPEG_error_mgr jerr; + DATA8 *ptr, *line[16], *data; + DATA32 *ptr2, *ptr_rotate = NULL; + unsigned int x, y, l, i, scans; + int region = 0; + /* rotation setting */ + unsigned int tmp; + unsigned int load_region_x = 0, load_region_y = 0; + unsigned int load_region_w = 0, load_region_h = 0; + int degree = 0; + Eina_Bool change_wh = EINA_FALSE; + Eina_Bool line_done = EINA_FALSE; + + if (ie->flags.rotated) + { + degree = ie->load_opts.degree; + if (degree == 90 || degree == 270) + change_wh = EINA_TRUE; + } + + cinfo.err = jpeg_std_error(&(jerr.pub)); + jerr.pub.error_exit = _JPEGFatalErrorHandler; + jerr.pub.emit_message = _JPEGErrorHandler2; + jerr.pub.output_message = _JPEGErrorHandler; + if (setjmp(jerr.setjmp_buffer)) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + jpeg_create_decompress(&cinfo); + + if (_evas_jpeg_membuf_src(&cinfo, map, size)) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return 0; + } + + jpeg_read_header(&cinfo, TRUE); + cinfo.do_fancy_upsampling = FALSE; + cinfo.do_block_smoothing = FALSE; + cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss) + cinfo.dither_mode = JDITHER_ORDERED; + + if (ie->scale > 1) + { + cinfo.scale_num = 1; + cinfo.scale_denom = ie->scale; + } + + /* Colorspace conversion options */ + /* libjpeg can do the following conversions: */ + /* GRAYSCLAE => RGB YCbCr => RGB and YCCK => CMYK */ + switch (cinfo.jpeg_color_space) + { + case JCS_UNKNOWN: + break; + case JCS_GRAYSCALE: + case JCS_RGB: + case JCS_YCbCr: + cinfo.out_color_space = JCS_RGB; + break; + case JCS_CMYK: + case JCS_YCCK: + cinfo.out_color_space = JCS_CMYK; + break; + } + +/* head decoding */ + jpeg_calc_output_dimensions(&(cinfo)); + jpeg_start_decompress(&cinfo); + + w = cinfo.output_width; + h = cinfo.output_height; + + if (change_wh) + { + tmp = ie->w; + ie->w = ie->h; + ie->h = tmp; + } + + if ((ie->load_opts.region.w > 0) && (ie->load_opts.region.h > 0)) + { + region = 1; + + if (ie->flags.rotated) + { + load_region_x = ie->load_opts.region.x; + load_region_y = ie->load_opts.region.y; + load_region_w = ie->load_opts.region.w; + load_region_h = ie->load_opts.region.h; + + switch (degree) + { + case 90: + ie->load_opts.region.x = load_region_y; + ie->load_opts.region.y = h - (load_region_x + load_region_w); + ie->load_opts.region.w = load_region_h; + ie->load_opts.region.h = load_region_w; + break; + case 180: + ie->load_opts.region.x = w - (load_region_x+ load_region_w); + ie->load_opts.region.y = h - (load_region_y + load_region_h); + + break; + case 270: + ie->load_opts.region.x = w - (load_region_y + load_region_h); + ie->load_opts.region.y = load_region_x; + ie->load_opts.region.w = load_region_h; + ie->load_opts.region.h = load_region_w; + break; + default: + break; + } + + } +#ifdef BUILD_LOADER_JPEG_REGION + cinfo.region_x = ie->load_opts.region.x; + cinfo.region_y = ie->load_opts.region.y; + cinfo.region_w = ie->load_opts.region.w; + cinfo.region_h = ie->load_opts.region.h; +#endif + } + if ((!region) && ((w != ie->w) || (h != ie->h))) + { + // race condition, the file could have change from when we call header + // this test will not solve the problem with region code. + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + if ((region) && + ((ie->w != ie->load_opts.region.w) || (ie->h != ie->load_opts.region.h))) + { + ie->w = ie->load_opts.region.w; + ie->h = ie->load_opts.region.h; + } + + if (!(((cinfo.out_color_space == JCS_RGB) && + ((cinfo.output_components == 3) || (cinfo.output_components == 1))) || + ((cinfo.out_color_space == JCS_CMYK) && (cinfo.output_components == 4)))) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + +/* end head decoding */ +/* data decoding */ + if (cinfo.rec_outbuf_height > 16) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + data = alloca(w * 16 * cinfo.output_components); + evas_cache_image_surface_alloc(ie, ie->w, ie->h); + if (ie->flags.loaded) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_NONE; + if (region && ie->flags.rotated) + { + ie->load_opts.region.x = load_region_x; + ie->load_opts.region.y = load_region_y; + ie->load_opts.region.w = load_region_w; + ie->load_opts.region.h = load_region_h; + } + return EINA_TRUE; + } + if ((ie->flags.rotated) && change_wh) + { + ptr2 = malloc(ie->w * ie->h * sizeof(DATA32)); + ptr_rotate = ptr2; + } + else + ptr2 = evas_cache_image_pixels(ie); + + if (!ptr2) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + + /* We handle first CMYK (4 components) */ + if (cinfo.output_components == 4) + { + // FIXME: handle region + for (i = 0; (int)i < cinfo.rec_outbuf_height; i++) + line[i] = data + (i * w * 4); + for (l = 0; l < h; l += cinfo.rec_outbuf_height) + { + jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); + scans = cinfo.rec_outbuf_height; + if ((h - l) < scans) scans = h - l; + ptr = data; + if (!region) + { + for (y = 0; y < scans; y++) + { + if (cinfo.saw_Adobe_marker) + { + for (x = 0; x < w; x++) + { + /* According to libjpeg doc, Photoshop inverse the values of C, M, Y and K, */ + /* that is C is replaces by 255 - C, etc...*/ + /* See the comment below for the computation of RGB values from CMYK ones. */ + *ptr2 = + (0xff000000) | + ((ptr[0] * ptr[3] / 255) << 16) | + ((ptr[1] * ptr[3] / 255) << 8) | + ((ptr[2] * ptr[3] / 255)); + ptr += 4; + ptr2++; + } + } + else + { + for (x = 0; x < w; x++) + { + /* Conversion from CMYK to RGB is done in 2 steps: */ + /* CMYK => CMY => RGB (see http://www.easyrgb.com/index.php?X=MATH) */ + /* after computation, if C, M, Y and K are between 0 and 1, we have: */ + /* R = (1 - C) * (1 - K) * 255 */ + /* G = (1 - M) * (1 - K) * 255 */ + /* B = (1 - Y) * (1 - K) * 255 */ + /* libjpeg stores CMYK values between 0 and 255, */ + /* so we replace C by C * 255 / 255, etc... and we obtain: */ + /* R = (255 - C) * (255 - K) / 255 */ + /* G = (255 - M) * (255 - K) / 255 */ + /* B = (255 - Y) * (255 - K) / 255 */ + /* with C, M, Y and K between 0 and 255. */ + *ptr2 = + (0xff000000) | + (((255 - ptr[0]) * (255 - ptr[3]) / 255) << 16) | + (((255 - ptr[1]) * (255 - ptr[3]) / 255) << 8) | + (((255 - ptr[2]) * (255 - ptr[3]) / 255)); + ptr += 4; + ptr2++; + } + } + } + } + else + { + // if line # > region last line, break + if (l >= (ie->load_opts.region.y + ie->load_opts.region.h)) + { + line_done = EINA_TRUE; + /* if rotation flag is set , we have to rotate image */ + goto done; + /*jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_FALSE;*/ + } + // els if scan block intersects region start or later + else if ((l + scans) > + (ie->load_opts.region.y)) + { + for (y = 0; y < scans; y++) + { + if (((y + l) >= ie->load_opts.region.y) && + ((y + l) < (ie->load_opts.region.y + ie->load_opts.region.h))) + { + ptr += ie->load_opts.region.x; + if (cinfo.saw_Adobe_marker) + { + for (x = 0; x < ie->load_opts.region.w; x++) + { + /* According to libjpeg doc, Photoshop inverse the values of C, M, Y and K, */ + /* that is C is replaces by 255 - C, etc...*/ + /* See the comment below for the computation of RGB values from CMYK ones. */ + *ptr2 = + (0xff000000) | + ((ptr[0] * ptr[3] / 255) << 16) | + ((ptr[1] * ptr[3] / 255) << 8) | + ((ptr[2] * ptr[3] / 255)); + ptr += 4; + ptr2++; + } + } + else + { + for (x = 0; x < ie->load_opts.region.w; x++) + { + /* Conversion from CMYK to RGB is done in 2 steps: */ + /* CMYK => CMY => RGB (see http://www.easyrgb.com/index.php?X=MATH) */ + /* after computation, if C, M, Y and K are between 0 and 1, we have: */ + /* R = (1 - C) * (1 - K) * 255 */ + /* G = (1 - M) * (1 - K) * 255 */ + /* B = (1 - Y) * (1 - K) * 255 */ + /* libjpeg stores CMYK values between 0 and 255, */ + /* so we replace C by C * 255 / 255, etc... and we obtain: */ + /* R = (255 - C) * (255 - K) / 255 */ + /* G = (255 - M) * (255 - K) / 255 */ + /* B = (255 - Y) * (255 - K) / 255 */ + /* with C, M, Y and K between 0 and 255. */ + *ptr2 = + (0xff000000) | + (((255 - ptr[0]) * (255 - ptr[3]) / 255) << 16) | + (((255 - ptr[1]) * (255 - ptr[3]) / 255) << 8) | + (((255 - ptr[2]) * (255 - ptr[3]) / 255)); + ptr += 4; + ptr2++; + } + } + ptr += (4 * (w - (ie->load_opts.region.x + ie->load_opts.region.w))); + } + else + ptr += (4 * w); + } + } + } + } + } + /* We handle then RGB with 3 components */ + else if (cinfo.output_components == 3) + { +/* + double t; + if (region) + { + // debug for now + printf("R| %p %5ix%5i %s: %5i %5i %5ix%5i - ", + ie, + ie->w, ie->h, + ie->file, + ie->load_opts.region.x, + ie->load_opts.region.y, + ie->load_opts.region.w, + ie->load_opts.region.h); + } + t = get_time(); + */ + for (i = 0; (int)i < cinfo.rec_outbuf_height; i++) + line[i] = data + (i * w * 3); + for (l = 0; l < h; l += cinfo.rec_outbuf_height) + { + jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); + scans = cinfo.rec_outbuf_height; + if ((h - l) < scans) scans = h - l; + ptr = data; + if (!region) + { + for (y = 0; y < scans; y++) + { + for (x = 0; x < w; x++) + { + *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[1], ptr[2]); + ptr += 3; + ptr2++; + } + } + } + else + { + // if line # > region last line, break + // but not return immediately for rotation job + if (l >= (ie->load_opts.region.y + ie->load_opts.region.h)) + { + line_done = EINA_TRUE; + /* if rotation flag is set , we have to rotate image */ + goto done; + } + // else if scan block intersects region start or later + else if ((l + scans) > + (ie->load_opts.region.y)) + { + for (y = 0; y < scans; y++) + { + if (((y + l) >= ie->load_opts.region.y) && + ((y + l) < (ie->load_opts.region.y + ie->load_opts.region.h))) + { + ptr += (3 * ie->load_opts.region.x); + for (x = 0; x < ie->load_opts.region.w; x++) + { + *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[1], ptr[2]); + ptr += 3; + ptr2++; + } + ptr += (3 * (w - (ie->load_opts.region.x + ie->load_opts.region.w))); + } + else + ptr += (3 * w); + } + } + } + } +/* + t = get_time() - t; + printf("%3.3f\n", t); + */ + } + /* We finally handle RGB with 1 component */ + else if (cinfo.output_components == 1) + { + for (i = 0; (int)i < cinfo.rec_outbuf_height; i++) + line[i] = data + (i * w); + for (l = 0; l < h; l += cinfo.rec_outbuf_height) + { + jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); + scans = cinfo.rec_outbuf_height; + if ((h - l) < scans) scans = h - l; + ptr = data; + if (!region) + { + for (y = 0; y < scans; y++) + { + for (x = 0; x < w; x++) + { + *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[0], ptr[0]); + ptr++; + ptr2++; + } + } + } + else + { + // if line # > region last line, break + if (l >= (ie->load_opts.region.y + ie->load_opts.region.h)) + { + line_done = EINA_TRUE; + /* if rotation flag is set , we have to rotate image */ + goto done; + /*jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE;*/ + } + // els if scan block intersects region start or later + else if ((l + scans) > + (ie->load_opts.region.y)) + { + for (y = 0; y < scans; y++) + { + if (((y + l) >= ie->load_opts.region.y) && + ((y + l) < (ie->load_opts.region.y + ie->load_opts.region.h))) + { + ptr += ie->load_opts.region.x; + for (x = 0; x < ie->load_opts.region.w; x++) + { + *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[0], ptr[0]); + ptr++; + ptr2++; + } + ptr += w - (ie->load_opts.region.x + ie->load_opts.region.w); + } + else + ptr += w; + } + } + } + } + } + /* if rotation operation need, rotate it */ +done: + + if (ie->flags.rotated) + { + DATA32 *data1, *data2, *to, *from; + int x, y, w, h, hw; + + if (change_wh) + { + tmp = ie->w; + ie->w = ie->h; + ie->h = tmp; + } + + w = ie->w; + h = ie->h; + hw =w * h; + + data1 = evas_cache_image_pixels(ie); + + if (degree == 180) + { + DATA32 tmp; + + data2 = data1 + (h * w) -1; + for (x = (w * h) / 2; --x >= 0;) + { + tmp = *data1; + *data1 = *data2; + *data2 = tmp; + data1++; + data2--; + } + } + else + { + data2 = NULL; + to = NULL; + if (ptr_rotate) data2 = ptr_rotate; + + if (degree == 90) + { + to = data1 + w - 1; + hw = -hw - 1; + } + else if (degree == 270) + { + to = data1 + hw - w; + w = -w; + hw = hw + 1; + } + + if (to) + { + from = data2; + for (x = ie->w; --x >= 0;) + { + for (y =ie->h; --y >= 0;) + { + *to = *from; + from++; + to += w; + } + to += hw; + } + } + if (ptr_rotate) + { + free(ptr_rotate); + ptr_rotate = NULL; + } + } + if (region) + { + ie->load_opts.region.x = load_region_x; + ie->load_opts.region.y = load_region_y; + ie->load_opts.region.w = load_region_w; + ie->load_opts.region.h = load_region_h; + } + } + if (line_done) + { + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_FALSE; + } + /* end data decoding */ + jpeg_finish_decompress(&cinfo); + jpeg_destroy_decompress(&cinfo); + _evas_jpeg_membuf_src_term(&cinfo); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +#if 0 /* not used at the moment */ +static Eina_Bool +evas_image_load_file_data_jpeg_alpha_internal(Image_Entry *ie, FILE *f, int *error) +{ + int w, h; + struct jpeg_decompress_struct cinfo; + struct _JPEG_error_mgr jerr; + DATA8 *ptr, *line[16], *data; + DATA32 *ptr2; + int x, y, l, i, scans, prevy; + + if (!f) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + cinfo.err = jpeg_std_error(&(jerr.pub)); + jerr.pub.error_exit = _JPEGFatalErrorHandler; + jerr.pub.emit_message = _JPEGErrorHandler2; + jerr.pub.output_message = _JPEGErrorHandler; + if (setjmp(jerr.setjmp_buffer)) + { + jpeg_destroy_decompress(&cinfo); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + jpeg_create_decompress(&cinfo); + jpeg_stdio_src(&cinfo, f); + jpeg_read_header(&cinfo, TRUE); + cinfo.do_fancy_upsampling = FALSE; + cinfo.do_block_smoothing = FALSE; + jpeg_start_decompress(&cinfo); + +/* head decoding */ + ie->w = w = cinfo.output_width; + ie->h = h = cinfo.output_height; +/* end head decoding */ +/* data decoding */ + if (cinfo.rec_outbuf_height > 16) + { + jpeg_destroy_decompress(&cinfo); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE;; + } + data = alloca(w * 16 * 3); + if (!ie->flags.loaded) + { + jpeg_destroy_decompress(&cinfo); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + } + ptr2 = evas_cache_image_pixels(ie); + prevy = 0; + if (cinfo.output_components == 3) + { + for (i = 0; i < cinfo.rec_outbuf_height; i++) + line[i] = data + (i * w * 3); + for (l = 0; l < h; l += cinfo.rec_outbuf_height) + { + jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); + scans = cinfo.rec_outbuf_height; + if ((h - l) < scans) scans = h - l; + ptr = data; + for (y = 0; y < scans; y++) + { + for (x = 0; x < w; x++) + { + *ptr2 = + ((*ptr2) & 0x00ffffff) | + (((ptr[0] + ptr[1] + ptr[2]) / 3) << 24); + ptr += 3; + ptr2++; + } + } + } + } + else if (cinfo.output_components == 1) + { + for (i = 0; i < cinfo.rec_outbuf_height; i++) + line[i] = data + (i * w); + for (l = 0; l < h; l += cinfo.rec_outbuf_height) + { + jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); + scans = cinfo.rec_outbuf_height; + if ((h - l) < scans) scans = h - l; + ptr = data; + for (y = 0; y < scans; y++) + { + for (x = 0; x < w; x++) + { + *ptr2 = + ((*ptr2) & 0x00ffffff) | + ((ptr[0]) << 24); + ptr++; + ptr2++; + } + } + } + } +/* end data decoding */ + jpeg_finish_decompress(&cinfo); + jpeg_destroy_decompress(&cinfo); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} +#endif + +static Eina_Bool +evas_image_load_file_head_jpeg(Image_Entry *ie, + const char *file, const char *key __UNUSED__, + int *error) +{ + Eina_File *f; + void *map; + Eina_Bool val = EINA_FALSE; + + f = eina_file_open(file, EINA_FALSE); + if (!f) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + map = eina_file_map_all(f, EINA_FILE_WILLNEED); + if (!map) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + goto on_error; + } + + val = evas_image_load_file_head_jpeg_internal(ie, + map, eina_file_size_get(f), + error); + + eina_file_map_free(f, map); + + on_error: + eina_file_close(f); + return val; +} + +static Eina_Bool +evas_image_load_file_data_jpeg(Image_Entry *ie, + const char *file, const char *key __UNUSED__, + int *error) +{ + Eina_File *f; + void *map; + Eina_Bool val = EINA_FALSE; + + f = eina_file_open(file, EINA_FALSE); + if (!f) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + map = eina_file_map_all(f, EINA_FILE_WILLNEED); + if (!map) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + goto on_error; + } + + val = evas_image_load_file_data_jpeg_internal(ie, + map, eina_file_size_get(f), + error); + + eina_file_map_free(f, map); + + on_error: + eina_file_close(f); + return val; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_jpeg_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "jpeg", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, jpeg); + +#ifndef EVAS_STATIC_BUILD_JPEG +EVAS_EINA_MODULE_DEFINE(image_loader, jpeg); +#endif + diff --git a/libraries/evas/src/modules/loaders/pmaps/Makefile.am b/libraries/evas/src/modules/loaders/pmaps/Makefile.am new file mode 100644 index 0000000..dc07a32 --- /dev/null +++ b/libraries/evas/src/modules/loaders/pmaps/Makefile.am @@ -0,0 +1,36 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_pmaps_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_LOADER_PMAPS +if !EVAS_STATIC_BUILD_PMAPS + +pkgdir = $(libdir)/evas/modules/loaders/pmaps/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_pmaps.c + +module_la_LIBADD = @evas_image_loader_pmaps_libs@ @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_pmaps.la +libevas_loader_pmaps_la_SOURCES = evas_image_load_pmaps.c +libevas_loader_pmaps_la_LIBADD = @evas_image_loader_pmaps_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/loaders/pmaps/Makefile.in b/libraries/evas/src/modules/loaders/pmaps/Makefile.in new file mode 100644 index 0000000..de7b779 --- /dev/null +++ b/libraries/evas/src/modules/loaders/pmaps/Makefile.in @@ -0,0 +1,760 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/pmaps +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_pmaps_la_DEPENDENCIES = +am__libevas_loader_pmaps_la_SOURCES_DIST = evas_image_load_pmaps.c +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_TRUE@am_libevas_loader_pmaps_la_OBJECTS = evas_image_load_pmaps.lo +libevas_loader_pmaps_la_OBJECTS = \ + $(am_libevas_loader_pmaps_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_TRUE@am_libevas_loader_pmaps_la_rpath = +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_pmaps.c +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_pmaps.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_FALSE@am_module_la_rpath = -rpath \ +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_pmaps_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_pmaps_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_pmaps_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_FALSE@pkgdir = $(libdir)/evas/modules/loaders/pmaps/$(MODULE_ARCH) +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_FALSE@module_la_SOURCES = evas_image_load_pmaps.c +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_FALSE@module_la_LIBADD = @evas_image_loader_pmaps_libs@ @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_TRUE@noinst_LTLIBRARIES = libevas_loader_pmaps.la +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_TRUE@libevas_loader_pmaps_la_SOURCES = evas_image_load_pmaps.c +@BUILD_LOADER_PMAPS_TRUE@@EVAS_STATIC_BUILD_PMAPS_TRUE@libevas_loader_pmaps_la_LIBADD = @evas_image_loader_pmaps_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/pmaps/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/pmaps/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_pmaps.la: $(libevas_loader_pmaps_la_OBJECTS) $(libevas_loader_pmaps_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_pmaps_la_rpath) $(libevas_loader_pmaps_la_OBJECTS) $(libevas_loader_pmaps_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_pmaps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_pmaps.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_pmaps.lo: evas_image_load_pmaps.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_pmaps.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_pmaps.Tpo -c -o module_la-evas_image_load_pmaps.lo `test -f 'evas_image_load_pmaps.c' || echo '$(srcdir)/'`evas_image_load_pmaps.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_pmaps.Tpo $(DEPDIR)/module_la-evas_image_load_pmaps.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_pmaps.c' object='module_la-evas_image_load_pmaps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_pmaps.lo `test -f 'evas_image_load_pmaps.c' || echo '$(srcdir)/'`evas_image_load_pmaps.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c b/libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c new file mode 100644 index 0000000..9ba8f81 --- /dev/null +++ b/libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c @@ -0,0 +1,558 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef HAVE_EVIL +# include +#endif + +#include "evas_common.h" +#include "evas_private.h" + +#define FILE_BUFFER_SIZE 1024 * 32 +#define FILE_BUFFER_UNREAD_SIZE 16 + +static Eina_Bool evas_image_load_file_head_pmaps(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_pmaps(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +Evas_Image_Load_Func evas_image_load_pmaps_func = { + EINA_TRUE, + evas_image_load_file_head_pmaps, + evas_image_load_file_data_pmaps, + NULL +}; + +/* The buffer to load pmaps images */ +typedef struct Pmaps_Buffer Pmaps_Buffer; + +struct Pmaps_Buffer +{ + FILE *file; + + /* the buffer */ + DATA8 buffer[FILE_BUFFER_SIZE]; + DATA8 unread[FILE_BUFFER_UNREAD_SIZE]; + DATA8 *current; + DATA8 *end; + char type[3]; + unsigned char unread_len:7; + unsigned char last_buffer:1; + + /* image properties */ + int w; + int h; + int max; + + /* interface */ + int (*int_get) (Pmaps_Buffer *b, int *val); + int (*color_get) (Pmaps_Buffer *b, DATA32 *color); +}; + +/* internal used functions */ +static Eina_Bool pmaps_buffer_open(Pmaps_Buffer *b, const char *filename, int *error); +static void pmaps_buffer_close(Pmaps_Buffer *b); +static Eina_Bool pmaps_buffer_header_parse(Pmaps_Buffer *b, int *error); +static int pmaps_buffer_plain_int_get(Pmaps_Buffer *b, int *val); +static int pmaps_buffer_1byte_int_get(Pmaps_Buffer *b, int *val); +static int pmaps_buffer_2byte_int_get(Pmaps_Buffer *b, int *val); +static int pmaps_buffer_gray_get(Pmaps_Buffer *b, DATA32 *color); +static int pmaps_buffer_rgb_get(Pmaps_Buffer *b, DATA32 *color); +static int pmaps_buffer_plain_bw_get(Pmaps_Buffer *b, DATA32 *color); + +static size_t pmaps_buffer_plain_update(Pmaps_Buffer *b); +static size_t pmaps_buffer_raw_update(Pmaps_Buffer *b); +static int pmaps_buffer_comment_skip(Pmaps_Buffer *b); + +static Eina_Bool +evas_image_load_file_head_pmaps(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + Pmaps_Buffer b; + + if (!pmaps_buffer_open(&b, file, error)) + { + pmaps_buffer_close(&b); + return EINA_FALSE; + } + + if (!pmaps_buffer_header_parse(&b, error)) + { + pmaps_buffer_close(&b); + return EINA_FALSE; + } + + ie->w = b.w; + ie->h = b.h; + + pmaps_buffer_close(&b); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +static Eina_Bool +evas_image_load_file_data_pmaps(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + Pmaps_Buffer b; + int pixels; + DATA32 *ptr; + + if (!pmaps_buffer_open(&b, file, error)) + { + pmaps_buffer_close(&b); + return EINA_FALSE; + } + + if (!pmaps_buffer_header_parse(&b, error)) + { + pmaps_buffer_close(&b); + return EINA_FALSE; + } + + pixels = b.w * b.h; + + evas_cache_image_surface_alloc(ie, b.w, b.h); + ptr = evas_cache_image_pixels(ie); + if (!ptr) + { + pmaps_buffer_close(&b); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + + if (b.type[1] != '4') + { + while (pixels > 0 && b.color_get(&b, ptr)) + { + pixels--; + ptr++; + } + } + else + { + while (pixels > 0 + && (b.current != b.end || pmaps_buffer_raw_update(&b))) + { + int i; + + for (i = 7; i >= 0 && pixels > 0; i--) + { + if (*b.current & (1 << i)) + *ptr = 0xff000000; + else + *ptr = 0xffffffff; + ptr++; + pixels--; + } + b.current++; + } + } + + /* if there are some pix missing, give them a proper default */ + memset(ptr, 0xff, 4 * pixels); + pmaps_buffer_close(&b); + + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +/* internal used functions */ +static Eina_Bool +pmaps_buffer_open(Pmaps_Buffer *b, const char *filename, int *error) +{ + size_t len; + + b->file = fopen(filename, "rb"); + if (!b->file) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + *b->buffer = 0; + *b->unread = 0; + b->last_buffer = 0; + b->unread_len = 0; + + len = pmaps_buffer_plain_update(b); + + if (len < 3) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + fclose(b->file); + b->file = NULL; + return EINA_FALSE; + } + + /* copy the type */ + b->type[0] = b->buffer[0]; + b->type[1] = b->buffer[1]; + b->type[2] = 0; + /* skip the PX */ + b->current = b->buffer + 2; + + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +static void +pmaps_buffer_close(Pmaps_Buffer *b) +{ + if (b->file) + fclose(b->file); +} + +static Eina_Bool +pmaps_buffer_header_parse(Pmaps_Buffer *b, int *error) +{ + /* if there is no P at the beginning it is not a file we can parse */ + if (b->type[0] != 'P') + { + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + /* get the width */ + if (!pmaps_buffer_plain_int_get(b, &(b->w)) || b->w < 1) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + + /* get the height */ + if (!pmaps_buffer_plain_int_get(b, &(b->h)) || b->h < 1) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + + /* get the maximum value. P1 and P4 don't have a maximum value. */ + if (!(b->type[1] == '1' || b->type[1] == '4') + && (!pmaps_buffer_plain_int_get(b, &(b->max)) || b->max < 1)) + { + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + /* set up the color get callback */ + switch (b->type[1]) + { + /* Black and White */ + case '1': + b->color_get = pmaps_buffer_plain_bw_get; + break; + case '4': + /* Binary black and white use another format */ + b->color_get = NULL; + break; + case '2': + case '5': + b->color_get = pmaps_buffer_gray_get; + break; + case '3': + case '6': + b->color_get = pmaps_buffer_rgb_get; + break; + case '7': + /* XXX write me */ + return 0; + break; + default: + return 0; + } + /* set up the int get callback */ + switch (b->type[1]) + { + /* RAW */ + case '5': + case '6': + if (b->max < 256) + b->int_get = pmaps_buffer_1byte_int_get; + else + b->int_get = pmaps_buffer_2byte_int_get; + + if (b->current == b->end && !pmaps_buffer_raw_update(b)) + return 0; + + b->current++; + break; + /* Plain */ + case '2': + case '3': + b->int_get = pmaps_buffer_plain_int_get; + break; + /* Black and White Bitmaps don't use that callback */ + case '1': + case '4': + b->int_get = NULL; + /* we need to skip the next character fpr P4 it + * doesn't hurt if we do it for the P1 as well */ + b->current++; + break; + } + return 1; +} + +static size_t +pmaps_buffer_plain_update(Pmaps_Buffer *b) +{ + size_t r; + + /* if we already are in the last buffer we can not update it */ + if (b->last_buffer) + return 0; + + /* if we have unread bytes we need to put them before the new read + * stuff */ + if (b->unread_len) + memcpy(b->buffer, b->unread, b->unread_len); + + r = fread(&b->buffer[b->unread_len], 1, + FILE_BUFFER_SIZE - b->unread_len - 1, b->file) + b->unread_len; + + /* we haven't read anything nor have we bytes in the unread buffer */ + if (r == 0) + { + b->buffer[0] = '\0'; + b->end = b->buffer; + b->last_buffer = 1; + return 0; + } + + if (r < FILE_BUFFER_SIZE - 1) + { + /*we reached eof */ ; + b->last_buffer = 1; + } + + b->buffer[r] = 0; + + b->unread[0] = '\0'; + b->unread_len = 0; + + b->buffer[r] = '\0'; + b->current = b->buffer; + b->end = b->buffer + r; + + return r; +} + +static size_t +pmaps_buffer_raw_update(Pmaps_Buffer *b) +{ + size_t r; + + if (b->last_buffer) + return 0; + + if (b->unread_len) + memcpy(b->buffer, b->unread, b->unread_len); + + r = fread(&b->buffer[b->unread_len], 1, FILE_BUFFER_SIZE - b->unread_len, + b->file) + b->unread_len; + + if (r < FILE_BUFFER_SIZE) + { + /*we reached eof */ + b->last_buffer = 1; + } + + b->end = b->buffer + r; + b->current = b->buffer; + + if (b->unread_len) + { + /* the buffer is now read */ + *b->unread = 0; + b->unread_len = 0; + } + + return r; +} + +static int +pmaps_buffer_plain_int_get(Pmaps_Buffer *b, int *val) +{ + char *start; + DATA8 lastc; + + /* first skip all white space + * Note: we are skipping here actually every character than is not + * a digit */ + while (!isdigit(*b->current)) + { + if (*b->current == '\0') + { + if (!pmaps_buffer_plain_update(b)) + return 0; + + continue; + } + if (*b->current == '#' && !pmaps_buffer_comment_skip(b)) + return 0; + b->current++; + } + + start = (char *)b->current; + /* now find the end of the number */ + while (isdigit(*b->current)) + b->current++; + + lastc = *b->current; + *b->current = '\0'; + *val = atoi(start); + *b->current = lastc; + + return 1; +} + +static int +pmaps_buffer_1byte_int_get(Pmaps_Buffer *b, int *val) +{ + /* are we at the end of the buffer? */ + if (b->current == b->end && !pmaps_buffer_raw_update(b)) + return 0; + + *val = *b->current; + b->current++; + + return 1; +} +static int +pmaps_buffer_2byte_int_get(Pmaps_Buffer *b, int *val) +{ + /* are we at the end of the buffer? */ + if (b->current == b->end && !pmaps_buffer_raw_update(b)) + return 0; + + *val = (int)(*b->current << 8); + b->current++; + + /* are we at the end of the buffer? */ + if (b->current == b->end && !pmaps_buffer_raw_update(b)) + return 0; + + *val |= *b->current; + b->current++; + + return 1; +} + +static int +pmaps_buffer_comment_skip(Pmaps_Buffer *b) +{ + while (*b->current != '\n') + { + if (*b->current == '\0') + { + if (!pmaps_buffer_plain_update(b)) + return 0; + + continue; + } + b->current++; + } + return 1; +} + +static int +pmaps_buffer_rgb_get(Pmaps_Buffer *b, DATA32 *color) +{ + int vr, vg, vb; + + if (!b->int_get(b, &vr) || !b->int_get(b, &vg) || !b->int_get(b, &vb)) + return 0; + + if (b->max != 255) + { + vr = (vr * 255) / b->max; + vg = (vg * 255) / b->max; + vb = (vb * 255) / b->max; + } + if (vr > 255) + vr = 255; + if (vg > 255) + vg = 255; + if (vb > 255) + vb = 255; + + *color = ARGB_JOIN(0xff, vr, vg, vb); + + return 1; +} + +static int +pmaps_buffer_gray_get(Pmaps_Buffer *b, DATA32 *color) +{ + int val; + + if (!b->int_get(b, &val)) + return 0; + + if (b->max != 255) + val = (val * 255) / b->max; + if (val > 255) + val = 255; + *color = ARGB_JOIN(0xff, val, val, val); + + return 1; +} + +static int +pmaps_buffer_plain_bw_get(Pmaps_Buffer *b, DATA32 *val) +{ + /* first skip all white space + * Note: we are skipping here actually every character than is not + * a digit */ + while (!isdigit(*b->current)) + { + if (*b->current == '\0') + { + if (!pmaps_buffer_raw_update(b)) + return 0; + + continue; + } + if (*b->current == '#' && !pmaps_buffer_comment_skip(b)) + return 0; + b->current++; + } + + if (*b->current == '0') + *val = 0xffffffff; + else + *val = 0xff000000; + + b->current++; + + return 1; +} + +/* external functions */ +static int +module_open(Evas_Module *em) +{ + if (!em) + return 0; + em->functions = (void *)(&evas_image_load_pmaps_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = { + EVAS_MODULE_API_VERSION, + "pmaps", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, pmaps); + +#ifndef EVAS_STATIC_BUILD_PMAPS +EVAS_EINA_MODULE_DEFINE(image_loader, pmaps); +#endif diff --git a/libraries/evas/src/modules/loaders/png/Makefile.am b/libraries/evas/src/modules/loaders/png/Makefile.am new file mode 100644 index 0000000..f9387a5 --- /dev/null +++ b/libraries/evas/src/modules/loaders/png/Makefile.am @@ -0,0 +1,34 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_png_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +if BUILD_LOADER_PNG +if !EVAS_STATIC_BUILD_PNG + +pkgdir = $(libdir)/evas/modules/loaders/png/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_png.c + +module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_png_libs@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_png.la +libevas_loader_png_la_SOURCES = evas_image_load_png.c +libevas_loader_png_la_LIBADD = @evas_image_loader_png_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/loaders/png/Makefile.in b/libraries/evas/src/modules/loaders/png/Makefile.in new file mode 100644 index 0000000..0717299 --- /dev/null +++ b/libraries/evas/src/modules/loaders/png/Makefile.in @@ -0,0 +1,759 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/png +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_png_la_DEPENDENCIES = +am__libevas_loader_png_la_SOURCES_DIST = evas_image_load_png.c +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_TRUE@am_libevas_loader_png_la_OBJECTS = evas_image_load_png.lo +libevas_loader_png_la_OBJECTS = $(am_libevas_loader_png_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_TRUE@am_libevas_loader_png_la_rpath = +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_png.c +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_png.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@ -rpath \ +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_png_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_png_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_png_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@pkgdir = $(libdir)/evas/modules/loaders/png/$(MODULE_ARCH) +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@module_la_SOURCES = evas_image_load_png.c +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_png_libs@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_TRUE@noinst_LTLIBRARIES = libevas_loader_png.la +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_TRUE@libevas_loader_png_la_SOURCES = evas_image_load_png.c +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_TRUE@libevas_loader_png_la_LIBADD = @evas_image_loader_png_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/png/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/png/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_png.la: $(libevas_loader_png_la_OBJECTS) $(libevas_loader_png_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_png_la_rpath) $(libevas_loader_png_la_OBJECTS) $(libevas_loader_png_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_png.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_png.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_png.lo: evas_image_load_png.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_png.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_png.Tpo -c -o module_la-evas_image_load_png.lo `test -f 'evas_image_load_png.c' || echo '$(srcdir)/'`evas_image_load_png.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_png.Tpo $(DEPDIR)/module_la-evas_image_load_png.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_png.c' object='module_la-evas_image_load_png.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_png.lo `test -f 'evas_image_load_png.c' || echo '$(srcdir)/'`evas_image_load_png.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/png/evas_image_load_png.c b/libraries/evas/src/modules/loaders/png/evas_image_load_png.c new file mode 100644 index 0000000..a1480ae --- /dev/null +++ b/libraries/evas/src/modules/loaders/png/evas_image_load_png.c @@ -0,0 +1,328 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#ifdef HAVE_EVIL +# include +#endif + +#ifdef _WIN32_WCE +# define E_FOPEN(file, mode) evil_fopen_native((file), (mode)) +# define E_FREAD(buffer, size, count, stream) evil_fread_native(buffer, size, count, stream) +# define E_FCLOSE(stream) evil_fclose_native(stream) +#else +# define E_FOPEN(file, mode) fopen((file), (mode)) +# define E_FREAD(buffer, size, count, stream) fread(buffer, size, count, stream) +# define E_FCLOSE(stream) fclose(stream) +#endif + +#include "evas_common.h" +#include "evas_private.h" + + +#define PNG_BYTES_TO_CHECK 4 + + +static Eina_Bool evas_image_load_file_head_png(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_png(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +static Evas_Image_Load_Func evas_image_load_png_func = +{ + EINA_TRUE, + evas_image_load_file_head_png, + evas_image_load_file_data_png, + NULL +}; + +static Eina_Bool +evas_image_load_file_head_png(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + png_uint_32 w32, h32; + FILE *f; + png_structp png_ptr = NULL; + png_infop info_ptr = NULL; + int bit_depth, color_type, interlace_type; + unsigned char buf[PNG_BYTES_TO_CHECK]; + char hasa; + + hasa = 0; + f = E_FOPEN(file, "rb"); + if (!f) + { + ERR("File: '%s' does not exist\n", file); + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + /* if we havent read the header before, set the header data */ + if (E_FREAD(buf, PNG_BYTES_TO_CHECK, 1, f) != 1) + { + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + goto close_file; + } + + if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK)) + { + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + goto close_file; + } + + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (!png_ptr) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, NULL, NULL); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + goto close_file; + } + png_init_io(png_ptr, f); + png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); + png_read_info(png_ptr, info_ptr); + png_get_IHDR(png_ptr, info_ptr, (png_uint_32 *) (&w32), + (png_uint_32 *) (&h32), &bit_depth, &color_type, + &interlace_type, NULL, NULL); + if ((w32 < 1) || (h32 < 1) || (w32 > IMG_MAX_SIZE) || (h32 > IMG_MAX_SIZE) || + IMG_TOO_BIG(w32, h32)) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + if (IMG_TOO_BIG(w32, h32)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + goto close_file; + } + if (ie->load_opts.scale_down_by > 1) + { + ie->w = (int) w32 / ie->load_opts.scale_down_by; + ie->h = (int) h32 / ie->load_opts.scale_down_by; + if ((ie->w < 1) || (ie->h < 1)) + { + *error = EVAS_LOAD_ERROR_GENERIC; + goto close_file; + } + } + else + { + ie->w = (int) w32; + ie->h = (int) h32; + } + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) hasa = 1; + if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) hasa = 1; + if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) hasa = 1; + if (hasa) ie->flags.alpha = 1; + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + E_FCLOSE(f); + + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + + close_file: + E_FCLOSE(f); + return EINA_FALSE; +} + +static Eina_Bool +evas_image_load_file_data_png(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + unsigned char *surface; + png_uint_32 w32, h32; + int w, h; + FILE *f; + png_structp png_ptr = NULL; + png_infop info_ptr = NULL; + int bit_depth, color_type, interlace_type; + unsigned char buf[PNG_BYTES_TO_CHECK]; + unsigned char **lines; + char hasa; + int i, j; + int scale_ratio = 1, image_w = 0; + unsigned char *tmp_line; + DATA32 *src_ptr, *dst_ptr; + + hasa = 0; + f = E_FOPEN(file, "rb"); + if (!f) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + /* if we havent read the header before, set the header data */ + if (E_FREAD(buf, PNG_BYTES_TO_CHECK, 1, f) != 1) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + goto close_file; + } + if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK)) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + goto close_file; + } + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (!png_ptr) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, NULL, NULL); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + goto close_file; + } + png_init_io(png_ptr, f); + png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); + png_read_info(png_ptr, info_ptr); + png_get_IHDR(png_ptr, info_ptr, (png_uint_32 *) (&w32), + (png_uint_32 *) (&h32), &bit_depth, &color_type, + &interlace_type, NULL, NULL); + image_w = w32; + if (ie->load_opts.scale_down_by > 1) + { + scale_ratio = ie->load_opts.scale_down_by; + w32 /= scale_ratio; + h32 /= scale_ratio; + } + evas_cache_image_surface_alloc(ie, w32, h32); + surface = (unsigned char *) evas_cache_image_pixels(ie); + if (!surface) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + if ((w32 != ie->w) || (h32 != ie->h)) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + *error = EVAS_LOAD_ERROR_GENERIC; + goto close_file; + } + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) hasa = 1; + if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) hasa = 1; + if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) hasa = 1; + if (hasa) ie->flags.alpha = 1; + + /* Prep for transformations... ultimately we want ARGB */ + /* expand palette -> RGB if necessary */ + if (color_type == PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png_ptr); + /* expand gray (w/reduced bits) -> 8-bit RGB if necessary */ + if ((color_type == PNG_COLOR_TYPE_GRAY) || + (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) + { + png_set_gray_to_rgb(png_ptr); + if (bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr); + } + /* expand transparency entry -> alpha channel if present */ + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_tRNS_to_alpha(png_ptr); + /* reduce 16bit color -> 8bit color if necessary */ + if (bit_depth > 8) png_set_strip_16(png_ptr); + /* pack all pixels to byte boundaries */ + png_set_packing(png_ptr); + + w = ie->w; + h = ie->h; + /* we want ARGB */ +#ifdef WORDS_BIGENDIAN + png_set_swap_alpha(png_ptr); + if (!hasa) png_set_filler(png_ptr, 0xff, PNG_FILLER_BEFORE); +#else + png_set_bgr(png_ptr); + if (!hasa) png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); +#endif + + /* we read image line by line if scale down was set */ + if (scale_ratio == 1) + { + lines = (unsigned char **) alloca(h * sizeof(unsigned char *)); + for (i = 0; i < h; i++) + lines[i] = surface + (i * w * sizeof(DATA32)); + png_read_image(png_ptr, lines); + png_read_end(png_ptr, info_ptr); + } + else + { + tmp_line = (unsigned char *) alloca(image_w * sizeof(DATA32)); + dst_ptr = (DATA32 *)surface; + for (i = 0; i < h; i++) + { + png_read_row(png_ptr, tmp_line, NULL); + src_ptr = (DATA32 *)tmp_line; + for (j = 0; j < w; j++) + { + *dst_ptr = *src_ptr; + dst_ptr++; + src_ptr += scale_ratio; + } + for (j = 0; j < (scale_ratio - 1); j++) + { + png_read_row(png_ptr, tmp_line, NULL); + } + } + } + + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + E_FCLOSE(f); + evas_common_image_premul(ie); + + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + + close_file: + E_FCLOSE(f); + return EINA_FALSE; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_png_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "png", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, png); + +#ifndef EVAS_STATIC_BUILD_PNG +EVAS_EINA_MODULE_DEFINE(image_loader, png); +#endif diff --git a/libraries/evas/src/modules/loaders/psd/Makefile.am b/libraries/evas/src/modules/loaders/psd/Makefile.am new file mode 100644 index 0000000..8b06348 --- /dev/null +++ b/libraries/evas/src/modules/loaders/psd/Makefile.am @@ -0,0 +1,33 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +if BUILD_LOADER_PSD +if !EVAS_STATIC_BUILD_PSD + +pkgdir = $(libdir)/evas/modules/loaders/psd/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_psd.c + +module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_psd.la +libevas_loader_psd_la_SOURCES = evas_image_load_psd.c +libevas_loader_psd_la_LIBADD = + +endif +endif diff --git a/libraries/evas/src/modules/loaders/psd/Makefile.in b/libraries/evas/src/modules/loaders/psd/Makefile.in new file mode 100644 index 0000000..98d340a --- /dev/null +++ b/libraries/evas/src/modules/loaders/psd/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/psd +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_psd_la_DEPENDENCIES = +am__libevas_loader_psd_la_SOURCES_DIST = evas_image_load_psd.c +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_TRUE@am_libevas_loader_psd_la_OBJECTS = evas_image_load_psd.lo +libevas_loader_psd_la_OBJECTS = $(am_libevas_loader_psd_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_TRUE@am_libevas_loader_psd_la_rpath = +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_psd.c +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_psd.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@ -rpath \ +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_psd_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_psd_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@pkgdir = $(libdir)/evas/modules/loaders/psd/$(MODULE_ARCH) +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@module_la_SOURCES = evas_image_load_psd.c +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_TRUE@noinst_LTLIBRARIES = libevas_loader_psd.la +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_TRUE@libevas_loader_psd_la_SOURCES = evas_image_load_psd.c +@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_TRUE@libevas_loader_psd_la_LIBADD = +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/psd/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/psd/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_psd.la: $(libevas_loader_psd_la_OBJECTS) $(libevas_loader_psd_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_psd_la_rpath) $(libevas_loader_psd_la_OBJECTS) $(libevas_loader_psd_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_psd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_psd.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_psd.lo: evas_image_load_psd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_psd.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_psd.Tpo -c -o module_la-evas_image_load_psd.lo `test -f 'evas_image_load_psd.c' || echo '$(srcdir)/'`evas_image_load_psd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_psd.Tpo $(DEPDIR)/module_la-evas_image_load_psd.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_psd.c' object='module_la-evas_image_load_psd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_psd.lo `test -f 'evas_image_load_psd.c' || echo '$(srcdir)/'`evas_image_load_psd.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c b/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c new file mode 100644 index 0000000..5a85e17 --- /dev/null +++ b/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c @@ -0,0 +1,976 @@ +#define _XOPEN_SOURCE + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifdef HAVE_NETINET_IN_H +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifdef HAVE_EVIL +# include +#endif + +#include "evas_common.h" +#include "evas_private.h" + +typedef struct _PSD_Header PSD_Header; + +typedef enum _PSD_Mode + { + PSD_GREYSCALE = 1, + PSD_INDEXED = 2, + PSD_RGB = 3, + PSD_CMYK = 4 + } PSD_Mode; + +struct _PSD_Header +{ + unsigned char signature[4]; + unsigned short version; + unsigned char reserved[9]; + unsigned short channels; + unsigned int height; + unsigned int width; + unsigned short depth; + + unsigned short channel_num; + + PSD_Mode mode; +}; + +enum { + READ_COMPRESSED_SUCCESS, + READ_COMPRESSED_ERROR_FILE_CORRUPT, + READ_COMPRESSED_ERROR_FILE_READ_ERROR +}; + +static Eina_Bool get_compressed_channels_length(PSD_Header *Head, + FILE *file, + unsigned short *rle_table, + unsigned int *chanlen); + +static int +read_ushort(FILE *file, unsigned short *ret) +{ + unsigned char b[2]; + if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + // FIXME: need to check order + *ret = (b[0] << 8) | b[1]; + return 1; +} + +static int +read_uint(FILE *file, unsigned int *ret) +{ + unsigned char b[4]; + if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + // FIXME: need to check order + *ret = ARGB_JOIN(b[0], b[1], b[2], b[3]); + return 1; +} + +// Internal function used to get the Psd header from the current file. +Eina_Bool +psd_get_header(PSD_Header *header, FILE * file) +{ + unsigned short tmp; + +#define CHECK_RET(Call, Value) \ + if (Call != Value) return EINA_FALSE; + + CHECK_RET(fread(header->signature, sizeof (unsigned char), 4, file), 4); + CHECK_RET(read_ushort(file, &header->version), 1); + CHECK_RET(fread(header->reserved, sizeof (unsigned char), 6, file), 6); + CHECK_RET(read_ushort(file, &header->channels), 1); + CHECK_RET(read_uint(file, &header->height), 1); + CHECK_RET(read_uint(file, &header->width), 1); + CHECK_RET(read_ushort(file, &header->depth), 1); + + CHECK_RET(read_ushort(file, &tmp), 1); + header->mode = tmp; + +#undef CHECK_RET + + /* fprintf(stderr, "<<<<<<<<<<<\nsignature : %c%c%c%c\n", */ + /* header->signature[0], */ + /* header->signature[1], */ + /* header->signature[2], */ + /* header->signature[3]); */ + /* fprintf(stderr, "version : %i\n", header->version); */ + /* fprintf(stderr, "channels : %i\n", header->channels); */ + /* fprintf(stderr, "width x height : %dx%d\n", header->width, header->height); */ + /* fprintf(stderr, "depth : %i\n", header->depth); */ + /* fprintf(stderr, "mode : %i\n>>>>>>>>>>>>\n", header->mode); */ + + return EINA_TRUE; +} + + +// Internal function used to check if the HEADER is a valid Psd header. +Eina_Bool +is_psd(PSD_Header *header) +{ + if (strncmp((char*)header->signature, "8BPS", 4)) + return EINA_FALSE; + if (header->version != 1) + return EINA_FALSE; + if (header->channels < 1 || header->channels > 24) + return EINA_FALSE; + if (header->height < 1 || header->width < 1) + return EINA_FALSE; + if (header->depth != 1 && header->depth != 8 && header->depth != 16) + return EINA_FALSE; + + return EINA_TRUE; +} + +static Eina_Bool +evas_image_load_file_head_psd(Image_Entry *ie, const char *FileName, + const char *key __UNUSED__, int *error) +{ + FILE *f; + PSD_Header header; + Eina_Bool correct; + + *error = EVAS_LOAD_ERROR_NONE; + + f = fopen(FileName, "rb"); + if (f == NULL) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + correct = psd_get_header(&header, f); + fclose(f); + + if (!correct || !is_psd(&header)) + { + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + ie->w = header.width; + ie->h = header.height; + if (header.channels == 3) ie->flags.alpha = 0; + else ie->flags.alpha = 1; + + return EINA_TRUE; +} + +static unsigned int +read_compressed_channel(FILE* file, + const unsigned int channel_length __UNUSED__, + unsigned int size, + unsigned char* channel) +{ + // FIXME: what does channel_length means, and why is it not used + unsigned int i; + char headbyte, c; + +#define CHECK_RET(Call, Value) \ + if (Call != Value) return READ_COMPRESSED_ERROR_FILE_READ_ERROR; + + for (i = 0; i < size; ) + { + CHECK_RET(fread(&headbyte, 1, 1, file), 1); + + if (headbyte >= 0) + { + if (i + headbyte > size) + return READ_COMPRESSED_ERROR_FILE_CORRUPT; + + CHECK_RET(fread(channel + i, headbyte + 1, 1, file), 1); + + i += headbyte + 1; + } + else if (headbyte >= -127 && headbyte <= -1) + { + int run; + + CHECK_RET(fread(&c, 1, 1, file), 1); + + run = c; + /* if (run == -1) */ + /* return READ_COMPRESSED_ERROR_FILE_READ_ERROR; */ + + if (i + (-headbyte + 1) > size) + return READ_COMPRESSED_ERROR_FILE_CORRUPT; + + memset(channel + i, run, -headbyte + 1); + i += -headbyte + 1; + } + } + +#undef CHECK_RET + + return READ_COMPRESSED_SUCCESS; +} + + +Eina_Bool +psd_get_data(Image_Entry *ie __UNUSED__, + PSD_Header *head, + FILE *f, + unsigned char *buffer, Eina_Bool compressed, + int *error) +{ + unsigned int c, x, y, numchan, bps, bpc, bpp; + unsigned int pixels_count; + unsigned char *channel = NULL; + unsigned char *data = NULL; + + // Added 01-07-2009: This is needed to correctly load greyscale and + // paletted images. + switch (head->mode) + { + case PSD_GREYSCALE: + case PSD_INDEXED: + numchan = 1; + break; + default: + numchan = 3; + } + + bpp = head->channels; + bpc = head->depth / 8; + pixels_count = head->width * head->height; + + data = malloc(sizeof (unsigned char) * pixels_count * bpp); + if (!data) return EINA_FALSE; + + channel = malloc(sizeof (unsigned char) * pixels_count * bpc); + if (!channel) + { + free(data); + return EINA_FALSE; + } + + bps = head->width * head->channels * bpc; + // @TODO: Add support for this in, though I have yet to run across a .psd + // file that uses this. + if (compressed && bpc == 2) + { + free(data); + free(channel); + fprintf(stderr, "unsupported file format.\n"); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + +#define CHECK_RET(Call, Value) \ + if (Call != Value) \ + { \ + free(data); \ + free(channel); \ + return EINA_FALSE; \ + } + + if (!compressed) + { + if (bpc == 1) + { + for (c = 0; c < numchan; c++) + { + unsigned char *tmp = channel; + + CHECK_RET(fread(tmp, pixels_count, 1, f), 1); + + for (y = 0; y < head->height * bps; y += bps) + { + for (x = 0; x < bps; x += bpp, tmp++) + { + data[y + x + c] = *tmp; + } + } + } + + // Accumulate any remaining channels into a single alpha channel + //@TODO: This needs to be changed for greyscale images. + for (; c < head->channels; c++) + { + unsigned char *tmp = channel; + + CHECK_RET(fread(channel, pixels_count, 1, f), 1); + + for (y = 0; y < head->height * bps; y += bps) + { + for (x = 0; x < bps; x += bpp, tmp++) + { + unsigned short newval; + + // previous formula was : (old / 255 * new / 255) * 255 + newval = (*tmp) * data[y + x + 3]; + + data[y + x + 3] = newval >> 8; + } + } + } + } + else + { + int bps2; + + bps2 = bps / 2; + + // iCurImage->Bpc == 2 + for (c = 0; c < numchan; c++) + { + unsigned short *shortptr = (unsigned short*) channel; + + CHECK_RET(fread(channel, pixels_count * 2, 1, f), 1); + + for (y = 0; y < head->height * bps2; y += bps2) + { + for (x = 0; x < (unsigned int)bps2; x += bpp, shortptr++) + { + ((unsigned short*)data)[y + x + c] = *shortptr; + } + } + } + + // Accumulate any remaining channels into a single alpha channel + //@TODO: This needs to be changed for greyscale images. + for (; c < head->channels; c++) + { + unsigned short *shortptr = (unsigned short*) channel; + + CHECK_RET(fread(channel, pixels_count * 2, 1, f), 1); + + for (y = 0; y < head->height * bps2; y += bps2) + { + for (x = 0; x < (unsigned int)bps2; x += bpp, shortptr) + { + unsigned int newval; + + newval = *shortptr * ((unsigned short*)data)[y + x + 3]; + + ((unsigned short*)data)[y + x + 3] = newval >> 16; + } + } + } + } + } + else + { + unsigned short *rle_table; + unsigned int *chanlen; + + rle_table = alloca(head->height * head->channel_num * sizeof (unsigned short)); + chanlen = alloca(head->channel_num * sizeof (unsigned int)); + if (!get_compressed_channels_length(head, f, rle_table, chanlen)) + goto file_read_error; + + for (c = 0; c < numchan; c++) + { + unsigned char *tmp = channel; + int err; + + err = read_compressed_channel(f, + chanlen[c], + pixels_count, + channel); + if (err == READ_COMPRESSED_ERROR_FILE_CORRUPT) + goto file_corrupt; + else if (err == READ_COMPRESSED_ERROR_FILE_READ_ERROR) + goto file_read_error; + + for (y = 0; y < head->height * bps; y += bps) + { + for (x = 0; x < bps; x += bpp, tmp++) + { + data[y + x + c] = *tmp; + } + } + } + + // Initialize the alpha channel to solid + //@TODO: This needs to be changed for greyscale images. + if (head->channels >= 4) + { + for (y = 0; y < head->height * bps; y += bps) + { + for (x = 0; x < bps; x += bpp) + { + data[y + x + 3] = 255; + } + } + + for (; c < head->channels; c++) + { + unsigned char *tmp = channel; + int err; + + err = read_compressed_channel(f, + chanlen[c], + pixels_count, + channel); + if (err == READ_COMPRESSED_ERROR_FILE_CORRUPT) + goto file_corrupt; + else if (err == READ_COMPRESSED_ERROR_FILE_READ_ERROR) + goto file_read_error; + + for (y = 0; y < head->height * bps; y += bps) + { + for (x = 0; x < bps; x += bpp, tmp++) + { + unsigned short newval; + + newval = *tmp * data[y + x + 3]; + + data[y + x + 3] = newval >> 8; + } + } + } + } + } + + if (bpp == 3) + { + for (x = 0; x < pixels_count; x++) + { + buffer[x * 4 + 0] = data[x * 3 + 2]; + buffer[x * 4 + 1] = data[x * 3 + 1]; + buffer[x * 4 + 2] = data[x * 3 + 0]; + buffer[x * 4 + 3] = 255; + } + } + else + { + // BRGA to RGBA + for (x= 0; x < pixels_count; x++) + { + buffer[x * 4 + 0] = data[x * 4 + 2]; + buffer[x * 4 + 1] = data[x * 4 + 1]; + buffer[x * 4 + 2] = data[x * 4 + 0]; + buffer[x * 4 + 3] = data[x * 4 + 3]; + } + } + + free(channel); + free(data); + return EINA_TRUE; + +#undef CHECK_RET + + file_corrupt: + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + + file_read_error: + free(channel); + free(data); + + return EINA_FALSE; +} + + +Eina_Bool +get_single_channel(Image_Entry *ie __UNUSED__, + PSD_Header *head, + FILE *f, + unsigned char *buffer, + Eina_Bool compressed) +{ + unsigned int i, bpc; + unsigned short *tmp; + char headbyte; + int c; + int pixels_count; + + tmp = (unsigned short*)buffer; + bpc = (head->depth / 8); + pixels_count = head->width * head->height; + +#define CHECK_RET(Call, Value) \ + if (Call != Value) return EINA_FALSE; + + if (!compressed) + { + if (bpc == 1) + { + CHECK_RET(fread(buffer, pixels_count, 1, f), 1); + } + else + { // Bpc == 2 + CHECK_RET(fread(buffer, pixels_count * 2, 1, f), 1); + } + } + else + { + for (i = 0; i < (unsigned int)pixels_count; ) + { + CHECK_RET(fread(&headbyte, 1, 1, f), 1); + + if (headbyte >= 0) + { // && HeadByte <= 127 + CHECK_RET(fread(buffer + i, headbyte + 1, 1, f), 1); + + i += headbyte + 1; + } + if (headbyte >= -127 && headbyte <= -1) + { + int run; + + CHECK_RET(fread(&c, 1, 1, f), 1); + + run = c; + if (run == -1) return EINA_FALSE; + + memset(buffer + i, run, -headbyte + 1); + i += -headbyte + 1; + } + } + } + +#undef CHECK_RET + + return EINA_TRUE; +} + +Eina_Bool +read_psd_grey(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) +{ + unsigned int color_mode, resource_size, misc_info; + unsigned short compressed; + unsigned int type; + void *surface = NULL; + + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + +#define CHECK_RET(Call, Value) \ + if (Call != Value) return EINA_FALSE; + + CHECK_RET(read_uint(f, &color_mode), 1); + // Skip over the 'color mode data section' + CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + + CHECK_RET(read_uint(f, &resource_size), 1); + // Read the 'image resources section' + + CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + + CHECK_RET(read_uint(f, &misc_info), 1); + CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); + + CHECK_RET(read_ushort(f, &compressed), 1); + + ie->w = head->width; + ie->h = head->height; + if (head->channels == 3) ie->flags.alpha = 0; + else ie->flags.alpha = 1; + + head->channel_num = head->channels; + // Temporary to read only one channel...some greyscale .psd files have 2. + head->channels = 1; + + switch (head->depth) + { + case 8: + type = 1; + break; + case 16: + type = 2; + break; + default: + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + evas_cache_image_surface_alloc(ie, ie->w, ie->h); + surface = evas_cache_image_pixels(ie); + if (!surface) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto cleanup_error; + } + + if (!psd_get_data(ie, head, f, surface, compressed, error)) + goto cleanup_error; + + return EINA_TRUE; + +#undef CHECK_RET + + cleanup_error: + return EINA_FALSE; +} + + +Eina_Bool +read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) +{ + unsigned int color_mode, resource_size, misc_info; + unsigned short compressed; + void *surface; + + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + +#define CHECK_RET(Call, Value) \ + if (Call != Value) return EINA_FALSE; + + CHECK_RET(read_uint(f, &color_mode), 1); + CHECK_RET((color_mode % 3), 0); + /* + Palette = (unsigned char*)malloc(Colormode); + if (Palette == NULL) + return EINA_FALSE; + if (fread(&Palette, 1, Colormode, file) != Colormode) + goto cleanup_error; + */ + // Skip over the 'color mode data section' + CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + + // Read the 'image resources section' + CHECK_RET(read_uint(f, &resource_size), 1); + CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + + CHECK_RET(read_uint(f, &misc_info), 1); + CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); + + CHECK_RET(read_ushort(f, &compressed), 1); + + if (head->channels != 1 || head->depth != 8) + { + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + head->channel_num = head->channels; + + ie->w = head->width; + ie->h = head->height; + if (head->channels == 3) ie->flags.alpha = 0; + else ie->flags.alpha = 1; + + evas_cache_image_surface_alloc(ie, ie->w, ie->h); + surface = evas_cache_image_pixels(ie); + if (!surface) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + + if (!psd_get_data(ie, head, f, surface, compressed, error)) + return EINA_FALSE; + return EINA_TRUE; + +#undef CHECK_RET +} + +Eina_Bool +read_psd_rgb(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) +{ + unsigned int color_mode, resource_size, misc_info; + unsigned short compressed; + unsigned int type; + void *surface; + +#define CHECK_RET(Call, Value) \ + if (Call != Value) return EINA_FALSE; + + CHECK_RET(read_uint(f, &color_mode), 1); + // Skip over the 'color mode data section' + CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + + // Read the 'image resources section' + CHECK_RET(read_uint(f, &resource_size), 1); + CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + + CHECK_RET(read_uint(f, &misc_info), 1); + CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); + + CHECK_RET(read_ushort(f, &compressed), 1); + + head->channel_num = head->channels; + + switch (head->depth) + { + case 8: + type = 1; + break; + case 16: + type = 2; + break; + default: + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + ie->w = head->width; + ie->h = head->height; + if (head->channels == 3) ie->flags.alpha = 0; + else ie->flags.alpha = 1; + + evas_cache_image_surface_alloc(ie, ie->w, ie->h); + surface = evas_cache_image_pixels(ie); + if (!surface) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto cleanup_error; + } + + if (!psd_get_data(ie, head, f, surface, compressed, error)) + goto cleanup_error; + + evas_common_image_premul(ie); + return EINA_TRUE; + +#undef CHECK_RET + + cleanup_error: + return EINA_FALSE; +} + +Eina_Bool +read_psd_cmyk(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) +{ + unsigned int color_mode, resource_size, misc_info, size, i, j, data_size; + unsigned short compressed; + unsigned int format, type; + unsigned char *kchannel = NULL; + void *surface; + + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + +#define CHECK_RET(Call, Value) \ + if (Call != Value) return EINA_FALSE; + + CHECK_RET(read_uint(f, &color_mode), 1); + // Skip over the 'color mode data section' + CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + + CHECK_RET(read_uint(f, &resource_size), 1); + // Read the 'image resources section' + CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + + CHECK_RET(read_uint(f, &misc_info), 1); + CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); + + CHECK_RET(read_ushort(f, &compressed), 1); + + switch (head->channels) + { + case 4: + format = 0x1907; + head->channel_num = 4; + head->channels = 3; + break; + case 5: + format = 0x1908; + head->channel_num = 5; + head->channels = 4; + break; + default: + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + switch (head->depth) + { + case 8: + type = 1; + break; + case 16: + type = 2; + break; + default: + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + ie->w = head->width; + ie->h = head->height; + if (head->channels == 3) ie->flags.alpha = 0; + else ie->flags.alpha = 1; + + evas_cache_image_surface_alloc(ie, ie->w, ie->h); + surface = evas_cache_image_pixels(ie); + if (!surface) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto cleanup_error; + } + + if (!psd_get_data(ie, head, f, surface, compressed, error)) + goto cleanup_error; + + size = type * ie->w * ie->h; + kchannel = malloc(size); + if (kchannel == NULL) + goto cleanup_error; + if (!get_single_channel(ie, head, f, kchannel, compressed)) + goto cleanup_error; + + data_size = head->channels * type * ie->w * ie->h; + if (format == 0x1907) + { + unsigned char *tmp = surface; + const unsigned char *limit = tmp + data_size; + + for (i = 0, j = 0; tmp < limit; tmp++, j++) + { + int k; + + for (k = 0; k < 3; k++) + *tmp = (*tmp * kchannel[j]) >> 8; + + // FIXME: tmp[i+3] = 255; + } + } + else + { // RGBA + unsigned char *tmp = surface; + const unsigned char *limit = tmp + data_size; + + // The KChannel array really holds the alpha channel on this one. + for (i = 0, j = 0; tmp < limit; tmp += 4, j++) + { + tmp[0] = (tmp[0] * tmp[3]) >> 8; + tmp[1] = (tmp[1] * tmp[3]) >> 8; + tmp[2] = (tmp[2] * tmp[3]) >> 8; + tmp[3] = kchannel[j]; // Swap 'K' with alpha channel. + } + } + + free(kchannel); + + evas_common_image_premul(ie); + return EINA_TRUE; + + cleanup_error: + free(kchannel); + return EINA_FALSE; +} + +static Eina_Bool +evas_image_load_file_data_psd(Image_Entry *ie, + const char *file, + const char *key __UNUSED__, + int *error) +{ + FILE *f; + PSD_Header header; + Eina_Bool bpsd = EINA_FALSE; + + f = fopen(file, "rb"); + if (f == NULL) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return bpsd; + } + + if (!psd_get_header(&header, f) || !is_psd(&header)) + { + fclose(f); + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + + ie->w = header.width; + ie->h = header.height; + + *error = EVAS_LOAD_ERROR_NONE; + + switch (header.mode) + { + case PSD_GREYSCALE: // Greyscale + bpsd = read_psd_grey(ie, &header, f, error); + break; + case PSD_INDEXED: // Indexed + bpsd = read_psd_indexed(ie, &header, f, error); + break; + case PSD_RGB: // RGB + bpsd = read_psd_rgb(ie, &header, f, error); + break; + case PSD_CMYK: // CMYK + bpsd = read_psd_cmyk(ie, &header, f, error); + break; + default : + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + bpsd = EINA_FALSE; + } + fclose(f); + + return bpsd; +} + +static Eina_Bool +get_compressed_channels_length(PSD_Header *head, + FILE * file, + unsigned short *rle_table, + unsigned int *chanlen) +{ + unsigned int j; + unsigned int c; + + if (fread(rle_table, + sizeof(unsigned short), + head->height * head->channel_num, + file) != head->height * head->channel_num) + return EINA_FALSE; + + memset(chanlen, 0, head->channel_num * sizeof(unsigned int)); + for (c = 0; c < head->channel_num; c++) + { + unsigned int i; + + j = c * head->height; + for (i = 0; i < head->height; i++) + { + chanlen[c] += rle_table[i + j]; + } + } + + return EINA_TRUE; +} + +static const Evas_Image_Load_Func evas_image_load_psd_func = { + EINA_TRUE, + evas_image_load_file_head_psd, + evas_image_load_file_data_psd, + NULL +}; + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_psd_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = + { + EVAS_MODULE_API_VERSION, + "psd", + "none", + { + module_open, + module_close + } + }; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, psd); + + +#ifndef EVAS_STATIC_BUILD_PSD +EVAS_EINA_MODULE_DEFINE(image_loader, psd); +#endif diff --git a/libraries/evas/src/modules/loaders/svg/Makefile.am b/libraries/evas/src/modules/loaders/svg/Makefile.am new file mode 100644 index 0000000..4b8d1b5 --- /dev/null +++ b/libraries/evas/src/modules/loaders/svg/Makefile.am @@ -0,0 +1,34 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_svg_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_LOADER_SVG +if !EVAS_STATIC_BUILD_SVG + +pkgdir = $(libdir)/evas/modules/loaders/svg/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_svg.c + +module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_svg_libs@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_svg.la +libevas_loader_svg_la_SOURCES = evas_image_load_svg.c +libevas_loader_svg_la_LIBADD = @evas_image_loader_svg_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/loaders/svg/Makefile.in b/libraries/evas/src/modules/loaders/svg/Makefile.in new file mode 100644 index 0000000..f81a3c3 --- /dev/null +++ b/libraries/evas/src/modules/loaders/svg/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/svg +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_svg_la_DEPENDENCIES = +am__libevas_loader_svg_la_SOURCES_DIST = evas_image_load_svg.c +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_TRUE@am_libevas_loader_svg_la_OBJECTS = evas_image_load_svg.lo +libevas_loader_svg_la_OBJECTS = $(am_libevas_loader_svg_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_TRUE@am_libevas_loader_svg_la_rpath = +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_svg.c +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_svg.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@ -rpath \ +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_svg_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_svg_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_svg_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@pkgdir = $(libdir)/evas/modules/loaders/svg/$(MODULE_ARCH) +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@module_la_SOURCES = evas_image_load_svg.c +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_svg_libs@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_TRUE@noinst_LTLIBRARIES = libevas_loader_svg.la +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_TRUE@libevas_loader_svg_la_SOURCES = evas_image_load_svg.c +@BUILD_LOADER_SVG_TRUE@@EVAS_STATIC_BUILD_SVG_TRUE@libevas_loader_svg_la_LIBADD = @evas_image_loader_svg_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/svg/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/svg/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_svg.la: $(libevas_loader_svg_la_OBJECTS) $(libevas_loader_svg_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_svg_la_rpath) $(libevas_loader_svg_la_OBJECTS) $(libevas_loader_svg_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_svg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_svg.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_svg.lo: evas_image_load_svg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_svg.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_svg.Tpo -c -o module_la-evas_image_load_svg.lo `test -f 'evas_image_load_svg.c' || echo '$(srcdir)/'`evas_image_load_svg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_svg.Tpo $(DEPDIR)/module_la-evas_image_load_svg.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_svg.c' object='module_la-evas_image_load_svg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_svg.lo `test -f 'evas_image_load_svg.c' || echo '$(srcdir)/'`evas_image_load_svg.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c b/libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c new file mode 100644 index 0000000..f1c8452 --- /dev/null +++ b/libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c @@ -0,0 +1,280 @@ +#include "evas_common.h" +#include "evas_private.h" + +#include +#include + +static inline Eina_Bool evas_image_load_file_is_svg(const char *file) EINA_ARG_NONNULL(1) EINA_PURE; +static Eina_Bool evas_image_load_file_head_svg(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_svg(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +Evas_Image_Load_Func evas_image_load_svg_func = +{ + EINA_FALSE, + evas_image_load_file_head_svg, + evas_image_load_file_data_svg, + NULL +}; + +static int rsvg_initialized = 0; + + +static inline Eina_Bool evas_image_load_file_is_svg(const char *file) +{ + int i, len = strlen(file); + Eina_Bool is_gz = EINA_FALSE; + + for (i = len - 1; i > 0; i--) + { + if (file[i] == '.') + { + if (is_gz) + break; + else if (strcasecmp(file + i + 1, "gz") == 0) + is_gz = EINA_TRUE; + else + break; + } + } + + if (i < 1) return EINA_FALSE; + i++; + if (i >= len) return EINA_FALSE; + if (strncasecmp(file + i, "svg", 3) != 0) return EINA_FALSE; + i += 3; + if (is_gz) + { + if (file[i] == '.') return EINA_TRUE; + else return EINA_FALSE; + } + else + { + if (file[i] == '\0') return EINA_TRUE; + else if (((file[i] == 'z') || (file[i] == 'Z')) && (!file[i + 1])) return EINA_TRUE; + else return EINA_FALSE; + } +} + +static Eina_Bool +evas_image_load_file_head_svg(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + RsvgHandle *rsvg; + RsvgDimensionData dim; + int w, h; + + /* ignore all files not called .svg or .svg.gz - because rsvg has a leak + * where closing the handle doesn't free mem */ + if (!evas_image_load_file_is_svg(file)) + { + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + rsvg = rsvg_handle_new_from_file(file, NULL); + if (!rsvg) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + rsvg_handle_set_dpi(rsvg, 75.0); + rsvg_handle_get_dimensions(rsvg, &dim); + w = dim.width; + h = dim.height; + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + rsvg_handle_close(rsvg, NULL); + g_object_unref(rsvg); + if (IMG_TOO_BIG(w, h)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + if (ie->load_opts.scale_down_by > 1) + { + w /= ie->load_opts.scale_down_by; + h /= ie->load_opts.scale_down_by; + } + else if (ie->load_opts.dpi > 0.0) + { + w = (w * ie->load_opts.dpi) / 75.0; + h = (h * ie->load_opts.dpi) / 75.0; + } + else if ((ie->load_opts.w > 0) && + (ie->load_opts.h > 0)) + { + unsigned int w2, h2; + + w2 = ie->load_opts.w; + h2 = (ie->load_opts.w * h) / w; + if (h2 > ie->load_opts.h) + { + h2 = ie->load_opts.h; + w2 = (ie->load_opts.h * w) / h; + } + w = w2; + h = h2; + } + if (w < 1) w = 1; + if (h < 1) h = 1; + ie->w = w; + ie->h = h; + ie->flags.alpha = 1; + rsvg_handle_close(rsvg, NULL); + g_object_unref(rsvg); + + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +/** FIXME: All evas loaders need to be tightened up **/ +static Eina_Bool +evas_image_load_file_data_svg(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + DATA32 *pixels; + RsvgHandle *rsvg; + RsvgDimensionData dim; + int w, h; + cairo_surface_t *surface; + cairo_t *cr; + + /* ignore all files not called .svg or .svg.gz - because rsvg has a leak + * where closing the handle doesn't free mem */ + if (!evas_image_load_file_is_svg(file)) + { + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + rsvg = rsvg_handle_new_from_file(file, NULL); + if (!rsvg) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + rsvg_handle_set_dpi(rsvg, 75.0); + rsvg_handle_get_dimensions(rsvg, &dim); + w = dim.width; + h = dim.height; + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE)) + { + rsvg_handle_close(rsvg, NULL); + g_object_unref(rsvg); + if (IMG_TOO_BIG(w, h)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + if (ie->load_opts.scale_down_by > 1) + { + w /= ie->load_opts.scale_down_by; + h /= ie->load_opts.scale_down_by; + } + else if (ie->load_opts.dpi > 0.0) + { + w = (w * ie->load_opts.dpi) / 75.0; + h = (h * ie->load_opts.dpi) / 75.0; + } + else if ((ie->load_opts.w > 0) && + (ie->load_opts.h > 0)) + { + unsigned int w2, h2; + + w2 = ie->load_opts.w; + h2 = (ie->load_opts.w * h) / w; + if (h2 > ie->load_opts.h) + { + h2 = ie->load_opts.h; + w2 = (ie->load_opts.h * w) / h; + } + w = w2; + h = h2; + } + if (w < 1) w = 1; + if (h < 1) h = 1; + if ((w != (int)ie->w) || (h != (int)ie->h)) + { + *error = EVAS_LOAD_ERROR_GENERIC; + goto error; + } + ie->flags.alpha = 1; + evas_cache_image_surface_alloc(ie, w, h); + pixels = evas_cache_image_pixels(ie); + if (!pixels) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto error; + } + + memset(pixels, 0, w * h * sizeof(DATA32)); + surface = cairo_image_surface_create_for_data((unsigned char *)pixels, CAIRO_FORMAT_ARGB32, + w, h, w * sizeof(DATA32)); + if (!surface) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto error; + } + cr = cairo_create(surface); + if (!cr) + { + cairo_surface_destroy(surface); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto error; + } + + cairo_scale(cr, + (double)ie->w / dim.em, + (double)ie->h / dim.ex); + rsvg_handle_render_cairo(rsvg, cr); + cairo_surface_destroy(surface); + /* need to check if this is required... */ + cairo_destroy(cr); + rsvg_handle_close(rsvg, NULL); + g_object_unref(rsvg); + evas_common_image_set_alpha_sparse(ie); + return EINA_TRUE; + + error: + rsvg_handle_close(rsvg, NULL); + g_object_unref(rsvg); + return EINA_FALSE; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_svg_func); + if (!rsvg_initialized) rsvg_init(); + rsvg_initialized = 1; + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + if (!rsvg_initialized) return; + //rsvg_term(); + //rsvg_initialized = 0; +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "svg", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, svg); + +#ifndef EVAS_STATIC_BUILD_SVG +EVAS_EINA_MODULE_DEFINE(image_loader, svg); +#endif diff --git a/libraries/evas/src/modules/loaders/tga/Makefile.am b/libraries/evas/src/modules/loaders/tga/Makefile.am new file mode 100644 index 0000000..4d9e240 --- /dev/null +++ b/libraries/evas/src/modules/loaders/tga/Makefile.am @@ -0,0 +1,33 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +if BUILD_LOADER_TGA +if !EVAS_STATIC_BUILD_TGA + +pkgdir = $(libdir)/evas/modules/loaders/tga/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_tga.c + +module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_tga.la +libevas_loader_tga_la_SOURCES = evas_image_load_tga.c +libevas_loader_tga_la_LIBADD = + +endif +endif diff --git a/libraries/evas/src/modules/loaders/tga/Makefile.in b/libraries/evas/src/modules/loaders/tga/Makefile.in new file mode 100644 index 0000000..645c77a --- /dev/null +++ b/libraries/evas/src/modules/loaders/tga/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/tga +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_tga_la_DEPENDENCIES = +am__libevas_loader_tga_la_SOURCES_DIST = evas_image_load_tga.c +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_TRUE@am_libevas_loader_tga_la_OBJECTS = evas_image_load_tga.lo +libevas_loader_tga_la_OBJECTS = $(am_libevas_loader_tga_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_TRUE@am_libevas_loader_tga_la_rpath = +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_tga.c +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_tga.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@ -rpath \ +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_tga_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_tga_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@pkgdir = $(libdir)/evas/modules/loaders/tga/$(MODULE_ARCH) +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@module_la_SOURCES = evas_image_load_tga.c +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_TRUE@noinst_LTLIBRARIES = libevas_loader_tga.la +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_TRUE@libevas_loader_tga_la_SOURCES = evas_image_load_tga.c +@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_TRUE@libevas_loader_tga_la_LIBADD = +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/tga/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/tga/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_tga.la: $(libevas_loader_tga_la_OBJECTS) $(libevas_loader_tga_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_tga_la_rpath) $(libevas_loader_tga_la_OBJECTS) $(libevas_loader_tga_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_tga.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_tga.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_tga.lo: evas_image_load_tga.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_tga.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_tga.Tpo -c -o module_la-evas_image_load_tga.lo `test -f 'evas_image_load_tga.c' || echo '$(srcdir)/'`evas_image_load_tga.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_tga.Tpo $(DEPDIR)/module_la-evas_image_load_tga.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_tga.c' object='module_la-evas_image_load_tga.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_tga.lo `test -f 'evas_image_load_tga.c' || echo '$(srcdir)/'`evas_image_load_tga.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c b/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c new file mode 100644 index 0000000..61b99f6 --- /dev/null +++ b/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c @@ -0,0 +1,596 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#ifdef HAVE_EVIL +# include +#endif + +#include "evas_common.h" +#include "evas_private.h" + +/* TGA pixel formats */ +#define TGA_TYPE_MAPPED 1 // handle +#define TGA_TYPE_COLOR 2 +#define TGA_TYPE_GRAY 3 +#define TGA_TYPE_MAPPED_RLE 9 // handle +#define TGA_TYPE_COLOR_RLE 10 +#define TGA_TYPE_GRAY_RLE 11 + +/* TGA header flags */ +#define TGA_DESC_ABITS 0x0f +#define TGA_DESC_HORIZONTAL 0x10 +#define TGA_DESC_VERTICAL 0x20 + +#define TGA_SIGNATURE "TRUEVISION-XFILE" + +typedef struct _tga_header tga_header; +typedef struct _tga_footer tga_footer; + +struct _tga_header +{ + unsigned char idLength; + unsigned char colorMapType; + unsigned char imageType; + unsigned char colorMapIndexLo, colorMapIndexHi; + unsigned char colorMapLengthLo, colorMapLengthHi; + unsigned char colorMapSize; + unsigned char xOriginLo, xOriginHi; + unsigned char yOriginLo, yOriginHi; + unsigned char widthLo, widthHi; + unsigned char heightLo, heightHi; + unsigned char bpp; + unsigned char descriptor; +} __attribute__((packed)); + +struct _tga_footer +{ + unsigned int extensionAreaOffset; + unsigned int developerDirectoryOffset; + char signature[16]; + char dot; + char null; +} __attribute__((packed)); + + +static Eina_Bool evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_tga(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +static Evas_Image_Load_Func evas_image_load_tga_func = +{ + EINA_TRUE, + evas_image_load_file_head_tga, + evas_image_load_file_data_tga, + NULL +}; + +static Eina_Bool +evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + Eina_File *f; + unsigned char *seg = NULL, *filedata; + tga_header *header; + tga_footer *footer, tfooter; + char hasa = 0, footer_present = 0, vinverted = 0; + int w = 0, h = 0, bpp; + int x, y; + int abits; + + f = eina_file_open(file, EINA_FALSE); + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + if (f == NULL) return EINA_FALSE; + + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + if (eina_file_size_get(f) < (off_t)(sizeof(tga_header) + sizeof(tga_footer))) + goto close_file; + seg = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (seg == NULL) goto close_file; + filedata = seg; + + header = (tga_header *)filedata; + // no unaligned data accessed, so ok + footer = (tga_footer *)(filedata + (eina_file_size_get(f) - sizeof(tga_footer))); + memcpy((unsigned char *)(&tfooter), + (unsigned char *)footer, + sizeof(tga_footer)); + printf("0\n"); + if (!memcmp(tfooter.signature, TGA_SIGNATURE, sizeof(tfooter.signature))) + { + if ((tfooter.dot == '.') && (tfooter.null == 0)) + { + // footer is there and matches. this is a tga file - any problems now + // are a corrupt file + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + footer_present = 1; + } + } +// else goto close_file; + printf("1\n"); + + filedata = (unsigned char *)filedata + sizeof(tga_header); + vinverted = !(header->descriptor & TGA_DESC_VERTICAL); + switch (header->imageType) + { + case TGA_TYPE_COLOR_RLE: + case TGA_TYPE_GRAY_RLE: +// rle = 1; + break; + case TGA_TYPE_COLOR: + case TGA_TYPE_GRAY: +// rle = 0; + break; + default: + goto close_file; + } + bpp = header->bpp; + if (!((bpp == 32) || (bpp == 24) || (bpp == 16) || (bpp == 8))) + goto close_file; + if ((bpp == 32) && (header->descriptor & TGA_DESC_ABITS)) hasa = 1; + abits = header->descriptor & TGA_DESC_ABITS; + // don't handle colormapped images + if ((header->colorMapType) != 0) + goto close_file; + // if colormap size is anything other than legal sizes or 0 - not real tga + if (!((header->colorMapSize == 0) || + (header->colorMapSize == 15) || + (header->colorMapSize == 16) || + (header->colorMapSize == 24) || + (header->colorMapSize == 32))) + goto close_file; + x = (header->xOriginHi << 8) | (header->xOriginLo); + y = (header->yOriginHi << 8) | (header->yOriginLo); + w = (header->widthHi << 8) | header->widthLo; + h = (header->heightHi << 8) | header->heightLo; + // x origin gerater that width, y origin greater than height - wrong file + if ((x >= w) || (y >= h)) + goto close_file; + // if descriptor has either of the top 2 bits set... not tga + if (header->descriptor & 0xc0) + goto close_file; + + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + goto close_file; + + ie->w = w; + ie->h = h; + if (hasa) ie->flags.alpha = 1; + + eina_file_map_free(f, seg); + eina_file_close(f); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + +close_file: + if (seg != NULL) eina_file_map_free(f, seg); + eina_file_close(f); + return EINA_FALSE; +} + +static Eina_Bool +evas_image_load_file_data_tga(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + Eina_File *f; + unsigned char *seg = NULL, *filedata; + tga_header *header; + tga_footer *footer, tfooter; + char hasa = 0, footer_present = 0, vinverted = 0, rle = 0; + int w = 0, h = 0, x, y, bpp; + off_t size; + unsigned int *surface, *dataptr; + unsigned int datasize; + unsigned char *bufptr, *bufend; + int abits; + + f = eina_file_open(file, EINA_FALSE); + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + if (f == NULL) return EINA_FALSE; + + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + if (eina_file_size_get(f) < (off_t)(sizeof(tga_header) + sizeof(tga_footer))) + goto close_file; + seg = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (seg == NULL) goto close_file; + filedata = seg; + size = eina_file_size_get(f); + + header = (tga_header *)filedata; + // no unaligned data accessed, so ok + footer = (tga_footer *)(filedata + (size - sizeof(tga_footer))); + memcpy((unsigned char *)&tfooter, + (unsigned char *)footer, + sizeof(tga_footer)); + if (!memcmp(tfooter.signature, TGA_SIGNATURE, sizeof(tfooter.signature))) + { + if ((tfooter.dot == '.') && (tfooter.null == 0)) + { + // footer is there and matches. this is a tga file - any problems now + // are a corrupt file + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + footer_present = 1; + } + } + + filedata = (unsigned char *)filedata + sizeof(tga_header); + vinverted = !(header->descriptor & TGA_DESC_VERTICAL); + switch (header->imageType) + { + case TGA_TYPE_COLOR_RLE: + case TGA_TYPE_GRAY_RLE: + rle = 1; + break; + case TGA_TYPE_COLOR: + case TGA_TYPE_GRAY: + rle = 0; + break; + default: + goto close_file; + } + bpp = header->bpp; + if (!((bpp == 32) || (bpp == 24) || (bpp == 16) || (bpp == 8))) + goto close_file; + if ((bpp == 32) && (header->descriptor & TGA_DESC_ABITS)) hasa = 1; + abits = header->descriptor & TGA_DESC_ABITS; + // don't handle colormapped images + if ((header->colorMapType) != 0) + goto close_file; + // if colormap size is anything other than legal sizes or 0 - not real tga + if (!((header->colorMapSize == 0) || + (header->colorMapSize == 15) || + (header->colorMapSize == 16) || + (header->colorMapSize == 24) || + (header->colorMapSize == 32))) + goto close_file; + x = (header->xOriginHi << 8) | (header->xOriginLo); + y = (header->yOriginHi << 8) | (header->yOriginLo); + w = (header->widthHi << 8) | header->widthLo; + h = (header->heightHi << 8) | header->heightLo; + // x origin gerater that width, y origin greater than height - wrong file + if ((x >= w) || (y >= h)) + goto close_file; + // if descriptor has either of the top 2 bits set... not tga + if (header->descriptor & 0xc0) + goto close_file; + + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + goto close_file; + + if ((w != (int)ie->w) || (h != (int)ie->h)) + { + *error = EVAS_LOAD_ERROR_GENERIC; + goto close_file; + } + evas_cache_image_surface_alloc(ie, w, h); + surface = evas_cache_image_pixels(ie); + if (!surface) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto close_file; + } + + datasize = size - sizeof(tga_header) - header->idLength; + if (footer_present) + datasize = size - sizeof(tga_header) - header->idLength - + sizeof(tga_footer); + + bufptr = filedata + header->idLength; + bufend = filedata + datasize; + + if (!rle) + { + for (y = 0; y < h; y++) + { + if (vinverted) + /* some TGA's are stored upside-down! */ + dataptr = surface + ((h - y - 1) * w); + else + dataptr = surface + (y * w); + switch (bpp) + { + case 32: + for (x = 0; (x < w) && ((bufptr + 4) <= bufend); x++) + { + if (hasa) + { + int a = bufptr[3]; + + switch (abits) + { + case 1: + a = (a << 7) | (a << 6) | (a << 5) | (a << 4) | (a << 3) | (a << 2) | (a << 1) | (a); + case 2: + a = (a << 6) | (a << 4) | (a << 2) | (a); + case 3: + a = (a << 5) | (a << 2) | (a >> 1); + case 4: + a = (a << 4) | (a); + case 5: + a = (a << 3) | (a >> 2); + case 6: + a = (a << 2) | (a >> 4); + case 7: + a = (a << 1) | (a >> 6); + default: + break; + } + *dataptr = ARGB_JOIN(a, bufptr[2], bufptr[1], bufptr[0]); + } + else + *dataptr = ARGB_JOIN(0xff, bufptr[2], bufptr[1], bufptr[0]); + dataptr++; + bufptr += 4; + } + break; + case 24: + for (x = 0; (x < w) && ((bufptr + 3) <= bufend); x++) + { + *dataptr = ARGB_JOIN(0xff, bufptr[2], bufptr[1], bufptr[0]); + dataptr++; + bufptr += 3; + } + break; + case 16: + for (x = 0; (x < w) && ((bufptr + 3) <= bufend); x++) + { + unsigned char r, g, b, a; + unsigned short tmp; + + tmp = + (((unsigned short)bufptr[1]) << 8) | + (((unsigned short)bufptr[0])); + r = (tmp >> 7) & 0xf8; r |= r >> 5; + g = (tmp >> 2) & 0xf8; g |= g >> 5; + b = (tmp << 3) & 0xf8; b |= b >> 5; + a = 0xff; + if ((hasa) && (tmp & 0x8000)) a = 0; + *dataptr = ARGB_JOIN(a, r, g, b); + dataptr++; + bufptr += 2; + } + break; + case 8: + for (x = 0; (x < w) && ((bufptr + 1) <= bufend); x++) + { + *dataptr = ARGB_JOIN(0xff, bufptr[0], bufptr[0], bufptr[0]); + dataptr++; + bufptr += 1; + } + break; + default: + break; + } + } + } + else + { + int count, i; + unsigned char val; + unsigned int *dataend; + + dataptr = surface; + dataend = dataptr + (w * h); + while ((bufptr < bufend) && (dataptr < dataend)) + { + val = *bufptr; + bufptr++; + count = (val & 0x7f) + 1; + if (val & 0x80) // rel packet + { + switch (bpp) + { + case 32: + if (bufptr < (bufend - 4)) + { + unsigned char r, g, b; + int a = bufptr[3]; + + switch (abits) + { + case 1: + a = (a << 7) | (a << 6) | (a << 5) | (a << 4) | (a << 3) | (a << 2) | (a << 1) | (a); + case 2: + a = (a << 6) | (a << 4) | (a << 2) | (a); + case 3: + a = (a << 5) | (a << 2) | (a >> 1); + case 4: + a = (a << 4) | (a); + case 5: + a = (a << 3) | (a >> 2); + case 6: + a = (a << 2) | (a >> 4); + case 7: + a = (a << 1) | (a >> 6); + default: + break; + } + r = bufptr[2]; + g = bufptr[1]; + b = bufptr[0]; + if (!hasa) a = 0xff; + bufptr += 4; + for (i = 0; (i < count) && (dataptr < dataend); i++) + { + *dataptr = ARGB_JOIN(a, r, g, b); + dataptr++; + } + } + break; + case 24: + if (bufptr < (bufend - 3)) + { + unsigned char r, g, b; + + r = bufptr[2]; + g = bufptr[1]; + b = bufptr[0]; + bufptr += 3; + for (i = 0; (i < count) && (dataptr < dataend); i++) + { + *dataptr = ARGB_JOIN(0xff, r, g, b); + dataptr++; + } + } + break; + case 16: + if (bufptr < (bufend - 2)) + { + unsigned char r, g, b, a; + unsigned short tmp; + + tmp = + (((unsigned short)bufptr[1]) << 8) | + (((unsigned short)bufptr[0])); + r = (tmp >> 7) & 0xf8; r |= r >> 5; + g = (tmp >> 2) & 0xf8; g |= g >> 5; + b = (tmp << 3) & 0xf8; b |= b >> 5; + a = 0xff; + if ((hasa) && (tmp & 0x8000)) a = 0; + bufptr += 2; + for (i = 0; (i < count) && (dataptr < dataend); i++) + { + *dataptr = ARGB_JOIN(a, r, g, b); + dataptr++; + } + } + break; + case 8: + if (bufptr < (bufend - 1)) + { + unsigned char g; + + g = bufptr[0]; + bufptr += 1; + for (i = 0; (i < count) && (dataptr < dataend); i++) + { + *dataptr = ARGB_JOIN(0xff, g, g, g); + dataptr++; + } + } + break; + default: + break; + } + } + else // raw + { + switch (bpp) + { + case 32: + for (i = 0; (i < count) && (bufptr < (bufend - 4)) && (dataptr < dataend); i++) + { + if (hasa) +// *dataptr = ARGB_JOIN(255 - bufptr[3], bufptr[2], bufptr[1], bufptr[0]); + *dataptr = ARGB_JOIN(bufptr[3], bufptr[2], bufptr[1], bufptr[0]); + else + *dataptr = ARGB_JOIN(0xff, bufptr[2], bufptr[1], bufptr[0]); + dataptr++; + bufptr += 4; + } + break; + case 24: + for (i = 0; (i < count) && (bufptr < (bufend - 3)) && (dataptr < dataend); i++) + { + *dataptr = ARGB_JOIN(0xff, bufptr[2], bufptr[1], bufptr[0]); + dataptr++; + bufptr += 3; + } + break; + case 16: + for (i = 0; (i < count) && (bufptr < (bufend - 2)) && (dataptr < dataend); i++) + { + unsigned char r, g, b, a; + unsigned short tmp; + + tmp = + (((unsigned short)bufptr[1]) << 8) | + (((unsigned short)bufptr[0])); + r = (tmp >> 7) & 0xf8; r |= r >> 5; + g = (tmp >> 2) & 0xf8; g |= g >> 5; + b = (tmp << 3) & 0xf8; b |= b >> 5; + a = 0xff; + if ((hasa) && (tmp & 0x8000)) a = 0; + *dataptr = ARGB_JOIN(a, r, g, b); + dataptr++; + bufptr += 2; + } + break; + case 8: + for (i = 0; (i < count) && (bufptr < (bufend - 1)) && (dataptr < dataend); i++) + { + *dataptr = ARGB_JOIN(0xff, bufptr[0], bufptr[0], bufptr[0]); + dataptr++; + bufptr += 1; + } + break; + default: + break; + } + } + } + if (vinverted) + { + unsigned int *adv, *adv2, tmp; + + adv = surface; + adv2 = surface + (w * (h - 1)); + for (y = 0; y < (h / 2); y++) + { + for (x = 0; x < w; x++) + { + tmp = adv[x]; + adv[x] = adv2[x]; + adv2[x] = tmp; + } + adv2 -= w; + adv += w; + } + } + } + + evas_common_image_premul(ie); + + eina_file_map_free(f, seg); + eina_file_close(f); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + +close_file: + if (seg != NULL) eina_file_map_free(f, seg); + eina_file_close(f); + return EINA_FALSE; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_tga_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "tga", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, tga); + +#ifndef EVAS_STATIC_BUILD_TGA +EVAS_EINA_MODULE_DEFINE(image_loader, tga); +#endif diff --git a/libraries/evas/src/modules/loaders/tiff/Makefile.am b/libraries/evas/src/modules/loaders/tiff/Makefile.am new file mode 100644 index 0000000..f617c5e --- /dev/null +++ b/libraries/evas/src/modules/loaders/tiff/Makefile.am @@ -0,0 +1,37 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_tiff_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_LOADER_TIFF +if !EVAS_STATIC_BUILD_TIFF + +pkgdir = $(libdir)/evas/modules/loaders/tiff/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_tiff.c + +module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ @evas_image_loader_tiff_libs@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_tiff.la + +libevas_loader_tiff_la_SOURCES = evas_image_load_tiff.c +libevas_loader_tiff_la_LIBADD = @evas_image_loader_tiff_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/loaders/tiff/Makefile.in b/libraries/evas/src/modules/loaders/tiff/Makefile.in new file mode 100644 index 0000000..a2deea7 --- /dev/null +++ b/libraries/evas/src/modules/loaders/tiff/Makefile.in @@ -0,0 +1,760 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/tiff +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_tiff_la_DEPENDENCIES = +am__libevas_loader_tiff_la_SOURCES_DIST = evas_image_load_tiff.c +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_TRUE@am_libevas_loader_tiff_la_OBJECTS = evas_image_load_tiff.lo +libevas_loader_tiff_la_OBJECTS = $(am_libevas_loader_tiff_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_TRUE@am_libevas_loader_tiff_la_rpath = +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_tiff.c +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_tiff.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@ -rpath \ +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_tiff_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_tiff_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_tiff_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@pkgdir = $(libdir)/evas/modules/loaders/tiff/$(MODULE_ARCH) +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@module_la_SOURCES = evas_image_load_tiff.c +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ @evas_image_loader_tiff_libs@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_TRUE@noinst_LTLIBRARIES = libevas_loader_tiff.la +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_TRUE@libevas_loader_tiff_la_SOURCES = evas_image_load_tiff.c +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_TRUE@libevas_loader_tiff_la_LIBADD = @evas_image_loader_tiff_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/tiff/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/tiff/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_tiff.la: $(libevas_loader_tiff_la_OBJECTS) $(libevas_loader_tiff_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_tiff_la_rpath) $(libevas_loader_tiff_la_OBJECTS) $(libevas_loader_tiff_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_tiff.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_tiff.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_tiff.lo: evas_image_load_tiff.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_tiff.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_tiff.Tpo -c -o module_la-evas_image_load_tiff.lo `test -f 'evas_image_load_tiff.c' || echo '$(srcdir)/'`evas_image_load_tiff.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_tiff.Tpo $(DEPDIR)/module_la-evas_image_load_tiff.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_tiff.c' object='module_la-evas_image_load_tiff.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_tiff.lo `test -f 'evas_image_load_tiff.c' || echo '$(srcdir)/'`evas_image_load_tiff.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c b/libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c new file mode 100644 index 0000000..b9bea91 --- /dev/null +++ b/libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c @@ -0,0 +1,324 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#ifdef HAVE_EVIL +# include +#endif + +#include "evas_common.h" +#include "evas_private.h" + +static int _evas_loader_tiff_log_dom = -1; + +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_loader_tiff_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_loader_tiff_log_dom, __VA_ARGS__) + +static Eina_Bool evas_image_load_file_head_tiff(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_tiff(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +static Evas_Image_Load_Func evas_image_load_tiff_func = +{ + EINA_TRUE, + evas_image_load_file_head_tiff, + evas_image_load_file_data_tiff, + NULL +}; + +typedef struct TIFFRGBAImage_Extra TIFFRGBAImage_Extra; + +struct TIFFRGBAImage_Extra { + TIFFRGBAImage rgba; + Image_Entry *image; + char pper; + uint32 num_pixels; + uint32 py; +}; + +static Eina_Bool +evas_image_load_file_head_tiff(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + char txt[1024]; + TIFFRGBAImage tiff_image; + TIFF *tif = NULL; + FILE *ffile; + int fd; + uint16 magic_number; + + ffile = fopen(file, "rb"); + if (!ffile) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + if (fread(&magic_number, sizeof(uint16), 1, ffile) != 1) + { + fclose(ffile); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + /* Apparently rewind(f) isn't sufficient */ + fseek(ffile, 0, SEEK_SET); + + if ((magic_number != TIFF_BIGENDIAN) /* Checks if actually tiff file */ + && (magic_number != TIFF_LITTLEENDIAN)) + { + fclose(ffile); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + fd = fileno(ffile); + fd = dup(fd); + lseek(fd, (long)0, SEEK_SET); + fclose(ffile); + + tif = TIFFFdOpen(fd, file, "r"); + if (!tif) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + + strcpy(txt, "Evas Tiff loader: cannot be processed by libtiff"); + if (!TIFFRGBAImageOK(tif, txt)) + { + TIFFClose(tif); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + strcpy(txt, "Evas Tiff loader: cannot begin reading tiff"); + if (!TIFFRGBAImageBegin(& tiff_image, tif, 1, txt)) + { + TIFFClose(tif); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + + if (tiff_image.alpha != EXTRASAMPLE_UNSPECIFIED) + ie->flags.alpha = 1; + if ((tiff_image.width < 1) || (tiff_image.height < 1) || + (tiff_image.width > IMG_MAX_SIZE) || (tiff_image.height > IMG_MAX_SIZE) || + IMG_TOO_BIG(tiff_image.width, tiff_image.height)) + { + TIFFClose(tif); + if (IMG_TOO_BIG(tiff_image.width, tiff_image.height)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + ie->w = tiff_image.width; + ie->h = tiff_image.height; + + TIFFRGBAImageEnd(&tiff_image); + TIFFClose(tif); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +static Eina_Bool +evas_image_load_file_data_tiff(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + char txt[1024]; + TIFFRGBAImage_Extra rgba_image; + TIFF *tif = NULL; + FILE *ffile; + uint32 *rast = NULL; + uint32 num_pixels; + int fd, x, y; + uint16 magic_number; + + ffile = fopen(file, "rb"); + if (!ffile) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + if (fread(&magic_number, sizeof(uint16), 1, ffile) != 1) + { + fclose(ffile); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + /* Apparently rewind(f) isn't sufficient */ + fseek(ffile, (long)0, SEEK_SET); + + if ((magic_number != TIFF_BIGENDIAN) /* Checks if actually tiff file */ + && (magic_number != TIFF_LITTLEENDIAN)) + { + fclose(ffile); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + + fd = fileno(ffile); + fd = dup(fd); + lseek(fd, (long)0, SEEK_SET); + fclose(ffile); + + tif = TIFFFdOpen(fd, file, "r"); + if (!tif) + { + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + + strcpy(txt, "Evas Tiff loader: cannot be processed by libtiff"); + if (!TIFFRGBAImageOK(tif, txt)) + { + TIFFClose(tif); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + strcpy(txt, "Evas Tiff loader: cannot begin reading tiff"); + if (!TIFFRGBAImageBegin((TIFFRGBAImage *) & rgba_image, tif, 0, txt)) + { + TIFFClose(tif); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + rgba_image.image = ie; + + if (rgba_image.rgba.alpha != EXTRASAMPLE_UNSPECIFIED) + ie->flags.alpha = 1; + if ((rgba_image.rgba.width != ie->w) || + (rgba_image.rgba.height != ie->h)) + { + TIFFClose(tif); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + + evas_cache_image_surface_alloc(ie, rgba_image.rgba.width, rgba_image.rgba.height); + if (!evas_cache_image_pixels(ie)) + { + TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image); + TIFFClose(tif); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + + rgba_image.num_pixels = num_pixels = ie->w * ie->h; + + rgba_image.pper = rgba_image.py = 0; + rast = (uint32 *) _TIFFmalloc(sizeof(uint32) * num_pixels); + + if (!rast) + { + ERR("Evas Tiff loader: out of memory"); + + TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image); + TIFFClose(tif); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + if (rgba_image.rgba.bitspersample == 8) + { + if (!TIFFRGBAImageGet((TIFFRGBAImage *) &rgba_image, rast, + rgba_image.rgba.width, rgba_image.rgba.height)) + { + _TIFFfree(rast); + TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image); + TIFFClose(tif); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + } + else + { + INF("channel bits == %i", (int)rgba_image.rgba.samplesperpixel); + } + /* process rast -> image rgba. really same as prior code anyway just simpler */ + for (y = 0; y < (int)ie->h; y++) + { + DATA32 *pix, *pd; + uint32 *ps, pixel; + unsigned int a, r, g, b; + + pix = evas_cache_image_pixels(ie); + pd = pix + ((ie->h - y - 1) * ie->w); + ps = rast + (y * ie->w); + for (x = 0; x < (int)ie->w; x++) + { + pixel = *ps; + a = TIFFGetA(pixel); + r = TIFFGetR(pixel); + g = TIFFGetG(pixel); + b = TIFFGetB(pixel); + if (!ie->flags.alpha) a = 255; + if ((rgba_image.rgba.alpha == EXTRASAMPLE_UNASSALPHA) && + (a < 255)) + { + r = (r * (a + 1)) >> 8; + g = (g * (a + 1)) >> 8; + b = (b * (a + 1)) >> 8; + } + *pd = ARGB_JOIN(a, r, g, b); + ps++; + pd++; + } + } + + _TIFFfree(rast); + + TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image); + + TIFFClose(tif); + + evas_common_image_set_alpha_sparse(ie); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + _evas_loader_tiff_log_dom = eina_log_domain_register + ("evas-tiff", EVAS_DEFAULT_LOG_COLOR); + if (_evas_loader_tiff_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + em->functions = (void *)(&evas_image_load_tiff_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_loader_tiff_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "tiff", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, tiff); + +#ifndef EVAS_STATIC_BUILD_TIFF +EVAS_EINA_MODULE_DEFINE(image_loader, tiff); +#endif diff --git a/libraries/evas/src/modules/loaders/wbmp/Makefile.am b/libraries/evas/src/modules/loaders/wbmp/Makefile.am new file mode 100644 index 0000000..eed287a --- /dev/null +++ b/libraries/evas/src/modules/loaders/wbmp/Makefile.am @@ -0,0 +1,33 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +if BUILD_LOADER_WBMP +if !EVAS_STATIC_BUILD_WBMP + +pkgdir = $(libdir)/evas/modules/loaders/wbmp/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_wbmp.c + +module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_wbmp.la +libevas_loader_wbmp_la_SOURCES = evas_image_load_wbmp.c +libevas_loader_wbmp_la_LIBADD = + +endif +endif diff --git a/libraries/evas/src/modules/loaders/wbmp/Makefile.in b/libraries/evas/src/modules/loaders/wbmp/Makefile.in new file mode 100644 index 0000000..41a3bb9 --- /dev/null +++ b/libraries/evas/src/modules/loaders/wbmp/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/wbmp +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_wbmp_la_DEPENDENCIES = +am__libevas_loader_wbmp_la_SOURCES_DIST = evas_image_load_wbmp.c +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_TRUE@am_libevas_loader_wbmp_la_OBJECTS = evas_image_load_wbmp.lo +libevas_loader_wbmp_la_OBJECTS = $(am_libevas_loader_wbmp_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_TRUE@am_libevas_loader_wbmp_la_rpath = +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_wbmp.c +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_wbmp.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@ -rpath \ +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_wbmp_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_wbmp_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@pkgdir = $(libdir)/evas/modules/loaders/wbmp/$(MODULE_ARCH) +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@module_la_SOURCES = evas_image_load_wbmp.c +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_TRUE@noinst_LTLIBRARIES = libevas_loader_wbmp.la +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_TRUE@libevas_loader_wbmp_la_SOURCES = evas_image_load_wbmp.c +@BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_TRUE@libevas_loader_wbmp_la_LIBADD = +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/wbmp/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/wbmp/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_wbmp.la: $(libevas_loader_wbmp_la_OBJECTS) $(libevas_loader_wbmp_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_wbmp_la_rpath) $(libevas_loader_wbmp_la_OBJECTS) $(libevas_loader_wbmp_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_wbmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_wbmp.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_wbmp.lo: evas_image_load_wbmp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_wbmp.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_wbmp.Tpo -c -o module_la-evas_image_load_wbmp.lo `test -f 'evas_image_load_wbmp.c' || echo '$(srcdir)/'`evas_image_load_wbmp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_wbmp.Tpo $(DEPDIR)/module_la-evas_image_load_wbmp.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_wbmp.c' object='module_la-evas_image_load_wbmp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_wbmp.lo `test -f 'evas_image_load_wbmp.c' || echo '$(srcdir)/'`evas_image_load_wbmp.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c b/libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c new file mode 100644 index 0000000..fa6fab2 --- /dev/null +++ b/libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c @@ -0,0 +1,170 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef HAVE_EVIL +# include +#endif + +#include "evas_common.h" +#include "evas_private.h" + +static Eina_Bool evas_image_load_file_head_wbmp(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_wbmp(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +static Evas_Image_Load_Func evas_image_load_wbmp_func = +{ + EINA_TRUE, + evas_image_load_file_head_wbmp, + evas_image_load_file_data_wbmp, + NULL +}; + + +static int +read_mb(unsigned int *data, FILE *f) +{ + int ac = 0, ct; + unsigned char buf; + + for (ct = 0;;) + { + if ((ct++) == 5) return -1; + if ((fread(&buf, 1, 1, f)) < 1) + return -1; + ac = (ac << 7) | (buf & 0x7f); + if ((buf & 0x80) == 0) break; + } + *data = ac; + return 0; +} + +static Eina_Bool +evas_image_load_file_head_wbmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + FILE *f; + unsigned int type, w, h; + unsigned char fixed_header; + struct stat statbuf; + + *error = EVAS_LOAD_ERROR_GENERIC; + f = fopen(file, "rb"); + if (!f) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + + if (stat(file, &statbuf) == -1) goto bail; + if (read_mb(&type, f) < 0) goto bail; + + if (type != 0) + { + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + goto bail; + } + + if (fread(&fixed_header, 1, 1, f) != 1) goto bail; + if (read_mb(&w, f) < 0) goto bail; + if (read_mb(&h, f) < 0) goto bail; + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto bail; + } + + fclose(f); + ie->w = w; + ie->h = h; + + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +bail: + fclose(f); + return EINA_FALSE; +} + +static Eina_Bool +evas_image_load_file_data_wbmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) +{ + FILE *f; + unsigned int dummy, line_length; + unsigned char *line = NULL; + int cur = 0, x, y; + DATA32 *dst_data; + + *error = EVAS_LOAD_ERROR_GENERIC; + f = fopen(file, "rb"); + if (!f) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + if (read_mb(&dummy, f) < 0) goto bail; + if (fread(&dummy, 1, 1, f) != 1) goto bail; + if (read_mb(&dummy, f) < 0) goto bail; + if (read_mb(&dummy, f) < 0) goto bail; + + evas_cache_image_surface_alloc(ie, ie->w, ie->h); + dst_data = evas_cache_image_pixels(ie); + if (!dst_data) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto bail; + } + + line_length = (ie->w + 7) >> 3; + line = alloca(line_length); + + for (y = 0; y < (int)ie->h; y++) + { + if (fread(line, 1, line_length, f) != line_length) goto bail; + for (x = 0; x < (int)ie->w; x++) + { + int idx = x >> 3; + int offset = 1 << (0x07 - (x & 0x07)); + if (line[idx] & offset) dst_data[cur] = 0xffffffff; + else dst_data[cur] = 0xff000000; + cur++; + } + } + fclose(f); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +bail: + fclose(f); + return EINA_FALSE; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_load_wbmp_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "wbmp", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, wbmp); + +#ifndef EVAS_STATIC_BUILD_WBMP +EVAS_EINA_MODULE_DEFINE(image_loader, wbmp); +#endif diff --git a/libraries/evas/src/modules/loaders/xpm/Makefile.am b/libraries/evas/src/modules/loaders/xpm/Makefile.am new file mode 100644 index 0000000..b8cb1fa --- /dev/null +++ b/libraries/evas/src/modules/loaders/xpm/Makefile.am @@ -0,0 +1,37 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_xpm_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_LOADER_XPM +if !EVAS_STATIC_BUILD_XPM +pkgdir = $(libdir)/evas/modules/loaders/xpm/$(MODULE_ARCH) + +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_load_xpm.c + +module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ @evas_image_loader_xpm_libs@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_loader_xpm.la + +libevas_loader_xpm_la_SOURCES = evas_image_load_xpm.c +libevas_loader_xpm_la_LIBADD = @evas_image_loader_xpm_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/loaders/xpm/Makefile.in b/libraries/evas/src/modules/loaders/xpm/Makefile.in new file mode 100644 index 0000000..eba8f60 --- /dev/null +++ b/libraries/evas/src/modules/loaders/xpm/Makefile.in @@ -0,0 +1,760 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/loaders/xpm +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_loader_xpm_la_DEPENDENCIES = +am__libevas_loader_xpm_la_SOURCES_DIST = evas_image_load_xpm.c +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_TRUE@am_libevas_loader_xpm_la_OBJECTS = evas_image_load_xpm.lo +libevas_loader_xpm_la_OBJECTS = $(am_libevas_loader_xpm_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_TRUE@am_libevas_loader_xpm_la_rpath = +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_load_xpm.c +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_xpm.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@ -rpath \ +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_loader_xpm_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_loader_xpm_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_xpm_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@pkgdir = $(libdir)/evas/modules/loaders/xpm/$(MODULE_ARCH) +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@module_la_SOURCES = evas_image_load_xpm.c +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ @evas_image_loader_xpm_libs@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_TRUE@noinst_LTLIBRARIES = libevas_loader_xpm.la +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_TRUE@libevas_loader_xpm_la_SOURCES = evas_image_load_xpm.c +@BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_TRUE@libevas_loader_xpm_la_LIBADD = @evas_image_loader_xpm_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/xpm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/loaders/xpm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_loader_xpm.la: $(libevas_loader_xpm_la_OBJECTS) $(libevas_loader_xpm_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_loader_xpm_la_rpath) $(libevas_loader_xpm_la_OBJECTS) $(libevas_loader_xpm_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_xpm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_xpm.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_load_xpm.lo: evas_image_load_xpm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_xpm.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_xpm.Tpo -c -o module_la-evas_image_load_xpm.lo `test -f 'evas_image_load_xpm.c' || echo '$(srcdir)/'`evas_image_load_xpm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_xpm.Tpo $(DEPDIR)/module_la-evas_image_load_xpm.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_xpm.c' object='module_la-evas_image_load_xpm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_xpm.lo `test -f 'evas_image_load_xpm.c' || echo '$(srcdir)/'`evas_image_load_xpm.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c b/libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c new file mode 100644 index 0000000..3a04f84 --- /dev/null +++ b/libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c @@ -0,0 +1,691 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef HAVE_EVIL +# include +#endif + +#include "evas_common.h" +#include "evas_private.h" + +static int _evas_loader_xpm_log_dom = -1; + +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_loader_xpm_log_dom, __VA_ARGS__) + +static Eina_Bool evas_image_load_file_head_xpm(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); +static Eina_Bool evas_image_load_file_data_xpm(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); + +static Evas_Image_Load_Func evas_image_load_xpm_func = +{ + EINA_FALSE, + evas_image_load_file_head_xpm, + evas_image_load_file_data_xpm, + NULL +}; + +// TODO: REWRITE THIS WITH THREAD SAFE VERSION NOT USING THIS HANDLE!!!! +static FILE *rgb_txt = NULL; + +static void +xpm_parse_color(char *color, int *r, int *g, int *b) +{ + char buf[4096]; + + /* is a #ff00ff like color */ + if (color[0] == '#') + { + int len; + char val[32]; + + len = strlen(color) - 1; + if (len < 96) + { + int i; + + len /= 3; + for (i = 0; i < len; i++) + val[i] = color[1 + i + (0 * len)]; + val[i] = 0; + sscanf(val, "%x", r); + for (i = 0; i < len; i++) + val[i] = color[1 + i + (1 * len)]; + val[i] = 0; + sscanf(val, "%x", g); + for (i = 0; i < len; i++) + val[i] = color[1 + i + (2 * len)]; + val[i] = 0; + sscanf(val, "%x", b); + if (len == 1) + { + *r = (*r << 4) | *r; + *g = (*g << 4) | *g; + *b = (*b << 4) | *b; + } + else if (len > 2) + { + *r >>= (len - 2) * 4; + *g >>= (len - 2) * 4; + *b >>= (len - 2) * 4; + } + } + return; + } + /* look in rgb txt database */ + if (!rgb_txt) rgb_txt = fopen("/usr/lib/X11/rgb.txt", "r"); + if (!rgb_txt) rgb_txt = fopen("/usr/X11/lib/X11/rgb.txt", "r"); + if (!rgb_txt) rgb_txt = fopen("/usr/X11R6/lib/X11/rgb.txt", "r"); + if (!rgb_txt) rgb_txt = fopen("/usr/openwin/lib/X11/rgb.txt", "r"); + if (!rgb_txt) return; + fseek(rgb_txt, 0, SEEK_SET); + while (fgets(buf, sizeof(buf), rgb_txt)) + { + buf[sizeof(buf) - 1] = 0; + if (buf[0] != '!') + { + int rr, gg, bb; + char name[4096]; + + if (sscanf(buf, "%i %i %i %[^\n]", &rr, &gg, &bb, name) == 4) + { + if (!strcasecmp(name, color)) + { + *r = rr; + *g = gg; + *b = bb; + return; + } + } + } + } +} + +static void +xpm_parse_done(void) +{ + if (rgb_txt) fclose(rgb_txt); + rgb_txt = NULL; +} + + +/** FIXME: clean this up and make more efficient **/ +static Eina_Bool +evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UNUSED__, int load_data, int *error) +{ + DATA32 *ptr, *end; + FILE *f; + + int pc, c, i, j, k, w, h, ncolors, cpp, comment, transp, + quote, context, len, done, r, g, b, backslash, lu1, lu2; + char *line, s[256], tok[128], col[256], *tl; + int lsz = 256; + struct _cmap { + char str[6]; + unsigned char transp; + short r, g, b; + } *cmap; + + short lookup[128 - 32][128 - 32]; + int count, pixels; + + done = 0; +// transp = -1; + transp = 1; + + /* if immediate_load is 1, then dont delay image laoding as below, or */ + /* already data in this image - dont load it again */ + + f = fopen(file, "rb"); + if (!f) + { + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + return EINA_FALSE; + } + if (fread(s, 9, 1, f) != 1) + { + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + rewind(f); + s[9] = 0; + if (strcmp("/* XPM */", s)) + { + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + + i = 0; + j = 0; + cmap = NULL; + w = 10; + h = 10; + ptr = NULL; + end = NULL; + c = ' '; + comment = 0; + quote = 0; + context = 0; + pixels = 0; + count = 0; + line = malloc(lsz); + if (!line) + { + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + + backslash = 0; + memset(lookup, 0, sizeof(lookup)); + while (!done) + { + pc = c; + c = fgetc(f); + if (c == EOF) break; + if (!quote) + { + if ((pc == '/') && (c == '*')) + comment = 1; + else if ((pc == '*') && (c == '/') && (comment)) + comment = 0; + } + if (!comment) + { + if ((!quote) && (c == '"')) + { + quote = 1; + i = 0; + } + else if ((quote) && (c == '"')) + { + line[i] = 0; + quote = 0; + if (context == 0) + { + /* Header */ + if (sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp) != 4) + { + ERR("XPM ERROR: XPM file malformed header"); + free(line); + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + if ((ncolors > 32766) || (ncolors < 1)) + { + ERR("XPM ERROR: XPM files with colors > 32766 or < 1 not supported"); + free(line); + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + if ((cpp > 5) || (cpp < 1)) + { + ERR("XPM ERROR: XPM files with characters per pixel > 5 or < 1not supported"); + free(line); + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } + if ((w > IMG_MAX_SIZE) || (w < 1)) + { + ERR("XPM ERROR: Image width > IMG_MAX_SIZE or < 1 pixels for file"); + free(line); + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + if ((h > IMG_MAX_SIZE) || (h < 1)) + { + ERR("XPM ERROR: Image height > IMG_MAX_SIZE or < 1 pixels for file"); + free(line); + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_GENERIC; + return EINA_FALSE; + } + if (IMG_TOO_BIG(w, h)) + { + ERR("XPM ERROR: Image just too big to ever allocate"); + free(line); + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + + if (!cmap) + { + cmap = malloc(sizeof(struct _cmap) * ncolors); + if (!cmap) + { + free(line); + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + } + ie->w = w; + ie->h = h; + + j = 0; + context++; + } + else if (context == 1) + { + /* Color Table */ + if (j < ncolors) + { + int slen; + int hascolor, iscolor; + + iscolor = 0; + hascolor = 0; + tok[0] = 0; + col[0] = 0; + s[0] = 0; + len = strlen(line); + strncpy(cmap[j].str, line, cpp); + cmap[j].str[cpp] = 0; + for (slen = 0; slen < cpp; slen++) + { + /* fix the ascii of the color string - if its < 32 - just limit to 32 */ + if (cmap[j].str[slen] < 32) cmap[j].str[slen] = 0; + } + cmap[j].r = -1; + cmap[j].transp = 0; + for (k = cpp; k < len; k++) + { + if (line[k] != ' ') + { + s[0] = 0; + sscanf(&line[k], "%255s", s); + slen = strlen(s); + k += slen; + if (!strcmp(s, "c")) iscolor = 1; + if ((!strcmp(s, "m")) || (!strcmp(s, "s")) + || (!strcmp(s, "g4")) || (!strcmp(s, "g")) + || (!strcmp(s, "c")) || (k >= len)) + { + if (k >= len) + { + if (col[0]) + { + if (strlen(col) < (sizeof(col) - 2)) + strcat(col, " "); + else + done = 1; + } + if ((strlen(col) + strlen(s)) < (sizeof(col) - 1)) + strcat(col, s); + } + if (col[0]) + { + if (!strcasecmp(col, "none")) + { + transp = 1; + cmap[j].transp = 1; + cmap[j].r = 0; + cmap[j].g = 0; + cmap[j].b = 0; + } + else + { + if ((((cmap[j].r < 0) || (!strcmp(tok, "c"))) && (!hascolor))) + { + r = g = b = 0; + xpm_parse_color(col, &r, &g, &b); + cmap[j].r = r; + cmap[j].g = g; + cmap[j].b = b; + if (iscolor) hascolor = 1; + } + } + } + strcpy(tok, s); + col[0] = 0; + } + else + { + if (col[0]) + { + if (strlen(col) < ( sizeof(col) - 2)) + strcat(col, " "); + else + done = 1; + } + if ((strlen(col) + strlen(s)) < (sizeof(col) - 1)) + strcat(col, s); + } + } + } + } + j++; + if (j >= ncolors) + { + if (cpp == 1) + { + for (i = 0; i < ncolors; i++) + lookup[(int)cmap[i].str[0] - 32][0] = i; + } + if (cpp == 2) + { + for (i = 0; i < ncolors; i++) + lookup[(int)cmap[i].str[0] - 32][(int)cmap[i].str[1] - 32] = i; + } + context++; + } + + if (transp) ie->flags.alpha = 1; + + if (load_data) + { + evas_cache_image_surface_alloc(ie, w, h); + ptr = evas_cache_image_pixels(ie); + if (!ptr) + { + free(cmap); + free(line); + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return EINA_FALSE; + } + pixels = w * h; + end = ptr + pixels; + } + else + { + free(cmap); + free(line); + fclose(f); + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + } + } + else + { + /* Image Data */ + i = 0; + if (cpp == 0) + { + /* Chars per pixel = 0? well u never know */ + } + /* it's xpm - don't care about speed too much. still faster + * that most xpm loaders anyway */ + else if (cpp == 1) + { + if (transp) + { + for (i = 0; + ((i < 65536) && (ptr < end) && (line[i])); + i++) + { + lu1 = (int)line[i] - 32; + if (lu1 < 0) continue; + if (cmap[lookup[lu1][0]].transp) + { + r = (unsigned char)cmap[lookup[lu1][0]].r; + g = (unsigned char)cmap[lookup[lu1][0]].g; + b = (unsigned char)cmap[lookup[lu1][0]].b; + *ptr = RGB_JOIN(r, g, b); + ptr++; + count++; + } + else + { + r = (unsigned char)cmap[lookup[lu1][0]].r; + g = (unsigned char)cmap[lookup[lu1][0]].g; + b = (unsigned char)cmap[lookup[lu1][0]].b; + *ptr = ARGB_JOIN(0xff, r, g, b); + ptr++; + count++; + } + } + } + else + { + for (i = 0; + ((i < 65536) && (ptr < end) && (line[i])); + i++) + { + lu1 = (int)line[i] - 32; + if (lu1 < 0) continue; + r = (unsigned char)cmap[lookup[lu1][0]].r; + g = (unsigned char)cmap[lookup[lu1][0]].g; + b = (unsigned char)cmap[lookup[lu1][0]].b; + *ptr = ARGB_JOIN(0xff, r, g, b); + ptr++; + count++; + } + } + } + else if (cpp == 2) + { + if (transp) + { + for (i = 0; + ((i < 65536) && (ptr < end) && (line[i])); + i++) + { + lu1 = (int)line[i] - 32; + i++; + lu2 = (int)line[i] - 32; + if (lu1 < 0) continue; + if (lu2 < 0) continue; + if (cmap[lookup[lu1][lu2]].transp) + { + r = (unsigned char)cmap[lookup[lu1][lu2]].r; + g = (unsigned char)cmap[lookup[lu1][lu2]].g; + b = (unsigned char)cmap[lookup[lu1][lu2]].b; + *ptr = RGB_JOIN(r, g, b); + ptr++; + count++; + } + else + { + r = (unsigned char)cmap[lookup[lu1][lu2]].r; + g = (unsigned char)cmap[lookup[lu1][lu2]].g; + b = (unsigned char)cmap[lookup[lu1][lu2]].b; + *ptr = ARGB_JOIN(0xff, r, g, b); + ptr++; + count++; + } + } + } + else + { + for (i = 0; + ((i < 65536) && (ptr < end) && (line[i])); + i++) + { + lu1 = (int)line[i] - 32; + i++; + lu2 = (int)line[i] - 32; + if (lu1 < 0) continue; + if (lu2 < 0) continue; + r = (unsigned char)cmap[lookup[lu1][lu2]].r; + g = (unsigned char)cmap[lookup[lu1][lu2]].g; + b = (unsigned char)cmap[lookup[lu1][lu2]].b; + *ptr = ARGB_JOIN(0xff, r, g, b); + ptr++; + count++; + } + } + } + else + { + if (transp) + { + for (i = 0; + ((i < 65536) && (ptr < end) && (line[i])); + i++) + { + for (j = 0; j < cpp; j++, i++) + { + col[j] = line[i]; + if (col[j] < 32) col[j] = 32; + } + col[j] = 0; + i--; + for (j = 0; j < ncolors; j++) + { + if (!strcmp(col, cmap[j].str)) + { + if (cmap[j].transp) + { + r = (unsigned char)cmap[j].r; + g = (unsigned char)cmap[j].g; + b = (unsigned char)cmap[j].b; + *ptr = RGB_JOIN(r, g, b); + ptr++; + count++; + } + else + { + r = (unsigned char)cmap[j].r; + g = (unsigned char)cmap[j].g; + b = (unsigned char)cmap[j].b; + *ptr = ARGB_JOIN(0xff, r, g, b); + ptr++; + count++; + } + break; + } + } + } + } + else + { + for (i = 0; + ((i < 65536) && (ptr < end) && (line[i])); + i++) + { + for (j = 0; j < cpp; j++, i++) + { + col[j] = line[i]; + } + col[j] = 0; + i--; + for (j = 0; j < ncolors; j++) + { + if (!strcmp(col, cmap[j].str)) + { + r = (unsigned char)cmap[j].r; + g = (unsigned char)cmap[j].g; + b = (unsigned char)cmap[j].b; + *ptr = ARGB_JOIN(0xff, r, g, b); + ptr++; + count++; + break; + } + } + } + } + } + } + } + } + /* Scan in line from XPM file */ + if ((!comment) && (quote) && (c != '"')) + { + if (c < 32) c = 32; + else if (c > 127) c = 127; + if (c =='\\') + { + if (++backslash < 2) + line[i++] = c; + else + backslash = 0; + } + else + { + backslash = 0; + line[i++] = c; + } + } + if (i >= lsz) + { + lsz += 256; + tl = realloc(line, lsz); + if (!tl) break; + line = tl; + } + if (((ptr) && ((ptr - evas_cache_image_pixels(ie)) >= (w * h * (int)sizeof(DATA32)))) || + ((context > 1) && (count >= pixels))) + break; + } + + free(cmap); + free(line); + fclose(f); + + xpm_parse_done(); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; +} + +static Eina_Bool +evas_image_load_file_head_xpm(Image_Entry *ie, const char *file, const char *key, int *error) +{ + return evas_image_load_file_xpm(ie, file, key, 0, error); +} + +static Eina_Bool +evas_image_load_file_data_xpm(Image_Entry *ie, const char *file, const char *key, int *error) +{ + return evas_image_load_file_xpm(ie, file, key, 1, error); +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + _evas_loader_xpm_log_dom = eina_log_domain_register + ("evas-xpm", EVAS_DEFAULT_LOG_COLOR); + if (_evas_loader_xpm_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + em->functions = (void *)(&evas_image_load_xpm_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_loader_xpm_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "xpm", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, xpm); + +#ifndef EVAS_STATIC_BUILD_XPM +EVAS_EINA_MODULE_DEFINE(image_loader, xpm); +#endif diff --git a/libraries/evas/src/modules/savers/Makefile.am b/libraries/evas/src/modules/savers/Makefile.am new file mode 100644 index 0000000..0854052 --- /dev/null +++ b/libraries/evas/src/modules/savers/Makefile.am @@ -0,0 +1,33 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = + +if BUILD_LOADER_EDB +if !EVAS_STATIC_BUILD_EDB +SUBDIRS += edb +endif +endif + +if BUILD_LOADER_EET +if !EVAS_STATIC_BUILD_EET +SUBDIRS += eet +endif +endif + +if BUILD_SAVER_JPEG +if !EVAS_STATIC_BUILD_JPEG +SUBDIRS += jpeg +endif +endif + +if BUILD_LOADER_PNG +if !EVAS_STATIC_BUILD_PNG +SUBDIRS += png +endif +endif + +if BUILD_LOADER_TIFF +if !EVAS_STATIC_BUILD_TIFF +SUBDIRS += tiff +endif +endif diff --git a/libraries/evas/src/modules/savers/Makefile.in b/libraries/evas/src/modules/savers/Makefile.in new file mode 100644 index 0000000..6d64b4c --- /dev/null +++ b/libraries/evas/src/modules/savers/Makefile.in @@ -0,0 +1,740 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@am__append_1 = edb +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@am__append_2 = eet +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@am__append_3 = jpeg +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@am__append_4 = png +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@am__append_5 = tiff +subdir = src/modules/savers +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = edb eet jpeg png tiff +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) \ + $(am__append_4) $(am__append_5) +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/savers/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/savers/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/savers/edb/Makefile.am b/libraries/evas/src/modules/savers/edb/Makefile.am new file mode 100644 index 0000000..4614cec --- /dev/null +++ b/libraries/evas/src/modules/savers/edb/Makefile.am @@ -0,0 +1,32 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = -I. \ + -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib/include \ + @FREETYPE_CFLAGS@ @PIXMAN_CFLAGS@ @evas_image_loader_edb_cflags@ \ + @EINA_CFLAGS@ + +if BUILD_LOADER_EDB +if !EVAS_STATIC_BUILD_EDB + +pkgdir = $(libdir)/evas/modules/savers/edb/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_save_edb.c + +module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_edb_libs@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_saver_edb.la + +libevas_saver_edb_la_SOURCES = evas_image_save_edb.c +libevas_saver_edb_la_LIBADD = @evas_image_loader_edb_libs@ + +endif +endif + +EXTRA_DIST = evas_image_save_edb.c diff --git a/libraries/evas/src/modules/savers/edb/Makefile.in b/libraries/evas/src/modules/savers/edb/Makefile.in new file mode 100644 index 0000000..e319b56 --- /dev/null +++ b/libraries/evas/src/modules/savers/edb/Makefile.in @@ -0,0 +1,755 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/savers/edb +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_saver_edb_la_DEPENDENCIES = +am__libevas_saver_edb_la_SOURCES_DIST = evas_image_save_edb.c +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_TRUE@am_libevas_saver_edb_la_OBJECTS = evas_image_save_edb.lo +libevas_saver_edb_la_OBJECTS = $(am_libevas_saver_edb_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_TRUE@am_libevas_saver_edb_la_rpath = +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_save_edb.c +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@am_module_la_OBJECTS = module_la-evas_image_save_edb.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@ -rpath \ +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_saver_edb_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_saver_edb_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = -I. \ + -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib/include \ + @FREETYPE_CFLAGS@ @PIXMAN_CFLAGS@ @evas_image_loader_edb_cflags@ \ + @EINA_CFLAGS@ + +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@pkgdir = $(libdir)/evas/modules/savers/edb/$(MODULE_ARCH) +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@module_la_SOURCES = evas_image_save_edb.c +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_edb_libs@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@module_la_LDFLAGS = -no-undefined -module -avoid-version +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_TRUE@noinst_LTLIBRARIES = libevas_saver_edb.la +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_TRUE@libevas_saver_edb_la_SOURCES = evas_image_save_edb.c +@BUILD_LOADER_EDB_TRUE@@EVAS_STATIC_BUILD_EDB_TRUE@libevas_saver_edb_la_LIBADD = @evas_image_loader_edb_libs@ +EXTRA_DIST = evas_image_save_edb.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/savers/edb/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/savers/edb/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_saver_edb.la: $(libevas_saver_edb_la_OBJECTS) $(libevas_saver_edb_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_saver_edb_la_rpath) $(libevas_saver_edb_la_OBJECTS) $(libevas_saver_edb_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_save_edb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_save_edb.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_save_edb.lo: evas_image_save_edb.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_save_edb.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_save_edb.Tpo -c -o module_la-evas_image_save_edb.lo `test -f 'evas_image_save_edb.c' || echo '$(srcdir)/'`evas_image_save_edb.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_save_edb.Tpo $(DEPDIR)/module_la-evas_image_save_edb.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_save_edb.c' object='module_la-evas_image_save_edb.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_save_edb.lo `test -f 'evas_image_save_edb.c' || echo '$(srcdir)/'`evas_image_save_edb.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/savers/edb/evas_image_save_edb.c b/libraries/evas/src/modules/savers/edb/evas_image_save_edb.c new file mode 100644 index 0000000..8279226 --- /dev/null +++ b/libraries/evas/src/modules/savers/edb/evas_image_save_edb.c @@ -0,0 +1,48 @@ +#include "evas_common.h" +#include "evas_private.h" + +#include +#include + +static int evas_image_save_file_edb(RGBA_Image *im, const char *file, const char *key, int quality, int compress); + +static Evas_Image_Save_Func evas_image_save_edb_func = +{ + evas_image_save_file_edb +}; + +static int +evas_image_save_file_edb(RGBA_Image *im, const char *file, const char *key, int quality, int compress) +{ + return 0; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_save_edb_func); + return 1; +} + +static void +module_close(Evas_Module *em) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "edb", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_SAVER, image_saver, edb); + +#ifndef EVAS_STATIC_BUILD_EDB +EVAS_EINA_MODULE_DEFINE(image_saver, edb); +#endif diff --git a/libraries/evas/src/modules/savers/eet/Makefile.am b/libraries/evas/src/modules/savers/eet/Makefile.am new file mode 100644 index 0000000..1c7f71c --- /dev/null +++ b/libraries/evas/src/modules/savers/eet/Makefile.am @@ -0,0 +1,35 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_eet_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_LOADER_EET +if !EVAS_STATIC_BUILD_EET + +pkgdir = $(libdir)/evas/modules/savers/eet/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_save_eet.c + +module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_eet_libs@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_saver_eet.la + +libevas_saver_eet_la_SOURCES = evas_image_save_eet.c +libevas_saver_eet_la_LIBADD = @evas_image_loader_eet_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/savers/eet/Makefile.in b/libraries/evas/src/modules/savers/eet/Makefile.in new file mode 100644 index 0000000..c80e946 --- /dev/null +++ b/libraries/evas/src/modules/savers/eet/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/savers/eet +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_saver_eet_la_DEPENDENCIES = +am__libevas_saver_eet_la_SOURCES_DIST = evas_image_save_eet.c +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_TRUE@am_libevas_saver_eet_la_OBJECTS = evas_image_save_eet.lo +libevas_saver_eet_la_OBJECTS = $(am_libevas_saver_eet_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_TRUE@am_libevas_saver_eet_la_rpath = +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_save_eet.c +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@am_module_la_OBJECTS = module_la-evas_image_save_eet.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@ -rpath \ +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_saver_eet_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_saver_eet_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_eet_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@pkgdir = $(libdir)/evas/modules/savers/eet/$(MODULE_ARCH) +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@module_la_SOURCES = evas_image_save_eet.c +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_eet_libs@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_TRUE@noinst_LTLIBRARIES = libevas_saver_eet.la +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_TRUE@libevas_saver_eet_la_SOURCES = evas_image_save_eet.c +@BUILD_LOADER_EET_TRUE@@EVAS_STATIC_BUILD_EET_TRUE@libevas_saver_eet_la_LIBADD = @evas_image_loader_eet_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/savers/eet/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/savers/eet/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_saver_eet.la: $(libevas_saver_eet_la_OBJECTS) $(libevas_saver_eet_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_saver_eet_la_rpath) $(libevas_saver_eet_la_OBJECTS) $(libevas_saver_eet_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_save_eet.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_save_eet.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_save_eet.lo: evas_image_save_eet.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_save_eet.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_save_eet.Tpo -c -o module_la-evas_image_save_eet.lo `test -f 'evas_image_save_eet.c' || echo '$(srcdir)/'`evas_image_save_eet.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_save_eet.Tpo $(DEPDIR)/module_la-evas_image_save_eet.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_save_eet.c' object='module_la-evas_image_save_eet.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_save_eet.lo `test -f 'evas_image_save_eet.c' || echo '$(srcdir)/'`evas_image_save_eet.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/savers/eet/evas_image_save_eet.c b/libraries/evas/src/modules/savers/eet/evas_image_save_eet.c new file mode 100644 index 0000000..4eb7176 --- /dev/null +++ b/libraries/evas/src/modules/savers/eet/evas_image_save_eet.c @@ -0,0 +1,83 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" /* so that EAPI in Eet.h is correctly defined */ +#endif + +#include + +#include "evas_common.h" +#include "evas_private.h" + +static int evas_image_save_file_eet(RGBA_Image *im, const char *file, const char *key, int quality, int compress); + +static Evas_Image_Save_Func evas_image_save_eet_func = +{ + evas_image_save_file_eet +}; + +static int +evas_image_save_file_eet(RGBA_Image *im, const char *file, const char *key, int quality, int compress) +{ + Eet_File *ef; + int alpha = 0, lossy = 0, ok = 0; + DATA32 *data; + + if (!im || !im->image.data || !file) + return 0; + + ef = eet_open((char *)file, EET_FILE_MODE_READ_WRITE); + if (!ef) ef = eet_open((char *)file, EET_FILE_MODE_WRITE); + if (!ef) return 0; + if ((quality <= 100) || (compress < 0)) lossy = 1; + if (im->cache_entry.flags.alpha) alpha = 1; +// if (alpha) +// { +// data = malloc(im->image->w * im->image->h * sizeof(DATA32)); +// if (!data) +// { +// eet_close(ef); +// return 0; +// } +// memcpy(data, im->image->data, im->image->w * im->image->h * sizeof(DATA32)); +// evas_common_convert_argb_unpremul(data, im->image->w * im->image->h); +// } +// else + data = im->image.data; + ok = eet_data_image_write(ef, (char *)key, data, + im->cache_entry.w, im->cache_entry.h, alpha, compress, + quality, lossy); +// if (alpha) +// free(data); + eet_close(ef); + return ok; +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_save_eet_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "eet", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_SAVER, image_saver, eet); + +#ifndef EVAS_STATIC_BUILD_EET +EVAS_EINA_MODULE_DEFINE(image_saver, eet); +#endif + diff --git a/libraries/evas/src/modules/savers/jpeg/Makefile.am b/libraries/evas/src/modules/savers/jpeg/Makefile.am new file mode 100644 index 0000000..82a40ac --- /dev/null +++ b/libraries/evas/src/modules/savers/jpeg/Makefile.am @@ -0,0 +1,34 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS= \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_jpeg_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_SAVER_JPEG +if !EVAS_STATIC_BUILD_JPEG + +pkgdir = $(libdir)/evas/modules/savers/jpeg/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_save_jpeg.c + +module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_jpeg_libs@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_saver_jpeg.la +libevas_saver_jpeg_la_SOURCES = evas_image_save_jpeg.c +libevas_saver_jpeg_la_LIBADD = @evas_image_loader_jpeg_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/savers/jpeg/Makefile.in b/libraries/evas/src/modules/savers/jpeg/Makefile.in new file mode 100644 index 0000000..3c1bd8b --- /dev/null +++ b/libraries/evas/src/modules/savers/jpeg/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/savers/jpeg +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_saver_jpeg_la_DEPENDENCIES = +am__libevas_saver_jpeg_la_SOURCES_DIST = evas_image_save_jpeg.c +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am_libevas_saver_jpeg_la_OBJECTS = evas_image_save_jpeg.lo +libevas_saver_jpeg_la_OBJECTS = $(am_libevas_saver_jpeg_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am_libevas_saver_jpeg_la_rpath = +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_save_jpeg.c +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@am_module_la_OBJECTS = module_la-evas_image_save_jpeg.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@am_module_la_rpath = \ +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@ -rpath \ +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_saver_jpeg_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_saver_jpeg_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_jpeg_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@pkgdir = $(libdir)/evas/modules/savers/jpeg/$(MODULE_ARCH) +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_SOURCES = evas_image_save_jpeg.c +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_jpeg_libs@ $(top_builddir)/src/lib/libevas.la +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@noinst_LTLIBRARIES = libevas_saver_jpeg.la +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@libevas_saver_jpeg_la_SOURCES = evas_image_save_jpeg.c +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@libevas_saver_jpeg_la_LIBADD = @evas_image_loader_jpeg_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/savers/jpeg/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/savers/jpeg/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_saver_jpeg.la: $(libevas_saver_jpeg_la_OBJECTS) $(libevas_saver_jpeg_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_saver_jpeg_la_rpath) $(libevas_saver_jpeg_la_OBJECTS) $(libevas_saver_jpeg_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_save_jpeg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_save_jpeg.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_save_jpeg.lo: evas_image_save_jpeg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_save_jpeg.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_save_jpeg.Tpo -c -o module_la-evas_image_save_jpeg.lo `test -f 'evas_image_save_jpeg.c' || echo '$(srcdir)/'`evas_image_save_jpeg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_save_jpeg.Tpo $(DEPDIR)/module_la-evas_image_save_jpeg.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_save_jpeg.c' object='module_la-evas_image_save_jpeg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_save_jpeg.lo `test -f 'evas_image_save_jpeg.c' || echo '$(srcdir)/'`evas_image_save_jpeg.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/savers/jpeg/evas_image_save_jpeg.c b/libraries/evas/src/modules/savers/jpeg/evas_image_save_jpeg.c new file mode 100644 index 0000000..247f0af --- /dev/null +++ b/libraries/evas/src/modules/savers/jpeg/evas_image_save_jpeg.c @@ -0,0 +1,156 @@ +#include "evas_common.h" +#include "evas_private.h" + +#include +#include +#include + +static int evas_image_save_file_jpeg(RGBA_Image *im, const char *file, const char *key, int quality, int compress); + +static Evas_Image_Save_Func evas_image_save_jpeg_func = +{ + evas_image_save_file_jpeg +}; + +struct _JPEG_error_mgr +{ + struct jpeg_error_mgr pub; + jmp_buf setjmp_buffer; +}; +typedef struct _JPEG_error_mgr *emptr; + +static void _JPEGFatalErrorHandler(j_common_ptr cinfo); +static void +_JPEGFatalErrorHandler(j_common_ptr cinfo) +{ + emptr errmgr; + + errmgr = (emptr) cinfo->err; + longjmp(errmgr->setjmp_buffer, 1); + return; +} + +static void +_JPEGErrorHandler(j_common_ptr cinfo __UNUSED__) +{ +/* emptr errmgr; */ + +/* errmgr = (emptr) cinfo->err; */ + return; +} + +static void +_JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, int msg_level __UNUSED__) +{ +/* emptr errmgr; */ + +/* errmgr = (emptr) cinfo->err; */ + return; +} + +static int +save_image_jpeg(RGBA_Image *im, const char *file, int quality) +{ + struct _JPEG_error_mgr jerr; + struct jpeg_compress_struct cinfo; + FILE *f; + DATA8 *buf; + DATA32 *ptr; + JSAMPROW *jbuf; + int y = 0; + + if (!im || !im->image.data || !file) + return 0; + + buf = alloca(im->cache_entry.w * 3 * sizeof(DATA8)); + f = fopen(file, "wb"); + if (!f) + { + return 0; + } + jerr.pub.error_exit = _JPEGFatalErrorHandler; + jerr.pub.emit_message = _JPEGErrorHandler2; + jerr.pub.output_message = _JPEGErrorHandler; + cinfo.err = jpeg_std_error(&(jerr.pub)); + if (sigsetjmp(jerr.setjmp_buffer, 1)) + { + jpeg_destroy_compress(&cinfo); + fclose(f); + return 0; + } + jpeg_create_compress(&cinfo); + jpeg_stdio_dest(&cinfo, f); + cinfo.image_width = im->cache_entry.w; + cinfo.image_height = im->cache_entry.h; + cinfo.input_components = 3; + cinfo.in_color_space = JCS_RGB; + cinfo.optimize_coding = FALSE; + cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss) + if (quality < 60) cinfo.dct_method = JDCT_IFAST; + jpeg_set_defaults(&cinfo); + jpeg_set_quality(&cinfo, quality, TRUE); + if (quality >= 90) + { + cinfo.comp_info[0].h_samp_factor = 1; + cinfo.comp_info[0].v_samp_factor = 1; + cinfo.comp_info[1].h_samp_factor = 1; + cinfo.comp_info[1].v_samp_factor = 1; + cinfo.comp_info[2].h_samp_factor = 1; + cinfo.comp_info[2].v_samp_factor = 1; + } + jpeg_start_compress(&cinfo, TRUE); + ptr = im->image.data; + while (cinfo.next_scanline < cinfo.image_height) + { + unsigned int i, j; + for (j = 0, i = 0; i < im->cache_entry.w; i++) + { + buf[j++] = ((*ptr) >> 16) & 0xff; + buf[j++] = ((*ptr) >> 8) & 0xff; + buf[j++] = ((*ptr)) & 0xff; + ptr++; + } + jbuf = (JSAMPROW *) (&buf); + jpeg_write_scanlines(&cinfo, jbuf, 1); + y++; + } + jpeg_finish_compress(&cinfo); + jpeg_destroy_compress(&cinfo); + fclose(f); + return 1; +} + +static int evas_image_save_file_jpeg(RGBA_Image *im, const char *file, const char *key __UNUSED__, int quality, int compress __UNUSED__) +{ + return save_image_jpeg(im, file, quality); +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_save_jpeg_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "jpeg", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_SAVER, image_saver, jpeg); + +#ifndef EVAS_STATIC_BUILD_JPEG +EVAS_EINA_MODULE_DEFINE(image_saver, jpeg); +#endif diff --git a/libraries/evas/src/modules/savers/png/Makefile.am b/libraries/evas/src/modules/savers/png/Makefile.am new file mode 100644 index 0000000..1429f2e --- /dev/null +++ b/libraries/evas/src/modules/savers/png/Makefile.am @@ -0,0 +1,37 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_png_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_LOADER_PNG +if !EVAS_STATIC_BUILD_PNG + +pkgdir = $(libdir)/evas/modules/savers/png/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_save_png.c + +module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_png_libs@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_saver_png.la + +libevas_saver_png_la_SOURCES = evas_image_save_png.c +libevas_saver_png_la_LIBADD = @evas_image_loader_png_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/savers/png/Makefile.in b/libraries/evas/src/modules/savers/png/Makefile.in new file mode 100644 index 0000000..3b905a5 --- /dev/null +++ b/libraries/evas/src/modules/savers/png/Makefile.in @@ -0,0 +1,760 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/savers/png +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_saver_png_la_DEPENDENCIES = +am__libevas_saver_png_la_SOURCES_DIST = evas_image_save_png.c +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_TRUE@am_libevas_saver_png_la_OBJECTS = evas_image_save_png.lo +libevas_saver_png_la_OBJECTS = $(am_libevas_saver_png_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_TRUE@am_libevas_saver_png_la_rpath = +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_save_png.c +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@am_module_la_OBJECTS = module_la-evas_image_save_png.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@ -rpath \ +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_saver_png_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_saver_png_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_png_cflags@ \ +@EVIL_CFLAGS@ \ +@WIN32_CPPFLAGS@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@pkgdir = $(libdir)/evas/modules/savers/png/$(MODULE_ARCH) +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@module_la_SOURCES = evas_image_save_png.c +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_png_libs@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_TRUE@noinst_LTLIBRARIES = libevas_saver_png.la +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_TRUE@libevas_saver_png_la_SOURCES = evas_image_save_png.c +@BUILD_LOADER_PNG_TRUE@@EVAS_STATIC_BUILD_PNG_TRUE@libevas_saver_png_la_LIBADD = @evas_image_loader_png_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/savers/png/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/savers/png/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_saver_png.la: $(libevas_saver_png_la_OBJECTS) $(libevas_saver_png_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_saver_png_la_rpath) $(libevas_saver_png_la_OBJECTS) $(libevas_saver_png_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_save_png.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_save_png.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_save_png.lo: evas_image_save_png.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_save_png.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_save_png.Tpo -c -o module_la-evas_image_save_png.lo `test -f 'evas_image_save_png.c' || echo '$(srcdir)/'`evas_image_save_png.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_save_png.Tpo $(DEPDIR)/module_la-evas_image_save_png.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_save_png.c' object='module_la-evas_image_save_png.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_save_png.lo `test -f 'evas_image_save_png.c' || echo '$(srcdir)/'`evas_image_save_png.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/savers/png/evas_image_save_png.c b/libraries/evas/src/modules/savers/png/evas_image_save_png.c new file mode 100644 index 0000000..734890c --- /dev/null +++ b/libraries/evas/src/modules/savers/png/evas_image_save_png.c @@ -0,0 +1,193 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#ifdef HAVE_EVIL +# include +#endif + +#ifdef _WIN32_WCE +# define E_FOPEN(file, mode) evil_fopen_native((file), (mode)) +# define E_FCLOSE(stream) evil_fclose_native(stream) +#else +# define E_FOPEN(file, mode) fopen((file), (mode)) +# define E_FCLOSE(stream) fclose(stream) +#endif + +#include "evas_common.h" +#include "evas_private.h" + +static int evas_image_save_file_png(RGBA_Image *im, const char *file, const char *key, int quality, int compress); + +static Evas_Image_Save_Func evas_image_save_png_func = +{ + evas_image_save_file_png +}; + +static int +save_image_png(RGBA_Image *im, const char *file, int do_compress, int interlace) +{ + FILE *f; + png_structp png_ptr; + png_infop info_ptr; + DATA32 *ptr, *data = NULL; + unsigned int x, y, j; + png_bytep row_ptr, png_data = NULL; + png_color_8 sig_bit; + int num_passes = 1, pass; + + if (!im || !im->image.data || !file) + return 0; + + f = E_FOPEN(file, "wb"); + if (!f) return 0; + + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (!png_ptr) + goto close_file; + + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_write_struct(&png_ptr, NULL); + goto close_file; + } + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_write_struct(&png_ptr, (png_infopp) & info_ptr); + png_destroy_info_struct(png_ptr, (png_infopp) & info_ptr); + goto close_file; + } + + if (interlace) + { +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + interlace = PNG_INTERLACE_ADAM7; +#else + interlace = PNG_INTERLACE_NONE; +#endif + } + else + interlace = PNG_INTERLACE_NONE; + + if (im->cache_entry.flags.alpha) + { + data = malloc(im->cache_entry.w * im->cache_entry.h * sizeof(DATA32)); + if (!data) + { + png_destroy_write_struct(&png_ptr, (png_infopp) & info_ptr); + png_destroy_info_struct(png_ptr, (png_infopp) & info_ptr); + goto close_file; + } + memcpy(data, im->image.data, im->cache_entry.w * im->cache_entry.h * sizeof(DATA32)); + evas_common_convert_argb_unpremul(data, im->cache_entry.w * im->cache_entry.h); + png_init_io(png_ptr, f); + png_set_IHDR(png_ptr, info_ptr, im->cache_entry.w, im->cache_entry.h, 8, + PNG_COLOR_TYPE_RGB_ALPHA, interlace, + PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); +#ifdef WORDS_BIGENDIAN + png_set_swap_alpha(png_ptr); +#else + png_set_bgr(png_ptr); +#endif + } + else + { + data = im->image.data; + png_init_io(png_ptr, f); + png_set_IHDR(png_ptr, info_ptr, im->cache_entry.w, im->cache_entry.h, 8, + PNG_COLOR_TYPE_RGB, interlace, + PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + png_data = alloca(im->cache_entry.w * 3 * sizeof(char)); + } + sig_bit.red = 8; + sig_bit.green = 8; + sig_bit.blue = 8; + sig_bit.alpha = 8; + png_set_sBIT(png_ptr, info_ptr, &sig_bit); + + png_set_compression_level(png_ptr, do_compress); + png_write_info(png_ptr, info_ptr); + png_set_shift(png_ptr, &sig_bit); + png_set_packing(png_ptr); + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + num_passes = png_set_interlace_handling(png_ptr); +#endif + + for (pass = 0; pass < num_passes; pass++) + { + ptr = data; + + for (y = 0; y < im->cache_entry.h; y++) + { + if (im->cache_entry.flags.alpha) + row_ptr = (png_bytep) ptr; + else + { + for (j = 0, x = 0; x < im->cache_entry.w; x++) + { + png_data[j++] = (ptr[x] >> 16) & 0xff; + png_data[j++] = (ptr[x] >> 8) & 0xff; + png_data[j++] = (ptr[x]) & 0xff; + } + row_ptr = (png_bytep) png_data; + } + png_write_rows(png_ptr, &row_ptr, 1); + ptr += im->cache_entry.w; + } + } + png_write_end(png_ptr, info_ptr); + png_destroy_write_struct(&png_ptr, (png_infopp) & info_ptr); + png_destroy_info_struct(png_ptr, (png_infopp) & info_ptr); + + if (im->cache_entry.flags.alpha) + free(data); + E_FCLOSE(f); + return 1; + + close_file: + E_FCLOSE(f); + return 0; +} + +static int +evas_image_save_file_png(RGBA_Image *im, const char *file, const char *key __UNUSED__, int quality __UNUSED__, int do_compress) +{ + return save_image_png(im, file, do_compress, 0); +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_save_png_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "png", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_SAVER, image_saver, png); + +#ifndef EVAS_STATIC_BUILD_PNG +EVAS_EINA_MODULE_DEFINE(image_saver, png); +#endif + diff --git a/libraries/evas/src/modules/savers/tiff/Makefile.am b/libraries/evas/src/modules/savers/tiff/Makefile.am new file mode 100644 index 0000000..6d58d26 --- /dev/null +++ b/libraries/evas/src/modules/savers/tiff/Makefile.am @@ -0,0 +1,35 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_tiff_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ + +if BUILD_LOADER_TIFF +if !EVAS_STATIC_BUILD_TIFF + +pkgdir = $(libdir)/evas/modules/savers/tiff/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = evas_image_save_tiff.c + +module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_tiff_libs@ $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_saver_tiff.la + +libevas_saver_tiff_la_SOURCES = evas_image_save_tiff.c +libevas_saver_tiff_la_LIBADD = @evas_image_loader_tiff_libs@ + +endif +endif diff --git a/libraries/evas/src/modules/savers/tiff/Makefile.in b/libraries/evas/src/modules/savers/tiff/Makefile.in new file mode 100644 index 0000000..27acddd --- /dev/null +++ b/libraries/evas/src/modules/savers/tiff/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/savers/tiff +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +libevas_saver_tiff_la_DEPENDENCIES = +am__libevas_saver_tiff_la_SOURCES_DIST = evas_image_save_tiff.c +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_TRUE@am_libevas_saver_tiff_la_OBJECTS = evas_image_save_tiff.lo +libevas_saver_tiff_la_OBJECTS = $(am_libevas_saver_tiff_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_TRUE@am_libevas_saver_tiff_la_rpath = +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_image_save_tiff.c +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@am_module_la_OBJECTS = module_la-evas_image_save_tiff.lo +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@am_module_la_rpath = \ +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@ -rpath \ +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_saver_tiff_la_SOURCES) $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_saver_tiff_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_image_loader_tiff_cflags@ + +AM_CFLAGS = @WIN32_CFLAGS@ +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@pkgdir = $(libdir)/evas/modules/savers/tiff/$(MODULE_ARCH) +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@module_la_SOURCES = evas_image_save_tiff.c +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_tiff_libs@ $(top_builddir)/src/lib/libevas.la +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_TRUE@noinst_LTLIBRARIES = libevas_saver_tiff.la +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_TRUE@libevas_saver_tiff_la_SOURCES = evas_image_save_tiff.c +@BUILD_LOADER_TIFF_TRUE@@EVAS_STATIC_BUILD_TIFF_TRUE@libevas_saver_tiff_la_LIBADD = @evas_image_loader_tiff_libs@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/savers/tiff/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/savers/tiff/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_saver_tiff.la: $(libevas_saver_tiff_la_OBJECTS) $(libevas_saver_tiff_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_saver_tiff_la_rpath) $(libevas_saver_tiff_la_OBJECTS) $(libevas_saver_tiff_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_save_tiff.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_save_tiff.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_image_save_tiff.lo: evas_image_save_tiff.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_save_tiff.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_save_tiff.Tpo -c -o module_la-evas_image_save_tiff.lo `test -f 'evas_image_save_tiff.c' || echo '$(srcdir)/'`evas_image_save_tiff.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_save_tiff.Tpo $(DEPDIR)/module_la-evas_image_save_tiff.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_save_tiff.c' object='module_la-evas_image_save_tiff.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_save_tiff.lo `test -f 'evas_image_save_tiff.c' || echo '$(srcdir)/'`evas_image_save_tiff.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/savers/tiff/evas_image_save_tiff.c b/libraries/evas/src/modules/savers/tiff/evas_image_save_tiff.c new file mode 100644 index 0000000..8148f51 --- /dev/null +++ b/libraries/evas/src/modules/savers/tiff/evas_image_save_tiff.c @@ -0,0 +1,139 @@ +#include "evas_common.h" +#include "evas_private.h" + +#include + +static int evas_image_save_file_tiff(RGBA_Image *im, const char *file, const char *key, int quality, int compress); + +static Evas_Image_Save_Func evas_image_save_tiff_func = +{ + evas_image_save_file_tiff +}; + +static int +save_image_tiff(RGBA_Image *im, const char *file, int compress __UNUSED__, int interlace __UNUSED__) +{ + TIFF *tif = NULL; + uint8 *buf = NULL; + DATA32 pixel; + DATA32 *data; + uint32 x, y; + uint8 r, g, b, a = 0; + int i = 0; + int has_alpha; + + if (!im || !im->image.data || !file) + return 0; + + has_alpha = im->cache_entry.flags.alpha; + data = im->image.data; + + tif = TIFFOpen(file, "w"); + if (!tif) + return 0; + + /* None of the TIFFSetFields are checked for errors, but since they */ + /* shouldn't fail, this shouldn't be a problem */ + + TIFFSetField(tif, TIFFTAG_IMAGELENGTH, im->cache_entry.h); + TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, im->cache_entry.w); + TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); + TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); + TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); + TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE); + + /* By default uses patent-free use COMPRESSION_DEFLATE, + * another lossless compression technique */ + TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); + + if (has_alpha) + { + uint16 extras[] = { EXTRASAMPLE_ASSOCALPHA }; + TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 4); + TIFFSetField(tif, TIFFTAG_EXTRASAMPLES, 1, extras); + } + else + { + TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3); + } + + TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); + TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(tif, 0)); + + buf = (uint8 *) _TIFFmalloc(TIFFScanlineSize(tif)); + if (!buf) + { + TIFFClose(tif); + return 0; + } + + for (y = 0; y < im->cache_entry.h; y++) + { + i = 0; + for (x = 0; x < im->cache_entry.w; x++) + { + pixel = data[(y * im->cache_entry.w) + x]; + + r = (pixel >> 16) & 0xff; + g = (pixel >> 8) & 0xff; + b = pixel & 0xff; + if (has_alpha) + a = (pixel >> 24) & 0xff; + + /* This might be endian dependent */ + buf[i++] = r; + buf[i++] = g; + buf[i++] = b; + if (has_alpha) + buf[i++] = a; + } + + if (!TIFFWriteScanline(tif, buf, y, 0)) + { + _TIFFfree(buf); + TIFFClose(tif); + return 0; + } + } + + _TIFFfree(buf); + TIFFClose(tif); + + return 1; +} + +static int evas_image_save_file_tiff(RGBA_Image *im, const char *file, const char *key __UNUSED__, int quality __UNUSED__, int compress) +{ + return save_image_tiff(im, file, compress, 0); +} + +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + em->functions = (void *)(&evas_image_save_tiff_func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, + "tiff", + "none", + { + module_open, + module_close + } +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_SAVER, image_saver, tiff); + +#ifndef EVAS_STATIC_BUILD_TIFF +EVAS_EINA_MODULE_DEFINE(image_saver, tiff); +#endif + diff --git a/libraries/evas/src/static_deps/Makefile.am b/libraries/evas/src/static_deps/Makefile.am new file mode 100644 index 0000000..08a0f5b --- /dev/null +++ b/libraries/evas/src/static_deps/Makefile.am @@ -0,0 +1,7 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = + +if EVAS_USE_LINEBREAK +SUBDIRS += liblinebreak +endif diff --git a/libraries/evas/src/static_deps/Makefile.in b/libraries/evas/src/static_deps/Makefile.in new file mode 100644 index 0000000..94f534e --- /dev/null +++ b/libraries/evas/src/static_deps/Makefile.in @@ -0,0 +1,735 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@EVAS_USE_LINEBREAK_TRUE@am__append_1 = liblinebreak +subdir = src/static_deps +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = liblinebreak +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = $(am__append_1) +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/static_deps/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/static_deps/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/static_deps/liblinebreak/AUTHORS b/libraries/evas/src/static_deps/liblinebreak/AUTHORS new file mode 100644 index 0000000..523106f --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/AUTHORS @@ -0,0 +1,6 @@ +Wu Yongwei. Designed and implemented liblinebreak. + +Nikolay Pultsin. Put forward the original requirements on liblinebreak, +performed tests, and made a lot of suggestions on the initial versions. + +Thomas Klausner. Autoconfiscated and libtoolized liblinebreak. diff --git a/libraries/evas/src/static_deps/liblinebreak/ChangeLog b/libraries/evas/src/static_deps/liblinebreak/ChangeLog new file mode 100644 index 0000000..8255c10 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/ChangeLog @@ -0,0 +1,397 @@ +2010-01-03 Wu Yongwei + + * LICENCE: Update the copyright year. + +2010-01-03 Wu Yongwei + + * NEWS: Add information about the 2.0 release. + +2010-01-03 Wu Yongwei + + * Doxyfile (PROJECT_NUMBER): Set to `2.0'. + (HAVE_DOT): Set to `YES'. + +2010-01-03 Wu Yongwei + + * linebreak.c: Update the version number in comment to 2.0. + * linebreak.h: Ditto. + * linebreakdef.c: Ditto. + * linebreakdef.h: Ditto. + +2009-12-17 Wu Yongwei + + Change the values of enum BreakAction to the same length. + * linebreak.c (DIRECT_BRK): Rename to DIR_BRK. + (INDIRECT_BRK): Rename to IND_BRK. + (CM_INDIRECT_BRK): Rename to CMI_BRK. + (CM_PROHIBITED_BRK): Rename to CMP_BRK. + (PROHIBITED_BRK): Rename to PRH_BRK. + +2009-11-29 Wu Yongwei + + * Doxyfile (TAB_SIZE): Set to the correct size `4', as used in the + source files. + +2009-11-29 Wu Yongwei + + Update files according to UAX #14-24, for Unicode 5.2.0. + * linebreak.c: Update comments about UAX #14. + * linebreak.h: Ditto. + * linebreakdef.c: Ditto. + * linebreakdef.h: Ditto. + (LBP_CP): New enumerator for the new `CP' class as defined in + UAX #14-24. + * linebreak.c (baTable): Update for the new class `CP'. + * linebreakdata.c: Regenerate from LineBreak-5.2.0.txt. + * README: Update the reference to UAX #14-24, for Unicode 5.2.0. + +2009-05-03 Wu Yongwei + + * NEWS: Add information about the 1.2 release. + +2009-04-30 Wu Yongwei + + Optimize the Doxygen output. + * linebreak.c (lb_prop_index): Adjust its definition format + slightly. + +2009-04-30 Wu Yongwei + + * Doxyfile (USE_WINDOWS_ENCODING): Remove obsolete tag. + (DETAILS_AT_TOP): Ditto. + (MAX_DOT_GRAPH_WIDTH): Ditto. + (MAX_DOT_GRAPH_HEIGHT): Ditto. + (REFERENCED_BY_RELATION): Set to `NO'. + (REFERENCES_RELATION): Ditto. + (EXCLUDE): Add `filter_dup.c'. + +2009-04-28 Wu Yongwei + + * linebreak.c (lb_get_next_char_utf8): Fix the issue that the index + can point to the middle of a UTF-8 sequence if End of String (EOS) + is encountered prematurely (thanks to Nikolay Pultsin and Rick Xu). + (lb_get_next_char_utf16): Fix the issue that the index can point to + the middle of a UTF-16 surrogate pair if EOS is encountered + prematurely. + +2009-04-20 Wu Yongwei + + * linebreakdef.c (lb_prop_English): Remove the specialization of + right single quotation mark as closing punctuation mark, because it + can be used as apostrophe. + (lb_prop_Spanish): Ditto. + (lb_prop_French): Ditto. + +2009-04-09 Wu Yongwei + + * Makefile.msvc: Make the `clean' target work on MSVC versions other + than 6.0; do not use precompiled header. + +2009-03-07 Wu Yongwei + + * linebreak.h: Correct the wrong date in the documentation comment. + * linebreakdef.h: Ditto. + +2009-02-10 Wu Yongwei + + * configure.ac (AC_INIT): Increase the version to 2.0. + * Makefile.am (liblinebreak_la_LDFLAGS): Set the version-info to + `2:0'. + +2009-02-10 Wu Yongwei + + * linebreak.h (LINEBREAK_VERSION): New macro. + (linebreak_version): New global constant declaration. + * linebreak.c (linebreak_version): New global constant definition. + +2009-02-10 Wu Yongwei + + Reduce namespace pollution. + * linebreak.c (get_lb_prop_lang): Mark as static. + (get_next_char_utf8): Rename to lb_get_next_char_utf8. + (get_next_char_utf16): Rename to lb_get_next_char_utf32. + (get_next_char_utf32): Rename to lb_get_next_char_utf32. + (is_breakable): Rename to is_line_breakable. + * linebreak.h (get_next_char_utf8): Remove the function prototype + declaration. + (get_next_char_utf16): Ditto. + (get_next_char_utf32): Ditto. + (is_breakable): Rename to is_line_breakable. + * linebreakdef.h (lb_get_next_char_utf8): Add the function prototype + declaration. + (lb_get_next_char_utf16): Ditto. + (lb_get_next_char_utf32): Ditto. + +2009-02-06 Wu Yongwei + + * NEWS: Add information about the 1.1 release. + +2009-01-02 Wu Yongwei + + * Makefile.am (EXTRA_DIST): Add the missing `LICENCE' file. + +2008-12-31 Wu Yongwei + + * linebreak.c: Update the version number in comment to 1.0. + * linebreak.h: Ditto. + * linebreakdef.c: Ditto. + * linebreakdef.h: Ditto. + +2008-12-31 Wu Yongwei + + * NEWS: Update for the 1.0 release. + +2008-12-31 Wu Yongwei + + * README: Correct two typos. + +2008-12-31 Wu Yongwei + + * README: Add the online URL reference. + +2008-12-30 Wu Yongwei + + * README: Update the reference to UAX #14-22, for Unicode 5.1.0. + +2008-12-13 Wu Yongwei + + Update files according to UAX #14-22, for Unicode 5.1.0. + * linebreak.c (baTable): Update according to Table 2 of UAX #14-22. + * linebreakdef.c (lb_prop_Spanish): Remove the unnecessary + customization for inverted marks in Spanish. + * linebreakdata.c: Regenerate from LineBreak-5.1.0.txt. + * linebreak.h: Update comment only. + * linebreakdef.h: Ditto. + +2008-12-12 Wu Yongwei + + * README: Update for the new build methods and better readability. + +2008-12-12 Wu Yongwei + + * Makefile.msvc: Correct the inconsistent naming in the output + message. + +2008-12-12 Wu Yongwei + + * configure.ac (AM_INIT_AUTOMAKE): Mark `foreign'. + * bootstrap: New file. + * purge: New file. + * Makefile.gcc (purge): Remove this target. + +2008-12-10 Wu Yongwei + + * NEWS: New file. + +2008-12-10 Wu Yongwei + + * AUTHORS: New file. + +2008-12-10 Wu Yongwei + + * Makefile.gcc (purge): New phony target to purge files generated by + autoconfiscation. + +2008-12-10 Thomas Klausner + + * configure.ac: New file. + * Makefile.am: New file. + +2008-12-10 Wu Yongwei + + * Doxyfile (OUTPUT_DIRECTORY): Set to `doc'. + (ALPHABETICAL_INDEX): Set to `YES'. + +2008-12-09 Wu Yongwei + + * Makefile.msvc: New file. + +2008-12-09 Wu Yongwei + + * Makefile: Remove (to become Makefile.gcc). + * Makefile.gcc: New file (was Makefile). + +2008-12-07 Wu Yongwei + + * linebreak.c: Adjust the comment that refers to Unicode Annex 14. + * linebreak.h: Ditto. + * linebreakdef.c: Ditto. + * linebreakdef.h: Ditto. + +2008-12-07 Wu Yongwei + + Use only POSIX basic regexp to ensure maximum portability (issues + have been found on Mac OS X, where GNU extensions do not work). + * LineBreak1.sed: Replace `[:xdigit:]' with `0-9A-F', and `\+' with + `\{1,\}'. + * LineBreak2.sed: Ditto. + +2008-12-07 Wu Yongwei + + * Makefile: Replace `*.exe' with `filter_dup$(EXEEXT)', since the + extension `.exe' is specific to Windows. + +2008-04-20 Wu Yongwei + + Add README and LICENCE files, as well as a Doxyfile to generate + documents. + * README: New file. + * LICENCE: New file. + * Doxyfile: New file. + * Makefile (doc): Add new phony target. + +2008-04-04 Wu Yongwei + + Remove the English override for plus sign: it is better treated in + the text breaking program (see ../breaktext/ for an example). + * linebreakdef.c (lb_prop_English): Remove the line for plus sign. + +2008-03-29 Wu Yongwei + + * Makefile: Correct the dependency-making rules when OLDGCC=Y. + +2008-03-23 Wu Yongwei + + * Makefile (clean): Do not remove *.exe and tags here. + (distclean): Remove *.exe and tags. + +2008-03-23 Wu Yongwei + + Remove the English override for solidus: it is better treated in the + text breaking program (see ../breaktext/ for an example). + * linebreakdef.c (lb_prop_English): Remove the line for solidus. + +2008-03-16 Wu Yongwei + + Rename init_linebreak_prop_index to init_linebreak for future + safety; make visible certain functions that are potentially useful. + * linebreak.c (init_linebreak_prop_index): Rename to init_linebreak. + (get_next_char_t): Move to linebreakdef.h. + (get_next_char_utf8): Make non-static. + (get_next_char_utf16): Ditto. + (get_next_char_utf32): Ditto. + (set_linebreaks): Ditto. + * linebreak.h (init_linebreak_prop_index): Rename to init_linebreak. + (get_next_char_utf8): Add the function prototype. + (get_next_char_utf16): Ditto. + (get_next_char_utf32): Ditto. + * linebreakdef.h (get_next_char_t): Add the typedef. + (set_linebreaks): Add the function prototype. + +2008-03-16 Wu Yongwei + + * Makefile (OLDGCC): Add support for GCC 2.95.3 (when OLDGCC=Y). + +2008-03-15 Wu Yongwei + + * linebreak.c (set_linebreaks): Fix a bug that `==' was wrongly used + for `='. + +2008-03-05 Wu Yongwei + + Improve the performance by reducing the look-ups of the + language-specific line breaking properties array from the language + name (thanks to Nikolay Pultsin). + * linebreak.c (get_lb_prop_lang): New function. + (get_char_lb_class_lang): Change the second parameter from the + language name to the line breaking properties array. + (set_linebreaks): Look up the language-specific line breaking + properties array from the language name only once in one function + call. + +2008-03-03 Wu Yongwei + + Make minor adjustments in code and comments. + * linebreak.c: Adjust the doc comments. + (init_linebreak_prop_index): Modify a conditional to make it more + robust and consistent. + * linebreakdef.c (lb_prop_lang_map): Replace the pointer + lb_prop_default with NULL, since the value is never used. + +2008-03-03 Wu Yongwei + + Accelerate get_char_lb_class for invalid Unicode code points. + * linebreak.c (get_char_lb_class): Adjust the conditionals so that + getting the line breaking class for an invalid code point is much + faster, which requires the array of line breaking properties be + sorted. + * linebreakdef.h: Adjust a comment that the array of line break + properties must be sorted. + +2008-03-02 Wu Yongwei + + Change the values of enum BreakAction to more complete forms. + * linebreak.c (INDRCT_BRK): Rename to INDIRECT_BRK. + (CM_INDRCT_BRK): Rename to CM_INDIRECT_BRK. + (CM_PROHIBTD_BRK): Rename to CM_PROHIBITED_BRK. + (PROHIBTD_BRK): Rename to PROHIBITED_BRK. + +2008-03-02 Wu Yongwei + + Implement a two-stage search in get_char_lb_class_default to + accelerate the overall performance, especially for non-Latin + languages. + * linebreak.c (LINEBREAK_INDEX_SIZE): New constant macro. + (struct LineBreakPropertiesIndex): New struct. + (lb_prop_index): New static variable. + (init_linebreak_prop_index): New function. + (get_char_lb_class_default): New function. + (get_char_lb_class_lang): Use get_char_lb_class_default. + * linebreak.h: Detect C++ and add extern "C" guard if necessary. + (init_linebreak_prop_index): Add the prototype declaration. + * linebreakdef.h: Adjust a comment. + +2008-03-02 Wu Yongwei + + Split/refactor the code; add (doc) comments. + * Makefile (CFILES): Add linebreakdata.c and linebreakdef.c. + * linebreak.c: Add and adjust comments. + (linebreakdef.h): Add include file. + (linebreakdata.c): Remove include file. + (EOS): Remove (now in linebreakdef.h). + (enum LineBreakClass): Ditto. + (struct LineBreakProperties): Ditto. + (lbpEnglish): Remove (now in linebreakdef.c as lb_prop_English). + (lbpGerman): Remove (now in linebreakdef.c as lb_prop_German). + (lbpSpanish): Remove (now in linebreakdef.c as lb_prop_Spanish). + (lbpFrench): Remove (now in linebreakdef.c as lb_prop_French). + (lbpRussian): Remove (now in linebreakdef.c as lb_prop_Russian). + (lbpChinese): Remove (now in linebreakdef.c as lb_prop_Chinese). + (struct LineBreakPropertiesLang): Remove (now in linebreakdef.h). + (lbpLangs): Remove (now in linebreakdef.c as lb_prop_lang_map). + (get_next_char_utf16): Make sure memory access not go beyond len. + * linebreak.h: Add copyright information and adjust comments. + (stddef.h): Add include file. + * linebreakdata.c (linebreak.h): Add include file. + (linebreakdef.h): Add include file. + (lbpDefault): Make global and rename to lb_prop_default. + * linebreakdata2.tmpl: Add two include files, a comment line, and + remove `static'. + * linebreakdef.c: New file. + * linebreakdef.h: New file. + +2008-02-26 Wu Yongwei + + * linebreak.c (lbpSpanish): New array for Spanish-specific data. + (lbpLangs): Update the index array for Spanish. + (resolve_lb_class): Resolve AmbIguous class to IDeographic in + Chinese, Japanese, and Korean. + +2008-02-26 Wu Yongwei + + * Makefile (LineBreak.txt): Add new rule to retrieve it from the Web + if it is not already there. + +2008-02-23 Wu Yongwei + + Add files for linebreak. + * LineBreak1.sed: New file. + * LineBreak2.sed: New file. + * Makefile: New file. + * filter_dup.c: New file. + * linebreak.c: New file. + * linebreak.h: New file. + * linebreakdata.c: New file. + * linebreakdata1.tmpl: New file. + * linebreakdata2.tmpl: New file. + * linebreakdata3.tmpl: New file. diff --git a/libraries/evas/src/static_deps/liblinebreak/LICENCE b/libraries/evas/src/static_deps/liblinebreak/LICENCE new file mode 100644 index 0000000..9b9984f --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/LICENCE @@ -0,0 +1,18 @@ +Copyright (C) 2008-2010 Wu Yongwei + +This software is provided 'as-is', without any express or implied +warranty. In no event will the author be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgement in the product documentation would + be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. +3. This notice may not be removed or altered from any source + distribution. diff --git a/libraries/evas/src/static_deps/liblinebreak/LineBreak1.sed b/libraries/evas/src/static_deps/liblinebreak/LineBreak1.sed new file mode 100644 index 0000000..1be9651 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/LineBreak1.sed @@ -0,0 +1 @@ +s/\(^[0-9A-F.]\{1,\};[A-Z][A-Z0-9]\) #.*/\1/p diff --git a/libraries/evas/src/static_deps/liblinebreak/LineBreak2.sed b/libraries/evas/src/static_deps/liblinebreak/LineBreak2.sed new file mode 100644 index 0000000..8165958 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/LineBreak2.sed @@ -0,0 +1,2 @@ +s/^\([0-9A-F]\{1,\}\);/\1..\1;/ +s/^\([0-9A-F]\{1,\}\)\.\.\([0-9A-F]\{1,\}\);\([A-Z][A-Z0-9]\)/ { 0x\1, 0x\2, LBP_\3 },/ diff --git a/libraries/evas/src/static_deps/liblinebreak/Makefile.am b/libraries/evas/src/static_deps/liblinebreak/Makefile.am new file mode 100644 index 0000000..f386455 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/Makefile.am @@ -0,0 +1,18 @@ +MAINTAINERCLEANFILES = Makefile.in + +#noinst_PROGRAMS = filter_dup +noinst_HEADERS = linebreak.h linebreakdef.h +noinst_LTLIBRARIES = liblinebreak.la + +liblinebreak_la_SOURCES = \ + linebreak.c \ + linebreakdata.c \ + linebreakdef.c + +EXTRA_DIST = \ + LineBreak1.sed \ + LineBreak2.sed \ + linebreakdata1.tmpl \ + linebreakdata2.tmpl \ + linebreakdata3.tmpl \ + LICENCE diff --git a/libraries/evas/src/static_deps/liblinebreak/Makefile.in b/libraries/evas/src/static_deps/liblinebreak/Makefile.in new file mode 100644 index 0000000..909f75e --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/Makefile.in @@ -0,0 +1,681 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/static_deps/liblinebreak +DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in AUTHORS ChangeLog NEWS +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +liblinebreak_la_LIBADD = +am_liblinebreak_la_OBJECTS = linebreak.lo linebreakdata.lo \ + linebreakdef.lo +liblinebreak_la_OBJECTS = $(am_liblinebreak_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(liblinebreak_la_SOURCES) +DIST_SOURCES = $(liblinebreak_la_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in + +#noinst_PROGRAMS = filter_dup +noinst_HEADERS = linebreak.h linebreakdef.h +noinst_LTLIBRARIES = liblinebreak.la +liblinebreak_la_SOURCES = \ + linebreak.c \ + linebreakdata.c \ + linebreakdef.c + +EXTRA_DIST = \ + LineBreak1.sed \ + LineBreak2.sed \ + linebreakdata1.tmpl \ + linebreakdata2.tmpl \ + linebreakdata3.tmpl \ + LICENCE + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/static_deps/liblinebreak/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/static_deps/liblinebreak/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +liblinebreak.la: $(liblinebreak_la_OBJECTS) $(liblinebreak_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(liblinebreak_la_OBJECTS) $(liblinebreak_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreak.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreakdata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreakdef.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/static_deps/liblinebreak/NEWS b/libraries/evas/src/static_deps/liblinebreak/NEWS new file mode 100644 index 0000000..4c55521 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/NEWS @@ -0,0 +1,37 @@ +New in 2.0 + +- Update the algorithm and data according to UAX #14-24 and + LineBreak-5.2.0.txt +- Rename some functions to reduce namespace pollution +- Make Doxygen documentation better + +New in 1.2 + +- Fix the bug that an assertion in code can fail if an invalid UTF-8 or + UTF-16 sequence is encountered near the end of input +- Remove the specialization of right single quotation mark as closing + punctuation mark in English, French, and Spanish, because it can be + used as apostrophe +- Make Doxygen documentation better + +New in 1.1 + +- Make get_lb_prop_lang static and not an exported symbol +- Define is_line_breakable to alias to is_breakable +- Declare get_next_char_utf* will be changed to lb_get_next_char_utf* +- Move the declarations of get_next_char_utf* from linebreak.h to + linebreakdef.h +- Add the function documentation comments to the header files + +New in 1.0 + +- Update the line breaking data according to UAX #14-22 and + LineBreak-5.1.0.txt +- Add autoconfiscation support (./configure, make, make install) +- Add Makefile for MSVC + +First public release (0.9.6, or 20080421) + +- Implement line breaking algorithm according to UAX #14-19 +- Line breaking data is generated from LineBreak-5.0.0.txt +- Makefile only supports GCC diff --git a/libraries/evas/src/static_deps/liblinebreak/README b/libraries/evas/src/static_deps/liblinebreak/README new file mode 100644 index 0000000..9d23651 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/README @@ -0,0 +1,86 @@ +NOTICE: This is the original version, that was adapted a bit (mostly + build related) in order to work nicely with Evas. + + + L I B L I N E B R E A K + ======================= + +Overview +-------- + +This is the README file for liblinebreak, an implementation of the line +breaking algorithm as described in Unicode 5.2.0 Standard Annex 14, +Revision 24, available at + + +Check this URL for up-to-date information: + + + +Licence +------- + +This library is released under an open-source licence, the zlib/libpng +licence. Please check the file LICENCE for details. + +Apart from using the algorithm, part of the code is derived from the +data provided under + + +And the Unicode Terms of Use may apply: + + + +Installation +------------ + +There are three ways to build the library: + +1) On *NIX systems supported by the autoconfiscation tools, do the + normal + + ./configure + make + sudo make install + + to build and install both the dynamic and static libraries. In + addition, one may + + - type `make doc' to generate the doxygen documentation; or + - type `make linebreakdata' to regenerate linebreakdata.c from + LineBreak.txt. + +2) On systems where GCC and Binutils are supported, one can type + + cp -p Makefile.gcc Makefile + make + + to build the static library. In addition, one may + + - type `make debug' or `make release' to explicitly generate the + debug or release build; + - type `make doc' to generate the doxygen documentation; or + - type `make linebreakdata' to regenerate linebreakdata.c from + LineBreak.txt. + +3) On Windows, apart from using method 1 (Cygwin/MSYS) and method 2 + (MinGW), MSVC can also be used. Type + + nmake -f Makefile.msvc + + to build the static library. By default the debug release is built. + To build the release version + + nmake -f Makefile.msvc CFG="linebreak - Win32 Release" + + +Documentation +------------- + +Check the generated document doc/html/linebreak_8h.html for the public +interfaces exposed to applications. + + +$Id: README,v 1.6 2009/11/29 08:09:13 adah Exp $ + +vim:autoindent:expandtab:formatoptions=tcqlmn:textwidth=72: diff --git a/libraries/evas/src/static_deps/liblinebreak/linebreak.c b/libraries/evas/src/static_deps/liblinebreak/linebreak.c new file mode 100644 index 0000000..f9ff9a1 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/linebreak.c @@ -0,0 +1,737 @@ +/* vim: set tabstop=4 shiftwidth=4: */ + +/* + * Line breaking in a Unicode sequence. Designed to be used in a + * generic text renderer. + * + * Copyright (C) 2008-2010 Wu Yongwei + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute + * it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must + * not claim that you wrote the original software. If you use this + * software in a product, an acknowledgement in the product + * documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source + * distribution. + * + * The main reference is Unicode Standard Annex 14 (UAX #14): + * + * + * When this library was designed, this annex was at Revision 19, for + * Unicode 5.0.0: + * + * + * This library has been updated according to Revision 24, for + * Unicode 5.2.0: + * + * + * The Unicode Terms of Use are available at + * + */ + +/** + * @file linebreak.c + * + * Implementation of the line breaking algorithm as described in Unicode + * Standard Annex 14. + * + * @version 2.0, 2010/01/03 + * @author Wu Yongwei + */ + +#include +#include +#include +#include "linebreak.h" +#include "linebreakdef.h" + +/** + * Size of the second-level index to the line breaking properties. + */ +#define LINEBREAK_INDEX_SIZE 40 + +/** + * Version number of the library. + */ +const int linebreak_version = LINEBREAK_VERSION; + +/** + * Enumeration of break actions. They are used in the break action + * pair table below. + */ +enum BreakAction +{ + DIR_BRK, /**< Direct break opportunity */ + IND_BRK, /**< Indirect break opportunity */ + CMI_BRK, /**< Indirect break opportunity for combining marks */ + CMP_BRK, /**< Prohibited break for combining marks */ + PRH_BRK /**< Prohibited break */ +}; + +/** + * Break action pair table. This is a direct mapping of Table 2 of + * Unicode Standard Annex 14, Revision 24. + */ +static enum BreakAction baTable[LBP_JT][LBP_JT] = { + { /* OP */ + PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, CMP_BRK, + PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK }, + { /* CL */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* CP */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, + DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* QU */ + PRH_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, + IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK }, + { /* GL */ + IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, + IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK }, + { /* NS */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* EX */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* SY */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, + DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* IS */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, + DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* PR */ + IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, + DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK }, + { /* PO */ + IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, + DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* NU */ + IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, + IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* AL */ + IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, + IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* ID */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* IN */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* HY */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, DIR_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, + DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* BA */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, DIR_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* BB */ + IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, + IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK }, + { /* B2 */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, PRH_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* ZW */ + DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, PRH_BRK, DIR_BRK, + DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* CM */ + IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, + IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, + { /* WJ */ + IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, + IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK }, + { /* H2 */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK }, + { /* H3 */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK }, + { /* JL */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK }, + { /* JV */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK }, + { /* JT */ + DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, + PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, + IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, + PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK } +}; + +/** + * Struct for the second-level index to the line breaking properties. + */ +struct LineBreakPropertiesIndex +{ + utf32_t end; /**< End coding point */ + struct LineBreakProperties *lbp;/**< Pointer to line breaking properties */ +}; + +/** + * Second-level index to the line breaking properties. + */ +static struct LineBreakPropertiesIndex lb_prop_index[LINEBREAK_INDEX_SIZE] = +{ + { 0xFFFFFFFF, lb_prop_default } +}; + +/** + * Initializes the second-level index to the line breaking properties. + * If it is not called, the performance of #get_char_lb_class_lang (and + * thus the main functionality) can be pretty bad, especially for big + * code points like those of Chinese. + */ +void init_linebreak(void) +{ + size_t i; + size_t iPropDefault; + size_t len; + size_t step; + + len = 0; + while (lb_prop_default[len].prop != LBP_Undefined) + ++len; + step = len / LINEBREAK_INDEX_SIZE; + iPropDefault = 0; + for (i = 0; i < LINEBREAK_INDEX_SIZE; ++i) + { + lb_prop_index[i].lbp = lb_prop_default + iPropDefault; + iPropDefault += step; + lb_prop_index[i].end = lb_prop_default[iPropDefault].start - 1; + } + lb_prop_index[--i].end = 0xFFFFFFFF; +} + +/** + * Gets the language-specific line breaking properties. + * + * @param lang language of the text + * @return pointer to the language-specific line breaking + * properties array if found; \c NULL otherwise + */ +static struct LineBreakProperties *get_lb_prop_lang(const char *lang) +{ + struct LineBreakPropertiesLang *lbplIter; + if (lang != NULL) + { + for (lbplIter = lb_prop_lang_map; lbplIter->lang != NULL; ++lbplIter) + { + if (strncmp(lang, lbplIter->lang, lbplIter->namelen) == 0) + { + return lbplIter->lbp; + } + } + } + return NULL; +} + +/** + * Gets the line breaking class of a character from a line breaking + * properties array. + * + * @param ch character to check + * @param lbp pointer to the line breaking properties array + * @return the line breaking class if found; \c LBP_XX otherwise + */ +static enum LineBreakClass get_char_lb_class( + utf32_t ch, + struct LineBreakProperties *lbp) +{ + while (lbp->prop != LBP_Undefined && ch >= lbp->start) + { + if (ch <= lbp->end) + return lbp->prop; + ++lbp; + } + return LBP_XX; +} + +/** + * Gets the line breaking class of a character from the default line + * breaking properties array. + * + * @param ch character to check + * @return the line breaking class if found; \c LBP_XX otherwise + */ +static enum LineBreakClass get_char_lb_class_default( + utf32_t ch) +{ + size_t i = 0; + while (ch > lb_prop_index[i].end) + ++i; + assert(i < LINEBREAK_INDEX_SIZE); + return get_char_lb_class(ch, lb_prop_index[i].lbp); +} + +/** + * Gets the line breaking class of a character for a specific + * language. This function will check the language-specific data first, + * and then the default data if there is no language-specific property + * available for the character. + * + * @param ch character to check + * @param lbpLang pointer to the language-specific line breaking + * properties array + * @return the line breaking class if found; \c LBP_XX + * otherwise + */ +static enum LineBreakClass get_char_lb_class_lang( + utf32_t ch, + struct LineBreakProperties *lbpLang) +{ + enum LineBreakClass lbcResult; + + /* Find the language-specific line breaking class for a character */ + if (lbpLang) + { + lbcResult = get_char_lb_class(ch, lbpLang); + if (lbcResult != LBP_XX) + return lbcResult; + } + + /* Find the generic language-specific line breaking class, if no + * language context is provided, or language-specific data are not + * available for the specific character in the specified language */ + return get_char_lb_class_default(ch); +} + +/** + * Resolves the line breaking class for certain ambiguous or complicated + * characters. They are treated in a simplistic way in this + * implementation. + * + * @param lbc line breaking class to resolve + * @param lang language of the text + * @return the resolved line breaking class + */ +static enum LineBreakClass resolve_lb_class( + enum LineBreakClass lbc, + const char *lang) +{ + switch (lbc) + { + case LBP_AI: + if (lang != NULL && + (strncmp(lang, "zh", 2) == 0 || /* Chinese */ + strncmp(lang, "ja", 2) == 0 || /* Japanese */ + strncmp(lang, "ko", 2) == 0)) /* Korean */ + { + return LBP_ID; + } + /* Fall through */ + case LBP_SA: + case LBP_SG: + case LBP_XX: + return LBP_AL; + default: + return lbc; + } +} + +/** + * Gets the next Unicode character in a UTF-8 sequence. The index will + * be advanced to the next complete character, unless the end of string + * is reached in the middle of a UTF-8 sequence. + * + * @param[in] s input UTF-8 string + * @param[in] len length of the string in bytes + * @param[in,out] ip pointer to the index + * @return the Unicode character beginning at the index; or + * #EOS if end of input is encountered + */ +utf32_t lb_get_next_char_utf8( + const utf8_t *s, + size_t len, + size_t *ip) +{ + utf8_t ch; + utf32_t res; + + assert(*ip <= len); + if (*ip == len) + return EOS; + ch = s[*ip]; + + if (ch < 0xC2 || ch > 0xF4) + { /* One-byte sequence, tail (should not occur), or invalid */ + *ip += 1; + return ch; + } + else if (ch < 0xE0) + { /* Two-byte sequence */ + if (*ip + 2 > len) + return EOS; + res = ((ch & 0x1F) << 6) + (s[*ip + 1] & 0x3F); + *ip += 2; + return res; + } + else if (ch < 0xF0) + { /* Three-byte sequence */ + if (*ip + 3 > len) + return EOS; + res = ((ch & 0x0F) << 12) + + ((s[*ip + 1] & 0x3F) << 6) + + ((s[*ip + 2] & 0x3F)); + *ip += 3; + return res; + } + else + { /* Four-byte sequence */ + if (*ip + 4 > len) + return EOS; + res = ((ch & 0x07) << 18) + + ((s[*ip + 1] & 0x3F) << 12) + + ((s[*ip + 2] & 0x3F) << 6) + + ((s[*ip + 3] & 0x3F)); + *ip += 4; + return res; + } +} + +/** + * Gets the next Unicode character in a UTF-16 sequence. The index will + * be advanced to the next complete character, unless the end of string + * is reached in the middle of a UTF-16 surrogate pair. + * + * @param[in] s input UTF-16 string + * @param[in] len length of the string in words + * @param[in,out] ip pointer to the index + * @return the Unicode character beginning at the index; or + * #EOS if end of input is encountered + */ +utf32_t lb_get_next_char_utf16( + const utf16_t *s, + size_t len, + size_t *ip) +{ + utf16_t ch; + + assert(*ip <= len); + if (*ip == len) + return EOS; + ch = s[(*ip)++]; + + if (ch < 0xD800 || ch > 0xDBFF) + { /* If the character is not a high surrogate */ + return ch; + } + if (*ip == len) + { /* If the input ends here (an error) */ + --(*ip); + return EOS; + } + if (s[*ip] < 0xDC00 || s[*ip] > 0xDFFF) + { /* If the next character is not the low surrogate (an error) */ + return ch; + } + /* Return the constructed character and advance the index again */ + return (((utf32_t)ch & 0x3FF) << 10) + (s[(*ip)++] & 0x3FF) + 0x10000; +} + +/** + * Gets the next Unicode character in a UTF-32 sequence. The index will + * be advanced to the next character. + * + * @param[in] s input UTF-32 string + * @param[in] len length of the string in dwords + * @param[in,out] ip pointer to the index + * @return the Unicode character beginning at the index; or + * #EOS if end of input is encountered + */ +utf32_t lb_get_next_char_utf32( + const utf32_t *s, + size_t len, + size_t *ip) +{ + assert(*ip <= len); + if (*ip == len) + return EOS; + return s[(*ip)++]; +} + +/** + * Sets the line breaking information for a generic input string. + * + * @param[in] s input string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, + * containing #LINEBREAK_MUSTBREAK, + * #LINEBREAK_ALLOWBREAK, #LINEBREAK_NOBREAK, + * or #LINEBREAK_INSIDEACHAR + * @param[in] get_next_char function to get the next UTF-32 character + */ +void set_linebreaks( + const void *s, + size_t len, + const char *lang, + char *brks, + get_next_char_t get_next_char) +{ + utf32_t ch; + enum LineBreakClass lbcCur; + enum LineBreakClass lbcNew; + enum LineBreakClass lbcLast; + struct LineBreakProperties *lbpLang; + size_t posCur = 0; + size_t posLast = 0; + + --posLast; /* To be ++'d later */ + ch = get_next_char(s, len, &posCur); + if (ch == EOS) + return; + lbpLang = get_lb_prop_lang(lang); + lbcCur = resolve_lb_class(get_char_lb_class_lang(ch, lbpLang), lang); + lbcNew = LBP_Undefined; + +nextline: + + /* Special treatment for the first character */ + switch (lbcCur) + { + case LBP_LF: + case LBP_NL: + lbcCur = LBP_BK; + break; + case LBP_CB: + lbcCur = LBP_BA; + break; + case LBP_SP: + lbcCur = LBP_WJ; + break; + default: + break; + } + + /* Process a line till an explicit break or end of string */ + for (;;) + { + for (++posLast; posLast < posCur - 1; ++posLast) + { + brks[posLast] = LINEBREAK_INSIDEACHAR; + } + assert(posLast == posCur - 1); + lbcLast = lbcNew; + ch = get_next_char(s, len, &posCur); + if (ch == EOS) + break; + lbcNew = get_char_lb_class_lang(ch, lbpLang); + if (lbcCur == LBP_BK || (lbcCur == LBP_CR && lbcNew != LBP_LF)) + { + brks[posLast] = LINEBREAK_MUSTBREAK; + lbcCur = resolve_lb_class(lbcNew, lang); + goto nextline; + } + + switch (lbcNew) + { + case LBP_SP: + brks[posLast] = LINEBREAK_NOBREAK; + continue; + case LBP_BK: + case LBP_LF: + case LBP_NL: + brks[posLast] = LINEBREAK_NOBREAK; + lbcCur = LBP_BK; + continue; + case LBP_CR: + brks[posLast] = LINEBREAK_NOBREAK; + lbcCur = LBP_CR; + continue; + case LBP_CB: + brks[posLast] = LINEBREAK_ALLOWBREAK; + lbcCur = LBP_BA; + continue; + default: + break; + } + + lbcNew = resolve_lb_class(lbcNew, lang); + + assert(lbcCur <= LBP_JT); + assert(lbcNew <= LBP_JT); + switch (baTable[lbcCur - 1][lbcNew - 1]) + { + case DIR_BRK: + brks[posLast] = LINEBREAK_ALLOWBREAK; + break; + case CMI_BRK: + case IND_BRK: + if (lbcLast == LBP_SP) + { + brks[posLast] = LINEBREAK_ALLOWBREAK; + } + else + { + brks[posLast] = LINEBREAK_NOBREAK; + } + break; + case CMP_BRK: + brks[posLast] = LINEBREAK_NOBREAK; + if (lbcLast != LBP_SP) + continue; + break; + case PRH_BRK: + brks[posLast] = LINEBREAK_NOBREAK; + break; + } + + lbcCur = lbcNew; + } + + assert(posLast == posCur - 1 && posCur <= len); + /* Break after the last character */ + brks[posLast] = LINEBREAK_MUSTBREAK; + /* When the input contains incomplete sequences */ + while (posCur < len) + { + brks[posCur++] = LINEBREAK_INSIDEACHAR; + } +} + +/** + * Sets the line breaking information for a UTF-8 input string. + * + * @param[in] s input UTF-8 string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, containing + * #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK, + * #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR + */ +void set_linebreaks_utf8( + const utf8_t *s, + size_t len, + const char *lang, + char *brks) +{ + set_linebreaks(s, len, lang, brks, + (get_next_char_t)lb_get_next_char_utf8); +} + +/** + * Sets the line breaking information for a UTF-16 input string. + * + * @param[in] s input UTF-16 string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, containing + * #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK, + * #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR + */ +void set_linebreaks_utf16( + const utf16_t *s, + size_t len, + const char *lang, + char *brks) +{ + set_linebreaks(s, len, lang, brks, + (get_next_char_t)lb_get_next_char_utf16); +} + +/** + * Sets the line breaking information for a UTF-32 input string. + * + * @param[in] s input UTF-32 string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, containing + * #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK, + * #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR + */ +void set_linebreaks_utf32( + const utf32_t *s, + size_t len, + const char *lang, + char *brks) +{ + set_linebreaks(s, len, lang, brks, + (get_next_char_t)lb_get_next_char_utf32); +} + +/** + * Tells whether a line break can occur between two Unicode characters. + * This is a wrapper function to expose a simple interface. Generally + * speaking, it is better to use #set_linebreaks_utf32 instead, since + * complicated cases involving combining marks, spaces, etc. cannot be + * correctly processed. + * + * @param char1 the first Unicode character + * @param char2 the second Unicode character + * @param lang language of the input + * @return one of #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK, + * #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR + */ +int is_line_breakable( + utf32_t char1, + utf32_t char2, + const char* lang) +{ + utf32_t s[2]; + char brks[2]; + s[0] = char1; + s[1] = char2; + set_linebreaks_utf32(s, 2, lang, brks); + return brks[0]; +} diff --git a/libraries/evas/src/static_deps/liblinebreak/linebreak.h b/libraries/evas/src/static_deps/liblinebreak/linebreak.h new file mode 100644 index 0000000..abc1ae9 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/linebreak.h @@ -0,0 +1,87 @@ +/* vim: set tabstop=4 shiftwidth=4: */ + +/* + * Line breaking in a Unicode sequence. Designed to be used in a + * generic text renderer. + * + * Copyright (C) 2008-2010 Wu Yongwei + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute + * it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must + * not claim that you wrote the original software. If you use this + * software in a product, an acknowledgement in the product + * documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source + * distribution. + * + * The main reference is Unicode Standard Annex 14 (UAX #14): + * + * + * When this library was designed, this annex was at Revision 19, for + * Unicode 5.0.0: + * + * + * This library has been updated according to Revision 24, for + * Unicode 5.2.0: + * + * + * The Unicode Terms of Use are available at + * + */ + +/** + * @file linebreak.h + * + * Header file for the line breaking algorithm. + * + * @version 2.0, 2010/01/03 + * @author Wu Yongwei + */ + +#ifndef LINEBREAK_H +#define LINEBREAK_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define LINEBREAK_VERSION 0x0200 /**< Version of the library linebreak */ +extern const int linebreak_version; + +#ifndef LINEBREAK_UTF_TYPES_DEFINED +#define LINEBREAK_UTF_TYPES_DEFINED +typedef unsigned char utf8_t; /**< Type for UTF-8 data points */ +typedef unsigned short utf16_t; /**< Type for UTF-16 data points */ +typedef unsigned int utf32_t; /**< Type for UTF-32 data points */ +#endif + +#define LINEBREAK_MUSTBREAK 0 /**< Break is mandatory */ +#define LINEBREAK_ALLOWBREAK 1 /**< Break is allowed */ +#define LINEBREAK_NOBREAK 2 /**< No break is possible */ +#define LINEBREAK_INSIDEACHAR 3 /**< A UTF-8/16 sequence is unfinished */ + +void init_linebreak(void); +void set_linebreaks_utf8( + const utf8_t *s, size_t len, const char* lang, char *brks); +void set_linebreaks_utf16( + const utf16_t *s, size_t len, const char* lang, char *brks); +void set_linebreaks_utf32( + const utf32_t *s, size_t len, const char* lang, char *brks); +int is_line_breakable(utf32_t char1, utf32_t char2, const char* lang); + +#ifdef __cplusplus +} +#endif + +#endif /* LINEBREAK_H */ diff --git a/libraries/evas/src/static_deps/liblinebreak/linebreakdata.c b/libraries/evas/src/static_deps/liblinebreak/linebreakdata.c new file mode 100644 index 0000000..0021479 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/linebreakdata.c @@ -0,0 +1,1868 @@ +/* The content of this file is generated from: +# LineBreak-6.0.0.txt +# Date: 2010-08-18, 17:25:00 PDT [KW] +*/ + +#include "linebreak.h" +#include "linebreakdef.h" + +/** Default line breaking properties as from the Unicode Web site. */ +struct LineBreakProperties lb_prop_default[] = { + { 0x0000, 0x0008, LBP_CM }, + { 0x0009, 0x0009, LBP_BA }, + { 0x000A, 0x000A, LBP_LF }, + { 0x000B, 0x000C, LBP_BK }, + { 0x000D, 0x000D, LBP_CR }, + { 0x000E, 0x001F, LBP_CM }, + { 0x0020, 0x0020, LBP_SP }, + { 0x0021, 0x0021, LBP_EX }, + { 0x0022, 0x0022, LBP_QU }, + { 0x0023, 0x0023, LBP_AL }, + { 0x0024, 0x0024, LBP_PR }, + { 0x0025, 0x0025, LBP_PO }, + { 0x0026, 0x0026, LBP_AL }, + { 0x0027, 0x0027, LBP_QU }, + { 0x0028, 0x0028, LBP_OP }, + { 0x0029, 0x0029, LBP_CP }, + { 0x002A, 0x002A, LBP_AL }, + { 0x002B, 0x002B, LBP_PR }, + { 0x002C, 0x002C, LBP_IS }, + { 0x002D, 0x002D, LBP_HY }, + { 0x002E, 0x002E, LBP_IS }, + { 0x002F, 0x002F, LBP_SY }, + { 0x0030, 0x0039, LBP_NU }, + { 0x003A, 0x003B, LBP_IS }, + { 0x003C, 0x003E, LBP_AL }, + { 0x003F, 0x003F, LBP_EX }, + { 0x0040, 0x005A, LBP_AL }, + { 0x005B, 0x005B, LBP_OP }, + { 0x005C, 0x005C, LBP_PR }, + { 0x005D, 0x005D, LBP_CP }, + { 0x005E, 0x007A, LBP_AL }, + { 0x007B, 0x007B, LBP_OP }, + { 0x007C, 0x007C, LBP_BA }, + { 0x007D, 0x007D, LBP_CL }, + { 0x007E, 0x007E, LBP_AL }, + { 0x007F, 0x0084, LBP_CM }, + { 0x0085, 0x0085, LBP_NL }, + { 0x0086, 0x009F, LBP_CM }, + { 0x00A0, 0x00A0, LBP_GL }, + { 0x00A1, 0x00A1, LBP_OP }, + { 0x00A2, 0x00A2, LBP_PO }, + { 0x00A3, 0x00A5, LBP_PR }, + { 0x00A6, 0x00A6, LBP_AL }, + { 0x00A7, 0x00A8, LBP_AI }, + { 0x00A9, 0x00A9, LBP_AL }, + { 0x00AA, 0x00AA, LBP_AI }, + { 0x00AB, 0x00AB, LBP_QU }, + { 0x00AC, 0x00AC, LBP_AL }, + { 0x00AD, 0x00AD, LBP_BA }, + { 0x00AE, 0x00AF, LBP_AL }, + { 0x00B0, 0x00B0, LBP_PO }, + { 0x00B1, 0x00B1, LBP_PR }, + { 0x00B2, 0x00B3, LBP_AI }, + { 0x00B4, 0x00B4, LBP_BB }, + { 0x00B5, 0x00B5, LBP_AL }, + { 0x00B6, 0x00BA, LBP_AI }, + { 0x00BB, 0x00BB, LBP_QU }, + { 0x00BC, 0x00BE, LBP_AI }, + { 0x00BF, 0x00BF, LBP_OP }, + { 0x00C0, 0x00D6, LBP_AL }, + { 0x00D7, 0x00D7, LBP_AI }, + { 0x00D8, 0x00F6, LBP_AL }, + { 0x00F7, 0x00F7, LBP_AI }, + { 0x00F8, 0x02C6, LBP_AL }, + { 0x02C7, 0x02C7, LBP_AI }, + { 0x02C8, 0x02C8, LBP_BB }, + { 0x02C9, 0x02CB, LBP_AI }, + { 0x02CC, 0x02CC, LBP_BB }, + { 0x02CD, 0x02CD, LBP_AI }, + { 0x02CE, 0x02CF, LBP_AL }, + { 0x02D0, 0x02D0, LBP_AI }, + { 0x02D1, 0x02D7, LBP_AL }, + { 0x02D8, 0x02DB, LBP_AI }, + { 0x02DC, 0x02DC, LBP_AL }, + { 0x02DD, 0x02DD, LBP_AI }, + { 0x02DE, 0x02DE, LBP_AL }, + { 0x02DF, 0x02DF, LBP_BB }, + { 0x02E0, 0x02FF, LBP_AL }, + { 0x0300, 0x034E, LBP_CM }, + { 0x034F, 0x034F, LBP_GL }, + { 0x0350, 0x035B, LBP_CM }, + { 0x035C, 0x0362, LBP_GL }, + { 0x0363, 0x036F, LBP_CM }, + { 0x0370, 0x037D, LBP_AL }, + { 0x037E, 0x037E, LBP_IS }, + { 0x0384, 0x0482, LBP_AL }, + { 0x0483, 0x0489, LBP_CM }, + { 0x048A, 0x0587, LBP_AL }, + { 0x0589, 0x0589, LBP_IS }, + { 0x058A, 0x058A, LBP_BA }, + { 0x0591, 0x05BD, LBP_CM }, + { 0x05BE, 0x05BE, LBP_BA }, + { 0x05BF, 0x05BF, LBP_CM }, + { 0x05C0, 0x05C0, LBP_AL }, + { 0x05C1, 0x05C2, LBP_CM }, + { 0x05C3, 0x05C3, LBP_AL }, + { 0x05C4, 0x05C5, LBP_CM }, + { 0x05C6, 0x05C6, LBP_EX }, + { 0x05C7, 0x05C7, LBP_CM }, + { 0x05D0, 0x0608, LBP_AL }, + { 0x0609, 0x060B, LBP_PO }, + { 0x060C, 0x060D, LBP_IS }, + { 0x060E, 0x060F, LBP_AL }, + { 0x0610, 0x061A, LBP_CM }, + { 0x061B, 0x061F, LBP_EX }, + { 0x0620, 0x064A, LBP_AL }, + { 0x064B, 0x065F, LBP_CM }, + { 0x0660, 0x0669, LBP_NU }, + { 0x066A, 0x066A, LBP_PO }, + { 0x066B, 0x066C, LBP_NU }, + { 0x066D, 0x066F, LBP_AL }, + { 0x0670, 0x0670, LBP_CM }, + { 0x0671, 0x06D3, LBP_AL }, + { 0x06D4, 0x06D4, LBP_EX }, + { 0x06D5, 0x06D5, LBP_AL }, + { 0x06D6, 0x06DC, LBP_CM }, + { 0x06DD, 0x06DE, LBP_AL }, + { 0x06DF, 0x06E4, LBP_CM }, + { 0x06E5, 0x06E6, LBP_AL }, + { 0x06E7, 0x06E8, LBP_CM }, + { 0x06E9, 0x06E9, LBP_AL }, + { 0x06EA, 0x06ED, LBP_CM }, + { 0x06EE, 0x06EF, LBP_AL }, + { 0x06F0, 0x06F9, LBP_NU }, + { 0x06FA, 0x0710, LBP_AL }, + { 0x0711, 0x0711, LBP_CM }, + { 0x0712, 0x072F, LBP_AL }, + { 0x0730, 0x074A, LBP_CM }, + { 0x074D, 0x07A5, LBP_AL }, + { 0x07A6, 0x07B0, LBP_CM }, + { 0x07B1, 0x07B1, LBP_AL }, + { 0x07C0, 0x07C9, LBP_NU }, + { 0x07CA, 0x07EA, LBP_AL }, + { 0x07EB, 0x07F3, LBP_CM }, + { 0x07F4, 0x07F7, LBP_AL }, + { 0x07F8, 0x07F8, LBP_IS }, + { 0x07F9, 0x07F9, LBP_EX }, + { 0x07FA, 0x0815, LBP_AL }, + { 0x0816, 0x0819, LBP_CM }, + { 0x081A, 0x081A, LBP_AL }, + { 0x081B, 0x0823, LBP_CM }, + { 0x0824, 0x0824, LBP_AL }, + { 0x0825, 0x0827, LBP_CM }, + { 0x0828, 0x0828, LBP_AL }, + { 0x0829, 0x082D, LBP_CM }, + { 0x0830, 0x0858, LBP_AL }, + { 0x0859, 0x085B, LBP_CM }, + { 0x085E, 0x085E, LBP_AL }, + { 0x0900, 0x0903, LBP_CM }, + { 0x0904, 0x0939, LBP_AL }, + { 0x093A, 0x093C, LBP_CM }, + { 0x093D, 0x093D, LBP_AL }, + { 0x093E, 0x094F, LBP_CM }, + { 0x0950, 0x0950, LBP_AL }, + { 0x0951, 0x0957, LBP_CM }, + { 0x0958, 0x0961, LBP_AL }, + { 0x0962, 0x0963, LBP_CM }, + { 0x0964, 0x0965, LBP_BA }, + { 0x0966, 0x096F, LBP_NU }, + { 0x0970, 0x097F, LBP_AL }, + { 0x0981, 0x0983, LBP_CM }, + { 0x0985, 0x09B9, LBP_AL }, + { 0x09BC, 0x09BC, LBP_CM }, + { 0x09BD, 0x09BD, LBP_AL }, + { 0x09BE, 0x09CD, LBP_CM }, + { 0x09CE, 0x09CE, LBP_AL }, + { 0x09D7, 0x09D7, LBP_CM }, + { 0x09DC, 0x09E1, LBP_AL }, + { 0x09E2, 0x09E3, LBP_CM }, + { 0x09E6, 0x09EF, LBP_NU }, + { 0x09F0, 0x09F1, LBP_AL }, + { 0x09F2, 0x09F3, LBP_PO }, + { 0x09F4, 0x09F8, LBP_AL }, + { 0x09F9, 0x09F9, LBP_PO }, + { 0x09FA, 0x09FA, LBP_AL }, + { 0x09FB, 0x09FB, LBP_PR }, + { 0x0A01, 0x0A03, LBP_CM }, + { 0x0A05, 0x0A39, LBP_AL }, + { 0x0A3C, 0x0A51, LBP_CM }, + { 0x0A59, 0x0A5E, LBP_AL }, + { 0x0A66, 0x0A6F, LBP_NU }, + { 0x0A70, 0x0A71, LBP_CM }, + { 0x0A72, 0x0A74, LBP_AL }, + { 0x0A75, 0x0A83, LBP_CM }, + { 0x0A85, 0x0AB9, LBP_AL }, + { 0x0ABC, 0x0ABC, LBP_CM }, + { 0x0ABD, 0x0ABD, LBP_AL }, + { 0x0ABE, 0x0ACD, LBP_CM }, + { 0x0AD0, 0x0AE1, LBP_AL }, + { 0x0AE2, 0x0AE3, LBP_CM }, + { 0x0AE6, 0x0AEF, LBP_NU }, + { 0x0AF1, 0x0AF1, LBP_PR }, + { 0x0B01, 0x0B03, LBP_CM }, + { 0x0B05, 0x0B39, LBP_AL }, + { 0x0B3C, 0x0B3C, LBP_CM }, + { 0x0B3D, 0x0B3D, LBP_AL }, + { 0x0B3E, 0x0B57, LBP_CM }, + { 0x0B5C, 0x0B61, LBP_AL }, + { 0x0B62, 0x0B63, LBP_CM }, + { 0x0B66, 0x0B6F, LBP_NU }, + { 0x0B70, 0x0B77, LBP_AL }, + { 0x0B82, 0x0B82, LBP_CM }, + { 0x0B83, 0x0BB9, LBP_AL }, + { 0x0BBE, 0x0BCD, LBP_CM }, + { 0x0BD0, 0x0BD0, LBP_AL }, + { 0x0BD7, 0x0BD7, LBP_CM }, + { 0x0BE6, 0x0BEF, LBP_NU }, + { 0x0BF0, 0x0BF8, LBP_AL }, + { 0x0BF9, 0x0BF9, LBP_PR }, + { 0x0BFA, 0x0BFA, LBP_AL }, + { 0x0C01, 0x0C03, LBP_CM }, + { 0x0C05, 0x0C3D, LBP_AL }, + { 0x0C3E, 0x0C56, LBP_CM }, + { 0x0C58, 0x0C61, LBP_AL }, + { 0x0C62, 0x0C63, LBP_CM }, + { 0x0C66, 0x0C6F, LBP_NU }, + { 0x0C78, 0x0C7F, LBP_AL }, + { 0x0C82, 0x0C83, LBP_CM }, + { 0x0C85, 0x0CB9, LBP_AL }, + { 0x0CBC, 0x0CBC, LBP_CM }, + { 0x0CBD, 0x0CBD, LBP_AL }, + { 0x0CBE, 0x0CD6, LBP_CM }, + { 0x0CDE, 0x0CE1, LBP_AL }, + { 0x0CE2, 0x0CE3, LBP_CM }, + { 0x0CE6, 0x0CEF, LBP_NU }, + { 0x0CF1, 0x0CF2, LBP_AL }, + { 0x0D02, 0x0D03, LBP_CM }, + { 0x0D05, 0x0D3D, LBP_AL }, + { 0x0D3E, 0x0D4D, LBP_CM }, + { 0x0D4E, 0x0D4E, LBP_AL }, + { 0x0D57, 0x0D57, LBP_CM }, + { 0x0D60, 0x0D61, LBP_AL }, + { 0x0D62, 0x0D63, LBP_CM }, + { 0x0D66, 0x0D6F, LBP_NU }, + { 0x0D70, 0x0D75, LBP_AL }, + { 0x0D79, 0x0D79, LBP_PO }, + { 0x0D7A, 0x0D7F, LBP_AL }, + { 0x0D82, 0x0D83, LBP_CM }, + { 0x0D85, 0x0DC6, LBP_AL }, + { 0x0DCA, 0x0DF3, LBP_CM }, + { 0x0DF4, 0x0DF4, LBP_AL }, + { 0x0E01, 0x0E3A, LBP_SA }, + { 0x0E3F, 0x0E3F, LBP_PR }, + { 0x0E40, 0x0E4E, LBP_SA }, + { 0x0E4F, 0x0E4F, LBP_AL }, + { 0x0E50, 0x0E59, LBP_NU }, + { 0x0E5A, 0x0E5B, LBP_BA }, + { 0x0E81, 0x0ECD, LBP_SA }, + { 0x0ED0, 0x0ED9, LBP_NU }, + { 0x0EDC, 0x0EDD, LBP_SA }, + { 0x0F00, 0x0F00, LBP_AL }, + { 0x0F01, 0x0F04, LBP_BB }, + { 0x0F05, 0x0F05, LBP_AL }, + { 0x0F06, 0x0F07, LBP_BB }, + { 0x0F08, 0x0F08, LBP_GL }, + { 0x0F09, 0x0F0A, LBP_BB }, + { 0x0F0B, 0x0F0B, LBP_BA }, + { 0x0F0C, 0x0F0C, LBP_GL }, + { 0x0F0D, 0x0F11, LBP_EX }, + { 0x0F12, 0x0F12, LBP_GL }, + { 0x0F13, 0x0F13, LBP_AL }, + { 0x0F14, 0x0F14, LBP_EX }, + { 0x0F15, 0x0F17, LBP_AL }, + { 0x0F18, 0x0F19, LBP_CM }, + { 0x0F1A, 0x0F1F, LBP_AL }, + { 0x0F20, 0x0F29, LBP_NU }, + { 0x0F2A, 0x0F33, LBP_AL }, + { 0x0F34, 0x0F34, LBP_BA }, + { 0x0F35, 0x0F35, LBP_CM }, + { 0x0F36, 0x0F36, LBP_AL }, + { 0x0F37, 0x0F37, LBP_CM }, + { 0x0F38, 0x0F38, LBP_AL }, + { 0x0F39, 0x0F39, LBP_CM }, + { 0x0F3A, 0x0F3A, LBP_OP }, + { 0x0F3B, 0x0F3B, LBP_CL }, + { 0x0F3C, 0x0F3C, LBP_OP }, + { 0x0F3D, 0x0F3D, LBP_CL }, + { 0x0F3E, 0x0F3F, LBP_CM }, + { 0x0F40, 0x0F6C, LBP_AL }, + { 0x0F71, 0x0F7E, LBP_CM }, + { 0x0F7F, 0x0F7F, LBP_BA }, + { 0x0F80, 0x0F84, LBP_CM }, + { 0x0F85, 0x0F85, LBP_BA }, + { 0x0F86, 0x0F87, LBP_CM }, + { 0x0F88, 0x0F8C, LBP_AL }, + { 0x0F8D, 0x0FBC, LBP_CM }, + { 0x0FBE, 0x0FBF, LBP_BA }, + { 0x0FC0, 0x0FC5, LBP_AL }, + { 0x0FC6, 0x0FC6, LBP_CM }, + { 0x0FC7, 0x0FCF, LBP_AL }, + { 0x0FD0, 0x0FD1, LBP_BB }, + { 0x0FD2, 0x0FD2, LBP_BA }, + { 0x0FD3, 0x0FD3, LBP_BB }, + { 0x0FD4, 0x0FD8, LBP_AL }, + { 0x0FD9, 0x0FDA, LBP_GL }, + { 0x1000, 0x103F, LBP_SA }, + { 0x1040, 0x1049, LBP_NU }, + { 0x104A, 0x104B, LBP_BA }, + { 0x104C, 0x104F, LBP_AL }, + { 0x1050, 0x108F, LBP_SA }, + { 0x1090, 0x1099, LBP_NU }, + { 0x109A, 0x109F, LBP_SA }, + { 0x10A0, 0x10FC, LBP_AL }, + { 0x1100, 0x115F, LBP_JL }, + { 0x1160, 0x11A7, LBP_JV }, + { 0x11A8, 0x11FF, LBP_JT }, + { 0x1200, 0x135A, LBP_AL }, + { 0x135D, 0x135F, LBP_CM }, + { 0x1360, 0x1360, LBP_AL }, + { 0x1361, 0x1361, LBP_BA }, + { 0x1362, 0x13F4, LBP_AL }, + { 0x1400, 0x1400, LBP_BA }, + { 0x1401, 0x167F, LBP_AL }, + { 0x1680, 0x1680, LBP_BA }, + { 0x1681, 0x169A, LBP_AL }, + { 0x169B, 0x169B, LBP_OP }, + { 0x169C, 0x169C, LBP_CL }, + { 0x16A0, 0x16EA, LBP_AL }, + { 0x16EB, 0x16ED, LBP_BA }, + { 0x16EE, 0x1711, LBP_AL }, + { 0x1712, 0x1714, LBP_CM }, + { 0x1720, 0x1731, LBP_AL }, + { 0x1732, 0x1734, LBP_CM }, + { 0x1735, 0x1736, LBP_BA }, + { 0x1740, 0x1751, LBP_AL }, + { 0x1752, 0x1753, LBP_CM }, + { 0x1760, 0x1770, LBP_AL }, + { 0x1772, 0x1773, LBP_CM }, + { 0x1780, 0x17D3, LBP_SA }, + { 0x17D4, 0x17D5, LBP_BA }, + { 0x17D6, 0x17D6, LBP_NS }, + { 0x17D7, 0x17D7, LBP_SA }, + { 0x17D8, 0x17D8, LBP_BA }, + { 0x17D9, 0x17D9, LBP_AL }, + { 0x17DA, 0x17DA, LBP_BA }, + { 0x17DB, 0x17DB, LBP_PR }, + { 0x17DC, 0x17DD, LBP_SA }, + { 0x17E0, 0x17E9, LBP_NU }, + { 0x17F0, 0x1801, LBP_AL }, + { 0x1802, 0x1803, LBP_EX }, + { 0x1804, 0x1805, LBP_BA }, + { 0x1806, 0x1806, LBP_BB }, + { 0x1807, 0x1807, LBP_AL }, + { 0x1808, 0x1809, LBP_EX }, + { 0x180A, 0x180A, LBP_AL }, + { 0x180B, 0x180D, LBP_CM }, + { 0x180E, 0x180E, LBP_GL }, + { 0x1810, 0x1819, LBP_NU }, + { 0x1820, 0x18A8, LBP_AL }, + { 0x18A9, 0x18A9, LBP_CM }, + { 0x18AA, 0x191C, LBP_AL }, + { 0x1920, 0x193B, LBP_CM }, + { 0x1940, 0x1940, LBP_AL }, + { 0x1944, 0x1945, LBP_EX }, + { 0x1946, 0x194F, LBP_NU }, + { 0x1950, 0x19C9, LBP_SA }, + { 0x19D0, 0x19D9, LBP_NU }, + { 0x19DA, 0x19DF, LBP_SA }, + { 0x19E0, 0x1A16, LBP_AL }, + { 0x1A17, 0x1A1B, LBP_CM }, + { 0x1A1E, 0x1A1F, LBP_AL }, + { 0x1A20, 0x1A7C, LBP_SA }, + { 0x1A7F, 0x1A7F, LBP_CM }, + { 0x1A80, 0x1A99, LBP_NU }, + { 0x1AA0, 0x1AAD, LBP_SA }, + { 0x1B00, 0x1B04, LBP_CM }, + { 0x1B05, 0x1B33, LBP_AL }, + { 0x1B34, 0x1B44, LBP_CM }, + { 0x1B45, 0x1B4B, LBP_AL }, + { 0x1B50, 0x1B59, LBP_NU }, + { 0x1B5A, 0x1B5B, LBP_BA }, + { 0x1B5C, 0x1B5C, LBP_AL }, + { 0x1B5D, 0x1B60, LBP_BA }, + { 0x1B61, 0x1B6A, LBP_AL }, + { 0x1B6B, 0x1B73, LBP_CM }, + { 0x1B74, 0x1B7C, LBP_AL }, + { 0x1B80, 0x1B82, LBP_CM }, + { 0x1B83, 0x1BA0, LBP_AL }, + { 0x1BA1, 0x1BAA, LBP_CM }, + { 0x1BAE, 0x1BAF, LBP_AL }, + { 0x1BB0, 0x1BB9, LBP_NU }, + { 0x1BC0, 0x1BE5, LBP_AL }, + { 0x1BE6, 0x1BF3, LBP_CM }, + { 0x1BFC, 0x1C23, LBP_AL }, + { 0x1C24, 0x1C37, LBP_CM }, + { 0x1C3B, 0x1C3F, LBP_BA }, + { 0x1C40, 0x1C49, LBP_NU }, + { 0x1C4D, 0x1C4F, LBP_AL }, + { 0x1C50, 0x1C59, LBP_NU }, + { 0x1C5A, 0x1C7D, LBP_AL }, + { 0x1C7E, 0x1C7F, LBP_BA }, + { 0x1CD0, 0x1CD2, LBP_CM }, + { 0x1CD3, 0x1CD3, LBP_AL }, + { 0x1CD4, 0x1CE8, LBP_CM }, + { 0x1CE9, 0x1CEC, LBP_AL }, + { 0x1CED, 0x1CED, LBP_CM }, + { 0x1CEE, 0x1CF1, LBP_AL }, + { 0x1CF2, 0x1CF2, LBP_CM }, + { 0x1D00, 0x1DBF, LBP_AL }, + { 0x1DC0, 0x1DFF, LBP_CM }, + { 0x1E00, 0x1FFC, LBP_AL }, + { 0x1FFD, 0x1FFD, LBP_BB }, + { 0x1FFE, 0x1FFE, LBP_AL }, + { 0x2000, 0x2006, LBP_BA }, + { 0x2007, 0x2007, LBP_GL }, + { 0x2008, 0x200A, LBP_BA }, + { 0x200B, 0x200B, LBP_ZW }, + { 0x200C, 0x200F, LBP_CM }, + { 0x2010, 0x2010, LBP_BA }, + { 0x2011, 0x2011, LBP_GL }, + { 0x2012, 0x2013, LBP_BA }, + { 0x2014, 0x2014, LBP_B2 }, + { 0x2015, 0x2016, LBP_AI }, + { 0x2017, 0x2017, LBP_AL }, + { 0x2018, 0x2019, LBP_QU }, + { 0x201A, 0x201A, LBP_OP }, + { 0x201B, 0x201D, LBP_QU }, + { 0x201E, 0x201E, LBP_OP }, + { 0x201F, 0x201F, LBP_QU }, + { 0x2020, 0x2021, LBP_AI }, + { 0x2022, 0x2023, LBP_AL }, + { 0x2024, 0x2026, LBP_IN }, + { 0x2027, 0x2027, LBP_BA }, + { 0x2028, 0x2029, LBP_BK }, + { 0x202A, 0x202E, LBP_CM }, + { 0x202F, 0x202F, LBP_GL }, + { 0x2030, 0x2037, LBP_PO }, + { 0x2038, 0x2038, LBP_AL }, + { 0x2039, 0x203A, LBP_QU }, + { 0x203B, 0x203B, LBP_AI }, + { 0x203C, 0x203D, LBP_NS }, + { 0x203E, 0x2043, LBP_AL }, + { 0x2044, 0x2044, LBP_IS }, + { 0x2045, 0x2045, LBP_OP }, + { 0x2046, 0x2046, LBP_CL }, + { 0x2047, 0x2049, LBP_NS }, + { 0x204A, 0x2055, LBP_AL }, + { 0x2056, 0x2056, LBP_BA }, + { 0x2057, 0x2057, LBP_AL }, + { 0x2058, 0x205B, LBP_BA }, + { 0x205C, 0x205C, LBP_AL }, + { 0x205D, 0x205F, LBP_BA }, + { 0x2060, 0x2060, LBP_WJ }, + { 0x2061, 0x2064, LBP_AL }, + { 0x206A, 0x206F, LBP_CM }, + { 0x2070, 0x2071, LBP_AL }, + { 0x2074, 0x2074, LBP_AI }, + { 0x2075, 0x207C, LBP_AL }, + { 0x207D, 0x207D, LBP_OP }, + { 0x207E, 0x207E, LBP_CL }, + { 0x207F, 0x207F, LBP_AI }, + { 0x2080, 0x2080, LBP_AL }, + { 0x2081, 0x2084, LBP_AI }, + { 0x2085, 0x208C, LBP_AL }, + { 0x208D, 0x208D, LBP_OP }, + { 0x208E, 0x208E, LBP_CL }, + { 0x2090, 0x209C, LBP_AL }, + { 0x20A0, 0x20A6, LBP_PR }, + { 0x20A7, 0x20A7, LBP_PO }, + { 0x20A8, 0x20B5, LBP_PR }, + { 0x20B6, 0x20B6, LBP_PO }, + { 0x20B7, 0x20B9, LBP_PR }, + { 0x20D0, 0x20F0, LBP_CM }, + { 0x2100, 0x2102, LBP_AL }, + { 0x2103, 0x2103, LBP_PO }, + { 0x2104, 0x2104, LBP_AL }, + { 0x2105, 0x2105, LBP_AI }, + { 0x2106, 0x2108, LBP_AL }, + { 0x2109, 0x2109, LBP_PO }, + { 0x210A, 0x2112, LBP_AL }, + { 0x2113, 0x2113, LBP_AI }, + { 0x2114, 0x2115, LBP_AL }, + { 0x2116, 0x2116, LBP_PR }, + { 0x2117, 0x2120, LBP_AL }, + { 0x2121, 0x2122, LBP_AI }, + { 0x2123, 0x212A, LBP_AL }, + { 0x212B, 0x212B, LBP_AI }, + { 0x212C, 0x2153, LBP_AL }, + { 0x2154, 0x2155, LBP_AI }, + { 0x2156, 0x215A, LBP_AL }, + { 0x215B, 0x215B, LBP_AI }, + { 0x215C, 0x215D, LBP_AL }, + { 0x215E, 0x215E, LBP_AI }, + { 0x215F, 0x215F, LBP_AL }, + { 0x2160, 0x216B, LBP_AI }, + { 0x216C, 0x216F, LBP_AL }, + { 0x2170, 0x2179, LBP_AI }, + { 0x217A, 0x2188, LBP_AL }, + { 0x2189, 0x2199, LBP_AI }, + { 0x219A, 0x21D1, LBP_AL }, + { 0x21D2, 0x21D2, LBP_AI }, + { 0x21D3, 0x21D3, LBP_AL }, + { 0x21D4, 0x21D4, LBP_AI }, + { 0x21D5, 0x21FF, LBP_AL }, + { 0x2200, 0x2200, LBP_AI }, + { 0x2201, 0x2201, LBP_AL }, + { 0x2202, 0x2203, LBP_AI }, + { 0x2204, 0x2206, LBP_AL }, + { 0x2207, 0x2208, LBP_AI }, + { 0x2209, 0x220A, LBP_AL }, + { 0x220B, 0x220B, LBP_AI }, + { 0x220C, 0x220E, LBP_AL }, + { 0x220F, 0x220F, LBP_AI }, + { 0x2210, 0x2210, LBP_AL }, + { 0x2211, 0x2211, LBP_AI }, + { 0x2212, 0x2213, LBP_PR }, + { 0x2214, 0x2214, LBP_AL }, + { 0x2215, 0x2215, LBP_AI }, + { 0x2216, 0x2219, LBP_AL }, + { 0x221A, 0x221A, LBP_AI }, + { 0x221B, 0x221C, LBP_AL }, + { 0x221D, 0x2220, LBP_AI }, + { 0x2221, 0x2222, LBP_AL }, + { 0x2223, 0x2223, LBP_AI }, + { 0x2224, 0x2224, LBP_AL }, + { 0x2225, 0x2225, LBP_AI }, + { 0x2226, 0x2226, LBP_AL }, + { 0x2227, 0x222C, LBP_AI }, + { 0x222D, 0x222D, LBP_AL }, + { 0x222E, 0x222E, LBP_AI }, + { 0x222F, 0x2233, LBP_AL }, + { 0x2234, 0x2237, LBP_AI }, + { 0x2238, 0x223B, LBP_AL }, + { 0x223C, 0x223D, LBP_AI }, + { 0x223E, 0x2247, LBP_AL }, + { 0x2248, 0x2248, LBP_AI }, + { 0x2249, 0x224B, LBP_AL }, + { 0x224C, 0x224C, LBP_AI }, + { 0x224D, 0x2251, LBP_AL }, + { 0x2252, 0x2252, LBP_AI }, + { 0x2253, 0x225F, LBP_AL }, + { 0x2260, 0x2261, LBP_AI }, + { 0x2262, 0x2263, LBP_AL }, + { 0x2264, 0x2267, LBP_AI }, + { 0x2268, 0x2269, LBP_AL }, + { 0x226A, 0x226B, LBP_AI }, + { 0x226C, 0x226D, LBP_AL }, + { 0x226E, 0x226F, LBP_AI }, + { 0x2270, 0x2281, LBP_AL }, + { 0x2282, 0x2283, LBP_AI }, + { 0x2284, 0x2285, LBP_AL }, + { 0x2286, 0x2287, LBP_AI }, + { 0x2288, 0x2294, LBP_AL }, + { 0x2295, 0x2295, LBP_AI }, + { 0x2296, 0x2298, LBP_AL }, + { 0x2299, 0x2299, LBP_AI }, + { 0x229A, 0x22A4, LBP_AL }, + { 0x22A5, 0x22A5, LBP_AI }, + { 0x22A6, 0x22BE, LBP_AL }, + { 0x22BF, 0x22BF, LBP_AI }, + { 0x22C0, 0x2311, LBP_AL }, + { 0x2312, 0x2312, LBP_AI }, + { 0x2313, 0x2328, LBP_AL }, + { 0x2329, 0x2329, LBP_OP }, + { 0x232A, 0x232A, LBP_CL }, + { 0x232B, 0x244A, LBP_AL }, + { 0x2460, 0x24FE, LBP_AI }, + { 0x24FF, 0x24FF, LBP_AL }, + { 0x2500, 0x254B, LBP_AI }, + { 0x254C, 0x254F, LBP_AL }, + { 0x2550, 0x2574, LBP_AI }, + { 0x2575, 0x257F, LBP_AL }, + { 0x2580, 0x258F, LBP_AI }, + { 0x2590, 0x2591, LBP_AL }, + { 0x2592, 0x2595, LBP_AI }, + { 0x2596, 0x259F, LBP_AL }, + { 0x25A0, 0x25A1, LBP_AI }, + { 0x25A2, 0x25A2, LBP_AL }, + { 0x25A3, 0x25A9, LBP_AI }, + { 0x25AA, 0x25B1, LBP_AL }, + { 0x25B2, 0x25B3, LBP_AI }, + { 0x25B4, 0x25B5, LBP_AL }, + { 0x25B6, 0x25B7, LBP_AI }, + { 0x25B8, 0x25BB, LBP_AL }, + { 0x25BC, 0x25BD, LBP_AI }, + { 0x25BE, 0x25BF, LBP_AL }, + { 0x25C0, 0x25C1, LBP_AI }, + { 0x25C2, 0x25C5, LBP_AL }, + { 0x25C6, 0x25C8, LBP_AI }, + { 0x25C9, 0x25CA, LBP_AL }, + { 0x25CB, 0x25CB, LBP_AI }, + { 0x25CC, 0x25CD, LBP_AL }, + { 0x25CE, 0x25D1, LBP_AI }, + { 0x25D2, 0x25E1, LBP_AL }, + { 0x25E2, 0x25E5, LBP_AI }, + { 0x25E6, 0x25EE, LBP_AL }, + { 0x25EF, 0x25EF, LBP_AI }, + { 0x25F0, 0x2604, LBP_AL }, + { 0x2605, 0x2606, LBP_AI }, + { 0x2607, 0x2608, LBP_AL }, + { 0x2609, 0x2609, LBP_AI }, + { 0x260A, 0x260D, LBP_AL }, + { 0x260E, 0x260F, LBP_AI }, + { 0x2610, 0x2613, LBP_AL }, + { 0x2614, 0x2617, LBP_AI }, + { 0x2618, 0x261B, LBP_AL }, + { 0x261C, 0x261C, LBP_AI }, + { 0x261D, 0x261D, LBP_AL }, + { 0x261E, 0x261E, LBP_AI }, + { 0x261F, 0x263F, LBP_AL }, + { 0x2640, 0x2640, LBP_AI }, + { 0x2641, 0x2641, LBP_AL }, + { 0x2642, 0x2642, LBP_AI }, + { 0x2643, 0x265F, LBP_AL }, + { 0x2660, 0x2661, LBP_AI }, + { 0x2662, 0x2662, LBP_AL }, + { 0x2663, 0x2665, LBP_AI }, + { 0x2666, 0x2666, LBP_AL }, + { 0x2667, 0x266A, LBP_AI }, + { 0x266B, 0x266B, LBP_AL }, + { 0x266C, 0x266D, LBP_AI }, + { 0x266E, 0x266E, LBP_AL }, + { 0x266F, 0x266F, LBP_AI }, + { 0x2670, 0x269D, LBP_AL }, + { 0x269E, 0x269F, LBP_AI }, + { 0x26A0, 0x26BD, LBP_AL }, + { 0x26BE, 0x26BF, LBP_AI }, + { 0x26C0, 0x26C3, LBP_AL }, + { 0x26C4, 0x26CD, LBP_AI }, + { 0x26CE, 0x26CE, LBP_AL }, + { 0x26CF, 0x26E1, LBP_AI }, + { 0x26E2, 0x26E2, LBP_AL }, + { 0x26E3, 0x26E3, LBP_AI }, + { 0x26E4, 0x26E7, LBP_AL }, + { 0x26E8, 0x26FF, LBP_AI }, + { 0x2701, 0x2756, LBP_AL }, + { 0x2757, 0x2757, LBP_AI }, + { 0x2758, 0x275A, LBP_AL }, + { 0x275B, 0x275E, LBP_QU }, + { 0x275F, 0x2761, LBP_AL }, + { 0x2762, 0x2763, LBP_EX }, + { 0x2764, 0x2767, LBP_AL }, + { 0x2768, 0x2768, LBP_OP }, + { 0x2769, 0x2769, LBP_CL }, + { 0x276A, 0x276A, LBP_OP }, + { 0x276B, 0x276B, LBP_CL }, + { 0x276C, 0x276C, LBP_OP }, + { 0x276D, 0x276D, LBP_CL }, + { 0x276E, 0x276E, LBP_OP }, + { 0x276F, 0x276F, LBP_CL }, + { 0x2770, 0x2770, LBP_OP }, + { 0x2771, 0x2771, LBP_CL }, + { 0x2772, 0x2772, LBP_OP }, + { 0x2773, 0x2773, LBP_CL }, + { 0x2774, 0x2774, LBP_OP }, + { 0x2775, 0x2775, LBP_CL }, + { 0x2776, 0x2793, LBP_AI }, + { 0x2794, 0x27C4, LBP_AL }, + { 0x27C5, 0x27C5, LBP_OP }, + { 0x27C6, 0x27C6, LBP_CL }, + { 0x27C7, 0x27E5, LBP_AL }, + { 0x27E6, 0x27E6, LBP_OP }, + { 0x27E7, 0x27E7, LBP_CL }, + { 0x27E8, 0x27E8, LBP_OP }, + { 0x27E9, 0x27E9, LBP_CL }, + { 0x27EA, 0x27EA, LBP_OP }, + { 0x27EB, 0x27EB, LBP_CL }, + { 0x27EC, 0x27EC, LBP_OP }, + { 0x27ED, 0x27ED, LBP_CL }, + { 0x27EE, 0x27EE, LBP_OP }, + { 0x27EF, 0x27EF, LBP_CL }, + { 0x27F0, 0x2982, LBP_AL }, + { 0x2983, 0x2983, LBP_OP }, + { 0x2984, 0x2984, LBP_CL }, + { 0x2985, 0x2985, LBP_OP }, + { 0x2986, 0x2986, LBP_CL }, + { 0x2987, 0x2987, LBP_OP }, + { 0x2988, 0x2988, LBP_CL }, + { 0x2989, 0x2989, LBP_OP }, + { 0x298A, 0x298A, LBP_CL }, + { 0x298B, 0x298B, LBP_OP }, + { 0x298C, 0x298C, LBP_CL }, + { 0x298D, 0x298D, LBP_OP }, + { 0x298E, 0x298E, LBP_CL }, + { 0x298F, 0x298F, LBP_OP }, + { 0x2990, 0x2990, LBP_CL }, + { 0x2991, 0x2991, LBP_OP }, + { 0x2992, 0x2992, LBP_CL }, + { 0x2993, 0x2993, LBP_OP }, + { 0x2994, 0x2994, LBP_CL }, + { 0x2995, 0x2995, LBP_OP }, + { 0x2996, 0x2996, LBP_CL }, + { 0x2997, 0x2997, LBP_OP }, + { 0x2998, 0x2998, LBP_CL }, + { 0x2999, 0x29D7, LBP_AL }, + { 0x29D8, 0x29D8, LBP_OP }, + { 0x29D9, 0x29D9, LBP_CL }, + { 0x29DA, 0x29DA, LBP_OP }, + { 0x29DB, 0x29DB, LBP_CL }, + { 0x29DC, 0x29FB, LBP_AL }, + { 0x29FC, 0x29FC, LBP_OP }, + { 0x29FD, 0x29FD, LBP_CL }, + { 0x29FE, 0x2B54, LBP_AL }, + { 0x2B55, 0x2B59, LBP_AI }, + { 0x2C00, 0x2CEE, LBP_AL }, + { 0x2CEF, 0x2CF1, LBP_CM }, + { 0x2CF9, 0x2CF9, LBP_EX }, + { 0x2CFA, 0x2CFC, LBP_BA }, + { 0x2CFD, 0x2CFD, LBP_AL }, + { 0x2CFE, 0x2CFE, LBP_EX }, + { 0x2CFF, 0x2CFF, LBP_BA }, + { 0x2D00, 0x2D6F, LBP_AL }, + { 0x2D70, 0x2D70, LBP_BA }, + { 0x2D7F, 0x2D7F, LBP_CM }, + { 0x2D80, 0x2DDE, LBP_AL }, + { 0x2DE0, 0x2DFF, LBP_CM }, + { 0x2E00, 0x2E0D, LBP_QU }, + { 0x2E0E, 0x2E15, LBP_BA }, + { 0x2E16, 0x2E16, LBP_AL }, + { 0x2E17, 0x2E17, LBP_BA }, + { 0x2E18, 0x2E18, LBP_OP }, + { 0x2E19, 0x2E19, LBP_BA }, + { 0x2E1A, 0x2E1B, LBP_AL }, + { 0x2E1C, 0x2E1D, LBP_QU }, + { 0x2E1E, 0x2E1F, LBP_AL }, + { 0x2E20, 0x2E21, LBP_QU }, + { 0x2E22, 0x2E22, LBP_OP }, + { 0x2E23, 0x2E23, LBP_CL }, + { 0x2E24, 0x2E24, LBP_OP }, + { 0x2E25, 0x2E25, LBP_CL }, + { 0x2E26, 0x2E26, LBP_OP }, + { 0x2E27, 0x2E27, LBP_CL }, + { 0x2E28, 0x2E28, LBP_OP }, + { 0x2E29, 0x2E29, LBP_CL }, + { 0x2E2A, 0x2E2D, LBP_BA }, + { 0x2E2E, 0x2E2E, LBP_EX }, + { 0x2E2F, 0x2E2F, LBP_AL }, + { 0x2E30, 0x2E31, LBP_BA }, + { 0x2E80, 0x3000, LBP_ID }, + { 0x3001, 0x3002, LBP_CL }, + { 0x3003, 0x3004, LBP_ID }, + { 0x3005, 0x3005, LBP_NS }, + { 0x3006, 0x3007, LBP_ID }, + { 0x3008, 0x3008, LBP_OP }, + { 0x3009, 0x3009, LBP_CL }, + { 0x300A, 0x300A, LBP_OP }, + { 0x300B, 0x300B, LBP_CL }, + { 0x300C, 0x300C, LBP_OP }, + { 0x300D, 0x300D, LBP_CL }, + { 0x300E, 0x300E, LBP_OP }, + { 0x300F, 0x300F, LBP_CL }, + { 0x3010, 0x3010, LBP_OP }, + { 0x3011, 0x3011, LBP_CL }, + { 0x3012, 0x3013, LBP_ID }, + { 0x3014, 0x3014, LBP_OP }, + { 0x3015, 0x3015, LBP_CL }, + { 0x3016, 0x3016, LBP_OP }, + { 0x3017, 0x3017, LBP_CL }, + { 0x3018, 0x3018, LBP_OP }, + { 0x3019, 0x3019, LBP_CL }, + { 0x301A, 0x301A, LBP_OP }, + { 0x301B, 0x301B, LBP_CL }, + { 0x301C, 0x301C, LBP_NS }, + { 0x301D, 0x301D, LBP_OP }, + { 0x301E, 0x301F, LBP_CL }, + { 0x3020, 0x3029, LBP_ID }, + { 0x302A, 0x302F, LBP_CM }, + { 0x3030, 0x303A, LBP_ID }, + { 0x303B, 0x303C, LBP_NS }, + { 0x303D, 0x303F, LBP_ID }, + { 0x3041, 0x3041, LBP_NS }, + { 0x3042, 0x3042, LBP_ID }, + { 0x3043, 0x3043, LBP_NS }, + { 0x3044, 0x3044, LBP_ID }, + { 0x3045, 0x3045, LBP_NS }, + { 0x3046, 0x3046, LBP_ID }, + { 0x3047, 0x3047, LBP_NS }, + { 0x3048, 0x3048, LBP_ID }, + { 0x3049, 0x3049, LBP_NS }, + { 0x304A, 0x3062, LBP_ID }, + { 0x3063, 0x3063, LBP_NS }, + { 0x3064, 0x3082, LBP_ID }, + { 0x3083, 0x3083, LBP_NS }, + { 0x3084, 0x3084, LBP_ID }, + { 0x3085, 0x3085, LBP_NS }, + { 0x3086, 0x3086, LBP_ID }, + { 0x3087, 0x3087, LBP_NS }, + { 0x3088, 0x308D, LBP_ID }, + { 0x308E, 0x308E, LBP_NS }, + { 0x308F, 0x3094, LBP_ID }, + { 0x3095, 0x3096, LBP_NS }, + { 0x3099, 0x309A, LBP_CM }, + { 0x309B, 0x309E, LBP_NS }, + { 0x309F, 0x309F, LBP_ID }, + { 0x30A0, 0x30A1, LBP_NS }, + { 0x30A2, 0x30A2, LBP_ID }, + { 0x30A3, 0x30A3, LBP_NS }, + { 0x30A4, 0x30A4, LBP_ID }, + { 0x30A5, 0x30A5, LBP_NS }, + { 0x30A6, 0x30A6, LBP_ID }, + { 0x30A7, 0x30A7, LBP_NS }, + { 0x30A8, 0x30A8, LBP_ID }, + { 0x30A9, 0x30A9, LBP_NS }, + { 0x30AA, 0x30C2, LBP_ID }, + { 0x30C3, 0x30C3, LBP_NS }, + { 0x30C4, 0x30E2, LBP_ID }, + { 0x30E3, 0x30E3, LBP_NS }, + { 0x30E4, 0x30E4, LBP_ID }, + { 0x30E5, 0x30E5, LBP_NS }, + { 0x30E6, 0x30E6, LBP_ID }, + { 0x30E7, 0x30E7, LBP_NS }, + { 0x30E8, 0x30ED, LBP_ID }, + { 0x30EE, 0x30EE, LBP_NS }, + { 0x30EF, 0x30F4, LBP_ID }, + { 0x30F5, 0x30F6, LBP_NS }, + { 0x30F7, 0x30FA, LBP_ID }, + { 0x30FB, 0x30FE, LBP_NS }, + { 0x30FF, 0x31E3, LBP_ID }, + { 0x31F0, 0x31FF, LBP_NS }, + { 0x3200, 0x3247, LBP_ID }, + { 0x3248, 0x324F, LBP_AI }, + { 0x3250, 0x4DBF, LBP_ID }, + { 0x4DC0, 0x4DFF, LBP_AL }, + { 0x4E00, 0xA014, LBP_ID }, + { 0xA015, 0xA015, LBP_NS }, + { 0xA016, 0xA4C6, LBP_ID }, + { 0xA4D0, 0xA4FD, LBP_AL }, + { 0xA4FE, 0xA4FF, LBP_BA }, + { 0xA500, 0xA60C, LBP_AL }, + { 0xA60D, 0xA60D, LBP_BA }, + { 0xA60E, 0xA60E, LBP_EX }, + { 0xA60F, 0xA60F, LBP_BA }, + { 0xA610, 0xA61F, LBP_AL }, + { 0xA620, 0xA629, LBP_NU }, + { 0xA62A, 0xA66E, LBP_AL }, + { 0xA66F, 0xA672, LBP_CM }, + { 0xA673, 0xA673, LBP_AL }, + { 0xA67C, 0xA67D, LBP_CM }, + { 0xA67E, 0xA6EF, LBP_AL }, + { 0xA6F0, 0xA6F1, LBP_CM }, + { 0xA6F2, 0xA6F2, LBP_AL }, + { 0xA6F3, 0xA6F7, LBP_BA }, + { 0xA700, 0xA801, LBP_AL }, + { 0xA802, 0xA802, LBP_CM }, + { 0xA803, 0xA805, LBP_AL }, + { 0xA806, 0xA806, LBP_CM }, + { 0xA807, 0xA80A, LBP_AL }, + { 0xA80B, 0xA80B, LBP_CM }, + { 0xA80C, 0xA822, LBP_AL }, + { 0xA823, 0xA827, LBP_CM }, + { 0xA828, 0xA837, LBP_AL }, + { 0xA838, 0xA838, LBP_PO }, + { 0xA839, 0xA873, LBP_AL }, + { 0xA874, 0xA875, LBP_BB }, + { 0xA876, 0xA877, LBP_EX }, + { 0xA880, 0xA881, LBP_CM }, + { 0xA882, 0xA8B3, LBP_AL }, + { 0xA8B4, 0xA8C4, LBP_CM }, + { 0xA8CE, 0xA8CF, LBP_BA }, + { 0xA8D0, 0xA8D9, LBP_NU }, + { 0xA8E0, 0xA8F1, LBP_CM }, + { 0xA8F2, 0xA8FB, LBP_AL }, + { 0xA900, 0xA909, LBP_NU }, + { 0xA90A, 0xA925, LBP_AL }, + { 0xA926, 0xA92D, LBP_CM }, + { 0xA92E, 0xA92F, LBP_BA }, + { 0xA930, 0xA946, LBP_AL }, + { 0xA947, 0xA953, LBP_CM }, + { 0xA95F, 0xA95F, LBP_AL }, + { 0xA960, 0xA97C, LBP_JL }, + { 0xA980, 0xA983, LBP_CM }, + { 0xA984, 0xA9B2, LBP_AL }, + { 0xA9B3, 0xA9C0, LBP_CM }, + { 0xA9C1, 0xA9C6, LBP_AL }, + { 0xA9C7, 0xA9C9, LBP_BA }, + { 0xA9CA, 0xA9CF, LBP_AL }, + { 0xA9D0, 0xA9D9, LBP_NU }, + { 0xA9DE, 0xAA28, LBP_AL }, + { 0xAA29, 0xAA36, LBP_CM }, + { 0xAA40, 0xAA42, LBP_AL }, + { 0xAA43, 0xAA43, LBP_CM }, + { 0xAA44, 0xAA4B, LBP_AL }, + { 0xAA4C, 0xAA4D, LBP_CM }, + { 0xAA50, 0xAA59, LBP_NU }, + { 0xAA5C, 0xAA5C, LBP_AL }, + { 0xAA5D, 0xAA5F, LBP_BA }, + { 0xAA60, 0xAADF, LBP_SA }, + { 0xAB01, 0xABE2, LBP_AL }, + { 0xABE3, 0xABEA, LBP_CM }, + { 0xABEB, 0xABEB, LBP_BA }, + { 0xABEC, 0xABED, LBP_CM }, + { 0xABF0, 0xABF9, LBP_NU }, + { 0xAC00, 0xAC00, LBP_H2 }, + { 0xAC01, 0xAC1B, LBP_H3 }, + { 0xAC1C, 0xAC1C, LBP_H2 }, + { 0xAC1D, 0xAC37, LBP_H3 }, + { 0xAC38, 0xAC38, LBP_H2 }, + { 0xAC39, 0xAC53, LBP_H3 }, + { 0xAC54, 0xAC54, LBP_H2 }, + { 0xAC55, 0xAC6F, LBP_H3 }, + { 0xAC70, 0xAC70, LBP_H2 }, + { 0xAC71, 0xAC8B, LBP_H3 }, + { 0xAC8C, 0xAC8C, LBP_H2 }, + { 0xAC8D, 0xACA7, LBP_H3 }, + { 0xACA8, 0xACA8, LBP_H2 }, + { 0xACA9, 0xACC3, LBP_H3 }, + { 0xACC4, 0xACC4, LBP_H2 }, + { 0xACC5, 0xACDF, LBP_H3 }, + { 0xACE0, 0xACE0, LBP_H2 }, + { 0xACE1, 0xACFB, LBP_H3 }, + { 0xACFC, 0xACFC, LBP_H2 }, + { 0xACFD, 0xAD17, LBP_H3 }, + { 0xAD18, 0xAD18, LBP_H2 }, + { 0xAD19, 0xAD33, LBP_H3 }, + { 0xAD34, 0xAD34, LBP_H2 }, + { 0xAD35, 0xAD4F, LBP_H3 }, + { 0xAD50, 0xAD50, LBP_H2 }, + { 0xAD51, 0xAD6B, LBP_H3 }, + { 0xAD6C, 0xAD6C, LBP_H2 }, + { 0xAD6D, 0xAD87, LBP_H3 }, + { 0xAD88, 0xAD88, LBP_H2 }, + { 0xAD89, 0xADA3, LBP_H3 }, + { 0xADA4, 0xADA4, LBP_H2 }, + { 0xADA5, 0xADBF, LBP_H3 }, + { 0xADC0, 0xADC0, LBP_H2 }, + { 0xADC1, 0xADDB, LBP_H3 }, + { 0xADDC, 0xADDC, LBP_H2 }, + { 0xADDD, 0xADF7, LBP_H3 }, + { 0xADF8, 0xADF8, LBP_H2 }, + { 0xADF9, 0xAE13, LBP_H3 }, + { 0xAE14, 0xAE14, LBP_H2 }, + { 0xAE15, 0xAE2F, LBP_H3 }, + { 0xAE30, 0xAE30, LBP_H2 }, + { 0xAE31, 0xAE4B, LBP_H3 }, + { 0xAE4C, 0xAE4C, LBP_H2 }, + { 0xAE4D, 0xAE67, LBP_H3 }, + { 0xAE68, 0xAE68, LBP_H2 }, + { 0xAE69, 0xAE83, LBP_H3 }, + { 0xAE84, 0xAE84, LBP_H2 }, + { 0xAE85, 0xAE9F, LBP_H3 }, + { 0xAEA0, 0xAEA0, LBP_H2 }, + { 0xAEA1, 0xAEBB, LBP_H3 }, + { 0xAEBC, 0xAEBC, LBP_H2 }, + { 0xAEBD, 0xAED7, LBP_H3 }, + { 0xAED8, 0xAED8, LBP_H2 }, + { 0xAED9, 0xAEF3, LBP_H3 }, + { 0xAEF4, 0xAEF4, LBP_H2 }, + { 0xAEF5, 0xAF0F, LBP_H3 }, + { 0xAF10, 0xAF10, LBP_H2 }, + { 0xAF11, 0xAF2B, LBP_H3 }, + { 0xAF2C, 0xAF2C, LBP_H2 }, + { 0xAF2D, 0xAF47, LBP_H3 }, + { 0xAF48, 0xAF48, LBP_H2 }, + { 0xAF49, 0xAF63, LBP_H3 }, + { 0xAF64, 0xAF64, LBP_H2 }, + { 0xAF65, 0xAF7F, LBP_H3 }, + { 0xAF80, 0xAF80, LBP_H2 }, + { 0xAF81, 0xAF9B, LBP_H3 }, + { 0xAF9C, 0xAF9C, LBP_H2 }, + { 0xAF9D, 0xAFB7, LBP_H3 }, + { 0xAFB8, 0xAFB8, LBP_H2 }, + { 0xAFB9, 0xAFD3, LBP_H3 }, + { 0xAFD4, 0xAFD4, LBP_H2 }, + { 0xAFD5, 0xAFEF, LBP_H3 }, + { 0xAFF0, 0xAFF0, LBP_H2 }, + { 0xAFF1, 0xB00B, LBP_H3 }, + { 0xB00C, 0xB00C, LBP_H2 }, + { 0xB00D, 0xB027, LBP_H3 }, + { 0xB028, 0xB028, LBP_H2 }, + { 0xB029, 0xB043, LBP_H3 }, + { 0xB044, 0xB044, LBP_H2 }, + { 0xB045, 0xB05F, LBP_H3 }, + { 0xB060, 0xB060, LBP_H2 }, + { 0xB061, 0xB07B, LBP_H3 }, + { 0xB07C, 0xB07C, LBP_H2 }, + { 0xB07D, 0xB097, LBP_H3 }, + { 0xB098, 0xB098, LBP_H2 }, + { 0xB099, 0xB0B3, LBP_H3 }, + { 0xB0B4, 0xB0B4, LBP_H2 }, + { 0xB0B5, 0xB0CF, LBP_H3 }, + { 0xB0D0, 0xB0D0, LBP_H2 }, + { 0xB0D1, 0xB0EB, LBP_H3 }, + { 0xB0EC, 0xB0EC, LBP_H2 }, + { 0xB0ED, 0xB107, LBP_H3 }, + { 0xB108, 0xB108, LBP_H2 }, + { 0xB109, 0xB123, LBP_H3 }, + { 0xB124, 0xB124, LBP_H2 }, + { 0xB125, 0xB13F, LBP_H3 }, + { 0xB140, 0xB140, LBP_H2 }, + { 0xB141, 0xB15B, LBP_H3 }, + { 0xB15C, 0xB15C, LBP_H2 }, + { 0xB15D, 0xB177, LBP_H3 }, + { 0xB178, 0xB178, LBP_H2 }, + { 0xB179, 0xB193, LBP_H3 }, + { 0xB194, 0xB194, LBP_H2 }, + { 0xB195, 0xB1AF, LBP_H3 }, + { 0xB1B0, 0xB1B0, LBP_H2 }, + { 0xB1B1, 0xB1CB, LBP_H3 }, + { 0xB1CC, 0xB1CC, LBP_H2 }, + { 0xB1CD, 0xB1E7, LBP_H3 }, + { 0xB1E8, 0xB1E8, LBP_H2 }, + { 0xB1E9, 0xB203, LBP_H3 }, + { 0xB204, 0xB204, LBP_H2 }, + { 0xB205, 0xB21F, LBP_H3 }, + { 0xB220, 0xB220, LBP_H2 }, + { 0xB221, 0xB23B, LBP_H3 }, + { 0xB23C, 0xB23C, LBP_H2 }, + { 0xB23D, 0xB257, LBP_H3 }, + { 0xB258, 0xB258, LBP_H2 }, + { 0xB259, 0xB273, LBP_H3 }, + { 0xB274, 0xB274, LBP_H2 }, + { 0xB275, 0xB28F, LBP_H3 }, + { 0xB290, 0xB290, LBP_H2 }, + { 0xB291, 0xB2AB, LBP_H3 }, + { 0xB2AC, 0xB2AC, LBP_H2 }, + { 0xB2AD, 0xB2C7, LBP_H3 }, + { 0xB2C8, 0xB2C8, LBP_H2 }, + { 0xB2C9, 0xB2E3, LBP_H3 }, + { 0xB2E4, 0xB2E4, LBP_H2 }, + { 0xB2E5, 0xB2FF, LBP_H3 }, + { 0xB300, 0xB300, LBP_H2 }, + { 0xB301, 0xB31B, LBP_H3 }, + { 0xB31C, 0xB31C, LBP_H2 }, + { 0xB31D, 0xB337, LBP_H3 }, + { 0xB338, 0xB338, LBP_H2 }, + { 0xB339, 0xB353, LBP_H3 }, + { 0xB354, 0xB354, LBP_H2 }, + { 0xB355, 0xB36F, LBP_H3 }, + { 0xB370, 0xB370, LBP_H2 }, + { 0xB371, 0xB38B, LBP_H3 }, + { 0xB38C, 0xB38C, LBP_H2 }, + { 0xB38D, 0xB3A7, LBP_H3 }, + { 0xB3A8, 0xB3A8, LBP_H2 }, + { 0xB3A9, 0xB3C3, LBP_H3 }, + { 0xB3C4, 0xB3C4, LBP_H2 }, + { 0xB3C5, 0xB3DF, LBP_H3 }, + { 0xB3E0, 0xB3E0, LBP_H2 }, + { 0xB3E1, 0xB3FB, LBP_H3 }, + { 0xB3FC, 0xB3FC, LBP_H2 }, + { 0xB3FD, 0xB417, LBP_H3 }, + { 0xB418, 0xB418, LBP_H2 }, + { 0xB419, 0xB433, LBP_H3 }, + { 0xB434, 0xB434, LBP_H2 }, + { 0xB435, 0xB44F, LBP_H3 }, + { 0xB450, 0xB450, LBP_H2 }, + { 0xB451, 0xB46B, LBP_H3 }, + { 0xB46C, 0xB46C, LBP_H2 }, + { 0xB46D, 0xB487, LBP_H3 }, + { 0xB488, 0xB488, LBP_H2 }, + { 0xB489, 0xB4A3, LBP_H3 }, + { 0xB4A4, 0xB4A4, LBP_H2 }, + { 0xB4A5, 0xB4BF, LBP_H3 }, + { 0xB4C0, 0xB4C0, LBP_H2 }, + { 0xB4C1, 0xB4DB, LBP_H3 }, + { 0xB4DC, 0xB4DC, LBP_H2 }, + { 0xB4DD, 0xB4F7, LBP_H3 }, + { 0xB4F8, 0xB4F8, LBP_H2 }, + { 0xB4F9, 0xB513, LBP_H3 }, + { 0xB514, 0xB514, LBP_H2 }, + { 0xB515, 0xB52F, LBP_H3 }, + { 0xB530, 0xB530, LBP_H2 }, + { 0xB531, 0xB54B, LBP_H3 }, + { 0xB54C, 0xB54C, LBP_H2 }, + { 0xB54D, 0xB567, LBP_H3 }, + { 0xB568, 0xB568, LBP_H2 }, + { 0xB569, 0xB583, LBP_H3 }, + { 0xB584, 0xB584, LBP_H2 }, + { 0xB585, 0xB59F, LBP_H3 }, + { 0xB5A0, 0xB5A0, LBP_H2 }, + { 0xB5A1, 0xB5BB, LBP_H3 }, + { 0xB5BC, 0xB5BC, LBP_H2 }, + { 0xB5BD, 0xB5D7, LBP_H3 }, + { 0xB5D8, 0xB5D8, LBP_H2 }, + { 0xB5D9, 0xB5F3, LBP_H3 }, + { 0xB5F4, 0xB5F4, LBP_H2 }, + { 0xB5F5, 0xB60F, LBP_H3 }, + { 0xB610, 0xB610, LBP_H2 }, + { 0xB611, 0xB62B, LBP_H3 }, + { 0xB62C, 0xB62C, LBP_H2 }, + { 0xB62D, 0xB647, LBP_H3 }, + { 0xB648, 0xB648, LBP_H2 }, + { 0xB649, 0xB663, LBP_H3 }, + { 0xB664, 0xB664, LBP_H2 }, + { 0xB665, 0xB67F, LBP_H3 }, + { 0xB680, 0xB680, LBP_H2 }, + { 0xB681, 0xB69B, LBP_H3 }, + { 0xB69C, 0xB69C, LBP_H2 }, + { 0xB69D, 0xB6B7, LBP_H3 }, + { 0xB6B8, 0xB6B8, LBP_H2 }, + { 0xB6B9, 0xB6D3, LBP_H3 }, + { 0xB6D4, 0xB6D4, LBP_H2 }, + { 0xB6D5, 0xB6EF, LBP_H3 }, + { 0xB6F0, 0xB6F0, LBP_H2 }, + { 0xB6F1, 0xB70B, LBP_H3 }, + { 0xB70C, 0xB70C, LBP_H2 }, + { 0xB70D, 0xB727, LBP_H3 }, + { 0xB728, 0xB728, LBP_H2 }, + { 0xB729, 0xB743, LBP_H3 }, + { 0xB744, 0xB744, LBP_H2 }, + { 0xB745, 0xB75F, LBP_H3 }, + { 0xB760, 0xB760, LBP_H2 }, + { 0xB761, 0xB77B, LBP_H3 }, + { 0xB77C, 0xB77C, LBP_H2 }, + { 0xB77D, 0xB797, LBP_H3 }, + { 0xB798, 0xB798, LBP_H2 }, + { 0xB799, 0xB7B3, LBP_H3 }, + { 0xB7B4, 0xB7B4, LBP_H2 }, + { 0xB7B5, 0xB7CF, LBP_H3 }, + { 0xB7D0, 0xB7D0, LBP_H2 }, + { 0xB7D1, 0xB7EB, LBP_H3 }, + { 0xB7EC, 0xB7EC, LBP_H2 }, + { 0xB7ED, 0xB807, LBP_H3 }, + { 0xB808, 0xB808, LBP_H2 }, + { 0xB809, 0xB823, LBP_H3 }, + { 0xB824, 0xB824, LBP_H2 }, + { 0xB825, 0xB83F, LBP_H3 }, + { 0xB840, 0xB840, LBP_H2 }, + { 0xB841, 0xB85B, LBP_H3 }, + { 0xB85C, 0xB85C, LBP_H2 }, + { 0xB85D, 0xB877, LBP_H3 }, + { 0xB878, 0xB878, LBP_H2 }, + { 0xB879, 0xB893, LBP_H3 }, + { 0xB894, 0xB894, LBP_H2 }, + { 0xB895, 0xB8AF, LBP_H3 }, + { 0xB8B0, 0xB8B0, LBP_H2 }, + { 0xB8B1, 0xB8CB, LBP_H3 }, + { 0xB8CC, 0xB8CC, LBP_H2 }, + { 0xB8CD, 0xB8E7, LBP_H3 }, + { 0xB8E8, 0xB8E8, LBP_H2 }, + { 0xB8E9, 0xB903, LBP_H3 }, + { 0xB904, 0xB904, LBP_H2 }, + { 0xB905, 0xB91F, LBP_H3 }, + { 0xB920, 0xB920, LBP_H2 }, + { 0xB921, 0xB93B, LBP_H3 }, + { 0xB93C, 0xB93C, LBP_H2 }, + { 0xB93D, 0xB957, LBP_H3 }, + { 0xB958, 0xB958, LBP_H2 }, + { 0xB959, 0xB973, LBP_H3 }, + { 0xB974, 0xB974, LBP_H2 }, + { 0xB975, 0xB98F, LBP_H3 }, + { 0xB990, 0xB990, LBP_H2 }, + { 0xB991, 0xB9AB, LBP_H3 }, + { 0xB9AC, 0xB9AC, LBP_H2 }, + { 0xB9AD, 0xB9C7, LBP_H3 }, + { 0xB9C8, 0xB9C8, LBP_H2 }, + { 0xB9C9, 0xB9E3, LBP_H3 }, + { 0xB9E4, 0xB9E4, LBP_H2 }, + { 0xB9E5, 0xB9FF, LBP_H3 }, + { 0xBA00, 0xBA00, LBP_H2 }, + { 0xBA01, 0xBA1B, LBP_H3 }, + { 0xBA1C, 0xBA1C, LBP_H2 }, + { 0xBA1D, 0xBA37, LBP_H3 }, + { 0xBA38, 0xBA38, LBP_H2 }, + { 0xBA39, 0xBA53, LBP_H3 }, + { 0xBA54, 0xBA54, LBP_H2 }, + { 0xBA55, 0xBA6F, LBP_H3 }, + { 0xBA70, 0xBA70, LBP_H2 }, + { 0xBA71, 0xBA8B, LBP_H3 }, + { 0xBA8C, 0xBA8C, LBP_H2 }, + { 0xBA8D, 0xBAA7, LBP_H3 }, + { 0xBAA8, 0xBAA8, LBP_H2 }, + { 0xBAA9, 0xBAC3, LBP_H3 }, + { 0xBAC4, 0xBAC4, LBP_H2 }, + { 0xBAC5, 0xBADF, LBP_H3 }, + { 0xBAE0, 0xBAE0, LBP_H2 }, + { 0xBAE1, 0xBAFB, LBP_H3 }, + { 0xBAFC, 0xBAFC, LBP_H2 }, + { 0xBAFD, 0xBB17, LBP_H3 }, + { 0xBB18, 0xBB18, LBP_H2 }, + { 0xBB19, 0xBB33, LBP_H3 }, + { 0xBB34, 0xBB34, LBP_H2 }, + { 0xBB35, 0xBB4F, LBP_H3 }, + { 0xBB50, 0xBB50, LBP_H2 }, + { 0xBB51, 0xBB6B, LBP_H3 }, + { 0xBB6C, 0xBB6C, LBP_H2 }, + { 0xBB6D, 0xBB87, LBP_H3 }, + { 0xBB88, 0xBB88, LBP_H2 }, + { 0xBB89, 0xBBA3, LBP_H3 }, + { 0xBBA4, 0xBBA4, LBP_H2 }, + { 0xBBA5, 0xBBBF, LBP_H3 }, + { 0xBBC0, 0xBBC0, LBP_H2 }, + { 0xBBC1, 0xBBDB, LBP_H3 }, + { 0xBBDC, 0xBBDC, LBP_H2 }, + { 0xBBDD, 0xBBF7, LBP_H3 }, + { 0xBBF8, 0xBBF8, LBP_H2 }, + { 0xBBF9, 0xBC13, LBP_H3 }, + { 0xBC14, 0xBC14, LBP_H2 }, + { 0xBC15, 0xBC2F, LBP_H3 }, + { 0xBC30, 0xBC30, LBP_H2 }, + { 0xBC31, 0xBC4B, LBP_H3 }, + { 0xBC4C, 0xBC4C, LBP_H2 }, + { 0xBC4D, 0xBC67, LBP_H3 }, + { 0xBC68, 0xBC68, LBP_H2 }, + { 0xBC69, 0xBC83, LBP_H3 }, + { 0xBC84, 0xBC84, LBP_H2 }, + { 0xBC85, 0xBC9F, LBP_H3 }, + { 0xBCA0, 0xBCA0, LBP_H2 }, + { 0xBCA1, 0xBCBB, LBP_H3 }, + { 0xBCBC, 0xBCBC, LBP_H2 }, + { 0xBCBD, 0xBCD7, LBP_H3 }, + { 0xBCD8, 0xBCD8, LBP_H2 }, + { 0xBCD9, 0xBCF3, LBP_H3 }, + { 0xBCF4, 0xBCF4, LBP_H2 }, + { 0xBCF5, 0xBD0F, LBP_H3 }, + { 0xBD10, 0xBD10, LBP_H2 }, + { 0xBD11, 0xBD2B, LBP_H3 }, + { 0xBD2C, 0xBD2C, LBP_H2 }, + { 0xBD2D, 0xBD47, LBP_H3 }, + { 0xBD48, 0xBD48, LBP_H2 }, + { 0xBD49, 0xBD63, LBP_H3 }, + { 0xBD64, 0xBD64, LBP_H2 }, + { 0xBD65, 0xBD7F, LBP_H3 }, + { 0xBD80, 0xBD80, LBP_H2 }, + { 0xBD81, 0xBD9B, LBP_H3 }, + { 0xBD9C, 0xBD9C, LBP_H2 }, + { 0xBD9D, 0xBDB7, LBP_H3 }, + { 0xBDB8, 0xBDB8, LBP_H2 }, + { 0xBDB9, 0xBDD3, LBP_H3 }, + { 0xBDD4, 0xBDD4, LBP_H2 }, + { 0xBDD5, 0xBDEF, LBP_H3 }, + { 0xBDF0, 0xBDF0, LBP_H2 }, + { 0xBDF1, 0xBE0B, LBP_H3 }, + { 0xBE0C, 0xBE0C, LBP_H2 }, + { 0xBE0D, 0xBE27, LBP_H3 }, + { 0xBE28, 0xBE28, LBP_H2 }, + { 0xBE29, 0xBE43, LBP_H3 }, + { 0xBE44, 0xBE44, LBP_H2 }, + { 0xBE45, 0xBE5F, LBP_H3 }, + { 0xBE60, 0xBE60, LBP_H2 }, + { 0xBE61, 0xBE7B, LBP_H3 }, + { 0xBE7C, 0xBE7C, LBP_H2 }, + { 0xBE7D, 0xBE97, LBP_H3 }, + { 0xBE98, 0xBE98, LBP_H2 }, + { 0xBE99, 0xBEB3, LBP_H3 }, + { 0xBEB4, 0xBEB4, LBP_H2 }, + { 0xBEB5, 0xBECF, LBP_H3 }, + { 0xBED0, 0xBED0, LBP_H2 }, + { 0xBED1, 0xBEEB, LBP_H3 }, + { 0xBEEC, 0xBEEC, LBP_H2 }, + { 0xBEED, 0xBF07, LBP_H3 }, + { 0xBF08, 0xBF08, LBP_H2 }, + { 0xBF09, 0xBF23, LBP_H3 }, + { 0xBF24, 0xBF24, LBP_H2 }, + { 0xBF25, 0xBF3F, LBP_H3 }, + { 0xBF40, 0xBF40, LBP_H2 }, + { 0xBF41, 0xBF5B, LBP_H3 }, + { 0xBF5C, 0xBF5C, LBP_H2 }, + { 0xBF5D, 0xBF77, LBP_H3 }, + { 0xBF78, 0xBF78, LBP_H2 }, + { 0xBF79, 0xBF93, LBP_H3 }, + { 0xBF94, 0xBF94, LBP_H2 }, + { 0xBF95, 0xBFAF, LBP_H3 }, + { 0xBFB0, 0xBFB0, LBP_H2 }, + { 0xBFB1, 0xBFCB, LBP_H3 }, + { 0xBFCC, 0xBFCC, LBP_H2 }, + { 0xBFCD, 0xBFE7, LBP_H3 }, + { 0xBFE8, 0xBFE8, LBP_H2 }, + { 0xBFE9, 0xC003, LBP_H3 }, + { 0xC004, 0xC004, LBP_H2 }, + { 0xC005, 0xC01F, LBP_H3 }, + { 0xC020, 0xC020, LBP_H2 }, + { 0xC021, 0xC03B, LBP_H3 }, + { 0xC03C, 0xC03C, LBP_H2 }, + { 0xC03D, 0xC057, LBP_H3 }, + { 0xC058, 0xC058, LBP_H2 }, + { 0xC059, 0xC073, LBP_H3 }, + { 0xC074, 0xC074, LBP_H2 }, + { 0xC075, 0xC08F, LBP_H3 }, + { 0xC090, 0xC090, LBP_H2 }, + { 0xC091, 0xC0AB, LBP_H3 }, + { 0xC0AC, 0xC0AC, LBP_H2 }, + { 0xC0AD, 0xC0C7, LBP_H3 }, + { 0xC0C8, 0xC0C8, LBP_H2 }, + { 0xC0C9, 0xC0E3, LBP_H3 }, + { 0xC0E4, 0xC0E4, LBP_H2 }, + { 0xC0E5, 0xC0FF, LBP_H3 }, + { 0xC100, 0xC100, LBP_H2 }, + { 0xC101, 0xC11B, LBP_H3 }, + { 0xC11C, 0xC11C, LBP_H2 }, + { 0xC11D, 0xC137, LBP_H3 }, + { 0xC138, 0xC138, LBP_H2 }, + { 0xC139, 0xC153, LBP_H3 }, + { 0xC154, 0xC154, LBP_H2 }, + { 0xC155, 0xC16F, LBP_H3 }, + { 0xC170, 0xC170, LBP_H2 }, + { 0xC171, 0xC18B, LBP_H3 }, + { 0xC18C, 0xC18C, LBP_H2 }, + { 0xC18D, 0xC1A7, LBP_H3 }, + { 0xC1A8, 0xC1A8, LBP_H2 }, + { 0xC1A9, 0xC1C3, LBP_H3 }, + { 0xC1C4, 0xC1C4, LBP_H2 }, + { 0xC1C5, 0xC1DF, LBP_H3 }, + { 0xC1E0, 0xC1E0, LBP_H2 }, + { 0xC1E1, 0xC1FB, LBP_H3 }, + { 0xC1FC, 0xC1FC, LBP_H2 }, + { 0xC1FD, 0xC217, LBP_H3 }, + { 0xC218, 0xC218, LBP_H2 }, + { 0xC219, 0xC233, LBP_H3 }, + { 0xC234, 0xC234, LBP_H2 }, + { 0xC235, 0xC24F, LBP_H3 }, + { 0xC250, 0xC250, LBP_H2 }, + { 0xC251, 0xC26B, LBP_H3 }, + { 0xC26C, 0xC26C, LBP_H2 }, + { 0xC26D, 0xC287, LBP_H3 }, + { 0xC288, 0xC288, LBP_H2 }, + { 0xC289, 0xC2A3, LBP_H3 }, + { 0xC2A4, 0xC2A4, LBP_H2 }, + { 0xC2A5, 0xC2BF, LBP_H3 }, + { 0xC2C0, 0xC2C0, LBP_H2 }, + { 0xC2C1, 0xC2DB, LBP_H3 }, + { 0xC2DC, 0xC2DC, LBP_H2 }, + { 0xC2DD, 0xC2F7, LBP_H3 }, + { 0xC2F8, 0xC2F8, LBP_H2 }, + { 0xC2F9, 0xC313, LBP_H3 }, + { 0xC314, 0xC314, LBP_H2 }, + { 0xC315, 0xC32F, LBP_H3 }, + { 0xC330, 0xC330, LBP_H2 }, + { 0xC331, 0xC34B, LBP_H3 }, + { 0xC34C, 0xC34C, LBP_H2 }, + { 0xC34D, 0xC367, LBP_H3 }, + { 0xC368, 0xC368, LBP_H2 }, + { 0xC369, 0xC383, LBP_H3 }, + { 0xC384, 0xC384, LBP_H2 }, + { 0xC385, 0xC39F, LBP_H3 }, + { 0xC3A0, 0xC3A0, LBP_H2 }, + { 0xC3A1, 0xC3BB, LBP_H3 }, + { 0xC3BC, 0xC3BC, LBP_H2 }, + { 0xC3BD, 0xC3D7, LBP_H3 }, + { 0xC3D8, 0xC3D8, LBP_H2 }, + { 0xC3D9, 0xC3F3, LBP_H3 }, + { 0xC3F4, 0xC3F4, LBP_H2 }, + { 0xC3F5, 0xC40F, LBP_H3 }, + { 0xC410, 0xC410, LBP_H2 }, + { 0xC411, 0xC42B, LBP_H3 }, + { 0xC42C, 0xC42C, LBP_H2 }, + { 0xC42D, 0xC447, LBP_H3 }, + { 0xC448, 0xC448, LBP_H2 }, + { 0xC449, 0xC463, LBP_H3 }, + { 0xC464, 0xC464, LBP_H2 }, + { 0xC465, 0xC47F, LBP_H3 }, + { 0xC480, 0xC480, LBP_H2 }, + { 0xC481, 0xC49B, LBP_H3 }, + { 0xC49C, 0xC49C, LBP_H2 }, + { 0xC49D, 0xC4B7, LBP_H3 }, + { 0xC4B8, 0xC4B8, LBP_H2 }, + { 0xC4B9, 0xC4D3, LBP_H3 }, + { 0xC4D4, 0xC4D4, LBP_H2 }, + { 0xC4D5, 0xC4EF, LBP_H3 }, + { 0xC4F0, 0xC4F0, LBP_H2 }, + { 0xC4F1, 0xC50B, LBP_H3 }, + { 0xC50C, 0xC50C, LBP_H2 }, + { 0xC50D, 0xC527, LBP_H3 }, + { 0xC528, 0xC528, LBP_H2 }, + { 0xC529, 0xC543, LBP_H3 }, + { 0xC544, 0xC544, LBP_H2 }, + { 0xC545, 0xC55F, LBP_H3 }, + { 0xC560, 0xC560, LBP_H2 }, + { 0xC561, 0xC57B, LBP_H3 }, + { 0xC57C, 0xC57C, LBP_H2 }, + { 0xC57D, 0xC597, LBP_H3 }, + { 0xC598, 0xC598, LBP_H2 }, + { 0xC599, 0xC5B3, LBP_H3 }, + { 0xC5B4, 0xC5B4, LBP_H2 }, + { 0xC5B5, 0xC5CF, LBP_H3 }, + { 0xC5D0, 0xC5D0, LBP_H2 }, + { 0xC5D1, 0xC5EB, LBP_H3 }, + { 0xC5EC, 0xC5EC, LBP_H2 }, + { 0xC5ED, 0xC607, LBP_H3 }, + { 0xC608, 0xC608, LBP_H2 }, + { 0xC609, 0xC623, LBP_H3 }, + { 0xC624, 0xC624, LBP_H2 }, + { 0xC625, 0xC63F, LBP_H3 }, + { 0xC640, 0xC640, LBP_H2 }, + { 0xC641, 0xC65B, LBP_H3 }, + { 0xC65C, 0xC65C, LBP_H2 }, + { 0xC65D, 0xC677, LBP_H3 }, + { 0xC678, 0xC678, LBP_H2 }, + { 0xC679, 0xC693, LBP_H3 }, + { 0xC694, 0xC694, LBP_H2 }, + { 0xC695, 0xC6AF, LBP_H3 }, + { 0xC6B0, 0xC6B0, LBP_H2 }, + { 0xC6B1, 0xC6CB, LBP_H3 }, + { 0xC6CC, 0xC6CC, LBP_H2 }, + { 0xC6CD, 0xC6E7, LBP_H3 }, + { 0xC6E8, 0xC6E8, LBP_H2 }, + { 0xC6E9, 0xC703, LBP_H3 }, + { 0xC704, 0xC704, LBP_H2 }, + { 0xC705, 0xC71F, LBP_H3 }, + { 0xC720, 0xC720, LBP_H2 }, + { 0xC721, 0xC73B, LBP_H3 }, + { 0xC73C, 0xC73C, LBP_H2 }, + { 0xC73D, 0xC757, LBP_H3 }, + { 0xC758, 0xC758, LBP_H2 }, + { 0xC759, 0xC773, LBP_H3 }, + { 0xC774, 0xC774, LBP_H2 }, + { 0xC775, 0xC78F, LBP_H3 }, + { 0xC790, 0xC790, LBP_H2 }, + { 0xC791, 0xC7AB, LBP_H3 }, + { 0xC7AC, 0xC7AC, LBP_H2 }, + { 0xC7AD, 0xC7C7, LBP_H3 }, + { 0xC7C8, 0xC7C8, LBP_H2 }, + { 0xC7C9, 0xC7E3, LBP_H3 }, + { 0xC7E4, 0xC7E4, LBP_H2 }, + { 0xC7E5, 0xC7FF, LBP_H3 }, + { 0xC800, 0xC800, LBP_H2 }, + { 0xC801, 0xC81B, LBP_H3 }, + { 0xC81C, 0xC81C, LBP_H2 }, + { 0xC81D, 0xC837, LBP_H3 }, + { 0xC838, 0xC838, LBP_H2 }, + { 0xC839, 0xC853, LBP_H3 }, + { 0xC854, 0xC854, LBP_H2 }, + { 0xC855, 0xC86F, LBP_H3 }, + { 0xC870, 0xC870, LBP_H2 }, + { 0xC871, 0xC88B, LBP_H3 }, + { 0xC88C, 0xC88C, LBP_H2 }, + { 0xC88D, 0xC8A7, LBP_H3 }, + { 0xC8A8, 0xC8A8, LBP_H2 }, + { 0xC8A9, 0xC8C3, LBP_H3 }, + { 0xC8C4, 0xC8C4, LBP_H2 }, + { 0xC8C5, 0xC8DF, LBP_H3 }, + { 0xC8E0, 0xC8E0, LBP_H2 }, + { 0xC8E1, 0xC8FB, LBP_H3 }, + { 0xC8FC, 0xC8FC, LBP_H2 }, + { 0xC8FD, 0xC917, LBP_H3 }, + { 0xC918, 0xC918, LBP_H2 }, + { 0xC919, 0xC933, LBP_H3 }, + { 0xC934, 0xC934, LBP_H2 }, + { 0xC935, 0xC94F, LBP_H3 }, + { 0xC950, 0xC950, LBP_H2 }, + { 0xC951, 0xC96B, LBP_H3 }, + { 0xC96C, 0xC96C, LBP_H2 }, + { 0xC96D, 0xC987, LBP_H3 }, + { 0xC988, 0xC988, LBP_H2 }, + { 0xC989, 0xC9A3, LBP_H3 }, + { 0xC9A4, 0xC9A4, LBP_H2 }, + { 0xC9A5, 0xC9BF, LBP_H3 }, + { 0xC9C0, 0xC9C0, LBP_H2 }, + { 0xC9C1, 0xC9DB, LBP_H3 }, + { 0xC9DC, 0xC9DC, LBP_H2 }, + { 0xC9DD, 0xC9F7, LBP_H3 }, + { 0xC9F8, 0xC9F8, LBP_H2 }, + { 0xC9F9, 0xCA13, LBP_H3 }, + { 0xCA14, 0xCA14, LBP_H2 }, + { 0xCA15, 0xCA2F, LBP_H3 }, + { 0xCA30, 0xCA30, LBP_H2 }, + { 0xCA31, 0xCA4B, LBP_H3 }, + { 0xCA4C, 0xCA4C, LBP_H2 }, + { 0xCA4D, 0xCA67, LBP_H3 }, + { 0xCA68, 0xCA68, LBP_H2 }, + { 0xCA69, 0xCA83, LBP_H3 }, + { 0xCA84, 0xCA84, LBP_H2 }, + { 0xCA85, 0xCA9F, LBP_H3 }, + { 0xCAA0, 0xCAA0, LBP_H2 }, + { 0xCAA1, 0xCABB, LBP_H3 }, + { 0xCABC, 0xCABC, LBP_H2 }, + { 0xCABD, 0xCAD7, LBP_H3 }, + { 0xCAD8, 0xCAD8, LBP_H2 }, + { 0xCAD9, 0xCAF3, LBP_H3 }, + { 0xCAF4, 0xCAF4, LBP_H2 }, + { 0xCAF5, 0xCB0F, LBP_H3 }, + { 0xCB10, 0xCB10, LBP_H2 }, + { 0xCB11, 0xCB2B, LBP_H3 }, + { 0xCB2C, 0xCB2C, LBP_H2 }, + { 0xCB2D, 0xCB47, LBP_H3 }, + { 0xCB48, 0xCB48, LBP_H2 }, + { 0xCB49, 0xCB63, LBP_H3 }, + { 0xCB64, 0xCB64, LBP_H2 }, + { 0xCB65, 0xCB7F, LBP_H3 }, + { 0xCB80, 0xCB80, LBP_H2 }, + { 0xCB81, 0xCB9B, LBP_H3 }, + { 0xCB9C, 0xCB9C, LBP_H2 }, + { 0xCB9D, 0xCBB7, LBP_H3 }, + { 0xCBB8, 0xCBB8, LBP_H2 }, + { 0xCBB9, 0xCBD3, LBP_H3 }, + { 0xCBD4, 0xCBD4, LBP_H2 }, + { 0xCBD5, 0xCBEF, LBP_H3 }, + { 0xCBF0, 0xCBF0, LBP_H2 }, + { 0xCBF1, 0xCC0B, LBP_H3 }, + { 0xCC0C, 0xCC0C, LBP_H2 }, + { 0xCC0D, 0xCC27, LBP_H3 }, + { 0xCC28, 0xCC28, LBP_H2 }, + { 0xCC29, 0xCC43, LBP_H3 }, + { 0xCC44, 0xCC44, LBP_H2 }, + { 0xCC45, 0xCC5F, LBP_H3 }, + { 0xCC60, 0xCC60, LBP_H2 }, + { 0xCC61, 0xCC7B, LBP_H3 }, + { 0xCC7C, 0xCC7C, LBP_H2 }, + { 0xCC7D, 0xCC97, LBP_H3 }, + { 0xCC98, 0xCC98, LBP_H2 }, + { 0xCC99, 0xCCB3, LBP_H3 }, + { 0xCCB4, 0xCCB4, LBP_H2 }, + { 0xCCB5, 0xCCCF, LBP_H3 }, + { 0xCCD0, 0xCCD0, LBP_H2 }, + { 0xCCD1, 0xCCEB, LBP_H3 }, + { 0xCCEC, 0xCCEC, LBP_H2 }, + { 0xCCED, 0xCD07, LBP_H3 }, + { 0xCD08, 0xCD08, LBP_H2 }, + { 0xCD09, 0xCD23, LBP_H3 }, + { 0xCD24, 0xCD24, LBP_H2 }, + { 0xCD25, 0xCD3F, LBP_H3 }, + { 0xCD40, 0xCD40, LBP_H2 }, + { 0xCD41, 0xCD5B, LBP_H3 }, + { 0xCD5C, 0xCD5C, LBP_H2 }, + { 0xCD5D, 0xCD77, LBP_H3 }, + { 0xCD78, 0xCD78, LBP_H2 }, + { 0xCD79, 0xCD93, LBP_H3 }, + { 0xCD94, 0xCD94, LBP_H2 }, + { 0xCD95, 0xCDAF, LBP_H3 }, + { 0xCDB0, 0xCDB0, LBP_H2 }, + { 0xCDB1, 0xCDCB, LBP_H3 }, + { 0xCDCC, 0xCDCC, LBP_H2 }, + { 0xCDCD, 0xCDE7, LBP_H3 }, + { 0xCDE8, 0xCDE8, LBP_H2 }, + { 0xCDE9, 0xCE03, LBP_H3 }, + { 0xCE04, 0xCE04, LBP_H2 }, + { 0xCE05, 0xCE1F, LBP_H3 }, + { 0xCE20, 0xCE20, LBP_H2 }, + { 0xCE21, 0xCE3B, LBP_H3 }, + { 0xCE3C, 0xCE3C, LBP_H2 }, + { 0xCE3D, 0xCE57, LBP_H3 }, + { 0xCE58, 0xCE58, LBP_H2 }, + { 0xCE59, 0xCE73, LBP_H3 }, + { 0xCE74, 0xCE74, LBP_H2 }, + { 0xCE75, 0xCE8F, LBP_H3 }, + { 0xCE90, 0xCE90, LBP_H2 }, + { 0xCE91, 0xCEAB, LBP_H3 }, + { 0xCEAC, 0xCEAC, LBP_H2 }, + { 0xCEAD, 0xCEC7, LBP_H3 }, + { 0xCEC8, 0xCEC8, LBP_H2 }, + { 0xCEC9, 0xCEE3, LBP_H3 }, + { 0xCEE4, 0xCEE4, LBP_H2 }, + { 0xCEE5, 0xCEFF, LBP_H3 }, + { 0xCF00, 0xCF00, LBP_H2 }, + { 0xCF01, 0xCF1B, LBP_H3 }, + { 0xCF1C, 0xCF1C, LBP_H2 }, + { 0xCF1D, 0xCF37, LBP_H3 }, + { 0xCF38, 0xCF38, LBP_H2 }, + { 0xCF39, 0xCF53, LBP_H3 }, + { 0xCF54, 0xCF54, LBP_H2 }, + { 0xCF55, 0xCF6F, LBP_H3 }, + { 0xCF70, 0xCF70, LBP_H2 }, + { 0xCF71, 0xCF8B, LBP_H3 }, + { 0xCF8C, 0xCF8C, LBP_H2 }, + { 0xCF8D, 0xCFA7, LBP_H3 }, + { 0xCFA8, 0xCFA8, LBP_H2 }, + { 0xCFA9, 0xCFC3, LBP_H3 }, + { 0xCFC4, 0xCFC4, LBP_H2 }, + { 0xCFC5, 0xCFDF, LBP_H3 }, + { 0xCFE0, 0xCFE0, LBP_H2 }, + { 0xCFE1, 0xCFFB, LBP_H3 }, + { 0xCFFC, 0xCFFC, LBP_H2 }, + { 0xCFFD, 0xD017, LBP_H3 }, + { 0xD018, 0xD018, LBP_H2 }, + { 0xD019, 0xD033, LBP_H3 }, + { 0xD034, 0xD034, LBP_H2 }, + { 0xD035, 0xD04F, LBP_H3 }, + { 0xD050, 0xD050, LBP_H2 }, + { 0xD051, 0xD06B, LBP_H3 }, + { 0xD06C, 0xD06C, LBP_H2 }, + { 0xD06D, 0xD087, LBP_H3 }, + { 0xD088, 0xD088, LBP_H2 }, + { 0xD089, 0xD0A3, LBP_H3 }, + { 0xD0A4, 0xD0A4, LBP_H2 }, + { 0xD0A5, 0xD0BF, LBP_H3 }, + { 0xD0C0, 0xD0C0, LBP_H2 }, + { 0xD0C1, 0xD0DB, LBP_H3 }, + { 0xD0DC, 0xD0DC, LBP_H2 }, + { 0xD0DD, 0xD0F7, LBP_H3 }, + { 0xD0F8, 0xD0F8, LBP_H2 }, + { 0xD0F9, 0xD113, LBP_H3 }, + { 0xD114, 0xD114, LBP_H2 }, + { 0xD115, 0xD12F, LBP_H3 }, + { 0xD130, 0xD130, LBP_H2 }, + { 0xD131, 0xD14B, LBP_H3 }, + { 0xD14C, 0xD14C, LBP_H2 }, + { 0xD14D, 0xD167, LBP_H3 }, + { 0xD168, 0xD168, LBP_H2 }, + { 0xD169, 0xD183, LBP_H3 }, + { 0xD184, 0xD184, LBP_H2 }, + { 0xD185, 0xD19F, LBP_H3 }, + { 0xD1A0, 0xD1A0, LBP_H2 }, + { 0xD1A1, 0xD1BB, LBP_H3 }, + { 0xD1BC, 0xD1BC, LBP_H2 }, + { 0xD1BD, 0xD1D7, LBP_H3 }, + { 0xD1D8, 0xD1D8, LBP_H2 }, + { 0xD1D9, 0xD1F3, LBP_H3 }, + { 0xD1F4, 0xD1F4, LBP_H2 }, + { 0xD1F5, 0xD20F, LBP_H3 }, + { 0xD210, 0xD210, LBP_H2 }, + { 0xD211, 0xD22B, LBP_H3 }, + { 0xD22C, 0xD22C, LBP_H2 }, + { 0xD22D, 0xD247, LBP_H3 }, + { 0xD248, 0xD248, LBP_H2 }, + { 0xD249, 0xD263, LBP_H3 }, + { 0xD264, 0xD264, LBP_H2 }, + { 0xD265, 0xD27F, LBP_H3 }, + { 0xD280, 0xD280, LBP_H2 }, + { 0xD281, 0xD29B, LBP_H3 }, + { 0xD29C, 0xD29C, LBP_H2 }, + { 0xD29D, 0xD2B7, LBP_H3 }, + { 0xD2B8, 0xD2B8, LBP_H2 }, + { 0xD2B9, 0xD2D3, LBP_H3 }, + { 0xD2D4, 0xD2D4, LBP_H2 }, + { 0xD2D5, 0xD2EF, LBP_H3 }, + { 0xD2F0, 0xD2F0, LBP_H2 }, + { 0xD2F1, 0xD30B, LBP_H3 }, + { 0xD30C, 0xD30C, LBP_H2 }, + { 0xD30D, 0xD327, LBP_H3 }, + { 0xD328, 0xD328, LBP_H2 }, + { 0xD329, 0xD343, LBP_H3 }, + { 0xD344, 0xD344, LBP_H2 }, + { 0xD345, 0xD35F, LBP_H3 }, + { 0xD360, 0xD360, LBP_H2 }, + { 0xD361, 0xD37B, LBP_H3 }, + { 0xD37C, 0xD37C, LBP_H2 }, + { 0xD37D, 0xD397, LBP_H3 }, + { 0xD398, 0xD398, LBP_H2 }, + { 0xD399, 0xD3B3, LBP_H3 }, + { 0xD3B4, 0xD3B4, LBP_H2 }, + { 0xD3B5, 0xD3CF, LBP_H3 }, + { 0xD3D0, 0xD3D0, LBP_H2 }, + { 0xD3D1, 0xD3EB, LBP_H3 }, + { 0xD3EC, 0xD3EC, LBP_H2 }, + { 0xD3ED, 0xD407, LBP_H3 }, + { 0xD408, 0xD408, LBP_H2 }, + { 0xD409, 0xD423, LBP_H3 }, + { 0xD424, 0xD424, LBP_H2 }, + { 0xD425, 0xD43F, LBP_H3 }, + { 0xD440, 0xD440, LBP_H2 }, + { 0xD441, 0xD45B, LBP_H3 }, + { 0xD45C, 0xD45C, LBP_H2 }, + { 0xD45D, 0xD477, LBP_H3 }, + { 0xD478, 0xD478, LBP_H2 }, + { 0xD479, 0xD493, LBP_H3 }, + { 0xD494, 0xD494, LBP_H2 }, + { 0xD495, 0xD4AF, LBP_H3 }, + { 0xD4B0, 0xD4B0, LBP_H2 }, + { 0xD4B1, 0xD4CB, LBP_H3 }, + { 0xD4CC, 0xD4CC, LBP_H2 }, + { 0xD4CD, 0xD4E7, LBP_H3 }, + { 0xD4E8, 0xD4E8, LBP_H2 }, + { 0xD4E9, 0xD503, LBP_H3 }, + { 0xD504, 0xD504, LBP_H2 }, + { 0xD505, 0xD51F, LBP_H3 }, + { 0xD520, 0xD520, LBP_H2 }, + { 0xD521, 0xD53B, LBP_H3 }, + { 0xD53C, 0xD53C, LBP_H2 }, + { 0xD53D, 0xD557, LBP_H3 }, + { 0xD558, 0xD558, LBP_H2 }, + { 0xD559, 0xD573, LBP_H3 }, + { 0xD574, 0xD574, LBP_H2 }, + { 0xD575, 0xD58F, LBP_H3 }, + { 0xD590, 0xD590, LBP_H2 }, + { 0xD591, 0xD5AB, LBP_H3 }, + { 0xD5AC, 0xD5AC, LBP_H2 }, + { 0xD5AD, 0xD5C7, LBP_H3 }, + { 0xD5C8, 0xD5C8, LBP_H2 }, + { 0xD5C9, 0xD5E3, LBP_H3 }, + { 0xD5E4, 0xD5E4, LBP_H2 }, + { 0xD5E5, 0xD5FF, LBP_H3 }, + { 0xD600, 0xD600, LBP_H2 }, + { 0xD601, 0xD61B, LBP_H3 }, + { 0xD61C, 0xD61C, LBP_H2 }, + { 0xD61D, 0xD637, LBP_H3 }, + { 0xD638, 0xD638, LBP_H2 }, + { 0xD639, 0xD653, LBP_H3 }, + { 0xD654, 0xD654, LBP_H2 }, + { 0xD655, 0xD66F, LBP_H3 }, + { 0xD670, 0xD670, LBP_H2 }, + { 0xD671, 0xD68B, LBP_H3 }, + { 0xD68C, 0xD68C, LBP_H2 }, + { 0xD68D, 0xD6A7, LBP_H3 }, + { 0xD6A8, 0xD6A8, LBP_H2 }, + { 0xD6A9, 0xD6C3, LBP_H3 }, + { 0xD6C4, 0xD6C4, LBP_H2 }, + { 0xD6C5, 0xD6DF, LBP_H3 }, + { 0xD6E0, 0xD6E0, LBP_H2 }, + { 0xD6E1, 0xD6FB, LBP_H3 }, + { 0xD6FC, 0xD6FC, LBP_H2 }, + { 0xD6FD, 0xD717, LBP_H3 }, + { 0xD718, 0xD718, LBP_H2 }, + { 0xD719, 0xD733, LBP_H3 }, + { 0xD734, 0xD734, LBP_H2 }, + { 0xD735, 0xD74F, LBP_H3 }, + { 0xD750, 0xD750, LBP_H2 }, + { 0xD751, 0xD76B, LBP_H3 }, + { 0xD76C, 0xD76C, LBP_H2 }, + { 0xD76D, 0xD787, LBP_H3 }, + { 0xD788, 0xD788, LBP_H2 }, + { 0xD789, 0xD7A3, LBP_H3 }, + { 0xD7B0, 0xD7C6, LBP_JV }, + { 0xD7CB, 0xD7FB, LBP_JT }, + { 0xD800, 0xDFFF, LBP_SG }, + { 0xE000, 0xF8FF, LBP_XX }, + { 0xF900, 0xFAFF, LBP_ID }, + { 0xFB00, 0xFB1D, LBP_AL }, + { 0xFB1E, 0xFB1E, LBP_CM }, + { 0xFB1F, 0xFD3D, LBP_AL }, + { 0xFD3E, 0xFD3E, LBP_OP }, + { 0xFD3F, 0xFD3F, LBP_CL }, + { 0xFD50, 0xFDFB, LBP_AL }, + { 0xFDFC, 0xFDFC, LBP_PO }, + { 0xFDFD, 0xFDFD, LBP_AL }, + { 0xFE00, 0xFE0F, LBP_CM }, + { 0xFE10, 0xFE10, LBP_IS }, + { 0xFE11, 0xFE12, LBP_CL }, + { 0xFE13, 0xFE14, LBP_IS }, + { 0xFE15, 0xFE16, LBP_EX }, + { 0xFE17, 0xFE17, LBP_OP }, + { 0xFE18, 0xFE18, LBP_CL }, + { 0xFE19, 0xFE19, LBP_IN }, + { 0xFE20, 0xFE26, LBP_CM }, + { 0xFE30, 0xFE34, LBP_ID }, + { 0xFE35, 0xFE35, LBP_OP }, + { 0xFE36, 0xFE36, LBP_CL }, + { 0xFE37, 0xFE37, LBP_OP }, + { 0xFE38, 0xFE38, LBP_CL }, + { 0xFE39, 0xFE39, LBP_OP }, + { 0xFE3A, 0xFE3A, LBP_CL }, + { 0xFE3B, 0xFE3B, LBP_OP }, + { 0xFE3C, 0xFE3C, LBP_CL }, + { 0xFE3D, 0xFE3D, LBP_OP }, + { 0xFE3E, 0xFE3E, LBP_CL }, + { 0xFE3F, 0xFE3F, LBP_OP }, + { 0xFE40, 0xFE40, LBP_CL }, + { 0xFE41, 0xFE41, LBP_OP }, + { 0xFE42, 0xFE42, LBP_CL }, + { 0xFE43, 0xFE43, LBP_OP }, + { 0xFE44, 0xFE44, LBP_CL }, + { 0xFE45, 0xFE46, LBP_ID }, + { 0xFE47, 0xFE47, LBP_OP }, + { 0xFE48, 0xFE48, LBP_CL }, + { 0xFE49, 0xFE4F, LBP_ID }, + { 0xFE50, 0xFE50, LBP_CL }, + { 0xFE51, 0xFE51, LBP_ID }, + { 0xFE52, 0xFE52, LBP_CL }, + { 0xFE54, 0xFE55, LBP_NS }, + { 0xFE56, 0xFE57, LBP_EX }, + { 0xFE58, 0xFE58, LBP_ID }, + { 0xFE59, 0xFE59, LBP_OP }, + { 0xFE5A, 0xFE5A, LBP_CL }, + { 0xFE5B, 0xFE5B, LBP_OP }, + { 0xFE5C, 0xFE5C, LBP_CL }, + { 0xFE5D, 0xFE5D, LBP_OP }, + { 0xFE5E, 0xFE5E, LBP_CL }, + { 0xFE5F, 0xFE68, LBP_ID }, + { 0xFE69, 0xFE69, LBP_PR }, + { 0xFE6A, 0xFE6A, LBP_PO }, + { 0xFE6B, 0xFE6B, LBP_ID }, + { 0xFE70, 0xFEFC, LBP_AL }, + { 0xFEFF, 0xFEFF, LBP_WJ }, + { 0xFF01, 0xFF01, LBP_EX }, + { 0xFF02, 0xFF03, LBP_ID }, + { 0xFF04, 0xFF04, LBP_PR }, + { 0xFF05, 0xFF05, LBP_PO }, + { 0xFF06, 0xFF07, LBP_ID }, + { 0xFF08, 0xFF08, LBP_OP }, + { 0xFF09, 0xFF09, LBP_CL }, + { 0xFF0A, 0xFF0B, LBP_ID }, + { 0xFF0C, 0xFF0C, LBP_CL }, + { 0xFF0D, 0xFF0D, LBP_ID }, + { 0xFF0E, 0xFF0E, LBP_CL }, + { 0xFF0F, 0xFF19, LBP_ID }, + { 0xFF1A, 0xFF1B, LBP_NS }, + { 0xFF1C, 0xFF1E, LBP_ID }, + { 0xFF1F, 0xFF1F, LBP_EX }, + { 0xFF20, 0xFF3A, LBP_ID }, + { 0xFF3B, 0xFF3B, LBP_OP }, + { 0xFF3C, 0xFF3C, LBP_ID }, + { 0xFF3D, 0xFF3D, LBP_CL }, + { 0xFF3E, 0xFF5A, LBP_ID }, + { 0xFF5B, 0xFF5B, LBP_OP }, + { 0xFF5C, 0xFF5C, LBP_ID }, + { 0xFF5D, 0xFF5D, LBP_CL }, + { 0xFF5E, 0xFF5E, LBP_ID }, + { 0xFF5F, 0xFF5F, LBP_OP }, + { 0xFF60, 0xFF61, LBP_CL }, + { 0xFF62, 0xFF62, LBP_OP }, + { 0xFF63, 0xFF64, LBP_CL }, + { 0xFF65, 0xFF65, LBP_NS }, + { 0xFF66, 0xFF66, LBP_AL }, + { 0xFF67, 0xFF70, LBP_NS }, + { 0xFF71, 0xFF9D, LBP_AL }, + { 0xFF9E, 0xFF9F, LBP_NS }, + { 0xFFA0, 0xFFDC, LBP_AL }, + { 0xFFE0, 0xFFE0, LBP_PO }, + { 0xFFE1, 0xFFE1, LBP_PR }, + { 0xFFE2, 0xFFE4, LBP_ID }, + { 0xFFE5, 0xFFE6, LBP_PR }, + { 0xFFE8, 0xFFEE, LBP_AL }, + { 0xFFF9, 0xFFFB, LBP_CM }, + { 0xFFFC, 0xFFFC, LBP_CB }, + { 0xFFFD, 0xFFFD, LBP_AI }, + { 0x10000, 0x100FA, LBP_AL }, + { 0x10100, 0x10102, LBP_BA }, + { 0x10107, 0x101FC, LBP_AL }, + { 0x101FD, 0x101FD, LBP_CM }, + { 0x10280, 0x1039D, LBP_AL }, + { 0x1039F, 0x1039F, LBP_BA }, + { 0x103A0, 0x103CF, LBP_AL }, + { 0x103D0, 0x103D0, LBP_BA }, + { 0x103D1, 0x1049D, LBP_AL }, + { 0x104A0, 0x104A9, LBP_NU }, + { 0x10800, 0x10855, LBP_AL }, + { 0x10857, 0x10857, LBP_BA }, + { 0x10858, 0x1091B, LBP_AL }, + { 0x1091F, 0x1091F, LBP_BA }, + { 0x10920, 0x10A00, LBP_AL }, + { 0x10A01, 0x10A0F, LBP_CM }, + { 0x10A10, 0x10A33, LBP_AL }, + { 0x10A38, 0x10A3F, LBP_CM }, + { 0x10A40, 0x10A47, LBP_AL }, + { 0x10A50, 0x10A57, LBP_BA }, + { 0x10A58, 0x10B35, LBP_AL }, + { 0x10B39, 0x10B3F, LBP_BA }, + { 0x10B40, 0x10E7E, LBP_AL }, + { 0x11000, 0x11002, LBP_CM }, + { 0x11003, 0x11037, LBP_AL }, + { 0x11038, 0x11046, LBP_CM }, + { 0x11047, 0x11048, LBP_BA }, + { 0x11049, 0x11065, LBP_AL }, + { 0x11066, 0x1106F, LBP_NU }, + { 0x11080, 0x11082, LBP_CM }, + { 0x11083, 0x110AF, LBP_AL }, + { 0x110B0, 0x110BA, LBP_CM }, + { 0x110BB, 0x110BD, LBP_AL }, + { 0x110BE, 0x110C1, LBP_BA }, + { 0x12000, 0x12462, LBP_AL }, + { 0x12470, 0x12473, LBP_BA }, + { 0x13000, 0x13257, LBP_AL }, + { 0x13258, 0x1325A, LBP_OP }, + { 0x1325B, 0x1325D, LBP_CL }, + { 0x1325E, 0x13281, LBP_AL }, + { 0x13282, 0x13282, LBP_CL }, + { 0x13283, 0x13285, LBP_AL }, + { 0x13286, 0x13286, LBP_OP }, + { 0x13287, 0x13287, LBP_CL }, + { 0x13288, 0x13288, LBP_OP }, + { 0x13289, 0x13289, LBP_CL }, + { 0x1328A, 0x13378, LBP_AL }, + { 0x13379, 0x13379, LBP_OP }, + { 0x1337A, 0x1337B, LBP_CL }, + { 0x1337C, 0x16A38, LBP_AL }, + { 0x1B000, 0x1B001, LBP_ID }, + { 0x1D000, 0x1D164, LBP_AL }, + { 0x1D165, 0x1D169, LBP_CM }, + { 0x1D16A, 0x1D16C, LBP_AL }, + { 0x1D16D, 0x1D182, LBP_CM }, + { 0x1D183, 0x1D184, LBP_AL }, + { 0x1D185, 0x1D18B, LBP_CM }, + { 0x1D18C, 0x1D1A9, LBP_AL }, + { 0x1D1AA, 0x1D1AD, LBP_CM }, + { 0x1D1AE, 0x1D241, LBP_AL }, + { 0x1D242, 0x1D244, LBP_CM }, + { 0x1D245, 0x1D7CB, LBP_AL }, + { 0x1D7CE, 0x1D7FF, LBP_NU }, + { 0x1F000, 0x1F0DF, LBP_AL }, + { 0x1F100, 0x1F12D, LBP_AI }, + { 0x1F12E, 0x1F12E, LBP_AL }, + { 0x1F130, 0x1F19A, LBP_AI }, + { 0x1F1E6, 0x1F1FF, LBP_AL }, + { 0x1F200, 0x1F251, LBP_ID }, + { 0x1F300, 0x1F773, LBP_AL }, + { 0x20000, 0x3FFFD, LBP_ID }, + { 0xE0001, 0xE01EF, LBP_CM }, + { 0xF0000, 0x10FFFD, LBP_XX }, + { 0xFFFFFFFF, 0xFFFFFFFF, LBP_Undefined } +}; diff --git a/libraries/evas/src/static_deps/liblinebreak/linebreakdata1.tmpl b/libraries/evas/src/static_deps/liblinebreak/linebreakdata1.tmpl new file mode 100644 index 0000000..df06125 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/linebreakdata1.tmpl @@ -0,0 +1 @@ +/* The content of this file is generated from: diff --git a/libraries/evas/src/static_deps/liblinebreak/linebreakdata2.tmpl b/libraries/evas/src/static_deps/liblinebreak/linebreakdata2.tmpl new file mode 100644 index 0000000..60d0d37 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/linebreakdata2.tmpl @@ -0,0 +1,7 @@ +*/ + +#include "linebreak.h" +#include "linebreakdef.h" + +/** Default line breaking properties as from the Unicode Web site. */ +struct LineBreakProperties lb_prop_default[] = { diff --git a/libraries/evas/src/static_deps/liblinebreak/linebreakdata3.tmpl b/libraries/evas/src/static_deps/liblinebreak/linebreakdata3.tmpl new file mode 100644 index 0000000..a77017c --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/linebreakdata3.tmpl @@ -0,0 +1,2 @@ + { 0xFFFFFFFF, 0xFFFFFFFF, LBP_Undefined } +}; diff --git a/libraries/evas/src/static_deps/liblinebreak/linebreakdef.c b/libraries/evas/src/static_deps/liblinebreak/linebreakdef.c new file mode 100644 index 0000000..9ddb4d9 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/linebreakdef.c @@ -0,0 +1,139 @@ +/* vim: set tabstop=4 shiftwidth=4: */ + +/* + * Line breaking in a Unicode sequence. Designed to be used in a + * generic text renderer. + * + * Copyright (C) 2008-2010 Wu Yongwei + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute + * it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must + * not claim that you wrote the original software. If you use this + * software in a product, an acknowledgement in the product + * documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source + * distribution. + * + * The main reference is Unicode Standard Annex 14 (UAX #14): + * + * + * When this library was designed, this annex was at Revision 19, for + * Unicode 5.0.0: + * + * + * This library has been updated according to Revision 24, for + * Unicode 5.2.0: + * + * + * The Unicode Terms of Use are available at + * + */ + +/** + * @file linebreakdef.c + * + * Definition of language-specific data. + * + * @version 2.0, 2010/01/03 + * @author Wu Yongwei + */ + +#include "linebreak.h" +#include "linebreakdef.h" + +/** + * English-specifc data over the default Unicode rules. + */ +static struct LineBreakProperties lb_prop_English[] = { + { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ + { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */ + { 0x201D, 0x201D, LBP_CL }, /* Right double quotation mark: closing */ + { 0, 0, LBP_Undefined } +}; + +/** + * German-specifc data over the default Unicode rules. + */ +static struct LineBreakProperties lb_prop_German[] = { + { 0x00AB, 0x00AB, LBP_CL }, /* Left double angle quotation mark: closing */ + { 0x00BB, 0x00BB, LBP_OP }, /* Right double angle quotation mark: opening */ + { 0x2018, 0x2018, LBP_CL }, /* Left single quotation mark: closing */ + { 0x201C, 0x201C, LBP_CL }, /* Left double quotation mark: closing */ + { 0x2039, 0x2039, LBP_CL }, /* Left single angle quotation mark: closing */ + { 0x203A, 0x203A, LBP_OP }, /* Right single angle quotation mark: opening */ + { 0, 0, LBP_Undefined } +}; + +/** + * Spanish-specifc data over the default Unicode rules. + */ +static struct LineBreakProperties lb_prop_Spanish[] = { + { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */ + { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */ + { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ + { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */ + { 0x201D, 0x201D, LBP_CL }, /* Right double quotation mark: closing */ + { 0x2039, 0x2039, LBP_OP }, /* Left single angle quotation mark: opening */ + { 0x203A, 0x203A, LBP_CL }, /* Right single angle quotation mark: closing */ + { 0, 0, LBP_Undefined } +}; + +/** + * French-specifc data over the default Unicode rules. + */ +static struct LineBreakProperties lb_prop_French[] = { + { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */ + { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */ + { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ + { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */ + { 0x201D, 0x201D, LBP_CL }, /* Right double quotation mark: closing */ + { 0x2039, 0x2039, LBP_OP }, /* Left single angle quotation mark: opening */ + { 0x203A, 0x203A, LBP_CL }, /* Right single angle quotation mark: closing */ + { 0, 0, LBP_Undefined } +}; + +/** + * Russian-specifc data over the default Unicode rules. + */ +static struct LineBreakProperties lb_prop_Russian[] = { + { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */ + { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */ + { 0x201C, 0x201C, LBP_CL }, /* Left double quotation mark: closing */ + { 0, 0, LBP_Undefined } +}; + +/** + * Chinese-specifc data over the default Unicode rules. + */ +static struct LineBreakProperties lb_prop_Chinese[] = { + { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ + { 0x2019, 0x2019, LBP_CL }, /* Right single quotation mark: closing */ + { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */ + { 0x201D, 0x201D, LBP_CL }, /* Right double quotation mark: closing */ + { 0, 0, LBP_Undefined } +}; + +/** + * Association data of language-specific line breaking properties with + * language names. This is the definition for the static data in this + * file. If you want more flexibility, or do not need the data here, + * you may want to redefine \e lb_prop_lang_map in your C source file. + */ +struct LineBreakPropertiesLang lb_prop_lang_map[] = { + { "en", 2, lb_prop_English }, + { "de", 2, lb_prop_German }, + { "es", 2, lb_prop_Spanish }, + { "fr", 2, lb_prop_French }, + { "ru", 2, lb_prop_Russian }, + { "zh", 2, lb_prop_Chinese }, + { NULL, 0, NULL } +}; diff --git a/libraries/evas/src/static_deps/liblinebreak/linebreakdef.h b/libraries/evas/src/static_deps/liblinebreak/linebreakdef.h new file mode 100644 index 0000000..bc4eee2 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/linebreakdef.h @@ -0,0 +1,149 @@ +/* vim: set tabstop=4 shiftwidth=4: */ + +/* + * Line breaking in a Unicode sequence. Designed to be used in a + * generic text renderer. + * + * Copyright (C) 2008-2010 Wu Yongwei + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute + * it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must + * not claim that you wrote the original software. If you use this + * software in a product, an acknowledgement in the product + * documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source + * distribution. + * + * The main reference is Unicode Standard Annex 14 (UAX #14): + * + * + * When this library was designed, this annex was at Revision 19, for + * Unicode 5.0.0: + * + * + * This library has been updated according to Revision 24, for + * Unicode 5.2.0: + * + * + * The Unicode Terms of Use are available at + * + */ + +/** + * @file linebreakdef.h + * + * Definitions of internal data structures, declarations of global + * variables, and function prototypes for the line breaking algorithm. + * + * @version 2.0, 2010/01/03 + * @author Wu Yongwei + */ + +/** + * Constant value to mark the end of string. It is not a valid Unicode + * character. + */ +#define EOS 0xFFFF + +/** + * Line break classes. This is a direct mapping of Table 1 of Unicode + * Standard Annex 14, Revision 19. + */ +enum LineBreakClass +{ + /* This is used to signal an error condition. */ + LBP_Undefined, /**< Undefined */ + + /* The following break classes are treated in the pair table. */ + LBP_OP, /**< Opening punctuation */ + LBP_CL, /**< Closing punctuation */ + LBP_CP, /**< Closing parenthesis */ + LBP_QU, /**< Ambiguous quotation */ + LBP_GL, /**< Glue */ + LBP_NS, /**< Non-starters */ + LBP_EX, /**< Exclamation/Interrogation */ + LBP_SY, /**< Symbols allowing break after */ + LBP_IS, /**< Infix separator */ + LBP_PR, /**< Prefix */ + LBP_PO, /**< Postfix */ + LBP_NU, /**< Numeric */ + LBP_AL, /**< Alphabetic */ + LBP_ID, /**< Ideographic */ + LBP_IN, /**< Inseparable characters */ + LBP_HY, /**< Hyphen */ + LBP_BA, /**< Break after */ + LBP_BB, /**< Break before */ + LBP_B2, /**< Break on either side (but not pair) */ + LBP_ZW, /**< Zero-width space */ + LBP_CM, /**< Combining marks */ + LBP_WJ, /**< Word joiner */ + LBP_H2, /**< Hangul LV */ + LBP_H3, /**< Hangul LVT */ + LBP_JL, /**< Hangul L Jamo */ + LBP_JV, /**< Hangul V Jamo */ + LBP_JT, /**< Hangul T Jamo */ + + /* The following break classes are not treated in the pair table */ + LBP_AI, /**< Ambiguous (alphabetic or ideograph) */ + LBP_BK, /**< Break (mandatory) */ + LBP_CB, /**< Contingent break */ + LBP_CR, /**< Carriage return */ + LBP_LF, /**< Line feed */ + LBP_NL, /**< Next line */ + LBP_SA, /**< South-East Asian */ + LBP_SG, /**< Surrogates */ + LBP_SP, /**< Space */ + LBP_XX /**< Unknown */ +}; + +/** + * Struct for entries of line break properties. The array of the + * entries \e must be sorted. + */ +struct LineBreakProperties +{ + utf32_t start; /**< Starting coding point */ + utf32_t end; /**< End coding point */ + enum LineBreakClass prop; /**< The line breaking property */ +}; + +/** + * Struct for association of language-specific line breaking properties + * with language names. + */ +struct LineBreakPropertiesLang +{ + const char *lang; /**< Language name */ + size_t namelen; /**< Length of name to match */ + struct LineBreakProperties *lbp; /**< Pointer to associated data */ +}; + +/** + * Abstract function interface for #lb_get_next_char_utf8, + * #lb_get_next_char_utf16, and #lb_get_next_char_utf32. + */ +typedef utf32_t (*get_next_char_t)(const void *, size_t, size_t *); + +/* Declarations */ +extern struct LineBreakProperties lb_prop_default[]; +extern struct LineBreakPropertiesLang lb_prop_lang_map[]; + +/* Function Prototype */ +utf32_t lb_get_next_char_utf8(const utf8_t *s, size_t len, size_t *ip); +utf32_t lb_get_next_char_utf16(const utf16_t *s, size_t len, size_t *ip); +utf32_t lb_get_next_char_utf32(const utf32_t *s, size_t len, size_t *ip); +void set_linebreaks( + const void *s, + size_t len, + const char *lang, + char *brks, + get_next_char_t get_next_char); diff --git a/libraries/evas/src/tests/Makefile.am b/libraries/evas/src/tests/Makefile.am new file mode 100644 index 0000000..c659106 --- /dev/null +++ b/libraries/evas/src/tests/Makefile.am @@ -0,0 +1,29 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/include \ +-I$(top_builddir)/src/include \ +-I$(top_builddir)/src/lib \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ \ +@CHECK_CFLAGS@ + +if EFL_ENABLE_TESTS + +check_PROGRAMS = evas_suite + +evas_suite_SOURCES = \ +evas_suite.c \ +evas_test_init.c \ +evas_test_textblock.c \ +evas_test_text.c \ +evas_test_callbacks.c \ +evas_tests_helpers.h \ +evas_suite.h + +evas_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ + +endif diff --git a/libraries/evas/src/tests/Makefile.in b/libraries/evas/src/tests/Makefile.in new file mode 100644 index 0000000..c598c3d --- /dev/null +++ b/libraries/evas/src/tests/Makefile.in @@ -0,0 +1,693 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@EFL_ENABLE_TESTS_TRUE@check_PROGRAMS = evas_suite$(EXEEXT) +subdir = src/tests +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__evas_suite_SOURCES_DIST = evas_suite.c evas_test_init.c \ + evas_test_textblock.c evas_test_text.c evas_test_callbacks.c \ + evas_tests_helpers.h evas_suite.h +@EFL_ENABLE_TESTS_TRUE@am_evas_suite_OBJECTS = evas_suite.$(OBJEXT) \ +@EFL_ENABLE_TESTS_TRUE@ evas_test_init.$(OBJEXT) \ +@EFL_ENABLE_TESTS_TRUE@ evas_test_textblock.$(OBJEXT) \ +@EFL_ENABLE_TESTS_TRUE@ evas_test_text.$(OBJEXT) \ +@EFL_ENABLE_TESTS_TRUE@ evas_test_callbacks.$(OBJEXT) +evas_suite_OBJECTS = $(am_evas_suite_OBJECTS) +@EFL_ENABLE_TESTS_TRUE@evas_suite_DEPENDENCIES = \ +@EFL_ENABLE_TESTS_TRUE@ $(top_builddir)/src/lib/libevas.la +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(evas_suite_SOURCES) +DIST_SOURCES = $(am__evas_suite_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/include \ +-I$(top_builddir)/src/include \ +-I$(top_builddir)/src/lib \ +-DPACKAGE_BIN_DIR=\"$(bindir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EINA_CFLAGS@ \ +@CHECK_CFLAGS@ + +@EFL_ENABLE_TESTS_TRUE@evas_suite_SOURCES = \ +@EFL_ENABLE_TESTS_TRUE@evas_suite.c \ +@EFL_ENABLE_TESTS_TRUE@evas_test_init.c \ +@EFL_ENABLE_TESTS_TRUE@evas_test_textblock.c \ +@EFL_ENABLE_TESTS_TRUE@evas_test_text.c \ +@EFL_ENABLE_TESTS_TRUE@evas_test_callbacks.c \ +@EFL_ENABLE_TESTS_TRUE@evas_tests_helpers.h \ +@EFL_ENABLE_TESTS_TRUE@evas_suite.h + +@EFL_ENABLE_TESTS_TRUE@evas_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +evas_suite$(EXEEXT): $(evas_suite_OBJECTS) $(evas_suite_DEPENDENCIES) + @rm -f evas_suite$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(evas_suite_OBJECTS) $(evas_suite_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_suite.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_test_callbacks.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_test_init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_test_text.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_test_textblock.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/tests/evas_suite.c b/libraries/evas/src/tests/evas_suite.c new file mode 100644 index 0000000..55f4123 --- /dev/null +++ b/libraries/evas/src/tests/evas_suite.c @@ -0,0 +1,104 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include + +#include "evas_suite.h" + +typedef struct _Evas_Test_Case Evas_Test_Case; + +struct _Evas_Test_Case +{ + const char *test_case; + void (*build)(TCase *tc); +}; + +static const Evas_Test_Case etc[] = { + { "Evas", evas_test_init }, + { "Object Textblock", evas_test_textblock }, + { "Object Text", evas_test_text }, + { "Callbacks", evas_test_callbacks }, + { NULL, NULL } +}; + +static void +_list_tests(void) +{ + const Evas_Test_Case *itr; + + itr = etc; + fputs("Available Test Cases:\n", stderr); + for (; itr->test_case; itr++) + fprintf(stderr, "\t%s\n", itr->test_case); +} +static Eina_Bool +_use_test(int argc, const char **argv, const char *test_case) +{ + if (argc < 1) + return 1; + + for (; argc > 0; argc--, argv++) + if (strcmp(test_case, *argv) == 0) + return 1; + return 0; +} + +static Suite * +evas_suite_build(int argc, const char **argv) +{ + TCase *tc; + Suite *s; + int i; + + s = suite_create("Evas"); + + for (i = 0; etc[i].test_case; ++i) + { + if (!_use_test(argc, argv, etc[i].test_case)) continue; + tc = tcase_create(etc[i].test_case); + + etc[i].build(tc); + + suite_add_tcase(s, tc); + tcase_set_timeout(tc, 0); + } + + return s; +} + +int +main(int argc, char **argv) +{ + Suite *s; + SRunner *sr; + int i, failed_count; + + for (i = 1; i < argc; i++) + if ((strcmp(argv[i], "-h") == 0) || + (strcmp(argv[i], "--help") == 0)) + { + fprintf(stderr, "Usage:\n\t%s [test_case1 .. [test_caseN]]\n", + argv[0]); + _list_tests(); + return 0; + } + else if ((strcmp(argv[i], "-l") == 0) || + (strcmp(argv[i], "--list") == 0)) + { + _list_tests(); + return 0; + } + + s = evas_suite_build(argc - 1, (const char **)argv + 1); + sr = srunner_create(s); + + srunner_run_all(sr, CK_ENV); + failed_count = srunner_ntests_failed(sr); + srunner_free(sr); + + return (failed_count == 0) ? 0 : 255; +} diff --git a/libraries/evas/src/tests/evas_suite.h b/libraries/evas/src/tests/evas_suite.h new file mode 100644 index 0000000..31d6d18 --- /dev/null +++ b/libraries/evas/src/tests/evas_suite.h @@ -0,0 +1,12 @@ +#ifndef _EVAS_SUITE_H +#define _EVAS_SUITE_H + +#include + +void evas_test_init(TCase *tc); +void evas_test_textblock(TCase *tc); +void evas_test_text(TCase *tc); +void evas_test_callbacks(TCase *tc); + + +#endif /* _EVAS_SUITE_H */ diff --git a/libraries/evas/src/tests/evas_test_callbacks.c b/libraries/evas/src/tests/evas_test_callbacks.c new file mode 100644 index 0000000..675ee1c --- /dev/null +++ b/libraries/evas/src/tests/evas_test_callbacks.c @@ -0,0 +1,135 @@ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include "evas_suite.h" +#include "Evas.h" +#include "evas_tests_helpers.h" + +#define START_CALLBACK_TEST() \ + Evas *evas; \ + Evas_Object *rect; \ + evas = EVAS_TEST_INIT_EVAS(); \ + rect = evas_object_rectangle_add(evas); \ +do \ +{ \ +} \ +while (0) + +#define END_CALLBACK_TEST() \ +do \ +{ \ + evas_object_del(rect); \ + evas_free(evas); \ + evas_shutdown(); \ +} \ +while (0) + +static int counter = 1; + +static void +_obj_event_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + (void) e; + (void) obj; + (void) event_info; + + fail_if(((int) data) != counter); + + counter++; +} + +START_TEST(evas_object_event_callbacks_priority) +{ + START_CALLBACK_TEST(); + counter = 1; + evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, -10, + _obj_event_cb, (void *) 1); + evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, 0, + _obj_event_cb, (void *) 2); + evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, 10, + _obj_event_cb, (void *) 3); + evas_object_move(rect, 2, 2); + + /* Make sure we got through all the callbacks */ + fail_if(counter != 4); + + /* Delete _obj_event_cb 3 times */ + evas_object_event_callback_del(rect, EVAS_CALLBACK_MOVE, _obj_event_cb); + evas_object_event_callback_del(rect, EVAS_CALLBACK_MOVE, _obj_event_cb); + evas_object_event_callback_del(rect, EVAS_CALLBACK_MOVE, _obj_event_cb); + counter = 1; + evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, 0, + _obj_event_cb, (void *) 2); + evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, -10, + _obj_event_cb, (void *) 1); + evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, 10, + _obj_event_cb, (void *) 3); + evas_object_move(rect, 3, 3); + + /* Make sure we got through all the callbacks */ + fail_if(counter != 4); + + END_CALLBACK_TEST(); +} +END_TEST + +static void +_event_cb(void *data, Evas *e, void *event_info) +{ + (void) e; + (void) event_info; + + fail_if(((int) data) != counter); + + counter++; +} + +START_TEST(evas_event_callbacks_priority) +{ + START_CALLBACK_TEST(); + evas_object_focus_set(rect, EINA_FALSE); + counter = 1; + evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + -10, _event_cb, (void *) 1); + evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + 0, _event_cb, (void *) 2); + evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + 10, _event_cb, (void *) 3); + evas_object_focus_set(rect, EINA_TRUE); + + /* Make sure we got through all the callbacks */ + fail_if(counter != 4); + + /* Delete _event_cb 3 times */ + evas_event_callback_del(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + _event_cb); + evas_event_callback_del(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + _event_cb); + evas_event_callback_del(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + _event_cb); + evas_object_focus_set(rect, EINA_FALSE); + counter = 1; + evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + 0, _event_cb, (void *) 2); + evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + -10, _event_cb, (void *) 1); + evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, + 10, _event_cb, (void *) 3); + evas_object_focus_set(rect, EINA_TRUE); + + /* Make sure we got through all the callbacks */ + fail_if(counter != 4); + + END_CALLBACK_TEST(); +} +END_TEST + +void evas_test_callbacks(TCase *tc) +{ + tcase_add_test(tc, evas_object_event_callbacks_priority); + tcase_add_test(tc, evas_event_callbacks_priority); +} diff --git a/libraries/evas/src/tests/evas_test_init.c b/libraries/evas/src/tests/evas_test_init.c new file mode 100644 index 0000000..f4271ec --- /dev/null +++ b/libraries/evas/src/tests/evas_test_init.c @@ -0,0 +1,21 @@ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include "evas_suite.h" +#include "Evas.h" + +START_TEST(evas_simple) +{ + fail_if(evas_init() != 1); /* one init by test suite */ + fail_if(evas_shutdown() != 0); +} +END_TEST + +void evas_test_init(TCase *tc) +{ + tcase_add_test(tc, evas_simple); +} diff --git a/libraries/evas/src/tests/evas_test_text.c b/libraries/evas/src/tests/evas_test_text.c new file mode 100644 index 0000000..f87ee79 --- /dev/null +++ b/libraries/evas/src/tests/evas_test_text.c @@ -0,0 +1,493 @@ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include "evas_suite.h" +#include "Evas.h" +#include "evas_tests_helpers.h" + +#define START_TEXT_TEST() \ + Evas *evas; \ + Evas_Object *to; \ + evas = EVAS_TEST_INIT_EVAS(); \ + evas_font_hinting_set(evas, EVAS_FONT_HINTING_AUTO); \ + to = evas_object_text_add(evas); \ +do \ +{ \ +} \ +while (0) + +#define END_TEXT_TEST() \ +do \ +{ \ + evas_object_del(to); \ + evas_free(evas); \ + evas_shutdown(); \ +} \ +while (0) + +START_TEST(evas_text_simple) +{ + START_TEXT_TEST(); + const char *buf = "Test - בדיקה"; + evas_object_text_text_set(to, buf); + fail_if(strcmp(evas_object_text_text_get(to), buf)); + END_TEXT_TEST(); +} +END_TEST + +/* Various text related geometries */ +START_TEST(evas_text_geometries) +{ + START_TEXT_TEST(); + const char *buf = "Tests"; + const char *font = "Sans"; + Evas_Font_Size size = 14; + Evas_Coord prev; + int i; + Evas_Coord x, y, w, h, px; + + evas_object_text_text_set(to, buf); + + /* All should be 0 without a font set */ + fail_if(evas_object_text_ascent_get(to) != 0); + fail_if(evas_object_text_descent_get(to) != 0); + fail_if(evas_object_text_max_ascent_get(to) != 0); + fail_if(evas_object_text_max_descent_get(to) != 0); + fail_if(evas_object_text_horiz_advance_get(to) != 0); + fail_if(evas_object_text_vert_advance_get(to) != 0); + + evas_object_text_font_set(to, font, size); + + /* Check that they are bigger than 0. */ + fail_if(evas_object_text_ascent_get(to) <= 0); + fail_if(evas_object_text_descent_get(to) <= 0); + fail_if(evas_object_text_max_ascent_get(to) <= 0); + fail_if(evas_object_text_max_descent_get(to) <= 0); + fail_if(evas_object_text_horiz_advance_get(to) <= 0); + fail_if(evas_object_text_vert_advance_get(to) <= 0); + + /* Check that expanding the text does what we expect it */ + evas_object_text_text_set(to, "Test"); + prev = evas_object_text_ascent_get(to); + evas_object_text_text_set(to, "Testing"); + fail_if(evas_object_text_ascent_get(to) != prev); + + evas_object_text_text_set(to, "Test"); + prev = evas_object_text_descent_get(to); + evas_object_text_text_set(to, "Testing"); + fail_if(evas_object_text_descent_get(to) != prev); + + evas_object_text_text_set(to, "Test"); + prev = evas_object_text_max_ascent_get(to); + evas_object_text_text_set(to, "Testing"); + fail_if(evas_object_text_max_ascent_get(to) != prev); + + evas_object_text_text_set(to, "Test"); + prev = evas_object_text_max_descent_get(to); + evas_object_text_text_set(to, "Testing"); + fail_if(evas_object_text_max_descent_get(to) != prev); + + evas_object_text_text_set(to, "Test"); + prev = evas_object_text_horiz_advance_get(to); + evas_object_text_text_set(to, "Testing"); + fail_if(evas_object_text_horiz_advance_get(to) <= prev); + + evas_object_text_text_set(to, "Test"); + prev = evas_object_text_vert_advance_get(to); + evas_object_text_text_set(to, "Testing"); + fail_if(evas_object_text_vert_advance_get(to) != prev); + + /* Go through all the characters, making sure the geometries we get + * are in a monotonically increasing order and that all sizes are + * bigger than 0. */ + evas_object_text_text_set(to, "Testing..."); + x = 0; + px = -100; + for (i = 0 ; i < eina_unicode_utf8_get_len("Testing...") ; i++) + { + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x <= px); + px = x; + /* Get back the coords */ + fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), + y + (h / 2), &x, &y, &w, &h)); + } + + /* Last up to pos */ + Evas_Coord adv; + int pos, prev_pos; + evas_object_text_text_set(to, "Test - 유니코드"); + adv = evas_object_text_horiz_advance_get(to); + pos = prev_pos = 0; + for (x = 0 ; x <= (adv - 1) ; x++) + { + pos = evas_object_text_last_up_to_pos(to, x, 0); + fail_if(pos < prev_pos); + prev_pos = pos; + } + pos = evas_object_text_last_up_to_pos(to, x, 0); + fail_if(pos != -1); + pos = evas_object_text_last_up_to_pos(to, -50, 0); + fail_if(pos != -1); + + END_TEXT_TEST(); +} +END_TEST + +/* Various evas stuff, such as scale */ +START_TEST(evas_text_evas) +{ + Evas_Coord w, h, bw, bh; + START_TEXT_TEST(); + const char *buf = "Test - בדיקה"; + const char *font = "Sans"; + Evas_Font_Size size = 14; + + evas_object_text_font_set(to, font, size); + evas_object_text_text_set(to, buf); + evas_object_geometry_get(to, NULL, NULL, &bw, &bh); + evas_object_scale_set(to, 3.0); + evas_object_geometry_get(to, NULL, NULL, &w, &h); + fail_if((w <= bw) || (h <= bh)); + + evas_object_scale_set(to, 0.5); + evas_object_geometry_get(to, NULL, NULL, &w, &h); + fail_if((w >= bw) || (h >= bh)); + + END_TEXT_TEST(); +} +END_TEST + +/* Tests for functions that are in evas_object_text.c but + * don't really have anything to do with it. */ +START_TEST(evas_text_unrelated) +{ + START_TEXT_TEST(); + const char *buf = "נסיון"; + int pos; + Eina_Unicode value; + /* Actually, they are tested in eina, just doing it for completeness. */ + fail_if(evas_string_char_len_get(buf) != 5); + + pos = 0; + fail_if(2 != evas_string_char_next_get(buf, pos, &value)); + fail_if(value != L'נ'); + + pos = 2; + fail_if(0 != evas_string_char_prev_get(buf, pos, &value)); + fail_if(value != L'ס'); + + END_TEXT_TEST(); +} +END_TEST + +#define _CHECK_SET_GET(x) \ +do \ +{ \ + Evas_Coord r, g, b, a; \ + evas_object_text_##x##_set(to, 100, 150, 125, 12); \ + evas_object_text_##x##_get(to, &r, &g, &b, &a); \ + fail_if((r != 100) || (g != 150) || (b != 125) || (a != 12)); \ + /* Set to the same value */ \ + evas_object_text_##x##_set(to, 100, 150, 125, 12); \ + evas_object_text_##x##_get(to, &r, &g, &b, &a); \ + fail_if((r != 100) || (g != 150) || (b != 125) || (a != 12)); \ +} \ +while (0) + +START_TEST(evas_text_set_get) +{ + START_TEXT_TEST(); + const char *buf = "Test - בדיקה"; + /* Text */ + evas_object_text_text_set(to, buf); + fail_if(strcmp(evas_object_text_text_get(to), buf)); + + /* Colors */ + _CHECK_SET_GET(shadow_color); + _CHECK_SET_GET(glow_color); + _CHECK_SET_GET(glow2_color); + _CHECK_SET_GET(outline_color); + + /* Font and size */ + const char *font = "Sans"; + Evas_Font_Size size = 14; + evas_object_text_font_set(to, font, size); + font = NULL; + size = 0; + evas_object_text_font_get(to, &font, &size); + fail_if(strcmp(font, "Sans")); + fail_if(size != 14); + evas_object_text_font_set(to, font, size); + font = NULL; + size = 0; + evas_object_text_font_get(to, &font, &size); + fail_if(strcmp(font, "Sans")); + fail_if(size != 14); + + font = "NON-EXISTING-FONT"; + size = 14; + evas_object_text_font_set(to, font, size); + font = NULL; + size = 0; + evas_object_text_font_get(to, &font, &size); + fail_if(strcmp(font, "NON-EXISTING-FONT")); + + font = "Serif"; + size = 2; + evas_object_text_font_set(to, font, size); + font = NULL; + size = 0; + evas_object_text_font_get(to, &font, &size); + fail_if(strcmp(font, "Serif")); + fail_if(size != 2); + + evas_object_text_font_source_set(to, "/usr/share/fonts/Sans.ttf"); + font = evas_object_text_font_source_get(to); + fail_if(strcmp(font, "/usr/share/fonts/Sans.ttf")); + evas_object_text_font_source_set(to, "/usr/share/fonts/Sans.ttf"); + font = evas_object_text_font_source_get(to); + fail_if(strcmp(font, "/usr/share/fonts/Sans.ttf")); + + /* BiDi Delimiters */ + evas_object_text_bidi_delimiters_set(to, ",.|"); + fail_if(strcmp(evas_object_text_bidi_delimiters_get(to), ",.|")); + evas_object_text_bidi_delimiters_set(to, ",|"); + fail_if(strcmp(evas_object_text_bidi_delimiters_get(to), ",|")); + evas_object_text_bidi_delimiters_set(to, NULL); + fail_if(evas_object_text_bidi_delimiters_get(to)); + evas_object_text_bidi_delimiters_set(to, ",|"); + fail_if(strcmp(evas_object_text_bidi_delimiters_get(to), ",|")); + + /* Style */ + evas_object_text_text_set(to, ""); + evas_object_text_style_set(to, EVAS_TEXT_STYLE_SHADOW); + fail_if(evas_object_text_style_get(to) != EVAS_TEXT_STYLE_SHADOW); + evas_object_text_style_set(to, EVAS_TEXT_STYLE_OUTLINE); + fail_if(evas_object_text_style_get(to) != EVAS_TEXT_STYLE_OUTLINE); + + /* Rehinting */ + evas_object_text_text_set(to, "Bla"); + evas_font_hinting_set(evas, EVAS_FONT_HINTING_NONE); + evas_font_hinting_set(evas, EVAS_FONT_HINTING_AUTO); + evas_font_hinting_set(evas, EVAS_FONT_HINTING_BYTECODE); + + /* Direction of an empty text should be NEUTRAL */ + evas_object_text_text_set(to, ""); + fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_NEUTRAL); + + END_TEXT_TEST(); +} +END_TEST + +START_TEST(evas_text_style) +{ + Evas_Coord l, r, t, b; + START_TEXT_TEST(); + const char *buf = "Test"; + evas_object_text_text_set(to, buf); + evas_object_text_style_set(to, EVAS_TEXT_STYLE_PLAIN); + evas_object_text_style_pad_get(to, &l, &r, &t, &b); + fail_if((l != 0) || (r != 0) || (t != 0) || (b != 0)); + + evas_object_text_style_set(to, EVAS_TEXT_STYLE_SHADOW); + evas_object_text_style_pad_get(to, &l, &r, &t, &b); + fail_if((l != 0) || (r != 1) || (t != 0) || (b != 1)); + + evas_object_text_style_set(to, EVAS_TEXT_STYLE_OUTLINE); + evas_object_text_style_pad_get(to, &l, &r, &t, &b); + fail_if((l != 1) || (r != 1) || (t != 1) || (b != 1)); + + evas_object_text_style_set(to, EVAS_TEXT_STYLE_SOFT_OUTLINE); + evas_object_text_style_pad_get(to, &l, &r, &t, &b); + fail_if((l != 2) || (r != 2) || (t != 2) || (b != 2)); + + evas_object_text_style_set(to, EVAS_TEXT_STYLE_GLOW); + evas_object_text_style_pad_get(to, &l, &r, &t, &b); + fail_if((l != 2) || (r != 2) || (t != 2) || (b != 2)); + + evas_object_text_style_set(to, EVAS_TEXT_STYLE_OUTLINE_SHADOW); + evas_object_text_style_pad_get(to, &l, &r, &t, &b); + fail_if((l != 1) || (r != 2) || (t != 1) || (b != 2)); + + evas_object_text_style_set(to, EVAS_TEXT_STYLE_FAR_SHADOW); + evas_object_text_style_pad_get(to, &l, &r, &t, &b); + fail_if((l != 1) || (r != 2) || (t != 1) || (b != 2)); + + evas_object_text_style_set(to, EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW); + evas_object_text_style_pad_get(to, &l, &r, &t, &b); + fail_if((l != 1) || (r != 3) || (t != 1) || (b != 3)); + + evas_object_text_style_set(to, EVAS_TEXT_STYLE_SOFT_SHADOW); + evas_object_text_style_pad_get(to, &l, &r, &t, &b); + fail_if((l != 1) || (r != 3) || (t != 1) || (b != 3)); + + evas_object_text_style_set(to, EVAS_TEXT_STYLE_FAR_SOFT_SHADOW); + evas_object_text_style_pad_get(to, &l, &r, &t, &b); + fail_if((l != 0) || (r != 4) || (t != 0) || (b != 4)); + + fail_if(strcmp(evas_object_text_text_get(to), buf)); + END_TEXT_TEST(); +} +END_TEST + +#ifdef HAVE_FRIBIDI +START_TEST(evas_text_bidi) +{ + START_TEXT_TEST(); + const char *buf = "Test - בדיקה"; + int i; + Evas_Coord x, y, w, h, px; + const char *font = "Sans"; + Evas_Font_Size size = 14; + + evas_object_text_font_set(to, font, size); + + evas_object_text_text_set(to, buf); + fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_LTR); + evas_object_text_text_set(to, "בדיקה"); + fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); + + /* With RTL text coords should be monotontically decreasing. */ + evas_object_text_text_set(to, "נסיון..."); + x = 0; + px = 200; + for (i = 0 ; i < eina_unicode_utf8_get_len("נסיון...") ; i++) + { + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x >= px); + px = x; + /* Get back the coords */ + fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), + y + (h / 2), &x, &y, &w, &h)); + } + + /* Bidi text is a bit more complex */ + evas_object_text_text_set(to, "Test - נסיון..."); + x = 0; + px = -100; + for (i = 0 ; i < eina_unicode_utf8_get_len("Test - ") ; i++) + { + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x <= px); + px = x; + /* Get back the coords */ + fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), + y + (h / 2), &x, &y, &w, &h)); + } + + /* First rtl char requires more specific handling */ + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x <= px); + px = x; + fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), + y + (h / 2), &x, &y, &w, &h)); + i++; + for ( ; i < eina_unicode_utf8_get_len("Test - נסיון") ; i++) + { + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x >= px); + px = x; + /* Get back the coords */ + fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), + y + (h / 2), &x, &y, &w, &h)); + } + /* First ltr char requires more specific handling */ + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x <= px); + px = x; + i++; + for ( ; i < eina_unicode_utf8_get_len("Test - נסיון...") ; i++) + { + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x <= px); + px = x; + /* Get back the coords */ + fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), + y + (h / 2), &x, &y, &w, &h)); + } + + /* And with an rtl text */ + evas_object_text_text_set(to, "נסיון - test..."); + x = 0; + px = 100; + for (i = 0 ; i < eina_unicode_utf8_get_len("נסיון - ") ; i++) + { + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x >= px); + px = x; + /* Get back the coords */ + fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), + y + (h / 2), &x, &y, &w, &h)); + } + + /* First ltr char requires more specific handling */ + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x >= px); + px = x; + fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), + y + (h / 2), &x, &y, &w, &h)); + i++; + for ( ; i < eina_unicode_utf8_get_len("נסיון - test") ; i++) + { + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x <= px); + px = x; + /* Get back the coords */ + fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), + y + (h / 2), &x, &y, &w, &h)); + } + /* First rtl char requires more specific handling */ + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x >= px); + px = x; + i++; + for ( ; i < eina_unicode_utf8_get_len("נסיון - test...") ; i++) + { + fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); + fail_if(x >= px); + px = x; + /* Get back the coords */ + fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), + y + (h / 2), &x, &y, &w, &h)); + } + + /* And some last up to pos tests */ + Evas_Coord adv; + int pos, prev_pos; + evas_object_text_text_set(to, "Test - נסיון..."); + adv = evas_object_text_horiz_advance_get(to); + pos = prev_pos = 0; + for (x = 0 ; x <= (adv - 1) ; x++) + { + pos = evas_object_text_last_up_to_pos(to, x, 0); + fail_if(pos < prev_pos); + prev_pos = pos; + } + pos = evas_object_text_last_up_to_pos(to, x, 0); + fail_if(pos != -1); + pos = evas_object_text_last_up_to_pos(to, -50, 0); + fail_if(pos != -1); + + END_TEXT_TEST(); +} +END_TEST +#endif + +void evas_test_text(TCase *tc) +{ + tcase_add_test(tc, evas_text_simple); + tcase_add_test(tc, evas_text_style); + tcase_add_test(tc, evas_text_set_get); + tcase_add_test(tc, evas_text_geometries); + tcase_add_test(tc, evas_text_evas); +#ifdef HAVE_FRIBIDI + tcase_add_test(tc, evas_text_bidi); +#endif + + tcase_add_test(tc, evas_text_unrelated); +} diff --git a/libraries/evas/src/tests/evas_test_textblock.c b/libraries/evas/src/tests/evas_test_textblock.c new file mode 100644 index 0000000..6a28353 --- /dev/null +++ b/libraries/evas/src/tests/evas_test_textblock.c @@ -0,0 +1,1973 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include + +#include "evas_suite.h" +#include "Evas.h" + +#include "evas_tests_helpers.h" + +/* Functions defined in evas_object_textblock.c */ +EAPI Eina_Bool +_evas_textblock_check_item_node_link(Evas_Object *obj); +EAPI int +_evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n); +/* end of functions defined in evas_object_textblock.c */ + + +static const char *style_buf = + "DEFAULT='font=Sans font_size=10 color=#000 text_class=entry'" + "br='\n'" + "ps='ps'" + "tab='\t'" + "b='+ font=Sans:style=bold'"; + +#define START_TB_TEST() \ + Evas *evas; \ + Evas_Object *tb; \ + Evas_Textblock_Style *st; \ + Evas_Textblock_Cursor *cur; \ + evas = EVAS_TEST_INIT_EVAS(); \ + evas_font_hinting_set(evas, EVAS_FONT_HINTING_AUTO); \ + tb = evas_object_textblock_add(evas); \ + fail_if(!tb); \ + evas_object_textblock_legacy_newline_set(tb, EINA_FALSE); \ + st = evas_textblock_style_new(); \ + fail_if(!st); \ + evas_textblock_style_set(st, style_buf); \ + fail_if(strcmp(style_buf, evas_textblock_style_get(st))); \ + evas_object_textblock_style_set(tb, st); \ + cur = evas_object_textblock_cursor_new(tb); \ +do \ +{ \ +} \ +while (0) + +#define END_TB_TEST() \ +do \ +{ \ + evas_textblock_cursor_free(cur); \ + evas_object_del(tb); \ + evas_textblock_style_free(st); \ + evas_free(evas); \ + evas_shutdown(); \ +} \ +while (0) + +START_TEST(evas_textblock_simple) +{ + START_TB_TEST(); + const char *buf = "This is a
test."; + evas_object_textblock_text_markup_set(tb, buf); + fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); + END_TB_TEST(); +} +END_TEST + +#define _CHECK_CURSOR_COORDS() \ +do \ +{ \ + Evas_Coord cx, cy, cw, ch; \ + int ret; \ + ret = evas_textblock_cursor_geometry_get(cur, &cx, &cy, &cw, &ch, \ + NULL, EVAS_TEXTBLOCK_CURSOR_UNDER); \ + fail_if(ret == -1); \ + ret = evas_textblock_cursor_geometry_get(cur, &cx, &cy, &cw, &ch, \ + NULL, EVAS_TEXTBLOCK_CURSOR_BEFORE); \ + fail_if(ret == -1); \ + ret = evas_textblock_cursor_char_geometry_get(cur, \ + &cx, &cy, &cw, &ch); \ + fail_if(ret == -1); \ + ret = evas_textblock_cursor_pen_geometry_get(cur, &cx, &cy, &cw, &ch); \ + fail_if(ret == -1); \ + ret = evas_textblock_cursor_line_geometry_get(cur, \ + &cx, &cy, &cw, &ch); \ + fail_if(ret == -1); \ +} \ +while (0) +START_TEST(evas_textblock_cursor) +{ + START_TB_TEST(); + Evas_Coord x, y, w, h; + size_t i, len; + Evas_Coord nw, nh; + const char *buf = "This is a
test.Lets see if this works.עוד פסקה."; + + /* Walk the textblock using cursor_char_next */ + evas_object_textblock_text_markup_set(tb, buf); + fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); + len = eina_unicode_utf8_get_len(buf) - 9; /* 9 because len(
) == 1 and len() == 1 */ + for (i = 0 ; i < len ; i++) + { + _CHECK_CURSOR_COORDS(); + + fail_if(evas_textblock_cursor_pos_get(cur) != (int) i); + + fail_if(!evas_textblock_cursor_char_next(cur) && (i < len - 1)); + } + fail_if(evas_textblock_cursor_char_next(cur)); + + /* Jump to positions all aronud the textblock */ + evas_textblock_cursor_pos_set(cur, -1); + fail_if(evas_textblock_cursor_pos_get(cur) != 0); + + evas_textblock_cursor_pos_set(cur, len + 5); + fail_if(evas_textblock_cursor_pos_get(cur) != (int) len); + + for (i = 0 ; i < len ; i++) + { + evas_textblock_cursor_pos_set(cur, i); + + _CHECK_CURSOR_COORDS(); + + fail_if(evas_textblock_cursor_pos_get(cur) != (int) i); + } + + /* Create another cursor and insert text, making sure everything + * is in sync. */ + evas_object_textblock_clear(tb); + Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); + evas_textblock_cursor_copy(main_cur, cur); + fail_if(evas_textblock_cursor_pos_get(cur) != + evas_textblock_cursor_pos_get(main_cur)); + + evas_textblock_cursor_text_prepend(main_cur, "a"); + fail_if(evas_textblock_cursor_pos_get(cur) == + evas_textblock_cursor_pos_get(main_cur)); + evas_textblock_cursor_text_prepend(main_cur, "a"); + fail_if(evas_textblock_cursor_pos_get(cur) == + evas_textblock_cursor_pos_get(main_cur)); + + /* Insert text to a non-empty textblock */ + evas_object_textblock_clear(tb); + evas_object_textblock_text_markup_set(tb, buf); + evas_textblock_cursor_copy(main_cur, cur); + fail_if(evas_textblock_cursor_pos_get(cur) != + evas_textblock_cursor_pos_get(main_cur)); + + evas_textblock_cursor_text_prepend(main_cur, "a"); + fail_if(evas_textblock_cursor_pos_get(cur) == + evas_textblock_cursor_pos_get(main_cur)); + evas_textblock_cursor_text_prepend(main_cur, "a"); + fail_if(evas_textblock_cursor_pos_get(cur) == + evas_textblock_cursor_pos_get(main_cur)); + + /* Make sure append works */ + evas_textblock_cursor_copy(main_cur, cur); + fail_if(evas_textblock_cursor_pos_get(cur) != + evas_textblock_cursor_pos_get(main_cur)); + evas_textblock_cursor_text_append(main_cur, "a"); + fail_if(evas_textblock_cursor_pos_get(cur) != + evas_textblock_cursor_pos_get(main_cur)); + + /* Cursor comparison */ + evas_textblock_cursor_pos_set(cur, 1); + evas_textblock_cursor_pos_set(main_cur, 2); + fail_if(evas_textblock_cursor_compare(cur, main_cur) != -1); + + evas_textblock_cursor_pos_set(cur, 2); + evas_textblock_cursor_pos_set(main_cur, 2); + fail_if(evas_textblock_cursor_compare(cur, main_cur) != 0); + + evas_textblock_cursor_pos_set(cur, 3); + evas_textblock_cursor_pos_set(main_cur, 2); + fail_if(evas_textblock_cursor_compare(cur, main_cur) != 1); + + /* Paragraph first */ + evas_object_textblock_text_markup_set(tb, buf); + for (i = 0 ; i < len ; i++) + { + evas_textblock_cursor_pos_set(cur, i); + + evas_textblock_cursor_paragraph_first(cur); + fail_if(evas_textblock_cursor_pos_get(cur) != 0); + } + + /* Paragraph last */ + for (i = 0 ; i < len ; i++) + { + evas_textblock_cursor_pos_set(cur, i); + + evas_textblock_cursor_paragraph_last(cur); + fail_if(evas_textblock_cursor_pos_get(cur) != (int) len); + } + + /* Paragraph next */ + evas_textblock_cursor_paragraph_last(cur); + fail_if(evas_textblock_cursor_paragraph_next(cur)); + + evas_textblock_cursor_paragraph_first(cur); + fail_if(!evas_textblock_cursor_paragraph_next(cur)); + fail_if(!evas_textblock_cursor_paragraph_next(cur)); + + /* Paragraph prev */ + evas_textblock_cursor_paragraph_first(cur); + fail_if(evas_textblock_cursor_paragraph_prev(cur)); + + evas_textblock_cursor_paragraph_last(cur); + fail_if(!evas_textblock_cursor_paragraph_prev(cur)); + fail_if(!evas_textblock_cursor_paragraph_prev(cur)); + + /* Cher next */ + evas_textblock_cursor_paragraph_last(cur); + fail_if(evas_textblock_cursor_char_next(cur)); + + evas_textblock_cursor_paragraph_first(cur); + fail_if(!evas_textblock_cursor_char_next(cur)); + fail_if(!evas_textblock_cursor_paragraph_next(cur)); + fail_if(!evas_textblock_cursor_char_next(cur)); + fail_if(!evas_textblock_cursor_paragraph_next(cur)); + fail_if(!evas_textblock_cursor_char_next(cur)); + + /* Cher prev */ + evas_textblock_cursor_paragraph_first(cur); + fail_if(evas_textblock_cursor_char_prev(cur)); + + evas_textblock_cursor_paragraph_last(cur); + fail_if(!evas_textblock_cursor_char_prev(cur)); + fail_if(!evas_textblock_cursor_paragraph_prev(cur)); + fail_if(!evas_textblock_cursor_char_prev(cur)); + + /* Paragraph char first */ + evas_textblock_cursor_paragraph_first(main_cur); + evas_textblock_cursor_paragraph_first(cur); + fail_if(!evas_textblock_cursor_char_next(cur)); + evas_textblock_cursor_paragraph_char_first(cur); + fail_if(evas_textblock_cursor_compare(cur, main_cur)); + + /* Paragraph char last */ + evas_textblock_cursor_paragraph_last(main_cur); + evas_textblock_cursor_paragraph_last(cur); + fail_if(!evas_textblock_cursor_char_prev(cur)); + evas_textblock_cursor_paragraph_char_last(cur); + fail_if(evas_textblock_cursor_compare(cur, main_cur)); + + /* Line char first */ + evas_textblock_cursor_paragraph_first(main_cur); + evas_textblock_cursor_paragraph_first(cur); + fail_if(!evas_textblock_cursor_char_next(cur)); + evas_textblock_cursor_line_char_first(cur); + fail_if(evas_textblock_cursor_compare(cur, main_cur)); + + evas_textblock_cursor_pos_set(cur, 12); + evas_textblock_cursor_line_char_first(cur); + fail_if(evas_textblock_cursor_pos_get(cur) != 10); + + /* Line char first */ + evas_textblock_cursor_paragraph_last(main_cur); + evas_textblock_cursor_paragraph_last(cur); + fail_if(!evas_textblock_cursor_char_prev(cur)); + evas_textblock_cursor_line_char_last(cur); + fail_if(evas_textblock_cursor_compare(cur, main_cur)); + + evas_textblock_cursor_pos_set(cur, 12); + evas_textblock_cursor_line_char_last(cur); + fail_if(evas_textblock_cursor_pos_get(cur) != 16); + + /* Line set */ + evas_textblock_cursor_paragraph_first(main_cur); + evas_textblock_cursor_paragraph_last(cur); + + fail_if(!evas_textblock_cursor_line_set(cur, 0)); + fail_if(evas_textblock_cursor_compare(cur, main_cur)); + fail_if(!evas_textblock_cursor_line_set(cur, 1)); + fail_if(!evas_textblock_cursor_line_set(cur, 2)); + fail_if(!evas_textblock_cursor_line_set(cur, 3)); + + fail_if(evas_textblock_cursor_line_set(cur, -1)); + fail_if(evas_textblock_cursor_line_set(cur, 99)); + + /* Paragraph text get */ + evas_textblock_cursor_paragraph_first(cur); + fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), + "This is a
test.")); + evas_textblock_cursor_paragraph_next(cur); + fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), + "Lets see if this works.")); + evas_textblock_cursor_paragraph_next(cur); + fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), + "עוד פסקה.")); + + /* Paragraph length get */ + evas_textblock_cursor_paragraph_first(cur); + /* -3 because len(
) == 1 */ + fail_if(evas_textblock_cursor_paragraph_text_length_get(cur) != + eina_unicode_utf8_get_len("This is a
test.") - 3); + evas_textblock_cursor_paragraph_next(cur); + fail_if(evas_textblock_cursor_paragraph_text_length_get(cur) != + eina_unicode_utf8_get_len("Lets see if this works.")); + evas_textblock_cursor_paragraph_next(cur); + fail_if(evas_textblock_cursor_paragraph_text_length_get(cur) != + eina_unicode_utf8_get_len("עוד פסקה.")); + + /* Cursor content get */ + evas_textblock_cursor_pos_set(cur, 0); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "T")); + evas_textblock_cursor_pos_set(cur, 9); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); + evas_textblock_cursor_pos_set(cur, 43); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "ד")); + + /* Eol get */ + for (i = 0 ; i < len ; i++) + { + evas_textblock_cursor_pos_set(cur, i); + evas_textblock_cursor_copy(cur, main_cur); + evas_textblock_cursor_line_char_last(main_cur); + + if (!evas_textblock_cursor_compare(cur, main_cur)) + { + fail_if(!evas_textblock_cursor_eol_get(cur)); + } + else + { + fail_if(evas_textblock_cursor_eol_get(cur)); + } + } + + /* Format positions */ + const Evas_Object_Textblock_Node_Format *fnode; + fnode = evas_textblock_node_format_first_get(tb); + fail_if(!fnode); + evas_textblock_cursor_at_format_set(cur, fnode); + evas_textblock_cursor_copy(cur, main_cur); + fail_if(evas_textblock_cursor_pos_get(cur) != 9); + fail_if(evas_textblock_cursor_format_get(cur) != fnode); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + evas_textblock_cursor_at_format_set(cur, fnode); + fail_if(evas_textblock_cursor_pos_get(cur) != 16); + fail_if(evas_textblock_cursor_format_get(cur) != fnode); + evas_textblock_cursor_format_next(main_cur); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + + fnode = evas_textblock_node_format_prev_get(fnode); + fail_if(!fnode); + evas_textblock_cursor_at_format_set(cur, fnode); + fail_if(evas_textblock_cursor_pos_get(cur) != 9); + fail_if(evas_textblock_cursor_format_get(cur) != fnode); + evas_textblock_cursor_format_prev(main_cur); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + + evas_textblock_cursor_char_next(main_cur); + evas_textblock_cursor_format_prev(main_cur); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + + + evas_object_textblock_text_markup_set(tb, buf); + + /* Check that pen geometry and getting char at coord are in sync. */ + do + { + int cur_pos; + + /* Check if it's the last char, if it is, break, otherwise, go back + * to the current char because our test advanced the cursor. */ + if (!evas_textblock_cursor_char_next(cur)) + break; + else + evas_textblock_cursor_char_prev(cur); + + cur_pos = evas_textblock_cursor_pos_get(cur); + evas_textblock_cursor_pen_geometry_get(cur, &x, &y, &w, &h); + evas_textblock_cursor_char_coord_set(cur, x + (w / 2), y + (h / 2)); + fail_if(cur_pos != evas_textblock_cursor_pos_get(cur)); + } + while (evas_textblock_cursor_char_next(cur)); + + /* Try positions before the first paragraph, and after the last paragraph */ + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_native_get(tb, &nw, &nh); + evas_object_resize(tb, nw, nh); + evas_textblock_cursor_pos_set(cur, 5); + evas_textblock_cursor_char_coord_set(cur, nw / 2, + -50); + evas_textblock_cursor_paragraph_first(main_cur); + fail_if(evas_textblock_cursor_compare(cur, main_cur)); + + evas_textblock_cursor_pos_set(cur, 5); + evas_textblock_cursor_char_coord_set(cur, nw / 2, + nh + 50); + evas_textblock_cursor_paragraph_last(main_cur); + fail_if(evas_textblock_cursor_compare(cur, main_cur)); + + /* Try positions beyond the left/right limits of lines. */ + for (i = 0 ; i < 2 ; i++) + { + evas_textblock_cursor_line_set(cur, i); + evas_textblock_cursor_line_geometry_get(cur, &x, &y, &w, &h); + + evas_textblock_cursor_pos_set(main_cur, 5); + evas_textblock_cursor_char_coord_set(main_cur, x - 50, y); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + + evas_textblock_cursor_line_char_last(cur); + evas_textblock_cursor_pos_set(main_cur, 5); + evas_textblock_cursor_char_coord_set(main_cur, x + w + 50, y); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + } + +#ifdef HAVE_FRIBIDI + evas_object_textblock_text_markup_set(tb, + "testנסיוןtestנסיון" + "נסיוןtestנסיוןtest" + "testנסיוןtest" + "נסיוןtestנסיון" + "testנסיון
נסיון" + "נסיוןtest
test" + ); + + for (i = 0 ; i < 8 ; i++) + { + evas_textblock_cursor_line_set(cur, i); + evas_textblock_cursor_line_geometry_get(cur, &x, &y, &w, &h); + switch (i) + { + case 0: + case 2: + case 4: + case 5: + /* Ltr paragraph */ + evas_textblock_cursor_pos_set(main_cur, 7); + evas_textblock_cursor_char_coord_set(main_cur, x - 50, y); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + + evas_textblock_cursor_line_char_last(cur); + evas_textblock_cursor_pos_set(main_cur, 7); + evas_textblock_cursor_char_coord_set(main_cur, x + w + 50, y); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + break; + case 1: + case 3: + case 6: + case 7: + /* Rtl paragraph */ + evas_textblock_cursor_line_char_last(cur); + evas_textblock_cursor_pos_set(main_cur, 7); + evas_textblock_cursor_char_coord_set(main_cur, x - 50, y); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + + evas_textblock_cursor_line_char_first(cur); + evas_textblock_cursor_pos_set(main_cur, 7); + evas_textblock_cursor_char_coord_set(main_cur, x + w + 50, y); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + break; + } + } +#endif + + evas_object_textblock_text_markup_set(tb, buf); + /* Testing line geometry.*/ + { + Evas_Coord lx, ly, lw, lh; + Evas_Coord plx, ply, plw, plh; + evas_textblock_cursor_line_set(cur, 0); + evas_textblock_cursor_copy(cur, main_cur); + evas_textblock_cursor_line_char_last(main_cur); + evas_textblock_cursor_line_geometry_get(cur, &plx, &ply, &plw, &plh); + + while (evas_textblock_cursor_compare(cur, main_cur) <= 0) + { + evas_textblock_cursor_pen_geometry_get(cur, &x, &y, &w, &h); + fail_if(0 != evas_textblock_cursor_line_geometry_get( + cur, &lx, &ly, &lw, &lh)); + fail_if((x < lx) || (x + w > lx + lw) || + (y < ly) || (y + h > ly + lh)); + fail_if((lx != plx) || (ly != ply) || (lw != plw) || (lh != plh)); + + plx = lx; + ply = ly; + plw = lw; + plh = lh; + evas_textblock_cursor_char_next(cur); + } + + evas_textblock_cursor_line_set(cur, 1); + evas_textblock_cursor_copy(cur, main_cur); + evas_textblock_cursor_line_char_last(main_cur); + evas_textblock_cursor_line_geometry_get(cur, &plx, &ply, &plw, &plh); + + while (evas_textblock_cursor_compare(cur, main_cur) <= 0) + { + evas_textblock_cursor_pen_geometry_get(cur, &x, &y, &w, &h); + fail_if(1 != evas_textblock_cursor_line_geometry_get( + cur, &lx, &ly, &lw, &lh)); + fail_if((x < lx) || (x + w > lx + lw) || + (y < ly) || (y + h > ly + lh)); + fail_if((lx != plx) || (ly != ply) || (lw != plw) || (lh != plh)); + + plx = lx; + ply = ly; + plw = lw; + plh = lh; + evas_textblock_cursor_char_next(cur); + } + + evas_textblock_cursor_paragraph_last(cur); + evas_textblock_cursor_line_set(cur, 0); + evas_textblock_cursor_line_geometry_get(cur, &plx, &ply, &plw, &plh); + evas_object_textblock_line_number_geometry_get(tb, 0, + &lx, &ly, &lw, &lh); + fail_if((lx != plx) || (ly != ply) || (lw != plw) || (lh != plh)); + fail_if(0 != evas_textblock_cursor_line_coord_set(cur, ly + (lh / 2))); + + evas_textblock_cursor_line_set(cur, 1); + evas_textblock_cursor_line_geometry_get(cur, &plx, &ply, &plw, &plh); + evas_object_textblock_line_number_geometry_get(tb, 1, + &lx, &ly, &lw, &lh); + fail_if((lx != plx) || (ly != ply) || (lw != plw) || (lh != plh)); + fail_if(1 != evas_textblock_cursor_line_coord_set(cur, ly + (lh / 2))); + + /* Before the start of the textblock */ + fail_if(0 != evas_textblock_cursor_line_coord_set(cur, -50)); + fail_if(3 != evas_textblock_cursor_line_coord_set(cur, 100000)); + + /* And now with a valigned textblock. */ + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_native_get(tb, &nw, &nh); + evas_object_resize(tb, 2 * nw, 2 * nh); + + evas_object_textblock_valign_set(tb, 0.5); + evas_textblock_cursor_paragraph_first(cur); + evas_textblock_cursor_pen_geometry_get(cur, &x, &y, &w, &h); + fail_if(y <= 0); + + evas_textblock_cursor_paragraph_last(main_cur); + evas_textblock_cursor_char_coord_set(main_cur, x + w, y / 2); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + + evas_textblock_cursor_paragraph_last(main_cur); + evas_textblock_cursor_line_coord_set(main_cur, y / 2); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + + /* Fail if they are equal, i.e if it for some reason thinks it should + * go to the end. */ + evas_textblock_cursor_paragraph_first(main_cur); + evas_textblock_cursor_paragraph_last(cur); + evas_textblock_cursor_char_coord_set(main_cur, x + w, nh + 1); + fail_if(!evas_textblock_cursor_compare(main_cur, cur)); + + evas_textblock_cursor_paragraph_first(main_cur); + evas_textblock_cursor_paragraph_last(cur); + evas_textblock_cursor_line_coord_set(main_cur, nh + 1); + fail_if(!evas_textblock_cursor_compare(main_cur, cur)); + + /* Fail if it doesn't go to the end. */ + evas_textblock_cursor_paragraph_last(cur); + evas_textblock_cursor_paragraph_first(main_cur); + evas_textblock_cursor_char_coord_set(main_cur, x + w, (2 * nh) - 1); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + + evas_textblock_cursor_paragraph_first(main_cur); + evas_textblock_cursor_line_coord_set(main_cur, (2 * nh) - 1); + fail_if(evas_textblock_cursor_compare(main_cur, cur)); + } + + END_TB_TEST(); +} +END_TEST + +START_TEST(evas_textblock_format_removal) +{ + START_TB_TEST(); + int i; + const char *buf = "This a
tesst."; + const Evas_Object_Textblock_Node_Format *fnode; + Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); + evas_object_textblock_text_markup_set(tb, buf); + + /* Remove the "b" pair. */ + fnode = evas_textblock_node_format_first_get(tb); + evas_textblock_node_format_remove_pair(tb, + (Evas_Object_Textblock_Node_Format *) fnode); + + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "+ a")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "- a")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + /* Now also remove the a pair */ + fnode = evas_textblock_node_format_first_get(tb); + evas_textblock_node_format_remove_pair(tb, + (Evas_Object_Textblock_Node_Format *) fnode); + fnode = evas_textblock_node_format_first_get(tb); + fail_if (fnode); + + /* Remove the "a" pair. */ + evas_object_textblock_text_markup_set(tb, buf); + + fnode = evas_textblock_node_format_first_get(tb); + fnode = evas_textblock_node_format_next_get(fnode); + evas_textblock_node_format_remove_pair(tb, + (Evas_Object_Textblock_Node_Format *) fnode); + + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "+ b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "- b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + /* Now also remove the b pair */ + fnode = evas_textblock_node_format_first_get(tb); + evas_textblock_node_format_remove_pair(tb, + (Evas_Object_Textblock_Node_Format *) fnode); + fnode = evas_textblock_node_format_first_get(tb); + fail_if (fnode); + + /* Now remove formats by removing text */ + evas_object_textblock_text_markup_set(tb, buf); + evas_textblock_cursor_pos_set(cur, 6); + evas_textblock_cursor_char_delete(cur); + evas_textblock_cursor_char_delete(cur); + evas_textblock_cursor_char_delete(cur); + /* Only b formats should remain */ + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "+ b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "- b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + /* No formats should remain. */ + evas_textblock_cursor_pos_set(cur, 2); + evas_textblock_cursor_char_delete(cur); + evas_textblock_cursor_char_delete(cur); + evas_textblock_cursor_char_delete(cur); + evas_textblock_cursor_char_delete(cur); + evas_textblock_cursor_char_delete(cur); + evas_textblock_cursor_char_delete(cur); + fnode = evas_textblock_node_format_first_get(tb); + fail_if (fnode); + + /* Try to remove the formats in a way that shouldn't remove them */ + evas_object_textblock_text_markup_set(tb, buf); + evas_textblock_cursor_pos_set(cur, 7); + evas_textblock_cursor_char_delete(cur); + evas_textblock_cursor_char_delete(cur); + evas_textblock_cursor_char_delete(cur); + evas_textblock_cursor_char_delete(cur); + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "+ b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "+ a")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "- a")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "- b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + /* Try range deletion to delete a */ + evas_object_textblock_text_markup_set(tb, buf); + evas_textblock_cursor_pos_set(cur, 6); + evas_textblock_cursor_pos_set(main_cur, 9); + evas_textblock_cursor_range_delete(cur, main_cur); + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "+ b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "- b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + /* Range deletion to delete both */ + evas_object_textblock_text_markup_set(tb, buf); + evas_textblock_cursor_pos_set(cur, 2); + evas_textblock_cursor_pos_set(main_cur, 11); + evas_textblock_cursor_range_delete(cur, main_cur); + fnode = evas_textblock_node_format_first_get(tb); + fail_if (fnode); + + /* Range deletion across paragraphs */ + evas_object_textblock_text_markup_set(tb, + "This ate" + "sst."); + evas_textblock_cursor_pos_set(cur, 6); + evas_textblock_cursor_pos_set(main_cur, 10); + evas_textblock_cursor_range_delete(cur, main_cur); + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "+ b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "- b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + /* Two formats in the same place. */ + evas_object_textblock_text_markup_set(tb, "abb"); + evas_textblock_cursor_pos_set(cur, 1); + evas_textblock_cursor_char_delete(cur); + fnode = evas_textblock_node_format_first_get(tb); + fail_if (fnode); + + /* Two formats across different paragraphs with notihng in between. */ + evas_object_textblock_text_markup_set(tb, ""); + evas_textblock_cursor_pos_set(cur, 0); + evas_textblock_cursor_char_delete(cur); + fnode = evas_textblock_node_format_first_get(tb); + fail_if (fnode); + + /* Try with range */ + evas_object_textblock_text_markup_set(tb, ""); + evas_textblock_cursor_pos_set(cur, 0); + evas_textblock_cursor_pos_set(main_cur, 1); + evas_textblock_cursor_range_delete(cur, main_cur); + fnode = evas_textblock_node_format_first_get(tb); + fail_if (fnode); + + /* Verify fmt position and REP_CHAR positions are the same */ + evas_object_textblock_text_markup_set(tb, + "This isan a."); + evas_textblock_cursor_pos_set(cur, 7); + evas_textblock_cursor_char_delete(cur); + fnode = evas_textblock_node_format_first_get(tb); + fail_if(_evas_textblock_format_offset_get(fnode) != 10); + + /* Out of order mixes. */ + evas_object_textblock_text_markup_set(tb, "abcde"); + evas_textblock_cursor_pos_set(cur, 2); + + for (i = 0 ; i < 2 ; i++) + { + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ i")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- i")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + evas_textblock_cursor_char_delete(cur); + } + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + /* This time with a generic closer */ + evas_object_textblock_text_markup_set(tb, "abcde"); + evas_textblock_cursor_pos_set(cur, 2); + + for (i = 0 ; i < 2 ; i++) + { + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ i")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + evas_textblock_cursor_char_delete(cur); + } + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + /* And now with remove pair. */ + evas_object_textblock_text_markup_set(tb, "abcde"); + evas_textblock_cursor_pos_set(cur, 2); + fnode = evas_textblock_node_format_first_get(tb); + evas_textblock_node_format_remove_pair(tb, + (Evas_Object_Textblock_Node_Format *) fnode); + + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ i")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- i")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + /* Remove the other pair */ + evas_object_textblock_text_markup_set(tb, "abcde"); + evas_textblock_cursor_pos_set(cur, 2); + fnode = evas_textblock_node_format_first_get(tb); + fnode = evas_textblock_node_format_next_get(fnode); + evas_textblock_node_format_remove_pair(tb, + (Evas_Object_Textblock_Node_Format *) fnode); + + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- i")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + /* Remove two pairs with the same name and same positions. */ + evas_object_textblock_text_markup_set(tb, "A"); + evas_textblock_cursor_pos_set(cur, 0); + evas_textblock_cursor_char_delete(cur); + + fnode = evas_textblock_node_format_first_get(tb); + fail_if (fnode); + + /* Try to remove a format that doesn't have a pair (with a bad mkup) */ + evas_object_textblock_text_markup_set(tb, "abcde"); + evas_textblock_cursor_pos_set(cur, 2); + fnode = evas_textblock_node_format_first_get(tb); + evas_textblock_node_format_remove_pair(tb, + (Evas_Object_Textblock_Node_Format *) fnode); + + fnode = evas_textblock_node_format_first_get(tb); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ i")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- i")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if (fnode); + + END_TB_TEST(); +} +END_TEST + +/* Testing items */ +START_TEST(evas_textblock_items) +{ + Evas_Coord w, h, w2, h2, nw, nh, ih; + START_TB_TEST(); + const char *buf = "This is an ."; + + /* Absolute item size */ + buf = "This is an ."; + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if((w < 93) || (h != 152)); + evas_textblock_cursor_pos_set(cur, 11); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); + fail_if((w != 93) || (h != 152)); + + buf = "This is an ."; + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if((w < 93) || (h <= 152)); + evas_textblock_cursor_pos_set(cur, 11); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); + fail_if((w != 93) || (h != 152)); + + /* Size is the same as abssize, unless there's scaling applied. */ + buf = "This is an ."; + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if((w < 93) || (h != 152)); + evas_textblock_cursor_pos_set(cur, 11); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); + fail_if((w != 93) || (h != 152)); + + buf = "This is an ."; + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if((w < 93) || (h <= 152)); + evas_textblock_cursor_pos_set(cur, 11); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); + fail_if((w != 93) || (h != 152)); + + evas_object_scale_set(tb, 2.0); + buf = "This is an ."; + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if((w < (2 * 93)) || (h != (2 * 152))); + evas_textblock_cursor_pos_set(cur, 11); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); + fail_if((w != (2 * 93)) || (h != (2 * 152))); + evas_textblock_cursor_pos_set(cur, 11); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); + fail_if((w != (2 * 93)) || (h != (2 * 152))); + + buf = "This is an ."; + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if((w < (2 * 93)) || (h <= (2 * 152))); + evas_textblock_cursor_pos_set(cur, 11); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); + fail_if((w != (2 * 93)) || (h != (2 * 152))); + + evas_object_scale_set(tb, 1.0); + + /* Relsize */ + /* relsize means it should adjust itself to the size of the line */ + buf = "This is an ."; + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if((w >= 93) || (h >= 152)); + evas_textblock_cursor_pos_set(cur, 11); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &ih); + fail_if((w > 90) || (h != ih)); + + buf = "This is an ."; + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if((w >= 93) || (h >= 152)); + evas_textblock_cursor_pos_set(cur, 11); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &ih); + fail_if((w > 90) || (h <= ih)); + + /* Relsize and abs size in the same line, all should be the same size */ + buf = ""; + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_formatted_get(tb, &w, &h); + evas_object_textblock_size_native_get(tb, &nw, &nh); + fail_if((nw != w) || (nh != h)); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); + evas_textblock_cursor_char_next(cur); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w2, &h2); + fail_if((w != w2) || (h != h2)); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); + evas_textblock_cursor_char_next(cur); + evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w2, &h2); + fail_if((w != w2) || (h != h2)); + + /* FIXME: Also verify x,y positions of the item. */ + + /* FIXME We need some item tests that involve line wrapping that make the + * items move between lines that are in different sizes. + * Also, tests that involve wrapping positions with relsized items. We + * want to make sure the item gets a relsize on the correct time (before + * the wrapping, and then is updated after the wrapping) and that + * all the lines have the correct sizes afterwards. */ + + END_TB_TEST(); +} +END_TEST + +/* Wrapping tests */ +START_TEST(evas_textblock_wrapping) +{ + Evas_Coord bw, bh, w, h, nw, nh; + int i; + START_TB_TEST(); + evas_object_textblock_text_markup_set(tb, "a"); + evas_object_textblock_size_formatted_get(tb, &bw, &bh); + + /* Char wrap */ + evas_object_textblock_text_markup_set(tb, "aaaaaaa"); + evas_textblock_cursor_format_prepend(cur, "+ wrap=char"); + evas_object_resize(tb, bw, bh); + evas_object_textblock_size_formatted_get(tb, &w, &h); + /* Wrap to minimum */ + fail_if(w != bw); + fail_if(h <= bh); + + /* Mixed - fallback to char wrap */ + evas_object_textblock_text_markup_set(tb, "aaaaaaa"); + evas_textblock_cursor_format_prepend(cur, "+ wrap=mixed"); + evas_object_resize(tb, bw, bh); + evas_object_textblock_size_formatted_get(tb, &w, &h); + /* Wrap to minimum */ + fail_if(w != bw); + fail_if(h <= bh); + + /* Basic Word wrap */ + evas_object_textblock_text_markup_set(tb, "aaaa"); + evas_object_textblock_size_formatted_get(tb, &bw, &bh); + + evas_object_textblock_text_markup_set(tb, "aaaa aa"); + evas_textblock_cursor_format_prepend(cur, "+ wrap=word"); + evas_object_resize(tb, bw, bh); + evas_object_textblock_size_formatted_get(tb, &w, &h); + /* Wrap to minimum */ + fail_if(w != bw); + fail_if(h <= bh); + + /* Mixed - fallback to word wrap */ + evas_object_textblock_text_markup_set(tb, "aaaa aa"); + evas_textblock_cursor_format_prepend(cur, "+ wrap=mixed"); + evas_object_resize(tb, bw + 1, bh); + evas_object_textblock_size_formatted_get(tb, &w, &h); + /* Wrap to minimum */ + fail_if(w != bw); + fail_if(h <= bh); + + /* Wrap and then expand again. */ + evas_object_textblock_text_markup_set(tb, "aaaa aa"); + evas_textblock_cursor_format_prepend(cur, "+ wrap=word"); + evas_object_resize(tb, bw, bh); + evas_object_textblock_size_formatted_get(tb, &w, &h); + evas_object_textblock_size_native_get(tb, &nw, &nh); + evas_object_resize(tb, nw, nh); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if((w != nw) || (h != nh)); + + /* Reduce size until reaching the minimum, making sure we don't + * get something wrong along the way */ + /* Char wrap */ + evas_object_textblock_text_markup_set(tb, "a"); + evas_object_textblock_size_formatted_get(tb, &bw, &bh); + evas_object_textblock_text_markup_set(tb, + "aaaa aaaa aaa aa aaa" + "aaaa aaa aaa aaa aaa" + "a aaaaa aaaaaaaaaaaaaa
aaaaa" + "aaaaaa" + ); + evas_textblock_cursor_format_prepend(cur, "+ wrap=char"); + evas_object_textblock_size_native_get(tb, &nw, &nh); + + Evas_Coord iw; + for (iw = nw ; iw >= bw ; iw--) + { + evas_object_resize(tb, iw, 1000); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if(w < bw); + fail_if(w > iw); + } + fail_if(w != bw); + + /* Word wrap */ + evas_object_textblock_text_markup_set(tb, "aaaaaa"); + evas_object_textblock_size_formatted_get(tb, &bw, &bh); + evas_object_textblock_text_markup_set(tb, + "aaaa aaaa aaa aa aaa" + "aaaa aaa aaa aaa aaa" + "a aaaaa aaaaaa
aaaaa" + "aaaaa" + ); + evas_textblock_cursor_format_prepend(cur, "+ wrap=word"); + evas_object_textblock_size_native_get(tb, &nw, &nh); + + for (iw = nw ; iw >= bw ; iw--) + { + evas_object_resize(tb, iw, 1000); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if(w < bw); + fail_if(w > iw); + } + fail_if(w != bw); + + /* Mixed wrap */ + evas_object_textblock_text_markup_set(tb, "a"); + evas_object_textblock_size_formatted_get(tb, &bw, &bh); + evas_object_textblock_text_markup_set(tb, + "aaaa aaaa aaa aa aaa" + "aaaa aaa aaa aaa aaa" + "a aaaaa aaaaaa
aaaaa" + "aaaaa" + ); + evas_textblock_cursor_format_prepend(cur, "+ wrap=mixed"); + evas_object_textblock_size_native_get(tb, &nw, &nh); + + for (iw = nw ; iw >= bw ; iw--) + { + evas_object_resize(tb, iw, 1000); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if(w < bw); + fail_if(w > iw); + } + fail_if(w != bw); + + /* Resize, making sure we keep going down in the minimum size. */ + char *wrap_style[] = { "+ wrap=word", "+ wrap=char", "+ wrap=mixed" }; + int wrap_items = sizeof(wrap_style) / sizeof(*wrap_style); + + evas_object_textblock_text_markup_set(tb, + "This is an entry widget in this window that
" + "uses markup like this for styling and
" + "formatting like this, as well as
" + "links in the text, so enter text
" + "in here to edit it. By the way, links are
" + "called Anchors so you will need
" + "to refer to them this way.
" + "
" + + "Also you can stick in items with (relsize + ascent): " + "" + " (full) " + "" + " (to the left)
" + + "Also (size + ascent): " + "" + " (full) " + "" + " (before this)
" + + "And as well (absize + ascent): " + "" + " (full) " + "" + " or even paths to image files on disk too like: " + "" + " ... end." + ); + + /* Get minimum size */ + evas_object_textblock_size_native_get(tb, &nw, &nh); + + for (i = 0 ; i < wrap_items ; i++) + { + evas_textblock_cursor_format_prepend(cur, wrap_style[i]); + evas_object_resize(tb, 0, 0); + evas_object_textblock_size_formatted_get(tb, &bw, &bh); + + for (iw = nw ; iw >= bw ; iw--) + { + evas_object_resize(tb, iw, 1000); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if(w < bw); + fail_if(w > iw); + } + fail_if(w != bw); + } + + + /* Ellipsis */ + evas_object_textblock_text_markup_set(tb, "aaaaaaaaaa"); + evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0"); + evas_object_textblock_size_native_get(tb, &nw, &nh); + evas_object_resize(tb, nw / 2, nh); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if((w > (nw / 2)) || (h != nh)); + + END_TB_TEST(); +} +END_TEST + +/* Various textblock stuff */ +START_TEST(evas_textblock_various) +{ + Evas_Coord w, h, bw, bh; + START_TB_TEST(); + const char *buf = "Thistextblockhasalotoflines."; + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_formatted_get(tb, &w, &h); + /* Move outside of the screen so it'll have to search for the correct + * paragraph and etc. */ + evas_object_move(tb, -(w / 2), -(h / 2)); + + /* Replacement char */ + evas_object_textblock_text_markup_set(tb, "*"); + evas_object_textblock_size_formatted_get(tb, &bw, &bh); + evas_object_textblock_replace_char_set(tb, "*"); + evas_object_textblock_text_markup_set(tb, "|"); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if((w != bw) || (h != bh)); + + /* Items have correct text node information */ + evas_object_textblock_text_markup_set(tb, ""); + fail_if(!_evas_textblock_check_item_node_link(tb)); + evas_object_textblock_text_markup_set(tb, ""); + fail_if(!_evas_textblock_check_item_node_link(tb)); + evas_object_textblock_text_markup_set(tb, "a"); + fail_if(!_evas_textblock_check_item_node_link(tb)); + evas_object_textblock_text_markup_set(tb, "aa"); + fail_if(!_evas_textblock_check_item_node_link(tb)); + evas_object_textblock_text_markup_set(tb, "aa"); + fail_if(!_evas_textblock_check_item_node_link(tb)); + evas_object_textblock_text_markup_set(tb, "aaa"); + fail_if(!_evas_textblock_check_item_node_link(tb)); + + END_TB_TEST(); +} +END_TEST + +/* Various geometries. e.g. range geometry. */ +START_TEST(evas_textblock_geometries) +{ + START_TB_TEST(); + const char *buf = "This is a
test."; + evas_object_textblock_text_markup_set(tb, buf); + + /* Single line range */ + Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); + evas_textblock_cursor_pos_set(cur, 0); + evas_textblock_cursor_pos_set(main_cur, 6); + + Eina_List *rects, *rects2; + Evas_Textblock_Rectangle *tr, *tr2; + rects = evas_textblock_cursor_range_geometry_get(cur, main_cur); + fail_if(!rects); + rects2 = evas_textblock_cursor_range_geometry_get(main_cur, cur); + fail_if(!rects2); + + fail_if(eina_list_count(rects) != 1); + fail_if(eina_list_count(rects2) != 1); + + tr = eina_list_data_get(rects); + fail_if((tr->h <= 0) || (tr->w <= 0)); + tr2 = eina_list_data_get(rects2); + fail_if((tr2->h <= 0) || (tr2->w <= 0)); + + fail_if((tr->x != tr2->x) || (tr->y != tr2->y) || (tr->w != tr2->w) || + (tr->h != tr2->h)); + + /* Multiline range */ + evas_textblock_cursor_pos_set(cur, 0); + evas_textblock_cursor_pos_set(main_cur, 14); + + rects = evas_textblock_cursor_range_geometry_get(cur, main_cur); + fail_if(!rects); + rects2 = evas_textblock_cursor_range_geometry_get(main_cur, cur); + fail_if(!rects2); + + fail_if(eina_list_count(rects) != 2); + fail_if(eina_list_count(rects2) != 2); + + tr = eina_list_data_get(rects); + fail_if((tr->h <= 0) || (tr->w <= 0)); + tr2 = eina_list_data_get(rects2); + fail_if((tr2->h <= 0) || (tr2->w <= 0)); + + fail_if((tr->x != tr2->x) || (tr->y != tr2->y) || (tr->w != tr2->w) || + (tr->h != tr2->h)); + + tr = eina_list_data_get(eina_list_next(rects)); + fail_if((tr->h <= 0) || (tr->w <= 0)); + tr2 = eina_list_data_get(eina_list_next(rects2)); + fail_if((tr2->h <= 0) || (tr2->w <= 0)); + + fail_if((tr->x != tr2->x) || (tr->y != tr2->y) || (tr->w != tr2->w) || + (tr->h != tr2->h)); + + /* Check that the second line is positioned below the first */ + tr = eina_list_data_get(rects); + tr2 = eina_list_data_get(eina_list_next(rects)); + fail_if(tr->y >= tr2->y); + + END_TB_TEST(); +} +END_TEST + +/* Should handle all the text editing. */ +START_TEST(evas_textblock_editing) +{ + START_TB_TEST(); + const char *buf = "First par.Second par."; + evas_object_textblock_text_markup_set(tb, buf); + Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); + + /* Check deletion works */ + /* Try deleting after the end of the textblock */ + { + char *content; + evas_textblock_cursor_paragraph_last(cur); + content = strdup(evas_object_textblock_text_markup_get(tb)); + evas_textblock_cursor_char_delete(cur); + fail_if(strcmp(content, evas_object_textblock_text_markup_get(tb))); + free(content); + } + + /* Delete the first char */ + evas_textblock_cursor_paragraph_first(cur); + evas_textblock_cursor_char_delete(cur); + fail_if(strcmp(evas_object_textblock_text_markup_get(tb), + "irst par.Second par.")); + + /* Delete some arbitrary char */ + evas_textblock_cursor_char_next(cur); + evas_textblock_cursor_char_next(cur); + evas_textblock_cursor_char_next(cur); + evas_textblock_cursor_char_delete(cur); + fail_if(strcmp(evas_object_textblock_text_markup_get(tb), + "irs par.Second par.")); + + /* Delete a range */ + evas_textblock_cursor_pos_set(main_cur, 1); + evas_textblock_cursor_pos_set(cur, 6); + evas_textblock_cursor_range_delete(cur, main_cur); + fail_if(strcmp(evas_object_textblock_text_markup_get(tb), + "ir.Second par.")); + evas_textblock_cursor_paragraph_char_first(main_cur); + evas_textblock_cursor_paragraph_char_last(cur); + evas_textblock_cursor_char_next(cur); + evas_textblock_cursor_range_delete(cur, main_cur); + fail_if(strcmp(evas_object_textblock_text_markup_get(tb), + "Second par.")); + + evas_object_textblock_text_markup_set(tb, buf); + evas_textblock_cursor_paragraph_last(main_cur); + evas_object_textblock_text_markup_prepend(main_cur, "Testblabla."); + evas_textblock_cursor_paragraph_last(cur); + evas_textblock_cursor_paragraph_char_first(main_cur); + evas_textblock_cursor_range_delete(cur, main_cur); + fail_if(strcmp(evas_object_textblock_text_markup_get(tb), + "First par.")); + + /* Merging paragraphs */ + evas_object_textblock_text_markup_set(tb, buf); + evas_textblock_cursor_paragraph_char_last(cur); + evas_textblock_cursor_copy(cur, main_cur); + evas_textblock_cursor_char_delete(cur); + + evas_textblock_cursor_paragraph_first(cur); + fail_if(evas_textblock_cursor_paragraph_next(cur)); + + /* Split paragraphs */ + evas_textblock_cursor_format_prepend(cur, "ps"); + + evas_textblock_cursor_paragraph_first(cur); + fail_if(!evas_textblock_cursor_paragraph_next(cur)); + fail_if(evas_textblock_cursor_paragraph_next(cur)); + + /* Merge paragraphs using range deletion */ + evas_object_textblock_text_markup_set(tb, buf); + evas_textblock_cursor_paragraph_first(cur); + evas_textblock_cursor_paragraph_char_last(cur); + evas_textblock_cursor_copy(cur, main_cur); + evas_textblock_cursor_char_prev(cur); + evas_textblock_cursor_char_next(main_cur); + + evas_textblock_cursor_range_delete(cur, main_cur); + evas_textblock_cursor_paragraph_first(cur); + fail_if(evas_textblock_cursor_paragraph_next(cur)); + + /* FIXME: Also add text appending/prepending */ + + END_TB_TEST(); +} +END_TEST + +/* Text getters */ +START_TEST(evas_textblock_text_getters) +{ + START_TB_TEST(); + const char *buf = "This is a
test." + "טקסט בעבריתand now in english."; + evas_object_textblock_text_markup_set(tb, buf); + evas_textblock_cursor_paragraph_first(cur); + + fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), + "This is a
test.")); + + evas_textblock_cursor_paragraph_next(cur); + fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), + "טקסט בעברית")); + + evas_textblock_cursor_paragraph_next(cur); + fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), + "and now in english.")); + + /* Range get */ + Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); + evas_textblock_cursor_pos_set(main_cur, 2); + evas_textblock_cursor_pos_set(cur, 2); + fail_if(*evas_textblock_cursor_range_text_get(main_cur, cur, + EVAS_TEXTBLOCK_TEXT_MARKUP)); + + evas_textblock_cursor_pos_set(main_cur, 2); + evas_textblock_cursor_pos_set(cur, 6); + fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, + EVAS_TEXTBLOCK_TEXT_MARKUP), "is i")); + + evas_textblock_cursor_pos_set(main_cur, 5); + evas_textblock_cursor_pos_set(cur, 14); + fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, + EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); + + evas_textblock_cursor_pos_set(main_cur, 14); + evas_textblock_cursor_pos_set(cur, 20); + fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); + + evas_textblock_cursor_pos_set(main_cur, 14); + evas_textblock_cursor_pos_set(cur, 32); + fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); + + /* Backward range get */ + evas_textblock_cursor_pos_set(main_cur, 2); + evas_textblock_cursor_pos_set(cur, 2); + fail_if(*evas_textblock_cursor_range_text_get(cur, main_cur, + EVAS_TEXTBLOCK_TEXT_MARKUP)); + + evas_textblock_cursor_pos_set(main_cur, 2); + evas_textblock_cursor_pos_set(cur, 6); + fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, + EVAS_TEXTBLOCK_TEXT_MARKUP), "is i")); + + evas_textblock_cursor_pos_set(main_cur, 5); + evas_textblock_cursor_pos_set(cur, 14); + fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, + EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); + + evas_textblock_cursor_pos_set(main_cur, 14); + evas_textblock_cursor_pos_set(cur, 20); + fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); + + evas_textblock_cursor_pos_set(main_cur, 14); + evas_textblock_cursor_pos_set(cur, 32); + fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); + + /* Uninit cursors and other weird cases */ + evas_object_textblock_clear(tb); + evas_textblock_cursor_copy(main_cur, cur); + evas_textblock_cursor_text_prepend(main_cur, "aaa"); + fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, + EVAS_TEXTBLOCK_TEXT_MARKUP), "aaa")); + + END_TB_TEST(); +} +END_TEST + +/* Formats */ +START_TEST(evas_textblock_formats) +{ + START_TB_TEST(); + const char *buf = "This is a
test."; + const Evas_Object_Textblock_Node_Format *fnode; + evas_object_textblock_text_markup_set(tb, buf); + + /* Walk from the start */ + fnode = evas_textblock_node_format_first_get(tb); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "+ font_size=15 wrap=none")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "- font_size=13")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "br")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "ps")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ item")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(fnode); + + /* Walk backwards */ + fnode = evas_textblock_node_format_last_get(tb); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); + + fnode = evas_textblock_node_format_prev_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ item")); + + fnode = evas_textblock_node_format_prev_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "ps")); + + fnode = evas_textblock_node_format_prev_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "br")); + + fnode = evas_textblock_node_format_prev_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); + + fnode = evas_textblock_node_format_prev_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "- font_size=13")); + + fnode = evas_textblock_node_format_prev_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), + "+ font_size=15 wrap=none")); + + fnode = evas_textblock_node_format_prev_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); + + fnode = evas_textblock_node_format_prev_get(fnode); + fail_if(fnode); + + /* Cursor and format detection */ + fnode = evas_textblock_node_format_first_get(tb); + fail_if(!fnode); + evas_textblock_cursor_at_format_set(cur, fnode); + fail_if(evas_textblock_cursor_format_is_visible_get(cur)); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + evas_textblock_cursor_at_format_set(cur, fnode); + fail_if(evas_textblock_cursor_format_is_visible_get(cur)); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + evas_textblock_cursor_at_format_set(cur, fnode); + fail_if(evas_textblock_cursor_format_is_visible_get(cur)); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + evas_textblock_cursor_at_format_set(cur, fnode); + fail_if(evas_textblock_cursor_format_is_visible_get(cur)); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + evas_textblock_cursor_at_format_set(cur, fnode); + fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); + + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + evas_textblock_cursor_at_format_set(cur, fnode); + fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); + + size_t i = 0; + evas_textblock_cursor_paragraph_first(cur); + do + { + switch (i) + { + case 2: + case 3: + case 6: + case 7: + case 10: + case 14: + case 17: + case 18: + fail_if(!evas_textblock_cursor_is_format(cur)); + break; + default: + fail_if(evas_textblock_cursor_is_format(cur)); + fail_if(evas_textblock_cursor_format_is_visible_get(cur)); + break; + } + i++; + } + while (evas_textblock_cursor_char_next(cur)); + + /* Format text nodes invalidation */ + { + Evas_Coord w, h, nw, nh; + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_size_formatted_get(tb, &w, &h); + evas_textblock_cursor_paragraph_first(cur); + evas_textblock_cursor_format_prepend(cur, "+ font_size=40"); + evas_object_textblock_size_formatted_get(tb, &nw, &nh); + fail_if((w >= nw) || (h >= nh)); + } + /* FIXME: Should extend invalidation tests. */ + + /* Various formats, just verify there's no seg, we can't really + * verify them visually, well, we can some of them. Possibly in the + * future we will */ + evas_object_textblock_text_markup_set(tb, + "font_size=40" + "color=#F210B3FF" + "underline=single underline_color=#A2B3C4" + "underline=double underline_color=#F00 underline2_color=#00F" + "underline=dashed underline_dash_color=#0F0 underline_dash_width=2 underline_dash_gap=1" + "style=outline outline_color=#F0FA" + "style=shadow shadow_color=#F0F" + "style=glow glow_color=#BBB" + "style=glow glow2_color=#0F0" + "style=glow color=#fff glow2_color=#fe87 glow_color=#f214" + "backing=on backing_color=#00F" + "strikethrough=on strikethrough_color=#FF0" + "align=right" + "valign=0.0" + "tabstops=<\\t>50" + "linesize=40" + "linerelsize=200%" + "linegap=20" + "linerelgap=100%"); + + /* Force a relayout */ + evas_object_textblock_size_formatted_get(tb, NULL, NULL); + + /* Removing paired formats. */ + evas_object_textblock_text_markup_set(tb, "aabbcc"); + fnode = evas_textblock_node_format_first_get(tb); + evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); + fnode = evas_textblock_node_format_first_get(tb); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); + + evas_object_textblock_text_markup_set(tb, "aabbcc"); + fnode = evas_textblock_node_format_first_get(tb); + fnode = evas_textblock_node_format_next_get(fnode); + evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); + fnode = evas_textblock_node_format_first_get(tb); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ a")); + fnode = evas_textblock_node_format_next_get(fnode); + fail_if(!fnode); + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- a")); + + /* Format list get */ + evas_object_textblock_text_markup_set(tb, "aab" + "bbcc"); + const Eina_List *flist = evas_textblock_node_format_list_get(tb, "a"); + const Eina_List *itr; + EINA_LIST_FOREACH(flist, itr, fnode) + { + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ a")); + } + + flist = evas_textblock_node_format_list_get(tb, "item"); + EINA_LIST_FOREACH(flist, itr, fnode) + { + fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ item")); + } + + /* Make sure we get all the types of visible formats correctly. */ + evas_object_textblock_text_markup_set(tb, "a
aa"); + fail_if(strcmp(evas_textblock_node_format_text_get( + evas_textblock_cursor_format_get(cur)), "ps")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); + fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); + fail_if(!evas_textblock_cursor_char_next(cur)); + fail_if(!evas_textblock_cursor_char_next(cur)); + fail_if(strcmp(evas_textblock_node_format_text_get( + evas_textblock_cursor_format_get(cur)), "br")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); + fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); + fail_if(!evas_textblock_cursor_char_next(cur)); + fail_if(!evas_textblock_cursor_char_next(cur)); + fail_if(strcmp(evas_textblock_node_format_text_get( + evas_textblock_cursor_format_get(cur)), "tab")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); + fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); + fail_if(!evas_textblock_cursor_char_next(cur)); + fail_if(!evas_textblock_cursor_char_next(cur)); + fail_if(strcmp(evas_textblock_node_format_text_get( + evas_textblock_cursor_format_get(cur)), "+ item")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); + fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); + + END_TB_TEST(); +} +END_TEST + +/* Different text styles, for example, shadow. */ +START_TEST(evas_textblock_style) +{ + Evas_Coord w, h, nw, nh; + Evas_Coord l, r, t, b; + START_TB_TEST(); + Evas_Textblock_Style *newst; + const char *buf = "TestTest2נסיון"; + evas_object_textblock_text_markup_set(tb, buf); + fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); + + evas_object_textblock_size_formatted_get(tb, &w, &h); + newst = evas_textblock_style_new(); + fail_if(!newst); + evas_textblock_style_set(newst, + "DEFAULT='font=Sans font_size=20 color=#000 text_class=entry'" + "br='\n'" + "ps='ps'" + "tab='\t'"); + evas_object_textblock_style_set(tb, newst); + evas_object_textblock_size_formatted_get(tb, &nw, &nh); + fail_if((w >= nw) || (h >= nh)); + + /* Style padding. */ + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 0) || (r != 0) || (t != 0) || (b != 0)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 0) || (r != 1) || (t != 0) || (b != 1)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 1) || (r != 1) || (t != 1) || (b != 1)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 2) || (r != 2) || (t != 2) || (b != 2)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 2) || (r != 2) || (t != 2) || (b != 2)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 1) || (r != 2) || (t != 1) || (b != 2)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 1) || (r != 2) || (t != 1) || (b != 2)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 1) || (r != 3) || (t != 1) || (b != 3)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 1) || (r != 3) || (t != 1) || (b != 3)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 0) || (r != 4) || (t != 0) || (b != 4)); + + /* Mixed style padding */ + evas_object_textblock_text_markup_set(tb, + "TestTest"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 1) || (r != 4) || (t != 1) || (b != 4)); + + END_TB_TEST(); +} +END_TEST + +/* Various setters and getters */ +START_TEST(evas_textblock_set_get) +{ + START_TB_TEST(); + const char *buf = ""; + evas_object_textblock_text_markup_set(tb, buf); + fail_if(strcmp(evas_textblock_style_get(st), style_buf)); + fail_if(evas_object_textblock_style_get(tb) != st); + evas_object_textblock_replace_char_set(tb, "|"); + fail_if(strcmp(evas_object_textblock_replace_char_get(tb), "|")); + evas_object_textblock_replace_char_set(tb, "ש"); + fail_if(strcmp(evas_object_textblock_replace_char_get(tb), "ש")); + + evas_object_textblock_valign_set(tb, -1.0); + fail_if(evas_object_textblock_valign_get(tb) != 0.0); + evas_object_textblock_valign_set(tb, 0.0); + fail_if(evas_object_textblock_valign_get(tb) != 0.0); + evas_object_textblock_valign_set(tb, 0.432); + fail_if(evas_object_textblock_valign_get(tb) != 0.432); + evas_object_textblock_valign_set(tb, 1.0); + fail_if(evas_object_textblock_valign_get(tb) != 1.0); + evas_object_textblock_valign_set(tb, 1.5); + fail_if(evas_object_textblock_valign_get(tb) != 1.0); + + evas_object_textblock_bidi_delimiters_set(tb, ",.|"); + fail_if(strcmp(evas_object_textblock_bidi_delimiters_get(tb), ",.|")); + evas_object_textblock_bidi_delimiters_set(tb, ",|"); + fail_if(strcmp(evas_object_textblock_bidi_delimiters_get(tb), ",|")); + evas_object_textblock_bidi_delimiters_set(tb, NULL); + fail_if(evas_object_textblock_bidi_delimiters_get(tb)); + evas_object_textblock_bidi_delimiters_set(tb, ",|"); + fail_if(strcmp(evas_object_textblock_bidi_delimiters_get(tb), ",|")); + + /* Hinting */ + evas_object_textblock_text_markup_set(tb, "This isa test
bla"); + /* Force relayout */ + evas_object_textblock_size_formatted_get(tb, NULL, NULL); + evas_font_hinting_set(evas, EVAS_FONT_HINTING_NONE); + evas_font_hinting_set(evas, EVAS_FONT_HINTING_AUTO); + evas_font_hinting_set(evas, EVAS_FONT_HINTING_BYTECODE); + END_TB_TEST(); +} +END_TEST + +/* Aux evas stuff, such as scale. */ +START_TEST(evas_textblock_evas) +{ + Evas_Coord w, h, sw, sh; + START_TB_TEST(); + const char *buf = "Test"; + evas_object_textblock_text_markup_set(tb, buf); + evas_object_textblock_size_formatted_get(tb, &w, &h); + evas_object_scale_set(tb, 3.0); + evas_object_textblock_size_formatted_get(tb, &sw, &sh); + fail_if((sw <= w) || (sh <= h)); + + evas_object_scale_set(tb, 0.5); + evas_object_textblock_size_formatted_get(tb, &sw, &sh); + fail_if((sw >= w) || (sh >= h)); + + END_TB_TEST(); +} +END_TEST + +/* All the string escaping stuff */ +START_TEST(evas_textblock_escaping) +{ + int len; + START_TB_TEST(); + fail_if(strcmp(evas_textblock_escape_string_get("&"), "&")); + fail_if(strcmp(evas_textblock_string_escape_get("&", &len), "&")); + fail_if(len != 1); + + fail_if(strcmp(evas_textblock_escape_string_get("·"), "\xc2\xb7")); + fail_if(strcmp(evas_textblock_string_escape_get("\xc2\xb7", &len), + "·")); + fail_if(len != 2); + + fail_if(strcmp(evas_textblock_escape_string_get("👙"), + "\xF0\x9F\x91\x99")); + fail_if(strcmp(evas_textblock_escape_string_get("👙"), + "\xF0\x9F\x91\x99")); + + fail_if(evas_textblock_escape_string_get("·aa")); + const char *tmp = "·aa"; + fail_if(strcmp(evas_textblock_escape_string_range_get(tmp, tmp + 8), + "\xc2\xb7")); + fail_if(evas_textblock_escape_string_range_get(tmp, tmp + 9)); + fail_if(evas_textblock_escape_string_range_get(tmp, tmp + 7)); + fail_if(evas_textblock_escape_string_range_get(tmp, tmp + 5)); + + const char *buf = "This · is"; + evas_object_textblock_text_markup_set(tb, buf); + fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); + + buf = "This   is"; + evas_object_textblock_text_markup_set(tb, buf); + fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); + + END_TB_TEST(); +} +END_TEST + +START_TEST(evas_textblock_size) +{ + START_TB_TEST(); + Evas_Coord w, h, h2, nw, nh; + const char *buf = "This is a
test.
גם בעברית"; + /* When wrapping is off, native size should be the same as formatted + * size */ + + evas_object_textblock_size_formatted_get(tb, &w, &h); + evas_object_textblock_size_native_get(tb, &nw, &nh); + fail_if((w != nw) || (h != nh)); + fail_if(w != 0); + + evas_object_textblock_text_markup_set(tb, "a
a"); + evas_object_textblock_size_formatted_get(tb, &w, &h2); + evas_object_textblock_size_native_get(tb, &nw, &nh); + fail_if((w != nw) || (h2 != nh)); + + /* Two lines == double the height */ + fail_if(h * 2 != h2); + + evas_object_textblock_text_markup_set(tb, buf); + + evas_object_textblock_size_formatted_get(tb, &w, &h); + evas_object_textblock_size_native_get(tb, &nw, &nh); + fail_if((w != nw) || (h != nh)); + fail_if(w <= 0); + + /* FIXME: There is a lot more to be done. */ + END_TB_TEST(); +} +END_TEST + +void evas_test_textblock(TCase *tc) +{ + tcase_add_test(tc, evas_textblock_simple); + tcase_add_test(tc, evas_textblock_cursor); + tcase_add_test(tc, evas_textblock_size); + tcase_add_test(tc, evas_textblock_editing); + tcase_add_test(tc, evas_textblock_style); + tcase_add_test(tc, evas_textblock_evas); + tcase_add_test(tc, evas_textblock_text_getters); + tcase_add_test(tc, evas_textblock_formats); + tcase_add_test(tc, evas_textblock_format_removal); + tcase_add_test(tc, evas_textblock_escaping); + tcase_add_test(tc, evas_textblock_set_get); + tcase_add_test(tc, evas_textblock_geometries); + tcase_add_test(tc, evas_textblock_various); + tcase_add_test(tc, evas_textblock_wrapping); + tcase_add_test(tc, evas_textblock_items); +} + diff --git a/libraries/evas/src/tests/evas_tests_helpers.h b/libraries/evas/src/tests/evas_tests_helpers.h new file mode 100644 index 0000000..2ed0789 --- /dev/null +++ b/libraries/evas/src/tests/evas_tests_helpers.h @@ -0,0 +1,40 @@ +#ifndef EVAS_TEST_HELPERS_H +#define EVAS_TEST_HELPERS_H + +/* FIXME: Currently depends on the buffer engine, should we do anything + * fancier? */ + +#define EVAS_TEST_INIT_EVAS() _setup_evas() + +#define EVAS_TEST_FREE_EVAS() \ +do \ +{ \ + evas_textblock_cursor_free(cur); \ + evas_object_del(tb); \ + evas_textblock_style_free(st); \ + evas_free(evas); \ + evas_shutdown(); \ +} \ +while (0) + +static Evas * +_setup_evas() +{ + Evas *evas; + Evas_Engine_Info *einfo; + + evas_init(); + evas = evas_new(); + + evas_output_method_set(evas, evas_render_method_lookup("buffer")); + einfo = evas_engine_info_get(evas); + evas_engine_info_set(evas, einfo); + + evas_output_size_set(evas, 500, 500); + evas_output_viewport_set(evas, 0, 0, 500, 500); + + return evas; +} + +#endif + -- cgit v1.1