From: Sangjin Lee Date: Wed, 16 Dec 2015 07:38:03 +0000 (+0900) Subject: support old GBM_BO_FORMAT_XXX X-Git-Tag: accepted/tizen/common/20160128.122157~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b4ffbc25d71c88023ec2c7005c17d7252fcf97c;p=platform%2Fcore%2Fuifw%2Flibgbm.git support old GBM_BO_FORMAT_XXX Change-Id: Ib291aa3fcfda62959dc70c79501727c6c9949bd0 Signed-off-by: Sangjin Lee --- diff --git a/src/gbm.c b/src/gbm.c index e1cd2d5..b6d207c 100644 --- a/src/gbm.c +++ b/src/gbm.c @@ -83,6 +83,16 @@ GBM_EXPORT int gbm_device_is_format_supported(struct gbm_device *gbm, uint32_t format, uint32_t usage) { + switch (format) + { + case GBM_BO_FORMAT_XRGB8888: + format = GBM_FORMAT_XRGB8888; + break; + case GBM_BO_FORMAT_ARGB8888: + format = GBM_FORMAT_ABGR8888; + break; + } + return gbm->is_format_supported(gbm, format, usage); } @@ -321,6 +331,16 @@ gbm_bo_create(struct gbm_device *gbm, (width != 64 || height != 64)) return NULL; + switch (format) + { + case GBM_BO_FORMAT_XRGB8888: + format = GBM_FORMAT_XRGB8888; + break; + case GBM_BO_FORMAT_ARGB8888: + format = GBM_FORMAT_ABGR8888; + break; + } + return gbm->bo_create(gbm, width, height, format, usage); } @@ -375,6 +395,16 @@ gbm_surface_create(struct gbm_device *gbm, uint32_t width, uint32_t height, uint32_t format, uint32_t flags) { + switch (format) + { + case GBM_BO_FORMAT_XRGB8888: + format = GBM_FORMAT_XRGB8888; + break; + case GBM_BO_FORMAT_ARGB8888: + format = GBM_FORMAT_ABGR8888; + break; + } + return gbm->surface_create(gbm, width, height, format, flags); }