Index: media/video/capture/screen/screen_capturer_win.cc |
diff --git a/media/video/capture/screen/screen_capturer_win.cc b/media/video/capture/screen/screen_capturer_win.cc |
index 796af5f85ea86b648598767a10e3fb9ef8914cdb..219641ecde45b5cfc63a2483ce907ef765b6e8aa 100644 |
--- a/media/video/capture/screen/screen_capturer_win.cc |
+++ b/media/video/capture/screen/screen_capturer_win.cc |
@@ -216,8 +216,10 @@ void ScreenCapturerWin::InvalidateRegion(const SkRegion& invalid_region) { |
void ScreenCapturerWin::CaptureFrame() { |
base::Time capture_start_time = base::Time::Now(); |
- // Force the system to power-up display hardware, if it has been suspended. |
- SetThreadExecutionState(ES_DISPLAY_REQUIRED); |
+ // Request that the system not power-down the system, or the display hardware. |
+ if (!SetThreadExecutionState(ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED)) { |
+ LOG(WARNING) << "Failed to make system & display power assertion"; |
alexeypa (please no reviews)
2013/02/11 17:02:28
nit #1: LOG_GETLASTERROR(WARNING).
nit #2: this w
Wez
2013/02/12 01:52:46
I've settled on just logging the first failure per
|
+ } |
// Make sure the GDI capture resources are up-to-date. |
PrepareCaptureResources(); |