зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1612665
- Backout Bug 1596630 r=nical
SyncObjectD3D11Host::Synchronize() calling in RenderCompositorANGLE::BeginFrame() is still necessary for D3D11DXVA2Manager::CopyToImage(). Then backout Bug 1596630. Differential Revision: https://phabricator.services.mozilla.com/D61658 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d25eef6d59
Коммит
aa001195aa
|
@ -449,9 +449,7 @@ D3D11TextureData* D3D11TextureData::Create(IntSize aSize, SurfaceFormat aFormat,
|
|||
}
|
||||
|
||||
newDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED;
|
||||
// WebRender requests keyed mutex.
|
||||
if (gfxVars::UseWebRender() || !NS_IsMainThread() ||
|
||||
!!(aFlags & ALLOC_FOR_OUT_OF_BAND_CONTENT)) {
|
||||
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)) {
|
||||
newDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX;
|
||||
|
|
|
@ -227,6 +227,15 @@ bool WebRenderLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags) {
|
|||
refreshStart = mTransactionStart;
|
||||
}
|
||||
|
||||
// Skip the synchronization for buffer since we also skip the painting during
|
||||
// device-reset status.
|
||||
if (!gfxPlatform::GetPlatform()->DidRenderingDeviceReset()) {
|
||||
if (WrBridge()->GetSyncObject() &&
|
||||
WrBridge()->GetSyncObject()->IsSyncObjectValid()) {
|
||||
WrBridge()->GetSyncObject()->Synchronize();
|
||||
}
|
||||
}
|
||||
|
||||
GetCompositorBridgeChild()->EndCanvasTransaction();
|
||||
|
||||
AutoTArray<RenderRootUpdates, wr::kRenderRootCount> renderRootUpdates;
|
||||
|
@ -404,6 +413,15 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
|
|||
}
|
||||
}
|
||||
|
||||
// Skip the synchronization for buffer since we also skip the painting during
|
||||
// device-reset status.
|
||||
if (!gfxPlatform::GetPlatform()->DidRenderingDeviceReset()) {
|
||||
if (WrBridge()->GetSyncObject() &&
|
||||
WrBridge()->GetSyncObject()->IsSyncObjectValid()) {
|
||||
WrBridge()->GetSyncObject()->Synchronize();
|
||||
}
|
||||
}
|
||||
|
||||
GetCompositorBridgeChild()->EndCanvasTransaction();
|
||||
|
||||
{
|
||||
|
|
|
@ -178,7 +178,6 @@ bool RenderCompositorANGLE::Initialize() {
|
|||
}
|
||||
}
|
||||
|
||||
// SyncObject is used only by D3D11DXVA2Manager
|
||||
mSyncObject = layers::SyncObjectHost::CreateSyncObjectHost(mDevice);
|
||||
if (!mSyncObject->Init()) {
|
||||
// Some errors occur. Clear the mSyncObject here.
|
||||
|
@ -435,6 +434,13 @@ bool RenderCompositorANGLE::BeginFrame() {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (mSyncObject) {
|
||||
if (!mSyncObject->Synchronize(/* aFallible */ true)) {
|
||||
// It's timeout or other error. Handle the device-reset here.
|
||||
RenderThread::Get()->HandleDeviceReset("SyncObject", /* aNotify */ true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче