Don't use a vec2 for blur direction either
A point_t does just as well.
This commit is contained in:
@@ -65,7 +65,7 @@ gsk_gpu_blur_op_full (GskGpuFrame *frame,
|
||||
const graphene_rect_t *rect,
|
||||
const graphene_point_t *offset,
|
||||
const graphene_rect_t *tex_rect,
|
||||
const graphene_vec2_t *blur_direction,
|
||||
const graphene_point_t *blur_direction,
|
||||
const GdkRGBA *blur_color)
|
||||
{
|
||||
GskGpuBlurInstance *instance;
|
||||
@@ -79,7 +79,7 @@ gsk_gpu_blur_op_full (GskGpuFrame *frame,
|
||||
|
||||
gsk_gpu_rect_to_float (rect, offset, instance->rect);
|
||||
gsk_gpu_rect_to_float (tex_rect, offset, instance->tex_rect);
|
||||
graphene_vec2_to_float (blur_direction, instance->blur_direction);
|
||||
gsk_point_to_float (blur_direction, instance->blur_direction);
|
||||
gsk_gpu_rgba_to_float (blur_color, instance->blur_color);
|
||||
instance->tex_id = descriptor;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ gsk_gpu_blur_op (GskGpuFrame *frame,
|
||||
const graphene_rect_t *rect,
|
||||
const graphene_point_t *offset,
|
||||
const graphene_rect_t *tex_rect,
|
||||
const graphene_vec2_t *blur_direction)
|
||||
const graphene_point_t *blur_direction)
|
||||
{
|
||||
gsk_gpu_blur_op_full (frame,
|
||||
0,
|
||||
@@ -114,7 +114,7 @@ gsk_gpu_blur_shadow_op (GskGpuFrame *frame,
|
||||
const graphene_rect_t *rect,
|
||||
const graphene_point_t *offset,
|
||||
const graphene_rect_t *tex_rect,
|
||||
const graphene_vec2_t *blur_direction,
|
||||
const graphene_point_t *blur_direction,
|
||||
const GdkRGBA *shadow_color)
|
||||
{
|
||||
gsk_gpu_blur_op_full (frame,
|
||||
|
||||
@@ -13,7 +13,7 @@ void gsk_gpu_blur_op (GskGpuF
|
||||
const graphene_rect_t *rect,
|
||||
const graphene_point_t *offset,
|
||||
const graphene_rect_t *tex_rect,
|
||||
const graphene_vec2_t *blur_direction);
|
||||
const graphene_point_t *blur_direction);
|
||||
|
||||
void gsk_gpu_blur_shadow_op (GskGpuFrame *frame,
|
||||
GskGpuShaderClip clip,
|
||||
@@ -22,7 +22,7 @@ void gsk_gpu_blur_shadow_op (GskGpuF
|
||||
const graphene_rect_t *rect,
|
||||
const graphene_point_t *offset,
|
||||
const graphene_rect_t *tex_rect,
|
||||
const graphene_vec2_t *blur_direction,
|
||||
const graphene_point_t *blur_direction,
|
||||
const GdkRGBA *shadow_color);
|
||||
|
||||
|
||||
|
||||
@@ -979,7 +979,6 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self,
|
||||
GskGpuNodeProcessor other;
|
||||
GskGpuImage *intermediate;
|
||||
guint32 intermediate_descriptor;
|
||||
graphene_vec2_t direction;
|
||||
graphene_rect_t clip_rect, intermediate_rect;
|
||||
graphene_point_t real_offset;
|
||||
int width, height;
|
||||
@@ -1015,7 +1014,6 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self,
|
||||
|
||||
gsk_gpu_node_processor_sync_globals (&other, 0);
|
||||
|
||||
graphene_vec2_init (&direction, blur_radius, 0.0f);
|
||||
gsk_gpu_blur_op (other.frame,
|
||||
gsk_gpu_clip_get_shader_clip (&other.clip, &other.offset, &intermediate_rect),
|
||||
source_desc,
|
||||
@@ -1023,7 +1021,7 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self,
|
||||
&intermediate_rect,
|
||||
&other.offset,
|
||||
source_rect,
|
||||
&direction);
|
||||
&GRAPHENE_POINT_INIT (blur_radius, 0));
|
||||
|
||||
gsk_gpu_render_pass_end_op (other.frame,
|
||||
intermediate,
|
||||
@@ -1033,7 +1031,6 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self,
|
||||
|
||||
real_offset = GRAPHENE_POINT_INIT (self->offset.x + shadow_offset->x,
|
||||
self->offset.y + shadow_offset->y);
|
||||
graphene_vec2_init (&direction, 0.0f, blur_radius);
|
||||
intermediate_descriptor = gsk_gpu_node_processor_add_image (self, intermediate, GSK_GPU_SAMPLER_TRANSPARENT);
|
||||
if (shadow_color)
|
||||
{
|
||||
@@ -1044,7 +1041,7 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self,
|
||||
rect,
|
||||
&real_offset,
|
||||
&intermediate_rect,
|
||||
&direction,
|
||||
&GRAPHENE_POINT_INIT (0, blur_radius),
|
||||
shadow_color);
|
||||
}
|
||||
else
|
||||
@@ -1056,7 +1053,7 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self,
|
||||
rect,
|
||||
&real_offset,
|
||||
&intermediate_rect,
|
||||
&direction);
|
||||
&GRAPHENE_POINT_INIT (0, blur_radius));
|
||||
}
|
||||
|
||||
g_object_unref (intermediate);
|
||||
|
||||
Reference in New Issue
Block a user