Bug 1642839 - Implement WebRenderLayerManager::SendInvalidRegion() r=jrmuizel

When DWM is disabled, each window does not have own back buffer. They would paint directly to a buffer that was to be displayed by the video card. WM_PAINT via SendInvalidRegion() requests necessary re-paint. With it, RenderCompositorANGLE does not need to disable partial present.

Differential Revision: https://phabricator.services.mozilla.com/D77989
This commit is contained in:
sotaro
2020-06-05 05:03:40 +00:00
parent eb33c51aeb
commit 6b4ed853a0
3 changed files with 13 additions and 17 deletions

View File

@@ -671,6 +671,18 @@ void WebRenderLayerManager::WaitOnTransactionProcessed() {
void WebRenderLayerManager::SendInvalidRegion(const nsIntRegion& aRegion) {
// XXX Webrender does not support invalid region yet.
#ifdef XP_WIN
// When DWM is disabled, each window does not have own back buffer. They would
// paint directly to a buffer that was to be displayed by the video card.
// WM_PAINT via SendInvalidRegion() requests necessary re-paint.
const bool needsInvalidate = !gfx::gfxVars::DwmCompositionEnabled();
#else
const bool needsInvalidate = true;
#endif
if (needsInvalidate && WrBridge()) {
WrBridge()->SendInvalidateRenderedFrame();
}
}
void WebRenderLayerManager::ScheduleComposite() {