diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-01-06 09:36:55 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-01-06 09:36:55 -0500 |
commit | 3771c95c72d591d3ed6ecf143fa85e1fea0a3d11 (patch) | |
tree | fb66e92aee87e28bee3c363a84f7874f763b7bda /gsk/vulkan/gskvulkanimageprivate.h | |
parent | 3c38ebb906319cb75688f9929b65ecf2a4fd3440 (diff) | |
download | gtk+-3771c95c72d591d3ed6ecf143fa85e1fea0a3d11.tar.gz |
gsk: Move Vulkan sources to a subdirectory
Following what was already done for GL.
Diffstat (limited to 'gsk/vulkan/gskvulkanimageprivate.h')
-rw-r--r-- | gsk/vulkan/gskvulkanimageprivate.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/gsk/vulkan/gskvulkanimageprivate.h b/gsk/vulkan/gskvulkanimageprivate.h new file mode 100644 index 0000000000..e775fe0b2c --- /dev/null +++ b/gsk/vulkan/gskvulkanimageprivate.h @@ -0,0 +1,67 @@ +#ifndef __GSK_VULKAN_IMAGE_PRIVATE_H__ +#define __GSK_VULKAN_IMAGE_PRIVATE_H__ + +#include <gdk/gdk.h> + +#include "gskvulkancommandpoolprivate.h" + +G_BEGIN_DECLS + +typedef struct _GskVulkanUploader GskVulkanUploader; + +#define GSK_TYPE_VULKAN_IMAGE (gsk_vulkan_image_get_type ()) + +G_DECLARE_FINAL_TYPE (GskVulkanImage, gsk_vulkan_image, GSK, VULKAN_IMAGE, GObject) + +GskVulkanUploader * gsk_vulkan_uploader_new (GdkVulkanContext *context, + GskVulkanCommandPool *command_pool); +void gsk_vulkan_uploader_free (GskVulkanUploader *self); + +void gsk_vulkan_uploader_reset (GskVulkanUploader *self); +void gsk_vulkan_uploader_upload (GskVulkanUploader *self); + +GskVulkanImage * gsk_vulkan_image_new_for_swapchain (GdkVulkanContext *context, + VkImage image, + VkFormat format, + gsize width, + gsize height); +GskVulkanImage * gsk_vulkan_image_new_from_data (GskVulkanUploader *uploader, + guchar *data, + gsize width, + gsize height, + gsize stride); + +typedef struct { + guchar *data; + gsize width; + gsize height; + gsize stride; + gsize x; + gsize y; +} GskImageRegion; + +void gsk_vulkan_image_upload_regions (GskVulkanImage *image, + GskVulkanUploader *uploader, + guint num_regions, + GskImageRegion *regions); +GskVulkanImage * gsk_vulkan_image_new_for_framebuffer (GdkVulkanContext *context, + gsize width, + gsize height); +GskVulkanImage * gsk_vulkan_image_new_for_atlas (GdkVulkanContext *context, + gsize width, + gsize height); +GskVulkanImage * gsk_vulkan_image_new_for_texture (GdkVulkanContext *context, + gsize width, + gsize height); + +GdkTexture * gsk_vulkan_image_download (GskVulkanImage *self, + GskVulkanUploader *uploader); + +gsize gsk_vulkan_image_get_width (GskVulkanImage *self); +gsize gsk_vulkan_image_get_height (GskVulkanImage *self); +VkImage gsk_vulkan_image_get_image (GskVulkanImage *self); +VkImageView gsk_vulkan_image_get_image_view (GskVulkanImage *self); + +G_END_DECLS + +#endif /* __GSK_VULKAN_IMAGE_PRIVATE_H__ */ |