mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1380979 - Enable DXGITextureHostD3D11 usage with WebRender r=nical
This commit is contained in:
parent
858a553b02
commit
481dd4d078
@ -1075,7 +1075,8 @@ TextureClient::CreateForDrawing(TextureForwarder* aAllocator,
|
||||
TextureData* data = nullptr;
|
||||
|
||||
#ifdef XP_WIN
|
||||
if (aLayersBackend == LayersBackend::LAYERS_D3D11 &&
|
||||
if ((aLayersBackend == LayersBackend::LAYERS_D3D11 ||
|
||||
aLayersBackend == LayersBackend::LAYERS_WR) &&
|
||||
(moz2DBackend == gfx::BackendType::DIRECT2D ||
|
||||
moz2DBackend == gfx::BackendType::DIRECT2D1_1 ||
|
||||
(!!(aAllocFlags & ALLOC_FOR_OUT_OF_BAND_CONTENT) &&
|
||||
|
@ -673,6 +673,14 @@ WebRenderLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback
|
||||
bool sync = mTarget != nullptr;
|
||||
mLatestTransactionId = mTransactionIdAllocator->GetTransactionId(/*aThrottle*/ true);
|
||||
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
{
|
||||
AutoProfilerTracing
|
||||
tracing("Paint", sync ? "ForwardDPTransactionSync":"ForwardDPTransaction");
|
||||
|
@ -57,6 +57,7 @@
|
||||
#include <d3d10_1.h>
|
||||
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/gfxVars.h"
|
||||
|
||||
#include "nsMemory.h"
|
||||
|
||||
@ -478,6 +479,10 @@ gfxWindowsPlatform::GetContentBackendFor(mozilla::layers::LayersBackend aLayers)
|
||||
return defaultBackend;
|
||||
}
|
||||
|
||||
if (aLayers == LayersBackend::LAYERS_WR && gfx::gfxVars::UseWebRenderANGLE()) {
|
||||
return defaultBackend;
|
||||
}
|
||||
|
||||
if (defaultBackend == BackendType::DIRECT2D1_1) {
|
||||
// We can't have D2D without D3D11 layers, so fallback to Skia.
|
||||
return BackendType::SKIA;
|
||||
|
Loading…
Reference in New Issue
Block a user