Backed out changeset 1ec40ecc63f8 (bug 1088300)

This commit is contained in:
Sebastian Hengst
2016-08-30 14:05:23 +02:00
parent 073a1a2938
commit 42d99cdf8b

View File

@@ -541,14 +541,10 @@ TileClient::DiscardFrontBuffer()
if (mFrontBuffer) {
MOZ_ASSERT(mFrontBuffer->GetReadLock());
MOZ_ASSERT(mAllocator);
if (mAllocator) {
mAllocator->ReturnTextureClientDeferred(mFrontBuffer);
if (mFrontBufferOnWhite) {
mAllocator->ReturnTextureClientDeferred(mFrontBufferOnWhite);
}
mAllocator->ReturnTextureClientDeferred(mFrontBuffer);
if (mFrontBufferOnWhite) {
mAllocator->ReturnTextureClientDeferred(mFrontBufferOnWhite);
}
if (mFrontBuffer->IsLocked()) {
mFrontBuffer->Unlock();
}
@@ -563,8 +559,7 @@ TileClient::DiscardFrontBuffer()
static void
DiscardTexture(TextureClient* aTexture, TextureClientAllocator* aAllocator)
{
MOZ_ASSERT(aAllocator);
if (aTexture && aAllocator) {
if (aTexture) {
MOZ_ASSERT(aTexture->GetReadLock());
if (!aTexture->HasSynchronization() && aTexture->IsReadLocked()) {
// Our current back-buffer is still locked by the compositor. This can occur
@@ -626,10 +621,6 @@ TileClient::GetBackBuffer(CompositableClient& aCompositable,
nsIntRegion& aAddPaintedRegion,
RefPtr<TextureClient>* aBackBufferOnWhite)
{
if (!mAllocator) {
gfxCriticalError() << "[TileClient] Missing TextureClientAllocator.";
return nullptr;
}
if (aMode != SurfaceMode::SURFACE_COMPONENT_ALPHA) {
// It can happen that a component-alpha layer stops being on component alpha
// on the next frame, just drop the buffers on white if that happens.