mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-08 19:33:07 +00:00
MappableHandle was implemented on the backend handle, but doing so is sub-optimal in the case of VAAPI which needs to re-create the VA Image with each call to a method of MappableHandle, which is a costly operation. Fix this by implementing MappableHandle on the Image directly. That way callers can request the mappable handler once to create the image, and call all the methods on the same instance. This also allows us to make MappableHandle::image_size return the size instead of a Result. BUG=b:214478588 TEST=cargo build --features `video-decoder,video-encoder,ffmpeg,vaapi` TEST=cargo test --features vaapi -p cros-codecs Change-Id: Iaa048c1f488021d49376f612ebde560e84a11dc4 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4006228 Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.corp-partner.google.com> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> |
||
---|---|---|
.. | ||
cros-codecs | ||
ffmpeg | ||
libva | ||
libvda |