mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1272277 - Force content process device reset when the compositor is updated - r=nical
This commit is contained in:
parent
b705cc93b6
commit
662e4f47a3
@ -3018,7 +3018,7 @@ TabChild::InvalidateLayers()
|
||||
void
|
||||
TabChild::CompositorUpdated(const TextureFactoryIdentifier& aNewIdentifier)
|
||||
{
|
||||
gfxPlatform::GetPlatform()->UpdateRenderModeIfDeviceReset();
|
||||
gfxPlatform::GetPlatform()->CompositorUpdated();
|
||||
|
||||
RefPtr<LayerManager> lm = mPuppetWidget->GetLayerManager();
|
||||
ClientLayerManager* clm = lm->AsClientLayerManager();
|
||||
|
@ -136,7 +136,8 @@ enum class DeviceResetReason
|
||||
|
||||
enum class ForcedDeviceResetReason
|
||||
{
|
||||
OPENSHAREDHANDLE = 0
|
||||
OPENSHAREDHANDLE = 0,
|
||||
COMPOSITOR_UPDATED,
|
||||
};
|
||||
|
||||
class gfxPlatform {
|
||||
@ -633,6 +634,8 @@ public:
|
||||
return mCompositorBackend;
|
||||
}
|
||||
|
||||
virtual void CompositorUpdated() {}
|
||||
|
||||
// Return information on how child processes should initialize graphics
|
||||
// devices. Currently this is only used on Windows.
|
||||
virtual void GetDeviceInitData(mozilla::gfx::DeviceInitData* aOut);
|
||||
|
@ -947,6 +947,13 @@ static DeviceResetReason HResultToResetReason(HRESULT hr)
|
||||
return DeviceResetReason::UNKNOWN;
|
||||
}
|
||||
|
||||
void
|
||||
gfxWindowsPlatform::CompositorUpdated()
|
||||
{
|
||||
ForceDeviceReset(ForcedDeviceResetReason::COMPOSITOR_UPDATED);
|
||||
UpdateRenderMode();
|
||||
}
|
||||
|
||||
bool
|
||||
gfxWindowsPlatform::IsDeviceReset(HRESULT hr, DeviceResetReason* aResetReason)
|
||||
{
|
||||
|
@ -178,6 +178,8 @@ public:
|
||||
*/
|
||||
virtual bool IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags) override;
|
||||
|
||||
virtual void CompositorUpdated() override;
|
||||
|
||||
bool DidRenderingDeviceReset(DeviceResetReason* aResetReason = nullptr) override;
|
||||
void SchedulePaintIfDeviceReset() override;
|
||||
void UpdateRenderModeIfDeviceReset() override;
|
||||
|
Loading…
Reference in New Issue
Block a user