Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: third_party/mesa/MesaLib/src/egl/main/eglconfig.c

Issue 5750002: Added facility to compile Mesa EGL implementation. Fixed a few issues so that... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/mesa/MesaLib/src/egl/main/eglconfig.h ('k') | third_party/mesa/README.chromium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 ATTRIB_CRITERION_SPECIAL, 205 ATTRIB_CRITERION_SPECIAL,
206 EGL_NONE }, 206 EGL_NONE },
207 /* there is a gap before EGL_SAMPLES */ 207 /* there is a gap before EGL_SAMPLES */
208 { 0x3030, ATTRIB_TYPE_PSEUDO, 208 { 0x3030, ATTRIB_TYPE_PSEUDO,
209 ATTRIB_CRITERION_IGNORE, 209 ATTRIB_CRITERION_IGNORE,
210 0 }, 210 0 },
211 { EGL_NONE, ATTRIB_TYPE_PSEUDO, 211 { EGL_NONE, ATTRIB_TYPE_PSEUDO,
212 ATTRIB_CRITERION_IGNORE, 212 ATTRIB_CRITERION_IGNORE,
213 0 }, 213 0 },
214 214
215 #ifdef EGL_NOK_texture_from_pixmap
215 { EGL_Y_INVERTED_NOK, ATTRIB_TYPE_BOOLEAN, 216 { EGL_Y_INVERTED_NOK, ATTRIB_TYPE_BOOLEAN,
216 ATTRIB_CRITERION_EXACT, 217 ATTRIB_CRITERION_EXACT,
217 EGL_DONT_CARE }, 218 EGL_DONT_CARE },
219 #endif
218 220
219 }; 221 };
220 222
221 223
222 /** 224 /**
223 * Return true if a config is valid. When for_matching is true, 225 * Return true if a config is valid. When for_matching is true,
224 * EGL_DONT_CARE is accepted as a valid attribute value, and checks 226 * EGL_DONT_CARE is accepted as a valid attribute value, and checks
225 * for conflicting attribute values are skipped. 227 * for conflicting attribute values are skipped.
226 * 228 *
227 * Note that some attributes are platform-dependent and are not 229 * Note that some attributes are platform-dependent and are not
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 return EGL_FALSE; 484 return EGL_FALSE;
483 485
484 /* there are some holes in the range */ 486 /* there are some holes in the range */
485 switch (attr) { 487 switch (attr) {
486 case 0x3030 /* a gap before EGL_SAMPLES */: 488 case 0x3030 /* a gap before EGL_SAMPLES */:
487 case EGL_NONE: 489 case EGL_NONE:
488 #ifdef EGL_VERSION_1_4 490 #ifdef EGL_VERSION_1_4
489 case EGL_MATCH_NATIVE_PIXMAP: 491 case EGL_MATCH_NATIVE_PIXMAP:
490 #endif 492 #endif
491 return EGL_FALSE; 493 return EGL_FALSE;
494 #ifdef EGL_NOK_texture_from_pixmap
492 case EGL_Y_INVERTED_NOK: 495 case EGL_Y_INVERTED_NOK:
493 return conf->Display->Extensions.NOK_texture_from_pixmap; 496 return conf->Display->Extensions.NOK_texture_from_pixmap;
497 #endif
494 default: 498 default:
495 break; 499 break;
496 } 500 }
497 501
498 return EGL_TRUE; 502 return EGL_TRUE;
499 } 503 }
500 504
501 /** 505 /**
502 * Initialize a criteria config from the given attribute list. 506 * Initialize a criteria config from the given attribute list.
503 * Return EGL_FALSE if any of the attribute is invalid. 507 * Return EGL_FALSE if any of the attribute is invalid.
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 EGLint config_size, EGLint *num_config) 828 EGLint config_size, EGLint *num_config)
825 { 829 {
826 if (!num_config) 830 if (!num_config)
827 return _eglError(EGL_BAD_PARAMETER, "eglGetConfigs"); 831 return _eglError(EGL_BAD_PARAMETER, "eglGetConfigs");
828 832
829 *num_config = _eglFlattenArray(disp->Configs, (void *) configs, 833 *num_config = _eglFlattenArray(disp->Configs, (void *) configs,
830 sizeof(configs[0]), config_size, _eglFlattenConfig); 834 sizeof(configs[0]), config_size, _eglFlattenConfig);
831 835
832 return EGL_TRUE; 836 return EGL_TRUE;
833 } 837 }
OLDNEW
« no previous file with comments | « third_party/mesa/MesaLib/src/egl/main/eglconfig.h ('k') | third_party/mesa/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698