forked from enlightenment/efl
make pipe renderer separate to thread support - off by default.
SVN revision: 39740
This commit is contained in:
parent
3335fef2aa
commit
1a224311d6
|
@ -394,9 +394,9 @@ AC_CHECK_HEADERS(pthread.h sched.h,
|
|||
],
|
||||
[ 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]),
|
||||
|
@ -428,6 +428,27 @@ AC_ARG_ENABLE(pthreads,
|
|||
]
|
||||
)
|
||||
|
||||
#######################################
|
||||
## 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"
|
||||
|
@ -1097,6 +1118,7 @@ echo " NEON....................: $build_cpu_neon"
|
|||
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
|
||||
|
|
|
@ -140,7 +140,9 @@ _evas_common_rgba_image_delete(Image_Entry *ie)
|
|||
{
|
||||
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
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#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);
|
||||
|
@ -670,3 +671,4 @@ evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst,
|
|||
op->free_func = evas_common_pipe_op_image_free;
|
||||
evas_common_pipe_draw_context_copy(dc, op);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -78,6 +78,10 @@
|
|||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#ifndef BUILD_PTHREAD
|
||||
#undef BUILD_PIPE_RENDER
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_PTHREAD
|
||||
|
||||
#ifndef __USE_GNU
|
||||
|
@ -287,9 +291,11 @@ typedef struct _Engine_Image_Entry Engine_Image_Entry;
|
|||
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;
|
||||
|
@ -543,6 +549,7 @@ struct _RGBA_Draw_Context
|
|||
Evas_Bool anti_alias : 1;
|
||||
};
|
||||
|
||||
#ifdef BUILD_PIPE_RENDER
|
||||
struct _RGBA_Pipe_Op
|
||||
{
|
||||
RGBA_Draw_Context context;
|
||||
|
@ -595,6 +602,7 @@ struct _RGBA_Pipe_Thread_Info
|
|||
RGBA_Image *im;
|
||||
int x, y, w, h;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct _RGBA_Image
|
||||
{
|
||||
|
@ -611,7 +619,9 @@ struct _RGBA_Image
|
|||
} info;
|
||||
|
||||
void *extended_info;
|
||||
#ifdef BUILD_PIPE_RENDER
|
||||
RGBA_Pipe *pipe;
|
||||
#endif
|
||||
int ref;
|
||||
|
||||
/* unsigned char scale; */
|
||||
|
@ -1111,7 +1121,9 @@ Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
|
|||
#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);
|
||||
|
||||
|
|
|
@ -297,8 +297,10 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
|
|||
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();
|
||||
|
|
|
@ -222,8 +222,10 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
|
|||
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();
|
||||
|
|
|
@ -282,8 +282,10 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
|
|||
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();
|
||||
|
|
|
@ -142,7 +142,7 @@ eng_context_render_op_get(void *data __UNUSED__, void *context)
|
|||
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
|
||||
|
@ -156,7 +156,7 @@ eng_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x, i
|
|||
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
|
||||
|
@ -182,7 +182,7 @@ eng_polygon_points_clear(void *data __UNUSED__, void *context __UNUSED__, void *
|
|||
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
|
||||
|
@ -276,7 +276,7 @@ eng_gradient2_linear_render_post(void *data __UNUSED__, void *linear_gradient __
|
|||
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
|
||||
|
@ -343,7 +343,7 @@ eng_gradient2_radial_render_post(void *data __UNUSED__, void *radial_gradient __
|
|||
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
|
||||
|
@ -476,7 +476,7 @@ eng_gradient_render_post(void *data __UNUSED__, void *gradient __UNUSED__)
|
|||
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
|
||||
|
@ -744,7 +744,7 @@ eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image,
|
|||
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,
|
||||
|
@ -890,7 +890,7 @@ eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const char *text,
|
|||
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
|
||||
|
|
|
@ -237,8 +237,10 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
|
|||
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();
|
||||
|
|
|
@ -584,8 +584,10 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
|
|||
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();
|
||||
|
|
Loading…
Reference in New Issue