From aefe95f83cb104c562379a24e25b38e98cd4f3dc Mon Sep 17 00:00:00 2001 From: Joe Drew Date: Mon, 6 Feb 2012 22:09:28 -0500 Subject: [PATCH] Bug 720467 - Shut down all the available GL context providers. r=jgilbert --- gfx/thebes/gfxPlatform.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 7de9948a11d..beff4eddba0 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -367,6 +367,16 @@ gfxPlatform::Shutdown() } mozilla::gl::GLContextProvider::Shutdown(); + mozilla::gl::GLContextProviderOSMesa::Shutdown(); + +#if defined(XP_WIN) + // The above shutdown call shuts down the default context provider for the + // platform. Windows is a "special snowflake", though, and has three context + // providers available, so we have to shut all of them down. + // We should only support one GL provider on Windows; then, this could go + // away. We currently support WGL for WebGL on Optimus. + mozilla::gl::GLContextProviderEGL::Shutdown(); +#endif delete gPlatform; gPlatform = nsnull;