GUAC-656: Send size and dispose when alloc/free surface.

This commit is contained in:
Michael Jumper 2014-04-30 11:59:43 -07:00
parent f8ac59798f
commit 25d8b47bd3

View File

@ -46,10 +46,12 @@ guac_common_surface* guac_common_surface_alloc(guac_socket* socket, const guac_l
surface->surface = cairo_image_surface_create_for_data(surface->buffer, CAIRO_FORMAT_RGB24,
w, h, surface->stride);
guac_protocol_send_size(socket, layer, w, h);
return surface;
}
void guac_common_surface_free(guac_common_surface* surface) {
guac_protocol_send_dispose(surface->socket, surface->layer);
cairo_surface_destroy(surface->surface);
free(surface->buffer);
free(surface);