mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 19:12:04 +00:00
renderer/native: Only enable shadowfbs if we can blit
There is no point in enabling shadow buffers if we can't as that'd be even slower than not having them at all. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1237
This commit is contained in:
parent
f60c485117
commit
346cadeddb
@ -3105,12 +3105,17 @@ should_force_shadow_fb (MetaRendererNative *renderer_native,
|
||||
MetaGpuKms *primary_gpu)
|
||||
{
|
||||
MetaRenderer *renderer = META_RENDERER (renderer_native);
|
||||
CoglContext *cogl_context =
|
||||
cogl_context_from_renderer_native (renderer_native);
|
||||
int kms_fd;
|
||||
uint64_t prefer_shadow = 0;
|
||||
|
||||
if (meta_renderer_is_hardware_accelerated (renderer))
|
||||
return FALSE;
|
||||
|
||||
if (!cogl_has_feature (cogl_context, COGL_FEATURE_ID_BLIT_FRAMEBUFFER))
|
||||
return FALSE;
|
||||
|
||||
kms_fd = meta_gpu_kms_get_fd (primary_gpu);
|
||||
if (drmGetCap (kms_fd, DRM_CAP_DUMB_PREFER_SHADOW, &prefer_shadow) == 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user