st: Turn st_api::destroy_drawable to be direct accessed function st_api_destroy_drawable

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19197>
This commit is contained in:
Yonggang Luo 2022-10-22 00:43:54 +08:00 committed by Marge Bot
parent 3f15ba7d68
commit 40e11ee509
6 changed files with 13 additions and 16 deletions

View file

@ -191,7 +191,6 @@ dri_destroy_buffer(__DRIdrawable * dPriv)
{
struct dri_drawable *drawable = dri_drawable(dPriv);
struct dri_screen *screen = drawable->screen;
struct st_api *stapi = screen->st_api;
int i;
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
@ -203,7 +202,7 @@ dri_destroy_buffer(__DRIdrawable * dPriv)
&drawable->throttle_fence, NULL);
/* Notify the st manager that this drawable is no longer valid */
stapi->destroy_drawable(stapi, &drawable->base);
st_api_destroy_drawable(&drawable->base);
FREE(drawable->damage_rects);
FREE(drawable);

View file

@ -607,7 +607,7 @@ xmesa_free_buffer(XMesaBuffer buffer)
/* Notify the st manager that the associated framebuffer interface
* object is no longer valid.
*/
stapi->destroy_drawable(stapi, buffer->stfb);
st_api_destroy_drawable(buffer->stfb);
/* XXX we should move the buffer to a delete-pending list and destroy
* the buffer until it is no longer current.

View file

@ -517,7 +517,7 @@ osmesa_destroy_buffer(struct osmesa_buffer *osbuffer)
* Notify the state manager that the associated framebuffer interface
* is no longer valid.
*/
stapi->destroy_drawable(stapi, osbuffer->stfb);
st_api_destroy_drawable(osbuffer->stfb);
FREE(osbuffer->stfb);
FREE(osbuffer);

View file

@ -533,7 +533,7 @@ stw_st_destroy_framebuffer_locked(struct st_framebuffer_iface *stfb)
/* Notify the st manager that the framebuffer interface is no
* longer valid.
*/
stw_dev->stapi->destroy_drawable(stw_dev->stapi, &stwfb->base);
st_api_destroy_drawable(&stwfb->base);
FREE(stwfb);
}

View file

@ -547,13 +547,13 @@ struct st_api
* Get the currently bound context in the calling thread.
*/
struct st_context_iface *(*get_current)(struct st_api *stapi);
/**
* Notify the st manager the framebuffer interface object
* is no longer valid.
*/
void (*destroy_drawable)(struct st_api *stapi,
struct st_framebuffer_iface *stfbi);
};
/**
* Notify the st manager the framebuffer interface object
* is no longer valid.
*/
void
st_api_destroy_drawable(struct st_framebuffer_iface *stfbi);
#endif /* _API_H_ */

View file

@ -747,9 +747,8 @@ unlock:
* The framebuffer interface object is no longer valid.
* Remove the object from the framebuffer interface hash table.
*/
static void
st_api_destroy_drawable(struct st_api *stapi,
struct st_framebuffer_iface *stfbi)
void
st_api_destroy_drawable(struct st_framebuffer_iface *stfbi)
{
if (!stfbi)
return;
@ -1456,7 +1455,6 @@ static const struct st_api st_gl_api = {
.create_context = st_api_create_context,
.make_current = st_api_make_current,
.get_current = st_api_get_current,
.destroy_drawable = st_api_destroy_drawable,
};