forked from AuroraMiddleware/gtk
css gadget: Don't get display flags twice
This got more expensive now that we store them per-display, so don't get them twice in the same function.
This commit is contained in:
parent
3df2e0b26a
commit
c01befe5cc
@ -890,7 +890,8 @@ gtk_css_gadget_draw (GtkCssGadget *gadget,
|
||||
#if G_ENABLE_DEBUG
|
||||
{
|
||||
GdkDisplay *display = gtk_widget_get_display (gtk_css_gadget_get_owner (gadget));
|
||||
if (GTK_DISPLAY_DEBUG_CHECK (display, LAYOUT))
|
||||
GtkDebugFlag flags = gtk_get_display_debug_flags (display);
|
||||
if G_UNLIKELY (flags & GTK_DEBUG_LAYOUT)
|
||||
{
|
||||
cairo_save (cr);
|
||||
cairo_new_path (cr);
|
||||
@ -912,7 +913,7 @@ gtk_css_gadget_draw (GtkCssGadget *gadget,
|
||||
cairo_stroke (cr);
|
||||
cairo_restore (cr);
|
||||
}
|
||||
if (GTK_DISPLAY_DEBUG_CHECK (display, BASELINES))
|
||||
if G_UNLIKELY (flags & GTK_DEBUG_BASELINES)
|
||||
{
|
||||
int baseline = priv->allocated_baseline;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user