#endif
}
-static void
-_release_buffer(Ecore_Drm2_Output *output, Ecore_Drm2_Output_State *s)
+void
+_ecore_drm2_fb_buffer_release(Ecore_Drm2_Output *output, Ecore_Drm2_Output_State *s)
{
if (output->release_cb) output->release_cb(output->release_data, s->fb);
_ecore_drm2_fb_deref(s->fb);
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
if (output->current.fb && (output->current.fb != output->pending.fb))
- _release_buffer(output, &output->current);
+ _ecore_drm2_fb_buffer_release(output, &output->current);
output->current.fb = output->pending.fb;
output->pending.fb = NULL;
return ret;
}
- if (output->current.fb) _release_buffer(output, &output->current);
+ if (output->current.fb)
+ _ecore_drm2_fb_buffer_release(output, &output->current);
output->current.fb = fb;
_ecore_drm2_fb_ref(output->current.fb);
output->next.fb = NULL;
if (output->pending.fb)
{
- if (output->next.fb) _release_buffer(output, &output->next);
+ if (output->next.fb)
+ _ecore_drm2_fb_buffer_release(output, &output->next);
output->next.fb = fb;
return 0;
}
if (!fb) fb = output->current.fb;
if (output->next.fb)
- _release_buffer(output, &output->next);
+ _ecore_drm2_fb_buffer_release(output, &output->next);
/* If we don't have an fb to set by now, BAIL! */
if (!fb) return -1;
if (ret)
{
if (output->prep.fb != output->current.fb)
- _release_buffer(output, &output->prep);
+ _ecore_drm2_fb_buffer_release(output, &output->prep);
return ret;
}
output->pending.fb = output->prep.fb;
if (o->next.fb)
{
- _release_buffer(o, &o->next);
+ _ecore_drm2_fb_buffer_release(o, &o->next);
return EINA_TRUE;
}
if (!panic) return EINA_FALSE;
*/
if (o->current.fb)
{
- _release_buffer(o, &o->current);
+ _ecore_drm2_fb_buffer_release(o, &o->current);
return EINA_TRUE;
}
if (o->pending.fb)
{
- _release_buffer(o, &o->pending);
+ _ecore_drm2_fb_buffer_release(o, &o->pending);
return EINA_TRUE;
}