OSDN Git Service

Updates libgbm to use libdrm_headers
[android-x86/external-minigbm.git] / gbm.h
diff --git a/gbm.h b/gbm.h
index 4993b5c..3c491cc 100644 (file)
--- a/gbm.h
+++ b/gbm.h
@@ -271,6 +271,15 @@ enum gbm_bo_flags {
     * The buffer will be read by a video encode accelerator.
     */
    GBM_BO_USE_HW_VIDEO_ENCODER = (1 << 14),
+
+   /**
+    * If this flag is set, no backing memory will be allocated for the
+    * created buffer. The metadata of the buffer (e.g. size) can be
+    * queried, and the values will be equal to a buffer allocated with
+    * the same same arguments minus this flag. However, any methods
+    * which would otherwise access the underlying buffer will fail.
+    */
+   GBM_TEST_ALLOC = (1 << 15),
 };
 
 int
@@ -364,6 +373,11 @@ enum gbm_bo_transfer_flags {
    GBM_BO_TRANSFER_READ_WRITE = (GBM_BO_TRANSFER_READ | GBM_BO_TRANSFER_WRITE),
 };
 
+void *
+gbm_bo_map(struct gbm_bo *bo,
+           uint32_t x, uint32_t y, uint32_t width, uint32_t height,
+           uint32_t flags, uint32_t *stride, void **map_data);
+
 void
 gbm_bo_unmap(struct gbm_bo *bo, void *map_data);
 
@@ -462,10 +476,6 @@ int
 gbm_bo_get_plane_fd(struct gbm_bo *bo, size_t plane);
 
 void *
-gbm_bo_map(struct gbm_bo *bo,
-           uint32_t x, uint32_t y, uint32_t width, uint32_t height,
-           uint32_t flags, uint32_t *stride, void **map_data, size_t plane);
-void *
 gbm_bo_map2(struct gbm_bo *bo,
           uint32_t x, uint32_t y, uint32_t width, uint32_t height,
           uint32_t flags, uint32_t *stride, void **map_data, int plane);