summaryrefslogtreecommitdiff
path: root/glamor/glamor_transform.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-10-29 22:50:53 -0700
committerEric Anholt <eric@anholt.net>2015-03-24 12:32:46 -0700
commitaf687396f1875de0a45683aad4fd5a9a2e00f10d (patch)
treeedfc30a8c59c4ff0a9a68a828f835557c60234a6 /glamor/glamor_transform.c
parent1eb954c3830d46c27bf2a61f825b59f12092728c (diff)
downloadxserver-af687396f1875de0a45683aad4fd5a9a2e00f10d.tar.gz
glamor: Remove screen private and pixmap ptrs from pixmap private and fbo
There's no reason to waste memory storing redundant copies of the same pointer all over the system; just pass in pointers as necessary to each function. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'glamor/glamor_transform.c')
-rw-r--r--glamor/glamor_transform.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/glamor/glamor_transform.c b/glamor/glamor_transform.c
index c1df56018..eddc46875 100644
--- a/glamor/glamor_transform.c
+++ b/glamor/glamor_transform.c
@@ -43,6 +43,8 @@ glamor_set_destination_drawable(DrawablePtr drawable,
int *p_off_x,
int *p_off_y)
{
+ ScreenPtr screen = drawable->pScreen;
+ glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable);
glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
int off_x, off_y;
@@ -95,7 +97,7 @@ glamor_set_destination_drawable(DrawablePtr drawable,
scale_x, (off_x + center_adjust) * scale_x - 1.0f,
scale_y, (off_y + center_adjust) * scale_y - 1.0f);
- glamor_set_destination_pixmap_fbo(glamor_pixmap_fbo_at(pixmap_priv, box_x, box_y),
+ glamor_set_destination_pixmap_fbo(glamor_priv, glamor_pixmap_fbo_at(pixmap_priv, box_x, box_y),
0, 0, w, h);
}