mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
cogl: Introduce and use cogl_context_is_hardware_accelerated
We delegate the answer through CoglDriverVtable::is_hardware_accelerated since this is properly a property of the renderer, and not something the cogl core should know about. The answer given for the nop driver is admittedly arbitrary, yes it's infinitely fast but no there's not any "hardware" making it so. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1194
This commit is contained in:
@ -194,23 +194,8 @@ meta_renderer_is_hardware_accelerated (MetaRenderer *renderer)
|
||||
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
|
||||
CoglContext *cogl_context =
|
||||
clutter_backend_get_cogl_context (clutter_backend);
|
||||
CoglGpuInfo *info = &cogl_context->gpu;
|
||||
|
||||
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 TRUE;
|
||||
case COGL_GPU_INFO_ARCHITECTURE_LLVMPIPE:
|
||||
case COGL_GPU_INFO_ARCHITECTURE_SOFTPIPE:
|
||||
case COGL_GPU_INFO_ARCHITECTURE_SWRAST:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
return cogl_context_is_hardware_accelerated (cogl_context);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user