mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
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:
parent
3f15ba7d68
commit
40e11ee509
6 changed files with 13 additions and 16 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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_ */
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue