ecore-buffer: Add ecore_buffer library to EFL.
Summary:
Ecore_Buffer is abstraction of graphic buffer.
it supports backend of shm, x11_dri2 and x11_dri3 for now,
and this library also provides method to share buffers between processes.
Ecore_Buffer_Provider and Ecore_Buffer_Consumer is for this, sharing buffer.
provider draws something in to Ecore_Buffer, and consumer receives and displays it.
the binary, bq_mgr is a connection maker for buffer provider and consumer.
it can be included Enlightenment as a deamon later.
@feature
Test Plan:
1. Configure with --enable-ecore-buffer and --enable-always-build-examples to build examples.
2. Run bq_mgr, it connects consumer and provider.
3. Run ecore_buffer_provider_example and ecore_buffer_consumer_example
Reviewers: lsj119, gwanglim, cedric, zmike, jpeg, raster, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2197
2015-06-22 07:23:54 -07:00
|
|
|
#include <Ecore_Buffer_Queue.h>
|
|
|
|
#include "ecore_buffer_private.h"
|
|
|
|
#include "ecore_buffer_con.h"
|
|
|
|
|
|
|
|
int _ecore_buffer_queue_log_dom = -1;
|
|
|
|
static int _ecore_buffer_queue_init_count = 0;
|
|
|
|
|
2020-10-29 09:33:18 -07:00
|
|
|
ECORE_BUFFER_API int
|
ecore-buffer: Add ecore_buffer library to EFL.
Summary:
Ecore_Buffer is abstraction of graphic buffer.
it supports backend of shm, x11_dri2 and x11_dri3 for now,
and this library also provides method to share buffers between processes.
Ecore_Buffer_Provider and Ecore_Buffer_Consumer is for this, sharing buffer.
provider draws something in to Ecore_Buffer, and consumer receives and displays it.
the binary, bq_mgr is a connection maker for buffer provider and consumer.
it can be included Enlightenment as a deamon later.
@feature
Test Plan:
1. Configure with --enable-ecore-buffer and --enable-always-build-examples to build examples.
2. Run bq_mgr, it connects consumer and provider.
3. Run ecore_buffer_provider_example and ecore_buffer_consumer_example
Reviewers: lsj119, gwanglim, cedric, zmike, jpeg, raster, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2197
2015-06-22 07:23:54 -07:00
|
|
|
ecore_buffer_queue_init(void)
|
|
|
|
{
|
|
|
|
if (++_ecore_buffer_queue_init_count != 1)
|
|
|
|
return _ecore_buffer_queue_init_count;
|
|
|
|
|
|
|
|
_ecore_buffer_queue_log_dom =
|
|
|
|
eina_log_domain_register("ecore_buffer_queue", EINA_COLOR_GREEN);
|
|
|
|
|
|
|
|
if (_ecore_buffer_queue_log_dom < 0)
|
|
|
|
{
|
|
|
|
EINA_LOG_ERR("Could not register log domain: ecore_buffer_queue");
|
|
|
|
goto err;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
eina_log_abort_on_critical_level_set(EINA_LOG_LEVEL_ERR);
|
|
|
|
eina_log_abort_on_critical_set(EINA_TRUE);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
DBG("Ecore_Buffer_Queue Init");
|
|
|
|
|
|
|
|
if (!_ecore_buffer_con_init())
|
|
|
|
{
|
|
|
|
eina_log_domain_unregister(_ecore_buffer_queue_log_dom);
|
|
|
|
_ecore_buffer_queue_log_dom = -1;
|
|
|
|
goto err;
|
|
|
|
}
|
|
|
|
|
|
|
|
return _ecore_buffer_queue_init_count;
|
|
|
|
err:
|
|
|
|
return --_ecore_buffer_queue_init_count;
|
|
|
|
}
|
|
|
|
|
2020-10-29 09:33:18 -07:00
|
|
|
ECORE_BUFFER_API int
|
ecore-buffer: Add ecore_buffer library to EFL.
Summary:
Ecore_Buffer is abstraction of graphic buffer.
it supports backend of shm, x11_dri2 and x11_dri3 for now,
and this library also provides method to share buffers between processes.
Ecore_Buffer_Provider and Ecore_Buffer_Consumer is for this, sharing buffer.
provider draws something in to Ecore_Buffer, and consumer receives and displays it.
the binary, bq_mgr is a connection maker for buffer provider and consumer.
it can be included Enlightenment as a deamon later.
@feature
Test Plan:
1. Configure with --enable-ecore-buffer and --enable-always-build-examples to build examples.
2. Run bq_mgr, it connects consumer and provider.
3. Run ecore_buffer_provider_example and ecore_buffer_consumer_example
Reviewers: lsj119, gwanglim, cedric, zmike, jpeg, raster, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2197
2015-06-22 07:23:54 -07:00
|
|
|
ecore_buffer_queue_shutdown(void)
|
|
|
|
{
|
|
|
|
if (--_ecore_buffer_queue_init_count != 0)
|
|
|
|
return _ecore_buffer_queue_init_count;
|
|
|
|
|
|
|
|
DBG("Ecore_Buffer_Queue Shutdown");
|
|
|
|
_ecore_buffer_con_shutdown();
|
|
|
|
eina_log_domain_unregister(_ecore_buffer_queue_log_dom);
|
|
|
|
_ecore_buffer_queue_log_dom = -1;
|
|
|
|
|
|
|
|
return _ecore_buffer_queue_init_count;
|
|
|
|
}
|