Own brush workers and thin preview/platform seams

This commit is contained in:
2026-06-16 06:54:14 +02:00
parent a76560e3df
commit 56c4743e66
11 changed files with 415 additions and 180 deletions

View File

@@ -2,21 +2,28 @@
#ifdef __LINUX__
#include <string>
#include <GLFW/glfw3.h>
#include "app.h"
#include <utility>
namespace pp::platform::linux {
namespace {
std::function<void(std::string)> g_fps_title_callback;
void linux_update_fps(int frames)
{
App::I->title("PanoPainter - " + std::to_string(frames) + " FPS");
if (!g_fps_title_callback)
return;
g_fps_title_callback("PanoPainter - " + std::to_string(frames) + " FPS");
}
}
void set_fps_title_callback(std::function<void(std::string)> callback)
{
g_fps_title_callback = std::move(callback);
}
void report_rendered_frames(int frames)
{
linux_update_fps(frames);
@@ -26,6 +33,11 @@ void report_rendered_frames(int frames)
#else
namespace pp::platform::linux {
void set_fps_title_callback(std::function<void(std::string)> callback)
{
(void)callback;
}
void report_rendered_frames(int frames)
{
(void)frames;

View File

@@ -1,7 +1,11 @@
#pragma once
#include <functional>
#include <string>
namespace pp::platform::linux {
void set_fps_title_callback(std::function<void(std::string)> callback);
void report_rendered_frames(int frames);
}