mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-02-16 11:24:27 +01:00
Move renderer from sc_display to sc_screen
Make sc_screen the owner of both the SDL window and the SDL renderer. This is the first step toward limiting the role of sc_display to texture management. PR #6651 <https://github.com/Genymobile/scrcpy/pull/6651>
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
#include "trait/frame_sink.h"
|
||||
#include "trait/mouse_processor.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
# define SC_DISPLAY_FORCE_OPENGL_CORE_PROFILE
|
||||
#endif
|
||||
|
||||
struct sc_screen {
|
||||
struct sc_frame_sink frame_sink; // frame sink trait
|
||||
|
||||
@@ -49,6 +53,11 @@ struct sc_screen {
|
||||
} req;
|
||||
|
||||
SDL_Window *window;
|
||||
SDL_Renderer *renderer;
|
||||
#ifdef SC_DISPLAY_FORCE_OPENGL_CORE_PROFILE
|
||||
SDL_GLContext gl_context;
|
||||
#endif
|
||||
|
||||
struct sc_size frame_size;
|
||||
struct sc_size content_size; // rotated frame_size
|
||||
|
||||
|
||||
Reference in New Issue
Block a user