Commit 8858cf0a by Shannon Woods

Revert "Added IInspectable EGLNativeWindowType and ICoreWindow support" due to…

Revert "Added IInspectable EGLNativeWindowType and ICoreWindow support" due to build failures on Chromium FYI bots. This reverts commit 406a3be9. Change-Id: Ica2abd2e557a4fd9852d85b7fc018e3d272b6edf Reviewed-on: https://chromium-review.googlesource.com/224051Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Tested-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent 406a3be9
Debug/
Debug_Win32/
Debug_x64/
Debug_ARM/
Release/
Release_Win32/
Release_x64/
Release_ARM/
Debug
Debug_Win32
Debug_x64
Release
Release_Win32
Release_x64
*.sdf
*.ncb
*.suo
......
......@@ -8,8 +8,6 @@
{
'angle_build_tests%': '1',
'angle_build_samples%': '1',
'angle_build_winrt%': '0',
'angle_build_winphone%': '0',
# angle_code is set to 1 for the core ANGLE targets defined in src/build_angle.gyp.
# angle_code is set to 0 for test code, sample code, and third party code.
# When angle_code is 1, we build with additional warning flags on Mac and Linux.
......@@ -98,10 +96,6 @@
'Debug_Base':
{
'abstract': 1,
'defines':
[
'_DEBUG'
],
'msvs_settings':
{
'VCCLCompilerTool':
......@@ -109,15 +103,6 @@
'Optimization': '0', # /Od
'BasicRuntimeChecks': '3',
'RuntimeLibrary': '1', # /MTd (debug static)
'conditions':
[
# winrt compilation requires that this library is
# uses dynamic linked runtime
['angle_build_winrt==1',
{
'RuntimeLibrary': '3', # /MDd (debug dynamic)
}],
],
},
'VCLinkerTool':
{
......@@ -135,25 +120,12 @@
'Release_Base':
{
'abstract': 1,
'defines':
[
'NDEBUG'
],
'msvs_settings':
{
'VCCLCompilerTool':
{
'Optimization': '2', # /Os
'RuntimeLibrary': '0', # /MT (static)
'conditions':
[
# winrt compilation requires that this library is
# uses dynamic linked runtime
['angle_build_winrt==1',
{
'RuntimeLibrary': '2', # /MDd (debug dynamic)
}],
],
},
'VCLinkerTool':
{
......@@ -212,30 +184,6 @@
},
}, # x64_Base
'arm_Base':
{
'abstract': 1,
'msvs_configuration_platform': 'ARM',
'msvs_settings':
{
'VCLinkerTool':
{
'TargetMachine': '3', # ARM
'AdditionalLibraryDirectories':
[
'<(windows_sdk_path)/Lib/win8/um/arm',
],
},
'VCLibrarianTool':
{
'AdditionalLibraryDirectories':
[
'<(windows_sdk_path)/Lib/win8/um/arm',
],
},
},
}, # arm_Base
# Concrete configurations
'Debug':
{
......@@ -247,7 +195,7 @@
},
'conditions':
[
['angle_build_winrt==0 and OS == "win" and MSVS_VERSION != "2010e"',
[ 'OS == "win" and MSVS_VERSION != "2010e"',
{
'Debug_x64':
{
......@@ -258,36 +206,6 @@
'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
},
}],
['angle_build_winrt==1 and angle_build_winphone==0',
{
'Debug_x64':
{
'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
},
'Release_x64':
{
'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
},
'Debug_ARM':
{
'inherit_from': ['Common_Base', 'arm_Base', 'Debug_Base'],
},
'Release_ARM':
{
'inherit_from': ['Common_Base', 'arm_Base', 'Release_Base'],
},
}],
['angle_build_winrt==1 and angle_build_winphone==1',
{
'Debug_ARM':
{
'inherit_from': ['Common_Base', 'arm_Base', 'Debug_Base'],
},
'Release_ARM':
{
'inherit_from': ['Common_Base', 'arm_Base', 'Release_Base'],
},
}],
],
}, # configurations
}, # target_defaults
......
......@@ -7,16 +7,13 @@
{
'component%': 'static_library',
'angle_path%': '..',
'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.1',
'windows8_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
},
'msvs_disabled_warnings': [ 4100, 4127, 4239, 4244, 4245, 4251, 4512, 4702, 4530, 4718, 4267, 4264, 4447, 4075 ],
'msvs_disabled_warnings': [ 4100, 4127, 4239, 4244, 4245, 4251, 4512, 4702, 4530, 4718, 4267 ],
'msvs_system_include_dirs':
[
'<(windows_sdk_path)/Include/shared',
'<(windows_sdk_path)/Include/um',
'<(windows8_sdk_path)/Include/shared',
'<(windows8_sdk_path)/Include/um',
],
'msvs_settings':
{
......@@ -31,38 +28,21 @@
},
'VCLinkerTool':
{
'conditions':
'AdditionalDependencies':
[
['angle_build_winrt==0',
{
'AdditionalDependencies':
[
'kernel32.lib',
'gdi32.lib',
'winspool.lib',
'comdlg32.lib',
'advapi32.lib',
'shell32.lib',
'ole32.lib',
'oleaut32.lib',
'user32.lib',
'uuid.lib',
'odbc32.lib',
'odbccp32.lib',
'delayimp.lib',
],
}],
# winrt compilation is dynamic depending on the project
# type. AdditionalDependencies is automatically configured
# with the required .libs
['angle_build_winrt==1',
{
'AdditionalDependencies':
[
'%(AdditionalDependencies)',
'uuid.lib',
],
}],
'kernel32.lib',
'gdi32.lib',
'winspool.lib',
'comdlg32.lib',
'advapi32.lib',
'shell32.lib',
'ole32.lib',
'oleaut32.lib',
'user32.lib',
'uuid.lib',
'odbc32.lib',
'odbccp32.lib',
'delayimp.lib',
],
},
},
......@@ -87,6 +67,10 @@
],
},
},
'defines':
[
'_DEBUG'
],
},
'Release':
{
......@@ -96,19 +80,21 @@
{
'AdditionalLibraryDirectories':
[
'<(windows_sdk_path)/Lib/winv6.3/um/x86',
'<(windows8_sdk_path)/Lib/win8/um/x86',
'<(windows_sdk_path)/Lib/win8/um/x86',
],
},
'VCLibrarianTool':
{
'AdditionalLibraryDirectories':
[
'<(windows_sdk_path)/Lib/winv6.3/um/x86',
'<(windows8_sdk_path)/Lib/win8/um/x86',
'<(windows_sdk_path)/Lib/win8/um/x86',
],
},
},
'defines':
[
'NDEBUG'
],
},
},
'conditions':
......
......@@ -19,14 +19,11 @@ gyp_dir = os.path.join(angle_dir, 'third_party', 'gyp')
generation_dir = "projects"
gyp_generators = "msvs"
msvs_version = "2013e"
build_samples = True
build_tests = False
release_symbols = False
def generateProjects( generation_dir,
build_samples,
build_winrt,
build_winphone,
enable_d3d9 ) :
if __name__ == '__main__':
gyp_cmd = os.path.join(gyp_dir, 'gyp')
gyp_cmd += ' --ignore-environment'
gyp_cmd += ' --depth=.'
......@@ -38,9 +35,6 @@ def generateProjects( generation_dir,
gyp_cmd += ' -D angle_build_samples=' + ('1' if build_samples else '0')
gyp_cmd += ' -D release_symbols=' + ('true' if release_symbols else 'false')
gyp_cmd += ' -D angle_use_commit_id=0'
gyp_cmd += ' -D angle_build_winrt=' + ('1' if build_winrt else '0')
gyp_cmd += ' -D angle_build_winphone=' + ('1' if build_winphone else '0')
gyp_cmd += ' -D angle_enable_d3d9=' + ('1' if enable_d3d9 else '0')
gyp_cmd += ' ' + os.path.join(script_dir, 'all.gyp')
print 'Generating projects to ' + generation_dir + ' from gyp files...'
......@@ -53,12 +47,3 @@ def generateProjects( generation_dir,
print git_add_cmd
sys.stdout.flush()
os.system(git_add_cmd)
return;
if __name__ == '__main__':
# Generate Windows Desktop projects
generateProjects("projects", True, False, False, True);
# Generate Windows 8.1 projects
generateProjects("projects/winrt/windows", False, True, False, False);
......@@ -75,13 +75,7 @@
typedef HDC EGLNativeDisplayType;
typedef HBITMAP EGLNativePixmapType;
#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP /* Windows Store */
#include <inspectable.h>
typedef IInspectable* EGLNativeWindowType;
#else
typedef HWND EGLNativeWindowType;
#endif
#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
......
//
// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// angle_windowsstore.h:
#ifndef ANGLE_WINDOWSSTORE_H_
#define ANGLE_WINDOWSSTORE_H_
// The following properties can be set on the CoreApplication to support additional
// ANGLE configuration options.
//
// The Visual Studio sample templates provided with this version of ANGLE have examples
// of how to set these property values.
//
// Property: EGLNativeWindowTypeProperty
// Type: IInspectable
// Description: Set this property to specify the window type to use for creating a surface.
// If this property is missing, surface creation will fail.
//
const wchar_t EGLNativeWindowTypeProperty[] = L"EGLNativeWindowTypeProperty";
//
// Property: EGLRenderSurfaceSizeProperty
// Type: Size
// Description: Set this property to specify a preferred size in pixels of the render surface.
// The render surface size width and height must be greater than 0.
// If this property is set, then the render surface size is fixed.
// If this property is missing, a default behavior will be provided.
// The default behavior uses the window size if a CoreWindow is specified or
// the size of the SwapChainPanel control if one is specified.
//
const wchar_t EGLRenderSurfaceSizeProperty[] = L"EGLRenderSurfaceSizeProperty";
#endif // ANGLE_WINDOWSSTORE_H_
......@@ -60,19 +60,18 @@
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<TargetMachine>MachineX86</TargetMachine>
</Lib>
<Link>
<AdditionalDependencies></AdditionalDependencies>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<FixedBaseAddress>false</FixedBaseAddress>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary>
......@@ -82,7 +81,6 @@
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
......@@ -97,18 +95,17 @@
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<Link>
<AdditionalDependencies></AdditionalDependencies>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<FixedBaseAddress>false</FixedBaseAddress>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary>
......@@ -118,7 +115,6 @@
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
......@@ -132,19 +128,18 @@
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<TargetMachine>MachineX86</TargetMachine>
</Lib>
<Link>
<AdditionalDependencies></AdditionalDependencies>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<FixedBaseAddress>false</FixedBaseAddress>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary>
......@@ -154,7 +149,6 @@
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
......@@ -168,18 +162,17 @@
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<Link>
<AdditionalDependencies></AdditionalDependencies>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<FixedBaseAddress>false</FixedBaseAddress>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary>
......@@ -189,7 +182,6 @@
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
......
......@@ -60,19 +60,18 @@
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<TargetMachine>MachineX86</TargetMachine>
</Lib>
<Link>
<AdditionalDependencies></AdditionalDependencies>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<FixedBaseAddress>false</FixedBaseAddress>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary>
......@@ -82,7 +81,6 @@
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
......@@ -97,18 +95,17 @@
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<Link>
<AdditionalDependencies></AdditionalDependencies>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<FixedBaseAddress>false</FixedBaseAddress>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary>
......@@ -118,7 +115,6 @@
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
......@@ -132,19 +128,18 @@
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<TargetMachine>MachineX86</TargetMachine>
</Lib>
<Link>
<AdditionalDependencies></AdditionalDependencies>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<FixedBaseAddress>false</FixedBaseAddress>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary>
......@@ -154,7 +149,6 @@
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
......@@ -168,18 +162,17 @@
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Lib>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<Link>
<AdditionalDependencies></AdditionalDependencies>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.1/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<FixedBaseAddress>false</FixedBaseAddress>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ImportLibrary>$(OutDir)lib\$(TargetName).lib</ImportLibrary>
......@@ -189,7 +182,6 @@
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
......
......@@ -181,8 +181,11 @@
<Filter Include="src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
</Filter>
<Filter Include="src\libEGL">
<UniqueIdentifier>{D633941D-C923-DFCE-3A9B-DCF851CC7DBA}</UniqueIdentifier>
<Filter Include="src\common">
<UniqueIdentifier>{2F5FD094-EF52-77F7-7AA8-4327A01BF747}</UniqueIdentifier>
</Filter>
<Filter Include="src\common\win32">
<UniqueIdentifier>{789FEF16-EFE7-512E-F91B-DF7E0D72FB79}</UniqueIdentifier>
</Filter>
<Filter Include="src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
......@@ -253,11 +256,8 @@
<Filter Include="src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
</Filter>
<Filter Include="src\common">
<UniqueIdentifier>{2F5FD094-EF52-77F7-7AA8-4327A01BF747}</UniqueIdentifier>
</Filter>
<Filter Include="src\common\win32">
<UniqueIdentifier>{789FEF16-EFE7-512E-F91B-DF7E0D72FB79}</UniqueIdentifier>
<Filter Include="src\libEGL">
<UniqueIdentifier>{D633941D-C923-DFCE-3A9B-DCF851CC7DBA}</UniqueIdentifier>
</Filter>
<Filter Include="src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
......@@ -354,6 +354,9 @@
<ClInclude Include="..\..\src\common\version.h">
<Filter>src\common</Filter>
</ClInclude>
<ClCompile Include="..\..\src\common\win32\NativeWindow.cpp">
<Filter>src\common\win32</Filter>
</ClCompile>
<ClCompile Include="..\..\src\libEGL\Config.cpp">
<Filter>src\libEGL</Filter>
</ClCompile>
......@@ -390,9 +393,6 @@
<ClInclude Include="..\..\src\libEGL\resource.h">
<Filter>src\libEGL</Filter>
</ClInclude>
<ClCompile Include="..\..\src\common\win32\NativeWindow.cpp">
<Filter>src\common\win32</Filter>
</ClCompile>
<None Include="..\..\src\angle.gyp">
<Filter>src</Filter>
</None>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="libGLESv2">
<UniqueIdentifier>{A62A9415-2E9D-A6D2-631D-1F25A5CD626F}</UniqueIdentifier>
</Filter>
<Filter Include="libGLESv2">
<UniqueIdentifier>{A62A9415-2E9D-A6D2-631D-1F25A5CD626F}</UniqueIdentifier>
</Filter>
<Filter Include="libGLESv2">
<UniqueIdentifier>{A62A9415-2E9D-A6D2-631D-1F25A5CD626F}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\src\libGLESv2\libGLESv2.cpp">
<Filter>libGLESv2</Filter>
</ClCompile>
<None Include="..\..\..\..\src\libGLESv2\libGLESv2.def">
<Filter>libGLESv2</Filter>
</None>
<ResourceCompile Include="..\..\..\..\src\libGLESv2\libGLESv2.rc">
<Filter>libGLESv2</Filter>
</ResourceCompile>
<None Include="..\..\..\..\src\angle.gyp"/>
</ItemGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="libGLESv2">
<UniqueIdentifier>{A62A9415-2E9D-A6D2-631D-1F25A5CD626F}</UniqueIdentifier>
</Filter>
<Filter Include="libGLESv2">
<UniqueIdentifier>{A62A9415-2E9D-A6D2-631D-1F25A5CD626F}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\src\libGLESv2\libGLESv2.cpp">
<Filter>libGLESv2</Filter>
</ClCompile>
<ResourceCompile Include="..\..\..\..\src\libGLESv2\libGLESv2.rc">
<Filter>libGLESv2</Filter>
</ResourceCompile>
<None Include="..\..\..\..\src\angle.gyp"/>
</ItemGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="compiler">
<UniqueIdentifier>{041FFD28-E4BD-ABC0-5AF7-A6D1560FAC0E}</UniqueIdentifier>
</Filter>
<Filter Include="compiler\translator">
<UniqueIdentifier>{502101C2-1680-5126-1D2E-39419A1AE009}</UniqueIdentifier>
</Filter>
<Filter Include="compiler">
<UniqueIdentifier>{041FFD28-E4BD-ABC0-5AF7-A6D1560FAC0E}</UniqueIdentifier>
</Filter>
<Filter Include="compiler\translator">
<UniqueIdentifier>{502101C2-1680-5126-1D2E-39419A1AE009}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\src\compiler\translator\ShaderLang.cpp">
<Filter>compiler\translator</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\compiler\translator\ShaderVars.cpp">
<Filter>compiler\translator</Filter>
</ClCompile>
<None Include="..\..\..\..\src\angle.gyp"/>
</ItemGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="compiler">
<UniqueIdentifier>{041FFD28-E4BD-ABC0-5AF7-A6D1560FAC0E}</UniqueIdentifier>
</Filter>
<Filter Include="compiler\translator">
<UniqueIdentifier>{502101C2-1680-5126-1D2E-39419A1AE009}</UniqueIdentifier>
</Filter>
<Filter Include="compiler">
<UniqueIdentifier>{041FFD28-E4BD-ABC0-5AF7-A6D1560FAC0E}</UniqueIdentifier>
</Filter>
<Filter Include="compiler\translator">
<UniqueIdentifier>{502101C2-1680-5126-1D2E-39419A1AE009}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\src\compiler\translator\ShaderLang.cpp">
<Filter>compiler\translator</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\compiler\translator\ShaderVars.cpp">
<Filter>compiler\translator</Filter>
</ClCompile>
<None Include="..\..\..\..\src\angle.gyp"/>
</ItemGroup>
</Project>
......@@ -44,18 +44,6 @@
'files': [ 'copy_compiler_dll.bat', '<(angle_id_script_base)' ],
},
],
'conditions':
[
['angle_build_winrt==1',
{
'msvs_enable_winrt' : '1',
'type' : 'shared_library',
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
],
},
],
'conditions':
......@@ -92,18 +80,6 @@
'<(angle_gen_path)',
],
},
'conditions':
[
['angle_build_winrt==1',
{
'msvs_enable_winrt' : '1',
'type' : 'shared_library',
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
],
}
]
},
......@@ -128,18 +104,6 @@
'<(angle_gen_path)',
],
},
'conditions':
[
['angle_build_winrt==1',
{
'msvs_enable_winrt' : '1',
'type' : 'shared_library',
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
],
}
]
}],
......@@ -152,38 +116,23 @@
'type': 'none',
'dependencies': [ 'copy_scripts', ],
'includes': [ '../build/common_defines.gypi', ],
'conditions':
'actions':
[
['angle_build_winrt==0',
{
'actions':
'action_name': 'copy_dll',
'message': 'Copying D3D Compiler DLL...',
'msvs_cygwin_shell': 0,
'inputs': [ 'copy_compiler_dll.bat' ],
'outputs': [ '<(PRODUCT_DIR)/d3dcompiler_46.dll' ],
'action':
[
{
'action_name': 'copy_dll',
'message': 'Copying D3D Compiler DLL...',
'msvs_cygwin_shell': 0,
'inputs': [ 'copy_compiler_dll.bat' ],
'outputs': [ '<(PRODUCT_DIR)/d3dcompiler_46.dll' ],
'action':
[
"<(angle_gen_path)/copy_compiler_dll.bat",
"$(PlatformName)",
"<(windows8_sdk_path)",
"<(PRODUCT_DIR)"
],
},
], #actions
}],
['angle_build_winrt==1',
{
'msvs_enable_winrt' : '1',
'type' : 'shared_library',
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
]
"<(angle_gen_path)/copy_compiler_dll.bat",
"$(PlatformName)",
"<(windows_sdk_path)",
"<(PRODUCT_DIR)"
],
},
], #actions
},
], # targets
}],
......
......@@ -20,35 +20,22 @@
// types. The HWND NativeWindow implementation requires IDXGISwapChain
// and IDXGIFactory and the Windows Store NativeWindow
// implementation requires IDXGISwapChain1 and IDXGIFactory2.
#if defined(ANGLE_ENABLE_WINDOWS_STORE)
typedef IDXGISwapChain1 DXGISwapChain;
typedef IDXGIFactory2 DXGIFactory;
#include <wrl.h>
#include <wrl/wrappers/corewrappers.h>
#include <windows.applicationmodel.core.h>
#include <memory>
class IInspectableNativeWindow;
using namespace Microsoft::WRL;
using namespace Microsoft::WRL::Wrappers;
#else
typedef IDXGISwapChain DXGISwapChain;
typedef IDXGIFactory DXGIFactory;
#endif
namespace rx
{
class NativeWindow
{
public:
public:
explicit NativeWindow(EGLNativeWindowType window);
bool initialize();
bool getClientRect(LPRECT rect);
bool isIconic();
// 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; }
HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
DXGI_FORMAT format, UINT width, UINT height,
......@@ -56,13 +43,8 @@ public:
inline EGLNativeWindowType getNativeWindow() const { return mWindow; }
private:
private:
EGLNativeWindowType mWindow;
#if defined(ANGLE_ENABLE_WINDOWS_STORE)
std::shared_ptr<IInspectableNativeWindow> mImpl;
#endif
};
}
......
......@@ -109,7 +109,7 @@ inline unsigned int unorm(float x)
inline bool supportsSSE2()
{
#if ANGLE_PLATFORM_WINDOWS && !defined(_M_ARM)
#ifdef ANGLE_PLATFORM_WINDOWS
static bool checked = false;
static bool supports = false;
......
......@@ -34,9 +34,6 @@
#endif
#ifdef ANGLE_PLATFORM_WINDOWS
# if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP
# define ANGLE_ENABLE_WINDOWS_STORE 1
# endif
# ifndef STRICT
# define STRICT 1
# endif
......@@ -63,11 +60,6 @@
# include <d3dcompiler.h>
# endif
# if defined(ANGLE_ENABLE_WINDOWS_STORE)
# undef ANGLE_ENABLE_PERF
# include <dxgi1_3.h>
# endif
# undef near
# undef far
#endif
......
......@@ -10,50 +10,12 @@
#include <assert.h>
#ifdef ANGLE_ENABLE_WINDOWS_STORE
#include <vector>
#include <set>
#include <map>
#include <mutex>
#include <wrl/client.h>
#include <wrl/async.h>
#include <Windows.System.Threading.h>
using namespace std;
using namespace Windows::Foundation;
using namespace ABI::Windows::System::Threading;
// Thread local storage for Windows Store support
typedef vector<void*> ThreadLocalData;
static __declspec(thread) ThreadLocalData* currentThreadData = nullptr;
static set<ThreadLocalData*> allThreadData;
static DWORD nextTlsIndex = 0;
static vector<DWORD> freeTlsIndices;
#endif
TLSIndex CreateTLSIndex()
{
TLSIndex index;
#ifdef ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_ENABLE_WINDOWS_STORE
if (!freeTlsIndices.empty())
{
DWORD result = freeTlsIndices.back();
freeTlsIndices.pop_back();
index = result;
}
else
{
index = nextTlsIndex++;
}
#else
index = TlsAlloc();
#endif
#elif defined(ANGLE_PLATFORM_POSIX)
// Create global pool key
if ((pthread_key_create(&index, NULL)) != 0)
......@@ -75,22 +37,7 @@ bool DestroyTLSIndex(TLSIndex index)
}
#ifdef ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_ENABLE_WINDOWS_STORE
assert(index < nextTlsIndex);
assert(find(freeTlsIndices.begin(), freeTlsIndices.end(), index) == freeTlsIndices.end());
freeTlsIndices.push_back(index);
for (auto threadData : allThreadData)
{
if (threadData->size() > index)
{
threadData->at(index) = nullptr;
}
}
return true;
#else
return (TlsFree(index) == TRUE);
#endif
#elif defined(ANGLE_PLATFORM_POSIX)
return (pthread_key_delete(index) == 0);
#endif
......@@ -105,24 +52,7 @@ bool SetTLSValue(TLSIndex index, void *value)
}
#ifdef ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_ENABLE_WINDOWS_STORE
ThreadLocalData* threadData = currentThreadData;
if (!threadData)
{
threadData = new ThreadLocalData(index + 1, nullptr);
allThreadData.insert(threadData);
currentThreadData = threadData;
}
else if (threadData->size() <= index)
{
threadData->resize(index + 1, nullptr);
}
threadData->at(index) = value;
return true;
#else
return (TlsSetValue(index, value) == TRUE);
#endif
#elif defined(ANGLE_PLATFORM_POSIX)
return (pthread_setspecific(index, value) == 0);
#endif
......@@ -137,19 +67,7 @@ void *GetTLSValue(TLSIndex index)
}
#ifdef ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_ENABLE_WINDOWS_STORE
ThreadLocalData* threadData = currentThreadData;
if (threadData && threadData->size() > index)
{
return threadData->at(index);
}
else
{
return nullptr;
}
#else
return TlsGetValue(index);
#endif
#elif defined(ANGLE_PLATFORM_POSIX)
return pthread_getspecific(index);
#endif
......
......@@ -12,14 +12,6 @@
#include "common/platform.h"
#ifdef ANGLE_PLATFORM_WINDOWS
// TLS does not exist for Windows Store and needs to be emulated
# ifdef ANGLE_ENABLE_WINDOWS_STORE
# define TLS_OUT_OF_INDEXES -1
# ifndef CREATE_SUSPENDED
# define CREATE_SUSPENDED 0x00000004
# endif
# endif
typedef DWORD TLSIndex;
# define TLS_INVALID_INDEX (TLS_OUT_OF_INDEXES)
#elif defined(ANGLE_PLATFORM_POSIX)
......
......@@ -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 @@ int VariableSortOrder(GLenum type)
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 @@ void writeFile(const char* path, const void* content, size_t size)
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
......@@ -49,8 +49,4 @@ template <typename outT> outT uiround(GLfloat value) { return static_cast<outT>(
std::string getTempPath();
void writeFile(const char* path, const void* data, size_t size);
#if defined(ANGLE_ENABLE_WINDOWS_STORE)
void Sleep(_In_ unsigned long dwMilliseconds);
#endif
#endif // LIBGLESV2_UTILITIES_H
......@@ -20,21 +20,6 @@ NativeWindow::NativeWindow(EGLNativeWindowType window) : mWindow(window)
{
}
bool NativeWindow::initialize()
{
return true;
}
bool NativeWindow::getClientRect(LPRECT rect)
{
return GetClientRect(mWindow, rect) == TRUE;
}
bool NativeWindow::isIconic()
{
return IsIconic(mWindow) == TRUE;
}
HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory,
DXGI_FORMAT format, unsigned int width, unsigned int height,
DXGISwapChain** swapChain)
......
//
// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CoreWindowNativeWindow.cpp: NativeWindow for managing ICoreWindow native window types.
#include <windows.graphics.display.h>
#include "common/winrt/CoreWindowNativeWindow.h"
using namespace ABI::Windows::Foundation::Collections;
CoreWindowNativeWindow::~CoreWindowNativeWindow()
{
unregisterForSizeChangeEvents();
}
bool CoreWindowNativeWindow::initialize(EGLNativeWindowType window, IPropertySet *propertySet)
{
ComPtr<IPropertySet> props = propertySet;
ComPtr<IInspectable> win = window;
SIZE swapChainSize = {};
bool swapChainSizeSpecified = false;
HRESULT result = S_OK;
// IPropertySet is an optional parameter and can null.
// If one is specified, cache as an IMap and read the properties
// used for initial host initialization.
if (propertySet)
{
result = props.As(&mPropertyMap);
if (SUCCEEDED(result))
{
// The EGLRenderSurfaceSizeProperty is optional and may be missing. The IPropertySet
// was prevalidated to contain the EGLNativeWindowType before being passed to
// this host.
result = getOptionalSizePropertyValue(mPropertyMap, EGLRenderSurfaceSizeProperty, &swapChainSize, &swapChainSizeSpecified);
}
}
if (SUCCEEDED(result))
{
result = win.As(&mCoreWindow);
}
if (SUCCEEDED(result))
{
// If a swapchain size is specfied, then the automatic resize
// behaviors implemented by the host should be disabled. The swapchain
// will be still be scaled when being rendered to fit the bounds
// of the host.
// Scaling of the swapchain output occurs automatically because if
// the scaling mode setting DXGI_SCALING_STRETCH on the swapchain.
if (swapChainSizeSpecified)
{
mClientRect = { 0, 0, swapChainSize.cx, swapChainSize.cy };
mSupportsSwapChainResize = false;
}
else
{
result = getCoreWindowSizeInPixels(mCoreWindow, &mClientRect);
}
}
if (SUCCEEDED(result))
{
mNewClientRect = mClientRect;
mClientRectChanged = false;
return registerForSizeChangeEvents();
}
return false;
}
bool CoreWindowNativeWindow::registerForSizeChangeEvents()
{
ComPtr<IWindowSizeChangedEventHandler> sizeChangedHandler;
HRESULT result = Microsoft::WRL::MakeAndInitialize<CoreWindowSizeChangedHandler>(sizeChangedHandler.ReleaseAndGetAddressOf(), this->shared_from_this());
if (SUCCEEDED(result))
{
result = mCoreWindow->add_SizeChanged(sizeChangedHandler.Get(), &mSizeChangedEventToken);
}
if (SUCCEEDED(result))
{
return true;
}
return false;
}
void CoreWindowNativeWindow::unregisterForSizeChangeEvents()
{
if (mCoreWindow)
{
(void)mCoreWindow->remove_SizeChanged(mSizeChangedEventToken);
}
mSizeChangedEventToken.value = 0;
}
HRESULT CoreWindowNativeWindow::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;
}
DXGI_SWAP_CHAIN_DESC1 swapChainDesc = { 0 };
swapChainDesc.Width = width;
swapChainDesc.Height = height;
swapChainDesc.Format = format;
swapChainDesc.Stereo = FALSE;
swapChainDesc.SampleDesc.Count = 1;
swapChainDesc.SampleDesc.Quality = 0;
swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_BACK_BUFFER;
swapChainDesc.BufferCount = 2;
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
*swapChain = nullptr;
ComPtr<IDXGISwapChain1> newSwapChain;
HRESULT result = factory->CreateSwapChainForCoreWindow(device, mCoreWindow.Get(), &swapChainDesc, nullptr, newSwapChain.ReleaseAndGetAddressOf());
if (SUCCEEDED(result))
{
#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
// Test if swapchain supports resize. On Windows Phone devices, this will return DXGI_ERROR_UNSUPPORTED. On
// other devices DXGI_ERROR_INVALID_CALL should be returned because the combination of flags passed
// (DXGI_SWAP_CHAIN_FLAG_NONPREROTATED | DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE) are invalid flag combinations.
if (newSwapChain->ResizeBuffers(swapChainDesc.BufferCount, swapChainDesc.Width, swapChainDesc.Height, swapChainDesc.Format, DXGI_SWAP_CHAIN_FLAG_NONPREROTATED | DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE) == DXGI_ERROR_UNSUPPORTED)
{
mSupportsSwapChainResize = false;
}
#endif // (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
result = newSwapChain.CopyTo(swapChain);
}
if (SUCCEEDED(result))
{
// If automatic swapchain resize behaviors have been disabled, then
// unregister for the resize change events.
if (mSupportsSwapChainResize == false)
{
unregisterForSizeChangeEvents();
}
}
return result;
}
HRESULT getCoreWindowSizeInPixels(const ComPtr<ABI::Windows::UI::Core::ICoreWindow>& coreWindow, RECT *windowSize)
{
ABI::Windows::Foundation::Rect bounds;
HRESULT result = coreWindow->get_Bounds(&bounds);
if (SUCCEEDED(result))
{
*windowSize = { 0, 0, ConvertDipsToPixels(bounds.Width), ConvertDipsToPixels(bounds.Height) };
}
return result;
}
static float GetLogicalDpi()
{
ComPtr<ABI::Windows::Graphics::Display::IDisplayPropertiesStatics> displayProperties;
float dpi = 96.0f;
if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(), displayProperties.GetAddressOf())))
{
if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi)))
{
return dpi;
}
}
return dpi;
}
long ConvertDipsToPixels(float dips)
{
static const float dipsPerInch = 96.0f;
return lround((dips * GetLogicalDpi() / dipsPerInch));
}
\ No newline at end of file
//
// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CoreWindowNativeWindow.h: NativeWindow for managing ICoreWindow native window types.
#ifndef COMMON_COREWINDOWNATIVEWINDOW_H_
#define COMMON_COREWINDOWNATIVEWINDOW_H_
#include "common/winrt/IInspectableNativeWindow.h"
#include <memory>
typedef ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CUI__CCore__CCoreWindow_Windows__CUI__CCore__CWindowSizeChangedEventArgs_t IWindowSizeChangedEventHandler;
long ConvertDipsToPixels(float dips);
class CoreWindowNativeWindow : public IInspectableNativeWindow, public std::enable_shared_from_this<CoreWindowNativeWindow>
{
public:
~CoreWindowNativeWindow();
bool initialize(EGLNativeWindowType window, IPropertySet *propertySet);
bool registerForSizeChangeEvents();
void unregisterForSizeChangeEvents();
HRESULT createSwapChain(ID3D11Device *device, DXGIFactory *factory, DXGI_FORMAT format, unsigned int width, unsigned int height, DXGISwapChain **swapChain);
private:
ComPtr<ABI::Windows::UI::Core::ICoreWindow> mCoreWindow;
ComPtr<IMap<HSTRING, IInspectable*>> mPropertyMap;
};
[uuid(7F924F66-EBAE-40E5-A10B-B8F35E245190)]
class CoreWindowSizeChangedHandler :
public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, IWindowSizeChangedEventHandler>
{
public:
CoreWindowSizeChangedHandler() { }
HRESULT RuntimeClassInitialize(std::shared_ptr<IInspectableNativeWindow> host)
{
if (!host)
{
return E_INVALIDARG;
}
mHost = host;
return S_OK;
}
// IWindowSizeChangedEventHandler
IFACEMETHOD(Invoke)(ABI::Windows::UI::Core::ICoreWindow *sender, ABI::Windows::UI::Core::IWindowSizeChangedEventArgs *e)
{
std::shared_ptr<IInspectableNativeWindow> host = mHost.lock();
if (host)
{
ABI::Windows::Foundation::Size windowSize;
if (SUCCEEDED(e->get_Size(&windowSize)))
{
SIZE windowSizeInPixels = { ConvertDipsToPixels(windowSize.Width), ConvertDipsToPixels(windowSize.Height) };
host->setNewClientSize(windowSizeInPixels);
}
}
return S_OK;
}
private:
std::weak_ptr<IInspectableNativeWindow> mHost;
};
HRESULT getCoreWindowSizeInPixels(const ComPtr<ABI::Windows::UI::Core::ICoreWindow>& coreWindow, RECT *windowSize);
#endif // COMMON_COREWINDOWNATIVEWINDOW_H_
//
// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// iinspectablehost.cpp: NativeWindow base class for managing IInspectable native window types.
#include "common/winrt/CoreWindowNativeWindow.h"
namespace rx
{
NativeWindow::NativeWindow(EGLNativeWindowType window)
{
mWindow = window;
}
bool NativeWindow::initialize()
{
// If the native window type is a IPropertySet, extract the
// EGLNativeWindowType (IInspectable) and initialize the
// proper host with this IPropertySet.
ComPtr<ABI::Windows::Foundation::Collections::IPropertySet> propertySet;
ComPtr<IInspectable> eglNativeWindow;
if (isEGLConfiguredPropertySet(mWindow, &propertySet, &eglNativeWindow))
{
// A property set was found and the EGLNativeWindowType was
// retrieved. The mWindow member of the host to must be updated
// to use the EGLNativeWindowType specified in the property set.
// mWindow is treated as a raw pointer not an AddRef'd interface, so
// the old mWindow does not need a Release() before this assignment.
mWindow = eglNativeWindow.Get();
}
// If the native window is a ICoreWindow, initialize a CoreWindowNativeWindow
ComPtr<ABI::Windows::UI::Core::ICoreWindow> coreWindow;
if (isCoreWindow(mWindow, &coreWindow))
{
mImpl = std::make_shared<CoreWindowNativeWindow>();
if (mImpl)
{
return mImpl->initialize(mWindow, propertySet.Get());
}
}
else
{
ERR("Invalid IInspectable EGLNativeWindowType detected. Valid IInspectables include ICoreWindow and IPropertySet");
}
return false;
}
bool NativeWindow::getClientRect(RECT *rect)
{
if (mImpl)
{
return mImpl->getClientRect(rect);
}
return false;
}
bool NativeWindow::isIconic()
{
return false;
}
HRESULT NativeWindow::createSwapChain(ID3D11Device *device, DXGIFactory *factory, DXGI_FORMAT format, unsigned int width, unsigned int height, DXGISwapChain **swapChain)
{
if (mImpl)
{
return mImpl->createSwapChain(device, factory, format, width, height, swapChain);
}
return E_UNEXPECTED;
}
}
bool isCoreWindow(EGLNativeWindowType window, ComPtr<ABI::Windows::UI::Core::ICoreWindow> *coreWindow)
{
if (!window)
{
return false;
}
ComPtr<IInspectable> win = window;
ComPtr<ABI::Windows::UI::Core::ICoreWindow> coreWin;
if (SUCCEEDED(win.As(&coreWin)))
{
if (coreWindow != nullptr)
{
*coreWindow = coreWin.Detach();
}
return true;
}
return false;
}
bool isEGLConfiguredPropertySet(EGLNativeWindowType window, ABI::Windows::Foundation::Collections::IPropertySet **propertySet, IInspectable **eglNativeWindow)
{
if (!window)
{
return false;
}
ComPtr<IInspectable> props = window;
ComPtr<IPropertySet> propSet;
ComPtr<IInspectable> nativeWindow;
ComPtr<ABI::Windows::Foundation::Collections::IMap<HSTRING, IInspectable*>> propMap;
boolean hasEglNativeWindowPropertyKey = false;
HRESULT result = props.As(&propSet);
if (SUCCEEDED(result))
{
result = propSet.As(&propMap);
}
// Look for the presence of the EGLNativeWindowType in the property set
if (SUCCEEDED(result))
{
result = propMap->HasKey(HStringReference(EGLNativeWindowTypeProperty).Get(), &hasEglNativeWindowPropertyKey);
}
// If the IPropertySet does not contain the required EglNativeWindowType key, the property set is
// considered invalid.
if (SUCCEEDED(result) && !hasEglNativeWindowPropertyKey)
{
ERR("Could not find EGLNativeWindowTypeProperty in IPropertySet. Valid EGLNativeWindowTypeProperty values include ICoreWindow");
return false;
}
// The EglNativeWindowType property exists, so retreive the IInspectable that represents the EGLNativeWindowType
if (SUCCEEDED(result) && hasEglNativeWindowPropertyKey)
{
result = propMap->Lookup(HStringReference(EGLNativeWindowTypeProperty).Get(), &nativeWindow);
}
if (SUCCEEDED(result))
{
if (propertySet != nullptr)
{
result = propSet.CopyTo(propertySet);
}
}
if (SUCCEEDED(result))
{
if (eglNativeWindow != nullptr)
{
result = nativeWindow.CopyTo(eglNativeWindow);
}
}
if (SUCCEEDED(result))
{
return true;
}
return false;
}
// A Valid EGLNativeWindowType IInspectable can only be:
//
// ICoreWindow
// IPropertySet
//
// Anything else will be rejected as an invalid IInspectable.
bool isValidEGLNativeWindowType(EGLNativeWindowType window)
{
return isCoreWindow(window) || isEGLConfiguredPropertySet(window);
}
// Attempts to read an optional SIZE property value that is assumed to be in the form of
// an ABI::Windows::Foundation::Size. This function validates the Size value before returning
// it to the caller.
//
// Possible return values are:
// S_OK, valueExists == true - optional SIZE value was successfully retrieved and validated
// S_OK, valueExists == false - optional SIZE value was not found
// E_INVALIDARG, valueExists = false - optional SIZE value was malformed in the property set.
// * Incorrect property type ( must be PropertyType_Size)
// * Invalid property value (width/height must be > 0)
// Additional errors may be returned from IMap or IPropertyValue
//
HRESULT getOptionalSizePropertyValue(const ComPtr<ABI::Windows::Foundation::Collections::IMap<HSTRING, IInspectable*>>& propertyMap, const wchar_t *propertyName, SIZE *value, bool *valueExists)
{
if (!propertyMap || !propertyName || !value || !valueExists)
{
return false;
}
// Assume that the value does not exist
*valueExists = false;
*value = { 0, 0 };
ComPtr<ABI::Windows::Foundation::IPropertyValue> propertyValue;
ABI::Windows::Foundation::PropertyType propertyType = ABI::Windows::Foundation::PropertyType::PropertyType_Empty;
Size sizeValue = { 0, 0 };
boolean hasKey = false;
HRESULT result = propertyMap->HasKey(HStringReference(propertyName).Get(), &hasKey);
if (SUCCEEDED(result) && !hasKey)
{
// Value does not exist, so return S_OK and set the exists parameter to false to indicate
// that a the optional property does not exist.
*valueExists = false;
return S_OK;
}
if (SUCCEEDED(result))
{
result = propertyMap->Lookup(HStringReference(propertyName).Get(), &propertyValue);
}
if (SUCCEEDED(result))
{
result = propertyValue->get_Type(&propertyType);
}
// Check if the expected Size property is of PropertyType_Size type.
if (SUCCEEDED(result) && propertyType == ABI::Windows::Foundation::PropertyType::PropertyType_Size)
{
if (SUCCEEDED(propertyValue->GetSize(&sizeValue)) && (sizeValue.Width > 0 && sizeValue.Height > 0))
{
// A valid property value exists
*value = { static_cast<long>(sizeValue.Width), static_cast<long>(sizeValue.Height) };
*valueExists = true;
result = S_OK;
}
else
{
// An invalid Size property was detected. Width/Height values must > 0
result = E_INVALIDARG;
}
}
else
{
// An invalid property type was detected. Size property must be of PropertyType_Size
result = E_INVALIDARG;
}
return result;
}
\ No newline at end of file
//
// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// IInspectableNativeWindow.h: Host specific implementation interface for
// managing IInspectable native window types.
#ifndef COMMON_IINSPECTABLENATIVEWINDOW_H_
#define COMMON_IINSPECTABLENATIVEWINDOW_H_
#include "common/platform.h"
#include "common/NativeWindow.h"
#include "angle_windowsstore.h"
#include <windows.ui.xaml.h>
#include <windows.ui.xaml.media.dxinterop.h>
using namespace Microsoft::WRL;
using namespace Microsoft::WRL::Wrappers;
using namespace ABI::Windows::Foundation;
using namespace ABI::Windows::Foundation::Collections;
class IInspectableNativeWindow
{
public:
virtual bool initialize(EGLNativeWindowType window, IPropertySet *propertySet) = 0;
virtual HRESULT createSwapChain(ID3D11Device *device, DXGIFactory *factory, DXGI_FORMAT format, unsigned int width, unsigned int height, DXGISwapChain **swapChain) = 0;
virtual bool registerForSizeChangeEvents() = 0;
virtual void unregisterForSizeChangeEvents() = 0;
virtual HRESULT scaleSwapChain(const SIZE& newSize) { return S_OK; }
IInspectableNativeWindow() :
mSupportsSwapChainResize(true),
mRequiresSwapChainScaling(false),
mClientRectChanged(false),
mClientRect({0,0,0,0}),
mNewClientRect({0,0,0,0})
{
mSizeChangedEventToken.value = 0;
}
virtual ~IInspectableNativeWindow(){}
bool getClientRect(RECT *rect)
{
if (mClientRectChanged && mSupportsSwapChainResize)
{
mClientRect = mNewClientRect;
}
*rect = mClientRect;
return true;
}
void setNewClientSize(const SIZE &newSize)
{
if (mSupportsSwapChainResize && !mRequiresSwapChainScaling)
{
mNewClientRect = { 0, 0, newSize.cx, newSize.cy };
mClientRectChanged = true;
}
if (mRequiresSwapChainScaling)
{
scaleSwapChain(newSize);
}
}
protected:
bool mSupportsSwapChainResize;
bool mRequiresSwapChainScaling;
RECT mClientRect;
RECT mNewClientRect;
bool mClientRectChanged;
EventRegistrationToken mSizeChangedEventToken;
};
bool isCoreWindow(EGLNativeWindowType window, ComPtr<ABI::Windows::UI::Core::ICoreWindow> *coreWindow = nullptr);
bool isEGLConfiguredPropertySet(EGLNativeWindowType window, ABI::Windows::Foundation::Collections::IPropertySet **propertySet = nullptr, IInspectable **inspectable = nullptr);
HRESULT getOptionalSizePropertyValue(const ComPtr<ABI::Windows::Foundation::Collections::IMap<HSTRING, IInspectable*>>& propertyMap, const wchar_t *propertyName, SIZE *value, bool *valueExists);
#endif // COMMON_IINSPECTABLENATIVEWINDOW_H_
......@@ -205,17 +205,6 @@
'type': 'static_library',
'includes': [ '../build/common_defines.gypi', ],
'sources': [ '<@(angle_preprocessor_sources)', ],
'conditions':
[
['angle_build_winrt==1',
{
'msvs_enable_winrt' : '1',
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
],
},
{
'target_name': 'translator_lib',
......@@ -244,17 +233,6 @@
'AdditionalOptions': ['/ignore:4221']
},
},
'conditions':
[
['angle_build_winrt==1',
{
'msvs_enable_winrt' : '1',
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
],
},
{
......@@ -276,17 +254,6 @@
'compiler/translator/ShaderLang.cpp',
'compiler/translator/ShaderVars.cpp'
],
'conditions':
[
['angle_build_winrt==1',
{
'msvs_enable_winrt' : '1',
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
],
},
{
......@@ -315,17 +282,6 @@
'compiler/translator/ShaderLang.cpp',
'compiler/translator/ShaderVars.cpp'
],
'conditions':
[
['angle_build_winrt==1',
{
'msvs_enable_winrt' : '1',
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
],
},
],
}
......@@ -38,6 +38,7 @@
'common/utilities.cpp',
'common/utilities.h',
'common/version.h',
'common/win32/NativeWindow.cpp',
'libEGL/Config.cpp',
'libEGL/Config.h',
'libEGL/Display.cpp',
......@@ -51,17 +52,6 @@
'libEGL/main.h',
'libEGL/resource.h',
],
'angle_libegl_win32_sources':
[
'common/win32/NativeWindow.cpp',
],
'angle_libegl_winrt_sources':
[
'common/winrt/CoreWindowNativeWindow.cpp',
'common/winrt/CoreWindowNativeWindow.h',
'common/winrt/IInspectableNativeWindow.cpp',
'common/winrt/IInspectableNativeWindow.h',
],
},
# Everything below this is duplicated in the GN build. If you change
# anything also change angle/BUILD.gn
......@@ -107,54 +97,15 @@
'ANGLE_ENABLE_D3D11',
],
}],
['angle_build_winrt==0',
{
'sources':
[
'<@(angle_libegl_win32_sources)',
],
}],
['angle_build_winrt==1',
{
'defines':
[
'NTDDI_VERSION=NTDDI_WINBLUE',
],
'sources':
[
'<@(angle_libegl_winrt_sources)',
],
'msvs_enable_winrt' : '1',
'msvs_requires_importlibrary' : '1',
'msvs_settings':
{
'VCLinkerTool':
{
'EnableCOMDATFolding': '1',
'OptimizeReferences': '1',
}
},
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
],
'includes': [ '../build/common_defines.gypi', ],
'msvs_settings':
{
'VCLinkerTool':
{
'conditions':
'AdditionalDependencies':
[
['angle_build_winrt==0',
{
'AdditionalDependencies':
[
'd3d9.lib',
],
}],
'd3d9.lib',
],
},
},
......
......@@ -239,7 +239,7 @@ EGLNativeWindowType Surface::getWindowHandle()
return mNativeWindow.getNativeWindow();
}
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
#define kSurfaceProperty _TEXT("Egl::SurfaceOwner")
#define kParentWndProc _TEXT("Egl::SurfaceParentWndProc")
......@@ -256,11 +256,9 @@ static LRESULT CALLBACK SurfaceWindowProc(HWND hwnd, UINT message, WPARAM wparam
WNDPROC prevWndFunc = reinterpret_cast<WNDPROC >(GetProp(hwnd, kParentWndProc));
return CallWindowProc(prevWndFunc, hwnd, message, wparam, lparam);
}
#endif
void Surface::subclassWindow()
{
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
HWND window = mNativeWindow.getNativeWindow();
if (!window)
{
......@@ -285,7 +283,6 @@ void Surface::subclassWindow()
SetProp(window, kSurfaceProperty, reinterpret_cast<HANDLE>(this));
SetProp(window, kParentWndProc, reinterpret_cast<HANDLE>(oldWndProc));
mWindowSubclassed = true;
#endif
}
void Surface::unsubclassWindow()
......@@ -295,7 +292,6 @@ void Surface::unsubclassWindow()
return;
}
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
HWND window = mNativeWindow.getNativeWindow();
if (!window)
{
......@@ -319,7 +315,6 @@ void Surface::unsubclassWindow()
RemoveProp(window, kSurfaceProperty);
RemoveProp(window, kParentWndProc);
#endif
mWindowSubclassed = false;
}
......
......@@ -120,13 +120,11 @@ EGLDisplay __stdcall eglGetPlatformDisplayEXT(EGLenum platform, void *native_dis
EGLNativeDisplayType displayId = static_cast<EGLNativeDisplayType>(native_display);
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
// Validate the display device context
if (WindowFromDC(displayId) == NULL)
{
return egl::success(EGL_NO_DISPLAY);
}
#endif
EGLint requestedDisplayType = EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE;
if (attrib_list)
......
......@@ -143,13 +143,6 @@
# TODO(kbr): port NativeWindow to other EGL platforms.
'common/win32/NativeWindow.cpp',
],
'angle_libangle_winrt_sources':
[
'common/winrt/CoreWindowNativeWindow.cpp',
'common/winrt/CoreWindowNativeWindow.h',
'common/winrt/IInspectableNativeWindow.cpp',
'common/winrt/IInspectableNativeWindow.h',
],
'angle_d3d_shared_sources':
[
'libGLESv2/renderer/d3d/BufferD3D.cpp',
......@@ -406,30 +399,15 @@
{
'VCLinkerTool':
{
'conditions':
'AdditionalDependencies':
[
['angle_build_winrt==0',
{
'AdditionalDependencies':
[
'dxguid.lib',
],
}],
['angle_build_winrt==1',
{
'AdditionalDependencies':
[
'dxguid.lib',
'd3d11.lib',
'd3dcompiler.lib',
],
}],
],
'dxguid.lib',
]
}
},
},
}],
['angle_build_winrt==0',
['OS=="win"',
{
'sources':
[
......@@ -439,119 +417,55 @@
[
'copy_compiler_dll'
],
}],
['angle_build_winrt==1',
{
'sources':
[
'<@(angle_libangle_winrt_sources)',
],
'defines':
[
'NTDDI_VERSION=NTDDI_WINBLUE',
],
'msvs_enable_winrt' : '1',
'msvs_requires_importlibrary' : 'true',
'msvs_settings':
'configurations':
{
'VCLinkerTool':
'Debug':
{
'EnableCOMDATFolding': '1',
'OptimizeReferences': '1',
}
'defines':
[
'ANGLE_ENABLE_PERF',
'ANGLE_GENERATE_SHADER_DEBUG_INFO'
],
'msvs_settings':
{
'VCLinkerTool':
{
'AdditionalDependencies':
[
'd3d9.lib',
]
}
},
},
},
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
],
'configurations':
{
'Debug':
{
'defines':
[
'ANGLE_ENABLE_PERF',
'ANGLE_GENERATE_SHADER_DEBUG_INFO'
],
'msvs_settings':
{
'VCLinkerTool':
{
'AdditionalDependencies':
[
'd3d9.lib',
]
}
},
},
},
},
{
'target_name': 'libGLESv2',
'type': 'shared_library',
'dependencies': [ 'libANGLE' ],
'includes': [ '../build/common_defines.gypi', ],
'sources':
[
'libGLESv2/libGLESv2.cpp',
'libGLESv2/libGLESv2.def',
'libGLESv2/libGLESv2.rc',
],
'conditions':
[
['angle_build_winrt==1',
{
'msvs_enable_winrt' : '1',
'msvs_requires_importlibrary' : 'true',
'msvs_settings':
{
'VCLinkerTool':
{
'EnableCOMDATFolding': '1',
'OptimizeReferences': '1',
}
},
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
],
},
{
'target_name': 'libGLESv2_static',
'type': 'static_library',
# make sure we depend on commit_id as a hard dependency, otherwise
# we will try to build the static_lib in parallel
'dependencies': [ 'libANGLE', 'commit_id' ],
'includes': [ '../build/common_defines.gypi', ],
'sources':
[
'libGLESv2/libGLESv2.cpp',
'libGLESv2/libGLESv2.rc',
],
'conditions':
[
['angle_build_winrt==1',
{
'msvs_enable_winrt' : '1',
'msvs_requires_importlibrary' : 'true',
'msvs_settings':
{
'VCLinkerTool':
{
'EnableCOMDATFolding': '1',
'OptimizeReferences': '1',
}
{
'target_name': 'libGLESv2',
'type': 'shared_library',
'dependencies': [ 'libANGLE' ],
'includes': [ '../build/common_defines.gypi', ],
'sources':
[
'libGLESv2/libGLESv2.cpp',
'libGLESv2/libGLESv2.def',
'libGLESv2/libGLESv2.rc',
],
},
}],
['angle_build_winphone==1',
{
'msvs_enable_winphone' : '1',
}],
],
},
],
{
'target_name': 'libGLESv2_static',
'type': 'static_library',
# make sure we depend on commit_id as a hard dependency, otherwise
# we will try to build the static_lib in parallel
'dependencies': [ 'libANGLE', 'commit_id' ],
'includes': [ '../build/common_defines.gypi', ],
'sources':
[
'libGLESv2/libGLESv2.cpp',
'libGLESv2/libGLESv2.rc',
],
},
],
}
......@@ -11,7 +11,6 @@
#include "libGLESv2/renderer/FenceImpl.h"
#include "libGLESv2/renderer/Renderer.h"
#include "libGLESv2/main.h"
#include "common/utilities.h"
#include "angle_gl.h"
......
......@@ -42,7 +42,6 @@ HLSLCompiler::~HLSLCompiler()
bool HLSLCompiler::initialize()
{
TRACE_EVENT0("gpu", "initializeCompiler");
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
#if defined(ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES)
// Find a D3DCompiler module that had already been loaded based on a predefined list of versions.
static const char *d3dCompilerNames[] = ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES;
......@@ -70,12 +69,6 @@ bool HLSLCompiler::initialize()
mD3DCompileFunc = reinterpret_cast<pD3DCompile>(GetProcAddress(mD3DCompilerModule, "D3DCompile"));
ASSERT(mD3DCompileFunc);
#else
// D3D Shader compiler is linked already into this module, so the export
// can be directly assigned.
mD3DCompilerModule = NULL;
mD3DCompileFunc = reinterpret_cast<pD3DCompile>(D3DCompile);
#endif
mD3DDisassembleFunc = reinterpret_cast<pD3DDisassemble>(GetProcAddress(mD3DCompilerModule, "D3DDisassemble"));
ASSERT(mD3DDisassembleFunc);
......@@ -98,10 +91,7 @@ gl::Error HLSLCompiler::compileToBinary(gl::InfoLog &infoLog, const std::string
const std::vector<CompileConfig> &configs, const D3D_SHADER_MACRO *overrideMacros,
ID3DBlob **outCompiledBlob, std::string *outDebugInfo) const
{
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
ASSERT(mD3DCompilerModule);
#endif
ASSERT(mD3DCompileFunc);
ASSERT(mD3DCompilerModule && mD3DCompileFunc);
if (gl::perfActive())
{
......
......@@ -10,7 +10,6 @@
#include "libGLESv2/renderer/d3d/d3d11/Renderer11.h"
#include "libGLESv2/renderer/d3d/d3d11/renderer11_utils.h"
#include "libGLESv2/main.h"
#include "common/utilities.h"
#include <GLES2/gl2ext.h>
......
......@@ -40,7 +40,6 @@
#include "libEGL/Display.h"
#include "common/utilities.h"
#include "common/tls.h"
#include <EGL/eglext.h>
......@@ -168,7 +167,6 @@ EGLint Renderer11::initialize()
return EGL_NOT_INITIALIZED;
}
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
mDxgiModule = LoadLibrary(TEXT("dxgi.dll"));
mD3d11Module = LoadLibrary(TEXT("d3d11.dll"));
......@@ -187,7 +185,6 @@ EGLint Renderer11::initialize()
ERR("Could not retrieve D3D11CreateDevice address - aborting!\n");
return EGL_NOT_INITIALIZED;
}
#endif
D3D_FEATURE_LEVEL featureLevels[] =
{
......@@ -242,7 +239,6 @@ EGLint Renderer11::initialize()
}
}
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
#if !ANGLE_SKIP_DXGI_1_2_CHECK
// In order to create a swap chain for an HWND owned by another process, DXGI 1.2 is required.
// The easiest way to check is to query for a IDXGIDevice2.
......@@ -272,7 +268,6 @@ EGLint Renderer11::initialize()
SafeRelease(dxgiDevice2);
}
#endif
#endif
IDXGIDevice *dxgiDevice = NULL;
result = mDevice->QueryInterface(__uuidof(IDXGIDevice), (void**)&dxgiDevice);
......
......@@ -181,7 +181,7 @@ class Renderer11 : public Renderer
// D3D11-renderer specific methods
ID3D11Device *getDevice() { return mDevice; }
ID3D11DeviceContext *getDeviceContext() { return mDeviceContext; };
DXGIFactory *getDxgiFactory() { return mDxgiFactory; };
IDXGIFactory *getDxgiFactory() { return mDxgiFactory; };
Blit11 *getBlitter() { return mBlit; }
......@@ -343,7 +343,7 @@ class Renderer11 : public Renderer
IDXGIAdapter *mDxgiAdapter;
DXGI_ADAPTER_DESC mAdapterDescription;
char mDescription[128];
DXGIFactory *mDxgiFactory;
IDXGIFactory *mDxgiFactory;
};
}
......
......@@ -332,10 +332,8 @@ EGLint SwapChain11::resize(EGLint backbufferWidth, EGLint backbufferHeight)
SafeRelease(mBackBufferRTView);
// Resize swap chain
DXGI_SWAP_CHAIN_DESC desc;
mSwapChain->GetDesc(&desc);
const d3d11::TextureFormat &backbufferFormatInfo = d3d11::GetTextureFormatInfo(mBackBufferFormat);
HRESULT result = mSwapChain->ResizeBuffers(desc.BufferCount, backbufferWidth, backbufferHeight, backbufferFormatInfo.texFormat, 0);
HRESULT result = mSwapChain->ResizeBuffers(1, backbufferWidth, backbufferHeight, backbufferFormatInfo.texFormat, 0);
if (FAILED(result))
{
......
......@@ -56,7 +56,7 @@ class SwapChain11 : public SwapChain
unsigned int mSwapInterval;
bool mPassThroughResourcesInit;
DXGISwapChain *mSwapChain;
IDXGISwapChain *mSwapChain;
ID3D11Texture2D *mBackBufferTexture;
ID3D11RenderTargetView *mBackBufferRTView;
......
......@@ -17,12 +17,6 @@ void LoadA8ToBGRA8_SSE2(size_t width, size_t height, size_t depth,
const uint8_t *input, size_t inputRowPitch, size_t inputDepthPitch,
uint8_t *output, size_t outputRowPitch, size_t outputDepthPitch)
{
#if defined(_M_ARM)
// Ensure that this function is reported as not implemented for ARM builds because
// the instructions below are not present for that architecture.
UNIMPLEMENTED();
return;
#else
__m128i zeroWide = _mm_setzero_si128();
for (size_t z = 0; z < depth; z++)
......@@ -60,19 +54,12 @@ void LoadA8ToBGRA8_SSE2(size_t width, size_t height, size_t depth,
}
}
}
#endif
}
void LoadRGBA8ToBGRA8_SSE2(size_t width, size_t height, size_t depth,
const uint8_t *input, size_t inputRowPitch, size_t inputDepthPitch,
uint8_t *output, size_t outputRowPitch, size_t outputDepthPitch)
{
#if defined(_M_ARM)
// Ensure that this function is reported as not implemented for ARM builds because
// the instructions below are not present for that architecture.
UNIMPLEMENTED();
return;
#else
__m128i brMask = _mm_set1_epi32(0x00ff00ff);
for (size_t z = 0; z < depth; z++)
......@@ -112,7 +99,6 @@ void LoadRGBA8ToBGRA8_SSE2(size_t width, size_t height, size_t depth,
}
}
}
#endif
}
}
......@@ -24,7 +24,6 @@
*/
#include <windows.h>
#include "common/platform.h"
#if _WIN32_WINNT_WINBLUE
#include <versionhelpers.h>
......@@ -53,11 +52,7 @@ bool isWindowsVistaOrGreater()
if (!initialized) {
initialized = true;
#if defined(ANGLE_ENABLE_WINDOWS_STORE)
cachedIsWindowsVistaOrGreater = true;
#else
cachedIsWindowsVistaOrGreater = IsWindowsVistaOrGreater();
#endif
}
return cachedIsWindowsVistaOrGreater;
}
......
......@@ -5,7 +5,9 @@
{
'sources':
[
'ImageIndexIterator_unittest.cpp',
'TransformFeedback_unittest.cpp'
'<!@(python <(angle_path)/enumerate_files.py \
-dirs <(angle_path)/tests/angle_implementation_unit_tests \
-types *.cpp *.h \
-excludes <(angle_path)/tests/angle_implementation_unit_tests/angle_implementation_unit_tests_main.cpp)'
],
}
......@@ -88,6 +88,7 @@
'preprocessor_tests/preprocessor_test_main.cpp',
],
},
{
'target_name': 'compiler_tests',
'type': 'executable',
......@@ -111,22 +112,6 @@
[
'compiler_tests/compiler_test_main.cpp',
],
'msvs_settings':
{
'VCLinkerTool':
{
'conditions':
[
['angle_build_winrt==1',
{
'AdditionalDependencies':
[
'runtimeobject.lib',
],
}],
],
},
},
},
],
......@@ -235,30 +220,6 @@
[
'angle_implementation_unit_tests/angle_implementation_unit_tests_main.cpp',
],
'conditions':
[
['angle_build_winrt==1',
{
'sources':
[
'angle_implementation_unit_tests/CoreWindowNativeWindow_unittest.cpp',
],
'defines':
[
'ANGLE_ENABLE_D3D11',
],
'msvs_settings':
{
'VCLinkerTool':
{
'AdditionalDependencies':
[
'runtimeobject.lib',
],
},
},
}],
],
},
],
'conditions':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment