Skip to content

Commit

Permalink
Move text rendering to Common.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Oct 4, 2020
1 parent 0e3a84b commit 8761bf2
Show file tree
Hide file tree
Showing 26 changed files with 130 additions and 112 deletions.
18 changes: 10 additions & 8 deletions CMakeLists.txt
Expand Up @@ -560,6 +560,16 @@ add_library(Common STATIC
Common/Render/TextureAtlas.h
Common/Render/DrawBuffer.cpp
Common/Render/DrawBuffer.h
Common/Render/Text/draw_text.cpp
Common/Render/Text/draw_text.h
Common/Render/Text/draw_text_android.cpp
Common/Render/Text/draw_text_android.h
Common/Render/Text/draw_text_qt.cpp
Common/Render/Text/draw_text_qt.h
Common/Render/Text/draw_text_win.cpp
Common/Render/Text/draw_text_win.h
Common/Render/Text/draw_text_uwp.cpp
Common/Render/Text/draw_text_uwp.h
Common/System/Display.cpp
Common/System/Display.h
Common/Thread/Executor.cpp
Expand Down Expand Up @@ -1062,14 +1072,6 @@ endif()

add_library(native STATIC
${nativeExtra}
ext/native/gfx_es2/draw_text.cpp
ext/native/gfx_es2/draw_text.h
ext/native/gfx_es2/draw_text_win.cpp
ext/native/gfx_es2/draw_text_win.h
ext/native/gfx_es2/draw_text_qt.cpp
ext/native/gfx_es2/draw_text_qt.h
ext/native/gfx_es2/draw_text_android.cpp
ext/native/gfx_es2/draw_text_android.h
ext/jpge/jpgd.cpp
ext/jpge/jpgd.h
ext/jpge/jpge.cpp
Expand Down
10 changes: 10 additions & 0 deletions Common/Common.vcxproj
Expand Up @@ -431,6 +431,11 @@
<ClInclude Include="Profiler\Profiler.h" />
<ClInclude Include="Render\DrawBuffer.h" />
<ClInclude Include="Render\TextureAtlas.h" />
<ClInclude Include="Render\Text\draw_text.h" />
<ClInclude Include="Render\Text\draw_text_android.h" />
<ClInclude Include="Render\Text\draw_text_qt.h" />
<ClInclude Include="Render\Text\draw_text_uwp.h" />
<ClInclude Include="Render\Text\draw_text_win.h" />
<ClInclude Include="Serialize\SerializeDeque.h" />
<ClInclude Include="Serialize\SerializeFuncs.h" />
<ClInclude Include="ColorConvNEON.h" />
Expand Down Expand Up @@ -753,6 +758,11 @@
<ClCompile Include="Profiler\Profiler.cpp" />
<ClCompile Include="Render\DrawBuffer.cpp" />
<ClCompile Include="Render\TextureAtlas.cpp" />
<ClCompile Include="Render\Text\draw_text.cpp" />
<ClCompile Include="Render\Text\draw_text_android.cpp" />
<ClCompile Include="Render\Text\draw_text_qt.cpp" />
<ClCompile Include="Render\Text\draw_text_uwp.cpp" />
<ClCompile Include="Render\Text\draw_text_win.cpp" />
<ClCompile Include="Serialize\Serializer.cpp" />
<ClCompile Include="ColorConv.cpp" />
<ClCompile Include="ConsoleListener.cpp" />
Expand Down
33 changes: 33 additions & 0 deletions Common/Common.vcxproj.filters
Expand Up @@ -357,6 +357,21 @@
<ClInclude Include="GPU\Vulkan\VulkanMemory.h">
<Filter>GPU\Vulkan</Filter>
</ClInclude>
<ClInclude Include="Render\Text\draw_text.h">
<Filter>Render\Text</Filter>
</ClInclude>
<ClInclude Include="Render\Text\draw_text_android.h">
<Filter>Render\Text</Filter>
</ClInclude>
<ClInclude Include="Render\Text\draw_text_qt.h">
<Filter>Render\Text</Filter>
</ClInclude>
<ClInclude Include="Render\Text\draw_text_uwp.h">
<Filter>Render\Text</Filter>
</ClInclude>
<ClInclude Include="Render\Text\draw_text_win.h">
<Filter>Render\Text</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ABI.cpp" />
Expand Down Expand Up @@ -692,6 +707,21 @@
<ClCompile Include="GPU\Vulkan\VulkanMemory.cpp">
<Filter>GPU\Vulkan</Filter>
</ClCompile>
<ClCompile Include="Render\Text\draw_text.cpp">
<Filter>Render\Text</Filter>
</ClCompile>
<ClCompile Include="Render\Text\draw_text_android.cpp">
<Filter>Render\Text</Filter>
</ClCompile>
<ClCompile Include="Render\Text\draw_text_qt.cpp">
<Filter>Render\Text</Filter>
</ClCompile>
<ClCompile Include="Render\Text\draw_text_uwp.cpp">
<Filter>Render\Text</Filter>
</ClCompile>
<ClCompile Include="Render\Text\draw_text_win.cpp">
<Filter>Render\Text</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="Crypto">
Expand Down Expand Up @@ -790,6 +820,9 @@
<Filter Include="Render">
<UniqueIdentifier>{c9aba118-5c31-4607-9a69-18eca9f92b44}</UniqueIdentifier>
</Filter>
<Filter Include="Render\Text">
<UniqueIdentifier>{9da96cce-c74a-4669-b755-c95defbe1e93}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="..\ext\libpng17\CMakeLists.txt">
Expand Down
2 changes: 1 addition & 1 deletion Common/Render/DrawBuffer.cpp
Expand Up @@ -7,7 +7,7 @@
#include "Common/Math/math_util.h"
#include "Common/Render/TextureAtlas.h"
#include "Common/Render/DrawBuffer.h"
#include "gfx_es2/draw_text.h"
#include "Common/Render/Text/draw_text.h"
#include "Common/Data/Encoding/Utf8.h"
#include "Common/Data/Text/WrapText.h"

Expand Down
@@ -1,13 +1,16 @@
#include "ppsspp_config.h"

#include "Common/System/Display.h"
#include "Common/GPU/thin3d.h"
#include "Common/Data/Hash/Hash.h"
#include "Common/Data/Text/WrapText.h"
#include "Common/Data/Encoding/Utf8.h"
#include "gfx_es2/draw_text.h"
#include "gfx_es2/draw_text_win.h"
#include "gfx_es2/draw_text_uwp.h"
#include "gfx_es2/draw_text_qt.h"
#include "gfx_es2/draw_text_android.h"

#include "Common/Render/Text/draw_text.h"
#include "Common/Render/Text/draw_text_win.h"
#include "Common/Render/Text/draw_text_uwp.h"
#include "Common/Render/Text/draw_text_qt.h"
#include "Common/Render/Text/draw_text_android.h"

TextDrawer::TextDrawer(Draw::DrawContext *draw) : draw_(draw) {
// These probably shouldn't be state.
Expand Down
Expand Up @@ -13,8 +13,8 @@
#include <memory>
#include <cstdint>

#include "Common/Render/DrawBuffer.h"
#include "Common/Data/Text/WrapText.h"
#include "Common/Render/DrawBuffer.h"

namespace Draw {
class DrawContext;
Expand Down
@@ -1,16 +1,15 @@
#include "Common/Log.h"
#include "Common/StringUtils.h"
#include "Common/System/Display.h"
#include "Common/GPU/thin3d.h"
#include "Common/Data/Hash/Hash.h"
#include "Common/Data/Text/WrapText.h"
#include "Common/Data/Encoding/Utf8.h"
#include "gfx_es2/draw_text.h"
#include "gfx_es2/draw_text_android.h"
#include "Common/Render/Text/draw_text.h"
#include "Common/Render/Text/draw_text_android.h"

#include "android/jni/app-android.h"

#include "Common/Log.h"
#include "Common/StringUtils.h"

#if PPSSPP_PLATFORM(ANDROID) && !defined(__LIBRETRO__)

#include <jni.h>
Expand Down
Expand Up @@ -3,7 +3,7 @@
#include "ppsspp_config.h"

#include <map>
#include "gfx_es2/draw_text.h"
#include "Common/Render/Text/draw_text.h"

#if PPSSPP_PLATFORM(ANDROID)

Expand Down
Expand Up @@ -3,8 +3,8 @@
#include "Common/Data/Hash/Hash.h"
#include "Common/Data/Text/WrapText.h"
#include "Common/Data/Encoding/Utf8.h"
#include "gfx_es2/draw_text.h"
#include "gfx_es2/draw_text_qt.h"
#include "Common/Render/Text/draw_text.h"
#include "Common/Render/Text/draw_text_qt.h"

#include "Common/Log.h"

Expand Down
Expand Up @@ -3,7 +3,7 @@
#include "ppsspp_config.h"

#include <map>
#include "gfx_es2/draw_text.h"
#include "Common/Render/Text/draw_text.h"

#if defined(USING_QT_UI)

Expand Down
Expand Up @@ -3,8 +3,8 @@
#include "Common/Data/Hash/Hash.h"
#include "Common/Data/Text/WrapText.h"
#include "Common/Data/Encoding/Utf8.h"
#include "gfx_es2/draw_text.h"
#include "gfx_es2/draw_text_uwp.h"
#include "Common/Render/Text/draw_text.h"
#include "Common/Render/Text/draw_text_uwp.h"

#include "Common/Log.h"
#include "Common/StringUtils.h"
Expand Down
Expand Up @@ -3,7 +3,7 @@
#include "ppsspp_config.h"

#include <map>
#include "gfx_es2/draw_text.h"
#include "Common/Render/Text/draw_text.h"

#if PPSSPP_PLATFORM(UWP)

Expand Down
Expand Up @@ -3,8 +3,8 @@
#include "Common/Data/Hash/Hash.h"
#include "Common/Data/Text/WrapText.h"
#include "Common/Data/Encoding/Utf8.h"
#include "gfx_es2/draw_text.h"
#include "gfx_es2/draw_text_win.h"
#include "Common/Render/Text/draw_text.h"
#include "Common/Render/Text/draw_text_win.h"

#include "Common/Log.h"
#include "Common/StringUtils.h"
Expand Down
Expand Up @@ -3,7 +3,7 @@
#include "ppsspp_config.h"

#include <map>
#include "gfx_es2/draw_text.h"
#include "Common/Render/Text/draw_text.h"

#if defined(_WIN32) && !defined(USING_QT_UI) && !PPSSPP_PLATFORM(UWP)

Expand Down
2 changes: 1 addition & 1 deletion Common/UI/Context.cpp
Expand Up @@ -8,7 +8,7 @@
#include "Common/UI/View.h"
#include "Common/UI/Context.h"
#include "Common/Render/DrawBuffer.h"
#include "gfx_es2/draw_text.h"
#include "Common/Render/Text/draw_text.h"

#include "Common/Log.h"
#include "UI/TextureUtil.h"
Expand Down
2 changes: 1 addition & 1 deletion Core/Util/PPGeDraw.cpp
Expand Up @@ -18,7 +18,7 @@
#include <algorithm>

#include "Common/Render/TextureAtlas.h"
#include "gfx_es2/draw_text.h"
#include "Common/Render/Text/draw_text.h"

#include "Common/Data/Color/RGBAUtil.h"
#include "Common/File/VFS/VFS.h"
Expand Down
2 changes: 1 addition & 1 deletion UI/EmuScreen.cpp
Expand Up @@ -21,7 +21,7 @@

#include "Common/Render/TextureAtlas.h"
#include "Common/GPU/OpenGL/GLFeatures.h"
#include "gfx_es2/draw_text.h"
#include "Common/Render/Text/draw_text.h"

#include "Common/UI/Root.h"
#include "Common/UI/UI.h"
Expand Down
2 changes: 1 addition & 1 deletion UI/NativeApp.cpp
Expand Up @@ -46,7 +46,7 @@
#include "Common/Net/HTTPClient.h"
#include "Common/Net/Resolve.h"
#include "Common/Render/TextureAtlas.h"
#include "gfx_es2/draw_text.h"
#include "Common/Render/Text/draw_text.h"
#include "Common/GPU/OpenGL/GLFeatures.h"
#include "Common/GPU/thin3d.h"
#include "Common/UI/UI.h"
Expand Down
10 changes: 10 additions & 0 deletions UWP/CommonUWP/CommonUWP.vcxproj
Expand Up @@ -439,6 +439,11 @@
<ClInclude Include="..\..\Common\Profiler\Profiler.h" />
<ClInclude Include="..\..\Common\Render\DrawBuffer.h" />
<ClInclude Include="..\..\Common\Render\TextureAtlas.h" />
<ClInclude Include="..\..\Common\Render\Text\draw_text.h" />
<ClInclude Include="..\..\Common\Render\Text\draw_text_android.h" />
<ClInclude Include="..\..\Common\Render\Text\draw_text_qt.h" />
<ClInclude Include="..\..\Common\Render\Text\draw_text_uwp.h" />
<ClInclude Include="..\..\Common\Render\Text\draw_text_win.h" />
<ClInclude Include="..\..\Common\Serialize\Serializer.h" />
<ClInclude Include="..\..\Common\Serialize\SerializeDeque.h" />
<ClInclude Include="..\..\Common\Serialize\SerializeFuncs.h" />
Expand Down Expand Up @@ -554,6 +559,11 @@
<ClCompile Include="..\..\Common\Profiler\Profiler.cpp" />
<ClCompile Include="..\..\Common\Render\DrawBuffer.cpp" />
<ClCompile Include="..\..\Common\Render\TextureAtlas.cpp" />
<ClCompile Include="..\..\Common\Render\Text\draw_text.cpp" />
<ClCompile Include="..\..\Common\Render\Text\draw_text_android.cpp" />
<ClCompile Include="..\..\Common\Render\Text\draw_text_qt.cpp" />
<ClCompile Include="..\..\Common\Render\Text\draw_text_uwp.cpp" />
<ClCompile Include="..\..\Common\Render\Text\draw_text_win.cpp" />
<ClCompile Include="..\..\Common\Serialize\Serializer.cpp" />
<ClCompile Include="..\..\Common\ColorConv.cpp" />
<ClCompile Include="..\..\Common\ColorConvNEON.cpp" />
Expand Down
33 changes: 33 additions & 0 deletions UWP/CommonUWP/CommonUWP.vcxproj.filters
Expand Up @@ -82,6 +82,9 @@
<Filter Include="GPU\GL">
<UniqueIdentifier>{2eb259f7-2735-493a-88be-96eb38f1b34e}</UniqueIdentifier>
</Filter>
<Filter Include="Render\Text">
<UniqueIdentifier>{28139b08-f8d5-41a2-a5ee-bf86cf1469c3}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Common\ABI.cpp" />
Expand Down Expand Up @@ -347,6 +350,21 @@
<ClCompile Include="..\..\Common\GPU\OpenGL\GLFeatures.cpp">
<Filter>GPU\GL</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\Render\Text\draw_text.cpp">
<Filter>Render\Text</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\Render\Text\draw_text_android.cpp">
<Filter>Render\Text</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\Render\Text\draw_text_qt.cpp">
<Filter>Render\Text</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\Render\Text\draw_text_uwp.cpp">
<Filter>Render\Text</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\Render\Text\draw_text_win.cpp">
<Filter>Render\Text</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="targetver.h" />
Expand Down Expand Up @@ -627,6 +645,21 @@
<ClInclude Include="..\..\Common\GPU\OpenGL\GLFeatures.h">
<Filter>GPU\GL</Filter>
</ClInclude>
<ClInclude Include="..\..\Common\Render\Text\draw_text.h">
<Filter>Render\Text</Filter>
</ClInclude>
<ClInclude Include="..\..\Common\Render\Text\draw_text_android.h">
<Filter>Render\Text</Filter>
</ClInclude>
<ClInclude Include="..\..\Common\Render\Text\draw_text_qt.h">
<Filter>Render\Text</Filter>
</ClInclude>
<ClInclude Include="..\..\Common\Render\Text\draw_text_uwp.h">
<Filter>Render\Text</Filter>
</ClInclude>
<ClInclude Include="..\..\Common\Render\Text\draw_text_win.h">
<Filter>Render\Text</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="..\..\ext\libpng17\CMakeLists.txt">
Expand Down
4 changes: 0 additions & 4 deletions UWP/NativeUWP/NativeUWP.vcxproj
Expand Up @@ -379,14 +379,10 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\ext\native\gfx_es2\draw_text.h" />
<ClInclude Include="..\..\ext\native\gfx_es2\draw_text_uwp.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\ext\native\gfx_es2\draw_text.cpp" />
<ClCompile Include="..\..\ext\native\gfx_es2\draw_text_uwp.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
Expand Down
17 changes: 0 additions & 17 deletions UWP/NativeUWP/NativeUWP.vcxproj.filters
Expand Up @@ -2,26 +2,9 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="pch.cpp" />
<ClCompile Include="..\..\ext\native\gfx_es2\draw_text.cpp">
<Filter>gfx</Filter>
</ClCompile>
<ClCompile Include="..\..\ext\native\gfx_es2\draw_text_uwp.cpp">
<Filter>gfx</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="..\..\ext\native\gfx_es2\draw_text.h">
<Filter>gfx</Filter>
</ClInclude>
<ClInclude Include="..\..\ext\native\gfx_es2\draw_text_uwp.h">
<Filter>gfx</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="gfx">
<UniqueIdentifier>{85815953-a0f8-409b-bbe9-c28f126ae7bf}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

0 comments on commit 8761bf2

Please sign in to comment.