The event wasn't fired when the window size got changed through an API
call. Unfortunately after this change the event gets fired any time
I call setMaxWindowSize(), not just when the size changes.
Bloaty says it saved 10 kB in Debug build of MagnumGL:
VM SIZE FILE SIZE
-------------- --------------
[ = ] 0 .debug_info +1.59Ki +0.0%
+0.4% +1.50Ki .text +1.50Ki +0.4%
[ = ] 0 .debug_str +409 +0.0%
[ = ] 0 .debug_line +276 +0.1%
[ = ] 0 .debug_abbrev +20 +0.0%
-28.6% -2 [LOAD [RX]] -2 -28.6%
[ = ] 0 [Unmapped] -4.28Ki -41.0%
-22.7% -9.23Ki .rodata -9.23Ki -22.7%
-0.8% -7.73Ki TOTAL -9.73Ki -0.1%
And 4 kB in Release:
VM SIZE FILE SIZE
-------------- --------------
+1.1% +3.44Ki .text +3.44Ki +1.1%
+1.7% +1.39Ki .eh_frame +1.39Ki +1.7%
[ = ] 0 [Unmapped] +656 +51%
-25.5% -9.47Ki .rodata -9.47Ki -25.5%
-0.7% -4.64Ki TOTAL -4.00Ki -0.4%
That's not negative, so I guess that's good. This change is of course
more significant in the context of a minimal WebGL build, where the exe
can be as little as 50 kB -- there 4 kB is almost 10% of the size.
Before, the functions didn't accept a r-value view. Now they do, and
they also still accept l-values.
However, for a proper thing I should be making those non-templated,
specialized for Float and Double and implemented using SIMD. Well,
later.
Instead of prefixing every value with (Compressed)PixelFormat::,
printing that just once. Also moved the name table to an external header
so it can be used later for configuration value parsing. Compared to
the previous commit, Bloaty reports a save, meaning these two commits in
total save about 4 kB:
VM SIZE FILE SIZE
-------------- --------------
+687% +3.70Ki .rela.dyn +3.70Ki +687%
+15e2% +1.26Ki .data.rel.ro +1.26Ki +15e2%
[ = ] 0 .strtab +100 +0.1%
[ = ] 0 .symtab +48 +0.2%
-50.0% -8 [LOAD [RW]] -8 -50.0%
-3.1% -888 .eh_frame -888 -3.1%
-1.5% -1.92Ki .text -1.92Ki -1.5%
[ = ] 0 [Unmapped] -1.97Ki -32.2%
-38.5% -4.19Ki .rodata -4.19Ki -38.5%
-0.7% -2.02Ki TOTAL -3.85Ki -1.0%
Well. Bloaty reports a 0.3% increase in Debug and 0.1% in Release, but I
guess if the enums would be larger, the savings would be actually
significant.
At first I wanted to add --importers / --converters options, but that
didn't really work because the argument parser complained that
input/output is not set.