summaryrefslogtreecommitdiff
path: root/glamor/glamor.h
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.h
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.h')
-rw-r--r--glamor/glamor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/glamor/glamor.h b/glamor/glamor.h
index 0931bbccd..4be880058 100644
--- a/glamor/glamor.h
+++ b/glamor/glamor.h
@@ -52,7 +52,7 @@ struct glamor_context;
* @TEXTURE_ONLY: pixmap is in an internal texture.
*/
typedef enum glamor_pixmap_type {
- GLAMOR_MEMORY,
+ GLAMOR_MEMORY = 0, /* Newly calloc()ed pixmaps are memory. */
GLAMOR_TEXTURE_DRM,
GLAMOR_DRM_ONLY,
GLAMOR_TEXTURE_ONLY,