rsx: Implement GPU acceleration for rotated images

This commit is contained in:
kd-11 2019-03-16 13:58:15 +03:00 committed by kd-11
parent 5260f4b47d
commit bb65e45614
8 changed files with 116 additions and 81 deletions

View file

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <cmath>
@ -673,6 +673,16 @@ struct area_base
return{ x1, y1, x2 - x1, y2 - y1 };
}
constexpr T width() const
{
return (x1 < x2) ? (x2 - x1) : (x1 - x2);
}
constexpr T height() const
{
return (y1 < y2) ? (y2 - y1) : (y1 - y2);
}
void flip_vertical()
{
T _y = y1; y1 = y2; y2 = _y;
@ -693,6 +703,11 @@ struct area_base
return{ x2, y1, x1, y2 };
}
constexpr bool is_flipped() const
{
return (x1 > x2 || y1 > y2);
}
constexpr bool operator == (const area_base& rhs) const
{
return x1 == rhs.x1 && x2 == rhs.x2 && y1 == rhs.y1 && y2 == rhs.y2;