mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1202700 - Use d3d9 device to upload YCbCr surfaces on the client side if possible. r=Bas
This commit is contained in:
parent
f0a979edc5
commit
9fb0606cd1
@ -156,6 +156,9 @@ TextureClient*
|
||||
IMFYCbCrImage::GetD3D9TextureClient(CompositableClient* aClient)
|
||||
{
|
||||
IDirect3DDevice9* device = gfxWindowsPlatform::GetPlatform()->GetD3D9Device();
|
||||
if (!device) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<IDirect3DTexture9> textureY;
|
||||
HANDLE shareHandleY = 0;
|
||||
@ -219,12 +222,12 @@ IMFYCbCrImage::GetD3D9TextureClient(CompositableClient* aClient)
|
||||
TextureClient*
|
||||
IMFYCbCrImage::GetTextureClient(CompositableClient* aClient)
|
||||
{
|
||||
LayersBackend backend = aClient->GetForwarder()->GetCompositorBackendType();
|
||||
ID3D11Device* device = gfxWindowsPlatform::GetPlatform()->GetD3D11ImageBridgeDevice();
|
||||
if (!device ||
|
||||
aClient->GetForwarder()->GetCompositorBackendType() != LayersBackend::LAYERS_D3D11) {
|
||||
|
||||
IDirect3DDevice9* d3d9device = gfxWindowsPlatform::GetPlatform()->GetD3D9Device();
|
||||
if (d3d9device && aClient->GetForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_D3D9) {
|
||||
if (!device || backend != LayersBackend::LAYERS_D3D11) {
|
||||
if (backend == LayersBackend::LAYERS_D3D9 ||
|
||||
backend == LayersBackend::LAYERS_D3D11) {
|
||||
return GetD3D9TextureClient(aClient);
|
||||
}
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user