Commit 15dc05fc by Geoff Lang

Only request PostSubBuffer support when the extension is available.

BUG=angle:658 Change-Id: I6828290ef89c57e8c794f0fca6e5991c492b67aa Reviewed-on: https://chromium-review.googlesource.com/242572Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent f81b6a15
......@@ -5,6 +5,7 @@
//
#include <cassert>
#include <vector>
#include "EGLWindow.h"
#include "OSWindow.h"
......@@ -154,13 +155,17 @@ bool EGLWindow::initializeGL(OSWindow *osWindow)
eglGetConfigAttrib(mDisplay, mConfig, EGL_DEPTH_SIZE, &mDepthBits);
eglGetConfigAttrib(mDisplay, mConfig, EGL_STENCIL_SIZE, &mStencilBits);
const EGLint surfaceAttributes[] =
std::vector<EGLint> surfaceAttributes;
if (strstr(eglQueryString(mDisplay, EGL_EXTENSIONS), "EGL_NV_post_sub_buffer") != nullptr)
{
EGL_POST_SUB_BUFFER_SUPPORTED_NV, EGL_TRUE,
EGL_NONE, EGL_NONE,
};
surfaceAttributes.push_back(EGL_POST_SUB_BUFFER_SUPPORTED_NV);
surfaceAttributes.push_back(EGL_TRUE);
}
surfaceAttributes.push_back(EGL_NONE);
surfaceAttributes.push_back(EGL_NONE);
mSurface = eglCreateWindowSurface(mDisplay, mConfig, osWindow->getNativeWindow(), surfaceAttributes);
mSurface = eglCreateWindowSurface(mDisplay, mConfig, osWindow->getNativeWindow(), &surfaceAttributes[0]);
if (mSurface == EGL_NO_SURFACE)
{
eglGetError(); // Clear error and try again
......
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