}
output->pending_flip = EINA_FALSE;
- if (!output->pending_vblank) ecore_drm_output_repaint(output);
+ if (output->pending_destroy)
+ {
+ output->pending_destroy = EINA_FALSE;
+ ecore_drm_output_free(output);
+ }
+ else if (!output->pending_vblank)
+ ecore_drm_output_repaint(output);
}
static void
EINA_LIST_FOREACH(dev->outputs, l, output)
{
- output->need_repaint = EINA_TRUE;
+ if ((!output->enabled) || (!output->need_repaint)) continue;
if (output->repaint_scheduled) continue;
_ecore_drm_output_repaint_start(output);
}
/* check for valid output */
if (!output) return;
+ if (output->pending_flip)
+ {
+ output->pending_destroy = EINA_TRUE;
+ return;
+ }
+
/* delete the backlight struct */
if (output->backlight)
_ecore_drm_output_backlight_shutdown(output->backlight);
/* DBG("Output Repaint Start"); */
if (!output) return;
+ if (output->pending_destroy) return;
if (!output->current)
{
Ecore_Drm_Sprite *sprite;
int ret = 0;
- if (!output) return;
+ EINA_SAFETY_ON_NULL_RETURN(output);
+ EINA_SAFETY_ON_TRUE_RETURN(output->pending_destroy);
/* DBG("Output Repaint: %d %d", output->crtc_id, output->conn_id); */
int x, y, phys_width, phys_height;
- Eina_Bool need_repaint : 1;
- Eina_Bool repaint_scheduled : 1;
-
- Eina_Bool pending_flip : 1;
- Eina_Bool pending_vblank : 1;
-
int pipe;
const char *make, *model, *name;
unsigned int subpixel;
+ uint16_t gamma;
Ecore_Drm_Output_Mode *current_mode;
Eina_List *modes;
Ecore_Drm_Fb *dumb[NUM_FRAME_BUFFERS];
Ecore_Drm_Backlight *backlight;
- uint16_t gamma;
-
Eina_Bool enabled : 1;
Eina_Bool cloned : 1;
+ Eina_Bool need_repaint : 1;
+ Eina_Bool repaint_scheduled : 1;
+ Eina_Bool pending_destroy : 1;
+ Eina_Bool pending_flip : 1;
+ Eina_Bool pending_vblank : 1;
};
struct _Ecore_Drm_Seat