Bug 1016538 - Fix unbalanced locking logic in tiling. r=Bas

This commit is contained in:
Nicolas Silva 2014-08-27 16:50:25 +02:00
Родитель 319bc9cc73
Коммит 209a4ad3a3
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -349,6 +349,7 @@ gfxMemorySharedReadLock::gfxMemorySharedReadLock()
gfxMemorySharedReadLock::~gfxMemorySharedReadLock() gfxMemorySharedReadLock::~gfxMemorySharedReadLock()
{ {
MOZ_ASSERT(mReadCount == 0);
MOZ_COUNT_DTOR(gfxMemorySharedReadLock); MOZ_COUNT_DTOR(gfxMemorySharedReadLock);
} }
@ -761,6 +762,11 @@ TileClient::GetBackBuffer(const nsIntRegion& aDirtyRegion,
if (aMode == SurfaceMode::SURFACE_COMPONENT_ALPHA) { if (aMode == SurfaceMode::SURFACE_COMPONENT_ALPHA) {
mBackBufferOnWhite = pool->GetTextureClient(); mBackBufferOnWhite = pool->GetTextureClient();
} }
if (mBackLock) {
// Before we Replacing the lock by another one we need to unlock it!
mBackLock->ReadUnlock();
}
// Create a lock for our newly created back-buffer. // Create a lock for our newly created back-buffer.
if (mManager->AsShadowForwarder()->IsSameProcess()) { if (mManager->AsShadowForwarder()->IsSameProcess()) {
// If our compositor is in the same process, we can save some cycles by not // If our compositor is in the same process, we can save some cycles by not