New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 596641 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 165762



Sign in to add a comment

Don't flush the renderer when doing a pipeline suspend

Project Member Reported by w...@chromium.org, Mar 21 2016

Issue description

There no longer seems to be any reason to flush the renderer while suspending so lets remove it to save some time. On a galaxy nexus this can shave off 150ms on a fullscreen transition.
 
No longer, or never was? :)
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9edddb9ded49023460a204675ee4e9bb763b9da7

commit 9edddb9ded49023460a204675ee4e9bb763b9da7
Author: watk <watk@chromium.org>
Date: Mon Mar 21 22:21:10 2016

media: Stop flushing the renderer for pipeline suspend

Previously when performing a pipeline suspend we would flush the
renderer before destructing it. This CL removes the flush because
it's no longer necessary and has issues:
1) it adds ~100-150ms to suspend on a Galaxy Nexus (which makes
   a difference for fullscreen transitions), and
2) on <API level 18 devices it will cause AVDA to go into an
   error state when it handles the flush by creating a new
   MediaCodec without a valid output surface.

BUG= 596641 , 595545 
TEST=media_unittests

Review URL: https://codereview.chromium.org/1815423002

Cr-Commit-Position: refs/heads/master@{#382417}

[modify] https://crrev.com/9edddb9ded49023460a204675ee4e9bb763b9da7/media/base/pipeline_impl.cc
[modify] https://crrev.com/9edddb9ded49023460a204675ee4e9bb763b9da7/media/base/pipeline_impl_unittest.cc

Comment 3 by w...@chromium.org, Mar 22 2016

Sadly it turns out the flush was doing something useful after all :) The renderer will wait for outstanding reads to complete before the flush is complete. So without Flush the demuxer may be reading when we suspend.

Perhaps we can investigate cancelling pending reads.
DataSource::Abort() will cancel outstanding reads, but currently is a one-time thing, i.e. once set there's no going back. It's also not specified what an aborted read does to the demuxer. I think Abort() is the right thing to do and will also help us w/ seeking on delayed reads. I.e. we can abort the read when about to seek or suspend. It's something we've long wanted, but haven't gotten around to.

That's a bit of a larger change though. I think it's doable for M51, but might be a bit hairy for M50. We might just want to blacklist API level 16,17 for M50 then if we can't find a simple solution.

Comment 5 by w...@chromium.org, Apr 13 2016

Blockedon: 165762
Labels: Hotlist-CodeHealth

Comment 7 by w...@chromium.org, Aug 30 2016

Status: Fixed (was: Started)
Fixed by 165762, yay!

Sign in to add a comment