Revert "Destroy ANGLE displays in destroyGLContext"
This reverts commit c1359888c021ad4594d22d849b2414fd0cdec6f5.
Reason for revert: failing botbots
Original change's description:
> Destroy ANGLE displays in destroyGLContext
>
> Bug: skia:6711
> Change-Id: I770bb390d7b4e156116411bc6ce796375a6ddf21
> Reviewed-on: https://skia-review.googlesource.com/18588
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6711
Change-Id: I2087153f1601dfade8442f0918ffd71e0cacff08
Reviewed-on: https://skia-review.googlesource.com/18621
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tools/gpu/gl/angle/GLTestContext_angle.cpp b/tools/gpu/gl/angle/GLTestContext_angle.cpp
index a35a9cf..c0ea485 100644
--- a/tools/gpu/gl/angle/GLTestContext_angle.cpp
+++ b/tools/gpu/gl/angle/GLTestContext_angle.cpp
@@ -161,24 +161,6 @@
return;
}
-#ifdef SK_DEBUG
- // Verify that the interface we requested was actuall returned to us
- const GrGLubyte* rendererUByte;
- GR_GL_CALL_RET(gl.get(), rendererUByte, GetString(GR_GL_RENDERER));
- const char* renderer = reinterpret_cast<const char*>(rendererUByte);
- switch (type) {
- case ANGLEBackend::kD3D9:
- SkASSERT(strstr(renderer, "Direct3D9"));
- break;
- case ANGLEBackend::kD3D11:
- SkASSERT(strstr(renderer, "Direct3D11"));
- break;
- case ANGLEBackend::kOpenGL:
- SkASSERT(strstr(renderer, "OpenGL"));
- break;
- }
-#endif
-
this->init(gl.release());
}
@@ -247,7 +229,7 @@
void ANGLEGLContext::destroyGLContext() {
if (fDisplay) {
- eglMakeCurrent(fDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+ eglMakeCurrent(fDisplay, 0, 0, 0);
if (fContext) {
eglDestroyContext(fDisplay, fContext);
@@ -259,10 +241,8 @@
fSurface = EGL_NO_SURFACE;
}
- if (EGL_NO_DISPLAY != fDisplay) {
- eglTerminate(fDisplay);
- fDisplay = EGL_NO_DISPLAY;
- }
+ //TODO should we close the display?
+ fDisplay = EGL_NO_DISPLAY;
}
}