A few extra dependencies for UWP

- also have to inject the Win32->UWP compat
This commit is contained in:
Matthew Leibowitz 2016-06-21 17:45:58 +02:00
Родитель c437db1cd4
Коммит 62c7db1ab9
9 изменённых файлов: 302 добавлений и 59 удалений

Просмотреть файл

@ -385,6 +385,35 @@ Task ("externals-uwp")
//
// TODO: the stuff in this block must be moved into the gyp files !!
//
// some methods don't yet exist, so we must add the compat layer to them.
// we need this as we can't modify the third party files
// all we do is insert our header before all the others
var compatHeader = "native-builds/src/WinRTCompat.h";
var compatSource = "native-builds/src/WinRTCompat.c";
var files = new Dictionary<FilePath, string> {
{ "skia/third_party/externals/dng_sdk/source/dng_string.cpp", "#if qWinOS" },
{ "skia/third_party/externals/dng_sdk/source/dng_utils.cpp", "#if qWinOS" },
{ "skia/third_party/externals/dng_sdk/source/dng_pthread.cpp", "#if qWinOS" },
{ "skia/third_party/externals/zlib/deflate.c", "#include <assert.h>" },
{ "skia/third_party/externals/libpng/pngpriv.h", "# include <windows.h> /* defines _WINDOWS_ macro */" },
};
foreach (var filePair in files) {
var file = filePair.Key;
var root = string.Join ("/", file.GetDirectory().Segments.Select (x => ".."));
var include = "#include \"" + root + "/" + compatHeader + "\"";
var contents = FileReadLines (file).ToList ();
var index = contents.IndexOf (include);
if (index == -1) {
if (string.IsNullOrEmpty (filePair.Value)) {
contents.Insert (0, include);
} else {
contents.Insert (contents.IndexOf (filePair.Value), include);
}
FileWriteLines (file, contents.ToArray ());
}
}
var projectFile = MakeAbsolute (projectFilePath).FullPath;
var xdoc = XDocument.Load (projectFile);
@ -436,8 +465,11 @@ Task ("externals-uwp")
SetXValue (properties, "IgnoreImportLibrary","false");
SetXValues (xdoc.Root, new [] { "ItemDefinitionGroup", "ClCompile" }, "CompileAsWinRT", "false");
//AddXValues (xdoc.Root, new [] { "ItemDefinitionGroup", "ClCompile" }, "AdditionalOptions", " /sdl ");
AddXValues (xdoc.Root, new [] { "ItemDefinitionGroup", "ClCompile" }, "PreprocessorDefinitions", ";SK_BUILD_FOR_WINRT;WINAPI_FAMILY=WINAPI_FAMILY_APP;");
AddXValues (xdoc.Root, new [] { "ItemDefinitionGroup", "ClCompile" }, "PreprocessorDefinitions", ";SK_HAS_DWRITE_1_H;SK_HAS_DWRITE_2_H;");
// if (platform.ToUpper () == "ARM") {
// AddXValues (xdoc.Root, new [] { "ItemDefinitionGroup", "ClCompile" }, "PreprocessorDefinitions", ";__ARM_NEON;__ARM_NEON__;");
// }
AddXValues (xdoc.Root, new [] { "ItemDefinitionGroup", "ClCompile" }, "DisableSpecificWarnings", ";4146;4703;");
SetXValues (xdoc.Root, new [] { "ItemDefinitionGroup", "Link" }, "SubSystem", "Console");
SetXValues (xdoc.Root, new [] { "ItemDefinitionGroup", "Link" }, "IgnoreAllDefaultLibraries", "false");

Просмотреть файл

