mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
renderer: Only check certain constraints when selecting a driver
Only COGL_RENDERER_CONSTRAINT_SUPPORTS_COGL_GLES2 affects the driver selection and all of the the other constraints are only relevant to the winsys selection. However Cogl was trying to apply all of the constraints to the driver selection which meant that if any other constraint was specified then it would always fail. This patch makes the driver selection filter out all other constraints based on a mask defined in cogl-renderer-private.h. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit f07febc8913b97fb828e7f2cc2857813af2d3657)
This commit is contained in:
parent
627e518da0
commit
e7b50a6cba
@ -90,6 +90,11 @@ struct _CoglRenderer
|
||||
void *winsys;
|
||||
};
|
||||
|
||||
/* Mask of constraints that effect driver selection. All of the other
|
||||
* constraints effect only the winsys selection */
|
||||
#define COGL_RENDERER_DRIVER_CONSTRAINTS \
|
||||
COGL_RENDERER_CONSTRAINT_SUPPORTS_COGL_GLES2
|
||||
|
||||
typedef CoglFilterReturn (* CoglNativeFilterFunc) (void *native_event,
|
||||
void *data);
|
||||
|
||||
|
@ -469,6 +469,11 @@ satisfy_constraints (CoglDriverDescription *description,
|
||||
{
|
||||
CoglRendererConstraint constraint = GPOINTER_TO_UINT (l->data);
|
||||
|
||||
/* Most of the constraints only affect the winsys selection so
|
||||
* we'll filter them out */
|
||||
if (!(constraint & COGL_RENDERER_DRIVER_CONSTRAINTS))
|
||||
continue;
|
||||
|
||||
/* If the driver doesn't satisfy any constraint then continue
|
||||
* to the next driver description */
|
||||
if (!(constraint & description->constraints))
|
||||
|
Loading…
Reference in New Issue
Block a user