Changeset 46757 in vbox for trunk/src/VBox/GuestHost/OpenGL/packer/pack_misc.c
- Timestamp:
- Jun 24, 2013 2:30:18 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/packer/pack_misc.c
r33475 r46757 8 8 #include "cr_error.h" 9 9 10 void PACK_APIENTRY crPackChromiumParametervCR( GLenum target, GLenum type, GLsizei count, const GLvoid *values)10 void PACK_APIENTRY crPackChromiumParametervCR(CR_PACKER_CONTEXT_ARGDECL GLenum target, GLenum type, GLsizei count, const GLvoid *values) 11 11 { 12 12 CR_GET_PACKER_CONTEXT(pc); … … 30 30 params_length = sizeof(GLint) * count; 31 31 break; 32 #ifndef IN_RING0 32 33 case GL_FLOAT: 33 34 params_length = sizeof(GLfloat) * count; 34 35 break; 36 #endif 35 37 #if 0 36 38 case GL_DOUBLE: … … 75 77 } 76 78 break; 79 #ifndef IN_RING0 77 80 case GL_FLOAT: 78 81 for (i = 0; i < count; i++, pos += sizeof(GLfloat)) { … … 80 83 } 81 84 break; 85 #endif 82 86 #if 0 83 87 case GL_DOUBLE: … … 96 100 } 97 101 98 void PACK_APIENTRY crPackDeleteQueriesARB(GLsizei n, const GLuint * ids) 102 #ifndef IN_RING0 103 void PACK_APIENTRY crPackDeleteQueriesARB(CR_PACKER_CONTEXT_ARGDECL GLsizei n, const GLuint * ids) 99 104 { 100 105 unsigned char *data_ptr; … … 108 113 crPackFree(data_ptr); 109 114 } 115 #endif 116 117 void PACK_APIENTRY crPackVBoxTexPresent( CR_PACKER_CONTEXT_ARGDECL GLuint texture, GLuint cfg, GLint xPos, GLint yPos, GLint cRects, const GLint * pRects ) 118 { 119 GLint i, size, cnt; 120 121 CR_GET_PACKER_CONTEXT(pc); 122 unsigned char *data_ptr; 123 (void) pc; 124 size = 28 + cRects * 4 * sizeof(GLint); 125 CR_GET_BUFFERED_POINTER( pc, size ); 126 WRITE_DATA( 0, GLint, size ); 127 WRITE_DATA( 4, GLenum, CR_VBOXTEXPRESENT_EXTEND_OPCODE ); 128 WRITE_DATA( 8, GLint, texture ); 129 WRITE_DATA( 12, GLint, cfg ); 130 WRITE_DATA( 16, GLint, xPos ); 131 WRITE_DATA( 20, GLint, yPos ); 132 WRITE_DATA( 24, GLint, cRects ); 133 134 cnt = 28; 135 for (i=0; i<cRects; ++i) 136 { 137 WRITE_DATA(cnt, GLint, (GLint) pRects[4*i+0]); 138 WRITE_DATA(cnt+4, GLint, (GLint) pRects[4*i+1]); 139 WRITE_DATA(cnt+8, GLint, (GLint) pRects[4*i+2]); 140 WRITE_DATA(cnt+12, GLint, (GLint) pRects[4*i+3]); 141 cnt += 16; 142 } 143 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 144 CR_UNLOCK_PACKER_CONTEXT(pc); 145 } 146 147 void PACK_APIENTRY crPackWindowPosition( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint x, GLint y ) 148 { 149 CR_GET_PACKER_CONTEXT(pc); 150 unsigned char *data_ptr; 151 (void) pc; 152 CR_GET_BUFFERED_POINTER( pc, 20 ); 153 WRITE_DATA( 0, GLint, 20 ); 154 WRITE_DATA( 4, GLenum, CR_WINDOWPOSITION_EXTEND_OPCODE ); 155 WRITE_DATA( 8, GLint, window ); 156 WRITE_DATA( 12, GLint, x ); 157 WRITE_DATA( 16, GLint, y ); 158 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 159 CR_UNLOCK_PACKER_CONTEXT(pc); 160 } 161 162 void PACK_APIENTRY crPackWindowShow( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint flag ) 163 { 164 CR_GET_PACKER_CONTEXT(pc); 165 unsigned char *data_ptr; 166 (void) pc; 167 CR_GET_BUFFERED_POINTER( pc, 16 ); 168 WRITE_DATA( 0, GLint, 16 ); 169 WRITE_DATA( 4, GLenum, CR_WINDOWSHOW_EXTEND_OPCODE ); 170 WRITE_DATA( 8, GLint, window ); 171 WRITE_DATA( 12, GLint, flag ); 172 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 173 CR_UNLOCK_PACKER_CONTEXT(pc); 174 } 175 176 void PACK_APIENTRY crPackWindowSize( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint w, GLint h ) 177 { 178 CR_GET_PACKER_CONTEXT(pc); 179 unsigned char *data_ptr; 180 (void) pc; 181 CR_GET_BUFFERED_POINTER( pc, 20 ); 182 WRITE_DATA( 0, GLint, 20 ); 183 WRITE_DATA( 4, GLenum, CR_WINDOWSIZE_EXTEND_OPCODE ); 184 WRITE_DATA( 8, GLint, window ); 185 WRITE_DATA( 12, GLint, w ); 186 WRITE_DATA( 16, GLint, h ); 187 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 188 CR_UNLOCK_PACKER_CONTEXT(pc); 189 }
Note:
See TracChangeset
for help on using the changeset viewer.