forked from AuroraMiddleware/gtk
renderbackground: Pull out a gdk_rgba_is_clear check
We only call snapshot_color once, and this way it's clearer that nothing will happen for a clear color from the caller side.
This commit is contained in:
parent
b6ee3490c3
commit
c9e6fcd5fa
@ -86,9 +86,6 @@ gtk_theming_background_snapshot_color (GtkThemingBackground *bg,
|
||||
(gtk_css_style_get_value (bg->style, GTK_CSS_PROPERTY_BACKGROUND_CLIP),
|
||||
n_values - 1));
|
||||
|
||||
if (gdk_rgba_is_clear (bg_color))
|
||||
return;
|
||||
|
||||
if (gsk_rounded_rect_is_rectilinear (&bg->boxes[clip]))
|
||||
{
|
||||
gtk_snapshot_append_color (snapshot,
|
||||
@ -658,6 +655,7 @@ gtk_css_style_snapshot_background (GtkCssStyle *style,
|
||||
gtk_snapshot_push_blend (snapshot, blend_mode, "Background<%u>Blend<%u>", idx, blend_mode);
|
||||
}
|
||||
|
||||
if (!gdk_rgba_is_clear (bg_color))
|
||||
gtk_theming_background_snapshot_color (&bg, snapshot, bg_color, background_image);
|
||||
|
||||
for (idx = number_of_layers - 1; idx >= 0; idx--)
|
||||
|
Loading…
Reference in New Issue
Block a user