Commit cb3b34ec authored by Zhigang Gong's avatar Zhigang Gong Committed by Zhigang Gong

glamor-ddx: Add missed drmmode_crtc_destroy function.

Signed-off-by: Zhigang Gong's avatarZhigang Gong <zhigang.gong@gmail.com>
parent c68fb6ed
......@@ -613,6 +613,20 @@ drmmode_crtc_gamma_set(xf86CrtcPtr crtc,
drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
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 = {
.dpms = drmmode_crtc_dpms,
......@@ -629,7 +643,7 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
.shadow_destroy = drmmode_crtc_shadow_destroy,
#endif
.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);
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);
void drmmode_closefb(ScrnInfoPtr scrn);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment