From 3e6299cfc7b37abeb0a3b900c3734ed7f57ade4d Mon Sep 17 00:00:00 2001 From: Ciure Andrei Date: Tue, 18 Sep 2018 08:54:29 +0300 Subject: [PATCH] Backed out changeset 59759503b889 (bug 1483533) for test failures RefPtr CLOSED TREE --- gfx/layers/TextureSourceProvider.cpp | 7 ------- gfx/layers/TextureSourceProvider.h | 10 ---------- gfx/layers/composite/TextureHost.cpp | 4 ---- 3 files changed, 21 deletions(-) diff --git a/gfx/layers/TextureSourceProvider.cpp b/gfx/layers/TextureSourceProvider.cpp index 714e0cd1f376..826acc37f03a 100644 --- a/gfx/layers/TextureSourceProvider.cpp +++ b/gfx/layers/TextureSourceProvider.cpp @@ -46,7 +46,6 @@ TextureSourceProvider::ReadUnlockTextures() texture->ReadUnlock(); } #endif - mReferenceUntilAfterComposition.Clear(); mUnlockAfterComposition.Clear(); } @@ -56,12 +55,6 @@ TextureSourceProvider::UnlockAfterComposition(TextureHost* aTexture) mUnlockAfterComposition.AppendElement(aTexture); } -void -TextureSourceProvider::ReferenceUntilAfterComposition(TextureHost* aTexture) -{ - mReferenceUntilAfterComposition.AppendElement(aTexture); -} - bool TextureSourceProvider::NotifyNotUsedAfterComposition(TextureHost* aTextureHost) { diff --git a/gfx/layers/TextureSourceProvider.h b/gfx/layers/TextureSourceProvider.h index 46fdc45e3f27..830c0be21110 100644 --- a/gfx/layers/TextureSourceProvider.h +++ b/gfx/layers/TextureSourceProvider.h @@ -64,13 +64,6 @@ public: /// the texture itself requires it. virtual void UnlockAfterComposition(TextureHost* aTexture); - /// This is used for client storage support on OSX. On Nvidia hardware, it - /// seems that if we glDeleteTextures on a texture too early, even if we've - /// waited on the texture with glFinishObjectAPPLE, we'll see visual defects. - /// This just holds a reference to the texture until ReadUnlockTextures, - /// but we don't need to unlock it since we have already done so. - void ReferenceUntilAfterComposition(TextureHost* aTexture); - /// Most compositor backends operate asynchronously under the hood. This /// means that when a layer stops using a texture it is often desirable to /// wait for the end of the next composition before NotifyNotUsed() call. @@ -138,9 +131,6 @@ private: // An array of locks that will need to be unlocked after the next composition. nsTArray> mUnlockAfterComposition; - // See ReferenceUntilAfterComposition. - nsTArray> mReferenceUntilAfterComposition; - // An array of TextureHosts that will need to call NotifyNotUsed() after the next composition. nsTArray> mNotifyNotUsedAfterComposition; }; diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp index 303c33120481..f9c20258f19d 100644 --- a/gfx/layers/composite/TextureHost.cpp +++ b/gfx/layers/composite/TextureHost.cpp @@ -927,10 +927,6 @@ BufferTextureHost::UnbindTextureSource() mFirstSource->Unbind(); } - if (mFirstSource->IsDirectMap() && mProvider) { - mProvider->ReferenceUntilAfterComposition(this); - } - // This texture is not used by any layer anymore. // If the texture doesn't have an intermediate buffer, it means we are // compositing synchronously on the CPU, so we don't need to wait until