mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-05 21:15:59 +01:00
wlr_scene: Assert that buffer returned from swapchain is the right size
This commit is contained in:
parent
c79ed0706d
commit
8220184a72
1 changed files with 6 additions and 1 deletions
|
@ -1686,8 +1686,9 @@ bool wlr_scene_output_build_state(struct wlr_scene_output *scene_output,
|
|||
.output = scene_output,
|
||||
};
|
||||
|
||||
int resolution_width, resolution_height;
|
||||
output_pending_resolution(output, state,
|
||||
&render_data.trans_width, &render_data.trans_height);
|
||||
&resolution_width, &resolution_height);
|
||||
|
||||
if (state->committed & WLR_OUTPUT_STATE_TRANSFORM) {
|
||||
if (render_data.transform != state->transform) {
|
||||
|
@ -1705,6 +1706,8 @@ bool wlr_scene_output_build_state(struct wlr_scene_output *scene_output,
|
|||
render_data.scale = state->scale;
|
||||
}
|
||||
|
||||
render_data.trans_width = resolution_width;
|
||||
render_data.trans_height = resolution_height;
|
||||
wlr_output_transform_coords(render_data.transform,
|
||||
&render_data.trans_width, &render_data.trans_height);
|
||||
|
||||
|
@ -1800,6 +1803,8 @@ bool wlr_scene_output_build_state(struct wlr_scene_output *scene_output,
|
|||
return false;
|
||||
}
|
||||
|
||||
assert(buffer->width == resolution_width && buffer->height == resolution_height);
|
||||
|
||||
if (timer) {
|
||||
timer->render_timer = wlr_render_timer_create(output->renderer);
|
||||
|
||||
|
|
Loading…
Reference in a new issue