Move cursor trail draw call into shaders.c
This commit is contained in:
parent
d52f2e7981
commit
1073e59598
3 changed files with 5 additions and 6 deletions
|
|
@ -793,8 +793,8 @@ prepare_to_render_os_window(OSWindow *os_window, monotonic_t now, unsigned int *
|
|||
|
||||
static void
|
||||
render_prepared_os_window(OSWindow *os_window, unsigned int active_window_id, color_type active_window_bg, unsigned int num_visible_windows, bool all_windows_have_same_bg) {
|
||||
setup_os_window_for_rendering(os_window, true);
|
||||
Tab *tab = os_window->tabs + os_window->active_tab;
|
||||
setup_os_window_for_rendering(os_window, tab, NULL, true);
|
||||
BorderRects *br = &tab->border_rects;
|
||||
draw_borders(br->vao_idx, br->num_border_rects, br->rect_buf, br->is_dirty, active_window_bg, num_visible_windows, all_windows_have_same_bg, os_window);
|
||||
br->is_dirty = false;
|
||||
|
|
@ -812,8 +812,7 @@ render_prepared_os_window(OSWindow *os_window, unsigned int active_window_id, co
|
|||
w->cursor_opacity_at_last_render = WD.screen->cursor_render_info.opacity; w->last_cursor_shape = WD.screen->cursor_render_info.shape;
|
||||
}
|
||||
}
|
||||
if (OPT(cursor_trail) && tab->cursor_trail.needs_render) draw_cursor_trail(&tab->cursor_trail, active_window);
|
||||
setup_os_window_for_rendering(os_window, false);
|
||||
setup_os_window_for_rendering(os_window, tab, active_window, false);
|
||||
swap_window_buffers(os_window);
|
||||
os_window->last_active_tab = os_window->active_tab; os_window->last_num_tabs = os_window->num_tabs; os_window->last_active_window_id = active_window_id;
|
||||
os_window->focused_at_last_render = os_window->is_focused;
|
||||
|
|
|
|||
|
|
@ -1175,7 +1175,7 @@ draw_resizing_text(OSWindow *w) {
|
|||
|
||||
|
||||
void
|
||||
setup_os_window_for_rendering(OSWindow *os_window, bool start) {
|
||||
setup_os_window_for_rendering(OSWindow *os_window, Tab *tab, Window *active_window, bool start) {
|
||||
if (start) {
|
||||
if (os_window->live_resize.in_progress) {
|
||||
blank_os_window(os_window);
|
||||
|
|
@ -1197,6 +1197,7 @@ setup_os_window_for_rendering(OSWindow *os_window, bool start) {
|
|||
draw_bg_image(os_window);
|
||||
}
|
||||
} else {
|
||||
if (OPT(cursor_trail) && tab->cursor_trail.needs_render) draw_cursor_trail(&tab->cursor_trail, active_window);
|
||||
if (os_window->needs_layers) {
|
||||
set_framebuffer_to_use_for_output(0);
|
||||
bind_framebuffer_for_output(0);
|
||||
|
|
|
|||
|
|
@ -400,7 +400,6 @@ ssize_t create_graphics_vao(void);
|
|||
ssize_t create_border_vao(void);
|
||||
bool send_cell_data_to_gpu(ssize_t, Screen *, OSWindow *);
|
||||
void draw_cells(const WindowRenderData*, OSWindow *, bool, bool, bool, Window*);
|
||||
void draw_cursor_trail(CursorTrail *trail, Window *active_window);
|
||||
bool update_cursor_trail(CursorTrail *ct, Window *w, monotonic_t now, OSWindow *os_window);
|
||||
void set_gpu_viewport(unsigned w, unsigned h);
|
||||
void free_texture(uint32_t*);
|
||||
|
|
@ -452,5 +451,5 @@ void update_mouse_pointer_shape(void);
|
|||
void adjust_window_size_for_csd(OSWindow *w, int width, int height, int *adjusted_width, int *adjusted_height);
|
||||
void dispatch_buffered_keys(Window *w);
|
||||
bool screen_needs_rendering_in_layers(OSWindow *os_window, Window *w, Screen *screen);
|
||||
void setup_os_window_for_rendering(OSWindow*, bool);
|
||||
void setup_os_window_for_rendering(OSWindow*, Tab*, Window*, bool);
|
||||
void swap_window_buffers(OSWindow *w);
|
||||
|
|
|
|||
Loading…
Reference in a new issue