vk: Use switch instead of look up table for state transitions.

We currently use a set of pairs to validate state transitions. A much
more lightweight solution is to use the hashes of the transitions.
Since our hash can be computed at compile time, we mark it as constexpr
and use it in a switch statement to verify state transitions.

Bug: 845780
Change-Id: I96d2b0cf59a9ca54ea03767fa6b84c408ebb1de9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647902
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668651}
2 files changed