[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] gsoc-anurag-2023 180f1e047: [dense] Add compilation flags fo
From: |
Werner Lemberg |
Subject: |
[freetype2] gsoc-anurag-2023 180f1e047: [dense] Add compilation flags for meson |
Date: |
Sat, 17 Jun 2023 11:28:11 -0400 (EDT) |
branch: gsoc-anurag-2023
commit 180f1e0474904025f5d2f92fea37d4ace65b602d
Author: Anurag Thakur <anurag105csec21@bpitindia.edu.in>
Commit: Anurag Thakur <anurag105csec21@bpitindia.edu.in>
[dense] Add compilation flags for meson
---
builds/meson/parse_modules_cfg.py | 1 +
meson.build | 9 ++++++++-
src/dense/ftdense.c | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/builds/meson/parse_modules_cfg.py
b/builds/meson/parse_modules_cfg.py
index d48129fe7..bd65d02a8 100644
--- a/builds/meson/parse_modules_cfg.py
+++ b/builds/meson/parse_modules_cfg.py
@@ -87,6 +87,7 @@ def generate_ftmodule(lists):
names = {
"raster": ("ft_raster1",),
"smooth": ("ft_smooth",),
+ "dense": ("ft_dense",),
"svg": ("ft_svg",),
"sdf": ("ft_sdf", "ft_bitmap_sdf"),
}.get(module)
diff --git a/meson.build b/meson.build
index f81de3e2f..e0acfb77c 100644
--- a/meson.build
+++ b/meson.build
@@ -395,6 +395,13 @@ if use_unix_ftsystem_c
endif
+if cc.get_id() == 'msvc'
+ ft2_defines += ['/arch:AVX']
+else
+ ft2_defines += ['-msse4.1']
+endif
+
+
ft2_lib = library('freetype',
sources: ft2_sources + [ftmodule_h],
c_args: ft2_defines,
@@ -403,7 +410,7 @@ ft2_lib = library('freetype',
dependencies: ft2_deps,
install: true,
version: ft2_so_version,
- link_args: common_ldflags,
+ link_args: common_ldflags + ['-lm'],
)
diff --git a/src/dense/ftdense.c b/src/dense/ftdense.c
index e95e0ae63..3a2878750 100644
--- a/src/dense/ftdense.c
+++ b/src/dense/ftdense.c
@@ -154,7 +154,7 @@ dense_render_line( dense_worker* worker, FT_Pos tox, FT_Pos
toy )
{
int linestart = y * worker->m_w;
- FT26D6 dy = min( (y + 1)<<6, to_y ) - max( y<<6, from_y );
+ FT26D6 dy = FT_MIN( (y + 1)<<6, to_y ) - FT_MAX( y<<6, from_y );
m_a[linestart + x0i] += dir*dy*(64 - x + x0floor);
m_a[linestart + ( x0i + 1 )] += dir*dy*(x-x0floor);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] gsoc-anurag-2023 180f1e047: [dense] Add compilation flags for meson,
Werner Lemberg <=