[perf] reduce desktop build dependencies and binary size

This commit is contained in:
dijunkun
2026-09-25 01:47:20 +08:00
parent 3c5b3f8e38
commit e62d473b64
26 changed files with 249 additions and 147 deletions
@@ -5,6 +5,7 @@
#include <SDL3/SDL.h>
#include <openssl/rand.h>
#include <slint.h>
#include <nlohmann/json.hpp>
#include <tinyfiledialogs.h>
#include <algorithm>
@@ -1,5 +1,9 @@
#include "features/clipboard/clipboard_controller.h"
#include <SDL3/SDL_clipboard.h>
#include <SDL3/SDL_error.h>
#include <SDL3/SDL_events.h>
#include <cstring>
#include <shared_mutex>
#include <utility>
@@ -1,7 +1,11 @@
#ifndef CROSSDESK_GUI_CLIPBOARD_CONTROLLER_H_
#define CROSSDESK_GUI_CLIPBOARD_CONTROLLER_H_
/*
* @Author: DI JUNKUN
* @Date: 2026-09-25
* Copyright (c) 2026 by DI JUNKUN, All Rights Reserved.
*/
#include <SDL3/SDL.h>
#ifndef _CLIPBOARD_CONTROLLER_H_
#define _CLIPBOARD_CONTROLLER_H_
#include <atomic>
#include <cstddef>
@@ -42,4 +46,4 @@ private:
} // namespace crossdesk
#endif // CROSSDESK_GUI_CLIPBOARD_CONTROLLER_H_
#endif // _CLIPBOARD_CONTROLLER_H_
@@ -1,5 +1,9 @@
#include "features/devices/session_device_manager.h"
#include <SDL3/SDL_audio.h>
#include <SDL3/SDL_error.h>
#include <SDL3/SDL_init.h>
#include <display_stream_id.h>
#include <remote_action.h>
@@ -8,6 +12,8 @@
#include <cstdlib>
#include <utility>
#include "device_controller_factory.h"
#include "screen_capturer_factory.h"
#include "platform.h"
#include "rd_log.h"
#include "runtime/gui_runtime.h"
@@ -8,8 +8,6 @@
#define _SESSION_DEVICE_MANAGER_H_
#include <SDL3/SDL.h>
#include <atomic>
#include <chrono>
#include <cstddef>
@@ -22,14 +20,17 @@
#include <remote_action.h>
#include "device_controller.h"
#include "device_controller_factory.h"
#include "display_info.h"
#include "screen_capturer_factory.h"
#include "speaker_capture_controller.h"
struct SDL_AudioStream;
namespace crossdesk {
class GuiRuntime;
class DeviceControllerFactory;
class ScreenCapturerFactory;
class ScreenCapturer;
// Owns media capture/playback and remote input devices for the active GUI
// session. GuiRuntime supplies application intent; this class handles device
@@ -12,7 +12,7 @@
#include <string>
#include <unordered_map>
#include "runtime/gui_state.h"
#include "runtime/remote_session.h"
namespace crossdesk {
@@ -1,4 +1,5 @@
#include "rendering/slint_video_presenter.h"
#include "crossdesk_ui.h"
#include <libyuv.h>
#include <slint.h>
@@ -14,7 +14,13 @@
#include <string>
#include <vector>
#include "crossdesk_ui.h"
namespace slint {
template <typename T> class ComponentHandle;
}
namespace crossdesk::ui {
class StreamWindow;
}
namespace crossdesk {
@@ -1,5 +1,7 @@
#include "runtime/gui_runtime.h"
#include <SDL3/SDL_timer.h>
#include <algorithm>
#include <chrono>
#include <cstring>
+3 -2
View File
@@ -8,6 +8,7 @@
#define _GUI_RUNTIME_H_
#include <atomic>
#include <cstdint>
#include <deque>
#include <memory>
#include <string>
@@ -44,8 +45,8 @@ class GuiRuntime : protected gui_detail::GuiState {
GuiRuntime();
~GuiRuntime();
static void SdlCaptureAudioIn(void* userdata, Uint8* stream, int len);
static void SdlCaptureAudioOut(void* userdata, Uint8* stream, int len);
static void SdlCaptureAudioIn(void* userdata, uint8_t* stream, int len);
static void SdlCaptureAudioOut(void* userdata, uint8_t* stream, int len);
int CreateConnectionPeer();
int ConnectTo(const std::string& remote_id, const char* password,
@@ -1,3 +1,5 @@
#include <SDL3/SDL_timer.h>
#include "runtime/peer_event_handler.h"
#include <remote_action.h>
@@ -1,3 +1,5 @@
#include <SDL3/SDL_timer.h>
/*
* @Author: DI JUNKUN
* @Date: 2026-09-11