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

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

Issue 22289002: Added suspend/resume detection to the GpuWatchdogThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Derp. Null references are bad. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/gpu/gpu_watchdog_thread.h » ('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) 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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 dead_on_arrival, 287 dead_on_arrival,
288 gpu_info, 288 gpu_info,
289 deferred_messages.Get()); 289 deferred_messages.Get());
290 while (!deferred_messages.Get().empty()) 290 while (!deferred_messages.Get().empty())
291 deferred_messages.Get().pop(); 291 deferred_messages.Get().pop();
292 292
293 child_thread->Init(start_time); 293 child_thread->Init(start_time);
294 294
295 gpu_process.set_main_thread(child_thread); 295 gpu_process.set_main_thread(child_thread);
296 296
297 if (watchdog_thread)
298 watchdog_thread->AddPowerObserver();
299
297 { 300 {
298 TRACE_EVENT0("gpu", "Run Message Loop"); 301 TRACE_EVENT0("gpu", "Run Message Loop");
299 main_message_loop.Run(); 302 main_message_loop.Run();
300 } 303 }
301 304
302 child_thread->StopWatchdog(); 305 child_thread->StopWatchdog();
303 306
304 return 0; 307 return 0;
305 } 308 }
306 309
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 return true; 430 return true;
428 } 431 }
429 432
430 return false; 433 return false;
431 } 434 }
432 #endif // defined(OS_WIN) 435 #endif // defined(OS_WIN)
433 436
434 } // namespace. 437 } // namespace.
435 438
436 } // namespace content 439 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/gpu/gpu_watchdog_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698