1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00
tracy/profiler/src/Backend.hpp
Ivan Molodetskikh 16434f116c Add a way for Backend to signal scale changes
On Wayland the scale now changes to the correct value as the Tracy
window is moved across monitors.

If the scale is overridden from environment, it does not change, just
like before.
2024-01-24 12:34:23 +04:00

35 lines
625 B
C++

#ifndef __BACKEND_HPP__
#define __BACKEND_HPP__
#include <functional>
#include <stdint.h>
#include "WindowPosition.hpp"
class RunQueue;
class Backend
{
public:
Backend( const char* title, const std::function<void()>& redraw, const std::function<void(float)>& scaleChanged, RunQueue* mainThreadTasks );
~Backend();
void Show();
void Run();
void Attention();
void NewFrame( int& w, int& h );
void EndFrame();
void SetIcon( uint8_t* data, int w, int h );
void SetTitle( const char* title );
float GetDpiScale();
private:
WindowPosition m_winPos;
int m_w, m_h;
};
#endif