mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
gsk: texture-scale nodes with non-integer bounds aren't opaque
Due to the way the intermediate offscreen gets drawn, we might end up with seams at the edges. And I don't think it's worth spending more time on than saying "not opaque". Fixes the compare-render testsuite New testcase included.
This commit is contained in:
parent
4cdf7aa65a
commit
6d564075f3
@ -2117,7 +2117,9 @@ gsk_texture_scale_node_new (GdkTexture *texture,
|
||||
self = gsk_render_node_alloc (GSK_TEXTURE_SCALE_NODE);
|
||||
node = (GskRenderNode *) self;
|
||||
node->offscreen_for_opacity = FALSE;
|
||||
node->fully_opaque = gdk_memory_format_alpha (gdk_texture_get_format (texture)) == GDK_MEMORY_ALPHA_OPAQUE;
|
||||
node->fully_opaque = gdk_memory_format_alpha (gdk_texture_get_format (texture)) == GDK_MEMORY_ALPHA_OPAQUE &&
|
||||
bounds->size.width == floor (bounds->size.width) &&
|
||||
bounds->size.height == floor (bounds->size.height);
|
||||
|
||||
self->texture = g_object_ref (texture);
|
||||
gsk_rect_init_from_rect (&node->bounds, bounds);
|
||||
|
7
testsuite/gsk/opaque/texture-scale-noninteger.node
Normal file
7
testsuite/gsk/opaque/texture-scale-noninteger.node
Normal file
@ -0,0 +1,7 @@
|
||||
texture-scale {
|
||||
bounds: 3 0 1.5 1;
|
||||
}
|
||||
|
||||
texture-scale {
|
||||
bounds: 0 3 1 1.5;
|
||||
}
|
Loading…
Reference in New Issue
Block a user