Skip to content

Commit

Permalink
Backed out changeset f5a4eadc760e (bug 1305326)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwoodrow committed Oct 6, 2016
1 parent c27ede2 commit 149347c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 19 deletions.
1 change: 0 additions & 1 deletion gfx/ipc/GraphicsMessages.ipdlh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ struct D3D11DeviceStatus
{
bool isWARP;
bool textureSharingWorks;
bool alphaTextureSharingWorks;
uint32_t featureLevel;
DxgiAdapterDesc adapter;
};
Expand Down
3 changes: 1 addition & 2 deletions gfx/layers/IMFYCbCrImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ IMFYCbCrImage::GetTextureClient(KnowsCompositor* aForwarder)
return nullptr;
}

if (!gfx::DeviceManagerDx::Get()->CanInitializeKeyedMutexTextures() ||
!gfx::DeviceManagerDx::Get()->AlphaTextureSharingWorks()) {
if (!gfx::DeviceManagerDx::Get()->CanInitializeKeyedMutexTextures()) {
return nullptr;
}

Expand Down
15 changes: 0 additions & 15 deletions gfx/thebes/DeviceManagerDx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ DeviceManagerDx::CreateCompositorDevice(FeatureState& d3d11)
// Only test this when not using WARP since it can fail and cause
// GetDeviceRemovedReason to return weird values.
bool textureSharingWorks = D3D11Checks::DoesTextureSharingWork(device);
bool alphaTextureSharingWorks = D3D11Checks::DoesAlphaTextureSharingWork(device);

DXGI_ADAPTER_DESC desc;
PodZero(&desc);
Expand Down Expand Up @@ -356,7 +355,6 @@ DeviceManagerDx::CreateCompositorDevice(FeatureState& d3d11)
mDeviceStatus = Some(D3D11DeviceStatus(
false,
textureSharingWorks,
alphaTextureSharingWorks,
featureLevel,
DxgiAdapterDesc::From(desc)));
}
Expand Down Expand Up @@ -411,10 +409,8 @@ DeviceManagerDx::CreateWARPCompositorDevice()
// Only test for texture sharing on Windows 8 since it puts the device into
// an unusable state if used on Windows 7
bool textureSharingWorks = false;
bool alphaTextureSharingWorks = false;
if (IsWin8OrLater()) {
textureSharingWorks = D3D11Checks::DoesTextureSharingWork(device);
alphaTextureSharingWorks = D3D11Checks::DoesAlphaTextureSharingWork(device);
}

DxgiAdapterDesc nullAdapter;
Expand All @@ -427,7 +423,6 @@ DeviceManagerDx::CreateWARPCompositorDevice()
mDeviceStatus = Some(D3D11DeviceStatus(
true,
textureSharingWorks,
alphaTextureSharingWorks,
featureLevel,
nullAdapter));
}
Expand Down Expand Up @@ -675,16 +670,6 @@ DeviceManagerDx::TextureSharingWorks()
return mDeviceStatus->textureSharingWorks();
}

bool
DeviceManagerDx::AlphaTextureSharingWorks()
{
MutexAutoLock lock(mDeviceLock);
if (!mDeviceStatus) {
return false;
}
return mDeviceStatus->alphaTextureSharingWorks();
}

bool
DeviceManagerDx::CanInitializeKeyedMutexTextures()
{
Expand Down
1 change: 0 additions & 1 deletion gfx/thebes/DeviceManagerDx.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class DeviceManagerDx final

unsigned GetCompositorFeatureLevel() const;
bool TextureSharingWorks();
bool AlphaTextureSharingWorks();
bool IsWARP();

// Returns true if we can create a texture with
Expand Down

0 comments on commit 149347c

Please sign in to comment.