bug 911199 - Bug fix on GL version comparaison causing crash on devices supporting OpenGL ES 3.0 - r=bjacob

This commit is contained in:
Guillaume Abadie 2013-08-30 14:17:43 -04:00
parent 056669a343
commit 774f7766c8

View File

@ -254,14 +254,16 @@ public:
MOZ_ASSERT(mProfile != ContextProfile::Unknown, "unknown context profile");
MOZ_ASSERT(mVersion != 0, "unknown context version");
if (profile == ContextProfile::OpenGL) {
return (profile == ContextProfile::OpenGLCore ||
profile == ContextProfile::OpenGLCompatibility) &&
version >= mVersion;
if (version > mVersion) {
return false;
}
return profile == mProfile &&
version >= mVersion;
if (profile == ContextProfile::OpenGL) {
return profile == ContextProfile::OpenGLCore ||
profile == ContextProfile::OpenGLCompatibility;
}
return profile == mProfile;
}
/**