Bug 1776474: Make UploadTexturePool check minimum size of temporary buffer vec. r...
commitb6d72eca9bdf2dc4dabe3bffd375ca15fdb7f0f4
authorBrad Werth <bwerth@mozilla.com>
Mon, 27 Jun 2022 17:12:59 +0000 (27 17:12 +0000)
committerBrad Werth <bwerth@mozilla.com>
Mon, 27 Jun 2022 17:12:59 +0000 (27 17:12 +0000)
tree198c3da88fbff5797b7acdef7a6ac3d62766d2c1
parent7b60a09701bc623cb0062773f607199cf23eb58e
Bug 1776474: Make UploadTexturePool check minimum size of temporary buffer vec. r=nical

This patch ensures that the calculation for unused temporary buffers can
never overflow via subtraction. Instead of counting buffers as they are
taken from the vec, it just keeps track of how many are left. If a
previous frame has generated a lot of temporary buffers, this will detect
that the current frame didn't use them all.

Differential Revision: https://phabricator.services.mozilla.com/D150271
gfx/wr/webrender/src/renderer/upload.rs