],
[ build_pthreads="no" ]
)
-### disable pthreads by default for now - some wierd deadlock issue with
-# barriers (makes no sense)
-#build_pthreads="no"
+
+#######################################
+## Pthread
AC_MSG_CHECKING(whether to build pthread code)
AC_ARG_ENABLE(pthreads,
AC_HELP_STRING([--enable-pthreads], [enable threaded rendering]),
)
#######################################
+## Pipe Renderer
+build_pipe_render="no"
+AC_MSG_CHECKING(whether to build Threaded Pipe Rendering support)
+AC_ARG_ENABLE(pipe-render,
+ AC_HELP_STRING([--enable-pipe-render], [enable threaded pipe rendering support]),
+ [ build_pipe_render=$enableval ]
+)
+AC_MSG_RESULT($build_pipe_render)
+
+AC_MSG_CHECKING(whether we can build Threaded Pipe Rendering support)
+if test \( "x$build_pipe_render" = "xyes" -o "x$build_pipe_render" = "xauto" \); then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(BUILD_PIPE_RENDER, 1, [Build pipe render support])
+ build_pipe_render="yes"
+ need_pthreads="yes"
+else
+ AC_MSG_RESULT(no)
+ build_pipe_render="no"
+fi
+
+#######################################
## Async events
build_async_events="auto"
AC_MSG_CHECKING(whether to build Async Events support)
echo " Thread Support..........: $build_pthreads"
echo " MAGIC_DEBUG.............: $want_evas_magic_debug"
echo
+echo "Threaded Pipe Rendering...: $build_pipe_render"
echo "Async Events..............: $build_async_events"
echo "Async Image Preload.......: $build_async_preload"
echo
{
RGBA_Image *im = (RGBA_Image *) ie;
+#ifdef BUILD_PIPE_RENDER
evas_common_pipe_free(im);
+#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
#include "evas_common.h"
+#ifdef BUILD_PIPE_RENDER
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);
op->free_func = evas_common_pipe_op_image_free;
evas_common_pipe_draw_context_copy(dc, op);
}
+#endif
#define _GNU_SOURCE
#endif
+#ifndef BUILD_PTHREAD
+#undef BUILD_PIPE_RENDER
+#endif
+
#ifdef BUILD_PTHREAD
#ifndef __USE_GNU
typedef struct _Evas_Cache_Target Evas_Cache_Target;
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;
Evas_Bool anti_alias : 1;
};
+#ifdef BUILD_PIPE_RENDER
struct _RGBA_Pipe_Op
{
RGBA_Draw_Context context;
RGBA_Image *im;
int x, y, w, h;
};
+#endif
struct _RGBA_Image
{
} info;
void *extended_info;
+#ifdef BUILD_PIPE_RENDER
RGBA_Pipe *pipe;
+#endif
int ref;
/* unsigned char scale; */
#include "../engines/common/evas_draw.h"
/****/
-#include "../engines/common/evas_pipe.h"
-
+#ifdef BUILD_PIPE_RENDER
+# include "../engines/common/evas_pipe.h"
+#endif
+
void evas_font_dir_cache_free(void);
/****/
Render_Engine *re;
re = (Render_Engine *)data;
+#ifdef BUILD_PIPE_RENDER
evas_common_pipe_begin(surface);
evas_common_pipe_flush(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();
Render_Engine *re;
re = (Render_Engine *)data;
+#ifdef BUILD_PIPE_RENDER
evas_common_pipe_begin(surface);
evas_common_pipe_flush(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();
Render_Engine *re;
re = (Render_Engine *)data;
+#ifdef BUILD_PIPE_RENDER
evas_common_pipe_begin(surface);
evas_common_pipe_flush(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_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x, int y, int w, int h)
{
-#ifdef BUILD_PTHREAD
+#ifdef BUILD_PIPE_RENDER
if (cpunum > 1)
evas_common_pipe_rectangle_draw(surface, context, x, y, w, h);
else
static void
eng_line_draw(void *data __UNUSED__, void *context, void *surface, int x1, int y1, int x2, int y2)
{
-#ifdef BUILD_PTHREAD
+#ifdef BUILD_PIPE_RENDER
if (cpunum > 1)
evas_common_pipe_line_draw(surface, context, x1, y1, x2, y2);
else
static void
eng_polygon_draw(void *data __UNUSED__, void *context, void *surface, void *polygon)
{
-#ifdef BUILD_PTHREAD
+#ifdef BUILD_PIPE_RENDER
if (cpunum > 1)
evas_common_pipe_poly_draw(surface, context, polygon);
else
static void
eng_gradient2_linear_draw(void *data __UNUSED__, void *context, void *surface, void *linear_gradient, int x, int y, int w, int h)
{
-#ifdef BUILD_PTHREAD
+#ifdef BUILD_PIPE_RENDER
if (cpunum > 1)
evas_common_pipe_grad2_draw(surface, context, x, y, w, h, linear_gradient);
else
static void
eng_gradient2_radial_draw(void *data __UNUSED__, void *context, void *surface, void *radial_gradient, int x, int y, int w, int h)
{
-#ifdef BUILD_PTHREAD
+#ifdef BUILD_PIPE_RENDER
if (cpunum > 1)
evas_common_pipe_grad2_draw(surface, context, x, y, w, h, radial_gradient);
else
static void
eng_gradient_draw(void *data __UNUSED__, void *context, void *surface, void *gradient, int x, int y, int w, int h)
{
-#ifdef BUILD_PTHREAD
+#ifdef BUILD_PIPE_RENDER
if (cpunum > 1)
evas_common_pipe_grad_draw(surface, context, x, y, w, h, gradient);
else
src_x, src_y, src_w, src_h,
dst_x, dst_y, dst_w, dst_h);
-#ifdef BUILD_PTHREAD
+#ifdef BUILD_PIPE_RENDER
if (cpunum > 1)
evas_common_pipe_image_draw(im, surface, context, smooth,
src_x, src_y, src_w, src_h,
static void
eng_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 char *text)
{
-#ifdef BUILD_PTHREAD
+#ifdef BUILD_PIPE_RENDER
if (cpunum > 1)
evas_common_pipe_text_draw(surface, context, font, x, y, text);
else
Evas_Engine_Info_Software_Qtopia *info;
re = (Render_Engine *)data;
+#ifdef BUILD_PIPE_RENDER
evas_common_pipe_begin(surface);
evas_common_pipe_flush(surface);
+#endif
evas_qtopia_outbuf_software_qtopia_push_updated_region(re->ob, surface, x, y, w, h);
evas_qtopia_outbuf_software_qtopia_free_region_for_update(re->ob, surface);
evas_common_cpu_end_opt();
Render_Engine *re;
re = (Render_Engine *)data;
+#ifdef BUILD_PIPE_RENDER
evas_common_pipe_begin(surface);
evas_common_pipe_flush(surface);
+#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();