Compare commits

..

No commits in common. "60c3559e08d6d0d7530e8038135be61fadb00925" and "abb0b64b7c7a9822c49772d21d3c92c805dfe322" have entirely different histories.

6 changed files with 8 additions and 14 deletions

2
Cargo.lock generated
View file

@ -1440,7 +1440,7 @@ dependencies = [
[[package]] [[package]]
name = "servicepoint" name = "servicepoint"
version = "0.13.2" version = "0.13.2"
source = "git+https://git.berlin.ccc.de/servicepoint/servicepoint/?branch=next#114385868af03f8cba7c87a630b501bb0106d140" source = "git+https://git.berlin.ccc.de/servicepoint/servicepoint/?branch=next#300bb5d6474f0f6152ab04feed4478995fcb3ec8"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"bzip2", "bzip2",

View file

@ -31,8 +31,3 @@ pathfinder_geometry = "0.5.1"
winit = "0.30" winit = "0.30"
# for drawing pixels onto the surface of the window # for drawing pixels onto the surface of the window
softbuffer = "0.4.6" softbuffer = "0.4.6"
[profile.release]
lto = true # Enable link-time optimization
codegen-units = 1 # Reduce number of codegen units to increase optimizations
strip = true # Strip symbols from binary

View file

@ -5,7 +5,7 @@ use crate::{
}; };
use log::{debug, error, info, trace, warn}; use log::{debug, error, info, trace, warn};
use servicepoint::{ use servicepoint::{
BinaryOperation, BitVecCommand, Bitmap, BitmapCommand, GlobalBrightnessCommand, BinaryOperation, BitVecCommand, Bitmap, BitmapCommand, BrightnessCommand,
BrightnessGrid, BrightnessGridCommand, CharGridCommand, ClearCommand, BrightnessGrid, BrightnessGridCommand, CharGridCommand, ClearCommand,
CompressionCode, Cp437GridCommand, FadeOutCommand, Grid, HardResetCommand, CompressionCode, Cp437GridCommand, FadeOutCommand, Grid, HardResetCommand,
Origin, TypedCommand, PIXEL_COUNT, PIXEL_WIDTH, TILE_SIZE, Origin, TypedCommand, PIXEL_COUNT, PIXEL_WIDTH, TILE_SIZE,
@ -214,7 +214,7 @@ impl CommandExecute for CharGridCommand {
} }
} }
impl CommandExecute for GlobalBrightnessCommand { impl CommandExecute for BrightnessCommand {
fn execute(&self, context: &CommandExecutionContext) -> ExecutionResult { fn execute(&self, context: &CommandExecutionContext) -> ExecutionResult {
context.luma.write().unwrap().fill(self.brightness); context.luma.write().unwrap().fill(self.brightness);
Success Success

View file

@ -16,9 +16,8 @@ impl Cp437Font {
impl Default for Cp437Font { impl Default for Cp437Font {
fn default() -> Self { fn default() -> Self {
let mut bitmaps = core::array::from_fn(|_| { let mut bitmaps =
Bitmap::new(TILE_SIZE, TILE_SIZE).unwrap() core::array::from_fn(|_| Bitmap::new(TILE_SIZE, TILE_SIZE).unwrap());
});
for (char_code, bitmap) in bitmaps.iter_mut().enumerate() { for (char_code, bitmap) in bitmaps.iter_mut().enumerate() {
let bits = CP437_FONT_LINEAR[char_code]; let bits = CP437_FONT_LINEAR[char_code];

View file

@ -39,11 +39,11 @@ fn main() {
.font .font
.map(FontRenderer8x8::from_name) .map(FontRenderer8x8::from_name)
.unwrap_or_else(FontRenderer8x8::default); .unwrap_or_else(FontRenderer8x8::default);
let context = CommandExecutionContext::new(&display, &luma, font_renderer); let command_executor = CommandExecutionContext::new(&display, &luma, font_renderer);
let mut udp_server = UdpServer::new( let mut udp_server = UdpServer::new(
cli.bind, cli.bind,
stop_udp_rx, stop_udp_rx,
context, command_executor,
event_loop.create_proxy(), event_loop.create_proxy(),
); );
let mut gui = Gui::new(&display, &luma, stop_udp_tx, cli.gui); let mut gui = Gui::new(&display, &luma, stop_udp_tx, cli.gui);

View file

@ -10,7 +10,7 @@ use std::{
}; };
use winit::event_loop::EventLoopProxy; use winit::event_loop::EventLoopProxy;
const BUF_SIZE: usize = 8985 * 2; const BUF_SIZE: usize = 8985;
#[derive(Debug)] #[derive(Debug)]
pub struct UdpServer<'t> { pub struct UdpServer<'t> {