glamor-ddx: Add missed drmmode_crtc_destroy function.
Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com>
This commit is contained in:
parent
c68fb6ed72
commit
cb3b34ec53
|
@ -613,6 +613,20 @@ drmmode_crtc_gamma_set(xf86CrtcPtr crtc,
|
||||||
drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
|
drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
|
||||||
size, red, green, blue);
|
size, red, green, blue);
|
||||||
}
|
}
|
||||||
|
static void
|
||||||
|
drmmode_crtc_destroy(xf86CrtcPtr crtc)
|
||||||
|
{
|
||||||
|
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
|
||||||
|
|
||||||
|
ScrnInfoPtr scrn = crtc->scrn;
|
||||||
|
if (drmmode_crtc->cursor) {
|
||||||
|
drmmode_hide_cursor(crtc);
|
||||||
|
glDeleteTextures(1, &drmmode_crtc->cursor_tex);
|
||||||
|
glamor_destroy_cursor(scrn, drmmode_crtc->cursor);
|
||||||
|
}
|
||||||
|
free(drmmode_crtc->cursor);
|
||||||
|
crtc->driver_private = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
|
static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
|
||||||
.dpms = drmmode_crtc_dpms,
|
.dpms = drmmode_crtc_dpms,
|
||||||
|
@ -629,7 +643,7 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
|
||||||
.shadow_destroy = drmmode_crtc_shadow_destroy,
|
.shadow_destroy = drmmode_crtc_shadow_destroy,
|
||||||
#endif
|
#endif
|
||||||
.gamma_set = drmmode_crtc_gamma_set,
|
.gamma_set = drmmode_crtc_gamma_set,
|
||||||
.destroy = NULL, /* XXX */
|
.destroy = drmmode_crtc_destroy
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ Bool glamor_load_cursor(ScrnInfoPtr scrn,
|
||||||
|
|
||||||
void glamor_cursor_handle(ScrnInfoPtr scrn, EGLImageKHR image, uint32_t *handle, uint32_t *pitch);
|
void glamor_cursor_handle(ScrnInfoPtr scrn, EGLImageKHR image, uint32_t *handle, uint32_t *pitch);
|
||||||
EGLImageKHR glamor_create_cursor_argb(ScrnInfoPtr scrn, int width, int height);
|
EGLImageKHR glamor_create_cursor_argb(ScrnInfoPtr scrn, int width, int height);
|
||||||
|
void glamor_destroy_cursor(ScrnInfoPtr scrn, EGLImageKHR cursor);
|
||||||
|
|
||||||
Bool drmmode_pre_init(ScrnInfoPtr scrn, int fd, int cpp);
|
Bool drmmode_pre_init(ScrnInfoPtr scrn, int fd, int cpp);
|
||||||
void drmmode_closefb(ScrnInfoPtr scrn);
|
void drmmode_closefb(ScrnInfoPtr scrn);
|
||||||
|
|
Loading…
Reference in New Issue