[gtk] gl renderer: Linear gradients: offset
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] gl renderer: Linear gradients: offset
- Date: Tue, 4 Dec 2018 05:31:41 +0000 (UTC)
commit e8670c89ae0e6867964251bb14c518e4a1130d18
Author: Timm Bäder <mail baedert org>
Date: Mon Dec 3 18:03:34 2018 +0100
gl renderer: Linear gradients: offset
gsk/gl/gskglrenderer.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 25d213aca7..753073e97b 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -781,6 +781,7 @@ render_offset_node (GskGLRenderer *self,
case GSK_SHADOW_NODE:
case GSK_BORDER_NODE:
case GSK_OUTSET_SHADOW_NODE:
+ case GSK_LINEAR_GRADIENT_NODE:
{
ops_offset (builder, dx, dy);
gsk_gl_renderer_add_render_ops (self, child, builder);
@@ -898,7 +899,11 @@ render_linear_gradient_node (GskGLRenderer *self,
op.op = OP_CHANGE_LINEAR_GRADIENT;
op.linear_gradient.n_color_stops = n_color_stops;
op.linear_gradient.start_point = *start;
+ op.linear_gradient.start_point.x += builder->dx;
+ op.linear_gradient.start_point.y += builder->dy;
op.linear_gradient.end_point = *end;
+ op.linear_gradient.end_point.x += builder->dx;
+ op.linear_gradient.end_point.y += builder->dy;
ops_add (builder, &op);
ops_draw (builder, vertex_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]