commit | 321904d3d1c4675cfe9d25b1c30f528efcf869e4 | [log] [tgz] |
---|---|---|
author | Kai Ninomiya <kainino@chromium.org> | Thu Aug 23 00:05:49 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Aug 23 00:05:49 2018 |
tree | 1c33e68772c4e2aec07cd11b0d76a9a513c820c0 | |
parent | a0c12063dc7d5c52830f2a60c4c087850a054cd0 [diff] |
Add optimized path for YUV-to-WebGL, remove old path For camera-to-WebGL on Nexus 6P at 720p, this improves blocking texImage2D time from ~12ms to ~4ms (200% speedup). On some other devices and resolutions, I think there can be up to a ~10x speedup. * Adds an optimized upload path for CPU-side YUV video frames (e.g. those coming from a video camera on Android). This path uploads the individual Y/U/V textures to the GPU, performs a GPU YUV-RGB decode, and copies the result into the WebGL texture. This code path could potentially be further optimized in 2 ways: * Avoid the extra copy of the CPU-side YUV data from browser-renderer shared memory (VideoFrame::STORAGE_SHMEM) to renderer-gpu shared memory (transfer buffer, probably). * Avoid the extra copy from the decoded image (SkImage) into the WebGL texture, and instead decode directly into the WebGL texture. * Removes an old GPU-GPU path that was obsoleted by CopyVideoTextureToPlatformTexture. This obsolete path was only handling CPU-GPU uploads instead of GPU-GPU uploads, and it was doing so by performing an expensive YUV-RGB conversion on the CPU. This also allowed some cleanup in TexImageHelperHTMLVideoElement. Bug: 867368 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Id25d5dbfc76ec8f9dc606890588a20978f6943f6 Reviewed-on: https://chromium-review.googlesource.com/1161606 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Dan Sanders <sandersd@chromium.org> Cr-Commit-Position: refs/heads/master@{#585322}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .