From: j-p Date: Mon, 15 Nov 2021 16:23:06 +0000 (+0100) Subject: debug X-Git-Tag: v0.2.0~59^2 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=refs%2Fpull%2F53%2Fhead;p=jp%2Fvkvg.git debug --- diff --git a/include/vkvg-nsvg.h b/include/vkvg-nsvg.h index 3e1044a..acf4969 100644 --- a/include/vkvg-nsvg.h +++ b/include/vkvg-nsvg.h @@ -26,14 +26,6 @@ extern "C" { #endif -#ifndef vkvg_public -# if defined (_MSC_VER) && ! defined (VKVG_STATIC_BUILD) -# define vkvg_public __declspec(dllimport) -# else -# define vkvg_public -# endif -#endif - /*! @defgroup nsvg Nano SVG * @brief Render SVG drawings * diff --git a/include/vkvg.h b/include/vkvg.h index fbd78f5..c3d1ca7 100644 --- a/include/vkvg.h +++ b/include/vkvg.h @@ -67,10 +67,14 @@ extern "C" { #include #ifndef vkvg_public - #if (defined(_WIN32) || defined(_WIN64)) && !defined (VKVG_STATIC_BUILD) - #define vkvg_public __declspec(dllimport) + #ifndef VKVG_STATIC_BUILD + #if (defined(_WIN32) || defined(_WIN64)) + #define vkvg_public __declspec(dllimport) + #else + #define vkvg_public __attribute__((visibility("default"))) + #endif #else - #define vkvg_public __attribute__((visibility("default"))) + #define vkvg_public #endif #endif diff --git a/src/vectors.h b/src/vectors.h index 3a04255..6a29965 100644 --- a/src/vectors.h +++ b/src/vectors.h @@ -23,14 +23,10 @@ #define VKVG_VECTORS_H #include "vkvg_internal.h" -#include -typedef union { - float v2si __attribute__ ((vector_size (8))); - struct { +typedef struct { float x; float y; - }; }vec2; typedef struct { diff --git a/src/vkvg_surface.c b/src/vkvg_surface.c index 34a89b8..f8db9bf 100644 --- a/src/vkvg_surface.c +++ b/src/vkvg_surface.c @@ -317,8 +317,8 @@ void vkvg_surface_write_to_memory (VkvgSurface surf, unsigned char* const bitmap uint64_t stride = vkh_image_get_stride(stagImg); uint32_t dest_stride = surf->width * 4; - void* img = vkh_image_map (stagImg); - void* row = bitmap; + char* img = vkh_image_map (stagImg); + char* row = bitmap; for (uint32_t y = 0; y < surf->height; y++) { memcpy(row, img, dest_stride); row += dest_stride; diff --git a/vkh b/vkh index dde09d8..ffa9619 160000 --- a/vkh +++ b/vkh @@ -1 +1 @@ -Subproject commit dde09d88d7c6554b39d46bccaf8b392e2a42d937 +Subproject commit ffa9619b5368639c1c765152509d5c7e97876c63