summaryrefslogtreecommitdiff
path: root/src/lib/ecore_buffer/shared_buffer.h
diff options
context:
space:
mode:
authorSeunghun Lee <beauty.positive3@gmail.com>2015-06-22 10:23:54 -0400
committerChris Michael <cp.michael@samsung.com>2015-06-22 10:31:42 -0400
commit8b621775619b9959fe952b095b3baaa7aaa99572 (patch)
tree99059a841a79729cac4687ea41f3abf672e6e455 /src/lib/ecore_buffer/shared_buffer.h
parent3671506ad39d2a956e388e151bd20f1b9ffd62a5 (diff)
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
Diffstat (limited to 'src/lib/ecore_buffer/shared_buffer.h')
-rw-r--r--src/lib/ecore_buffer/shared_buffer.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/lib/ecore_buffer/shared_buffer.h b/src/lib/ecore_buffer/shared_buffer.h
new file mode 100644
index 0000000000..ce168de3dd
--- /dev/null
+++ b/src/lib/ecore_buffer/shared_buffer.h
@@ -0,0 +1,41 @@
1#ifndef _SHARED_BUFFER_H_
2# define _SHARED_BUFFER_H_
3
4#include <stdio.h>
5#include <Eina.h>
6#include <Ecore_Buffer.h>
7
8#include "bq_mgr_protocol.h"
9#include "ecore_buffer_private.h"
10
11typedef struct _Shared_Buffer Shared_Buffer;
12
13typedef enum _Shared_Buffer_State
14{
15 // common
16 SHARED_BUFFER_STATE_UNKNOWN,
17 SHARED_BUFFER_STATE_ENQUEUE,
18 // provider side type
19 SHARED_BUFFER_STATE_NEW,
20 SHARED_BUFFER_STATE_SUBMIT,
21 SHARED_BUFFER_STATE_DEQUEUE,
22 // consumer side type
23 SHARED_BUFFER_STATE_ATTACH,
24 SHARED_BUFFER_STATE_IMPORT,
25 SHARED_BUFFER_STATE_DETACH,
26 SHARED_BUFFER_STATE_ACQUIRE,
27 SHARED_BUFFER_STATE_RELEASE,
28} Shared_Buffer_State;
29
30Shared_Buffer *_shared_buffer_new(const char *engine, struct bq_buffer *resource, int w, int h, int format, unsigned int flags);
31void _shared_buffer_free(Shared_Buffer *sb);
32Eina_Bool _shared_buffer_info_get(Shared_Buffer *sb, const char **engine, int *w, int *h, int *format, unsigned int *flags);
33Eina_Bool _shared_buffer_buffer_set(Shared_Buffer *sb, Ecore_Buffer *buffer);
34Ecore_Buffer *_shared_buffer_buffer_get(Shared_Buffer *sb);
35Eina_Bool _shared_buffer_resource_set(Shared_Buffer *sb, struct bq_buffer *resource);
36struct bq_buffer *_shared_buffer_resource_get(Shared_Buffer *sb);
37void _shared_buffer_state_set(Shared_Buffer *sb, Shared_Buffer_State state);
38Shared_Buffer_State _shared_buffer_state_get(Shared_Buffer *sb);
39const char *_shared_buffer_state_string_get(Shared_Buffer *sb);
40
41#endif /* _SHARED_BUFFER_H_ */