Backed out changeset 46090632bad3 (bug 1345814) for failing reftests on Windows 8 x64 with e10s enabled, e.g. webgl-capturestream-test.html?preserve. r=backout n a CLOSED TREE

This commit is contained in:
Sebastian Hengst 2017-03-13 19:22:32 +01:00
parent 5a87040be3
commit 004811fcc7
2 changed files with 5 additions and 6 deletions

View file

@ -699,8 +699,7 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor,
mTextureClientAllocator = new D3D11RecycleAllocator(
layers::ImageBridgeChild::GetSingleton().get(), mDevice);
if (ImageBridgeChild::GetSingleton() && gfxPrefs::PDMWMFUseSyncTexture() &&
mDevice != DeviceManagerDx::Get()->GetCompositorDevice()) {
if (ImageBridgeChild::GetSingleton() && gfxPrefs::PDMWMFUseSyncTexture()) {
// We use a syncobject to avoid the cost of the mutex lock when compositing,
// and because it allows color conversion ocurring directly from this texture
// DXVA does not seem to accept IDXGIKeyedMutex textures as input.
@ -903,7 +902,7 @@ D3D11DXVA2Manager::CopyToImage(IMFSample* aVideoSample,
if (mutex) {
hr = mutex->AcquireSync(0, 2000);
NS_ENSURE_TRUE(SUCCEEDED(hr), hr);
} else if (mDevice != DeviceManagerDx::Get()->GetCompositorDevice()) {
} else {
NS_ENSURE_TRUE(mSyncObject, E_FAIL);
}
@ -940,10 +939,10 @@ D3D11DXVA2Manager::CopyToImage(IMFSample* aVideoSample,
hr = mTransform->Output(&sample);
}
if (!mutex && mDevice != DeviceManagerDx::Get()->GetCompositorDevice()) {
if (!mutex) {
client->SyncWithObject(mSyncObject);
mSyncObject->FinalizeFrame();
} else if (mutex) {
} else {
mutex->ReleaseSync(0);
}

View file

@ -402,7 +402,7 @@ D3D11TextureData::Create(IntSize aSize, SurfaceFormat aFormat, SourceSurface* aS
newDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED;
if (!NS_IsMainThread() || !!(aFlags & ALLOC_FOR_OUT_OF_BAND_CONTENT)) {
// On the main thread we use the syncobject to handle synchronization.
if (!(aFlags & ALLOC_MANUAL_SYNCHRONIZATION) && aDevice != DeviceManagerDx::Get()->GetCompositorDevice()) {
if (!(aFlags & ALLOC_MANUAL_SYNCHRONIZATION)) {
newDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX;
}
}