cc: Make NV12 VideoFrames generate resources with YUV_420 buffer_formats

Desktop / Chromium - Daniele Castagna [chromium.org] - 8 August 2017 18:03 EDT

VideoFrames backed by one NV12 texture are currently sent to the compositor as RGB VideoFrames. The compositor can sample out of those wihtout worrying about the underlying buffer format since they behave as normal RGB textures. We're planning to change the format of these VideoFrames to NV12.

In order to scanout from these buffers we need to know the buffer format. This patch makes VideoResourceUpdater produce an associated resource that has YUV_420_BIPLANAR buffer_format for NV12 VideoFrames backed only by one native texture.

Bug: 702750 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: Ib6c7dbad58b8bf7a0c1145a86bd340e35b29fdf6 Reviewed-on: https://chromium-review.googlesource.com/602908 Commit-Queue: Daniele Castagna

25ccb8d cc: Make NV12 VideoFrames generate resources with YUV_420 buffer_formats.
cc/layers/video_layer_impl.cc | 3 ++-
cc/resources/resource_provider.cc | 13 ++++++++++-
cc/resources/resource_provider.h | 6 +++++
cc/resources/video_resource_updater.cc | 16 ++++++++++---
cc/resources/video_resource_updater.h | 3 +++
cc/resources/video_resource_updater_unittest.cc | 31 +++++++++++++++++++++----
media/base/video_frame.cc | 13 +++++++++++
media/base/video_frame.h | 3 +++
8 files changed, 79 insertions(+), 9 deletions(-)

Upstream: git.chromium.org


  • Share