Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: ui/compositor/test/context_factories_for_test.cc

Issue 2240503002: exo: Release context provider references when main thread context is lost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: exo: Release context provider references when main thread context is lost. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/exo/buffer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/context_factories_for_test.cc
diff --git a/ui/compositor/test/context_factories_for_test.cc b/ui/compositor/test/context_factories_for_test.cc
index 78aac8d3fafbfa9db15535e212e1c157c883d871..174f34160cb093c5a16f126fb26613c2fa9797dd 100644
--- a/ui/compositor/test/context_factories_for_test.cc
+++ b/ui/compositor/test/context_factories_for_test.cc
@@ -15,7 +15,7 @@
namespace {
static cc::SurfaceManager* g_surface_manager = nullptr;
-static ui::ContextFactory* g_implicit_factory = NULL;
+static ui::InProcessContextFactory* g_implicit_factory = NULL;
static gl::DisableNullDrawGLBindings* g_disable_null_draw = NULL;
} // namespace
@@ -39,8 +39,11 @@ ui::ContextFactory* InitializeContextFactoryForTests(bool enable_pixel_output) {
}
void TerminateContextFactoryForTests() {
- delete g_implicit_factory;
- g_implicit_factory = NULL;
+ if (g_implicit_factory) {
+ g_implicit_factory->SendOnLostResources();
+ delete g_implicit_factory;
+ g_implicit_factory = NULL;
+ }
delete g_surface_manager;
g_surface_manager = nullptr;
delete g_disable_null_draw;
« no previous file with comments | « components/exo/buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698