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: cef12efc15
("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>
This commit is contained in:
parent
877fa0c664
commit
9a159f37e0
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -647,10 +647,10 @@ xwl_dri3_open_client(ClientPtr client,
|
|||
|
||||
_X_EXPORT PixmapPtr
|
||||
glamor_pixmap_from_fds(ScreenPtr screen,
|
||||
CARD8 num_fds, int *fds,
|
||||
CARD16 width, CARD16 height,
|
||||
CARD32 *strides, CARD32 *offsets,
|
||||
CARD8 depth, CARD8 bpp, uint64_t modifier)
|
||||
CARD8 num_fds, const int *fds,
|
||||
CARD16 width, CARD16 height,
|
||||
const CARD32 *strides, const CARD32 *offsets,
|
||||
CARD8 depth, CARD8 bpp, uint64_t modifier)
|
||||
{
|
||||
struct xwl_screen *xwl_screen = xwl_screen_get(screen);
|
||||
struct gbm_bo *bo = NULL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user