summaryrefslogtreecommitdiff
path: root/glamor/glamor_fbo.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-06-30 16:20:18 -0700
committerEric Anholt <eric@anholt.net>2015-07-10 09:42:57 -0700
commita2a2f6e34bd49e7ae31779274d52e800595660bc (patch)
treeb5631f98123e51604f6a9fc08dc54da743e450b7 /glamor/glamor_fbo.c
parentd278c30e68d79e86a3e2207b629d1e461856f907 (diff)
glamor: Ask the server to always allocate our private.
This avoids a lot of screwing around to attach our privates later. It means that non-glamor pixmaps now gain 120 bytes of glamor privates on 64-bit (which has quite a bit of fixable bloat), and glamor pixmaps take one less pointer of storage (not counting malloc overhead). Note that privates start out zero-filled, which matches the callocs we were doing when making our own privates, and in the case of an fb pixmap that has a priv where it didn't before, the type ends up being GLAMOR_MEMORY as we would want. v2: Clarify that the GLAMOR_MEMORY enum must be 0 (as it was previosuly), so that the new pixmap private behavior is as expected. Suggested by keithp. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (v1) Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glamor/glamor_fbo.c')
-rw-r--r--glamor/glamor_fbo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c
index 84f3b22b0..1eee304ed 100644
--- a/glamor/glamor_fbo.c
+++ b/glamor/glamor_fbo.c
@@ -471,9 +471,11 @@ glamor_pixmap_attach_fbo(PixmapPtr pixmap, glamor_pixmap_fbo *fbo)
}
void
-glamor_pixmap_destroy_fbo(glamor_screen_private *glamor_priv,
- glamor_pixmap_private *priv)
+glamor_pixmap_destroy_fbo(PixmapPtr pixmap)
{
+ ScreenPtr screen = pixmap->drawable.pScreen;
+ glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
+ glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap);
glamor_pixmap_fbo *fbo;
if (glamor_pixmap_priv_is_large(priv)) {