New issue
Advanced search Search tips

Issue 594449 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 555388
issue 594460



Sign in to add a comment

Mac: Use AVSampleBufferDisplayLayer for video (hardware and software)

Project Member Reported by ccameron@chromium.org, Mar 14 2016

Issue description

AVSampleBufferDisplayLayer is a more efficient way of displaying video content.

We currently use [CALayer setContents:IOSurface] to display each video frame.

A naive drop-in replacement of using an AVSampleBufferDisplayLayer would drop us from using 2.95W to 2.54W (idle is 0.41W).

Switching also to 420v would drop us to 2.37W.

Entering detached mode (which is much more involved) can get us 1.65W (although I don't yet understand why it can't get is all the way to 1.47W).

Further discussion of the investigation into this mode is in  issue 555388 .

One bug that needs to be worked around is that, for software video, it is necessary to specify a color space for the video's frames, otherwise they may become blank in detached mode.
 
Blocking: 594460
figure.png
46.4 KB View Download
Blocking: 555388
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 23 2016

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 2 2016

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

commit 4144e9eb946d938bdef4b88166a3708ca62e2b28
Author: ccameron <ccameron@chromium.org>
Date: Sat Apr 02 08:13:37 2016

Mac: Disable use of AVSampleBufferDisplayLayer

This is part of the constellation of patches that together caused
crashes and corruption. Take this out of the equation.

BUG= 594449 

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

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

[modify] https://crrev.com/4144e9eb946d938bdef4b88166a3708ca62e2b28/content/common/gpu/ca_layer_tree_mac.mm
[modify] https://crrev.com/4144e9eb946d938bdef4b88166a3708ca62e2b28/content/common/gpu/ca_layer_tree_unittest_mac.mm

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 21 2016

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

commit 3d2efd77e4af7feee0950ea2443af4cca7089018
Author: ccameron <ccameron@chromium.org>
Date: Thu Apr 21 08:39:29 2016

Mac video: Enable AVSampleBufferDisplayLayer for h264

Create plumbing to pass the CVPixelBufferRef from the GPU video decoder
directly to the AVSampleBufferDisplayLayer.

Re-enable AVSampleBufferDisplayLayer, but only for hardware decoded
frames, for the moment. Once this bakes, we can enable software decoded
frames.

BUG= 594449 
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

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

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

[modify] https://crrev.com/3d2efd77e4af7feee0950ea2443af4cca7089018/gpu/ipc/service/image_transport_surface_overlay_mac.mm
[modify] https://crrev.com/3d2efd77e4af7feee0950ea2443af4cca7089018/ui/accelerated_widget_mac/ca_layer_tree_mac.h
[modify] https://crrev.com/3d2efd77e4af7feee0950ea2443af4cca7089018/ui/accelerated_widget_mac/ca_layer_tree_mac.mm
[modify] https://crrev.com/3d2efd77e4af7feee0950ea2443af4cca7089018/ui/accelerated_widget_mac/ca_layer_tree_unittest_mac.mm

Project Member

Comment 7 by bugdroid1@chromium.org, May 5 2016

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

commit 4d1b92ff111856df2474c8f3f6c6814f228c965c
Author: ccameron <ccameron@chromium.org>
Date: Thu May 05 20:25:53 2016

Mac software video: Use AVSampleBufferDisplayLayer

Also specify a default color profile for 420v IOSurfaces, because there
are bugs when no color profile is specified.

BUG= 594449 

Review-Url: https://codereview.chromium.org/1948723002
Cr-Commit-Position: refs/heads/master@{#391893}

[modify] https://crrev.com/4d1b92ff111856df2474c8f3f6c6814f228c965c/ui/accelerated_widget_mac/ca_renderer_layer_tree.mm
[modify] https://crrev.com/4d1b92ff111856df2474c8f3f6c6814f228c965c/ui/gfx/mac/io_surface.cc

Status: Fixed (was: Assigned)

Sign in to add a comment