Capture/Replay: Use plain arrays for resource maps. Instead of using the templated wrapper class, use C++ arrays that are dynamically allocated with "new". This saves a fair bit of binary size spent in calling the operator[] function. To get the right size this CL adds tracking to the capture for each resource type, then updates trace initialization to store the maximum allocated resource ID for each type. Tested with Manhattan 3.0: on Windows with Release, binary size for the trace shared object went from 7.053 MB to 6.125 MB. About a 13% decrease in binary size. That will allow for longer captures and will also reduce trace overhead. Bug: angleproject:5133 Change-Id: I2cd7515262a9ec76112d5f790001e3a6e9acd3a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3003383 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Tim Van Patten <timvp@google.com>