mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
gpu: Fix wrong rect check in occlusion fallback path
We need to check that the clip is inside the opaque region, not that the opaque region is inside the clip. Test included, using the only not that hits the fallback path with an opaque region smaller than its bounds.
This commit is contained in:
parent
155f7cdeec
commit
1dd905d976
@ -3426,7 +3426,7 @@ gsk_gpu_node_processor_add_first_node (GskGpuNodeProcessor *self,
|
||||
return FALSE;
|
||||
|
||||
gsk_gpu_node_processor_get_clip_bounds (self, &clip_bounds);
|
||||
if (!gsk_rect_contains_rect (&clip_bounds, &opaque))
|
||||
if (!gsk_rect_contains_rect (&opaque, &clip_bounds))
|
||||
return FALSE;
|
||||
|
||||
gsk_gpu_render_pass_begin_op (self->frame,
|
||||
|
15
testsuite/gsk/compare/occlusion-wrong-rect-contains.node
Normal file
15
testsuite/gsk/compare/occlusion-wrong-rect-contains.node
Normal file
@ -0,0 +1,15 @@
|
||||
color {
|
||||
bounds: 0 0 30 30;
|
||||
color: rgb(0,255,0);
|
||||
}
|
||||
cross-fade {
|
||||
progress: 0.4;
|
||||
start: color {
|
||||
bounds: 0 10 30 30;
|
||||
color: rgb(0,0,255);
|
||||
}
|
||||
end: color {
|
||||
bounds: 10 0 30 30;
|
||||
color: rgb(255,0,0);
|
||||
}
|
||||
}
|
BIN
testsuite/gsk/compare/occlusion-wrong-rect-contains.png
Normal file
BIN
testsuite/gsk/compare/occlusion-wrong-rect-contains.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 166 B |
@ -396,6 +396,7 @@ node_parser_tests = [
|
||||
'node-names-everywhere.errors',
|
||||
'node-names-everywhere.node',
|
||||
'node-names-everywhere.ref.node',
|
||||
'occlusion-wrong-rect-contains',
|
||||
'radial-gradient.node',
|
||||
'radial-gradient.ref.node',
|
||||
'repeating-linear-gradient.node',
|
||||
|
Loading…
Reference in New Issue
Block a user