mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +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 *
|
GskVulkanImage *
|
||||||
gsk_vulkan_image_new_for_offscreen (GdkVulkanContext *context,
|
gsk_vulkan_image_new_for_offscreen (GdkVulkanContext *context,
|
||||||
|
GdkMemoryFormat preferred_format,
|
||||||
gsize width,
|
gsize width,
|
||||||
gsize height)
|
gsize height)
|
||||||
{
|
{
|
||||||
GskVulkanImage *self;
|
GskVulkanImage *self;
|
||||||
|
|
||||||
self = gsk_vulkan_image_new (context,
|
self = gsk_vulkan_image_new (context,
|
||||||
GDK_MEMORY_DEFAULT,
|
preferred_format,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
VK_IMAGE_TILING_OPTIMAL,
|
VK_IMAGE_TILING_OPTIMAL,
|
||||||
|
@ -44,6 +44,7 @@ GskVulkanImage * gsk_vulkan_image_new_for_atlas (GdkVulk
|
|||||||
gsize width,
|
gsize width,
|
||||||
gsize height);
|
gsize height);
|
||||||
GskVulkanImage * gsk_vulkan_image_new_for_offscreen (GdkVulkanContext *context,
|
GskVulkanImage * gsk_vulkan_image_new_for_offscreen (GdkVulkanContext *context,
|
||||||
|
GdkMemoryFormat preferred_format,
|
||||||
gsize width,
|
gsize width,
|
||||||
gsize height);
|
gsize height);
|
||||||
|
|
||||||
|
@ -285,6 +285,7 @@ gsk_vulkan_renderer_render_texture (GskRenderer *renderer,
|
|||||||
ceil (viewport->size.width),
|
ceil (viewport->size.width),
|
||||||
ceil (viewport->size.height));
|
ceil (viewport->size.height));
|
||||||
image = gsk_vulkan_image_new_for_offscreen (self->vulkan,
|
image = gsk_vulkan_image_new_for_offscreen (self->vulkan,
|
||||||
|
GDK_MEMORY_DEFAULT,
|
||||||
rounded_viewport.size.width,
|
rounded_viewport.size.width,
|
||||||
rounded_viewport.size.height);
|
rounded_viewport.size.height);
|
||||||
|
|
||||||
|
@ -1249,6 +1249,7 @@ gsk_vulkan_render_pass_render_offscreen (GdkVulkanContext *vulkan,
|
|||||||
ceil (scale_y * viewport->size.height));
|
ceil (scale_y * viewport->size.height));
|
||||||
|
|
||||||
result = gsk_vulkan_image_new_for_offscreen (vulkan,
|
result = gsk_vulkan_image_new_for_offscreen (vulkan,
|
||||||
|
GDK_MEMORY_DEFAULT,
|
||||||
view.size.width, view.size.height);
|
view.size.width, view.size.height);
|
||||||
|
|
||||||
#ifdef G_ENABLE_DEBUG
|
#ifdef G_ENABLE_DEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user