@ -257,7 +257,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\SkiaKeeper.c" />
<ClCompile Include="..\src\WinRTCompat.c" />
<ClCompile Include="..\src\WinRTCompat.cpp" />
<ClCompile Include="..\src\SkManagedStream.cpp" />
<ClCompile Include="..\src\sk_managedstream.cpp" />
<ClCompile Include="..\src\sk_xamarin.cpp" />
@ -266,6 +266,7 @@
<ClInclude Include="..\src\SkManagedStream.h" />
<ClInclude Include="..\src\sk_managedstream.h" />
<ClInclude Include="..\src\sk_xamarin.h" />
<ClInclude Include="..\src\WinRTCompat.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\skia\out\gyp\codec.vcxproj">
@ -277,6 +278,9 @@
<ProjectReference Include="..\..\skia\out\gyp\core.vcxproj">
<Project>{b7760b5e-bfa8-486b-acfd-49e3a6de8e76}</Project>
</ProjectReference>
<ProjectReference Include="..\..\skia\out\gyp\dng_sdk.vcxproj">
<Project>{e6ac5ad9-ba72-e396-9af0-5bcedee32a44}</Project>
</ProjectReference>
<ProjectReference Include="..\..\skia\out\gyp\effects.vcxproj">
<Project>{200809b7-4c62-7592-f47e-bf262809fa50}</Project>
</ProjectReference>
@ -340,9 +344,15 @@
<ProjectReference Include="..\..\skia\out\gyp\pdf.vcxproj">
<Project>{b8aa38a8-c1f9-7c27-270f-199d0891282c}</Project>
</ProjectReference>
<ProjectReference Include="..\..\skia\out\gyp\piex.vcxproj">
<Project>{e94d4110-703a-d378-de0d-1567557a63a4}</Project>
</ProjectReference>
<ProjectReference Include="..\..\skia\out\gyp\ports.vcxproj">
<Project>{b15878d6-6997-adc9-ac65-516a7f578db2}</Project>
</ProjectReference>
<ProjectReference Include="..\..\skia\out\gyp\raw_codec.vcxproj">
<Project>{69919814-af57-8c45-e0db-2112ee2a146a}</Project>
</ProjectReference>
<ProjectReference Include="..\..\skia\out\gyp\sfnt.vcxproj">
<Project>{43c5db31-68d1-5452-4bf0-ad0ab84b2e52}</Project>
</ProjectReference>
@ -358,12 +368,6 @@
<ProjectReference Include="..\..\skia\out\gyp\zlib.vcxproj">
<Project>{4c5035c1-74ba-cf3d-79b1-471c205a490d}</Project>
</ProjectReference>
<ProjectReference Include="..\..\skia\out\gyp\zlib_x86_simd.vcxproj" Condition="'$(Platform)'!='ARM'">
<Project>{4844151d-e943-c99d-d340-683a26e22fc7}</Project>
</ProjectReference>
<ProjectReference Include="..\..\skia\out\gyp\zlib_x86_simd.vcxproj">
<Project>{4844151d-e943-c99d-d340-683a26e22fc7}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

Просмотреть файл

