diff options
-rw-r--r-- | gsk/gskcairorenderer.c | 5 | ||||
-rw-r--r-- | gsk/gskrenderer.c | 75 | ||||
-rw-r--r-- | gsk/gskrenderer.h | 5 | ||||
-rw-r--r-- | gtk/gtkwindow.c | 1 |
4 files changed, 1 insertions, 85 deletions
diff --git a/gsk/gskcairorenderer.c b/gsk/gskcairorenderer.c index 0d3591c1ff..f889fa0a8c 100644 --- a/gsk/gskcairorenderer.c +++ b/gsk/gskcairorenderer.c @@ -137,10 +137,7 @@ gsk_cairo_renderer_render (GskRenderer *renderer, cairo_save (cr); cairo_set_operator (cr, CAIRO_OPERATOR_OVER); - if (gsk_renderer_get_use_alpha (renderer)) - cairo_set_source_rgba (cr, 0, 0, 0, 0); - else - cairo_set_source_rgb (cr, 0, 0, 0); + cairo_set_source_rgba (cr, 0, 0, 0, 0); cairo_paint (cr); cairo_restore (cr); diff --git a/gsk/gskrenderer.c b/gsk/gskrenderer.c index b81c9dff9d..275ac12150 100644 --- a/gsk/gskrenderer.c +++ b/gsk/gskrenderer.c @@ -75,7 +75,6 @@ typedef struct gboolean is_realized : 1; gboolean auto_clear : 1; - gboolean use_alpha : 1; } GskRendererPrivate; G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GskRenderer, gsk_renderer, G_TYPE_OBJECT) @@ -83,7 +82,6 @@ G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GskRenderer, gsk_renderer, G_TYPE_OBJECT) enum { PROP_VIEWPORT = 1, PROP_AUTO_CLEAR, - PROP_USE_ALPHA, PROP_SCALE_FACTOR, PROP_WINDOW, PROP_DISPLAY, @@ -151,10 +149,6 @@ gsk_renderer_set_property (GObject *gobject, gsk_renderer_set_auto_clear (self, g_value_get_boolean (value)); break; - case PROP_USE_ALPHA: - gsk_renderer_set_use_alpha (self, g_value_get_boolean (value)); - break; - case PROP_SCALE_FACTOR: gsk_renderer_set_scale_factor (self, g_value_get_int (value)); break; @@ -189,10 +183,6 @@ gsk_renderer_get_property (GObject *gobject, g_value_set_boolean (value, priv->auto_clear); break; - case PROP_USE_ALPHA: - g_value_set_boolean (value, priv->use_alpha); - break; - case PROP_SCALE_FACTOR: g_value_set_int (value, priv->scale_factor); break; @@ -335,22 +325,6 @@ gsk_renderer_class_init (GskRendererClass *klass) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - /** - * GskRenderer:use-alpha: - * - * Whether the #GskRenderer should use the alpha channel when rendering. - * - * Since: 3.22 - */ - gsk_renderer_properties[PROP_USE_ALPHA] = - g_param_spec_boolean ("use-alpha", - "Use Alpha", - "Whether the renderer should use the alpha channel when rendering", - FALSE, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS | - G_PARAM_EXPLICIT_NOTIFY); - g_object_class_install_properties (gobject_class, N_PROPS, gsk_renderer_properties); } @@ -744,55 +718,6 @@ gsk_renderer_get_auto_clear (GskRenderer *renderer) } /** - * gsk_renderer_set_use_alpha: - * @renderer: a #GskRenderer - * @use_alpha: whether to use the alpha channel of the target surface or not - * - * Sets whether the @renderer should use the alpha channel of the target surface - * or not. - * - * Since: 3.22 - */ -void -gsk_renderer_set_use_alpha (GskRenderer *renderer, - gboolean use_alpha) -{ - GskRendererPrivate *priv = gsk_renderer_get_instance_private (renderer); - - g_return_if_fail (GSK_IS_RENDERER (renderer)); - g_return_if_fail (!priv->is_realized); - - use_alpha = !!use_alpha; - - if (use_alpha == priv->use_alpha) - return; - - priv->use_alpha = use_alpha; - - g_object_notify_by_pspec (G_OBJECT (renderer), gsk_renderer_properties[PROP_USE_ALPHA]); -} - -/** - * gsk_renderer_get_use_alpha: - * @renderer: a #GskRenderer - * - * Retrieves the value set using gsk_renderer_set_use_alpha(). - * - * Returns: %TRUE if the target surface should use an alpha channel - * - * Since: 3.22 - */ -gboolean -gsk_renderer_get_use_alpha (GskRenderer *renderer) -{ - GskRendererPrivate *priv = gsk_renderer_get_instance_private (renderer); - - g_return_val_if_fail (GSK_IS_RENDERER (renderer), FALSE); - - return priv->use_alpha; -} - -/** * gsk_renderer_create_render_node: * @renderer: a #GskRenderer * diff --git a/gsk/gskrenderer.h b/gsk/gskrenderer.h index 60195396e1..24b74209d3 100644 --- a/gsk/gskrenderer.h +++ b/gsk/gskrenderer.h @@ -59,11 +59,6 @@ void gsk_renderer_set_auto_clear (GskRenderer GDK_AVAILABLE_IN_3_22 gboolean gsk_renderer_get_auto_clear (GskRenderer *renderer); GDK_AVAILABLE_IN_3_22 -void gsk_renderer_set_use_alpha (GskRenderer *renderer, - gboolean use_alpha); -GDK_AVAILABLE_IN_3_22 -gboolean gsk_renderer_get_use_alpha (GskRenderer *renderer); -GDK_AVAILABLE_IN_3_22 void gsk_renderer_set_window (GskRenderer *renderer, GdkWindow *window); GDK_AVAILABLE_IN_3_22 diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 21b0cd52d6..d0233ec178 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -7067,7 +7067,6 @@ gtk_window_realize (GtkWidget *widget) /* Renderer */ gsk_renderer_set_window (priv->renderer, gdk_window); - gsk_renderer_set_use_alpha (priv->renderer, TRUE); gsk_renderer_realize (priv->renderer); } |