[mutter] renderer-native: Use hardware acceleration check in generic layer
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] renderer-native: Use hardware acceleration check in generic layer
- Date: Thu, 20 Feb 2020 11:14:44 +0000 (UTC)
commit a209a148980886fa85f00114e7a94adc1a016bcb
Author: Jonas Ådahl <jadahl gmail com>
Date: Tue Oct 1 11:54:32 2019 +0200
renderer-native: Use hardware acceleration check in generic layer
No need to duplicate it.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/838
src/backends/native/meta-renderer-native.c | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index 9b0b861d3..57597ce8d 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -3257,24 +3257,12 @@ static gboolean
should_force_shadow_fb (MetaRendererNative *renderer_native,
MetaGpuKms *primary_gpu)
{
- CoglContext *cogl_context =
- cogl_context_from_renderer_native (renderer_native);
- CoglGpuInfo *info = &cogl_context->gpu;
+ MetaRenderer *renderer = META_RENDERER (renderer_native);
int kms_fd;
uint64_t prefer_shadow = 0;
- switch (info->architecture)
- {
- case COGL_GPU_INFO_ARCHITECTURE_UNKNOWN:
- case COGL_GPU_INFO_ARCHITECTURE_SANDYBRIDGE:
- case COGL_GPU_INFO_ARCHITECTURE_SGX:
- case COGL_GPU_INFO_ARCHITECTURE_MALI:
- return FALSE;
- case COGL_GPU_INFO_ARCHITECTURE_LLVMPIPE:
- case COGL_GPU_INFO_ARCHITECTURE_SOFTPIPE:
- case COGL_GPU_INFO_ARCHITECTURE_SWRAST:
- break;
- }
+ if (meta_renderer_is_hardware_accelerated (renderer))
+ return FALSE;
kms_fd = meta_gpu_kms_get_fd (primary_gpu);
if (drmGetCap (kms_fd, DRM_CAP_DUMB_PREFER_SHADOW, &prefer_shadow) == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]