Aside from general cleanliness, this allows us to factor the selection
logic into a helper without a widely-scoped mutable borrow on the entire
TextureCache.

Differential Revision: https://phabricator.services.mozilla.com/D10854