Revert pending surface destruction (part of revision 632).
TRAC #16271
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@656 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libEGL/Display.cpp b/src/libEGL/Display.cpp
index 68eef76..4dcaa0a 100644
--- a/src/libEGL/Display.cpp
+++ b/src/libEGL/Display.cpp
@@ -603,15 +603,8 @@
void Display::destroySurface(egl::Surface *surface)
{
- if (surface == egl::getCurrentDrawSurface() || surface == egl::getCurrentReadSurface())
- {
- surface->setPendingDestroy();
- }
- else
- {
- delete surface;
- mSurfaceSet.erase(surface);
- }
+ delete surface;
+ mSurfaceSet.erase(surface);
}
void Display::destroyContext(gl::Context *context)
@@ -645,7 +638,7 @@
bool Display::isValidSurface(egl::Surface *surface)
{
- return mSurfaceSet.find(surface) != mSurfaceSet.end() && !surface->isPendingDestroy();
+ return mSurfaceSet.find(surface) != mSurfaceSet.end();
}
bool Display::hasExistingWindowSurface(HWND window)