gralloc: resolve format and use_flags at cros_gralloc_driver level

This simplify the separate resolving efforts in different gralloc
frontends (including separate logic in gralloc4 mapper and allocator).

BUG=b:199524294
TEST=CtsNativeHardwareTestCases

Change-Id: I74cd19df9b06c26a124e89c3367dd76b5b57dbd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3166893
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
4 files changed