Changeset e8a54cd in libguac-client-rdp
- Timestamp:
- 04/03/12 17:03:52 (14 months ago)
- Branches:
- master, debian, rpm, unstable
- Children:
- 9ebadf7
- Parents:
- 69f2919
- git-author:
- Michael Jumper <zhangmaike@…> (04/03/12 17:03:52)
- git-committer:
- Michael Jumper <zhangmaike@…> (04/03/12 17:03:52)
- File:
-
- 1 edited
-
src/rdp_bitmap.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/rdp_bitmap.c
rd15ba2b re8a54cd 74 74 32, ((rdp_freerdp_context*) context)->clrconv); 75 75 76 /* Create surface from image data */ 77 cairo_surface_t* surface = cairo_image_surface_create_for_data( 78 image_buffer, CAIRO_FORMAT_RGB24, 79 bitmap->width, bitmap->height, 4*bitmap->width); 76 /* If not ephemeral, store cached image, and free image data */ 77 if (!bitmap->ephemeral) { 80 78 81 /* Send surface to buffer */ 82 guac_protocol_send_png(socket, GUAC_COMP_SRC, buffer, 0, 0, surface); 79 /* Create surface from image data */ 80 cairo_surface_t* surface = cairo_image_surface_create_for_data( 81 image_buffer, CAIRO_FORMAT_RGB24, 82 bitmap->width, bitmap->height, 4*bitmap->width); 83 83 84 /* Free surface */ 85 cairo_surface_destroy(surface); 84 /* Send surface to buffer */ 85 guac_protocol_send_png(socket, 86 GUAC_COMP_SRC, buffer, 0, 0, surface); 86 87 87 /* If ephemeral, just free image data*/88 if (!bitmap->ephemeral) {88 /* Free surface */ 89 cairo_surface_destroy(surface); 89 90 90 91 /* Free image data if actually alloated */ … … 118 119 int height = bitmap->bottom - bitmap->top + 1; 119 120 120 guac_protocol_send_copy(socket, 121 ((guac_rdp_bitmap*) bitmap)->layer, 122 0, 0, width, height, 123 GUAC_COMP_OVER, 124 GUAC_DEFAULT_LAYER, bitmap->left, bitmap->top); 121 /* If not ephemeral, retrieve from cache */ 122 if (!bitmap->ephemeral) 123 guac_protocol_send_copy(socket, 124 ((guac_rdp_bitmap*) bitmap)->layer, 125 0, 0, width, height, 126 GUAC_COMP_OVER, 127 GUAC_DEFAULT_LAYER, bitmap->left, bitmap->top); 128 129 /* Otherwise, draw with stored image data */ 130 else if (bitmap->data != NULL) { 131 132 /* Create surface from image data */ 133 cairo_surface_t* surface = cairo_image_surface_create_for_data( 134 bitmap->data, CAIRO_FORMAT_RGB24, 135 width, height, 4*bitmap->width); 136 137 /* Send surface to buffer */ 138 guac_protocol_send_png(socket, 139 GUAC_COMP_OVER, GUAC_DEFAULT_LAYER, 140 bitmap->left, bitmap->top, surface); 141 142 /* Free surface */ 143 cairo_surface_destroy(surface); 144 145 } 125 146 126 147 }
Note: See TracChangeset
for help on using the changeset viewer.
