diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2018-04-02 16:41:14 +0100 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-04-10 15:42:40 -0400 |
commit | 9a159f37e00ed47ec8cbff7c57d8787b8f5685f5 (patch) | |
tree | 5ead2d13ef406d903e918b321f26bd714fd2c848 /dri3 | |
parent | 877fa0c66469628748dbd01506f15ddc4f11b849 (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 'dri3')
-rw-r--r-- | dri3/dri3.h | 6 | ||||
-rw-r--r-- | dri3/dri3_priv.h | 6 | ||||
-rw-r--r-- | dri3/dri3_screen.c | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/dri3/dri3.h b/dri3/dri3.h index bd17522b0..fc76908e1 100644 --- a/dri3/dri3.h +++ b/dri3/dri3.h @@ -49,11 +49,11 @@ typedef PixmapPtr (*dri3_pixmap_from_fd_proc) (ScreenPtr screen, typedef PixmapPtr (*dri3_pixmap_from_fds_proc) (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, CARD64 modifier); diff --git a/dri3/dri3_priv.h b/dri3/dri3_priv.h index f0400a78a..168b87cbb 100644 --- a/dri3/dri3_priv.h +++ b/dri3/dri3_priv.h @@ -79,8 +79,10 @@ int dri3_open(ClientPtr client, ScreenPtr screen, RRProviderPtr provider, int *fd); int -dri3_pixmap_from_fds(PixmapPtr *ppixmap, ScreenPtr screen, CARD8 num_fds, int *fds, - CARD16 width, CARD16 height, CARD32 *strides, CARD32 *offsets, +dri3_pixmap_from_fds(PixmapPtr *ppixmap, ScreenPtr screen, + CARD8 num_fds, const int *fds, + CARD16 width, CARD16 height, + const CARD32 *strides, const CARD32 *offsets, CARD8 depth, CARD8 bpp, CARD64 modifier); int diff --git a/dri3/dri3_screen.c b/dri3/dri3_screen.c index 8d3744977..58f5ff71d 100644 --- a/dri3/dri3_screen.c +++ b/dri3/dri3_screen.c @@ -63,9 +63,9 @@ dri3_open(ClientPtr client, ScreenPtr screen, RRProviderPtr provider, int *fd) int dri3_pixmap_from_fds(PixmapPtr *ppixmap, 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, CARD64 modifier) { dri3_screen_priv_ptr ds = dri3_screen_priv(screen); |