renderer/native: use GBM_FORMAT_ARGB8888 for primary rendering format

At the moment we use GBM_FORMAT_XRGB8888 which unfortunately triggers
slow read pixels code in mesa.

This commit changes it to ARGB8888 instead, which copies with memcpy.
This commit is contained in:
Ray Strode 2018-11-30 14:10:38 -05:00
parent 008a12a637
commit 88a7b6e1da

View File

@ -1006,7 +1006,7 @@ meta_renderer_native_choose_egl_config (CoglDisplay *cogl_display,
return choose_egl_config_from_gbm_format (egl, return choose_egl_config_from_gbm_format (egl,
egl_display, egl_display,
attributes, attributes,
GBM_FORMAT_XRGB8888, GBM_FORMAT_ARGB8888,
out_config, out_config,
error); error);
#ifdef HAVE_EGL_DEVICE #ifdef HAVE_EGL_DEVICE
@ -2152,7 +2152,7 @@ meta_renderer_native_create_surface_gbm (CoglOnscreen *onscreen,
struct gbm_surface *new_gbm_surface = NULL; struct gbm_surface *new_gbm_surface = NULL;
EGLNativeWindowType egl_native_window; EGLNativeWindowType egl_native_window;
EGLSurface new_egl_surface; EGLSurface new_egl_surface;
uint32_t format = GBM_FORMAT_XRGB8888; uint32_t format = GBM_FORMAT_ARGB8888;
GArray *modifiers; GArray *modifiers;
renderer_gpu_data = renderer_gpu_data =