Use SkTArray for mailbox polling

The mailbox uses SkTArray internally, so swapping is optimal when dest
has no preallocated storage.

Change-Id: Ic295f3707d07c97b1881e775cac3a23a6b2fef71
Reviewed-on: https://skia-review.googlesource.com/9641
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Florin Malita 2017-03-14 10:08:33 -04:00 committed by Skia Commit-Bot
parent 98629efdde
commit c500d9bd0f

View File

@ -169,8 +169,7 @@ private:
void checkPurge(GrAtlasTextBlob* blob = nullptr) {
// First, purge all stale blob IDs.
{
// TODO: tweak poll to allow mem-movable arrays, and update.
SkSTArray<128, PurgeBlobMessage, false> msgs;
SkTArray<PurgeBlobMessage> msgs;
fPurgeBlobInbox.poll(&msgs);
for (const auto& msg : msgs) {