Allocator refactor

This commit is contained in:
elasota
2021-04-28 01:46:07 -04:00
parent 472462c535
commit a2d374f650
75 changed files with 473 additions and 253 deletions

View File

@@ -3,6 +3,7 @@
#include "FontRenderer.h"
#include "IGpFont.h"
#include "IGpFontHandler.h"
#include "GpAllocator_C.h"
#include "GpAppInterface.h"
#include "GpDriverIndex.h"
#include "GpFontHandlerProperties.h"
@@ -167,8 +168,14 @@ bool KnownFontSpec::operator!=(const KnownFontSpec &other) const
int toolMain(int argc, const char **argv)
{
IGpAllocator *alloc = GpAllocator_C::GetInstance();
GpFontHandlerProperties fhProperties;
fhProperties.m_type = EGpFontHandlerType_FreeType2;
fhProperties.m_alloc = alloc;
GpDriverCollection *drivers = PLDrivers::GetDriverCollection();
drivers->SetDriver<GpDriverIDs::kAlloc>(alloc);
IGpFontHandler *ft2Handler = GpDriver_CreateFontHandler_FreeType2(fhProperties);

View File

@@ -43,6 +43,7 @@
<Import Project="..\AerofoilWin.props" />
<Import Project="..\Debug.props" />
<Import Project="..\WindowsUnicodeToolShim.props" />
<Import Project="..\AerofoilPortable.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
@@ -52,6 +53,7 @@
<Import Project="..\AerofoilWin.props" />
<Import Project="..\Release.props" />
<Import Project="..\WindowsUnicodeToolShim.props" />
<Import Project="..\AerofoilPortable.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
@@ -93,6 +95,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\AerofoilPortable\GpAllocator_C.cpp" />
<ClCompile Include="GenerateFonts.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@@ -18,5 +18,8 @@
<ClCompile Include="GenerateFonts.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\AerofoilPortable\GpAllocator_C.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>