summaryrefslogtreecommitdiff
path: root/src/lib/ector/software
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ector/software')
-rw-r--r--src/lib/ector/software/Ector_Software.h29
-rw-r--r--src/lib/ector/software/ector_renderer_software_image.c10
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.c16
-rw-r--r--src/lib/ector/software/ector_software_buffer.c8
-rw-r--r--src/lib/ector/software/meson.build14
5 files changed, 29 insertions, 48 deletions
diff --git a/src/lib/ector/software/Ector_Software.h b/src/lib/ector/software/Ector_Software.h
index 85529e6f21..249e8a638a 100644
--- a/src/lib/ector/software/Ector_Software.h
+++ b/src/lib/ector/software/Ector_Software.h
@@ -3,31 +3,7 @@
#include <Ector.h>
-#ifdef EAPI
-# undef EAPI
-#endif
-
-#ifdef _WIN32
-# ifdef EFL_BUILD
-# ifdef DLL_EXPORT
-# define EAPI __declspec(dllexport)
-# else
-# define EAPI
-# endif
-# else
-# define EAPI __declspec(dllimport)
-# endif
-#else
-# ifdef __GNUC__
-# if __GNUC__ >= 4
-# define EAPI __attribute__ ((visibility("default")))
-# else
-# define EAPI
-# endif
-# else
-# define EAPI
-# endif
-#endif
+#include "ector_api.h"
#ifdef EFL_BETA_API_SUPPORT
@@ -42,7 +18,4 @@
#endif
-#undef EAPI
-#define EAPI
-
#endif
diff --git a/src/lib/ector/software/ector_renderer_software_image.c b/src/lib/ector/software/ector_renderer_software_image.c
index e06e79d574..d7807ed518 100644
--- a/src/lib/ector/software/ector_renderer_software_image.c
+++ b/src/lib/ector/software/ector_renderer_software_image.c
@@ -106,6 +106,10 @@ _ector_renderer_software_image_ector_renderer_draw(Eo *obj EINA_UNUSED,
double im11, im12, im21, im22, im31, im32;
uint32_t *dst_buf, *src_buf;
int image_w, image_h;
+
+ int dst_buf_width = MIN(pd->boundary.x2, (int)pd->surface->rasterizer->fill_data.raster_buffer->generic->w);
+ int dst_buf_height = MIN(pd->boundary.y2, (int)pd->surface->rasterizer->fill_data.raster_buffer->generic->h);
+
ector_buffer_size_get(pd->image->buffer, &image_w, &image_h);
dst_buf = pd->surface->rasterizer->fill_data.raster_buffer->pixels.u32;
@@ -116,9 +120,9 @@ _ector_renderer_software_image_ector_renderer_draw(Eo *obj EINA_UNUSED,
&im31, &im32, NULL);
//Draw
- for (int local_y = pd->boundary.y1; local_y < pd->boundary.y2; local_y++)
+ for (int local_y = pd->boundary.y1; local_y < dst_buf_height; local_y++)
{
- for (int local_x = pd->boundary.x1; local_x < pd->boundary.x2; local_x++)
+ for (int local_x = pd->boundary.x1; local_x < dst_buf_width; local_x++)
{
uint32_t *dst = dst_buf + ((int)local_x + ((int)local_y * pix_stride));
int rx, ry;
@@ -140,7 +144,7 @@ _ector_renderer_software_image_ector_renderer_draw(Eo *obj EINA_UNUSED,
temp = draw_mul_256(pd->opacity, *src);
}
int inv_alpha = 255 - ((temp) >> 24);
- *dst = temp + draw_mul_256(inv_alpha, *dst);
+ *dst = temp + draw_mul_256(inv_alpha, *dst);
}
}
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c
index 0db1ea2a70..658a82e41f 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -271,7 +271,7 @@ typedef struct _Line
double y2;
}Line;
-static void
+static void
_line_value_set(Line *l, double x1, double y1, double x2, double y2)
{
l->x1 = x1;
@@ -281,7 +281,7 @@ _line_value_set(Line *l, double x1, double y1, double x2, double y2)
}
// approximate sqrt(x*x + y*y) using alpha max plus beta min algorithm.
-// With alpha = 1, beta = 3/8, giving results with the largest error less
+// With alpha = 1, beta = 3/8, giving results with the largest error less
// than 7% compared to the exact value.
static double
_line_length(Line *l)
@@ -339,7 +339,7 @@ _dasher_line_to(Dash_Stroker *dasher, double x, double y)
_outline_line_to(dasher->outline, x, y);
}
}
- else
+ else
{
while (line_len > dasher->cur_dash_length)
{
@@ -404,7 +404,7 @@ _dasher_cubic_to(Dash_Stroker *dasher, double cx1 , double cy1, double cx2, doub
_outline_cubic_to(dasher->outline, cx1, cy1, cx2, cy2, x, y);
}
}
- else
+ else
{
while (bez_len > dasher->cur_dash_length)
{
@@ -535,8 +535,8 @@ _need_update_rle(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
{
if (pd->task) return pd->task;
- if (!_generate_stroke_data(pd) &&
- !_generate_shape_data(pd))
+ if (!pd->base->visibility || (!_generate_stroke_data(pd) &&
+ !_generate_shape_data(pd)))
return NULL;
const Efl_Gfx_Path_Command *cmds;
@@ -654,8 +654,8 @@ _ector_renderer_software_shape_ector_renderer_draw(Eo *obj EINA_UNUSED,
if (task) ector_software_wait(_update_rle, _done_rle, task);
// adjust the offset
- x = pd->surface->x + (int)pd->base->origin.x;
- y = pd->surface->y + (int)pd->base->origin.y;
+ x = (int)pd->base->origin.x - pd->surface->x;
+ y = (int)pd->base->origin.y - pd->surface->y;
ector_software_rasterizer_clip_rect_set(pd->surface->rasterizer, clips);
ector_software_rasterizer_transform_set(pd->surface->rasterizer, pd->base->m);
diff --git a/src/lib/ector/software/ector_software_buffer.c b/src/lib/ector/software/ector_software_buffer.c
index 62dae2c50b..efaf5fefca 100644
--- a/src/lib/ector/software/ector_software_buffer.c
+++ b/src/lib/ector/software/ector_software_buffer.c
@@ -67,10 +67,10 @@ EOLIAN static Eina_Bool
_ector_software_buffer_base_ector_buffer_pixels_get(Eo *obj EINA_UNUSED, Ector_Software_Buffer_Base_Data *pd,
void **pixels, int* width, int* height, int* stride)
{
- if (*pixels) *pixels = pd->pixels.u8;
- if (*width) *width = pd->generic->w;
- if (*height) *height = pd->generic->h;
- if (*stride) *stride = pd->stride;
+ if (pixels) *pixels = pd->pixels.u8;
+ if (width) *width = pd->generic->w;
+ if (height) *height = pd->generic->h;
+ if (stride) *stride = pd->stride;
return pd->writable;
}
diff --git a/src/lib/ector/software/meson.build b/src/lib/ector/software/meson.build
index 7374252729..a87f66efa5 100644
--- a/src/lib/ector/software/meson.build
+++ b/src/lib/ector/software/meson.build
@@ -33,6 +33,7 @@ foreach eo_file : pub_eo_files
'-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
'-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
'-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
+ '-e', 'ECTOR_API',
'-gchd', '@INPUT@'])
endforeach
@@ -48,8 +49,11 @@ if cpu_sse3 == true
endif
-if get_option('install-eo-files')
- install_data(pub_eo_files,
- install_dir: join_paths(eolian_include_dir, package_version_name)
- )
-endif
+#
+# Only enable that again when the namespace problems are fixed. ref T8648
+#
+#if get_option('install-eo-files')
+# install_data(pub_eo_files,
+# install_dir: join_paths(eolian_include_dir, package_version_name)
+# )
+#endif