Mac: Use AVSampleBufferDisplayLayer for video (hardware and software) |
|||
Issue descriptionAVSampleBufferDisplayLayer 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.
,
Mar 14 2016
,
Mar 15 2016
,
Mar 23 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fbaed4750ac46ce84d4b5d361b2601447db5390d commit fbaed4750ac46ce84d4b5d361b2601447db5390d Author: ccameron <ccameron@chromium.org> Date: Wed Mar 23 23:46:34 2016 Mac: Use AVSampleBufferDisplayLayer for 4:2:0 surfaces Enqueuing frames into an AVSampleBufferDisplayLayer is more power efficient than setting the contents of the layer directly, and also can be used in detached mode. BUG= 594449 Review URL: https://codereview.chromium.org/1828523003 Cr-Commit-Position: refs/heads/master@{#382975} [modify] https://crrev.com/fbaed4750ac46ce84d4b5d361b2601447db5390d/content/common/BUILD.gn [modify] https://crrev.com/fbaed4750ac46ce84d4b5d361b2601447db5390d/content/common/gpu/ca_layer_tree_mac.h [modify] https://crrev.com/fbaed4750ac46ce84d4b5d361b2601447db5390d/content/common/gpu/ca_layer_tree_mac.mm [modify] https://crrev.com/fbaed4750ac46ce84d4b5d361b2601447db5390d/content/common/gpu/ca_layer_tree_unittest_mac.mm [modify] https://crrev.com/fbaed4750ac46ce84d4b5d361b2601447db5390d/content/content_common.gypi
,
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
,
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
,
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
,
May 18 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by ccameron@chromium.org
, Mar 14 2016