Revert "Added IInspectable EGLNativeWindowType and ICoreWindow support"
Causing regressions in the build: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/20182
This reverts commit 756aebfc7afa6d0de14e96637ef396dd7b290c2d.
Change-Id: I2f4bdb5aeb429c9bbc5e655a1761704f33737841
Reviewed-on: https://chromium-review.googlesource.com/224221
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/common/utilities.cpp b/src/common/utilities.cpp
index d646585..405f119 100644
--- a/src/common/utilities.cpp
+++ b/src/common/utilities.cpp
@@ -12,13 +12,6 @@
#include <set>
-#if defined(ANGLE_ENABLE_WINDOWS_STORE)
-# include <wrl.h>
-# include <wrl/wrappers/corewrappers.h>
-# include <windows.applicationmodel.core.h>
-# include <windows.graphics.display.h>
-#endif
-
namespace gl
{
@@ -449,79 +442,22 @@
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,32 +476,3 @@
fwrite(content, sizeof(char), size, file);
fclose(file);
}
-
-#if defined(ANGLE_ENABLE_WINDOWS_STORE)
-
-void Sleep(unsigned long dwMilliseconds)
-{
- static HANDLE singletonEvent = nullptr;
- HANDLE sleepEvent = singletonEvent;
- if (!sleepEvent)
- {
- sleepEvent = CreateEventEx(nullptr, nullptr, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);
-
- if (!sleepEvent)
- return;
-
- HANDLE previousEvent = InterlockedCompareExchangePointerRelease(&singletonEvent, sleepEvent, nullptr);
-
- if (previousEvent)
- {
- // Back out if multiple threads try to demand create at the same time.
- CloseHandle(sleepEvent);
- sleepEvent = previousEvent;
- }
- }
-
- // Emulate sleep by waiting with timeout on an event that is never signalled.
- WaitForSingleObjectEx(sleepEvent, dwMilliseconds, false);
-}
-
-#endif