Backed out changeset d078b56f0fa6 (bug 1388020) for OS X crashtest failures. r=backout
authorAndrew Osmond <aosmond@mozilla.com>
Tue, 06 Feb 2018 22:18:29 -0500
changeset 402687 6f8bd3a6369d71200fec3041aab53eb9791d8583
parent 402686 aab04cb5b8151abfb04b5c4bba0d05b587c187b5
child 402688 4fe6f6560083f8c8257282bef1d4e0ced9d1b975
child 402713 ed63734c2be459ef10a2967ba7b6d6019a1b3ade
push id33397
push userdluca@mozilla.com
push dateWed, 07 Feb 2018 09:58:42 +0000
treeherdermozilla-central@4fe6f6560083 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1388020
milestone60.0a1
backs outd078b56f0fa6cdc87712d8a16fdf732e23622265
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset d078b56f0fa6 (bug 1388020) for OS X crashtest failures. r=backout
gfx/layers/client/TextureClient.h
gfx/layers/composite/TextureHost.cpp
gfx/layers/composite/X11TextureHost.cpp
gfx/layers/d3d11/TextureD3D11.cpp
gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp
gfx/layers/opengl/TextureHostOGL.cpp
gfx/tests/gtest/TestLayers.h
gfx/tests/gtest/TestTextureCompatibility.cpp
gfx/tests/gtest/TestTextures.cpp
gfx/tests/gtest/TextureHelper.h
--- a/gfx/layers/client/TextureClient.h
+++ b/gfx/layers/client/TextureClient.h
@@ -756,17 +756,17 @@ protected:
 
   // Used to assign serial ids of TextureClient.
   static mozilla::Atomic<uint64_t> sSerialCounter;
 
   friend class TextureChild;
   friend void TestTextureClientSurface(TextureClient*, gfxImageSurface*);
   friend void TestTextureClientYCbCr(TextureClient*, PlanarYCbCrData&);
   friend already_AddRefed<TextureHost> CreateTextureHostWithBackend(
-    TextureClient*, ISurfaceAllocator*, LayersBackend&);
+    TextureClient*, LayersBackend&);
 
 #ifdef GFX_DEBUG_TRACK_CLIENTS_IN_POOL
 public:
   // Pointer to the pool this tile came from.
   TextureClientPool* mPoolTracker;
 #endif
 };
 
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -111,19 +111,25 @@ WrapWithWebRenderTextureHost(ISurfaceAll
 PTextureParent*
 TextureHost::CreateIPDLActor(HostIPCAllocator* aAllocator,
                              const SurfaceDescriptor& aSharedData,
                              LayersBackend aLayersBackend,
                              TextureFlags aFlags,
                              uint64_t aSerial,
                              const wr::MaybeExternalImageId& aExternalImageId)
 {
+  if (aSharedData.type() == SurfaceDescriptor::TSurfaceDescriptorBuffer &&
+      aSharedData.get_SurfaceDescriptorBuffer().data().type() == MemoryOrShmem::Tuintptr_t &&
+      !aAllocator->IsSameProcess())
+  {
+    NS_ERROR("A client process is trying to peek at our address space using a MemoryTexture!");
+    return nullptr;
+  }
   TextureParent* actor = new TextureParent(aAllocator, aSerial, aExternalImageId);
   if (!actor->Init(aSharedData, aLayersBackend, aFlags)) {
-    actor->ActorDestroy(ipc::IProtocol::ActorDestroyReason::FailedConstructor);
     delete actor;
     return nullptr;
   }
   return actor;
 }
 
 // static
 bool
@@ -221,38 +227,33 @@ TextureHost::Create(const SurfaceDescrip
         break;
       } else {
         result = CreateTextureHostBasic(aDesc, aDeallocator, aBackend, aFlags);
         break;
       }
 
 #ifdef MOZ_X11
     case SurfaceDescriptor::TSurfaceDescriptorX11: {
-      if (!aDeallocator->IsSameProcess()) {
-        NS_ERROR("A client process is trying to peek at our address space using a X11Texture!");
-        return nullptr;
-      }
-
       const SurfaceDescriptorX11& desc = aDesc.get_SurfaceDescriptorX11();
       result = MakeAndAddRef<X11TextureHost>(aFlags, desc);
       break;
     }
 #endif
 
 #ifdef XP_WIN
     case SurfaceDescriptor::TSurfaceDescriptorD3D10:
     case SurfaceDescriptor::TSurfaceDescriptorDXGIYCbCr:
       result = CreateTextureHostD3D11(aDesc, aDeallocator, aBackend, aFlags);
       break;
 #endif
     default:
       MOZ_CRASH("GFX: Unsupported Surface type host");
   }
 
