X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=gbm.h;h=da993c2a16e89ef6b8c332ab20240510e899e82e;hb=d118a0e7466ce9ccabea300fafa2c4c28d468cb5;hp=03c10ecac01053a22ad6b962fc15110c1094c944;hpb=3fa6dff290d82b3d689e0700e17b52ed28ce2614;p=android-x86%2Fexternal-minigbm.git diff --git a/gbm.h b/gbm.h index 03c10ec..da993c2 100644 --- a/gbm.h +++ b/gbm.h @@ -236,9 +236,35 @@ enum gbm_bo_flags { * Buffer is guaranteed to be laid out linearly in memory. That is, the * buffer is laid out as an array with 'height' blocks, each block with * length 'stride'. Each stride is in the same order as the rows of the - * buffer. + * buffer. This is intended to be used with buffers that will be accessed + * via dma-buf mmap(). */ GBM_BO_USE_LINEAR = (1 << 4), + /** + * The buffer will be used as a texture that will be sampled from. + */ + GBM_BO_USE_TEXTURING = (1 << 5), + /** + * The buffer will be written to by a camera subsystem. + */ + GBM_BO_USE_CAMERA_WRITE = (1 << 6), + /** + * The buffer will be read from by a camera subsystem. + */ + GBM_BO_USE_CAMERA_READ = (1 << 7), + /** + * Buffer inaccessible to unprivileged users. + */ + GBM_BO_USE_PROTECTED = (1 << 8), + /** + * These flags specify the frequency of software access. These flags do not + * guarantee the buffer is linear, but do guarantee gbm_bo_map(..) will + * present a linear view. + */ + GBM_BO_USE_SW_READ_OFTEN = (1 << 9), + GBM_BO_USE_SW_READ_RARELY = (1 << 10), + GBM_BO_USE_SW_WRITE_OFTEN = (1 << 11), + GBM_BO_USE_SW_WRITE_RARELY = (1 << 12), }; int @@ -262,6 +288,12 @@ gbm_bo_create(struct gbm_device *gbm, uint32_t width, uint32_t height, uint32_t format, uint32_t flags); +struct gbm_bo * +gbm_bo_create_with_modifiers(struct gbm_device *gbm, + uint32_t width, uint32_t height, + uint32_t format, + const uint64_t *modifiers, uint32_t count); + #define GBM_BO_IMPORT_WL_BUFFER 0x5501 #define GBM_BO_IMPORT_EGL_IMAGE 0x5502 #define GBM_BO_IMPORT_FD 0x5503