forked from enlightenment/efl
fix warnings in async render code.. and well.. warn about it - it
crashes for me in expedite with 4 cores on x86 at random points. looks like it's bitrotting. though it was relatively tentative to begin with. SVN revision: 53856
This commit is contained in:
parent
79ec0e7975
commit
3a9d3268d2
|
@ -774,15 +774,12 @@ another core in the meantime allowing for higher framerates with
|
|||
software rendering, using more cpu resources that are available on
|
||||
modern multi-core cpu's.
|
||||
|
||||
This has been tested on x86 desktop and laptop cpu's with 2 and 4
|
||||
cores and it works well, but there seem to be some issues on tested
|
||||
multi-core ARM platforms like the nvidia tegra2. The source of issue is
|
||||
unknown but you will notice rendering bugs with missing content or
|
||||
incorrectly drawn content. This requires you also set the environment
|
||||
variable EVAS_RENDER_MODE to "non-blocking" to enable it at runtime,
|
||||
as the compile-time enable simply sets up the feature to be ready to
|
||||
work. The runtime switch actually turns it on. If you don't plan to
|
||||
use this feature, don't enable it in the build as there is a general
|
||||
This is buggy! it will likely cause crashes and rendering corruption.
|
||||
Do not enable it unless you plan to actually work on it. This requires you
|
||||
also set the environment variable EVAS_RENDER_MODE to "non-blocking" to
|
||||
enable it at runtime, as the compile-time enable simply sets up the feature
|
||||
to be ready to work. The runtime switch actually turns it on. If you don't
|
||||
plan to use this feature, don't enable it in the build as there is a general
|
||||
performance hit of maintaining this feature at all, so beware that
|
||||
enabling it for single core systems will likely take a performance hit.
|
||||
|
||||
|
|
|
@ -1834,7 +1834,7 @@ evas_object_image_colorspace_set(Evas_Object *obj, Evas_Colorspace cspace)
|
|||
MAGIC_CHECK_END();
|
||||
|
||||
#ifdef EVAS_FRAME_QUEUING
|
||||
if (o->cur.cspace != cspace)
|
||||
if ((Evas_Colorspace)o->cur.cspace != cspace)
|
||||
{
|
||||
if (o->engine_data)
|
||||
evas_common_pipe_op_image_flush(o->engine_data);
|
||||
|
|
|
@ -63,6 +63,10 @@ EAPI int evas_common_font_query_char_coords (RGBA_Font *fn, con
|
|||
EAPI int evas_common_font_query_char_at_coords (RGBA_Font *fn, const Eina_Unicode *text, const Evas_BiDi_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 Eina_Unicode *text, const Evas_BiDi_Props *intl_props, int x, int y);
|
||||
|
||||
#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);
|
||||
|
||||
|
|
|
@ -38,9 +38,7 @@ evas_common_surface_dealloc(Evas_Surface *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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +49,7 @@ evas_common_surface_add(Evas_Frame *frame, Evas_Surface *surface)
|
|||
}
|
||||
|
||||
static Evas_Frame *
|
||||
evas_common_frame_alloc()
|
||||
evas_common_frame_alloc(void)
|
||||
{
|
||||
Evas_Frame *frame;
|
||||
|
||||
|
@ -73,7 +71,7 @@ evas_common_frame_add(Evas_FrameQ *frameq, Evas_Frame *frame)
|
|||
Evas_Frame *temp_frame;
|
||||
|
||||
LKL(frameq->mutex);
|
||||
while(eina_inlist_count(EINA_INLIST_GET(frameq->frames)) >= frameq->frameq_sz)
|
||||
while ((int)eina_inlist_count(EINA_INLIST_GET(frameq->frames)) >= frameq->frameq_sz)
|
||||
{
|
||||
/* wait a worker thread finish previous frame */
|
||||
pthread_cond_wait(&(frameq->cond_done), &(frameq->mutex));
|
||||
|
@ -124,7 +122,7 @@ evas_common_frameq_set_frame_data(void *data,
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_frameq_prepare_frame()
|
||||
evas_common_frameq_prepare_frame(void)
|
||||
{
|
||||
if (!gframeq.cur_frame )
|
||||
{
|
||||
|
@ -133,7 +131,7 @@ evas_common_frameq_prepare_frame()
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_frameq_ready_frame()
|
||||
evas_common_frameq_ready_frame(void)
|
||||
{
|
||||
if (gframeq.cur_frame)
|
||||
{
|
||||
|
@ -144,7 +142,7 @@ evas_common_frameq_ready_frame()
|
|||
|
||||
|
||||
EAPI void
|
||||
evas_common_frameq_init()
|
||||
evas_common_frameq_init(void)
|
||||
{
|
||||
gframeq.frames = NULL;
|
||||
pthread_cond_init(&(gframeq.cond_new), NULL);
|
||||
|
@ -156,7 +154,7 @@ evas_common_frameq_init()
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_frameq_destroy()
|
||||
evas_common_frameq_destroy(void)
|
||||
{
|
||||
#if 0 // let them destroyed indirectly with program exit
|
||||
LKL(gframeq.mutex);
|
||||
|
@ -172,7 +170,7 @@ evas_common_frameq_destroy()
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_frameq_flush()
|
||||
evas_common_frameq_flush(void)
|
||||
{
|
||||
if (! evas_common_frameq_enabled())
|
||||
return;
|
||||
|
@ -188,19 +186,19 @@ evas_common_frameq_flush()
|
|||
|
||||
|
||||
EAPI void
|
||||
evas_common_frameq_flush_ready ()
|
||||
evas_common_frameq_flush_ready(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
evas_common_frameq_get_frameq_sz()
|
||||
evas_common_frameq_get_frameq_sz(void)
|
||||
{
|
||||
return gframeq.frameq_sz;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
evas_common_frameq_enabled()
|
||||
evas_common_frameq_enabled(void)
|
||||
{
|
||||
return gframeq.initialised;
|
||||
}
|
||||
|
@ -528,13 +526,14 @@ _IQ_insert(long long ready_time, long long last_interval)
|
|||
}
|
||||
|
||||
static long long
|
||||
_IQ_delete()
|
||||
_IQ_delete(void)
|
||||
{
|
||||
struct iq_node oldest;
|
||||
|
||||
if (_IQ_empty()) return 0;
|
||||
oldest = _IQ[_IQ_head];
|
||||
_IQ_head = ++_IQ_head % INTERVAL_QSIZE;
|
||||
if (--_IQ_length == 0)
|
||||
_IQ_head = (_IQ_head + 1) % INTERVAL_QSIZE;
|
||||
if ((--_IQ_length) == 0)
|
||||
{
|
||||
_IQ_init();
|
||||
}
|
||||
|
@ -548,7 +547,7 @@ _IQ_delete()
|
|||
}
|
||||
|
||||
static long long
|
||||
get_max_interval()
|
||||
get_max_interval(void)
|
||||
{
|
||||
int i;
|
||||
long long max = LLONG_MIN;
|
||||
|
@ -576,8 +575,7 @@ tv_to_long_long(struct timeval *tv)
|
|||
}
|
||||
|
||||
static long long
|
||||
evas_common_frameq_schedule_flush_time(
|
||||
int frameq_sz, int thread_no,
|
||||
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)
|
||||
|
@ -706,10 +704,8 @@ evas_common_frameq_thread_post(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;
|
||||
Eina_List *pending_writes = NULL;
|
||||
Eina_List *prev_pending_writes = NULL;
|
||||
|
||||
|
@ -856,7 +852,7 @@ evas_common_pipe_begin(RGBA_Image *im)
|
|||
|
||||
#ifdef EVAS_FRAME_QUEUING
|
||||
EAPI void
|
||||
evas_common_frameq_begin()
|
||||
evas_common_frameq_begin(void)
|
||||
{
|
||||
#ifdef BUILD_PTHREAD
|
||||
int i;
|
||||
|
@ -866,7 +862,7 @@ evas_common_frameq_begin()
|
|||
|
||||
if (!gframeq.initialised)
|
||||
{
|
||||
int cpunum, set_cpu_affinity;
|
||||
int cpunum, set_cpu_affinity = 0;
|
||||
|
||||
cpunum = eina_cpu_count();
|
||||
gframeq.thread_num = cpunum;
|
||||
|
@ -926,7 +922,7 @@ evas_common_frameq_begin()
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_frameq_finish()
|
||||
evas_common_frameq_finish(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -957,14 +953,8 @@ evas_common_frameq_finish()
|
|||
EAPI void
|
||||
evas_common_pipe_flush(RGBA_Image *im)
|
||||
{
|
||||
|
||||
RGBA_Pipe *p;
|
||||
int i;
|
||||
|
||||
if (!im->cache_entry.pipe) return;
|
||||
|
||||
#ifndef EVAS_FRAME_QUEUING
|
||||
|
||||
#ifdef BUILD_PTHREAD
|
||||
if (thread_num > 1)
|
||||
{
|
||||
|
@ -974,6 +964,9 @@ evas_common_pipe_flush(RGBA_Image *im)
|
|||
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)
|
||||
{
|
||||
|
@ -1047,8 +1040,7 @@ evas_common_pipe_rectangle_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
|
||||
int x, int y, int w, int h)
|
||||
evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
|
||||
{
|
||||
RGBA_Pipe_Op *op;
|
||||
|
||||
|
|
|
@ -75,8 +75,13 @@ EAPI void evas_common_frameq_set_frame_data(void *data,
|
|||
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
|
||||
|
@ -90,6 +95,7 @@ EAPI void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGB
|
|||
EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Eina_Unicode *text, const Evas_BiDi_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_map4_begin(RGBA_Image *root);
|
||||
EAPI void evas_common_pipe_map4_draw(RGBA_Image *src, RGBA_Image *dst,
|
||||
RGBA_Draw_Context *dc, RGBA_Map_Point *p,
|
||||
int smooth, int level);
|
||||
|
|
|
@ -1089,9 +1089,8 @@ 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)
|
||||
evas_software_xlib_outbuf_set_priv(Outbuf *buf, void *cur, void *prev __UNUSED__)
|
||||
{
|
||||
buf->priv.pending_writes = (Eina_List *)cur;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue