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

Unified Diff: content/gpu/gpu_main.cc

Issue 2584513002: gpu: Don't destroy the ui::PlatformEventSource too early (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_main.cc
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 00c21c825ff7453ab7880a706cdfff55240b8988..9fc8ece81a8b9357c4b4042fbe080e8f313330ad 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -201,6 +201,7 @@ int GpuMain(const MainFunctionParams& parameters) {
// TODO(ericrk): Revisit this once we assess its impact on crbug.com/662802
// and crbug.com/609252.
std::unique_ptr<base::MessageLoop> main_message_loop;
+ std::unique_ptr<ui::PlatformEventSource> event_source;
if (command_line.HasSwitch(switches::kHeadless)) {
main_message_loop.reset(
new base::MessageLoop(base::MessageLoop::TYPE_DEFAULT));
@@ -214,8 +215,7 @@ int GpuMain(const MainFunctionParams& parameters) {
// We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX
// and https://crbug.com/326995.
main_message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI));
- std::unique_ptr<ui::PlatformEventSource> event_source =
- ui::PlatformEventSource::CreateDefault();
+ event_source = ui::PlatformEventSource::CreateDefault();
#elif defined(USE_OZONE) && defined(OZONE_X11)
// If we might be running Ozone X11 we need a UI loop to grab Expose events.
// See GLSurfaceGLX and https://crbug.com/326995.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698