зеркало из https://github.com/mozilla/gecko-dev.git
Bug 630346 - Merge LayerManagerOGL::CleanupResources into LayerManagerOGL::Destroy r=karlt
--HG-- extra : rebase_source : ef7c3c9855f3a3e22b8a8529d922587eaf71ba43
This commit is contained in:
Родитель
6002e5ebc8
Коммит
b83a189ea1
|
@ -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();
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче