E_Output *output = hwc->output;
struct gbm_device *gdevice;
struct gbm_surface *gsurface;
- int format = GBM_FORMAT_ABGR8888;
if (output->tdm_hwc)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(gdevice, NULL);
gsurface = gbm_surface_create(gdevice, w, h,
- format,
+ hwc->gbm_format,
GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
EINA_SAFETY_ON_NULL_RETURN_VAL(gsurface, NULL);
}
hwc->gsurface = gsurface;
hwc->gsurface_width = w;
hwc->gsurface_height = h;
- hwc->gsurface_format = format;
+ hwc->gsurface_format = hwc->gbm_format;
- EHINF("The gbm_surface(%p, %dx%d) fmt(%c%c%c%c)is created.", hwc, gsurface, w, h, FOURCC_STR(format));
+ EHINF("The gbm_surface(%p, %dx%d) fmt(%c%c%c%c)is created.", hwc, gsurface, w, h, FOURCC_STR(hwc->gsurface_format));
return (void *)gsurface;
}
{
Ecore_Evas *ee;
struct gbm_device *gdevice;
+ int gbm_formats[2] = {GBM_FORMAT_ABGR8888, GBM_FORMAT_ARGB8888};
+ int i, format_count;
gdevice = e_comp_screen_gbm_device_get(e_comp->e_comp_screen);
if (!gdevice) return NULL;
- if (e_comp->avoid_afill)
- {
- ee = ecore_evas_tbm_native_allocfunc_new("gl_tbm_ES", gdevice, src_w, src_h,
- _e_hwc_gbm_surface_alloc,
- _e_hwc_gbm_surface_free,
- (void *)hwc);
- }
- else
+ format_count = sizeof(gbm_formats) / sizeof(int);
+ for (i = 0; i < format_count; i++)
{
- ee = ecore_evas_tbm_native_allocfunc_new("gl_tbm", gdevice, src_w, src_h,
- _e_hwc_gbm_surface_alloc,
- _e_hwc_gbm_surface_free,
- (void *)hwc);
+ hwc->gbm_format = gbm_formats[i];
+
+ if (e_comp->avoid_afill)
+ {
+ ee = ecore_evas_tbm_native_allocfunc_new("gl_tbm_ES", gdevice, src_w, src_h,
+ _e_hwc_gbm_surface_alloc,
+ _e_hwc_gbm_surface_free,
+ (void *)hwc);
+ }
+ else
+ {
+ ee = ecore_evas_tbm_native_allocfunc_new("gl_tbm", gdevice, src_w, src_h,
+ _e_hwc_gbm_surface_alloc,
+ _e_hwc_gbm_surface_free,
+ (void *)hwc);
+ }
+
+ if (ee) break;
}
EHINF("ecore_evas engine:gl_tbm with gbm ee:%p avaoid_afill:%d", hwc, ee, e_comp->avoid_afill);