}
static void
-_release_buffer(Ecore_Drm2_Output *output, Ecore_Drm2_Fb *b)
+_release_buffer(Ecore_Drm2_Output *output, Ecore_Drm2_Output_State *s)
{
- b->busy = EINA_FALSE;
- if (output->release_cb) output->release_cb(output->release_data, b);
+ s->fb->busy = EINA_FALSE;
+ if (output->release_cb) output->release_cb(output->release_data, s->fb);
+ s->fb = NULL;
}
EAPI Eina_Bool
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
if (output->current.fb && (output->current.fb != output->pending.fb))
- _release_buffer(output, output->current.fb);
+ _release_buffer(output, &output->current);
output->current.fb = output->pending.fb;
output->pending.fb = NULL;
return ret;
}
- if (output->current.fb) _release_buffer(output, output->current.fb);
+ if (output->current.fb) _release_buffer(output, &output->current);
output->current.fb = fb;
output->current.fb->busy = EINA_TRUE;
output->next.fb = NULL;
if (output->pending.fb)
{
- if (output->next.fb) _release_buffer(output, output->next.fb);
+ if (output->next.fb) _release_buffer(output, &output->next);
output->next.fb = fb;
if (output->next.fb) output->next.fb->busy = EINA_TRUE;
return 0;
if (o->next.fb)
{
- _release_buffer(o, o->next.fb);
- o->next.fb = NULL;
+ _release_buffer(o, &o->next);
return EINA_TRUE;
}
if (!panic) return EINA_FALSE;
*/
if (o->current.fb)
{
- _release_buffer(o, o->current.fb);
- o->current.fb = NULL;
+ _release_buffer(o, &o->current);
return EINA_TRUE;
}
if (o->pending.fb)
{
- _release_buffer(o, o->pending.fb);
- o->pending.fb = NULL;
+ _release_buffer(o, &o->pending);
return EINA_TRUE;
}