Improve FrameBuffer allocation time
When allocating a large buffer (via the fuzzer tests), calling resize() on std::vector<uint8_t> took a long time. This changes the code to use a std::unique_ptr<uint8_t[]> so that allocating a large buffer is much cheaper. BUG=817341 TEST=fuzzer test now runs in 535ms instead of timing out after 25 seconds Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: If3a57a325dfab4f15d43a71b935e18c2ce759715 Reviewed-on: https://chromium-review.googlesource.com/1133586 Commit-Queue: John Rummell <jrummell@chromium.org> Reviewed-by:Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#574422}
Showing
Please register or sign in to comment