mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Force a repaint after DXGI device resets. (bug 1188019, r=bas)
This commit is contained in:
parent
9a6d78d24c
commit
8ced4416a5
@ -605,6 +605,12 @@ public:
|
||||
|
||||
virtual void FlushContentDrawing() {}
|
||||
|
||||
// If a device reset has occurred, update the necessary platform backend
|
||||
// bits.
|
||||
virtual bool UpdateForDeviceReset() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method, creates a draw target for a specific Azure backend.
|
||||
* Used by CreateOffscreenDrawTarget.
|
||||
|
@ -1192,6 +1192,30 @@ gfxWindowsPlatform::DidRenderingDeviceReset(DeviceResetReason* aResetReason)
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
InvalidateWindowForDeviceReset(HWND aWnd, LPARAM aMsg)
|
||||
{
|
||||
RedrawWindow(aWnd, nullptr, nullptr,
|
||||
RDW_INVALIDATE|RDW_INTERNALPAINT|RDW_FRAME);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool
|
||||
gfxWindowsPlatform::UpdateForDeviceReset()
|
||||
{
|
||||
if (!DidRenderingDeviceReset()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Trigger an ::OnPaint for each window.
|
||||
::EnumThreadWindows(GetCurrentThreadId(),
|
||||
InvalidateWindowForDeviceReset,
|
||||
0);
|
||||
|
||||
gfxCriticalNote << "Detected rendering device reset on refresh";
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
gfxWindowsPlatform::GetPlatformCMSOutputProfile(void* &mem, size_t &mem_size)
|
||||
{
|
||||
|
@ -213,7 +213,8 @@ public:
|
||||
*/
|
||||
virtual bool IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags) override;
|
||||
|
||||
virtual bool DidRenderingDeviceReset(DeviceResetReason* aResetReason = nullptr) override;
|
||||
bool DidRenderingDeviceReset(DeviceResetReason* aResetReason = nullptr) override;
|
||||
bool UpdateForDeviceReset() override;
|
||||
|
||||
mozilla::gfx::BackendType GetContentBackendFor(mozilla::layers::LayersBackend aLayers) override;
|
||||
|
||||
|
@ -1644,6 +1644,8 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
||||
AutoRestore<TimeStamp> restoreTickStart(mTickStart);
|
||||
mTickStart = TimeStamp::Now();
|
||||
|
||||
gfxPlatform::GetPlatform()->UpdateForDeviceReset();
|
||||
|
||||
/*
|
||||
* The timer holds a reference to |this| while calling |Notify|.
|
||||
* However, implementations of |WillRefresh| are permitted to destroy
|
||||
|
Loading…
Reference in New Issue
Block a user