mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 630346 - Merge LayerManagerOGL::CleanupResources into LayerManagerOGL::Destroy r=karlt
--HG-- extra : rebase_source : ef7c3c9855f3a3e22b8a8529d922587eaf71ba43
This commit is contained in:
parent
cc2ccf530a
commit
ec6cdae848
@ -308,28 +308,17 @@ LayerManagerOGL::~LayerManagerOGL()
|
||||
void
|
||||
LayerManagerOGL::Destroy()
|
||||
{
|
||||
if (!mDestroyed) {
|
||||
if (mRoot) {
|
||||
RootLayer()->Destroy();
|
||||
}
|
||||
mRoot = nullptr;
|
||||
|
||||
CleanupResources();
|
||||
|
||||
mDestroyed = true;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LayerManagerOGL::CleanupResources()
|
||||
{
|
||||
if (!mGLContext)
|
||||
if (mDestroyed)
|
||||
return;
|
||||
|
||||
if (mRoot) {
|
||||
RootLayer()->CleanupResources();
|
||||
RootLayer()->Destroy();
|
||||
mRoot = nullptr;
|
||||
}
|
||||
|
||||
if (!mGLContext)
|
||||
return;
|
||||
|
||||
nsRefPtr<GLContext> ctx = mGLContext->GetSharedContext();
|
||||
if (!ctx) {
|
||||
ctx = mGLContext;
|
||||
@ -362,6 +351,8 @@ LayerManagerOGL::CleanupResources()
|
||||
}
|
||||
|
||||
mGLContext = nullptr;
|
||||
|
||||
mDestroyed = true;
|
||||
}
|
||||
|
||||
already_AddRefed<mozilla::gl::GLContext>
|
||||
|
@ -59,8 +59,6 @@ public:
|
||||
bool aIsRenderingToEGLSurface = false);
|
||||
virtual ~LayerManagerOGL();
|
||||
|
||||
void CleanupResources();
|
||||
|
||||
void Destroy();
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user