Do not attempt to recover from device lost masked by present occluded or display mode changed.

The call to IDirect3DDevice9::Present in testDeviceLost sometimes never returns on AMD, resulting in a hang.

Also, on AMD, device lost is sometimes never reported at all, even through present occluded or display mode changed. I'll need to do something more robust at the app level. It has something to do with the Chrome GPU process sandbox. These issues only happen when the sandbox is enabled.

Cleanup for Surface::recreateAdditionalSwapChains to follow once I determine this gets us back to a stable place.
Review URL: https://codereview.appspot.com/8038044

git-svn-id: http://angleproject.googlecode.com/svn/trunk@2040 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/common/version.h b/src/common/version.h
index 08a2947..62bb1da 100644
--- a/src/common/version.h
+++ b/src/common/version.h
@@ -1,7 +1,7 @@
 #define MAJOR_VERSION 1
 #define MINOR_VERSION 0
 #define BUILD_VERSION 0
-#define BUILD_REVISION 2001
+#define BUILD_REVISION 2040
 
 #define STRINGIFY(x) #x
 #define MACRO_STRINGIFY(x) STRINGIFY(x)
diff --git a/src/libEGL/Display.cpp b/src/libEGL/Display.cpp
index 5658227..ea8816a 100644
--- a/src/libEGL/Display.cpp
+++ b/src/libEGL/Display.cpp
@@ -916,34 +916,7 @@
 
     if (mDeviceEx)
     {
-        HRESULT hr = mDeviceEx->CheckDeviceState(NULL);
-        if (hr == S_PRESENT_MODE_CHANGED)
-        {
-            // Reset the device so that D3D stops reporting S_PRESENT_MODE_CHANGED. Otherwise it will report
-            // it continuously, potentially masking a lost device. D3D resources are not lost on a mode change with WDDM.
-            D3DPRESENT_PARAMETERS presentParameters = getDefaultPresentParameters();
-            mDeviceEx->Reset(&presentParameters);
-
-            // Existing swap chains sometimes crash on the next present after a reset.
-            for (SurfaceSet::iterator it = mSurfaceSet.begin(); it != mSurfaceSet.end(); ++it)
-            {
-                (*it)->recreateAdditionalSwapChain();
-            }
-
-            // Reset will not always cause the device loss to be reported so issue a dummy present.
-            mDeviceEx->Present(NULL, NULL, NULL, NULL);
-
-            // Retest the device status to see if the mode change really indicated a lost device.
-            hr = mDeviceEx->CheckDeviceState(NULL);
-        }
-        else if (hr == S_PRESENT_OCCLUDED)
-        {
-            // CheckDeviceLost continuously returns S_PRESENT_OCCLUDED while the screen is locked. Calling Present
-            // unmasks the device lost error.
-            mDeviceEx->Present(NULL, NULL, NULL, NULL);
-            hr = mDeviceEx->CheckDeviceState(NULL);
-        }
-        isLost = FAILED(hr);
+        isLost = FAILED(mDeviceEx->CheckDeviceState(NULL));
     }
     else if (mDevice)
     {