-
Brian Ho authored
Currently, P010 (both HDR and SDR) videos don't render on SkiaRenderer on Chrome OS. One issue is that creating the SkImage fails due to a color type/color format check [1]. The GrBackendFormat is created from a P010 format as GL_RGBA8_OES when hitting a NOTREACHED code block [2]. Similarly, the SkColorType is converted from P010 as kN32_SkColorType [3] which is a platform-dependent alias of either kRGBA_ or kBGRA_ [4]. If the platform supports a BGRA byte order, SkImage_Gpu::MakePromiseTexture fails because RGBA != BGRA. This CL handles P010 in some resource format conversion functions by converting to its closest neighbor- RGBA1010102. [1] https://source.chromium.org/chromium/chromium/src/+/master:third_party/skia/src/image/SkImage_Gpu.cpp;l=548;drc=1fc76ce6ff5553c3c1b98f34350c14887b6d4be7 [2] https://source.chromium.org/chromium/chromium/src/+/master:components/viz/common/resources/resource_format_utils.cc;l=337;drc=3e072dfcd46e4d23e7b985ffe97f784ec2731b86 [3] https://source.chromium.org/chromium/chromium/src/+/master:components/viz/common/resources/resource_format_utils.cc;l=66;drc=3e072dfcd46e4d23e7b985ffe97f784ec2731b86 [4] https://source.chromium.org/chromium/chromium/src/+/master:third_party/skia/include/core/SkImageInfo.h;l=96;drc=e3dc752d1c137b90e708d70e415d7cb1fd85326f Bug: 1138518 Change-Id: Ib7788c73919222dff1c09e315317e623e28481e4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468443Reviewed-by:
Daniele Castagna <dcastagna@chromium.org> Commit-Queue: Brian Ho <hob@chromium.org> Cr-Commit-Position: refs/heads/master@{#817676}
917ef219