-  if (result && WrapWithWebRenderTextureHost(aDeallocator, aBackend, aFlags)) {
+  if (WrapWithWebRenderTextureHost(aDeallocator, aBackend, aFlags)) {
     MOZ_ASSERT(aExternalImageId.isSome());
     result = new WebRenderTextureHost(aDesc, aFlags, result, aExternalImageId.ref());
   }
 
   return result.forget();
 }
 
 already_AddRefed<TextureHost>
@@ -263,52 +264,23 @@ CreateBackendIndependentTextureHost(cons
 {
   RefPtr<TextureHost> result;
   switch (aDesc.type()) {
     case SurfaceDescriptor::TSurfaceDescriptorBuffer: {
       const SurfaceDescriptorBuffer& bufferDesc = aDesc.get_SurfaceDescriptorBuffer();
       const MemoryOrShmem& data = bufferDesc.data();
       switch (data.type()) {
         case MemoryOrShmem::TShmem: {
-          const ipc::Shmem& shmem = data.get_Shmem();
-          const BufferDescriptor& desc = bufferDesc.desc();
-          size_t bufSize = shmem.Size<char>();
-          size_t reqSize = SIZE_MAX;
-          switch (desc.type()) {
-            case BufferDescriptor::TYCbCrDescriptor: {
-              const YCbCrDescriptor& ycbcr = desc.get_YCbCrDescriptor();
-              reqSize =
-                ImageDataSerializer::ComputeYCbCrBufferSize(ycbcr.ySize(), ycbcr.yStride(),
-                                                            ycbcr.cbCrSize(), ycbcr.cbCrStride());
-              break;
-            }
-            case BufferDescriptor::TRGBDescriptor: {
-              const RGBDescriptor& rgb = desc.get_RGBDescriptor();
-              reqSize = ImageDataSerializer::ComputeRGBBufferSize(rgb.size(), rgb.format());
-              break;
-            }
-            default:
-              gfxCriticalError() << "Bad buffer host descriptor " << (int)desc.type();
-              MOZ_CRASH("GFX: Bad descriptor");
-          }
-
-          if (bufSize < reqSize) {
-            NS_ERROR("A client process gave a shmem too small to fit for its escriptor!");
-            return nullptr;
-          }
-
-          result = new ShmemTextureHost(shmem, desc, aDeallocator, aFlags);
+          result = new ShmemTextureHost(data.get_Shmem(),
+                                        bufferDesc.desc(),
+                                        aDeallocator,
+                                        aFlags);
           break;
         }
         case MemoryOrShmem::Tuintptr_t: {
-          if (!aDeallocator->IsSameProcess()) {
-            NS_ERROR("A client process is trying to peek at our address space using a MemoryTexture!");
-            return nullptr;
-          }
-
           result = new MemoryTextureHost(reinterpret_cast<uint8_t*>(data.get_uintptr_t()),
                                          bufferDesc.desc(),
                                          aFlags);
           break;
         }
         default:
           gfxCriticalError() << "Failed texture host for backend " << (int)data.type();
           MOZ_CRASH("GFX: No texture host for backend");
@@ -316,21 +288,16 @@ CreateBackendIndependentTextureHost(cons
       break;
     }
     case SurfaceDescriptor::TSurfaceDescriptorGPUVideo: {
       result = new GPUVideoTextureHost(aFlags, aDesc.get_SurfaceDescriptorGPUVideo());
       break;
     }
 #ifdef XP_WIN
     case SurfaceDescriptor::TSurfaceDescriptorDIB: {
-      if (!aDeallocator->IsSameProcess()) {
-        NS_ERROR("A client process is trying to peek at our address space using a DIBTexture!");
-        return nullptr;
-      }
-
       result = new DIBTextureHost(aFlags, aDesc);
       break;
     }
     case SurfaceDescriptor::TSurfaceDescriptorFileMapping: {
       result = new TextureHostFileMapping(aFlags, aDesc);
       break;
     }
 #endif
--- a/gfx/layers/composite/X11TextureHost.cpp
+++ b/gfx/layers/composite/X11TextureHost.cpp
@@ -18,27 +18,28 @@ namespace mozilla {
 namespace layers {
 
 using namespace mozilla::gfx;
 
 X11TextureHost::X11TextureHost(TextureFlags aFlags,
                                const SurfaceDescriptorX11& aDescriptor)
  : TextureHost(aFlags)
 {
-  mSurface = aDescriptor.OpenForeign();
+  RefPtr<gfxXlibSurface> surface = aDescriptor.OpenForeign();
+  mSurface = surface.get();
 
-  if (mSurface && !(aFlags & TextureFlags::DEALLOCATE_CLIENT)) {
+  if (!(aFlags & TextureFlags::DEALLOCATE_CLIENT)) {
     mSurface->TakePixmap();
   }
 }
 
 bool
 X11TextureHost::Lock()
 {
-  if (!mCompositor || !mSurface) {
+  if (!mCompositor) {
     return false;
   }
 
   if (!mTextureSource) {
     switch (mCompositor->GetBackendType()) {
       case LayersBackend::LAYERS_BASIC:
         mTextureSource =
           new X11TextureSourceBasic(mCompositor->AsBasicCompositor(), mSurface);
@@ -69,34 +70,28 @@ X11TextureHost::SetTextureSourceProvider
   if (mTextureSource) {
     mTextureSource->SetTextureSourceProvider(aProvider);
   }
 }
 
 SurfaceFormat
 X11TextureHost::GetFormat() const
 {
-  if (!mSurface) {
-    return SurfaceFormat::UNKNOWN;
-  }
   gfxContentType type = mSurface->GetContentType();
 #ifdef GL_PROVIDER_GLX
   if (mCompositor->GetBackendType() == LayersBackend::LAYERS_OPENGL) {
     return X11TextureSourceOGL::ContentTypeToSurfaceFormat(type);
   }
 #endif
   return X11TextureSourceBasic::ContentTypeToSurfaceFormat(type);
 }
 
 IntSize
 X11TextureHost::GetSize() const
 {
-  if (!mSurface) {
-    return IntSize();
-  }
   return mSurface->GetSize();
 }
 
 already_AddRefed<gfx::DataSourceSurface>
 X11TextureHost::GetAsSurface()
 {
   if (!mTextureSource || !mTextureSource->AsSourceBasic()) {
     return nullptr;
--- a/gfx/layers/d3d11/TextureD3D11.cpp
+++ b/gfx/layers/d3d11/TextureD3D11.cpp
@@ -758,28 +758,32 @@ DXGIYCbCrTextureData::Deallocate(LayersI
 already_AddRefed<TextureHost>
 CreateTextureHostD3D11(const SurfaceDescriptor& aDesc,
                        ISurfaceAllocator* aDeallocator,
                        LayersBackend aBackend,
                        TextureFlags aFlags)
 {
   RefPtr<TextureHost> result;
   switch (aDesc.type()) {
+    case SurfaceDescriptor::TSurfaceDescriptorBuffer: {
+      result = CreateBackendIndependentTextureHost(aDesc, aDeallocator, aBackend, aFlags);
+      break;
+    }
     case SurfaceDescriptor::TSurfaceDescriptorD3D10: {
       result = new DXGITextureHostD3D11(aFlags,
                                         aDesc.get_SurfaceDescriptorD3D10());
       break;
     }
     case SurfaceDescriptor::TSurfaceDescriptorDXGIYCbCr: {
       result = new DXGIYCbCrTextureHostD3D11(aFlags,
                                              aDesc.get_SurfaceDescriptorDXGIYCbCr());
       break;
     }
     default: {
-      MOZ_ASSERT_UNREACHABLE("Unsupported SurfaceDescriptor type");
+      NS_WARNING("Unsupported SurfaceDescriptor type");
     }
   }
   return result.forget();
 }
 
 
 already_AddRefed<DrawTarget>
 D3D11TextureData::BorrowDrawTarget()
--- a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp
+++ b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp
@@ -27,18 +27,16 @@ MacIOSurfaceTextureHostOGL::MacIOSurface
 MacIOSurfaceTextureHostOGL::~MacIOSurfaceTextureHostOGL()
 {
   MOZ_COUNT_DTOR(MacIOSurfaceTextureHostOGL);
 }
 
 GLTextureSource*
 MacIOSurfaceTextureHostOGL::CreateTextureSourceForPlane(size_t aPlane)
 {
-  MOZ_ASSERT(mSurface);
-
   GLuint textureHandle;
   gl::GLContext* gl = mProvider->GetGLContext();
   gl->fGenTextures(1, &textureHandle);
   gl->fBindTexture(LOCAL_GL_TEXTURE_RECTANGLE_ARB, textureHandle);
   gl->fTexParameteri(LOCAL_GL_TEXTURE_RECTANGLE_ARB, LOCAL_GL_TEXTURE_WRAP_T, LOCAL_GL_CLAMP_TO_EDGE);
   gl->fTexParameteri(LOCAL_GL_TEXTURE_RECTANGLE_ARB, LOCAL_GL_TEXTURE_WRAP_S, LOCAL_GL_CLAMP_TO_EDGE);
 
   gfx::SurfaceFormat readFormat = gfx::SurfaceFormat::UNKNOWN;
@@ -91,27 +89,21 @@ MacIOSurfaceTextureHostOGL::SetTextureSo
     mTextureSource = nullptr;
   }
 
   mProvider = aProvider;
 }
 
 gfx::SurfaceFormat
 MacIOSurfaceTextureHostOGL::GetFormat() const {
-  if (!mSurface) {
-    return gfx::SurfaceFormat::UNKNOWN;
-  }
   return mSurface->GetFormat();
 }
 
 gfx::SurfaceFormat
 MacIOSurfaceTextureHostOGL::GetReadFormat() const {
-  if (!mSurface) {
-    return gfx::SurfaceFormat::UNKNOWN;
-  }
   return mSurface->GetReadFormat();
 }
 
 gfx::IntSize
 MacIOSurfaceTextureHostOGL::GetSize() const {
   if (!mSurface) {
     return gfx::IntSize();
   }
--- a/gfx/layers/opengl/TextureHostOGL.cpp
+++ b/gfx/layers/opengl/TextureHostOGL.cpp
@@ -21,32 +21,44 @@
 #include "GfxTexturesReporter.h"        // for GfxTexturesReporter
 #include "GLBlitTextureImageHelper.h"
 #include "GeckoProfiler.h"
 
 #ifdef XP_MACOSX
 #include "mozilla/layers/MacIOSurfaceTextureHostOGL.h"
 #endif
 
+#ifdef GL_PROVIDER_GLX
+#include "mozilla/layers/X11TextureHost.h"
+#endif
+
 using namespace mozilla::gl;
 using namespace mozilla::gfx;
 
 namespace mozilla {
 namespace layers {
 
 class Compositor;
 
 already_AddRefed<TextureHost>
 CreateTextureHostOGL(const SurfaceDescriptor& aDesc,
                      ISurfaceAllocator* aDeallocator,
                      LayersBackend aBackend,
                      TextureFlags aFlags)
 {
   RefPtr<TextureHost> result;
   switch (aDesc.type()) {
+    case SurfaceDescriptor::TSurfaceDescriptorBuffer: {
+      result = CreateBackendIndependentTextureHost(aDesc,
+                                                   aDeallocator,
+                                                   aBackend,
+                                                   aFlags);
+      break;
+    }
+
 #ifdef MOZ_WIDGET_ANDROID
     case SurfaceDescriptor::TSurfaceTextureDescriptor: {
       const SurfaceTextureDescriptor& desc = aDesc.get_SurfaceTextureDescriptor();
       java::GeckoSurfaceTexture::LocalRef surfaceTexture = java::GeckoSurfaceTexture::Lookup(desc.handle());
 
       result = new SurfaceTextureHost(aFlags,
                                       surfaceTexture,
                                       desc.size(),
@@ -71,29 +83,34 @@ CreateTextureHostOGL(const SurfaceDescri
     case SurfaceDescriptor::TSurfaceDescriptorMacIOSurface: {
       const SurfaceDescriptorMacIOSurface& desc =
         aDesc.get_SurfaceDescriptorMacIOSurface();
       result = new MacIOSurfaceTextureHostOGL(aFlags, desc);
       break;
     }
 #endif
 
+#ifdef GL_PROVIDER_GLX
+    case SurfaceDescriptor::TSurfaceDescriptorX11: {
+      const auto& desc = aDesc.get_SurfaceDescriptorX11();
+      result = new X11TextureHost(aFlags, desc);
+      break;
+    }
+#endif
+
     case SurfaceDescriptor::TSurfaceDescriptorSharedGLTexture: {
       const auto& desc = aDesc.get_SurfaceDescriptorSharedGLTexture();
       result = new GLTextureHost(aFlags, desc.texture(),
                                  desc.target(),
                                  (GLsync)desc.fence(),
                                  desc.size(),
                                  desc.hasAlpha());
       break;
     }
-    default: {
-      MOZ_ASSERT_UNREACHABLE("Unsupported SurfaceDescriptor type");
-      break;
-    }
+    default: return nullptr;
   }
   return result.forget();
 }
 
 static gl::TextureImage::Flags
 FlagsToGLFlags(TextureFlags aFlags)
 {
   uint32_t result = TextureImage::NoFlags;
--- a/gfx/tests/gtest/TestLayers.h
+++ b/gfx/tests/gtest/TestLayers.h
@@ -3,32 +3,16 @@
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 #ifndef GFX_TEST_LAYERS_H
 #define GFX_TEST_LAYERS_H
 
 #include "Layers.h"
 #include "nsTArray.h"
-#include "mozilla/layers/ISurfaceAllocator.h"
-
-namespace mozilla {
-namespace layers {
-
-class TestSurfaceAllocator final : public ISurfaceAllocator
-{
-public:
-  TestSurfaceAllocator() {}
-  ~TestSurfaceAllocator() override {}
-
-  bool IsSameProcess() const override { return true; }
-};
-
-} // layers
-} // mozilla
 
 /* Create layer tree from a simple layer tree description syntax.
  * Each index is either the first letter of the layer type or
  * a '(',')' to indicate the start/end of the child layers.
  * The aim of this function is to remove hard to read
  * layer tree creation code.
  *
  * Example "c(c(c(tt)t))" would yield:
--- a/gfx/tests/gtest/TestTextureCompatibility.cpp
+++ b/gfx/tests/gtest/TestTextureCompatibility.cpp
@@ -9,50 +9,46 @@
 #include "gtest/gtest.h"
 #include "MockWidget.h"
 #include "mozilla/layers/BasicCompositor.h"
 #include "mozilla/layers/Compositor.h"
 #include "mozilla/layers/LayersTypes.h"
 #include "mozilla/layers/TextureClient.h"
 #include "mozilla/layers/TextureHost.h"
 #include "mozilla/RefPtr.h"
-#include "TestLayers.h"
 #include "TextureHelper.h"
 
 using mozilla::gfx::Feature;
 using mozilla::gfx::gfxConfig;
 using mozilla::layers::BasicCompositor;
 using mozilla::layers::Compositor;
 using mozilla::layers::CompositorOptions;
 using mozilla::layers::LayersBackend;
-using mozilla::layers::TestSurfaceAllocator;
 using mozilla::layers::TextureClient;
 using mozilla::layers::TextureHost;
 using mozilla::widget::CompositorWidget;
 using mozilla::widget::InProcessCompositorWidget;
 
 /**
  * This function will create the possible TextureClient and TextureHost pairs
  * according to the given backend.
  */
-static void
+void
 CreateTextureWithBackend(LayersBackend& aLayersBackend,
-                         ISurfaceAllocator* aDeallocator,
                          nsTArray<RefPtr<TextureClient>>& aTextureClients,
                          nsTArray<RefPtr<TextureHost>>& aTextureHosts)
 {
   aTextureClients.AppendElement(CreateTextureClientWithBackend(aLayersBackend));
 
   aTextureClients.AppendElement(
     CreateYCbCrTextureClientWithBackend(aLayersBackend));
 
   for (uint32_t i = 0; i < aTextureClients.Length(); i++) {
     aTextureHosts.AppendElement(
-      CreateTextureHostWithBackend(aTextureClients[i], aDeallocator,
-                                   aLayersBackend));
+      CreateTextureHostWithBackend(aTextureClients[i], aLayersBackend));
   }
 }
 
 /**
  * This will return the default list of backends that units test should run
  * against.
  */
 static void
@@ -114,20 +110,18 @@ CheckCompatibilityWithBasicCompositor(La
       aTextures[i]->Unlock();
     }
   }
 }
 
 TEST(Gfx, TestTextureCompatibility)
 {
   nsTArray<LayersBackend> backendHints;
-  RefPtr<TestSurfaceAllocator> deallocator = new TestSurfaceAllocator();
 
   GetPlatformBackends(backendHints);
   for (uint32_t i = 0; i < backendHints.Length(); i++) {
     nsTArray<RefPtr<TextureClient>> textureClients;
     nsTArray<RefPtr<TextureHost>> textureHosts;
 
-    CreateTextureWithBackend(backendHints[i], deallocator,
-                             textureClients, textureHosts);
+    CreateTextureWithBackend(backendHints[i], textureClients, textureHosts);
     CheckCompatibilityWithBasicCompositor(backendHints[i], textureHosts);
   }
 }
--- a/gfx/tests/gtest/TestTextures.cpp
+++ b/gfx/tests/gtest/TestTextures.cpp
@@ -1,16 +1,15 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 #include "gtest/gtest.h"
 #include "gmock/gmock.h"
-#include "TestLayers.h"
 
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/Tools.h"
 #include "mozilla/layers/BufferTexture.h"
 #include "mozilla/layers/ImageBridgeChild.h"  // for ImageBridgeChild
 #include "mozilla/layers/TextureClient.h"
 #include "mozilla/layers/TextureHost.h"
 #include "mozilla/RefPtr.h"
@@ -143,18 +142,17 @@ void TestTextureClientSurface(TextureCli
 
   // client serialization
   SurfaceDescriptor descriptor;
   ASSERT_TRUE(texture->ToSurfaceDescriptor(descriptor));
 
   ASSERT_NE(descriptor.type(), SurfaceDescriptor::Tnull_t);
 
   // host deserialization
-  RefPtr<TestSurfaceAllocator> deallocator = new TestSurfaceAllocator();
-  RefPtr<TextureHost> host = CreateBackendIndependentTextureHost(descriptor, deallocator,
+  RefPtr<TextureHost> host = CreateBackendIndependentTextureHost(descriptor, nullptr,
                                                                  LayersBackend::LAYERS_NONE,
                                                                  texture->GetFlags());
 
   ASSERT_TRUE(host.get() != nullptr);
   ASSERT_EQ(host->GetFlags(), texture->GetFlags());
 
   // host read
 
@@ -190,18 +188,17 @@ void TestTextureClientYCbCr(TextureClien
   auto bufferDesc = descriptor.get_SurfaceDescriptorBuffer();
   ASSERT_EQ(bufferDesc.desc().type(), BufferDescriptor::TYCbCrDescriptor);
   auto ycbcrDesc = bufferDesc.desc().get_YCbCrDescriptor();
   ASSERT_EQ(ycbcrDesc.ySize(), ycbcrData.mYSize);
   ASSERT_EQ(ycbcrDesc.cbCrSize(), ycbcrData.mCbCrSize);
   ASSERT_EQ(ycbcrDesc.stereoMode(), ycbcrData.mStereoMode);
 
   // host deserialization
-  RefPtr<TestSurfaceAllocator> deallocator = new TestSurfaceAllocator();
-  RefPtr<TextureHost> textureHost = CreateBackendIndependentTextureHost(descriptor, deallocator,
+  RefPtr<TextureHost> textureHost = CreateBackendIndependentTextureHost(descriptor, nullptr,
                                                                         LayersBackend::LAYERS_NONE,
                                                                         client->GetFlags());
 
   RefPtr<BufferTextureHost> host = static_cast<BufferTextureHost*>(textureHost.get());
 
   ASSERT_TRUE(host.get() != nullptr);
   ASSERT_EQ(host->GetFlags(), client->GetFlags());
 
--- a/gfx/tests/gtest/TextureHelper.h
+++ b/gfx/tests/gtest/TextureHelper.h
@@ -135,28 +135,27 @@ CreateTextureClientWithBackend(LayersBac
   return nullptr;
 }
 
 /**
  * Create a TextureHost according to the given TextureClient.
  */
 already_AddRefed<TextureHost>
 CreateTextureHostWithBackend(TextureClient* aClient,
-                             ISurfaceAllocator* aDeallocator,
                              LayersBackend& aLayersBackend)
 {
   if (!aClient) {
     return nullptr;
   }
 
   // client serialization
   SurfaceDescriptor descriptor;
   RefPtr<TextureHost> textureHost;
 
   aClient->ToSurfaceDescriptor(descriptor);
 
   wr::MaybeExternalImageId id = Nothing();
-  return TextureHost::Create(descriptor, aDeallocator, aLayersBackend,
+  return TextureHost::Create(descriptor, nullptr, aLayersBackend,
                              aClient->GetFlags(), id);
 }
 
 } // namespace layers
 } // namespace mozilla