[gtk] gl renderer: Cosmetics
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] gl renderer: Cosmetics
- Date: Fri, 11 Oct 2019 14:51:16 +0000 (UTC)
commit 9b1e0dd4a373da93bb53a263d1af72c79820b75e
Author: Timm Bäder <mail baedert org>
Date: Fri Oct 11 09:32:24 2019 +0200
gl renderer: Cosmetics
gsk/gl/gskglrenderer.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 3dbb0b67d1..64c9a116f6 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -1386,25 +1386,26 @@ render_unblurred_outset_shadow_node (GskGLRenderer *self,
{
const float scale = ops_get_scale (builder);
const float spread = gsk_outset_shadow_node_get_spread (node);
+ const float dx = gsk_outset_shadow_node_get_dx (node);
+ const float dy = gsk_outset_shadow_node_get_dy (node);
GskRoundedRect r = *gsk_outset_shadow_node_peek_outline (node);
RenderOp *op;
- ops_set_program (builder, &self->unblurred_outset_shadow_program);
+ gsk_rounded_rect_shrink (&r, -spread, -spread, -spread, -spread);
+ ops_set_program (builder, &self->unblurred_outset_shadow_program);
op = ops_begin (builder, OP_CHANGE_UNBLURRED_OUTSET_SHADOW);
rgba_to_float (gsk_outset_shadow_node_peek_color (node), op->unblurred_outset_shadow.color);
- gsk_rounded_rect_shrink (&r, -spread, -spread, -spread, -spread);
-
rounded_rect_to_floats (self, builder,
&r,
op->unblurred_outset_shadow.outline,
op->unblurred_outset_shadow.corner_widths,
op->unblurred_outset_shadow.corner_heights);
- op->unblurred_outset_shadow.spread = gsk_outset_shadow_node_get_spread (node) * scale;
- op->unblurred_outset_shadow.offset[0] = gsk_outset_shadow_node_get_dx (node) * scale;
- op->unblurred_outset_shadow.offset[1] = -gsk_outset_shadow_node_get_dy (node) * scale;
+ op->unblurred_outset_shadow.spread = spread * scale;
+ op->unblurred_outset_shadow.offset[0] = dx * scale;
+ op->unblurred_outset_shadow.offset[1] = - dy * scale;
ops_draw (builder, vertex_data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]