Create D3D device when eglInitialize is called.
This is because some GPUs / drivers are unable to create the device once the Chromium GPU process sandbox has been locked down and waiting for the first context / surface to be created is too late.
Review URL: https://codereview.appspot.com/5647046
git-svn-id: https://angleproject.googlecode.com/svn/trunk@983 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/common/version.h b/src/common/version.h
index d84bdaa..d272715 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 982
+#define BUILD_REVISION 983
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
diff --git a/src/libEGL/Display.cpp b/src/libEGL/Display.cpp
index e3ed3d1..6a5cfd3 100644
--- a/src/libEGL/Display.cpp
+++ b/src/libEGL/Display.cpp
@@ -288,6 +288,12 @@
mDeviceWindow = CreateWindowEx(WS_EX_NOACTIVATE, className, windowName, WS_DISABLED | WS_POPUP, 0, 0, 1, 1, HWND_MESSAGE, NULL, GetModuleHandle(NULL), NULL);
+ if (!createDevice())
+ {
+ terminate();
+ return false;
+ }
+
return true;
}