mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 02dd0a2e01e8 (bug 1015718) for bustage a=sheriffduty
This commit is contained in:
parent
644f644aca
commit
83fc5c8e0a
@ -310,19 +310,12 @@ DXGITextureHostD3D11::DXGITextureHostD3D11(TextureFlags aFlags,
|
||||
, mHandle(aDescriptor.handle())
|
||||
, mFormat(aDescriptor.format())
|
||||
, mIsLocked(false)
|
||||
{
|
||||
HRESULT hr = GetDevice()->OpenSharedResource((HANDLE)mHandle,
|
||||
__uuidof(ID3D11Texture2D),
|
||||
(void**)(ID3D11Texture2D**)byRef(mTexture));
|
||||
if (FAILED(hr)) {
|
||||
NS_WARNING("Failed to open shared texture");
|
||||
}
|
||||
}
|
||||
{}
|
||||
|
||||
ID3D11Device*
|
||||
DXGITextureHostD3D11::GetDevice()
|
||||
{
|
||||
return gfxWindowsPlatform::GetPlatform()->GetD3D11Device();
|
||||
return mCompositor ? mCompositor->GetDevice() : nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
@ -339,11 +332,16 @@ DXGITextureHostD3D11::Lock()
|
||||
return false;
|
||||
}
|
||||
if (!mTextureSource) {
|
||||
if (!mTexture) {
|
||||
RefPtr<ID3D11Texture2D> tex;
|
||||
HRESULT hr = GetDevice()->OpenSharedResource((HANDLE)mHandle,
|
||||
__uuidof(ID3D11Texture2D),
|
||||
(void**)(ID3D11Texture2D**)byRef(tex));
|
||||
if (FAILED(hr)) {
|
||||
NS_WARNING("Failed to open shared texture");
|
||||
return false;
|
||||
}
|
||||
|
||||
mTextureSource = new DataTextureSourceD3D11(mFormat, mCompositor, mTexture);
|
||||
mTextureSource = new DataTextureSourceD3D11(mFormat, mCompositor, tex);
|
||||
D3D11_TEXTURE2D_DESC desc;
|
||||
tex->GetDesc(&desc);
|
||||
mSize = IntSize(desc.Width, desc.Height);
|
||||
|
@ -193,7 +193,6 @@ public:
|
||||
protected:
|
||||
ID3D11Device* GetDevice();
|
||||
|
||||
RefPtr<ID3D11Texture2D> mTexture;
|
||||
RefPtr<DataTextureSourceD3D11> mTextureSource;
|
||||
RefPtr<CompositorD3D11> mCompositor;
|
||||
gfx::IntSize mSize;
|
||||
|
Loading…
Reference in New Issue
Block a user