summaryrefslogtreecommitdiff
path: root/glamor
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2018-04-02 16:41:14 +0100
committerAdam Jackson <ajax@redhat.com>2018-04-10 15:42:40 -0400
commit9a159f37e00ed47ec8cbff7c57d8787b8f5685f5 (patch)
tree5ead2d13ef406d903e918b321f26bd714fd2c848 /glamor
parent877fa0c66469628748dbd01506f15ddc4f11b849 (diff)
dri3: annotate fds/strides/offsets arrays as const
It makes it perfectly clear that we should not be modifying them. Should help highlight issues like the one fixed with previous commit. Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Cc: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'glamor')
-rw-r--r--glamor/glamor.h6
-rw-r--r--glamor/glamor_egl.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/glamor/glamor.h b/glamor/glamor.h
index b0b23d3a3..5d0659099 100644
--- a/glamor/glamor.h
+++ b/glamor/glamor.h
@@ -264,11 +264,11 @@ extern _X_EXPORT struct gbm_bo *glamor_gbm_bo_from_pixmap(ScreenPtr screen,
* */
extern _X_EXPORT PixmapPtr glamor_pixmap_from_fds(ScreenPtr screen,
CARD8 num_fds,
- int *fds,
+ const int *fds,
CARD16 width,
CARD16 height,
- CARD32 *strides,
- CARD32 *offsets,
+ const CARD32 *strides,
+ const CARD32 *offsets,
CARD8 depth,
CARD8 bpp,
uint64_t modifier);
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index 091d51d98..3d102ad22 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -514,9 +514,9 @@ gbm_format_for_depth(CARD8 depth)
_X_EXPORT PixmapPtr
glamor_pixmap_from_fds(ScreenPtr screen,
- CARD8 num_fds, int *fds,
+ CARD8 num_fds, const int *fds,
CARD16 width, CARD16 height,
- CARD32 *strides, CARD32 *offsets,
+ const CARD32 *strides, const CARD32 *offsets,
CARD8 depth, CARD8 bpp,
uint64_t modifier)
{