Software Backend: Rename 'copy_region' to 'CopyRegion'
This commit is contained in:
parent
0f7f4ccaf9
commit
1a1c3560ce
|
@ -9,8 +9,8 @@ namespace SW
|
||||||
// Modified from
|
// Modified from
|
||||||
// http://tech-algorithm.com/articles/nearest-neighbor-image-scaling/
|
// http://tech-algorithm.com/articles/nearest-neighbor-image-scaling/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void copy_region(const T* const source, const MathUtil::Rectangle<int>& srcrect, T* destination,
|
void CopyRegion(const T* const source, const MathUtil::Rectangle<int>& srcrect, T* destination,
|
||||||
const MathUtil::Rectangle<int>& dstrect)
|
const MathUtil::Rectangle<int>& dstrect)
|
||||||
{
|
{
|
||||||
double x_ratio = srcrect.GetWidth() / static_cast<double>(dstrect.GetWidth());
|
double x_ratio = srcrect.GetWidth() / static_cast<double>(dstrect.GetWidth());
|
||||||
double y_ratio = srcrect.GetHeight() / static_cast<double>(dstrect.GetHeight());
|
double y_ratio = srcrect.GetHeight() / static_cast<double>(dstrect.GetHeight());
|
||||||
|
|
|
@ -556,9 +556,9 @@ void EncodeXFB(yuv422_packed* xfb_in_ram, u32 memory_stride, const EFBRectangle&
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply y scaling and copy to the xfb memory location
|
// Apply y scaling and copy to the xfb memory location
|
||||||
SW::copy_region(source.data(), source_rect, xfb_in_ram,
|
SW::CopyRegion(source.data(), source_rect, xfb_in_ram,
|
||||||
EFBRectangle{source_rect.left, source_rect.top, source_rect.right,
|
EFBRectangle{source_rect.left, source_rect.top, source_rect.right,
|
||||||
static_cast<int>(static_cast<float>(source_rect.bottom) * y_scale)});
|
static_cast<int>(static_cast<float>(source_rect.bottom) * y_scale)});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ZCompare(u16 x, u16 y, u32 z)
|
bool ZCompare(u16 x, u16 y, u32 z)
|
||||||
|
|
|
@ -44,8 +44,8 @@ void SWTexture::CopyRectangleFromTexture(const AbstractTexture* source,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
copy_region(reinterpret_cast<const Pixel*>(software_source_texture->GetData()), srcrect,
|
CopyRegion(reinterpret_cast<const Pixel*>(software_source_texture->GetData()), srcrect,
|
||||||
reinterpret_cast<Pixel*>(GetData()), dstrect);
|
reinterpret_cast<Pixel*>(GetData()), dstrect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue