d3d11: enable d3d11 by default if it is not built with chromium

Bug: dawn:1705
Bug: dawn:1778
Change-Id: I8d84582f6f9e84676572ecb9c174d0117468888b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130580
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6cee43..c01c801 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,6 +77,7 @@
 endfunction()
 
 # Default values for the backend-enabling options
+set(ENABLE_D3D11 OFF)
 set(ENABLE_D3D12 OFF)
 set(ENABLE_METAL OFF)
 set(ENABLE_OPENGLES OFF)
@@ -86,6 +87,7 @@
 set(USE_X11 OFF)
 set(BUILD_SAMPLES OFF)
 if (WIN32)
+    set(ENABLE_D3D11 ON)
     set(ENABLE_D3D12 ON)
     if (NOT WINDOWS_STORE)
         # Enable Vulkan in win32 compilation only
diff --git a/scripts/dawn_features.gni b/scripts/dawn_features.gni
index baaf2c5..aa6d551 100644
--- a/scripts/dawn_features.gni
+++ b/scripts/dawn_features.gni
@@ -55,7 +55,7 @@
   dawn_complete_static_libs = false
 
   # Enables the compilation of Dawn's D3D11 backend
-  dawn_enable_d3d11 = false
+  dawn_enable_d3d11 = is_win && !build_with_chromium
 
   # Enables the compilation of Dawn's D3D12 backend
   dawn_enable_d3d12 = is_win
diff --git a/src/dawn/native/d3d11/DeviceD3D11.cpp b/src/dawn/native/d3d11/DeviceD3D11.cpp
index ee88c85..33de82f 100644
--- a/src/dawn/native/d3d11/DeviceD3D11.cpp
+++ b/src/dawn/native/d3d11/DeviceD3D11.cpp
@@ -24,6 +24,7 @@
 #include "dawn/native/DynamicUploader.h"
 #include "dawn/native/Instance.h"
 #include "dawn/native/d3d/D3DError.h"
+#include "dawn/native/d3d/ExternalImageDXGIImpl.h"
 #include "dawn/native/d3d11/AdapterD3D11.h"
 #include "dawn/native/d3d11/BackendD3D11.h"
 #include "dawn/native/d3d11/BindGroupD3D11.h"