Handle forced device resets in the GPU process. (bug 1316690 part 3, r=rhunt)
authorDavid Anderson <danderson@mozilla.com>
Fri, 11 Nov 2016 11:58:51 -0800
changeset 352337 353ef7001763806842df858b846284b22a22a569
parent 352336 86e2aea8417c7bc30e3d54ec5515587dd45205a3
child 352338 85b96e73c048b04a7fd9c9c4dcaf44e4862f92b1
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhunt
bugs1316690
milestone52.0a1
Handle forced device resets in the GPU process. (bug 1316690 part 3, r=rhunt)
gfx/thebes/DeviceManagerDx.cpp
--- a/gfx/thebes/DeviceManagerDx.cpp
+++ b/gfx/thebes/DeviceManagerDx.cpp
@@ -582,21 +582,23 @@ DeviceManagerDx::ResetDevices()
   mDeviceResetReason = Nothing();
   Factory::SetDirect3D11Device(nullptr);
 }
 
 bool
 DeviceManagerDx::MaybeResetAndReacquireDevices()
 {
   DeviceResetReason resetReason;
-  if (!GetAnyDeviceRemovedReason(&resetReason)) {
+  if (!HasDeviceReset(&resetReason)) {
     return false;
   }
 
-  Telemetry::Accumulate(Telemetry::DEVICE_RESET_REASON, uint32_t(resetReason));
+  if (resetReason != DeviceResetReason::FORCED_RESET) {
+    Telemetry::Accumulate(Telemetry::DEVICE_RESET_REASON, uint32_t(resetReason));
+  }
 
   bool createCompositorDevice = !!mCompositorDevice;
   bool createContentDevice = !!mContentDevice;
 
   ResetDevices();
 
   if (createCompositorDevice && !CreateCompositorDevices()) {
     // Just stop, don't try anything more