VNC: Add an allocated (local) framebuffer

This commit is contained in:
Gregory Nutt 2016-04-14 11:32:00 -06:00
parent 55788eb5f6
commit d2f7483c24
2 changed files with 9 additions and 0 deletions

View File

@ -90,7 +90,9 @@ struct vnc_session_s
/* Display geometry and color characteristics */ /* Display geometry and color characteristics */
uint8_t colorfmt; /* See include/nuttx/fb.h */ uint8_t colorfmt; /* See include/nuttx/fb.h */
uint8_t bpp; /* Bits per pixel */
struct nxgl_size_s screen; /* Size of the screen in pixels x rows */ struct nxgl_size_s screen; /* Size of the screen in pixels x rows */
FAR uint8_t *fb; /* Allocated local frame buffer */
}; };
/**************************************************************************** /****************************************************************************

View File

@ -216,5 +216,12 @@ void vnc_release_session(FAR struct vnc_session_s *session)
psock_close(&session->listen); psock_close(&session->listen);
} }
/* Free the allocated framebuffer */
if (session->fb)
{
kmm_free(session->fb);
}
vnc_initialize_session(session); vnc_initialize_session(session);
} }