Changeset 27043 in vbox
- Timestamp:
- Mar 4, 2010 3:33:23 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 58357
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_readpixels.c
r15532 r27043 18 18 void SERVER_DISPATCH_APIENTRY 19 19 crServerDispatchReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, 20 20 GLenum format, GLenum type, GLvoid *pixels) 21 21 { 22 23 24 25 26 27 28 29 22 CRMessageReadPixels *rp; 23 const GLint stride = READ_DATA( 24, GLint ); 24 const GLint alignment = READ_DATA( 28, GLint ); 25 const GLint skipRows = READ_DATA( 32, GLint ); 26 const GLint skipPixels = READ_DATA( 36, GLint ); 27 const GLint bytes_per_row = READ_DATA( 40, GLint ); 28 const GLint rowLength = READ_DATA( 44, GLint ); 29 const int msg_len = sizeof(*rp) + bytes_per_row * height; 30 30 31 31 CRASSERT(bytes_per_row > 0); 32 32 33 33 rp = (CRMessageReadPixels *) crAlloc( msg_len ); 34 34 35 36 37 38 39 cr_server.head_spu->dispatch_table.ReadPixels(x, y, width, height,40 35 /* Note: the ReadPixels data gets densely packed into the buffer 36 * (no skip pixels, skip rows, etc. It's up to the receiver (pack spu, 37 * tilesort spu, etc) to apply the real PixelStore packing parameters. 38 */ 39 cr_server.head_spu->dispatch_table.ReadPixels(x, y, width, height, 40 format, type, rp + 1); 41 41 42 43 44 45 46 47 48 49 50 51 52 42 rp->header.type = CR_MESSAGE_READ_PIXELS; 43 rp->width = width; 44 rp->height = height; 45 rp->bytes_per_row = bytes_per_row; 46 rp->stride = stride; 47 rp->format = format; 48 rp->type = type; 49 rp->alignment = alignment; 50 rp->skipRows = skipRows; 51 rp->skipPixels = skipPixels; 52 rp->rowLength = rowLength; 53 53 54 55 56 57 58 54 /* <pixels> points to the 8-byte network pointer */ 55 crMemcpy( &rp->pixels, pixels, sizeof(rp->pixels) ); 56 57 crNetSend( cr_server.curClient->conn, NULL, rp, msg_len ); 58 crFree( rp ); 59 59 }
Note:
See TracChangeset
for help on using the changeset viewer.