removed uneeded parameter from get_main_buffer_blur
This commit is contained in:
parent
2b286dfe8f
commit
e065838dd9
1 changed files with 4 additions and 7 deletions
|
@ -230,7 +230,7 @@ void render_blur_segments(struct fx_renderer *renderer,
|
||||||
|
|
||||||
// Blurs the main_buffer content and returns the blurred framebuffer
|
// Blurs the main_buffer content and returns the blurred framebuffer
|
||||||
struct fx_framebuffer *get_main_buffer_blur(struct fx_renderer *renderer, struct sway_output *output,
|
struct fx_framebuffer *get_main_buffer_blur(struct fx_renderer *renderer, struct sway_output *output,
|
||||||
pixman_region32_t *original_damage, const float box_matrix[static 9], const struct wlr_box *box) {
|
pixman_region32_t *original_damage, const struct wlr_box *box) {
|
||||||
struct wlr_output *wlr_output = output->wlr_output;
|
struct wlr_output *wlr_output = output->wlr_output;
|
||||||
struct wlr_box monitor_box = get_monitor_box(wlr_output);
|
struct wlr_box monitor_box = get_monitor_box(wlr_output);
|
||||||
|
|
||||||
|
@ -244,8 +244,7 @@ struct fx_framebuffer *get_main_buffer_blur(struct fx_renderer *renderer, struct
|
||||||
pixman_region32_t damage;
|
pixman_region32_t damage;
|
||||||
pixman_region32_init(&damage);
|
pixman_region32_init(&damage);
|
||||||
pixman_region32_copy(&damage, original_damage);
|
pixman_region32_copy(&damage, original_damage);
|
||||||
wlr_region_transform(&damage, &damage, transform,
|
wlr_region_transform(&damage, &damage, transform, monitor_box.width, monitor_box.height);
|
||||||
monitor_box.width, monitor_box.height);
|
|
||||||
|
|
||||||
int blur_size = pow(2, config->blur_params.num_passes) * config->blur_params.radius;
|
int blur_size = pow(2, config->blur_params.num_passes) * config->blur_params.radius;
|
||||||
wlr_region_expand(&damage, &damage, blur_size);
|
wlr_region_expand(&damage, &damage, blur_size);
|
||||||
|
@ -343,8 +342,7 @@ void render_blur(bool optimized, struct sway_output *output,
|
||||||
pixman_region32_intersect(&inverse_opaque, &inverse_opaque, &damage);
|
pixman_region32_intersect(&inverse_opaque, &inverse_opaque, &damage);
|
||||||
|
|
||||||
// Render the blur into its own buffer
|
// Render the blur into its own buffer
|
||||||
buffer = get_main_buffer_blur(renderer, output, &inverse_opaque,
|
buffer = get_main_buffer_blur(renderer, output, &inverse_opaque, dst_box);
|
||||||
wlr_output->transform_matrix, dst_box);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the blurred texture
|
// Draw the blurred texture
|
||||||
|
@ -516,8 +514,7 @@ void render_monitor_blur(struct sway_output *output, pixman_region32_t *damage)
|
||||||
pixman_region32_init_rect(&fake_damage, 0, 0, monitor_box.width, monitor_box.height);
|
pixman_region32_init_rect(&fake_damage, 0, 0, monitor_box.width, monitor_box.height);
|
||||||
|
|
||||||
// Render the blur
|
// Render the blur
|
||||||
struct fx_framebuffer *buffer = get_main_buffer_blur(renderer, output, &fake_damage,
|
struct fx_framebuffer *buffer = get_main_buffer_blur(renderer, output, &fake_damage, &monitor_box);
|
||||||
wlr_output->transform_matrix, &monitor_box);
|
|
||||||
|
|
||||||
// Render the newly blurred content into the blur_buffer
|
// Render the newly blurred content into the blur_buffer
|
||||||
fx_framebuffer_create(&renderer->blur_buffer,
|
fx_framebuffer_create(&renderer->blur_buffer,
|
||||||
|
|
Loading…
Add table
Reference in a new issue