summaryrefslogtreecommitdiff
path: root/src/lib/ector/software/ector_software_buffer.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-12-15 19:58:43 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-01-05 15:43:43 +0900
commit1adc3cd915f9bd55337e37fb782bd1c38080478c (patch)
tree0136f4586d45d1c793fd82d2224e24bd502500a0 /src/lib/ector/software/ector_software_buffer.c
parent9bd36f7c434f6700979f61bf73d34734b1cd52f8 (diff)
ector: add drawable flag to buffers
This indicates that a buffer can be used as a source to draw pixels. Can't they all do that? Well, not exactly. A CPU buffer can't be drawn by the GPU... not directly at least. That's what this flag is for.
Diffstat (limited to 'src/lib/ector/software/ector_software_buffer.c')
-rw-r--r--src/lib/ector/software/ector_software_buffer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/ector/software/ector_software_buffer.c b/src/lib/ector/software/ector_software_buffer.c
index f96d05ad17..376228f5c8 100644
--- a/src/lib/ector/software/ector_software_buffer.c
+++ b/src/lib/ector/software/ector_software_buffer.c
@@ -63,6 +63,12 @@ _ector_software_buffer_base_pixels_clear(Eo *obj, Ector_Software_Buffer_Base_Dat
63 if (!pd->pixels.u8) 63 if (!pd->pixels.u8)
64 return; 64 return;
65 65
66 if (pd->internal.maps)
67 {
68 CRI("Can not call pixels_clear when the buffer is mapped.");
69 return;
70 }
71
66 eo_do(obj, eo_event_callback_call(ECTOR_GENERIC_BUFFER_EVENT_DETACHED, pd->pixels.u8)); 72 eo_do(obj, eo_event_callback_call(ECTOR_GENERIC_BUFFER_EVENT_DETACHED, pd->pixels.u8));
67 if (!pd->nofree) 73 if (!pd->nofree)
68 { 74 {
@@ -320,6 +326,7 @@ EOLIAN static Ector_Buffer_Flag
320_ector_software_buffer_base_ector_generic_buffer_flags_get(Eo *obj EINA_UNUSED, Ector_Software_Buffer_Base_Data *pd) 326_ector_software_buffer_base_ector_generic_buffer_flags_get(Eo *obj EINA_UNUSED, Ector_Software_Buffer_Base_Data *pd)
321{ 327{
322 return ECTOR_BUFFER_FLAG_CPU_READABLE | 328 return ECTOR_BUFFER_FLAG_CPU_READABLE |
329 ECTOR_BUFFER_FLAG_DRAWABLE |
323 ECTOR_BUFFER_FLAG_CPU_READABLE_FAST | 330 ECTOR_BUFFER_FLAG_CPU_READABLE_FAST |
324 ECTOR_BUFFER_FLAG_RENDERABLE | 331 ECTOR_BUFFER_FLAG_RENDERABLE |
325 (pd->writable ? (ECTOR_BUFFER_FLAG_CPU_WRITABLE | 332 (pd->writable ? (ECTOR_BUFFER_FLAG_CPU_WRITABLE |