Revert "gpu: Fix scale fluctuation"

This commit is wrong.
It does achieve what it sets out to do, but the method doesn't work.

It confused multiple things in one commit, the commit message only
describes the symptoms it tries to fix and not why the fix is correct,
it includes no tests and it wsn't properly reviewed.

Related: !6871
This commit is contained in:
Benjamin Otte 2024-02-11 03:23:14 +01:00
parent e492dac7fe
commit df1d024059
3 changed files with 7 additions and 16 deletions

View File

@ -353,10 +353,7 @@ gsk_gpu_node_processor_init_draw (GskGpuNodeProcessor *self,
NULL,
image,
&area,
&GRAPHENE_RECT_INIT (viewport->origin.x,
viewport->origin.y,
area.width / graphene_vec2_get_x (scale),
area.height / graphene_vec2_get_y (scale)));
viewport);
gsk_gpu_render_pass_begin_op (frame,
image,
@ -1010,10 +1007,7 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self,
source_desc,
intermediate,
&(cairo_rectangle_int_t) { 0, 0, width, height },
&GRAPHENE_RECT_INIT (intermediate_rect.origin.x,
intermediate_rect.origin.y,
width / graphene_vec2_get_x (&self->scale),
height / graphene_vec2_get_y (&self->scale)));
&intermediate_rect);
gsk_gpu_render_pass_begin_op (other.frame,
intermediate,

View File

@ -391,7 +391,7 @@ gsk_gpu_renderer_render (GskRenderer *renderer,
GskGpuFrame *frame;
GskGpuImage *backbuffer;
cairo_region_t *render_region;
double scale;
GdkSurface *surface;
if (cairo_region_is_empty (region))
{
@ -411,7 +411,7 @@ gsk_gpu_renderer_render (GskRenderer *renderer,
frame = gsk_gpu_renderer_get_frame (self);
render_region = get_render_region (self);
scale = gsk_gpu_renderer_get_scale (self);
surface = gdk_draw_context_get_surface (priv->context);
gsk_gpu_frame_render (frame,
g_get_monotonic_time (),
@ -420,8 +420,8 @@ gsk_gpu_renderer_render (GskRenderer *renderer,
root,
&GRAPHENE_RECT_INIT (
0, 0,
gsk_gpu_image_get_width (backbuffer) / scale,
gsk_gpu_image_get_height (backbuffer) / scale
gdk_surface_get_width (surface),
gdk_surface_get_height (surface)
),
NULL);

View File

@ -360,10 +360,7 @@ gsk_gpu_render_pass_op_offscreen (GskGpuFrame *frame,
image,
&(cairo_rectangle_int_t) { 0, 0, width, height },
node,
&GRAPHENE_RECT_INIT (viewport->origin.x,
viewport->origin.y,
width / graphene_vec2_get_x (scale),
height / graphene_vec2_get_y (scale)));
viewport);
gsk_gpu_render_pass_end_op (frame,
image,