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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1972783003: Disable idle suspend for Chromecast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore 'NO' conditional 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 | « media/blink/webmediaplayer_impl.h ('k') | media/blink/webmediaplayer_impl_unittest.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 e5d8753edfd74d85943784112eba8da26f218d6d..f5cb910f53ebac93446a12af015c89175bd28355 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -204,7 +204,8 @@ WebMediaPlayerImpl::WebMediaPlayerImpl(
renderer_factory_(std::move(renderer_factory)),
surface_manager_(params.surface_manager()),
suppress_destruction_errors_(false),
- can_suspend_state_(CanSuspendState::UNKNOWN) {
+ can_suspend_state_(params.allow_idle_suspend() ? CanSuspendState::UNKNOWN
+ : CanSuspendState::NO) {
DCHECK(!adjust_allocated_memory_cb_.is_null());
DCHECK(renderer_factory_);
DCHECK(client_);
@@ -1452,6 +1453,9 @@ void WebMediaPlayerImpl::SetSuspendState(bool is_suspended) {
if (IsNetworkStateError(network_state_))
return;
+ if (can_suspend_state_ == CanSuspendState::NO)
DaleCurtis 2016/05/16 17:03:49 Unnecessary due to line 1476?
sandersd (OOO until July 31) 2016/05/16 18:03:32 1473 breaks everything, both are needed unless it'
DaleCurtis 2016/05/16 18:13:18 Just move the #if inside the if (suspend state ==
halliwell 2016/05/16 18:31:43 Done.
+ 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
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698