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-08 17:29:54 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-01-05 15:43:43 +0900
commit7a8879ba8bf5d9aec15428f94222222eea6c0e2e (patch)
tree0ccf55e8242dff190ec53d27aa4ac42308dbea88 /src/lib/ector/software/ector_software_buffer.c
parent85f23d96e7072f09ab73ab698047c3c172974b5e (diff)
ector: add engine-specific evas image buffer wrapper
Since Evas still relies entirely on Image_Entry and Evas_GL_Image, we will need an engine-specific wrapper object creating a Buffer around an existing cached image. Currently only SW support is implemented. GL will be more fun to do (with glReadPixels and whatnot).
Diffstat (limited to 'src/lib/ector/software/ector_software_buffer.c')
-rw-r--r--src/lib/ector/software/ector_software_buffer.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/ector/software/ector_software_buffer.c b/src/lib/ector/software/ector_software_buffer.c
index 89a2cc1995..26c1329cda 100644
--- a/src/lib/ector/software/ector_software_buffer.c
+++ b/src/lib/ector/software/ector_software_buffer.c
@@ -72,8 +72,16 @@ _ector_software_buffer_base_ector_generic_buffer_pixels_set(Eo *obj, Ector_Softw
72 unsigned char l, unsigned char r, 72 unsigned char l, unsigned char r,
73 unsigned char t, unsigned char b) 73 unsigned char t, unsigned char b)
74{ 74{
75 unsigned px;
76
77 if (pd->generic->immutable)
78 {
79 ERR("This buffer is immutable.");
80 return EINA_FALSE;
81 }
82
75 // safety check 83 // safety check
76 unsigned px = _min_stride_calc(1, cspace); 84 px = _min_stride_calc(1, cspace);
77 if (px && ((unsigned long long)(uintptr_t)pixels) & (px - 1)) 85 if (px && ((unsigned long long)(uintptr_t)pixels) & (px - 1))
78 ERR("Pixel data is not aligned to %u bytes!", px); 86 ERR("Pixel data is not aligned to %u bytes!", px);
79 87