new backends: blur interface update
To prepare for different blur methods, the blur interface of backends has been splitted into two parts. Now to use blur, a blur context must be created first; then, the blur method should be called with the blur context created. Updated the existing backends to the new interface. Also implemented handling of the new blur options. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -174,6 +174,7 @@ void paint_all_new(session_t *ps, struct managed_win *t, bool ignore_damage) {
|
||||
// We need to blur the bounding shape of the window
|
||||
// (reg_paint = reg_bound \cap reg_damage)
|
||||
ps->backend_data->ops->blur(ps->backend_data, w->opacity,
|
||||
ps->backend_blur_context,
|
||||
®_paint, ®_visible);
|
||||
} else if (frame_transparent && ps->o.blur_background_frame) {
|
||||
// Window itself is solid, we only need to blur the frame
|
||||
@ -183,6 +184,7 @@ void paint_all_new(session_t *ps, struct managed_win *t, bool ignore_damage) {
|
||||
// make sure reg_blur \in reg_damage
|
||||
pixman_region32_intersect(®_blur, ®_blur, ®_damage);
|
||||
ps->backend_data->ops->blur(ps->backend_data, w->opacity,
|
||||
ps->backend_blur_context,
|
||||
®_blur, ®_visible);
|
||||
pixman_region32_fini(®_blur);
|
||||
}
|
||||
|
Reference in New Issue
Block a user