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

Side by Side Diff: remoting/host/capturer_win.cc

Issue 9968071: Ensure display hardware is powered up during Chromoting sessions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/host/event_executor_win.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) 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 "remoting/host/capturer.h" 5 #include "remoting/host/capturer.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 void CapturerGdi::InvalidateScreen(const SkISize& size) { 146 void CapturerGdi::InvalidateScreen(const SkISize& size) {
147 helper_.InvalidateScreen(size); 147 helper_.InvalidateScreen(size);
148 } 148 }
149 149
150 void CapturerGdi::InvalidateFullScreen() { 150 void CapturerGdi::InvalidateFullScreen() {
151 helper_.InvalidateFullScreen(); 151 helper_.InvalidateFullScreen();
152 } 152 }
153 153
154 void CapturerGdi::CaptureInvalidRegion( 154 void CapturerGdi::CaptureInvalidRegion(
155 const CaptureCompletedCallback& callback) { 155 const CaptureCompletedCallback& callback) {
156 // Force the system to power-up display hardware, if it has been suspended.
157 SetThreadExecutionState(ES_DISPLAY_REQUIRED);
158
159 // Perform the capture.
156 CalculateInvalidRegion(); 160 CalculateInvalidRegion();
157 SkRegion invalid_region; 161 SkRegion invalid_region;
158 helper_.SwapInvalidRegion(&invalid_region); 162 helper_.SwapInvalidRegion(&invalid_region);
159 CaptureRegion(invalid_region, callback); 163 CaptureRegion(invalid_region, callback);
160 } 164 }
161 165
162 const SkISize& CapturerGdi::size_most_recent() const { 166 const SkISize& CapturerGdi::size_most_recent() const {
163 return helper_.size_most_recent(); 167 return helper_.size_most_recent();
164 } 168 }
165 169
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } 370 }
367 371
368 } // namespace 372 } // namespace
369 373
370 // static 374 // static
371 Capturer* Capturer::Create() { 375 Capturer* Capturer::Create() {
372 return new CapturerGdi(); 376 return new CapturerGdi();
373 } 377 }
374 378
375 } // namespace remoting 379 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/event_executor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698