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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1961273002: Disable idle suspend for Chromecast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/renderers/video_overlay_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 0b6354a9f296e6f22c4cd2ec20ff7793d48f53c0..a1564a2f224acded7c577e0c42088b9c9c5c3ccd 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -1470,10 +1470,12 @@ void WebMediaPlayerImpl::SetSuspendState(bool is_suspended) {
if (IsNetworkStateError(network_state_))
return;
-#if defined(OS_MACOSX) || defined(OS_WIN)
- // TODO(sandersd): Idle suspend is disabled on OSX and Windows for hardware
- // decoding / opaque video frames since these frames are owned by the decoder
- // in the GPU process. http://crbug.com/595716 and http://crbug.com/602708
+#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
+ // TODO(sandersd): idle suspend is disabled if decoder owns video frame.
+ // Used on OSX,Windows+Chromecast. Since GetCurrentFrameFromCompositor is
+ // a synchronous cross-thread post, avoid the cost on platforms that
+ // always allow suspend. Need to find a better mechanism for this. See
+ // http://crbug.com/595716 and http://crbug.com/602708
if (can_suspend_state_ == CanSuspendState::UNKNOWN) {
scoped_refptr<VideoFrame> frame = GetCurrentFrameFromCompositor();
if (frame) {
« no previous file with comments | « no previous file | media/renderers/video_overlay_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698