i originally added LzwDataBuffer under a misunderstanding that i was
going to need to track values in these buffers that were not just
limited to 8-bits in size. this is not actually the case, so we can
do this change to simplify things.
maybe marginally better/simpler, but also some minor cleanups and a
semi-hackfix for minor destination blit corners being cutoff slightly
for some rotation angles
but there are still performance improvements we can make. but at least
now we're not doing some silly double-pixel draw as a band-aid over
missing/gap pixels. and we no longer sometimes have missing scanlines
due to floating-point rounding issues.
mainly switching #[derive(Debug)] to manual std::fmt::Debug impls to
remove debug strings that would otherwise contain long strings of
byte arrays which most of the time isn't so useful to see in any kind
of debug logging
this might still need to be tweaked still as benchmarks are showing
some performance loses (though, also, some minor performance gains?)
so i guess the lambda functions may not always be inlined, or if they
are, the optimizer isn't able to do the same level of optimizations as
it was before? unsure as of yet, so need to investigate further.
however, none of the performance regressions were huge, so i think this
is acceptable to me for now.
libretrogd was never intended to push performance boundaries anyway :-)
rename the old "apply" to "apply_to_device". meh. naming is hard.
i expect that most of the time i'd want to use the "apply" method i'm
adding here that handles device locking internally, so that is why i've
chosen to let it be called "apply" and to rename the other one.
this is more useful because playing/stopping can be done on a specific
channel more easily by specifying a channel index. and the index can
obviously also be used to get the channel itself when/if needed, but
it's not super convenient to get the index of a channel when you only
have the channel itself