mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 05:45:33 +00:00
Bug 1289640 - Part 1: Make SharedSurfaceANGLE code use the content D3D11 device since we should only ever run on the main thread and would have used this device already. r=jgilbert
--HG-- extra : rebase_source : 9f698971f6b77161b2f7314befd889bc944aee2e
This commit is contained in:
parent
39b267f680
commit
369e4deebe
@ -178,6 +178,7 @@ 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;
|
||||
@ -197,7 +198,7 @@ public:
|
||||
}
|
||||
|
||||
RefPtr<ID3D11Device> device =
|
||||
gfx::DeviceManagerD3D11::Get()->GetDeviceForCurrentThread();
|
||||
gfx::DeviceManagerD3D11::Get()->GetContentDevice();
|
||||
if (!device) {
|
||||
return;
|
||||
}
|
||||
@ -254,7 +255,7 @@ SharedSurface_ANGLEShareHandle::ReadbackBySharedHandle(gfx::DataSourceSurface* o
|
||||
MOZ_ASSERT(out_surface);
|
||||
|
||||
RefPtr<ID3D11Device> device =
|
||||
gfx::DeviceManagerD3D11::Get()->GetDeviceForCurrentThread();
|
||||
gfx::DeviceManagerD3D11::Get()->GetContentDevice();
|
||||
if (!device) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user