mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
LibSoftGPU: Use lroundf
instead of roundf
in rasterization rect
Casting a `float` to `int` might still inadvertently floor the value, while `lroundf` will return a properly rounded `long`.
This commit is contained in:
parent
37dd10fbbe
commit
439617cf6f
1 changed files with 2 additions and 2 deletions
|
@ -1316,8 +1316,8 @@ Gfx::IntRect Device::get_rasterization_rect_of_size(Gfx::IntSize size)
|
|||
// "Any fragments whose centers lie inside of this rectangle (or on its bottom or left
|
||||
// boundaries) are produced in correspondence with this particular group of elements."
|
||||
return {
|
||||
static_cast<int>(roundf(m_raster_position.window_coordinates.x())),
|
||||
static_cast<int>(roundf(m_raster_position.window_coordinates.y())),
|
||||
static_cast<int>(lroundf(m_raster_position.window_coordinates.x())),
|
||||
static_cast<int>(lroundf(m_raster_position.window_coordinates.y())),
|
||||
size.width(),
|
||||
size.height(),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue