mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 21:40:19 +00:00
Pass ccs to the cairo blur code
This is needed to set the color properly.
This commit is contained in:
parent
389d246af8
commit
2be48a8f86
@ -20,8 +20,12 @@
|
||||
* Owen Taylor <otaylor@redhat.com>
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gskcairoblurprivate.h"
|
||||
|
||||
#include "gdkcairoprivate.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -371,6 +375,7 @@ mask_surface_repeat (cairo_t *cr,
|
||||
|
||||
cairo_t *
|
||||
gsk_cairo_blur_finish_drawing (cairo_t *cr,
|
||||
GdkColorState *ccs,
|
||||
float radius,
|
||||
const GdkRGBA *color,
|
||||
GskBlurFlags blur_flags)
|
||||
@ -392,7 +397,7 @@ gsk_cairo_blur_finish_drawing (cairo_t *cr,
|
||||
|
||||
gsk_cairo_blur_surface (surface, x_scale * radius, blur_flags);
|
||||
|
||||
gdk_cairo_set_source_rgba (original_cr, color);
|
||||
gdk_cairo_set_source_rgba_ccs (original_cr, ccs, color);
|
||||
if (blur_flags & GSK_BLUR_REPEAT)
|
||||
mask_surface_repeat (original_cr, surface);
|
||||
else
|
||||
|
@ -44,6 +44,7 @@ cairo_t * gsk_cairo_blur_start_drawing (cairo_t *cr,
|
||||
float radius,
|
||||
GskBlurFlags blur_flags);
|
||||
cairo_t * gsk_cairo_blur_finish_drawing (cairo_t *cr,
|
||||
GdkColorState *ccs,
|
||||
float radius,
|
||||
const GdkRGBA *color,
|
||||
GskBlurFlags blur_flags);
|
||||
|
@ -2207,7 +2207,7 @@ draw_shadow (cairo_t *cr,
|
||||
|
||||
cairo_fill (shadow_cr);
|
||||
|
||||
gsk_cairo_blur_finish_drawing (shadow_cr, radius, color, blur_flags);
|
||||
gsk_cairo_blur_finish_drawing (shadow_cr, ccs, radius, color, blur_flags);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
@ -5310,7 +5310,7 @@ gsk_shadow_node_draw (GskRenderNode *node,
|
||||
cairo_pattern_destroy (pattern);
|
||||
cairo_restore (cr);
|
||||
|
||||
cr = gsk_cairo_blur_finish_drawing (cr, 0.5 * shadow->radius, &shadow->color, GSK_BLUR_X | GSK_BLUR_Y);
|
||||
cr = gsk_cairo_blur_finish_drawing (cr, ccs, 0.5 * shadow->radius, &shadow->color, GSK_BLUR_X | GSK_BLUR_Y);
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user