equal
deleted
inserted
replaced
86 case EGL_LUMINANCE_SIZE: return 0; |
86 case EGL_LUMINANCE_SIZE: return 0; |
87 #endif |
87 #endif |
88 #if defined(EGL_ALPHA_MASK_SIZE) |
88 #if defined(EGL_ALPHA_MASK_SIZE) |
89 case EGL_ALPHA_MASK_SIZE: return 0; |
89 case EGL_ALPHA_MASK_SIZE: return 0; |
90 #endif |
90 #endif |
|
91 #if defined(EGL_BIND_TO_TEXTURE_RGB) |
91 case EGL_BIND_TO_TEXTURE_RGB: return EGL_DONT_CARE; |
92 case EGL_BIND_TO_TEXTURE_RGB: return EGL_DONT_CARE; |
|
93 #endif |
|
94 #if defined(EGL_BIND_TO_TEXTURE_RGBA) |
92 case EGL_BIND_TO_TEXTURE_RGBA: return EGL_DONT_CARE; |
95 case EGL_BIND_TO_TEXTURE_RGBA: return EGL_DONT_CARE; |
|
96 #endif |
93 #if defined(EGL_COLOR_BUFFER_TYPE) |
97 #if defined(EGL_COLOR_BUFFER_TYPE) |
94 case EGL_COLOR_BUFFER_TYPE: return EGL_RGB_BUFFER; |
98 case EGL_COLOR_BUFFER_TYPE: return EGL_RGB_BUFFER; |
95 #endif |
99 #endif |
96 case EGL_CONFIG_CAVEAT: return EGL_DONT_CARE; |
100 case EGL_CONFIG_CAVEAT: return EGL_DONT_CARE; |
97 case EGL_CONFIG_ID: return EGL_DONT_CARE; |
101 case EGL_CONFIG_ID: return EGL_DONT_CARE; |
223 // because the previous request did not result in success. Returns |
227 // because the previous request did not result in success. Returns |
224 // true if the complexity was reduced, or false if no further |
228 // true if the complexity was reduced, or false if no further |
225 // reductions in complexity are possible. |
229 // reductions in complexity are possible. |
226 bool QEglProperties::reduceConfiguration() |
230 bool QEglProperties::reduceConfiguration() |
227 { |
231 { |
|
232 // EGL chooses configs with the highest color depth over |
|
233 // those with smaller (but faster) lower color depths. One |
|
234 // way around this is to set EGL_BUFFER_SIZE to 16, which |
|
235 // trumps the others. Of course, there may not be a 16-bit |
|
236 // config avaliable, so it's the first restraint we remove. |
|
237 if (value(EGL_BUFFER_SIZE) == 16) { |
|
238 removeValue(EGL_BUFFER_SIZE); |
|
239 return true; |
|
240 } |
228 if (removeValue(EGL_SAMPLE_BUFFERS)) { |
241 if (removeValue(EGL_SAMPLE_BUFFERS)) { |
229 removeValue(EGL_SAMPLES); |
242 removeValue(EGL_SAMPLES); |
230 return true; |
243 return true; |
231 } |
244 } |
232 if (removeValue(EGL_ALPHA_SIZE)) { |
245 if (removeValue(EGL_ALPHA_SIZE)) { |