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

This commit is contained in:
Sotaro Ikeda
2014-07-24 06:16:47 -07:00
parent c5534a880c
commit ae3d1918b3

View File

@@ -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, sShrinkTimeout,
nsITimer::TYPE_ONE_SHOT);
}
}