summaryrefslogtreecommitdiffstatsci
path: root/include
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-08-09 10:54:11 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-08-09 10:54:11 +0200
commit6fc942db46aa97ac0dea8801f5e588093d7fa03c (patch)
treeb21e0bd78e73bcf821241721e771f2ae719f0924 /include
parent91d14f778a30055aca6d893bb613feb5e1ee7717 (diff)
vkvg_surface_write_to_memory, #vkvg_export and #vkvg_inline modifs
Diffstat (limited to 'include')
-rw-r--r--include/vkvg.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/include/vkvg.h b/include/vkvg.h
index 217bf1a..a97f2d1 100644
--- a/include/vkvg.h
+++ b/include/vkvg.h
@@ -67,13 +67,14 @@ extern "C" {
#include <stdbool.h>
#ifndef vkvg_public
-# if defined (_MSC_VER) && !defined (VKVG_STATIC_BUILD)
-# define vkvg_public __declspec(dllimport)
-# else
-# define vkvg_public
-# endif
+ #if (defined(_WIN32) || defined(_WIN64)) && !defined (VKVG_STATIC_BUILD)
+ #define vkvg_public __declspec(dllimport)
+ #else
+ #define vkvg_public __attribute__((visibility("default")))
+ #endif
#endif
+
#define VKVG_LOG_ERR 0x10
#define VKVG_LOG_DEBUG 0x20
#define VKVG_LOG_INFO 0x40
@@ -679,6 +680,13 @@ uint32_t vkvg_surface_get_height (VkvgSurface surf);
vkvg_public
void vkvg_surface_write_to_png (VkvgSurface surf, const char* path);
/**
+ * @brief Save surface to memory
+ * @param The surface to save
+ * @param A valid pointer on cpu memory large enough to contain surface pixels (stride * height)
+ */
+vkvg_public
+void vkvg_surface_write_to_memory (VkvgSurface surf, unsigned char* const bitmap);
+/**
* @brief Explicitly resolve a multisampled surface.
*
* When creating a multisampled vkvg device with deffered resolve set to true, this function has to be