• Sergey Ulanov's avatar
    [Fuchsia] Enable YCbCr samplers support · 6ff66f21
    Sergey Ulanov authored
    Previously compositor supported YCbCr samplers only on Android and only
    for external Vulkan images. On Fuchsia sysmem APIs use Vulkan I420
    formats to return decoded images and so YCbCr samplers have to be used
    to render them on the screen. In this CL:
     1. Updated VulkanImplementation::CreateImageFromGpuMemoryHandle() to
        make it possible to return YCbCr info.
     2. Added image_format in gpu::VulkanYCbCrInfo to remove the
        assumption YCbCr images are always external.
     3. ExternalVkImageBacking now bundles returned YCbCr info in
        GrVkImageInfo when wrapping in GrBackendTexture.
     4. SkiaOutputSurfaceImpl now passes image format when initializing
        GrVkYcbcrConversionInfo.
     5. Updated VulkanDeviceQueue and VulkanImplementationScenic to
        enable YCbCr sampler extension on Fuchsia.
    
    Bug: 981022
    Change-Id: I477ebf698d098bafefaadbf77dfa8d373f9ae076
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730311
    Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
    Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
    Reviewed-by: default avatarMichael Spang <spang@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#686649}
    6ff66f21
vulkan_implementation.h 5.69 KB