Bug 1094097 - Fix building ANGLE without D3D11. r=jrmuizel, a=lsblakk
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 02 Dec 2014 17:46:32 -0800
changeset 242311 802533342580938be4f924d8cb419bac43ae2aaa
parent 242310 d2b1231cd6473b2a8bd07ec0634e7c2dfff02883
child 242312 47f89c9a5fe0326cda7144bb96a635b358ce103c
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, lsblakk
bugs1094097
milestone36.0a2
Bug 1094097 - Fix building ANGLE without D3D11. r=jrmuizel, a=lsblakk
gfx/angle/src/commit.h
gfx/angle/src/common/NativeWindow.h
gfx/angle/src/common/win32/NativeWindow.cpp
--- a/gfx/angle/src/commit.h
+++ b/gfx/angle/src/commit.h
@@ -1,3 +1,3 @@
-#define ANGLE_COMMIT_HASH "f0cacb827771"
+#define ANGLE_COMMIT_HASH "0fb6a60df77b"
 #define ANGLE_COMMIT_HASH_SIZE 12
-#define ANGLE_COMMIT_DATE "2014-10-28 23:00:12 -0400"
+#define ANGLE_COMMIT_DATE "2014-11-28 13:56:37 -0500"
--- a/gfx/angle/src/common/NativeWindow.h
+++ b/gfx/angle/src/common/NativeWindow.h
@@ -11,40 +11,44 @@
 
 #ifndef COMMON_NATIVEWINDOW_H_
 #define COMMON_NATIVEWINDOW_H_
 
 #include <EGL/eglplatform.h>
 #include "common/debug.h"
 #include "common/platform.h"
 
+#ifdef ANGLE_ENABLE_D3D11
 // DXGISwapChain and DXGIFactory are typedef'd to specific required
 // types. The HWND NativeWindow implementation requires IDXGISwapChain
 // and IDXGIFactory and the Windows Store NativeWindow
 // implementation requires IDXGISwapChain1 and IDXGIFactory2.
 typedef IDXGISwapChain DXGISwapChain;
 typedef IDXGIFactory DXGIFactory;
+#endif
 
 namespace rx
 {
 class NativeWindow
 {
   public:
     explicit NativeWindow(EGLNativeWindowType window);
 
     // The HWND NativeWindow implementation can benefit
     // by having inline versions of these methods to
     // reduce the calling overhead.
     inline bool initialize() { return true; }
     inline bool getClientRect(LPRECT rect) { return GetClientRect(mWindow, rect) == TRUE; }
     inline bool isIconic() { return IsIconic(mWindow) == TRUE; }
 
+#ifdef ANGLE_ENABLE_D3D11
     HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
                             DXGI_FORMAT format, UINT width, UINT height,
                             DXGISwapChain** swapChain);
+#endif
 
     inline EGLNativeWindowType getNativeWindow() const { return mWindow; }
 
   private:
     EGLNativeWindowType mWindow;
 };
 }
 
--- a/gfx/angle/src/common/win32/NativeWindow.cpp
+++ b/gfx/angle/src/common/win32/NativeWindow.cpp
@@ -15,16 +15,17 @@ bool isValidEGLNativeWindowType(EGLNativ
 }
 
 namespace rx
 {
 NativeWindow::NativeWindow(EGLNativeWindowType window) : mWindow(window)
 {
 }
 
+#ifdef ANGLE_ENABLE_D3D11
 HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory,
                                       DXGI_FORMAT format, unsigned int width, unsigned int height,
                                       DXGISwapChain** swapChain)
 {
     if (device == NULL || factory == NULL || swapChain == NULL || width == 0 || height == 0)
     {
         return E_INVALIDARG;
     }
@@ -43,9 +44,10 @@ HRESULT NativeWindow::createSwapChain(ID
     swapChainDesc.OutputWindow = mWindow;
     swapChainDesc.SampleDesc.Count = 1;
     swapChainDesc.SampleDesc.Quality = 0;
     swapChainDesc.Windowed = TRUE;
     swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
 
     return factory->CreateSwapChain(device, &swapChainDesc, swapChain);
 }
-};
\ No newline at end of file
+#endif
+};