mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Allocator refactor
This commit is contained in:
@@ -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);
|
||||
|
||||
|
@@ -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" />
|
||||
|
@@ -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>
|
Reference in New Issue
Block a user