diff --git a/src/st/st-entry.c b/src/st/st-entry.c index 1db8c652c..909d0377c 100644 --- a/src/st/st-entry.c +++ b/src/st/st-entry.c @@ -869,6 +869,7 @@ st_entry_paint (ClutterActor *actor) if (priv->text_shadow_material != NULL) _st_paint_shadow_with_opacity (shadow_spec, + cogl_get_draw_framebuffer (), priv->text_shadow_material, &allocation, clutter_actor_get_paint_opacity (priv->entry)); diff --git a/src/st/st-icon.c b/src/st/st-icon.c index 625f2a895..b9c92c86c 100644 --- a/src/st/st-icon.c +++ b/src/st/st-icon.c @@ -176,6 +176,7 @@ st_icon_paint (ClutterActor *actor) clutter_actor_get_allocation_box (priv->icon_texture, &allocation); _st_paint_shadow_with_opacity (priv->shadow_spec, + cogl_get_draw_framebuffer (), priv->shadow_pipeline, &allocation, clutter_actor_get_paint_opacity (priv->icon_texture)); diff --git a/src/st/st-label.c b/src/st/st-label.c index 515e34323..84e685705 100644 --- a/src/st/st-label.c +++ b/src/st/st-label.c @@ -216,6 +216,7 @@ st_label_paint (ClutterActor *actor) if (priv->text_shadow_pipeline != NULL) _st_paint_shadow_with_opacity (shadow_spec, + cogl_get_draw_framebuffer (), priv->text_shadow_pipeline, &allocation, clutter_actor_get_paint_opacity (priv->label)); diff --git a/src/st/st-private.c b/src/st/st-private.c index 1068a74ee..cd080d611 100644 --- a/src/st/st-private.c +++ b/src/st/st-private.c @@ -658,11 +658,11 @@ _st_create_shadow_cairo_pattern (StShadow *shadow_spec, void _st_paint_shadow_with_opacity (StShadow *shadow_spec, + CoglFramebuffer *framebuffer, CoglPipeline *shadow_pipeline, ClutterActorBox *box, guint8 paint_opacity) { - CoglFramebuffer *fb = cogl_get_draw_framebuffer (); ClutterActorBox shadow_box; CoglColor color; @@ -678,7 +678,8 @@ _st_paint_shadow_with_opacity (StShadow *shadow_spec, shadow_spec->color.alpha * paint_opacity / 255); cogl_color_premultiply (&color); cogl_pipeline_set_layer_combine_constant (shadow_pipeline, 0, &color); - cogl_framebuffer_draw_rectangle (fb, shadow_pipeline, + cogl_framebuffer_draw_rectangle (framebuffer, + shadow_pipeline, shadow_box.x1, shadow_box.y1, shadow_box.x2, shadow_box.y2); } diff --git a/src/st/st-private.h b/src/st/st-private.h index 3bd934d00..f88f93009 100644 --- a/src/st/st-private.h +++ b/src/st/st-private.h @@ -70,6 +70,7 @@ cairo_pattern_t *_st_create_shadow_cairo_pattern (StShadow *shadow_spec, cairo_pattern_t *src_pattern); void _st_paint_shadow_with_opacity (StShadow *shadow_spec, + CoglFramebuffer *framebuffer, CoglPipeline *shadow_pipeline, ClutterActorBox *box, guint8 paint_opacity); diff --git a/src/st/st-shadow.c b/src/st/st-shadow.c index 73aa1a3a2..028240022 100644 --- a/src/st/st-shadow.c +++ b/src/st/st-shadow.c @@ -288,6 +288,7 @@ st_shadow_helper_paint (StShadowHelper *helper, guint8 paint_opacity) { _st_paint_shadow_with_opacity (helper->shadow, + cogl_get_draw_framebuffer (), helper->pipeline, actor_box, paint_opacity); diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c index a414cfef7..967f0a96c 100644 --- a/src/st/st-theme-node-drawing.c +++ b/src/st/st-theme-node-drawing.c @@ -2564,6 +2564,7 @@ st_theme_node_paint (StThemeNode *node, if (state->alloc_width < node->box_shadow_min_width || state->alloc_height < node->box_shadow_min_height) _st_paint_shadow_with_opacity (node->box_shadow, + framebuffer, state->box_shadow_pipeline, &allocation, paint_opacity); @@ -2637,6 +2638,7 @@ st_theme_node_paint (StThemeNode *node, */ if (node->background_shadow_pipeline != NULL) _st_paint_shadow_with_opacity (node->background_image_shadow, + framebuffer, node->background_shadow_pipeline, &background_box, paint_opacity);