mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 13:30:19 +00:00
gsk: Cosmetics
Rename scale_factor to scale in various places, now that it is no longer an int but a float.
This commit is contained in:
parent
01108d4148
commit
519cde95f0
@ -282,18 +282,18 @@ gsk_gl_renderer_render (GskRenderer *renderer,
|
||||
GskGLRenderJob *job;
|
||||
GdkSurface *surface;
|
||||
gboolean clear_framebuffer;
|
||||
float scale_factor;
|
||||
float scale;
|
||||
|
||||
g_assert (GSK_IS_GL_RENDERER (renderer));
|
||||
g_assert (root != NULL);
|
||||
|
||||
surface = gdk_draw_context_get_surface (GDK_DRAW_CONTEXT (self->context));
|
||||
scale_factor = gdk_surface_get_scale_factor (surface);
|
||||
scale = gdk_surface_get_scale_factor (surface);
|
||||
|
||||
viewport.origin.x = 0;
|
||||
viewport.origin.y = 0;
|
||||
viewport.size.width = gdk_surface_get_width (surface) * scale_factor;
|
||||
viewport.size.height = gdk_surface_get_height (surface) * scale_factor;
|
||||
viewport.size.width = gdk_surface_get_width (surface) * scale;
|
||||
viewport.size.height = gdk_surface_get_height (surface) * scale;
|
||||
|
||||
gdk_draw_context_begin_frame_full (GDK_DRAW_CONTEXT (self->context),
|
||||
gsk_render_node_prefers_high_depth (root),
|
||||
@ -306,7 +306,7 @@ gsk_gl_renderer_render (GskRenderer *renderer,
|
||||
clear_framebuffer = update_area_requires_clear (surface, render_region);
|
||||
|
||||
gsk_gl_driver_begin_frame (self->driver, self->command_queue);
|
||||
job = gsk_gl_render_job_new (self->driver, &viewport, scale_factor, render_region, 0, clear_framebuffer);
|
||||
job = gsk_gl_render_job_new (self->driver, &viewport, scale, render_region, 0, clear_framebuffer);
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (GSK_RENDERER_DEBUG_CHECK (GSK_RENDERER (self), FALLBACK))
|
||||
gsk_gl_render_job_set_debug_fallback (job, TRUE);
|
||||
|
@ -4401,7 +4401,7 @@ get_framebuffer_format (GdkGLContext *context,
|
||||
GskGLRenderJob *
|
||||
gsk_gl_render_job_new (GskGLDriver *driver,
|
||||
const graphene_rect_t *viewport,
|
||||
float scale_factor,
|
||||
float scale,
|
||||
const cairo_region_t *region,
|
||||
guint framebuffer,
|
||||
gboolean clear_framebuffer)
|
||||
@ -4414,7 +4414,7 @@ gsk_gl_render_job_new (GskGLDriver *driver,
|
||||
|
||||
g_return_val_if_fail (GSK_IS_GL_DRIVER (driver), NULL);
|
||||
g_return_val_if_fail (viewport != NULL, NULL);
|
||||
g_return_val_if_fail (scale_factor > 0, NULL);
|
||||
g_return_val_if_fail (scale > 0, NULL);
|
||||
|
||||
/* Check for non-standard framebuffer binding as we might not be using
|
||||
* the default framebuffer on systems like macOS where we've bound an
|
||||
@ -4436,14 +4436,14 @@ gsk_gl_render_job_new (GskGLDriver *driver,
|
||||
job->default_framebuffer = default_framebuffer;
|
||||
job->offset_x = 0;
|
||||
job->offset_y = 0;
|
||||
job->scale_x = scale_factor;
|
||||
job->scale_y = scale_factor;
|
||||
job->scale_x = scale;
|
||||
job->scale_y = scale;
|
||||
job->viewport = *viewport;
|
||||
job->target_format = get_framebuffer_format (job->command_queue->context, framebuffer);
|
||||
|
||||
gsk_gl_render_job_set_alpha (job, 1.0f);
|
||||
gsk_gl_render_job_set_projection_from_rect (job, viewport, NULL);
|
||||
gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, scale_factor, scale_factor));
|
||||
gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, scale, scale));
|
||||
|
||||
/* Setup our initial clip. If region is NULL then we are drawing the
|
||||
* whole viewport. Otherwise, we need to convert the region to a
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
GskGLRenderJob *gsk_gl_render_job_new (GskGLDriver *driver,
|
||||
const graphene_rect_t *viewport,
|
||||
float scale_factor,
|
||||
float scale,
|
||||
const cairo_region_t *region,
|
||||
guint framebuffer,
|
||||
gboolean clear_framebuffer);
|
||||
|
Loading…
Reference in New Issue
Block a user