mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Typo fix, thanks iota97
This commit is contained in:
parent
69daf47155
commit
c45376ddc7
1 changed files with 6 additions and 6 deletions
|
@ -694,22 +694,22 @@ bool ReplacedTexture::CopyLevelTo(int level, void *out, int rowPitch) {
|
|||
|
||||
if (rowPitch == info.w * 4) {
|
||||
#ifdef PARALLEL_COPY
|
||||
memcpy(out, data.data(), info.w * 4 * info.h);
|
||||
#else
|
||||
ParallelMemcpy(&g_threadManager, out, &data[0], info.w * 4 * info.h);
|
||||
#else
|
||||
memcpy(out, data.data(), info.w * 4 * info.h);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef PARALLEL_COPY
|
||||
for (int y = 0; y < info.h; ++y) {
|
||||
memcpy((uint8_t *)out + rowPitch * y, &data[0] + info.w * 4 * y, info.w * 4);
|
||||
}
|
||||
#else
|
||||
const int MIN_LINES_PER_THREAD = 4;
|
||||
ParallelRangeLoop(&g_threadManager, [&](int l, int h) {
|
||||
for (int y = l; y < h; ++y) {
|
||||
memcpy((uint8_t *)out + rowPitch * y, &data[0] + info.w * 4 * y, info.w * 4);
|
||||
}
|
||||
}, 0, info.h, MIN_LINES_PER_THREAD);
|
||||
#else
|
||||
for (int y = 0; y < info.h; ++y) {
|
||||
memcpy((uint8_t *)out + rowPitch * y, &data[0] + info.w * 4 * y, info.w * 4);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue