mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 04:31:09 +00:00
gsk/vulkan: Cosmetics
No functional changes. Use a variable that already exists instead of calling gdk_draw_context_get_surface() again. Cleanup some newlines.
This commit is contained in:
parent
a2a05acc6b
commit
dde029c3d1
@ -68,7 +68,7 @@ gsk_vulkan_render_setup (GskVulkanRender *self,
|
||||
const graphene_rect_t *rect,
|
||||
const cairo_region_t *clip)
|
||||
{
|
||||
GdkSurface *window = gsk_renderer_get_surface (self->renderer);
|
||||
GdkSurface *surface = gsk_renderer_get_surface (self->renderer);
|
||||
|
||||
self->target = g_object_ref (target);
|
||||
|
||||
@ -79,10 +79,10 @@ gsk_vulkan_render_setup (GskVulkanRender *self,
|
||||
}
|
||||
else
|
||||
{
|
||||
self->scale_factor = gdk_surface_get_scale_factor (gsk_renderer_get_surface (self->renderer));
|
||||
self->scale_factor = gdk_surface_get_scale_factor (surface);
|
||||
self->viewport = GRAPHENE_RECT_INIT (0, 0,
|
||||
gdk_surface_get_width (window) * self->scale_factor,
|
||||
gdk_surface_get_height (window) * self->scale_factor);
|
||||
gdk_surface_get_width (surface) * self->scale_factor,
|
||||
gdk_surface_get_height (surface) * self->scale_factor);
|
||||
}
|
||||
if (clip)
|
||||
{
|
||||
|
@ -249,11 +249,8 @@ gsk_vulkan_renderer_render_texture (GskRenderer *renderer,
|
||||
ceil (viewport->size.height));
|
||||
|
||||
gsk_vulkan_render_reset (render, image, viewport, NULL);
|
||||
|
||||
gsk_vulkan_render_add_node (render, root);
|
||||
|
||||
gsk_vulkan_render_upload (render);
|
||||
|
||||
gsk_vulkan_render_draw (render);
|
||||
|
||||
texture = gsk_vulkan_render_download_target (render);
|
||||
@ -308,12 +305,10 @@ gsk_vulkan_renderer_render (GskRenderer *renderer,
|
||||
|
||||
render_region = get_render_region (self);
|
||||
draw_index = gdk_vulkan_context_get_draw_index (self->vulkan);
|
||||
|
||||
gsk_vulkan_render_reset (render, self->targets[draw_index], NULL, render_region);
|
||||
|
||||
gsk_vulkan_render_add_node (render, root);
|
||||
|
||||
gsk_vulkan_render_upload (render);
|
||||
|
||||
gsk_vulkan_render_draw (render);
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user