mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-02 17:00:19 +00:00
widget: Improve early exit checks on queue_draw()
(1) We don't need to check for realized when we check for mapped right below. (2) Empty regions don't need to be drawn.
This commit is contained in:
parent
52c4421bd3
commit
3fd63e1d67
@ -5067,7 +5067,7 @@ gtk_widget_queue_draw_region (GtkWidget *widget,
|
|||||||
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||||
|
|
||||||
if (!_gtk_widget_get_realized (widget))
|
if (cairo_region_is_empty (region))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Just return if the widget or one of its ancestors isn't mapped */
|
/* Just return if the widget or one of its ancestors isn't mapped */
|
||||||
|
Loading…
Reference in New Issue
Block a user