Closed dzaima closed 2 years ago
Interesting!
This is calling this method: https://github.com/google/skia/blob/30fdea3d8fd5ed39de28acae75586d7c4f08ad11/include/gpu/GrDirectContext.h#L135-L152
And destroy on resize comes from https://github.com/google/skia/blob/30fdea3d8fd5ed39de28acae75586d7c4f08ad11/tools/sk_app/GLWindowContext.cpp#L43-L55
I can reproduce it on macOS even! directContext.abandon + resize causes memory consumption to jump through the roof. Let me try to run sk_app from Skia and if I can repro it there I’ll report it to the main repo.
Ok, seems to be reproducible in sk_app as well. Reported here https://bugs.chromium.org/p/skia/issues/detail?id=12814
When the
directContext.abandon();
inresize
inLayerGLSkija
is present, continuously resizing the window will use up more & more RAM. I thinkabandon
is supposed to be called only if the context is already destroyed, but calling it beforeclose
makes it think to not even try freeing it?Linux mint 20.3 Cinnamon, X11