diff options
author | Erik Reider <[email protected]> | 2024-01-03 23:50:21 +0100 |
---|---|---|
committer | Erik Reider <[email protected]> | 2024-01-04 02:11:25 +0100 |
commit | b392638c8a8d142376fa0f44b3cc0f3a6ebd93f3 (patch) | |
tree | 669262d9e7341340af1c227e005a0c25bf014873 /render | |
parent | c15af4a182314d8384fc6b28e7c3fc58c0352b83 (diff) |
Fixed scaling issues
Diffstat (limited to 'render')
-rw-r--r-- | render/fx_renderer/fx_pass.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/render/fx_renderer/fx_pass.c b/render/fx_renderer/fx_pass.c index e825851..9a8c90c 100644 --- a/render/fx_renderer/fx_pass.c +++ b/render/fx_renderer/fx_pass.c @@ -19,6 +19,7 @@ struct fx_render_texture_options fx_render_texture_options_default( const struct wlr_render_texture_options *base) { struct fx_render_texture_options options = { .corner_radius = 0, + .scale = 1.0f, .clip_box = NULL, }; memcpy(&options.base, base, sizeof(*base)); @@ -27,7 +28,9 @@ struct fx_render_texture_options fx_render_texture_options_default( struct fx_render_rect_options fx_render_rect_options_default( const struct wlr_render_rect_options *base) { - struct fx_render_rect_options options = {}; + struct fx_render_rect_options options = { + .scale = 1.0f, + }; memcpy(&options.base, base, sizeof(*base)); return options; } @@ -376,7 +379,7 @@ void fx_render_pass_add_box_shadow(struct fx_gles_render_pass *pass, wlr_render_rect_options_get_box(options, pass->buffer->buffer, &box); assert(box.width > 0 && box.height > 0); struct wlr_box surface_box = box; - float blur_sigma = shadow_data->blur_sigma; + float blur_sigma = shadow_data->blur_sigma * fx_options->scale; // Extend the size of the box box.x -= blur_sigma; |