| 333 | } |
| 334 | |
| 335 | wlr_fbox wf::render_target_t::geometry_fbox_from_framebuffer_box(wlr_fbox fb_box) const |
| 336 | { |
| 337 | if (subbuffer) |
| 338 | { |
| 339 | fb_box = scale_fbox(geometry_to_fbox(subbuffer.value()), |
| 340 | {0.0, 0.0, (double)get_size().width, (double)get_size().height}, fb_box); |
| 341 | } |
| 342 | |
| 343 | wf::dimensions_t current_fb_dimensions = get_size(); |
| 344 | wlr_fbox result; |
| 345 | wlr_fbox_transform(&result, &fb_box, (wl_output_transform)wl_transform, |
| 346 | current_fb_dimensions.width, current_fb_dimensions.height); |
| 347 | |
| 348 | if (scale != 0.0f) |
| 349 | { |
| 350 | result = result * (1.0 / scale); |
| 351 | } else |
| 352 | { |
| 353 | LOGE("Render target scale is zero, cannot invert framebuffer box!"); |
| 354 | return {0, 0, 0, 0}; // Return an empty/invalid box |
| 355 | } |
| 356 | |
| 357 | result.x += this->geometry.x; |
| 358 | result.y += this->geometry.y; |
| 359 | return result; |
| 360 | } |
| 361 | |
| 362 | wlr_box wf::render_target_t::geometry_box_from_framebuffer_box(wlr_box fb_box) const |
| 363 | { |
nothing calls this directly
no outgoing calls
no test coverage detected