Skip to content

Commit ded05bd

Browse files
committed
Merge branch 'text-refactor'
2 parents 1f1f76a + a99fea3 commit ded05bd

21 files changed

+1441
-900
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Version TBA:
77

88
* Add "Jump to end" command to comments panel context menu (#254).
99

10+
* Improve rendering performance and UI responsiveness, particularly
11+
when a large number of colours are in use (#257).
12+
1013
Version 0.63.0 (2025-06-11):
1114

1215
* Add non-modal "Jump to offset" dialog option (#242).

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ else
120120
endif
121121
endif
122122

123-
CFLAGS := $(BASE_CFLAGS) -std=c99 -I. -Iinclude/ -IwxLua/modules/ -IwxFreeChart/include/ -DREHEX_CACHE_CHARACTER_BITMAPS $(HELP_CFLAGS) $(BOTAN_CFLAGS) $(CAPSTONE_CFLAGS) $(JANSSON_CFLAGS) $(LUA_CFLAGS) $(CFLAGS)
124-
CXXFLAGS_NO_GTK := $(BASE_CFLAGS) $(CXXSTD) -I. -Iinclude/ -IwxLua/modules/ -IwxFreeChart/include/ -DwxOVERRIDE=override -DREHEX_CACHE_CHARACTER_BITMAPS $(HELP_CFLAGS) $(BOTAN_CFLAGS) $(CAPSTONE_CFLAGS) $(JANSSON_CFLAGS) $(LUA_CFLAGS) $(WX_CXXFLAGS) $(CXXFLAGS)
125-
CXXFLAGS := $(BASE_CFLAGS) $(CXXSTD) -I. -Iinclude/ -IwxLua/modules/ -IwxFreeChart/include/ -DwxOVERRIDE=override -DREHEX_CACHE_CHARACTER_BITMAPS $(HELP_CFLAGS) $(BOTAN_CFLAGS) $(CAPSTONE_CFLAGS) $(JANSSON_CFLAGS) $(LUA_CFLAGS) $(WX_CXXFLAGS) $(GTK_CFLAGS) $(CXXFLAGS)
123+
CFLAGS := $(BASE_CFLAGS) -std=c99 -I. -Iinclude/ -IwxLua/modules/ -IwxFreeChart/include/ $(HELP_CFLAGS) $(BOTAN_CFLAGS) $(CAPSTONE_CFLAGS) $(JANSSON_CFLAGS) $(LUA_CFLAGS) $(CFLAGS)
124+
CXXFLAGS_NO_GTK := $(BASE_CFLAGS) $(CXXSTD) -I. -Iinclude/ -IwxLua/modules/ -IwxFreeChart/include/ -DwxOVERRIDE=override $(HELP_CFLAGS) $(BOTAN_CFLAGS) $(CAPSTONE_CFLAGS) $(JANSSON_CFLAGS) $(LUA_CFLAGS) $(WX_CXXFLAGS) $(CXXFLAGS)
125+
CXXFLAGS := $(BASE_CFLAGS) $(CXXSTD) -I. -Iinclude/ -IwxLua/modules/ -IwxFreeChart/include/ -DwxOVERRIDE=override $(HELP_CFLAGS) $(BOTAN_CFLAGS) $(CAPSTONE_CFLAGS) $(JANSSON_CFLAGS) $(LUA_CFLAGS) $(WX_CXXFLAGS) $(GTK_CFLAGS) $(CXXFLAGS)
126126

127127
uname_S := $(shell uname -s 2>/dev/null)
128128
ifeq ($(uname_S),FreeBSD)
@@ -373,6 +373,7 @@ APP_OBJS := \
373373
src/AppTestable.$(BUILD_TYPE).o \
374374
src/ArtProvider.$(BUILD_TYPE).o \
375375
src/BasicDataTypes.$(BUILD_TYPE).o \
376+
src/BatchedCharacterRenderer.$(BUILD_TYPE).o \
376377
src/BitArray.$(BUILD_TYPE).o \
377378
src/BitEditor.$(BUILD_TYPE).o \
378379
src/BitOffset.$(BUILD_TYPE).o \
@@ -412,6 +413,7 @@ APP_OBJS := \
412413
src/FileWriter.$(BUILD_TYPE).o \
413414
src/FillRangeDialog.$(BUILD_TYPE).o \
414415
src/FixedSizeValueRegion.$(BUILD_TYPE).o \
416+
src/FontCharacterCache.$(BUILD_TYPE).o \
415417
src/GotoOffsetDialog.$(BUILD_TYPE).o \
416418
src/HierarchicalByteAccumulator.$(BUILD_TYPE).o \
417419
src/HighlightColourMap.$(BUILD_TYPE).o \
@@ -496,6 +498,7 @@ TEST_OBJS := \
496498
src/AppTestable.$(BUILD_TYPE).o \
497499
src/ArtProvider.$(BUILD_TYPE).o \
498500
src/BasicDataTypes.$(BUILD_TYPE).o \
501+
src/BatchedCharacterRenderer.$(BUILD_TYPE).o \
499502
src/BitArray.$(BUILD_TYPE).o \
500503
src/BitOffset.$(BUILD_TYPE).o \
501504
src/BitmapTool.$(BUILD_TYPE).o \
@@ -527,6 +530,7 @@ TEST_OBJS := \
527530
src/FileWriter.$(BUILD_TYPE).o \
528531
src/FillRangeDialog.$(BUILD_TYPE).o \
529532
src/FixedSizeValueRegion.$(BUILD_TYPE).o \
533+
src/FontCharacterCache.$(BUILD_TYPE).o \
530534
src/GotoOffsetDialog.$(BUILD_TYPE).o \
531535
src/HierarchicalByteAccumulator.$(BUILD_TYPE).o \
532536
src/HighlightColourMap.$(BUILD_TYPE).o \

Makefile.osx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ JANSSON_LIBS ?= -ljansson
5151
LUA_CFLAGS ?=
5252
LUA_LIBS ?= -llua
5353

54-
CFLAGS += -DREHEX_CACHE_STRING_BITMAPS
55-
CXXFLAGS += -DREHEX_CACHE_STRING_BITMAPS
56-
5754
all: REHex.app
5855

5956
include Makefile

Makefile.win

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ CXXFLAGS += -DIN_LIBUNISTRING
3737
CFLAGS += -Iinclude/gcc-win-include/
3838
CXXFLAGS += -Iinclude/gcc-win-include/
3939

40-
CFLAGS += -DREHEX_CACHE_STRING_BITMAPS
41-
CXXFLAGS += -DREHEX_CACHE_STRING_BITMAPS
42-
4340
CFLAGS += -D_FILE_OFFSET_BITS=64
4441
CXXFLAGS += -D_FILE_OFFSET_BITS=64
4542

msvc/all-tests/all-tests.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@
247247
<ClCompile Include="..\..\src\AppTestable.cpp" />
248248
<ClCompile Include="..\..\src\ArtProvider.cpp" />
249249
<ClCompile Include="..\..\src\BasicDataTypes.cpp" />
250+
<ClCompile Include="..\..\src\BatchedCharacterRenderer.cpp" />
250251
<ClCompile Include="..\..\src\BitArray.cpp" />
251252
<ClCompile Include="..\..\src\BitmapTool.cpp" />
252253
<ClCompile Include="..\..\src\BitOffset.cpp" />
@@ -278,6 +279,7 @@
278279
<ClCompile Include="..\..\src\FileWriter.cpp" />
279280
<ClCompile Include="..\..\src\FillRangeDialog.cpp" />
280281
<ClCompile Include="..\..\src\FixedSizeValueRegion.cpp" />
282+
<ClCompile Include="..\..\src\FontCharacterCache.cpp" />
281283
<ClCompile Include="..\..\src\GotoOffsetDialog.cpp" />
282284
<ClCompile Include="..\..\src\HierarchicalByteAccumulator.cpp" />
283285
<ClCompile Include="..\..\src\HighlightColourMap.cpp" />

msvc/all-tests/all-tests.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@
364364
<ClCompile Include="..\..\src\FixedSizeValueRegion.cpp">
365365
<Filter>src</Filter>
366366
</ClCompile>
367+
<ClCompile Include="..\..\src\FontCharacterCache.cpp">
368+
<Filter>src</Filter>
369+
</ClCompile>
367370
<ClCompile Include="..\..\src\HierarchicalByteAccumulator.cpp">
368371
<Filter>src</Filter>
369372
</ClCompile>
@@ -472,6 +475,9 @@
472475
<ClCompile Include="..\..\src\CustomNumericType.cpp">
473476
<Filter>src</Filter>
474477
</ClCompile>
478+
<ClCompile Include="..\..\src\BatchedCharacterRenderer.cpp">
479+
<Filter>src</Filter>
480+
</ClCompile>
475481
</ItemGroup>
476482
<ItemGroup>
477483
<ClInclude Include="..\..\res\ascii16.h">

msvc/rehex.vcxproj

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
<ConformanceMode>true</ConformanceMode>
197197
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
198198
<MultiProcessorCompilation>true</MultiProcessorCompilation>
199-
<PreprocessorDefinitions>_DEBUG;REHEX_CACHE_CHARACTER_BITMAPS;REHEX_CACHE_STRING_BITMAPS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
199+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
200200
<LanguageStandard>stdcpp20</LanguageStandard>
201201
<AdditionalOptions>-march=pentium-mmx %(AdditionalOptions)</AdditionalOptions>
202202
<DebugInformationFormat>OldStyle</DebugInformationFormat>
@@ -225,7 +225,7 @@
225225
<ConformanceMode>true</ConformanceMode>
226226
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
227227
<MultiProcessorCompilation>true</MultiProcessorCompilation>
228-
<PreprocessorDefinitions>_DEBUG;REHEX_CACHE_CHARACTER_BITMAPS;REHEX_CACHE_STRING_BITMAPS;REHEX_PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
228+
<PreprocessorDefinitions>_DEBUG;REHEX_PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
229229
<LanguageStandard>stdcpp20</LanguageStandard>
230230
<AdditionalOptions>-march=pentium-mmx %(AdditionalOptions)</AdditionalOptions>
231231
</ClCompile>
@@ -253,7 +253,7 @@
253253
<ConformanceMode>true</ConformanceMode>
254254
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
255255
<MultiProcessorCompilation>true</MultiProcessorCompilation>
256-
<PreprocessorDefinitions>_DEBUG;REHEX_CACHE_CHARACTER_BITMAPS;REHEX_CACHE_STRING_BITMAPS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
256+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
257257
<LanguageStandard>stdcpp20</LanguageStandard>
258258
<DebugInformationFormat>OldStyle</DebugInformationFormat>
259259
</ClCompile>
@@ -278,7 +278,7 @@
278278
<ConformanceMode>true</ConformanceMode>
279279
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
280280
<MultiProcessorCompilation>true</MultiProcessorCompilation>
281-
<PreprocessorDefinitions>_DEBUG;REHEX_CACHE_CHARACTER_BITMAPS;REHEX_CACHE_STRING_BITMAPS;REHEX_PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
281+
<PreprocessorDefinitions>_DEBUG;REHEX_PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
282282
<LanguageStandard>stdcpp20</LanguageStandard>
283283
</ClCompile>
284284
<Link>
@@ -304,7 +304,7 @@
304304
<ConformanceMode>true</ConformanceMode>
305305
<MultiProcessorCompilation>true</MultiProcessorCompilation>
306306
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
307-
<PreprocessorDefinitions>NDEBUG;REHEX_CACHE_CHARACTER_BITMAPS;REHEX_CACHE_STRING_BITMAPS;BUILD_HELP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
307+
<PreprocessorDefinitions>NDEBUG;BUILD_HELP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
308308
<LanguageStandard>stdcpp20</LanguageStandard>
309309
<AdditionalOptions>-march=pentium-mmx %(AdditionalOptions)</AdditionalOptions>
310310
<DebugInformationFormat>OldStyle</DebugInformationFormat>
@@ -336,7 +336,7 @@
336336
<ConformanceMode>true</ConformanceMode>
337337
<MultiProcessorCompilation>true</MultiProcessorCompilation>
338338
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
339-
<PreprocessorDefinitions>NDEBUG;REHEX_CACHE_CHARACTER_BITMAPS;REHEX_CACHE_STRING_BITMAPS;REHEX_PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
339+
<PreprocessorDefinitions>NDEBUG;REHEX_PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
340340
<LanguageStandard>stdcpp20</LanguageStandard>
341341
<AdditionalOptions>-march=pentium-mmx %(AdditionalOptions)</AdditionalOptions>
342342
</ClCompile>
@@ -367,7 +367,7 @@
367367
<ConformanceMode>true</ConformanceMode>
368368
<MultiProcessorCompilation>true</MultiProcessorCompilation>
369369
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
370-
<PreprocessorDefinitions>NDEBUG;REHEX_CACHE_CHARACTER_BITMAPS;REHEX_CACHE_STRING_BITMAPS;BUILD_HELP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
370+
<PreprocessorDefinitions>NDEBUG;BUILD_HELP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
371371
<LanguageStandard>stdcpp20</LanguageStandard>
372372
<DebugInformationFormat>OldStyle</DebugInformationFormat>
373373
</ClCompile>
@@ -395,7 +395,7 @@
395395
<ConformanceMode>true</ConformanceMode>
396396
<MultiProcessorCompilation>true</MultiProcessorCompilation>
397397
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
398-
<PreprocessorDefinitions>NDEBUG;REHEX_CACHE_CHARACTER_BITMAPS;REHEX_CACHE_STRING_BITMAPS;REHEX_PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
398+
<PreprocessorDefinitions>NDEBUG;REHEX_PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
399399
<LanguageStandard>stdcpp20</LanguageStandard>
400400
</ClCompile>
401401
<Link>
@@ -451,6 +451,7 @@
451451
<ClCompile Include="..\src\AppTestable.cpp" />
452452
<ClCompile Include="..\src\ArtProvider.cpp" />
453453
<ClCompile Include="..\src\BasicDataTypes.cpp" />
454+
<ClCompile Include="..\src\BatchedCharacterRenderer.cpp" />
454455
<ClCompile Include="..\src\BitArray.cpp" />
455456
<ClCompile Include="..\src\BitEditor.cpp" />
456457
<ClCompile Include="..\src\BitmapTool.cpp" />
@@ -489,6 +490,7 @@
489490
<ClCompile Include="..\src\FileWriter.cpp" />
490491
<ClCompile Include="..\src\FillRangeDialog.cpp" />
491492
<ClCompile Include="..\src\FixedSizeValueRegion.cpp" />
493+
<ClCompile Include="..\src\FontCharacterCache.cpp" />
492494
<ClCompile Include="..\src\GotoOffsetDialog.cpp" />
493495
<ClCompile Include="..\src\HierarchicalByteAccumulator.cpp" />
494496
<ClCompile Include="..\src\HighlightColourMap.cpp" />

msvc/rehex.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@
282282
<ClCompile Include="..\src\FixedSizeValueRegion.cpp">
283283
<Filter>Source Files</Filter>
284284
</ClCompile>
285+
<ClCompile Include="..\src\FontCharacterCache.cpp">
286+
<Filter>Source Files</Filter>
287+
</ClCompile>
285288
<ClCompile Include="..\src\HierarchicalByteAccumulator.cpp">
286289
<Filter>Source Files</Filter>
287290
</ClCompile>
@@ -354,6 +357,9 @@
354357
<ClCompile Include="..\res\dock_top.c">
355358
<Filter>res</Filter>
356359
</ClCompile>
360+
<ClCompile Include="..\src\BatchedCharacterRenderer.cpp">
361+
<Filter>Source Files</Filter>
362+
</ClCompile>
357363
</ItemGroup>
358364
<ItemGroup>
359365
<ClInclude Include="..\src\AboutDialog.hpp">

0 commit comments

Comments
 (0)