mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1329362
- part 4, Remove unused Windows class AutoDestroyHWND from GLContextProviderEGL r=kats
This commit is contained in:
parent
90668218b7
commit
c18622c8f4
@ -39,41 +39,6 @@
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
// a little helper
|
||||
class AutoDestroyHWND {
|
||||
public:
|
||||
explicit AutoDestroyHWND(HWND aWnd = nullptr)
|
||||
: mWnd(aWnd)
|
||||
{
|
||||
}
|
||||
|
||||
~AutoDestroyHWND() {
|
||||
if (mWnd) {
|
||||
::DestroyWindow(mWnd);
|
||||
}
|
||||
}
|
||||
|
||||
operator HWND() {
|
||||
return mWnd;
|
||||
}
|
||||
|
||||
HWND forget() {
|
||||
HWND w = mWnd;
|
||||
mWnd = nullptr;
|
||||
return w;
|
||||
}
|
||||
|
||||
HWND operator=(HWND aWnd) {
|
||||
if (mWnd && mWnd != aWnd) {
|
||||
::DestroyWindow(mWnd);
|
||||
}
|
||||
mWnd = aWnd;
|
||||
return mWnd;
|
||||
}
|
||||
|
||||
HWND mWnd;
|
||||
};
|
||||
#else
|
||||
#error "Platform not recognized"
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user