mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 02:55:36 -05:00
Cleanup.
This commit is contained in:
parent
5b4d4b37fa
commit
d595f34c0a
1 changed files with 5 additions and 8 deletions
|
@ -1673,17 +1673,14 @@ namespace bgfx
|
||||||
data = temp;
|
data = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (srcpitch == dstpitch)
|
|
||||||
{
|
|
||||||
memcpy(bits, data, srcpitch*_rect.m_height);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
uint8_t* src = data;
|
||||||
|
uint8_t* dst = bits;
|
||||||
for (uint32_t yy = 0, height = _rect.m_height; yy < height; ++yy)
|
for (uint32_t yy = 0, height = _rect.m_height; yy < height; ++yy)
|
||||||
{
|
{
|
||||||
uint8_t* src = &data[yy*srcpitch];
|
memcpy(dst, src, rectpitch);
|
||||||
uint8_t* dst = &bits[yy*dstpitch];
|
src += srcpitch;
|
||||||
memcpy(dst, src, srcpitch);
|
dst += dstpitch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue