gpu: Fix OOP-R memory reporting for hw decodes.
This CL fixes the service-side transfer cache to report memory correctly for accelerated image decodes. Prior to this CL, the service transfer cache reported multiple planes for hardware decodes (because they were treated as regular YUV decodes). The problem is that the driver does not report per-plane sizes, so we report the whole buffer size for the Y plane and 0 for the other planes. This CL changes that so that hardware image decodes report a single 'dma_buf' memory dump with the whole buffer size. This would be of the form: gpu/transfer_cache/cache_0x123/gpu/entry_0x567/dma_buf However, this only happens for unmipped decodes. When mips are generated, Skia owns the mipped textures, and since we flush pending Skia work before generating the YUV SkImage, we assume that the original unmipped textures are deleted. Therefore, we treat this situation as a regular YUV decode and we don't report the dma_buf dump. Bug: 995156 Test: added a lot of unit test coverage. Change-Id: Ie4990ada28fcbc573e9d85fb0a51a7095ed39cce Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1933199Reviewed-by:Stephen White <senorblanco@chromium.org> Reviewed-by:
Khushal <khushalsagar@chromium.org> Reviewed-by:
Eric Karl <ericrk@chromium.org> Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org> Cr-Commit-Position: refs/heads/master@{#736154}
Showing
This diff is collapsed.
Please register or sign in to comment