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

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 1043233003: ozone: Add post message loop initialization hook (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/gpu/gpu_main.cc » ('j') | ui/ozone/public/ozone_platform.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/gpu/gpu_child_thread.h" 5 #include "content/gpu/gpu_child_thread.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/worker_pool.h" 9 #include "base/threading/worker_pool.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 base::CommandLine::ForCurrentProcess()->HasSwitch( 90 base::CommandLine::ForCurrentProcess()->HasSwitch(
91 switches::kInProcessGPU)); 91 switches::kInProcessGPU));
92 #if !defined(OS_ANDROID) 92 #if !defined(OS_ANDROID)
93 // For single process and in-process GPU mode, we need to load and 93 // For single process and in-process GPU mode, we need to load and
94 // initialize the GL implementation and locate the GL entry points here. 94 // initialize the GL implementation and locate the GL entry points here.
95 // On Android, GLSurface::InitializeOneOff() is called from BrowserMainLoop 95 // On Android, GLSurface::InitializeOneOff() is called from BrowserMainLoop
96 // before getting here. crbug.com/326295 96 // before getting here. crbug.com/326295
97 if (!gfx::GLSurface::InitializeOneOff()) 97 if (!gfx::GLSurface::InitializeOneOff())
98 VLOG(1) << "gfx::GLSurface::InitializeOneOff failed"; 98 VLOG(1) << "gfx::GLSurface::InitializeOneOff failed";
99 #endif 99 #endif
100 #if defined(USE_OZONE)
101 ui::OzonePlatform::InitializeForGPUPostMainLoop();
102 #endif
100 g_thread_safe_sender.Get() = thread_safe_sender(); 103 g_thread_safe_sender.Get() = thread_safe_sender();
101 } 104 }
102 105
103 GpuChildThread::~GpuChildThread() { 106 GpuChildThread::~GpuChildThread() {
104 } 107 }
105 108
106 void GpuChildThread::Shutdown() { 109 void GpuChildThread::Shutdown() {
107 ChildThreadImpl::Shutdown(); 110 ChildThreadImpl::Shutdown();
108 logging::SetLogMessageHandler(NULL); 111 logging::SetLogMessageHandler(NULL);
109 } 112 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 289 }
287 290
288 void GpuChildThread::OnGpuSwitched() { 291 void GpuChildThread::OnGpuSwitched() {
289 DVLOG(1) << "GPU: GPU has switched"; 292 DVLOG(1) << "GPU: GPU has switched";
290 // Notify observers in the GPU process. 293 // Notify observers in the GPU process.
291 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched(); 294 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched();
292 } 295 }
293 296
294 } // namespace content 297 } // namespace content
295 298
OLDNEW
« no previous file with comments | « no previous file | content/gpu/gpu_main.cc » ('j') | ui/ozone/public/ozone_platform.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698