Merge branch 'wip/otte/for-main' into 'main'

gl: Remove optimization that does the wrong thing

See merge request GNOME/gtk!6528
This commit is contained in:
Benjamin Otte 2023-10-24 02:51:02 +00:00
commit 2d874e601c
4 changed files with 31 additions and 6 deletions

View File

@ -3784,12 +3784,6 @@ gsk_gl_render_job_visit_texture_scale_node (GskGLRenderJob *job,
GskTextureKey key;
guint texture_id;
if (filter == GSK_SCALING_FILTER_LINEAR)
{
gsk_gl_render_job_visit_texture (job, texture, bounds);
return;
}
gsk_gl_render_job_untransform_bounds (job, &job->current_clip->rect.bounds, &clip_rect);
if (!graphene_rect_intersection (bounds, &clip_rect, &clip_rect))

View File

@ -0,0 +1,30 @@
texture-scale {
bounds: 4 4 24 24;
filter: nearest;
texture: "texture1" url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJ0lEQVQYlWNkYPjwnwEPYMInSbqC\
AwwCDAcYBPCb4HAAlc9Ie0cCAB8uBo20gfbVAAAAAElFTkSuQmCC\
");
}
repeat {
bounds: 32 0 32 32;
child: texture-scale {
bounds: 0 0 1 1;
filter: nearest;
texture: "texture1";
}
}
repeat {
bounds: 0 32 32 32;
child: texture-scale {
bounds: 0 0 1 1;
texture: "texture1";
}
}
repeat {
bounds: 32 32 32 32;
child: texture-scale {
bounds: 0 0 1 1;
filter: trilinear;
texture: "texture1";
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

View File

@ -98,6 +98,7 @@ compare_render_tests = [
'shadow-opacity',
'shrink-rounded-border',
'stroke',
'texture-scale-filters-3d',
'texture-scale-magnify-10000x',
'texture-scale-magnify-rotate',
'texture-scale-stripes',