mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 05:20:17 +00:00
rendernode: Shadow nodes need offscreen for opacity
Otherwise the shadow will not be properly computed as opaque regions become translucent after applying opacity. Testcase included.
This commit is contained in:
parent
55ae8dc39e
commit
f8627755b5
@ -5013,7 +5013,7 @@ gsk_shadow_node_new (GskRenderNode *child,
|
||||
|
||||
self = gsk_render_node_alloc (GSK_SHADOW_NODE);
|
||||
node = (GskRenderNode *) self;
|
||||
node->offscreen_for_opacity = child->offscreen_for_opacity;
|
||||
node->offscreen_for_opacity = TRUE;
|
||||
|
||||
self->child = gsk_render_node_ref (child);
|
||||
self->n_shadows = n_shadows;
|
||||
|
10
testsuite/gsk/compare/shadow-opacity.node
Normal file
10
testsuite/gsk/compare/shadow-opacity.node
Normal file
@ -0,0 +1,10 @@
|
||||
opacity {
|
||||
opacity: 0.6;
|
||||
child: shadow {
|
||||
shadows: rgb(255,0,0) 10 10;
|
||||
child: color {
|
||||
bounds: 0 0 50 50;
|
||||
color: rgb(0,0,255);
|
||||
}
|
||||
}
|
||||
}
|
BIN
testsuite/gsk/compare/shadow-opacity.png
Normal file
BIN
testsuite/gsk/compare/shadow-opacity.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 185 B |
@ -92,6 +92,7 @@ compare_render_tests = [
|
||||
'scaled-cairo',
|
||||
'scaled-texture',
|
||||
'shadow-in-opacity',
|
||||
'shadow-opacity',
|
||||
'stroke',
|
||||
'texture-scale-magnify-10000x',
|
||||
'texture-scale-magnify-rotate',
|
||||
|
Loading…
Reference in New Issue
Block a user