diff options
author | Liang Qi <liang.qi@qt.io> | 2019-04-24 09:52:30 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-04-24 09:52:30 +0200 |
commit | dc373186841802f2dd17fcd243efdeca7d5433e9 (patch) | |
tree | 4fff0a3366b63db97ca5a8b04a220bb0b8c56450 /src/3rdparty | |
parent | 7d646508c8219408f90103ed13613db8d01a4065 (diff) | |
parent | cb10ec56f733c34d23c9e5511b19c1e508d0f13f (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/gui/util/qshaderformat.cpp
src/gui/util/qshaderformat_p.h
src/widgets/graphicsview/qgraphicsitem_p.h
Change-Id: Idafd88eb9a0a15b4af29f6143d009c1ec8ceecca
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/angle/src/libANGLE/Display.cpp | 17 | ||||
-rw-r--r-- | src/3rdparty/angle/src/libANGLE/Display.h | 1 | ||||
-rw-r--r-- | src/3rdparty/angle/src/libGLESv2/global_state.cpp | 2 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/Display.cpp b/src/3rdparty/angle/src/libANGLE/Display.cpp index 735b472787..0bb0bb05b1 100644 --- a/src/3rdparty/angle/src/libANGLE/Display.cpp +++ b/src/3rdparty/angle/src/libANGLE/Display.cpp @@ -364,6 +364,23 @@ Display *Display::GetDisplayFromDevice(Device *device, const AttributeMap &attri return display; } +//static +void Display::CleanupDisplays() +{ + // ~Display takes care of removing the entry from the according map + { + ANGLEPlatformDisplayMap *displays = GetANGLEPlatformDisplayMap(); + while (!displays->empty()) + delete displays->begin()->second; + } + + { + DevicePlatformDisplayMap *displays = GetDevicePlatformDisplayMap(); + while (!displays->empty()) + delete displays->begin()->second; + } +} + Display::Display(EGLenum platform, EGLNativeDisplayType displayId, Device *eglDevice) : mImplementation(nullptr), mDisplayId(displayId), diff --git a/src/3rdparty/angle/src/libANGLE/Display.h b/src/3rdparty/angle/src/libANGLE/Display.h index aa1d1c3b37..2a1c386d75 100644 --- a/src/3rdparty/angle/src/libANGLE/Display.h +++ b/src/3rdparty/angle/src/libANGLE/Display.h @@ -65,6 +65,7 @@ class Display final : angle::NonCopyable static Display *GetDisplayFromDevice(Device *device, const AttributeMap &attribMap); static Display *GetDisplayFromNativeDisplay(EGLNativeDisplayType nativeDisplay, const AttributeMap &attribMap); + static void CleanupDisplays(); static const ClientExtensions &GetClientExtensions(); static const std::string &GetClientExtensionString(); diff --git a/src/3rdparty/angle/src/libGLESv2/global_state.cpp b/src/3rdparty/angle/src/libGLESv2/global_state.cpp index c5f3dfe4e1..26045bf5b2 100644 --- a/src/3rdparty/angle/src/libGLESv2/global_state.cpp +++ b/src/3rdparty/angle/src/libGLESv2/global_state.cpp @@ -13,6 +13,7 @@ #include "common/tls.h" #include "libANGLE/Thread.h" +#include "libANGLE/Display.h" namespace gl { @@ -140,6 +141,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE, DWORD reason, LPVOID) return static_cast<BOOL>(egl::DeallocateCurrentThread()); case DLL_PROCESS_DETACH: + egl::Display::CleanupDisplays(); return static_cast<BOOL>(egl::TerminateProcess()); } |