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:
parent
98629efdde
commit
c500d9bd0f
@ -169,8 +169,7 @@ private:
|
|||||||
void checkPurge(GrAtlasTextBlob* blob = nullptr) {
|
void checkPurge(GrAtlasTextBlob* blob = nullptr) {
|
||||||
// First, purge all stale blob IDs.
|
// First, purge all stale blob IDs.
|
||||||
{
|
{
|
||||||
// TODO: tweak poll to allow mem-movable arrays, and update.
|
SkTArray<PurgeBlobMessage> msgs;
|
||||||
SkSTArray<128, PurgeBlobMessage, false> msgs;
|
|
||||||
fPurgeBlobInbox.poll(&msgs);
|
fPurgeBlobInbox.poll(&msgs);
|
||||||
|
|
||||||
for (const auto& msg : msgs) {
|
for (const auto& msg : msgs) {
|
||||||
|
Loading…
Reference in New Issue
Block a user