Merge "opengles Translator: sort conformant configs first"

This commit is contained in:
David Turner
2011-07-03 05:23:25 -07:00
committed by Android Code Review

View File

@@ -217,6 +217,10 @@ bool EglConfig::compitableWith(const EglConfig& conf) const {
//following the sorting EGLconfig as in spec
bool EglConfig::operator<(const EglConfig& conf) const {
//0
if(m_conformant != conf.m_conformant) {
return m_conformant != 0; //We want the conformant ones first
}
//1
if(m_caveat != conf.m_caveat) {
return m_caveat < conf.m_caveat; // EGL_NONE < EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG
@@ -292,7 +296,7 @@ bool EglConfig::choosen(const EglConfig& dummy) {
if(dummy.m_surface_type != EGL_DONT_CARE &&
((dummy.m_surface_type & m_surface_type) != dummy.m_surface_type)) return false;
if(dummy.m_conformant != EGL_DONT_CARE &&
if(dummy.m_conformant != (EGLenum)EGL_DONT_CARE &&
((dummy.m_conformant & m_conformant) != dummy.m_conformant)) return false;
if(dummy.m_renderable_type != EGL_DONT_CARE &&