mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
Merge pull request #250 from ItzWarty/cellPngDecDecodeData_optimizations
Optimize cellPngDecDecodeData's CELL_PNGDEC_ARGB case
This commit is contained in:
commit
490d1059ac
4 changed files with 27 additions and 8 deletions
|
|
@ -333,11 +333,11 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CopyFromReal(u32 to, void* real, u32 count) // (4K pages) copy from real to virtual memory
|
||||
bool CopyFromReal(u32 to, const void* real, u32 count) // (4K pages) copy from real to virtual memory
|
||||
{
|
||||
if (!count) return true;
|
||||
|
||||
u8* from = (u8*)real;
|
||||
const u8* from = (const u8*)real;
|
||||
|
||||
if (u32 frag = to & 4095)
|
||||
{
|
||||
|
|
@ -795,6 +795,12 @@ public:
|
|||
return this->m_addr;
|
||||
}
|
||||
|
||||
u32 AppendRawBytes(const u8 * bytes, size_t count) {
|
||||
Memory.CopyFromReal(this->m_addr, bytes, count);
|
||||
this->m_addr += count;
|
||||
return this->m_addr;
|
||||
}
|
||||
|
||||
u32 Skip(const u32 offset) { return this->m_addr += offset; }
|
||||
|
||||
operator be_t<T>*() { return GetPtr(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue