summaryrefslogtreecommitdiffstats
path: root/gfx/webrender_bindings/DCLayerTree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/webrender_bindings/DCLayerTree.cpp')
-rw-r--r--gfx/webrender_bindings/DCLayerTree.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/gfx/webrender_bindings/DCLayerTree.cpp b/gfx/webrender_bindings/DCLayerTree.cpp
index 177979a466..49ca8ee77b 100644
--- a/gfx/webrender_bindings/DCLayerTree.cpp
+++ b/gfx/webrender_bindings/DCLayerTree.cpp
@@ -70,8 +70,8 @@ UniquePtr<DCLayerTree> DCLayerTree::Create(gl::GLContext* aGL,
return nullptr;
}
- auto layerTree =
- MakeUnique<DCLayerTree>(aGL, aEGLConfig, aDevice, aCtx, dCompDevice);
+ auto layerTree = MakeUnique<DCLayerTree>(aGL, aEGLConfig, aDevice, aCtx,
+ aHwnd, dCompDevice);
if (!layerTree->Initialize(aHwnd, aError)) {
return nullptr;
}
@@ -83,11 +83,12 @@ void DCLayerTree::Shutdown() { DCLayerTree::sGpuOverlayInfo = nullptr; }
DCLayerTree::DCLayerTree(gl::GLContext* aGL, EGLConfig aEGLConfig,
ID3D11Device* aDevice, ID3D11DeviceContext* aCtx,
- IDCompositionDevice2* aCompositionDevice)
+ HWND aHwnd, IDCompositionDevice2* aCompositionDevice)
: mGL(aGL),
mEGLConfig(aEGLConfig),
mDevice(aDevice),
mCtx(aCtx),
+ mHwnd(aHwnd),
mCompositionDevice(aCompositionDevice),
mDebugCounter(false),
mDebugVisualRedrawRegions(false),
@@ -1358,7 +1359,8 @@ bool DCSurfaceVideo::CalculateSwapChainSize(gfx::Matrix& aTransform) {
GetVpAutoHDRSupported(vendorId, mDCLayerTree->GetVideoContext(),
mDCLayerTree->GetVideoProcessor());
const bool contentIsHDR = false; // XXX for now, only non-HDR is supported.
- const bool monitorIsHDR = gfx::DeviceManagerDx::Get()->SystemHDREnabled();
+ const bool monitorIsHDR =
+ gfx::DeviceManagerDx::Get()->WindowHDREnabled(mDCLayerTree->GetHwnd());
const bool powerIsCharging = RenderThread::Get()->GetPowerIsCharging();
bool useVpAutoHDR = gfx::gfxVars::WebRenderOverlayVpAutoHDR() &&