mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1235407 - Part 2: Add ability to force device resets through gfxWindowsPlatform. r=milan
This commit is contained in:
parent
3d1ad5faa9
commit
667d7a5517
@ -132,6 +132,7 @@ enum class DeviceResetReason
|
||||
DRIVER_ERROR,
|
||||
INVALID_CALL,
|
||||
OUT_OF_MEMORY,
|
||||
FORCED_RESET,
|
||||
UNKNOWN
|
||||
};
|
||||
|
||||
|
@ -555,6 +555,15 @@ gfxWindowsPlatform::UpdateRenderMode()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gfxWindowsPlatform::ForceDeviceReset(ForcedDeviceResetReason aReason)
|
||||
{
|
||||
Telemetry::Accumulate(Telemetry::FORCED_DEVICE_RESET_REASON, uint32_t(aReason));
|
||||
|
||||
mDeviceResetReason = DeviceResetReason::FORCED_RESET;
|
||||
mHasDeviceReset = true;
|
||||
}
|
||||
|
||||
mozilla::gfx::BackendType
|
||||
gfxWindowsPlatform::GetContentBackendFor(mozilla::layers::LayersBackend aLayers)
|
||||
{
|
||||
|
@ -149,6 +149,11 @@ public:
|
||||
*/
|
||||
void UpdateRenderMode();
|
||||
|
||||
/**
|
||||
* Forces all GPU resources to be recreated on the next frame.
|
||||
*/
|
||||
void ForceDeviceReset(ForcedDeviceResetReason aReason);
|
||||
|
||||
/**
|
||||
* Verifies a D2D device is present and working, will attempt to create one
|
||||
* it is non-functional or non-existant.
|
||||
|
Loading…
Reference in New Issue
Block a user