mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
vulkan: Pass format to offscreen creation function
That way, the offscreen can create images of different types. Its not used in this commit, but will come in handy when we want to support high bit depth.
This commit is contained in:
parent
eb3ccfb404
commit
7b4846bc25
@ -766,13 +766,14 @@ gsk_vulkan_image_new_for_atlas (GdkVulkanContext *context,
|
||||
|
||||
GskVulkanImage *
|
||||
gsk_vulkan_image_new_for_offscreen (GdkVulkanContext *context,
|
||||
GdkMemoryFormat preferred_format,
|
||||
gsize width,
|
||||
gsize height)
|
||||
{
|
||||
GskVulkanImage *self;
|
||||
|
||||
self = gsk_vulkan_image_new (context,
|
||||
GDK_MEMORY_DEFAULT,
|
||||
preferred_format,
|
||||
width,
|
||||
height,
|
||||
VK_IMAGE_TILING_OPTIMAL,
|
||||
|
@ -44,6 +44,7 @@ GskVulkanImage * gsk_vulkan_image_new_for_atlas (GdkVulk
|
||||
gsize width,
|
||||
gsize height);
|
||||
GskVulkanImage * gsk_vulkan_image_new_for_offscreen (GdkVulkanContext *context,
|
||||
GdkMemoryFormat preferred_format,
|
||||
gsize width,
|
||||
gsize height);
|
||||
|
||||
|
@ -285,6 +285,7 @@ gsk_vulkan_renderer_render_texture (GskRenderer *renderer,
|
||||
ceil (viewport->size.width),
|
||||
ceil (viewport->size.height));
|
||||
image = gsk_vulkan_image_new_for_offscreen (self->vulkan,
|
||||
GDK_MEMORY_DEFAULT,
|
||||
rounded_viewport.size.width,
|
||||
rounded_viewport.size.height);
|
||||
|
||||
|
@ -1249,6 +1249,7 @@ gsk_vulkan_render_pass_render_offscreen (GdkVulkanContext *vulkan,
|
||||
ceil (scale_y * viewport->size.height));
|
||||
|
||||
result = gsk_vulkan_image_new_for_offscreen (vulkan,
|
||||
GDK_MEMORY_DEFAULT,
|
||||
view.size.width, view.size.height);
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user