Revert "Request specific ANGLE context versions."

This reverts commit 8eeff5ccf3.

Reason for revert: Breaking the Win10 ANGLE bots. https://status.skia.org/repo/skia?commit_label=author&filter=search&search_value=ANGLE

Original change's description:
> Request specific ANGLE context versions.
> 
> Using the ANGLE_create_context_backwards_compatible extension, request
> explicit ANGLE context versions to make sure test coverage of context
> versions matches Chrome.
> 
> BUG=skia:10309
> 
> Change-Id: Ifa4a36851a0517b369d094e5707348a20eaf3879
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293339
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Auto-Submit: Geoff Lang <geofflang@google.com>

TBR=bsalomon@google.com,geofflang@google.com

Change-Id: I5be9651bdc5d72fd02049f3280f11fc32213c231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10309
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293536
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
This commit is contained in:
Joe Gregorio 2020-06-02 12:26:50 +00:00 committed by Skia Commit-Bot
parent 3a5de9aae1
commit e8121e57ab

View File

@ -25,8 +25,6 @@
#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
#define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x320D
#define EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE 0x3483
using sk_gpu_test::ANGLEBackend;
using sk_gpu_test::ANGLEContextVersion;
@ -283,20 +281,12 @@ ANGLEGLContext::ANGLEGLContext(ANGLEBackend type, ANGLEContextVersion version,
}
int versionNum = ANGLEContextVersion::kES2 == version ? 2 : 3;
std::vector<EGLint> contextAttribs = {
const EGLint contextAttribs[] = {
EGL_CONTEXT_CLIENT_VERSION, versionNum,
EGL_NONE
};
const char* extensions = eglQueryString(fDisplay, EGL_EXTENSIONS);
if (strstr(extensions, "EGL_ANGLE_create_context_backwards_compatible")) {
contextAttribs.push_back(EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE);
contextAttribs.push_back(EGL_FALSE);
}
contextAttribs.push_back(EGL_NONE);
EGLContext eglShareContext = shareContext ? shareContext->fContext : nullptr;
fContext = eglCreateContext(fDisplay, surfaceConfig, eglShareContext, contextAttribs.data());
fContext = eglCreateContext(fDisplay, surfaceConfig, eglShareContext, contextAttribs);
if (EGL_NO_CONTEXT == fContext) {
SkDebugf("Could not create context!");
this->destroyGLContext();
@ -347,6 +337,7 @@ ANGLEGLContext::ANGLEGLContext(ANGLEBackend type, ANGLEContextVersion version,
break;
}
#endif
const char* extensions = eglQueryString(fDisplay, EGL_EXTENSIONS);
if (strstr(extensions, "EGL_KHR_image")) {
fCreateImage = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR");
fDestroyImage = (PFNEGLDESTROYIMAGEKHRPROC)eglGetProcAddress("eglDestroyImageKHR");