[gtk/wip/chergert/glproto: 218/526] include offset for linear gradient
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 218/526] include offset for linear gradient
- Date: Tue, 16 Feb 2021 01:14:30 +0000 (UTC)
commit c37dc4d80b260c21400b3b615bc17e867460deaf
Author: Christian Hergert <chergert redhat com>
Date: Sun Jan 10 22:07:46 2021 -0800
include offset for linear gradient
gsk/next/gskglrenderjob.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index aaf05a55bc..20679e10c1 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -837,10 +837,12 @@ gsk_gl_render_job_visit_linear_gradient_node (GskGLRenderJob *job,
(const float *)stops);
gsk_gl_program_set_uniform2f (job->driver->linear_gradient,
UNIFORM_LINEAR_GRADIENT_START_POINT,
- start->x, start->y);
+ job->offset_x + start->x,
+ job->offset_y + start->y);
gsk_gl_program_set_uniform2f (job->driver->linear_gradient,
UNIFORM_LINEAR_GRADIENT_END_POINT,
- end->x, end->y);
+ job->offset_x + end->x,
+ job->offset_y + end->y);
gsk_gl_render_job_draw_rect (job, &node->bounds);
gsk_gl_program_end_draw (job->driver->linear_gradient);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]