Use D3D11 Debug Annotations when D3D9 is unavailable

Change-Id: I37ac5fe7f0b2fe5e71bd7f0afca55e9894f3463c
Reviewed-on: https://chromium-review.googlesource.com/224512
Tested-by: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/common/utilities.cpp b/src/common/utilities.cpp
index d646585..9d797a6 100644
--- a/src/common/utilities.cpp
+++ b/src/common/utilities.cpp
@@ -446,82 +446,26 @@
 
 }
 
+#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
 std::string getTempPath()
 {
 #ifdef ANGLE_PLATFORM_WINDOWS
-    #if defined(ANGLE_ENABLE_WINDOWS_STORE)
-
-        using namespace Microsoft::WRL;
-        using namespace Microsoft::WRL::Wrappers;
-        using namespace ABI::Windows::ApplicationModel::Core;
-        using namespace ABI::Windows::Foundation;
-        using namespace ABI::Windows::Foundation::Collections;
-
-        ComPtr<IActivationFactory> pActivationFactory;
-        ComPtr<ABI::Windows::ApplicationModel::IPackageStatics> packageStatics;
-        ComPtr<ABI::Windows::ApplicationModel::IPackage> package;
-        ComPtr<ABI::Windows::Storage::IStorageFolder> storageFolder;
-        ComPtr<ABI::Windows::Storage::IStorageItem> storageItem;
-        HString hstrPath;
-
-        HRESULT result = GetActivationFactory(HStringReference(RuntimeClass_Windows_ApplicationModel_Package).Get(), &pActivationFactory);
-        ASSERT(SUCCEEDED(result));
-        if (SUCCEEDED(result))
-        {
-            result = pActivationFactory.As(&packageStatics);
-            ASSERT(SUCCEEDED(result));
-        }
-
-        if (SUCCEEDED(result))
-        {
-            result = packageStatics->get_Current(&package);
-            ASSERT(SUCCEEDED(result));
-        }
-
-        if (SUCCEEDED(result))
-        {
-            result = package->get_InstalledLocation(&storageFolder);
-            ASSERT(SUCCEEDED(result));
-        }
-
-        if (SUCCEEDED(result))
-        {
-            result = storageFolder.As(&storageItem);
-            ASSERT(SUCCEEDED(result));
-        }
-
-        if (SUCCEEDED(result))
-        {
-            result = storageItem->get_Path(hstrPath.GetAddressOf());
-            ASSERT(SUCCEEDED(result));
-        }
-
-        if (SUCCEEDED(result))
-        {
-            std::wstring t = std::wstring(hstrPath.GetRawBuffer(nullptr));
-            return std::string(t.begin(), t.end());
-        }
-
+    char path[MAX_PATH];
+    DWORD pathLen = GetTempPathA(sizeof(path) / sizeof(path[0]), path);
+    if (pathLen == 0)
+    {
         UNREACHABLE();
         return std::string();
-    #else
-        char path[MAX_PATH];
-        DWORD pathLen = GetTempPathA(sizeof(path) / sizeof(path[0]), path);
-        if (pathLen == 0)
-        {
-            UNREACHABLE();
-            return std::string();
-        }
+    }
 
-        UINT unique = GetTempFileNameA(path, "sh", 0, path);
-        if (unique == 0)
-        {
-            UNREACHABLE();
-            return std::string();
-        }
+    UINT unique = GetTempFileNameA(path, "sh", 0, path);
+    if (unique == 0)
+    {
+        UNREACHABLE();
+        return std::string();
+    }
 
-        return path;
-    #endif
+    return path;
 #else
     UNIMPLEMENTED();
     return "";
@@ -540,6 +484,7 @@
     fwrite(content, sizeof(char), size, file);
     fclose(file);
 }
+#endif // !ANGLE_ENABLE_WINDOWS_STORE
 
 #if defined(ANGLE_ENABLE_WINDOWS_STORE)
 
@@ -568,4 +513,4 @@
     WaitForSingleObjectEx(sleepEvent, dwMilliseconds, false);
 }
 
-#endif
+#endif // ANGLE_ENABLE_WINDOWS_STORE