mirror of
https://github.com/yshui/picom.git
synced 2024-11-25 14:06:08 -05:00
Merge pull request #75 from yshui/split-backend-prepare
Split backend prepare
This commit is contained in:
commit
d6a54c25e9
4 changed files with 14 additions and 3 deletions
|
@ -443,7 +443,7 @@ static void paint_root(session_t *ps, const region_t *reg_paint) {
|
|||
ps->root_tile_paint.pict);
|
||||
}
|
||||
|
||||
static xcb_image_t *make_shadow(session_t *ps, double opacity, int width, int height) {
|
||||
xcb_image_t *make_shadow(session_t *ps, double opacity, int width, int height) {
|
||||
xcb_image_t *ximage;
|
||||
int ylimit, xlimit;
|
||||
int swidth = width + ps->cgsize;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <xcb/render.h>
|
||||
#include <xcb/xcb_image.h>
|
||||
#include "region.h"
|
||||
|
||||
typedef struct _glx_texture glx_texture_t;
|
||||
|
@ -34,3 +35,5 @@ void free_root_tile(session_t *ps);
|
|||
|
||||
bool init_render(session_t *ps);
|
||||
void deinit_render(session_t *ps);
|
||||
|
||||
xcb_image_t *make_shadow(session_t *ps, double opacity, int width, int height);
|
||||
|
|
|
@ -117,6 +117,8 @@ void win_get_region_noframe_local(win *w, region_t *res) {
|
|||
pixman_region32_init_rect(res, x, y, width, height);
|
||||
}
|
||||
|
||||
gen_by_val(win_get_region_noframe_local)
|
||||
|
||||
/**
|
||||
* Add a window to damaged area.
|
||||
*
|
||||
|
@ -1130,6 +1132,8 @@ void win_extents(win *w, region_t *res) {
|
|||
w->g.y + w->shadow_dy, w->shadow_width, w->shadow_height);
|
||||
}
|
||||
|
||||
gen_by_val(win_extents)
|
||||
|
||||
/**
|
||||
* Update the out-dated bounding shape of a window.
|
||||
*
|
||||
|
|
|
@ -115,7 +115,8 @@ struct win {
|
|||
bool need_configure;
|
||||
/// Queued <code>ConfigureNotify</code> when the window is unmapped.
|
||||
xcb_configure_notify_event_t queue_configure;
|
||||
/// The region of screen that will be obscured when windows above is painted.
|
||||
/// The region of screen that will be obscured when windows above is painted,
|
||||
/// in global coordinates.
|
||||
/// We use this to reduce the pixels that needed to be paint when painting
|
||||
/// this window and anything underneath. Depends on window frame
|
||||
/// opacity state, window geometry, window mapped/unmapped state,
|
||||
|
@ -303,12 +304,14 @@ void win_update_focused(session_t *ps, win *w);
|
|||
// XXX was win_border_size
|
||||
void win_update_bounding_shape(session_t *ps, win *w);
|
||||
/**
|
||||
* Get a rectangular region a window (and possibly its shadow) occupies.
|
||||
* Get a rectangular region in global coordinates a window (and possibly
|
||||
* its shadow) occupies.
|
||||
*
|
||||
* Note w->shadow and shadow geometry must be correct before calling this
|
||||
* function.
|
||||
*/
|
||||
void win_extents(win *w, region_t *res);
|
||||
region_t win_extents_by_val(win *w);
|
||||
/**
|
||||
* Add a window to damaged area.
|
||||
*
|
||||
|
@ -322,6 +325,7 @@ void add_damage_from_win(session_t *ps, win *w);
|
|||
* Return region in global coordinates.
|
||||
*/
|
||||
void win_get_region_noframe_local(win *w, region_t *);
|
||||
region_t win_get_region_noframe_local_by_val(win *w);
|
||||
/**
|
||||
* Retrieve frame extents from a window.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue