On Tue, 1 Jun 2021 09:20:07 GMT, Alexey Ushakov <a...@openjdk.org> wrote:
> Used MTLDevice recommendedMaxWorkingSetSize property for optimal size of the > texture pool src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLTexurePool.m line 328: > 326: if (_maxPoolMemory < MAX_POOL_MEMORY) { > 327: _maxPoolMemory = MAX_POOL_MEMORY; > 328: } The Apple 5K retina is 5120‑by‑2880 pixels So we start off with a number that is too small #define SCREEN_MEMORY_SIZE_4K (4096*2160*4) //~33,7 mb and then divide it by 2 #define MAX_POOL_MEMORY SCREEN_MEMORY_SIZE_4K/2 and I have no idea what a typical size is for self.device.recommendedMaxWorkingSetSize which we are also dividing by 2. So I have no idea what the logic is behind all these numbers. ------------- PR: https://git.openjdk.java.net/jdk/pull/4279