eglChooseConfig must return filtered size when configs is NULL.

TRAC #12234 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Andrew Lewycky git-svn-id: https://angleproject.googlecode.com/svn/trunk@275 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 7e0ed77c
......@@ -314,8 +314,6 @@ size_t ConfigSet::size() const
bool ConfigSet::getConfigs(EGLConfig *configs, const EGLint *attribList, EGLint configSize, EGLint *numConfig)
{
if (configs)
{
vector<const Config*> passed;
passed.reserve(mSet.size());
......@@ -375,6 +373,8 @@ bool ConfigSet::getConfigs(EGLConfig *configs, const EGLint *attribList, EGLint
}
}
if (configs)
{
sort(passed.begin(), passed.end(), SortConfig(attribList));
EGLint index;
......@@ -387,7 +387,7 @@ bool ConfigSet::getConfigs(EGLConfig *configs, const EGLint *attribList, EGLint
}
else
{
*numConfig = (EGLint)mSet.size();
*numConfig = passed.size();
}
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment