mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 03:10:09 +00:00
vulkan: Store width/height of GskVulkanImage
This is to enable lazy framebuffer creation later.
This commit is contained in:
parent
c160ef16c1
commit
17c11dd97b
@ -12,6 +12,8 @@ struct _GskVulkanImage
|
||||
|
||||
GdkVulkanContext *vulkan;
|
||||
|
||||
gsize width;
|
||||
gsize height;
|
||||
VkImage vk_image;
|
||||
VkImageView vk_image_view;
|
||||
|
||||
@ -34,6 +36,8 @@ gsk_vulkan_image_new (GdkVulkanContext *context,
|
||||
self = g_object_new (GSK_TYPE_VULKAN_IMAGE, NULL);
|
||||
|
||||
self->vulkan = g_object_ref (context);
|
||||
self->width = width;
|
||||
self->height = height;
|
||||
|
||||
GSK_VK_CHECK (vkCreateImage, gdk_vulkan_context_get_device (context),
|
||||
&(VkImageCreateInfo) {
|
||||
@ -360,6 +364,18 @@ gsk_vulkan_image_init (GskVulkanImage *self)
|
||||
{
|
||||
}
|
||||
|
||||
gsize
|
||||
gsk_vulkan_image_get_width (GskVulkanImage *self)
|
||||
{
|
||||
return self->width;
|
||||
}
|
||||
|
||||
gsize
|
||||
gsk_vulkan_image_get_height (GskVulkanImage *self)
|
||||
{
|
||||
return self->height;
|
||||
}
|
||||
|
||||
VkImage
|
||||
gsk_vulkan_image_get_image (GskVulkanImage *self)
|
||||
{
|
||||
|
@ -16,6 +16,8 @@ GskVulkanImage * gsk_vulkan_image_new_from_data (GdkVulk
|
||||
gsize height,
|
||||
gsize stride);
|
||||
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user