mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 18:53:58 +01:00
Make the minimum items per thread explicit. Found some bugs, optional arguments are evil.
This commit is contained in:
1 parent
0fa27ff9d7
commit
3be5c7bd9a
12 files changed
+60
-44
No files matched your search
@@ -748,12 +748,13 @@ void ReplacedTexture::Load(int level, void *out, int rowPitch) {
|
||||
|
||||
int w, h, f;
|
||||
uint8_t *image;
|
||||
const int MIN_LINES_PER_THREAD = 4;
|
||||
if (LoadZIMPtr(&zim[0], zimSize, &w, &h, &f, &image)) {
|
||||
ParallelRangeLoop(&g_threadManager, [&](int l, int h) {
|
||||
for (int y = l; y < h; ++y) {
|
||||
memcpy((uint8_t *)out + rowPitch * y, image + w * 4 * y, w * 4);
|
||||
}
|
||||
}, 0, h);
|
||||
}, 0, h, MIN_LINES_PER_THREAD);
|
||||
free(image);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user