[gtk/wip/baedert/gl-rework] gl renderer: Add builder offset correctly for non-affine modelviews
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/gl-rework] gl renderer: Add builder offset correctly for non-affine modelviews
- Date: Tue, 21 Jan 2020 14:07:36 +0000 (UTC)
commit bc266d00dc1f7d20ab0ec89eab40ee806243fad2
Author: Timm Bäder <mail baedert org>
Date: Tue Jan 21 10:00:51 2020 +0100
gl renderer: Add builder offset correctly for non-affine modelviews
gsk/gl/gskglrenderops.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gsk/gl/gskglrenderops.c b/gsk/gl/gskglrenderops.c
index 39916be36c..f113df5edf 100644
--- a/gsk/gl/gskglrenderops.c
+++ b/gsk/gl/gskglrenderops.c
@@ -180,13 +180,15 @@ ops_transform_bounds_modelview (const RenderOpBuilder *builder,
const graphene_rect_t *src,
graphene_rect_t *dst)
{
+ graphene_rect_t r = *src;
+
g_assert (builder->mv_stack != NULL);
g_assert (builder->mv_stack->len >= 1);
- gsk_transform_transform_bounds (builder->current_modelview, src, dst);
+ r.origin.x += builder->dx;
+ r.origin.y += builder->dy;
- dst->origin.x += builder->dx * builder->scale_x;
- dst->origin.y += builder->dy * builder->scale_y;
+ gsk_transform_transform_bounds (builder->current_modelview, &r, dst);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]