diff --git a/gfx/gl/SharedSurfaceANGLE.cpp b/gfx/gl/SharedSurfaceANGLE.cpp index 1cbebfc94d9d..9f2cd8ff0ac0 100644 --- a/gfx/gl/SharedSurfaceANGLE.cpp +++ b/gfx/gl/SharedSurfaceANGLE.cpp @@ -178,7 +178,6 @@ public: : mIsLocked(false) , mTexture(texture) { - MOZ_ASSERT(NS_IsMainThread(), "Must be on the main thread to use d3d11 immediate context"); MOZ_ASSERT(mTexture); MOZ_ASSERT(succeeded); *succeeded = false; @@ -198,7 +197,7 @@ public: } RefPtr device = - gfx::DeviceManagerD3D11::Get()->GetContentDevice(); + gfx::DeviceManagerD3D11::Get()->GetDeviceForCurrentThread(); if (!device) { return; } @@ -255,7 +254,7 @@ SharedSurface_ANGLEShareHandle::ReadbackBySharedHandle(gfx::DataSourceSurface* o MOZ_ASSERT(out_surface); RefPtr device = - gfx::DeviceManagerD3D11::Get()->GetContentDevice(); + gfx::DeviceManagerD3D11::Get()->GetDeviceForCurrentThread(); if (!device) { return false; }