|
8770cefc
|
2021-10-04T13:47:23
|
|
Capture/Replay: Store enums to JSON as hex
We're storing some enums in the per-trace JSON as decimal.
This makes them difficult to read, i.e.:
"DisplayDeviceType": 12810,
"DisplayPlatformType": 13392,
"DrawSurfaceColorSpace": 12425,
If we instead convert them to hex, they are much easier to
read and grep the source for.
"DisplayDeviceType": "0x320A",
"DisplayPlatformType": "0x3450",
"DrawSurfaceColorSpace": "0x3089",
Since JSON doesn't actually support hexadecimal values, this CL
stores them as strings.
Ideally we could take this a step farther and store the enum
directly in JSON, but we have no facilities for converting
a string back to an enum.
Bug: angleproject:5133
Bug: angleproject:6515
Change-Id: I7b5d4dc8958d43c611da1fe98887e089f3d855b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3204135
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|