Bug 1042771 - Fix TextureClientPool::ReturnDeferredClients() r=nical, jrmuizel

This commit is contained in:
Sotaro Ikeda 2014-07-24 06:16:47 -07:00
Родитель a5875878eb
Коммит 5f8282be5b
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -137,8 +137,18 @@ void
TextureClientPool::ReturnDeferredClients()
{
while (!mTextureClientsDeferred.empty()) {
ReturnTextureClient(mTextureClientsDeferred.top());
mTextureClients.push(mTextureClientsDeferred.top());
mTextureClientsDeferred.pop();
MOZ_ASSERT(mOutstandingClients > 0);
mOutstandingClients--;
}
ShrinkToMinimumSize();
// Kick off the pool shrinking timer if there are still more unused texture
// clients than our desired minimum cache size.
if (mTextureClients.size() > sMinCacheSize) {
mTimer->InitWithFuncCallback(ShrinkCallback, this, mShrinkTimeoutMsec,
nsITimer::TYPE_ONE_SHOT);
}
}