@ -65,7 +65,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\skia\out\gyp\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "skgpu", "..\..\skia\out\gyp\skgpu.vcxproj", "{13574ED5-427A-5FF2-E79D-092AB3AB24E2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib_x86_simd", "..\..\skia\out\gyp\zlib_x86_simd.vcxproj", "{4844151D-E943-C99D-D340-683A26E22FC7}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raw_codec", "..\..\skia\out\gyp\raw_codec.vcxproj", "{69919814-AF57-8C45-E0DB-2112EE2A146A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dng_sdk", "..\..\skia\out\gyp\dng_sdk.vcxproj", "{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dng_sdk-selector", "..\..\skia\out\gyp\dng_sdk-selector.vcxproj", "{3E562996-8671-6CAC-3138-DDE7DFB70196}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "piex", "..\..\skia\out\gyp\piex.vcxproj", "{E94D4110-703A-D378-DE0D-1567557A63A4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "piex-selector", "..\..\skia\out\gyp\piex-selector.vcxproj", "{C580210B-778A-C16C-6EE0-29EAC48E75C7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -193,10 +201,26 @@ Global
{13574ED5-427A-5FF2-E79D-092AB3AB24E2}.Debug|ARM.Build.0 = Debug|ARM
{13574ED5-427A-5FF2-E79D-092AB3AB24E2}.Release|ARM.ActiveCfg = Release|ARM
{13574ED5-427A-5FF2-E79D-092AB3AB24E2}.Release|ARM.Build.0 = Release|ARM
{4844151D-E943-C99D-D340-683A26E22FC7}.Debug|ARM.ActiveCfg = Debug|ARM
{4844151D-E943-C99D-D340-683A26E22FC7}.Debug|ARM.Build.0 = Debug|ARM
{4844151D-E943-C99D-D340-683A26E22FC7}.Release|ARM.ActiveCfg = Release|ARM
{4844151D-E943-C99D-D340-683A26E22FC7}.Release|ARM.Build.0 = Release|ARM
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Debug|ARM.ActiveCfg = Debug|ARM
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Debug|ARM.Build.0 = Debug|ARM
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Release|ARM.ActiveCfg = Release|ARM
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Release|ARM.Build.0 = Release|ARM
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Debug|ARM.ActiveCfg = Debug|ARM
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Debug|ARM.Build.0 = Debug|ARM
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Release|ARM.ActiveCfg = Release|ARM
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Release|ARM.Build.0 = Release|ARM
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Debug|ARM.ActiveCfg = Debug|Win32
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Debug|ARM.Build.0 = Debug|Win32
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Release|ARM.ActiveCfg = Release|Win32
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Release|ARM.Build.0 = Release|Win32
{E94D4110-703A-D378-DE0D-1567557A63A4}.Debug|ARM.ActiveCfg = Debug|ARM
{E94D4110-703A-D378-DE0D-1567557A63A4}.Debug|ARM.Build.0 = Debug|ARM
{E94D4110-703A-D378-DE0D-1567557A63A4}.Release|ARM.ActiveCfg = Release|ARM
{E94D4110-703A-D378-DE0D-1567557A63A4}.Release|ARM.Build.0 = Release|ARM
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Debug|ARM.ActiveCfg = Debug|Win32
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Debug|ARM.Build.0 = Debug|Win32
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Release|ARM.ActiveCfg = Release|Win32
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Release|ARM.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -231,6 +255,10 @@ Global
{35BBCD7A-909D-957F-ADA0-C09939E0916F} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{4C5035C1-74BA-CF3D-79B1-471C205A490D} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{13574ED5-427A-5FF2-E79D-092AB3AB24E2} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{4844151D-E943-C99D-D340-683A26E22FC7} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{69919814-AF57-8C45-E0DB-2112EE2A146A} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{3E562996-8671-6CAC-3138-DDE7DFB70196} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{E94D4110-703A-D378-DE0D-1567557A63A4} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{C580210B-778A-C16C-6EE0-29EAC48E75C7} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -69,10 +69,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng_static", "..\..\skia
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\skia\out\gyp\zlib.vcxproj", "{4C5035C1-74BA-CF3D-79B1-471C205A490D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib_x86_simd", "..\..\skia\out\gyp\zlib_x86_simd.vcxproj", "{4844151D-E943-C99D-D340-683A26E22FC7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "skgpu", "..\..\skia\out\gyp\skgpu.vcxproj", "{13574ED5-427A-5FF2-E79D-092AB3AB24E2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raw_codec", "..\..\skia\out\gyp\raw_codec.vcxproj", "{69919814-AF57-8C45-E0DB-2112EE2A146A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dng_sdk", "..\..\skia\out\gyp\dng_sdk.vcxproj", "{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dng_sdk-selector", "..\..\skia\out\gyp\dng_sdk-selector.vcxproj", "{3E562996-8671-6CAC-3138-DDE7DFB70196}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "piex", "..\..\skia\out\gyp\piex.vcxproj", "{E94D4110-703A-D378-DE0D-1567557A63A4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "piex-selector", "..\..\skia\out\gyp\piex-selector.vcxproj", "{C580210B-778A-C16C-6EE0-29EAC48E75C7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@ -207,14 +215,30 @@ Global
{4C5035C1-74BA-CF3D-79B1-471C205A490D}.Debug|x64.Build.0 = Debug|x64
{4C5035C1-74BA-CF3D-79B1-471C205A490D}.Release|x64.ActiveCfg = Release|x64
{4C5035C1-74BA-CF3D-79B1-471C205A490D}.Release|x64.Build.0 = Release|x64
{4844151D-E943-C99D-D340-683A26E22FC7}.Debug|x64.ActiveCfg = Debug|x64
{4844151D-E943-C99D-D340-683A26E22FC7}.Debug|x64.Build.0 = Debug|x64
{4844151D-E943-C99D-D340-683A26E22FC7}.Release|x64.ActiveCfg = Release|x64
{4844151D-E943-C99D-D340-683A26E22FC7}.Release|x64.Build.0 = Release|x64
{13574ED5-427A-5FF2-E79D-092AB3AB24E2}.Debug|x64.ActiveCfg = Debug|x64
{13574ED5-427A-5FF2-E79D-092AB3AB24E2}.Debug|x64.Build.0 = Debug|x64
{13574ED5-427A-5FF2-E79D-092AB3AB24E2}.Release|x64.ActiveCfg = Release|x64
{13574ED5-427A-5FF2-E79D-092AB3AB24E2}.Release|x64.Build.0 = Release|x64
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Debug|x64.ActiveCfg = Debug|x64
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Debug|x64.Build.0 = Debug|x64
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Release|x64.ActiveCfg = Release|x64
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Release|x64.Build.0 = Release|x64
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Debug|x64.ActiveCfg = Debug|x64
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Debug|x64.Build.0 = Debug|x64
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Release|x64.ActiveCfg = Release|x64
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Release|x64.Build.0 = Release|x64
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Debug|x64.ActiveCfg = Debug|x64
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Debug|x64.Build.0 = Debug|x64
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Release|x64.ActiveCfg = Release|x64
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Release|x64.Build.0 = Release|x64
{E94D4110-703A-D378-DE0D-1567557A63A4}.Debug|x64.ActiveCfg = Debug|x64
{E94D4110-703A-D378-DE0D-1567557A63A4}.Debug|x64.Build.0 = Debug|x64
{E94D4110-703A-D378-DE0D-1567557A63A4}.Release|x64.ActiveCfg = Release|x64
{E94D4110-703A-D378-DE0D-1567557A63A4}.Release|x64.Build.0 = Release|x64
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Debug|x64.ActiveCfg = Debug|x64
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Debug|x64.Build.0 = Debug|x64
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Release|x64.ActiveCfg = Release|x64
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -251,7 +275,11 @@ Global
{244A967D-9EDE-F233-1CFA-A22A1B666A3E} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{35BBCD7A-909D-957F-ADA0-C09939E0916F} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{4C5035C1-74BA-CF3D-79B1-471C205A490D} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{4844151D-E943-C99D-D340-683A26E22FC7} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{13574ED5-427A-5FF2-E79D-092AB3AB24E2} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{69919814-AF57-8C45-E0DB-2112EE2A146A} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{3E562996-8671-6CAC-3138-DDE7DFB70196} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{E94D4110-703A-D378-DE0D-1567557A63A4} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{C580210B-778A-C16C-6EE0-29EAC48E75C7} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -69,10 +69,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng_static", "..\..\skia
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\skia\out\gyp\zlib.vcxproj", "{4C5035C1-74BA-CF3D-79B1-471C205A490D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib_x86_simd", "..\..\skia\out\gyp\zlib_x86_simd.vcxproj", "{4844151D-E943-C99D-D340-683A26E22FC7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "skgpu", "..\..\skia\out\gyp\skgpu.vcxproj", "{13574ED5-427A-5FF2-E79D-092AB3AB24E2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raw_codec", "..\..\skia\out\gyp\raw_codec.vcxproj", "{69919814-AF57-8C45-E0DB-2112EE2A146A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dng_sdk", "..\..\skia\out\gyp\dng_sdk.vcxproj", "{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dng_sdk-selector", "..\..\skia\out\gyp\dng_sdk-selector.vcxproj", "{3E562996-8671-6CAC-3138-DDE7DFB70196}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "piex", "..\..\skia\out\gyp\piex.vcxproj", "{E94D4110-703A-D378-DE0D-1567557A63A4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "piex-selector", "..\..\skia\out\gyp\piex-selector.vcxproj", "{C580210B-778A-C16C-6EE0-29EAC48E75C7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -207,14 +215,30 @@ Global
{4C5035C1-74BA-CF3D-79B1-471C205A490D}.Debug|Win32.Build.0 = Debug|Win32
{4C5035C1-74BA-CF3D-79B1-471C205A490D}.Release|Win32.ActiveCfg = Release|Win32
{4C5035C1-74BA-CF3D-79B1-471C205A490D}.Release|Win32.Build.0 = Release|Win32
{4844151D-E943-C99D-D340-683A26E22FC7}.Debug|Win32.ActiveCfg = Debug|Win32
{4844151D-E943-C99D-D340-683A26E22FC7}.Debug|Win32.Build.0 = Debug|Win32
{4844151D-E943-C99D-D340-683A26E22FC7}.Release|Win32.ActiveCfg = Release|Win32
{4844151D-E943-C99D-D340-683A26E22FC7}.Release|Win32.Build.0 = Release|Win32
{13574ED5-427A-5FF2-E79D-092AB3AB24E2}.Debug|Win32.ActiveCfg = Debug|Win32
{13574ED5-427A-5FF2-E79D-092AB3AB24E2}.Debug|Win32.Build.0 = Debug|Win32
{13574ED5-427A-5FF2-E79D-092AB3AB24E2}.Release|Win32.ActiveCfg = Release|Win32
{13574ED5-427A-5FF2-E79D-092AB3AB24E2}.Release|Win32.Build.0 = Release|Win32
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Debug|Win32.ActiveCfg = Debug|Win32
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Debug|Win32.Build.0 = Debug|Win32
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Release|Win32.ActiveCfg = Release|Win32
{69919814-AF57-8C45-E0DB-2112EE2A146A}.Release|Win32.Build.0 = Release|Win32
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Debug|Win32.ActiveCfg = Debug|Win32
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Debug|Win32.Build.0 = Debug|Win32
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Release|Win32.ActiveCfg = Release|Win32
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44}.Release|Win32.Build.0 = Release|Win32
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Debug|Win32.ActiveCfg = Debug|Win32
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Debug|Win32.Build.0 = Debug|Win32
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Release|Win32.ActiveCfg = Release|Win32
{3E562996-8671-6CAC-3138-DDE7DFB70196}.Release|Win32.Build.0 = Release|Win32
{E94D4110-703A-D378-DE0D-1567557A63A4}.Debug|Win32.ActiveCfg = Debug|Win32
{E94D4110-703A-D378-DE0D-1567557A63A4}.Debug|Win32.Build.0 = Debug|Win32
{E94D4110-703A-D378-DE0D-1567557A63A4}.Release|Win32.ActiveCfg = Release|Win32
{E94D4110-703A-D378-DE0D-1567557A63A4}.Release|Win32.Build.0 = Release|Win32
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Debug|Win32.ActiveCfg = Debug|Win32
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Debug|Win32.Build.0 = Debug|Win32
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Release|Win32.ActiveCfg = Release|Win32
{C580210B-778A-C16C-6EE0-29EAC48E75C7}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -251,7 +275,11 @@ Global
{244A967D-9EDE-F233-1CFA-A22A1B666A3E} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{35BBCD7A-909D-957F-ADA0-C09939E0916F} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{4C5035C1-74BA-CF3D-79B1-471C205A490D} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{4844151D-E943-C99D-D340-683A26E22FC7} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{13574ED5-427A-5FF2-E79D-092AB3AB24E2} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{69919814-AF57-8C45-E0DB-2112EE2A146A} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{E6AC5AD9-BA72-E396-9AF0-5BCEDEE32A44} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{3E562996-8671-6CAC-3138-DDE7DFB70196} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{E94D4110-703A-D378-DE0D-1567557A63A4} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
{C580210B-778A-C16C-6EE0-29EAC48E75C7} = {38E1A434-8032-4721-8B8A-F4283BB56DAB}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -1,30 +0,0 @@
//
// WinRTCompat.c
//
// Created by Matthew Leibowitz on 06/09/16.
// Copyright © 2016 Xamarin. All rights reserved.
//
#if defined(SK_BUILD_FOR_WINRT)
#include <windows.h>
void ExitProcess(UINT code)
{
// we can't kill in WinRT
}
#if defined(_M_ARM)
// This should have been not used, but as the code is designed for x86
// and there is a RUNTIME check for simd, this has to exist. As the
// runtime check will fail, and revert to a C implementation, this is
// not a problem to have a stub.
unsigned int _mm_crc32_u32(unsigned int crc, unsigned int v)
{
return 0;
}
#endif
#endif

Просмотреть файл

@ -0,0 +1,78 @@
//
// WinRTCompat.c
//
// Created by Matthew Leibowitz on 06/09/16.
// Copyright © 2016 Xamarin. All rights reserved.
//
#include "WinRTCompat.h"
#ifdef SK_BUILD_FOR_WINRT
#include <windows.h>
#ifdef _M_ARM
unsigned int _mm_crc32_u32(unsigned int crc, unsigned int v)
{
return 0;
}
#endif // _M_ARM
DWORD WINAPI TlsAllocCompat(VOID)
{
return ::FlsAlloc(NULL);
}
LPVOID WINAPI TlsGetValueCompat(_In_ DWORD dwTlsIndex)
{
return ::FlsGetValue(dwTlsIndex);
}
BOOL WINAPI TlsSetValueCompat(_In_ DWORD dwTlsIndex, _In_opt_ LPVOID lpTlsValue)
{
return ::FlsSetValue(dwTlsIndex, lpTlsValue);
}
BOOL WINAPI TlsFreeCompat(_In_ DWORD dwTlsIndex)
{
return ::FlsFree(dwTlsIndex);
}
void ExitProcessCompat(unsigned int code)
{
// we can't kill in WinRT
}
int WINAPI MessageBoxACompat(_In_opt_ HWND hWnd, _In_opt_ LPCSTR lpText, _In_opt_ LPCSTR lpCaption, _In_ UINT uType)
{
// TODO: implementation
return 0;
}
int WINAPI CompareStringWCompat(_In_ LCID Locale, _In_ DWORD dwCmpFlags, _In_NLS_string_(cchCount1) PCNZWCH lpString1, _In_ int cchCount1, _In_NLS_string_(cchCount2) PCNZWCH lpString2, _In_ int cchCount2)
{
WCHAR localeName[LOCALE_NAME_MAX_LENGTH];
LCIDToLocaleName(Locale, localeName, LOCALE_NAME_MAX_LENGTH, 0);
return CompareStringEx(localeName, dwCmpFlags, lpString1, cchCount1, lpString2, cchCount2, NULL, NULL, NULL);
}
UINT WINAPI GetACPCompat(void)
{
return CP_ACP;
}
HANDLE WINAPI OpenThreadCompat(_In_ DWORD dwDesiredAccess, _In_ BOOL bInheritHandle, _In_ DWORD dwThreadId)
{
// TODO: implementation
return NULL;
}
DWORD WINAPI GetTickCountCompat(VOID)
{
return (long)GetTickCount64();
}
#endif // SK_BUILD_FOR_WINRT

Просмотреть файл

@ -0,0 +1,75 @@
//
// WinRTCompat.h
//
// Created by Matthew on 2016/06/20.
// Copyright © 2016 Xamarin. All rights reserved.
//
#ifndef WinRTCompat_h
#define WinRTCompat_h
#include <Windows.h>
#ifdef __cplusplus
#define C_PLUS_PLUS_BEGIN_GUARD extern "C" {
#define C_PLUS_PLUS_END_GUARD }
#else
#include <stdbool.h>
#define C_PLUS_PLUS_BEGIN_GUARD
#define C_PLUS_PLUS_END_GUARD
#endif
#include <wchar.h>
C_PLUS_PLUS_BEGIN_GUARD
#ifdef SK_BUILD_FOR_WINRT
#ifdef _M_ARM
// This should have been not used, but as the code is designed for x86
// and there is a RUNTIME check for simd, this has to exist. As the
// runtime check will fail, and revert to a C implementation, this is
// not a problem to have a stub.
unsigned int _mm_crc32_u32(unsigned int crc, unsigned int v);
#endif // _M_ARM
//int MessageBoxA(void* hWnd, const char* lpText, const char* lpCaption, unsigned int uType);
//unsigned int GetACP(void);
//int CompareStringW(unsigned long Locale, unsigned long dwCmpFlags, const wchar_t* lpString1, int cchCount1, const wchar_t* lpString2, int cchCount2);
//unsigned long GetTickCount(void);
//void* OpenThread(unsigned long dwDesiredAccess, bool bInheritHandle, unsigned long dwThreadId);
#endif // SK_BUILD_FOR_WINRT
int WINAPI MessageBoxACompat(_In_opt_ HWND hWnd, _In_opt_ LPCSTR lpText, _In_opt_ LPCSTR lpCaption, _In_ UINT uType);
int WINAPI CompareStringWCompat(_In_ LCID Locale, _In_ DWORD dwCmpFlags, _In_NLS_string_(cchCount1) PCNZWCH lpString1, _In_ int cchCount1, _In_NLS_string_(cchCount2) PCNZWCH lpString2, _In_ int cchCount2);
UINT WINAPI GetACPCompat(void);
HANDLE WINAPI OpenThreadCompat(_In_ DWORD dwDesiredAccess, _In_ BOOL bInheritHandle, _In_ DWORD dwThreadId);
DWORD WINAPI GetTickCountCompat(VOID);
DWORD WINAPI TlsAllocCompat(VOID);
LPVOID WINAPI TlsGetValueCompat(_In_ DWORD dwTlsIndex);
BOOL WINAPI TlsSetValueCompat(_In_ DWORD dwTlsIndex, _In_opt_ LPVOID lpTlsValue);
BOOL WINAPI TlsFreeCompat(_In_ DWORD dwTlsIndex);
void ExitProcessCompat(unsigned int code);
// override any previous declaration with ours
#define MessageBoxA MessageBoxACompat
#define CompareStringW CompareStringWCompat
#define GetACP GetACPCompat
#define OpenThread OpenThreadCompat
#define GetTickCount GetTickCountCompat
#define ExitProcess ExitProcessCompat
#define TlsAlloc TlsAllocCompat
#define TlsGetValue TlsGetValueCompat
#define TlsSetValue TlsSetValueCompat
#define TlsFree TlsFreeCompat
C_PLUS_PLUS_END_GUARD
#endif // WinRTCompat_h

2
skia

@ -1 +1 @@
Subproject commit 87dc83ed53e038dbcf23074ce4798415e254eba6
Subproject commit d7ff7534799a4e0f2a911f8ec7c5cf632881d868