[gtk/wip/baedert/for-master: 743/748] 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/for-master: 743/748] gl renderer: Add builder offset correctly for non-affine modelviews
- Date: Fri, 24 Jan 2020 05:21:45 +0000 (UTC)
commit ab0869ecbc140371c02c71f94a224ccc3ebd45b4
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]