Mesa (master): gbm: Clarify acceptable formats for gbm_bo

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 16 09:46:33 UTC 2018


Module: Mesa
Branch: master
Commit: 5e1fe240c43537150e124e99915702d193ea9430
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5e1fe240c43537150e124e99915702d193ea9430

Author: Daniel Stone <daniels at collabora.com>
Date:   Thu Nov  1 11:30:36 2018 +0000

gbm: Clarify acceptable formats for gbm_bo

gbm_bo_create() was presumably meant to originally accept gbm_bo_format
enums, but it's accepted GBM_FORMAT_* tokens since the dawn of time.
This is good, since gbm_bo_format is rarely used and covers a lot less
ground than GBM_FORMAT_*.

Change the documentation to refer to both; this involves removing a 'see
also' for gbm_bo_format, since we can't also use \sa to refer to a
family of anonymous #defines.

Signed-off-by: Daniel Stone <daniels at collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/gbm/main/gbm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c
index 2e2014205c..250151871d 100644
--- a/src/gbm/main/gbm.c
+++ b/src/gbm/main/gbm.c
@@ -448,14 +448,14 @@ gbm_bo_destroy(struct gbm_bo *bo)
  * \param gbm The gbm device returned from gbm_create_device()
  * \param width The width for the buffer
  * \param height The height for the buffer
- * \param format The format to use for the buffer
+ * \param format The format to use for the buffer, from GBM_FORMAT_* or
+ * GBM_BO_FORMAT_* tokens
  * \param usage The union of the usage flags for this buffer
  *
  * \return A newly allocated buffer that should be freed with gbm_bo_destroy()
  * when no longer needed. If an error occurs during allocation %NULL will be
  * returned and errno set.
  *
- * \sa enum gbm_bo_format for the list of formats
  * \sa enum gbm_bo_flags for the list of usage flags
  */
 GBM_EXPORT struct gbm_bo *




More information about the mesa-commit mailing list