1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:47:34 +00:00

Make sure all GraphicsBitmap scanlines are 16-byte aligned.

This is a prerequisite for some optimizations.
This commit is contained in:
Andreas Kling 2019-05-06 14:04:54 +02:00
parent fafdda8902
commit cec16105cc
5 changed files with 29 additions and 24 deletions

View file

@ -41,6 +41,11 @@ extern "C" void* mmx_memcpy(void* to, const void* from, size_t);
);
}
inline constexpr dword round_up_to_power_of_two(dword value, dword power_of_two)
{
return ((value - 1) & ~ (power_of_two - 1)) + power_of_two;
}
namespace AK {
template<typename T>