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

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

Issue 7265009: Revert 90464 - Move app/win/* files to base/win/, ui/base/win and chrome/common/ directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/win/scoped_com_initializer.h"
10 #include "base/command_line.h" 11 #include "base/command_line.h"
11 #include "base/threading/worker_pool.h" 12 #include "base/threading/worker_pool.h"
12 #include "base/win/scoped_com_initializer.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "content/common/child_process.h" 14 #include "content/common/child_process.h"
15 #include "content/common/content_client.h" 15 #include "content/common/content_client.h"
16 #include "content/common/content_switches.h" 16 #include "content/common/content_switches.h"
17 #include "content/common/gpu/gpu_messages.h" 17 #include "content/common/gpu/gpu_messages.h"
18 #include "content/gpu/gpu_info_collector.h" 18 #include "content/gpu/gpu_info_collector.h"
19 #include "content/gpu/gpu_watchdog_thread.h" 19 #include "content/gpu/gpu_watchdog_thread.h"
20 #include "ipc/ipc_channel_handle.h" 20 #include "ipc/ipc_channel_handle.h"
21 #include "ui/gfx/gl/gl_implementation.h" 21 #include "ui/gfx/gl/gl_implementation.h"
22 #include "ui/gfx/gl/gl_surface.h" 22 #include "ui/gfx/gl/gl_surface.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // Do not sleep here. The GPU watchdog timer tracks the amount of user 252 // Do not sleep here. The GPU watchdog timer tracks the amount of user
253 // time this thread is using and it doesn't use much while calling Sleep. 253 // time this thread is using and it doesn't use much while calling Sleep.
254 } 254 }
255 } 255 }
256 256
257 #if defined(OS_WIN) 257 #if defined(OS_WIN)
258 258
259 // Runs on a worker thread. The GPU process never terminates voluntarily so 259 // Runs on a worker thread. The GPU process never terminates voluntarily so
260 // it is safe to assume that its message loop is valid. 260 // it is safe to assume that its message loop is valid.
261 void GpuChildThread::CollectDxDiagnostics(GpuChildThread* thread) { 261 void GpuChildThread::CollectDxDiagnostics(GpuChildThread* thread) {
262 base::win::ScopedCOMInitializer com_initializer; 262 app::win::ScopedCOMInitializer com_initializer;
263 263
264 DxDiagNode node; 264 DxDiagNode node;
265 gpu_info_collector::GetDxDiagnostics(&node); 265 gpu_info_collector::GetDxDiagnostics(&node);
266 266
267 thread->message_loop()->PostTask( 267 thread->message_loop()->PostTask(
268 FROM_HERE, 268 FROM_HERE,
269 NewRunnableFunction(&GpuChildThread::SetDxDiagnostics, thread, node)); 269 NewRunnableFunction(&GpuChildThread::SetDxDiagnostics, thread, node));
270 } 270 }
271 271
272 // Runs on the main thread. 272 // Runs on the main thread.
273 void GpuChildThread::SetDxDiagnostics(GpuChildThread* thread, 273 void GpuChildThread::SetDxDiagnostics(GpuChildThread* thread,
274 const DxDiagNode& node) { 274 const DxDiagNode& node) {
275 thread->gpu_info_.dx_diagnostics = node; 275 thread->gpu_info_.dx_diagnostics = node;
276 thread->gpu_info_.finalized = true; 276 thread->gpu_info_.finalized = true;
277 thread->collecting_dx_diagnostics_ = false; 277 thread->collecting_dx_diagnostics_ = false;
278 thread->Send(new GpuHostMsg_GraphicsInfoCollected(thread->gpu_info_)); 278 thread->Send(new GpuHostMsg_GraphicsInfoCollected(thread->gpu_info_));
279 } 279 }
280 280
281 #endif 281 #endif
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698