| OLD | NEW |
| 1 /** | 1 /** |
| 2 * EGL Configuration (pixel format) functions. | 2 * EGL Configuration (pixel format) functions. |
| 3 */ | 3 */ |
| 4 | 4 |
| 5 | 5 |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <assert.h> | 8 #include <assert.h> |
| 9 #include "eglconfig.h" | 9 #include "eglconfig.h" |
| 10 #include "egldisplay.h" | 10 #include "egldisplay.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 EGLint i, attr, val; | 235 EGLint i, attr, val; |
| 236 EGLBoolean valid = EGL_TRUE; | 236 EGLBoolean valid = EGL_TRUE; |
| 237 EGLint red_size = 0, green_size = 0, blue_size = 0, luminance_size = 0; | 237 EGLint red_size = 0, green_size = 0, blue_size = 0, luminance_size = 0; |
| 238 EGLint alpha_size = 0, buffer_size = 0; | 238 EGLint alpha_size = 0, buffer_size = 0; |
| 239 | 239 |
| 240 /* all attributes should have been listed */ | 240 /* all attributes should have been listed */ |
| 241 assert(ARRAY_SIZE(_eglValidationTable) == _EGL_CONFIG_NUM_ATTRIBS); | 241 assert(ARRAY_SIZE(_eglValidationTable) == _EGL_CONFIG_NUM_ATTRIBS); |
| 242 | 242 |
| 243 /* check attributes by their types */ | 243 /* check attributes by their types */ |
| 244 for (i = 0; i < ARRAY_SIZE(_eglValidationTable); i++) { | 244 for (i = 0; i < ARRAY_SIZE(_eglValidationTable); i++) { |
| 245 EGLint mask; | 245 EGLint mask = 0; |
| 246 | 246 |
| 247 attr = _eglValidationTable[i].attr; | 247 attr = _eglValidationTable[i].attr; |
| 248 val = GET_CONFIG_ATTRIB(conf, attr); | 248 val = GET_CONFIG_ATTRIB(conf, attr); |
| 249 | 249 |
| 250 switch (_eglValidationTable[i].type) { | 250 switch (_eglValidationTable[i].type) { |
| 251 case ATTRIB_TYPE_INTEGER: | 251 case ATTRIB_TYPE_INTEGER: |
| 252 switch (attr) { | 252 switch (attr) { |
| 253 case EGL_CONFIG_ID: | 253 case EGL_CONFIG_ID: |
| 254 /* config id must be positive */ | 254 /* config id must be positive */ |
| 255 if (val <= 0) | 255 if (val <= 0) |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 EGLint config_size, EGLint *num_config) | 828 EGLint config_size, EGLint *num_config) |
| 829 { | 829 { |
| 830 if (!num_config) | 830 if (!num_config) |
| 831 return _eglError(EGL_BAD_PARAMETER, "eglGetConfigs"); | 831 return _eglError(EGL_BAD_PARAMETER, "eglGetConfigs"); |
| 832 | 832 |
| 833 *num_config = _eglFlattenArray(disp->Configs, (void *) configs, | 833 *num_config = _eglFlattenArray(disp->Configs, (void *) configs, |
| 834 sizeof(configs[0]), config_size, _eglFlattenConfig); | 834 sizeof(configs[0]), config_size, _eglFlattenConfig); |
| 835 | 835 |
| 836 return EGL_TRUE; | 836 return EGL_TRUE; |
| 837 } | 837 } |
| OLD | NEW |